* Pretty-print the logs.
This commit is contained in:
@ -14,9 +14,11 @@
|
||||
|
||||
<head>
|
||||
<title>[% title %]</title>
|
||||
<link rel="stylesheet" href="/hydra.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/static/css/hydra.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/static/css/logfile.css" type="text/css" />
|
||||
<script type="text/javascript" src="/static/js/jquery-pack.js"></script>
|
||||
<script type="text/javascript" src="/static/js/tablesorter/jquery.tablesorter.js"></script>
|
||||
<script type="text/javascript" src="/static/js/treebits.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("table.tablesorter").tablesorter();
|
||||
|
@ -3,8 +3,8 @@
|
||||
<h1>Build log [% IF step %] of step [% step.stepnr %] [% ELSE %]<tt>[% log.logphase %]</tt>[% END %] of build ID [% id %]</h1>
|
||||
|
||||
<!-- !!! escaping -->
|
||||
<pre class="buildlog">
|
||||
<div class="buildlog">
|
||||
[% logtext -%]
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
[% END %]
|
||||
|
@ -159,6 +159,11 @@ pre.buildlog {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
div.buildlog {
|
||||
border: 1px solid black;
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
ul.productList {
|
||||
list-style: none;
|
||||
padding-left: 1em;
|
84
src/HydraFrontend/root/static/css/logfile.css
Normal file
84
src/HydraFrontend/root/static/css/logfile.css
Normal file
@ -0,0 +1,84 @@
|
||||
ul.nesting, ul.toplevel {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul.toplevel {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.line, .head {
|
||||
padding-top: 0em;
|
||||
}
|
||||
|
||||
ul.nesting li.line, ul.nesting li.lastline {
|
||||
position: relative;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
ul.nesting li.line {
|
||||
padding-left: 2.0em;
|
||||
}
|
||||
|
||||
ul.nesting li.lastline {
|
||||
padding-left: 2.1em; // for the 0.1em border-left in .lastline > .lineconn
|
||||
}
|
||||
|
||||
li.line {
|
||||
border-left: 0.1em solid #6185a0;
|
||||
}
|
||||
|
||||
li.line > span.lineconn, li.lastline > span.lineconn {
|
||||
position: absolute;
|
||||
height: 0.65em;
|
||||
left: 0em;
|
||||
width: 1.5em;
|
||||
border-bottom: 0.1em solid #6185a0;
|
||||
}
|
||||
|
||||
li.lastline > span.lineconn {
|
||||
border-left: 0.1em solid #6185a0;
|
||||
}
|
||||
|
||||
|
||||
em.storeref {
|
||||
color: #500000;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
em.storeref:hover {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
*.popup {
|
||||
display: none;
|
||||
/* background: url('http://losser.st-lab.cs.uu.nl/~mbravenb/menuback.png') repeat; */
|
||||
background: #ffffcd;
|
||||
border: solid #555555 1px;
|
||||
position: absolute;
|
||||
top: 0em;
|
||||
left: 0em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
em.storeref:hover span.popup {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
|
||||
.toggle {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.showTree, .hideTree {
|
||||
font-family: monospace;
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #ff0000;
|
||||
font-weight: bold;
|
||||
}
|
50
src/HydraFrontend/root/static/js/treebits.js
Normal file
50
src/HydraFrontend/root/static/js/treebits.js
Normal file
@ -0,0 +1,50 @@
|
||||
/* Acknowledgement: this is based on the Wikipedia table-of-contents
|
||||
* toggle. */
|
||||
|
||||
|
||||
var idCounter = 0;
|
||||
|
||||
|
||||
function showTreeToggle(isHidden) {
|
||||
if (document.getElementById) {
|
||||
var id = "toggle_" + idCounter;
|
||||
document.writeln(
|
||||
'<a href="javascript:toggleTree(\'' + id + '\')" class="toggle" id="' + id + '">' +
|
||||
'<span class="showTree" ' + (isHidden ? '' : 'style="display: none;"') + '>+</span>' +
|
||||
'<span class="hideTree" ' + (isHidden ? 'style="display: none;"' : '') + '>-</span>' +
|
||||
'</a>');
|
||||
idCounter = idCounter + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function toggleTree(id) {
|
||||
|
||||
var href = document.getElementById(id);
|
||||
|
||||
var node = href;
|
||||
var tree = null;
|
||||
while (node != null) {
|
||||
if (node.className == "nesting") tree = node;
|
||||
node = node.nextSibling;
|
||||
}
|
||||
|
||||
node = href.firstChild;
|
||||
var hideTree = null;
|
||||
var showTree = null;
|
||||
while (node != null) {
|
||||
if (node.className == "showTree") showTree = node;
|
||||
else if (node.className == "hideTree") hideTree = node;
|
||||
node = node.nextSibling;
|
||||
}
|
||||
|
||||
if (tree.style.display == 'none') {
|
||||
tree.style.display = '';
|
||||
hideTree.style.display = '';
|
||||
showTree.style.display = 'none';
|
||||
} else {
|
||||
tree.style.display = 'none';
|
||||
hideTree.style.display = 'none';
|
||||
showTree.style.display = '';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user