summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-02-27 01:22:12 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-02-27 01:22:12 (GMT)
commit43635706a17029756256953141d6150f9d4cb2bc (patch)
treed79e96b38d45e5cc68016e6e14d3030369dcd537
parent0f2c56869ac05a79872dd87cc19c7b3360057150 (diff)
downloadlinhes_pkgbuild-43635706a17029756256953141d6150f9d4cb2bc.zip
linhes_pkgbuild-43635706a17029756256953141d6150f9d4cb2bc.tar.gz
linhes_pkgbuild-43635706a17029756256953141d6150f9d4cb2bc.tar.bz2
Added fe/x restart to localwebsite.
-rwxr-xr-xabs/mv-core/hobbitmon/PKGBUILD2
-rwxr-xr-xabs/mv-core/hobbitmon/hbnotes.py39
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=''