<table class="simpleTable" id="endpoint_statuses"> 
  <% if @endpoints.size %>
  <tr>
    <th>Name</th>
    <th>Status</th>
    <th>Jobs running</th>
    <th>Jobs queued</th>
    <th>Average runtime (s)</th>
    <th>&nbsp;</th>
  </tr>
  <% end %>
  <% @endpoints.each do |endpoint| %>
  <% 
    if @endpoint_server_statuses[endpoint.id]['backend_status'] == 'good'
      status_class = 'good_status'
    else
      status_class = 'fail_status'
    end
  %>
  <tr>
    <td><%= link_to endpoint.name, endpoint_path(endpoint.id) %></td>
    <td class="<%= status_class %>"><%= @endpoint_server_statuses[endpoint.id]['backend_status'] %></td>
    <td><%= @endpoint_server_statuses[endpoint.id]['running'] %></td>
    <td><%= @endpoint_server_statuses[endpoint.id]['queued'].to_i %></td>
    <td><%= "%0.2f" % @endpoint_server_statuses[endpoint.id]['avg_runtime'] %></td>
    <td><%= button_to 'Delete', endpoint, confirm: 'Are you sure you wish to delete this endpoint?', method: :delete, title:"Delete" if current_user.admin?  %></td>
  </tr>
  <% end %>
</table>
<table class="simpleTable" id="endpoint_statuses"> 
  <% if @endpoints.size %>
  <tr>
    <th>Name</th>
    <th>Status</th>
    <th>Jobs running</th>
    <th>Jobs queued</th>
    <th>Average runtime (s)</th>
    <th>&nbsp;</th>
  </tr>
  <% end %>
  <% @endpoints.each do |endpoint| %>
  <% 
    if @endpoint_server_statuses[endpoint.id]['backend_status'] == 'good'
      status_class = 'good_status'
    else
      status_class = 'fail_status'
    end
  %>
  <tr>
    <td><%= link_to endpoint.name, endpoint_path(endpoint.id) %></td>
    <td class="<%= status_class %>"><%= @endpoint_server_statuses[endpoint.id]['backend_status'] %></td>
    <td><%= @endpoint_server_statuses[endpoint.id]['running'] %></td>
    <td><%= @endpoint_server_statuses[endpoint.id]['queued'].to_i %></td>
    <% avg_runtime = @endpoint_server_statuses[endpoint.id]['avg_runtime'] %>
    <% avg_runtime = "%0.2f" % avg_runtime if avg_runtime.class==Float  %>
    <td><%= avg_runtime %></td>
    <td><%= button_to 'Delete', endpoint, confirm: 'Are you sure you wish to delete this endpoint?', method: :delete, title:"Delete" if current_user.admin?  %></td>
  </tr>
  <% end %>
</table>
Fix (hopefully) a continuous integration error that doesn't show up locally when running the tests
Fix (hopefully) a continuous integration error that doesn't show up locally when running the tests
