diff --git a/stack/monitor/buildout.cfg b/stack/monitor/buildout.cfg index 051a87675cbef2cd5b166674e8643a4adfd8a487..ef2deedd0354c19a5fdc4a395f9b4759ccdfb6e4 100644 --- a/stack/monitor/buildout.cfg +++ b/stack/monitor/buildout.cfg @@ -108,7 +108,7 @@ logfile = $${directory:log}/crond.log recipe = hexagonit.recipe.download url = https://github.com/Sebatyne/staticForMonitoring/blob/master/static-files.tar.gz?raw=true download-only = true -#md5sum = +md5sum = e98585b85634de48240b2c215e946769 filename = static-files.tar.gz mode = 0644 diff --git a/stack/monitor/webfiles/settings.cgi.in b/stack/monitor/webfiles/settings.cgi.in index 85dbd921d94a0003d7a540983f1033fdd265c53b..7b0dcc62b7c7ed1e1248625423eb67ee9f3e3138 100755 --- a/stack/monitor/webfiles/settings.cgi.in +++ b/stack/monitor/webfiles/settings.cgi.in @@ -8,7 +8,10 @@ import os cgitb.enable() form = cgi.FieldStorage() -print "<html><body>" +print "<html><head>" +print "<link rel=\"stylesheet\" href=\"pure-min.css\">" +print "<link rel=\"stylesheet\" href=\"/style.css\">" +print "</head><body>" config_file = "{{ config_cfg }}" @@ -26,18 +29,25 @@ with open(config_file, 'w') as file: parser.write(file) print "<h1>Values that can be defined by the user :</h1>" -print "<form action=\"/index.cgi\" method=\"post\">" +print "<form action=\"/index.cgi\" method=\"post\" class=\"pure-form-aligned\">" print "<input type=\"hidden\" name=\"posting-script\" value=\"{{ pwd }}/{{ this_file }}\">" for option in parser.options("public"): - print "%s : <input type=\"text\" name=\"%s\" \ - value=\"%s\"><br>"% (option, option, parser.get('public', option)) -print "<input type=\"submit\" value=\"Save\"></form>" - -print "<h1>Other values :</h1>" + print "<div class=\"pure-control-group\">" + print "<label for=\"=%s\">%s</label>"%(option, option) + print "<input type=\"text\" name=\"%s\" value=\"%s\" readonly>"%(option, parser.get('public', option)) + print "</div>" +print "<div class=\"pure-controls\"><button type=\"submit\" class=\"pure-button \ + pure-button-primary\">Save</button></div></form>" + +print "<br><h1>Other values :</h1>" +print "<form class=\"pure-form-aligned\">" 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 "<div class=\"pure-control-group\">" + print "<label for=\"=%s\">%s</label>"%(option, option) + print "<input type=\"text\" name=\"%s\" value=\"%s\">"%(option, parser.get(section, option)) + print "</div>" +print "</form>" print "</body></html>" diff --git a/stack/monitor/webfiles/status.cgi.in b/stack/monitor/webfiles/status.cgi.in index 87a222d2bdd4b27e976719eac9459ae6b7e10bba..cf0fe774ccebad93ea55259011431d1dd5dbb6c9 100755 --- a/stack/monitor/webfiles/status.cgi.in +++ b/stack/monitor/webfiles/status.cgi.in @@ -8,7 +8,10 @@ cgitb.enable(display=0, logdir="/tmp/cgi.log") json_file = "{{ json_file }}" result = json.load(open(json_file)) -print "<html><body>" +print "<html><head>" +print "<link rel=\"stylesheet\" href=\"pure-min.css\">" +print "<link rel=\"stylesheet\" href=\"/style.css\">" +print "</head><body>" print "<h1>Monitoring :</h1>" print "<p><em>Last time of monitoring process : %s</em></p>" % (result['datetime']) del result['datetime']