From f093dcdbc4012a64c11a293052afbc74d84c8c5a Mon Sep 17 00:00:00 2001 From: Lvbo163 Date: Thu, 11 Jan 2018 19:13:03 +0800 Subject: add backend service add data access interfaces for template data Issue-ID: SDC-905 Change-Id: Ie632b00dbc6ede01b0ee8a3c7abdbbc1f476f1e4 Signed-off-by: Lvbo163 --- .../src/app/components/property/rest-task/rest-task.component.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.ts') 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); + }); } } } -- cgit 1.2.3-korg