<div class="row">
  <div class="col-md-12">

    <h1 class='page-header'>Status <small>/ Charts</small></h1>
    <%== @status_nav %>

    <div id='status'>
      <% Debci.config.arch_list.each do |arch| %>
        <% Debci.config.suite_list.each do |suite| %>
          <% chart = Debci::Graph.new(suite, arch) %>
          <meta name='data-<%= suite %>-<%= arch %>' content='<%= chart.entries.to_json%>'/>
          <h3><%= "#{suite}/#{arch}" %></h3>
          <noscript>
            <table>
              <tr>
                <th>Date</th>
                <th>Pass</th>
                <th>Neutral</th>
                <th>Fail</th>
                <th>Temporary failure</th>
                <th>Pass percentage</th>
              </tr>
              <% chart.entries.each do |entry| %>
                <tr>
                  <td><%= entry['date'] %></td>
                  <td><%= entry['pass'] %></td>
                  <td><%= entry['neutral'] %></td>
                  <td><%= entry['fail'] %></td>
                  <td><%= entry['tmpfail'] %></td>
                  <td><%= 100 * entry['pass'].to_f / entry['total'].to_f %>%</td>
                </tr>
              <% end %>
            </table>
          </noscript>
          <div class='arch-charts row'>
            <div class='chart col-xs-12 col-md-6' align ="center">
              <h4>Pass/Fail</h4>
              <div class='chart-canvas' id='chart-pass-fail-<%= suite %>-<%= arch %>'></div>
            </div>
            <div class='chart col-xs-12 col-md-6' align ="center">
              <h4>Pass percentage</h4>
              <div class='chart-canvas' id='chart-pass-percentage-<%= suite %>-<%= arch %>'></div>
            </div>
          </div>

        <% end %>
      <% end %>

    </div>
  </div> <!-- class='col-md-12' -->
</div> <!-- class='row -->
