aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/rebaseline_server/static
diff options
context:
space:
mode:
authorGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-11 18:45:33 +0000
committerGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-11 18:45:33 +0000
commitdcb4e65998913bfb2cc7e331ffacf0965bdee0ea (patch)
tree4859288325e9fd9535cae1cbb3726fd8775b99a7 /gm/rebaseline_server/static
parent8ec502b41693bf39436fc4277535df7479ee12dc (diff)
rebaseline_server: allow client to pull all results, or just failures
(SkipBuildbotRuns) This will be handy for constrained networks or devices, where we don't want to bother downloading info about all the successful tests. R=jcgregorio@google.com Review URL: https://codereview.chromium.org/26891003 git-svn-id: http://skia.googlecode.com/svn/trunk@11737 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/rebaseline_server/static')
-rw-r--r--gm/rebaseline_server/static/loader.js28
-rw-r--r--gm/rebaseline_server/static/view.html10
2 files changed, 27 insertions, 11 deletions
diff --git a/gm/rebaseline_server/static/loader.js b/gm/rebaseline_server/static/loader.js
index c8606cce87..46d28fca9c 100644
--- a/gm/rebaseline_server/static/loader.js
+++ b/gm/rebaseline_server/static/loader.js
@@ -31,14 +31,24 @@ Loader.filter(
Loader.controller(
'Loader.Controller',
- function($scope, $http, $filter) {
- $http.get("/results/all").then(
- function(response) {
- $scope.header = response.data.header;
- $scope.categories = response.data.categories;
- $scope.testData = response.data.testData;
+ function($scope, $http, $filter, $location) {
+ var resultsToLoad = $location.search().resultsToLoad;
+ $scope.loadingMessage = "Loading results of type '" + resultsToLoad +
+ "', please wait...";
+
+ $http.get("/results/" + resultsToLoad).success(
+ function(data, status, header, config) {
+ $scope.loadingMessage = "Processing data, please wait...";
+
+ $scope.header = data.header;
+ $scope.categories = data.categories;
+ $scope.testData = data.testData;
$scope.sortColumn = 'test';
+ for (var i = 0; i < $scope.testData.length; i++) {
+ $scope.testData[i].index = i;
+ }
+
$scope.hiddenResultTypes = {
'failure-ignored': true,
'no-comparison': true,
@@ -48,6 +58,12 @@ Loader.controller(
$scope.selectedItems = {};
$scope.updateResults();
+ $scope.loadingMessage = "";
+ }
+ ).error(
+ function(data, status, header, config) {
+ $scope.loadingMessage = "Failed to load results of type '"
+ + resultsToLoad + "'";
}
);
diff --git a/gm/rebaseline_server/static/view.html b/gm/rebaseline_server/static/view.html
index c317b91146..0451b6519e 100644
--- a/gm/rebaseline_server/static/view.html
+++ b/gm/rebaseline_server/static/view.html
@@ -14,8 +14,8 @@
<!-- TODO(epoger): Add some indication of how old the
expected/actual data is -->
- <em ng-hide="categories">
- Loading data, please wait...
+ <em>
+ {{loadingMessage}}
</em>
<div ng-hide="!categories">
@@ -143,13 +143,13 @@
<td>{{result.test}}</td>
<td>{{result.config}}</td>
<td>
- <a target="_blank" href="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.expectedHashType}}/{{result.test}}/{{result.expectedHashDigest}}.png">
+ <a target="_blank" href="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.expectedHashType}}/{{result.test}}/{{result.expectedHashDigest}}.png">
<img width="{{imageSize}}" src="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.expectedHashType}}/{{result.test}}/{{result.expectedHashDigest}}.png"/>
</a>
</td>
<td>
- <a target="_blank" href="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.actualHashType}}/{{result.test}}/{{result.actualHashDigest}}.png">
- <img width="{{imageSize}}" src="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.actualHashType}}/{{result.test}}/{{result.actualHashDigest}}.png"/>
+ <a target="_blank" href="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.actualHashType}}/{{result.test}}/{{result.actualHashDigest}}.png">
+ <img width="{{imageSize}}" src="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.actualHashType}}/{{result.test}}/{{result.actualHashDigest}}.png"/>
</a>
</td>
<td ng-hide="!header.isEditable">