Author: eallen
Date: 2010-07-22 10:50:59 -0400 (Thu, 22 Jul 2010)
New Revision: 4142
Modified:
mgmt/newdata/cumin/python/cumin/inventory/system.py
Log:
Added slot vis back to system overview
Modified: mgmt/newdata/cumin/python/cumin/inventory/system.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/inventory/system.py 2010-07-21 19:16:37 UTC (rev
4141)
+++ mgmt/newdata/cumin/python/cumin/inventory/system.py 2010-07-22 14:50:59 UTC (rev
4142)
@@ -83,7 +83,7 @@
super(SystemSlotMap, self).__init__(app, name)
self.system = system
- self.slot_clip_size = 240
+ self.slot_clip_size = 280
def do_process(self, session):
super(SystemSlotMap, self).do_process(session)
@@ -98,7 +98,8 @@
page = self.app.system_slots_page
sess = Session(page)
- page.id.set(sess, system._id)
+ #page.sysimage.set(sess, system._id)
+ page.sysimage.set(sess, system)
return sess.marshal()
@@ -113,14 +114,14 @@
page = self.app.system_slots_page
sess = Session(page)
- page.id.set(sess, system._id)
+ page.sysimage.set(sess, system)
page.json.set(sess, "slots")
page.groups.set(sess, [])
return sess.marshal()
def render_slot_chart_width(self, session):
- return 300
+ return 360
def render_slot_chart_height(self, session):
return 200
@@ -207,15 +208,15 @@
class SystemSlotMapPage(SlotMapPage):
def __init__(self, app, name):
- super(SystemSlotMapPage, self).__init__(app, name, None, "System")
+ self.cls = app.model.com_redhat_sesame.Sysimage
+ self.sysimage = RosemaryObjectParameter(app, "id", self.cls)
- self.id = IntegerParameter(app, "id")
- self.add_parameter(self.id)
+ super(SystemSlotMapPage, self).__init__(app, name, self.sysimage,
"System")
+ self.add_parameter(self.sysimage)
+
def do_process(self, session):
super(SystemSlotMapPage, self).do_process(session)
- cls = self.app.com_redhat_sesame.Sysimage
- system = cls.get_object_by_id(session.cursor, self.id.get(session))
-
- self.slots.add_where_expr(session, "s.system = '%s'",
system.nodeName)
+ sysimage = self.sysimage.get(session)
+ self.slots.add_where_expr(session, "\"System\" =
'%s'", sysimage.nodeName)
Show replies by date