summaryrefslogtreecommitdiffstats
path: root/ui-react/src/api/TemplateService.js
diff options
context:
space:
mode:
authorSébastien Determe <sebastien.determe@intl.att.com>2020-04-01 10:01:12 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-01 10:01:12 +0000
commit99f15c6328f77649ccfc7b1b790c98385754fd6a (patch)
treeec21110a190c391d5f28384f1512287687d92fed /ui-react/src/api/TemplateService.js
parent1eafc9448d24f5b0eda40f62566bdf93cc4f5a6e (diff)
parent3173d554371bae1eefafc69b2bc9da5543510dd5 (diff)
Merge "Update template menu UI"
Diffstat (limited to 'ui-react/src/api/TemplateService.js')
-rw-r--r--ui-react/src/api/TemplateService.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/ui-react/src/api/TemplateService.js b/ui-react/src/api/TemplateService.js
index 124d29c27..615a87e96 100644
--- a/ui-react/src/api/TemplateService.js
+++ b/ui-react/src/api/TemplateService.js
@@ -54,6 +54,23 @@ export default class TemplateService {
return {};
});
}
+
+ static getBlueprintMicroServiceTemplate(templateName) {
+ return fetch('/restservices/clds/v2/templates/' + templateName + ' /svgRepresentation', { method: 'GET', credentials: 'same-origin', })
+ .then(function (response) {
+ console.debug("getBlueprintMicroServiceTemplate response received: ", response.status);
+ if (response.ok) {
+ return response.text();
+ } else {
+ console.error("getBlueprintMicroServiceTemplates query failed");
+ return {};
+ }
+ })
+ .catch(function (error) {
+ console.error("getBlueprintMicroServiceTemplate error received", error);
+ return {};
+ });
+ }
static getDictionary() {
return fetch('restservices/clds/v2/dictionary/', { method: 'GET', credentials: 'same-origin', })