changeset 59:8892d6cb7a4d

minor TBPL view improvements
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 14 Aug 2012 21:55:01 -0700
parents 47d387086ea7
children 180ee6745184
files talosnames/templates/tbpl.html
diffstat 1 files changed, 38 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/talosnames/templates/tbpl.html	Tue Aug 14 20:25:57 2012 -0700
+++ b/talosnames/templates/tbpl.html	Tue Aug 14 21:55:01 2012 -0700
@@ -37,6 +37,23 @@
 buildbot_suites[tbpl_name].push(suite);
 }
 
+// order suites by enabled/disabled
+// TODO
+for (var suite in buildbot_suites) {
+var disabled = [];
+var enabled = [];
+for (var index in buildbot_suites[suite]) {
+var suitename = buildbot_suites[suite][index]
+
+if(data.enabled[suitename]) {
+enabled.push(suitename)
+} else {
+disabled.push(suitename)
+}
+
+}
+}
+
 $(".letter").each(function() {
 var text = $(this).text()
 if (text.length && reverse_mapping[text]) {
@@ -56,7 +73,14 @@
 if (bbsuite) {
 html += '<div class="buildbot">';
 for (var suite in bbsuite) {
-html += '<h2>' + bbsuite[suite] + '</h2>';
+var enabled = data.enabled[bbsuite[suite]];
+var classes = 'buildbotsuite';
+if (!enabled) {
+classes += ' disabled';
+}
+html += '<div class="' + classes + '">';
+html += '<h2 title="buildbot suite name">' + bbsuite[suite] + '</h2>';
+html += '</div>'
 }
 html += '</div>';
 
@@ -98,6 +122,19 @@
 
 }
 
+#navigation {
+list-style-type: none;
+clear: right;
+}
+
+#navigation li {
+float: left;
+padding: 0.4em;
+}
+
+.disabled {
+background-color: #BBB;
+}
 </style>
 
 </head>