diff options
Diffstat (limited to 'catalog-ui/src/app/view-models/workspace/tabs/composition')
2 files changed, 7 insertions, 3 deletions
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts index 0e5a5fcd6c..4b9dd6fc00 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts @@ -47,6 +47,7 @@ export interface ICompositionViewModelScope extends IWorkspaceViewModelScope { onBackgroundClick():void; setSelectedInstance(componentInstance:ComponentInstance):void; printScreen():void; + isPNF():boolean; cacheComponentsInstancesFullData:Component; } @@ -90,7 +91,6 @@ export class CompositionViewModel { this.$scope.setValidState(true); this.initScope(); this.initGraphData(); - this.$scope.updateSelectedMenuItem(); this.registerGraphEvents(this.$scope); } @@ -242,7 +242,10 @@ export class CompositionViewModel { this.$scope.setComponent(this.$scope.currentComponent); this.$scope.updateSelectedComponent(); }; - + + this.$scope.isPNF = (): boolean => { + return this.$scope.selectedComponent.isResource() && (<Resource>this.$scope.selectedComponent).resourceType === ResourceType.PNF; + }; this.eventListenerService.registerObserverCallback(EVENTS.ON_CHECKOUT, this.$scope.reload); diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view-model.ts index c4c63fae06..f0c8b1d86b 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view-model.ts @@ -249,7 +249,6 @@ export class ResourceArtifactsViewModel { this.$scope.isLoading = false; this.$scope.artifactType = this.artifactsUtils.getArtifactTypeByState(this.$state.current.name); - this.loadArtifacts(); this.$scope.getTitle = ():string => { return this.artifactsUtils.getTitle(this.$scope.artifactType, this.$scope.currentComponent); }; @@ -335,5 +334,7 @@ export class ResourceArtifactsViewModel { this.eventListenerService.unRegisterObserver(GRAPH_EVENTS.ON_NODE_SELECTED, this.loadArtifacts); this.eventListenerService.unRegisterObserver(GRAPH_EVENTS.ON_GRAPH_BACKGROUND_CLICKED, this.loadArtifacts); }); + + this.loadArtifacts(); } } |