diff options
author | 2018-01-11 19:13:03 +0800 | |
---|---|---|
committer | 2018-01-11 19:13:03 +0800 | |
commit | f093dcdbc4012a64c11a293052afbc74d84c8c5a (patch) | |
tree | 519bfc5640253be40a25a1dde2f071a350331f9e /sdc-workflow-designer-ui/src/app/components/property/rest-task | |
parent | 761b385b2a0a6dbec10717e6d94f1cd1e04bb2ef (diff) |
add backend service
add data access interfaces for template data
Issue-ID: SDC-905
Change-Id: Ie632b00dbc6ede01b0ee8a3c7abdbbc1f476f1e4
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components/property/rest-task')
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.html | 6 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.ts | 9 |
2 files changed, 10 insertions, 5 deletions
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 99b8a0f4..089d242d 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 @@ -13,7 +13,7 @@ --> <div class="form-group row"> - <label class="col-md-3 form-control-label text-md-right">Service</label> + <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.REST_SERVICE' | translate}}</label> <div class="col-md-9"> <select class="form-control" [ngModel]="node.restConfigId" (ngModelChange)="serviceChanged($event)"> <option *ngFor="let restConfig of restService.getRestConfigs()" value="{{restConfig.id}}">{{restConfig.id}}</option> @@ -22,7 +22,7 @@ </div> <div class="form-group row"> - <label class="col-md-3 form-control-label text-md-right">Path</label> + <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.REST_PATH' | translate}}</label> <div class="col-md-9"> <select class="form-control" [ngModel]="node.path" (ngModelChange)="pathChanged($event)"> <option *ngFor="let interface of restInterfaces" value="{{interface}}">{{interface}}</option> @@ -31,7 +31,7 @@ </div> <div class="form-group row"> - <label class="col-md-3 form-control-label text-md-right">Method</label> + <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.REST_METHOD' | translate}}</label> <div class="col-md-9"> <select class="form-control" [ngModel]="node.method" (ngModelChange)="methodChanged($event)"> <option *ngFor="let operation of restOperations" value="{{operation}}">{{operation}}</option> 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 dfb2f0f3..0dccee1e 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 @@ -11,6 +11,7 @@ *******************************************************************************/ import { Component, Input, OnInit } from '@angular/core'; import { Subscription } from 'rxjs/Subscription'; +import { TranslateService } from '@ngx-translate/core'; import { PlanTreeviewItem } from '../../../model/plan-treeview-item'; import { Swagger, SwaggerMethod, SwaggerParameter, SwaggerResponse } from '../../../model/swagger'; @@ -19,6 +20,7 @@ import { ValueType } from '../../../model/value-type.enum'; import { RestParameter } from '../../../model/workflow/rest-parameter'; import { RestTask } from '../../../model/workflow/rest-task'; import { BroadcastService } from '../../../services/broadcast.service'; +import { NoticeService } from '../../../services/notice.service'; import { RestService } from '../../../services/rest.service'; import { WorkflowUtil } from '../../../util/workflow-util'; @@ -34,7 +36,8 @@ export class RestTaskComponent implements OnInit { public restOperations: any = []; private swagger: Swagger; - constructor(private broadcastService: BroadcastService, public restService: RestService) { } + constructor(private broadcastService: BroadcastService, public restService: RestService, + private noticeService: NoticeService, private translate: TranslateService) { } public ngOnInit() { this.loadInterfaces(); @@ -72,7 +75,9 @@ export class RestTaskComponent implements OnInit { } this.loadOperations(); } else { - console.log('swagger not exist'); + this.translate.get('WORKFLOW.MSG.SWAGGER_NOT_EXISTS').subscribe((res: string) => { + this.noticeService.error(res); + }); } } } |