@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
|
@@ -7,7 +7,7 @@ import ObjectID from "../../../Types/ObjectID";
|
|
|
7
7
|
import WorkspaceMessagePayload, {
|
|
8
8
|
WorkspacePayloadMarkdown,
|
|
9
9
|
} from "../../../Types/Workspace/WorkspaceMessagePayload";
|
|
10
|
-
import logger from "../Logger";
|
|
10
|
+
import logger, { LogAttributes } from "../Logger";
|
|
11
11
|
import WorkspaceProjectAuthTokenService from "../../Services/WorkspaceProjectAuthTokenService";
|
|
12
12
|
import WorkspaceProjectAuthToken, {
|
|
13
13
|
SlackMiscData,
|
|
@@ -157,8 +157,15 @@ export default class WorkspaceUtil {
|
|
|
157
157
|
projectId: ObjectID;
|
|
158
158
|
messagePayloadsByWorkspace: Array<WorkspaceMessagePayload>;
|
|
159
159
|
}): Promise<Array<WorkspaceSendMessageResponse>> {
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
const workspaceLogAttributes: LogAttributes = {
|
|
161
|
+
projectId: data.projectId?.toString(),
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
logger.debug(
|
|
165
|
+
"postToWorkspaceChannels called with data:",
|
|
166
|
+
workspaceLogAttributes,
|
|
167
|
+
);
|
|
168
|
+
logger.debug(JSON.stringify(data, null, 2), workspaceLogAttributes);
|
|
162
169
|
|
|
163
170
|
const responses: Array<WorkspaceSendMessageResponse> = [];
|
|
164
171
|
|
|
@@ -214,9 +221,12 @@ export default class WorkspaceUtil {
|
|
|
214
221
|
responses.push(result);
|
|
215
222
|
}
|
|
216
223
|
|
|
217
|
-
logger.debug(
|
|
218
|
-
|
|
219
|
-
|
|
224
|
+
logger.debug(
|
|
225
|
+
"Message posted to workspace channels successfully",
|
|
226
|
+
workspaceLogAttributes,
|
|
227
|
+
);
|
|
228
|
+
logger.debug("Returning thread IDs", workspaceLogAttributes);
|
|
229
|
+
logger.debug(JSON.stringify(responses, null, 2), workspaceLogAttributes);
|
|
220
230
|
|
|
221
231
|
return responses;
|
|
222
232
|
}
|
|
@@ -229,8 +239,15 @@ export default class WorkspaceUtil {
|
|
|
229
239
|
workspaceMessagePayload: WorkspaceMessagePayload;
|
|
230
240
|
projectId: ObjectID;
|
|
231
241
|
}): Promise<WorkspaceSendMessageResponse> {
|
|
232
|
-
|
|
233
|
-
|
|
242
|
+
const postLogAttributes: LogAttributes = {
|
|
243
|
+
projectId: data.projectId?.toString(),
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
logger.debug(
|
|
247
|
+
"postToWorkspaceChannels called with data:",
|
|
248
|
+
postLogAttributes,
|
|
249
|
+
);
|
|
250
|
+
logger.debug(data, postLogAttributes);
|
|
234
251
|
|
|
235
252
|
const result: WorkspaceSendMessageResponse =
|
|
236
253
|
await WorkspaceUtil.getWorkspaceTypeUtil(data.workspaceType).sendMessage({
|
|
@@ -240,9 +257,12 @@ export default class WorkspaceUtil {
|
|
|
240
257
|
projectId: data.projectId,
|
|
241
258
|
});
|
|
242
259
|
|
|
243
|
-
logger.debug(
|
|
244
|
-
|
|
245
|
-
|
|
260
|
+
logger.debug(
|
|
261
|
+
"Message posted to workspace channels successfully",
|
|
262
|
+
postLogAttributes,
|
|
263
|
+
);
|
|
264
|
+
logger.debug("Returning thread IDs", postLogAttributes);
|
|
265
|
+
logger.debug(result, postLogAttributes);
|
|
246
266
|
|
|
247
267
|
return result;
|
|
248
268
|
}
|
|
@@ -283,6 +303,7 @@ export default class WorkspaceUtil {
|
|
|
283
303
|
if (!params.teamId) {
|
|
284
304
|
logger.error(
|
|
285
305
|
"Team ID is required for Microsoft Teams channel messages",
|
|
306
|
+
{ projectId: params.projectId?.toString() },
|
|
286
307
|
);
|
|
287
308
|
return [];
|
|
288
309
|
}
|
|
@@ -312,6 +333,7 @@ export default class WorkspaceUtil {
|
|
|
312
333
|
default:
|
|
313
334
|
logger.debug(
|
|
314
335
|
`Unsupported workspace type for channel messages: ${params.workspaceType}`,
|
|
336
|
+
{ projectId: params.projectId?.toString() },
|
|
315
337
|
);
|
|
316
338
|
return [];
|
|
317
339
|
}
|
|
@@ -35,8 +35,14 @@ export default class AlertWorkspaceMessages {
|
|
|
35
35
|
);
|
|
36
36
|
} catch (err) {
|
|
37
37
|
// log the error and continue.
|
|
38
|
-
logger.error("Error in createChannelsAndInviteUsersToChannels"
|
|
39
|
-
|
|
38
|
+
logger.error("Error in createChannelsAndInviteUsersToChannels", {
|
|
39
|
+
projectId: data.projectId?.toString(),
|
|
40
|
+
alertId: data.alertId?.toString(),
|
|
41
|
+
});
|
|
42
|
+
logger.error(err, {
|
|
43
|
+
projectId: data.projectId?.toString(),
|
|
44
|
+
alertId: data.alertId?.toString(),
|
|
45
|
+
});
|
|
40
46
|
return null;
|
|
41
47
|
}
|
|
42
48
|
}
|
|
@@ -123,7 +123,7 @@ describe("UserMiddleware", () => {
|
|
|
123
123
|
|
|
124
124
|
expect(result).toEqual({});
|
|
125
125
|
expect(spyDecode).toHaveBeenCalledWith(mockedAccessToken);
|
|
126
|
-
expect(spyErrorLogger).toHaveBeenCalledWith(error);
|
|
126
|
+
expect(spyErrorLogger).toHaveBeenCalledWith(error, undefined);
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
test("should return an empty object when the decoded sso-token object doesn't have projectId property", () => {
|
|
@@ -96,8 +96,11 @@ describe("AnalyticsDatabaseService", () => {
|
|
|
96
96
|
expect(logger.debug).toHaveBeenNthCalledWith(
|
|
97
97
|
1,
|
|
98
98
|
"<table-name> Count Statement",
|
|
99
|
+
{ tableName: "<table-name>" },
|
|
99
100
|
);
|
|
100
|
-
expect(logger.debug).toHaveBeenNthCalledWith(2, statement
|
|
101
|
+
expect(logger.debug).toHaveBeenNthCalledWith(2, statement, {
|
|
102
|
+
tableName: "<table-name>",
|
|
103
|
+
});
|
|
101
104
|
|
|
102
105
|
expect(statement.query).toBe(
|
|
103
106
|
"SELECT\n" +
|
|
@@ -201,8 +204,11 @@ describe("AnalyticsDatabaseService", () => {
|
|
|
201
204
|
expect(jest.mocked(logger.debug)).toHaveBeenNthCalledWith(
|
|
202
205
|
1,
|
|
203
206
|
"<table-name> Find Statement",
|
|
207
|
+
{ tableName: "<table-name>" },
|
|
204
208
|
);
|
|
205
|
-
expect(jest.mocked(logger.debug)).toHaveBeenNthCalledWith(2, statement
|
|
209
|
+
expect(jest.mocked(logger.debug)).toHaveBeenNthCalledWith(2, statement, {
|
|
210
|
+
tableName: "<table-name>",
|
|
211
|
+
});
|
|
206
212
|
|
|
207
213
|
expect(statement.query).toBe(
|
|
208
214
|
"SELECT <select-statement> FROM {p0:Identifier}.{p1:Identifier} WHERE TRUE <where-statement> ORDER BY <sort-statement> LIMIT {p2:Int32} OFFSET {p3:Int32}",
|
|
@@ -340,8 +346,11 @@ describe("AnalyticsDatabaseService", () => {
|
|
|
340
346
|
expect(logger.debug).toHaveBeenNthCalledWith(
|
|
341
347
|
1,
|
|
342
348
|
"<table-name> Delete Statement",
|
|
349
|
+
{ tableName: "<table-name>" },
|
|
343
350
|
);
|
|
344
|
-
expect(logger.debug).toHaveBeenNthCalledWith(2, statement
|
|
351
|
+
expect(logger.debug).toHaveBeenNthCalledWith(2, statement, {
|
|
352
|
+
tableName: "<table-name>",
|
|
353
|
+
});
|
|
345
354
|
|
|
346
355
|
expect(statement.query).toBe(
|
|
347
356
|
"ALTER TABLE {p0:Identifier}.{p1:Identifier}\n" +
|
|
@@ -6,7 +6,6 @@ import ConfirmModal, {
|
|
|
6
6
|
} from "../Modal/ConfirmModal";
|
|
7
7
|
import ProgressBar, { ProgressBarSize } from "../ProgressBar/ProgressBar";
|
|
8
8
|
import ShortcutKey from "../ShortcutKey/ShortcutKey";
|
|
9
|
-
import SimpleLogViewer from "../SimpleLogViewer/SimpleLogViewer";
|
|
10
9
|
import { Green, Red } from "../../../Types/BrandColors";
|
|
11
10
|
import { LIMIT_PER_PROJECT } from "../../../Types/Database/LimitMax";
|
|
12
11
|
import GenericObject from "../../../Types/GenericObject";
|
|
@@ -83,8 +82,6 @@ const BulkUpdateForm: <T extends GenericObject>(
|
|
|
83
82
|
const [actionInProgress, setActionInProgress] =
|
|
84
83
|
React.useState<boolean>(false);
|
|
85
84
|
|
|
86
|
-
const [actionName, setActionName] = React.useState<string>("");
|
|
87
|
-
|
|
88
85
|
if (props.selectedItems.length === 0) {
|
|
89
86
|
return <></>;
|
|
90
87
|
}
|
|
@@ -102,44 +99,71 @@ const BulkUpdateForm: <T extends GenericObject>(
|
|
|
102
99
|
}
|
|
103
100
|
|
|
104
101
|
if (!actionInProgress && progressInfo) {
|
|
102
|
+
const hasFailures: boolean = progressInfo.failed.length > 0;
|
|
103
|
+
const hasSuccesses: boolean = progressInfo.successItems.length > 0;
|
|
104
|
+
|
|
105
105
|
return (
|
|
106
|
-
<div className="
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
{progressInfo.failed.length} {props.pluralLabel} Failed. Here
|
|
123
|
-
is more information:
|
|
106
|
+
<div className="space-y-4">
|
|
107
|
+
{/* Summary counts */}
|
|
108
|
+
<div className="flex flex-col space-y-3">
|
|
109
|
+
{hasSuccesses && (
|
|
110
|
+
<div className="flex items-center rounded-lg bg-green-50 p-3">
|
|
111
|
+
<Icon
|
|
112
|
+
className="h-5 w-5 flex-shrink-0"
|
|
113
|
+
icon={IconProp.CheckCircle}
|
|
114
|
+
color={Green}
|
|
115
|
+
/>
|
|
116
|
+
<div className="ml-2 text-sm font-medium text-green-800">
|
|
117
|
+
{progressInfo.successItems.length}{" "}
|
|
118
|
+
{progressInfo.successItems.length === 1
|
|
119
|
+
? props.singularLabel
|
|
120
|
+
: props.pluralLabel}{" "}
|
|
121
|
+
succeeded
|
|
124
122
|
</div>
|
|
125
123
|
</div>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
124
|
+
)}
|
|
125
|
+
{hasFailures && (
|
|
126
|
+
<div className="flex items-center rounded-lg bg-red-50 p-3">
|
|
127
|
+
<Icon
|
|
128
|
+
className="h-5 w-5 flex-shrink-0"
|
|
129
|
+
icon={IconProp.Close}
|
|
130
|
+
color={Red}
|
|
131
|
+
/>
|
|
132
|
+
<div className="ml-2 text-sm font-medium text-red-800">
|
|
133
|
+
{progressInfo.failed.length}{" "}
|
|
134
|
+
{progressInfo.failed.length === 1
|
|
135
|
+
? props.singularLabel
|
|
136
|
+
: props.pluralLabel}{" "}
|
|
137
|
+
failed
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
)}
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
{/* Failure details */}
|
|
144
|
+
{hasFailures && (
|
|
145
|
+
<div className="rounded-lg border border-gray-200 overflow-hidden">
|
|
146
|
+
<div className="max-h-64 overflow-y-auto divide-y divide-gray-200">
|
|
147
|
+
{progressInfo.failed.map(
|
|
148
|
+
(failedItem: BulkActionFailed<T>, i: number) => {
|
|
149
|
+
const itemName: string = props.itemToString
|
|
150
|
+
? props.itemToString(failedItem.item)
|
|
151
|
+
: "";
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<div className="px-4 py-3 text-sm" key={i}>
|
|
155
|
+
{itemName && (
|
|
156
|
+
<div className="font-medium text-gray-900">
|
|
157
|
+
{itemName}
|
|
158
|
+
</div>
|
|
159
|
+
)}
|
|
160
|
+
<div className="text-gray-500 mt-0.5">
|
|
137
161
|
{failedItem.failedMessage}
|
|
138
162
|
</div>
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
163
|
+
</div>
|
|
164
|
+
);
|
|
165
|
+
},
|
|
166
|
+
)}
|
|
143
167
|
</div>
|
|
144
168
|
</div>
|
|
145
169
|
)}
|
|
@@ -217,7 +241,6 @@ const BulkUpdateForm: <T extends GenericObject>(
|
|
|
217
241
|
},
|
|
218
242
|
onBulkActionStart: () => {
|
|
219
243
|
setShowProgressInfoModal(true);
|
|
220
|
-
setActionName(button.title);
|
|
221
244
|
setProgressInfo({
|
|
222
245
|
inProgressItems: props.selectedItems,
|
|
223
246
|
successItems: [],
|
|
@@ -231,7 +254,6 @@ const BulkUpdateForm: <T extends GenericObject>(
|
|
|
231
254
|
},
|
|
232
255
|
onBulkActionEnd: () => {
|
|
233
256
|
setActionInProgress(false);
|
|
234
|
-
setActionName("");
|
|
235
257
|
},
|
|
236
258
|
};
|
|
237
259
|
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { AreaChart } from "../ChartLibrary/AreaChart/AreaChart";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, {
|
|
3
|
+
FunctionComponent,
|
|
4
|
+
ReactElement,
|
|
5
|
+
useEffect,
|
|
6
|
+
useMemo,
|
|
7
|
+
} from "react";
|
|
3
8
|
import SeriesPoint from "../Types/SeriesPoints";
|
|
4
9
|
import { XAxis } from "../Types/XAxis/XAxis";
|
|
5
10
|
import YAxis from "../Types/YAxis/YAxis";
|
|
6
11
|
import ChartCurve from "../Types/ChartCurve";
|
|
7
12
|
import ChartDataPoint from "../ChartLibrary/Types/ChartDataPoint";
|
|
13
|
+
import FormattedExemplarPoint from "../ChartLibrary/Types/FormattedExemplarPoint";
|
|
8
14
|
import DataPointUtil from "../Utils/DataPoint";
|
|
9
15
|
import ChartReferenceLineProps from "../Types/ReferenceLineProps";
|
|
16
|
+
import ExemplarPoint from "../Types/ExemplarPoint";
|
|
17
|
+
import XAxisUtil from "../Utils/XAxis";
|
|
10
18
|
import NoDataMessage from "../ChartGroup/NoDataMessage";
|
|
11
19
|
|
|
12
20
|
export interface ComponentProps {
|
|
@@ -17,6 +25,8 @@ export interface ComponentProps {
|
|
|
17
25
|
sync: boolean;
|
|
18
26
|
heightInPx?: number | undefined;
|
|
19
27
|
referenceLines?: Array<ChartReferenceLineProps> | undefined;
|
|
28
|
+
exemplarPoints?: Array<ExemplarPoint> | undefined;
|
|
29
|
+
onExemplarClick?: ((exemplar: ExemplarPoint) => void) | undefined;
|
|
20
30
|
}
|
|
21
31
|
|
|
22
32
|
export interface AreaInternalProps extends ComponentProps {
|
|
@@ -42,6 +52,26 @@ const AreaChartElement: FunctionComponent<AreaInternalProps> = (
|
|
|
42
52
|
setRecords(records);
|
|
43
53
|
}, [props.data]);
|
|
44
54
|
|
|
55
|
+
// Format exemplar x values to match the chart's x-axis labels
|
|
56
|
+
const formattedExemplars: Array<FormattedExemplarPoint> = useMemo(() => {
|
|
57
|
+
if (!props.exemplarPoints || props.exemplarPoints.length === 0) {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const formatter: (value: Date) => string = XAxisUtil.getFormatter({
|
|
62
|
+
xAxisMax: props.xAxis.options.max,
|
|
63
|
+
xAxisMin: props.xAxis.options.min,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return props.exemplarPoints.map((exemplar: ExemplarPoint) => {
|
|
67
|
+
return {
|
|
68
|
+
formattedX: formatter(exemplar.x),
|
|
69
|
+
y: exemplar.y,
|
|
70
|
+
original: exemplar,
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
}, [props.exemplarPoints, props.xAxis]);
|
|
74
|
+
|
|
45
75
|
const className: string = props.heightInPx ? `` : "h-80";
|
|
46
76
|
const style: React.CSSProperties = props.heightInPx
|
|
47
77
|
? { height: `${props.heightInPx}px` }
|
|
@@ -83,6 +113,10 @@ const AreaChartElement: FunctionComponent<AreaInternalProps> = (
|
|
|
83
113
|
yAxisWidth={60}
|
|
84
114
|
onValueChange={() => {}}
|
|
85
115
|
referenceLines={props.referenceLines}
|
|
116
|
+
formattedExemplarPoints={
|
|
117
|
+
formattedExemplars.length > 0 ? formattedExemplars : undefined
|
|
118
|
+
}
|
|
119
|
+
onExemplarClick={props.onExemplarClick}
|
|
86
120
|
/>
|
|
87
121
|
{hasNoData && <NoDataMessage />}
|
|
88
122
|
</div>
|
|
@@ -7,6 +7,7 @@ import BarChartElement, {
|
|
|
7
7
|
import AreaChartElement, {
|
|
8
8
|
ComponentProps as AreaChartProps,
|
|
9
9
|
} from "../Area/AreaChart";
|
|
10
|
+
import ExemplarPoint from "../Types/ExemplarPoint";
|
|
10
11
|
import Icon, { SizeProp } from "../../Icon/Icon";
|
|
11
12
|
import IconProp from "../../../../Types/Icon/IconProp";
|
|
12
13
|
import Modal, { ModalWidth } from "../../Modal/Modal";
|
|
@@ -33,6 +34,8 @@ export interface Chart {
|
|
|
33
34
|
type: ChartType;
|
|
34
35
|
props: LineChartProps | BarChartProps | AreaChartProps;
|
|
35
36
|
metricInfo?: ChartMetricInfo | undefined;
|
|
37
|
+
exemplarPoints?: Array<ExemplarPoint> | undefined;
|
|
38
|
+
onExemplarClick?: ((exemplar: ExemplarPoint) => void) | undefined;
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
export interface ComponentProps {
|
|
@@ -67,6 +70,8 @@ const ChartGroup: FunctionComponent<ComponentProps> = (
|
|
|
67
70
|
{...(chart.props as LineChartProps)}
|
|
68
71
|
syncid={syncId}
|
|
69
72
|
heightInPx={props.heightInPx}
|
|
73
|
+
exemplarPoints={chart.exemplarPoints}
|
|
74
|
+
onExemplarClick={chart.onExemplarClick}
|
|
70
75
|
/>
|
|
71
76
|
);
|
|
72
77
|
case ChartType.BAR:
|
|
@@ -85,6 +90,8 @@ const ChartGroup: FunctionComponent<ComponentProps> = (
|
|
|
85
90
|
{...(chart.props as AreaChartProps)}
|
|
86
91
|
syncid={syncId}
|
|
87
92
|
heightInPx={props.heightInPx}
|
|
93
|
+
exemplarPoints={chart.exemplarPoints}
|
|
94
|
+
onExemplarClick={chart.onExemplarClick}
|
|
88
95
|
/>
|
|
89
96
|
);
|
|
90
97
|
default:
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
Dot,
|
|
12
12
|
Label,
|
|
13
13
|
Legend as RechartsLegend,
|
|
14
|
+
ReferenceDot,
|
|
14
15
|
ReferenceLine,
|
|
15
16
|
ResponsiveContainer,
|
|
16
17
|
Tooltip,
|
|
@@ -18,6 +19,8 @@ import {
|
|
|
18
19
|
YAxis,
|
|
19
20
|
} from "recharts";
|
|
20
21
|
import ChartReferenceLineProps from "../../Types/ReferenceLineProps";
|
|
22
|
+
import ExemplarPoint from "../../Types/ExemplarPoint";
|
|
23
|
+
import FormattedExemplarPoint from "../Types/FormattedExemplarPoint";
|
|
21
24
|
import { AxisDomain } from "recharts/types/util/types";
|
|
22
25
|
|
|
23
26
|
import { useOnWindowResize } from "../Utils/UseWindowOnResize";
|
|
@@ -557,6 +560,8 @@ interface AreaChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
557
560
|
customTooltip?: React.ComponentType<TooltipProps>;
|
|
558
561
|
syncid?: string | undefined;
|
|
559
562
|
referenceLines?: Array<ChartReferenceLineProps> | undefined;
|
|
563
|
+
formattedExemplarPoints?: Array<FormattedExemplarPoint> | undefined;
|
|
564
|
+
onExemplarClick?: ((exemplar: ExemplarPoint) => void) | undefined;
|
|
560
565
|
}
|
|
561
566
|
|
|
562
567
|
const AreaChart: React.ForwardRefExoticComponent<
|
|
@@ -1000,6 +1005,34 @@ const AreaChart: React.ForwardRefExoticComponent<
|
|
|
1000
1005
|
);
|
|
1001
1006
|
},
|
|
1002
1007
|
)}
|
|
1008
|
+
{/* Exemplar dots - clickable markers linking to traces */}
|
|
1009
|
+
{props.formattedExemplarPoints?.map(
|
|
1010
|
+
(exemplar: FormattedExemplarPoint, exemplarIndex: number) => {
|
|
1011
|
+
return (
|
|
1012
|
+
<ReferenceDot
|
|
1013
|
+
key={`exemplar-${exemplarIndex}`}
|
|
1014
|
+
x={exemplar.formattedX}
|
|
1015
|
+
y={exemplar.y}
|
|
1016
|
+
r={5}
|
|
1017
|
+
fill="#7c3aed"
|
|
1018
|
+
stroke="#ffffff"
|
|
1019
|
+
strokeWidth={2}
|
|
1020
|
+
style={{ cursor: "pointer" }}
|
|
1021
|
+
onClick={() => {
|
|
1022
|
+
props.onExemplarClick?.(exemplar.original);
|
|
1023
|
+
}}
|
|
1024
|
+
>
|
|
1025
|
+
<Label
|
|
1026
|
+
value="E"
|
|
1027
|
+
position="center"
|
|
1028
|
+
fill="#ffffff"
|
|
1029
|
+
fontSize={8}
|
|
1030
|
+
fontWeight={700}
|
|
1031
|
+
/>
|
|
1032
|
+
</ReferenceDot>
|
|
1033
|
+
);
|
|
1034
|
+
},
|
|
1035
|
+
)}
|
|
1003
1036
|
</RechartsAreaChart>
|
|
1004
1037
|
</ResponsiveContainer>
|
|
1005
1038
|
</div>
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
Line,
|
|
13
13
|
Legend as RechartsLegend,
|
|
14
14
|
LineChart as RechartsLineChart,
|
|
15
|
+
ReferenceDot,
|
|
15
16
|
ReferenceLine,
|
|
16
17
|
ResponsiveContainer,
|
|
17
18
|
Tooltip,
|
|
@@ -19,6 +20,8 @@ import {
|
|
|
19
20
|
YAxis,
|
|
20
21
|
} from "recharts";
|
|
21
22
|
import ChartReferenceLineProps from "../../Types/ReferenceLineProps";
|
|
23
|
+
import ExemplarPoint from "../../Types/ExemplarPoint";
|
|
24
|
+
import FormattedExemplarPoint from "../Types/FormattedExemplarPoint";
|
|
22
25
|
import { AxisDomain } from "recharts/types/util/types";
|
|
23
26
|
|
|
24
27
|
import { useOnWindowResize } from "../Utils/UseWindowOnResize";
|
|
@@ -574,6 +577,8 @@ interface LineChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
574
577
|
customTooltip?: React.ComponentType<TooltipProps>;
|
|
575
578
|
syncid?: string | undefined;
|
|
576
579
|
referenceLines?: Array<ChartReferenceLineProps> | undefined;
|
|
580
|
+
formattedExemplarPoints?: Array<FormattedExemplarPoint> | undefined;
|
|
581
|
+
onExemplarClick?: ((exemplar: ExemplarPoint) => void) | undefined;
|
|
577
582
|
}
|
|
578
583
|
|
|
579
584
|
const LineChart: React.ForwardRefExoticComponent<
|
|
@@ -1018,6 +1023,34 @@ const LineChart: React.ForwardRefExoticComponent<
|
|
|
1018
1023
|
);
|
|
1019
1024
|
},
|
|
1020
1025
|
)}
|
|
1026
|
+
{/* Exemplar dots - clickable markers linking to traces */}
|
|
1027
|
+
{props.formattedExemplarPoints?.map(
|
|
1028
|
+
(exemplar: FormattedExemplarPoint, exemplarIndex: number) => {
|
|
1029
|
+
return (
|
|
1030
|
+
<ReferenceDot
|
|
1031
|
+
key={`exemplar-${exemplarIndex}`}
|
|
1032
|
+
x={exemplar.formattedX}
|
|
1033
|
+
y={exemplar.y}
|
|
1034
|
+
r={5}
|
|
1035
|
+
fill="#7c3aed"
|
|
1036
|
+
stroke="#ffffff"
|
|
1037
|
+
strokeWidth={2}
|
|
1038
|
+
style={{ cursor: "pointer" }}
|
|
1039
|
+
onClick={() => {
|
|
1040
|
+
props.onExemplarClick?.(exemplar.original);
|
|
1041
|
+
}}
|
|
1042
|
+
>
|
|
1043
|
+
<Label
|
|
1044
|
+
value="E"
|
|
1045
|
+
position="center"
|
|
1046
|
+
fill="#ffffff"
|
|
1047
|
+
fontSize={8}
|
|
1048
|
+
fontWeight={700}
|
|
1049
|
+
/>
|
|
1050
|
+
</ReferenceDot>
|
|
1051
|
+
);
|
|
1052
|
+
},
|
|
1053
|
+
)}
|
|
1021
1054
|
</RechartsLineChart>
|
|
1022
1055
|
</ResponsiveContainer>
|
|
1023
1056
|
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import ExemplarPoint from "../../Types/ExemplarPoint";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An exemplar point with a formatted x-axis label that matches the chart's
|
|
5
|
+
* x-axis formatting. Used internally by chart library components.
|
|
6
|
+
*/
|
|
7
|
+
export default interface FormattedExemplarPoint {
|
|
8
|
+
/** The formatted x-axis label (e.g. "12:30", "Feb 22") */
|
|
9
|
+
formattedX: string;
|
|
10
|
+
/** The y value */
|
|
11
|
+
y: number;
|
|
12
|
+
/** The original exemplar data for click handling */
|
|
13
|
+
original: ExemplarPoint;
|
|
14
|
+
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { LineChart } from "../ChartLibrary/LineChart/LineChart";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, {
|
|
3
|
+
FunctionComponent,
|
|
4
|
+
ReactElement,
|
|
5
|
+
useEffect,
|
|
6
|
+
useMemo,
|
|
7
|
+
} from "react";
|
|
3
8
|
import SeriesPoint from "../Types/SeriesPoints";
|
|
4
9
|
import { XAxis } from "../Types/XAxis/XAxis";
|
|
5
10
|
import YAxis from "../Types/YAxis/YAxis";
|
|
6
11
|
import ChartCurve from "../Types/ChartCurve";
|
|
7
12
|
import ChartDataPoint from "../ChartLibrary/Types/ChartDataPoint";
|
|
13
|
+
import FormattedExemplarPoint from "../ChartLibrary/Types/FormattedExemplarPoint";
|
|
8
14
|
import DataPointUtil from "../Utils/DataPoint";
|
|
9
15
|
import ChartReferenceLineProps from "../Types/ReferenceLineProps";
|
|
16
|
+
import ExemplarPoint from "../Types/ExemplarPoint";
|
|
17
|
+
import XAxisUtil from "../Utils/XAxis";
|
|
10
18
|
import NoDataMessage from "../ChartGroup/NoDataMessage";
|
|
11
19
|
|
|
12
20
|
export interface ComponentProps {
|
|
@@ -17,6 +25,8 @@ export interface ComponentProps {
|
|
|
17
25
|
sync: boolean;
|
|
18
26
|
heightInPx?: number | undefined;
|
|
19
27
|
referenceLines?: Array<ChartReferenceLineProps> | undefined;
|
|
28
|
+
exemplarPoints?: Array<ExemplarPoint> | undefined;
|
|
29
|
+
onExemplarClick?: ((exemplar: ExemplarPoint) => void) | undefined;
|
|
20
30
|
}
|
|
21
31
|
|
|
22
32
|
export interface LineInternalProps extends ComponentProps {
|
|
@@ -42,6 +52,26 @@ const LineChartElement: FunctionComponent<LineInternalProps> = (
|
|
|
42
52
|
setRecords(records);
|
|
43
53
|
}, [props.data]);
|
|
44
54
|
|
|
55
|
+
// Format exemplar x values to match the chart's x-axis labels
|
|
56
|
+
const formattedExemplars: Array<FormattedExemplarPoint> = useMemo(() => {
|
|
57
|
+
if (!props.exemplarPoints || props.exemplarPoints.length === 0) {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const formatter: (value: Date) => string = XAxisUtil.getFormatter({
|
|
62
|
+
xAxisMax: props.xAxis.options.max,
|
|
63
|
+
xAxisMin: props.xAxis.options.min,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return props.exemplarPoints.map((exemplar: ExemplarPoint) => {
|
|
67
|
+
return {
|
|
68
|
+
formattedX: formatter(exemplar.x),
|
|
69
|
+
y: exemplar.y,
|
|
70
|
+
original: exemplar,
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
}, [props.exemplarPoints, props.xAxis]);
|
|
74
|
+
|
|
45
75
|
const className: string = props.heightInPx ? `` : "h-80";
|
|
46
76
|
const style: React.CSSProperties = props.heightInPx
|
|
47
77
|
? { height: `${props.heightInPx}px` }
|
|
@@ -82,6 +112,10 @@ const LineChartElement: FunctionComponent<LineInternalProps> = (
|
|
|
82
112
|
yAxisWidth={60}
|
|
83
113
|
onValueChange={() => {}}
|
|
84
114
|
referenceLines={props.referenceLines}
|
|
115
|
+
formattedExemplarPoints={
|
|
116
|
+
formattedExemplars.length > 0 ? formattedExemplars : undefined
|
|
117
|
+
}
|
|
118
|
+
onExemplarClick={props.onExemplarClick}
|
|
85
119
|
/>
|
|
86
120
|
{hasNoData && <NoDataMessage />}
|
|
87
121
|
</div>
|
|
@@ -28,6 +28,8 @@ export interface ComponentProps {
|
|
|
28
28
|
addButtonSuffix?: string | undefined;
|
|
29
29
|
valueTypes?: Array<ValueType>; // by default it'll be Text
|
|
30
30
|
keys?: Array<string> | undefined;
|
|
31
|
+
valueSuggestions?: Record<string, Array<string>> | undefined;
|
|
32
|
+
onKeySelected?: ((key: string) => void) | undefined;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
interface Item {
|
|
@@ -160,6 +162,11 @@ const DictionaryForm: FunctionComponent<ComponentProps> = (
|
|
|
160
162
|
newData[index]!.key = value;
|
|
161
163
|
setData(newData);
|
|
162
164
|
onDataChange(newData);
|
|
165
|
+
|
|
166
|
+
// If this key matches one of the known keys, notify parent to fetch values
|
|
167
|
+
if (props.onKeySelected && props.keys?.includes(value)) {
|
|
168
|
+
props.onKeySelected(value);
|
|
169
|
+
}
|
|
163
170
|
}}
|
|
164
171
|
/>
|
|
165
172
|
</div>
|
|
@@ -212,9 +219,14 @@ const DictionaryForm: FunctionComponent<ComponentProps> = (
|
|
|
212
219
|
/>
|
|
213
220
|
</div>
|
|
214
221
|
{item.type === ValueType.Text && (
|
|
215
|
-
<
|
|
222
|
+
<AutocompleteTextInput
|
|
216
223
|
value={item.value.toString()}
|
|
217
224
|
placeholder={props.valuePlaceholder}
|
|
225
|
+
suggestions={
|
|
226
|
+
item.key && props.valueSuggestions?.[item.key]
|
|
227
|
+
? props.valueSuggestions[item.key]
|
|
228
|
+
: undefined
|
|
229
|
+
}
|
|
218
230
|
onChange={(value: string) => {
|
|
219
231
|
const newData: Array<Item> = [...data];
|
|
220
232
|
newData[index]!.value = value;
|
|
@@ -128,6 +128,8 @@ const FiltersForm: FiltersFormFunction = <T extends GenericObject>(
|
|
|
128
128
|
filterData={props.filterData}
|
|
129
129
|
onFilterChanged={changeFilterData}
|
|
130
130
|
jsonKeys={filter.jsonKeys}
|
|
131
|
+
jsonValueSuggestions={filter.jsonValueSuggestions}
|
|
132
|
+
onJsonKeySelected={filter.onJsonKeySelected}
|
|
131
133
|
/>
|
|
132
134
|
</div>
|
|
133
135
|
);
|