diff --git a/stack/monitor/control.cgi.in b/stack/monitor/control.cgi.in index 06522d69f2daf974b5d47c6244fb21820b97eebb..0e74030242bb5627d2643ad5b69a456f0f6df8cc 100644 --- a/stack/monitor/control.cgi.in +++ b/stack/monitor/control.cgi.in @@ -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 diff --git a/stack/monitor/monitor.cfg.in b/stack/monitor/monitor.cfg.in index 4a019f0a0d4691486e7b0c03067793cf0c1f1d28..dafb137c40cecc8321c24c7cfef087b4f2467060 100644 --- a/stack/monitor/monitor.cfg.in +++ b/stack/monitor/monitor.cfg.in @@ -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 diff --git a/stack/monitor/monitor.cgi.in b/stack/monitor/monitor.cgi.in index 476e89a9cebd2299122a790da4a35027edb38251..3da42a1a9cb92da9d88f074acdae271ffaaa55d5 100644 --- a/stack/monitor/monitor.cgi.in +++ b/stack/monitor/monitor.cgi.in @@ -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