aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/api/LoopService.js
diff options
context:
space:
mode:
authorxuegao <xg353y@intl.att.com>2020-01-06 16:13:46 +0100
committerxuegao <xg353y@intl.att.com>2020-01-07 10:39:23 +0100
commit2f5b2cdb2a7650d6bd41d1b20ec0813cad7989ed (patch)
treec5b2234a860b48172edd9abe5fdafe3121a84669 /ui-react/src/api/LoopService.js
parentbcbc25bbb78876db27fc326aadf89086200c3c76 (diff)
Add button to refresh op policy UI
Add the button on Operational Policy UI to refresh the json representation. Issue-ID: CLAMP-584 Change-Id: I3ae6ca0207bf9ca84f1e1dc6b3aed42b90298d8e Signed-off-by: xuegao <xg353y@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 e2e234821..ead2cf80c 100644
--- a/ui-react/src/api/LoopService.js
+++ b/ui-react/src/api/LoopService.js
@@ -152,4 +152,27 @@ export default class LoopService {
return "";
});
}
+
+ static refreshOpPolicyJson(loopName) {
+ return fetch('/restservices/clds/v2/loop/refreshOpPolicyJsonSchema/' + loopName, {
+ 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 {};
+ });
+ }
}