+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)
+