Permalink
Browse files

Added tree selector. Enlarged viewport. Tweaked graph display.

  • Loading branch information...
1 parent 777b5bd commit 35151e041dd40b70bd7fb89d40cc6ae25920b925 @markrcote markrcote committed Feb 8, 2012
Showing with 39 additions and 12 deletions.
  1. +7 −7 html/css/screen.css
  2. +9 −1 html/index.html
  3. +17 −1 html/js/dashboard.js
  4. +6 −3 server/handlers.py
View
@@ -45,7 +45,7 @@ body{
#wrapper{
margin:30px auto 0px auto;
- width:960px;
+ width:1200px;
}
.floatholder{
float:left;
@@ -66,15 +66,15 @@ body{
}
#floatleft{
background:#e9e9e9;
- width:373px;
+ width:466px;
float:left;
padding-top: 10px;
-moz-border-radius: 15px 0px 0px 15px;
border-radius:15px 0px 0px 15px;
}
#floatright{
background:#f7f7f7;
- width:587px;
+ width:734px;
height:100%;
float:left;
padding-top:10px;
@@ -83,7 +83,7 @@ border-radius:15px 0px 0px 15px;
-moz-border-radius: 0px 15px 15px 0px;
border-radius: 0px 15px 15px 0px;
box-shadow: -1px -1px 3px #555;
- min-height:450px;
+ min-height:650px;
}
h1{
@@ -130,8 +130,8 @@ li a:hover{
width:90%;
}
#container {
- width: 575px;
- height: 440px;
+ width: 722px;
+ height: 640px;
margin:10px auto;
}
#container3{
@@ -143,7 +143,7 @@ li a:hover{
margin: 30px auto;
}
#content-menu{
- margin-left:50px;
+ margin-left:20px;
margin-right:20px;
margin-bottom:20px;
width:100%;
View
@@ -186,9 +186,13 @@ <h2>Testperf Dashboard</h2>
</script>
<script id="rawfennec_leftpanel" type="text/html">
- <div id="contentmenu">
+ <div id="content-menu">
<div class="formholder">
<form id="data-selector">
+ <label>Tree:</label>
+ <select name="product" id="productmenu">
+ </select>
+ <br/>
<label>Test:</label>
<select name="testname" id="testmenu">
</select>
@@ -228,6 +232,10 @@ <h2>Testperf Dashboard</h2>
<input type="checkbox" name="phoneid" value="{{ phoneid }}"> {{ phonename }}</input><br/>
</script>
+<script id="product_option" type="text/html">
+ <option value="{{ productname }}">{{ productdescr }}</option>
+</script>
+
<script id="rawfennec_rightpanel" type="text/html">
<div id="container"></div>
</script>
View
@@ -776,6 +776,12 @@ var phonemap = {
'droid_pro': 'Droid Pro'
};
+var productmap = {
+ 'org.mozilla.fennec': 'Nightly',
+ 'org.mozilla.fennec_aurora': 'Aurora',
+ 'org.mozilla.firefox': 'Beta'
+};
+
function testDescr(testname) {
return (testname in testmap) ? testmap[testname] : testname;
}
@@ -784,6 +790,9 @@ function phoneName(phoneid) {
return (phoneid in phonemap) ? phonemap[phoneid] : phoneid;
}
+function productDescr(productname) {
+ return (productname in productmap) ? productmap[productname] : productname;
+}
function showRawFennecStartupCharts(params) {
$('#container').html(ich.rightpanel_loading());
@@ -820,7 +829,8 @@ function showRawFennecStartupCharts(params) {
points: { show: true },
lines: { show: true }
},
- xaxis: { mode: 'time' },
+ xaxis: { mode: 'time', timeformat: '%b %d',
+ axisLabel: 'build date' },
yaxis: { min: 0, axisLabel: 'time (ms)' },
legend: { position: 'se' }
});
@@ -916,6 +926,12 @@ $(function() {
{ testname: data.tests[i], testdescr: testDescr(data.tests[i]) }
));
}
+ for (i = 0; i < data.products.length; i++) {
+ $('#productmenu').append(ich.product_option(
+ { productname: data.products[i],
+ productdescr: productDescr(data.products[i]) }
+ ));
+ }
});
// Get form request
View
@@ -112,7 +112,9 @@ def GET(self):
'select distinct phoneid from rawfennecstart')]
tests = [x['testname'] for x in db.query(
'select distinct testname from rawfennecstart')]
- return {'phones': phones, 'tests': tests}
+ products = [x['productname'] for x in db.query(
+ 'select distinct productname from rawfennecstart')]
+ return {'phones': phones, 'tests': tests, 'products': products}
class S1S2RawFennecData(object):
@@ -129,6 +131,7 @@ def GET(self):
start = query['start'][0]
end = query['end'][0]
metric = query['metric'][0]
+ product = query['product'][0]
# results[phone][test][metric][blddate] = value
results = defaultdict(lambda: defaultdict(lambda: defaultdict(dict)))
@@ -143,9 +146,9 @@ def GET(self):
data = db.select(
'rawfennecstart',
what=self.metrics[metric] + ',blddate',
- where='phoneid=$phoneid and revision=$revision and testname=$testname and throbberstart>0 and throbberstop>0',
+ where='phoneid=$phoneid and revision=$revision and testname=$testname and productname=$product and throbberstart>0 and throbberstop>0',
vars=dict(phoneid=phoneid, revision=revision,
- testname=testname))[0]
+ testname=testname, product=product))[0]
avg = data[self.metrics[metric]]
blddate = data['blddate']
if avg is None:

0 comments on commit 35151e0

Please sign in to comment.