aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/api
diff options
context:
space:
mode:
authorjingjincs <jinjingcs@gmail.com>2020-03-04 09:11:10 +0100
committerxuegao <xg353y@intl.att.com>2020-04-01 09:47:58 +0200
commit3173d554371bae1eefafc69b2bc9da5543510dd5 (patch)
tree94c862eb0e3b19d884d31c8824c7544bc75322ac /ui-react/src/api
parentfe947238182cc1f0c962dc21938325a50a741c10 (diff)
Update template menu UI
Modify View Templates Menu to adopt changes from get template CL API Issue-ID: CLAMP-589 Change-Id: I54d059620e91d0da70e85c62dbb932ee58dd99ab Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'ui-react/src/api')
-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', })