From 43635706a17029756256953141d6150f9d4cb2bc Mon Sep 17 00:00:00 2001 From: James Meyer <james.meyer@operamail.com> Date: Thu, 26 Feb 2009 19:22:12 -0600 Subject: Added fe/x restart to localwebsite. --- abs/mv-core/hobbitmon/PKGBUILD | 2 +- abs/mv-core/hobbitmon/hbnotes.py | 39 +++++++++++++-------------------------- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/abs/mv-core/hobbitmon/PKGBUILD b/abs/mv-core/hobbitmon/PKGBUILD index 52333b6..e2a9484 100755 --- a/abs/mv-core/hobbitmon/PKGBUILD +++ b/abs/mv-core/hobbitmon/PKGBUILD @@ -1,7 +1,7 @@ pkgname=hobbitserver provides=hobbit pkgver=4.2.0 -pkgrel=99 +pkgrel=102 pkgdesc="Hobbit is a system for monitoring servers and networks. " license="GPL" arch=('i686') diff --git a/abs/mv-core/hobbitmon/hbnotes.py b/abs/mv-core/hobbitmon/hbnotes.py index b7ef16b..087b646 100755 --- a/abs/mv-core/hobbitmon/hbnotes.py +++ b/abs/mv-core/hobbitmon/hbnotes.py @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # import MySQL module import MySQLdb @@ -35,8 +36,8 @@ def createdropdown(): <option value="Myth_only">Myth only</option> <option value="All"> Full System</option> </select> - </br> - </br> + </br> + </br> </br>''' return dropdown @@ -60,6 +61,7 @@ def main(argv): dotslave=list() dotslavefe=list() tunerdict = {} + currenthostype='' for row in result: # print row[0] #Find the system type @@ -155,7 +157,7 @@ def main(argv): for fe in dotslave: cslave="STUNER"+fe if tunerdict[cslave] != "" : - dotfile.write(cslave+ " [ label= \"" + tunerdict[cslave] + "\" , shape=box ] \n" ) + dotfile.write(cslave+ " [ label= \"" + tunerdict[cslave] + "\" , shape=box ] \n" ) dotfile.write("SLAVE"+fe + "[ label=\"slave backend \\n " + fe + "\" shapefile=\"/data/srv/httpd/htdocs/hobbit/gifs/be.png\" fontcolor=\"white\" color=green ] \n" ) @@ -229,24 +231,8 @@ def main(argv): #print line hobbitf.write(line) - - - - #-----------------------------------------------------------END CLIENT CONFIG - - - - - - - - - - - - # execute SQL statement cursor.execute("SELECT DISTINCT(hostname) from settings") result = cursor.fetchall() @@ -299,7 +285,7 @@ def main(argv): buttonform_top=''' <div class="content" style="solid #aaa; width:500px; height:350px; overflow:auto; color:#FFF;text-align:left;"> - <form action="/process.py" method="get"> + <form action="/process.py" method="get"> ''' @@ -310,6 +296,12 @@ def main(argv): <option value="All"> Full System</option> </select> </br> + <input name="param2" type="radio" value="Kill" />Restart interface: </> + <select name="param3"> + <option value="killX">Full UI</option> + <option value="killmyth">MythFrontend</option> + </select> + </br> <input name="param2" type="radio" value="Shutdown" />Shutdown System<br /> <input name="param2" type="radio" value="Reboot" />Reboot System<br /> <input name="param2" type="radio" value="WOL" />Wake on Lan<br /> @@ -329,12 +321,7 @@ def main(argv): </div> ''' - #ordurlform=''' - #"/> - #<input name="param4" type="hidden" value=" - #''' - - if currenthostype == "Master_backend" : + if currenthostype == "Master_backend": mbeoptions=createdropdown() else: mbeoptions='' -- cgit v0.12