summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-12-15 10:03:03 +0200
committerEylon Malin <eylon.malin@intl.att.com>2019-12-15 16:20:52 +0200
commit0a268267af54b1b187591bf45c3ca43a89db3195 (patch)
tree137250211c8a10b771b95d4dfdcfa76ef0d6ad21 /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
parent17f0c14e91f9a76e18c86e529a477d4b2927ce8d (diff)
when there is no max instances for VfModule/Network show Unlimited (default) in component info
Issue-ID: VID-726 Change-Id: Ic296de9ba2c8d25a7b5f3bd789ffb5fdef0329d0 Signed-off-by: Eylon Malin <eylon.malin@intl.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.ts8
1 files changed, 8 insertions, 0 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 b8eddbbf7..7f5b6e33c 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
@@ -14,6 +14,7 @@ import {undoUpgradeService, upgradeService} from "../../../shared/storeUtil/util
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";
@Injectable()
export class SharedTreeService {
@@ -368,4 +369,11 @@ export class SharedTreeService {
const modelInfoItemsWithoutEmpty = _.filter(modelInfoItems, function(item){ return !item.values.every(_.isNil)});
return new ComponentInfoModel(type, modelInfoItemsWithoutEmpty, [], instance != null);
}
+
+ createMaximumToInstantiateModelInformationItem(model): ModelInformationItem {
+ return ModelInformationItem.createInstance(
+ "Max instances",
+ !_.isNil(model.max) ? String(model.max) : Constants.ModelInfo.UNLIMITED_DEFAULT
+ );
+ }
}