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

stack-monitor: minor changes

parent ad16bbaf
......@@ -41,7 +41,7 @@ else:
with open("{{ config_cfg }}", 'w') as file:
parser.write(file)
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 "<input type=\"hidden\" name=\"password\" value=\"{{ password }}\">"
for option in parser.options("public"):
......@@ -49,11 +49,12 @@ else:
value=\"%s\"><br>"% (option, option, parser.get('public', option))
print "<input type=\"submit\" value=\"Save\"></form>"
print "<h1>Other values:</h1>"
print "<h1>Other values :</h1>"
for section in parser.sections():
if section != 'public':
for option in parser.options(section):
print "<b>%s</b> : value=\"%s\"<br>" % (option,
parser.get(section, option))
print "<br><br><p><a href=\"/monitor.cgi\">Monitor interface</a></p>"
print "</body></html>"
\ No newline at end of file
......@@ -72,7 +72,7 @@ filename = monitor.cgi
mode = 0744
context =
key json_file monitor-parameters:json-path
key password zero-parameters:cgi-password
key password zero-parameters:monitor-password
raw python_executable ${buildout:executable}
key this_filename :filename
......@@ -84,7 +84,7 @@ filename = control.cgi
mode = 0744
context =
raw config_cfg $${buildout:directory}/knowledge0.cfg
key password zero-parameters:cgi-password
key password zero-parameters:monitor-password
raw python_executable ${buildout:executable}
key this_filename :filename
......@@ -150,7 +150,7 @@ name = example.com
[public]
recipe = slapos.cookbook:zeroknown.write
filename = knowledge0.cfg
cgi-password = passwordtochange
monitor-password = passwordtochange
[zero-parameters]
recipe = slapos.cookbook:zeroknown.read
......@@ -215,4 +215,4 @@ wrapper-path = $${directory:bin}/cgi-httpd
[publish-connection-parameter]
recipe = slapos.cookbook:publish
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
\ No newline at end of file
IMPORTANT_monitor_info = change the monitor_password as soon as possible ! Default is : $${public:monitor-password}
\ No newline at end of file
......@@ -46,4 +46,5 @@ else:
for r in result:
if 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>"
\ 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