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

Unified Diff: tools/sheriffing/statuspageinfo.js

Issue 1478563002: Delete the sheriffing dashboard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/sheriffing/index.html ('k') | tools/sheriffing/style.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/sheriffing/statuspageinfo.js
diff --git a/tools/sheriffing/statuspageinfo.js b/tools/sheriffing/statuspageinfo.js
deleted file mode 100644
index 2f116824901da385b2db925b39f9964bb2674bb0..0000000000000000000000000000000000000000
--- a/tools/sheriffing/statuspageinfo.js
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-/** Information about a particular status page. */
-function StatusPageInfo(statusPageName, statusPageUrl) {
- this.date = '';
- this.inFlight = 0;
- this.jsonUrl = statusPageUrl + 'current?format=json';
- this.message = '';
- this.name = statusPageName;
- this.state = '';
- this.url = statusPageUrl;
-}
-
-/** Send and parse an asynchronous request to get a repo status JSON. */
-StatusPageInfo.prototype.requestJson = function() {
- if (this.inFlight) return;
-
- this.inFlight++;
- gNumRequestsInFlight++;
-
- var statusPageInfo = this;
- var request = new XMLHttpRequest();
- request.open('GET', this.jsonUrl, true);
- request.onreadystatechange = function() {
- if (request.readyState == 4 && request.status == 200) {
- statusPageInfo.inFlight--;
- gNumRequestsInFlight--;
-
- var statusPageJson = JSON.parse(request.responseText);
- statusPageInfo.date = statusPageJson.date;
- statusPageInfo.message = statusPageJson.message;
- statusPageInfo.state = statusPageJson.general_state;
- }
- };
- request.send(null);
-};
-
-/** Creates HTML displaying the status. */
-StatusPageInfo.prototype.createHtml = function() {
- var linkElement = document.createElement('a');
- linkElement.href = this.url;
- linkElement.innerHTML = this.name;
-
- var statusElement = document.createElement('li');
- statusElement.appendChild(linkElement);
-
- var dateElement = document.createElement('li');
- dateElement.innerHTML = this.date;
-
- var messageElement = document.createElement('li');
- messageElement.innerHTML = this.message;
-
- var boxElement = document.createElement('ul');
- boxElement.className = 'box ' + this.state;
- boxElement.appendChild(statusElement);
- boxElement.appendChild(dateElement);
- boxElement.appendChild(messageElement);
- return boxElement;
-};
« no previous file with comments | « tools/sheriffing/index.html ('k') | tools/sheriffing/style.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698