diff options
author | Ted Humphrey <Thomas.Humphrey@att.com> | 2020-07-29 18:59:12 -0400 |
---|---|---|
committer | Ted Humphrey <Thomas.Humphrey@att.com> | 2020-07-29 19:01:58 -0400 |
commit | db90efcaf3cb809af254f8029b480baf062c1e1f (patch) | |
tree | 4ad6e01db1fa60b6ee2f505dc3fd86b537cc060f /ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js | |
parent | e760f72203c95b684d88cc19216c1cfbdcdbc089 (diff) |
change -1 to No Limit in View All Templates for # Instances Allowed
Issue-ID: CLAMP-912
Signed-off-by: Ted Humphrey <Thomas.Humphrey@att.com>
Change-Id: I3d7732ae741bd3ab0766fc022e8920af2a08e9af
Diffstat (limited to 'ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js')
-rw-r--r-- | ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js | 8 |
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 }) }); } |