summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2022-09-23 12:31:12 +0100
committerMichael Morris <michael.morris@est.tech>2022-10-05 08:18:25 +0000
commit6ed5592ccb3b2bdb61403f1d1d41d93088cb0709 (patch)
tree1978737dc736d000dbb34a9ddc50a7e2008ab573 /catalog-ui/src/app/ng2/components
parent404bfc9c50e95df1e75dbf8325fae41bfd96871a (diff)
Add data type view/workspace
Implements a data type workspace, based on the Service/VF workspace, where it is possible to view a data type information. Issue-ID: SDC-4193 Signed-off-by: André Schmid <andre.schmid@est.tech> Change-Id: Ica341efa43e70b4ac85d42d22a1397e0ab6e2794
Diffstat (limited to 'catalog-ui/src/app/ng2/components')
-rw-r--r--catalog-ui/src/app/ng2/components/layout/top-nav/top-nav.component.ts20
1 files changed, 8 insertions, 12 deletions
diff --git a/catalog-ui/src/app/ng2/components/layout/top-nav/top-nav.component.ts b/catalog-ui/src/app/ng2/components/layout/top-nav/top-nav.component.ts
index 3bd2255488..2b7be9cdeb 100644
--- a/catalog-ui/src/app/ng2/components/layout/top-nav/top-nav.component.ts
+++ b/catalog-ui/src/app/ng2/components/layout/top-nav/top-nav.component.ts
@@ -19,17 +19,13 @@
*/
import * as _ from "lodash";
-import {Component, Inject, Input, Output, EventEmitter, OnInit, OnDestroy, OnChanges} from "@angular/core";
-import {IHostedApplication, IUserProperties} from "app/models";
-import {MenuItemGroup, MenuItem} from "app/utils";
+import {Component, EventEmitter, Inject, Input, OnChanges, OnInit, Output} from "@angular/core";
+import {IHostedApplication, IUserProperties, Plugin, PluginsConfiguration} from "app/models";
+import {MenuItem, MenuItemGroup} from "app/utils";
import {AuthenticationService} from "../../../services/authentication.service";
-import {SdcConfigToken, ISdcConfig} from "../../../config/sdc-config.config";
+import {ISdcConfig, SdcConfigToken} from "../../../config/sdc-config.config";
import {TranslateService} from "../../../shared/translator/translate.service";
-import {PluginsConfiguration, Plugin} from "app/models";
-import { Subscription } from "rxjs";
-// import { Store } from "@ngrx/store";
-// import { AppState } from "app/ng2/store/app.state";
-// import * as unsavedChangesReducer from 'app/ng2/store/reducers/unsaved-changes.reducer';
+import {Subscription} from "rxjs";
declare const window:any;
@Component({
@@ -111,13 +107,13 @@ export class TopNavComponent implements OnInit, OnChanges {
ngOnChanges(changes) {
if (changes['menuModel']) {
- console.log('menuModel was changed!');
+ console.debug('menuModel was changed!');
this.generateMenu();
}
}
ngOnInit() {
- console.log('Nav is init!', this.menuModel);
+ console.debug('Nav is init!', this.menuModel);
this.user = this.authService.getLoggedinUser();
this.topNavPlugins = _.filter(PluginsConfiguration.plugins, (plugin: Plugin) => {
return plugin.pluginDisplayOptions["tab"] !== undefined;
@@ -190,7 +186,7 @@ export class TopNavComponent implements OnInit, OnChanges {
if (item.callback) {
(item.callback.apply(undefined, item.params)).then(onSuccess, onFailed);
- } else {
+ } else if (this[item.action]) {
this[item.action](item.state, item.params).then(onSuccess, onFailed);
}
}