mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
chore: format files
This commit is contained in:
@@ -237,8 +237,7 @@ export const CreateRepositoryForm = ({
|
|||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
Choose whether to use Zerobyte's master password or enter a custom password for the existing
|
Choose whether to use Zerobyte's master password or enter a custom password for the existing repository.
|
||||||
repository.
|
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export const SnapshotFileBrowser = (props: Props) => {
|
|||||||
|
|
||||||
const addBasePath = useCallback(
|
const addBasePath = useCallback(
|
||||||
(displayPath: string): string => {
|
(displayPath: string): string => {
|
||||||
let vbp = volumeBasePath === "/" ? "" : volumeBasePath;
|
const vbp = volumeBasePath === "/" ? "" : volumeBasePath;
|
||||||
|
|
||||||
if (!vbp) return displayPath;
|
if (!vbp) return displayPath;
|
||||||
if (displayPath === "/") return vbp;
|
if (displayPath === "/") return vbp;
|
||||||
|
|||||||
@@ -158,7 +158,10 @@ export default function Notifications({ loaderData }: Route.ComponentProps) {
|
|||||||
<TableCell className="font-medium text-strong-accent">{notification.name}</TableCell>
|
<TableCell className="font-medium text-strong-accent">{notification.name}</TableCell>
|
||||||
<TableCell className="capitalize">{notification.type}</TableCell>
|
<TableCell className="capitalize">{notification.type}</TableCell>
|
||||||
<TableCell className="text-center">
|
<TableCell className="text-center">
|
||||||
<StatusDot variant={notification.enabled ? "success" : "neutral"} label={notification.enabled ? "Enabled" : "Disabled"} />
|
<StatusDot
|
||||||
|
variant={notification.enabled ? "success" : "neutral"}
|
||||||
|
label={notification.enabled ? "Enabled" : "Disabled"}
|
||||||
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -107,10 +107,7 @@ export const RestoreSnapshotForm = ({ formId, onSubmit, className }: Props) => {
|
|||||||
className="h-auto p-0 text-sm font-normal"
|
className="h-auto p-0 text-sm font-normal"
|
||||||
>
|
>
|
||||||
Advanced
|
Advanced
|
||||||
<ChevronDown
|
<ChevronDown size={16} className={`ml-1 transition-transform ${showAdvanced ? "rotate-180" : ""}`} />
|
||||||
size={16}
|
|
||||||
className={`ml-1 transition-transform ${showAdvanced ? "rotate-180" : ""}`}
|
|
||||||
/>
|
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
{showAdvanced && (
|
{showAdvanced && (
|
||||||
|
|||||||
@@ -60,12 +60,8 @@
|
|||||||
"name": "backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk",
|
"name": "backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk",
|
||||||
"tableFrom": "backup_schedule_notifications_table",
|
"tableFrom": "backup_schedule_notifications_table",
|
||||||
"tableTo": "backup_schedules_table",
|
"tableTo": "backup_schedules_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["schedule_id"],
|
||||||
"schedule_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
},
|
},
|
||||||
@@ -73,22 +69,15 @@
|
|||||||
"name": "backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk",
|
"name": "backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk",
|
||||||
"tableFrom": "backup_schedule_notifications_table",
|
"tableFrom": "backup_schedule_notifications_table",
|
||||||
"tableTo": "notification_destinations_table",
|
"tableTo": "notification_destinations_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["destination_id"],
|
||||||
"destination_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"backup_schedule_notifications_table_schedule_id_destination_id_pk": {
|
"backup_schedule_notifications_table_schedule_id_destination_id_pk": {
|
||||||
"columns": [
|
"columns": ["schedule_id", "destination_id"],
|
||||||
"schedule_id",
|
|
||||||
"destination_id"
|
|
||||||
],
|
|
||||||
"name": "backup_schedule_notifications_table_schedule_id_destination_id_pk"
|
"name": "backup_schedule_notifications_table_schedule_id_destination_id_pk"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -208,12 +197,8 @@
|
|||||||
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "volumes_table",
|
"tableTo": "volumes_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["volume_id"],
|
||||||
"volume_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
},
|
},
|
||||||
@@ -221,12 +206,8 @@
|
|||||||
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "repositories_table",
|
"tableTo": "repositories_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["repository_id"],
|
||||||
"repository_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
@@ -294,9 +275,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"notification_destinations_table_name_unique": {
|
"notification_destinations_table_name_unique": {
|
||||||
"name": "notification_destinations_table_name_unique",
|
"name": "notification_destinations_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -386,9 +365,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"repositories_table_name_unique": {
|
"repositories_table_name_unique": {
|
||||||
"name": "repositories_table_name_unique",
|
"name": "repositories_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -436,12 +413,8 @@
|
|||||||
"name": "sessions_table_user_id_users_table_id_fk",
|
"name": "sessions_table_user_id_users_table_id_fk",
|
||||||
"tableFrom": "sessions_table",
|
"tableFrom": "sessions_table",
|
||||||
"tableTo": "users_table",
|
"tableTo": "users_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["user_id"],
|
||||||
"user_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
@@ -502,9 +475,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"users_table_username_unique": {
|
"users_table_username_unique": {
|
||||||
"name": "users_table_username_unique",
|
"name": "users_table_username_unique",
|
||||||
"columns": [
|
"columns": ["username"],
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -595,9 +566,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -60,12 +60,8 @@
|
|||||||
"name": "backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk",
|
"name": "backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk",
|
||||||
"tableFrom": "backup_schedule_notifications_table",
|
"tableFrom": "backup_schedule_notifications_table",
|
||||||
"tableTo": "backup_schedules_table",
|
"tableTo": "backup_schedules_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["schedule_id"],
|
||||||
"schedule_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
},
|
},
|
||||||
@@ -73,22 +69,15 @@
|
|||||||
"name": "backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk",
|
"name": "backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk",
|
||||||
"tableFrom": "backup_schedule_notifications_table",
|
"tableFrom": "backup_schedule_notifications_table",
|
||||||
"tableTo": "notification_destinations_table",
|
"tableTo": "notification_destinations_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["destination_id"],
|
||||||
"destination_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"backup_schedule_notifications_table_schedule_id_destination_id_pk": {
|
"backup_schedule_notifications_table_schedule_id_destination_id_pk": {
|
||||||
"columns": [
|
"columns": ["schedule_id", "destination_id"],
|
||||||
"schedule_id",
|
|
||||||
"destination_id"
|
|
||||||
],
|
|
||||||
"name": "backup_schedule_notifications_table_schedule_id_destination_id_pk"
|
"name": "backup_schedule_notifications_table_schedule_id_destination_id_pk"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -208,12 +197,8 @@
|
|||||||
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "volumes_table",
|
"tableTo": "volumes_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["volume_id"],
|
||||||
"volume_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
},
|
},
|
||||||
@@ -221,12 +206,8 @@
|
|||||||
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "repositories_table",
|
"tableTo": "repositories_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["repository_id"],
|
||||||
"repository_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
@@ -294,9 +275,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"notification_destinations_table_name_unique": {
|
"notification_destinations_table_name_unique": {
|
||||||
"name": "notification_destinations_table_name_unique",
|
"name": "notification_destinations_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -393,16 +372,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"repositories_table_short_id_unique": {
|
"repositories_table_short_id_unique": {
|
||||||
"name": "repositories_table_short_id_unique",
|
"name": "repositories_table_short_id_unique",
|
||||||
"columns": [
|
"columns": ["short_id"],
|
||||||
"short_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"repositories_table_name_unique": {
|
"repositories_table_name_unique": {
|
||||||
"name": "repositories_table_name_unique",
|
"name": "repositories_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -450,12 +425,8 @@
|
|||||||
"name": "sessions_table_user_id_users_table_id_fk",
|
"name": "sessions_table_user_id_users_table_id_fk",
|
||||||
"tableFrom": "sessions_table",
|
"tableFrom": "sessions_table",
|
||||||
"tableTo": "users_table",
|
"tableTo": "users_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["user_id"],
|
||||||
"user_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
@@ -516,9 +487,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"users_table_username_unique": {
|
"users_table_username_unique": {
|
||||||
"name": "users_table_username_unique",
|
"name": "users_table_username_unique",
|
||||||
"columns": [
|
"columns": ["username"],
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -616,16 +585,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_short_id_unique": {
|
"volumes_table_short_id_unique": {
|
||||||
"name": "volumes_table_short_id_unique",
|
"name": "volumes_table_short_id_unique",
|
||||||
"columns": [
|
"columns": ["short_id"],
|
||||||
"short_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -651,4 +651,3 @@
|
|||||||
"indexes": {}
|
"indexes": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,12 +100,8 @@
|
|||||||
"name": "backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk",
|
"name": "backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk",
|
||||||
"tableFrom": "backup_schedule_notifications_table",
|
"tableFrom": "backup_schedule_notifications_table",
|
||||||
"tableTo": "backup_schedules_table",
|
"tableTo": "backup_schedules_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["schedule_id"],
|
||||||
"schedule_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
},
|
},
|
||||||
@@ -113,22 +109,15 @@
|
|||||||
"name": "backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk",
|
"name": "backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk",
|
||||||
"tableFrom": "backup_schedule_notifications_table",
|
"tableFrom": "backup_schedule_notifications_table",
|
||||||
"tableTo": "notification_destinations_table",
|
"tableTo": "notification_destinations_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["destination_id"],
|
||||||
"destination_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"backup_schedule_notifications_table_schedule_id_destination_id_pk": {
|
"backup_schedule_notifications_table_schedule_id_destination_id_pk": {
|
||||||
"columns": [
|
"columns": ["schedule_id", "destination_id"],
|
||||||
"schedule_id",
|
|
||||||
"destination_id"
|
|
||||||
],
|
|
||||||
"name": "backup_schedule_notifications_table_schedule_id_destination_id_pk"
|
"name": "backup_schedule_notifications_table_schedule_id_destination_id_pk"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -248,12 +237,8 @@
|
|||||||
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "volumes_table",
|
"tableTo": "volumes_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["volume_id"],
|
||||||
"volume_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
},
|
},
|
||||||
@@ -261,12 +246,8 @@
|
|||||||
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "repositories_table",
|
"tableTo": "repositories_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["repository_id"],
|
||||||
"repository_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
@@ -334,9 +315,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"notification_destinations_table_name_unique": {
|
"notification_destinations_table_name_unique": {
|
||||||
"name": "notification_destinations_table_name_unique",
|
"name": "notification_destinations_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -433,16 +412,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"repositories_table_short_id_unique": {
|
"repositories_table_short_id_unique": {
|
||||||
"name": "repositories_table_short_id_unique",
|
"name": "repositories_table_short_id_unique",
|
||||||
"columns": [
|
"columns": ["short_id"],
|
||||||
"short_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"repositories_table_name_unique": {
|
"repositories_table_name_unique": {
|
||||||
"name": "repositories_table_name_unique",
|
"name": "repositories_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -490,12 +465,8 @@
|
|||||||
"name": "sessions_table_user_id_users_table_id_fk",
|
"name": "sessions_table_user_id_users_table_id_fk",
|
||||||
"tableFrom": "sessions_table",
|
"tableFrom": "sessions_table",
|
||||||
"tableTo": "users_table",
|
"tableTo": "users_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["user_id"],
|
||||||
"user_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
@@ -556,9 +527,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"users_table_username_unique": {
|
"users_table_username_unique": {
|
||||||
"name": "users_table_username_unique",
|
"name": "users_table_username_unique",
|
||||||
"columns": [
|
"columns": ["username"],
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -656,16 +625,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_short_id_unique": {
|
"volumes_table_short_id_unique": {
|
||||||
"name": "volumes_table_short_id_unique",
|
"name": "volumes_table_short_id_unique",
|
||||||
"columns": [
|
"columns": ["short_id"],
|
||||||
"short_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -100,12 +100,8 @@
|
|||||||
"name": "backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk",
|
"name": "backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk",
|
||||||
"tableFrom": "backup_schedule_notifications_table",
|
"tableFrom": "backup_schedule_notifications_table",
|
||||||
"tableTo": "backup_schedules_table",
|
"tableTo": "backup_schedules_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["schedule_id"],
|
||||||
"schedule_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
},
|
},
|
||||||
@@ -113,22 +109,15 @@
|
|||||||
"name": "backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk",
|
"name": "backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk",
|
||||||
"tableFrom": "backup_schedule_notifications_table",
|
"tableFrom": "backup_schedule_notifications_table",
|
||||||
"tableTo": "notification_destinations_table",
|
"tableTo": "notification_destinations_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["destination_id"],
|
||||||
"destination_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"backup_schedule_notifications_table_schedule_id_destination_id_pk": {
|
"backup_schedule_notifications_table_schedule_id_destination_id_pk": {
|
||||||
"columns": [
|
"columns": ["schedule_id", "destination_id"],
|
||||||
"schedule_id",
|
|
||||||
"destination_id"
|
|
||||||
],
|
|
||||||
"name": "backup_schedule_notifications_table_schedule_id_destination_id_pk"
|
"name": "backup_schedule_notifications_table_schedule_id_destination_id_pk"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -248,12 +237,8 @@
|
|||||||
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "volumes_table",
|
"tableTo": "volumes_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["volume_id"],
|
||||||
"volume_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
},
|
},
|
||||||
@@ -261,12 +246,8 @@
|
|||||||
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "repositories_table",
|
"tableTo": "repositories_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["repository_id"],
|
||||||
"repository_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
@@ -334,9 +315,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"notification_destinations_table_name_unique": {
|
"notification_destinations_table_name_unique": {
|
||||||
"name": "notification_destinations_table_name_unique",
|
"name": "notification_destinations_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -433,16 +412,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"repositories_table_short_id_unique": {
|
"repositories_table_short_id_unique": {
|
||||||
"name": "repositories_table_short_id_unique",
|
"name": "repositories_table_short_id_unique",
|
||||||
"columns": [
|
"columns": ["short_id"],
|
||||||
"short_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"repositories_table_name_unique": {
|
"repositories_table_name_unique": {
|
||||||
"name": "repositories_table_name_unique",
|
"name": "repositories_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -490,12 +465,8 @@
|
|||||||
"name": "sessions_table_user_id_users_table_id_fk",
|
"name": "sessions_table_user_id_users_table_id_fk",
|
||||||
"tableFrom": "sessions_table",
|
"tableFrom": "sessions_table",
|
||||||
"tableTo": "users_table",
|
"tableTo": "users_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["user_id"],
|
||||||
"user_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
@@ -556,9 +527,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"users_table_username_unique": {
|
"users_table_username_unique": {
|
||||||
"name": "users_table_username_unique",
|
"name": "users_table_username_unique",
|
||||||
"columns": [
|
"columns": ["username"],
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -656,16 +625,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_short_id_unique": {
|
"volumes_table_short_id_unique": {
|
||||||
"name": "volumes_table_short_id_unique",
|
"name": "volumes_table_short_id_unique",
|
||||||
"columns": [
|
"columns": ["short_id"],
|
||||||
"short_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -99,36 +99,25 @@
|
|||||||
"backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk": {
|
"backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk": {
|
||||||
"name": "backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk",
|
"name": "backup_schedule_notifications_table_schedule_id_backup_schedules_table_id_fk",
|
||||||
"tableFrom": "backup_schedule_notifications_table",
|
"tableFrom": "backup_schedule_notifications_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["schedule_id"],
|
||||||
"schedule_id"
|
|
||||||
],
|
|
||||||
"tableTo": "backup_schedules_table",
|
"tableTo": "backup_schedules_table",
|
||||||
"columnsTo": [
|
"columnsTo": ["id"],
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onUpdate": "no action",
|
"onUpdate": "no action",
|
||||||
"onDelete": "cascade"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk": {
|
"backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk": {
|
||||||
"name": "backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk",
|
"name": "backup_schedule_notifications_table_destination_id_notification_destinations_table_id_fk",
|
||||||
"tableFrom": "backup_schedule_notifications_table",
|
"tableFrom": "backup_schedule_notifications_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["destination_id"],
|
||||||
"destination_id"
|
|
||||||
],
|
|
||||||
"tableTo": "notification_destinations_table",
|
"tableTo": "notification_destinations_table",
|
||||||
"columnsTo": [
|
"columnsTo": ["id"],
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onUpdate": "no action",
|
"onUpdate": "no action",
|
||||||
"onDelete": "cascade"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {
|
"compositePrimaryKeys": {
|
||||||
"backup_schedule_notifications_table_schedule_id_destination_id_pk": {
|
"backup_schedule_notifications_table_schedule_id_destination_id_pk": {
|
||||||
"columns": [
|
"columns": ["schedule_id", "destination_id"],
|
||||||
"schedule_id",
|
|
||||||
"destination_id"
|
|
||||||
],
|
|
||||||
"name": "backup_schedule_notifications_table_schedule_id_destination_id_pk"
|
"name": "backup_schedule_notifications_table_schedule_id_destination_id_pk"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -247,26 +236,18 @@
|
|||||||
"backup_schedules_table_volume_id_volumes_table_id_fk": {
|
"backup_schedules_table_volume_id_volumes_table_id_fk": {
|
||||||
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["volume_id"],
|
||||||
"volume_id"
|
|
||||||
],
|
|
||||||
"tableTo": "volumes_table",
|
"tableTo": "volumes_table",
|
||||||
"columnsTo": [
|
"columnsTo": ["id"],
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onUpdate": "no action",
|
"onUpdate": "no action",
|
||||||
"onDelete": "cascade"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_schedules_table_repository_id_repositories_table_id_fk": {
|
"backup_schedules_table_repository_id_repositories_table_id_fk": {
|
||||||
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["repository_id"],
|
||||||
"repository_id"
|
|
||||||
],
|
|
||||||
"tableTo": "repositories_table",
|
"tableTo": "repositories_table",
|
||||||
"columnsTo": [
|
"columnsTo": ["id"],
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onUpdate": "no action",
|
"onUpdate": "no action",
|
||||||
"onDelete": "cascade"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
@@ -334,9 +315,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"notification_destinations_table_name_unique": {
|
"notification_destinations_table_name_unique": {
|
||||||
"name": "notification_destinations_table_name_unique",
|
"name": "notification_destinations_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -433,16 +412,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"repositories_table_short_id_unique": {
|
"repositories_table_short_id_unique": {
|
||||||
"name": "repositories_table_short_id_unique",
|
"name": "repositories_table_short_id_unique",
|
||||||
"columns": [
|
"columns": ["short_id"],
|
||||||
"short_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"repositories_table_name_unique": {
|
"repositories_table_name_unique": {
|
||||||
"name": "repositories_table_name_unique",
|
"name": "repositories_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -489,13 +464,9 @@
|
|||||||
"sessions_table_user_id_users_table_id_fk": {
|
"sessions_table_user_id_users_table_id_fk": {
|
||||||
"name": "sessions_table_user_id_users_table_id_fk",
|
"name": "sessions_table_user_id_users_table_id_fk",
|
||||||
"tableFrom": "sessions_table",
|
"tableFrom": "sessions_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["user_id"],
|
||||||
"user_id"
|
|
||||||
],
|
|
||||||
"tableTo": "users_table",
|
"tableTo": "users_table",
|
||||||
"columnsTo": [
|
"columnsTo": ["id"],
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onUpdate": "no action",
|
"onUpdate": "no action",
|
||||||
"onDelete": "cascade"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
@@ -556,9 +527,7 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"users_table_username_unique": {
|
"users_table_username_unique": {
|
||||||
"name": "users_table_username_unique",
|
"name": "users_table_username_unique",
|
||||||
"columns": [
|
"columns": ["username"],
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -656,16 +625,12 @@
|
|||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_short_id_unique": {
|
"volumes_table_short_id_unique": {
|
||||||
"name": "volumes_table_short_id_unique",
|
"name": "volumes_table_short_id_unique",
|
||||||
"columns": [
|
"columns": ["short_id"],
|
||||||
"short_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
},
|
},
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -134,7 +134,10 @@ export class AuthService {
|
|||||||
* Clean up expired sessions
|
* Clean up expired sessions
|
||||||
*/
|
*/
|
||||||
async cleanupExpiredSessions() {
|
async cleanupExpiredSessions() {
|
||||||
const result = await db.delete(sessionsTable).where(lt(sessionsTable.expiresAt, Math.floor(Date.now() / 1000))).returning();
|
const result = await db
|
||||||
|
.delete(sessionsTable)
|
||||||
|
.where(lt(sessionsTable.expiresAt, Math.floor(Date.now() / 1000)))
|
||||||
|
.returning();
|
||||||
if (result.length > 0) {
|
if (result.length > 0) {
|
||||||
logger.info(`Cleaned up ${result.length} expired sessions`);
|
logger.info(`Cleaned up ${result.length} expired sessions`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,7 +209,12 @@ const executeBackup = async (scheduleId: number, manual = false) => {
|
|||||||
|
|
||||||
await db
|
await db
|
||||||
.update(backupSchedulesTable)
|
.update(backupSchedulesTable)
|
||||||
.set({ lastBackupStatus: "in_progress", updatedAt: Math.floor(Date.now() / 1000), lastBackupError: null, nextBackupAt })
|
.set({
|
||||||
|
lastBackupStatus: "in_progress",
|
||||||
|
updatedAt: Math.floor(Date.now() / 1000),
|
||||||
|
lastBackupError: null,
|
||||||
|
nextBackupAt,
|
||||||
|
})
|
||||||
.where(eq(backupSchedulesTable.id, scheduleId));
|
.where(eq(backupSchedulesTable.id, scheduleId));
|
||||||
|
|
||||||
const abortController = new AbortController();
|
const abortController = new AbortController();
|
||||||
|
|||||||
Reference in New Issue
Block a user