Author: eallen
Date: 2009-09-30 10:48:45 -0400 (Wed, 30 Sep 2009)
New Revision: 3658
Modified:
mgmt/trunk/cumin/python/cumin/stat.py
Log:
Removed get_args from generic flash chart class
Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py 2009-09-30 14:47:56 UTC (rev 3657)
+++ mgmt/trunk/cumin/python/cumin/stat.py 2009-09-30 14:48:45 UTC (rev 3658)
@@ -103,7 +103,7 @@
self.add_state("86400", "1 day")
class JSDurationSwitch(DurationSwitch):
- def get_click(self, state):
+ def get_click(self, session, state):
return "return changeDuration('%s', this, '%s')" %
(state, self.parent.path)
def get_attributes(self, state):
@@ -568,27 +568,24 @@
return cls.get(id)
class GenericChart(StatFlashChart):
- def get_args(self, session):
- cls = self.parent.cls.get(session).mint_class
- id = self.parent.id.get(session)
- return (cls.get(id),)
-
- def render_width(self, session, *args):
+ def render_width(self, session):
return self.parent.container_width.get(session)
- def render_height(self, session, *args):
+ def render_height(self, session):
return self.parent.container_height.get(session)
- def render_img_href(self, session, object):
- params = self.get_href_params(session, object)
- params.append("width=%i" % self.render_width(session, object))
- params.append("height=%i" % self.render_height(session, object))
+ def render_img_href(self, session):
+ object = self.object
+ params = self.get_href_params(session)
+ params.append("width=%i" % self.render_width(session))
+ params.append("height=%i" % self.render_height(session))
return "%s?" % self.get_chart_name(session) +
";".join(params)
- def render_href(self, session, object):
- params = self.get_href_params(session, object)
- params.append("width=%i" % self.render_width(session, object))
- params.append("height=%i" % self.render_height(session, object))
+ def render_href(self, session):
+ object = self.object
+ params = self.get_href_params(session)
+ params.append("width=%i" % self.render_width(session))
+ params.append("height=%i" % self.render_height(session))
params.append("high=1")
return escape_entity("%s?" % self.get_flash_name(session) +
";".join(params))
Show replies by date