@galaxy-io/filament-ui 0.11.0 → 0.13.0
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/dist/api/queries/constants.d.ts +1 -0
- package/dist/api/queries/constants.js +2 -1
- package/dist/api/queries/pipelines.d.ts +15 -0
- package/dist/api/queries/pipelines.js +13 -12
- package/dist/api/queries/runs.d.ts +1 -1
- package/dist/api/queries/runs.js +8 -11
- package/dist/api/queries/webhooks.d.ts +61 -0
- package/dist/api/queries/webhooks.js +41 -0
- package/dist/api/utils.d.ts +1 -0
- package/dist/api/utils.js +3 -1
- package/dist/components/connections/ConnectorPreviewChip.js +4 -3
- package/dist/components/webhooks/WebhookDeliveryUrlCopyButton.d.ts +8 -0
- package/dist/components/webhooks/WebhookDeliveryUrlCopyButton.js +33 -0
- package/dist/components/webhooks/WebhookEndpointErrorLayout.d.ts +7 -0
- package/dist/components/webhooks/WebhookEndpointErrorLayout.js +26 -0
- package/dist/components/webhooks/WebhookEndpointStatusBeacon.d.ts +7 -0
- package/dist/components/webhooks/WebhookEndpointStatusBeacon.js +20 -0
- package/dist/components/webhooks/WebhookEndpointStatusCallout.d.ts +8 -0
- package/dist/components/webhooks/WebhookEndpointStatusCallout.js +11 -0
- package/dist/components/webhooks/constants.d.ts +10 -0
- package/dist/components/webhooks/constants.js +36 -0
- package/dist/components/webhooks/hooks/useWebhookEndpointSync.d.ts +8 -0
- package/dist/components/webhooks/hooks/useWebhookEndpointSync.js +112 -0
- package/dist/components/webhooks/types.d.ts +9 -0
- package/dist/components/webhooks/types.js +13 -0
- package/dist/components/webhooks/utils.d.ts +21 -0
- package/dist/components/webhooks/utils.js +47 -0
- package/dist/constants.js +1 -1
- package/dist/gen/ingestion/v1/capabilities_pb.js +1 -1
- package/dist/gen/ingestion/v1/connectors_pb.d.ts +6 -0
- package/dist/gen/ingestion/v1/connectors_pb.js +1 -1
- package/dist/gen/ingestion/v1/runs_pb.d.ts +2 -1
- package/dist/gen/ingestion/v1/service_pb.d.ts +19 -0
- package/dist/gen/ingestion/v1/service_pb.js +5 -3
- package/dist/gen/ingestion/v1/webhooks_pb.d.ts +177 -0
- package/dist/gen/ingestion/v1/webhooks_pb.js +23 -0
- package/dist/hooks/useConfirm.d.ts +1 -1
- package/dist/module/hooks.d.ts +5 -6
- package/dist/module/hooks.js +6 -1
- package/dist/module/routes.d.ts +1 -2
- package/dist/module/schemas.d.ts +1 -2
- package/dist/module/schemas.js +1 -2
- package/dist/pages/connections/ConnectionsPage.js +0 -4
- package/dist/pages/connections/components/card/ConnectionCard.d.ts +0 -1
- package/dist/pages/connections/components/card/ConnectionCard.js +4 -9
- package/dist/pages/connections/components/create/configure/CreateConnectionConfigure.js +48 -11
- package/dist/pages/connections/components/drawer/ConnectionDrawer.js +6 -1
- package/dist/pages/connections/components/drawer/ConnectionDrawerSection.js +1 -1
- package/dist/pages/connections/components/drawer/ConnectionDrawerWebhook.d.ts +7 -0
- package/dist/pages/connections/components/drawer/ConnectionDrawerWebhook.js +105 -0
- package/dist/pages/connections/components/drawer/ConnectionDrawerWebhookSecrets.d.ts +7 -0
- package/dist/pages/connections/components/drawer/ConnectionDrawerWebhookSecrets.js +40 -0
- package/dist/pages/connections/components/drawer/ConnectionDrawerWebhookSigningKey.d.ts +9 -0
- package/dist/pages/connections/components/drawer/ConnectionDrawerWebhookSigningKey.js +120 -0
- package/dist/pages/connections/components/form/ConnectionFormSigningKeyModal.d.ts +9 -0
- package/dist/pages/connections/components/form/ConnectionFormSigningKeyModal.js +66 -0
- package/dist/pages/connections/components/form/ConnectionFormWrapper.d.ts +1 -0
- package/dist/pages/connections/components/form/ConnectionFormWrapper.js +2 -1
- package/dist/pages/connections/components/form/types.d.ts +5 -0
- package/dist/pages/connections/hooks/useConnectionWebhookKeyMint.d.ts +12 -0
- package/dist/pages/connections/hooks/useConnectionWebhookKeyMint.js +27 -0
- package/dist/pages/observability/ObservabilityPage.js +61 -66
- package/dist/pages/observability/components/ObservabilityPageActions.js +1 -3
- package/dist/pages/observability/components/ObservabilityWidgetEmpty.d.ts +8 -0
- package/dist/pages/observability/components/ObservabilityWidgetEmpty.js +30 -0
- package/dist/pages/observability/components/band/ObservabilityBand.d.ts +3 -0
- package/dist/pages/observability/components/band/ObservabilityBand.js +28 -0
- package/dist/pages/observability/components/band/ObservabilityBandList.d.ts +12 -0
- package/dist/pages/observability/components/band/ObservabilityBandList.js +81 -0
- package/dist/pages/observability/components/band/ObservabilityBandMetricTile.d.ts +10 -0
- package/dist/pages/observability/components/band/ObservabilityBandMetricTile.js +86 -0
- package/dist/pages/observability/components/band/ObservabilityBandPivotSelect.d.ts +7 -0
- package/dist/pages/observability/components/band/ObservabilityBandPivotSelect.js +37 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsChart.d.ts +10 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsChart.js +26 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsPastTile.d.ts +3 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsPastTile.js +128 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsTile.d.ts +3 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsTile.js +13 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsUpcomingTile.d.ts +3 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsUpcomingTile.js +63 -0
- package/dist/pages/observability/components/band/ObservabilityBandTile.d.ts +12 -0
- package/dist/pages/observability/components/band/ObservabilityBandTile.js +71 -0
- package/dist/pages/observability/components/band/ObservabilityBandTimeseriesChart.d.ts +14 -0
- package/dist/pages/observability/components/band/ObservabilityBandTimeseriesChart.js +48 -0
- package/dist/pages/observability/components/band/ObservabilityBandTopList.d.ts +12 -0
- package/dist/pages/observability/components/band/ObservabilityBandTopList.js +19 -0
- package/dist/pages/observability/components/band/constants.d.ts +25 -0
- package/dist/pages/observability/components/band/constants.js +81 -0
- package/dist/pages/observability/components/band/types.d.ts +27 -0
- package/dist/pages/observability/components/band/utils.d.ts +25 -0
- package/dist/pages/observability/components/band/utils.js +93 -0
- package/dist/pages/observability/components/connections/ObservabilityConnectionRow.d.ts +9 -0
- package/dist/pages/observability/components/connections/ObservabilityConnectionRow.js +57 -0
- package/dist/pages/observability/components/connections/ObservabilityConnectionsWidget.d.ts +7 -0
- package/dist/pages/observability/components/connections/ObservabilityConnectionsWidget.js +56 -0
- package/dist/pages/observability/components/connections/constants.d.ts +5 -0
- package/dist/pages/observability/components/connections/constants.js +24 -0
- package/dist/pages/observability/components/connections/types.d.ts +4 -0
- package/dist/pages/observability/components/connections/utils.d.ts +4 -0
- package/dist/pages/observability/components/connections/utils.js +23 -0
- package/dist/pages/observability/components/failures/ObservabilityFailuresBanner.d.ts +3 -0
- package/dist/pages/observability/components/failures/ObservabilityFailuresBanner.js +33 -0
- package/dist/pages/observability/components/failures/ObservabilityFailuresDetails.d.ts +7 -0
- package/dist/pages/observability/components/failures/ObservabilityFailuresDetails.js +99 -0
- package/dist/pages/observability/components/failures/constants.d.ts +2 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesBar.d.ts +7 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesBar.js +34 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesColumnCell.d.ts +7 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesColumnCell.js +15 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesHeader.d.ts +3 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesHeader.js +34 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesRow.d.ts +11 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesRow.js +120 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesWidget.d.ts +3 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesWidget.js +142 -0
- package/dist/pages/observability/components/pipelines/constants.d.ts +23 -0
- package/dist/pages/observability/components/pipelines/constants.js +33 -0
- package/dist/pages/observability/components/pipelines/types.d.ts +22 -0
- package/dist/pages/observability/components/pipelines/types.js +11 -0
- package/dist/pages/observability/components/pipelines/utils.d.ts +9 -0
- package/dist/pages/observability/components/pipelines/utils.js +73 -0
- package/dist/pages/observability/components/runs/ObservabilityRunsPastTable.js +6 -13
- package/dist/pages/observability/components/runs/ObservabilityRunsTableActions.d.ts +3 -0
- package/dist/pages/observability/components/runs/ObservabilityRunsTableActions.js +43 -0
- package/dist/pages/observability/components/runs/ObservabilityRunsTableWidget.js +2 -0
- package/dist/pages/observability/components/runs/ObservabilityRunsViewToggle.d.ts +3 -0
- package/dist/pages/observability/components/runs/ObservabilityRunsViewToggle.js +26 -0
- package/dist/pages/observability/components/runs/constants.d.ts +4 -10
- package/dist/pages/observability/components/runs/constants.js +8 -12
- package/dist/pages/observability/components/scheduled/ObservabilityScheduledWidget.d.ts +3 -0
- package/dist/pages/observability/components/scheduled/ObservabilityScheduledWidget.js +94 -0
- package/dist/pages/observability/components/setup/ObservabilitySetupChecklist.js +3 -1
- package/dist/pages/observability/components/setup/constants.js +1 -1
- package/dist/pages/observability/constants.d.ts +18 -3
- package/dist/pages/observability/constants.js +24 -4
- package/dist/pages/observability/hooks/useObservabilityAggregateQuery.d.ts +2 -0
- package/dist/pages/observability/hooks/useObservabilityAggregateQuery.js +13 -0
- package/dist/pages/observability/hooks/useObservabilityBandRanking.d.ts +8 -0
- package/dist/pages/observability/hooks/useObservabilityBandRanking.js +21 -0
- package/dist/pages/observability/hooks/useObservabilityBandUpcoming.d.ts +8 -0
- package/dist/pages/observability/hooks/useObservabilityBandUpcoming.js +45 -0
- package/dist/pages/observability/hooks/useObservabilityMetricInputs.d.ts +9 -0
- package/dist/pages/observability/hooks/useObservabilityMetricInputs.js +33 -0
- package/dist/pages/observability/hooks/useObservabilityPipelines.d.ts +12 -0
- package/dist/pages/observability/hooks/useObservabilityPipelines.js +22 -0
- package/dist/pages/observability/hooks/useObservabilityTimeseriesQuery.d.ts +2 -0
- package/dist/pages/observability/hooks/useObservabilityTimeseriesQuery.js +13 -0
- package/dist/pages/observability/types.d.ts +16 -0
- package/dist/pages/observability/types.js +7 -1
- package/dist/pages/observability/utils.d.ts +6 -1
- package/dist/pages/observability/utils.js +19 -2
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasPanelResourceOptions.js +1 -1
- package/dist/pages/pipelines/canvas/panel/overview/PipelineCanvasPanelOverview.js +1 -1
- package/dist/pages/pipelines/canvas/panel/overview/node/PipelineCanvasPanelNodeDetail.js +1 -1
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceDetail.js +11 -0
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceEndpoint.js +1 -1
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceSection.js +4 -1
- package/dist/pages/pipelines/canvas/routes/hooks/usePipelineCanvasRoutes.js +1 -1
- package/dist/pages/pipelines/components/create/components/CreatePipelineModalFooter.js +7 -1
- package/dist/pages/pipelines/components/create/hooks/useCreatePipelineResources.js +2 -2
- package/dist/pages/pipelines/components/create/steps/CreatePipelineModalResources.js +5 -2
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesTable.js +15 -2
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesUrlCell.d.ts +7 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesUrlCell.js +27 -0
- package/dist/pages/pipelines/components/header/PipelinePageEditActions.js +10 -0
- package/dist/pages/pipelines/components/header/PipelinePageHeading.js +1 -1
- package/dist/pages/pipelines/components/resource/PipelineResourceCreateForm.d.ts +1 -0
- package/dist/pages/pipelines/components/resource/PipelineResourceCreateForm.js +10 -3
- package/dist/pages/pipelines/components/run/PipelineRunModal.js +7 -4
- package/dist/pages/pipelines/components/run/PipelineRunModalResourcesPane.d.ts +1 -0
- package/dist/pages/pipelines/components/run/PipelineRunModalResourcesPane.js +5 -4
- package/dist/pages/pipelines/components/run/utils.d.ts +1 -0
- package/dist/pages/pipelines/components/run/utils.js +2 -1
- package/dist/pages/pipelines/components/table/PipelinesTable.js +1 -1
- package/dist/pages/pipelines/settings/PipelineSettingsPageAdvanced.js +1 -1
- package/dist/pages/pipelines/settings/PipelineSettingsPageDanger.js +1 -1
- package/dist/pages/pipelines/settings/PipelineSettingsPageGeneral.js +2 -2
- package/dist/pages/pipelines/settings/PipelineSettingsPageSchedule.js +1 -1
- package/dist/styles.css +15 -0
- package/dist/utils/errors.d.ts +2 -0
- package/dist/utils/errors.js +6 -1
- package/package.json +1 -1
- package/dist/pages/observability/components/metrics/ObservabilityMetricsWidget.d.ts +0 -3
- package/dist/pages/observability/components/metrics/ObservabilityMetricsWidget.js +0 -139
- package/dist/pages/observability/components/metrics/constants.d.ts +0 -3
- package/dist/pages/observability/components/metrics/constants.js +0 -11
- package/dist/pages/observability/components/runs/ObservabilityRunsChart.d.ts +0 -3
- package/dist/pages/observability/components/runs/ObservabilityRunsChart.js +0 -66
- package/dist/pages/observability/components/runs/ObservabilityRunsChartWidget.d.ts +0 -3
- package/dist/pages/observability/components/runs/ObservabilityRunsChartWidget.js +0 -75
- package/dist/pages/observability/components/runs/ObservabilityRunsScheduledChart.d.ts +0 -3
- package/dist/pages/observability/components/runs/ObservabilityRunsScheduledChart.js +0 -39
- package/dist/pages/observability/components/runs/types.d.ts +0 -1
- package/dist/pages/observability/components/runs/utils.d.ts +0 -14
- package/dist/pages/observability/components/runs/utils.js +0 -71
- package/dist/pages/observability/components/timeseries/ObservabilityPivotSelect.d.ts +0 -8
- package/dist/pages/observability/components/timeseries/ObservabilityPivotSelect.js +0 -28
- package/dist/pages/observability/components/timeseries/ObservabilityTimeseriesChart.d.ts +0 -14
- package/dist/pages/observability/components/timeseries/ObservabilityTimeseriesChart.js +0 -105
- package/dist/pages/observability/components/timeseries/ObservabilityTimeseriesWidget.d.ts +0 -19
- package/dist/pages/observability/components/timeseries/ObservabilityTimeseriesWidget.js +0 -61
- package/dist/pages/observability/components/timeseries/constants.d.ts +0 -19
- package/dist/pages/observability/components/timeseries/constants.js +0 -57
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ObservabilityRunsView } from "../../types.js";
|
|
2
|
+
import { useObservabilitySearch } from "../../../../module/hooks.js";
|
|
3
|
+
import ObservabilityBandRunsPastTile from "./ObservabilityBandRunsPastTile.js";
|
|
4
|
+
import ObservabilityBandRunsUpcomingTile from "./ObservabilityBandRunsUpcomingTile.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { match } from "ts-pattern";
|
|
7
|
+
//#region src/pages/observability/components/band/ObservabilityBandRunsTile.tsx
|
|
8
|
+
var ObservabilityBandRunsTile = () => {
|
|
9
|
+
const { runs: view } = useObservabilitySearch();
|
|
10
|
+
return match(view).with(ObservabilityRunsView.PAST, () => /* @__PURE__ */ jsx(ObservabilityBandRunsPastTile, {})).with(ObservabilityRunsView.UPCOMING, () => /* @__PURE__ */ jsx(ObservabilityBandRunsUpcomingTile, {})).exhaustive();
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ObservabilityBandRunsTile as default };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { RunStatus } from "../../../../gen/ingestion/v1/runs_pb.js";
|
|
2
|
+
import { PIPELINE_RUN_STATUS_TO_HUE_MAP } from "../../../../components/runs/constants.js";
|
|
3
|
+
import PipelineRunStatusSwatch from "../../../../components/runs/PipelineRunStatusSwatch.js";
|
|
4
|
+
import { OBSERVABILITY_TIMEFRAME_TO_LABEL_MAP } from "../../constants.js";
|
|
5
|
+
import { useObservabilitySearch } from "../../../../module/hooks.js";
|
|
6
|
+
import ObservabilityBandTile from "./ObservabilityBandTile.js";
|
|
7
|
+
import { formatObservabilityBandCount } from "./utils.js";
|
|
8
|
+
import ObservabilityBandList from "./ObservabilityBandList.js";
|
|
9
|
+
import ObservabilityBandRunsChart from "./ObservabilityBandRunsChart.js";
|
|
10
|
+
import ObservabilityRunsViewToggle from "../runs/ObservabilityRunsViewToggle.js";
|
|
11
|
+
import { useObservabilityBandUpcoming } from "../../hooks/useObservabilityBandUpcoming.js";
|
|
12
|
+
import { SquareSize } from "@galaxy-io/dls/shapes/Square";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import Flex, { AlignItems } from "@galaxy-io/dls/layout/Flex";
|
|
15
|
+
import Text, { TextSize, TextVariant } from "@galaxy-io/dls/text/Text";
|
|
16
|
+
import { FontFamily } from "@galaxy-io/dls/theme/enums";
|
|
17
|
+
//#region src/pages/observability/components/band/ObservabilityBandRunsUpcomingTile.tsx
|
|
18
|
+
var ObservabilityBandRunsUpcomingTile = () => {
|
|
19
|
+
const { timeframe } = useObservabilitySearch();
|
|
20
|
+
const { count, groups, nextUp, isLoading, isFetching } = useObservabilityBandUpcoming();
|
|
21
|
+
return /* @__PURE__ */ jsx(ObservabilityBandTile, {
|
|
22
|
+
label: "Runs",
|
|
23
|
+
info: `Runs scheduled to start in the next ${OBSERVABILITY_TIMEFRAME_TO_LABEL_MAP[timeframe]}. Each schedule plans only its next run ahead.`,
|
|
24
|
+
actions: /* @__PURE__ */ jsx(ObservabilityRunsViewToggle, {}),
|
|
25
|
+
isLoading,
|
|
26
|
+
value: /* @__PURE__ */ jsxs(Flex, {
|
|
27
|
+
alignItems: AlignItems.CENTER,
|
|
28
|
+
gap: 12,
|
|
29
|
+
minWidth: 0,
|
|
30
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
31
|
+
size: TextSize.HEADING_SM,
|
|
32
|
+
family: FontFamily.MONO,
|
|
33
|
+
children: formatObservabilityBandCount(count)
|
|
34
|
+
}), /* @__PURE__ */ jsxs(Flex, {
|
|
35
|
+
alignItems: AlignItems.CENTER,
|
|
36
|
+
gap: 4,
|
|
37
|
+
children: [/* @__PURE__ */ jsx(PipelineRunStatusSwatch, {
|
|
38
|
+
status: RunStatus.SCHEDULED,
|
|
39
|
+
size: SquareSize.SMALL
|
|
40
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
41
|
+
size: TextSize.BODY_SM,
|
|
42
|
+
variant: TextVariant.SECONDARY,
|
|
43
|
+
lineClamp: 1,
|
|
44
|
+
children: "scheduled"
|
|
45
|
+
})]
|
|
46
|
+
})]
|
|
47
|
+
}),
|
|
48
|
+
chart: /* @__PURE__ */ jsx(ObservabilityBandRunsChart, {
|
|
49
|
+
groups,
|
|
50
|
+
isLoading: isFetching,
|
|
51
|
+
ariaLabel: "Scheduled runs"
|
|
52
|
+
}),
|
|
53
|
+
top: /* @__PURE__ */ jsx(ObservabilityBandList, {
|
|
54
|
+
title: "Next up",
|
|
55
|
+
emptyText: "No upcoming runs",
|
|
56
|
+
items: nextUp,
|
|
57
|
+
isLoading,
|
|
58
|
+
colors: [PIPELINE_RUN_STATUS_TO_HUE_MAP[RunStatus.SCHEDULED]]
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { ObservabilityBandRunsUpcomingTile as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
interface ObservabilityBandTileProps {
|
|
3
|
+
label: string;
|
|
4
|
+
info: string;
|
|
5
|
+
actions?: ReactNode;
|
|
6
|
+
value: ReactNode;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
chart: ReactNode;
|
|
9
|
+
top: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare const ObservabilityBandTile: FC<ObservabilityBandTileProps>;
|
|
12
|
+
export default ObservabilityBandTile;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { InfoIcon } from "@phosphor-icons/react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Flex, { AlignItems, FlexDirection, JustifyContent } from "@galaxy-io/dls/layout/Flex";
|
|
4
|
+
import Box from "@galaxy-io/dls/layout/Box";
|
|
5
|
+
import Skeleton, { SkeletonSize } from "@galaxy-io/dls/feedback/Skeleton";
|
|
6
|
+
import Text, { TextVariant } from "@galaxy-io/dls/text/Text";
|
|
7
|
+
import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
8
|
+
import Icon, { IconVariant } from "@galaxy-io/dls/icons/Icon";
|
|
9
|
+
import Divider from "@galaxy-io/dls/layout/Divider";
|
|
10
|
+
//#region src/pages/observability/components/band/ObservabilityBandTile.tsx
|
|
11
|
+
var ObservabilityBandTile = ({ label, info, actions, value, isLoading, chart, top }) => /* @__PURE__ */ jsx(FlexItem, {
|
|
12
|
+
grow: 1,
|
|
13
|
+
basis: 0,
|
|
14
|
+
minWidth: 0,
|
|
15
|
+
children: /* @__PURE__ */ jsxs(Flex, {
|
|
16
|
+
direction: FlexDirection.COLUMN,
|
|
17
|
+
fillWidth: true,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ jsxs(Flex, {
|
|
20
|
+
direction: FlexDirection.COLUMN,
|
|
21
|
+
gap: 12,
|
|
22
|
+
padding: 16,
|
|
23
|
+
fillWidth: true,
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ jsxs(Flex, {
|
|
26
|
+
alignItems: AlignItems.CENTER,
|
|
27
|
+
justifyContent: JustifyContent.SPACE_BETWEEN,
|
|
28
|
+
gap: 8,
|
|
29
|
+
height: 24,
|
|
30
|
+
minWidth: 0,
|
|
31
|
+
children: [/* @__PURE__ */ jsxs(Flex, {
|
|
32
|
+
alignItems: AlignItems.CENTER,
|
|
33
|
+
gap: 4,
|
|
34
|
+
minWidth: 0,
|
|
35
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
36
|
+
variant: TextVariant.SECONDARY,
|
|
37
|
+
lineClamp: 1,
|
|
38
|
+
children: label
|
|
39
|
+
}), /* @__PURE__ */ jsx(Icon, {
|
|
40
|
+
component: InfoIcon,
|
|
41
|
+
variant: IconVariant.TERTIARY,
|
|
42
|
+
size: 12,
|
|
43
|
+
ariaLabel: `About ${label.toLowerCase()}`,
|
|
44
|
+
tooltip: info
|
|
45
|
+
})]
|
|
46
|
+
}), actions]
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ jsx(Flex, {
|
|
49
|
+
alignItems: AlignItems.CENTER,
|
|
50
|
+
height: 20,
|
|
51
|
+
minWidth: 0,
|
|
52
|
+
children: isLoading ? /* @__PURE__ */ jsx(Box, {
|
|
53
|
+
width: 96,
|
|
54
|
+
height: 20,
|
|
55
|
+
children: /* @__PURE__ */ jsx(Skeleton, { size: SkeletonSize.SMALL })
|
|
56
|
+
}) : value
|
|
57
|
+
}),
|
|
58
|
+
chart
|
|
59
|
+
]
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
62
|
+
/* @__PURE__ */ jsx(Box, {
|
|
63
|
+
padding: 16,
|
|
64
|
+
fillWidth: true,
|
|
65
|
+
children: top
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
//#endregion
|
|
71
|
+
export { ObservabilityBandTile as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ChartValueFormatter } from '@galaxy-io/dls/charts/types';
|
|
3
|
+
import { RoleColor } from '@galaxy-io/dls/theme/tokens/types';
|
|
4
|
+
import { Metric, MetricDimension } from '../../../../gen/metrics/v1/metrics_pb';
|
|
5
|
+
interface ObservabilityBandTimeseriesChartProps {
|
|
6
|
+
label: string;
|
|
7
|
+
metric: Metric;
|
|
8
|
+
pivot: MetricDimension;
|
|
9
|
+
color: RoleColor;
|
|
10
|
+
valueFormatter: ChartValueFormatter;
|
|
11
|
+
isStacked: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const ObservabilityBandTimeseriesChart: FC<ObservabilityBandTimeseriesChartProps>;
|
|
14
|
+
export default ObservabilityBandTimeseriesChart;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { MetricDimension } from "../../../../gen/metrics/v1/metrics_pb.js";
|
|
2
|
+
import { mapObservabilityBandLines } from "./utils.js";
|
|
3
|
+
import { useObservabilityBandRanking } from "../../hooks/useObservabilityBandRanking.js";
|
|
4
|
+
import { useObservabilityMetricInputs } from "../../hooks/useObservabilityMetricInputs.js";
|
|
5
|
+
import { useObservabilityTimeseriesQuery } from "../../hooks/useObservabilityTimeseriesQuery.js";
|
|
6
|
+
import { useMemo } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import Flex from "@galaxy-io/dls/layout/Flex";
|
|
9
|
+
import AreaChart from "@galaxy-io/dls/charts/AreaChart";
|
|
10
|
+
import LineChart from "@galaxy-io/dls/charts/LineChart";
|
|
11
|
+
import { ChartCurve, ChartSwatch } from "@galaxy-io/dls/charts/types";
|
|
12
|
+
//#region src/pages/observability/components/band/ObservabilityBandTimeseriesChart.tsx
|
|
13
|
+
var ObservabilityBandTimeseriesChart = ({ label, metric, pivot, color, valueFormatter, isStacked }) => {
|
|
14
|
+
const { createAggregateInput, createSeriesInput, labelFormatter } = useObservabilityMetricInputs();
|
|
15
|
+
const { ranking } = useObservabilityBandRanking(createAggregateInput(metric, MetricDimension.PIPELINE_ID));
|
|
16
|
+
const { data, isFetching } = useObservabilityTimeseriesQuery(createSeriesInput(metric, pivot));
|
|
17
|
+
const { series, lines } = useMemo(() => mapObservabilityBandLines(pivot, data?.series ?? [], ranking, label, color), [
|
|
18
|
+
pivot,
|
|
19
|
+
data,
|
|
20
|
+
ranking,
|
|
21
|
+
label,
|
|
22
|
+
color
|
|
23
|
+
]);
|
|
24
|
+
const chartProps = {
|
|
25
|
+
series,
|
|
26
|
+
valueFormatter,
|
|
27
|
+
labelFormatter,
|
|
28
|
+
curve: ChartCurve.LINEAR,
|
|
29
|
+
isLoading: isFetching,
|
|
30
|
+
swatch: ChartSwatch.SQUARE,
|
|
31
|
+
hasLegend: false,
|
|
32
|
+
ariaLabel: `${label} over time`
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ jsx(Flex, {
|
|
35
|
+
height: 136,
|
|
36
|
+
fillWidth: true,
|
|
37
|
+
children: isStacked ? /* @__PURE__ */ jsx(AreaChart, {
|
|
38
|
+
...chartProps,
|
|
39
|
+
areas: lines,
|
|
40
|
+
isStacked: true
|
|
41
|
+
}) : /* @__PURE__ */ jsx(LineChart, {
|
|
42
|
+
...chartProps,
|
|
43
|
+
lines
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
export { ObservabilityBandTimeseriesChart as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { RoleColor } from '@galaxy-io/dls/theme/tokens/types';
|
|
3
|
+
import { QueryAggregateRequest } from '../../../../gen/metrics/v1/metrics_pb';
|
|
4
|
+
interface ObservabilityBandTopListProps {
|
|
5
|
+
title: string;
|
|
6
|
+
emptyText: string;
|
|
7
|
+
input: QueryAggregateRequest;
|
|
8
|
+
colors: (RoleColor | undefined)[];
|
|
9
|
+
format: (value: number) => string;
|
|
10
|
+
}
|
|
11
|
+
declare const ObservabilityBandTopList: FC<ObservabilityBandTopListProps>;
|
|
12
|
+
export default ObservabilityBandTopList;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useObservabilityBandRanking } from "../../hooks/useObservabilityBandRanking.js";
|
|
2
|
+
import ObservabilityBandList from "./ObservabilityBandList.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/pages/observability/components/band/ObservabilityBandTopList.tsx
|
|
5
|
+
var ObservabilityBandTopList = ({ title, emptyText, input, colors, format }) => {
|
|
6
|
+
const { ranking, isLoading } = useObservabilityBandRanking(input);
|
|
7
|
+
return /* @__PURE__ */ jsx(ObservabilityBandList, {
|
|
8
|
+
title,
|
|
9
|
+
emptyText,
|
|
10
|
+
items: ranking.map(({ pipeline, value }) => ({
|
|
11
|
+
pipeline,
|
|
12
|
+
value: format(value)
|
|
13
|
+
})),
|
|
14
|
+
isLoading,
|
|
15
|
+
colors
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ObservabilityBandTopList as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ChartSeriesStyles } from '@galaxy-io/dls/charts/types';
|
|
2
|
+
import { SelectOption } from '@galaxy-io/dls/inputs/SelectInput';
|
|
3
|
+
import { RoleColor } from '@galaxy-io/dls/theme/tokens/types';
|
|
4
|
+
import { RunStatus } from '../../../../gen/ingestion/v1/runs_pb';
|
|
5
|
+
import { ObservabilityBandRunsMetric, ObservabilityBandViewConfig } from './types';
|
|
6
|
+
import { ObservabilityBandViewKey, ObservabilityBandViews } from '../../types';
|
|
7
|
+
export declare const OBSERVABILITY_BAND_FEATURED_STATUSES: RunStatus[];
|
|
8
|
+
export declare const OBSERVABILITY_BAND_OTHER_STATUSES: (RunStatus.UNSPECIFIED | RunStatus.REQUESTED | RunStatus.RUNNING | RunStatus.COMPLETED | RunStatus.FAILED | RunStatus.CANCELED | RunStatus.PAUSED | RunStatus.PARTIAL)[];
|
|
9
|
+
export declare const OBSERVABILITY_BAND_RUNS_SERIES: ChartSeriesStyles<ObservabilityBandRunsMetric>;
|
|
10
|
+
export declare const OBSERVABILITY_BAND_WRAP_MAX_WIDTH = 1120;
|
|
11
|
+
export declare const OBSERVABILITY_BAND_INFO_ICON_SIZE = 12;
|
|
12
|
+
export declare const OBSERVABILITY_BAND_HEADER_HEIGHT = 24;
|
|
13
|
+
export declare const OBSERVABILITY_BAND_COUNTS_HEIGHT = 20;
|
|
14
|
+
export declare const OBSERVABILITY_BAND_CHART_HEIGHT = 136;
|
|
15
|
+
export declare const OBSERVABILITY_BAND_VALUE_HEIGHT = 20;
|
|
16
|
+
export declare const OBSERVABILITY_BAND_TOP_COUNT = 3;
|
|
17
|
+
export declare const OBSERVABILITY_BAND_TOP_ROW_HEIGHT = 16;
|
|
18
|
+
export declare const OBSERVABILITY_BAND_PIVOT_SELECT_WIDTH = 110;
|
|
19
|
+
export declare const OBSERVABILITY_BAND_PIVOT_OPTIONS: SelectOption[];
|
|
20
|
+
export declare const OBSERVABILITY_BAND_VIEW_KEY_TO_CONFIG_MAP: {
|
|
21
|
+
[TKey in ObservabilityBandViewKey]: Record<ObservabilityBandViews[TKey], ObservabilityBandViewConfig>;
|
|
22
|
+
};
|
|
23
|
+
export declare const OBSERVABILITY_BAND_PIPELINE_COLORS: RoleColor[];
|
|
24
|
+
export declare const OBSERVABILITY_BAND_RUNS_MIN_SEGMENT_LENGTH = 4;
|
|
25
|
+
export declare const OBSERVABILITY_BAND_VALUE_SKELETON_WIDTH = 96;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { RunStatus } from "../../../../gen/ingestion/v1/runs_pb.js";
|
|
2
|
+
import { PIPELINE_RUN_EXECUTED_STATUSES } from "../../../../components/runs/constants.js";
|
|
3
|
+
import { ObservabilityThroughputView, ObservabilityUsageView } from "../../types.js";
|
|
4
|
+
import { Metric, MetricDimension } from "../../../../gen/metrics/v1/metrics_pb.js";
|
|
5
|
+
import { EMPTY_VALUE, formatBytes, formatDuration, formatNumber } from "@galaxy-io/dls/utils/format";
|
|
6
|
+
//#region src/pages/observability/components/band/constants.ts
|
|
7
|
+
var OBSERVABILITY_BAND_FEATURED_STATUSES = [
|
|
8
|
+
RunStatus.COMPLETED,
|
|
9
|
+
RunStatus.FAILED,
|
|
10
|
+
RunStatus.RUNNING
|
|
11
|
+
];
|
|
12
|
+
var OBSERVABILITY_BAND_OTHER_STATUSES = PIPELINE_RUN_EXECUTED_STATUSES.filter((status) => !OBSERVABILITY_BAND_FEATURED_STATUSES.includes(status));
|
|
13
|
+
var OBSERVABILITY_BAND_RUNS_SERIES = { runs: { label: "Runs" } };
|
|
14
|
+
var OBSERVABILITY_BAND_PIVOT_OPTIONS = [{
|
|
15
|
+
id: String(MetricDimension.PIPELINE_ID),
|
|
16
|
+
label: "Pipeline"
|
|
17
|
+
}, {
|
|
18
|
+
id: String(MetricDimension.STATUS),
|
|
19
|
+
label: "Status"
|
|
20
|
+
}];
|
|
21
|
+
var OBSERVABILITY_BAND_VIEW_KEY_TO_CONFIG_MAP = {
|
|
22
|
+
throughput: {
|
|
23
|
+
[ObservabilityThroughputView.RECORDS]: {
|
|
24
|
+
label: "Records",
|
|
25
|
+
info: "Records written by runs",
|
|
26
|
+
unit: "records",
|
|
27
|
+
topTitle: "Most records",
|
|
28
|
+
emptyText: "No records written",
|
|
29
|
+
metric: Metric.RUN_RECORDS,
|
|
30
|
+
color: "purple",
|
|
31
|
+
format: (value) => formatNumber(value, { precision: 0 }),
|
|
32
|
+
axisFormat: (value) => formatNumber(value, { precision: 0 })
|
|
33
|
+
},
|
|
34
|
+
[ObservabilityThroughputView.VOLUME]: {
|
|
35
|
+
label: "Volume",
|
|
36
|
+
info: "Bytes written by runs",
|
|
37
|
+
unit: "written",
|
|
38
|
+
topTitle: "Most volume",
|
|
39
|
+
emptyText: "No bytes written",
|
|
40
|
+
metric: Metric.RUN_BYTES,
|
|
41
|
+
color: "teal",
|
|
42
|
+
format: (value) => formatBytes(value),
|
|
43
|
+
axisFormat: (value) => formatBytes(value)
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
usage: {
|
|
47
|
+
[ObservabilityUsageView.CPU]: {
|
|
48
|
+
label: "CPU",
|
|
49
|
+
info: "Average CPU time of one run, across runs",
|
|
50
|
+
unit: "per run",
|
|
51
|
+
topTitle: "Heaviest runs",
|
|
52
|
+
emptyText: "No usage reported",
|
|
53
|
+
metric: Metric.RUN_CPU_USAGE,
|
|
54
|
+
color: "orange",
|
|
55
|
+
format: (value) => value > 0 ? formatDuration(value * 1e3) : EMPTY_VALUE,
|
|
56
|
+
axisFormat: (value) => formatDuration(value * 1e3)
|
|
57
|
+
},
|
|
58
|
+
[ObservabilityUsageView.MEMORY]: {
|
|
59
|
+
label: "Memory",
|
|
60
|
+
info: "Average peak memory of one run, across runs",
|
|
61
|
+
unit: "peak per run",
|
|
62
|
+
topTitle: "Heaviest runs",
|
|
63
|
+
emptyText: "No usage reported",
|
|
64
|
+
metric: Metric.RUN_MEMORY_USAGE,
|
|
65
|
+
color: "pink",
|
|
66
|
+
format: (value) => value > 0 ? formatBytes(value) : EMPTY_VALUE,
|
|
67
|
+
axisFormat: (value) => formatBytes(value)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
var OBSERVABILITY_BAND_PIPELINE_COLORS = [
|
|
72
|
+
"orange",
|
|
73
|
+
"teal",
|
|
74
|
+
"pink",
|
|
75
|
+
"purple",
|
|
76
|
+
"blue",
|
|
77
|
+
"green",
|
|
78
|
+
"yellow"
|
|
79
|
+
];
|
|
80
|
+
//#endregion
|
|
81
|
+
export { OBSERVABILITY_BAND_FEATURED_STATUSES, OBSERVABILITY_BAND_OTHER_STATUSES, OBSERVABILITY_BAND_PIPELINE_COLORS, OBSERVABILITY_BAND_PIVOT_OPTIONS, OBSERVABILITY_BAND_RUNS_SERIES, OBSERVABILITY_BAND_VIEW_KEY_TO_CONFIG_MAP };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ChartValueFormatter } from '@galaxy-io/dls/charts/types';
|
|
2
|
+
import { RoleColor } from '@galaxy-io/dls/theme/tokens/types';
|
|
3
|
+
import { Pipeline } from '../../../../gen/ingestion/v1/pipelines_pb';
|
|
4
|
+
import { Metric, TimeseriesPoint } from '../../../../gen/metrics/v1/metrics_pb';
|
|
5
|
+
export type ObservabilityBandRunsMetric = "runs";
|
|
6
|
+
export interface ObservabilityBandSeriesEntry {
|
|
7
|
+
key: string;
|
|
8
|
+
label: string;
|
|
9
|
+
color: RoleColor;
|
|
10
|
+
points: TimeseriesPoint[];
|
|
11
|
+
}
|
|
12
|
+
export interface ObservabilityBandViewConfig {
|
|
13
|
+
label: string;
|
|
14
|
+
info: string;
|
|
15
|
+
unit: string;
|
|
16
|
+
topTitle: string;
|
|
17
|
+
emptyText: string;
|
|
18
|
+
metric: Metric;
|
|
19
|
+
color: RoleColor;
|
|
20
|
+
format: (value: number) => string;
|
|
21
|
+
axisFormat: ChartValueFormatter;
|
|
22
|
+
}
|
|
23
|
+
export interface ObservabilityBandListItem {
|
|
24
|
+
pipeline: Pipeline;
|
|
25
|
+
value: string;
|
|
26
|
+
tooltip?: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BarChartGroupDatum } from '@galaxy-io/dls/charts/BarChart';
|
|
2
|
+
import { LineChartLineDatum } from '@galaxy-io/dls/charts/LineChart';
|
|
3
|
+
import { RoleColor } from '@galaxy-io/dls/theme/tokens/types';
|
|
4
|
+
import { Pipeline } from '../../../../gen/ingestion/v1/pipelines_pb';
|
|
5
|
+
import { RunInfo } from '../../../../gen/ingestion/v1/runs_pb';
|
|
6
|
+
import { MetricDimension, Timeseries } from '../../../../gen/metrics/v1/metrics_pb';
|
|
7
|
+
import { ObservabilityBandRunsMetric } from './types';
|
|
8
|
+
import { ObservabilityTimeframe } from '../../types';
|
|
9
|
+
export declare const formatObservabilityBandCount: (value: number) => string;
|
|
10
|
+
export declare const mapObservabilityBandRunsGroups: (series: Timeseries[]) => BarChartGroupDatum<ObservabilityBandRunsMetric>[];
|
|
11
|
+
export declare const getObservabilityBandUpcomingBounds: (timeframe: ObservabilityTimeframe, bucketStartMs: number) => number[];
|
|
12
|
+
export declare const filterObservabilityBandUpcomingRuns: (runs: RunInfo[], bounds: number[]) => RunInfo[];
|
|
13
|
+
export declare const mapObservabilityBandUpcomingGroups: (runs: RunInfo[], bounds: number[]) => BarChartGroupDatum<ObservabilityBandRunsMetric>[];
|
|
14
|
+
export declare const mapObservabilityBandLines: (pivot: MetricDimension, series: Timeseries[], ranking: {
|
|
15
|
+
pipeline: Pipeline;
|
|
16
|
+
}[], label: string, color: RoleColor) => {
|
|
17
|
+
series: {
|
|
18
|
+
[k: string]: {
|
|
19
|
+
label: string;
|
|
20
|
+
color: RoleColor;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
lines: LineChartLineDatum<string>[];
|
|
24
|
+
};
|
|
25
|
+
export declare const getObservabilityBandTopColors: (pivot: MetricDimension, color: RoleColor) => RoleColor[];
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { RunStatus } from "../../../../gen/ingestion/v1/runs_pb.js";
|
|
2
|
+
import { mapOptionIdToEnum } from "../../../../utils/select.js";
|
|
3
|
+
import { PIPELINE_RUN_STATUS_TO_HUE_MAP, PIPELINE_RUN_STATUS_TO_LABEL_MAP } from "../../../../components/runs/constants.js";
|
|
4
|
+
import { MetricDimension } from "../../../../gen/metrics/v1/metrics_pb.js";
|
|
5
|
+
import { OBSERVABILITY_TIMEFRAME_TO_QUERY_MAP } from "../../constants.js";
|
|
6
|
+
import { formatPipelineName } from "../../../../components/pipelines/utils.js";
|
|
7
|
+
import { OBSERVABILITY_BAND_PIPELINE_COLORS } from "./constants.js";
|
|
8
|
+
import { formatBucketKey, getBucketOffset, getObservabilityBucketCount } from "../../utils.js";
|
|
9
|
+
import { formatNumber } from "@galaxy-io/dls/utils/format";
|
|
10
|
+
import { match } from "ts-pattern";
|
|
11
|
+
//#region src/pages/observability/components/band/utils.ts
|
|
12
|
+
var formatObservabilityBandCount = (value) => formatNumber(value, { precision: 0 });
|
|
13
|
+
var mapObservabilityBandRunsGroups = (series) => (series[0]?.points ?? []).map((point, bucketIndex) => ({
|
|
14
|
+
label: formatBucketKey(point.bucketStartMs),
|
|
15
|
+
bars: [{
|
|
16
|
+
metric: "runs",
|
|
17
|
+
components: series.flatMap((statusSeries) => {
|
|
18
|
+
const status = mapOptionIdToEnum(RunStatus, statusSeries.key);
|
|
19
|
+
const color = PIPELINE_RUN_STATUS_TO_HUE_MAP[status];
|
|
20
|
+
return color ? [{
|
|
21
|
+
key: statusSeries.key,
|
|
22
|
+
label: PIPELINE_RUN_STATUS_TO_LABEL_MAP[status],
|
|
23
|
+
value: statusSeries.points[bucketIndex].values[0],
|
|
24
|
+
color
|
|
25
|
+
}] : [];
|
|
26
|
+
}).sort((a, b) => b.value - a.value)
|
|
27
|
+
}]
|
|
28
|
+
}));
|
|
29
|
+
var getObservabilityBandUpcomingBounds = (timeframe, bucketStartMs) => {
|
|
30
|
+
const { granularity } = OBSERVABILITY_TIMEFRAME_TO_QUERY_MAP[timeframe];
|
|
31
|
+
return Array.from({ length: getObservabilityBucketCount(timeframe) + 1 }, (_, index) => getBucketOffset(granularity, new Date(bucketStartMs), index));
|
|
32
|
+
};
|
|
33
|
+
var isObservabilityBandRunWithin = (run, startMs, endMs) => Number(run.scheduledAt) >= startMs && Number(run.scheduledAt) < endMs;
|
|
34
|
+
var filterObservabilityBandUpcomingRuns = (runs, bounds) => runs.filter((run) => isObservabilityBandRunWithin(run, bounds[0], bounds[bounds.length - 1]));
|
|
35
|
+
var mapObservabilityBandUpcomingGroups = (runs, bounds) => bounds.slice(0, -1).map((startMs, bucketIndex) => ({
|
|
36
|
+
label: formatBucketKey(BigInt(startMs)),
|
|
37
|
+
bars: [{
|
|
38
|
+
metric: "runs",
|
|
39
|
+
components: [{
|
|
40
|
+
key: String(RunStatus.SCHEDULED),
|
|
41
|
+
label: PIPELINE_RUN_STATUS_TO_LABEL_MAP[RunStatus.SCHEDULED],
|
|
42
|
+
value: runs.filter((run) => isObservabilityBandRunWithin(run, startMs, bounds[bucketIndex + 1])).length,
|
|
43
|
+
color: PIPELINE_RUN_STATUS_TO_HUE_MAP[RunStatus.SCHEDULED]
|
|
44
|
+
}]
|
|
45
|
+
}]
|
|
46
|
+
}));
|
|
47
|
+
var getObservabilityBandPipelineEntries = (series, ranking) => {
|
|
48
|
+
const seriesByPipelineId = new Map(series.map((keySeries) => [keySeries.key, keySeries]));
|
|
49
|
+
return ranking.flatMap(({ pipeline }, index) => {
|
|
50
|
+
const keySeries = seriesByPipelineId.get(pipeline.id);
|
|
51
|
+
return keySeries ? [{
|
|
52
|
+
key: pipeline.id,
|
|
53
|
+
label: formatPipelineName(pipeline, true),
|
|
54
|
+
color: OBSERVABILITY_BAND_PIPELINE_COLORS[index % OBSERVABILITY_BAND_PIPELINE_COLORS.length],
|
|
55
|
+
points: keySeries.points
|
|
56
|
+
}] : [];
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
var getObservabilityBandStatusEntries = (series) => series.flatMap(({ key, points }) => {
|
|
60
|
+
const status = mapOptionIdToEnum(RunStatus, key);
|
|
61
|
+
const color = PIPELINE_RUN_STATUS_TO_HUE_MAP[status];
|
|
62
|
+
return color ? [{
|
|
63
|
+
key,
|
|
64
|
+
label: PIPELINE_RUN_STATUS_TO_LABEL_MAP[status],
|
|
65
|
+
color,
|
|
66
|
+
points
|
|
67
|
+
}] : [];
|
|
68
|
+
});
|
|
69
|
+
var mapObservabilityBandLines = (pivot, series, ranking, label, color) => {
|
|
70
|
+
const entries = match(pivot).with(MetricDimension.PIPELINE_ID, () => getObservabilityBandPipelineEntries(series, ranking)).with(MetricDimension.STATUS, () => getObservabilityBandStatusEntries(series)).otherwise(() => [{
|
|
71
|
+
key: label,
|
|
72
|
+
label,
|
|
73
|
+
color,
|
|
74
|
+
points: series[0]?.points ?? []
|
|
75
|
+
}]);
|
|
76
|
+
return {
|
|
77
|
+
series: Object.fromEntries(entries.map((entry) => [entry.key, {
|
|
78
|
+
label: entry.label,
|
|
79
|
+
color: entry.color
|
|
80
|
+
}])),
|
|
81
|
+
lines: entries.map(({ key, points }) => ({
|
|
82
|
+
metric: key,
|
|
83
|
+
showArea: pivot === MetricDimension.UNSPECIFIED,
|
|
84
|
+
points: points.map((point) => ({
|
|
85
|
+
x: formatBucketKey(point.bucketStartMs),
|
|
86
|
+
y: point.values[0]
|
|
87
|
+
}))
|
|
88
|
+
}))
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
var getObservabilityBandTopColors = (pivot, color) => pivot === MetricDimension.PIPELINE_ID ? OBSERVABILITY_BAND_PIPELINE_COLORS : [color];
|
|
92
|
+
//#endregion
|
|
93
|
+
export { filterObservabilityBandUpcomingRuns, formatObservabilityBandCount, getObservabilityBandTopColors, getObservabilityBandUpcomingBounds, mapObservabilityBandLines, mapObservabilityBandRunsGroups, mapObservabilityBandUpcomingGroups };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Connection } from '../../../../gen/ingestion/v1/connections_pb';
|
|
3
|
+
import { ObservabilityConnectionStats } from './types';
|
|
4
|
+
interface ObservabilityConnectionRowProps {
|
|
5
|
+
connection: Connection;
|
|
6
|
+
stats: ObservabilityConnectionStats | undefined;
|
|
7
|
+
}
|
|
8
|
+
declare const ObservabilityConnectionRow: FC<ObservabilityConnectionRowProps>;
|
|
9
|
+
export default ObservabilityConnectionRow;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { useFilamentSearchUpdate } from "../../../../module/hooks.js";
|
|
2
|
+
import ConnectorTile from "../../../../components/connections/ConnectorTile.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import Beacon, { BeaconSize } from "@galaxy-io/dls/beacons/Beacon";
|
|
6
|
+
import Text, { TextSize, TextVariant } from "@galaxy-io/dls/text/Text";
|
|
7
|
+
import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
8
|
+
import { styled } from "@linaria/react";
|
|
9
|
+
import pluralize from "pluralize";
|
|
10
|
+
//#region src/pages/observability/components/connections/ObservabilityConnectionRow.tsx
|
|
11
|
+
var ObservabilityConnectionRowButton = /*#__PURE__*/ styled("button")({
|
|
12
|
+
name: "ObservabilityConnectionRowButton",
|
|
13
|
+
class: "filament-ObservabilityConnectionRow-ObservabilityConnectionRowButton-o1dczh9r",
|
|
14
|
+
propsAsIs: false
|
|
15
|
+
});
|
|
16
|
+
var ObservabilityConnectionRow = ({ connection, stats }) => {
|
|
17
|
+
const updateSearch = useFilamentSearchUpdate();
|
|
18
|
+
const pipelineCount = stats?.pipelineCount ?? 0;
|
|
19
|
+
const handleClick = () => {
|
|
20
|
+
updateSearch((prev) => ({
|
|
21
|
+
...prev,
|
|
22
|
+
connectionId: connection.id
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ jsxs(ObservabilityConnectionRowButton, {
|
|
26
|
+
type: "button",
|
|
27
|
+
onClick: handleClick,
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsx(ConnectorTile, {
|
|
30
|
+
connector: connection.connector,
|
|
31
|
+
kind: connection.kind
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ jsx(FlexItem, {
|
|
34
|
+
grow: 1,
|
|
35
|
+
minWidth: 0,
|
|
36
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
37
|
+
variant: pipelineCount > 0 ? TextVariant.PRIMARY : TextVariant.TERTIARY,
|
|
38
|
+
lineClamp: 1,
|
|
39
|
+
children: connection.name
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
stats?.isLive && /* @__PURE__ */ jsx(Beacon, {
|
|
43
|
+
color: "blue",
|
|
44
|
+
size: BeaconSize.SMALL,
|
|
45
|
+
isPulse: true,
|
|
46
|
+
ariaLabel: "Running"
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ jsx(Text, {
|
|
49
|
+
size: TextSize.BODY_SM,
|
|
50
|
+
variant: TextVariant.TERTIARY,
|
|
51
|
+
children: pluralize("pipeline", pipelineCount, true)
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { ObservabilityConnectionRow as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ConnectorKind } from '../../../../gen/ingestion/v1/common_pb';
|
|
3
|
+
interface ObservabilityConnectionsWidgetProps {
|
|
4
|
+
kind: ConnectorKind;
|
|
5
|
+
}
|
|
6
|
+
declare const ObservabilityConnectionsWidget: FC<ObservabilityConnectionsWidgetProps>;
|
|
7
|
+
export default ObservabilityConnectionsWidget;
|