summaryrefslogtreecommitdiffstats
path: root/ui-react/src/api
diff options
context:
space:
mode:
authordrveerendra <vrajasekharaiah@att.com>2019-11-11 19:37:39 -0500
committerdrveerendra <vrajasekharaiah@att.com>2019-11-18 20:08:46 -0500
commit684057e69bea57d0bd954a84a10581a81d546006 (patch)
tree255f5d878c70862c009b320809d93a84b0436506 /ui-react/src/api
parent715f0ac873dd0301ed85e873a09d4323fef4d40e (diff)
Adding View BP template Menu
Adding View Blue Print templates option under Template menu. Adding few more test cases for ViewTosca Modals to cover the api calls. Issue-ID: CLAMP-544 Change-Id: Ibf881f46fd03e9149a88ccc211a996d99fd74748 Signed-off-by: drveerendra <vrajasekharaiah@att.com>
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 {};
});
}