OLD | NEW |
1 /* | 1 /* |
2 * Loader: | 2 * Loader: |
3 * Reads GM result reports written out by results.py, and imports | 3 * Reads GM result reports written out by results.py, and imports |
4 * them into $scope.categories and $scope.testData . | 4 * them into $scope.categories and $scope.testData . |
5 */ | 5 */ |
6 var Loader = angular.module( | 6 var Loader = angular.module( |
7 'Loader', | 7 'Loader', |
8 [] | 8 [] |
9 ); | 9 ); |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 "', please wait..."; | 38 "', please wait..."; |
39 | 39 |
40 $http.get("/results/" + resultsToLoad).success( | 40 $http.get("/results/" + resultsToLoad).success( |
41 function(data, status, header, config) { | 41 function(data, status, header, config) { |
42 $scope.loadingMessage = "Processing data, please wait..."; | 42 $scope.loadingMessage = "Processing data, please wait..."; |
43 | 43 |
44 $scope.header = data.header; | 44 $scope.header = data.header; |
45 $scope.categories = data.categories; | 45 $scope.categories = data.categories; |
46 $scope.testData = data.testData; | 46 $scope.testData = data.testData; |
47 $scope.sortColumn = 'test'; | 47 $scope.sortColumn = 'test'; |
48 $scope.showTodos = false; | 48 $scope.showTodos = true; |
49 | |
50 » $scope.dispositions = [ | |
51 » 'Unfiled', 'Hidden', 'Pending Approval' | |
52 » ]; | |
53 » $scope.defaultDisposition = $scope.dispositions[0]; | |
54 » $scope.viewingDisposition = $scope.defaultDisposition; | |
55 | 49 |
56 for (var i = 0; i < $scope.testData.length; i++) { | 50 for (var i = 0; i < $scope.testData.length; i++) { |
57 $scope.testData[i].index = i; | 51 $scope.testData[i].index = i; |
58 } | 52 } |
59 | 53 |
60 $scope.hiddenResultTypes = { | 54 $scope.hiddenResultTypes = { |
61 'failure-ignored': true, | 55 'failure-ignored': true, |
62 'no-comparison': true, | 56 'no-comparison': true, |
63 'succeeded': true, | 57 'succeeded': true, |
64 }; | 58 }; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 } | 106 } |
113 $scope.toggleHiddenConfig = function(thisConfig) { | 107 $scope.toggleHiddenConfig = function(thisConfig) { |
114 if (true == $scope.hiddenConfigs[thisConfig]) { | 108 if (true == $scope.hiddenConfigs[thisConfig]) { |
115 delete $scope.hiddenConfigs[thisConfig]; | 109 delete $scope.hiddenConfigs[thisConfig]; |
116 } else { | 110 } else { |
117 $scope.hiddenConfigs[thisConfig] = true; | 111 $scope.hiddenConfigs[thisConfig] = true; |
118 } | 112 } |
119 $scope.areUpdatesPending = true; | 113 $scope.areUpdatesPending = true; |
120 } | 114 } |
121 | 115 |
122 $scope.setViewingDisposition = function(disposition) { | |
123 $scope.viewingDisposition = disposition; | |
124 } | |
125 | |
126 $scope.localTimeString = function(secondsPastEpoch) { | 116 $scope.localTimeString = function(secondsPastEpoch) { |
127 var d = new Date(secondsPastEpoch * 1000); | 117 var d = new Date(secondsPastEpoch * 1000); |
128 return d.toString(); | 118 return d.toString(); |
129 } | 119 } |
130 | 120 |
131 $scope.updateResults = function() { | 121 $scope.updateResults = function() { |
132 $scope.displayLimit = $scope.displayLimitPending; | 122 $scope.displayLimit = $scope.displayLimitPending; |
133 // TODO(epoger): Every time we apply a filter, AngularJS creates | 123 // TODO(epoger): Every time we apply a filter, AngularJS creates |
134 // another copy of the array. Is there a way we can filter out | 124 // another copy of the array. Is there a way we can filter out |
135 // the items as they are displayed, rather than storing multiple | 125 // the items as they are displayed, rather than storing multiple |
(...skipping 11 matching lines...) Expand all Loading... |
147 $scope.imageSize = $scope.imageSizePending; | 137 $scope.imageSize = $scope.imageSizePending; |
148 $scope.areUpdatesPending = false; | 138 $scope.areUpdatesPending = false; |
149 } | 139 } |
150 | 140 |
151 $scope.sortResultsBy = function(sortColumn) { | 141 $scope.sortResultsBy = function(sortColumn) { |
152 $scope.sortColumn = sortColumn; | 142 $scope.sortColumn = sortColumn; |
153 $scope.updateResults(); | 143 $scope.updateResults(); |
154 } | 144 } |
155 } | 145 } |
156 ); | 146 ); |
OLD | NEW |