Merge "Update some direct dependencies"
authorSébastien Determe <sebastien.determe@intl.att.com>
Mon, 3 Aug 2020 13:35:02 +0000 (13:35 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 3 Aug 2020 13:35:02 +0000 (13:35 +0000)
ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js

index 1047394..eb6e70f 100644 (file)
@@ -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 })
                });
        }