From 0f54305304e320f784f2b589dbf5a492db06d59c Mon Sep 17 00:00:00 2001 From: Eylon Malin Date: Thu, 12 Dec 2019 14:49:43 +0200 Subject: when there is no max instances for VNF show Unlimited (default) in model info Issue-ID: VID-726 Change-Id: I9a53f76f97d96c565ec79f3a3e7d908c49f51af1 Signed-off-by: Eylon Malin --- .../service-planning/objectsToTree/models/vnf/vnf.model.info.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vid-webpack-master/src/app/drawingBoard') diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts index 45ef21763..ff86925f1 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts @@ -31,6 +31,7 @@ import {ComponentInfoService} from "../../../component-info/component-info.servi import {ModelInformationItem} from "../../../../../shared/components/model-information/model-information.component"; import {VfModuleUpgradePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service"; import {FeatureFlagsService} from "../../../../../shared/services/featureFlag/feature-flags.service"; +import {Constants} from "../../../../../shared/utils/constants"; export class VnfModelInfo implements ILevelNodeInfo { constructor(private _dynamicInputsService: DynamicInputsService, @@ -318,7 +319,8 @@ export class VnfModelInfo implements ILevelNodeInfo { getInfo(model, instance): ModelInformationItem[] { const modelInformation = !_.isEmpty(model) ? [ ModelInformationItem.createInstance("Min instances", !_.isNil(model.min) ? String(model.min) : null), - ModelInformationItem.createInstance("Max instances", !_.isNil(model.max) ? String(model.max) : 'Unlimited (default)') + ModelInformationItem.createInstance("Max instances", !_.isNil(model.max) ? String(model.max) : + Constants.ModelInfo.UNLIMITED_DEFAULT) ] : []; const instanceInfo = !_.isEmpty(instance) ? [ -- cgit 1.2.3-korg