aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/api/PolicyToscaService.js
diff options
context:
space:
mode:
authorSébastien Determe <sebastien.determe@intl.att.com>2020-08-03 13:56:26 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-03 13:56:26 +0000
commit7bb6438727bf6bc91d8471bcf00e4736c691ae1b (patch)
treee7617388af045b9c36ec16afe3bc59db91d215f4 /ui-react/src/api/PolicyToscaService.js
parentcaf78ac9ef48e7afacbfbd14f7b6dc1c9cecc992 (diff)
parente673a058c995392b3ad6cbab91a9571bed29a57b (diff)
Merge "Clamp react ui to use url pathname dynamically instead of hardcoded prefix for calling apis"
Diffstat (limited to 'ui-react/src/api/PolicyToscaService.js')
-rw-r--r--ui-react/src/api/PolicyToscaService.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui-react/src/api/PolicyToscaService.js b/ui-react/src/api/PolicyToscaService.js
index 610a11418..a7bc140b6 100644
--- a/ui-react/src/api/PolicyToscaService.js
+++ b/ui-react/src/api/PolicyToscaService.js
@@ -22,7 +22,7 @@
export default class PolicyToscaService {
static getToscaPolicyModels() {
- return fetch('restservices/clds/v2/policyToscaModels', { method: 'GET', credentials: 'same-origin' })
+ return fetch(window.location.pathname + 'restservices/clds/v2/policyToscaModels', { method: 'GET', credentials: 'same-origin' })
.then(function (response) {
console.debug("getToscaPolicyModels response received: ", response.status);
if (response.ok) {
@@ -39,7 +39,7 @@ export default class PolicyToscaService {
}
static getToscaPolicyModelYaml(policyModelType, policyModelVersion) {
- return fetch('/restservices/clds/v2/policyToscaModels/yaml/' + policyModelType + "/" + policyModelVersion, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/policyToscaModels/yaml/' + policyModelType + "/" + policyModelVersion, {
method: 'GET',
credentials: 'same-origin'
})
@@ -59,7 +59,7 @@ export default class PolicyToscaService {
}
static getToscaPolicyModel(policyModelType, policyModelVersion) {
- return fetch('/restservices/clds/v2/policyToscaModels/' + policyModelType + "/" + policyModelVersion, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/policyToscaModels/' + policyModelType + "/" + policyModelVersion, {
method: 'GET',
credentials: 'same-origin'
})
@@ -79,7 +79,7 @@ export default class PolicyToscaService {
}
static createPolicyModelFromToscaModel(jsonData) {
- return fetch('/restservices/clds/v2/policyToscaModels', {
+ return fetch(window.location.pathname + 'restservices/clds/v2/policyToscaModels', {
method: 'POST',
credentials: 'same-origin',
headers: {
@@ -107,7 +107,7 @@ export default class PolicyToscaService {
}
static updatePolicyModelTosca(policyModelType, policyModelVersion, jsonData) {
- return fetch('/restservices/clds/v2/policyToscaModels/' + policyModelType + '/' + policyModelVersion, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/policyToscaModels/' + policyModelType + '/' + policyModelVersion, {
method: 'PUT',
credentials: 'same-origin',
headers: {