diff options
author | dermot123 <dermot.melia@est.tech> | 2019-03-13 12:37:35 +0000 |
---|---|---|
committer | dermot123 <dermot.melia@est.tech> | 2019-03-13 12:37:35 +0000 |
commit | d83268a4cb465fa79f8b57483517226d588fb427 (patch) | |
tree | c8f32b63d00954987829918af2da2947d5d9f186 /catalog-ui/src/app | |
parent | 56e535b98ea753d7b64dfbdb9d64d380457eaba5 (diff) |
Add Deployment Artifacts to PNF
Add support for PM_Dictionary and VES Events Deployment Artifacts to PNF
Change-Id: Ief85d40bd180aae0662cfb58f794f5b0d7e5ec9c
Issue-ID: SDC-2109
Issue-ID: SDC-2155
Signed-off-by: dermot123 <dermot.melia@est.tech>
Diffstat (limited to 'catalog-ui/src/app')
3 files changed, 13 insertions, 4 deletions
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view.html b/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view.html index a571fdca0d..5559e534b9 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view.html +++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view.html @@ -81,7 +81,7 @@ data-ui-sref="workspace.composition.deployment" tooltips tooltip-class="tooltip-custom tab-tooltip" tooltip-content="Deployment Artifacts" data-tests-id="deployment-artifact-tab" - data-ng-if="!isPNF() && !isConfiguration() && !(isComponentInstanceSelected() && currentComponent.selectedInstance.isServiceProxy())" + data-ng-if="!isConfiguration() && !(isComponentInstanceSelected() && currentComponent.selectedInstance.isServiceProxy())" data-ng-class="{'disabled': disabledTabs}"> <div class="i-sdc-designer-sidebar-tab-icon sprite-new deployment-artifacts"></div> </button> 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 627d20528e..2af341b2c1 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 @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -50,6 +50,7 @@ export interface IArtifactsViewModelScope extends ICompositionViewModelScope { getEnvArtifact(heatArtifact:ArtifactModel):any; getEnvArtifactName(artifact:ArtifactModel):string; isLicenseArtifact(artifact:ArtifactModel):boolean; + isVfOrPnf():boolean; //isVFiArtifact(artifact:ArtifactModel):boolean; } @@ -329,6 +330,14 @@ export class ResourceArtifactsViewModel { }); }; + this.$scope.isVfOrPnf = ():boolean => { + if (this.$scope.selectedComponent.isResource()) { + let selectedResourceType = (<Resource>this.$scope.selectedComponent).resourceType; + return selectedResourceType == 'VF' || selectedResourceType == 'PNF'; + } + return false; + } + this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_NODE_SELECTED, this.loadArtifacts); this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_GRAPH_BACKGROUND_CLICKED, this.loadArtifacts); diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html index ce1b8aef11..ec81ed81ee 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html +++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html @@ -77,7 +77,7 @@ </div> </div> - <div class="w-sdc-designer-sidebar-section-footer" data-ng-if="!isViewMode() && artifactType!=='api' && (!isComponentInstanceSelected()||selectedComponent.resourceType=='VF') && ('deployment' != artifactType || selectedComponent.isComplex())"> + <div class="w-sdc-designer-sidebar-section-footer" data-ng-if="!isViewMode() && artifactType!=='api' && (!isComponentInstanceSelected()||isVfOrPnf()) && ('deployment' != artifactType || selectedComponent.isComplex())"> <button class="w-sdc-designer-sidebar-section-footer-action tlv-btn blue" data-tests-id="add_Artifact_Button" data-ng-click="addOrUpdate({})" type="button">Add Artifact</button> </div> </div> |