X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=web%2FMonitorWeb%2Fmonitorweb%2Ftemplates%2Fnodelist.kid;h=e07fb635aac6d9e839645788dde1081e13b03412;hb=09a4319e30f5fadf17cbc5fbbef03bb2a35c5f0f;hp=e32b92d26514f48b11e7d6ae49a869c722197bba;hpb=09b59c841e16304b3f0826e6866e212bad922840;p=monitor.git diff --git a/web/MonitorWeb/monitorweb/templates/nodelist.kid b/web/MonitorWeb/monitorweb/templates/nodelist.kid index e32b92d..e07fb63 100644 --- a/web/MonitorWeb/monitorweb/templates/nodelist.kid +++ b/web/MonitorWeb/monitorweb/templates/nodelist.kid @@ -5,6 +5,15 @@ from monitor.util import diff_time from time import mktime from links import * +def up_label (query): + up=len([agg for agg in query if agg.node.status in ('online', 'good')]) + total=len(query) + return "%d (%d %%)" %(up,100*up/total) +def down_label (query): + down=len([agg for agg in query if agg.node.status not in ('online', 'good')]) + total=len(query) + return "%d (%d %%)" %(down,100*down/total) + ?>
- | -
+ +
- +
- - - - - - - - - - + ${nodewidget.display(node=None, header=True)}
@@ -49,16 +59,7 @@ from links import *
IDHostnameSitePingSSHStatpcukernelBootCDLast_contact