Separate provisioning jobs from activity log

This commit is contained in:
2026-10-07 23:15:55 -04:00
parent a223180835
commit 58375e6db0
10 changed files with 64 additions and 21 deletions
+3
View File
@@ -151,6 +151,9 @@ export function activityHistory(input: ActivityQuery = {}, now = Date.now()): Ac
initialized.add(handle);
}
const conditions: string[] = [];
// Keep lifecycle jobs in Provisioning, including jobs triggered by automation.
// Apply this before totals and pagination; resource histories can still include them.
if (query.excludeProvisioning) conditions.push("route <> 'provisioning'");
const bindings: Record<string, string | number> = {};
for (const key of ['server', 'type', 'state'] as const) if (query[key]) { conditions.push(`${key}=@${key}`); bindings[key] = query[key]; }
if (query.host) { conditions.push('(hostId=@host OR secondaryHostId=@host)'); bindings.host = query.host; }