From aa486be66b1c29ad2e953cb44d105ca1bde40b1c Mon Sep 17 00:00:00 2001 From: sebdet Date: Tue, 18 Feb 2020 02:00:11 -0800 Subject: 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 --- ui-react/src/api/LoopService.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'ui-react/src/api/LoopService.js') 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 {}; + }); + } } -- cgit 1.2.3-korg