From: Christophe Closset Date: Thu, 2 Apr 2020 13:42:56 +0000 (+0000) Subject: Merge "Fix bug in Create loop UI" X-Git-Tag: 5.0.2~2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=6273ed4047c866f73664b6f0b94f22170ab53cd3;hp=8d446271551b11cac19a4f2c848c648f542bf721;p=clamp.git Merge "Fix bug in Create loop UI" --- diff --git a/ui-react/src/api/TemplateService.js b/ui-react/src/api/TemplateService.js index 615a87e9..eddd58df 100644 --- a/ui-react/src/api/TemplateService.js +++ b/ui-react/src/api/TemplateService.js @@ -55,19 +55,19 @@ export default class TemplateService { }); } - static getBlueprintMicroServiceTemplate(templateName) { + static getBlueprintMicroServiceTemplateSvg(templateName) { return fetch('/restservices/clds/v2/templates/' + templateName + ' /svgRepresentation', { method: 'GET', credentials: 'same-origin', }) .then(function (response) { - console.debug("getBlueprintMicroServiceTemplate response received: ", response.status); + console.debug("getBlueprintMicroServiceTemplateSvg response received: ", response.status); if (response.ok) { return response.text(); } else { - console.error("getBlueprintMicroServiceTemplates query failed"); + console.error("getBlueprintMicroServiceTemplateSvg query failed"); return {}; } }) .catch(function (error) { - console.error("getBlueprintMicroServiceTemplate error received", error); + console.error("getBlueprintMicroServiceTemplateSvg error received", error); return {}; }); } diff --git a/ui-react/src/components/dialogs/Loop/CreateLoopModal.js b/ui-react/src/components/dialogs/Loop/CreateLoopModal.js index e3820779..c5762a8d 100644 --- a/ui-react/src/components/dialogs/Loop/CreateLoopModal.js +++ b/ui-react/src/components/dialogs/Loop/CreateLoopModal.js @@ -72,7 +72,7 @@ export default class CreateLoopModal extends React.Component { handleDropdownListChange(e) { this.setState({ chosenTemplateName: e.value }); - TemplateService.getBlueprintMicroServiceTemplates(e.value).then(svgXml => { + TemplateService.getBlueprintMicroServiceTemplateSvg(e.value).then(svgXml => { if (svgXml.length !== 0) { this.setState({ content: svgXml }) } else { diff --git a/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js b/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js index 18c44404..cec6722d 100644 --- a/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js +++ b/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.js @@ -113,7 +113,7 @@ export default class ViewLoopTemplatesModal extends React.Component { getBlueprintMicroServiceTemplate(templateName) { if (typeof templateName !== "undefined") { - TemplateService.getBlueprintMicroServiceTemplate(templateName).then(svgXml => { + TemplateService.getBlueprintMicroServiceTemplateSvg(templateName).then(svgXml => { if (svgXml.length !== 0) { this.setState({ content: svgXml }) } else {