From: Ted Humphrey Date: Wed, 29 Jul 2020 22:59:12 +0000 (-0400) Subject: change -1 to No Limit in View All Templates for # Instances Allowed X-Git-Tag: 5.1.0~17^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=clamp.git;a=commitdiff_plain;h=db90efcaf3cb809af254f8029b480baf062c1e1f change -1 to No Limit in View All Templates for # Instances Allowed Issue-ID: CLAMP-912 Signed-off-by: Ted Humphrey Change-Id: I3d7732ae741bd3ab0766fc022e8920af2a08e9af --- diff --git a/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js b/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js index 10473944..eb6e70f3 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 }) }); }