frenzy/lib/frenzy_web/live/edit_pipeline_live.html.leex

32 lines
1.0 KiB
Plaintext
Raw Normal View History

<h1>Edit <%= @pipeline.name %></h1>
<%= for {stage, index} <- Enum.with_index(@pipeline.stages) do %>
<div class="card mt-4">
<div class="card-header container-fluid">
<div class="row">
<div class="col">
<h4 class="m-0"><%= stage["module_name"] %></h4>
</div>
<div class="col text-right">
<button phx-click="delete_stage" phx-value-index="<%= index %>">Delete</button>
</div>
</div>
</div>
<div class="card-body">
<%# <pre><%= Jason.encode!(stage["options"], pretty: true) %1></pre> %>
<%# <%= live_component(@socket, ) %1> %>
<%= component_for(@socket, stage, index) %>
</div>
</div>
<% end %>
<%= f = form_for :stage, "#", [class: "mt-4", phx_submit: :add_stage] %>
<div class="form-group row">
<label class="col-sm-2 col-form-label" for="module_name">Module</label>
<div class="col-sm-10">
<%= select f, :module_name, @stages, class: "custom-select" %>
</div>
</div>
<%= submit "Add Stage", class: "btn btn-primary" %>
</form>