* More release -> view.

This commit is contained in:
Eelco Dolstra
2009-10-20 12:26:39 +00:00
parent 8f9417f822
commit 321027b262
7 changed files with 121 additions and 71 deletions

View File

@ -159,7 +159,7 @@
[% END %]
[% BLOCK renderReleaseJobName -%]
[% BLOCK renderViewJobName -%]
[% IF job.description; HTML.escape(job.description); ELSE %]<tt>[% job.job %]</tt> ([% job.attrs %])[% END -%]
[% END -%]

View File

@ -21,7 +21,7 @@
[% END %]
<form action="[% IF create %][% c.uri_for('/create-view' project.name 'submit') %][% ELSE %][% c.uri_for('/view' project.name view.name 'submit') %][% END %]" method="post">
<form action="[% IF create %][% c.uri_for('/project' project.name 'create-view/submit') %][% ELSE %][% c.uri_for('/view' project.name view.name 'submit') %][% END %]" method="post">
<table class="layoutTable">
<tr>

View File

@ -1,45 +0,0 @@
[% releaseName = (release.releasename || "(No name)") -%]
[% WRAPPER layout.tt title="Release $releaseName" %]
[% PROCESS common.tt %]
[% PROCESS "product-list.tt" %]
[% USE HTML %]
<h1>Release <tt>[% releaseName %]</tt></h1>
<p><em>Released on [% INCLUDE renderDateTime timestamp = release.timestamp %].</em></p>
[% IF release.status == 1 %]
<p class="error">This is a failed release. One of its jobs has failed. See below for details.</p>
[% ELSIF release.status == 2 %]
<p class="error">This is an incomplete release. One of its jobs has not been built (yet). See below for details.</p>
[% END %]
[% FOREACH j IN release.jobs %]
<h2>
[% IF j.build %]<a href="[% c.uri_for('/build' j.build.id) %]">[% END %]
[% INCLUDE renderReleaseJobName job=j.job %]
[% IF j.build %]</a>[% END %]
</h2>
[% IF j.build %]
[% IF j.build.resultInfo.buildstatus == 0 %]
[% INCLUDE renderProductList build=j.build latestRoot=['/release' project.name releaseSet.name 'latest' j.job.job] %]
[% ELSE %]
<p class="error">Build failed</p>
[% END %]
[% ELSE %]
<p class="error">Build not (yet) performed.</p>
[% END %]
[% END %]
[% END %]

45
src/root/view-result.tt Normal file
View File

@ -0,0 +1,45 @@
[% releaseName = (result.releasename || "(No name)") -%]
[% WRAPPER layout.tt title="View $releaseName" %]
[% PROCESS common.tt %]
[% PROCESS "product-list.tt" %]
[% USE HTML %]
<h1>View <tt>[% view.project.name %]:[% view.name %]</tt> result [% result.id %][% IF result.releasename %] (<tt>[% result.releasename %]</tt>)[% END %]</h1>
<p><em>Finished building on [% INCLUDE renderDateTime timestamp = result.timestamp %].</em></p>
[% IF result.status == 1 %]
<p class="error">Note: One or more of the jobs in the view did not build correctly. See below for details.</p>
[% ELSIF result.status == 2 %]
<p class="error">Note: One or more of the jobs in the view have not been built (yet). See below for details.</p>
[% END %]
[% FOREACH j IN result.jobs %]
<h2>
[% IF j.build %]<a href="[% c.uri_for('/build' j.build.id) %]">[% END %]
[% INCLUDE renderViewJobName job=j.job %]
[% IF j.build %]</a>[% END %]
</h2>
[% IF j.build %]
[% IF j.build.resultInfo.buildstatus == 0 %]
[% INCLUDE renderProductList build=j.build latestRoot=['/view' project.name view.name 'latest' j.job.job] %]
[% ELSE %]
<p class="error">Build failed</p>
[% END %]
[% ELSE %]
<p class="error">Build not (yet) performed.</p>
[% END %]
[% END %]
[% END %]

View File

@ -19,7 +19,7 @@
<th>Name</th>
<th>Date</th>
[% FOREACH j IN jobs %]
<th class="releaseSetJobName">[% INCLUDE renderReleaseJobName job=j %]</th>
<th class="releaseSetJobName">[% INCLUDE renderViewJobName job=j %]</th>
[% END %]
</tr>
</thead>