Introduce modal
Test Modal for Operational policy and use react-router to show it
Issue-ID: CLAMP-415
Change-Id: Ie0df5f1085925224076062c7d331dc2f4c72d032
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
diff --git a/ui-react/src/components/backend_communication/LoopActionService.js b/ui-react/src/components/backend_communication/LoopActionService.js
index 027243b..9ce8ff0 100644
--- a/ui-react/src/components/backend_communication/LoopActionService.js
+++ b/ui-react/src/components/backend_communication/LoopActionService.js
@@ -20,37 +20,35 @@
* ===================================================================
*
*/
-const clActionService = {
- submit
+const loopActionService = {
+ submit
};
+
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;
+ 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;
- let options = {
- method: 'GET'
- };
- return sendRequest (svcUrl, svcAction, options);
+ let options = {
+ method: 'GET'
+ };
+ return sendRequest(svcUrl, svcAction, options);
}
+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();
+};
-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 clActionService;
+export default loopActionService;
\ No newline at end of file