From b8932e8304ed077912949890c3ec47a087be7ddd Mon Sep 17 00:00:00 2001 From: Lvbo163 Date: Wed, 6 Sep 2017 17:31:15 +0800 Subject: paramters can quote input parameter of start event rest task input parameters can quote input parameters of start event Issue-ID: SDC-122 Change-Id: I0cda0f1967514ac90e377b2f054ddf2cef011694 Signed-off-by: Lvbo163 --- .../src/app/components/property/properties.component.html | 2 +- .../src/app/components/property/properties.component.ts | 7 ++++++- .../rest-task-parameters/rest-task-parameters.component.html | 4 ++-- .../rest-task-parameters/rest-task-parameters.component.ts | 4 +++- .../src/app/components/property/rest-task/rest-task.component.html | 2 +- .../src/app/components/property/rest-task/rest-task.component.ts | 3 +++ 6 files changed, 16 insertions(+), 6 deletions(-) (limited to 'sdc-workflow-designer-ui/src/app/components/property') diff --git a/sdc-workflow-designer-ui/src/app/components/property/properties.component.html b/sdc-workflow-designer-ui/src/app/components/property/properties.component.html index 2ca5c690..bcc63dd0 100644 --- a/sdc-workflow-designer-ui/src/app/components/property/properties.component.html +++ b/sdc-workflow-designer-ui/src/app/components/property/properties.component.html @@ -40,5 +40,5 @@ - + diff --git a/sdc-workflow-designer-ui/src/app/components/property/properties.component.ts b/sdc-workflow-designer-ui/src/app/components/property/properties.component.ts index 0630f94b..f3f784a1 100644 --- a/sdc-workflow-designer-ui/src/app/components/property/properties.component.ts +++ b/sdc-workflow-designer-ui/src/app/components/property/properties.component.ts @@ -16,6 +16,7 @@ import { WorkflowNode } from '../../model/workflow/workflow-node'; import { BroadcastService } from '../../services/broadcast.service'; import { JsPlumbService } from '../../services/jsplumb.service'; import { WorkflowService } from '../../services/workflow.service'; +import { PlanTreeviewItem } from "../../model/plan-treeview-item"; /** * property component presents information of a workflow node. @@ -31,6 +32,7 @@ export class PropertiesComponent implements AfterViewInit { public node: WorkflowNode; public show = false; public titleEditing = false; + public planItems: PlanTreeviewItem[]; constructor(private broadcastService: BroadcastService, private jsPlumnService: JsPlumbService, @@ -40,7 +42,10 @@ export class PropertiesComponent implements AfterViewInit { public ngAfterViewInit() { this.broadcastService.showProperty$.subscribe(show => this.show = show); - this.broadcastService.nodeProperty$.subscribe(node => this.node = node); + this.broadcastService.nodeProperty$.subscribe(node => { + this.node = node; + this.planItems = this.workflowService.getPlanParameters(this.node.id); + }); } public nodeNameChanged() { diff --git a/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.html b/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.html index 53f02f17..d13a2623 100644 --- a/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.html +++ b/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.html @@ -11,8 +11,8 @@ * ZTE - initial API and implementation and/or initial documentation *******************************************************************************/ --> - + + [planItems]="planItems" [defaultValueSource]="valueSource[valueSource.String]"> diff --git a/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.ts b/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.ts index a50cc1be..31b2fd82 100644 --- a/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.ts +++ b/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.ts @@ -19,6 +19,7 @@ import { BroadcastService } from '../../../../services/broadcast.service'; import { RestParameter } from "../../../../model/workflow/rest-parameter"; import { ValueSource } from "../../../../model/value-source.enum"; import { SwaggerTreeConverterService } from "../../../../services/swagger-tree-converter.service"; +import { PlanTreeviewItem } from "../../../../model/plan-treeview-item"; /** * property component presents information of a workflow node. @@ -31,8 +32,9 @@ import { SwaggerTreeConverterService } from "../../../../services/swagger-tree-c }) export class RestTaskParametersComponent implements OnInit { @Input() public task: RestTask; + @Input() public planItems: PlanTreeviewItem[]; - public inputSources: ValueSource[] = [ValueSource.String]; + public inputSources: ValueSource[] = [ValueSource.String, ValueSource.Plan]; public requestParameters: RestParameter[] = []; // not include body parameter public bodyParameter: TreeNode[] = []; public responseParameter: TreeNode[] = []; diff --git a/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.html b/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.html index af428840..332811b5 100644 --- a/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.html +++ b/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.html @@ -44,5 +44,5 @@
- +
diff --git a/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.ts b/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.ts index 6c264646..d0c92dfd 100644 --- a/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.ts +++ b/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.ts @@ -21,6 +21,7 @@ import { WorkflowConfigService } from '../../../services/workflow-config.service import { Microservice } from "../../../model/workflow/microservice"; import { WorkflowUtil } from "../../../util/workflow-util"; import { RestParameter } from "../../../model/workflow/rest-parameter"; +import { PlanTreeviewItem } from "../../../model/plan-treeview-item"; @Component({ selector: 'b4t-rest-task', @@ -28,6 +29,8 @@ import { RestParameter } from "../../../model/workflow/rest-parameter"; }) export class RestTaskComponent implements AfterViewInit, OnInit { @Input() public node: RestTask; + @Input() public planItems: PlanTreeviewItem[]; + public swaggerJson: any = {}; public restInterfaces: any[]; public restOperations: any = []; -- cgit 1.2.3-korg