@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
|
@@ -3,11 +3,10 @@ import ErrorMessage from "../ErrorMessage/ErrorMessage";
|
|
|
3
3
|
import Icon from "../Icon/Icon";
|
|
4
4
|
import Input from "../Input/Input";
|
|
5
5
|
import SideOver from "../SideOver/SideOver";
|
|
6
|
-
import
|
|
6
|
+
import IconProp from "../../../Types/Icon/IconProp";
|
|
7
7
|
import ComponentMetadata, {
|
|
8
8
|
ComponentCategory,
|
|
9
9
|
ComponentType,
|
|
10
|
-
NodeType,
|
|
11
10
|
} from "../../../Types/Workflow/Component";
|
|
12
11
|
import React, {
|
|
13
12
|
FunctionComponent,
|
|
@@ -38,11 +37,12 @@ const ComponentsModal: FunctionComponent<ComponentProps> = (
|
|
|
38
37
|
|
|
39
38
|
const [isSearching, setIsSearching] = useState<boolean>(false);
|
|
40
39
|
|
|
40
|
+
const [selectedComponentMetadata, setSelectedComponentMetadata] =
|
|
41
|
+
useState<ComponentMetadata | null>(null);
|
|
42
|
+
|
|
41
43
|
useEffect(() => {
|
|
42
44
|
setComponents(props.components);
|
|
43
|
-
|
|
44
45
|
setComponentsToShow([...props.components]);
|
|
45
|
-
|
|
46
46
|
setCategories(props.categories);
|
|
47
47
|
}, []);
|
|
48
48
|
|
|
@@ -76,14 +76,11 @@ const ComponentsModal: FunctionComponent<ComponentProps> = (
|
|
|
76
76
|
]);
|
|
77
77
|
}, [search]);
|
|
78
78
|
|
|
79
|
-
const [selectedComponentMetadata, setSelectedComponentMetadata] =
|
|
80
|
-
useState<ComponentMetadata | null>(null);
|
|
81
|
-
|
|
82
79
|
return (
|
|
83
80
|
<SideOver
|
|
84
|
-
submitButtonText="
|
|
85
|
-
title={`
|
|
86
|
-
description={`
|
|
81
|
+
submitButtonText="Add to Workflow"
|
|
82
|
+
title={`Add ${props.componentsType}`}
|
|
83
|
+
description={`Choose a ${props.componentsType.toLowerCase()} to add to your workflow.`}
|
|
87
84
|
onClose={props.onCloseModal}
|
|
88
85
|
submitButtonDisabled={!selectedComponentMetadata}
|
|
89
86
|
onSubmit={() => {
|
|
@@ -95,107 +92,197 @@ const ComponentsModal: FunctionComponent<ComponentProps> = (
|
|
|
95
92
|
>
|
|
96
93
|
<>
|
|
97
94
|
<div className="flex flex-col h-full">
|
|
98
|
-
{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
95
|
+
{/* Search box */}
|
|
96
|
+
<div className="mt-4 mb-4">
|
|
97
|
+
<div className="relative">
|
|
98
|
+
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
|
99
|
+
<Icon
|
|
100
|
+
icon={IconProp.Search}
|
|
101
|
+
className="h-4 w-4 text-gray-400"
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
<div className="pl-9">
|
|
105
|
+
<Input
|
|
106
|
+
placeholder={`Search ${props.componentsType.toLowerCase()}s...`}
|
|
107
|
+
onChange={(text: string) => {
|
|
108
|
+
setIsSearching(true);
|
|
109
|
+
setSearch(text);
|
|
110
|
+
}}
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
108
114
|
</div>
|
|
109
115
|
|
|
110
|
-
<div className="overflow-y-auto overflow-x-hidden
|
|
116
|
+
<div className="overflow-y-auto overflow-x-hidden flex-1">
|
|
111
117
|
{!componentsToShow ||
|
|
112
118
|
(componentsToShow.length === 0 && (
|
|
113
|
-
<div className="w-full flex justify-center mt-20">
|
|
114
|
-
<ErrorMessage message="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.
|
|
119
|
+
<div className="w-full flex justify-center mt-20 px-4">
|
|
120
|
+
<ErrorMessage message="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." />
|
|
115
121
|
</div>
|
|
116
122
|
))}
|
|
117
123
|
|
|
118
124
|
{categories &&
|
|
119
125
|
categories.length > 0 &&
|
|
120
126
|
categories.map((category: ComponentCategory, i: number) => {
|
|
121
|
-
|
|
122
|
-
componentsToShow &&
|
|
123
|
-
componentsToShow.length > 0 &&
|
|
127
|
+
const categoryComponents: Array<ComponentMetadata> =
|
|
124
128
|
componentsToShow.filter(
|
|
125
129
|
(componentMetadata: ComponentMetadata) => {
|
|
126
130
|
return componentMetadata.category === category.name;
|
|
127
131
|
},
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
if (categoryComponents.length === 0) {
|
|
135
|
+
return <div key={i}></div>;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return (
|
|
139
|
+
<div key={i} className="mb-6">
|
|
140
|
+
{/* Category header */}
|
|
141
|
+
<div className="flex items-center gap-2 mb-3 px-1">
|
|
142
|
+
<div
|
|
143
|
+
className="flex items-center justify-center rounded-md"
|
|
144
|
+
style={{
|
|
145
|
+
width: "28px",
|
|
146
|
+
height: "28px",
|
|
147
|
+
backgroundColor: "#f1f5f9",
|
|
148
|
+
}}
|
|
149
|
+
>
|
|
134
150
|
<Icon
|
|
135
151
|
icon={category.icon}
|
|
136
|
-
className="h-
|
|
137
|
-
/>
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
components
|
|
147
|
-
.filter((componentMetadata: ComponentMetadata) => {
|
|
148
|
-
return (
|
|
149
|
-
componentMetadata.category === category.name
|
|
150
|
-
);
|
|
151
|
-
})
|
|
152
|
-
.map(
|
|
153
|
-
(
|
|
154
|
-
componentMetadata: ComponentMetadata,
|
|
155
|
-
i: number,
|
|
156
|
-
) => {
|
|
157
|
-
return (
|
|
158
|
-
<div
|
|
159
|
-
key={i}
|
|
160
|
-
onClick={() => {
|
|
161
|
-
setSelectedComponentMetadata(
|
|
162
|
-
componentMetadata,
|
|
163
|
-
);
|
|
164
|
-
}}
|
|
165
|
-
className={`m-5 ml-0 mt-0 ${
|
|
166
|
-
selectedComponentMetadata &&
|
|
167
|
-
selectedComponentMetadata.id ===
|
|
168
|
-
componentMetadata.id
|
|
169
|
-
? "rounded ring-offset-2 ring ring-indigo-500"
|
|
170
|
-
: ""
|
|
171
|
-
}`}
|
|
172
|
-
>
|
|
173
|
-
<ComponentElement
|
|
174
|
-
key={i}
|
|
175
|
-
selected={false}
|
|
176
|
-
data={{
|
|
177
|
-
metadata: componentMetadata,
|
|
178
|
-
metadataId: componentMetadata.id,
|
|
179
|
-
internalId: "",
|
|
180
|
-
nodeType: NodeType.Node,
|
|
181
|
-
componentType:
|
|
182
|
-
componentMetadata.componentType,
|
|
183
|
-
returnValues: {},
|
|
184
|
-
isPreview: true,
|
|
185
|
-
id: "",
|
|
186
|
-
error: "",
|
|
187
|
-
arguments: {},
|
|
188
|
-
}}
|
|
189
|
-
/>
|
|
190
|
-
</div>
|
|
191
|
-
);
|
|
192
|
-
},
|
|
193
|
-
)}
|
|
152
|
+
className="h-4 w-4 text-gray-500"
|
|
153
|
+
/>
|
|
154
|
+
</div>
|
|
155
|
+
<div>
|
|
156
|
+
<h4 className="text-sm font-semibold text-gray-700 leading-tight">
|
|
157
|
+
{category.name}
|
|
158
|
+
</h4>
|
|
159
|
+
<p className="text-xs text-gray-400 leading-tight">
|
|
160
|
+
{category.description}
|
|
161
|
+
</p>
|
|
194
162
|
</div>
|
|
195
163
|
</div>
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
164
|
+
|
|
165
|
+
{/* Component cards grid */}
|
|
166
|
+
<div className="grid grid-cols-1 gap-2">
|
|
167
|
+
{categoryComponents.map(
|
|
168
|
+
(componentMetadata: ComponentMetadata, j: number) => {
|
|
169
|
+
const isSelected: boolean =
|
|
170
|
+
selectedComponentMetadata !== null &&
|
|
171
|
+
selectedComponentMetadata.id ===
|
|
172
|
+
componentMetadata.id;
|
|
173
|
+
|
|
174
|
+
return (
|
|
175
|
+
<div
|
|
176
|
+
key={j}
|
|
177
|
+
onClick={() => {
|
|
178
|
+
setSelectedComponentMetadata(componentMetadata);
|
|
179
|
+
}}
|
|
180
|
+
className="cursor-pointer transition-all duration-150"
|
|
181
|
+
style={{
|
|
182
|
+
padding: "0.75rem",
|
|
183
|
+
borderRadius: "10px",
|
|
184
|
+
border: isSelected
|
|
185
|
+
? "2px solid #6366f1"
|
|
186
|
+
: "1px solid #e2e8f0",
|
|
187
|
+
backgroundColor: isSelected
|
|
188
|
+
? "#eef2ff"
|
|
189
|
+
: "#ffffff",
|
|
190
|
+
display: "flex",
|
|
191
|
+
alignItems: "flex-start",
|
|
192
|
+
gap: "0.75rem",
|
|
193
|
+
boxShadow: isSelected
|
|
194
|
+
? "0 0 0 3px rgba(99, 102, 241, 0.1)"
|
|
195
|
+
: "0 1px 2px 0 rgba(0, 0, 0, 0.03)",
|
|
196
|
+
}}
|
|
197
|
+
>
|
|
198
|
+
{/* Icon */}
|
|
199
|
+
<div
|
|
200
|
+
style={{
|
|
201
|
+
width: "36px",
|
|
202
|
+
height: "36px",
|
|
203
|
+
borderRadius: "8px",
|
|
204
|
+
backgroundColor: isSelected
|
|
205
|
+
? "#6366f1"
|
|
206
|
+
: "#f1f5f9",
|
|
207
|
+
display: "flex",
|
|
208
|
+
alignItems: "center",
|
|
209
|
+
justifyContent: "center",
|
|
210
|
+
flexShrink: 0,
|
|
211
|
+
transition: "all 0.15s ease",
|
|
212
|
+
}}
|
|
213
|
+
>
|
|
214
|
+
<Icon
|
|
215
|
+
icon={componentMetadata.iconProp}
|
|
216
|
+
style={{
|
|
217
|
+
color: isSelected ? "#ffffff" : "#64748b",
|
|
218
|
+
width: "1rem",
|
|
219
|
+
height: "1rem",
|
|
220
|
+
}}
|
|
221
|
+
/>
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
{/* Text */}
|
|
225
|
+
<div style={{ minWidth: 0, flex: 1 }}>
|
|
226
|
+
<p
|
|
227
|
+
style={{
|
|
228
|
+
fontSize: "0.8125rem",
|
|
229
|
+
fontWeight: 600,
|
|
230
|
+
color: isSelected ? "#4338ca" : "#1e293b",
|
|
231
|
+
margin: 0,
|
|
232
|
+
lineHeight: "1.25rem",
|
|
233
|
+
}}
|
|
234
|
+
>
|
|
235
|
+
{componentMetadata.title}
|
|
236
|
+
</p>
|
|
237
|
+
<p
|
|
238
|
+
style={{
|
|
239
|
+
fontSize: "0.75rem",
|
|
240
|
+
color: isSelected ? "#6366f1" : "#94a3b8",
|
|
241
|
+
margin: 0,
|
|
242
|
+
marginTop: "2px",
|
|
243
|
+
lineHeight: "1rem",
|
|
244
|
+
display: "-webkit-box",
|
|
245
|
+
WebkitLineClamp: 2,
|
|
246
|
+
WebkitBoxOrient: "vertical",
|
|
247
|
+
overflow: "hidden",
|
|
248
|
+
}}
|
|
249
|
+
>
|
|
250
|
+
{componentMetadata.description}
|
|
251
|
+
</p>
|
|
252
|
+
</div>
|
|
253
|
+
|
|
254
|
+
{/* Selection indicator */}
|
|
255
|
+
{isSelected && (
|
|
256
|
+
<div
|
|
257
|
+
style={{
|
|
258
|
+
width: "20px",
|
|
259
|
+
height: "20px",
|
|
260
|
+
borderRadius: "50%",
|
|
261
|
+
backgroundColor: "#6366f1",
|
|
262
|
+
display: "flex",
|
|
263
|
+
alignItems: "center",
|
|
264
|
+
justifyContent: "center",
|
|
265
|
+
flexShrink: 0,
|
|
266
|
+
marginTop: "2px",
|
|
267
|
+
}}
|
|
268
|
+
>
|
|
269
|
+
<Icon
|
|
270
|
+
icon={IconProp.Check}
|
|
271
|
+
style={{
|
|
272
|
+
color: "#ffffff",
|
|
273
|
+
width: "0.625rem",
|
|
274
|
+
height: "0.625rem",
|
|
275
|
+
}}
|
|
276
|
+
/>
|
|
277
|
+
</div>
|
|
278
|
+
)}
|
|
279
|
+
</div>
|
|
280
|
+
);
|
|
281
|
+
},
|
|
282
|
+
)}
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
);
|
|
199
286
|
})}
|
|
200
287
|
</div>
|
|
201
288
|
</div>
|
|
@@ -22,6 +22,7 @@ import React, {
|
|
|
22
22
|
} from "react";
|
|
23
23
|
import ReactFlow, {
|
|
24
24
|
Background,
|
|
25
|
+
BackgroundVariant,
|
|
25
26
|
Connection,
|
|
26
27
|
Controls,
|
|
27
28
|
Edge,
|
|
@@ -75,9 +76,9 @@ const edgeStyle: React.CSSProperties = {
|
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
const selectedEdgeStyle: React.CSSProperties = {
|
|
78
|
-
strokeWidth: "
|
|
79
|
-
stroke: "#
|
|
80
|
-
color: "#
|
|
79
|
+
strokeWidth: "2.5px",
|
|
80
|
+
stroke: "#6366f1",
|
|
81
|
+
color: "#6366f1",
|
|
81
82
|
};
|
|
82
83
|
|
|
83
84
|
type GetEdgeDefaultPropsFunction = (selected: boolean) => JSONObject;
|
|
@@ -87,9 +88,14 @@ export const getEdgeDefaultProps: GetEdgeDefaultPropsFunction = (
|
|
|
87
88
|
): JSONObject => {
|
|
88
89
|
return {
|
|
89
90
|
type: "smoothstep",
|
|
91
|
+
animated: selected,
|
|
90
92
|
markerEnd: {
|
|
91
|
-
type: MarkerType.
|
|
92
|
-
color:
|
|
93
|
+
type: MarkerType.ArrowClosed,
|
|
94
|
+
color: selected
|
|
95
|
+
? selectedEdgeStyle.color?.toString() || ""
|
|
96
|
+
: edgeStyle.color?.toString() || "",
|
|
97
|
+
width: 20,
|
|
98
|
+
height: 20,
|
|
93
99
|
},
|
|
94
100
|
style: selected ? { ...selectedEdgeStyle } : { ...edgeStyle },
|
|
95
101
|
};
|
|
@@ -271,7 +277,7 @@ const Workflow: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
|
|
|
271
277
|
{
|
|
272
278
|
...oldEdge,
|
|
273
279
|
markerEnd: {
|
|
274
|
-
type: MarkerType.
|
|
280
|
+
type: MarkerType.ArrowClosed,
|
|
275
281
|
color: edgeStyle.color?.toString() || "",
|
|
276
282
|
},
|
|
277
283
|
style: edgeStyle,
|
|
@@ -398,7 +404,65 @@ const Workflow: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
|
|
|
398
404
|
};
|
|
399
405
|
|
|
400
406
|
return (
|
|
401
|
-
<div
|
|
407
|
+
<div
|
|
408
|
+
style={{
|
|
409
|
+
height: "calc(100vh - 220px)",
|
|
410
|
+
minHeight: "600px",
|
|
411
|
+
borderRadius: "8px",
|
|
412
|
+
overflow: "hidden",
|
|
413
|
+
border: "1px solid #e2e8f0",
|
|
414
|
+
}}
|
|
415
|
+
>
|
|
416
|
+
<style>
|
|
417
|
+
{`
|
|
418
|
+
.react-flow__minimap {
|
|
419
|
+
border-radius: 8px !important;
|
|
420
|
+
border: 1px solid #e2e8f0 !important;
|
|
421
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07) !important;
|
|
422
|
+
overflow: hidden !important;
|
|
423
|
+
background: #ffffff !important;
|
|
424
|
+
}
|
|
425
|
+
.react-flow__controls {
|
|
426
|
+
border-radius: 8px !important;
|
|
427
|
+
border: 1px solid #e2e8f0 !important;
|
|
428
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07) !important;
|
|
429
|
+
overflow: hidden !important;
|
|
430
|
+
}
|
|
431
|
+
.react-flow__controls-button {
|
|
432
|
+
border-bottom: 1px solid #f1f5f9 !important;
|
|
433
|
+
width: 32px !important;
|
|
434
|
+
height: 32px !important;
|
|
435
|
+
}
|
|
436
|
+
.react-flow__controls-button:hover {
|
|
437
|
+
background: #f8fafc !important;
|
|
438
|
+
}
|
|
439
|
+
.react-flow__controls-button svg {
|
|
440
|
+
max-width: 14px !important;
|
|
441
|
+
max-height: 14px !important;
|
|
442
|
+
}
|
|
443
|
+
.react-flow__edge:hover .react-flow__edge-path {
|
|
444
|
+
stroke: #6366f1 !important;
|
|
445
|
+
stroke-width: 2.5px !important;
|
|
446
|
+
}
|
|
447
|
+
.react-flow__handle:hover {
|
|
448
|
+
transform: scale(1.3) !important;
|
|
449
|
+
}
|
|
450
|
+
.react-flow__connection-line {
|
|
451
|
+
stroke: #6366f1 !important;
|
|
452
|
+
stroke-width: 2px !important;
|
|
453
|
+
stroke-dasharray: 5 5 !important;
|
|
454
|
+
}
|
|
455
|
+
@keyframes flow-dash {
|
|
456
|
+
to {
|
|
457
|
+
stroke-dashoffset: -10;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
.react-flow__edge.animated .react-flow__edge-path {
|
|
461
|
+
animation: flow-dash 0.5s linear infinite !important;
|
|
462
|
+
stroke-dasharray: 5 5 !important;
|
|
463
|
+
}
|
|
464
|
+
`}
|
|
465
|
+
</style>
|
|
402
466
|
<ReactFlow
|
|
403
467
|
nodes={nodes}
|
|
404
468
|
edges={edges}
|
|
@@ -418,10 +482,42 @@ const Workflow: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
|
|
|
418
482
|
nodeTypes={nodeTypes}
|
|
419
483
|
onEdgeUpdateStart={onEdgeUpdateStart}
|
|
420
484
|
onEdgeUpdateEnd={onEdgeUpdateEnd}
|
|
485
|
+
snapToGrid={true}
|
|
486
|
+
snapGrid={[16, 16]}
|
|
487
|
+
connectionLineStyle={{
|
|
488
|
+
stroke: "#6366f1",
|
|
489
|
+
strokeWidth: 2,
|
|
490
|
+
strokeDasharray: "5 5",
|
|
491
|
+
}}
|
|
492
|
+
defaultEdgeOptions={{
|
|
493
|
+
type: "smoothstep",
|
|
494
|
+
style: { ...edgeStyle },
|
|
495
|
+
}}
|
|
421
496
|
>
|
|
422
|
-
<MiniMap
|
|
497
|
+
<MiniMap
|
|
498
|
+
nodeStrokeWidth={3}
|
|
499
|
+
nodeColor={(node: Node) => {
|
|
500
|
+
if (
|
|
501
|
+
node.data &&
|
|
502
|
+
node.data.metadata &&
|
|
503
|
+
node.data.metadata.componentType === ComponentType.Trigger
|
|
504
|
+
) {
|
|
505
|
+
return "#f59e0b";
|
|
506
|
+
}
|
|
507
|
+
return "#6366f1";
|
|
508
|
+
}}
|
|
509
|
+
maskColor="rgba(241, 245, 249, 0.7)"
|
|
510
|
+
style={{
|
|
511
|
+
backgroundColor: "#ffffff",
|
|
512
|
+
}}
|
|
513
|
+
/>
|
|
423
514
|
<Controls />
|
|
424
|
-
<Background
|
|
515
|
+
<Background
|
|
516
|
+
variant={BackgroundVariant.Dots}
|
|
517
|
+
gap={20}
|
|
518
|
+
size={1}
|
|
519
|
+
color="#cbd5e1"
|
|
520
|
+
/>
|
|
425
521
|
</ReactFlow>
|
|
426
522
|
|
|
427
523
|
{showComponentsModal && (
|
package/UI/Config.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
ProbeIngestRoute,
|
|
12
12
|
IntegrationRoute,
|
|
13
13
|
NotificationRoute,
|
|
14
|
+
PublicDashboardRoute,
|
|
14
15
|
RealtimeRoute,
|
|
15
16
|
StatusPageApiRoute,
|
|
16
17
|
StatusPageRoute,
|
|
@@ -159,6 +160,12 @@ export const DASHBOARD_URL: URL = new URL(
|
|
|
159
160
|
new Route(DashboardRoute.toString()),
|
|
160
161
|
);
|
|
161
162
|
|
|
163
|
+
export const PUBLIC_DASHBOARD_URL: URL = new URL(
|
|
164
|
+
HTTP_PROTOCOL,
|
|
165
|
+
DASHBOARD_HOSTNAME,
|
|
166
|
+
new Route(PublicDashboardRoute.toString()),
|
|
167
|
+
);
|
|
168
|
+
|
|
162
169
|
export const INTEGRATION_URL: URL = new URL(
|
|
163
170
|
HTTP_PROTOCOL,
|
|
164
171
|
INTEGRATION_HOSTNAME,
|
|
@@ -193,6 +200,8 @@ export const SubscriptionPlans: Array<SubscriptionPlan> =
|
|
|
193
200
|
export const StatusPageCNameRecord: string =
|
|
194
201
|
env("STATUS_PAGE_CNAME_RECORD") || "";
|
|
195
202
|
|
|
203
|
+
export const DashboardCNameRecord: string = env("DASHBOARD_CNAME_RECORD") || "";
|
|
204
|
+
|
|
196
205
|
export const AnalyticsKey: string = env("ANALYTICS_KEY") || "";
|
|
197
206
|
export const AnalyticsHost: string = env("ANALYTICS_HOST");
|
|
198
207
|
|
|
@@ -4,11 +4,25 @@ import ObjectID from "../../../Types/ObjectID";
|
|
|
4
4
|
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
5
|
import {
|
|
6
6
|
ComponentArgument,
|
|
7
|
+
ComponentArgumentSection,
|
|
7
8
|
ComponentInputType,
|
|
8
9
|
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
9
10
|
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
10
11
|
import DashboardChartType from "../../../Types/Dashboard/Chart/ChartType";
|
|
11
12
|
|
|
13
|
+
const DataSourceSection: ComponentArgumentSection = {
|
|
14
|
+
name: "Data Source",
|
|
15
|
+
description: "Configure what data to display on the chart",
|
|
16
|
+
order: 1,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const DisplaySection: ComponentArgumentSection = {
|
|
20
|
+
name: "Display Options",
|
|
21
|
+
description: "Customize the chart appearance",
|
|
22
|
+
order: 2,
|
|
23
|
+
defaultCollapsed: true,
|
|
24
|
+
};
|
|
25
|
+
|
|
12
26
|
export default class DashboardChartComponentUtil extends DashboardBaseComponentUtil {
|
|
13
27
|
public static override getDefaultComponent(): DashboardChartComponent {
|
|
14
28
|
return {
|
|
@@ -23,6 +37,13 @@ export default class DashboardChartComponentUtil extends DashboardBaseComponentU
|
|
|
23
37
|
minWidthInDashboardUnits: 6,
|
|
24
38
|
arguments: {
|
|
25
39
|
metricQueryConfig: {
|
|
40
|
+
metricAliasData: {
|
|
41
|
+
metricVariable: "a",
|
|
42
|
+
title: undefined,
|
|
43
|
+
description: undefined,
|
|
44
|
+
legend: undefined,
|
|
45
|
+
legendUnit: undefined,
|
|
46
|
+
},
|
|
26
47
|
metricQueryData: {
|
|
27
48
|
filterData: {},
|
|
28
49
|
groupBy: undefined,
|
|
@@ -42,10 +63,11 @@ export default class DashboardChartComponentUtil extends DashboardBaseComponentU
|
|
|
42
63
|
|
|
43
64
|
componentArguments.push({
|
|
44
65
|
name: "Chart Type",
|
|
45
|
-
description: "
|
|
66
|
+
description: "How the data will be visualized",
|
|
46
67
|
required: true,
|
|
47
68
|
type: ComponentInputType.Dropdown,
|
|
48
69
|
id: "chartType",
|
|
70
|
+
section: DataSourceSection,
|
|
49
71
|
dropdownOptions: [
|
|
50
72
|
{
|
|
51
73
|
label: "Line Chart",
|
|
@@ -55,47 +77,56 @@ export default class DashboardChartComponentUtil extends DashboardBaseComponentU
|
|
|
55
77
|
label: "Bar Chart",
|
|
56
78
|
value: DashboardChartType.Bar,
|
|
57
79
|
},
|
|
80
|
+
{
|
|
81
|
+
label: "Area Chart",
|
|
82
|
+
value: DashboardChartType.Area,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: "Stacked Area Chart",
|
|
86
|
+
value: DashboardChartType.StackedArea,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: "Pie Chart",
|
|
90
|
+
value: DashboardChartType.Pie,
|
|
91
|
+
},
|
|
58
92
|
],
|
|
59
93
|
});
|
|
60
94
|
|
|
61
95
|
componentArguments.push({
|
|
62
|
-
name: "
|
|
63
|
-
description: "
|
|
96
|
+
name: "Metric Query",
|
|
97
|
+
description: "Select the metric and filters for this chart",
|
|
64
98
|
required: true,
|
|
65
99
|
type: ComponentInputType.MetricsQueryConfig,
|
|
66
100
|
id: "metricQueryConfig",
|
|
101
|
+
section: DataSourceSection,
|
|
67
102
|
});
|
|
68
103
|
|
|
69
104
|
componentArguments.push({
|
|
70
|
-
name: "
|
|
71
|
-
description: "
|
|
105
|
+
name: "Additional Queries",
|
|
106
|
+
description: "Overlay more metrics on the same chart",
|
|
72
107
|
required: false,
|
|
73
|
-
type: ComponentInputType.
|
|
74
|
-
id: "
|
|
108
|
+
type: ComponentInputType.MetricsQueryConfigs,
|
|
109
|
+
id: "metricQueryConfigs",
|
|
110
|
+
isAdvanced: true,
|
|
111
|
+
section: DataSourceSection,
|
|
75
112
|
});
|
|
76
113
|
|
|
77
114
|
componentArguments.push({
|
|
78
|
-
name: "
|
|
79
|
-
description: "
|
|
80
|
-
required: false,
|
|
81
|
-
type: ComponentInputType.LongText,
|
|
82
|
-
id: "chartDescription",
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
componentArguments.push({
|
|
86
|
-
name: "Legend Text",
|
|
87
|
-
description: "The text to display in the legend",
|
|
115
|
+
name: "Title",
|
|
116
|
+
description: "Displayed above the chart",
|
|
88
117
|
required: false,
|
|
89
118
|
type: ComponentInputType.Text,
|
|
90
|
-
id: "
|
|
119
|
+
id: "chartTitle",
|
|
120
|
+
section: DisplaySection,
|
|
91
121
|
});
|
|
92
122
|
|
|
93
123
|
componentArguments.push({
|
|
94
|
-
name: "
|
|
95
|
-
description: "
|
|
124
|
+
name: "Description",
|
|
125
|
+
description: "Subtitle shown below the title",
|
|
96
126
|
required: false,
|
|
97
|
-
type: ComponentInputType.
|
|
98
|
-
id: "
|
|
127
|
+
type: ComponentInputType.LongText,
|
|
128
|
+
id: "chartDescription",
|
|
129
|
+
section: DisplaySection,
|
|
99
130
|
});
|
|
100
131
|
|
|
101
132
|
return componentArguments;
|