feat(storage): improve admin panel
This commit is contained in:
@@ -476,14 +476,7 @@ export interface StorageEntrySummary {
|
||||
}
|
||||
|
||||
export interface StorageSettings {
|
||||
backend: string;
|
||||
s3_endpoint_url?: string | null;
|
||||
s3_bucket?: string | null;
|
||||
s3_region?: string | null;
|
||||
s3_access_key_set?: boolean;
|
||||
s3_secret_key_set?: boolean;
|
||||
s3_force_path_style?: boolean;
|
||||
env_overrides?: string[];
|
||||
// Live stats — what the running process reports.
|
||||
current_backend?: string;
|
||||
total_blobs?: number;
|
||||
total_bytes_stored?: number;
|
||||
|
||||
@@ -53,11 +53,16 @@ export function listJobs(): Promise<JobSummary[]> {
|
||||
*/
|
||||
export async function triggerJob(
|
||||
name: string,
|
||||
opts: { force?: boolean; deep?: boolean } = {}
|
||||
opts: { force?: boolean; deep?: boolean; storage?: string } = {}
|
||||
): Promise<TriggerResponse> {
|
||||
const params = new URLSearchParams();
|
||||
if (opts.force) params.set('force', 'true');
|
||||
if (opts.deep) params.set('deep', 'true');
|
||||
// `storage` scopes tenants that respect JobRunArgs.storage —
|
||||
// currently blobs_consistency / backend_consistency (probes the
|
||||
// named entry instead of the live backend). See
|
||||
// `docs/plan/storage-multi-entry.md` slice 7.
|
||||
if (opts.storage) params.set('storage', opts.storage);
|
||||
const q = params.toString();
|
||||
const url = `/api/admin/jobs/${encodeURIComponent(name)}/trigger${q ? `?${q}` : ''}`;
|
||||
const res = await apiFetch(url, {
|
||||
|
||||
Reference in New Issue
Block a user