<%= render partial: 'shipit/stacks/header', locals: { stack: @stack } %>

Settings (Stack #<%= @stack.id %>)

<%= form_with scope: :stack, url: stack_path(@stack), method: :patch do |f| %>
<%= f.label :environment %> <%= f.text_field :environment, placeholder: 'production' %>
Branch: <%= @stack.branch %>
<%= f.label :deploy_url, 'Deploy URL (Where is this stack deployed to?)' %> <%= f.text_field :deploy_url, placeholder: 'https://' %>
<%= f.check_box :continuous_deployment %> <%= f.label :continuous_deployment, 'Enable continuous deployment' %>
<%= f.check_box :merge_queue_enabled %> <%= f.label :merge_queue_enabled, 'Enable merge queue' %>
<%= f.check_box :ignore_ci %> <%= f.label :ignore_ci, "Don't require CI to deploy" %>
<%= f.submit class: "btn", value: "Save" %> <% end %>
Lock deploys
<%= form_with scope: :stack, url: stack_path(@stack), method: :patch do |f| %>
<%= f.label :lock_reason, 'Reason for lock' %> <%= f.text_area :lock_reason %>
<% if @stack.locked? %> <%= f.submit class: "btn", value: "Update Reason" %> <% else %> <%= f.submit class: "btn", value: "Lock" %> <% end %> <% end %> <% if @stack.locked? %> <%= form_with scope: :stack, url: stack_path(@stack), method: :patch do |f| %> <%= f.hidden_field :lock_reason, value: nil %> <%= f.submit class: "btn btn--primary", value: "Unlock" %> <%- end -%> <% end %>
Resynchronize this stack
<%= button_to "Clear Git Cache", stack_clear_git_cache_path(@stack), class: "btn", method: "post" %> Delete the local git mirror in case it's in a bad state.
Miscellaneous
<%= button_to "Fetch URL", "", class: 'btn', data: {remote: ccmenu_url_url(stack_id: @stack.to_param)} %>
<% if @stack.archived? %>
Restore Stack

This action will de-archive the Stack, restoring it in the stack list and unlocking it.

<%= form_with scope: :stack, url: stack_path(@stack), method: :patch do |f| %> <%= f.hidden_field :archived, value: false %> <%= f.submit class: "btn", value: "Restore" %> <% end %> <% else %>
Archive Stack

This action will archive the Stack, hiding it from the stack list and locking it. It can still be found if you know the URL and de-archived.

<%= form_with scope: :stack, url: stack_path(@stack), method: :patch do |f| %> <%= f.hidden_field :archived, value: true %> <%= f.submit class: "btn", value: "Archive" %> <% end %> <% end %>
Delete this stack

This action will delete the stack from Ship it permanently. Be careful.

<%= button_to "Delete…", stack_path(@stack), class: 'btn btn--delete', data: {confirm: 'Are you sure?'}, method: :delete %>