[% WRAPPER layout.tt title="Errors" %]
[% PROCESS common.tt %]

<p>This page provides a quick way to see how FUBARed your packages
are.  It shows job expressions that don’t evaluate properly and jobs
that don’t build.</p>


[% haveErrors = 0 %]


[% IF brokenJobsets && brokenJobsets.size > 0; haveErrors = 1 %]

<h2>Evaluation errors in jobsets</h2>

<table class="tablesorter table table-condensed table-striped">
  <thead>
    <tr>
      <th>Name</th>
      <th>Error</th>
    </tr>
  </thead>
  <tdata>
    [% FOREACH j IN brokenJobsets %]
      <tr>
        <td>[% INCLUDE renderFullJobsetName project=j.project.name jobset=j.name %]</td>
        <td>
          <pre class="error">[% HTML.escape(j.errormsg) %]</pre>
        </td>
      </tr>
    [% END %]
  </tdata>
</table>

[% END %]


[% IF brokenJobs && brokenJobs.size > 0; haveErrors = 1 %]

<h2>Evaluation errors in jobs</h2>

<table class="tablesorter table table-condensed table-striped">
  <thead>
    <tr>
      <th>Name</th>
      <th>Error</th>
    </tr>
  </thead>
  <tdata>
    [% FOREACH j IN brokenJobs %]
      <tr>
        <td>[% INCLUDE renderFullJobName project=j.project.name jobset=j.jobset.name job=j.name %]</td>
        <td>
          <pre class="error">[% HTML.escape(j.errormsg) %]</pre>
        </td>
      </tr>
    [% END %]
  </tdata>
</table>

[% END %]


[% IF brokenBuilds && brokenBuilds.size > 0; haveErrors = 1 %]

<h2>Broken builds</h2>

[% INCLUDE renderBuildList builds=brokenBuilds showStatusChange=1 hideProjectName=project hideJobsetName=jobset hideJobName=job %]

[% END %]


[% IF !haveErrors %]

<p><strong>There are currently no problems.</strong></p>

[% END %]


[% END %]
