@oneuptime/common 10.0.39 → 10.0.41
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/Index.ts +4 -0
- package/Models/AnalyticsModels/Profile.ts +687 -0
- package/Models/AnalyticsModels/ProfileSample.ts +547 -0
- package/Models/DatabaseModels/Dashboard.ts +357 -0
- package/Models/DatabaseModels/DashboardDomain.ts +658 -0
- package/Models/DatabaseModels/Index.ts +2 -0
- package/Models/DatabaseModels/StatusPage.ts +41 -0
- package/Server/API/DashboardAPI.ts +408 -0
- package/Server/API/DashboardDomainAPI.ts +235 -0
- package/Server/API/StatusPageAPI.ts +36 -2
- package/Server/API/TelemetryAPI.ts +393 -0
- package/Server/EnvironmentConfig.ts +12 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1774524742177-MigrationName.ts +97 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1774524742178-MigrationName.ts +17 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1774524742179-MigrationName.ts +50 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1774559064919-MigrationName.ts +59 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +8 -0
- package/Server/Middleware/UserAuthorization.ts +96 -1
- package/Server/Services/DashboardDomainService.ts +647 -0
- package/Server/Services/DashboardService.ts +174 -3
- package/Server/Services/IncidentService.ts +295 -50
- package/Server/Services/IncidentStateTimelineService.ts +1 -0
- package/Server/Services/Index.ts +6 -0
- package/Server/Services/MonitorService.ts +5 -0
- package/Server/Services/ProfileAggregationService.ts +559 -0
- package/Server/Services/ProfileSampleService.ts +11 -0
- package/Server/Services/ProfileService.ts +11 -0
- package/Server/Services/TelemetryUsageBillingService.ts +77 -3
- package/Server/Services/WorkspaceNotificationSummaryService.ts +15 -1
- package/Server/Types/Billing/MeteredPlan/AllMeteredPlans.ts +9 -0
- package/Server/Utils/Cookie.ts +48 -0
- package/Server/Utils/Monitor/Criteria/ProfileMonitorCriteria.ts +34 -0
- package/Server/Utils/Monitor/DataToProcess.ts +3 -1
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +299 -0
- package/Server/Utils/Profile/PprofEncoder.ts +225 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +53 -16
- package/Server/Utils/Workspace/Slack/Slack.ts +26 -6
- package/ServiceRoute.ts +2 -0
- package/Tests/UI/Components/ComponentsModal.test.tsx +19 -15
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +2 -0
- package/Types/CookieName.ts +1 -0
- package/Types/Dashboard/Chart/ChartType.ts +5 -0
- package/Types/Dashboard/DashboardComponentType.ts +4 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +10 -0
- package/Types/Dashboard/DashboardComponents/DashboardChartComponent.ts +1 -2
- package/Types/Dashboard/DashboardComponents/DashboardGaugeComponent.ts +17 -0
- package/Types/Dashboard/DashboardComponents/DashboardLogStreamComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardTableComponent.ts +14 -0
- package/Types/Dashboard/DashboardComponents/DashboardTextComponent.ts +1 -0
- package/Types/Dashboard/DashboardComponents/DashboardTraceListComponent.ts +13 -0
- package/Types/Dashboard/DashboardComponents/DashboardValueComponent.ts +2 -0
- package/Types/Dashboard/DashboardTemplates.ts +964 -0
- package/Types/Dashboard/DashboardVariable.ts +23 -0
- package/Types/Dashboard/DashboardViewConfig.ts +59 -0
- package/Types/Dashboard/MasterPassword.ts +10 -0
- package/Types/Icon/IconProp.ts +1 -0
- package/Types/Incident/IncidentMetricType.ts +3 -0
- package/Types/MeteredPlan/ProductType.ts +1 -0
- package/Types/Metrics/MetricQueryConfigData.ts +3 -0
- package/Types/Monitor/CriteriaFilter.ts +3 -0
- package/Types/Monitor/KubernetesAlertTemplates.ts +78 -7
- package/Types/Monitor/MetricMonitor/MetricMonitorResponse.ts +20 -0
- package/Types/Monitor/MonitorStep.ts +25 -0
- package/Types/Monitor/MonitorStepProfileMonitor.ts +96 -0
- package/Types/Monitor/MonitorType.ts +11 -0
- package/Types/Monitor/ProfileMonitor/ProfileMonitorResponse.ts +12 -0
- package/Types/Permission.ts +87 -0
- package/Types/Telemetry/TelemetryType.ts +1 -0
- package/Types/Workspace/NotificationSummary/WorkspaceNotificationSummaryItem.ts +1 -0
- package/UI/Components/Button/Button.tsx +1 -1
- package/UI/Components/Card/Card.tsx +8 -4
- package/UI/Components/Charts/Area/AreaChart.tsx +4 -0
- package/UI/Components/Charts/Bar/BarChart.tsx +4 -0
- package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +26 -0
- package/UI/Components/Charts/ChartLibrary/BarChart/BarChart.tsx +26 -0
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +26 -0
- package/UI/Components/Charts/Line/LineChart.tsx +4 -0
- package/UI/Components/Charts/Types/ReferenceLineProps.ts +6 -0
- package/UI/Components/Icon/Icon.tsx +33 -0
- package/UI/Components/ModelTable/BaseModelTable.tsx +13 -10
- package/UI/Components/MoreMenu/MoreMenu.tsx +15 -2
- package/UI/Components/MoreMenu/MoreMenuItem.tsx +4 -4
- package/UI/Components/Workflow/Component.tsx +450 -209
- package/UI/Components/Workflow/ComponentPortViewer.tsx +57 -20
- package/UI/Components/Workflow/ComponentReturnValueViewer.tsx +65 -25
- package/UI/Components/Workflow/ComponentSettingsModal.tsx +202 -37
- package/UI/Components/Workflow/ComponentsModal.tsx +180 -93
- package/UI/Components/Workflow/Workflow.tsx +105 -9
- package/UI/Config.ts +9 -0
- package/Utils/Dashboard/Components/DashboardChartComponent.ts +53 -22
- package/Utils/Dashboard/Components/DashboardGaugeComponent.ts +124 -0
- package/Utils/Dashboard/Components/DashboardLogStreamComponent.ts +110 -0
- package/Utils/Dashboard/Components/DashboardTableComponent.ts +86 -0
- package/Utils/Dashboard/Components/DashboardTextComponent.ts +32 -7
- package/Utils/Dashboard/Components/DashboardTraceListComponent.ts +86 -0
- package/Utils/Dashboard/Components/DashboardValueComponent.ts +39 -3
- package/Utils/Dashboard/Components/Index.ts +28 -0
- package/Utils/ValueFormatter.ts +170 -0
- package/build/dist/Models/AnalyticsModels/Index.js +4 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/Profile.js +621 -0
- package/build/dist/Models/AnalyticsModels/Profile.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/ProfileSample.js +497 -0
- package/build/dist/Models/AnalyticsModels/ProfileSample.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Dashboard.js +365 -0
- package/build/dist/Models/DatabaseModels/Dashboard.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DashboardDomain.js +691 -0
- package/build/dist/Models/DatabaseModels/DashboardDomain.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Index.js +2 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPage.js +42 -0
- package/build/dist/Models/DatabaseModels/StatusPage.js.map +1 -1
- package/build/dist/Server/API/DashboardAPI.js +293 -0
- package/build/dist/Server/API/DashboardAPI.js.map +1 -0
- package/build/dist/Server/API/DashboardDomainAPI.js +124 -0
- package/build/dist/Server/API/DashboardDomainAPI.js.map +1 -0
- package/build/dist/Server/API/StatusPageAPI.js +26 -2
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +222 -0
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +4 -0
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742177-MigrationName.js +40 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742177-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742178-MigrationName.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742178-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742179-MigrationName.js +23 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742179-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064919-MigrationName.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064919-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +8 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/UserAuthorization.js +41 -0
- package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
- package/build/dist/Server/Services/DashboardDomainService.js +595 -0
- package/build/dist/Server/Services/DashboardDomainService.js.map +1 -0
- package/build/dist/Server/Services/DashboardService.js +117 -3
- package/build/dist/Server/Services/DashboardService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +231 -55
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +6 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +5 -2
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/ProfileAggregationService.js +356 -0
- package/build/dist/Server/Services/ProfileAggregationService.js.map +1 -0
- package/build/dist/Server/Services/ProfileSampleService.js +9 -0
- package/build/dist/Server/Services/ProfileSampleService.js.map +1 -0
- package/build/dist/Server/Services/ProfileService.js +9 -0
- package/build/dist/Server/Services/ProfileService.js.map +1 -0
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +61 -4
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/WorkspaceNotificationSummaryService.js +13 -1
- package/build/dist/Server/Services/WorkspaceNotificationSummaryService.js.map +1 -1
- package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js +8 -0
- package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js.map +1 -1
- package/build/dist/Server/Utils/Cookie.js +36 -0
- package/build/dist/Server/Utils/Cookie.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/ProfileMonitorCriteria.js +34 -0
- package/build/dist/Server/Utils/Monitor/Criteria/ProfileMonitorCriteria.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +173 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Profile/PprofEncoder.js +129 -0
- package/build/dist/Server/Utils/Profile/PprofEncoder.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +36 -14
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js +23 -6
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
- package/build/dist/ServiceRoute.js +1 -0
- package/build/dist/ServiceRoute.js.map +1 -1
- package/build/dist/Tests/UI/Components/ComponentsModal.test.js +15 -15
- package/build/dist/Tests/UI/Components/ComponentsModal.test.js.map +1 -1
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +2 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/CookieName.js +1 -0
- package/build/dist/Types/CookieName.js.map +1 -1
- package/build/dist/Types/Dashboard/Chart/ChartType.js +5 -0
- package/build/dist/Types/Dashboard/Chart/ChartType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponentType.js +4 -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/DashboardGaugeComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardGaugeComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardLogStreamComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardLogStreamComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardTableComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardTableComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardTraceListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardTraceListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js +853 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardVariable.js +7 -0
- package/build/dist/Types/Dashboard/DashboardVariable.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardViewConfig.js +50 -1
- package/build/dist/Types/Dashboard/DashboardViewConfig.js.map +1 -1
- package/build/dist/Types/Dashboard/MasterPassword.js +5 -0
- package/build/dist/Types/Dashboard/MasterPassword.js.map +1 -0
- package/build/dist/Types/Icon/IconProp.js +1 -0
- package/build/dist/Types/Icon/IconProp.js.map +1 -1
- package/build/dist/Types/Incident/IncidentMetricType.js +3 -0
- package/build/dist/Types/Incident/IncidentMetricType.js.map +1 -1
- package/build/dist/Types/MeteredPlan/ProductType.js +1 -0
- package/build/dist/Types/MeteredPlan/ProductType.js.map +1 -1
- package/build/dist/Types/Metrics/MetricQueryConfigData.js +1 -0
- package/build/dist/Types/Metrics/MetricQueryConfigData.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +2 -0
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +58 -7
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +15 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepProfileMonitor.js +59 -0
- package/build/dist/Types/Monitor/MonitorStepProfileMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +10 -0
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/ProfileMonitor/ProfileMonitorResponse.js +2 -0
- package/build/dist/Types/Monitor/ProfileMonitor/ProfileMonitorResponse.js.map +1 -0
- package/build/dist/Types/Permission.js +75 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetryType.js +1 -0
- package/build/dist/Types/Telemetry/TelemetryType.js.map +1 -1
- package/build/dist/Types/Workspace/NotificationSummary/WorkspaceNotificationSummaryItem.js +1 -0
- package/build/dist/Types/Workspace/NotificationSummary/WorkspaceNotificationSummaryItem.js.map +1 -1
- package/build/dist/UI/Components/Button/Button.js +1 -1
- package/build/dist/UI/Components/Button/Button.js.map +1 -1
- package/build/dist/UI/Components/Card/Card.js +4 -4
- package/build/dist/UI/Components/Card/Card.js.map +1 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js +1 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +5 -2
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js +5 -2
- 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/Charts/Line/LineChart.js +1 -1
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Types/ReferenceLineProps.js +2 -0
- package/build/dist/UI/Components/Charts/Types/ReferenceLineProps.js.map +1 -0
- package/build/dist/UI/Components/Icon/Icon.js +11 -0
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +12 -9
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenu.js +8 -2
- package/build/dist/UI/Components/MoreMenu/MoreMenu.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js +4 -4
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js.map +1 -1
- package/build/dist/UI/Components/Workflow/Component.js +311 -143
- package/build/dist/UI/Components/Workflow/Component.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentPortViewer.js +44 -18
- package/build/dist/UI/Components/Workflow/ComponentPortViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js +48 -22
- package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentSettingsModal.js +127 -21
- package/build/dist/UI/Components/Workflow/ComponentSettingsModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentsModal.js +107 -52
- package/build/dist/UI/Components/Workflow/ComponentsModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/Workflow.js +87 -12
- package/build/dist/UI/Components/Workflow/Workflow.js.map +1 -1
- package/build/dist/UI/Config.js +3 -1
- package/build/dist/UI/Config.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardChartComponent.js +50 -21
- package/build/dist/Utils/Dashboard/Components/DashboardChartComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardGaugeComponent.js +104 -0
- package/build/dist/Utils/Dashboard/Components/DashboardGaugeComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardLogStreamComponent.js +91 -0
- package/build/dist/Utils/Dashboard/Components/DashboardLogStreamComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardTableComponent.js +70 -0
- package/build/dist/Utils/Dashboard/Components/DashboardTableComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardTextComponent.js +28 -7
- package/build/dist/Utils/Dashboard/Components/DashboardTextComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardTraceListComponent.js +70 -0
- package/build/dist/Utils/Dashboard/Components/DashboardTraceListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardValueComponent.js +34 -3
- package/build/dist/Utils/Dashboard/Components/DashboardValueComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/Index.js +16 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/ValueFormatter.js +132 -0
- package/build/dist/Utils/ValueFormatter.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { JSONObject } from "../../../Types/JSON";
|
|
2
|
+
import zlib from "zlib";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Encodes profile data into a simplified pprof-compatible JSON format.
|
|
6
|
+
* This produces a gzipped JSON representation that captures the essential
|
|
7
|
+
* profile information (stacktraces, values, metadata) in a format that
|
|
8
|
+
* can be consumed by tools that support pprof JSON.
|
|
9
|
+
*
|
|
10
|
+
* For full protobuf pprof support, a protobuf serializer (e.g., protobufjs
|
|
11
|
+
* with the pprof proto) would be needed. This implementation provides a
|
|
12
|
+
* practical export format.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export interface PprofSample {
|
|
16
|
+
stacktrace: Array<string>;
|
|
17
|
+
value: number;
|
|
18
|
+
labels: JSONObject | undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface PprofProfile {
|
|
22
|
+
profileId: string;
|
|
23
|
+
profileType: string;
|
|
24
|
+
unit: string;
|
|
25
|
+
periodType: string;
|
|
26
|
+
period: number;
|
|
27
|
+
startTimeNanos: number;
|
|
28
|
+
endTimeNanos: number;
|
|
29
|
+
durationNanos: number;
|
|
30
|
+
samples: Array<PprofSample>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface PprofFunction {
|
|
34
|
+
id: number;
|
|
35
|
+
name: number; // string table index
|
|
36
|
+
filename: number; // string table index
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface PprofLocation {
|
|
40
|
+
id: number;
|
|
41
|
+
line: Array<{
|
|
42
|
+
functionId: number;
|
|
43
|
+
line: number;
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface PprofProto {
|
|
48
|
+
stringTable: Array<string>;
|
|
49
|
+
functions: Array<PprofFunction>;
|
|
50
|
+
locations: Array<PprofLocation>;
|
|
51
|
+
samples: Array<{
|
|
52
|
+
locationId: Array<number>;
|
|
53
|
+
value: Array<number>;
|
|
54
|
+
label: Array<{ key: number; str: number }>;
|
|
55
|
+
}>;
|
|
56
|
+
sampleType: Array<{ type: number; unit: number }>;
|
|
57
|
+
periodType: { type: number; unit: number };
|
|
58
|
+
period: number;
|
|
59
|
+
timeNanos: number;
|
|
60
|
+
durationNanos: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export default class PprofEncoder {
|
|
64
|
+
/**
|
|
65
|
+
* Build a pprof-like JSON structure from denormalized profile data.
|
|
66
|
+
* The output is a JSON object that mirrors the pprof proto structure,
|
|
67
|
+
* using string table indirection for compact representation.
|
|
68
|
+
*/
|
|
69
|
+
public static encode(profile: PprofProfile): PprofProto {
|
|
70
|
+
const stringTable: Array<string> = [""];
|
|
71
|
+
const stringIndex: Map<string, number> = new Map([["", 0]]);
|
|
72
|
+
|
|
73
|
+
const getStringIndex: (s: string) => number = (s: string): number => {
|
|
74
|
+
const existing: number | undefined = stringIndex.get(s);
|
|
75
|
+
if (existing !== undefined) {
|
|
76
|
+
return existing;
|
|
77
|
+
}
|
|
78
|
+
const idx: number = stringTable.length;
|
|
79
|
+
stringTable.push(s);
|
|
80
|
+
stringIndex.set(s, idx);
|
|
81
|
+
return idx;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const functions: Array<PprofFunction> = [];
|
|
85
|
+
const functionIndex: Map<string, number> = new Map();
|
|
86
|
+
const locations: Array<PprofLocation> = [];
|
|
87
|
+
const locationIndex: Map<string, number> = new Map();
|
|
88
|
+
|
|
89
|
+
const getOrCreateFunction: (name: string, fileName: string) => number = (
|
|
90
|
+
name: string,
|
|
91
|
+
fileName: string,
|
|
92
|
+
): number => {
|
|
93
|
+
const key: string = `${name}@${fileName}`;
|
|
94
|
+
const existing: number | undefined = functionIndex.get(key);
|
|
95
|
+
if (existing !== undefined) {
|
|
96
|
+
return existing;
|
|
97
|
+
}
|
|
98
|
+
const id: number = functions.length + 1;
|
|
99
|
+
functions.push({
|
|
100
|
+
id,
|
|
101
|
+
name: getStringIndex(name),
|
|
102
|
+
filename: getStringIndex(fileName),
|
|
103
|
+
});
|
|
104
|
+
functionIndex.set(key, id);
|
|
105
|
+
return id;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const getOrCreateLocation: (
|
|
109
|
+
functionName: string,
|
|
110
|
+
fileName: string,
|
|
111
|
+
lineNumber: number,
|
|
112
|
+
) => number = (
|
|
113
|
+
functionName: string,
|
|
114
|
+
fileName: string,
|
|
115
|
+
lineNumber: number,
|
|
116
|
+
): number => {
|
|
117
|
+
const key: string = `${functionName}@${fileName}:${lineNumber}`;
|
|
118
|
+
const existing: number | undefined = locationIndex.get(key);
|
|
119
|
+
if (existing !== undefined) {
|
|
120
|
+
return existing;
|
|
121
|
+
}
|
|
122
|
+
const funcId: number = getOrCreateFunction(functionName, fileName);
|
|
123
|
+
const id: number = locations.length + 1;
|
|
124
|
+
locations.push({
|
|
125
|
+
id,
|
|
126
|
+
line: [{ functionId: funcId, line: lineNumber }],
|
|
127
|
+
});
|
|
128
|
+
locationIndex.set(key, id);
|
|
129
|
+
return id;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// Build samples
|
|
133
|
+
const pprofSamples: Array<{
|
|
134
|
+
locationId: Array<number>;
|
|
135
|
+
value: Array<number>;
|
|
136
|
+
label: Array<{ key: number; str: number }>;
|
|
137
|
+
}> = [];
|
|
138
|
+
|
|
139
|
+
for (const sample of profile.samples) {
|
|
140
|
+
const locationIds: Array<number> = [];
|
|
141
|
+
|
|
142
|
+
// Parse each frame in the stacktrace
|
|
143
|
+
for (const frame of sample.stacktrace) {
|
|
144
|
+
const atIndex: number = frame.indexOf("@");
|
|
145
|
+
let functionName: string = frame;
|
|
146
|
+
let fileName: string = "";
|
|
147
|
+
let lineNumber: number = 0;
|
|
148
|
+
|
|
149
|
+
if (atIndex !== -1) {
|
|
150
|
+
functionName = frame.substring(0, atIndex);
|
|
151
|
+
const rest: string = frame.substring(atIndex + 1);
|
|
152
|
+
const lastColon: number = rest.lastIndexOf(":");
|
|
153
|
+
if (lastColon !== -1) {
|
|
154
|
+
fileName = rest.substring(0, lastColon);
|
|
155
|
+
lineNumber = parseInt(rest.substring(lastColon + 1), 10) || 0;
|
|
156
|
+
} else {
|
|
157
|
+
fileName = rest;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
locationIds.push(
|
|
162
|
+
getOrCreateLocation(functionName, fileName, lineNumber),
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Build labels
|
|
167
|
+
const labels: Array<{ key: number; str: number }> = [];
|
|
168
|
+
if (sample.labels) {
|
|
169
|
+
for (const [key, value] of Object.entries(sample.labels)) {
|
|
170
|
+
labels.push({
|
|
171
|
+
key: getStringIndex(key),
|
|
172
|
+
str: getStringIndex(String(value)),
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
pprofSamples.push({
|
|
178
|
+
locationId: locationIds,
|
|
179
|
+
value: [sample.value],
|
|
180
|
+
label: labels,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Build sample type
|
|
185
|
+
const typeIdx: number = getStringIndex(profile.profileType);
|
|
186
|
+
const unitIdx: number = getStringIndex(profile.unit || "count");
|
|
187
|
+
const periodTypeIdx: number = getStringIndex(
|
|
188
|
+
profile.periodType || profile.profileType,
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
return {
|
|
192
|
+
stringTable,
|
|
193
|
+
functions,
|
|
194
|
+
locations,
|
|
195
|
+
samples: pprofSamples,
|
|
196
|
+
sampleType: [{ type: typeIdx, unit: unitIdx }],
|
|
197
|
+
periodType: { type: periodTypeIdx, unit: unitIdx },
|
|
198
|
+
period: profile.period,
|
|
199
|
+
timeNanos: profile.startTimeNanos,
|
|
200
|
+
durationNanos: profile.durationNanos,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Encode and gzip the pprof JSON for download.
|
|
206
|
+
*/
|
|
207
|
+
public static async encodeAndCompress(
|
|
208
|
+
profile: PprofProfile,
|
|
209
|
+
): Promise<Buffer> {
|
|
210
|
+
const pprofData: PprofProto = PprofEncoder.encode(profile);
|
|
211
|
+
const jsonString: string = JSON.stringify(pprofData);
|
|
212
|
+
|
|
213
|
+
return new Promise<Buffer>(
|
|
214
|
+
(resolve: (value: Buffer) => void, reject: (reason: Error) => void) => {
|
|
215
|
+
zlib.gzip(jsonString, (err: Error | null, result: Buffer) => {
|
|
216
|
+
if (err) {
|
|
217
|
+
reject(err);
|
|
218
|
+
} else {
|
|
219
|
+
resolve(result);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
},
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
@@ -1023,12 +1023,43 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
|
|
|
1023
1023
|
logger.debug("Sending message to Microsoft Teams with data:");
|
|
1024
1024
|
logger.debug(data);
|
|
1025
1025
|
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1026
|
+
/*
|
|
1027
|
+
* Teams adaptive cards have a ~28KB payload limit.
|
|
1028
|
+
* Split message blocks into chunks of 40 to avoid hitting the limit.
|
|
1029
|
+
*/
|
|
1030
|
+
const maxBlocksPerCard: number = 40;
|
|
1031
|
+
const allMessageBlocks: Array<WorkspaceMessageBlock> =
|
|
1032
|
+
data.workspaceMessagePayload.messageBlocks;
|
|
1029
1033
|
|
|
1030
|
-
|
|
1031
|
-
|
|
1034
|
+
const adaptiveCards: Array<JSONObject> = [];
|
|
1035
|
+
|
|
1036
|
+
if (allMessageBlocks.length <= maxBlocksPerCard) {
|
|
1037
|
+
adaptiveCards.push(
|
|
1038
|
+
this.buildAdaptiveCardFromMessageBlocks({
|
|
1039
|
+
messageBlocks: allMessageBlocks,
|
|
1040
|
+
}),
|
|
1041
|
+
);
|
|
1042
|
+
} else {
|
|
1043
|
+
for (
|
|
1044
|
+
let i: number = 0;
|
|
1045
|
+
i < allMessageBlocks.length;
|
|
1046
|
+
i += maxBlocksPerCard
|
|
1047
|
+
) {
|
|
1048
|
+
const chunk: Array<WorkspaceMessageBlock> = allMessageBlocks.slice(
|
|
1049
|
+
i,
|
|
1050
|
+
i + maxBlocksPerCard,
|
|
1051
|
+
);
|
|
1052
|
+
adaptiveCards.push(
|
|
1053
|
+
this.buildAdaptiveCardFromMessageBlocks({
|
|
1054
|
+
messageBlocks: chunk,
|
|
1055
|
+
}),
|
|
1056
|
+
);
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
logger.debug(
|
|
1061
|
+
`Built ${adaptiveCards.length} adaptive card(s) from ${allMessageBlocks.length} message blocks`,
|
|
1062
|
+
);
|
|
1032
1063
|
|
|
1033
1064
|
const workspaceChannelsToPostTo: Array<WorkspaceChannel> = [];
|
|
1034
1065
|
|
|
@@ -1122,18 +1153,24 @@ export default class MicrosoftTeamsUtil extends WorkspaceBase {
|
|
|
1122
1153
|
);
|
|
1123
1154
|
}
|
|
1124
1155
|
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1156
|
+
// Send each adaptive card chunk to the channel
|
|
1157
|
+
let lastThread: WorkspaceThread | undefined;
|
|
1158
|
+
for (const adaptiveCard of adaptiveCards) {
|
|
1159
|
+
lastThread = await this.sendAdaptiveCardToChannel({
|
|
1160
|
+
authToken: data.authToken,
|
|
1161
|
+
teamId: data.workspaceMessagePayload.teamId!,
|
|
1162
|
+
workspaceChannel: channel,
|
|
1163
|
+
adaptiveCard: adaptiveCard,
|
|
1164
|
+
projectId: data.projectId,
|
|
1165
|
+
});
|
|
1166
|
+
}
|
|
1132
1167
|
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1168
|
+
if (lastThread) {
|
|
1169
|
+
logger.debug(
|
|
1170
|
+
`Message sent successfully to channel ${channel.name}, thread: ${JSON.stringify(lastThread)}`,
|
|
1171
|
+
);
|
|
1172
|
+
workspaceMessageResponse.threads.push(lastThread);
|
|
1173
|
+
}
|
|
1137
1174
|
} catch (e) {
|
|
1138
1175
|
logger.error(`Error sending message to channel ID ${channel.id}:`);
|
|
1139
1176
|
logger.error(e);
|
|
@@ -1129,13 +1129,33 @@ export default class SlackUtil extends WorkspaceBase {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
}
|
|
1131
1131
|
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
blocks: blocks,
|
|
1136
|
-
});
|
|
1132
|
+
// Slack has a limit of 50 blocks per message. Split into batches if needed.
|
|
1133
|
+
const maxBlocksPerMessage: number = 50;
|
|
1134
|
+
let lastThread: WorkspaceThread | undefined;
|
|
1137
1135
|
|
|
1138
|
-
|
|
1136
|
+
if (blocks.length <= maxBlocksPerMessage) {
|
|
1137
|
+
lastThread = await this.sendPayloadBlocksToChannel({
|
|
1138
|
+
authToken: data.authToken,
|
|
1139
|
+
workspaceChannel: channel,
|
|
1140
|
+
blocks: blocks,
|
|
1141
|
+
});
|
|
1142
|
+
} else {
|
|
1143
|
+
for (let i: number = 0; i < blocks.length; i += maxBlocksPerMessage) {
|
|
1144
|
+
const chunk: Array<JSONObject> = blocks.slice(
|
|
1145
|
+
i,
|
|
1146
|
+
i + maxBlocksPerMessage,
|
|
1147
|
+
);
|
|
1148
|
+
lastThread = await this.sendPayloadBlocksToChannel({
|
|
1149
|
+
authToken: data.authToken,
|
|
1150
|
+
workspaceChannel: channel,
|
|
1151
|
+
blocks: chunk,
|
|
1152
|
+
});
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
if (lastThread) {
|
|
1157
|
+
workspaspaceMessageResponse.threads.push(lastThread);
|
|
1158
|
+
}
|
|
1139
1159
|
|
|
1140
1160
|
logger.debug(`Message sent to channel ID ${channel.id} successfully.`);
|
|
1141
1161
|
} catch (e) {
|
package/ServiceRoute.ts
CHANGED
|
@@ -35,3 +35,5 @@ export const RealtimeRoute: Route = new Route("/realtime/socket");
|
|
|
35
35
|
export const DocsRoute: Route = new Route("/docs");
|
|
36
36
|
|
|
37
37
|
export const StatusPageApiRoute: Route = new Route("/status-page-api");
|
|
38
|
+
|
|
39
|
+
export const PublicDashboardRoute: Route = new Route("/public-dashboard");
|
|
@@ -85,7 +85,9 @@ describe("ComponentsModal", () => {
|
|
|
85
85
|
categories={mockedCategories}
|
|
86
86
|
/>,
|
|
87
87
|
);
|
|
88
|
-
expect(
|
|
88
|
+
expect(
|
|
89
|
+
screen.getByPlaceholderText("Search components..."),
|
|
90
|
+
).toBeInTheDocument();
|
|
89
91
|
});
|
|
90
92
|
|
|
91
93
|
it("should display categories and components", () => {
|
|
@@ -133,10 +135,10 @@ describe("ComponentsModal", () => {
|
|
|
133
135
|
for (const [idx, comp] of mockedComponents.entries()) {
|
|
134
136
|
// simulate selecting a component
|
|
135
137
|
fireEvent.click(screen.getByText(comp.title));
|
|
136
|
-
expect(screen.getByText("
|
|
138
|
+
expect(screen.getByText("Add to Workflow")).not.toBeDisabled();
|
|
137
139
|
|
|
138
140
|
// simulate submitting
|
|
139
|
-
fireEvent.click(screen.getByText("
|
|
141
|
+
fireEvent.click(screen.getByText("Add to Workflow"));
|
|
140
142
|
|
|
141
143
|
// check if onComponentClick was called with the selected component's metadata
|
|
142
144
|
expect(mockOnComponentClick).toHaveBeenNthCalledWith(idx + 1, comp);
|
|
@@ -155,7 +157,7 @@ describe("ComponentsModal", () => {
|
|
|
155
157
|
);
|
|
156
158
|
expect(
|
|
157
159
|
screen.getByText(
|
|
158
|
-
"No components that match your search. If you are looking for an integration that does not exist currently - you can use Custom Code or API component to build anything you like.
|
|
160
|
+
"No components that match your search. If you are looking for an integration that does not exist currently - you can use Custom Code or API component to build anything you like.",
|
|
159
161
|
),
|
|
160
162
|
).toBeInTheDocument();
|
|
161
163
|
});
|
|
@@ -185,12 +187,12 @@ describe("ComponentsModal", () => {
|
|
|
185
187
|
categories={mockedCategories}
|
|
186
188
|
/>,
|
|
187
189
|
);
|
|
188
|
-
fireEvent.change(screen.getByPlaceholderText("Search..."), {
|
|
190
|
+
fireEvent.change(screen.getByPlaceholderText("Search components..."), {
|
|
189
191
|
target: { value: "Non-existent Ccmponent" },
|
|
190
192
|
});
|
|
191
193
|
expect(
|
|
192
194
|
screen.getByText(
|
|
193
|
-
"No components that match your search. If you are looking for an integration that does not exist currently - you can use Custom Code or API component to build anything you like.
|
|
195
|
+
"No components that match your search. If you are looking for an integration that does not exist currently - you can use Custom Code or API component to build anything you like.",
|
|
194
196
|
),
|
|
195
197
|
).toBeInTheDocument();
|
|
196
198
|
});
|
|
@@ -205,7 +207,7 @@ describe("ComponentsModal", () => {
|
|
|
205
207
|
categories={mockedCategories}
|
|
206
208
|
/>,
|
|
207
209
|
);
|
|
208
|
-
const submitButton: HTMLElement = screen.getByText("
|
|
210
|
+
const submitButton: HTMLElement = screen.getByText("Add to Workflow");
|
|
209
211
|
expect(submitButton).toBeDisabled();
|
|
210
212
|
});
|
|
211
213
|
|
|
@@ -221,7 +223,7 @@ describe("ComponentsModal", () => {
|
|
|
221
223
|
);
|
|
222
224
|
for (const comp of mockedComponents) {
|
|
223
225
|
fireEvent.click(screen.getByText(comp.title));
|
|
224
|
-
const submitButton: HTMLElement = screen.getByText("
|
|
226
|
+
const submitButton: HTMLElement = screen.getByText("Add to Workflow");
|
|
225
227
|
expect(submitButton).not.toBeDisabled();
|
|
226
228
|
}
|
|
227
229
|
});
|
|
@@ -244,7 +246,7 @@ describe("ComponentsModal", () => {
|
|
|
244
246
|
0,
|
|
245
247
|
comp.title.length - comp.title.length / 2,
|
|
246
248
|
);
|
|
247
|
-
fireEvent.change(screen.getByPlaceholderText("Search..."), {
|
|
249
|
+
fireEvent.change(screen.getByPlaceholderText("Search components..."), {
|
|
248
250
|
target: { value: partialTitle },
|
|
249
251
|
});
|
|
250
252
|
expect(screen.getByText(comp.title)).toBeInTheDocument();
|
|
@@ -271,7 +273,7 @@ describe("ComponentsModal", () => {
|
|
|
271
273
|
/>,
|
|
272
274
|
);
|
|
273
275
|
mockedComponents.forEach((comp: ComponentMetadata) => {
|
|
274
|
-
fireEvent.change(screen.getByPlaceholderText("Search..."), {
|
|
276
|
+
fireEvent.change(screen.getByPlaceholderText("Search components..."), {
|
|
275
277
|
target: { value: comp.description },
|
|
276
278
|
});
|
|
277
279
|
expect(screen.getByText(comp.title)).toBeInTheDocument();
|
|
@@ -298,7 +300,7 @@ describe("ComponentsModal", () => {
|
|
|
298
300
|
/>,
|
|
299
301
|
);
|
|
300
302
|
mockedComponents.forEach((comp: ComponentMetadata) => {
|
|
301
|
-
fireEvent.change(screen.getByPlaceholderText("Search..."), {
|
|
303
|
+
fireEvent.change(screen.getByPlaceholderText("Search components..."), {
|
|
302
304
|
target: { value: comp.category },
|
|
303
305
|
});
|
|
304
306
|
expect(screen.getByText(comp.title)).toBeInTheDocument();
|
|
@@ -325,7 +327,9 @@ describe("ComponentsModal", () => {
|
|
|
325
327
|
/>,
|
|
326
328
|
);
|
|
327
329
|
mockedComponents.forEach((comp: ComponentMetadata) => {
|
|
328
|
-
const searchInput: HTMLElement = screen.getByPlaceholderText(
|
|
330
|
+
const searchInput: HTMLElement = screen.getByPlaceholderText(
|
|
331
|
+
"Search components...",
|
|
332
|
+
);
|
|
329
333
|
fireEvent.change(searchInput, { target: { value: comp.title } });
|
|
330
334
|
fireEvent.change(searchInput, { target: { value: "" } }); // clear search
|
|
331
335
|
|
|
@@ -358,7 +362,7 @@ describe("ComponentsModal", () => {
|
|
|
358
362
|
/>,
|
|
359
363
|
);
|
|
360
364
|
|
|
361
|
-
fireEvent.change(screen.getByPlaceholderText("Search..."), {
|
|
365
|
+
fireEvent.change(screen.getByPlaceholderText("Search components..."), {
|
|
362
366
|
target: { value: commonWord },
|
|
363
367
|
});
|
|
364
368
|
componentsWithCommonWord.forEach((comp: ComponentMetadata) => {
|
|
@@ -385,7 +389,7 @@ describe("ComponentsModal", () => {
|
|
|
385
389
|
/>,
|
|
386
390
|
);
|
|
387
391
|
|
|
388
|
-
fireEvent.change(screen.getByPlaceholderText("Search..."), {
|
|
392
|
+
fireEvent.change(screen.getByPlaceholderText("Search components..."), {
|
|
389
393
|
target: { value: partialDescription },
|
|
390
394
|
});
|
|
391
395
|
expect(
|
|
@@ -413,7 +417,7 @@ describe("ComponentsModal", () => {
|
|
|
413
417
|
/>,
|
|
414
418
|
);
|
|
415
419
|
|
|
416
|
-
fireEvent.change(screen.getByPlaceholderText("Search..."), {
|
|
420
|
+
fireEvent.change(screen.getByPlaceholderText("Search components..."), {
|
|
417
421
|
target: { value: commonCategory },
|
|
418
422
|
});
|
|
419
423
|
componentsInCommonCategory.forEach((comp: ComponentMetadata) => {
|
package/Types/CookieName.ts
CHANGED
|
@@ -9,10 +9,19 @@ export enum ComponentInputType {
|
|
|
9
9
|
Number = "Number",
|
|
10
10
|
Decimal = "Decimal",
|
|
11
11
|
MetricsQueryConfig = "MetricsQueryConfig",
|
|
12
|
+
MetricsQueryConfigs = "MetricsQueryConfigs",
|
|
12
13
|
LongText = "Long Text",
|
|
13
14
|
Dropdown = "Dropdown",
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
export interface ComponentArgumentSection {
|
|
18
|
+
name: string;
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
icon?: string | undefined;
|
|
21
|
+
defaultCollapsed?: boolean | undefined;
|
|
22
|
+
order: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
16
25
|
export interface ComponentArgument<T extends DashboardBaseComponent> {
|
|
17
26
|
name: string;
|
|
18
27
|
description: string;
|
|
@@ -22,4 +31,5 @@ export interface ComponentArgument<T extends DashboardBaseComponent> {
|
|
|
22
31
|
isAdvanced?: boolean | undefined;
|
|
23
32
|
placeholder?: string | undefined;
|
|
24
33
|
dropdownOptions?: Array<DropdownOption> | undefined;
|
|
34
|
+
section?: ComponentArgumentSection | undefined;
|
|
25
35
|
}
|
|
@@ -9,10 +9,9 @@ export default interface DashboardChartComponent extends BaseComponent {
|
|
|
9
9
|
componentId: ObjectID;
|
|
10
10
|
arguments: {
|
|
11
11
|
metricQueryConfig?: MetricQueryConfigData | undefined;
|
|
12
|
+
metricQueryConfigs?: Array<MetricQueryConfigData> | undefined;
|
|
12
13
|
chartTitle?: string | undefined;
|
|
13
14
|
chartDescription?: string | undefined;
|
|
14
|
-
legendText?: string | undefined;
|
|
15
|
-
legendUnit?: string | undefined;
|
|
16
15
|
chartType?: DashboardChartType | undefined;
|
|
17
16
|
};
|
|
18
17
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import MetricQueryConfigData from "../../Metrics/MetricQueryConfigData";
|
|
2
|
+
import ObjectID from "../../ObjectID";
|
|
3
|
+
import DashboardComponentType from "../DashboardComponentType";
|
|
4
|
+
import BaseComponent from "./DashboardBaseComponent";
|
|
5
|
+
|
|
6
|
+
export default interface DashboardGaugeComponent extends BaseComponent {
|
|
7
|
+
componentType: DashboardComponentType.Gauge;
|
|
8
|
+
componentId: ObjectID;
|
|
9
|
+
arguments: {
|
|
10
|
+
metricQueryConfig?: MetricQueryConfigData | undefined;
|
|
11
|
+
gaugeTitle?: string | undefined;
|
|
12
|
+
minValue?: number | undefined;
|
|
13
|
+
maxValue?: number | undefined;
|
|
14
|
+
warningThreshold?: number | undefined;
|
|
15
|
+
criticalThreshold?: number | undefined;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import ObjectID from "../../ObjectID";
|
|
2
|
+
import DashboardComponentType from "../DashboardComponentType";
|
|
3
|
+
import BaseComponent from "./DashboardBaseComponent";
|
|
4
|
+
|
|
5
|
+
export default interface DashboardLogStreamComponent extends BaseComponent {
|
|
6
|
+
componentType: DashboardComponentType.LogStream;
|
|
7
|
+
componentId: ObjectID;
|
|
8
|
+
arguments: {
|
|
9
|
+
title?: string | undefined;
|
|
10
|
+
severityFilter?: string | undefined;
|
|
11
|
+
bodyContains?: string | undefined;
|
|
12
|
+
attributeFilterQuery?: string | undefined;
|
|
13
|
+
maxRows?: number | undefined;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import MetricQueryConfigData from "../../Metrics/MetricQueryConfigData";
|
|
2
|
+
import ObjectID from "../../ObjectID";
|
|
3
|
+
import DashboardComponentType from "../DashboardComponentType";
|
|
4
|
+
import BaseComponent from "./DashboardBaseComponent";
|
|
5
|
+
|
|
6
|
+
export default interface DashboardTableComponent extends BaseComponent {
|
|
7
|
+
componentType: DashboardComponentType.Table;
|
|
8
|
+
componentId: ObjectID;
|
|
9
|
+
arguments: {
|
|
10
|
+
metricQueryConfig?: MetricQueryConfigData | undefined;
|
|
11
|
+
tableTitle?: string | undefined;
|
|
12
|
+
maxRows?: number | undefined;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import ObjectID from "../../ObjectID";
|
|
2
|
+
import DashboardComponentType from "../DashboardComponentType";
|
|
3
|
+
import BaseComponent from "./DashboardBaseComponent";
|
|
4
|
+
|
|
5
|
+
export default interface DashboardTraceListComponent extends BaseComponent {
|
|
6
|
+
componentType: DashboardComponentType.TraceList;
|
|
7
|
+
componentId: ObjectID;
|
|
8
|
+
arguments: {
|
|
9
|
+
title?: string | undefined;
|
|
10
|
+
statusFilter?: string | undefined;
|
|
11
|
+
maxRows?: number | undefined;
|
|
12
|
+
};
|
|
13
|
+
}
|