@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,142 @@
|
|
|
1
|
+
import { FilamentPath, createFilamentHref } from "../../../../module/paths.js";
|
|
2
|
+
import { RunStatus } from "../../../../gen/ingestion/v1/runs_pb.js";
|
|
3
|
+
import { Metric, MetricDimension } from "../../../../gen/metrics/v1/metrics_pb.js";
|
|
4
|
+
import { useFilamentSearchUpdate, useObservabilitySearch } from "../../../../module/hooks.js";
|
|
5
|
+
import RouterLink from "../../../../components/RouterLink.js";
|
|
6
|
+
import { getObservabilityBucketCount } from "../../utils.js";
|
|
7
|
+
import { useObservabilityPipelines } from "../../hooks/useObservabilityPipelines.js";
|
|
8
|
+
import { useObservabilityMetricInputs } from "../../hooks/useObservabilityMetricInputs.js";
|
|
9
|
+
import { useObservabilityTimeseriesQuery } from "../../hooks/useObservabilityTimeseriesQuery.js";
|
|
10
|
+
import ObservabilityWidgetEmpty from "../ObservabilityWidgetEmpty.js";
|
|
11
|
+
import { createObservabilityPipelinesCells, getObservabilityPipelinesTrackWidth, mapObservabilityPipelinesSeries } from "./utils.js";
|
|
12
|
+
import ObservabilityPipelinesHeader from "./ObservabilityPipelinesHeader.js";
|
|
13
|
+
import ObservabilityPipelinesRow from "./ObservabilityPipelinesRow.js";
|
|
14
|
+
/* empty css */
|
|
15
|
+
import { ArrowRightIcon, CaretLeftIcon, CaretRightIcon, FlowArrowIcon } from "@phosphor-icons/react";
|
|
16
|
+
import Button, { ButtonSize, ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
17
|
+
import { useMemo } from "react";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
import Flex, { AlignItems, JustifyContent } from "@galaxy-io/dls/layout/Flex";
|
|
20
|
+
import Box from "@galaxy-io/dls/layout/Box";
|
|
21
|
+
import Text, { TextSize, TextVariant } from "@galaxy-io/dls/text/Text";
|
|
22
|
+
import Widget from "@galaxy-io/dls/widget/Widget";
|
|
23
|
+
import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
24
|
+
import { styled } from "@linaria/react";
|
|
25
|
+
//#region src/pages/observability/components/pipelines/ObservabilityPipelinesWidget.tsx
|
|
26
|
+
var _exp = () => ({ $trackWidth }) => `${$trackWidth}px`;
|
|
27
|
+
var ObservabilityPipelinesFrame = /*#__PURE__*/ styled("div")({
|
|
28
|
+
name: "ObservabilityPipelinesFrame",
|
|
29
|
+
class: "filament-ObservabilityPipelinesWidget-ObservabilityPipelinesFrame-ogarhb3",
|
|
30
|
+
propsAsIs: false,
|
|
31
|
+
vars: { "ogarhb3-0": [_exp()] }
|
|
32
|
+
});
|
|
33
|
+
var ObservabilityPipelinesWidget = () => {
|
|
34
|
+
const updateSearch = useFilamentSearchUpdate();
|
|
35
|
+
const { timeframe, pipelinesPage } = useObservabilitySearch();
|
|
36
|
+
const { bucketStartMs, createSeriesInput } = useObservabilityMetricInputs();
|
|
37
|
+
const { entries } = useObservabilityPipelines();
|
|
38
|
+
const pageCount = Math.max(1, Math.ceil(entries.length / 10));
|
|
39
|
+
const page = Math.min(pipelinesPage, pageCount);
|
|
40
|
+
const pageStart = (page - 1) * 10;
|
|
41
|
+
const hasPages = pageCount > 1;
|
|
42
|
+
const { data: completedData } = useObservabilityTimeseriesQuery(createSeriesInput(Metric.RUN_COUNT, MetricDimension.PIPELINE_ID, [RunStatus.COMPLETED]));
|
|
43
|
+
const { data: failedData } = useObservabilityTimeseriesQuery(createSeriesInput(Metric.RUN_COUNT, MetricDimension.PIPELINE_ID, [RunStatus.FAILED]));
|
|
44
|
+
const rows = useMemo(() => {
|
|
45
|
+
const completedCounts = mapObservabilityPipelinesSeries(completedData?.series ?? []);
|
|
46
|
+
const failedCounts = mapObservabilityPipelinesSeries(failedData?.series ?? []);
|
|
47
|
+
return entries.slice(pageStart, pageStart + 10).map(({ pipeline, health }) => ({
|
|
48
|
+
pipeline,
|
|
49
|
+
health,
|
|
50
|
+
cells: createObservabilityPipelinesCells(pipeline, health, timeframe, bucketStartMs, completedCounts, failedCounts)
|
|
51
|
+
}));
|
|
52
|
+
}, [
|
|
53
|
+
entries,
|
|
54
|
+
pageStart,
|
|
55
|
+
timeframe,
|
|
56
|
+
bucketStartMs,
|
|
57
|
+
completedData,
|
|
58
|
+
failedData
|
|
59
|
+
]);
|
|
60
|
+
const updatePage = (nextPage) => {
|
|
61
|
+
updateSearch((prev) => ({
|
|
62
|
+
...prev,
|
|
63
|
+
pipelinesPage: nextPage === 1 ? void 0 : nextPage
|
|
64
|
+
}), { replace: true });
|
|
65
|
+
};
|
|
66
|
+
const handlePreviousPage = () => {
|
|
67
|
+
updatePage(page - 1);
|
|
68
|
+
};
|
|
69
|
+
const handleNextPage = () => {
|
|
70
|
+
updatePage(page + 1);
|
|
71
|
+
};
|
|
72
|
+
return /* @__PURE__ */ jsx(Widget, {
|
|
73
|
+
header: "Pipelines",
|
|
74
|
+
icon: FlowArrowIcon,
|
|
75
|
+
isFlush: true,
|
|
76
|
+
gap: 0,
|
|
77
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
78
|
+
label: "View all",
|
|
79
|
+
size: ButtonSize.SMALL,
|
|
80
|
+
variant: ButtonVariant.TERTIARY,
|
|
81
|
+
icon: ArrowRightIcon,
|
|
82
|
+
isIconTrailing: true,
|
|
83
|
+
href: createFilamentHref(FilamentPath.PIPELINES),
|
|
84
|
+
as: RouterLink
|
|
85
|
+
}),
|
|
86
|
+
children: entries.length === 0 ? /* @__PURE__ */ jsx(FlexItem, {
|
|
87
|
+
grow: 1,
|
|
88
|
+
minHeight: 0,
|
|
89
|
+
children: /* @__PURE__ */ jsx(ObservabilityWidgetEmpty, {
|
|
90
|
+
icon: FlowArrowIcon,
|
|
91
|
+
header: "No pipelines"
|
|
92
|
+
})
|
|
93
|
+
}) : /* @__PURE__ */ jsxs(ObservabilityPipelinesFrame, {
|
|
94
|
+
$trackWidth: getObservabilityPipelinesTrackWidth(getObservabilityBucketCount(timeframe)),
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ jsx(ObservabilityPipelinesHeader, {}),
|
|
97
|
+
/* @__PURE__ */ jsx(Box, {
|
|
98
|
+
minHeight: hasPages ? 440 : void 0,
|
|
99
|
+
children: rows.map(({ pipeline, health, cells }) => /* @__PURE__ */ jsx(ObservabilityPipelinesRow, {
|
|
100
|
+
pipeline,
|
|
101
|
+
health,
|
|
102
|
+
cells
|
|
103
|
+
}, pipeline.id))
|
|
104
|
+
}),
|
|
105
|
+
hasPages && /* @__PURE__ */ jsxs(Flex, {
|
|
106
|
+
alignItems: AlignItems.CENTER,
|
|
107
|
+
justifyContent: JustifyContent.SPACE_BETWEEN,
|
|
108
|
+
gap: 8,
|
|
109
|
+
height: 44,
|
|
110
|
+
padding: [0, 12],
|
|
111
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
112
|
+
size: TextSize.BODY_SM,
|
|
113
|
+
variant: TextVariant.TERTIARY,
|
|
114
|
+
lineClamp: 1,
|
|
115
|
+
children: `${pageStart + 1}–${pageStart + rows.length} of ${entries.length}`
|
|
116
|
+
}), /* @__PURE__ */ jsxs(Flex, {
|
|
117
|
+
gap: 4,
|
|
118
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
119
|
+
icon: CaretLeftIcon,
|
|
120
|
+
size: ButtonSize.SMALL,
|
|
121
|
+
variant: ButtonVariant.TERTIARY,
|
|
122
|
+
ariaLabel: "Previous page",
|
|
123
|
+
tooltip: "Previous page",
|
|
124
|
+
isDisabled: page === 1,
|
|
125
|
+
onClick: handlePreviousPage
|
|
126
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
127
|
+
icon: CaretRightIcon,
|
|
128
|
+
size: ButtonSize.SMALL,
|
|
129
|
+
variant: ButtonVariant.TERTIARY,
|
|
130
|
+
ariaLabel: "Next page",
|
|
131
|
+
tooltip: "Next page",
|
|
132
|
+
isDisabled: page === pageCount,
|
|
133
|
+
onClick: handleNextPage
|
|
134
|
+
})]
|
|
135
|
+
})]
|
|
136
|
+
})
|
|
137
|
+
]
|
|
138
|
+
})
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
//#endregion
|
|
142
|
+
export { ObservabilityPipelinesWidget as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TextVariant } from '@galaxy-io/dls/text/Text';
|
|
2
|
+
import { ObservabilityPipelinesColumn } from './types';
|
|
3
|
+
import { ObservabilityPipelineHealth } from '../../types';
|
|
4
|
+
export declare const OBSERVABILITY_PIPELINES_CONTAINER_NAME = "observability-pipelines";
|
|
5
|
+
export declare const OBSERVABILITY_PIPELINES_HEADER_HEIGHT = 32;
|
|
6
|
+
export declare const OBSERVABILITY_PIPELINES_ROW_HEIGHT = 44;
|
|
7
|
+
export declare const OBSERVABILITY_PIPELINES_FOOTER_HEIGHT = 44;
|
|
8
|
+
export declare const OBSERVABILITY_PIPELINES_LIMIT = 10;
|
|
9
|
+
export declare const OBSERVABILITY_PIPELINES_PAGE_MIN_HEIGHT: number;
|
|
10
|
+
export declare const OBSERVABILITY_PIPELINES_BAR_WIDTH = 6;
|
|
11
|
+
export declare const OBSERVABILITY_PIPELINES_BAR_GAP = 4;
|
|
12
|
+
export declare const OBSERVABILITY_PIPELINES_BAR_HEIGHT = 24;
|
|
13
|
+
export declare const OBSERVABILITY_PIPELINES_BAR_RUNNING_HEIGHT = 4;
|
|
14
|
+
export declare const OBSERVABILITY_PIPELINES_HIDE_RECORDS_MAX_WIDTH = 800;
|
|
15
|
+
export declare const OBSERVABILITY_PIPELINES_HIDE_LAST_RUN_MAX_WIDTH = 720;
|
|
16
|
+
export declare const OBSERVABILITY_PIPELINES_HIDE_FLOW_MAX_WIDTH = 620;
|
|
17
|
+
export declare const OBSERVABILITY_PIPELINES_COLUMNS = "140px minmax(0, 1fr) var(--observability-pipelines-track) 72px 104px";
|
|
18
|
+
export declare const OBSERVABILITY_PIPELINES_COLUMNS_NO_RECORDS = "140px minmax(0, 1fr) var(--observability-pipelines-track) 72px";
|
|
19
|
+
export declare const OBSERVABILITY_PIPELINES_COLUMNS_NO_LAST_RUN = "140px minmax(0, 1fr) var(--observability-pipelines-track)";
|
|
20
|
+
export declare const OBSERVABILITY_PIPELINES_COLUMNS_NAME_AND_TRACK = "minmax(0, 1fr) var(--observability-pipelines-track)";
|
|
21
|
+
export declare const OBSERVABILITY_PIPELINES_COLUMN_TO_LABEL_MAP: Record<ObservabilityPipelinesColumn, string>;
|
|
22
|
+
export declare const OBSERVABILITY_PIPELINES_COLUMN_TO_ALIGN_MAP: Record<ObservabilityPipelinesColumn, "left" | "right">;
|
|
23
|
+
export declare const OBSERVABILITY_PIPELINE_HEALTH_TO_LAST_RUN_VARIANT_MAP: Record<ObservabilityPipelineHealth, TextVariant>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ObservabilityPipelineHealth } from "../../types.js";
|
|
2
|
+
import { ObservabilityPipelinesColumn } from "./types.js";
|
|
3
|
+
import { TextVariant } from "@galaxy-io/dls/text/Text";
|
|
4
|
+
//#region src/pages/observability/components/pipelines/constants.ts
|
|
5
|
+
var OBSERVABILITY_PIPELINES_FLOW_WIDTH = 140;
|
|
6
|
+
var OBSERVABILITY_PIPELINES_LAST_RUN_WIDTH = 72;
|
|
7
|
+
var OBSERVABILITY_PIPELINES_RECORDS_WIDTH = 104;
|
|
8
|
+
var OBSERVABILITY_PIPELINES_TRACK = "var(--observability-pipelines-track)";
|
|
9
|
+
`${OBSERVABILITY_PIPELINES_FLOW_WIDTH}${OBSERVABILITY_PIPELINES_TRACK}${OBSERVABILITY_PIPELINES_LAST_RUN_WIDTH}${OBSERVABILITY_PIPELINES_RECORDS_WIDTH}`;
|
|
10
|
+
`${OBSERVABILITY_PIPELINES_FLOW_WIDTH}${OBSERVABILITY_PIPELINES_TRACK}${OBSERVABILITY_PIPELINES_LAST_RUN_WIDTH}`;
|
|
11
|
+
`${OBSERVABILITY_PIPELINES_FLOW_WIDTH}${OBSERVABILITY_PIPELINES_TRACK}`;
|
|
12
|
+
`${OBSERVABILITY_PIPELINES_TRACK}`;
|
|
13
|
+
var OBSERVABILITY_PIPELINES_COLUMN_TO_LABEL_MAP = {
|
|
14
|
+
[ObservabilityPipelinesColumn.FLOW]: "Flow",
|
|
15
|
+
[ObservabilityPipelinesColumn.PIPELINE]: "Pipeline",
|
|
16
|
+
[ObservabilityPipelinesColumn.RUNS]: "Runs",
|
|
17
|
+
[ObservabilityPipelinesColumn.LAST_RUN]: "Last run",
|
|
18
|
+
[ObservabilityPipelinesColumn.RECORDS]: "Records"
|
|
19
|
+
};
|
|
20
|
+
var OBSERVABILITY_PIPELINES_COLUMN_TO_ALIGN_MAP = {
|
|
21
|
+
[ObservabilityPipelinesColumn.FLOW]: "left",
|
|
22
|
+
[ObservabilityPipelinesColumn.PIPELINE]: "left",
|
|
23
|
+
[ObservabilityPipelinesColumn.RUNS]: "left",
|
|
24
|
+
[ObservabilityPipelinesColumn.LAST_RUN]: "left",
|
|
25
|
+
[ObservabilityPipelinesColumn.RECORDS]: "right"
|
|
26
|
+
};
|
|
27
|
+
var OBSERVABILITY_PIPELINE_HEALTH_TO_LAST_RUN_VARIANT_MAP = {
|
|
28
|
+
[ObservabilityPipelineHealth.FAILING]: TextVariant.ERROR,
|
|
29
|
+
[ObservabilityPipelineHealth.RUNNING]: TextVariant.TERTIARY,
|
|
30
|
+
[ObservabilityPipelineHealth.HEALTHY]: TextVariant.TERTIARY
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { OBSERVABILITY_PIPELINES_COLUMN_TO_ALIGN_MAP, OBSERVABILITY_PIPELINES_COLUMN_TO_LABEL_MAP, OBSERVABILITY_PIPELINE_HEALTH_TO_LAST_RUN_VARIANT_MAP };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Pipeline } from '../../../../gen/ingestion/v1/pipelines_pb';
|
|
2
|
+
import { RunStatus } from '../../../../gen/ingestion/v1/runs_pb';
|
|
3
|
+
import { TimeseriesPoint } from '../../../../gen/metrics/v1/metrics_pb';
|
|
4
|
+
export interface ObservabilityPipelinesCell {
|
|
5
|
+
bucketStartMs: TimeseriesPoint["bucketStartMs"];
|
|
6
|
+
status: RunStatus | undefined;
|
|
7
|
+
completed: number;
|
|
8
|
+
failed: number;
|
|
9
|
+
summary: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ObservabilityPipelinesBarSegment {
|
|
12
|
+
status: RunStatus;
|
|
13
|
+
height: number;
|
|
14
|
+
}
|
|
15
|
+
export type ObservabilityPipelinesCounts = Map<Pipeline["id"], Map<string, number>>;
|
|
16
|
+
export declare enum ObservabilityPipelinesColumn {
|
|
17
|
+
FLOW = "FLOW",
|
|
18
|
+
PIPELINE = "PIPELINE",
|
|
19
|
+
RUNS = "RUNS",
|
|
20
|
+
LAST_RUN = "LAST_RUN",
|
|
21
|
+
RECORDS = "RECORDS"
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/pages/observability/components/pipelines/types.ts
|
|
2
|
+
var ObservabilityPipelinesColumn = /* @__PURE__ */ function(ObservabilityPipelinesColumn) {
|
|
3
|
+
ObservabilityPipelinesColumn["FLOW"] = "FLOW";
|
|
4
|
+
ObservabilityPipelinesColumn["PIPELINE"] = "PIPELINE";
|
|
5
|
+
ObservabilityPipelinesColumn["RUNS"] = "RUNS";
|
|
6
|
+
ObservabilityPipelinesColumn["LAST_RUN"] = "LAST_RUN";
|
|
7
|
+
ObservabilityPipelinesColumn["RECORDS"] = "RECORDS";
|
|
8
|
+
return ObservabilityPipelinesColumn;
|
|
9
|
+
}({});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { ObservabilityPipelinesColumn };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Pipeline } from '../../../../gen/ingestion/v1/pipelines_pb';
|
|
2
|
+
import { Timeseries } from '../../../../gen/metrics/v1/metrics_pb';
|
|
3
|
+
import { ObservabilityPipelinesBarSegment, ObservabilityPipelinesCell, ObservabilityPipelinesColumn, ObservabilityPipelinesCounts } from './types';
|
|
4
|
+
import { ObservabilityPipelineHealth, ObservabilityTimeframe } from '../../types';
|
|
5
|
+
export declare const getObservabilityPipelinesTrackWidth: (bucketCount: number) => number;
|
|
6
|
+
export declare const getObservabilityPipelinesColumnLabel: (column: ObservabilityPipelinesColumn, timeframe: ObservabilityTimeframe) => string;
|
|
7
|
+
export declare const mapObservabilityPipelinesSeries: (series: Timeseries[]) => ObservabilityPipelinesCounts;
|
|
8
|
+
export declare const createObservabilityPipelinesCells: (pipeline: Pipeline, health: ObservabilityPipelineHealth, timeframe: ObservabilityTimeframe, bucketStartMs: number, completedCounts: ObservabilityPipelinesCounts, failedCounts: ObservabilityPipelinesCounts) => ObservabilityPipelinesCell[];
|
|
9
|
+
export declare const createObservabilityPipelinesBarSegments: ({ status, completed, failed, }: ObservabilityPipelinesCell) => ObservabilityPipelinesBarSegment[];
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { RunStatus } from "../../../../gen/ingestion/v1/runs_pb.js";
|
|
2
|
+
import { ObservabilityPipelineHealth } from "../../types.js";
|
|
3
|
+
import { OBSERVABILITY_TIMEFRAME_TO_LABEL_MAP, OBSERVABILITY_TIMEFRAME_TO_QUERY_MAP } from "../../constants.js";
|
|
4
|
+
import { createTimeframeSince, formatBucketKey, getBucketLabelFormatter, getBucketOffset, getObservabilityBucketCount } from "../../utils.js";
|
|
5
|
+
import { ObservabilityPipelinesColumn } from "./types.js";
|
|
6
|
+
import { OBSERVABILITY_PIPELINES_COLUMN_TO_LABEL_MAP } from "./constants.js";
|
|
7
|
+
import { match } from "ts-pattern";
|
|
8
|
+
//#region src/pages/observability/components/pipelines/utils.ts
|
|
9
|
+
var getObservabilityPipelinesTrackWidth = (bucketCount) => bucketCount * 6 + (bucketCount - 1) * 4;
|
|
10
|
+
var getObservabilityPipelinesColumnLabel = (column, timeframe) => match(column).with(ObservabilityPipelinesColumn.RUNS, () => `Last ${OBSERVABILITY_TIMEFRAME_TO_LABEL_MAP[timeframe]}`).otherwise(() => OBSERVABILITY_PIPELINES_COLUMN_TO_LABEL_MAP[column]);
|
|
11
|
+
var mapObservabilityPipelinesSeries = (series) => new Map(series.map(({ key, points }) => [key, new Map(points.map((point) => [formatBucketKey(point.bucketStartMs), point.values[0] ?? 0]))]));
|
|
12
|
+
var getObservabilityPipelinesCellStatus = (isRunning, failed, completed) => {
|
|
13
|
+
if (isRunning) return RunStatus.RUNNING;
|
|
14
|
+
if (failed > 0) return RunStatus.FAILED;
|
|
15
|
+
if (completed > 0) return RunStatus.COMPLETED;
|
|
16
|
+
};
|
|
17
|
+
var formatObservabilityPipelinesCellSummary = ({ bucketStartMs, status, completed, failed }, granularity) => {
|
|
18
|
+
const parts = [
|
|
19
|
+
status === RunStatus.RUNNING ? "running" : void 0,
|
|
20
|
+
completed > 0 ? `${completed} completed` : void 0,
|
|
21
|
+
failed > 0 ? `${failed} failed` : void 0
|
|
22
|
+
].filter((part) => part !== void 0);
|
|
23
|
+
return `${getBucketLabelFormatter(granularity)(formatBucketKey(bucketStartMs))} · ${parts.length > 0 ? parts.join(", ") : "No runs"}`;
|
|
24
|
+
};
|
|
25
|
+
var createObservabilityPipelinesCells = (pipeline, health, timeframe, bucketStartMs, completedCounts, failedCounts) => {
|
|
26
|
+
const { granularity } = OBSERVABILITY_TIMEFRAME_TO_QUERY_MAP[timeframe];
|
|
27
|
+
const completed = completedCounts.get(pipeline.id);
|
|
28
|
+
const failed = failedCounts.get(pipeline.id);
|
|
29
|
+
const since = new Date(Number(createTimeframeSince(timeframe, bucketStartMs)));
|
|
30
|
+
const bucketCount = getObservabilityBucketCount(timeframe);
|
|
31
|
+
return Array.from({ length: bucketCount }, (_, index) => {
|
|
32
|
+
const cellStartMs = BigInt(getBucketOffset(granularity, since, index));
|
|
33
|
+
const bucketKey = formatBucketKey(cellStartMs);
|
|
34
|
+
const completedCount = completed?.get(bucketKey) ?? 0;
|
|
35
|
+
const failedCount = failed?.get(bucketKey) ?? 0;
|
|
36
|
+
const cell = {
|
|
37
|
+
bucketStartMs: cellStartMs,
|
|
38
|
+
status: getObservabilityPipelinesCellStatus(health === ObservabilityPipelineHealth.RUNNING && index === bucketCount - 1, failedCount, completedCount),
|
|
39
|
+
completed: completedCount,
|
|
40
|
+
failed: failedCount
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
...cell,
|
|
44
|
+
summary: formatObservabilityPipelinesCellSummary(cell, granularity)
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var createObservabilityPipelinesBarSegments = ({ status, completed, failed }) => {
|
|
49
|
+
const total = completed + failed;
|
|
50
|
+
if (total === 0) return status === RunStatus.RUNNING ? [{
|
|
51
|
+
status: RunStatus.RUNNING,
|
|
52
|
+
height: 24
|
|
53
|
+
}] : [];
|
|
54
|
+
const runningHeight = status === RunStatus.RUNNING ? 4 : 0;
|
|
55
|
+
const height = 24 - runningHeight;
|
|
56
|
+
const failedHeight = failed === 0 ? 0 : Math.min(completed === 0 ? height : height - 1, Math.max(1, Math.round(height * failed / total)));
|
|
57
|
+
return [
|
|
58
|
+
{
|
|
59
|
+
status: RunStatus.RUNNING,
|
|
60
|
+
height: runningHeight
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
status: RunStatus.FAILED,
|
|
64
|
+
height: failedHeight
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
status: RunStatus.COMPLETED,
|
|
68
|
+
height: height - failedHeight
|
|
69
|
+
}
|
|
70
|
+
].filter((segment) => segment.height > 0);
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
export { createObservabilityPipelinesBarSegments, createObservabilityPipelinesCells, getObservabilityPipelinesColumnLabel, getObservabilityPipelinesTrackWidth, mapObservabilityPipelinesSeries };
|
|
@@ -5,8 +5,7 @@ import { OBSERVABILITY_RUNS_EMPTY_STATE_TEXT_MAP } from "./constants.js";
|
|
|
5
5
|
import { useFilamentNavigate, useObservabilitySearch } from "../../../../module/hooks.js";
|
|
6
6
|
import { formatTimestamp } from "../../../../utils/format.js";
|
|
7
7
|
import { useListRunsInfiniteQuery } from "../../../../api/queries/runs.js";
|
|
8
|
-
import {
|
|
9
|
-
import { createRunsWindowInput } from "./utils.js";
|
|
8
|
+
import { useObservabilityMetricInputs } from "../../hooks/useObservabilityMetricInputs.js";
|
|
10
9
|
import PipelineRunDuration from "../../../../components/runs/PipelineRunDuration.js";
|
|
11
10
|
import PipelineRunRecords from "../../../../components/runs/PipelineRunRecords.js";
|
|
12
11
|
import PipelineRunVolume from "../../../../components/runs/PipelineRunVolume.js";
|
|
@@ -77,19 +76,13 @@ var OBSERVABILITY_RUNS_PAST_TABLE_COLUMNS = [
|
|
|
77
76
|
];
|
|
78
77
|
var ObservabilityRunsPastTable = () => {
|
|
79
78
|
const navigate = useFilamentNavigate();
|
|
80
|
-
const {
|
|
81
|
-
const
|
|
79
|
+
const { statuses } = useObservabilitySearch();
|
|
80
|
+
const { sinceMs } = useObservabilityMetricInputs();
|
|
82
81
|
const windowedStatuses = useMemo(() => statuses.filter((status) => status !== RunStatus.SCHEDULED), [statuses]);
|
|
83
82
|
const input = useMemo(() => ({
|
|
84
|
-
status:
|
|
85
|
-
|
|
86
|
-
}), [
|
|
87
|
-
timeframe,
|
|
88
|
-
bucketStartMs,
|
|
89
|
-
windowedStatuses,
|
|
90
|
-
runsBucket,
|
|
91
|
-
runsStatus
|
|
92
|
-
]);
|
|
83
|
+
status: windowedStatuses,
|
|
84
|
+
sinceMs
|
|
85
|
+
}), [sinceMs, windowedStatuses]);
|
|
93
86
|
const { data, isLoading, hasNextPage, isFetchingNextPage, fetchNextPage } = useListRunsInfiniteQuery({
|
|
94
87
|
input,
|
|
95
88
|
options: { enabled: windowedStatuses.length > 0 }
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { RunStatus } from "../../../../gen/ingestion/v1/runs_pb.js";
|
|
2
|
+
import { mapOptionIdToEnum } from "../../../../utils/select.js";
|
|
3
|
+
import { ObservabilityRunsView } from "../../types.js";
|
|
4
|
+
import { OBSERVABILITY_RUNS_ALL_STATUSES_LABEL, OBSERVABILITY_RUNS_SCHEDULED_STATUS_OPTION, OBSERVABILITY_RUNS_STATUS_OPTIONS, OBSERVABILITY_RUNS_UPCOMING_STATUS_OPTIONS } from "./constants.js";
|
|
5
|
+
import { useFilamentSearchUpdate, useObservabilitySearch } from "../../../../module/hooks.js";
|
|
6
|
+
import ObservabilityRunsViewToggle from "./ObservabilityRunsViewToggle.js";
|
|
7
|
+
import { useMemo } from "react";
|
|
8
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import Box from "@galaxy-io/dls/layout/Box";
|
|
10
|
+
import Text from "@galaxy-io/dls/text/Text";
|
|
11
|
+
import MultiSelectInput, { MultiSelectInputSize, MultiSelectInputVariant } from "@galaxy-io/dls/inputs/MultiSelectInput";
|
|
12
|
+
import pluralize from "pluralize";
|
|
13
|
+
//#region src/pages/observability/components/runs/ObservabilityRunsTableActions.tsx
|
|
14
|
+
var ObservabilityRunsTableActions = () => {
|
|
15
|
+
const updateSearch = useFilamentSearchUpdate();
|
|
16
|
+
const { runs: view, statuses } = useObservabilitySearch();
|
|
17
|
+
const selectedStatusIds = useMemo(() => OBSERVABILITY_RUNS_STATUS_OPTIONS.map((option) => option.id).filter((id) => statuses.includes(mapOptionIdToEnum(RunStatus, id))), [statuses]);
|
|
18
|
+
const handleStatusChange = (ids) => {
|
|
19
|
+
updateSearch((prev) => ({
|
|
20
|
+
...prev,
|
|
21
|
+
statuses: ids.map((id) => mapOptionIdToEnum(RunStatus, id))
|
|
22
|
+
}));
|
|
23
|
+
};
|
|
24
|
+
const isUpcoming = view === ObservabilityRunsView.UPCOMING;
|
|
25
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ObservabilityRunsViewToggle, {}), /* @__PURE__ */ jsx(Box, {
|
|
26
|
+
width: 160,
|
|
27
|
+
children: /* @__PURE__ */ jsx(MultiSelectInput, {
|
|
28
|
+
fillWidth: true,
|
|
29
|
+
options: isUpcoming ? OBSERVABILITY_RUNS_UPCOMING_STATUS_OPTIONS : OBSERVABILITY_RUNS_STATUS_OPTIONS,
|
|
30
|
+
selectAllLabel: isUpcoming ? void 0 : OBSERVABILITY_RUNS_ALL_STATUSES_LABEL,
|
|
31
|
+
value: isUpcoming ? [OBSERVABILITY_RUNS_SCHEDULED_STATUS_OPTION.id] : selectedStatusIds,
|
|
32
|
+
size: MultiSelectInputSize.SMALL,
|
|
33
|
+
variant: MultiSelectInputVariant.PRIMARY,
|
|
34
|
+
onChange: handleStatusChange,
|
|
35
|
+
placeholder: "Select statuses...",
|
|
36
|
+
ariaLabel: "Run statuses",
|
|
37
|
+
isDisabled: isUpcoming,
|
|
38
|
+
renderValue: (options) => /* @__PURE__ */ jsx(Text, { children: pluralize("status", options.length, true) })
|
|
39
|
+
})
|
|
40
|
+
})] });
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { ObservabilityRunsTableActions as default };
|
|
@@ -2,6 +2,7 @@ import { ObservabilityRunsView } from "../../types.js";
|
|
|
2
2
|
import { OBSERVABILITY_RUNS_VIEW_TO_TABLE_HEADER_MAP } from "./constants.js";
|
|
3
3
|
import { useObservabilitySearch } from "../../../../module/hooks.js";
|
|
4
4
|
import ObservabilityRunsPastTable from "./ObservabilityRunsPastTable.js";
|
|
5
|
+
import ObservabilityRunsTableActions from "./ObservabilityRunsTableActions.js";
|
|
5
6
|
import ObservabilityRunsUpcomingTable from "./ObservabilityRunsUpcomingTable.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
import { ListIcon } from "@phosphor-icons/react";
|
|
@@ -17,6 +18,7 @@ var ObservabilityRunsTableWidget = () => {
|
|
|
17
18
|
gap: 0,
|
|
18
19
|
header: OBSERVABILITY_RUNS_VIEW_TO_TABLE_HEADER_MAP[view],
|
|
19
20
|
icon: ListIcon,
|
|
21
|
+
actions: /* @__PURE__ */ jsx(ObservabilityRunsTableActions, {}),
|
|
20
22
|
children: view === ObservabilityRunsView.PAST ? /* @__PURE__ */ jsx(ObservabilityRunsPastTable, {}) : /* @__PURE__ */ jsx(ObservabilityRunsUpcomingTable, {})
|
|
21
23
|
});
|
|
22
24
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OBSERVABILITY_RUNS_VIEW_OPTIONS } from "./constants.js";
|
|
2
|
+
import { OBSERVABILITY_DEFAULT_RUNS_VIEW } from "../../constants.js";
|
|
3
|
+
import { useFilamentSearchUpdate, useObservabilitySearch } from "../../../../module/hooks.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import ToggleInput, { ToggleInputSize, ToggleInputVariant } from "@galaxy-io/dls/inputs/ToggleInput";
|
|
6
|
+
//#region src/pages/observability/components/runs/ObservabilityRunsViewToggle.tsx
|
|
7
|
+
var ObservabilityRunsViewToggle = () => {
|
|
8
|
+
const updateSearch = useFilamentSearchUpdate();
|
|
9
|
+
const { runs: view } = useObservabilitySearch();
|
|
10
|
+
const handleViewChange = (nextView) => {
|
|
11
|
+
updateSearch((prev) => ({
|
|
12
|
+
...prev,
|
|
13
|
+
runs: nextView === OBSERVABILITY_DEFAULT_RUNS_VIEW ? void 0 : nextView
|
|
14
|
+
}), { replace: true });
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ jsx(ToggleInput, {
|
|
17
|
+
size: ToggleInputSize.SMALL,
|
|
18
|
+
variant: ToggleInputVariant.PRIMARY,
|
|
19
|
+
options: OBSERVABILITY_RUNS_VIEW_OPTIONS,
|
|
20
|
+
value: view,
|
|
21
|
+
onChange: handleViewChange,
|
|
22
|
+
ariaLabel: "Runs view"
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ObservabilityRunsViewToggle as default };
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import { ChartSeriesStyles } from '@galaxy-io/dls/charts/types';
|
|
2
1
|
import { SelectOption } from '@galaxy-io/dls/inputs/SelectInput';
|
|
2
|
+
import { ToggleOption } from '@galaxy-io/dls/inputs/ToggleInput';
|
|
3
3
|
import { RunStatus } from '../../../../gen/ingestion/v1/runs_pb';
|
|
4
|
-
import { ObservabilityRunMetric } from './types';
|
|
5
4
|
import { ObservabilityRunsView } from '../../types';
|
|
6
|
-
export declare const OBSERVABILITY_RUNS_SERIES: ChartSeriesStyles<ObservabilityRunMetric>;
|
|
7
|
-
export declare const OBSERVABILITY_RUN_STATUSES: RunStatus[];
|
|
8
|
-
export declare const OBSERVABILITY_RUNS_SCHEDULED_SERIES: ChartSeriesStyles<ObservabilityRunMetric>;
|
|
9
5
|
export declare const OBSERVABILITY_RUNS_VIEW_TO_LABEL_MAP: Record<ObservabilityRunsView, string>;
|
|
6
|
+
export declare const OBSERVABILITY_RUNS_VIEW_OPTIONS: ToggleOption<ObservabilityRunsView>[];
|
|
10
7
|
export declare const OBSERVABILITY_RUNS_VIEW_TO_TABLE_HEADER_MAP: Record<ObservabilityRunsView, string>;
|
|
11
8
|
export declare const OBSERVABILITY_RUNS_EMPTY_STATE_TEXT_MAP: Record<ObservabilityRunsView, string>;
|
|
12
9
|
export declare const OBSERVABILITY_RUNS_SCHEDULED_STATUS_OPTION: SelectOption;
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
10
|
+
export declare const OBSERVABILITY_RUNS_STATUS_OPTIONS: SelectOption[];
|
|
11
|
+
export declare const OBSERVABILITY_RUNS_UPCOMING_STATUS_OPTIONS: SelectOption[];
|
|
15
12
|
export declare const OBSERVABILITY_RUNS_ALL_STATUSES_LABEL = "All statuses";
|
|
16
|
-
export declare const OBSERVABILITY_RUNS_NO_STATUSES_PLACEHOLDER = "No statuses selected";
|
|
17
13
|
export declare const OBSERVABILITY_RUNS_DEFAULT_STATUSES: RunStatus[];
|
|
18
14
|
export declare const OBSERVABILITY_RUNS_SCHEDULED_INPUT: import('../../../../gen/ingestion/v1/runs_pb').ListRunsRequest;
|
|
19
15
|
export declare const OBSERVABILITY_RUNS_TABLE_COLUMN_WIDTH_STATUS = 110;
|
|
@@ -25,6 +21,4 @@ export declare const OBSERVABILITY_RUNS_TABLE_COLUMN_WIDTH_RECORDS = 100;
|
|
|
25
21
|
export declare const OBSERVABILITY_RUNS_TABLE_COLUMN_WIDTH_VOLUME = 100;
|
|
26
22
|
export declare const OBSERVABILITY_RUNS_TABLE_COLUMN_WIDTH_CPU = 100;
|
|
27
23
|
export declare const OBSERVABILITY_RUNS_TABLE_COLUMN_WIDTH_MEMORY = 100;
|
|
28
|
-
export declare const OBSERVABILITY_RUNS_CHART_HEIGHT = 240;
|
|
29
24
|
export declare const OBSERVABILITY_RUNS_STATUS_SELECT_WIDTH = 160;
|
|
30
|
-
export declare const OBSERVABILITY_RUNS_CHART_MIN_SEGMENT_LENGTH = 4;
|
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
import { SortOrder, SortingRequestSchema } from "../../../../gen/ingestion/v1/sorting_pb.js";
|
|
2
2
|
import { ListRunsRequestSchema, RunStatus } from "../../../../gen/ingestion/v1/runs_pb.js";
|
|
3
|
-
import {
|
|
4
|
-
import { PIPELINE_RUN_EXECUTED_STATUSES, PIPELINE_RUN_STATUS_TO_HUE_MAP, PIPELINE_RUN_STATUS_TO_LABEL_MAP } from "../../../../components/runs/constants.js";
|
|
3
|
+
import { PIPELINE_RUN_EXECUTED_STATUSES, PIPELINE_RUN_STATUS_TO_LABEL_MAP } from "../../../../components/runs/constants.js";
|
|
5
4
|
import PipelineRunStatusSwatch from "../../../../components/runs/PipelineRunStatusSwatch.js";
|
|
6
5
|
import { ObservabilityRunsView } from "../../types.js";
|
|
7
6
|
import { create } from "@bufbuild/protobuf";
|
|
8
7
|
import { jsx } from "react/jsx-runtime";
|
|
9
8
|
//#region src/pages/observability/components/runs/constants.tsx
|
|
10
|
-
var OBSERVABILITY_RUNS_SERIES = { runs: { label: "Runs" } };
|
|
11
|
-
var OBSERVABILITY_RUN_STATUSES = getEnumValues(RunStatus);
|
|
12
|
-
var OBSERVABILITY_RUNS_SCHEDULED_SERIES = { runs: {
|
|
13
|
-
label: PIPELINE_RUN_STATUS_TO_LABEL_MAP[RunStatus.SCHEDULED],
|
|
14
|
-
color: PIPELINE_RUN_STATUS_TO_HUE_MAP[RunStatus.SCHEDULED]
|
|
15
|
-
} };
|
|
16
9
|
var OBSERVABILITY_RUNS_VIEW_TO_LABEL_MAP = {
|
|
17
10
|
[ObservabilityRunsView.PAST]: "Past",
|
|
18
11
|
[ObservabilityRunsView.UPCOMING]: "Upcoming"
|
|
19
12
|
};
|
|
13
|
+
var OBSERVABILITY_RUNS_VIEW_OPTIONS = Object.values(ObservabilityRunsView).map((runsView) => ({
|
|
14
|
+
id: runsView,
|
|
15
|
+
label: OBSERVABILITY_RUNS_VIEW_TO_LABEL_MAP[runsView]
|
|
16
|
+
}));
|
|
20
17
|
var OBSERVABILITY_RUNS_VIEW_TO_TABLE_HEADER_MAP = {
|
|
21
18
|
[ObservabilityRunsView.PAST]: "History",
|
|
22
19
|
[ObservabilityRunsView.UPCOMING]: "Upcoming runs"
|
|
@@ -29,17 +26,16 @@ var OBSERVABILITY_RUNS_SCHEDULED_STATUS_OPTION = {
|
|
|
29
26
|
id: String(RunStatus.SCHEDULED),
|
|
30
27
|
label: PIPELINE_RUN_STATUS_TO_LABEL_MAP[RunStatus.SCHEDULED]
|
|
31
28
|
};
|
|
32
|
-
var
|
|
29
|
+
var OBSERVABILITY_RUNS_STATUS_OPTIONS = PIPELINE_RUN_EXECUTED_STATUSES.map((status) => ({
|
|
33
30
|
id: String(status),
|
|
34
31
|
label: PIPELINE_RUN_STATUS_TO_LABEL_MAP[status],
|
|
35
32
|
leading: /* @__PURE__ */ jsx(PipelineRunStatusSwatch, { status })
|
|
36
33
|
}));
|
|
37
|
-
var
|
|
34
|
+
var OBSERVABILITY_RUNS_UPCOMING_STATUS_OPTIONS = [{
|
|
38
35
|
...OBSERVABILITY_RUNS_SCHEDULED_STATUS_OPTION,
|
|
39
36
|
leading: /* @__PURE__ */ jsx(PipelineRunStatusSwatch, { status: RunStatus.SCHEDULED })
|
|
40
37
|
}];
|
|
41
38
|
var OBSERVABILITY_RUNS_ALL_STATUSES_LABEL = "All statuses";
|
|
42
|
-
var OBSERVABILITY_RUNS_NO_STATUSES_PLACEHOLDER = "No statuses selected";
|
|
43
39
|
var OBSERVABILITY_RUNS_DEFAULT_STATUSES = [
|
|
44
40
|
RunStatus.COMPLETED,
|
|
45
41
|
RunStatus.FAILED,
|
|
@@ -51,4 +47,4 @@ var OBSERVABILITY_RUNS_SCHEDULED_INPUT = create(ListRunsRequestSchema, {
|
|
|
51
47
|
pagination: { pageSize: 1e3 }
|
|
52
48
|
});
|
|
53
49
|
//#endregion
|
|
54
|
-
export { OBSERVABILITY_RUNS_ALL_STATUSES_LABEL,
|
|
50
|
+
export { OBSERVABILITY_RUNS_ALL_STATUSES_LABEL, OBSERVABILITY_RUNS_DEFAULT_STATUSES, OBSERVABILITY_RUNS_EMPTY_STATE_TEXT_MAP, OBSERVABILITY_RUNS_SCHEDULED_INPUT, OBSERVABILITY_RUNS_SCHEDULED_STATUS_OPTION, OBSERVABILITY_RUNS_STATUS_OPTIONS, OBSERVABILITY_RUNS_UPCOMING_STATUS_OPTIONS, OBSERVABILITY_RUNS_VIEW_OPTIONS, OBSERVABILITY_RUNS_VIEW_TO_LABEL_MAP, OBSERVABILITY_RUNS_VIEW_TO_TABLE_HEADER_MAP };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { FilamentPath, createFilamentHref } from "../../../../module/paths.js";
|
|
2
|
+
import { RunStatus } from "../../../../gen/ingestion/v1/runs_pb.js";
|
|
3
|
+
import PipelineRunStatusSwatch from "../../../../components/runs/PipelineRunStatusSwatch.js";
|
|
4
|
+
import { OBSERVABILITY_RUNS_SCHEDULED_INPUT } from "../runs/constants.js";
|
|
5
|
+
import RouterLink from "../../../../components/RouterLink.js";
|
|
6
|
+
import { formatTimestamp } from "../../../../utils/format.js";
|
|
7
|
+
import { useListRunsQuery } from "../../../../api/queries/runs.js";
|
|
8
|
+
import PipelineName from "../../../../components/pipelines/PipelineName.js";
|
|
9
|
+
import { useObservabilityPipelines } from "../../hooks/useObservabilityPipelines.js";
|
|
10
|
+
import ObservabilityWidgetEmpty from "../ObservabilityWidgetEmpty.js";
|
|
11
|
+
/* empty css */
|
|
12
|
+
import { CalendarIcon } from "@phosphor-icons/react";
|
|
13
|
+
import { useMemo } from "react";
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { formatRelativeTime } from "@galaxy-io/dls/utils/format";
|
|
16
|
+
import Box, { BoxVariant } from "@galaxy-io/dls/layout/Box";
|
|
17
|
+
import Skeleton, { SkeletonSize } from "@galaxy-io/dls/feedback/Skeleton";
|
|
18
|
+
import Text, { TextSize, TextVariant } from "@galaxy-io/dls/text/Text";
|
|
19
|
+
import Widget from "@galaxy-io/dls/widget/Widget";
|
|
20
|
+
import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
21
|
+
import { styled } from "@linaria/react";
|
|
22
|
+
import ScrollArea from "@galaxy-io/dls/layout/ScrollArea";
|
|
23
|
+
import Tooltip from "@galaxy-io/dls/tooltip/Tooltip";
|
|
24
|
+
//#region src/pages/observability/components/scheduled/ObservabilityScheduledWidget.tsx
|
|
25
|
+
var _exp = () => RouterLink;
|
|
26
|
+
var ObservabilityScheduledRow = /*#__PURE__*/ styled(_exp())({
|
|
27
|
+
name: "ObservabilityScheduledRow",
|
|
28
|
+
class: "filament-ObservabilityScheduledWidget-ObservabilityScheduledRow-o1x8wt7j",
|
|
29
|
+
propsAsIs: true
|
|
30
|
+
});
|
|
31
|
+
var ObservabilityScheduledWidget = () => {
|
|
32
|
+
const { pipelinesById } = useObservabilityPipelines();
|
|
33
|
+
const { data, isLoading } = useListRunsQuery({ input: OBSERVABILITY_RUNS_SCHEDULED_INPUT });
|
|
34
|
+
const runs = useMemo(() => {
|
|
35
|
+
const pipelineIds = /* @__PURE__ */ new Set();
|
|
36
|
+
return (data?.runs ?? []).filter((run) => {
|
|
37
|
+
if (pipelineIds.has(run.pipelineId)) return false;
|
|
38
|
+
pipelineIds.add(run.pipelineId);
|
|
39
|
+
return true;
|
|
40
|
+
});
|
|
41
|
+
}, [data]);
|
|
42
|
+
const renderRows = () => {
|
|
43
|
+
if (isLoading) return /* @__PURE__ */ jsx(Box, {
|
|
44
|
+
padding: 12,
|
|
45
|
+
children: /* @__PURE__ */ jsx(Skeleton, { size: SkeletonSize.SMALL })
|
|
46
|
+
});
|
|
47
|
+
return runs.map((run) => /* @__PURE__ */ jsxs(ObservabilityScheduledRow, {
|
|
48
|
+
href: createFilamentHref(FilamentPath.PIPELINE, { id: run.pipelineId }),
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsx(PipelineRunStatusSwatch, { status: RunStatus.SCHEDULED }),
|
|
51
|
+
/* @__PURE__ */ jsx(FlexItem, {
|
|
52
|
+
grow: 1,
|
|
53
|
+
minWidth: 0,
|
|
54
|
+
children: /* @__PURE__ */ jsx(PipelineName, {
|
|
55
|
+
pipelineId: run.pipelineId,
|
|
56
|
+
pipeline: pipelinesById.get(run.pipelineId)
|
|
57
|
+
})
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ jsx(FlexItem, {
|
|
60
|
+
shrink: 0,
|
|
61
|
+
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
62
|
+
body: formatTimestamp(run.scheduledAt),
|
|
63
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
64
|
+
size: TextSize.BODY_SM,
|
|
65
|
+
variant: TextVariant.TERTIARY,
|
|
66
|
+
children: formatRelativeTime(run.scheduledAt)
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
}, run.id));
|
|
72
|
+
};
|
|
73
|
+
return /* @__PURE__ */ jsx(Widget, {
|
|
74
|
+
header: "Scheduled",
|
|
75
|
+
icon: CalendarIcon,
|
|
76
|
+
isFlush: true,
|
|
77
|
+
gap: 0,
|
|
78
|
+
children: /* @__PURE__ */ jsx(FlexItem, {
|
|
79
|
+
grow: 1,
|
|
80
|
+
basis: 0,
|
|
81
|
+
minHeight: 0,
|
|
82
|
+
children: !isLoading && runs.length === 0 ? /* @__PURE__ */ jsx(ObservabilityWidgetEmpty, {
|
|
83
|
+
icon: CalendarIcon,
|
|
84
|
+
header: "No scheduled runs"
|
|
85
|
+
}) : /* @__PURE__ */ jsx(ScrollArea, { children: /* @__PURE__ */ jsx(Box, {
|
|
86
|
+
variant: BoxVariant.PRIMARY,
|
|
87
|
+
fillWidth: true,
|
|
88
|
+
children: renderRows()
|
|
89
|
+
}) })
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
//#endregion
|
|
94
|
+
export { ObservabilityScheduledWidget as default };
|