aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSébastien Determe <sebastien.determe@intl.att.com>2020-07-30 14:36:15 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-30 14:36:15 +0000
commita7f63adca6933886bd3499044ae93c0daa01705c (patch)
tree9e7206c4996b3877863d6288269bc85d74cd60d5
parentd7698b30bd5ed7c6df212e2dacbb5ffae7235f82 (diff)
parentdb90efcaf3cb809af254f8029b480baf062c1e1f (diff)
Merge "change -1 to No Limit in View All Templates for # Instances Allowed"
-rw-r--r--ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js b/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js
index 10473944f..eb6e70f3d 100644
--- a/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js
+++ b/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js
@@ -99,7 +99,13 @@ export default class ViewLoopTemplatesModal extends React.Component {
getAllLoopTemplates() {
TemplateService.getAllLoopTemplates().then(templatesData => {
- this.setState({ loopTemplatesData: templatesData })
+ // replace -1 in maximumInstancesAllowed with more meaningful 'No Limit'
+ for (let item in templatesData) {
+ if (templatesData[item].maximumInstancesAllowed === -1) {
+ templatesData[item].maximumInstancesAllowed = 'No Limit';
+ }
+ }
+ this.setState({ loopTemplatesData: templatesData })
});
}