Skip to content

Commit

Permalink
Remove the pretty-printed log
Browse files Browse the repository at this point in the history
It didn't work anymore due to the removal of nix-log2xml. And in any
case XSL is the work of the devil.
  • Loading branch information
edolstra committed Oct 27, 2016
1 parent 41a020e commit 2b790ce
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 183 deletions.
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ AC_CONFIG_FILES([
src/hydra-eval-jobs/Makefile
src/hydra-queue-runner/Makefile
src/sql/Makefile
src/xsl/Makefile
src/ttf/Makefile
src/lib/Makefile
src/root/Makefile
Expand Down
2 changes: 1 addition & 1 deletion release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ rec {
];

hydraPath = lib.makeBinPath (
[ libxslt sqlite subversion openssh nix coreutils findutils pixz
[ sqlite subversion openssh nix coreutils findutils pixz
gzip bzip2 lzma gnutar unzip git gitAndTools.topGit mercurial darcs gnused bazaar
] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] );

Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SUBDIRS = hydra-evaluator hydra-eval-jobs hydra-queue-runner sql script lib root xsl ttf
SUBDIRS = hydra-evaluator hydra-eval-jobs hydra-queue-runner sql script lib root ttf
BOOTCLEAN_SUBDIRS = $(SUBDIRS)
DIST_SUBDIRS = $(SUBDIRS)
7 changes: 1 addition & 6 deletions src/lib/Hydra/Controller/Build.pm
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,14 @@ sub showLog {
|| $size < 64 * 1024 * 1024;

if ($mode eq "pretty") {
# !!! quick hack
my $pipeline = ($logPath =~ /.bz2$/ ? "bzip2 -d < $logPath" : "cat $logPath")
. " | nix-log2xml | xsltproc " . $c->path_to("xsl/mark-errors.xsl") . " -"
. " | xsltproc " . $c->path_to("xsl/log2html.xsl") . " -";
$c->stash->{template} = 'log.tt';
$c->stash->{logtext} = decode("utf-8", `ulimit -t 5 ; $pipeline`);
$c->stash->{logtext} = logContents($logPath);
}

elsif ($mode eq "raw") {
$c->stash->{logPath} = $logPath;
$c->stash->{finished} = $finished;
$c->forward('Hydra::View::NixLog');
return;
}

elsif ($mode eq "tail-reload") {
Expand Down
8 changes: 3 additions & 5 deletions src/root/log.tt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
[% END %]
</p>

<hr />

<div class="buildlog">
[% logtext %]
</div>
<pre class="taillog" id="contents">
[% HTML.escape(logtext) %]
</pre>

[% END %]
4 changes: 2 additions & 2 deletions src/root/plain-reload.tt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[% WRAPPER layout.tt title=title %]
[% WRAPPER layout.tt title="Log of " _ (step ? " step $step.stepnr of " : "") _ "build ${build.id} of job $build.project.name:$build.jobset.name:$build.job.name" %]
[% PROCESS common.tt %]

[% project = build.project %]
[% jobset = build.jobset %]
[% job = build.job %]

<h2>Last 50 log lines of [% INCLUDE renderFullJobNameOfBuild %] build <a href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a>[%IF step %] step [% step.stepnr %][% END %]</h2>
<p>Below are the last 50 log lines. The <a href="[% c.uri_for('/build' build.id 'log') %]">full log</a> is also available.</p>

[% IF reload %]
<script>
Expand Down
4 changes: 1 addition & 3 deletions src/root/static/css/hydra.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,8 @@ span.keep-whitespace {
max-width: none; /* don't apply responsive design to status images */
}

pre.taillog {
pre.log, pre.taillog {
line-height: 1.2em;
max-height: 60em;
overflow: hidden;
}

div.flot-tooltip {
Expand Down
50 changes: 0 additions & 50 deletions src/root/static/css/logfile.css

This file was deleted.

4 changes: 0 additions & 4 deletions src/xsl/Makefile.am

This file was deleted.

81 changes: 0 additions & 81 deletions src/xsl/log2html.xsl

This file was deleted.

29 changes: 0 additions & 29 deletions src/xsl/mark-errors.xsl

This file was deleted.

0 comments on commit 2b790ce

Please sign in to comment.