Make proxmox_storage a global setting instead of a per-job snapshot
Backup jobs stored their own proxmox_storage column, copied from settings at creation time and never resynced. process_backup preferred that frozen job value, so changing Settings > Proxmox storage had no effect on existing jobs. Drop the per-job column and always use the current global setting when starting a backup. Also copies AGENTS.md to CLAUDE.md.
This commit is contained in:
@@ -28,7 +28,6 @@ type Job = {
|
||||
node: string
|
||||
enabled: number | boolean
|
||||
cron_schedule: string
|
||||
proxmox_storage: string
|
||||
backup_mode: string
|
||||
compression: string
|
||||
retention_type: string
|
||||
@@ -102,7 +101,6 @@ const editingJobId = ref<number | null>(null)
|
||||
const editJobForm = reactive({
|
||||
enabled: true,
|
||||
cron_schedule: '',
|
||||
proxmox_storage: '',
|
||||
backup_mode: '',
|
||||
compression: '',
|
||||
retention_type: 'days',
|
||||
@@ -205,7 +203,6 @@ async function createJob() {
|
||||
node: guest.node,
|
||||
enabled: newJob.enabled,
|
||||
cron_schedule: newJob.cron_schedule,
|
||||
proxmox_storage: settings.proxmox_storage,
|
||||
backup_mode: settings.default_backup_mode,
|
||||
compression: settings.default_compression,
|
||||
retention_type: newJob.retention_type,
|
||||
@@ -244,7 +241,6 @@ function beginEditJob(job: Job) {
|
||||
editingJobId.value = job.id
|
||||
editJobForm.enabled = Boolean(job.enabled)
|
||||
editJobForm.cron_schedule = job.cron_schedule
|
||||
editJobForm.proxmox_storage = job.proxmox_storage
|
||||
editJobForm.backup_mode = job.backup_mode
|
||||
editJobForm.compression = job.compression
|
||||
editJobForm.retention_type = job.retention_type
|
||||
@@ -265,7 +261,6 @@ async function saveJob(job: Job) {
|
||||
body: JSON.stringify({
|
||||
enabled: editJobForm.enabled,
|
||||
cron_schedule: editJobForm.cron_schedule,
|
||||
proxmox_storage: editJobForm.proxmox_storage,
|
||||
backup_mode: editJobForm.backup_mode,
|
||||
compression: editJobForm.compression,
|
||||
retention_type: editJobForm.retention_type,
|
||||
@@ -528,8 +523,7 @@ onUnmounted(() => {
|
||||
<td class="space-y-1 py-2">
|
||||
<div class="rounded border border-slate-700 bg-slate-950 px-2 py-1 text-xs text-slate-300">Editing job #{{ j.id }}</div>
|
||||
<input v-model="editJobForm.cron_schedule" class="w-full" />
|
||||
<div class="grid gap-1 md:grid-cols-3">
|
||||
<input v-model="editJobForm.proxmox_storage" placeholder="storage" />
|
||||
<div class="grid gap-1 md:grid-cols-2">
|
||||
<select v-model="editJobForm.backup_mode"><option>snapshot</option><option>suspend</option><option>stop</option></select>
|
||||
<select v-model="editJobForm.compression"><option>zstd</option><option>gzip</option><option>lzo</option><option>none</option></select>
|
||||
</div>
|
||||
@@ -551,7 +545,7 @@ onUnmounted(() => {
|
||||
</td>
|
||||
</template>
|
||||
<template v-else>
|
||||
<td class="py-2">{{ j.cron_schedule }}<div class="text-xs text-slate-500">job #{{ j.id }} · {{ j.proxmox_storage }} · {{ j.backup_mode }} · {{ j.compression }} · {{ j.enabled ? 'enabled' : 'disabled' }}</div></td>
|
||||
<td class="py-2">{{ j.cron_schedule }}<div class="text-xs text-slate-500">job #{{ j.id }} · {{ j.backup_mode }} · {{ j.compression }} · {{ j.enabled ? 'enabled' : 'disabled' }}</div></td>
|
||||
<td class="py-2">{{ j.retention_type }} {{ j.retention_value }}</td>
|
||||
<td class="py-2">
|
||||
<div>{{ fmtDate(j.next_run_at) }}</div>
|
||||
|
||||
Reference in New Issue
Block a user