diff --git a/ui-react/src/api/LoopActionService.js b/ui-react/src/api/LoopActionService.js
index 9ce8ff0..6e45ce4 100644
--- a/ui-react/src/api/LoopActionService.js
+++ b/ui-react/src/api/LoopActionService.js
@@ -20,35 +20,55 @@
  * ===================================================================
  *
  */
-const loopActionService = {
-	submit
-};
+
+export default class LoopActionService{
+
+	static performAction(cl_name, uiAction) {
+		console.log("LoopActionService perform action: " + uiAction + " closedloopName=" + cl_name);
+		const svcAction = uiAction.toLowerCase();
+ 		return fetch("/restservices/clds/v2/loop/" + svcAction + "/" + cl_name, {
+ 				method: 'PUT',
+ 				credentials: 'same-origin',
+ 			})
+ 		.then(function (response) {
+ 			if (response.ok) {
+ 				return response.json();
+ 			} else {
+ 				return Promise.reject("Perform action failed with code:" + response.status);
+ 			}
+ 		})
+ 		.then(function (data) {
+			alert("Action Successful: " + uiAction);
+ 			return data;
+ 		})
+ 		.catch(function(error) {
+ 			console.log("Action Failure: " + uiAction);
+ 			return Promise.reject(error);
+ 		});
+ 	}
 
 
-function submit(uiAction) {
-	const cl_name = "";
-	console.log("clActionServices perform action: " + uiAction + " closedloopName="
-		+ cl_name);
-	const svcAction = uiAction.toLowerCase();
-	const svcUrl = "/restservices/clds/v2/loop/" + svcAction + "/" + cl_name;
+	static refreshStatus(cl_name) {
+		console.log("Refresh the status for closedloopName=" + cl_name);
 
-	let options = {
-		method: 'GET'
-	};
-	return sendRequest(svcUrl, svcAction, options);
+		return fetch("/restservices/clds/v2/loop/getstatus/" + cl_name, {
+			method: 'GET',
+			credentials: 'same-origin',
+		})
+		.then(function (response) {
+			if (response.ok) {
+				return response.json();
+			} else {
+				return Promise.reject("Refresh status failed with code:" + response.status);
+			}
+		})
+		.then(function (data) {
+			console.info ("Refresh status Successful");
+			return data;
+		})
+		.catch(function(error) {
+			console.info ("Refresh status failed:", error);
+			return Promise.reject(error);
+		});
+ 	}
 }
-
-function sendRequest(svcUrl, svcAction) {
-	fetch(svcUrl, options)
-		.then(
-			response => {
-				alertService.alertMessage("Action Successful: " + svcAction, 1)
-			}).error(error => {
-				alertService.alertMessage("Action Failure: " + svcAction, 2);
-				return Promise.reject(error);
-			});
-
-	return response.json();
-};
-
-export default loopActionService;
\ No newline at end of file
