Mercurial > mozilla > hg > talosnames
view talosnames/templates/index.html @ 58:47d387086ea7
better layout
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 14 Aug 2012 20:25:57 -0700 |
parents | 821e1dc63453 |
children | 4171e8477cdb |
line wrap: on
line source
<html> <head> <title>Talos Names</title> <style> * { font-family: sans-serif; } td.command { font-family: monospace; } table, th, td { border: 1px solid black; } table { border-collapse: collapse; } dt { font-style: italic; font-weight: 550; float: left; clear: left; padding-right: 1em; } dd { clear: right; } dt::after { content: ": "; } .header { font-weight: bold; } .tbpl_initial { font-weight: bold; color: green; } .true { background-color: green; } .false { background-color: red; } .fold { color: blue; } .disabled { background-color: #BBB; } .talosconfig { width: 100%; } #navigation { list-style-type: none; clear: right; } #navigation li { float: left; padding: 0.4em; } td.paint, td.chrome, td.tbpl { text-align: center; } table.talosconfig td { width: 50%; } .thfake { width: 49.5%; border: thin solid black; float: left; } </style> <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> <script> // In order to get anything working with Config.js // We have to stub a bunch of stuff for no reason BuildbotDBUser = null; PushlogJSONParser = null; </script> <script src="http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/raw-file/tip/js/Config.js"></script> <script> $(document).ready(function() { // color paint/chrome boxes appropriately function mark_boolean(selector) { $(selector).each(function() { var text = $(this).text(); if (text == 'True') { $(this).addClass('true'); } else if (text == 'False') { $(this).addClass('false'); } }); } mark_boolean('td.paint'); mark_boolean('td.chrome'); // add TBPL initials to TBPL names from Config.js $('td.tbpl').each(function() { var text = $(this).text(); if (text.length && Config.testNames[text]) { $(this).html(text + '(<span class="tbpl_initial">' + Config.testNames[text] + '</span>)'); } }); // add a hide/unhide button $('div.testname').after('<a class="fold">[+]</a>'); $('dl.testattributes').hide(); $('.fold').click(function() { var text = $(this).text(); if (text == '[+]') { $(this).next('.testattributes').show(); $(this).text('[-]'); } else if (text == '[-]') { $(this).next('.testattributes').hide(); $(this).text('[+]'); } }); }); </script> </head> <body> <ul id="navigation"> <li><a href="/tbpl">TBPL view</a></li> <li>Show: <a href="/?show=active">active</a></li> <li><a href="/?show=disabled">disabled</a></li> <li><a href="/">all</a></li> </ul> <table id="data"> <tr> <th class="buildbot">Buildbot Suite</th> <th class="command">Buildbot PerfConfigurator Command</th> <th class="tbpl">TBPL Name</th> <th class="paint">Paint</th> <th class="chrome">Chrome</th> <th class="tests"><div class="thfake">Talos Config</div><div class="thfake">Graphserver Names</div></th> </tr> {{for suite in suites}} {{if enabled[suite]}} <tr> {{else}} <tr class="disabled"> {{endif}} <td class="buildbot"> <a name="{{suite}}"></a><a class="anchor" href="#{{suite}}">{{suite}}</a> {{if not enabled[suite]}} <i><span>(disabled)</span></i> {{endif}} </td> <td class="command">{{list2cmdline(commands[suite])}}</tt></td> <td class="tbpl">{{tbpl[suite]}}</td> <td class="paint">{{if suite in paint}}<span title="Paint">{{paint[suite]}}</span>{{endif}}</td> <td class="chrome">{{if suite in chrome}}<span title="Chrome">{{chrome[suite]}}</span>{{endif}}</td> <td class="tests"> {{if tests.get(suite)}} <table class="talosconfig"> {{for test in sorted(tests[suite].keys())}} <tr> <td> <i>{{test_type[suite][test]}}</i> <div class="header testname">{{test}}</div> <dl class="testattributes"> {{for attr in sorted(tests.get(suite, {})[test].keys())}} <dt>{{attr}}</dt> <dd>{{tests[suite][test][attr]}}</dd> {{endfor}} </dl> </td> <td> {{if graphserver[suite][test]}} <dl> {{for name, longname in graphserver[suite][test]}} <dt>{{name}}</dt> <dd>{{longname}}</dd> {{endfor}} </dl> {{endif}} </td> </tr> {{endfor}} </table> {{endif}} </td> </tr> {{endfor}} </table> </body> </html>