feat: processes and process runs CRUD

This commit is contained in:
2026-03-01 22:04:24 +00:00
parent dbd40485ba
commit 21bbb169f9
14 changed files with 1095 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
{% extends "base.html" %}
{% block content %}
<div class="page-header">
<h1 class="page-title">All Process Runs<span class="page-count">{{ items|length }}</span></h1>
<a href="/processes" class="btn btn-secondary">Back to Processes</a>
</div>
<form class="filters-bar" method="get" action="/processes/runs">
<select name="status" class="filter-select" onchange="this.form.submit()">
<option value="">All Statuses</option>
<option value="not_started" {{ 'selected' if current_status == 'not_started' }}>Not Started</option>
<option value="in_progress" {{ 'selected' if current_status == 'in_progress' }}>In Progress</option>
<option value="completed" {{ 'selected' if current_status == 'completed' }}>Completed</option>
</select>
</form>
{% if items %}
<div class="card mt-3">
{% for item in items %}
<div class="list-row">
<span class="row-title"><a href="/processes/runs/{{ item.id }}">{{ item.title }}</a></span>
<span class="row-tag">{{ item.process_name }}</span>
<span class="status-badge status-{{ item.status }}">{{ item.status|replace('_', ' ') }}</span>
{% if item.total_steps > 0 %}
<div class="row-meta" style="display: flex; align-items: center; gap: 6px;">
<div style="width: 60px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden;">
<div style="width: {{ (item.completed_steps / item.total_steps * 100)|int }}%; height: 100%; background: var(--green); border-radius: 2px;"></div>
</div>
<span>{{ item.completed_steps }}/{{ item.total_steps }}</span>
</div>
{% endif %}
{% if item.project_name %}
<span class="row-tag">{{ item.project_name }}</span>
{% endif %}
<span class="row-meta">{{ item.created_at.strftime('%Y-%m-%d') }}</span>
</div>
{% endfor %}
</div>
{% else %}
<div class="empty-state mt-3">
<div class="empty-state-icon">&#9654;</div>
<div class="empty-state-text">No process runs yet</div>
<a href="/processes" class="btn btn-primary">Go to Processes</a>
</div>
{% endif %}
{% endblock %}