diff options
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components/property/rest-task')
3 files changed, 13 insertions, 4 deletions
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 4f98e689..53f02f17 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 @@ -12,3 +12,7 @@ *******************************************************************************/ --> <b4t-parameter *ngFor="let param of requestParameters" [param]="param" [valueSource]= "inputSources"></b4t-parameter> + +<!-- body parameter --> +<b4t-parameter-tree [task]="task" [parameters]="bodyParameter" [valueSource]="inputSources" + [defaultValueSource]="valueSource[valueSource.String]"></b4t-parameter-tree> 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 f2d802c2..a50cc1be 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 @@ -18,6 +18,7 @@ import { RestTask } from '../../../../model/workflow/rest-task'; 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"; /** * property component presents information of a workflow node. @@ -39,7 +40,7 @@ export class RestTaskParametersComponent implements OnInit { private index = 1; - constructor(private broadcastService: BroadcastService) { + constructor(private broadcastService: BroadcastService, private swaggerTreeConverterService: SwaggerTreeConverterService) { } public ngOnInit() { @@ -55,8 +56,10 @@ export class RestTaskParametersComponent implements OnInit { this.task.parameters.forEach(param => { if (param.position === 'body') { - // TODO add body parameter handler - // this.bodyParameter.push(param); + const requestTreeNode = this.swaggerTreeConverterService + .schema2TreeNode('Request Param', this.task.serviceName, this.task.serviceVersion, param.schema); + param.value = param.schema.value; + this.bodyParameter.push(requestTreeNode); } else { this.requestParameters.push(param); } 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 a416944c..af428840 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 @@ -43,4 +43,6 @@ </div> <hr> -<b4t-rest-task-parameters [task]="node"></b4t-rest-task-parameters> +<div class="ui-fluid"> + <b4t-rest-task-parameters [task]="node"></b4t-rest-task-parameters> +</div> |