23 Commits

Author SHA1 Message Date
Simon Larsen
b7a0dbf81b refactor: replace action_link with corresponding link variables in notification templates 2025-10-06 18:25:59 +01:00
Simon Larsen
7368a0eb7c Refactor notification links in WhatsApp templates and services
- Updated variable names for links in various services to improve consistency:
  - Changed `*_link_on_dashboard` to `*_link` across multiple services including MonitorService, OnCallDutyPolicyEscalationRuleService, and UserNotificationRuleService.

- Modified WhatsApp template messages to reflect the new link variable names, ensuring that the notifications sent to users contain the correct links.

- Adjusted the link variable names in the WhatsAppTemplateUtil to match the updated naming convention.

- Ensured all related notification jobs (e.g., SendCreatedResourceNotification, SendNotePostedNotification) are updated to use the new link variables for better clarity and maintainability.
2025-10-06 18:07:39 +01:00
Simon Larsen
5391ff4688 Add dashboard links to WhatsApp notifications for various resources
- Added `monitor_link_on_dashboard` to MonitorService notifications.
- Added `on_call_policy_link_on_dashboard` to OnCallDutyPolicyEscalationRule services.
- Added `on_call_schedule_link_on_dashboard` to OnCallDutyPolicyScheduleService.
- Added `probe_link_on_dashboard` to ProbeService notifications.
- Enhanced UserNotificationRuleService to include `alert_link_on_dashboard` and `incident_link_on_dashboard`.
- Updated WhatsApp templates to include links to the OneUptime dashboard for alerts, incidents, monitors, probes, scheduled maintenance, and status pages.
- Added `status_page_link_on_dashboard` to StatusPageOwners notifications.
2025-10-06 15:56:12 +01:00
Simon Larsen
cf02842ab1 Refactor WhatsApp message handling across services
- Updated `createWhatsAppMessageFromTemplate` to return a typed `WhatsAppMessagePayload`.
- Added type annotations for `WhatsAppTemplateId` in various services to improve type safety.
- Refactored WhatsApp message creation in `ProbeService`, `UserNotificationRuleService`, `UserNotificationSettingService`, and other worker jobs to ensure consistent typing.
- Enhanced readability and maintainability by using explicit types for event types and WhatsApp message payloads.
- Improved the structure of WhatsApp template ID definitions for better clarity and type inference.
2025-10-06 15:12:29 +01:00
Simon Larsen
84e838a055 refactor: streamline WhatsApp message creation by removing unused template string imports 2025-10-04 13:49:12 +01:00
Simon Larsen
6d6c78e974 feat: Integrate WhatsApp notifications for various alert and incident events
- Added WhatsApp message creation for alert owner notifications in SendCreatedResourceNotification, SendNotePostedNotification, SendOwnerAddedNotification, and SendStateChangeNotification jobs.
- Implemented WhatsApp message functionality for incident owner notifications in SendCreatedResourceNotification, SendNotePostedNotification, SendOwnerAddedNotification, and SendStateChangeNotification jobs.
- Enhanced monitor owner notifications with WhatsApp messages in SendCreatedResourceNotification, SendOwnerAddedNotification, and SendStatusChangeNotification jobs.
- Included WhatsApp message creation for scheduled maintenance owner notifications in SendCreatedResourceNotification, SendNotePostedNotification, SendOwnerAddedNotification, and SendStateChangeNotification jobs.
- Added WhatsApp message functionality for status page owner notifications in SendAnnouncementCreatedNotification, SendCreatedResourceNotification, and SendOwnerAddedNotification jobs.
- Introduced WhatsAppTemplateUtil to manage WhatsApp message templates and creation logic.
2025-10-04 13:22:56 +01:00
Nawaz Dhandala
40d473d195 Refactor push notification message creation for improved readability
- Updated the formatting of push notification message creation across multiple services to enhance code clarity and maintainability.
- Adjusted the structure of function calls to align parameters vertically, making it easier to read and understand.
- Ensured consistent use of line breaks and indentation for better code style adherence.
2025-07-21 16:21:20 +01:00
Simon Larsen
a109ae33e0 refactor: Update push notification creation to use parameter objects for improved clarity and maintainability 2025-07-21 15:33:28 +01:00
Simon Larsen
934b08d643 feat: Refactor push notification handling by utilizing PushNotificationUtil for consistency and maintainability 2025-07-17 17:59:19 +01:00
Simon Larsen
6e2416910e feat: Add push notification support for on-call policy changes and probe status updates 2025-07-16 19:02:13 +01:00
Simon Larsen
54c526ffed Refactor import paths in utility files to use relative paths instead of absolute paths. This change enhances module resolution and maintains consistency across the codebase. Updated imports in Execute.ts, Express.ts, Greenlock.ts, JsonToCsv.ts, JsonWebToken.ts, LocalFile.ts, Logger.ts, various Monitor criteria files, Realtime.ts, Response.ts, StartServer.ts, Stream.ts, Telemetry.ts, TwoFactorAuth.ts, VMAPI.ts, VMRunner.ts, and Workspace files. 2025-05-21 13:55:49 +01:00
Simon Larsen
4e35c49b73 feat: Save last alive status in cache during probe status checks 2025-05-06 12:34:46 +01:00
Simon Larsen
03ab8768f9 feat: Implement caching for last alive status in ProbeService and update authorization middleware 2025-05-01 13:32:11 +01:00
Simon Larsen
ef23a27971 refactor: Improve code formatting for conditional statements in MonitorService and ProbeService 2025-04-25 09:19:26 +01:00
Simon Larsen
f107fb82d1 refactor: Add isGlobalProbe property to Probe and update notification logic in ProbeService 2025-04-25 09:14:57 +01:00
Simon Larsen
5ecf6d2c70 refactor: remove unnecessary blank lines for improved code readability 2025-03-18 14:17:57 +00:00
Simon Larsen
06e5dac23d feat: add CaptureSpan decorator to various service methods for improved performance tracking 2025-03-18 14:07:34 +00:00
Simon Larsen
b39b9c02bf feat: integrate CaptureSpan decorator into multiple services for enhanced telemetry tracking 2025-03-17 20:18:43 +00:00
Simon Larsen
ba32732ef0 feat: integrate CaptureSpan decorator into multiple monitor criteria classes for improved telemetry tracking 2025-03-17 19:35:51 +00:00
Simon Larsen
c9a69db7f2 refactor: Update import paths for ObjectID and OneUptimeDate in various service files 2024-08-14 22:51:29 +01:00
Simon Larsen
c64c3d7012 refactor: Remove unused imports in ServiceRoute.ts, Index.ts, and various service files 2024-08-13 14:37:23 +01:00
Simon Larsen
8cb15df390 refactor: Update ServiceRoute.ts, BillingService.test.ts, ProjectService.ts, ProjectSsoService.ts, DomainService.ts, GlobalConfigService.ts, ProbeService.ts, AcmeChallengeService.ts, CopilotActionService.ts, StatusPageSsoService.ts, ApiKeyService.ts, ResellerService.ts, and ProbeOwnerTeamService.ts 2024-08-13 14:16:53 +01:00
Simon Larsen
dea6c55365 refactor: Update import statements for CommonUI to use Common/UI 2024-08-07 15:50:32 -06:00