From d37c4cfe862480202eb18496a3d01e4b18038bb9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 29 Nov 2011 20:15:42 +0100 Subject: [PATCH] Remove unnecessary whitespace in the HTML output --- src/root/common.tt | 134 ++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 68 deletions(-) diff --git a/src/root/common.tt b/src/root/common.tt index 9bd21fc3..2493f3e3 100644 --- a/src/root/common.tt +++ b/src/root/common.tt @@ -1,9 +1,9 @@ -[% USE date %] -[% USE String %] -[% USE HTML %] +[%- USE date -%] +[%- USE String -%] +[%- USE HTML -%] -[% inputTypes = +[%- inputTypes = { "svn" = "Subversion export" , "svn-checkout" = "Subversion checkout" , "bzr" = "Bazaar export" @@ -17,46 +17,46 @@ , "build" = "Build output" , "sysbuild" = "Build output (same system)" } -%] +-%] -[% BLOCK renderDateTime %] +[%- BLOCK renderDateTime -%] [% date.format(timestamp, '%Y-%m-%d %H:%M:%S') -%] -[% END %] +[%- END -%] -[% BLOCK renderProjectName -%] +[%- BLOCK renderProjectName -%] [% project %][% END -%] -[% BLOCK renderJobsetName -%] +[%- BLOCK renderJobsetName -%] [% jobset %][% END -%] -[% BLOCK renderJobName -%] +[%- BLOCK renderJobName -%] [% job %][% END -%] -[% BLOCK renderFullJobsetName %] +[%- BLOCK renderFullJobsetName -%] [% INCLUDE renderProjectName %]:[% INCLUDE renderJobsetName %] [% END %] -[% BLOCK renderFullJobName %] +[%- BLOCK renderFullJobName -%] [% INCLUDE renderProjectName %]:[% INCLUDE renderJobsetName %]:[% INCLUDE renderJobName %] [% END %] -[% BLOCK renderFullJobNameOfBuild %] +[%- BLOCK renderFullJobNameOfBuild -%] [% INCLUDE renderFullJobName project=build.get_column("project") jobset = build.get_column("jobset") job = build.get_column("job") %] [% END %] -[% BLOCK renderDuration -%] +[%- BLOCK renderDuration -%] [% IF duration >= 24 * 60 * 60 %][% duration div (24 * 60 * 60) %]d[% END %] [% IF duration >= 60 * 60 %][% duration div (60 * 60) % 24 %]h[% END %] [% IF duration >= 60 %][% duration div 60 % 60 %]m[% END %] @@ -64,79 +64,77 @@ [% END %] -[% BLOCK renderBuildList %] +[%- BLOCK renderBuildList -%] - [% IF !hideResultInfo %] + [%- IF !hideResultInfo -%] [% END %] - [% IF showSchedulingInfo %] + [%- IF showSchedulingInfo -%] - [% END %] + [%- END -%] - [% IF showStatusChange %] + [%- IF showStatusChange -%] - [% END %] - [% IF showDescription %] + [%- END -%] + [%- IF showDescription -%] - [% END %] + [%- END -%] - [% odd = 0 %] - [% FOREACH build IN builds -%] - - [% IF !hideResultInfo %] + [%- odd = 0 -%] + [%- FOREACH build IN builds -%] + + [%- IF !hideResultInfo -%] - [% END %] + [%- END -%] - [% IF showSchedulingInfo %] + [%- IF showSchedulingInfo -%] - [% END %] - + [%- END -%] + - [% IF showStatusChange %] + [%- IF showStatusChange -%] - [% END %] - [% IF showDescription %] + [%- END -%] + [%- IF showDescription -%] - [% END -%] + [%- END -%] - [% END -%] + [%- END -%]
# PJob Release Name System TimestampLast status changeDescription
- [% INCLUDE renderBuildStatusIcon size=16 busy=(showSchedulingInfo ? 1 : 0) buildstatus=build.get_column('buildStatus') %] + [%- INCLUDE renderBuildStatusIcon size=16 busy=(showSchedulingInfo ? 1 : 0) buildstatus=build.get_column('buildStatus') -%] [% build.id %][% IF build.get_column('busy') %]Running[% ELSIF build.get_column('disabled') == 1 || build.get_column('enabled') == 0 %]Disabled[% END %] [% build.get_column('priority') %] - [% INCLUDE renderFullJobNameOfBuild %] - [%- INCLUDE renderFullJobNameOfBuild -%] [% !showSchedulingInfo and build.get_column('releasename') ? build.get_column('releasename') : build.nixname %] [% build.system %] [% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %] - [% IF build.get_column('statusChangeTime') %] + [%- IF build.get_column('statusChangeTime') -%] [% date.format(build.get_column('statusChangeTime'), '%Y-%m-%d %H:%M:%S') %] - [% ELSE %] + [%- ELSE -%] never - [% END %] + [%- END -%] [% build.description %]
-[% END %] +[%- END -%] -[% BLOCK renderLink %][% title %][% END %] +[%- BLOCK renderLink -%][% title %][%- END -%] -[% BLOCK showBuildStats %] +[%- BLOCK showBuildStats -%] @@ -165,7 +163,7 @@
-[% END %] +[%- END -%] [% BLOCK renderViewJobName -%] @@ -203,32 +201,32 @@ [% INCLUDE renderFullJobNameOfBuild build=build %] build [% build.id %][% -%] [% END %] -[% BLOCK renderBuildStatusIcon %] - [% finished = build != undef ? build.finished : 1 %] - [% busy = busy != undef ? busy : build.schedulingInfo.busy %] - [% buildstatus = buildstatus != undef ? buildstatus : build.resultInfo.buildstatus %] - [% IF finished %] - [% IF buildstatus == 0 %] +[%- BLOCK renderBuildStatusIcon -%] + [%- finished = build != undef ? build.finished : 1 -%] + [%- busy = busy != undef ? busy : build.schedulingInfo.busy -%] + [%- buildstatus = buildstatus != undef ? buildstatus : build.resultInfo.buildstatus -%] + [%- IF finished -%] + [%- IF buildstatus == 0 -%] Succeeded - [% ELSIF buildstatus == 1 %] + [%- ELSIF buildstatus == 1 -%] Failed - [% ELSIF buildstatus == 2 %] + [%- ELSIF buildstatus == 2 -%] Dependency failed - [% ELSIF buildstatus == 4 %] + [%- ELSIF buildstatus == 4 -%] Failed - [% ELSIF buildstatus == 5 %] + [%- ELSIF buildstatus == 5 -%] Failed - [% ELSIF buildstatus == 6 %] + [%- ELSIF buildstatus == 6 -%] Failed (with result) - [% ELSE %] + [%- ELSE -%] Failed - [% END %] - [% ELSIF busy %] + [%- END -%] + [%- ELSIF busy -%] Busy - [% ELSE %] + [%- ELSE -%] Scheduled - [% END %] -[% END %] + [%- END -%] +[%- END -%] [% BLOCK renderStatus %] [% IF build.finished %]