diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-12-26 15:21:17 +0200 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-12-30 06:18:18 +0200 |
commit | 18c3ce8d1e1d166d5302f9708036202b0258110e (patch) | |
tree | fcbcf8f2c90472d538177cb5e359b17e7b757493 /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts | |
parent | a371bcd5601df09063af5a00b1579ce197690bfd (diff) |
Fixing the issue which prevents from clicking the [+] button on templates
i) Use modelUniqueName instead of obsolete originalName
ii) Add RECREATE as "editable" case
iii) Lift vfModules limitation in model to 3
Issue-ID: VID-724
Change-Id: I9e55142ee379f4eead3c8634f5b816d2d1db1f8e
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts')
-rw-r--r-- | vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts | 13 |
1 files changed, 12 insertions, 1 deletions
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 7f5b6e33c..1115d1bc6 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 @@ -15,6 +15,7 @@ import {VNFMethods} from "../../../shared/storeUtil/utils/vnf/vnf.actions"; import {FeatureFlagsService, Features} from "../../../shared/services/featureFlag/feature-flags.service"; import {Utils} from "../../../shared/utils/utils"; import {Constants} from "../../../shared/utils/constants"; +import {NodeInstance} from "../../../shared/models/nodeInstance"; @Injectable() export class SharedTreeService { @@ -43,6 +44,16 @@ export class SharedTreeService { } } + /** + * Determines a consistent unique ID for a given right-tree + * node instance. + */ + modelUniqueId = (nodeInstance: NodeInstance): string => { + return _.isNil(nodeInstance.modelInfo) + ? null + : (nodeInstance.modelInfo.modelCustomizationId || nodeInstance.modelInfo.modelInvariantId); + }; + hasMissingData(instance, dynamicInputs: any, isEcompGeneratedNaming: boolean, requiredFields: string[]): boolean { if (!isEcompGeneratedNaming && _.isEmpty(instance.instanceName)) { return true; @@ -239,7 +250,7 @@ export class SharedTreeService { **********************************************/ shouldShowAddIcon(): boolean{ const mode = this._store.getState().global.drawingBoardStatus; - return mode === DrawingBoardModes.EDIT || mode=== DrawingBoardModes.CREATE; + return mode === DrawingBoardModes.EDIT || mode=== DrawingBoardModes.CREATE || mode=== DrawingBoardModes.RECREATE; } |