Separate provisioning jobs from activity log
This commit is contained in:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user