Author: azeez
Date: Wed Dec  5 00:59:05 2007
New Revision: 10524

Log:

Adding confirmation before server start/restart

Modified:
   trunk/commons/adminui/www/js/main.js

Modified: trunk/commons/adminui/www/js/main.js
==============================================================================
--- trunk/commons/adminui/www/js/main.js        (original)
+++ trunk/commons/adminui/www/js/main.js        Wed Dec  5 00:59:05 2007
@@ -546,6 +546,11 @@
    This method will restart the server.
 */
     restartServer : function (callbackFunction) {
+        var msgStat = confirm("Do you want to restart the server?");
+        if(!msgStat){
+            return;
+        }
+
         var bodyXML = '<req:restartRequest 
xmlns:req="http://org.apache.axis2/xsd"/>\n';
 
         var callURL = serverURL + "/" + ADMIN_SERVER_URL ;
@@ -560,6 +565,10 @@
    This method will restart the server gracefully.
 */
     restartServerGracefully : function (callbackFunction) {
+        var msgStat = confirm("Do you want to gracefully restart the server?");
+        if(!msgStat){
+            return;
+        }
         var bodyXML = '<req:restartGracefullyRequest 
xmlns:req="http://org.apache.axis2/xsd"/>\n';
 
         var callURL = serverURL + "/" + ADMIN_SERVER_URL ;
@@ -574,6 +583,10 @@
    This method will shutdown the server gracefully.
 */
     shutdownServerGracefully : function (callbackFunction) {
+        var msgStat = confirm("Do you want to gracefully shutdown the 
server?");
+        if(!msgStat){
+            return;
+        }
         var bodyXML = '<req:shutdownGracefullyRequest 
xmlns:req="http://org.apache.axis2/xsd"/>\n';
 
         var callURL = serverURL + "/" + ADMIN_SERVER_URL ;
@@ -588,6 +601,10 @@
    This method will shutdown the server immediately.
 */
     shutdownServer : function (callbackFunction) {
+        var msgStat = confirm("Do you want to shutdown the server?");
+        if(!msgStat){
+            return;
+        }
         var bodyXML = '<req:shutdownRequest 
xmlns:req="http://org.apache.axis2/xsd"/>\n';
 
         var callURL = serverURL + "/" + ADMIN_SERVER_URL ;

_______________________________________________
Commons-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/commons-dev

Reply via email to