summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/hobbitmon/hbnotes.py
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 /abs/mv-core/hobbitmon/hbnotes.py
parent0f2c56869ac05a79872dd87cc19c7b3360057150 (diff)
downloadlinhes_pkgbuild-43635706a17029756256953141d6150f9d4cb2bc.zip
linhes_pkgbuild-43635706a17029756256953141d6150f9d4cb2bc.tar.gz
linhes_pkgbuild-43635706a17029756256953141d6150f9d4cb2bc.tar.bz2
Added fe/x restart to localwebsite.
Diffstat (limited to 'abs/mv-core/hobbitmon/hbnotes.py')
-rwxr-xr-xabs/mv-core/hobbitmon/hbnotes.py39
1 files changed, 13 insertions, 26 deletions
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=''