feat: naming backup schedules (#103)

* docs: add agents instructions

* feat: naming backup schedules

* fix: wrong table for filtering
This commit is contained in:
Nico
2025-12-04 18:31:00 +01:00
committed by GitHub
parent b8e30e298c
commit 1e20fb225e
20 changed files with 1382 additions and 434 deletions

View File

@@ -23,6 +23,7 @@ import type { BackupSchedule, Volume } from "~/client/lib/types";
import { deepClean } from "~/utils/object";
const internalFormSchema = type({
name: "1 <= string <= 32",
repositoryId: "string",
excludePatternsText: "string?",
includePatterns: "string[]?",
@@ -80,6 +81,7 @@ const backupScheduleToFormValues = (schedule?: BackupSchedule): InternalFormValu
const weeklyDay = frequency === "weekly" ? dayOfWeekPart : undefined;
return {
name: schedule.name,
repositoryId: schedule.repositoryId,
frequency,
dailyTime,
@@ -148,6 +150,21 @@ export const CreateScheduleForm = ({ initialValues, formId, onSubmit, volume }:
</CardDescription>
</CardHeader>
<CardContent className="grid gap-6 md:grid-cols-2">
<FormField
control={form.control}
name="name"
render={({ field }) => (
<FormItem className="md:col-span-2">
<FormLabel>Backup name</FormLabel>
<FormControl>
<Input placeholder="My backup" {...field} />
</FormControl>
<FormDescription>A unique name to identify this backup schedule.</FormDescription>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="repositoryId"