intercity/intercity-next

View on GitHub
app/views/servers/show/down.html.erb

Summary

Maintainability
Test Coverage
<div class="columns servers">
  <div class="column is-8 is-offset-2 has-text-centered" data-server-status="down">
    <h1 class="title">Server <%= @server.name %> seems to be down</h1>
    <p>We could not connect to your server during the last healthcheck.</p>
    <p>Please check if the server is still online and accepting connections</p>
    <p>We keep checking this server every 30 minutes to see if it comes online.</p>
    <div class="box">
      <%= link_to "Force healthcheck", server_health_check_path(@server), method: :post, remote: true,
        class: "button is-primary", data: { behaviour: "perform-health-check" } %>
      <p data-behaviour="performing-health-check" class="is-hidden"><%= icon "circle-o-notch fa-spin" %> Performing healthcheck</p>
    </div>
  </div>
  <div class="column is-8 is-offset-2 is-hidden has-text-centered" data-server-status="up">
    <h1 class="title">Server <%= @server.name %> is back online!</h1>
    <div class="box">
      <%= link_to "Go to server", server_path(@server), class: "button is-primary" %>
    </div>
  </div>
</div>