summaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.ts
diff options
context:
space:
mode:
authorLvbo163 <lv.bo163@zte.com.cn>2018-01-11 19:13:03 +0800
committerLvbo163 <lv.bo163@zte.com.cn>2018-01-11 19:13:03 +0800
commitf093dcdbc4012a64c11a293052afbc74d84c8c5a (patch)
tree519bfc5640253be40a25a1dde2f071a350331f9e /sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.ts
parent761b385b2a0a6dbec10717e6d94f1cd1e04bb2ef (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/rest-task.component.ts')
-rw-r--r--sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.ts9
1 files changed, 7 insertions, 2 deletions
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);
+ });
}
}
}