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>
diff --git a/ui-react/src/api/LoopService.js b/ui-react/src/api/LoopService.js
index e2e2348..ead2cf8 100644
--- a/ui-react/src/api/LoopService.js
+++ b/ui-react/src/api/LoopService.js
@@ -152,4 +152,27 @@
 				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 {};
+			});
+	}
 }