Author: croberts
Date: 2012-12-18 14:34:49 +0000 (Tue, 18 Dec 2012)
New Revision: 5613
Modified:
branches/elephant/cumin/python/cumin/gridhadoop/datanode.py
branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py
branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py
branches/elephant/cumin/python/cumin/gridhadoop/namenode.py
branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py
Log:
Submitted column is now formatted nicely.
Modified: branches/elephant/cumin/python/cumin/gridhadoop/datanode.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/datanode.py 2012-12-18 14:22:44 UTC
(rev 5612)
+++ branches/elephant/cumin/python/cumin/gridhadoop/datanode.py 2012-12-18 14:34:49 UTC
(rev 5613)
@@ -44,7 +44,7 @@
super(DataNodeTable, self).__init__(app, name, cls)
self.id_col = ObjectTableColumn(app, "idcol", cls.Id)
- self.sub_col = ObjectTableColumn(app, "sub", cls.Submitted)
+ self.sub_col = SubmittedColumn(app, "sub", cls.Submitted)
self.state_col = ObjectTableColumn(app, "statecol", cls.State)
self.uptime_col = ObjectTableColumn(app, "uptimecol", cls.Uptime)
self.owner_col = ObjectTableColumn(app, "ownercol", cls.Owner)
Modified: branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py 2012-12-18 14:22:44 UTC (rev
5612)
+++ branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py 2012-12-18 14:34:49 UTC (rev
5613)
@@ -199,4 +199,11 @@
def render_item_selected_attr(self, session, item):
if item == self.param.get(session):
- return "selected=\"selected\""
\ No newline at end of file
+ return "selected=\"selected\""
+
+class SubmittedColumn(ObjectTableColumn):
+ def render_cell_content(self, session, data):
+ d = super(SubmittedColumn, self).\
+ render_cell_content(session, data)
+ datestring = datetime.fromtimestamp(d).strftime('%Y-%m-%d %H:%M:%S')
+ return datestring
\ No newline at end of file
Modified: branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py 2012-12-18 14:22:44 UTC
(rev 5612)
+++ branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py 2012-12-18 14:34:49 UTC
(rev 5613)
@@ -50,7 +50,7 @@
self.id_col = ObjectTableColumn(app, "idcol", cls.Id)
self.ipc_col = ObjectTableColumn(app, "ipc", cls.Ipc)
self.ipc_col.width = "20%"
- self.sub_col = ObjectTableColumn(app, "sub", cls.Submitted)
+ self.sub_col = SubmittedColumn(app, "sub", cls.Submitted)
self.state_col = ObjectTableColumn(app, "statecol", cls.State)
self.uptime_col = ObjectTableColumn(app, "uptimecol", cls.Uptime)
self.owner_col = ObjectTableColumn(app, "ownercol", cls.Owner)
Modified: branches/elephant/cumin/python/cumin/gridhadoop/namenode.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/namenode.py 2012-12-18 14:22:44 UTC
(rev 5612)
+++ branches/elephant/cumin/python/cumin/gridhadoop/namenode.py 2012-12-18 14:34:49 UTC
(rev 5613)
@@ -45,7 +45,7 @@
self.id_col = ObjectTableColumn(app, "idcol", cls.Id)
self.ipc_col = ObjectTableColumn(app, "ipc", cls.Ipc)
self.ipc_col.width = "20%"
- self.sub_col = ObjectTableColumn(app, "sub", cls.Submitted)
+ self.sub_col = SubmittedColumn(app, "sub", cls.Submitted)
self.state_col = ObjectTableColumn(app, "statecol", cls.State)
self.uptime_col = ObjectTableColumn(app, "uptimecol", cls.Uptime)
self.owner_col = ObjectTableColumn(app, "ownercol", cls.Owner)
Modified: branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py 2012-12-18 14:22:44 UTC
(rev 5612)
+++ branches/elephant/cumin/python/cumin/gridhadoop/tasktracker.py 2012-12-18 14:34:49 UTC
(rev 5613)
@@ -48,7 +48,7 @@
super(TaskTrackerTable, self).__init__(app, name, cls)
self.id_col = ObjectTableColumn(app, "idcol", cls.Id)
- self.sub_col = ObjectTableColumn(app, "sub", cls.Submitted)
+ self.sub_col = SubmittedColumn(app, "sub", cls.Submitted)
self.state_col = ObjectTableColumn(app, "statecol", cls.State)
self.uptime_col = ObjectTableColumn(app, "uptimecol", cls.Uptime)
self.owner_col = ObjectTableColumn(app, "ownercol", cls.Owner)