-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2fcb0fb
commit 62d3268
Showing
266 changed files
with
21,375 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
assembly/assembly-ide-war/src/main/webapp/WEB-INF/rewrite.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
|
||
RewriteRule ^/api/(.*)$ /wsmaster/api/$1 [L] | ||
RewriteRule ^/factory\\?(.*)$ /dashboard/#/load-factory/$1 [R,NE] | ||
RewriteRule ^/factory/(.*)$ /dashboard/#/load-factory/$1 [R,NE] | ||
RewriteRule ^/f/?(.*)$ /dashboard/#/load-factory/$1 [R,NE] | ||
RewriteRule ^/f\\?(.*)$ /dashboard/#/load-factory/$1 [R,NE] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
dashboard/src/app/factories/create-factory/action/factory-action-box.controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
/* | ||
* Copyright (c) 2015-2017 Codenvy, S.A. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Codenvy, S.A. - initial API and implementation | ||
*/ | ||
'use strict'; | ||
|
||
/** | ||
* Defines controller of directive for displaying action box. | ||
* @ngdoc controller | ||
* @name factory.directive:FactoryActionBoxController | ||
* @author Florent Benoit | ||
*/ | ||
export class FactoryActionBoxController { | ||
private $mdDialog: ng.material.IDialogService; | ||
private actions: Array<any>; | ||
private selectedAction: string; | ||
private factoryObject: any; | ||
private lifecycle: any; | ||
private onChange: Function; | ||
|
||
/** | ||
* Default constructor that is using resource injection | ||
* @ngInject for Dependency injection | ||
*/ | ||
constructor($mdDialog: ng.material.IDialogService) { | ||
this.$mdDialog = $mdDialog; | ||
|
||
this.actions = []; | ||
this.actions.push({name : 'RunCommand', id: 'runcommand'}); | ||
this.actions.push({name : 'openFile', id: 'openfile'}); | ||
this.selectedAction = this.actions[0].id; | ||
} | ||
|
||
/** | ||
* Edit the action based on the provided index | ||
* @param $event the mouse event | ||
* @param index the index in the array of factory actions | ||
*/ | ||
editAction($event: any, index: number): void { | ||
let action = this.factoryObject.ide[this.lifecycle].actions[index]; | ||
this.$mdDialog.show({ | ||
targetEvent: $event, | ||
controller: 'FactoryActionDialogEditController', | ||
controllerAs: 'factoryActionDialogEditCtrl', | ||
bindToController: true, | ||
clickOutsideToClose: true, | ||
locals: { | ||
callbackController: this, | ||
index: index, | ||
// selectedAction: action | ||
selectedValue: action.properties | ||
}, | ||
templateUrl: 'app/factories/create-factory/action/factory-action-edit.html' | ||
}); | ||
} | ||
|
||
/** | ||
* Edit action callback. | ||
* | ||
* @param index the index in the array of factory actions | ||
* @param newValue new value | ||
*/ | ||
callbackEditAction(index: number, newValue: any): void { | ||
this.factoryObject.ide[this.lifecycle].actions[index].properties = newValue; | ||
|
||
this.onChange(); | ||
} | ||
|
||
addAction(): void { | ||
if (!this.factoryObject.ide) { | ||
this.factoryObject.ide = {}; | ||
} | ||
if (!this.factoryObject.ide[this.lifecycle]) { | ||
this.factoryObject.ide[this.lifecycle] = {}; | ||
this.factoryObject.ide[this.lifecycle].actions = []; | ||
} | ||
|
||
let actionToAdd; | ||
if ('openfile' === this.selectedAction) { | ||
actionToAdd = { | ||
"properties": { | ||
"file": this.selectedParam | ||
}, | ||
"id": "openFile" | ||
}; | ||
} else if ('runcommand' === this.selectedAction) { | ||
actionToAdd = { | ||
"properties": { | ||
"name": this.selectedParam | ||
}, | ||
"id": "runCommand" | ||
}; | ||
} | ||
if (actionToAdd) { | ||
this.factoryObject.ide[this.lifecycle].actions.push(actionToAdd); | ||
} | ||
|
||
this.onChange(); | ||
} | ||
|
||
/** | ||
* Remove action based on the provided index | ||
* @param index the index in the array of factory actions | ||
*/ | ||
removeAction(index: number): void { | ||
this.factoryObject.ide[this.lifecycle].actions.splice(index, 1); | ||
|
||
this.onChange(); | ||
} | ||
} |
Oops, something went wrong.