Author: eallen
Date: 2011-04-12 12:45:28 +0000 (Tue, 12 Apr 2011)
New Revision: 4703
Modified:
trunk/cumin/python/cumin/grid/dashboard.py
Log:
Add mouseover text to the slot breakdown by os table
Modified: trunk/cumin/python/cumin/grid/dashboard.py
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.py 2011-04-11 20:13:41 UTC (rev 4702)
+++ trunk/cumin/python/cumin/grid/dashboard.py 2011-04-12 12:45:28 UTC (rev 4703)
@@ -5,15 +5,17 @@
from wooly.datatable import DataAdapterOptions, DataAdapterField
from wooly.table import TableHeader
from wooly.widgets import RadioModeSet, WidgetSet
+from wooly.template import WidgetTemplate
+from parsley.stringex import rpartition
+from rosemary.sqlquery import SqlQueryOptions
+
from cumin.sqladapter import ObjectSqlAdapter
from cumin.stat import StatSet, PieChartPage, StatFlashChart
-from rosemary.sqlquery import SqlQueryOptions
from cumin.objectselector import ObjectSelector, MonitorSelfStatColumn,
ObjectTableColumn, ObjectTable,\
ObjectLinkColumn, CsvStatsExporter, ExportButton
from cumin.util import rgb_to_string
from negotiator import NegotiatorAttribute
-from wooly.template import WidgetTemplate
strings = StringCatalog(__file__)
log = logging.getLogger("cumin.dashboard")
@@ -715,6 +717,7 @@
return "Slot breakdown by OS"
def do_get_items(self, session):
+ # (index, (name, value))
return [(i, x) for i, x in enumerate(self.get_records(session))]
def is_total(self, item):
@@ -733,7 +736,9 @@
return self.get_item_value(session, item)
def render_html_title(self, session, item):
- return None
+ (_, (name, value)) = item
+ os, _, state = rpartition(name, " ")
+ return "There are %d %s slots with an OS of %s" % (value, state, os)
def get_legend_class(self, session, this_item):
items = self.do_get_items(session)
Show replies by date