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.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/ui-react/src/api/LoopService.js b/ui-react/src/api/LoopService.js
index ead2cf80c..432eabecd 100644
--- a/ui-react/src/api/LoopService.js
+++ b/ui-react/src/api/LoopService.js
@@ -175,4 +175,27 @@ export default class LoopService {
return {};
});
}
+
+ static addOperationalPolicyType(loopName, policyType, policyVersion) {
+ return fetch('/restservices/clds/v2/loop/addOperationaPolicy/' + loopName + '/policyModel/' + policyType +'/' + policyVersion , {
+ method: 'PUT',
+ headers: {
+ "Content-Type": "application/json"
+ },
+ credentials: 'same-origin'
+ })
+ .then(function (response) {
+ console.debug("Add Operational Policy response received: ", response.status);
+ if (response.ok) {
+ return response.json();
+ } else {
+ console.error("Add Operational Policy query failed");
+ return {};
+ }
+ })
+ .catch(function (error) {
+ console.error("Add Operational Policy error received", error);
+ return {};
+ });
+ }
}