diff --git a/components/admin_database.templ b/components/admin_database.templ new file mode 100644 index 0000000..ca95414 --- /dev/null +++ b/components/admin_database.templ @@ -0,0 +1,342 @@ +package components + +import ( + "context" + "time" +) + +// BackupFile represents a database backup file +type BackupFile struct { + Name string + Size string + Created time.Time + FullPath string +} + +// AdminDatabaseTools renders the database tools page with backup and restore functionality +templ AdminDatabaseTools(ctx context.Context, backups []BackupFile) { + @LayoutWithContext("Database Tools", ctx) { +
Manage database backups, restoration and maintenance
+Create a backup of the current database state.
+ +Vacuum the database to reclaim space and optimize performance.
+ +Remove old job history records to free up database space.
+ +Export system configurations and jobs for backup or migration.
+ +| Backup Name | +Size | +Created | +Actions | +
|---|---|---|---|
| + No backups found. Create your first backup to get started. + | +|||
| { backup.Name } | +{ backup.Size } | +{ backup.Created.Format("2006-01-02 15:04:05") } | +
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+