Simplify provisioning queue and add shared filters
This commit is contained in:
@@ -1,14 +1,22 @@
|
||||
import type { ProvisioningAction } from './provisioning.js';
|
||||
import type { ProvisioningDeployment } from './provisioning-detail.js';
|
||||
import type { ProvisioningSource } from './provisioning-detail.js';
|
||||
|
||||
export const provisioningListStatuses = ['pending', 'running', 'awaiting-health', 'done', 'attention', 'failed', 'interrupted', 'warning', 'cancelled'] as const;
|
||||
export const provisioningListSources = ['manual', 'campaign', 'beta', 'maintenance', 'system'] as const;
|
||||
|
||||
export type ProvisioningListRow = Pick<ProvisioningDeployment,
|
||||
'id' | 'server' | 'server_deleted_at' | 'action' | 'state' | 'stage' | 'started_at' |
|
||||
'finished_at' | 'triggered_by' | 'error' | 'warnings' | 'server_exists'> & { canCancelRemoval: number; canCancel?: number };
|
||||
'finished_at' | 'triggered_by' | 'error' | 'warnings' | 'server_exists'> & {
|
||||
canCancelRemoval: number; canCancel?: number; sources?: ProvisioningSource[];
|
||||
phase?: string | null; phaseStartedAt?: string | null; waitCode?: string | null;
|
||||
};
|
||||
|
||||
export interface ProvisioningListOptions {
|
||||
view?: 'active' | 'history' | 'all';
|
||||
action?: ProvisioningAction;
|
||||
status?: 'attention';
|
||||
status?: typeof provisioningListStatuses[number];
|
||||
source?: typeof provisioningListSources[number];
|
||||
server?: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
|
||||
Reference in New Issue
Block a user