diff options
author | Christopher Baines <mail@cbaines.net> | 2018-06-22 07:56:21 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-06-22 07:56:21 +0100 |
commit | f79be6cf0430cb8da72e69b253b1b0a7b643ebce (patch) | |
tree | 99cba74c807e5619fa3ded22a6b7a6af80c1f28b | |
parent | a1897e5d322ca753ffd6073eeda84cc5f057bf5a (diff) | |
download | govuk-mini-environment-admin-f79be6cf0430cb8da72e69b253b1b0a7b643ebce.tar govuk-mini-environment-admin-f79be6cf0430cb8da72e69b253b1b0a7b643ebce.tar.gz |
Use the status information on the mini environment index page
-rw-r--r-- | app/views/mini_environments/index.html.erb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/app/views/mini_environments/index.html.erb b/app/views/mini_environments/index.html.erb index ab285f9..afbeebe 100644 --- a/app/views/mini_environments/index.html.erb +++ b/app/views/mini_environments/index.html.erb @@ -32,6 +32,8 @@ License along with the GOV.UK Mini Environment Admin. If not, see <br> <% MiniEnvironment.all.each do |mini_environment| %> + <% status = mini_environment.status %> + <div class="panel panel-default"> <div class="panel-heading"> <div class="row"> @@ -39,9 +41,19 @@ License along with the GOV.UK Mini Environment Admin. If not, see <h2><%= mini_environment.name %></h2> </div> <div class="col-md-2"> - <div class="alert alert-success text-center" role="alert" style="margin-bottom: 0px;"> - Mini environment running - </div> + <% if status[:running] %> + <div class="alert alert-success text-center" + role="alert" + style="margin-bottom: 0px;"> + Mini environment running + </div> + <% else %> + <div class="alert alert-warning text-center" + role="alert" + style="margin-bottom: 0px;"> + Mini environment down + </div> + <% end %> </div> <div class="col-md-2"> <a class="btn btn-lg btn-primary pull-right" role="button" href="<%= mini_environment_path mini_environment %>"> |