This commit is contained in:
Hannes Verschore 2015-03-30 08:36:44 -07:00
Родитель 2c0dc38913
Коммит 92c4e2fa8e
8 изменённых файлов: 146 добавлений и 15 удалений

Просмотреть файл

@ -0,0 +1,28 @@
<?php
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
require_once("../internals.php");
init_database();
if (!has_permissions())
die();
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
$regression_id = (int)$request->regression_id;
$status = mysql_real_escape_string($request->status);
$name = mysql_real_escape_string($request->name);
$query = mysql_query("UPDATE awfy_regression SET status = '$status' WHERE id = $regression_id
") or die(mysql_error());
$extra = "Changed status to ".$status;
$query = mysql_query("INSERT INTO awfy_regression_status
(regression_id, name, extra, stamp)
VALUES
('$regression_id', '$name', '$extra', UNIX_TIMESTAMP())
") or die(mysql_error());

Просмотреть файл

@ -326,6 +326,9 @@ html, body {
margin-right: 6px;
float: right;
cursor: pointer; }
.regression .range iframe {
width: 100%;
height: 750px; }
.box .regression .percent {
float: right;

Просмотреть файл

@ -20,6 +20,17 @@ awfyApp.config(['$routeProvider',
}
]);
awfyApp.config(['$sceDelegateProvider',
function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
'self',
'https://chromium.googlesource.com/v8/v8/+log/**',
'http://hg.mozilla.org/**',
'http://trac.webkit.org/log/**'
]);
}
]);
awfyApp.factory('MasterService', function() {
return AWFYMaster;
});

Просмотреть файл

@ -153,6 +153,7 @@ awfyCtrl.service('RegressionService', ["MasterService",
this.normalize = function(regression) {
regression["machine_id"] = regression["machine"]
regression["machine"] = master["machines"][regression["machine"]]["description"]
regression["mode_id"] = regression["mode"]
regression["mode"] = master["modes"][regression["mode"]]["name"]
regression["stamp"] = regression["stamp"] * 1000
@ -179,6 +180,12 @@ awfyCtrl.service('RegressionService', ["MasterService",
}
regression["prev_cset"] = prev_cset
var vendor_id = master["modes"][regression["mode_id"]]["vendor_id"]
var range_url = master["vendors"][vendor_id]["rangeURL"]
range_url = range_url.replace('{from}', prev_cset);
range_url = range_url.replace('{to}', regression["cset"]);
regression["range_url"] = range_url
}
return regression;
}

Просмотреть файл

@ -59,22 +59,30 @@
</tr>
</table>
</div>
<div>
<div class='box'>
<div class='header'>
Detected regressions/improvements
</div>
<div class='content'>
<div ng-repeat="score in regression.scores | orderBy:'suiteversion + suitetest'" ng-click="showRegression(regression, score, 7)" class='regression'>
<div class='suite'>{{score.suiteversion}}<span ng-if="score.suitetest">:
{{score.suitetest}}</span>
</div>
<div class='percent' ng-class="(score.regression) ? 'regression' : 'improvement'">
{{score.percent}} %
</div>
<div class='score'>{{score.prev_score}} to {{score.score}}</div>
</div>
<div class='box'>
<div class='header'>
Detected regressions/improvements
</div>
<div class='content'>
<div ng-repeat="score in regression.scores | orderBy:'suiteversion + suitetest'" ng-click="showRegression(regression, score, 7)" class='regression'>
<div class='suite'>{{score.suiteversion}}<span ng-if="score.suitetest">:
{{score.suitetest}}</span>
</div>
<div class='percent' ng-class="(score.regression) ? 'regression' : 'improvement'">
{{score.percent}} %
</div>
<div class='score'>{{score.prev_score}} to {{score.score}}</div>
</div>
</div>
</div>
<div class='box range'>
<div class='header'>
Regression range:
</div>
<div class='content'>
<iframe ng-src='{{regression.range_url}}'></iframe>
</div>
</div>
</div>

Просмотреть файл

@ -0,0 +1,5 @@
@import "modal/main";
@import "pages/main";
@import "regression";

Просмотреть файл

@ -0,0 +1,29 @@
.box .regression {
.percent {
float: right;
font-size: 1.4em;
margin-top: -0.2em;
}
.regression {
color: $_red;
}
.improvement {
color: $_green;
}
.suite {
float: left;
position: absolute;
}
.score {
text-align: center;
height: 1.5em;
}
}

Просмотреть файл

@ -0,0 +1,40 @@
.details table {
width: 900px;
border: 1px SOLID get($_box, border);
background-color: get($_box, header);
color: get($_box, color);
padding: $unit;
float: left;
margin-right: 2%;
margin-bottom: $unit*5;
td {
background-color: get($_box, bg);
padding: $unit;
}
th {
text-align: left;
}
.status td {
text-transform: uppercase;
}
.edit {
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
margin-left: $unit;
margin-right: $unit;
float:right;
cursor:pointer;
}
}
.range {
iframe {
width: 100%;
height: 750px;
}
}