summaryrefslogtreecommitdiffstats
path: root/ui-react/src/api/TemplateService.js
diff options
context:
space:
mode:
authorXue Gao <xg353y@intl.att.com>2020-05-26 07:22:41 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-26 07:22:41 +0000
commit3521f1dd8b2447d5225c51acdf1472c4c94a3ed3 (patch)
tree28f5a6f0c94c499f71d28be043884ef5e1868ea6 /ui-react/src/api/TemplateService.js
parenta1668ebbcf5c010a495c56e78178a615f52c655b (diff)
parentc0ec0fc448af1c5d6eacb195e95938c921ba1bce (diff)
Merge "Create SVG in UI"
Diffstat (limited to 'ui-react/src/api/TemplateService.js')
-rw-r--r--ui-react/src/api/TemplateService.js41
1 files changed, 4 insertions, 37 deletions
diff --git a/ui-react/src/api/TemplateService.js b/ui-react/src/api/TemplateService.js
index eddd58dff..3a780dd65 100644
--- a/ui-react/src/api/TemplateService.js
+++ b/ui-react/src/api/TemplateService.js
@@ -21,57 +21,24 @@
*/
export default class TemplateService {
- static getTemplateNames() {
- return fetch('/restservices/clds/v2/templates/names', { method: 'GET', credentials: 'same-origin' })
- .then(function (response) {
- console.debug("GetTemplateNames response received: ", response.status);
- if (response.ok) {
- return response.json();
- } else {
- console.error("GetTemplateNames query failed");
- return {};
- }
- })
- .catch(function (error) {
- console.error("GetTemplateNames error received", error);
- return {};
- });
- }
- static getBlueprintMicroServiceTemplates() {
+ static getAllLoopTemplates() {
return fetch('restservices/clds/v2/templates', { method: 'GET', credentials: 'same-origin', })
.then(function (response) {
- console.debug("getBlueprintMicroServiceTemplates response received: ", response.status);
+ console.debug("getAllLoopTemplates response received: ", response.status);
if (response.ok) {
return response.json();
} else {
- console.error("getBlueprintMicroServiceTemplates query failed");
+ console.error("getAllLoopTemplates query failed");
return {};
}
})
.catch(function (error) {
- console.error("getBlueprintMicroServiceTemplates error received", error);
+ console.error("getAllLoopTemplates error received", error);
return {};
});
}
- static getBlueprintMicroServiceTemplateSvg(templateName) {
- return fetch('/restservices/clds/v2/templates/' + templateName + ' /svgRepresentation', { method: 'GET', credentials: 'same-origin', })
- .then(function (response) {
- console.debug("getBlueprintMicroServiceTemplateSvg response received: ", response.status);
- if (response.ok) {
- return response.text();
- } else {
- console.error("getBlueprintMicroServiceTemplateSvg query failed");
- return {};
- }
- })
- .catch(function (error) {
- console.error("getBlueprintMicroServiceTemplateSvg error received", error);
- return {};
- });
- }
-
static getDictionary() {
return fetch('restservices/clds/v2/dictionary/', { method: 'GET', credentials: 'same-origin', })
.then(function (response) {