Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(521)

Side by Side Diff: appengine_apps/test_results/static-dashboards/ui.js

Issue 498083002: Make flakiness dashboard links to googlesource work post git migration. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@deployable
Patch Set: move test to the right location Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | appengine_apps/test_results/static-dashboards/ui_unittests.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (C) 2013 Google Inc. All rights reserved. 1 // Copyright (C) 2013 Google Inc. All rights reserved.
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer 10 // copyright notice, this list of conditions and the following disclaimer
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 var isSelected = currentFileName == fileName; 168 var isSelected = currentFileName == fileName;
169 var onClick = 'ui.html._loadDashboard(\'' + fileName + '\')'; 169 var onClick = 'ui.html._loadDashboard(\'' + fileName + '\')';
170 return ui.html._topLink(html, onClick, isSelected); 170 return ui.html._topLink(html, onClick, isSelected);
171 } 171 }
172 172
173 ui.html._revisionLink = function(resultsKey, testResults, index) 173 ui.html._revisionLink = function(resultsKey, testResults, index)
174 { 174 {
175 var currentRevision = parseInt(testResults[resultsKey][index], 10); 175 var currentRevision = parseInt(testResults[resultsKey][index], 10);
176 var previousRevision = parseInt(testResults[resultsKey][index + 1], 10); 176 var previousRevision = parseInt(testResults[resultsKey][index + 1], 10);
177 177
178 // TODO(ojan): chromium/src is the only repository supported by crrev.com.
179 // Once blink is supported, send all code down the isChrome codepath.
178 var isChrome = resultsKey == results.CHROME_REVISIONS; 180 var isChrome = resultsKey == results.CHROME_REVISIONS;
179 var singleUrl = 'http://src.chromium.org/viewvc/' + (isChrome ? 'chrome' : ' blink') + '?view=rev&revision=' + currentRevision; 181
182 var singleUrl;
183 if (isChrome)
184 singleUrl = 'https://crrev.com/' + currentRevision;
185 else
186 singleUrl = 'http://src.chromium.org/viewvc/blink?view=rev&revision=' + currentRevision;
180 187
181 if (currentRevision == previousRevision) 188 if (currentRevision == previousRevision)
182 return 'At <a href="' + singleUrl + '">r' + currentRevision + '</a>'; 189 return 'At <a href="' + singleUrl + '">r' + currentRevision + '</a>';
183 190
184 if (currentRevision - previousRevision == 1) 191 if (currentRevision - previousRevision == 1)
185 return '<a href="' + singleUrl + '">r' + currentRevision + '</a>'; 192 return '<a href="' + singleUrl + '">r' + currentRevision + '</a>';
186 193
187 var rangeUrl = 'http://build.chromium.org/f/chromium/perf/dashboard/ui/chang elog' + 194 var rangeUrl;
188 (isChrome ? '' : '_blink') + '.html?url=/trunk' + (isChrome ? '/src' : ' ') + 195 if (isChrome) {
189 '&range=' + (previousRevision + 1) + ':' + currentRevision + '&mode=html '; 196 // Intentionally do not increment previous revision. This rev works the
197 // way gitiles does (exclude the start of the range) instead of the way
198 // the perf dashboard below does.
199 rangeUrl = '../../revision_range?start=' + previousRevision + '&end=' + currentRevision;
200 } else {
201 rangeUrl = 'http://build.chromium.org/f/chromium/perf/dashboard/ui/chang elog_blink.html?url=/trunk' +
202 '&range=' + (previousRevision + 1) + ':' + currentRevision + '&mode= html';
203 }
204
190 return '<a href="' + rangeUrl + '">r' + (previousRevision + 1) + ' to r' + c urrentRevision + '</a>'; 205 return '<a href="' + rangeUrl + '">r' + (previousRevision + 1) + ' to r' + c urrentRevision + '</a>';
191 } 206 }
192 207
193 ui.html.chromiumRevisionLink = function(testResults, index) 208 ui.html.chromiumRevisionLink = function(testResults, index)
194 { 209 {
195 return ui.html._revisionLink(results.CHROME_REVISIONS, testResults, index); 210 return ui.html._revisionLink(results.CHROME_REVISIONS, testResults, index);
196 } 211 }
197 212
198 ui.html.blinkRevisionLink = function(testResults, index) 213 ui.html.blinkRevisionLink = function(testResults, index)
199 { 214 {
(...skipping 24 matching lines...) Expand all
224 { 239 {
225 this._messages += message + '<br>'; 240 this._messages += message + '<br>';
226 }, 241 },
227 hasErrors: function() 242 hasErrors: function()
228 { 243 {
229 return !!this._messages; 244 return !!this._messages;
230 } 245 }
231 } 246 }
232 247
233 })(); 248 })();
OLDNEW
« no previous file with comments | « no previous file | appengine_apps/test_results/static-dashboards/ui_unittests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698