From 59884c775c9d06e2195401a09e08650a5cf37b20 Mon Sep 17 00:00:00 2001 From: YuanHu Date: Tue, 27 Mar 2018 17:58:42 +0800 Subject: Display Extend Activities on WF Designer UI. Display Extend Activities on WF Designer UI. Use Extend Activities to Design Workflow and Save Issue-ID: SDC-1130,SDC-1131 Change-Id: Iea62eb0edafb2270deaac89b458015e78d961cd0 Signed-off-by: YuanHu --- sdc-workflow-designer-ui/src/app/app.component.ts | 32 ++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'sdc-workflow-designer-ui/src/app/app.component.ts') diff --git a/sdc-workflow-designer-ui/src/app/app.component.ts b/sdc-workflow-designer-ui/src/app/app.component.ts index 54972b72..15796977 100644 --- a/sdc-workflow-designer-ui/src/app/app.component.ts +++ b/sdc-workflow-designer-ui/src/app/app.component.ts @@ -10,9 +10,13 @@ * ZTE - initial API and implementation and/or initial documentation */ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { BroadcastService } from './services/broadcast.service'; +import { LOCATION_INITIALIZED } from '@angular/common'; +import { AuthService } from './services/auth.service'; +import { RestService } from './services/rest.service'; +import { ToscaService } from './services/tosca.service'; /** * main component @@ -22,9 +26,15 @@ import { BroadcastService } from './services/broadcast.service'; templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) -export class AppComponent { +export class AppComponent implements OnInit { + public isAuthorized = false; + public toscaLoaded = false; + public restLoaded = false; + public typeLoaded = true; - constructor(translate: TranslateService, private broadcastService: BroadcastService) { + constructor(translate: TranslateService, private authService: AuthService, + private broadcastService: BroadcastService, toscaService: ToscaService, + restService: RestService) { // Init the I18n function. // this language will be used as a fallback when a translation isn't found in the current language translate.setDefaultLang('en'); @@ -43,4 +53,20 @@ export class AppComponent { } translate.use(browserLang); } + + public ngOnInit() { + // this.broadcastService.openRight$.subscribe(hasRight => { + // this.isAuthorized = hasRight; + // }); + this.isAuthorized = true; + this.broadcastService.updateModelToscaConfig$.subscribe(tosca => { + this.toscaLoaded = true; + }); + this.broadcastService.updateModelRestConfig$.subscribe(swagger => { + this.restLoaded = true; + }); + this.broadcastService.updateNodeTypeConfig$.subscribe(type => { + this.typeLoaded = true; + }); + } } -- cgit 1.2.3-korg