aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/app.component.ts
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-07-24 17:34:04 +0300
committervempo <vitaliy.emporopulo@amdocs.com>2018-07-25 11:39:10 +0300
commita52d50e788792a63e97a9176ab319d53db7a2853 (patch)
treeb1c2222cacf4b8192aea16d1e0315b1f005c5347 /sdc-workflow-designer-ui/src/app/app.component.ts
parent3c2665debb400aef7f0ed9e235698d2ff9f859db (diff)
Replaced old implementation at root
Old project files and directories has been moved under 'deprecated-workflow-designer'. The old project is not built by the CI anymore, but can be still built manually. New modules/directories have been moved up and integrated with the CI system. Change-Id: I1528c792bcbcce9e50bfc294a1328a20e72c91cf Issue-ID: SDC-1559 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/app.component.ts')
-rw-r--r--sdc-workflow-designer-ui/src/app/app.component.ts72
1 files changed, 0 insertions, 72 deletions
diff --git a/sdc-workflow-designer-ui/src/app/app.component.ts b/sdc-workflow-designer-ui/src/app/app.component.ts
deleted file mode 100644
index 15796977..00000000
--- a/sdc-workflow-designer-ui/src/app/app.component.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
-
-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
- */
-@Component({
- selector: 'workflow',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.css']
-})
-export class AppComponent implements OnInit {
- public isAuthorized = false;
- public toscaLoaded = false;
- public restLoaded = false;
- public typeLoaded = true;
-
- 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');
- // the lang to use, if the lang isn't available, it will use the current loader to get them
- const topWin: any = window.top;
- let browserLang = '';
- if (topWin.getLanguage && typeof topWin.getLanguage == 'function') {
- browserLang = topWin.getLanguage() || '';
- } else {
- // browserLang = translate.getBrowserCultureLang() || '';
- // by default, window.navigator.languages will return a language list with the users prefered language as the first one.
- // then, browserLang may with the result of translate.getBrowserCultureLang().
- // but chrome version 57 not implement this functional. The first is not the user's prefered.
- // So, browserLang can only use window.navigator.language as the user's prefered language.
- browserLang = window.navigator.language;
- }
- 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;
- });
- }
-}