Edit <%= @pipeline.name %>

Edit as JSON <%= for {stage, index} <- Enum.with_index(@pipeline.stages) do %>

<%= stage["module_name"] %>

<%= content_tag :button, "Move Up", [phx_click: :move_up, phx_value_index: index, disabled: index == 0, class: "btn btn-secondary btn-sm"] %> <%= content_tag :button, "Move Down", [phx_click: :move_down, phx_value_index: index, disabled: index == length(@pipeline.stages) - 1, class: "btn btn-secondary btn-sm"] %>
<%= component_for(@socket, stage, index) %>
<% end %> <%= form_for :stage, "#", [class: "mt-4 mb-4", phx_submit: :add_stage], fn f -> %>
<%= select f, :module_name, @stages, class: "custom-select" %>
<%= submit "Add Stage", class: "btn btn-primary" %> <% end %>