feat(storage): rename snapraid_content to snapraid_conf; clarify conf vs content file; add auto-detect and conf viewer

This commit is contained in:
2026-07-07 01:17:55 -04:00
parent 047f0f5c09
commit 599af5a828
11 changed files with 143 additions and 42 deletions
+5 -1
View File
@@ -170,7 +170,7 @@ export interface StorageConfig {
mover_inplace: boolean;
mover_rsync_options: string;
mover_warning_threshold: number;
snapraid_content: string;
snapraid_conf: string;
snapraid_data_dirs: string;
snapraid_parity_dir: string;
snapraid_scrub_plan: number;
@@ -322,6 +322,10 @@ export const api = {
request<StorageJob>("POST", "/storage/jobs", { kind, args }),
cancelStorageJob: (id: number) => request<{ ok: boolean }>("POST", `/storage/jobs/${id}/cancel`),
storageJobStreamUrl: (id: number) => `/api/storage/jobs/${id}/stream`,
getStorageConfFile: () => fetch(`/api/storage/conf-file`).then(r => {
if (!r.ok) throw new Error(`HTTP ${r.status}: ${r.statusText}`);
return r.text();
}),
};
export function formatBytes(bytes: number): string {