From db90efcaf3cb809af254f8029b480baf062c1e1f Mon Sep 17 00:00:00 2001 From: Ted Humphrey Date: Wed, 29 Jul 2020 18:59:12 -0400 Subject: change -1 to No Limit in View All Templates for # Instances Allowed Issue-ID: CLAMP-912 Signed-off-by: Ted Humphrey Change-Id: I3d7732ae741bd3ab0766fc022e8920af2a08e9af --- ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ui-react') 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 }) }); } -- cgit 1.2.3-korg