From 1b8154a74b42860d6879ce0b81f1141a71e0cbb6 Mon Sep 17 00:00:00 2001 From: SaarLAN-Pissbeutel <183202051+SaarLAN-Pissbeutel@users.noreply.github.com> Date: Tue, 30 Dec 2025 11:08:32 +0000 Subject: [PATCH 1/5] add access token for ntfy notifications --- .../components/create-notification-form.tsx | 14 ++++++++++++++ app/schemas/notifications.ts | 1 + app/server/modules/notifications/builders/ntfy.ts | 7 +++++++ 3 files changed, 22 insertions(+) diff --git a/app/client/modules/notifications/components/create-notification-form.tsx b/app/client/modules/notifications/components/create-notification-form.tsx index 01e8dc08..453ffaca 100644 --- a/app/client/modules/notifications/components/create-notification-form.tsx +++ b/app/client/modules/notifications/components/create-notification-form.tsx @@ -518,6 +518,20 @@ export const CreateNotificationForm = ({ onSubmit, mode = "create", initialValue )} /> + ( + + Access token (Optional) + + + + Access token for server authentication, if required. + + + )} + /> Date: Tue, 30 Dec 2025 11:56:13 +0000 Subject: [PATCH 2/5] code cleanup --- app/server/modules/notifications/builders/ntfy.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/server/modules/notifications/builders/ntfy.ts b/app/server/modules/notifications/builders/ntfy.ts index ebc72aeb..14ef9fbe 100644 --- a/app/server/modules/notifications/builders/ntfy.ts +++ b/app/server/modules/notifications/builders/ntfy.ts @@ -5,11 +5,6 @@ export function buildNtfyShoutrrrUrl(config: Extract Date: Tue, 30 Dec 2025 13:06:11 +0100 Subject: [PATCH 3/5] code cleanup Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- app/schemas/notifications.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/schemas/notifications.ts b/app/schemas/notifications.ts index 04ebdfa3..5094f655 100644 --- a/app/schemas/notifications.ts +++ b/app/schemas/notifications.ts @@ -55,7 +55,7 @@ export const ntfyNotificationConfigSchema = type({ priority: "'max' | 'high' | 'default' | 'low' | 'min'", username: "string?", password: "string?", - accessToken:"string?", + accessToken: "string?", }); export const pushoverNotificationConfigSchema = type({ From 94c84d7c58d1dc41097424adaeac78cc1aa21aff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Tr=C3=A1vn=C3=ADk?= Date: Fri, 2 Jan 2026 14:22:03 +0100 Subject: [PATCH 4/5] feat: include schedule name in backup notifications and logs (#215) * feat: include schedule name in backup notifications and logs * lint fixes --- app/server/modules/backups/backups.service.ts | 17 +++++++++++++---- .../notifications/notifications.service.ts | 12 +++++++++++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/app/server/modules/backups/backups.service.ts b/app/server/modules/backups/backups.service.ts index ea2b5fe5..379b9edb 100644 --- a/app/server/modules/backups/backups.service.ts +++ b/app/server/modules/backups/backups.service.ts @@ -236,7 +236,7 @@ const executeBackup = async (scheduleId: number, manual = false) => { throw new BadRequestError("Volume is not mounted"); } - logger.info(`Starting backup for volume ${volume.name} to repository ${repository.name}`); + logger.info(`Starting backup ${schedule.name} for volume ${volume.name} to repository ${repository.name}`); serverEvents.emit("backup:started", { scheduleId, @@ -248,6 +248,7 @@ const executeBackup = async (scheduleId: number, manual = false) => { .sendBackupNotification(scheduleId, "start", { volumeName: volume.name, repositoryName: repository.name, + scheduleName: schedule.name, }) .catch((error) => { logger.error(`Failed to send backup start notification: ${toMessage(error)}`); @@ -341,9 +342,13 @@ const executeBackup = async (scheduleId: number, manual = false) => { .where(eq(backupSchedulesTable.id, scheduleId)); if (finalStatus === "warning") { - logger.warn(`Backup completed with warnings for volume ${volume.name} to repository ${repository.name}`); + logger.warn( + `Backup ${schedule.name} completed with warnings for volume ${volume.name} to repository ${repository.name}`, + ); } else { - logger.info(`Backup completed successfully for volume ${volume.name} to repository ${repository.name}`); + logger.info( + `Backup ${schedule.name} completed successfully for volume ${volume.name} to repository ${repository.name}`, + ); } serverEvents.emit("backup:completed", { @@ -357,12 +362,15 @@ const executeBackup = async (scheduleId: number, manual = false) => { .sendBackupNotification(scheduleId, finalStatus === "success" ? "success" : "warning", { volumeName: volume.name, repositoryName: repository.name, + scheduleName: schedule.name, }) .catch((error) => { logger.error(`Failed to send backup success notification: ${toMessage(error)}`); }); } catch (error) { - logger.error(`Backup failed for volume ${volume.name} to repository ${repository.name}: ${toMessage(error)}`); + logger.error( + `Backup ${schedule.name} failed for volume ${volume.name} to repository ${repository.name}: ${toMessage(error)}`, + ); await db .update(backupSchedulesTable) @@ -385,6 +393,7 @@ const executeBackup = async (scheduleId: number, manual = false) => { .sendBackupNotification(scheduleId, "failure", { volumeName: volume.name, repositoryName: repository.name, + scheduleName: schedule.name, error: toMessage(error), }) .catch((notifError) => { diff --git a/app/server/modules/notifications/notifications.service.ts b/app/server/modules/notifications/notifications.service.ts index 0a7c150e..383f7eeb 100644 --- a/app/server/modules/notifications/notifications.service.ts +++ b/app/server/modules/notifications/notifications.service.ts @@ -388,6 +388,7 @@ function buildNotificationMessage( body: [ `Volume: ${context.volumeName}`, `Repository: ${context.repositoryName}`, + context.scheduleName ? `Schedule: ${context.scheduleName}` : null, context.duration ? `Duration: ${Math.round(context.duration / 1000)}s` : null, context.filesProcessed !== undefined ? `Files: ${context.filesProcessed}` : null, context.bytesProcessed ? `Size: ${context.bytesProcessed}` : null, @@ -404,6 +405,7 @@ function buildNotificationMessage( body: [ `Volume: ${context.volumeName}`, `Repository: ${context.repositoryName}`, + context.scheduleName ? `Schedule: ${context.scheduleName}` : null, context.duration ? `Duration: ${Math.round(context.duration / 1000)}s` : null, context.filesProcessed !== undefined ? `Files: ${context.filesProcessed}` : null, context.bytesProcessed ? `Size: ${context.bytesProcessed}` : null, @@ -421,6 +423,7 @@ function buildNotificationMessage( body: [ `Volume: ${context.volumeName}`, `Repository: ${context.repositoryName}`, + context.scheduleName ? `Schedule: ${context.scheduleName}` : null, context.error ? `Error: ${context.error}` : null, `Time: ${date} - ${time}`, ] @@ -431,7 +434,14 @@ function buildNotificationMessage( default: return { title: "Backup Notification", - body: `Volume: ${context.volumeName}\nRepository: ${context.repositoryName}\nTime: ${date} - ${time}`, + body: [ + `Volume: ${context.volumeName}`, + `Repository: ${context.repositoryName}`, + context.scheduleName ? `Schedule: ${context.scheduleName}` : null, + `Time: ${date} - ${time}`, + ] + .filter(Boolean) + .join("\n"), }; } } From d535f02536539c491c117edf82de62238f0b142f Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Fri, 2 Jan 2026 14:23:21 +0100 Subject: [PATCH 5/5] refactor: code readability --- .../components/create-notification-form.tsx | 4 +++- .../modules/notifications/builders/ntfy.ts | 16 ++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/client/modules/notifications/components/create-notification-form.tsx b/app/client/modules/notifications/components/create-notification-form.tsx index 453ffaca..63697c13 100644 --- a/app/client/modules/notifications/components/create-notification-form.tsx +++ b/app/client/modules/notifications/components/create-notification-form.tsx @@ -527,7 +527,9 @@ export const CreateNotificationForm = ({ onSubmit, mode = "create", initialValue - Access token for server authentication, if required. + + Access token for server authentication. Will take precedence over username/password if set. + )} diff --git a/app/server/modules/notifications/builders/ntfy.ts b/app/server/modules/notifications/builders/ntfy.ts index 14ef9fbe..41120456 100644 --- a/app/server/modules/notifications/builders/ntfy.ts +++ b/app/server/modules/notifications/builders/ntfy.ts @@ -4,13 +4,17 @@ export function buildNtfyShoutrrrUrl(config: Extract