diff options
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree')
3 files changed, 16 insertions, 2 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts index 80b2a4b52..72b3c398e 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts @@ -396,8 +396,8 @@ export class VFModuleModelInfo implements ILevelNodeInfo { method: (node, serviceModelId) => { this._store.dispatch(pauseActionVFModuleInstance(node.data.dynamicModelName, node.parent.data.vnfStoreKey, serviceModelId, node.data.modelName)); }, - visible: () => this._sharedTreeService.shouldShowPauseInstantiation(node), - enable: () => true, + visible: () => (this._sharedTreeService.shouldShowPauseInstantiation(node) && this._sharedTreeService.showPauseWithOrchStatus(node)), + enable: () => this._sharedTreeService.showPauseWithOrchStatus(node), }, removePause: { method: (node, serviceModelId) => { diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts index 9a35d4883..c82850eb8 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts @@ -536,6 +536,13 @@ describe('Shared Tree Service', () => { }); + + test("showPauseWithOrchStatus test", () => { + const node = { + "orchStatus":"Active" + }; + expect(service.showPauseWithOrchStatus(node)).toEqual(false); + }); }); diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts index 51fcf52a1..0ba90c20a 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts @@ -228,6 +228,13 @@ export class SharedTreeService { } return false; } + + showPauseWithOrchStatus(node): boolean { + if(node.orchStatus == "Active"){ + return false; + } + return true; + } shouldShowPauseInstantiation(node): boolean { if(FeatureFlagsService.getFlagState(Features.FLAG_2008_REMOVE_PAUSE_INSTANTIATION, this._store)){ |