diff options
author | YuanHu <yuan.hu1@zte.com.cn> | 2018-03-27 17:58:42 +0800 |
---|---|---|
committer | YuanHu <yuan.hu1@zte.com.cn> | 2018-03-27 17:58:42 +0800 |
commit | 59884c775c9d06e2195401a09e08650a5cf37b20 (patch) | |
tree | 80a2db253939f7a3aeb6e7be45c517c87d748511 /sdc-workflow-designer-ui/src/app/components/property/node-template/node-template.component.ts | |
parent | 8261a4ea8091c27b61ac581a852e2e18283b3cdd (diff) |
Display Extend Activities on WF Designer UI.
Display Extend Activities on WF Designer UI.
Use Extend Activities to Design Workflow and Save
Issue-ID: SDC-1130,SDC-1131
Change-Id: Iea62eb0edafb2270deaac89b458015e78d961cd0
Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components/property/node-template/node-template.component.ts')
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/property/node-template/node-template.component.ts | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sdc-workflow-designer-ui/src/app/components/property/node-template/node-template.component.ts b/sdc-workflow-designer-ui/src/app/components/property/node-template/node-template.component.ts index 5d7339d0..7fa9675f 100644 --- a/sdc-workflow-designer-ui/src/app/components/property/node-template/node-template.component.ts +++ b/sdc-workflow-designer-ui/src/app/components/property/node-template/node-template.component.ts @@ -18,32 +18,31 @@ import { ValueSource } from '../../../model/value-source.enum'; import { Parameter } from '../../../model/workflow/parameter'; import { ToscaNodeTask } from '../../../model/workflow/tosca-node-task'; import { BroadcastService } from '../../../services/broadcast.service'; -import { DataService } from '../../../services/data/data.service'; +import { ToscaService } from '../../../services/tosca.service'; /** * node template component provides operations about tosca modules which saved in winery. * This component will be used in the property component while the corresponding workflow node is calling the node template's operation */ @Component({ - selector: 'b4t-node-template', + selector: 'wfm-node-template', templateUrl: 'node-template.component.html', }) export class NodeTemplateComponent implements AfterViewInit { @Input() public node: ToscaNodeTask; @Input() public planItems: PlanTreeviewItem[]; - public inputSources: ValueSource[] = [ValueSource.String, ValueSource.Variable, ValueSource.Topology, ValueSource.Plan]; + public inputSources: ValueSource[] = [ValueSource.string, ValueSource.Variable, ValueSource.Topology, ValueSource.Plan]; public outputSources: ValueSource[] = [ValueSource.Topology, ValueSource.Plan]; public nodeInterfaces: string[] = []; public nodeOperations: any[] = []; public nodeTemplates: NodeTemplate[] = []; - constructor(private dataService: DataService) { + constructor(private toscaService: ToscaService) { } public ngAfterViewInit() { - this.dataService.loadNodeTemplates() - .subscribe(nodeTemplates => this.nodeTemplates = nodeTemplates); + this.nodeTemplates = this.toscaService.getNodeTemplate(); this.loadInterfaces(); this.loadOperations(); @@ -86,7 +85,7 @@ export class NodeTemplateComponent implements AfterViewInit { private loadInterfaces() { if (this.node.template.id) { - this.dataService.loadNodeTemplateInterfaces(this.node.template) + this.toscaService.loadNodeTemplateInterfaces(this.node.template) .subscribe(interfaces => { this.nodeInterfaces = interfaces; }); @@ -98,7 +97,7 @@ export class NodeTemplateComponent implements AfterViewInit { private loadOperations() { if (this.node.nodeInterface) { this.nodeOperations = []; - this.dataService.loadNodeTemplateOperations( + this.toscaService.loadNodeTemplateOperations( this.node.template, this.node.nodeInterface) .subscribe(operations => this.nodeOperations = operations); @@ -109,7 +108,7 @@ export class NodeTemplateComponent implements AfterViewInit { private loadParameters() { if (this.node.operation) { - this.dataService.loadNodeTemplateOperationParameter( + this.toscaService.loadNodeTemplateOperationParameter( this.node.template, this.node.nodeInterface, this.node.operation) @@ -118,7 +117,7 @@ export class NodeTemplateComponent implements AfterViewInit { this.node.output = []; params.input.forEach(param => { - const p = new Parameter(param, '', ValueSource[ValueSource.String]); + const p = new Parameter(param, '', ValueSource[ValueSource.string]); this.node.input.push(p); }); |