@oneuptime/common 11.3.28 → 11.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/AIRun.ts +50 -0
- package/Models/DatabaseModels/Project.ts +60 -0
- package/Server/API/AIAgentTaskAPI.ts +10 -24
- package/Server/API/AIInvestigationAPI.ts +148 -0
- package/Server/API/TelemetryAPI.ts +4 -3
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783598145111-AddEnableAutomaticIncidentInvestigationToProject.ts +19 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783615884106-AddInvestigationSubjectToAIRun.ts +33 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783632447975-AddEnableAutomaticAlertInvestigationToProject.ts +19 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +6 -0
- package/Server/Services/AIAgentTaskService.ts +62 -0
- package/Server/Services/AlertService.ts +25 -0
- package/Server/Services/AnalyticsDatabaseService.ts +27 -0
- package/Server/Services/IncidentService.ts +25 -0
- package/Server/Services/IncidentStateTimelineService.ts +19 -0
- package/Server/Services/LogAggregationService.ts +29 -11
- package/Server/Services/MetricService.ts +603 -13
- package/Server/Utils/AI/Chat/ObservabilityAssistant.ts +119 -11
- package/Server/Utils/AI/Sentinel/AlertInvestigationRunner.ts +141 -0
- package/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.ts +178 -0
- package/Server/Utils/AI/Sentinel/IncidentPostmortemRunner.ts +105 -0
- package/Server/Utils/AI/Sentinel/README.md +10 -0
- package/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.ts +405 -0
- package/Server/Utils/AI/Sentinel/SentinelMemory.ts +167 -0
- package/Server/Utils/AI/Toolbox/Index.ts +11 -0
- package/Server/Utils/AI/Toolbox/SentinelActionTools.ts +577 -0
- package/Server/Utils/Monitor/Criteria/APIRequestCriteria.ts +44 -0
- package/Server/Utils/Monitor/MonitorMetricUtil.ts +108 -2
- package/Tests/Server/API/BaseAPI.test.ts +1 -0
- package/Tests/Server/Services/AIAgentTaskServiceClaim.test.ts +146 -0
- package/Tests/Server/Services/LogAggregationService.test.ts +22 -0
- package/Tests/Server/Services/MetricServiceAggregate.test.ts +194 -0
- package/Tests/Types/AI/AIAgentTaskStatus.test.ts +86 -0
- package/Tests/Types/BaseDatabase/AggregationIntervalUtil.test.ts +127 -0
- package/Tests/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.test.ts +152 -0
- package/Tests/Types/OnCallDutyPolicy/ScheduleShiftUtil.test.ts +260 -0
- package/Tests/Types/Trace/TraceRecordingRuleDefinition.test.ts +308 -0
- package/Tests/UI/Components/Dropdown.test.tsx +17 -0
- package/Tests/UI/Components/EntityDropdown.test.tsx +130 -0
- package/Tests/UI/Components/Modal.test.tsx +144 -2
- package/Tests/UI/Components/TelemetrySearchBar.test.tsx +90 -0
- package/Tests/UI/Utils/Theme.test.ts +161 -0
- package/Types/BaseDatabase/AggregateBy.ts +12 -0
- package/Types/Dashboard/DashboardComponentType.ts +1 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +1 -0
- package/Types/Dashboard/DashboardComponents/DashboardLogChartComponent.ts +19 -0
- package/Types/Dashboard/DashboardTemplates.ts +9 -1
- package/Types/Date.ts +46 -0
- package/Types/Monitor/CriteriaFilter.ts +4 -0
- package/Types/Monitor/HttpPhaseTimings.ts +16 -0
- package/Types/Monitor/MonitorMetricType.ts +17 -0
- package/Types/Monitor/PingMonitor/PingMonitorResponse.ts +20 -0
- package/Types/OnCallDutyPolicy/ScheduleShiftUtil.ts +257 -0
- package/Types/Probe/ProbeMonitorResponse.ts +14 -0
- package/UI/Components/Calendar/Calendar.tsx +8 -2
- package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +5 -5
- package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +8 -5
- package/UI/Components/Charts/ChartLibrary/BarChart/BarChart.tsx +4 -1
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +6 -3
- package/UI/Components/CodeBlock/CodeBlock.tsx +2 -1
- package/UI/Components/CodeEditor/CodeEditor.tsx +3 -0
- package/UI/Components/Divider/Divider.tsx +1 -1
- package/UI/Components/Dropdown/Dropdown.tsx +13 -4
- package/UI/Components/EntityDropdown/EntityDropdown.tsx +110 -2
- package/UI/Components/ErrorBoundary.tsx +2 -1
- package/UI/Components/EventItem/EventItem.tsx +2 -2
- package/UI/Components/GanttChart/Bar/Index.tsx +1 -1
- package/UI/Components/Graphs/UptimeBarTooltip.tsx +30 -23
- package/UI/Components/Header/Header.tsx +7 -0
- package/UI/Components/Header/HeaderIconDropdownButton.tsx +2 -0
- package/UI/Components/Label/Label.tsx +2 -2
- package/UI/Components/LogsViewer/components/LogsAnalyticsView.tsx +22 -10
- package/UI/Components/LogsViewer/components/LogsHistogram.tsx +9 -3
- package/UI/Components/Markdown.tsx/MarkdownEditor.tsx +8 -8
- package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +44 -20
- package/UI/Components/Modal/ConfirmModal.tsx +1 -1
- package/UI/Components/Modal/Modal.tsx +213 -121
- package/UI/Components/Modal/ModalFooter.tsx +33 -22
- package/UI/Components/ModelTable/TableView.tsx +1 -1
- package/UI/Components/MonitorGraphs/UptimeBarDayModal.tsx +20 -12
- package/UI/Components/Pill/Pill.tsx +21 -13
- package/UI/Components/StatusBubble/StatusBubble.tsx +3 -3
- package/UI/Components/TelemetryViewer/TelemetryViewer.tsx +7 -1
- package/UI/Components/TelemetryViewer/components/TelemetryHistogram.tsx +9 -3
- package/UI/Components/TelemetryViewer/components/TelemetrySearchBar.tsx +62 -4
- package/UI/Components/Workflow/Component.tsx +53 -33
- package/UI/Components/Workflow/ComponentPortViewer.tsx +6 -6
- package/UI/Components/Workflow/ComponentReturnValueViewer.tsx +8 -8
- package/UI/Components/Workflow/ComponentsModal.tsx +16 -9
- package/UI/Components/Workflow/Workflow.tsx +13 -11
- package/UI/Utils/Theme.ts +140 -0
- package/Utils/Dashboard/Components/DashboardLogChartComponent.ts +104 -0
- package/Utils/Dashboard/Components/Index.ts +7 -0
- package/Utils/Monitor/MonitorMetricType.ts +70 -2
- package/build/dist/Models/DatabaseModels/AIRun.js +52 -0
- package/build/dist/Models/DatabaseModels/AIRun.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Project.js +62 -0
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Server/API/AIAgentTaskAPI.js +8 -23
- package/build/dist/Server/API/AIAgentTaskAPI.js.map +1 -1
- package/build/dist/Server/API/AIInvestigationAPI.js +107 -0
- package/build/dist/Server/API/AIInvestigationAPI.js.map +1 -0
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783598145111-AddEnableAutomaticIncidentInvestigationToProject.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783598145111-AddEnableAutomaticIncidentInvestigationToProject.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783615884106-AddInvestigationSubjectToAIRun.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783615884106-AddInvestigationSubjectToAIRun.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783632447975-AddEnableAutomaticAlertInvestigationToProject.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783632447975-AddEnableAutomaticAlertInvestigationToProject.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +6 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AIAgentTaskService.js +59 -0
- package/build/dist/Server/Services/AIAgentTaskService.js.map +1 -1
- package/build/dist/Server/Services/AlertService.js +24 -0
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +19 -0
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +24 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +19 -0
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +21 -7
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricService.js +449 -7
- package/build/dist/Server/Services/MetricService.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ObservabilityAssistant.js +59 -11
- package/build/dist/Server/Utils/AI/Chat/ObservabilityAssistant.js.map +1 -1
- package/build/dist/Server/Utils/AI/Sentinel/AlertInvestigationRunner.js +119 -0
- package/build/dist/Server/Utils/AI/Sentinel/AlertInvestigationRunner.js.map +1 -0
- package/build/dist/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.js +147 -0
- package/build/dist/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.js.map +1 -0
- package/build/dist/Server/Utils/AI/Sentinel/IncidentPostmortemRunner.js +93 -0
- package/build/dist/Server/Utils/AI/Sentinel/IncidentPostmortemRunner.js.map +1 -0
- package/build/dist/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.js +311 -0
- package/build/dist/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.js.map +1 -0
- package/build/dist/Server/Utils/AI/Sentinel/SentinelMemory.js +143 -0
- package/build/dist/Server/Utils/AI/Sentinel/SentinelMemory.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js +6 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/SentinelActionTools.js +451 -0
- package/build/dist/Server/Utils/AI/Toolbox/SentinelActionTools.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/APIRequestCriteria.js +29 -0
- package/build/dist/Server/Utils/Monitor/Criteria/APIRequestCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js +86 -2
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponentType.js +1 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardLogChartComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardLogChartComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js +9 -1
- package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
- package/build/dist/Types/Date.js +32 -0
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +4 -0
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/HttpPhaseTimings.js +2 -0
- package/build/dist/Types/Monitor/HttpPhaseTimings.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorMetricType.js +15 -0
- package/build/dist/Types/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Types/Monitor/PingMonitor/PingMonitorResponse.js +2 -0
- package/build/dist/Types/Monitor/PingMonitor/PingMonitorResponse.js.map +1 -0
- package/build/dist/Types/OnCallDutyPolicy/ScheduleShiftUtil.js +159 -0
- package/build/dist/Types/OnCallDutyPolicy/ScheduleShiftUtil.js.map +1 -0
- package/build/dist/UI/Components/Calendar/Calendar.js +2 -2
- package/build/dist/UI/Components/Calendar/Calendar.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 +7 -4
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js +4 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +6 -3
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
- package/build/dist/UI/Components/CodeBlock/CodeBlock.js +1 -1
- package/build/dist/UI/Components/CodeBlock/CodeBlock.js.map +1 -1
- package/build/dist/UI/Components/CodeEditor/CodeEditor.js +3 -1
- package/build/dist/UI/Components/CodeEditor/CodeEditor.js.map +1 -1
- package/build/dist/UI/Components/Divider/Divider.js +1 -1
- package/build/dist/UI/Components/Divider/Divider.js.map +1 -1
- package/build/dist/UI/Components/Dropdown/Dropdown.js +10 -4
- package/build/dist/UI/Components/Dropdown/Dropdown.js.map +1 -1
- package/build/dist/UI/Components/EntityDropdown/EntityDropdown.js +76 -3
- package/build/dist/UI/Components/EntityDropdown/EntityDropdown.js.map +1 -1
- package/build/dist/UI/Components/ErrorBoundary.js +2 -1
- package/build/dist/UI/Components/ErrorBoundary.js.map +1 -1
- package/build/dist/UI/Components/EventItem/EventItem.js +2 -2
- package/build/dist/UI/Components/EventItem/EventItem.js.map +1 -1
- package/build/dist/UI/Components/GanttChart/Bar/Index.js +1 -1
- package/build/dist/UI/Components/GanttChart/Bar/Index.js.map +1 -1
- package/build/dist/UI/Components/Graphs/UptimeBarTooltip.js +29 -23
- package/build/dist/UI/Components/Graphs/UptimeBarTooltip.js.map +1 -1
- package/build/dist/UI/Components/Header/Header.js +1 -0
- package/build/dist/UI/Components/Header/Header.js.map +1 -1
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js +1 -1
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js.map +1 -1
- package/build/dist/UI/Components/Label/Label.js +2 -2
- package/build/dist/UI/Components/Label/Label.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js +20 -8
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsHistogram.js +8 -2
- package/build/dist/UI/Components/LogsViewer/components/LogsHistogram.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownEditor.js +8 -8
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +40 -20
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
- package/build/dist/UI/Components/Modal/ConfirmModal.js +1 -1
- package/build/dist/UI/Components/Modal/ConfirmModal.js.map +1 -1
- package/build/dist/UI/Components/Modal/Modal.js +109 -51
- package/build/dist/UI/Components/Modal/Modal.js.map +1 -1
- package/build/dist/UI/Components/Modal/ModalFooter.js +13 -10
- package/build/dist/UI/Components/Modal/ModalFooter.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/TableView.js +1 -1
- package/build/dist/UI/Components/ModelTable/TableView.js.map +1 -1
- package/build/dist/UI/Components/MonitorGraphs/UptimeBarDayModal.js +17 -12
- package/build/dist/UI/Components/MonitorGraphs/UptimeBarDayModal.js.map +1 -1
- package/build/dist/UI/Components/Pill/Pill.js +12 -13
- package/build/dist/UI/Components/Pill/Pill.js.map +1 -1
- package/build/dist/UI/Components/StatusBubble/StatusBubble.js +3 -3
- package/build/dist/UI/Components/StatusBubble/StatusBubble.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js +1 -1
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js +8 -2
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js +36 -6
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js.map +1 -1
- package/build/dist/UI/Components/Workflow/Component.js +43 -33
- package/build/dist/UI/Components/Workflow/Component.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentPortViewer.js +6 -6
- package/build/dist/UI/Components/Workflow/ComponentPortViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js +8 -8
- package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentsModal.js +15 -9
- package/build/dist/UI/Components/Workflow/ComponentsModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/Workflow.js +13 -11
- package/build/dist/UI/Components/Workflow/Workflow.js.map +1 -1
- package/build/dist/UI/Utils/Theme.js +106 -0
- package/build/dist/UI/Utils/Theme.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardLogChartComponent.js +92 -0
- package/build/dist/Utils/Dashboard/Components/DashboardLogChartComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/Index.js +4 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/Monitor/MonitorMetricType.js +70 -3
- package/build/dist/Utils/Monitor/MonitorMetricType.js.map +1 -1
- package/package.json +1 -1
|
@@ -37,8 +37,8 @@ const ComponentReturnValueViewer: FunctionComponent<ComponentProps> = (
|
|
|
37
37
|
gap: "0.625rem",
|
|
38
38
|
padding: "0.5rem 0.75rem",
|
|
39
39
|
borderRadius: "8px",
|
|
40
|
-
backgroundColor: "#f8fafc",
|
|
41
|
-
border: "1px solid #f1f5f9",
|
|
40
|
+
backgroundColor: "var(--ou-surface-secondary, #f8fafc)",
|
|
41
|
+
border: "1px solid var(--ou-border-subtle, #f1f5f9)",
|
|
42
42
|
marginBottom: "0.375rem",
|
|
43
43
|
}}
|
|
44
44
|
>
|
|
@@ -47,7 +47,7 @@ const ComponentReturnValueViewer: FunctionComponent<ComponentProps> = (
|
|
|
47
47
|
style={{
|
|
48
48
|
fontSize: "0.8125rem",
|
|
49
49
|
fontWeight: 500,
|
|
50
|
-
color: "#334155",
|
|
50
|
+
color: "var(--ou-text-secondary, #334155)",
|
|
51
51
|
margin: 0,
|
|
52
52
|
lineHeight: "1.25rem",
|
|
53
53
|
}}
|
|
@@ -55,7 +55,7 @@ const ComponentReturnValueViewer: FunctionComponent<ComponentProps> = (
|
|
|
55
55
|
{returnValue.name}
|
|
56
56
|
<span
|
|
57
57
|
style={{
|
|
58
|
-
color: "#94a3b8",
|
|
58
|
+
color: "var(--ou-text-subtle, #94a3b8)",
|
|
59
59
|
fontWeight: 400,
|
|
60
60
|
fontSize: "0.6875rem",
|
|
61
61
|
marginLeft: "0.375rem",
|
|
@@ -70,7 +70,7 @@ const ComponentReturnValueViewer: FunctionComponent<ComponentProps> = (
|
|
|
70
70
|
<p
|
|
71
71
|
style={{
|
|
72
72
|
fontSize: "0.75rem",
|
|
73
|
-
color: "#94a3b8",
|
|
73
|
+
color: "var(--ou-text-subtle, #94a3b8)",
|
|
74
74
|
margin: 0,
|
|
75
75
|
lineHeight: "1rem",
|
|
76
76
|
}}
|
|
@@ -83,12 +83,12 @@ const ComponentReturnValueViewer: FunctionComponent<ComponentProps> = (
|
|
|
83
83
|
style={{
|
|
84
84
|
fontSize: "0.6875rem",
|
|
85
85
|
fontWeight: 500,
|
|
86
|
-
color: "#6366f1",
|
|
87
|
-
backgroundColor: "#eef2ff",
|
|
86
|
+
color: "var(--ou-link, #6366f1)",
|
|
87
|
+
backgroundColor: "var(--ou-accent-soft, #eef2ff)",
|
|
88
88
|
padding: "0.125rem 0.5rem",
|
|
89
89
|
borderRadius: "100px",
|
|
90
90
|
whiteSpace: "nowrap",
|
|
91
|
-
border: "1px solid #e0e7ff",
|
|
91
|
+
border: "1px solid var(--ou-accent-muted, #e0e7ff)",
|
|
92
92
|
}}
|
|
93
93
|
>
|
|
94
94
|
{returnValue.type}
|
|
@@ -404,7 +404,8 @@ const ComponentsModal: FunctionComponent<ComponentProps> = (
|
|
|
404
404
|
style={{
|
|
405
405
|
width: "28px",
|
|
406
406
|
height: "28px",
|
|
407
|
-
backgroundColor:
|
|
407
|
+
backgroundColor:
|
|
408
|
+
"var(--ou-surface-tertiary, #f1f5f9)",
|
|
408
409
|
}}
|
|
409
410
|
>
|
|
410
411
|
<Icon
|
|
@@ -443,16 +444,16 @@ const ComponentsModal: FunctionComponent<ComponentProps> = (
|
|
|
443
444
|
borderRadius: "10px",
|
|
444
445
|
border: isSelected
|
|
445
446
|
? "2px solid #6366f1"
|
|
446
|
-
: "1px solid #e2e8f0",
|
|
447
|
+
: "1px solid var(--ou-border-default, #e2e8f0)",
|
|
447
448
|
backgroundColor: isSelected
|
|
448
|
-
? "#eef2ff"
|
|
449
|
-
: "#ffffff",
|
|
449
|
+
? "var(--ou-accent-soft, #eef2ff)"
|
|
450
|
+
: "var(--ou-surface-primary, #ffffff)",
|
|
450
451
|
display: "flex",
|
|
451
452
|
alignItems: "flex-start",
|
|
452
453
|
gap: "0.75rem",
|
|
453
454
|
boxShadow: isSelected
|
|
454
455
|
? "0 0 0 3px rgba(99, 102, 241, 0.1)"
|
|
455
|
-
: "0 1px 2px 0 rgba(0, 0, 0, 0.03)",
|
|
456
|
+
: "var(--ou-card-shadow, 0 1px 2px 0 rgba(0, 0, 0, 0.03))",
|
|
456
457
|
}}
|
|
457
458
|
>
|
|
458
459
|
{/* Icon */}
|
|
@@ -463,7 +464,7 @@ const ComponentsModal: FunctionComponent<ComponentProps> = (
|
|
|
463
464
|
borderRadius: "8px",
|
|
464
465
|
backgroundColor: isSelected
|
|
465
466
|
? "#6366f1"
|
|
466
|
-
: "#f1f5f9",
|
|
467
|
+
: "var(--ou-surface-tertiary, #f1f5f9)",
|
|
467
468
|
display: "flex",
|
|
468
469
|
alignItems: "center",
|
|
469
470
|
justifyContent: "center",
|
|
@@ -474,7 +475,9 @@ const ComponentsModal: FunctionComponent<ComponentProps> = (
|
|
|
474
475
|
<Icon
|
|
475
476
|
icon={componentMetadata.iconProp}
|
|
476
477
|
style={{
|
|
477
|
-
color: isSelected
|
|
478
|
+
color: isSelected
|
|
479
|
+
? "#ffffff"
|
|
480
|
+
: "var(--ou-text-muted, #64748b)",
|
|
478
481
|
width: "1rem",
|
|
479
482
|
height: "1rem",
|
|
480
483
|
}}
|
|
@@ -488,7 +491,9 @@ const ComponentsModal: FunctionComponent<ComponentProps> = (
|
|
|
488
491
|
style={{
|
|
489
492
|
fontSize: "0.8125rem",
|
|
490
493
|
fontWeight: 600,
|
|
491
|
-
color: isSelected
|
|
494
|
+
color: isSelected
|
|
495
|
+
? "var(--ou-accent-text, #4338ca)"
|
|
496
|
+
: "var(--ou-text-primary, #1e293b)",
|
|
492
497
|
margin: 0,
|
|
493
498
|
lineHeight: "1.25rem",
|
|
494
499
|
}}
|
|
@@ -521,7 +526,9 @@ const ComponentsModal: FunctionComponent<ComponentProps> = (
|
|
|
521
526
|
<p
|
|
522
527
|
style={{
|
|
523
528
|
fontSize: "0.75rem",
|
|
524
|
-
color: isSelected
|
|
529
|
+
color: isSelected
|
|
530
|
+
? "var(--ou-link, #6366f1)"
|
|
531
|
+
: "var(--ou-text-subtle, #94a3b8)",
|
|
525
532
|
margin: 0,
|
|
526
533
|
marginTop: "2px",
|
|
527
534
|
lineHeight: "1rem",
|
|
@@ -71,8 +71,8 @@ const nodeTypes: NodeTypes = {
|
|
|
71
71
|
|
|
72
72
|
const edgeStyle: React.CSSProperties = {
|
|
73
73
|
strokeWidth: "2px",
|
|
74
|
-
stroke: "#94a3b8",
|
|
75
|
-
color: "#94a3b8",
|
|
74
|
+
stroke: "var(--ou-chart-tick, #94a3b8)",
|
|
75
|
+
color: "var(--ou-chart-tick, #94a3b8)",
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
const selectedEdgeStyle: React.CSSProperties = {
|
|
@@ -411,31 +411,33 @@ const Workflow: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
|
|
|
411
411
|
minHeight: "600px",
|
|
412
412
|
borderRadius: "8px",
|
|
413
413
|
overflow: "hidden",
|
|
414
|
-
border: "1px solid #e2e8f0",
|
|
414
|
+
border: "1px solid var(--ou-border-default, #e2e8f0)",
|
|
415
415
|
}}
|
|
416
416
|
>
|
|
417
417
|
<style>
|
|
418
418
|
{`
|
|
419
419
|
.react-flow__minimap {
|
|
420
420
|
border-radius: 8px !important;
|
|
421
|
-
border: 1px solid #e2e8f0 !important;
|
|
421
|
+
border: 1px solid var(--ou-border-default, #e2e8f0) !important;
|
|
422
422
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07) !important;
|
|
423
423
|
overflow: hidden !important;
|
|
424
|
-
background: #ffffff !important;
|
|
424
|
+
background: var(--ou-surface-primary, #ffffff) !important;
|
|
425
425
|
}
|
|
426
426
|
.react-flow__controls {
|
|
427
427
|
border-radius: 8px !important;
|
|
428
|
-
border: 1px solid #e2e8f0 !important;
|
|
428
|
+
border: 1px solid var(--ou-border-default, #e2e8f0) !important;
|
|
429
429
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07) !important;
|
|
430
430
|
overflow: hidden !important;
|
|
431
431
|
}
|
|
432
432
|
.react-flow__controls-button {
|
|
433
|
-
border-bottom: 1px solid #f1f5f9 !important;
|
|
433
|
+
border-bottom: 1px solid var(--ou-border-subtle, #f1f5f9) !important;
|
|
434
|
+
background: var(--ou-surface-primary, #ffffff) !important;
|
|
435
|
+
color: var(--ou-text-secondary, #475569) !important;
|
|
434
436
|
width: 32px !important;
|
|
435
437
|
height: 32px !important;
|
|
436
438
|
}
|
|
437
439
|
.react-flow__controls-button:hover {
|
|
438
|
-
background: #f8fafc !important;
|
|
440
|
+
background: var(--ou-surface-secondary, #f8fafc) !important;
|
|
439
441
|
}
|
|
440
442
|
.react-flow__controls-button svg {
|
|
441
443
|
max-width: 14px !important;
|
|
@@ -507,9 +509,9 @@ const Workflow: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
|
|
|
507
509
|
}
|
|
508
510
|
return "#6366f1";
|
|
509
511
|
}}
|
|
510
|
-
maskColor="rgba(241, 245, 249, 0.7)"
|
|
512
|
+
maskColor="var(--ou-flow-mask, rgba(241, 245, 249, 0.7))"
|
|
511
513
|
style={{
|
|
512
|
-
backgroundColor: "#ffffff",
|
|
514
|
+
backgroundColor: "var(--ou-surface-primary, #ffffff)",
|
|
513
515
|
}}
|
|
514
516
|
/>
|
|
515
517
|
<Controls />
|
|
@@ -517,7 +519,7 @@ const Workflow: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
|
|
|
517
519
|
variant={BackgroundVariant.Dots}
|
|
518
520
|
gap={20}
|
|
519
521
|
size={1}
|
|
520
|
-
color="#cbd5e1"
|
|
522
|
+
color="var(--ou-chart-grid, #cbd5e1)"
|
|
521
523
|
/>
|
|
522
524
|
</ReactFlow>
|
|
523
525
|
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export enum Theme {
|
|
4
|
+
Light = "light",
|
|
5
|
+
Dark = "dark",
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const THEME_STORAGE_KEY: string = "oneuptime-dashboard-theme";
|
|
9
|
+
export const THEME_CHANGE_EVENT: string = "oneuptime:theme-change";
|
|
10
|
+
|
|
11
|
+
const LIGHT_THEME_COLOR: string = "#f9fafb";
|
|
12
|
+
const DARK_THEME_COLOR: string = "#0f172a";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Owns the dashboard theme at the document boundary. The saved preference is
|
|
16
|
+
* deliberately opt-in: a missing, invalid, or inaccessible value is light.
|
|
17
|
+
*/
|
|
18
|
+
export default class ThemeUtil {
|
|
19
|
+
private static hasStorageListener: boolean = false;
|
|
20
|
+
|
|
21
|
+
public static getStoredTheme(): Theme {
|
|
22
|
+
if (typeof window === "undefined") {
|
|
23
|
+
return Theme.Light;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
return window.localStorage.getItem(THEME_STORAGE_KEY) === Theme.Dark
|
|
28
|
+
? Theme.Dark
|
|
29
|
+
: Theme.Light;
|
|
30
|
+
} catch {
|
|
31
|
+
return Theme.Light;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public static getAppliedTheme(): Theme {
|
|
36
|
+
if (typeof document === "undefined") {
|
|
37
|
+
return Theme.Light;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return document.documentElement.classList.contains(Theme.Dark)
|
|
41
|
+
? Theme.Dark
|
|
42
|
+
: Theme.Light;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public static initialize(): void {
|
|
46
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
ThemeUtil.applyTheme(ThemeUtil.getStoredTheme(), false);
|
|
51
|
+
|
|
52
|
+
if (ThemeUtil.hasStorageListener) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
window.addEventListener("storage", (event: StorageEvent): void => {
|
|
57
|
+
if (event.key !== THEME_STORAGE_KEY && event.key !== null) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
ThemeUtil.applyTheme(
|
|
62
|
+
event.key === THEME_STORAGE_KEY && event.newValue === Theme.Dark
|
|
63
|
+
? Theme.Dark
|
|
64
|
+
: Theme.Light,
|
|
65
|
+
);
|
|
66
|
+
});
|
|
67
|
+
ThemeUtil.hasStorageListener = true;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public static setTheme(theme: Theme): void {
|
|
71
|
+
if (typeof window !== "undefined") {
|
|
72
|
+
try {
|
|
73
|
+
window.localStorage.setItem(THEME_STORAGE_KEY, theme);
|
|
74
|
+
} catch {
|
|
75
|
+
// The visual theme still works when storage is unavailable.
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
ThemeUtil.applyTheme(theme);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
public static toggleTheme(): Theme {
|
|
83
|
+
const theme: Theme =
|
|
84
|
+
ThemeUtil.getAppliedTheme() === Theme.Dark ? Theme.Light : Theme.Dark;
|
|
85
|
+
ThemeUtil.setTheme(theme);
|
|
86
|
+
return theme;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
private static applyTheme(theme: Theme, notify: boolean = true): void {
|
|
90
|
+
if (typeof document === "undefined") {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const isDark: boolean = theme === Theme.Dark;
|
|
95
|
+
const root: HTMLElement = document.documentElement;
|
|
96
|
+
root.classList.toggle(Theme.Dark, isDark);
|
|
97
|
+
root.dataset["theme"] = theme;
|
|
98
|
+
root.style.colorScheme = theme;
|
|
99
|
+
|
|
100
|
+
const themeColor: HTMLMetaElement | null = document.querySelector(
|
|
101
|
+
'meta[name="theme-color"]:not([media])',
|
|
102
|
+
);
|
|
103
|
+
themeColor?.setAttribute(
|
|
104
|
+
"content",
|
|
105
|
+
isDark ? DARK_THEME_COLOR : LIGHT_THEME_COLOR,
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
if (notify && typeof window !== "undefined") {
|
|
109
|
+
window.dispatchEvent(
|
|
110
|
+
new CustomEvent(THEME_CHANGE_EVENT, {
|
|
111
|
+
detail: { theme },
|
|
112
|
+
}),
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const subscribeToTheme: (onStoreChange: () => void) => () => void = (
|
|
119
|
+
onStoreChange: () => void,
|
|
120
|
+
): (() => void) => {
|
|
121
|
+
if (typeof window === "undefined") {
|
|
122
|
+
return (): void => {};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
window.addEventListener(THEME_CHANGE_EVENT, onStoreChange);
|
|
126
|
+
return (): void => {
|
|
127
|
+
window.removeEventListener(THEME_CHANGE_EVENT, onStoreChange);
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/** Reactively reads the theme applied to the document root. */
|
|
132
|
+
export const useTheme: () => Theme = (): Theme => {
|
|
133
|
+
return React.useSyncExternalStore(
|
|
134
|
+
subscribeToTheme,
|
|
135
|
+
ThemeUtil.getAppliedTheme,
|
|
136
|
+
(): Theme => {
|
|
137
|
+
return Theme.Light;
|
|
138
|
+
},
|
|
139
|
+
);
|
|
140
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import DashboardLogChartComponent from "../../../Types/Dashboard/DashboardComponents/DashboardLogChartComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import LogSeverity from "../../../Types/Log/LogSeverity";
|
|
5
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
6
|
+
import {
|
|
7
|
+
ComponentArgument,
|
|
8
|
+
ComponentArgumentSection,
|
|
9
|
+
ComponentInputType,
|
|
10
|
+
EntityFilterModelType,
|
|
11
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
12
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
13
|
+
|
|
14
|
+
const DisplaySection: ComponentArgumentSection = {
|
|
15
|
+
name: "Display Options",
|
|
16
|
+
description: "Configure the chart heading",
|
|
17
|
+
order: 1,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const FiltersSection: ComponentArgumentSection = {
|
|
21
|
+
name: "Log Query",
|
|
22
|
+
description: "Choose which logs contribute to the chart",
|
|
23
|
+
order: 2,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default class DashboardLogChartComponentUtil extends DashboardBaseComponentUtil {
|
|
27
|
+
public static override getDefaultComponent(): DashboardLogChartComponent {
|
|
28
|
+
return {
|
|
29
|
+
_type: ObjectType.DashboardComponent,
|
|
30
|
+
componentType: DashboardComponentType.LogChart,
|
|
31
|
+
widthInDashboardUnits: 8,
|
|
32
|
+
heightInDashboardUnits: 5,
|
|
33
|
+
topInDashboardUnits: 0,
|
|
34
|
+
leftInDashboardUnits: 0,
|
|
35
|
+
componentId: ObjectID.generate(),
|
|
36
|
+
minHeightInDashboardUnits: 3,
|
|
37
|
+
minWidthInDashboardUnits: 6,
|
|
38
|
+
arguments: {},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public static override getComponentConfigArguments(): Array<
|
|
43
|
+
ComponentArgument<DashboardLogChartComponent>
|
|
44
|
+
> {
|
|
45
|
+
return [
|
|
46
|
+
{
|
|
47
|
+
name: "Title",
|
|
48
|
+
description: "Header shown above the log-volume chart",
|
|
49
|
+
required: false,
|
|
50
|
+
type: ComponentInputType.Text,
|
|
51
|
+
id: "title",
|
|
52
|
+
placeholder: "Log Volume",
|
|
53
|
+
section: DisplaySection,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "Services",
|
|
57
|
+
description: "Only count logs emitted by the selected services",
|
|
58
|
+
required: false,
|
|
59
|
+
type: ComponentInputType.EntityMultiSelectDropdown,
|
|
60
|
+
id: "serviceIds",
|
|
61
|
+
placeholder: "All services",
|
|
62
|
+
section: FiltersSection,
|
|
63
|
+
entityFilterModelType: EntityFilterModelType.Service,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "Severities",
|
|
67
|
+
description: "Only count logs at the selected severity levels",
|
|
68
|
+
required: false,
|
|
69
|
+
type: ComponentInputType.MultiSelectDropdown,
|
|
70
|
+
id: "severityFilters",
|
|
71
|
+
placeholder: "All severities",
|
|
72
|
+
section: FiltersSection,
|
|
73
|
+
dropdownOptions: [
|
|
74
|
+
{ label: "Fatal", value: LogSeverity.Fatal },
|
|
75
|
+
{ label: "Error", value: LogSeverity.Error },
|
|
76
|
+
{ label: "Warning", value: LogSeverity.Warning },
|
|
77
|
+
{ label: "Information", value: LogSeverity.Information },
|
|
78
|
+
{ label: "Debug", value: LogSeverity.Debug },
|
|
79
|
+
{ label: "Trace", value: LogSeverity.Trace },
|
|
80
|
+
{ label: "Unspecified", value: LogSeverity.Unspecified },
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "Body Contains",
|
|
85
|
+
description: "Only count logs whose body contains this text",
|
|
86
|
+
required: false,
|
|
87
|
+
type: ComponentInputType.Text,
|
|
88
|
+
id: "bodyContains",
|
|
89
|
+
placeholder: "Search text...",
|
|
90
|
+
section: FiltersSection,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "Attribute Filters",
|
|
94
|
+
description:
|
|
95
|
+
"Exact attribute matches, e.g. @service.name:checkout @deployment.environment:production",
|
|
96
|
+
required: false,
|
|
97
|
+
type: ComponentInputType.LongText,
|
|
98
|
+
id: "attributeFilterQuery",
|
|
99
|
+
placeholder: "@key:value @another.key:value",
|
|
100
|
+
section: FiltersSection,
|
|
101
|
+
},
|
|
102
|
+
];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -23,6 +23,7 @@ import DashboardKubernetesNodeListComponentUtil from "./DashboardKubernetesNodeL
|
|
|
23
23
|
import DashboardKubernetesPodListComponentUtil from "./DashboardKubernetesPodListComponent";
|
|
24
24
|
import DashboardKubernetesStatefulSetListComponentUtil from "./DashboardKubernetesStatefulSetListComponent";
|
|
25
25
|
import DashboardLogStreamComponentUtil from "./DashboardLogStreamComponent";
|
|
26
|
+
import DashboardLogChartComponentUtil from "./DashboardLogChartComponent";
|
|
26
27
|
import DashboardMonitorListComponentUtil from "./DashboardMonitorListComponent";
|
|
27
28
|
import DashboardPodmanContainerListComponentUtil from "./DashboardPodmanContainerListComponent";
|
|
28
29
|
import DashboardPodmanHostListComponentUtil from "./DashboardPodmanHostListComponent";
|
|
@@ -80,6 +81,12 @@ export default class DashboardComponentsUtil {
|
|
|
80
81
|
>;
|
|
81
82
|
}
|
|
82
83
|
|
|
84
|
+
if (dashboardComponentType === DashboardComponentType.LogChart) {
|
|
85
|
+
return DashboardLogChartComponentUtil.getComponentConfigArguments() as Array<
|
|
86
|
+
ComponentArgument<DashboardBaseComponent>
|
|
87
|
+
>;
|
|
88
|
+
}
|
|
89
|
+
|
|
83
90
|
if (dashboardComponentType === DashboardComponentType.TraceList) {
|
|
84
91
|
return DashboardTraceListComponentUtil.getComponentConfigArguments() as Array<
|
|
85
92
|
ComponentArgument<DashboardBaseComponent>
|
|
@@ -33,6 +33,16 @@ class MonitorMetricTypeUtil {
|
|
|
33
33
|
return AggregationType.Avg;
|
|
34
34
|
case MonitorMetricType.ExecutionTime:
|
|
35
35
|
return AggregationType.Avg;
|
|
36
|
+
case MonitorMetricType.PacketLossPercent:
|
|
37
|
+
return AggregationType.Avg;
|
|
38
|
+
case MonitorMetricType.Jitter:
|
|
39
|
+
return AggregationType.Avg;
|
|
40
|
+
case MonitorMetricType.DnsLookupTime:
|
|
41
|
+
case MonitorMetricType.TcpConnectTime:
|
|
42
|
+
case MonitorMetricType.TlsHandshakeTime:
|
|
43
|
+
case MonitorMetricType.TimeToFirstByte:
|
|
44
|
+
case MonitorMetricType.DownloadTime:
|
|
45
|
+
return AggregationType.Avg;
|
|
36
46
|
|
|
37
47
|
/*
|
|
38
48
|
* Extended server/VM metrics. Cumulative counters (bytes/packets/ops since
|
|
@@ -79,6 +89,10 @@ class MonitorMetricTypeUtil {
|
|
|
79
89
|
switch (checkOn) {
|
|
80
90
|
case CheckOn.ResponseTime:
|
|
81
91
|
return MonitorMetricType.ResponseTime;
|
|
92
|
+
case CheckOn.PacketLossPercent:
|
|
93
|
+
return MonitorMetricType.PacketLossPercent;
|
|
94
|
+
case CheckOn.Jitter:
|
|
95
|
+
return MonitorMetricType.Jitter;
|
|
82
96
|
case CheckOn.ResponseStatusCode:
|
|
83
97
|
return MonitorMetricType.ResponseStatusCode;
|
|
84
98
|
case CheckOn.IsOnline:
|
|
@@ -117,6 +131,11 @@ class MonitorMetricTypeUtil {
|
|
|
117
131
|
MonitorMetricType.IsOnline,
|
|
118
132
|
MonitorMetricType.ResponseTime,
|
|
119
133
|
MonitorMetricType.ResponseStatusCode,
|
|
134
|
+
MonitorMetricType.DnsLookupTime,
|
|
135
|
+
MonitorMetricType.TcpConnectTime,
|
|
136
|
+
MonitorMetricType.TlsHandshakeTime,
|
|
137
|
+
MonitorMetricType.TimeToFirstByte,
|
|
138
|
+
MonitorMetricType.DownloadTime,
|
|
120
139
|
];
|
|
121
140
|
}
|
|
122
141
|
|
|
@@ -165,9 +184,20 @@ class MonitorMetricTypeUtil {
|
|
|
165
184
|
return [MonitorMetricType.ExecutionTime];
|
|
166
185
|
}
|
|
167
186
|
|
|
187
|
+
if (monitorType === MonitorType.Ping || monitorType === MonitorType.IP) {
|
|
188
|
+
/*
|
|
189
|
+
* Ping/IP checks send multiple echo requests, so they get packet-level
|
|
190
|
+
* network metrics on top of availability and response time.
|
|
191
|
+
*/
|
|
192
|
+
return [
|
|
193
|
+
MonitorMetricType.IsOnline,
|
|
194
|
+
MonitorMetricType.ResponseTime,
|
|
195
|
+
MonitorMetricType.PacketLossPercent,
|
|
196
|
+
MonitorMetricType.Jitter,
|
|
197
|
+
];
|
|
198
|
+
}
|
|
199
|
+
|
|
168
200
|
if (
|
|
169
|
-
monitorType === MonitorType.Ping ||
|
|
170
|
-
monitorType === MonitorType.IP ||
|
|
171
201
|
monitorType === MonitorType.Port ||
|
|
172
202
|
monitorType === MonitorType.SNMP ||
|
|
173
203
|
monitorType === MonitorType.DNS ||
|
|
@@ -288,6 +318,20 @@ class MonitorMetricTypeUtil {
|
|
|
288
318
|
return "Memory Usage Percent";
|
|
289
319
|
case MonitorMetricType.ExecutionTime:
|
|
290
320
|
return "Execution Time";
|
|
321
|
+
case MonitorMetricType.PacketLossPercent:
|
|
322
|
+
return "Packet Loss";
|
|
323
|
+
case MonitorMetricType.Jitter:
|
|
324
|
+
return "Jitter";
|
|
325
|
+
case MonitorMetricType.DnsLookupTime:
|
|
326
|
+
return "DNS Lookup Time";
|
|
327
|
+
case MonitorMetricType.TcpConnectTime:
|
|
328
|
+
return "TCP Connect Time";
|
|
329
|
+
case MonitorMetricType.TlsHandshakeTime:
|
|
330
|
+
return "TLS Handshake Time";
|
|
331
|
+
case MonitorMetricType.TimeToFirstByte:
|
|
332
|
+
return "Time to First Byte";
|
|
333
|
+
case MonitorMetricType.DownloadTime:
|
|
334
|
+
return "Download Time";
|
|
291
335
|
case MonitorMetricType.LoadAverage1Min:
|
|
292
336
|
return "Load Average (1 minute)";
|
|
293
337
|
case MonitorMetricType.LoadAverage5Min:
|
|
@@ -370,6 +414,16 @@ class MonitorMetricTypeUtil {
|
|
|
370
414
|
return "%";
|
|
371
415
|
case MonitorMetricType.ExecutionTime:
|
|
372
416
|
return "ms";
|
|
417
|
+
case MonitorMetricType.PacketLossPercent:
|
|
418
|
+
return "%";
|
|
419
|
+
case MonitorMetricType.Jitter:
|
|
420
|
+
return "ms";
|
|
421
|
+
case MonitorMetricType.DnsLookupTime:
|
|
422
|
+
case MonitorMetricType.TcpConnectTime:
|
|
423
|
+
case MonitorMetricType.TlsHandshakeTime:
|
|
424
|
+
case MonitorMetricType.TimeToFirstByte:
|
|
425
|
+
case MonitorMetricType.DownloadTime:
|
|
426
|
+
return "ms";
|
|
373
427
|
case MonitorMetricType.LoadAverage1Min:
|
|
374
428
|
case MonitorMetricType.LoadAverage5Min:
|
|
375
429
|
case MonitorMetricType.LoadAverage15Min:
|
|
@@ -426,6 +480,20 @@ class MonitorMetricTypeUtil {
|
|
|
426
480
|
return "Memory usage percent is the percentage of memory that is currently being used on a server. It is a measure of how much of the server's memory is being used.";
|
|
427
481
|
case MonitorMetricType.ExecutionTime:
|
|
428
482
|
return "Execution time is the time taken for a custom JavaScript code or a synthetic monitor to execute.";
|
|
483
|
+
case MonitorMetricType.PacketLossPercent:
|
|
484
|
+
return "Percentage of ICMP echo requests that received no reply during this check. Sustained loss above 1-2% typically indicates congestion, faulty hardware, or routing problems on the path.";
|
|
485
|
+
case MonitorMetricType.Jitter:
|
|
486
|
+
return "Variation in round-trip time across the packets sent in each check (standard deviation). High jitter degrades real-time traffic like VoIP and video even when average latency looks healthy.";
|
|
487
|
+
case MonitorMetricType.DnsLookupTime:
|
|
488
|
+
return "Time spent resolving the hostname to an IP address. Spikes here point at the DNS provider, not the monitored service.";
|
|
489
|
+
case MonitorMetricType.TcpConnectTime:
|
|
490
|
+
return "Time spent establishing the TCP connection after DNS resolution — a proxy for raw network latency to the target.";
|
|
491
|
+
case MonitorMetricType.TlsHandshakeTime:
|
|
492
|
+
return "Time spent negotiating TLS after the TCP connection was established. Regressions here often follow certificate or cipher configuration changes.";
|
|
493
|
+
case MonitorMetricType.TimeToFirstByte:
|
|
494
|
+
return "Time from the end of connection setup until the first byte of the response arrived — the server-side processing time.";
|
|
495
|
+
case MonitorMetricType.DownloadTime:
|
|
496
|
+
return "Time spent receiving the response body after the first byte arrived.";
|
|
429
497
|
case MonitorMetricType.LoadAverage1Min:
|
|
430
498
|
return "Average number of runnable or uninterruptible processes over the last 1 minute. Values persistently above the number of CPU cores indicate CPU saturation.";
|
|
431
499
|
case MonitorMetricType.LoadAverage5Min:
|
|
@@ -47,6 +47,8 @@ let AIRun = class AIRun extends BaseModel {
|
|
|
47
47
|
this.userId = undefined;
|
|
48
48
|
this.conversation = undefined;
|
|
49
49
|
this.conversationId = undefined;
|
|
50
|
+
this.triggeredByIncidentId = undefined;
|
|
51
|
+
this.triggeredByAlertId = undefined;
|
|
50
52
|
this.startedAt = undefined;
|
|
51
53
|
this.completedAt = undefined;
|
|
52
54
|
this.lastHeartbeatAt = undefined;
|
|
@@ -286,6 +288,56 @@ __decorate([
|
|
|
286
288
|
}),
|
|
287
289
|
__metadata("design:type", ObjectID)
|
|
288
290
|
], AIRun.prototype, "conversationId", void 0);
|
|
291
|
+
__decorate([
|
|
292
|
+
ColumnAccessControl({
|
|
293
|
+
create: [],
|
|
294
|
+
read: [
|
|
295
|
+
Permission.ProjectOwner,
|
|
296
|
+
Permission.ProjectAdmin,
|
|
297
|
+
Permission.ProjectMember,
|
|
298
|
+
],
|
|
299
|
+
update: [],
|
|
300
|
+
}),
|
|
301
|
+
Index(),
|
|
302
|
+
TableColumn({
|
|
303
|
+
type: TableColumnType.ObjectID,
|
|
304
|
+
required: false,
|
|
305
|
+
canReadOnRelationQuery: true,
|
|
306
|
+
title: "Triggered By Incident ID",
|
|
307
|
+
description: "The incident that triggered this run (for autonomous investigations).",
|
|
308
|
+
}),
|
|
309
|
+
Column({
|
|
310
|
+
type: ColumnType.ObjectID,
|
|
311
|
+
nullable: true,
|
|
312
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
313
|
+
}),
|
|
314
|
+
__metadata("design:type", ObjectID)
|
|
315
|
+
], AIRun.prototype, "triggeredByIncidentId", void 0);
|
|
316
|
+
__decorate([
|
|
317
|
+
ColumnAccessControl({
|
|
318
|
+
create: [],
|
|
319
|
+
read: [
|
|
320
|
+
Permission.ProjectOwner,
|
|
321
|
+
Permission.ProjectAdmin,
|
|
322
|
+
Permission.ProjectMember,
|
|
323
|
+
],
|
|
324
|
+
update: [],
|
|
325
|
+
}),
|
|
326
|
+
Index(),
|
|
327
|
+
TableColumn({
|
|
328
|
+
type: TableColumnType.ObjectID,
|
|
329
|
+
required: false,
|
|
330
|
+
canReadOnRelationQuery: true,
|
|
331
|
+
title: "Triggered By Alert ID",
|
|
332
|
+
description: "The alert that triggered this run (for autonomous investigations).",
|
|
333
|
+
}),
|
|
334
|
+
Column({
|
|
335
|
+
type: ColumnType.ObjectID,
|
|
336
|
+
nullable: true,
|
|
337
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
338
|
+
}),
|
|
339
|
+
__metadata("design:type", ObjectID)
|
|
340
|
+
], AIRun.prototype, "triggeredByAlertId", void 0);
|
|
289
341
|
__decorate([
|
|
290
342
|
ColumnAccessControl({
|
|
291
343
|
create: [],
|