r5796 - branches/statusquo/cumin/python/cumin/grid
by tmckay@fedoraproject.org
Author: tmckay
Date: 2014-01-15 21:39:19 +0000 (Wed, 15 Jan 2014)
New Revision: 5796
Modified:
branches/statusquo/cumin/python/cumin/grid/job.py
Log:
Merge revision 5795 from trunk.
svn merge -c 5795 svn+ssh://svn.fedorahosted.org/svn/cumin/trunk .
Modified: branches/statusquo/cumin/python/cumin/grid/job.py
===================================================================
--- branches/statusquo/cumin/python/cumin/grid/job.py 2014-01-15 21:37:50 UTC (rev 5795)
+++ branches/statusquo/cumin/python/cumin/grid/job.py 2014-01-15 21:39:19 UTC (rev 5796)
@@ -249,6 +249,19 @@
data = self.do_get_data(values)
return len(data)
+ def sort_rows(self, rows, options):
+ if len(rows) > self.max_sortable_records:
+ return rows
+
+ sort_field = options.sort_field
+ rev = options.sort_ascending == False
+
+ if sort_field.index == 1:
+ # For the submissions table, row[0] is a non-visible numerical job id
+ return sorted(rows, key=lambda row: float(row[0]), reverse=rev)
+
+ return sorted(rows, key=itemgetter(sort_field.index), reverse=rev)
+
class NonSortableObjectTableColumn(ObjectTableColumn):
def __init__(self, app, name, attr):
super(NonSortableObjectTableColumn, self).__init__(app, name, attr)
10 years, 3 months
r5795 - trunk/cumin/python/cumin/grid
by tmckay@fedoraproject.org
Author: tmckay
Date: 2014-01-15 21:37:50 +0000 (Wed, 15 Jan 2014)
New Revision: 5795
Modified:
trunk/cumin/python/cumin/grid/job.py
Log:
Fix job sorting in the case of blah#2.0 and blah#10.0. Order by numeric id
rather than lexical sorting on the name.
BZ1020191
Modified: trunk/cumin/python/cumin/grid/job.py
===================================================================
--- trunk/cumin/python/cumin/grid/job.py 2014-01-15 21:30:29 UTC (rev 5794)
+++ trunk/cumin/python/cumin/grid/job.py 2014-01-15 21:37:50 UTC (rev 5795)
@@ -239,6 +239,19 @@
data = self.do_get_data(values)
return len(data)
+ def sort_rows(self, rows, options):
+ if len(rows) > self.max_sortable_records:
+ return rows
+
+ sort_field = options.sort_field
+ rev = options.sort_ascending == False
+
+ if sort_field.index == 1:
+ # For the submissions table, row[0] is a non-visible numerical job id
+ return sorted(rows, key=lambda row: float(row[0]), reverse=rev)
+
+ return sorted(rows, key=itemgetter(sort_field.index), reverse=rev)
+
class NonSortableObjectTableColumn(ObjectTableColumn):
def __init__(self, app, name, attr):
super(NonSortableObjectTableColumn, self).__init__(app, name, attr)
10 years, 3 months
r5794 - branches/statusquo/cumin/python/cumin/grid
by tmckay@fedoraproject.org
Author: tmckay
Date: 2014-01-15 21:30:29 +0000 (Wed, 15 Jan 2014)
New Revision: 5794
Modified:
branches/statusquo/cumin/python/cumin/grid/dashboard.strings
Log:
Merge revision 5787 from trunk
svn merge -c 5787 svn+ssh://svn.fedorahosted.org/svn/cumin/trunk .
BZ959098
Modified: branches/statusquo/cumin/python/cumin/grid/dashboard.strings
===================================================================
--- branches/statusquo/cumin/python/cumin/grid/dashboard.strings 2014-01-15 21:27:32 UTC (rev 5793)
+++ branches/statusquo/cumin/python/cumin/grid/dashboard.strings 2014-01-15 21:30:29 UTC (rev 5794)
@@ -83,7 +83,7 @@
[DefinitionSet.css]
div.DefinitionSet {
float: left;
- margin-right: 2em;
+ margin-right: 1em;
}
div.DefinitionSet h3 {
10 years, 3 months
r5793 - in branches/statusquo/cumin/python/cumin: . grid
by tmckay@fedoraproject.org
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>
10 years, 3 months