@oneuptime/common 10.0.52 → 10.0.54
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/AnalyticsModels/Metric.ts +78 -0
- package/Server/API/AIAgentDataAPI.ts +6 -1
- package/Server/API/BillingAPI.ts +28 -6
- package/Server/API/CommonAPI.ts +11 -0
- package/Server/API/DashboardAPI.ts +6 -2
- package/Server/API/DashboardDomainAPI.ts +10 -3
- package/Server/API/GitHubAPI.ts +58 -14
- package/Server/API/MicrosoftTeamsAPI.ts +97 -33
- package/Server/API/OpenSourceDeploymentAPI.ts +2 -2
- package/Server/API/SlackAPI.ts +107 -36
- package/Server/API/StatusAPI.ts +37 -16
- package/Server/API/StatusPageAPI.ts +97 -23
- package/Server/API/StatusPageDomainAPI.ts +6 -3
- package/Server/API/TelemetryAPI.ts +81 -0
- package/Server/API/UserAPI.ts +3 -3
- package/Server/API/UserCallAPI.ts +5 -2
- package/Server/API/UserEmailAPI.ts +5 -2
- package/Server/API/UserPushAPI.ts +9 -3
- package/Server/API/UserSmsAPI.ts +5 -2
- package/Server/API/UserWhatsAppAPI.ts +5 -2
- package/Server/Infrastructure/Postgres/SchemaMigrations/1774559064921-MigrationName.ts +47 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1775735059360-MigrationName.ts +35 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +4 -0
- package/Server/Middleware/NotificationMiddleware.ts +2 -2
- package/Server/Middleware/ProjectAuthorization.ts +6 -0
- package/Server/Middleware/SCIMAuthorization.ts +2 -1
- package/Server/Middleware/SlackAuthorization.ts +28 -10
- package/Server/Middleware/TelemetryIngest.ts +16 -3
- package/Server/Middleware/UserAuthorization.ts +22 -5
- package/Server/Middleware/WhatsAppAuthorization.ts +15 -4
- package/Server/Services/AIAgentService.ts +13 -6
- package/Server/Services/AIService.ts +9 -3
- package/Server/Services/AlertEpisodeFeedService.ts +17 -5
- package/Server/Services/AlertEpisodeService.ts +34 -3
- package/Server/Services/AlertEpisodeStateTimelineService.ts +80 -22
- package/Server/Services/AlertFeedService.ts +17 -5
- package/Server/Services/AlertGroupingEngineService.ts +36 -7
- package/Server/Services/AlertService.ts +60 -8
- package/Server/Services/AlertStateTimelineService.ts +29 -7
- package/Server/Services/AnalyticsDatabaseService.ts +59 -25
- package/Server/Services/BillingInvoiceService.ts +7 -3
- package/Server/Services/BillingService.ts +9 -2
- package/Server/Services/DashboardDomainService.ts +56 -22
- package/Server/Services/DashboardService.ts +11 -4
- package/Server/Services/DatabaseService.ts +31 -11
- package/Server/Services/IncidentEpisodeFeedService.ts +17 -5
- package/Server/Services/IncidentEpisodeService.ts +34 -3
- package/Server/Services/IncidentEpisodeStateTimelineService.ts +80 -22
- package/Server/Services/IncidentFeedService.ts +33 -9
- package/Server/Services/IncidentGroupingEngineService.ts +35 -6
- package/Server/Services/IncidentService.ts +103 -9
- package/Server/Services/IncidentSlaRuleService.ts +16 -4
- package/Server/Services/IncidentSlaService.ts +20 -4
- package/Server/Services/IncidentStateTimelineService.ts +120 -31
- package/Server/Services/KubernetesClusterService.ts +62 -14
- package/Server/Services/LabelService.ts +14 -1
- package/Server/Services/MonitorFeedService.ts +33 -9
- package/Server/Services/MonitorProbeService.ts +31 -2
- package/Server/Services/MonitorService.ts +35 -4
- package/Server/Services/MonitorStatusTimelineService.ts +68 -20
- package/Server/Services/NotificationService.ts +4 -2
- package/Server/Services/OnCallDutyPolicyEscalationRuleService.ts +53 -9
- package/Server/Services/OnCallDutyPolicyEscalationRuleUserService.ts +9 -2
- package/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.ts +29 -8
- package/Server/Services/OnCallDutyPolicyFeedService.ts +33 -8
- package/Server/Services/OnCallDutyPolicyScheduleService.ts +97 -24
- package/Server/Services/OnCallDutyPolicyService.ts +2 -1
- package/Server/Services/OpenTelemetryIngestService.ts +51 -20
- package/Server/Services/ProbeService.ts +16 -7
- package/Server/Services/ProjectService.ts +29 -11
- package/Server/Services/ScheduledMaintenanceFeedService.ts +17 -4
- package/Server/Services/ScheduledMaintenanceService.ts +52 -6
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +72 -20
- package/Server/Services/StatusPageDomainService.ts +59 -23
- package/Server/Services/StatusPageService.ts +26 -8
- package/Server/Services/StatusPageSubscriberService.ts +382 -111
- package/Server/Services/TeamMemberService.ts +9 -3
- package/Server/Services/TelemetryAttributeService.ts +117 -4
- package/Server/Services/UserNotificationRuleService.ts +9 -3
- package/Server/Services/UserService.ts +6 -4
- package/Server/Services/UserWhatsAppService.ts +9 -3
- package/Server/Services/WorkflowService.ts +7 -3
- package/Server/Services/WorkspaceNotificationRuleService.ts +398 -156
- package/Server/Types/Domain.ts +15 -5
- package/Server/Types/Workflow/Components/API/Post.ts +22 -8
- package/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.ts +12 -4
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +10 -0
- package/Server/Utils/CodeRepository/CodeRepository.ts +62 -13
- package/Server/Utils/Express.ts +1 -0
- package/Server/Utils/Greenlock/Greenlock.ts +75 -20
- package/Server/Utils/LLM/LLMService.ts +22 -7
- package/Server/Utils/Logger.ts +93 -13
- package/Server/Utils/Monitor/MonitorAlert.ts +15 -3
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +15 -5
- package/Server/Utils/Monitor/MonitorIncident.ts +17 -3
- package/Server/Utils/Monitor/MonitorStatusTimeline.ts +6 -1
- package/Server/Utils/Profiling.ts +11 -5
- package/Server/Utils/Realtime.ts +90 -31
- package/Server/Utils/Response.ts +2 -2
- package/Server/Utils/StartServer.ts +43 -9
- package/Server/Utils/Telemetry/SpanUtil.ts +90 -0
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.ts +58 -15
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.ts +58 -15
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.ts +19 -3
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.ts +87 -22
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.ts +12 -3
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.ts +25 -7
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.ts +55 -8
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +100 -22
- package/Server/Utils/Workspace/Slack/Actions/Alert.ts +35 -9
- package/Server/Utils/Workspace/Slack/Actions/AlertEpisode.ts +32 -8
- package/Server/Utils/Workspace/Slack/Actions/Auth.ts +3 -1
- package/Server/Utils/Workspace/Slack/Actions/Incident.ts +52 -11
- package/Server/Utils/Workspace/Slack/Actions/IncidentEpisode.ts +4 -1
- package/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.ts +89 -20
- package/Server/Utils/Workspace/Slack/Slack.ts +498 -247
- package/Server/Utils/Workspace/Workspace.ts +33 -11
- package/Server/Utils/Workspace/WorkspaceBase.ts +3 -1
- package/Server/Utils/Workspace/WorkspaceMessages/Alert.ts +8 -2
- package/Tests/Server/Middleware/UserAuthorization.test.ts +1 -1
- package/Tests/Server/Services/AnalyticsDatabaseService.test.ts +12 -3
- package/UI/Components/BulkUpdate/BulkUpdateForm.tsx +60 -38
- package/UI/Components/Charts/Area/AreaChart.tsx +35 -1
- package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +7 -0
- package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +33 -0
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +33 -0
- package/UI/Components/Charts/ChartLibrary/Types/FormattedExemplarPoint.ts +14 -0
- package/UI/Components/Charts/Line/LineChart.tsx +35 -1
- package/UI/Components/Charts/Types/ExemplarPoint.ts +6 -0
- package/UI/Components/Dictionary/Dictionary.tsx +13 -1
- package/UI/Components/Filters/FiltersForm.tsx +2 -0
- package/UI/Components/Filters/JSONFilter.tsx +5 -1
- package/UI/Components/Filters/Types/Filter.ts +2 -0
- package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +3 -3
- package/UI/Components/ModelTable/BaseModelTable.tsx +10 -6
- package/UI/Components/Navbar/NavBar.tsx +10 -0
- package/build/dist/Models/AnalyticsModels/Metric.js +70 -0
- package/build/dist/Models/AnalyticsModels/Metric.js.map +1 -1
- package/build/dist/Server/API/AIAgentDataAPI.js +6 -6
- package/build/dist/Server/API/AIAgentDataAPI.js.map +1 -1
- package/build/dist/Server/API/BillingAPI.js +13 -13
- package/build/dist/Server/API/BillingAPI.js.map +1 -1
- package/build/dist/Server/API/CommonAPI.js +5 -0
- package/build/dist/Server/API/CommonAPI.js.map +1 -1
- package/build/dist/Server/API/DashboardAPI.js +2 -2
- package/build/dist/Server/API/DashboardAPI.js.map +1 -1
- package/build/dist/Server/API/DashboardDomainAPI.js +3 -3
- package/build/dist/Server/API/DashboardDomainAPI.js.map +1 -1
- package/build/dist/Server/API/GitHubAPI.js +19 -19
- package/build/dist/Server/API/GitHubAPI.js.map +1 -1
- package/build/dist/Server/API/MicrosoftTeamsAPI.js +34 -34
- package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
- package/build/dist/Server/API/OpenSourceDeploymentAPI.js +2 -2
- package/build/dist/Server/API/OpenSourceDeploymentAPI.js.map +1 -1
- package/build/dist/Server/API/SlackAPI.js +38 -38
- package/build/dist/Server/API/SlackAPI.js.map +1 -1
- package/build/dist/Server/API/StatusAPI.js +16 -16
- package/build/dist/Server/API/StatusAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageAPI.js +52 -52
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageDomainAPI.js +3 -3
- package/build/dist/Server/API/StatusPageDomainAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +39 -0
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/API/UserAPI.js +3 -3
- package/build/dist/Server/API/UserAPI.js.map +1 -1
- package/build/dist/Server/API/UserCallAPI.js +2 -2
- package/build/dist/Server/API/UserCallAPI.js.map +1 -1
- package/build/dist/Server/API/UserEmailAPI.js +2 -2
- package/build/dist/Server/API/UserEmailAPI.js.map +1 -1
- package/build/dist/Server/API/UserPushAPI.js +3 -3
- package/build/dist/Server/API/UserPushAPI.js.map +1 -1
- package/build/dist/Server/API/UserSmsAPI.js +2 -2
- package/build/dist/Server/API/UserSmsAPI.js.map +1 -1
- package/build/dist/Server/API/UserWhatsAppAPI.js +2 -2
- package/build/dist/Server/API/UserWhatsAppAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064921-MigrationName.js +40 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064921-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1775735059360-MigrationName.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1775735059360-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +4 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/NotificationMiddleware.js +2 -2
- package/build/dist/Server/Middleware/NotificationMiddleware.js.map +1 -1
- package/build/dist/Server/Middleware/ProjectAuthorization.js +5 -0
- package/build/dist/Server/Middleware/ProjectAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/SCIMAuthorization.js +2 -2
- package/build/dist/Server/Middleware/SCIMAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/SlackAuthorization.js +10 -10
- package/build/dist/Server/Middleware/SlackAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/TelemetryIngest.js +9 -4
- package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
- package/build/dist/Server/Middleware/UserAuthorization.js +10 -5
- package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/WhatsAppAuthorization.js +6 -6
- package/build/dist/Server/Middleware/WhatsAppAuthorization.js.map +1 -1
- package/build/dist/Server/Services/AIAgentService.js +13 -7
- package/build/dist/Server/Services/AIAgentService.js.map +1 -1
- package/build/dist/Server/Services/AIService.js +9 -2
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeFeedService.js +17 -5
- package/build/dist/Server/Services/AlertEpisodeFeedService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeService.js +40 -10
- package/build/dist/Server/Services/AlertEpisodeService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js +81 -24
- package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/AlertFeedService.js +17 -5
- package/build/dist/Server/Services/AlertFeedService.js.map +1 -1
- package/build/dist/Server/Services/AlertGroupingEngineService.js +44 -28
- package/build/dist/Server/Services/AlertGroupingEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertService.js +72 -20
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/AlertStateTimelineService.js +36 -13
- package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +52 -28
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/BillingInvoiceService.js +7 -2
- package/build/dist/Server/Services/BillingInvoiceService.js.map +1 -1
- package/build/dist/Server/Services/BillingService.js +8 -8
- package/build/dist/Server/Services/BillingService.js.map +1 -1
- package/build/dist/Server/Services/DashboardDomainService.js +49 -27
- package/build/dist/Server/Services/DashboardDomainService.js.map +1 -1
- package/build/dist/Server/Services/DashboardService.js +11 -4
- package/build/dist/Server/Services/DashboardService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +32 -12
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeFeedService.js +17 -5
- package/build/dist/Server/Services/IncidentEpisodeFeedService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeService.js +40 -10
- package/build/dist/Server/Services/IncidentEpisodeService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js +81 -24
- package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentFeedService.js +34 -10
- package/build/dist/Server/Services/IncidentFeedService.js.map +1 -1
- package/build/dist/Server/Services/IncidentGroupingEngineService.js +43 -29
- package/build/dist/Server/Services/IncidentGroupingEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +116 -28
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentSlaRuleService.js +19 -11
- package/build/dist/Server/Services/IncidentSlaRuleService.js.map +1 -1
- package/build/dist/Server/Services/IncidentSlaService.js +21 -14
- package/build/dist/Server/Services/IncidentSlaService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +130 -37
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterService.js +51 -14
- package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
- package/build/dist/Server/Services/LabelService.js +10 -1
- package/build/dist/Server/Services/LabelService.js.map +1 -1
- package/build/dist/Server/Services/MonitorFeedService.js +34 -10
- package/build/dist/Server/Services/MonitorFeedService.js.map +1 -1
- package/build/dist/Server/Services/MonitorProbeService.js +23 -3
- package/build/dist/Server/Services/MonitorProbeService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +42 -11
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/MonitorStatusTimelineService.js +69 -21
- package/build/dist/Server/Services/MonitorStatusTimelineService.js.map +1 -1
- package/build/dist/Server/Services/NotificationService.js +4 -3
- package/build/dist/Server/Services/NotificationService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js +49 -12
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js +9 -3
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js +26 -11
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyFeedService.js +34 -10
- package/build/dist/Server/Services/OnCallDutyPolicyFeedService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +94 -37
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyService.js +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
- package/build/dist/Server/Services/OpenTelemetryIngestService.js +45 -17
- package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
- package/build/dist/Server/Services/ProbeService.js +13 -7
- package/build/dist/Server/Services/ProbeService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +41 -21
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceFeedService.js +17 -5
- package/build/dist/Server/Services/ScheduledMaintenanceFeedService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +71 -24
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +72 -24
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageDomainService.js +55 -29
- package/build/dist/Server/Services/StatusPageDomainService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageService.js +29 -9
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberService.js +393 -130
- package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
- package/build/dist/Server/Services/TeamMemberService.js +10 -2
- package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryAttributeService.js +83 -6
- package/build/dist/Server/Services/TelemetryAttributeService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationRuleService.js +10 -2
- package/build/dist/Server/Services/UserNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +8 -3
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/UserWhatsAppService.js +10 -2
- package/build/dist/Server/Services/UserWhatsAppService.js.map +1 -1
- package/build/dist/Server/Services/WorkflowService.js +7 -2
- package/build/dist/Server/Services/WorkflowService.js.map +1 -1
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +367 -180
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Types/Domain.js +12 -6
- package/build/dist/Server/Types/Domain.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Post.js +11 -7
- package/build/dist/Server/Types/Workflow/Components/API/Post.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.js +11 -4
- package/build/dist/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +7 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/CodeRepository/CodeRepository.js +45 -17
- package/build/dist/Server/Utils/CodeRepository/CodeRepository.js.map +1 -1
- package/build/dist/Server/Utils/Express.js.map +1 -1
- package/build/dist/Server/Utils/Greenlock/Greenlock.js +36 -29
- package/build/dist/Server/Utils/Greenlock/Greenlock.js.map +1 -1
- package/build/dist/Server/Utils/LLM/LLMService.js +18 -6
- package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
- package/build/dist/Server/Utils/Logger.js +61 -13
- package/build/dist/Server/Utils/Logger.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +23 -20
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +13 -4
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +25 -22
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStatusTimeline.js +6 -3
- package/build/dist/Server/Utils/Monitor/MonitorStatusTimeline.js.map +1 -1
- package/build/dist/Server/Utils/Profiling.js +9 -6
- package/build/dist/Server/Utils/Profiling.js.map +1 -1
- package/build/dist/Server/Utils/Realtime.js +50 -34
- package/build/dist/Server/Utils/Realtime.js.map +1 -1
- package/build/dist/Server/Utils/Response.js +2 -2
- package/build/dist/Server/Utils/Response.js.map +1 -1
- package/build/dist/Server/Utils/StartServer.js +23 -11
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/SpanUtil.js +52 -0
- package/build/dist/Server/Utils/Telemetry/SpanUtil.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js +58 -15
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js +58 -15
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js +19 -5
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js +90 -26
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js +12 -3
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js +25 -7
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js +58 -19
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +102 -29
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js +38 -9
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js +34 -8
- package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js +3 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js +55 -13
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/IncidentEpisode.js +5 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/IncidentEpisode.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js +91 -26
- package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js +355 -270
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Workspace.js +21 -12
- package/build/dist/Server/Utils/Workspace/Workspace.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/WorkspaceBase.js +3 -1
- package/build/dist/Server/Utils/Workspace/WorkspaceBase.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Alert.js +9 -2
- package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Alert.js.map +1 -1
- package/build/dist/Tests/Server/Middleware/UserAuthorization.test.js +1 -1
- package/build/dist/Tests/Server/Middleware/UserAuthorization.test.js.map +1 -1
- package/build/dist/Tests/Server/Services/AnalyticsDatabaseService.test.js +12 -6
- package/build/dist/Tests/Server/Services/AnalyticsDatabaseService.test.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js +31 -30
- package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js.map +1 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js +20 -2
- package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +2 -2
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +9 -2
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +9 -2
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedExemplarPoint.js +2 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedExemplarPoint.js.map +1 -0
- package/build/dist/UI/Components/Charts/Line/LineChart.js +20 -2
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Types/ExemplarPoint.js +2 -0
- package/build/dist/UI/Components/Charts/Types/ExemplarPoint.js.map +1 -0
- package/build/dist/UI/Components/Dictionary/Dictionary.js +9 -1
- package/build/dist/UI/Components/Dictionary/Dictionary.js.map +1 -1
- package/build/dist/UI/Components/Filters/FiltersForm.js +1 -1
- package/build/dist/UI/Components/Filters/FiltersForm.js.map +1 -1
- package/build/dist/UI/Components/Filters/JSONFilter.js +1 -1
- package/build/dist/UI/Components/Filters/JSONFilter.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +3 -3
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +9 -5
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/Navbar/NavBar.js +9 -1
- package/build/dist/UI/Components/Navbar/NavBar.js.map +1 -1
- package/package.json +1 -1
|
@@ -70,7 +70,10 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
70
70
|
}): Promise<void> {
|
|
71
71
|
const { teamsRequest, action } = data;
|
|
72
72
|
|
|
73
|
-
logger.debug("Handling Microsoft Teams incident action:"
|
|
73
|
+
logger.debug("Handling Microsoft Teams incident action:", {
|
|
74
|
+
projectId: teamsRequest.projectId.toString(),
|
|
75
|
+
actionType: action.actionType,
|
|
76
|
+
});
|
|
74
77
|
logger.debug(action);
|
|
75
78
|
|
|
76
79
|
try {
|
|
@@ -104,11 +107,17 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
104
107
|
break;
|
|
105
108
|
|
|
106
109
|
default:
|
|
107
|
-
logger.debug("Unhandled incident action: " + action.actionType
|
|
110
|
+
logger.debug("Unhandled incident action: " + action.actionType, {
|
|
111
|
+
projectId: teamsRequest.projectId.toString(),
|
|
112
|
+
actionType: action.actionType,
|
|
113
|
+
});
|
|
108
114
|
break;
|
|
109
115
|
}
|
|
110
116
|
} catch (error) {
|
|
111
|
-
logger.error("Error handling Microsoft Teams incident action:"
|
|
117
|
+
logger.error("Error handling Microsoft Teams incident action:", {
|
|
118
|
+
projectId: teamsRequest.projectId.toString(),
|
|
119
|
+
actionType: action.actionType,
|
|
120
|
+
});
|
|
112
121
|
logger.error(error);
|
|
113
122
|
}
|
|
114
123
|
|
|
@@ -124,11 +133,16 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
124
133
|
const incidentId: string = data.action.actionValue || "";
|
|
125
134
|
|
|
126
135
|
if (!incidentId) {
|
|
127
|
-
logger.error("No incident ID provided for acknowledge action"
|
|
136
|
+
logger.error("No incident ID provided for acknowledge action", {
|
|
137
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
138
|
+
});
|
|
128
139
|
return;
|
|
129
140
|
}
|
|
130
141
|
|
|
131
|
-
logger.debug("Acknowledging incident: " + incidentId
|
|
142
|
+
logger.debug("Acknowledging incident: " + incidentId, {
|
|
143
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
144
|
+
incidentId: incidentId,
|
|
145
|
+
});
|
|
132
146
|
|
|
133
147
|
try {
|
|
134
148
|
// Get the incident
|
|
@@ -152,13 +166,19 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
152
166
|
});
|
|
153
167
|
|
|
154
168
|
if (!incident) {
|
|
155
|
-
logger.error("Incident not found: " + incidentId
|
|
169
|
+
logger.error("Incident not found: " + incidentId, {
|
|
170
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
171
|
+
incidentId: incidentId,
|
|
172
|
+
});
|
|
156
173
|
return;
|
|
157
174
|
}
|
|
158
175
|
|
|
159
176
|
// Check if already acknowledged
|
|
160
177
|
if (incident.currentIncidentState?.isAcknowledgedState) {
|
|
161
|
-
logger.debug("Incident is already acknowledged"
|
|
178
|
+
logger.debug("Incident is already acknowledged", {
|
|
179
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
180
|
+
incidentId: incidentId,
|
|
181
|
+
});
|
|
162
182
|
return;
|
|
163
183
|
}
|
|
164
184
|
|
|
@@ -174,9 +194,15 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
174
194
|
oneUptimeUserId,
|
|
175
195
|
);
|
|
176
196
|
|
|
177
|
-
logger.debug("Incident acknowledged successfully"
|
|
197
|
+
logger.debug("Incident acknowledged successfully", {
|
|
198
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
199
|
+
incidentId: incidentId,
|
|
200
|
+
});
|
|
178
201
|
} catch (error) {
|
|
179
|
-
logger.error("Error acknowledging incident:"
|
|
202
|
+
logger.error("Error acknowledging incident:", {
|
|
203
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
204
|
+
incidentId: incidentId,
|
|
205
|
+
});
|
|
180
206
|
logger.error(error);
|
|
181
207
|
}
|
|
182
208
|
}
|
|
@@ -189,11 +215,16 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
189
215
|
const incidentId: string = data.action.actionValue || "";
|
|
190
216
|
|
|
191
217
|
if (!incidentId) {
|
|
192
|
-
logger.error("No incident ID provided for resolve action"
|
|
218
|
+
logger.error("No incident ID provided for resolve action", {
|
|
219
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
220
|
+
});
|
|
193
221
|
return;
|
|
194
222
|
}
|
|
195
223
|
|
|
196
|
-
logger.debug("Resolving incident: " + incidentId
|
|
224
|
+
logger.debug("Resolving incident: " + incidentId, {
|
|
225
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
226
|
+
incidentId: incidentId,
|
|
227
|
+
});
|
|
197
228
|
|
|
198
229
|
try {
|
|
199
230
|
// Get the incident
|
|
@@ -217,13 +248,19 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
217
248
|
});
|
|
218
249
|
|
|
219
250
|
if (!incident) {
|
|
220
|
-
logger.error("Incident not found: " + incidentId
|
|
251
|
+
logger.error("Incident not found: " + incidentId, {
|
|
252
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
253
|
+
incidentId: incidentId,
|
|
254
|
+
});
|
|
221
255
|
return;
|
|
222
256
|
}
|
|
223
257
|
|
|
224
258
|
// Check if already resolved
|
|
225
259
|
if (incident.currentIncidentState?.isResolvedState) {
|
|
226
|
-
logger.debug("Incident is already resolved"
|
|
260
|
+
logger.debug("Incident is already resolved", {
|
|
261
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
262
|
+
incidentId: incidentId,
|
|
263
|
+
});
|
|
227
264
|
return;
|
|
228
265
|
}
|
|
229
266
|
|
|
@@ -239,9 +276,15 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
239
276
|
oneUptimeUserId,
|
|
240
277
|
);
|
|
241
278
|
|
|
242
|
-
logger.debug("Incident resolved successfully"
|
|
279
|
+
logger.debug("Incident resolved successfully", {
|
|
280
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
281
|
+
incidentId: incidentId,
|
|
282
|
+
});
|
|
243
283
|
} catch (error) {
|
|
244
|
-
logger.error("Error resolving incident:"
|
|
284
|
+
logger.error("Error resolving incident:", {
|
|
285
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
286
|
+
incidentId: incidentId,
|
|
287
|
+
});
|
|
245
288
|
logger.error(error);
|
|
246
289
|
}
|
|
247
290
|
}
|
|
@@ -649,6 +692,10 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
649
692
|
|
|
650
693
|
logger.debug(
|
|
651
694
|
"Incident created successfully: " + createdIncident.id?.toString(),
|
|
695
|
+
{
|
|
696
|
+
projectId: projectId.toString(),
|
|
697
|
+
incidentId: createdIncident.id?.toString(),
|
|
698
|
+
},
|
|
652
699
|
);
|
|
653
700
|
|
|
654
701
|
// Update monitor status if specified
|
|
@@ -693,7 +740,9 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
693
740
|
|
|
694
741
|
return;
|
|
695
742
|
} catch (error) {
|
|
696
|
-
logger.error("Error creating incident from Microsoft Teams:"
|
|
743
|
+
logger.error("Error creating incident from Microsoft Teams:", {
|
|
744
|
+
projectId: projectId.toString(),
|
|
745
|
+
});
|
|
697
746
|
logger.error(error);
|
|
698
747
|
await turnContext.sendActivity(
|
|
699
748
|
"❌ Failed to create incident. Please try again.",
|
|
@@ -892,7 +941,9 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
892
941
|
}): Promise<void> {
|
|
893
942
|
const { teamsRequest, req, res } = data;
|
|
894
943
|
|
|
895
|
-
logger.debug("Showing new incident card for Microsoft Teams"
|
|
944
|
+
logger.debug("Showing new incident card for Microsoft Teams", {
|
|
945
|
+
projectId: teamsRequest.projectId?.toString(),
|
|
946
|
+
});
|
|
896
947
|
|
|
897
948
|
// Send empty response first
|
|
898
949
|
Response.sendTextResponse(req, res, "");
|
|
@@ -911,7 +962,9 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
911
962
|
* Send card as a message (note: in real Teams bot, this would be sent via TurnContext)
|
|
912
963
|
* For now, we'll just log it. The actual sending will be done through the bot framework
|
|
913
964
|
*/
|
|
914
|
-
logger.debug("New incident card built:"
|
|
965
|
+
logger.debug("New incident card built:", {
|
|
966
|
+
projectId: teamsRequest.projectId.toString(),
|
|
967
|
+
});
|
|
915
968
|
logger.debug(JSON.stringify(card, null, 2));
|
|
916
969
|
}
|
|
917
970
|
|
|
@@ -925,7 +978,9 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
925
978
|
const { teamsRequest, req, res } = data;
|
|
926
979
|
const { userId, projectId } = teamsRequest;
|
|
927
980
|
|
|
928
|
-
logger.debug("Submitting new incident from Microsoft Teams"
|
|
981
|
+
logger.debug("Submitting new incident from Microsoft Teams", {
|
|
982
|
+
projectId: projectId?.toString(),
|
|
983
|
+
});
|
|
929
984
|
|
|
930
985
|
if (!projectId) {
|
|
931
986
|
return Response.sendErrorResponse(
|
|
@@ -960,7 +1015,9 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
960
1015
|
(value["onCallDutyPolicies"] as string) || "";
|
|
961
1016
|
|
|
962
1017
|
if (!title || !description || !severityId) {
|
|
963
|
-
logger.error("Missing required fields for incident creation"
|
|
1018
|
+
logger.error("Missing required fields for incident creation", {
|
|
1019
|
+
projectId: projectId.toString(),
|
|
1020
|
+
});
|
|
964
1021
|
return;
|
|
965
1022
|
}
|
|
966
1023
|
|
|
@@ -1048,6 +1105,10 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
1048
1105
|
|
|
1049
1106
|
logger.debug(
|
|
1050
1107
|
"Incident created successfully: " + createdIncident.id?.toString(),
|
|
1108
|
+
{
|
|
1109
|
+
projectId: projectId.toString(),
|
|
1110
|
+
incidentId: createdIncident.id?.toString(),
|
|
1111
|
+
},
|
|
1051
1112
|
);
|
|
1052
1113
|
|
|
1053
1114
|
// Update monitor status if specified
|
|
@@ -1073,9 +1134,13 @@ export default class MicrosoftTeamsIncidentActions {
|
|
|
1073
1134
|
}
|
|
1074
1135
|
}
|
|
1075
1136
|
|
|
1076
|
-
logger.debug("New incident created from Microsoft Teams successfully"
|
|
1137
|
+
logger.debug("New incident created from Microsoft Teams successfully", {
|
|
1138
|
+
projectId: projectId.toString(),
|
|
1139
|
+
});
|
|
1077
1140
|
} catch (error) {
|
|
1078
|
-
logger.error("Error creating incident from Microsoft Teams:"
|
|
1141
|
+
logger.error("Error creating incident from Microsoft Teams:", {
|
|
1142
|
+
projectId: projectId.toString(),
|
|
1143
|
+
});
|
|
1079
1144
|
logger.error(error);
|
|
1080
1145
|
}
|
|
1081
1146
|
}
|
|
@@ -29,7 +29,10 @@ export default class MicrosoftTeamsMonitorActions {
|
|
|
29
29
|
}): Promise<void> {
|
|
30
30
|
const { action } = data;
|
|
31
31
|
|
|
32
|
-
logger.debug("Handling Microsoft Teams monitor action:"
|
|
32
|
+
logger.debug("Handling Microsoft Teams monitor action:", {
|
|
33
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
34
|
+
actionType: action.actionType,
|
|
35
|
+
});
|
|
33
36
|
logger.debug(action);
|
|
34
37
|
|
|
35
38
|
try {
|
|
@@ -39,11 +42,17 @@ export default class MicrosoftTeamsMonitorActions {
|
|
|
39
42
|
break;
|
|
40
43
|
|
|
41
44
|
default:
|
|
42
|
-
logger.debug("Unhandled monitor action: " + action.actionType
|
|
45
|
+
logger.debug("Unhandled monitor action: " + action.actionType, {
|
|
46
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
47
|
+
actionType: action.actionType,
|
|
48
|
+
});
|
|
43
49
|
break;
|
|
44
50
|
}
|
|
45
51
|
} catch (error) {
|
|
46
|
-
logger.error("Error handling Microsoft Teams monitor action:"
|
|
52
|
+
logger.error("Error handling Microsoft Teams monitor action:", {
|
|
53
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
54
|
+
actionType: action.actionType,
|
|
55
|
+
});
|
|
47
56
|
logger.error(error);
|
|
48
57
|
}
|
|
49
58
|
|
|
@@ -29,7 +29,10 @@ export default class MicrosoftTeamsOnCallDutyActions {
|
|
|
29
29
|
}): Promise<void> {
|
|
30
30
|
const { action } = data;
|
|
31
31
|
|
|
32
|
-
logger.debug("Handling Microsoft Teams on-call duty action:"
|
|
32
|
+
logger.debug("Handling Microsoft Teams on-call duty action:", {
|
|
33
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
34
|
+
actionType: action.actionType,
|
|
35
|
+
});
|
|
33
36
|
logger.debug(action);
|
|
34
37
|
|
|
35
38
|
try {
|
|
@@ -39,11 +42,17 @@ export default class MicrosoftTeamsOnCallDutyActions {
|
|
|
39
42
|
break;
|
|
40
43
|
|
|
41
44
|
default:
|
|
42
|
-
logger.debug("Unhandled on-call duty action: " + action.actionType
|
|
45
|
+
logger.debug("Unhandled on-call duty action: " + action.actionType, {
|
|
46
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
47
|
+
actionType: action.actionType,
|
|
48
|
+
});
|
|
43
49
|
break;
|
|
44
50
|
}
|
|
45
51
|
} catch (error) {
|
|
46
|
-
logger.error("Error handling Microsoft Teams on-call duty action:"
|
|
52
|
+
logger.error("Error handling Microsoft Teams on-call duty action:", {
|
|
53
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
54
|
+
actionType: action.actionType,
|
|
55
|
+
});
|
|
47
56
|
logger.error(error);
|
|
48
57
|
}
|
|
49
58
|
|
|
@@ -62,7 +71,9 @@ export default class MicrosoftTeamsOnCallDutyActions {
|
|
|
62
71
|
] as ObjectID;
|
|
63
72
|
|
|
64
73
|
if (!onCallDutyPolicyId) {
|
|
65
|
-
logger.error("OnCallDutyPolicy ID is required"
|
|
74
|
+
logger.error("OnCallDutyPolicy ID is required", {
|
|
75
|
+
actionType: actionType,
|
|
76
|
+
});
|
|
66
77
|
await turnContext.sendActivity("OnCallDutyPolicy ID is required");
|
|
67
78
|
return;
|
|
68
79
|
}
|
|
@@ -81,7 +92,9 @@ export default class MicrosoftTeamsOnCallDutyActions {
|
|
|
81
92
|
});
|
|
82
93
|
|
|
83
94
|
if (!onCallDutyPolicy) {
|
|
84
|
-
logger.error("OnCallDutyPolicy not found"
|
|
95
|
+
logger.error("OnCallDutyPolicy not found", {
|
|
96
|
+
onCallDutyPolicyId: onCallDutyPolicyId.toString(),
|
|
97
|
+
});
|
|
85
98
|
await turnContext.sendActivity("OnCallDutyPolicy not found");
|
|
86
99
|
return;
|
|
87
100
|
}
|
|
@@ -105,12 +118,17 @@ export default class MicrosoftTeamsOnCallDutyActions {
|
|
|
105
118
|
break;
|
|
106
119
|
|
|
107
120
|
default:
|
|
108
|
-
logger.error(`Unknown action type: ${actionType}
|
|
121
|
+
logger.error(`Unknown action type: ${actionType}`, {
|
|
122
|
+
onCallDutyPolicyId: onCallDutyPolicyId.toString(),
|
|
123
|
+
actionType: actionType,
|
|
124
|
+
});
|
|
109
125
|
await turnContext.sendActivity("Unknown action type");
|
|
110
126
|
break;
|
|
111
127
|
}
|
|
112
128
|
} catch (error) {
|
|
113
|
-
logger.error(`Error handling on-call duty action: ${error}
|
|
129
|
+
logger.error(`Error handling on-call duty action: ${error}`, {
|
|
130
|
+
actionType: actionType,
|
|
131
|
+
});
|
|
114
132
|
await turnContext.sendActivity(
|
|
115
133
|
"An error occurred while processing the action",
|
|
116
134
|
);
|
|
@@ -65,7 +65,10 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
65
65
|
}): Promise<void> {
|
|
66
66
|
const { action } = data;
|
|
67
67
|
|
|
68
|
-
logger.debug("Handling Microsoft Teams scheduled maintenance action:"
|
|
68
|
+
logger.debug("Handling Microsoft Teams scheduled maintenance action:", {
|
|
69
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
70
|
+
actionType: action.actionType,
|
|
71
|
+
});
|
|
69
72
|
logger.debug(action);
|
|
70
73
|
|
|
71
74
|
try {
|
|
@@ -87,12 +90,20 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
87
90
|
default:
|
|
88
91
|
logger.debug(
|
|
89
92
|
`Unhandled scheduled maintenance action: ${action.actionType}`,
|
|
93
|
+
{
|
|
94
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
95
|
+
actionType: action.actionType,
|
|
96
|
+
},
|
|
90
97
|
);
|
|
91
98
|
break;
|
|
92
99
|
}
|
|
93
100
|
} catch (error) {
|
|
94
101
|
logger.error(
|
|
95
102
|
"Error handling Microsoft Teams scheduled maintenance action:",
|
|
103
|
+
{
|
|
104
|
+
projectId: data.teamsRequest.projectId.toString(),
|
|
105
|
+
actionType: action.actionType,
|
|
106
|
+
},
|
|
96
107
|
);
|
|
97
108
|
logger.error(error);
|
|
98
109
|
}
|
|
@@ -223,6 +234,11 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
223
234
|
logger.debug(
|
|
224
235
|
"Scheduled maintenance created successfully: " +
|
|
225
236
|
createdScheduledMaintenance.id?.toString(),
|
|
237
|
+
{
|
|
238
|
+
projectId: request.projectId.toString(),
|
|
239
|
+
scheduledMaintenanceId:
|
|
240
|
+
createdScheduledMaintenance.id?.toString(),
|
|
241
|
+
},
|
|
226
242
|
);
|
|
227
243
|
|
|
228
244
|
// Update monitor status if specified
|
|
@@ -269,6 +285,9 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
269
285
|
} catch (error) {
|
|
270
286
|
logger.error(
|
|
271
287
|
"Error creating scheduled maintenance from Microsoft Teams:",
|
|
288
|
+
{
|
|
289
|
+
projectId: request.projectId.toString(),
|
|
290
|
+
},
|
|
272
291
|
);
|
|
273
292
|
logger.error(error);
|
|
274
293
|
await turnContext.sendActivity(
|
|
@@ -284,7 +303,9 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
284
303
|
] as ObjectID;
|
|
285
304
|
|
|
286
305
|
if (!scheduledMaintenanceId) {
|
|
287
|
-
logger.error("ScheduledMaintenance ID is required"
|
|
306
|
+
logger.error("ScheduledMaintenance ID is required", {
|
|
307
|
+
actionType: actionType,
|
|
308
|
+
});
|
|
288
309
|
await turnContext.sendActivity("ScheduledMaintenance ID is required");
|
|
289
310
|
return;
|
|
290
311
|
}
|
|
@@ -309,7 +330,9 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
309
330
|
});
|
|
310
331
|
|
|
311
332
|
if (!scheduledMaintenance) {
|
|
312
|
-
logger.error("ScheduledMaintenance not found"
|
|
333
|
+
logger.error("ScheduledMaintenance not found", {
|
|
334
|
+
scheduledMaintenanceId: scheduledMaintenanceId.toString(),
|
|
335
|
+
});
|
|
313
336
|
await turnContext.sendActivity("ScheduledMaintenance not found");
|
|
314
337
|
return;
|
|
315
338
|
}
|
|
@@ -459,12 +482,17 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
459
482
|
}
|
|
460
483
|
|
|
461
484
|
default:
|
|
462
|
-
logger.error(`Unknown action type: ${actionType}
|
|
485
|
+
logger.error(`Unknown action type: ${actionType}`, {
|
|
486
|
+
scheduledMaintenanceId: scheduledMaintenanceId.toString(),
|
|
487
|
+
actionType: actionType,
|
|
488
|
+
});
|
|
463
489
|
await turnContext.sendActivity("Unknown action type");
|
|
464
490
|
break;
|
|
465
491
|
}
|
|
466
492
|
} catch (error) {
|
|
467
|
-
logger.error(`Error handling scheduled maintenance action: ${error}
|
|
493
|
+
logger.error(`Error handling scheduled maintenance action: ${error}`, {
|
|
494
|
+
actionType: actionType,
|
|
495
|
+
});
|
|
468
496
|
await turnContext.sendActivity(
|
|
469
497
|
"An error occurred while processing the action",
|
|
470
498
|
);
|
|
@@ -590,7 +618,9 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
590
618
|
}): Promise<void> {
|
|
591
619
|
const { teamsRequest, req, res } = data;
|
|
592
620
|
|
|
593
|
-
logger.debug("Showing new scheduled maintenance card for Microsoft Teams"
|
|
621
|
+
logger.debug("Showing new scheduled maintenance card for Microsoft Teams", {
|
|
622
|
+
projectId: teamsRequest.projectId?.toString(),
|
|
623
|
+
});
|
|
594
624
|
|
|
595
625
|
// Send empty response first
|
|
596
626
|
Response.sendTextResponse(req, res, "");
|
|
@@ -609,7 +639,9 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
609
639
|
* Send card as a message (note: in real Teams bot, this would be sent via TurnContext)
|
|
610
640
|
* For now, we'll just log it. The actual sending will be done through the bot framework
|
|
611
641
|
*/
|
|
612
|
-
logger.debug("New scheduled maintenance card built:"
|
|
642
|
+
logger.debug("New scheduled maintenance card built:", {
|
|
643
|
+
projectId: teamsRequest.projectId.toString(),
|
|
644
|
+
});
|
|
613
645
|
logger.debug(JSON.stringify(card, null, 2));
|
|
614
646
|
}
|
|
615
647
|
|
|
@@ -623,7 +655,9 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
623
655
|
const { teamsRequest, req, res } = data;
|
|
624
656
|
const { userId, projectId } = teamsRequest;
|
|
625
657
|
|
|
626
|
-
logger.debug("Submitting new scheduled maintenance from Microsoft Teams"
|
|
658
|
+
logger.debug("Submitting new scheduled maintenance from Microsoft Teams", {
|
|
659
|
+
projectId: projectId?.toString(),
|
|
660
|
+
});
|
|
627
661
|
|
|
628
662
|
if (!projectId) {
|
|
629
663
|
return Response.sendErrorResponse(
|
|
@@ -661,6 +695,9 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
661
695
|
if (!title || !description || !startDate || !endDate) {
|
|
662
696
|
logger.error(
|
|
663
697
|
"Missing required fields for scheduled maintenance creation",
|
|
698
|
+
{
|
|
699
|
+
projectId: projectId.toString(),
|
|
700
|
+
},
|
|
664
701
|
);
|
|
665
702
|
return;
|
|
666
703
|
}
|
|
@@ -733,6 +770,10 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
733
770
|
logger.debug(
|
|
734
771
|
"Scheduled maintenance created successfully: " +
|
|
735
772
|
createdScheduledMaintenance.id?.toString(),
|
|
773
|
+
{
|
|
774
|
+
projectId: projectId.toString(),
|
|
775
|
+
scheduledMaintenanceId: createdScheduledMaintenance.id?.toString(),
|
|
776
|
+
},
|
|
736
777
|
);
|
|
737
778
|
|
|
738
779
|
// Update monitor status if specified
|
|
@@ -760,10 +801,16 @@ export default class MicrosoftTeamsScheduledMaintenanceActions {
|
|
|
760
801
|
|
|
761
802
|
logger.debug(
|
|
762
803
|
"New scheduled maintenance created from Microsoft Teams successfully",
|
|
804
|
+
{
|
|
805
|
+
projectId: projectId.toString(),
|
|
806
|
+
},
|
|
763
807
|
);
|
|
764
808
|
} catch (error) {
|
|
765
809
|
logger.error(
|
|
766
810
|
"Error creating scheduled maintenance from Microsoft Teams:",
|
|
811
|
+
{
|
|
812
|
+
projectId: projectId.toString(),
|
|
813
|
+
},
|
|
767
814
|
);
|
|
768
815
|
logger.error(error);
|
|
769
816
|
}
|