Adding unlimited max value to VNF, NETWORK
Issue-ID: VID-726
Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Change-Id: I0c3d503c8e4f6cb14081de8f6a619a67eee080b7
Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
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 c56cc49..b8eddbb 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
@@ -13,6 +13,7 @@
import {undoUpgradeService, upgradeService} from "../../../shared/storeUtil/utils/service/service.actions";
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";
@Injectable()
export class SharedTreeService {
@@ -239,6 +240,16 @@
const mode = this._store.getState().global.drawingBoardStatus;
return mode === DrawingBoardModes.EDIT || mode=== DrawingBoardModes.CREATE;
}
+
+
+ isReachedToMaxInstances(properties, counter, flags): boolean{
+ let maxInstances = Utils.getMaxFirstLevel(properties, flags);
+ if(_.isNil(maxInstances)){
+ return false;
+ }else {
+ return !(maxInstances > counter);
+ }
+ }
/************************************************
return number of instances with action Delete
@type: vnfs networks, vngGroups (not vfModule)