diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/backends/terraform_aws/show.html.erb | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/app/views/backends/terraform_aws/show.html.erb b/app/views/backends/terraform_aws/show.html.erb index 3a1b329..eca5d3f 100644 --- a/app/views/backends/terraform_aws/show.html.erb +++ b/app/views/backends/terraform_aws/show.html.erb @@ -27,6 +27,57 @@ License along with the GOV.UK Mini Environment Admin. If not, see </a> <h1>Backend: <%= @backend.label %></h1> +<% status = @backend.status %> + +<div class="row"> + <div class="col-md-2"> + <%= form_with( + url: perform_action_terraform_aws_backend_path(@backend), + local: true, + method: "post" + ) do %> + <%= submit_tag('Deploy', + role: 'button', + class: 'btn btn-lg btn-success') + %> + <% end %> + + <%= form_with( + url: perform_action_terraform_aws_backend_path(@backend), + local: true, + method: "post" + ) do %> + <%= submit_tag("Destroy", + role: 'button', + class: 'btn btn-lg btn-danger') + %> + <% end %> + </div> + <div class="col-md-6"> + <%= render( + partial: 'shared/jobs', + locals: { + jobs: Backends::TerraformAwsJob.jobs(@backend.id).order(id: :desc) + } + ) %> + </div> + <div class="col-md-4"> + + <% if status[:running] %> + <div class="alert alert-success text-center" + role="alert" + style="margin-bottom: 0px;"> + Backend available + </div> + <% else %> + <div class="alert alert-warning text-center" + role="alert" + style="margin-bottom: 0px;"> + Backend down + </div> + <% end %> + </div> +</div> <div class="row"> <div class="col-md-8"> |