Author: croberts
Date: 2013-02-18 16:00:42 +0000 (Mon, 18 Feb 2013)
New Revision: 5713
Modified:
branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py
branches/elephant/cumin/python/cumin/gridhadoop/hadoop.strings
branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py
branches/elephant/cumin/python/cumin/gridhadoop/namenode.py
Log:
Links to name node/job tracker http interface now open in new tab/window.
Modified: branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py 2013-02-18 15:07:28 UTC (rev
5712)
+++ branches/elephant/cumin/python/cumin/gridhadoop/hadoop.py 2013-02-18 16:00:42 UTC (rev
5713)
@@ -13,6 +13,7 @@
from wooly import Session, Widget
from wooly.datatable import *
+from wooly.table import LinkColumnCell
from wooly.util import StringCatalog, xml_escape
from rosemary.model import RosemaryObject
@@ -301,3 +302,17 @@
invoc.exception = e
invoc.status = invoc.FAILED
invoc.end()
+
+class HadoopObjectLinkColumn(ObjectLinkColumn):
+ def __init__(self, app, name, attr, id_attr, frame_path):
+ super(HadoopObjectLinkColumn, self).__init__(app, name, attr, id_attr,
frame_path)
+
+ self.id_attr = id_attr
+ self.frame_path = frame_path
+
+ self.cell = HadoopLinkColumnCell(app, "cell")
+ self.replace_child(self.cell)
+
+class HadoopLinkColumnCell(LinkColumnCell):
+ #needed so we can override display
+ pass
Modified: branches/elephant/cumin/python/cumin/gridhadoop/hadoop.strings
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/hadoop.strings 2013-02-18 15:07:28 UTC
(rev 5712)
+++ branches/elephant/cumin/python/cumin/gridhadoop/hadoop.strings 2013-02-18 16:00:42 UTC
(rev 5713)
@@ -1,2 +1,7 @@
[HadoopObjectDetails.html]
-{props}
\ No newline at end of file
+{props}
+
+
+
+[HadoopLinkColumnCell.html]
+<td class="{class}"><a href="{href}"
title="{title}" target="_blank">{content}</a></td>
\ No newline at end of file
Modified: branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py 2013-02-18 15:07:28 UTC
(rev 5712)
+++ branches/elephant/cumin/python/cumin/gridhadoop/jobtracker.py 2013-02-18 16:00:42 UTC
(rev 5713)
@@ -77,7 +77,7 @@
frame = self.frame.children_by_name[self.frame.name + self.frame_path]
return frame.get_href(session, id, frame.parent.host.get(session))
- class HttpColumn(ObjectLinkColumn):
+ class HttpColumn(HadoopObjectLinkColumn):
def render_cell_href(self, session, record):
link = self.field.get_content(session, record)
return link
Modified: branches/elephant/cumin/python/cumin/gridhadoop/namenode.py
===================================================================
--- branches/elephant/cumin/python/cumin/gridhadoop/namenode.py 2013-02-18 15:07:28 UTC
(rev 5712)
+++ branches/elephant/cumin/python/cumin/gridhadoop/namenode.py 2013-02-18 16:00:42 UTC
(rev 5713)
@@ -73,7 +73,7 @@
frame = self.frame.children_by_name[self.frame.name + self.frame_path]
return frame.get_href(session, id, frame.parent.host.get(session))
- class HttpColumn(ObjectLinkColumn):
+ class HttpColumn(HadoopObjectLinkColumn):
def render_cell_href(self, session, record):
link = self.field.get_content(session, record)
return link
Show replies by date