diff options
Diffstat (limited to 'app/views/setup/show.html.erb')
-rw-r--r-- | app/views/setup/show.html.erb | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/app/views/setup/show.html.erb b/app/views/setup/show.html.erb new file mode 100644 index 0000000..6f8be35 --- /dev/null +++ b/app/views/setup/show.html.erb @@ -0,0 +1,73 @@ + +<h1>Backends</h1> + +<% Backends.classes.each do |backend_class| %> + <div class="panel panel-default"> + <!-- Default panel contents --> + <div class="panel-heading"> + <h2><%= backend_class.label %></h2> + </div> + <ul class="list-group"> + <% backend_class.all.each do |backend| %> + <a class="list-group-item" href="<%= show_backend_path(backend) %>"> + <%= backend.label %> + </a> + <% end %> + <a class="list-group-item text-center" + href="<%= new_backend_path(backend_class) %>"> + New <%= backend_class.label %> backend + </a> + </ul> + </div> +<% end %> + +<h1>Revisions</h1> + +<%= form_with(url: enqueue_fetch_govuk_guix_revision_path, + method: "post") do %> + <div class="input-group input-group-lg"> + <%= text_field_tag( + :revision, + 'origin/master', + class: 'form-control', + placeholder: 'Git revision' + ) %> + <span class="input-group-btn"> + <%= submit_tag("Fetch Revision", + role: 'button', + class: 'btn btn-lg btn-success') + %> + </span> + </div> +<% end %> + +<br> +<div class="list-group"> + <% if fetch_revision_jobs.count %> + <% fetch_revision_jobs.each do |job| %> + <a href="#" class="list-group-item disabled"> + Fetching + <span style="font-family: monospace;"> + <%= job["args"].first %> + </span> + + <div class="progress pull-right" style="width: 21.2em"> + <div class="progress-bar progress-bar-striped active" role="progressbar" style="width: 100%"> + <span class="sr-only">Fetching revision in progress</span> + </div> + </div> + </a> + <% end %> + <% end %> + + <% GovukGuix::Revision.order(:created_at).reverse_order.each do |revision| %> + <a href="<%= govuk_guix_revision_path(revision) %>" class="list-group-item"> + <span class="badge" style="font-family: monospace;"> + <%= revision.commit_hash %> + </span> + + <%= revision.created_at %> + </a> + <% end %> +</div> + |