change -1 to No Limit in View All Templates for # Instances Allowed 08/110708/1
authorTed Humphrey <Thomas.Humphrey@att.com>
Wed, 29 Jul 2020 22:59:12 +0000 (18:59 -0400)
committerTed Humphrey <Thomas.Humphrey@att.com>
Wed, 29 Jul 2020 23:01:58 +0000 (19:01 -0400)
Issue-ID: CLAMP-912
Signed-off-by: Ted Humphrey <Thomas.Humphrey@att.com>
Change-Id: I3d7732ae741bd3ab0766fc022e8920af2a08e9af

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 })
                });
        }