X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=web%2FMonitorWeb%2Fmonitorweb%2Ftemplates%2Fnodelist.kid;h=e07fb635aac6d9e839645788dde1081e13b03412;hb=09a4319e30f5fadf17cbc5fbbef03bb2a35c5f0f;hp=b6ee42a53ea23ace820ea0a9696b8078e8f8b8b5;hpb=93d6ae8ad0d612f086e41fc6b2db052994911052;p=monitor.git diff --git a/web/MonitorWeb/monitorweb/templates/nodelist.kid b/web/MonitorWeb/monitorweb/templates/nodelist.kid index b6ee42a..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)}
@@ -36,7 +46,7 @@ from links import *
IDHostnameSitePingSSHStatpcukernelBootCDLast_contact