Commit 48ad9b70 authored by Nicolas Wavrant's avatar Nicolas Wavrant

stack-monitor: minor changes

parent ad16bbaf
...@@ -41,7 +41,7 @@ else: ...@@ -41,7 +41,7 @@ else:
with open("{{ config_cfg }}", 'w') as file: with open("{{ config_cfg }}", 'w') as file:
parser.write(file) parser.write(file)
print "<html><body>" print "<html><body>"
print "<h1>Values to be defined by the user</h1>" print "<h1>Values that can be defined by the user :</h1>"
print "<form action=\"/control.cgi\" method=\"post\">" print "<form action=\"/control.cgi\" method=\"post\">"
print "<input type=\"hidden\" name=\"password\" value=\"{{ password }}\">" print "<input type=\"hidden\" name=\"password\" value=\"{{ password }}\">"
for option in parser.options("public"): for option in parser.options("public"):
...@@ -49,11 +49,12 @@ else: ...@@ -49,11 +49,12 @@ else:
value=\"%s\"><br>"% (option, option, parser.get('public', option)) value=\"%s\"><br>"% (option, option, parser.get('public', option))
print "<input type=\"submit\" value=\"Save\"></form>" print "<input type=\"submit\" value=\"Save\"></form>"
print "<h1>Other values:</h1>" print "<h1>Other values :</h1>"
for section in parser.sections(): for section in parser.sections():
if section != 'public': if section != 'public':
for option in parser.options(section): for option in parser.options(section):
print "<b>%s</b> : value=\"%s\"<br>" % (option, print "<b>%s</b> : value=\"%s\"<br>" % (option,
parser.get(section, option)) parser.get(section, option))
print "<br><br><p><a href=\"/monitor.cgi\">Monitor interface</a></p>"
print "</body></html>" print "</body></html>"
\ No newline at end of file
...@@ -72,7 +72,7 @@ filename = monitor.cgi ...@@ -72,7 +72,7 @@ filename = monitor.cgi
mode = 0744 mode = 0744
context = context =
key json_file monitor-parameters:json-path key json_file monitor-parameters:json-path
key password zero-parameters:cgi-password key password zero-parameters:monitor-password
raw python_executable ${buildout:executable} raw python_executable ${buildout:executable}
key this_filename :filename key this_filename :filename
...@@ -84,7 +84,7 @@ filename = control.cgi ...@@ -84,7 +84,7 @@ filename = control.cgi
mode = 0744 mode = 0744
context = context =
raw config_cfg $${buildout:directory}/knowledge0.cfg raw config_cfg $${buildout:directory}/knowledge0.cfg
key password zero-parameters:cgi-password key password zero-parameters:monitor-password
raw python_executable ${buildout:executable} raw python_executable ${buildout:executable}
key this_filename :filename key this_filename :filename
...@@ -150,7 +150,7 @@ name = example.com ...@@ -150,7 +150,7 @@ name = example.com
[public] [public]
recipe = slapos.cookbook:zeroknown.write recipe = slapos.cookbook:zeroknown.write
filename = knowledge0.cfg filename = knowledge0.cfg
cgi-password = passwordtochange monitor-password = passwordtochange
[zero-parameters] [zero-parameters]
recipe = slapos.cookbook:zeroknown.read recipe = slapos.cookbook:zeroknown.read
...@@ -215,4 +215,4 @@ wrapper-path = $${directory:bin}/cgi-httpd ...@@ -215,4 +215,4 @@ wrapper-path = $${directory:bin}/cgi-httpd
[publish-connection-parameter] [publish-connection-parameter]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
monitor_url = https://[$${cgi-httpd-configuration-file:listening-ip}]:$${cgi-httpd-configuration-file:listening-port}/index.html monitor_url = https://[$${cgi-httpd-configuration-file:listening-ip}]:$${cgi-httpd-configuration-file:listening-port}/index.html
IMPORTANT_monitor_info = change the password as soon as possible ! Default is : passwordtochange IMPORTANT_monitor_info = change the monitor_password as soon as possible ! Default is : $${public:monitor-password}
\ No newline at end of file \ No newline at end of file
...@@ -46,4 +46,5 @@ else: ...@@ -46,4 +46,5 @@ else:
for r in result: for r in result:
if result[r] == '': if result[r] == '':
print "<h3>%s</h3><p>%s</p>" % (r, result[r]) print "<h3>%s</h3><p>%s</p>" % (r, result[r])
print "<br><br><p><a href=\"/control.cgi\">Control interface</a></p>"
print "</body></html>" print "</body></html>"
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment