<%!-- Header --%>

Flow Definitions

<%= length(@flows) %> total

Visual composite-route flows persisted to the database.

<%!-- Stats strip (flex row, not grid, to work with any CSS build) --%>

Total

<%= length(@flows) %>

Active

<%= Enum.count(@flows, &(&1.status == "active")) %>

Draft

<%= Enum.count(@flows, &(&1.status == "draft")) %>

Archived

<%= Enum.count(@flows, &(&1.status == "archived")) %>

<%!-- Search + filter toolbar --%>
<%= for {label, val} <- [{"All", "all"}, {"Active", "active"}, {"Draft", "draft"}, {"Archived", "archived"}] do %> <% end %>
<%!-- Content area --%> <% visible_flows = filtered_flows(@flows, @search, @filter_status) %> <%= if @flows == [] do %> <%!-- Empty state: no flows at all --%>

No flows yet

Create your first flow to start building composite routes for your platform.

<% else %> <%= if visible_flows == [] do %> <%!-- Empty state: no search/filter results --%>

No results found

Try a different search term or change the filter.

<% else %>
<%= for flow <- visible_flows do %> <%!-- Flow name + description --%> <%!-- Status --%> <%!-- Nodes --%> <%!-- Connections --%> <%!-- Updated --%> <%!-- Actions --%> <% end %>
Flow Status Nodes Connections Updated
flow_avatar_color(flow.name)}> <%= String.upcase(String.first(flow.name)) %>
<%= flow.name %>

<%= flow.description || "No description" %>

status_badge(flow.status)}> status_dot(flow.status)}> <%= flow.status %> <%= flow.node_count %> <%= flow.connection_count %> <%= Calendar.strftime(flow.updated_at, "%b %d, %Y") %>
<%!-- Table footer --%>

Showing <%= length(visible_flows) %> of <%= length(@flows) %> flows

<% end %> <% end %>
<%!-- Create flow modal --%> <%= if @show_create do %>
<%!-- Modal header --%>

Create New Flow

Start building a composite route.

<%!-- Modal body --%>
<%= if @create_error do %>
<%= @create_error %>
<% end %>
<%!-- Modal footer --%>
<% end %>