summaryrefslogtreecommitdiffstats
path: root/ui-react/src/api
diff options
context:
space:
mode:
authorSébastien Determe <sebastien.determe@intl.att.com>2019-11-20 14:51:08 +0000
committerGerrit Code Review <gerrit@onap.org>2019-11-20 14:51:08 +0000
commit876d1a49367b4614680954913590372d773ec8ec (patch)
tree15ba727dd0948a2d66d80db25f508113a23f7918 /ui-react/src/api
parentcc00c38d90010a424d7faa337564c051e0b86e5b (diff)
parent684057e69bea57d0bd954a84a10581a81d546006 (diff)
Merge "Adding View BP template Menu"
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 {};
});
}