Liking cljdoc? Tell your friends :D

wagoe.workflow.core.ui

Pure Hiccup UI components for workflow admin visualization.

All functions are pure — they receive data and return Hiccup structures. No side effects, no I/O, no logging.

Components: state-badge — colored state pill state-machine-vis — read-only workflow state diagram audit-log-table — chronological audit trail table instances-filter-form — the instance list's filters instances-table — the instance list, sortable instances-page — full page: instance list instance-detail-page — full page: instance detail with state viz + audit trail

Pure Hiccup UI components for workflow admin visualization.

All functions are pure — they receive data and return Hiccup structures.
No side effects, no I/O, no logging.

Components:
  state-badge          — colored state pill
  state-machine-vis    — read-only workflow state diagram
  audit-log-table      — chronological audit trail table
  instances-filter-form — the instance list's filters
  instances-table      — the instance list, sortable
  instances-page       — full page: instance list
  instance-detail-page — full page: instance detail with state viz + audit trail
raw docstring

audit-log-tableclj

(audit-log-table entries current-state)

Render a chronological audit log table for a workflow instance.

Args: entries - vector of AuditEntry maps (oldest first) current-state - the instance's state now; only the last entry's to-state can be it, so only that badge reads as current

Returns: Hiccup table or empty-state structure

Render a chronological audit log table for a workflow instance.

Args:
  entries       - vector of AuditEntry maps (oldest first)
  current-state - the instance's state now; only the last entry's to-state
                  can be it, so only that badge reads as current

Returns:
  Hiccup table or empty-state structure
sourceraw docstring

default-queryclj

Newest first, as the store lists them.

Newest first, as the store lists them.
sourceraw docstring

filter-paramsclj

The query params the list filters by.

The query params the list filters by.
sourceraw docstring

instance-columnsclj

The list's columns; :sortable? ones are what the store sorts by.

The list's columns; :sortable? ones are what the store sorts by.
sourceraw docstring

instance-detail-pageclj

(instance-detail-page instance definition audit-entries opts)

Render the workflow instance detail page.

Displays instance metadata, a state machine visualization with the current state highlighted, and the full chronological audit trail.

Args: instance - WorkflowInstance map definition - WorkflowDefinition map or nil audit-log - vector of AuditEntry maps (oldest first) opts - as for instances-page

Returns: Complete HTML page structure

Render the workflow instance detail page.

Displays instance metadata, a state machine visualization with the
current state highlighted, and the full chronological audit trail.

Args:
  instance   - WorkflowInstance map
  definition - WorkflowDefinition map or nil
  audit-log  - vector of AuditEntry maps (oldest first)
  opts       - as for `instances-page`

Returns:
  Complete HTML page structure
sourceraw docstring

instances-filter-formclj

(instances-filter-form params states)

The list's filters: each re-queries the table as it changes, sending the others and the table's sort along, and pushes the URL.

Args: params - current query-params map (string keys) states - the registered workflows' states; the state filter is a select of them, or a text field when none is registered

Returns: Hiccup structure

The list's filters: each re-queries the table as it changes, sending the
others and the table's sort along, and pushes the URL.

Args:
  params - current query-params map (string keys)
  states - the registered workflows' states; the state filter is a select
           of them, or a text field when none is registered

Returns:
  Hiccup structure
sourceraw docstring

instances-pageclj

(instances-page instances params opts)

Render the full workflow instances list page.

Args: instances - vector of WorkflowInstance maps params - query-params map (string keys from ring request) opts - map with :user, :flash, :states (for the filter), :table-query (default-query when absent), and the admin's :logo-url

Returns: Complete HTML page structure (doctype + html)

Render the full workflow instances list page.

Args:
  instances - vector of WorkflowInstance maps
  params    - query-params map (string keys from ring request)
  opts      - map with :user, :flash, :states (for the filter),
              :table-query (`default-query` when absent), and the admin's
              :logo-url

Returns:
  Complete HTML page structure (doctype + html)
sourceraw docstring

instances-pathclj

source

instances-tableclj

(instances-table instances)
(instances-table instances table-query filters)

The instances in the shared data-table, or an empty state, in the container the list's filters and sort re-render.

Args: instances - vector of WorkflowInstance maps table-query - {:sort :dir}, default-query when omitted filters - the query params filtered by (string keys), when any

Returns: Hiccup structure

The instances in the shared data-table, or an empty state, in the
container the list's filters and sort re-render.

Args:
  instances   - vector of WorkflowInstance maps
  table-query - {:sort :dir}, `default-query` when omitted
  filters     - the query params filtered by (string keys), when any

Returns:
  Hiccup structure
sourceraw docstring

instances-targetclj

The container the list's filters and sort re-render.

The container the list's filters and sort re-render.
sourceraw docstring

sortable-fieldsclj

What the store sorts the list by.

What the store sorts the list by.
sourceraw docstring

state-badgeclj

(state-badge state-kw)
(state-badge state-kw variant)

Render a state keyword as a tone badge, the look the admin entity pages give an enum value (c-badge tone-* in wagoe-admin.css).

Args: state-kw - keyword (e.g. :pending, :paid) variant - :current (success), :reachable (info), else neutral

Returns: Hiccup span element

Render a state keyword as a tone badge, the look the admin entity pages give
an enum value (`c-badge tone-*` in wagoe-admin.css).

Args:
  state-kw - keyword (e.g. :pending, :paid)
  variant  - :current (success), :reachable (info), else neutral

Returns:
  Hiccup span element
sourceraw docstring

state-machine-visclj

(state-machine-vis definition current-state visited-states)

Render a read-only visualization of a workflow state machine.

Displays all states as colored badges (current highlighted in green, reachable states in blue) and a collapsible transition reference table.

Args: definition - WorkflowDefinition map or nil if not registered current-state - keyword (e.g. :paid) visited-states - collection of state keywords already visited (from audit log)

Returns: Hiccup structure

Render a read-only visualization of a workflow state machine.

Displays all states as colored badges (current highlighted in green,
reachable states in blue) and a collapsible transition reference table.

Args:
  definition    - WorkflowDefinition map or nil if not registered
  current-state - keyword (e.g. :paid)
  visited-states - collection of state keywords already visited (from audit log)

Returns:
  Hiccup structure
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close