fix(ui): Remove Cleanup Stale button from Workers page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kelly
2025-12-11 01:29:25 -07:00
parent a252a7fefd
commit d6c602c567

View File

@@ -292,16 +292,6 @@ export function WorkersDashboard() {
} }
}, []); }, []);
// Cleanup stale workers
const handleCleanupStale = async () => {
try {
await api.post('/api/worker-registry/cleanup', { stale_threshold_minutes: 2 });
fetchData();
} catch (err: any) {
console.error('Cleanup error:', err);
}
};
// Remove a single worker // Remove a single worker
const handleRemoveWorker = async (workerId: string) => { const handleRemoveWorker = async (workerId: string) => {
if (!confirm('Remove this worker from the registry?')) return; if (!confirm('Remove this worker from the registry?')) return;
@@ -364,23 +354,13 @@ export function WorkersDashboard() {
{workers.length} registered workers ({busyWorkers.length} busy, {idleWorkers.length} idle) {workers.length} registered workers ({busyWorkers.length} busy, {idleWorkers.length} idle)
</p> </p>
</div> </div>
<div className="flex items-center gap-2"> <button
<button onClick={() => fetchData()}
onClick={handleCleanupStale} className="flex items-center gap-2 px-4 py-2 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 transition-colors"
className="flex items-center gap-2 px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors" >
title="Mark stale workers (no heartbeat > 2 min) as offline" <RefreshCw className="w-4 h-4" />
> Refresh
<Trash2 className="w-4 h-4" /> </button>
Cleanup Stale
</button>
<button
onClick={() => fetchData()}
className="flex items-center gap-2 px-4 py-2 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 transition-colors"
>
<RefreshCw className="w-4 h-4" />
Refresh
</button>
</div>
</div> </div>
{error && ( {error && (