Author: tmckay
Date: 2014-01-15 21:27:32 +0000 (Wed, 15 Jan 2014)
New Revision: 5793
Modified:
branches/statusquo/cumin/python/cumin/grid/dashboard.py
branches/statusquo/cumin/python/cumin/stat.py
branches/statusquo/cumin/python/cumin/stat.strings
Log:
Merge revision 5736 from trunk
svn merge -c 5736
svn+ssh://svn.fedorahosted.org/svn/cumin/trunk .
BZ911503
Modified: branches/statusquo/cumin/python/cumin/grid/dashboard.py
===================================================================
--- branches/statusquo/cumin/python/cumin/grid/dashboard.py 2013-12-20 16:45:58 UTC (rev
5792)
+++ branches/statusquo/cumin/python/cumin/grid/dashboard.py 2014-01-15 21:27:32 UTC (rev
5793)
@@ -841,6 +841,8 @@
chart = self.ThroughputChart(app, "timeseries",
throughput_stats.negotiator)
chart.duration.param.default = "3600"
chart.stats = self.attrs[:-1]
+ chart.width = 350
+ chart.container_width = 28
self.add_child(chart)
class ThroughputChart(StatFlashChart):
Modified: branches/statusquo/cumin/python/cumin/stat.py
===================================================================
--- branches/statusquo/cumin/python/cumin/stat.py 2013-12-20 16:45:58 UTC (rev 5792)
+++ branches/statusquo/cumin/python/cumin/stat.py 2014-01-15 21:27:32 UTC (rev 5793)
@@ -146,6 +146,9 @@
self.chart_type = None
self.title = None
self.colors = None
+ self.height = 150
+ self.width = 400
+ self.container_width = 33 #em not px
self.stats_tmpl = WidgetTemplate(self, "stat_html")
@@ -209,10 +212,13 @@
return getattr(cls, self.stats[0]).title
def render_width(self, session):
- return 360
+ return "%spx" % self.width
def render_height(self, session):
- return 100
+ return "%spx" % self.height
+
+ def render_container_width(self, session):
+ return "%sem" % self.container_width
class ReportingStatValueChart(StatValueChart):
def __init__(self, app, name, cls):
@@ -282,12 +288,6 @@
params = self.get_href_params(session)
return escape_entity("flashpage.html?" + ";".join(params))
- def render_width(self, session):
- return 360
-
- def render_height(self, session):
- return 120
-
def render_id_nodots(self, session):
return self.render_id(session).replace(".", "_")
@@ -313,10 +313,10 @@
return escape_entity("flashpage.html?" + ";".join(params))
def render_width(self, session):
- return 360
+ return "%spx" % self.width
def render_height(self, session):
- return 120
+ return "%spx" % self.height
def render_id_nodots(self, session):
return self.render_id(session).replace(".", "_")
Modified: branches/statusquo/cumin/python/cumin/stat.strings
===================================================================
--- branches/statusquo/cumin/python/cumin/stat.strings 2013-12-20 16:45:58 UTC (rev 5792)
+++ branches/statusquo/cumin/python/cumin/stat.strings 2014-01-15 21:27:32 UTC (rev 5793)
@@ -141,7 +141,6 @@
font-size: 0.9em;
margin: 0 0 1.5em 0;
position: relative;
- width: 33em;
}
div.StatValueChart div.duration {
@@ -300,7 +299,7 @@
[StatValueChart.html]
<div>
-<div class="StatValueChart{fullpageable}" id="{id}">
+<div class="StatValueChart{fullpageable}" id="{id}"
style="width:{container_width}">
<h2>{title}</h2>
<div class="duration">{duration}</div>
@@ -325,14 +324,14 @@
[StatFlashChart.html]
<div>
- <div class="StatValueChart{fullpageable}" id="{id}">
+ <div class="StatValueChart{fullpageable}" id="{id}"
style="width:{container_width}">
<h2>{title}</h2>
<div class="duration"
style="float:left;">{duration}</div>
<div style="clear:both;"></div>
<div>
<!-- don't put this data url inside the holder div, jqplot will kill it
on a zoom -->
<a rel="api" type="application/json"
href="{href}" style="display:none">Data</a>
- <div id="{id_nodots}_chart" class="jqplotgraph leftlegend"
style="height:150px;width:400px;">
+ <div id="{id_nodots}_chart" class="jqplotgraph leftlegend"
style="height:{height};width:{width};">
<div class="loading"
style="display:none;"><span>Loading...</span></div>
</div>
</div>
@@ -349,7 +348,7 @@
<div>
<!-- don't put this data url inside the holder div, jqplot will kill it
on a zoom -->
<a rel="api" type="application/json"
href="{href}" style="display:none">Data</a>
- <div id="{id_nodots}_chart" class="jqplotgraph leftlegend"
style="height:150px;width:400px;">
+ <div id="{id_nodots}_chart" class="jqplotgraph leftlegend"
style="height:{height};width:{width};">
<div class="loading"
style="display:none;"><span>Loading...</span></div>
</div>
</div>