@oneuptime/common 9.4.7 → 9.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/Alert.ts +76 -0
- package/Models/DatabaseModels/AlertEpisode.ts +1201 -0
- package/Models/DatabaseModels/AlertEpisodeFeed.ts +529 -0
- package/Models/DatabaseModels/AlertEpisodeInternalNote.ts +455 -0
- package/Models/DatabaseModels/AlertEpisodeMember.ts +586 -0
- package/Models/DatabaseModels/AlertEpisodeOwnerTeam.ts +421 -0
- package/Models/DatabaseModels/AlertEpisodeOwnerUser.ts +419 -0
- package/Models/DatabaseModels/AlertEpisodeStateTimeline.ts +523 -0
- package/Models/DatabaseModels/AlertFeed.ts +1 -0
- package/Models/DatabaseModels/AlertGroupingRule.ts +1432 -0
- package/Models/DatabaseModels/Index.ts +18 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.ts +70 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.ts +59 -0
- package/Models/DatabaseModels/StatusPageDomain.ts +2 -0
- package/Models/DatabaseModels/UserOnCallLog.ts +48 -0
- package/Models/DatabaseModels/UserOnCallLogTimeline.ts +49 -0
- package/Models/DatabaseModels/WorkspaceNotificationLog.ts +57 -0
- package/Server/API/SlackAPI.ts +21 -0
- package/Server/API/UserOnCallLogTimelineAPI.ts +65 -25
- package/Server/Infrastructure/Postgres/SchemaMigrations/1768938069147-MigrationName.ts +751 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1769125561322-MigrationName.ts +41 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1769170578688-MigrationName.ts +29 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1769172358833-MigrationName.ts +177 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1769176450526-MigrationName.ts +71 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1769190495840-MigrationName.ts +35 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1769199303656-MigrationName.ts +29 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1769202898645-MigrationName.ts +29 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1769428619414-MigrationName.ts +35 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1769428821686-MigrationName.ts +47 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1769469813786-MigrationName.ts +71 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1769517677937-RenameNotificationRuleTypes.ts +67 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +24 -0
- package/Server/Services/AlertEpisodeFeedService.ts +94 -0
- package/Server/Services/AlertEpisodeInternalNoteService.ts +71 -0
- package/Server/Services/AlertEpisodeMemberService.ts +267 -0
- package/Server/Services/AlertEpisodeOwnerTeamService.ts +10 -0
- package/Server/Services/AlertEpisodeOwnerUserService.ts +10 -0
- package/Server/Services/AlertEpisodeService.ts +1096 -0
- package/Server/Services/AlertEpisodeStateTimelineService.ts +557 -0
- package/Server/Services/AlertGroupingEngineService.ts +1120 -0
- package/Server/Services/AlertGroupingRuleService.ts +14 -0
- package/Server/Services/AlertService.ts +12 -0
- package/Server/Services/CallService.ts +2 -0
- package/Server/Services/Index.ts +21 -0
- package/Server/Services/MailService.ts +5 -0
- package/Server/Services/OnCallDutyPolicyEscalationRuleService.ts +18 -1
- package/Server/Services/OnCallDutyPolicyExecutionLogService.ts +64 -2
- package/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.ts +27 -1
- package/Server/Services/OnCallDutyPolicyService.ts +16 -1
- package/Server/Services/PushNotificationService.ts +1 -0
- package/Server/Services/SmsService.ts +2 -0
- package/Server/Services/UserNotificationRuleService.ts +641 -10
- package/Server/Services/UserNotificationSettingService.ts +23 -0
- package/Server/Services/UserOnCallLogService.ts +58 -14
- package/Server/Services/WhatsAppService.ts +5 -0
- package/Server/Services/WorkspaceNotificationRuleService.ts +26 -0
- package/Server/Utils/AnalyticsDatabase/Statement.ts +6 -2
- package/Server/Utils/PushNotificationUtil.ts +75 -16
- package/Server/Utils/WhatsAppTemplateUtil.ts +13 -0
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.ts +18 -0
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.ts +689 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +16 -0
- package/Server/Utils/Workspace/Slack/Actions/ActionTypes.ts +11 -0
- package/Server/Utils/Workspace/Slack/Actions/AlertEpisode.ts +915 -0
- package/Server/Utils/Workspace/Slack/Messages/AlertEpisode.ts +120 -0
- package/Server/Utils/Workspace/WorkspaceMessages/AlertEpisode.ts +74 -0
- package/Tests/Server/Services/AlertEpisodeMemberService.test.ts +200 -0
- package/Tests/Server/Services/AlertEpisodeService.test.ts +240 -0
- package/Tests/Server/Services/AlertGroupingEngineService.test.ts +542 -0
- package/Tests/Server/Services/AlertGroupingRuleService.test.ts +383 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +1 -1
- package/Tests/UI/Components/Input.test.tsx +1 -1
- package/Tests/UI/Components/TextArea.test.tsx +2 -2
- package/Types/BaseDatabase/SortOrder.ts +9 -0
- package/Types/Email/EmailTemplateType.ts +6 -0
- package/Types/NotificationRule/NotificationRuleType.ts +3 -1
- package/Types/NotificationSetting/NotificationSettingEventType.ts +7 -0
- package/Types/Permission.ts +309 -0
- package/Types/UserNotification/UserNotificationEventType.ts +1 -0
- package/Types/WhatsApp/WhatsAppTemplates.ts +24 -0
- package/Types/Workspace/NotificationRules/EventType.ts +1 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.ts +32 -3
- package/UI/Components/Accordion/Accordion.tsx +20 -2
- package/UI/Components/Alerts/Alert.tsx +1 -0
- package/UI/Components/Button/Button.tsx +29 -0
- package/UI/Components/CardSelect/CardSelect.tsx +5 -1
- package/UI/Components/Checkbox/Checkbox.tsx +7 -3
- package/UI/Components/ColorCircle/ColorCircle.tsx +2 -0
- package/UI/Components/ColorViewer/ColorViewer.tsx +19 -3
- package/UI/Components/CopyableButton/CopyableButton.tsx +22 -5
- package/UI/Components/Detail/Detail.tsx +1 -1
- package/UI/Components/Dropdown/Dropdown.tsx +14 -1
- package/UI/Components/Forms/Fields/FormField.tsx +28 -0
- package/UI/Components/FullPageModal/FullPageModal.tsx +35 -4
- package/UI/Components/Input/Input.tsx +14 -2
- package/UI/Components/Link/Link.tsx +1 -0
- package/UI/Components/Loader/Loader.tsx +8 -2
- package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +76 -1
- package/UI/Components/Modal/Modal.tsx +47 -3
- package/UI/Components/ModelTable/BaseModelTable.tsx +42 -1
- package/UI/Components/MoreMenu/MoreMenu.tsx +84 -2
- package/UI/Components/OrderedStatesList/OrderedStatesList.tsx +30 -8
- package/UI/Components/Pagination/Pagination.tsx +113 -8
- package/UI/Components/ProgressBar/ProgressBar.tsx +12 -2
- package/UI/Components/Radio/Radio.tsx +21 -3
- package/UI/Components/SideMenu/CountModelSideMenuItem.tsx +54 -27
- package/UI/Components/StatusBubble/StatusBubble.tsx +7 -2
- package/UI/Components/Table/TableHeader.tsx +20 -3
- package/UI/Components/Tabs/Tab.tsx +16 -1
- package/UI/Components/Tabs/Tabs.tsx +12 -1
- package/UI/Components/TextArea/TextArea.tsx +12 -2
- package/UI/Components/Toggle/Toggle.tsx +14 -3
- package/UI/Components/Tooltip/Tooltip.tsx +11 -1
- package/UI/Components/TopAlert/TopAlert.tsx +2 -0
- package/build/dist/Models/DatabaseModels/Alert.js +77 -0
- package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertEpisode.js +1225 -0
- package/build/dist/Models/DatabaseModels/AlertEpisode.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeFeed.js +553 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeInternalNote.js +467 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeInternalNote.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeMember.js +607 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeMember.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerTeam.js +437 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerUser.js +436 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeStateTimeline.js +546 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeStateTimeline.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertFeed.js +1 -0
- package/build/dist/Models/DatabaseModels/AlertFeed.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertGroupingRule.js +1437 -0
- package/build/dist/Models/DatabaseModels/AlertGroupingRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Index.js +16 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +69 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +58 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageDomain.js +2 -0
- package/build/dist/Models/DatabaseModels/StatusPageDomain.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserOnCallLog.js +47 -0
- package/build/dist/Models/DatabaseModels/UserOnCallLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserOnCallLogTimeline.js +48 -0
- package/build/dist/Models/DatabaseModels/UserOnCallLogTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkspaceNotificationLog.js +58 -0
- package/build/dist/Models/DatabaseModels/WorkspaceNotificationLog.js.map +1 -1
- package/build/dist/Server/API/SlackAPI.js +18 -0
- package/build/dist/Server/API/SlackAPI.js.map +1 -1
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js +55 -15
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768938069147-MigrationName.js +266 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768938069147-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769125561322-MigrationName.js +20 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769125561322-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769170578688-MigrationName.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769170578688-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769172358833-MigrationName.js +68 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769172358833-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769176450526-MigrationName.js +30 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769176450526-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769190495840-MigrationName.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769190495840-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769199303656-MigrationName.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769199303656-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769202898645-MigrationName.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769202898645-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428619414-MigrationName.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428619414-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428821686-MigrationName.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428821686-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769469813786-MigrationName.js +30 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769469813786-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769517677937-RenameNotificationRuleTypes.js +67 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769517677937-RenameNotificationRuleTypes.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +24 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeFeedService.js +83 -0
- package/build/dist/Server/Services/AlertEpisodeFeedService.js.map +1 -0
- package/build/dist/Server/Services/AlertEpisodeInternalNoteService.js +70 -0
- package/build/dist/Server/Services/AlertEpisodeInternalNoteService.js.map +1 -0
- package/build/dist/Server/Services/AlertEpisodeMemberService.js +256 -0
- package/build/dist/Server/Services/AlertEpisodeMemberService.js.map +1 -0
- package/build/dist/Server/Services/AlertEpisodeOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/AlertEpisodeOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/AlertEpisodeOwnerUserService.js +9 -0
- package/build/dist/Server/Services/AlertEpisodeOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/AlertEpisodeService.js +973 -0
- package/build/dist/Server/Services/AlertEpisodeService.js.map +1 -0
- package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js +494 -0
- package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js.map +1 -0
- package/build/dist/Server/Services/AlertGroupingEngineService.js +893 -0
- package/build/dist/Server/Services/AlertGroupingEngineService.js.map +1 -0
- package/build/dist/Server/Services/AlertGroupingRuleService.js +13 -0
- package/build/dist/Server/Services/AlertGroupingRuleService.js.map +1 -0
- package/build/dist/Server/Services/AlertService.js +11 -0
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/CallService.js +11 -10
- package/build/dist/Server/Services/CallService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +18 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/MailService.js +3 -0
- package/build/dist/Server/Services/MailService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js +10 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js +49 -2
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js +21 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyService.js +9 -1
- package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
- package/build/dist/Server/Services/PushNotificationService.js.map +1 -1
- package/build/dist/Server/Services/SmsService.js +11 -10
- package/build/dist/Server/Services/SmsService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationRuleService.js +521 -43
- package/build/dist/Server/Services/UserNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationSettingService.js +9 -0
- package/build/dist/Server/Services/UserNotificationSettingService.js.map +1 -1
- package/build/dist/Server/Services/UserOnCallLogService.js +48 -12
- package/build/dist/Server/Services/UserOnCallLogService.js.map +1 -1
- package/build/dist/Server/Services/WhatsAppService.js +3 -0
- package/build/dist/Server/Services/WhatsAppService.js.map +1 -1
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +25 -0
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js +4 -2
- package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js.map +1 -1
- package/build/dist/Server/Utils/PushNotificationUtil.js +51 -16
- package/build/dist/Server/Utils/PushNotificationUtil.js.map +1 -1
- package/build/dist/Server/Utils/WhatsAppTemplateUtil.js +8 -0
- package/build/dist/Server/Utils/WhatsAppTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js +17 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js +545 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +13 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js +10 -0
- package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js +651 -0
- package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/Slack/Messages/AlertEpisode.js +100 -0
- package/build/dist/Server/Utils/Workspace/Slack/Messages/AlertEpisode.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/WorkspaceMessages/AlertEpisode.js +70 -0
- package/build/dist/Server/Utils/Workspace/WorkspaceMessages/AlertEpisode.js.map +1 -0
- package/build/dist/Tests/Server/Services/AlertEpisodeMemberService.test.js +165 -0
- package/build/dist/Tests/Server/Services/AlertEpisodeMemberService.test.js.map +1 -0
- package/build/dist/Tests/Server/Services/AlertEpisodeService.test.js +193 -0
- package/build/dist/Tests/Server/Services/AlertEpisodeService.test.js.map +1 -0
- package/build/dist/Tests/Server/Services/AlertGroupingEngineService.test.js +412 -0
- package/build/dist/Tests/Server/Services/AlertGroupingEngineService.test.js.map +1 -0
- package/build/dist/Tests/Server/Services/AlertGroupingRuleService.test.js +308 -0
- package/build/dist/Tests/Server/Services/AlertGroupingRuleService.test.js.map +1 -0
- package/build/dist/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.js +1 -1
- package/build/dist/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/Input.test.js +1 -1
- package/build/dist/Tests/UI/Components/Input.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/TextArea.test.js +2 -2
- package/build/dist/Tests/UI/Components/TextArea.test.js.map +1 -1
- package/build/dist/Types/BaseDatabase/SortOrder.js +5 -0
- package/build/dist/Types/BaseDatabase/SortOrder.js.map +1 -1
- package/build/dist/Types/Email/EmailTemplateType.js +5 -0
- package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
- package/build/dist/Types/NotificationRule/NotificationRuleType.js +3 -1
- package/build/dist/Types/NotificationRule/NotificationRuleType.js.map +1 -1
- package/build/dist/Types/NotificationSetting/NotificationSettingEventType.js +5 -0
- package/build/dist/Types/NotificationSetting/NotificationSettingEventType.js.map +1 -1
- package/build/dist/Types/Permission.js +264 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/UserNotification/UserNotificationEventType.js +1 -0
- package/build/dist/Types/UserNotification/UserNotificationEventType.js.map +1 -1
- package/build/dist/Types/WhatsApp/WhatsAppTemplates.js +15 -0
- package/build/dist/Types/WhatsApp/WhatsAppTemplates.js.map +1 -1
- package/build/dist/Types/Workspace/NotificationRules/EventType.js +1 -0
- package/build/dist/Types/Workspace/NotificationRules/EventType.js.map +1 -1
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js +28 -3
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js.map +1 -1
- package/build/dist/UI/Components/Accordion/Accordion.js +10 -3
- package/build/dist/UI/Components/Accordion/Accordion.js.map +1 -1
- package/build/dist/UI/Components/Alerts/Alert.js +1 -1
- package/build/dist/UI/Components/Alerts/Alert.js.map +1 -1
- package/build/dist/UI/Components/Button/Button.js +8 -2
- package/build/dist/UI/Components/Button/Button.js.map +1 -1
- package/build/dist/UI/Components/CardSelect/CardSelect.js +1 -1
- package/build/dist/UI/Components/CardSelect/CardSelect.js.map +1 -1
- package/build/dist/UI/Components/Checkbox/Checkbox.js +2 -2
- package/build/dist/UI/Components/Checkbox/Checkbox.js.map +1 -1
- package/build/dist/UI/Components/ColorCircle/ColorCircle.js +1 -1
- package/build/dist/UI/Components/ColorCircle/ColorCircle.js.map +1 -1
- package/build/dist/UI/Components/ColorViewer/ColorViewer.js +12 -3
- package/build/dist/UI/Components/ColorViewer/ColorViewer.js.map +1 -1
- package/build/dist/UI/Components/CopyableButton/CopyableButton.js +12 -5
- package/build/dist/UI/Components/CopyableButton/CopyableButton.js.map +1 -1
- package/build/dist/UI/Components/Detail/Detail.js +1 -1
- package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
- package/build/dist/UI/Components/Dropdown/Dropdown.js +5 -3
- package/build/dist/UI/Components/Dropdown/Dropdown.js.map +1 -1
- package/build/dist/UI/Components/Forms/Fields/FormField.js +19 -1
- package/build/dist/UI/Components/Forms/Fields/FormField.js.map +1 -1
- package/build/dist/UI/Components/FullPageModal/FullPageModal.js +24 -5
- package/build/dist/UI/Components/FullPageModal/FullPageModal.js.map +1 -1
- package/build/dist/UI/Components/Input/Input.js +3 -3
- package/build/dist/UI/Components/Input/Input.js.map +1 -1
- package/build/dist/UI/Components/Link/Link.js +1 -1
- package/build/dist/UI/Components/Link/Link.js.map +1 -1
- package/build/dist/UI/Components/Loader/Loader.js +6 -4
- package/build/dist/UI/Components/Loader/Loader.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +56 -3
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
- package/build/dist/UI/Components/Modal/Modal.js +28 -3
- package/build/dist/UI/Components/Modal/Modal.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +23 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenu.js +67 -6
- package/build/dist/UI/Components/MoreMenu/MoreMenu.js.map +1 -1
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js +14 -3
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js.map +1 -1
- package/build/dist/UI/Components/Pagination/Pagination.js +69 -13
- package/build/dist/UI/Components/Pagination/Pagination.js.map +1 -1
- package/build/dist/UI/Components/ProgressBar/ProgressBar.js +2 -2
- package/build/dist/UI/Components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/dist/UI/Components/Radio/Radio.js +8 -5
- package/build/dist/UI/Components/Radio/Radio.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/CountModelSideMenuItem.js +23 -4
- package/build/dist/UI/Components/SideMenu/CountModelSideMenuItem.js.map +1 -1
- package/build/dist/UI/Components/StatusBubble/StatusBubble.js +2 -2
- package/build/dist/UI/Components/StatusBubble/StatusBubble.js.map +1 -1
- package/build/dist/UI/Components/Table/TableHeader.js +12 -4
- package/build/dist/UI/Components/Table/TableHeader.js.map +1 -1
- package/build/dist/UI/Components/Tabs/Tab.js +8 -1
- package/build/dist/UI/Components/Tabs/Tab.js.map +1 -1
- package/build/dist/UI/Components/Tabs/Tabs.js +4 -3
- package/build/dist/UI/Components/Tabs/Tabs.js.map +1 -1
- package/build/dist/UI/Components/TextArea/TextArea.js +3 -3
- package/build/dist/UI/Components/TextArea/TextArea.js.map +1 -1
- package/build/dist/UI/Components/Toggle/Toggle.js +7 -4
- package/build/dist/UI/Components/Toggle/Toggle.js.map +1 -1
- package/build/dist/UI/Components/Tooltip/Tooltip.js +4 -1
- package/build/dist/UI/Components/Tooltip/Tooltip.js.map +1 -1
- package/build/dist/UI/Components/TopAlert/TopAlert.js +1 -1
- package/build/dist/UI/Components/TopAlert/TopAlert.js.map +1 -1
- package/package.json +2 -1
|
@@ -189,6 +189,15 @@ import AlertSeverity from "./AlertSeverity";
|
|
|
189
189
|
import AlertNoteTemplate from "./AlertNoteTemplate";
|
|
190
190
|
import AlertFeed from "./AlertFeed";
|
|
191
191
|
|
|
192
|
+
import AlertEpisode from "./AlertEpisode";
|
|
193
|
+
import AlertEpisodeMember from "./AlertEpisodeMember";
|
|
194
|
+
import AlertEpisodeStateTimeline from "./AlertEpisodeStateTimeline";
|
|
195
|
+
import AlertEpisodeOwnerUser from "./AlertEpisodeOwnerUser";
|
|
196
|
+
import AlertEpisodeOwnerTeam from "./AlertEpisodeOwnerTeam";
|
|
197
|
+
import AlertEpisodeInternalNote from "./AlertEpisodeInternalNote";
|
|
198
|
+
import AlertEpisodeFeed from "./AlertEpisodeFeed";
|
|
199
|
+
import AlertGroupingRule from "./AlertGroupingRule";
|
|
200
|
+
|
|
192
201
|
import TableView from "./TableView";
|
|
193
202
|
import Dashboard from "./Dashboard";
|
|
194
203
|
|
|
@@ -273,6 +282,15 @@ const AllModelTypes: Array<{
|
|
|
273
282
|
AlertSeverity,
|
|
274
283
|
AlertNoteTemplate,
|
|
275
284
|
|
|
285
|
+
AlertEpisode,
|
|
286
|
+
AlertEpisodeMember,
|
|
287
|
+
AlertEpisodeStateTimeline,
|
|
288
|
+
AlertEpisodeOwnerUser,
|
|
289
|
+
AlertEpisodeOwnerTeam,
|
|
290
|
+
AlertEpisodeInternalNote,
|
|
291
|
+
AlertEpisodeFeed,
|
|
292
|
+
AlertGroupingRule,
|
|
293
|
+
|
|
276
294
|
MonitorStatusTimeline,
|
|
277
295
|
|
|
278
296
|
File,
|
|
@@ -25,6 +25,7 @@ import Permission from "../../Types/Permission";
|
|
|
25
25
|
import UserNotificationEventType from "../../Types/UserNotification/UserNotificationEventType";
|
|
26
26
|
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
27
27
|
import Alert from "./Alert";
|
|
28
|
+
import AlertEpisode from "./AlertEpisode";
|
|
28
29
|
import EnableWorkflow from "../../Types/Database/EnableWorkflow";
|
|
29
30
|
|
|
30
31
|
@TableBillingAccessControl({
|
|
@@ -342,6 +343,75 @@ export default class OnCallDutyPolicyExecutionLog extends BaseModel {
|
|
|
342
343
|
})
|
|
343
344
|
public triggeredByAlertId?: ObjectID = undefined;
|
|
344
345
|
|
|
346
|
+
@ColumnAccessControl({
|
|
347
|
+
create: [
|
|
348
|
+
Permission.ProjectOwner,
|
|
349
|
+
Permission.ProjectAdmin,
|
|
350
|
+
Permission.ProjectMember,
|
|
351
|
+
Permission.CreateProjectOnCallDutyPolicyExecutionLog,
|
|
352
|
+
],
|
|
353
|
+
read: [
|
|
354
|
+
Permission.ProjectOwner,
|
|
355
|
+
Permission.ProjectAdmin,
|
|
356
|
+
Permission.ProjectMember,
|
|
357
|
+
Permission.ReadProjectOnCallDutyPolicyExecutionLog,
|
|
358
|
+
],
|
|
359
|
+
update: [],
|
|
360
|
+
})
|
|
361
|
+
@TableColumn({
|
|
362
|
+
manyToOneRelationColumn: "triggeredByAlertEpisodeId",
|
|
363
|
+
type: TableColumnType.Entity,
|
|
364
|
+
modelType: AlertEpisode,
|
|
365
|
+
title: "Triggered By Alert Episode",
|
|
366
|
+
description:
|
|
367
|
+
"Relation to the alert episode which triggered this on-call escalation policy.",
|
|
368
|
+
})
|
|
369
|
+
@ManyToOne(
|
|
370
|
+
() => {
|
|
371
|
+
return AlertEpisode;
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
eager: false,
|
|
375
|
+
nullable: true,
|
|
376
|
+
onDelete: "CASCADE",
|
|
377
|
+
orphanedRowAction: "nullify",
|
|
378
|
+
},
|
|
379
|
+
)
|
|
380
|
+
@JoinColumn({ name: "triggeredByAlertEpisodeId" })
|
|
381
|
+
public triggeredByAlertEpisode?: AlertEpisode = undefined;
|
|
382
|
+
|
|
383
|
+
@ColumnAccessControl({
|
|
384
|
+
create: [
|
|
385
|
+
Permission.ProjectOwner,
|
|
386
|
+
Permission.ProjectAdmin,
|
|
387
|
+
Permission.ProjectMember,
|
|
388
|
+
Permission.CreateProjectOnCallDutyPolicyExecutionLog,
|
|
389
|
+
],
|
|
390
|
+
read: [
|
|
391
|
+
Permission.ProjectOwner,
|
|
392
|
+
Permission.ProjectAdmin,
|
|
393
|
+
Permission.ProjectMember,
|
|
394
|
+
Permission.ReadProjectOnCallDutyPolicyExecutionLog,
|
|
395
|
+
],
|
|
396
|
+
update: [],
|
|
397
|
+
})
|
|
398
|
+
@Index()
|
|
399
|
+
@TableColumn({
|
|
400
|
+
type: TableColumnType.ObjectID,
|
|
401
|
+
required: false,
|
|
402
|
+
canReadOnRelationQuery: true,
|
|
403
|
+
title: "Triggered By Alert Episode ID",
|
|
404
|
+
description:
|
|
405
|
+
"ID of the alert episode which triggered this on-call escalation policy.",
|
|
406
|
+
example: "a7b8c9d0-e1f2-3456-0123-567890123456",
|
|
407
|
+
})
|
|
408
|
+
@Column({
|
|
409
|
+
type: ColumnType.ObjectID,
|
|
410
|
+
nullable: true,
|
|
411
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
412
|
+
})
|
|
413
|
+
public triggeredByAlertEpisodeId?: ObjectID = undefined;
|
|
414
|
+
|
|
345
415
|
@ColumnAccessControl({
|
|
346
416
|
create: [
|
|
347
417
|
Permission.ProjectOwner,
|
|
@@ -27,6 +27,7 @@ import Permission from "../../Types/Permission";
|
|
|
27
27
|
import UserNotificationEventType from "../../Types/UserNotification/UserNotificationEventType";
|
|
28
28
|
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
29
29
|
import Alert from "./Alert";
|
|
30
|
+
import AlertEpisode from "./AlertEpisode";
|
|
30
31
|
|
|
31
32
|
@TableBillingAccessControl({
|
|
32
33
|
create: PlanType.Growth,
|
|
@@ -288,6 +289,64 @@ export default class OnCallDutyPolicyExecutionLogTimeline extends BaseModel {
|
|
|
288
289
|
})
|
|
289
290
|
public triggeredByAlertId?: ObjectID = undefined;
|
|
290
291
|
|
|
292
|
+
@ColumnAccessControl({
|
|
293
|
+
create: [],
|
|
294
|
+
read: [
|
|
295
|
+
Permission.ProjectOwner,
|
|
296
|
+
Permission.ProjectAdmin,
|
|
297
|
+
Permission.ProjectMember,
|
|
298
|
+
Permission.ReadProjectOnCallDutyPolicyExecutionLogTimeline,
|
|
299
|
+
],
|
|
300
|
+
update: [],
|
|
301
|
+
})
|
|
302
|
+
@TableColumn({
|
|
303
|
+
manyToOneRelationColumn: "triggeredByAlertEpisodeId",
|
|
304
|
+
type: TableColumnType.Entity,
|
|
305
|
+
modelType: AlertEpisode,
|
|
306
|
+
title: "Alert Episode",
|
|
307
|
+
description:
|
|
308
|
+
"Relation to Alert Episode Resource in which this object belongs",
|
|
309
|
+
})
|
|
310
|
+
@ManyToOne(
|
|
311
|
+
() => {
|
|
312
|
+
return AlertEpisode;
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
eager: false,
|
|
316
|
+
nullable: true,
|
|
317
|
+
onDelete: "CASCADE",
|
|
318
|
+
orphanedRowAction: "nullify",
|
|
319
|
+
},
|
|
320
|
+
)
|
|
321
|
+
@JoinColumn({ name: "triggeredByAlertEpisodeId" })
|
|
322
|
+
public triggeredByAlertEpisode?: AlertEpisode = undefined;
|
|
323
|
+
|
|
324
|
+
@ColumnAccessControl({
|
|
325
|
+
create: [],
|
|
326
|
+
read: [
|
|
327
|
+
Permission.ProjectOwner,
|
|
328
|
+
Permission.ProjectAdmin,
|
|
329
|
+
Permission.ProjectMember,
|
|
330
|
+
Permission.ReadProjectOnCallDutyPolicyExecutionLogTimeline,
|
|
331
|
+
],
|
|
332
|
+
update: [],
|
|
333
|
+
})
|
|
334
|
+
@Index()
|
|
335
|
+
@TableColumn({
|
|
336
|
+
type: TableColumnType.ObjectID,
|
|
337
|
+
required: false,
|
|
338
|
+
canReadOnRelationQuery: true,
|
|
339
|
+
title: "Alert Episode ID",
|
|
340
|
+
description:
|
|
341
|
+
"ID of your OneUptime Alert Episode in which this object belongs",
|
|
342
|
+
})
|
|
343
|
+
@Column({
|
|
344
|
+
type: ColumnType.ObjectID,
|
|
345
|
+
nullable: true,
|
|
346
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
347
|
+
})
|
|
348
|
+
public triggeredByAlertEpisodeId?: ObjectID = undefined;
|
|
349
|
+
|
|
291
350
|
@ColumnAccessControl({
|
|
292
351
|
create: [],
|
|
293
352
|
read: [
|
|
@@ -495,6 +495,7 @@ export default class StatusPageDomain extends BaseModel {
|
|
|
495
495
|
@TableColumn({
|
|
496
496
|
isDefaultValueColumn: true,
|
|
497
497
|
required: true,
|
|
498
|
+
computed: true,
|
|
498
499
|
type: TableColumnType.Boolean,
|
|
499
500
|
title: "SSL Ordered",
|
|
500
501
|
description: "Is SSL ordered?",
|
|
@@ -526,6 +527,7 @@ export default class StatusPageDomain extends BaseModel {
|
|
|
526
527
|
@TableColumn({
|
|
527
528
|
isDefaultValueColumn: true,
|
|
528
529
|
required: true,
|
|
530
|
+
computed: true,
|
|
529
531
|
type: TableColumnType.Boolean,
|
|
530
532
|
title: "SSL Provisioned",
|
|
531
533
|
description: "Is SSL provisioned?",
|
|
@@ -28,6 +28,7 @@ import Permission from "../../Types/Permission";
|
|
|
28
28
|
import UserNotificationEventType from "../../Types/UserNotification/UserNotificationEventType";
|
|
29
29
|
import UserNotificationExecutionStatus from "../../Types/UserNotification/UserNotificationExecutionStatus";
|
|
30
30
|
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
31
|
+
import AlertEpisode from "./AlertEpisode";
|
|
31
32
|
import Alert from "./Alert";
|
|
32
33
|
|
|
33
34
|
@EnableDocumentation()
|
|
@@ -433,6 +434,53 @@ export default class UserOnCallLog extends BaseModel {
|
|
|
433
434
|
})
|
|
434
435
|
public triggeredByAlertId?: ObjectID = undefined;
|
|
435
436
|
|
|
437
|
+
@ColumnAccessControl({
|
|
438
|
+
create: [],
|
|
439
|
+
read: [Permission.CurrentUser],
|
|
440
|
+
update: [],
|
|
441
|
+
})
|
|
442
|
+
@TableColumn({
|
|
443
|
+
manyToOneRelationColumn: "triggeredByAlertEpisodeId",
|
|
444
|
+
type: TableColumnType.Entity,
|
|
445
|
+
modelType: AlertEpisode,
|
|
446
|
+
title: "Triggered By Alert Episode",
|
|
447
|
+
description:
|
|
448
|
+
"Relation to Alert Episode which triggered this on-call duty policy.",
|
|
449
|
+
})
|
|
450
|
+
@ManyToOne(
|
|
451
|
+
() => {
|
|
452
|
+
return AlertEpisode;
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
eager: false,
|
|
456
|
+
nullable: true,
|
|
457
|
+
onDelete: "CASCADE",
|
|
458
|
+
orphanedRowAction: "nullify",
|
|
459
|
+
},
|
|
460
|
+
)
|
|
461
|
+
@JoinColumn({ name: "triggeredByAlertEpisodeId" })
|
|
462
|
+
public triggeredByAlertEpisode?: AlertEpisode = undefined;
|
|
463
|
+
|
|
464
|
+
@ColumnAccessControl({
|
|
465
|
+
create: [],
|
|
466
|
+
read: [Permission.CurrentUser],
|
|
467
|
+
update: [],
|
|
468
|
+
})
|
|
469
|
+
@TableColumn({
|
|
470
|
+
type: TableColumnType.ObjectID,
|
|
471
|
+
title: "Triggered By Alert Episode ID",
|
|
472
|
+
required: false,
|
|
473
|
+
description:
|
|
474
|
+
"ID of the Alert Episode which triggered this on-call escalation policy.",
|
|
475
|
+
example: "3c4d5e6f-7a8b-9c0d-1e2f-3a4b5c6d7e8f",
|
|
476
|
+
})
|
|
477
|
+
@Column({
|
|
478
|
+
type: ColumnType.ObjectID,
|
|
479
|
+
nullable: true,
|
|
480
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
481
|
+
})
|
|
482
|
+
public triggeredByAlertEpisodeId?: ObjectID = undefined;
|
|
483
|
+
|
|
436
484
|
@ColumnAccessControl({
|
|
437
485
|
create: [],
|
|
438
486
|
read: [Permission.CurrentUser],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Incident from "./Incident";
|
|
2
2
|
import Alert from "./Alert";
|
|
3
|
+
import AlertEpisode from "./AlertEpisode";
|
|
3
4
|
import OnCallDutyPolicy from "./OnCallDutyPolicy";
|
|
4
5
|
import OnCallDutyPolicyEscalationRule from "./OnCallDutyPolicyEscalationRule";
|
|
5
6
|
import OnCallDutyPolicyExecutionLog from "./OnCallDutyPolicyExecutionLog";
|
|
@@ -389,6 +390,54 @@ export default class UserOnCallLogTimeline extends BaseModel {
|
|
|
389
390
|
})
|
|
390
391
|
public triggeredByAlertId?: ObjectID = undefined;
|
|
391
392
|
|
|
393
|
+
@ColumnAccessControl({
|
|
394
|
+
create: [],
|
|
395
|
+
read: [Permission.CurrentUser],
|
|
396
|
+
update: [],
|
|
397
|
+
})
|
|
398
|
+
@TableColumn({
|
|
399
|
+
manyToOneRelationColumn: "triggeredByAlertEpisodeId",
|
|
400
|
+
type: TableColumnType.Entity,
|
|
401
|
+
modelType: AlertEpisode,
|
|
402
|
+
title: "Alert Episode",
|
|
403
|
+
description:
|
|
404
|
+
"Relation to Alert Episode Resource in which this object belongs",
|
|
405
|
+
})
|
|
406
|
+
@ManyToOne(
|
|
407
|
+
() => {
|
|
408
|
+
return AlertEpisode;
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
eager: false,
|
|
412
|
+
nullable: true,
|
|
413
|
+
onDelete: "CASCADE",
|
|
414
|
+
orphanedRowAction: "nullify",
|
|
415
|
+
},
|
|
416
|
+
)
|
|
417
|
+
@JoinColumn({ name: "triggeredByAlertEpisodeId" })
|
|
418
|
+
public triggeredByAlertEpisode?: AlertEpisode = undefined;
|
|
419
|
+
|
|
420
|
+
@ColumnAccessControl({
|
|
421
|
+
create: [],
|
|
422
|
+
read: [Permission.CurrentUser],
|
|
423
|
+
update: [],
|
|
424
|
+
})
|
|
425
|
+
@Index()
|
|
426
|
+
@TableColumn({
|
|
427
|
+
type: TableColumnType.ObjectID,
|
|
428
|
+
required: false,
|
|
429
|
+
canReadOnRelationQuery: true,
|
|
430
|
+
title: "Alert Episode ID",
|
|
431
|
+
description:
|
|
432
|
+
"ID of your OneUptime Alert Episode in which this object belongs",
|
|
433
|
+
})
|
|
434
|
+
@Column({
|
|
435
|
+
type: ColumnType.ObjectID,
|
|
436
|
+
nullable: true,
|
|
437
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
438
|
+
})
|
|
439
|
+
public triggeredByAlertEpisodeId?: ObjectID = undefined;
|
|
440
|
+
|
|
392
441
|
@ColumnAccessControl({
|
|
393
442
|
create: [],
|
|
394
443
|
read: [Permission.CurrentUser],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Project from "./Project";
|
|
2
2
|
import Incident from "./Incident";
|
|
3
3
|
import Alert from "./Alert";
|
|
4
|
+
import AlertEpisode from "./AlertEpisode";
|
|
4
5
|
import ScheduledMaintenance from "./ScheduledMaintenance";
|
|
5
6
|
import StatusPage from "./StatusPage";
|
|
6
7
|
import StatusPageAnnouncement from "./StatusPageAnnouncement";
|
|
@@ -482,6 +483,62 @@ export default class WorkspaceNotificationLog extends BaseModel {
|
|
|
482
483
|
})
|
|
483
484
|
public alertId?: ObjectID = undefined;
|
|
484
485
|
|
|
486
|
+
@ColumnAccessControl({
|
|
487
|
+
create: [],
|
|
488
|
+
read: [
|
|
489
|
+
Permission.ProjectOwner,
|
|
490
|
+
Permission.ProjectAdmin,
|
|
491
|
+
Permission.ProjectMember,
|
|
492
|
+
Permission.ReadPushLog,
|
|
493
|
+
],
|
|
494
|
+
update: [],
|
|
495
|
+
})
|
|
496
|
+
@TableColumn({
|
|
497
|
+
manyToOneRelationColumn: "alertEpisodeId",
|
|
498
|
+
type: TableColumnType.Entity,
|
|
499
|
+
modelType: AlertEpisode,
|
|
500
|
+
title: "Alert Episode",
|
|
501
|
+
description: "Alert Episode associated with this message (if any)",
|
|
502
|
+
})
|
|
503
|
+
@ManyToOne(
|
|
504
|
+
() => {
|
|
505
|
+
return AlertEpisode;
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
eager: false,
|
|
509
|
+
nullable: true,
|
|
510
|
+
onDelete: "CASCADE",
|
|
511
|
+
orphanedRowAction: "nullify",
|
|
512
|
+
},
|
|
513
|
+
)
|
|
514
|
+
@JoinColumn({ name: "alertEpisodeId" })
|
|
515
|
+
public alertEpisode?: AlertEpisode = undefined;
|
|
516
|
+
|
|
517
|
+
@ColumnAccessControl({
|
|
518
|
+
create: [],
|
|
519
|
+
read: [
|
|
520
|
+
Permission.ProjectOwner,
|
|
521
|
+
Permission.ProjectAdmin,
|
|
522
|
+
Permission.ProjectMember,
|
|
523
|
+
Permission.ReadPushLog,
|
|
524
|
+
],
|
|
525
|
+
update: [],
|
|
526
|
+
})
|
|
527
|
+
@Index()
|
|
528
|
+
@TableColumn({
|
|
529
|
+
type: TableColumnType.ObjectID,
|
|
530
|
+
required: false,
|
|
531
|
+
canReadOnRelationQuery: true,
|
|
532
|
+
title: "Alert Episode ID",
|
|
533
|
+
description: "ID of Alert Episode associated with this message (if any)",
|
|
534
|
+
})
|
|
535
|
+
@Column({
|
|
536
|
+
type: ColumnType.ObjectID,
|
|
537
|
+
nullable: true,
|
|
538
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
539
|
+
})
|
|
540
|
+
public alertEpisodeId?: ObjectID = undefined;
|
|
541
|
+
|
|
485
542
|
@ColumnAccessControl({
|
|
486
543
|
create: [],
|
|
487
544
|
read: [
|
package/Server/API/SlackAPI.ts
CHANGED
|
@@ -31,6 +31,7 @@ import SlackAuthAction, {
|
|
|
31
31
|
} from "../Utils/Workspace/Slack/Actions/Auth";
|
|
32
32
|
import SlackIncidentActions from "../Utils/Workspace/Slack/Actions/Incident";
|
|
33
33
|
import SlackAlertActions from "../Utils/Workspace/Slack/Actions/Alert";
|
|
34
|
+
import SlackAlertEpisodeActions from "../Utils/Workspace/Slack/Actions/AlertEpisode";
|
|
34
35
|
import SlackScheduledMaintenanceActions from "../Utils/Workspace/Slack/Actions/ScheduledMaintenance";
|
|
35
36
|
import LIMIT_MAX from "../../Types/Database/LimitMax";
|
|
36
37
|
import SlackMonitorActions from "../Utils/Workspace/Slack/Actions/Monitor";
|
|
@@ -633,6 +634,19 @@ export default class SlackAPI {
|
|
|
633
634
|
});
|
|
634
635
|
}
|
|
635
636
|
|
|
637
|
+
if (
|
|
638
|
+
SlackAlertEpisodeActions.isAlertEpisodeAction({
|
|
639
|
+
actionType: action.actionType,
|
|
640
|
+
})
|
|
641
|
+
) {
|
|
642
|
+
return SlackAlertEpisodeActions.handleAlertEpisodeAction({
|
|
643
|
+
slackRequest: authResult,
|
|
644
|
+
action: action,
|
|
645
|
+
req: req,
|
|
646
|
+
res: res,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
|
|
636
650
|
if (
|
|
637
651
|
SlackMonitorActions.isMonitorAction({
|
|
638
652
|
actionType: action.actionType,
|
|
@@ -816,6 +830,13 @@ export default class SlackAPI {
|
|
|
816
830
|
logger.error(err);
|
|
817
831
|
}
|
|
818
832
|
|
|
833
|
+
try {
|
|
834
|
+
await SlackAlertEpisodeActions.handleEmojiReaction(reactionData);
|
|
835
|
+
} catch (err) {
|
|
836
|
+
logger.error("Error handling alert episode emoji reaction:");
|
|
837
|
+
logger.error(err);
|
|
838
|
+
}
|
|
839
|
+
|
|
819
840
|
try {
|
|
820
841
|
await SlackScheduledMaintenanceActions.handleEmojiReaction(
|
|
821
842
|
reactionData,
|
|
@@ -137,6 +137,11 @@ export default class UserNotificationLogTimelineAPI extends BaseAPI<
|
|
|
137
137
|
title: true,
|
|
138
138
|
description: true,
|
|
139
139
|
},
|
|
140
|
+
triggeredByAlertEpisodeId: true,
|
|
141
|
+
triggeredByAlertEpisode: {
|
|
142
|
+
title: true,
|
|
143
|
+
description: true,
|
|
144
|
+
},
|
|
140
145
|
},
|
|
141
146
|
props: {
|
|
142
147
|
isRoot: true,
|
|
@@ -153,7 +158,15 @@ export default class UserNotificationLogTimelineAPI extends BaseAPI<
|
|
|
153
158
|
|
|
154
159
|
const notificationType: string = timelineItem.triggeredByIncidentId
|
|
155
160
|
? "Incident"
|
|
156
|
-
:
|
|
161
|
+
: timelineItem.triggeredByAlertEpisodeId
|
|
162
|
+
? "Alert Episode"
|
|
163
|
+
: "Alert";
|
|
164
|
+
|
|
165
|
+
const notificationTitle: string =
|
|
166
|
+
timelineItem.triggeredByIncident?.title ||
|
|
167
|
+
timelineItem.triggeredByAlertEpisode?.title ||
|
|
168
|
+
timelineItem.triggeredByAlert?.title ||
|
|
169
|
+
"";
|
|
157
170
|
|
|
158
171
|
const host: Hostname = await DatabaseConfig.getHost();
|
|
159
172
|
const httpProtocol: Protocol = await DatabaseConfig.getHttpProtocol();
|
|
@@ -163,7 +176,7 @@ export default class UserNotificationLogTimelineAPI extends BaseAPI<
|
|
|
163
176
|
res,
|
|
164
177
|
"/usr/src/Common/Server/Views/AcknowledgeUserOnCallNotification.ejs",
|
|
165
178
|
{
|
|
166
|
-
title: `Acknowledge ${notificationType} - ${
|
|
179
|
+
title: `Acknowledge ${notificationType} - ${notificationTitle}`,
|
|
167
180
|
message: `Do you want to acknowledge this ${notificationType}?`,
|
|
168
181
|
acknowledgeText: `Acknowledge ${notificationType}`,
|
|
169
182
|
acknowledgeUrl: new URL(
|
|
@@ -208,12 +221,16 @@ export default class UserNotificationLogTimelineAPI extends BaseAPI<
|
|
|
208
221
|
projectId: true,
|
|
209
222
|
triggeredByIncidentId: true,
|
|
210
223
|
triggeredByAlertId: true,
|
|
224
|
+
triggeredByAlertEpisodeId: true,
|
|
211
225
|
triggeredByAlert: {
|
|
212
226
|
title: true,
|
|
213
227
|
},
|
|
214
228
|
triggeredByIncident: {
|
|
215
229
|
title: true,
|
|
216
230
|
},
|
|
231
|
+
triggeredByAlertEpisode: {
|
|
232
|
+
title: true,
|
|
233
|
+
},
|
|
217
234
|
acknowledgedAt: true,
|
|
218
235
|
isAcknowledged: true,
|
|
219
236
|
},
|
|
@@ -233,13 +250,51 @@ export default class UserNotificationLogTimelineAPI extends BaseAPI<
|
|
|
233
250
|
const host: Hostname = await DatabaseConfig.getHost();
|
|
234
251
|
const httpProtocol: Protocol = await DatabaseConfig.getHttpProtocol();
|
|
235
252
|
|
|
253
|
+
// Determine the resource type and ID for routing
|
|
254
|
+
type ResourceInfo = {
|
|
255
|
+
type: string;
|
|
256
|
+
path: string;
|
|
257
|
+
id: ObjectID;
|
|
258
|
+
title: string;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
const getResourceInfo: () => ResourceInfo = (): ResourceInfo => {
|
|
262
|
+
if (timelineItem.triggeredByIncidentId) {
|
|
263
|
+
return {
|
|
264
|
+
type: "Incident",
|
|
265
|
+
path: "incidents",
|
|
266
|
+
id: timelineItem.triggeredByIncidentId,
|
|
267
|
+
title: timelineItem.triggeredByIncident?.title || "",
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
if (timelineItem.triggeredByAlertEpisodeId) {
|
|
271
|
+
return {
|
|
272
|
+
type: "Alert Episode",
|
|
273
|
+
path: "alert-episodes",
|
|
274
|
+
id: timelineItem.triggeredByAlertEpisodeId,
|
|
275
|
+
title: timelineItem.triggeredByAlertEpisode?.title || "",
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
if (timelineItem.triggeredByAlertId) {
|
|
279
|
+
return {
|
|
280
|
+
type: "Alert",
|
|
281
|
+
path: "alerts",
|
|
282
|
+
id: timelineItem.triggeredByAlertId,
|
|
283
|
+
title: timelineItem.triggeredByAlert?.title || "",
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
return { type: "", path: "", id: new ObjectID(""), title: "" };
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
const resourceInfo: ResourceInfo = getResourceInfo();
|
|
290
|
+
|
|
236
291
|
if (timelineItem.isAcknowledged) {
|
|
237
292
|
// already acknowledged. Then show already acknowledged page with view details button.
|
|
238
293
|
|
|
239
294
|
const viewDetailsRoute: Route = new Route(
|
|
240
295
|
DashboardRoute.toString(),
|
|
241
296
|
).addRoute(
|
|
242
|
-
`/${timelineItem.projectId?.toString()}/${
|
|
297
|
+
`/${timelineItem.projectId?.toString()}/${resourceInfo.path}/${resourceInfo.id.toString()}`,
|
|
243
298
|
);
|
|
244
299
|
|
|
245
300
|
const viewDetailsUrl: URL = new URL(
|
|
@@ -253,9 +308,9 @@ export default class UserNotificationLogTimelineAPI extends BaseAPI<
|
|
|
253
308
|
res,
|
|
254
309
|
"/usr/src/Common/Server/Views/ViewMessage.ejs",
|
|
255
310
|
{
|
|
256
|
-
title: `Notification Already Acknowledged - ${
|
|
311
|
+
title: `Notification Already Acknowledged - ${resourceInfo.title}`,
|
|
257
312
|
message: `This notification has already been acknowledged.`,
|
|
258
|
-
viewDetailsText: `View ${
|
|
313
|
+
viewDetailsText: `View ${resourceInfo.type}`,
|
|
259
314
|
viewDetailsUrl: viewDetailsUrl.toString(),
|
|
260
315
|
},
|
|
261
316
|
);
|
|
@@ -274,33 +329,18 @@ export default class UserNotificationLogTimelineAPI extends BaseAPI<
|
|
|
274
329
|
},
|
|
275
330
|
});
|
|
276
331
|
|
|
277
|
-
// redirect to dashboard to
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
const incidentRoute: Route = new Route(
|
|
281
|
-
DashboardRoute.toString(),
|
|
282
|
-
).addRoute(
|
|
283
|
-
`/${timelineItem.projectId?.toString()}/incidents/${timelineItem.triggeredByIncidentId!.toString()}`,
|
|
284
|
-
);
|
|
285
|
-
|
|
286
|
-
return Response.redirect(
|
|
287
|
-
req,
|
|
288
|
-
res,
|
|
289
|
-
new URL(httpProtocol, host, incidentRoute),
|
|
290
|
-
);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
if (timelineItem.triggeredByAlertId) {
|
|
294
|
-
const alertRoute: Route = new Route(
|
|
332
|
+
// redirect to dashboard to the resource page.
|
|
333
|
+
if (resourceInfo.path) {
|
|
334
|
+
const resourceRoute: Route = new Route(
|
|
295
335
|
DashboardRoute.toString(),
|
|
296
336
|
).addRoute(
|
|
297
|
-
`/${timelineItem.projectId?.toString()}
|
|
337
|
+
`/${timelineItem.projectId?.toString()}/${resourceInfo.path}/${resourceInfo.id.toString()}`,
|
|
298
338
|
);
|
|
299
339
|
|
|
300
340
|
return Response.redirect(
|
|
301
341
|
req,
|
|
302
342
|
res,
|
|
303
|
-
new URL(httpProtocol, host,
|
|
343
|
+
new URL(httpProtocol, host, resourceRoute),
|
|
304
344
|
);
|
|
305
345
|
}
|
|
306
346
|
|