summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/workspace/tabs/composition
diff options
context:
space:
mode:
authorAvi Ziv <avi.ziv@amdocs.com>2017-07-31 15:50:46 +0300
committerMichael Lando <ml636r@att.com>2017-08-02 21:18:34 +0300
commitf5854fd32c19c44d32a3e6739b30271d4dccd393 (patch)
tree6e7420dd3d82200849e51c2af3f2696f11815d12 /catalog-ui/src/app/view-models/workspace/tabs/composition
parente280d7229f42210719b76775cd47bddb675c3c53 (diff)
[SDC] code rebase for sdc resync to LF
Change-Id: If6d87c9e324f508a8a6b80b10a03d1843901472e Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/src/app/view-models/workspace/tabs/composition')
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts7
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view-model.ts3
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();
}
}