summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-12-15 14:50:18 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-15 14:50:18 +0000
commit73e153974e4f5a7dc4a60f5612fd30ca6a47dee0 (patch)
tree041fd09309cdb4a10657fde3a48e0693515b3f7c /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
parent9c100d6c298af429b182b55f2b06d096461e0b97 (diff)
parent0a268267af54b1b187591bf45c3ca43a89db3195 (diff)
Merge "when there is no max instances for VfModule/Network show Unlimited (default) in component info"
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
+ );
+ }
}