Fix for removing 'Show Audit Info' for individual instance on Drawing
[vid.git] / vid-webpack-master / src / app / drawingBoard / service-planning / drawing-board-tree / drawing-board-tree.service.ts
index 28b6e51..f90a5ea 100644 (file)
@@ -5,9 +5,13 @@ import {NgRedux} from "@angular-redux/store";
 import {AppState} from "../../../shared/store/reducers";
 import {FeatureFlagsService, Features} from "../../../shared/services/featureFlag/feature-flags.service";
 import {ServiceInstanceActions} from "../../../shared/models/serviceInstanceActions";
+import {Subject} from "rxjs";
 
 @Injectable()
 export class  DrawingBoardTreeService {
+
+  static triggerCheckIsDirty : Subject<string> = new Subject<string>();
+
   constructor(private store: NgRedux<AppState>){}
   isVFModuleMissingData(node: ITreeNode, serviceModelId : string): boolean {
     if(node.data.type === 'VFmodule' &&!_.isNil(this.store.getState().service.serviceInstance[serviceModelId].vnfs) &&  !_.isNil(this.store.getState().service.serviceInstance[serviceModelId].vnfs[node.parent.data.vnfStoreKey])){
@@ -31,6 +35,10 @@ export class  DrawingBoardTreeService {
     return FeatureFlagsService.getFlagState(Features.FLAG_1902_NEW_VIEW_EDIT, this.store);
   }
 
+  isPauseVFMInstantiationCreationFlagTrue() {
+    return FeatureFlagsService.getFlagState(Features.FLAG_2006_PAUSE_VFMODULE_INSTANTIATION_CREATION, this.store);
+  }
+
   /**********************************************
    return all drawing board context menu options
    ***********************************************/
@@ -38,14 +46,15 @@ export class  DrawingBoardTreeService {
     return [
       new TreeNodeContextMenuModel('edit', 'context-menu-edit', 'Edit', 'edit-file-o'),
       new TreeNodeContextMenuModel('duplicate', 'context-menu-duplicate', 'Duplicate', 'copy-o'),
-      new TreeNodeContextMenuModel('showAuditInfo', 'context-menu-showAuditInfo', 'Show audit info', 'eye-o'),
       new TreeNodeContextMenuModel('addGroupMember', 'context-menu-addGroupMember', 'Add group members', 'plus'),
       new TreeNodeContextMenuModel('delete', 'context-menu-delete', 'Delete', 'trash-o'),
       new TreeNodeContextMenuModel('remove', 'context-menu-remove', 'Remove', 'trash-o'),
       new TreeNodeContextMenuModel('upgrade', 'context-menu-upgrade', 'Upgrade', 'upgrade'),
       new TreeNodeContextMenuModel('undoDelete', 'context-menu-undoDelete', 'Undo Delete', 'undo-delete'),
       new TreeNodeContextMenuModel('undoUpgrade', 'context-menu-undoUpgrade', 'Undo Upgrade', 'undo-delete'),
-      new TreeNodeContextMenuModel('changeAssociations', 'context-menu-changeAssociations', 'Change Associations', 'edit-file-o')
+      new TreeNodeContextMenuModel('changeAssociations', 'context-menu-changeAssociations', 'Change Associations', 'edit-file-o'),
+      new TreeNodeContextMenuModel('pauseInstantiation', 'context-menu-pause', 'Add pause upon completion', 'pause-upon-completion'),
+      new TreeNodeContextMenuModel('removePause', 'context-menu-removePause', 'Remove Pause', 'pause-upon-completion')
     ];
   }