aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/api/LoopService.js
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-02-18 02:00:11 -0800
committerSébastien Determe <sebastien.determe@intl.att.com>2020-02-25 10:57:35 +0000
commitaa486be66b1c29ad2e953cb44d105ca1bde40b1c (patch)
treeb5893560b1eee8f1e456104deec7924f05e4fbfb /ui-react/src/api/LoopService.js
parent4e8e11afced0693e24074fd6bb8d5b2cace98ab6 (diff)
Modify the Ui
Modify the Ui to have a modify option in the menu so that the user can tune the loop instance Issue-ID: CLAMP-648 Change-Id: I57523bc1c3afaf5ca5a2acf5c59823df06fd4cd9 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
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 ead2cf80..432eabec 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 {};
+ });
+ }
}