feat: jobs system with dedicated nav page and run history
All checks were successful
CI / test (pull_request) Successful in 14s
CI / build-dev (pull_request) Has been skipped

Replaces ad-hoc Tailscale config tracking with a proper jobs system.
Jobs get their own nav page (master/detail layout), a dedicated DB
table, and full run history persisted forever. Tailscale connection
settings move from the Settings modal into the Jobs page. Registry
pattern makes adding future jobs straightforward.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-28 19:09:42 -04:00
parent 537d78e71b
commit d7727badb1
9 changed files with 541 additions and 178 deletions

View File

@@ -11,12 +11,19 @@ function navigate(page, vmid) {
document.getElementById('page-detail').classList.add('active');
history.pushState({ page: 'instance', vmid }, '', `/instance/${vmid}`);
renderDetailPage(vmid);
} else if (page === 'jobs') {
document.getElementById('page-jobs').classList.add('active');
history.pushState({ page: 'jobs' }, '', '/jobs');
renderJobsPage();
}
}
function handleRoute() {
const m = window.location.pathname.match(/^\/instance\/(\d+)/);
if (m) {
if (window.location.pathname === '/jobs') {
document.getElementById('page-jobs').classList.add('active');
renderJobsPage();
} else if (m) {
document.getElementById('page-detail').classList.add('active');
renderDetailPage(parseInt(m[1], 10));
} else {
@@ -30,6 +37,9 @@ window.addEventListener('popstate', e => {
if (e.state?.page === 'instance') {
document.getElementById('page-detail').classList.add('active');
renderDetailPage(e.state.vmid);
} else if (e.state?.page === 'jobs') {
document.getElementById('page-jobs').classList.add('active');
renderJobsPage();
} else {
document.getElementById('page-dashboard').classList.add('active');
renderDashboard();