Bug 764883 - Link to pending/running graphs (and not just table list) from infrastructure menu; r=philor
authorEd Morley <emorley@mozilla.com>
Mon, 14 Jan 2013 12:19:38 +0000
changeset 991 1c6ee7b76fed600a3a6c395bdc57a11163929271
parent 990 7d8a44fd3cbec749fcf17e16faf8c6dd88defa27
child 992 eabeafc240bb2e08decbca09e568767fe008eb9e
push id573
push useremorley@mozilla.com
push dateMon, 14 Jan 2013 12:20:25 +0000
reviewersphilor
bugs764883
Bug 764883 - Link to pending/running graphs (and not just table list) from infrastructure menu; r=philor
css/style.css
js/Config.js
js/UserInterface.js
--- a/css/style.css
+++ b/css/style.css
@@ -105,16 +105,17 @@ html {
 #shortcuts dd {
   margin-left: 10em;
 }
 #treeInfo dd {
   margin-left: 6em;
 }
 #infrastructure dd {
   margin-left: 10em;
+  text-align: center;
 }
 #tree-status {
   margin-left: 120px;
 }
 #treestatus {
   font-weight: bold;
 }
 .loading {
--- a/js/Config.js
+++ b/js/Config.js
@@ -16,16 +16,17 @@ var Config = {
   // this, set serverBaseURL to the location of the TBPL backend, eg:
   // https://tbpl.mozilla.org/
   serverBaseURL: "",
   prodBaseURL: "https://tbpl.mozilla.org/", // used for log links in tbplbot bugzilla comments
   mercurialURL: "https://hg.mozilla.org/",
   buildjsonURL: "https://secure.pub.build.mozilla.org/builddata/buildjson/",
   buildapiURL: "https://secure.pub.build.mozilla.org/buildapi/",
   selfServeURL: "https://secure.pub.build.mozilla.org/buildapi/self-serve/",
+  buildGraphsURL: "http://builddata.pub.build.mozilla.org/reports/pending/",
   treeStatusURL: "https://treestatus.mozilla.org/",
   alternateTinderboxPushlogURL: "http://build.mozillamessaging.com/tinderboxpushlog/?tree=",
   alternateTinderboxPushlogName: "Mozilla Messaging",
   wooBugURL: "https://tbpl.mozilla.org/php/starcomment.php", // war-on-orange database
   mcMergeURL: "http://www.graememcc.co.uk/m-cmerge/",
   // treeInfo gives details about the trees and repositories. There are various
   // items that can be specified:
   //
--- a/js/UserInterface.js
+++ b/js/UserInterface.js
@@ -245,20 +245,22 @@ var UserInterface = {
       var currentPushNode = allPushNodes.eq(i);
       if (+currentPushNode.attr("data-id") < push.id)
         return currentPushNode;
     }
     return $("#goBackLi");
   },
 
   handleInfraStatsUpdate: function UserInterface_handleInfraStatsUpdate(infraStats) {
-    var html = '<dt>Branch</dt><dd><a href="' +
-      Config.buildapiURL + 'pending">pending</a>' +
-      ' / <a href="' + Config.buildapiURL +
-      'running">running</a></dd>';
+    var html = '<dt>Branch</dt><dd>' +
+      '<a href="' + Config.buildapiURL + 'pending">pending</a>' +
+      ' (<a href="' + Config.buildGraphsURL + 'pending.html">graph</a>)' +
+      ' / <a href="' + Config.buildapiURL + 'running">running</a>' +
+      ' (<a href="' + Config.buildGraphsURL + 'running.html">graph</a>)' +
+      '</dd>';
     var total = {pending: 0, running: 0};
     for (var branch in infraStats) {
       html += "<dt>" + branch.escapeContent() + "</dt><dd>" + infraStats[branch].pending + " / " + infraStats[branch].running + "</dd>";
       total.pending += infraStats[branch].pending;
       total.running += infraStats[branch].running;
     }
     html += "<dt>Total</dt><dd>" + total.pending + " / " + total.running + "</dd>";
     $("#infrastructure").html(html);