Author: croberts
Date: 2013-06-24 13:19:26 +0000 (Mon, 24 Jun 2013)
New Revision: 5773
Modified:
trunk/cumin/python/cumin/gridhadoop/hadoop.py
Log:
Addressing some issues with how our HadoopObjects are built and how they are displayed
when not all values are present.
Modified: trunk/cumin/python/cumin/gridhadoop/hadoop.py
===================================================================
--- trunk/cumin/python/cumin/gridhadoop/hadoop.py 2013-06-24 13:17:23 UTC (rev 5772)
+++ trunk/cumin/python/cumin/gridhadoop/hadoop.py 2013-06-24 13:19:26 UTC (rev 5773)
@@ -2,7 +2,7 @@
from cumin.objectselector import ObjectSelector, ObjectLinkColumn, ObjectTable, \
ObjectTableColumn, ObjectQmfTable, ObjectQmfSelectorTable, ObjectSelectorTaskForm,
ObjectSelectorTask
-from cumin.objectframe import ObjectFrame, ObjectTaskForm, ObjectDetails
+from cumin.objectframe import ObjectFrame, ObjectTaskForm, ObjectDetails,
DetailsAttributes
from cumin.util import *
from cumin.qmfadapter import ObjectQmfAdapter
from cumin.task import Task, TaskLink
@@ -62,10 +62,10 @@
val = record.ref.http
elif (column.name == "Ipc"):
val = record.ref.ipc
- elif (column.name == "Id"):
+ elif (column.name in ["Id", "_id"]):
val = record.ref.id
else:
- val = ""
+ val = None
field_data.append(val)
return field_data
@@ -302,11 +302,19 @@
name = self.__class__.__name__
args = (name, self._class, self._id, self._save_time)
return "%s(%s,%s,%s)" % args
+
+ def get_value(self, attr):
+ try:
+ value = getattr(self, attr)
+ except AttributeError:
+ value = ""
+ return value
+
class HadoopObjectDetails(ObjectDetails):
def __init__(self, app, name, object):
super(HadoopObjectDetails, self).__init__(app, name, object)
-
+
class HadoopNodeDeleteTask(ObjectSelectorTask):
def enter(self, session):
form_session = super(HadoopNodeDeleteTask, self).enter(session)
Show replies by date