frenzy/lib/frenzy_web/templates/pipeline/show.html.eex

30 lines
835 B
Elixir

<h1><%= @pipeline.name %></h1>
<h2>Stages: <%= @pipeline.stages |> Enum.count() %></h2>
<a href="<%= Routes.live_path(@conn, FrenzyWeb.EditPipelineLive, @pipeline.id) %>" class="btn btn-primary">Edit Pipeline</a>
<%= form_tag Routes.pipeline_path(@conn, :delete, @pipeline.id), method: :delete do %>
<%= submit "Delete Pipeline", class: "btn btn-danger mt-2" %>
<% end %>
<table class="table table-striped mt-4">
<thead>
<tr>
<th>Module Name</th>
<th>Options</th>
</tr>
</thead>
<tbody>
<%= for stage <- @pipeline.stages do %>
<tr>
<td>
<code><%= stage["module_name"] %></code>
</td>
<td>
<% {:ok, result} = Jason.encode(stage["options"], pretty: true) %>
<pre><%= result %></pre>
</td>
</tr>
<% end %>
</tbody>
</table>