Author: croberts
Date: 2012-01-31 21:38:40 +0000 (Tue, 31 Jan 2012)
New Revision: 5199
Added:
branches/humility/cumin/python/cumin/grid/reports.py
branches/humility/cumin/python/cumin/grid/reports.strings
Modified:
branches/humility/cumin/python/cumin/grid/pool.py
Log:
First pass at initial reporting layout
Modified: branches/humility/cumin/python/cumin/grid/pool.py
===================================================================
--- branches/humility/cumin/python/cumin/grid/pool.py 2012-01-31 19:29:52 UTC (rev 5198)
+++ branches/humility/cumin/python/cumin/grid/pool.py 2012-01-31 21:38:40 UTC (rev 5199)
@@ -8,6 +8,7 @@
from cumin.stat import StatFlashChart, StatSet
from cumin.grid.dashboard import PoolDashboard
from cumin.grid.tags import TagsNodeEditTask, TagsFrame, TagInventory
+from cumin.grid.reports import ReportsFrame, ReportsMain
from submission import PoolSubmissionFrame, PoolSubmissionJoinSelector
from slot import SlotFrame
@@ -78,6 +79,9 @@
self.tag = TagsFrame(app, "tag")
self.add_mode(self.tag)
+
+ self.report = ReportsFrame(app, "rep")
+ self.add_mode(self.report)
dashboard = PoolDashboard(app, "dashboard", self.object)
self.view.add_tab(dashboard)
@@ -108,6 +112,9 @@
self.edit_node_tags = TagsNodeEditTask(app, self)
config_editor = TagInventory(app, "tagi")
self.view.add_tab(config_editor)
+
+ self.reports = ReportsMain(app, "reports")
+ self.view.add_tab(self.reports)
self.top_tab = True
Added: branches/humility/cumin/python/cumin/grid/reports.py
===================================================================
--- branches/humility/cumin/python/cumin/grid/reports.py (rev 0)
+++ branches/humility/cumin/python/cumin/grid/reports.py 2012-01-31 21:38:40 UTC (rev
5199)
@@ -0,0 +1,45 @@
+from wooly import *
+from wooly.widgets import RadioModeSet
+
+class ReportsFrame(Frame):
+ def __init__(self, app, name):
+ super(ReportsFrame, self).__init__(app, name)
+
+ def render_title(self, session):
+ return "Reports"
+
+
+class ReportsMain(RadioModeSet):
+ def __init__(self, app, name):
+ super(ReportsMain, self).__init__(app, name)
+
+ self.add_tab(ReportsHostInfo(app, "host"))
+ self.add_tab(ReportsJobInfo(app, "job"))
+ self.add_tab(ReportsUserInfo(app, "user"))
+
+
+ def render_title(self, session):
+ return "Reports"
+
+
+class ReportsHostInfo(Widget):
+ def __init__(self, app, name):
+ super(ReportsHostInfo, self).__init__(app, name)
+
+ def render_title(self, session):
+ return "Host"
+
+
+class ReportsUserInfo(Widget):
+ def __init__(self, app, name):
+ super(ReportsUserInfo, self).__init__(app, name)
+
+ def render_title(self, session):
+ return "User"
+
+class ReportsJobInfo(Widget):
+ def __init__(self, app, name):
+ super(ReportsJobInfo, self).__init__(app, name)
+
+ def render_title(self, session):
+ return "Job"
\ No newline at end of file
Property changes on: branches/humility/cumin/python/cumin/grid/reports.py
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: branches/humility/cumin/python/cumin/grid/reports.strings
===================================================================