From 3f4df5945bbfb4592a164d929cf22c31d5fba50e Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Wed, 10 Jun 2009 18:45:09 +0000 Subject: [PATCH] remove unnecessary informatiton on pcuview page add history for pcu change 'increase penalty' to 'reduce privilege' --- monitor/wrapper/emailTxt.py | 14 +++++----- web/MonitorWeb/monitorweb/controllers.py | 13 +++++++++ .../monitorweb/static/css/style.css | 10 +++++++ .../monitorweb/templates/nodehistory.kid | 2 +- .../monitorweb/templates/pcuview.kid | 28 ++++++++++--------- 5 files changed, 46 insertions(+), 21 deletions(-) diff --git a/monitor/wrapper/emailTxt.py b/monitor/wrapper/emailTxt.py index cd3ab2a..9a7fec3 100644 --- a/monitor/wrapper/emailTxt.py +++ b/monitor/wrapper/emailTxt.py @@ -309,12 +309,12 @@ Thank you very much for your help, -- PlanetLab Central (support@planet-lab.org) """) - clear_penalty=("""MONTEST: All penalties cleared from site %(loginbase)s""", + clear_penalty=("""MONTEST: All privileges restored to site %(loginbase)s""", """ -This notice is to let you know that any penalties previously applied to your -site have been removed: %(penalty_level)s. +This notice is to let you know that any privileges previously reduced at your +site have been restored: %(penalty_level)s. -All privileges have been restored. You may create slices again, and if your +All privileges are restored. You may create slices again, and if your slices were disabled, please allow up to 30 minutes for them to return to enabled. @@ -330,10 +330,10 @@ Legend: 2+ - all existing slices will be disabled. """) - increase_penalty=("""MONTEST: Penalty increased for site %(loginbase)s""", + increase_penalty=("""MONTEST: Privilege reduced for site %(loginbase)s""", """ -This notice is to let you know that the penalty applied to your site has -increased: %(penalty_level)s. +This notice is to let you know that the privileges granted to your site as +a participating member of Planetlab have reduced: %(penalty_level)s. Your privileges will be reduced corresponding to the legend below. To restore these privileges, please return at least two machines to working diff --git a/web/MonitorWeb/monitorweb/controllers.py b/web/MonitorWeb/monitorweb/controllers.py index 33f88e1..aad1f21 100644 --- a/web/MonitorWeb/monitorweb/controllers.py +++ b/web/MonitorWeb/monitorweb/controllers.py @@ -363,6 +363,19 @@ class Root(controllers.RootController, MonitorXmlrpcServer): return dict(sitequery=sitequery, pcuquery=pcuquery, nodequery=nodequery, actions=actions, exceptions=exceptions) + @expose(template="monitorweb.templates.pcuhistory") + def pcuhistory(self, pcu_id=None): + query = [] + if pcu_id: + fbnode = HistoryPCURecord.get_by(plc_pcuid=pcu_id) + l = fbnode.versions[-100:] + l.reverse() + for pcu in l: + #prep_node_for_display(node) + query.append(pcu) + + return dict(query=query, pcu_id=pcu_id) + @expose(template="monitorweb.templates.nodehistory") def nodehistory(self, hostname=None): query = [] diff --git a/web/MonitorWeb/monitorweb/static/css/style.css b/web/MonitorWeb/monitorweb/static/css/style.css index 4367a0a..d3a365c 100644 --- a/web/MonitorWeb/monitorweb/static/css/style.css +++ b/web/MonitorWeb/monitorweb/static/css/style.css @@ -108,6 +108,16 @@ a.right { float: right; } #site-offline { background-color: red; } #site-down { background-color: indianred; } +#node-online { background-color : lightgreen; } +#node-good { background-color : darkseagreen; } +#node-offline { background-color: red; } +#node-down { background-color: indianred; } + +#pcu-online { background-color : lightgreen; } +#pcu-good { background-color : darkseagreen; } +#pcu-offline { background-color: red; } +#pcu-down { background-color: indianred; } + /*#site-0 { background-color : white; }*/ #site-1 { background-color: gold; } #site-2 { background-color: indianred; } diff --git a/web/MonitorWeb/monitorweb/templates/nodehistory.kid b/web/MonitorWeb/monitorweb/templates/nodehistory.kid index a7ff408..f03b692 100644 --- a/web/MonitorWeb/monitorweb/templates/nodehistory.kid +++ b/web/MonitorWeb/monitorweb/templates/nodehistory.kid @@ -51,7 +51,7 @@ from links import * your.host.org - + diff --git a/web/MonitorWeb/monitorweb/templates/pcuview.kid b/web/MonitorWeb/monitorweb/templates/pcuview.kid index fc471d9..56660a1 100644 --- a/web/MonitorWeb/monitorweb/templates/pcuview.kid +++ b/web/MonitorWeb/monitorweb/templates/pcuview.kid @@ -44,9 +44,10 @@ from links import * + History PCU Name Missing Fields - DNS Status + DNS Status Port Status Test Results Model @@ -56,6 +57,7 @@ from links import * + history ${pcu_name(pcu.plc_pcu_stats)} @@ -167,27 +169,27 @@ from links import * -
+ - + - + @@ -237,8 +239,8 @@ from links import * -

Convenience Calls

-
+
-- 2.43.0