aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/app.component.ts
diff options
context:
space:
mode:
authorYuanHu <yuan.hu1@zte.com.cn>2018-03-27 17:58:42 +0800
committerYuanHu <yuan.hu1@zte.com.cn>2018-03-27 17:58:42 +0800
commit59884c775c9d06e2195401a09e08650a5cf37b20 (patch)
tree80a2db253939f7a3aeb6e7be45c517c87d748511 /sdc-workflow-designer-ui/src/app/app.component.ts
parent8261a4ea8091c27b61ac581a852e2e18283b3cdd (diff)
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 <yuan.hu1@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/app.component.ts')
-rw-r--r--sdc-workflow-designer-ui/src/app/app.component.ts32
1 files changed, 29 insertions, 3 deletions
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;
+ });
+ }
}