From b5fdcfcdab6b3619f5397d4f03f90ba7fd8665f3 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Sat, 29 Sep 2012 17:02:46 -0500
Subject: xymon: hbnotes,  more javascirpt alerts/popups for  shutdown,reboot &
 apply updates

---
 abs/core/xymon/PKGBUILD   |  4 ++--
 abs/core/xymon/hbnotes.py | 61 +++++++++++++++++++++++++++++++++++++----------
 2 files changed, 51 insertions(+), 14 deletions(-)

diff --git a/abs/core/xymon/PKGBUILD b/abs/core/xymon/PKGBUILD
index 8247592..6b05078 100755
--- a/abs/core/xymon/PKGBUILD
+++ b/abs/core/xymon/PKGBUILD
@@ -1,7 +1,7 @@
 pkgbase=xymon
 pkgname=(xymonserver xymonclient)
 pkgver=4.3.5
-pkgrel=35
+pkgrel=36
 pkgdesc="Hobbit is a system for monitoring servers and networks. "
 license="GPL"
 arch=('i686' 'x86_64')
@@ -119,7 +119,7 @@ md5sums=('31923ec126fe1c264fceb459d2175161'
          '2d88e59ab17114030da514ba3f0a5b64'
          'ee608dcafc050d790e28647a670f6b60'
          'b2f98ac0df013332deedc1efae0a270d'
-         '69439732c9f81c663d1cdd65be453631'
+         'efa1de1c917b58e00beadf3e386049b5'
          '0f70e76a164f648f0a4a01110137cb20'
          'f6921f0413215ae174e81306be80d37f'
          '54ba9d7bff5875150e511c608ffc1e6a'
diff --git a/abs/core/xymon/hbnotes.py b/abs/core/xymon/hbnotes.py
index 78145f2..b4c39bf 100644
--- a/abs/core/xymon/hbnotes.py
+++ b/abs/core/xymon/hbnotes.py
@@ -298,24 +298,61 @@ function Do_it ()
     }
 
 
-  if (chosen == "Restore")
-  {
-      if (confirm('Continue with database restore?'))
+    if (chosen == "Restore")
+    {
+        if (confirm('Continue with database restore?'))
         {
-          do_submission();
-          }
+            do_submission();
+            }
         else
         {
-          alert(" database was not restored");
+            alert(" database was not restored");
         }
+    }
 
+    else if (chosen == "Shutdown")
+    {
+        if (confirm('Continue with server shutdown?'))
+        {
+            do_submission();
+            alert("system is powering off");
+        }
+    }
 
-  }
-  else
-  {
-    //alert("not restore")
-    do_submission();
-  }
+    else if (chosen == "Reboot")
+    {
+        if (confirm('Continue with server restart?'))
+        {
+            do_submission();
+            alert("system is restarting");
+        }
+    }
+
+    else if (chosen == "ShutdownAll")
+    {
+        if (confirm('Continue with powering off all servers except master backend?'))
+        {
+            do_submission();
+            alert("systems are powering off");
+        }
+
+    }
+
+    else if (chosen == "Update")
+    {
+        if (confirm('Continue with applying updates?'))
+        {
+            do_submission();
+            alert("system is updating");
+        }
+
+    }
+
+    else
+    {
+        //alert("not restore")
+        do_submission();
+    }
 }
 
 </SCRIPT>
-- 
cgit v0.12

