diff options
author | 2017-09-21 11:31:52 +0800 | |
---|---|---|
committer | 2017-09-21 11:31:52 +0800 | |
commit | 0d8a8e92714e0a8f3a59674a836a470fe8914a89 (patch) | |
tree | 6cd1abd9468c81cd23acdb451cff0129accd0a50 /sdc-workflow-designer-ui/src/app/components/property | |
parent | 3628e915b22b3171f1ab7678fb3432c6986faa53 (diff) |
Support set value for tree branch
Set value for tree branch node.
Issue-ID: SDC-355
Change-Id: I4fea941bc2f3de321079049ea4735491cf9ca474
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components/property')
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.ts | 8 |
1 files changed, 6 insertions, 2 deletions
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 87903578..7f8bbf43 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 @@ -20,6 +20,7 @@ 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"; +import { WorkflowConfigService } from "../../../../services/workflow-config.service"; /** * property component presents information of a workflow node. @@ -42,7 +43,9 @@ export class RestTaskParametersComponent implements OnInit { private index = 1; - constructor(private broadcastService: BroadcastService, private swaggerTreeConverterService: SwaggerTreeConverterService) { + constructor(private broadcastService: BroadcastService, + private workflowConfigService: WorkflowConfigService, + private swaggerTreeConverterService: SwaggerTreeConverterService) { } public ngOnInit() { @@ -59,7 +62,8 @@ export class RestTaskParametersComponent implements OnInit { this.task.parameters.forEach(param => { if (param.position === 'body') { const requestTreeNode = this.swaggerTreeConverterService - .schema2TreeNode('Request Param', this.task.serviceName, this.task.serviceVersion, param.schema); + .schema2TreeNode(this.workflowConfigService.getSwaggerInfo(this.task.serviceName, this.task.serviceVersion), 'Request Param', param.schema, param.value); + param.value = requestTreeNode.value; param.value = param.schema.value; this.bodyParameter.push(requestTreeNode); } else { |