static performAction(cl_name, uiAction) {
console.info("LoopActionService perform action: " + uiAction + " closedloopName=" + cl_name);
const svcAction = uiAction.toLowerCase();
- return fetch("/restservices/clds/v2/loop/" + svcAction + "/" + cl_name, {
+ return fetch(window.location.pathname + "restservices/clds/v2/loop/" + svcAction + "/" + cl_name, {
method: 'PUT',
credentials: 'same-origin'
})
static refreshStatus(cl_name) {
console.info("Refresh the status for closedloopName=" + cl_name);
- return fetch("/restservices/clds/v2/loop/getstatus/" + cl_name, {
+ return fetch(window.location.pathname + "restservices/clds/v2/loop/getstatus/" + cl_name, {
method: 'GET',
credentials: 'same-origin'
})
export default class LoopService {
static getLoopNames() {
- return fetch('/restservices/clds/v2/loop/getAllNames', { method: 'GET', credentials: 'same-origin' })
+ return fetch(window.location.pathname + 'restservices/clds/v2/loop/getAllNames', { method: 'GET', credentials: 'same-origin' })
.then(function (response) {
console.debug("GetLoopNames response received: ", response.status);
if (response.ok) {
}
static createLoop(loopName, templateName) {
- return fetch('/restservices/clds/v2/loop/create/' + loopName + '?templateName=' + templateName, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/loop/create/' + loopName + '?templateName=' + templateName, {
method: 'POST',
headers: {
"Content-Type": "application/json"
}
static getLoop(loopName) {
- return fetch('/restservices/clds/v2/loop/' + loopName, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/loop/' + loopName, {
method: 'GET',
headers: {
"Content-Type": "application/json"
}
static setMicroServiceProperties(loopName, jsonData) {
- return fetch('/restservices/clds/v2/loop/updateMicroservicePolicy/' + loopName, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/loop/updateMicroservicePolicy/' + loopName, {
method: 'POST',
credentials: 'same-origin',
headers: {
}
static setOperationalPolicyProperties(loopName, jsonData) {
- return fetch('/restservices/clds/v2/loop/updateOperationalPolicies/' + loopName, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/loop/updateOperationalPolicies/' + loopName, {
method: 'POST',
credentials: 'same-origin',
headers: {
}
static updateGlobalProperties(loopName, jsonData) {
- return fetch('/restservices/clds/v2/loop/updateGlobalProperties/' + loopName, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/loop/updateGlobalProperties/' + loopName, {
method: 'POST',
credentials: 'same-origin',
headers: {
}
static refreshOperationalPolicyJson(loopName,operationalPolicyName) {
- return fetch('/restservices/clds/v2/loop/refreshOperationalPolicyJsonSchema/' + loopName + '/' + operationalPolicyName, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/loop/refreshOperationalPolicyJsonSchema/' + loopName + '/' + operationalPolicyName, {
method: 'PUT',
headers: {
"Content-Type": "application/json"
}
static refreshMicroServicePolicyJson(loopName,microServicePolicyName) {
- return fetch('/restservices/clds/v2/loop/refreshMicroServicePolicyJsonSchema/' + loopName + '/' + microServicePolicyName, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/loop/refreshMicroServicePolicyJsonSchema/' + loopName + '/' + microServicePolicyName, {
method: 'PUT',
headers: {
"Content-Type": "application/json"
}
static addOperationalPolicyType(loopName, policyType, policyVersion) {
- return fetch('/restservices/clds/v2/loop/addOperationaPolicy/' + loopName + '/policyModel/' + policyType +'/' + policyVersion , {
+ return fetch(window.location.pathname + 'restservices/clds/v2/loop/addOperationaPolicy/' + loopName + '/policyModel/' + policyType +'/' + policyVersion , {
method: 'PUT',
headers: {
"Content-Type": "application/json"
}
static removeOperationalPolicyType(loopName, policyType, policyVersion, policyName) {
- return fetch('/restservices/clds/v2/loop/removeOperationaPolicy/' + loopName + '/policyModel/' + policyType +'/' + policyVersion + '/' + policyName , {
+ return fetch(window.location.pathname + 'restservices/clds/v2/loop/removeOperationaPolicy/' + loopName + '/policyModel/' + policyType +'/' + policyVersion + '/' + policyName , {
method: 'PUT',
headers: {
"Content-Type": "application/json"
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) {
}
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'
})
}
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'
})
}
static createPolicyModelFromToscaModel(jsonData) {
- return fetch('/restservices/clds/v2/policyToscaModels', {
+ return fetch(window.location.pathname + 'restservices/clds/v2/policyToscaModels', {
method: 'POST',
credentials: 'same-origin',
headers: {
}
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: {
export default class TemplateService {
static getLoopNames() {
- return fetch('/restservices/clds/v2/loop/getAllNames', { method: 'GET', credentials: 'same-origin' })
+ return fetch(window.location.pathname + 'restservices/clds/v2/loop/getAllNames', { method: 'GET', credentials: 'same-origin' })
.then(function (response) {
console.debug("getLoopNames response received: ", response.status);
if (response.ok) {
}
static getAllLoopTemplates() {
- return fetch('restservices/clds/v2/templates', { method: 'GET', credentials: 'same-origin', })
+ return fetch(window.location.pathname + 'restservices/clds/v2/templates', { method: 'GET', credentials: 'same-origin', })
.then(function (response) {
console.debug("getAllLoopTemplates response received: ", response.status);
if (response.ok) {
}
static getDictionary() {
- return fetch('restservices/clds/v2/dictionary/', { method: 'GET', credentials: 'same-origin', })
+ return fetch(window.location.pathname + 'restservices/clds/v2/dictionary/', { method: 'GET', credentials: 'same-origin', })
.then(function (response) {
console.debug("getDictionary response received: ", response.status);
if (response.ok) {
}
static getDictionaryElements(dictionaryName) {
- return fetch('restservices/clds/v2/dictionary/' + dictionaryName, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/dictionary/' + dictionaryName, {
method: 'GET',
headers: {
"Content-Type": "application/json",
static insDictionary(jsonData) {
console.log("dictionaryName is", jsonData.name)
- return fetch('/restservices/clds/v2/dictionary/', {
+ return fetch(window.location.pathname + 'restservices/clds/v2/dictionary/', {
method: 'PUT',
credentials: 'same-origin',
headers: {
static insDictionaryElements(jsonData) {
console.log("dictionaryName is", jsonData.name)
- return fetch('/restservices/clds/v2/dictionary/' + jsonData.name, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/dictionary/' + jsonData.name, {
method: 'PUT',
credentials: 'same-origin',
headers: {
static deleteDictionary(dictionaryName) {
console.log("inside templaemenu service", dictionaryName)
- return fetch('restservices/clds/v2/dictionary/' + dictionaryName, {
+ return fetch(window.location.pathname + 'restservices/clds/v2/dictionary/' + dictionaryName, {
method: 'DELETE',
headers: {
"Content-Type": "application/json",
}
static deleteDictionaryElements(dictionaryData) {
- return fetch('restservices/clds/v2/dictionary/' + dictionaryData.name + '/elements/' + dictionaryData.shortName , {
+ return fetch(window.location.pathname + 'restservices/clds/v2/dictionary/' + dictionaryData.name + '/elements/' + dictionaryData.shortName , {
method: 'DELETE',
headers: {
"Content-Type": "application/json",
export default class UserService {
static notLoggedUserName='Anonymous';
static login() {
- return fetch('/restservices/clds/v1/user/getUser', {
+ return fetch(window.location.pathname + 'restservices/clds/v1/user/getUser', {
method: 'GET',
credentials: 'same-origin'
})
}
static getUserInfo() {
- return fetch('/restservices/clds/v2/clampInformation', {
+ return fetch(window.location.pathname + 'restservices/clds/v2/clampInformation', {
method: 'GET',
credentials: 'same-origin'
})