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.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/ui-react/src/api/LoopService.js b/ui-react/src/api/LoopService.js
index 031ec638f..eece20c96 100644
--- a/ui-react/src/api/LoopService.js
+++ b/ui-react/src/api/LoopService.js
@@ -104,6 +104,30 @@ export default class LoopService {
return "";
});
}
+
+ static setOperationalPolicyProperties(loopName, jsonData) {
+ return fetch('/restservices/clds/v2/loop/updateOperationalPolicies/' + loopName, {
+ method: 'POST',
+ credentials: 'same-origin',
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify(jsonData),
+ })
+ .then(function (response) {
+ console.debug("updateOperationalPolicies response received: ", response.status);
+ if (response.ok) {
+ return response.text();
+ } else {
+ console.error("updateOperationalPolicies query failed");
+ return "";
+ }
+ })
+ .catch(function (error) {
+ console.error("updateOperationalPolicies error received", error);
+ return "";
+ });
+ }
static updateGlobalProperties(loopName, jsonData) {
return fetch('/restservices/clds/v2/loop/updateGlobalProperties/' + loopName, {