Add Phase 2 durable workstation agent job routing
This commit is contained in:
@@ -177,7 +177,7 @@
|
||||
</div>
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="bg-slate-50 text-slate-600"><tr><th class="p-3 text-left">Workstation</th><th class="p-3 text-left">Agent</th><th class="p-3 text-left">Tally</th><th class="p-3 text-left">Open Companies</th><th class="p-3 text-left">Last Seen</th></tr></thead>
|
||||
<thead class="bg-slate-50 text-slate-600"><tr><th class="p-3 text-left">Workstation</th><th class="p-3 text-left">Agent</th><th class="p-3 text-left">Tally</th><th class="p-3 text-left">Open Companies</th><th class="p-3 text-left">Last Seen</th><th class="p-3 text-left">Phase 2</th></tr></thead>
|
||||
<tbody>
|
||||
{% for ws in workstation_agents or [] %}
|
||||
<tr class="border-t align-top">
|
||||
@@ -186,9 +186,44 @@
|
||||
<td class="p-3"><span class="px-2 py-1 rounded-full text-xs {{ 'bg-emerald-100 text-emerald-700' if ws.tally_connected else 'bg-slate-100 text-slate-600' }}">{{ 'Connected' if ws.tally_connected else 'Not connected' }}</span></td>
|
||||
<td class="p-3">{{ ws.tally_company_count or 0 }}</td>
|
||||
<td class="p-3 text-xs">{{ ws.last_seen_at_utc or '-' }}</td>
|
||||
<td class="p-3">
|
||||
{% if can_manage_branch_storage %}
|
||||
<form method="post" action="/documents/storage-workstations/{{ ws.id }}/test-route">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<button class="text-xs font-semibold text-blue-700">Test route</button>
|
||||
</form>
|
||||
{% else %}-{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="5" class="p-6 text-center text-slate-500">No workstation agent has connected since the Phase 1 upgrade.</td></tr>
|
||||
<tr><td colspan="6" class="p-6 text-center text-slate-500">No workstation agent has connected since the Phase 1 upgrade.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="rounded-2xl border bg-white overflow-hidden shadow-sm">
|
||||
<div class="p-4 border-b">
|
||||
<h2 class="font-bold text-slate-900">Recent Workstation Agent Jobs</h2>
|
||||
<p class="text-xs text-slate-500 mt-1">Phase 2 jobs are durable, routed to one workstation, leased for safe retry, and protected by an idempotency key.</p>
|
||||
</div>
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-xs">
|
||||
<thead class="bg-slate-50 text-slate-600"><tr><th class="p-2 text-left">Job</th><th class="p-2 text-left">Workstation</th><th class="p-2 text-left">Action</th><th class="p-2 text-left">Status</th><th class="p-2 text-left">Attempts</th><th class="p-2 text-left">Created</th></tr></thead>
|
||||
<tbody>
|
||||
{% for job in recent_agent_jobs or [] %}
|
||||
<tr class="border-t">
|
||||
<td class="p-2 font-mono">{{ job.job_uuid[:10] }}...</td>
|
||||
<td class="p-2">{{ job.workstation.machine_name if job.workstation else ('#' ~ job.workstation_agent_id) }}</td>
|
||||
<td class="p-2">{{ job.action }}</td>
|
||||
<td class="p-2"><span class="font-semibold">{{ job.status }}</span>{% if job.last_error %}<div class="text-red-600 mt-1">{{ job.last_error }}</div>{% endif %}</td>
|
||||
<td class="p-2">{{ job.attempts }}/{{ job.max_attempts }}</td>
|
||||
<td class="p-2">{{ job.created_at_utc or '-' }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="6" class="p-4 text-center text-slate-500">No Phase 2 workstation jobs yet. Use Test route on a connected workstation to verify routing.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user