From 7dbc313632ecebd638bd464bdc430292218d4c9e Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 20 Jun 2018 06:42:54 +0100 Subject: Add a view raw JSON link to the Terraform state page --- app/views/terraform_http_backend/show.html.erb | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/app/views/terraform_http_backend/show.html.erb b/app/views/terraform_http_backend/show.html.erb index e167541..9a99d52 100644 --- a/app/views/terraform_http_backend/show.html.erb +++ b/app/views/terraform_http_backend/show.html.erb @@ -26,6 +26,12 @@ License along with the GOV.UK Mini Environment Admin. If not, see View all terraform states +<% historical_states = TerraformState + .where(state_id: @state.state_id) + .order(:id) + .to_a +%> +

@@ -35,7 +41,14 @@ License along with the GOV.UK Mini Environment Admin. If not, see

-
+ + View raw JSON + @@ -48,16 +61,9 @@ License along with the GOV.UK Mini Environment Admin. If not, see
-
- <% historical_states = TerraformState - .where(state_id: @state.state_id) - .order(:id) - .to_a - %> -

History (<%= pluralize(historical_states.count, 'states') %>)

-- cgit v1.2.3