From 89c784361c50bafdf078d4b51285f838f507f016 Mon Sep 17 00:00:00 2001 From: gschwab Date: Thu, 27 Feb 2014 17:12:30 +0100 Subject: [PATCH] handle cluster shutdown --- .../clusterFrontend/js/routers/clusterRouter.js | 3 ++- .../clusterFrontend/js/views/showClusterView.js | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/js/apps/system/aardvark/clusterFrontend/js/routers/clusterRouter.js b/js/apps/system/aardvark/clusterFrontend/js/routers/clusterRouter.js index 351ecd6802..3050d0dd03 100644 --- a/js/apps/system/aardvark/clusterFrontend/js/routers/clusterRouter.js +++ b/js/apps/system/aardvark/clusterFrontend/js/routers/clusterRouter.js @@ -11,7 +11,8 @@ "planSymmetrical" : "planSymmetric", "planAsymmetrical" : "planAsymmetric", "shards" : "showShards", - "showCluster" : "showCluster" + "showCluster" : "showCluster", + "handleClusterDown" : "handleClusterDown" }, getNewRoute: function(last) { diff --git a/js/apps/system/aardvark/clusterFrontend/js/views/showClusterView.js b/js/apps/system/aardvark/clusterFrontend/js/views/showClusterView.js index 62abff80a8..14bfd9b0b9 100644 --- a/js/apps/system/aardvark/clusterFrontend/js/views/showClusterView.js +++ b/js/apps/system/aardvark/clusterFrontend/js/views/showClusterView.js @@ -401,7 +401,18 @@ }, clusterShutdown : function() { - window.App.navigate("", {trigger: true}); + this.stopUpdating(); + $.ajax({ + cache: false, + type: "GET", + async: false, // sequential calls! + url: "cluster/shutdown", + success: function(data) { + }, + error: function(data) { + } + }); + window.App.navigate("handleClusterDown", {trigger: true}); } });