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

Side by Side Diff: appengine/chromium_cq_status/js/stats_viewer.js

Issue 2111713004: Teach CQ status app to check login status of users. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Review and tests. Created 4 years, 5 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 | « appengine/chromium_cq_status/js/recent.js ('k') | appengine/chromium_cq_status/main.py » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var statsViewerModule = (function(){ 5 var statsViewerModule = (function(){
6 6
7 var container = null; 7 var container = null;
8 var indexDiv = null; 8 var indexDiv = null;
9 // Provide access to imported DOM in tests. 9 // Provide access to imported DOM in tests.
10 // In production, currentDocument == document. 10 // In production, currentDocument == document.
(...skipping 19 matching lines...) Expand all
30 function main() { 30 function main() {
31 loadCQStatsList(displayStats); 31 loadCQStatsList(displayStats);
32 } 32 }
33 33
34 function displayStats(cqStatsList) { 34 function displayStats(cqStatsList) {
35 container.textContent = ''; 35 container.textContent = '';
36 drawGraphs(buildGraphs(cqStatsList)); 36 drawGraphs(buildGraphs(cqStatsList));
37 } 37 }
38 38
39 function loadCQStatsList(callback) { 39 function loadCQStatsList(callback) {
40 var url = '//chromium-cq-status.appspot.com/stats/query?project=' + project + '&interval_minutes=' + intervalMinutes; 40 var url = '//' + window.location.host + '/stats/query?project=' + project +
41 '&interval_minutes=' + intervalMinutes;
41 var cqStatsList = []; 42 var cqStatsList = [];
42 var defaultCount = null; 43 var defaultCount = null;
43 function queryCQStatsList(cursor) { 44 function queryCQStatsList(cursor) {
44 var queryURL = url; 45 var queryURL = url;
45 if (cursor !== null) { 46 if (cursor !== null) {
46 queryURL += '&cursor=' + encodeURIComponent(cursor); 47 queryURL += '&cursor=' + encodeURIComponent(cursor);
47 } 48 }
48 if (defaultCount !== null) { 49 if (defaultCount !== null) {
49 queryURL += '&count=' + Math.min(defaultCount, dataPoints - cqStatsList.le ngth); 50 queryURL += '&count=' + Math.min(defaultCount, dataPoints - cqStatsList.le ngth);
50 } 51 }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 212 }
212 213
213 return { 214 return {
214 'main': main, 215 'main': main,
215 'init': init, 216 'init': init,
216 'displayStats': displayStats, 217 'displayStats': displayStats,
217 'document': currentDocument, 218 'document': currentDocument,
218 }; 219 };
219 220
220 })(); 221 })();
OLDNEW
« no previous file with comments | « appengine/chromium_cq_status/js/recent.js ('k') | appengine/chromium_cq_status/main.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698