aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'ui-react/src/api')
-rw-r--r--ui-react/src/api/TemplateMenuService.js25
1 files changed, 21 insertions, 4 deletions
diff --git a/ui-react/src/api/TemplateMenuService.js b/ui-react/src/api/TemplateMenuService.js
index 5d3f29a80..dfa9c578e 100644
--- a/ui-react/src/api/TemplateMenuService.js
+++ b/ui-react/src/api/TemplateMenuService.js
@@ -21,19 +21,36 @@
*/
export default class TemplateMenuService {
- static getToscaModels() {
+ static getToscaPolicyModels() {
return fetch('restservices/clds/v2/loop/tosca/models', { method: 'GET', credentials: 'same-origin' })
.then(function (response) {
- console.debug("getToscaModels response received: ", response.status);
+ console.debug("getToscaPolicyModels response received: ", response.status);
if (response.ok) {
return response.json();
} else {
- console.error("getToscaModels query failed");
+ console.error("getToscaPolicyModels query failed");
return {};
}
})
.catch(function (error) {
- console.error("getToscaModels error received", error);
+ console.error("getToscaPolicyModels error received", error);
+ return {};
+ });
+ }
+
+ static getBlueprintMicroServiceTemplates() {
+ return fetch('restservices/clds/v2/loop/templates', { method: 'GET', credentials: 'same-origin', })
+ .then(function (response) {
+ console.debug("getBlueprintMicroServiceTemplates response received: ", response.status);
+ if (response.ok) {
+ return response.json();
+ } else {
+ console.error("getBlueprintMicroServiceTemplates query failed");
+ return {};
+ }
+ })
+ .catch(function (error) {
+ console.error("getBlueprintMicroServiceTemplates error received", error);
return {};
});
}