summaryrefslogtreecommitdiffstats
path: root/ui-react/src/api/LoopService.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui-react/src/api/LoopService.js')
-rw-r--r--ui-react/src/api/LoopService.js27
1 files changed, 25 insertions, 2 deletions
diff --git a/ui-react/src/api/LoopService.js b/ui-react/src/api/LoopService.js
index 2750763d..698ee28c 100644
--- a/ui-react/src/api/LoopService.js
+++ b/ui-react/src/api/LoopService.js
@@ -171,8 +171,8 @@ export default class LoopService {
});
}
- static refreshOpPolicyJson(loopName) {
- return fetch('/restservices/clds/v2/loop/refreshOpPolicyJsonSchema/' + loopName, {
+ static refreshOperationalPolicyJson(loopName,operationalPolicyName) {
+ return fetch('/restservices/clds/v2/loop/refreshOperationalPolicyJsonSchema/' + loopName + '/' + operationalPolicyName, {
method: 'PUT',
headers: {
"Content-Type": "application/json"
@@ -194,6 +194,29 @@ export default class LoopService {
});
}
+ static refreshMicroServicePolicyJson(loopName,microServicePolicyName) {
+ return fetch('/restservices/clds/v2/loop/refreshMicroServicePolicyJsonSchema/' + loopName + '/' + microServicePolicyName, {
+ method: 'PUT',
+ headers: {
+ "Content-Type": "application/json"
+ },
+ credentials: 'same-origin'
+ })
+ .then(function (response) {
+ console.debug("Refresh Operational Policy Json Schema response received: ", response.status);
+ if (response.ok) {
+ return response.json();
+ } else {
+ console.error("Refresh Operational Policy Json Schema query failed");
+ return {};
+ }
+ })
+ .catch(function (error) {
+ console.error("Refresh Operational Policy Json Schema error received", error);
+ return {};
+ });
+ }
+
static addOperationalPolicyType(loopName, policyType, policyVersion) {
return fetch('/restservices/clds/v2/loop/addOperationaPolicy/' + loopName + '/policyModel/' + policyType +'/' + policyVersion , {
method: 'PUT',