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

Side by Side Diff: appengine/chromium_cq_status/js/patch_status.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
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 patchStatusModule = (function() { 5 var patchStatusModule = (function() {
6 6
7 var attemptStart = 'patch_start'; 7 var attemptStart = 'patch_start';
8 var attemptEnd = 'patch_stop'; 8 var attemptEnd = 'patch_stop';
9 9
10 var container = null; 10 var container = null;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 function main() { 127 function main() {
128 init(); 128 init();
129 container.textContent = 'Loading patch data...'; 129 container.textContent = 'Loading patch data...';
130 loadPatchsetRecords(function(records) { 130 loadPatchsetRecords(function(records) {
131 displayAttempts(records); 131 displayAttempts(records);
132 scrollToHash(); 132 scrollToHash();
133 }); 133 });
134 } 134 }
135 135
136 function loadPatchsetRecords(callback) { 136 function loadPatchsetRecords(callback) {
137 var url = '//chromium-cq-status.appspot.com/query/codereview_hostname=' + 137 var url = '//' + window.location.host + '/query/codereview_hostname=' +
138 codereview_hostname + '/issue=' + issue + '/patchset=' + patchset; 138 codereview_hostname + '/issue=' + issue + '/patchset=' + patchset;
139 var records = []; 139 var records = [];
140 var moreRecords = true; 140 var moreRecords = true;
141 function queryRecords(cursor) { 141 function queryRecords(cursor) {
142 var xhr = new XMLHttpRequest(); 142 var xhr = new XMLHttpRequest();
143 xhr.open('get', url + (cursor ? '?cursor=' + encodeURIComponent(cursor) : '' ), true); 143 xhr.open('get', url + (cursor ? '?cursor=' + encodeURIComponent(cursor) : '' ), true);
144 xhr.onreadystatechange = function() { 144 xhr.onreadystatechange = function() {
145 if (xhr.readyState === XMLHttpRequest.DONE) { 145 if (xhr.readyState === XMLHttpRequest.DONE) {
146 response = JSON.parse(xhr.responseText); 146 response = JSON.parse(xhr.responseText);
147 records = records.concat(response.results); 147 records = records.concat(response.results);
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 } 457 }
458 458
459 return { 459 return {
460 'main': main, 460 'main': main,
461 'init': init, 461 'init': init,
462 'displayAttempts': displayAttempts, 462 'displayAttempts': displayAttempts,
463 'document': currentDocument, 463 'document': currentDocument,
464 }; 464 };
465 465
466 })(); 466 })();
OLDNEW
« no previous file with comments | « appengine/chromium_cq_status/html/recent.html ('k') | appengine/chromium_cq_status/js/recent.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698