@galaxy-io/filament-ui 0.7.0 → 0.9.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/connectors.d.ts +2 -0
- package/dist/api/queries/connectors.js +9 -2
- package/dist/api/queries/pipeline_versions.d.ts +5 -0
- package/dist/api/queries/runs.d.ts +2 -0
- package/dist/api/queries/version.d.ts +6 -0
- package/dist/api/queries/version.js +11 -0
- package/dist/components/BaseHeader.d.ts +2 -0
- package/dist/components/BaseHeader.js +3 -2
- package/dist/components/connections/constants.js +1 -1
- package/dist/components/fields/Field.js +31 -27
- package/dist/components/fields/utils.js +2 -1
- package/dist/components/pipelines/PipelineName.js +1 -1
- package/dist/components/runs/PipelineRunRecords.js +1 -1
- package/dist/components/runs/PipelineRunVolume.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/pipelines_pb.d.ts +26 -0
- package/dist/gen/ingestion/v1/pipelines_pb.js +17 -12
- package/dist/gen/ingestion/v1/runs_pb.d.ts +23 -0
- package/dist/gen/ingestion/v1/runs_pb.js +1 -1
- package/dist/gen/ingestion/v1/service_pb.d.ts +11 -0
- package/dist/gen/ingestion/v1/service_pb.js +5 -3
- package/dist/gen/ingestion/v1/version_pb.d.ts +37 -0
- package/dist/gen/ingestion/v1/version_pb.js +8 -0
- package/dist/layouts/main/MainLayoutSidebar.js +7 -1
- package/dist/module/FilamentLayout.js +8 -2
- package/dist/module/commands.js +1 -1
- package/dist/module/hooks.d.ts +4 -3
- package/dist/module/hooks.js +3 -2
- package/dist/module/routes.d.ts +1 -0
- package/dist/module/schemas.d.ts +1 -0
- package/dist/module/schemas.js +1 -0
- package/dist/module/types.d.ts +2 -1
- package/dist/module/types.js +1 -0
- package/dist/pages/connections/ConnectionsPage.js +1 -1
- package/dist/pages/connections/components/card/ConnectionCard.js +2 -2
- package/dist/pages/connections/components/create/select/CreateConnectionSelector.js +21 -7
- package/dist/pages/connections/components/create/select/CreateConnectionSelectorBody.d.ts +5 -3
- package/dist/pages/connections/components/create/select/CreateConnectionSelectorBody.js +50 -140
- package/dist/pages/connections/components/create/select/CreateConnectionSelectorSidebar.d.ts +12 -0
- package/dist/pages/connections/components/create/select/CreateConnectionSelectorSidebar.js +54 -0
- package/dist/pages/connections/components/create/select/hooks/useCreateConnectionSelectorCatalog.d.ts +11 -0
- package/dist/pages/connections/components/create/select/hooks/useCreateConnectionSelectorCatalog.js +45 -0
- package/dist/pages/connections/components/drawer/ConnectionDrawer.js +1 -1
- package/dist/pages/connections/components/drawer/ConnectionDrawerJsonSection.js +2 -10
- package/dist/pages/connections/components/edit/EditConnectionModal.js +0 -3
- package/dist/pages/connections/components/form/ConnectionForm.js +0 -4
- package/dist/pages/connections/components/form/ConnectionFormWrapper.d.ts +0 -2
- package/dist/pages/connections/components/form/ConnectionFormWrapper.js +1 -2
- package/dist/pages/connections/constants.d.ts +0 -1
- package/dist/pages/connections/hooks/useConnectionPipelines.js +1 -1
- package/dist/pages/observability/components/metrics/ObservabilityMetricsWidget.js +1 -1
- package/dist/pages/observability/components/runs/ObservabilityRunsPastTable.js +2 -2
- package/dist/pages/observability/components/runs/ObservabilityRunsUpcomingTable.js +1 -1
- package/dist/pages/observability/components/setup/ObservabilitySetupChecklist.js +1 -1
- package/dist/pages/observability/components/setup/constants.js +1 -1
- package/dist/pages/pipelines/PipelineHistoryPage.js +1 -1
- package/dist/pages/pipelines/canvas/PipelineCanvasConnectionSelectorEmpty.js +1 -1
- package/dist/pages/pipelines/canvas/PipelineCanvasFlow.js +5 -7
- package/dist/pages/pipelines/canvas/PipelineCanvasViewSwitcher.d.ts +4 -1
- package/dist/pages/pipelines/canvas/PipelineCanvasViewSwitcher.js +9 -6
- package/dist/pages/pipelines/canvas/constants.d.ts +4 -1
- package/dist/pages/pipelines/canvas/constants.js +3 -5
- package/dist/pages/pipelines/canvas/graph/diff.js +4 -1
- package/dist/pages/pipelines/canvas/graph/serialize.js +1 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasActiveRuns.d.ts +2 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasActiveRuns.js +11 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasEdgeConfig.js +5 -2
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasEdgeResources.d.ts +1 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasEdgeResources.js +1 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasIsConnectionRunning.d.ts +2 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasIsConnectionRunning.js +5 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasIsRunning.js +2 -7
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasPanelResourceOptions.d.ts +1 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasPanelResourceOptions.js +2 -1
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasRunningEdgeIds.d.ts +2 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasRunningEdgeIds.js +18 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasSelectionReveal.js +43 -6
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNode.d.ts +1 -0
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNode.js +4 -2
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeIsland.d.ts +1 -0
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeIsland.js +3 -4
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSink.js +3 -0
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSource.js +5 -1
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSourceIsland.d.ts +1 -0
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSourceIsland.js +2 -1
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSourceIslandTableList.js +11 -3
- package/dist/pages/pipelines/canvas/nodes/constants.d.ts +0 -1
- package/dist/pages/pipelines/canvas/nodes/utils.d.ts +2 -0
- package/dist/pages/pipelines/canvas/nodes/utils.js +9 -1
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelHeader.js +2 -0
- package/dist/pages/pipelines/canvas/panel/activity/PipelineCanvasPanelActivityHeader.js +53 -26
- package/dist/pages/pipelines/canvas/panel/activity/constants.d.ts +1 -0
- package/dist/pages/pipelines/canvas/panel/constants.d.ts +1 -0
- package/dist/pages/pipelines/canvas/panel/constants.js +3 -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/PipelineCanvasPanelResourceColumnsSection.d.ts +12 -0
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceColumnsSection.js +37 -0
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceDetail.js +58 -14
- package/dist/pages/pipelines/canvas/panel/overview/resource/transform/PipelineCanvasPanelResourceTransformSection.js +1 -1
- package/dist/pages/pipelines/canvas/panel/overview/resource/transform/PipelineCanvasPanelResourceTransformSectionPending.js +1 -0
- package/dist/pages/pipelines/canvas/providers/canvas/PipelineCanvasProvider.d.ts +2 -1
- package/dist/pages/pipelines/canvas/providers/canvas/PipelineCanvasProvider.js +8 -0
- package/dist/pages/pipelines/canvas/providers/canvas/actions.d.ts +12 -3
- package/dist/pages/pipelines/canvas/providers/canvas/actions.js +1 -0
- package/dist/pages/pipelines/canvas/providers/canvas/reducer.js +27 -0
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesDraftRow.js +8 -10
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesIsland.d.ts +1 -0
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesIsland.js +8 -5
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesList.js +4 -3
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesRow.js +11 -11
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesSinkIsland.js +1 -0
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesSourceIsland.js +2 -1
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesToolbar.js +39 -17
- package/dist/pages/pipelines/canvas/routes/constants.d.ts +10 -2
- package/dist/pages/pipelines/canvas/types.d.ts +1 -0
- package/dist/pages/pipelines/canvas/utils.d.ts +5 -1
- package/dist/pages/pipelines/canvas/utils.js +13 -3
- package/dist/pages/pipelines/components/create/CreatePipelineModal.js +31 -29
- package/dist/pages/pipelines/components/create/CreatePipelineModalProvider.d.ts +2 -1
- package/dist/pages/pipelines/components/create/CreatePipelineModalProvider.js +4 -0
- package/dist/pages/pipelines/components/create/actions.d.ts +10 -1
- package/dist/pages/pipelines/components/create/actions.js +1 -0
- package/dist/pages/pipelines/components/create/components/CreatePipelineModalSidebar.js +39 -49
- package/dist/pages/pipelines/components/create/constants.d.ts +5 -1
- package/dist/pages/pipelines/components/create/constants.js +2 -2
- package/dist/pages/pipelines/components/create/hooks/useCreatePipelineResources.d.ts +3 -1
- package/dist/pages/pipelines/components/create/hooks/useCreatePipelineResources.js +17 -6
- package/dist/pages/pipelines/components/create/reducer.js +16 -0
- package/dist/pages/pipelines/components/create/rows.js +18 -2
- package/dist/pages/pipelines/components/create/serialize.js +8 -1
- package/dist/pages/pipelines/components/create/steps/CreatePipelineModalResources.d.ts +6 -1
- package/dist/pages/pipelines/components/create/steps/CreatePipelineModalResources.js +6 -2
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalConnectionsState.js +1 -1
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesColumnsPane.d.ts +8 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesColumnsPane.js +83 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesColumnsPaneFooter.d.ts +7 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesColumnsPaneFooter.js +50 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesCursorCell.js +1 -1
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesReadModeCell.js +1 -1
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesTable.d.ts +2 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesTable.js +50 -12
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesWriteModeCell.js +1 -1
- package/dist/pages/pipelines/components/create/types.d.ts +5 -0
- package/dist/pages/pipelines/components/create/utils.js +1 -1
- package/dist/pages/pipelines/components/header/PipelinePageEditActions.js +6 -2
- package/dist/pages/pipelines/components/header/PipelinePageHeading.js +1 -1
- package/dist/pages/pipelines/components/header/PipelinePagePreviewBanner.js +2 -1
- package/dist/pages/pipelines/components/header/PipelinePageRunActions.js +5 -16
- package/dist/pages/pipelines/components/header/PipelinePageRunButton.d.ts +1 -4
- package/dist/pages/pipelines/components/header/PipelinePageRunButton.js +15 -89
- package/dist/pages/pipelines/components/header/PipelinePageScheduleBanner.js +1 -1
- package/dist/pages/pipelines/components/header/constants.d.ts +0 -1
- package/dist/pages/pipelines/components/resource/PipelineResourceColumnsChip.d.ts +8 -0
- package/dist/pages/pipelines/components/resource/PipelineResourceColumnsChip.js +14 -0
- package/dist/pages/pipelines/components/resource/PipelineResourceColumnsTable.d.ts +12 -0
- package/dist/pages/pipelines/components/resource/PipelineResourceColumnsTable.js +75 -0
- package/dist/pages/pipelines/components/resource/constants.d.ts +3 -0
- package/dist/pages/pipelines/components/resource/types.d.ts +2 -1
- package/dist/pages/pipelines/components/resource/types.js +1 -0
- package/dist/pages/pipelines/components/resource/utils.d.ts +17 -0
- package/dist/pages/pipelines/components/resource/utils.js +18 -1
- package/dist/pages/pipelines/components/run/PipelineRunModal.d.ts +9 -0
- package/dist/pages/pipelines/components/run/PipelineRunModal.js +245 -0
- package/dist/pages/pipelines/components/run/PipelineRunModalResourcesPane.d.ts +13 -0
- package/dist/pages/pipelines/components/run/PipelineRunModalResourcesPane.js +120 -0
- package/dist/pages/pipelines/components/run/PipelineRunModalSectionChip.d.ts +6 -0
- package/dist/pages/pipelines/components/run/PipelineRunModalSectionChip.js +14 -0
- package/dist/pages/pipelines/components/run/constants.d.ts +9 -0
- package/dist/pages/pipelines/components/run/constants.js +11 -0
- package/dist/pages/pipelines/components/run/types.d.ts +4 -0
- package/dist/pages/pipelines/components/run/types.js +8 -0
- package/dist/pages/pipelines/components/run/utils.d.ts +5 -0
- package/dist/pages/pipelines/components/run/utils.js +7 -0
- package/dist/pages/pipelines/components/table/PipelinesTable.js +2 -2
- package/dist/pages/pipelines/components/table/columns/PipelinesTableColumnRecentRuns.js +1 -1
- package/dist/pages/pipelines/components/table/columns/PipelinesTableColumnRecentRunsTooltip.js +2 -2
- package/dist/pages/pipelines/history/PipelineHistoryRunContinuousSummary.js +1 -1
- package/dist/pages/pipelines/history/PipelineHistoryRunInfo.js +2 -3
- package/dist/pages/pipelines/history/components/PipelineHistoryRunInfoConnectionColumn.js +1 -1
- package/dist/pages/pipelines/hooks/usePipelineRun.d.ts +3 -1
- package/dist/pages/pipelines/hooks/usePipelineRun.js +3 -1
- package/dist/pages/pipelines/utils.d.ts +1 -0
- package/dist/pages/pipelines/utils.js +2 -1
- package/dist/styles.css +6 -5
- package/dist/utils/format.d.ts +1 -0
- package/dist/utils/format.js +2 -1
- package/package.json +3 -3
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSourceIslandTableShimmer.d.ts +0 -3
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSourceIslandTableShimmer.js +0 -10
package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesTable.js
CHANGED
|
@@ -2,13 +2,15 @@ import { useCreatePipelineModalActions, useCreatePipelineModalState } from "../.
|
|
|
2
2
|
import CreatePipelineModalResourcesCursorCell from "./CreatePipelineModalResourcesCursorCell.js";
|
|
3
3
|
import CreatePipelineModalResourcesReadModeCell from "./CreatePipelineModalResourcesReadModeCell.js";
|
|
4
4
|
import CreatePipelineModalResourcesWriteModeCell from "./CreatePipelineModalResourcesWriteModeCell.js";
|
|
5
|
-
import
|
|
5
|
+
import PipelineResourceColumnsChip from "../../../resource/PipelineResourceColumnsChip.js";
|
|
6
|
+
import { CaretRightIcon, MagnifyingGlassIcon } from "@phosphor-icons/react";
|
|
6
7
|
import { useMemo } from "react";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import Flex, { AlignItems, FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
9
10
|
import Box, { BoxVariant } from "@galaxy-io/dls/layout/Box";
|
|
10
11
|
import Text, { TextSize } from "@galaxy-io/dls/text/Text";
|
|
11
12
|
import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
13
|
+
import Icon, { IconVariant } from "@galaxy-io/dls/icons/Icon";
|
|
12
14
|
import { FontFamily, Side } from "@galaxy-io/dls/theme/enums";
|
|
13
15
|
import EmptyLayout from "@galaxy-io/dls/layout/EmptyLayout";
|
|
14
16
|
import InfiniteTable from "@galaxy-io/dls/table/InfiniteTable";
|
|
@@ -19,17 +21,43 @@ var NAME_COLUMN = {
|
|
|
19
21
|
accessor: (row) => row.displayName,
|
|
20
22
|
canSort: true,
|
|
21
23
|
isRowHeader: true,
|
|
22
|
-
cell: ({ row }) => /* @__PURE__ */
|
|
24
|
+
cell: ({ row }) => /* @__PURE__ */ jsxs(Flex, {
|
|
25
|
+
alignItems: AlignItems.CENTER,
|
|
26
|
+
gap: 8,
|
|
23
27
|
minWidth: 0,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
children: [/* @__PURE__ */ jsx(FlexItem, {
|
|
29
|
+
minWidth: 0,
|
|
30
|
+
overflow: "hidden",
|
|
31
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
32
|
+
size: TextSize.BODY_SM,
|
|
33
|
+
family: FontFamily.MONO,
|
|
34
|
+
lineClamp: 1,
|
|
35
|
+
children: row.displayName
|
|
36
|
+
})
|
|
37
|
+
}), row.isColumnSelectable && row.selectedColumns.length !== row.columns.length && /* @__PURE__ */ jsx(FlexItem, {
|
|
38
|
+
shrink: 0,
|
|
39
|
+
children: /* @__PURE__ */ jsx(PipelineResourceColumnsChip, {
|
|
40
|
+
selectedCount: row.selectedColumns.length,
|
|
41
|
+
totalCount: row.columns.length
|
|
42
|
+
})
|
|
43
|
+
})]
|
|
31
44
|
})
|
|
32
45
|
};
|
|
46
|
+
var OPEN_COLUMN = {
|
|
47
|
+
id: "open",
|
|
48
|
+
header: "",
|
|
49
|
+
width: 36,
|
|
50
|
+
align: "right",
|
|
51
|
+
cell: ({ row }) => row.isColumnSelectable ? /* @__PURE__ */ jsx(Icon, {
|
|
52
|
+
component: CaretRightIcon,
|
|
53
|
+
size: 12,
|
|
54
|
+
variant: IconVariant.TERTIARY
|
|
55
|
+
}) : null
|
|
56
|
+
};
|
|
57
|
+
var OPEN_COLUMN_PINNED = {
|
|
58
|
+
...OPEN_COLUMN,
|
|
59
|
+
pin: Side.RIGHT
|
|
60
|
+
};
|
|
33
61
|
var RESOURCE_COLUMNS_BASE = [NAME_COLUMN];
|
|
34
62
|
var RESOURCE_COLUMNS_WITH_LEVERS = [
|
|
35
63
|
NAME_COLUMN,
|
|
@@ -55,7 +83,7 @@ var RESOURCE_COLUMNS_WITH_LEVERS = [
|
|
|
55
83
|
cell: ({ row }) => /* @__PURE__ */ jsx(CreatePipelineModalResourcesWriteModeCell, { row })
|
|
56
84
|
}
|
|
57
85
|
];
|
|
58
|
-
var CreatePipelineModalResourcesTable = ({ rows }) => {
|
|
86
|
+
var CreatePipelineModalResourcesTable = ({ rows, activeRow, onActiveResourceChange }) => {
|
|
59
87
|
const { activeSinkId, hasReadLevers, isLoading } = useCreatePipelineModalState();
|
|
60
88
|
const { setResourceSelection } = useCreatePipelineModalActions();
|
|
61
89
|
const selectedNames = useMemo(() => rows.filter((row) => row.isSelected).map((row) => row.name), [rows]);
|
|
@@ -64,7 +92,15 @@ var CreatePipelineModalResourcesTable = ({ rows }) => {
|
|
|
64
92
|
visibleNames: rows.map((row) => row.name),
|
|
65
93
|
selection: Object.fromEntries(names.map((name) => [name, true]))
|
|
66
94
|
});
|
|
67
|
-
const
|
|
95
|
+
const handleRowClick = (row) => {
|
|
96
|
+
if (!row.isColumnSelectable) return;
|
|
97
|
+
onActiveResourceChange(row.name === activeRow?.name ? void 0 : row.name);
|
|
98
|
+
};
|
|
99
|
+
const hasColumnSelection = rows.some((row) => row.isColumnSelectable);
|
|
100
|
+
const columns = useMemo(() => {
|
|
101
|
+
if (!hasColumnSelection) return hasReadLevers ? RESOURCE_COLUMNS_WITH_LEVERS : RESOURCE_COLUMNS_BASE;
|
|
102
|
+
return hasReadLevers ? [...RESOURCE_COLUMNS_WITH_LEVERS, OPEN_COLUMN_PINNED] : [...RESOURCE_COLUMNS_BASE, OPEN_COLUMN];
|
|
103
|
+
}, [hasReadLevers, hasColumnSelection]);
|
|
68
104
|
return /* @__PURE__ */ jsx(FlexItem, {
|
|
69
105
|
grow: 1,
|
|
70
106
|
basis: 0,
|
|
@@ -81,6 +117,8 @@ var CreatePipelineModalResourcesTable = ({ rows }) => {
|
|
|
81
117
|
isLoading,
|
|
82
118
|
value: selectedNames,
|
|
83
119
|
onChange: handleSelectionChange,
|
|
120
|
+
onRowClick: hasColumnSelection ? handleRowClick : void 0,
|
|
121
|
+
activeRowId: activeRow?.name ?? null,
|
|
84
122
|
emptyState: /* @__PURE__ */ jsx(Flex, {
|
|
85
123
|
direction: FlexDirection.COLUMN,
|
|
86
124
|
alignItems: AlignItems.CENTER,
|
|
@@ -25,7 +25,7 @@ var CreatePipelineModalResourcesWriteModeCell = ({ row }) => {
|
|
|
25
25
|
options,
|
|
26
26
|
value: getEnumSelectValue(WriteMode, row.writeMode),
|
|
27
27
|
onChange: handleWriteModeChange,
|
|
28
|
-
variant: SelectInputVariant.
|
|
28
|
+
variant: SelectInputVariant.BASE,
|
|
29
29
|
isDisabled: !row.isSelected,
|
|
30
30
|
ariaLabel: `Write mode for ${row.displayName}`,
|
|
31
31
|
fillWidth: true
|
|
@@ -22,6 +22,7 @@ export interface CreatePipelineModalState {
|
|
|
22
22
|
resourceSelection: Record<Connection["id"], Record<Resource["name"], boolean>>;
|
|
23
23
|
resourceReadModes: Record<Connection["id"], Record<Resource["name"], ReadMode>>;
|
|
24
24
|
resourceCursors: Record<Connection["id"], Record<Resource["name"], ResourceColumn["name"]>>;
|
|
25
|
+
resourceColumns: Record<Connection["id"], Record<Resource["name"], ResourceColumn["name"][]>>;
|
|
25
26
|
resourceWriteModes: Record<Connection["id"], Record<Resource["name"], WriteMode>>;
|
|
26
27
|
sinkWriteModes: Record<Connection["id"], WriteMode>;
|
|
27
28
|
nodeConfigs: Record<Connection["id"], PipelineNodeConfig>;
|
|
@@ -45,6 +46,10 @@ export interface CreatePipelineModalResourceRow {
|
|
|
45
46
|
cursorField: ResourceColumn["name"];
|
|
46
47
|
cursorOptions: ResourceColumn[];
|
|
47
48
|
managedIncremental: boolean;
|
|
49
|
+
columns: ResourceColumn[];
|
|
50
|
+
selectedColumns: ResourceColumn["name"][];
|
|
51
|
+
lockedColumns: ResourceColumn["name"][];
|
|
52
|
+
isColumnSelectable: boolean;
|
|
48
53
|
status?: PipelineResourceStatus;
|
|
49
54
|
}
|
|
50
55
|
export interface CreatePipelineModalSinkRow {
|
|
@@ -14,6 +14,7 @@ var createInitialCreatePipelineModalState = () => ({
|
|
|
14
14
|
resourceSelection: {},
|
|
15
15
|
resourceReadModes: {},
|
|
16
16
|
resourceCursors: {},
|
|
17
|
+
resourceColumns: {},
|
|
17
18
|
resourceWriteModes: {},
|
|
18
19
|
sinkWriteModes: {},
|
|
19
20
|
nodeConfigs: {},
|
|
@@ -22,7 +23,6 @@ var createInitialCreatePipelineModalState = () => ({
|
|
|
22
23
|
description: "",
|
|
23
24
|
schedule: {
|
|
24
25
|
...PIPELINE_SCHEDULE_DEFAULT_STATE,
|
|
25
|
-
isEnabled: true,
|
|
26
26
|
cron: CREATE_PIPELINE_MODAL_DEFAULT_CRON
|
|
27
27
|
},
|
|
28
28
|
notifiers: [],
|
|
@@ -3,6 +3,7 @@ import { usePipelineParams } from "../../../../module/hooks.js";
|
|
|
3
3
|
import { getErrorMessage } from "../../../../utils/errors.js";
|
|
4
4
|
import { createGetPipelineInput, useSuspenseGetPipelineQuery } from "../../../../api/queries/pipelines.js";
|
|
5
5
|
import { useCreatePipelineVersionMutation } from "../../../../api/queries/pipeline_versions.js";
|
|
6
|
+
import { isConnectionNode } from "../../canvas/utils.js";
|
|
6
7
|
import { mapCanvasStateToVersionRequest, mapPipelineVersionToCanvasState } from "../../canvas/graph/serialize.js";
|
|
7
8
|
import { usePipelineCanvasActions, usePipelineCanvasState } from "../../canvas/providers/canvas/PipelineCanvasProvider.js";
|
|
8
9
|
import { usePipelineCanvasValidation } from "../../canvas/hooks/usePipelineCanvasValidation.js";
|
|
@@ -24,7 +25,7 @@ var PipelinePageEditActions = () => {
|
|
|
24
25
|
const { toast } = useToast();
|
|
25
26
|
const { id } = usePipelineParams();
|
|
26
27
|
const state = usePipelineCanvasState();
|
|
27
|
-
const { loadGraph } = usePipelineCanvasActions();
|
|
28
|
+
const { loadGraph, settleGraph } = usePipelineCanvasActions();
|
|
28
29
|
const navigateCanvas = usePipelineCanvasNavigate();
|
|
29
30
|
const { data } = useSuspenseGetPipelineQuery({ input: createGetPipelineInput(id) });
|
|
30
31
|
const pipeline = data.pipeline;
|
|
@@ -47,8 +48,11 @@ var PipelinePageEditActions = () => {
|
|
|
47
48
|
});
|
|
48
49
|
};
|
|
49
50
|
const handleSave = () => {
|
|
51
|
+
const savedNodeConfigs = new Set(state.nodes.filter(isConnectionNode).flatMap((node) => node.data.config ? [node.data.config] : []));
|
|
52
|
+
const savedEdgeData = new Set(state.edges.flatMap((edge) => edge.data ? [edge.data] : []));
|
|
50
53
|
createPipelineVersion(mapCanvasStateToVersionRequest(state, id, currentVersion, pipeline.executionMode), {
|
|
51
|
-
onSuccess: () => {
|
|
54
|
+
onSuccess: ({ version }) => {
|
|
55
|
+
if (version) settleGraph(version, savedNodeConfigs, savedEdgeData);
|
|
52
56
|
toast({
|
|
53
57
|
header: "Pipeline saved",
|
|
54
58
|
variant: ToastVariant.SUCCESS
|
|
@@ -2,12 +2,12 @@ import { FilamentPath, createFilamentHref } from "../../../../module/paths.js";
|
|
|
2
2
|
import { usePipelineParams } from "../../../../module/hooks.js";
|
|
3
3
|
import RouterLink from "../../../../components/RouterLink.js";
|
|
4
4
|
import { UpdatePipelineRequestSchema } from "../../../../gen/ingestion/v1/pipelines_pb.js";
|
|
5
|
+
import { formatVersion } from "../../../../utils/format.js";
|
|
5
6
|
import { getErrorMessage } from "../../../../utils/errors.js";
|
|
6
7
|
import { getNameError, isNameValid } from "../../../../utils/validation.js";
|
|
7
8
|
import PipelineFlow from "../../../../components/pipelines/PipelineFlow.js";
|
|
8
9
|
import { PIPELINE_UNTITLED_NAME } from "../../../../components/pipelines/constants.js";
|
|
9
10
|
import { createGetPipelineInput, useSuspenseGetPipelineQuery, useUpdatePipelineMutation } from "../../../../api/queries/pipelines.js";
|
|
10
|
-
import { formatVersion } from "../../../../utils/format.js";
|
|
11
11
|
import { mapCanvasNodesToFlowEndpoints } from "../../canvas/utils.js";
|
|
12
12
|
import { usePipelineCanvasState } from "../../canvas/providers/canvas/PipelineCanvasProvider.js";
|
|
13
13
|
import { usePipelineCanvasNavigate } from "../../hooks/usePipelineCanvasNavigate.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { formatVersion } from "../../../../utils/format.js";
|
|
1
2
|
import { usePipelineCanvasNavigate } from "../../hooks/usePipelineCanvasNavigate.js";
|
|
2
3
|
import { usePipelinePreviewVersion } from "../../hooks/usePipelinePreviewVersion.js";
|
|
3
4
|
import { ArrowUUpLeftIcon } from "@phosphor-icons/react";
|
|
@@ -11,7 +12,7 @@ var PipelinePagePreviewBanner = () => {
|
|
|
11
12
|
return /* @__PURE__ */ jsx(Alert, {
|
|
12
13
|
isBanner: true,
|
|
13
14
|
variant: AlertVariant.WARNING,
|
|
14
|
-
header:
|
|
15
|
+
header: formatVersion(previewed?.version),
|
|
15
16
|
actions: /* @__PURE__ */ jsx(Button, {
|
|
16
17
|
label: "Back to latest",
|
|
17
18
|
icon: ArrowUUpLeftIcon,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ExecutionMode } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Flow } from "../../../../module/types.js";
|
|
3
|
+
import { useFilamentFlowOpen, usePipelineParams } from "../../../../module/hooks.js";
|
|
3
4
|
import { ValidatePipelineRequestSchema } from "../../../../gen/ingestion/v1/capabilities_pb.js";
|
|
4
5
|
import { getErrorMessage } from "../../../../utils/errors.js";
|
|
5
6
|
import { useValidatePipelineQuery } from "../../../../api/queries/capabilities.js";
|
|
@@ -7,9 +8,6 @@ import { isContinuousRunActive } from "../../../../utils/runs.js";
|
|
|
7
8
|
import { useSuspenseListActivePipelineRunsQuery } from "../../../../api/queries/runs.js";
|
|
8
9
|
import { createGetPipelineInput, useSuspenseGetPipelineQuery } from "../../../../api/queries/pipelines.js";
|
|
9
10
|
import { getPipelineValidationErrors, isPipelineRunnable } from "../../utils.js";
|
|
10
|
-
import { formatWorkerConfiguration } from "../worker/utils.js";
|
|
11
|
-
import { usePipelineRun } from "../../hooks/usePipelineRun.js";
|
|
12
|
-
import { usePipelineCanvasNavigate } from "../../hooks/usePipelineCanvasNavigate.js";
|
|
13
11
|
import PipelinePageActiveRunActions from "./PipelinePageActiveRunActions.js";
|
|
14
12
|
import PipelinePageRunButton from "./PipelinePageRunButton.js";
|
|
15
13
|
import { useMemo } from "react";
|
|
@@ -18,8 +16,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
18
16
|
//#region src/pages/pipelines/components/header/PipelinePageRunActions.tsx
|
|
19
17
|
var PipelinePageRunActions = () => {
|
|
20
18
|
const { id } = usePipelineParams();
|
|
21
|
-
const
|
|
22
|
-
const { startRun, isRunning } = usePipelineRun();
|
|
19
|
+
const openFlow = useFilamentFlowOpen();
|
|
23
20
|
const { data } = useSuspenseGetPipelineQuery({ input: createGetPipelineInput(id) });
|
|
24
21
|
const pipeline = data.pipeline;
|
|
25
22
|
const currentVersion = pipeline?.currentVersion;
|
|
@@ -34,19 +31,11 @@ var PipelinePageRunActions = () => {
|
|
|
34
31
|
const runErrors = useMemo(() => validationError ? [getErrorMessage(validationError, "Failed to validate pipeline")] : getPipelineValidationErrors(validation), [validation, validationError]);
|
|
35
32
|
if (!pipeline) return null;
|
|
36
33
|
if (activeRun) return /* @__PURE__ */ jsx(PipelinePageActiveRunActions, { run: activeRun });
|
|
37
|
-
const handleRun = (workerConfiguration) => {
|
|
38
|
-
startRun(pipeline, {
|
|
39
|
-
workerConfiguration,
|
|
40
|
-
onSuccess: () => navigateCanvas({})
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
34
|
return /* @__PURE__ */ jsx(PipelinePageRunButton, {
|
|
44
|
-
workerConfiguration: pipeline.workerConfiguration,
|
|
45
35
|
runErrors,
|
|
46
36
|
isRunnable: isPipelineRunnable(currentVersion),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, formatWorkerConfiguration(pipeline.workerConfiguration));
|
|
37
|
+
onClick: () => openFlow(Flow.RUN_PIPELINE, { pipelineId: pipeline.id })
|
|
38
|
+
});
|
|
50
39
|
};
|
|
51
40
|
//#endregion
|
|
52
41
|
export { PipelinePageRunActions as default };
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { WorkerConfiguration } from '../../../../gen/ingestion/v1/common_pb';
|
|
3
2
|
interface PipelinePageRunButtonProps {
|
|
4
|
-
workerConfiguration?: WorkerConfiguration;
|
|
5
3
|
runErrors: string[];
|
|
6
4
|
isRunnable: boolean;
|
|
7
|
-
|
|
8
|
-
onRun: (workerConfiguration?: WorkerConfiguration) => void;
|
|
5
|
+
onClick: () => void;
|
|
9
6
|
}
|
|
10
7
|
declare const PipelinePageRunButton: FC<PipelinePageRunButtonProps>;
|
|
11
8
|
export default PipelinePageRunButton;
|
|
@@ -1,94 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { PlayIcon, WarningIcon } from "@phosphor-icons/react";
|
|
5
|
-
import Button, { ButtonSize, ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
6
|
-
import { useState } from "react";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import Flex, { AlignItems, FlexDirection, JustifyContent } from "@galaxy-io/dls/layout/Flex";
|
|
9
|
-
import Box, { BoxVariant } from "@galaxy-io/dls/layout/Box";
|
|
10
|
-
import Chip, { ChipVariant } from "@galaxy-io/dls/chips/Chip";
|
|
11
|
-
import Widget from "@galaxy-io/dls/widget/Widget";
|
|
1
|
+
import { PlayIcon } from "@phosphor-icons/react";
|
|
2
|
+
import Button, { ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
4
|
import { IconWeight } from "@galaxy-io/dls/icons/Icon";
|
|
13
|
-
import Divider from "@galaxy-io/dls/layout/Divider";
|
|
14
5
|
import BulletedList, { BulletedListSize } from "@galaxy-io/dls/lists/BulletedList";
|
|
15
6
|
//#region src/pages/pipelines/components/header/PipelinePageRunButton.tsx
|
|
16
|
-
var PipelinePageRunButton = ({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
size: BulletedListSize.SMALL
|
|
29
|
-
}) : "",
|
|
30
|
-
onClick: () => onRun(),
|
|
31
|
-
dropdown: ({ close }) => /* @__PURE__ */ jsxs(Box, {
|
|
32
|
-
variant: BoxVariant.PRIMARY,
|
|
33
|
-
width: 500,
|
|
34
|
-
children: [
|
|
35
|
-
/* @__PURE__ */ jsx(Flex, {
|
|
36
|
-
alignItems: AlignItems.START,
|
|
37
|
-
padding: 12,
|
|
38
|
-
children: /* @__PURE__ */ jsx(BaseHeader, {
|
|
39
|
-
title: "Custom run configuration",
|
|
40
|
-
size: BaseHeaderSize.SMALL
|
|
41
|
-
})
|
|
42
|
-
}),
|
|
43
|
-
/* @__PURE__ */ jsx(Divider, {}),
|
|
44
|
-
/* @__PURE__ */ jsx(Flex, {
|
|
45
|
-
alignItems: AlignItems.STRETCH,
|
|
46
|
-
direction: FlexDirection.COLUMN,
|
|
47
|
-
gap: 12,
|
|
48
|
-
padding: 12,
|
|
49
|
-
children: /* @__PURE__ */ jsx(Widget, {
|
|
50
|
-
isCollapsible: true,
|
|
51
|
-
header: "Worker configuration",
|
|
52
|
-
defaultIsOpen: true,
|
|
53
|
-
children: /* @__PURE__ */ jsx(PipelineWorkerConfigurationEditor, {
|
|
54
|
-
value: state.workerConfiguration,
|
|
55
|
-
onChange: (value) => setState((prev) => ({
|
|
56
|
-
...prev,
|
|
57
|
-
workerConfiguration: value
|
|
58
|
-
})),
|
|
59
|
-
isPerRun: true
|
|
60
|
-
})
|
|
61
|
-
})
|
|
62
|
-
}),
|
|
63
|
-
/* @__PURE__ */ jsx(Divider, {}),
|
|
64
|
-
/* @__PURE__ */ jsxs(Flex, {
|
|
65
|
-
alignItems: AlignItems.CENTER,
|
|
66
|
-
justifyContent: JustifyContent.END,
|
|
67
|
-
gap: 8,
|
|
68
|
-
fillWidth: true,
|
|
69
|
-
padding: [8, 12],
|
|
70
|
-
children: [parsed.error && /* @__PURE__ */ jsx(Chip, {
|
|
71
|
-
label: "Invalid",
|
|
72
|
-
icon: WarningIcon,
|
|
73
|
-
variant: ChipVariant.ERROR,
|
|
74
|
-
tooltip: parsed.error
|
|
75
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
76
|
-
label: "Run custom",
|
|
77
|
-
icon: PlayIcon,
|
|
78
|
-
iconWeight: IconWeight.FILL,
|
|
79
|
-
variant: ButtonVariant.PRIMARY,
|
|
80
|
-
size: ButtonSize.SMALL,
|
|
81
|
-
isLoading: isRunning,
|
|
82
|
-
isDisabled: !!parsed.error,
|
|
83
|
-
onClick: () => {
|
|
84
|
-
onRun(parsed.configuration);
|
|
85
|
-
close();
|
|
86
|
-
}
|
|
87
|
-
})]
|
|
88
|
-
})
|
|
89
|
-
]
|
|
90
|
-
})
|
|
91
|
-
});
|
|
92
|
-
};
|
|
7
|
+
var PipelinePageRunButton = ({ runErrors, isRunnable, onClick }) => /* @__PURE__ */ jsx(Button, {
|
|
8
|
+
label: "Run",
|
|
9
|
+
icon: PlayIcon,
|
|
10
|
+
iconWeight: IconWeight.FILL,
|
|
11
|
+
variant: ButtonVariant.PRIMARY,
|
|
12
|
+
isDisabled: !isRunnable || runErrors.length > 0,
|
|
13
|
+
tooltip: runErrors.length > 0 ? /* @__PURE__ */ jsx(BulletedList, {
|
|
14
|
+
items: runErrors,
|
|
15
|
+
size: BulletedListSize.SMALL
|
|
16
|
+
}) : "",
|
|
17
|
+
onClick
|
|
18
|
+
});
|
|
93
19
|
//#endregion
|
|
94
20
|
export { PipelinePageRunButton as default };
|
|
@@ -8,8 +8,8 @@ import { formatPipelineScheduleSummary } from "../schedule/utils.js";
|
|
|
8
8
|
import { CalendarIcon } from "@phosphor-icons/react";
|
|
9
9
|
import Button, { ButtonSize, ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
import Alert from "@galaxy-io/dls/feedback/Alert";
|
|
12
11
|
import { formatRelativeTime } from "@galaxy-io/dls/utils/format";
|
|
12
|
+
import Alert from "@galaxy-io/dls/feedback/Alert";
|
|
13
13
|
//#region src/pages/pipelines/components/header/PipelinePageScheduleBanner.tsx
|
|
14
14
|
var PipelinePageScheduleBanner = () => {
|
|
15
15
|
const { id } = usePipelineParams();
|
|
@@ -4,7 +4,6 @@ import { PipelinePageTab } from './types';
|
|
|
4
4
|
import { FilamentPath } from '../../../../module/paths';
|
|
5
5
|
export declare const PIPELINE_PAGE_TABS_INSET = 16;
|
|
6
6
|
export declare const PIPELINE_PAGE_VERSION_SELECT_WIDTH = 104;
|
|
7
|
-
export declare const PIPELINE_PAGE_RUN_DROPDOWN_WIDTH = 500;
|
|
8
7
|
export declare const PIPELINE_PAGE_MAX_VISIBLE_SAVE_ISSUES = 3;
|
|
9
8
|
export declare const PIPELINE_PAGE_TABS: PipelinePageTab[];
|
|
10
9
|
export declare const PIPELINE_PAGE_TAB_TO_LABEL_MAP: Record<PipelinePageTab, string>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface PipelineResourceColumnsChipProps {
|
|
3
|
+
selectedCount: number;
|
|
4
|
+
totalCount: number;
|
|
5
|
+
isRaised?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const PipelineResourceColumnsChip: FC<PipelineResourceColumnsChipProps>;
|
|
8
|
+
export default PipelineResourceColumnsChip;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import Chip, { ChipSize, ChipVariant } from "@galaxy-io/dls/chips/Chip";
|
|
3
|
+
//#region src/pages/pipelines/components/resource/PipelineResourceColumnsChip.tsx
|
|
4
|
+
var PipelineResourceColumnsChip = ({ selectedCount, totalCount, isRaised = false }) => {
|
|
5
|
+
const fullVariant = isRaised ? ChipVariant.TERTIARY : ChipVariant.SECONDARY;
|
|
6
|
+
return /* @__PURE__ */ jsx(Chip, {
|
|
7
|
+
label: `${selectedCount} of ${totalCount}`,
|
|
8
|
+
tooltip: "Selected columns",
|
|
9
|
+
size: ChipSize.SMALL,
|
|
10
|
+
variant: selectedCount === totalCount ? fullVariant : ChipVariant.PRIMARY
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { PipelineResourceColumnsChip as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ResourceColumn } from '../../../../gen/ingestion/v1/connectors_pb';
|
|
3
|
+
interface PipelineResourceColumnsTableProps {
|
|
4
|
+
columns: ResourceColumn[];
|
|
5
|
+
selected: ResourceColumn["name"][];
|
|
6
|
+
locked: ResourceColumn["name"][];
|
|
7
|
+
isDisabled: boolean;
|
|
8
|
+
search?: string;
|
|
9
|
+
onChange: (selected: ResourceColumn["name"][]) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const PipelineResourceColumnsTable: FC<PipelineResourceColumnsTableProps>;
|
|
12
|
+
export default PipelineResourceColumnsTable;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { MagnifyingGlassIcon } from "@phosphor-icons/react";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import Flex, { AlignItems, JustifyContent } from "@galaxy-io/dls/layout/Flex";
|
|
5
|
+
import Chip, { ChipSize, ChipVariant } from "@galaxy-io/dls/chips/Chip";
|
|
6
|
+
import Text, { TextSize, TextVariant } from "@galaxy-io/dls/text/Text";
|
|
7
|
+
import { FontFamily } from "@galaxy-io/dls/theme/enums";
|
|
8
|
+
import { isSearchMatch } from "@galaxy-io/dls/utils/search";
|
|
9
|
+
import EmptyLayout, { EmptyLayoutSize } from "@galaxy-io/dls/layout/EmptyLayout";
|
|
10
|
+
import InfiniteTable, { InfiniteTableSize } from "@galaxy-io/dls/table/InfiniteTable";
|
|
11
|
+
//#region src/pages/pipelines/components/resource/PipelineResourceColumnsTable.tsx
|
|
12
|
+
var RESOURCE_COLUMN_TABLE_COLUMNS = [{
|
|
13
|
+
id: "name",
|
|
14
|
+
header: "Column",
|
|
15
|
+
isRowHeader: true,
|
|
16
|
+
cell: ({ row }) => /* @__PURE__ */ jsxs(Flex, {
|
|
17
|
+
alignItems: AlignItems.CENTER,
|
|
18
|
+
gap: 8,
|
|
19
|
+
minWidth: 0,
|
|
20
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
21
|
+
size: TextSize.BODY_SM,
|
|
22
|
+
family: FontFamily.MONO,
|
|
23
|
+
lineClamp: 1,
|
|
24
|
+
children: row.name
|
|
25
|
+
}), row.isPrimaryKey && /* @__PURE__ */ jsx(Chip, {
|
|
26
|
+
label: "primary key",
|
|
27
|
+
tooltip: "Part of the primary key",
|
|
28
|
+
size: ChipSize.SMALL,
|
|
29
|
+
variant: ChipVariant.TERTIARY
|
|
30
|
+
})]
|
|
31
|
+
})
|
|
32
|
+
}, {
|
|
33
|
+
id: "type",
|
|
34
|
+
header: "Type",
|
|
35
|
+
width: 200,
|
|
36
|
+
align: "right",
|
|
37
|
+
cell: ({ row }) => /* @__PURE__ */ jsx(Flex, {
|
|
38
|
+
justifyContent: JustifyContent.END,
|
|
39
|
+
fillWidth: true,
|
|
40
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
41
|
+
size: TextSize.BODY_SM,
|
|
42
|
+
family: FontFamily.MONO,
|
|
43
|
+
variant: TextVariant.TERTIARY,
|
|
44
|
+
lineClamp: 1,
|
|
45
|
+
children: row.nativeType || row.logicalType
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
}];
|
|
49
|
+
var PipelineResourceColumnsTable = ({ columns, selected, locked, isDisabled, search = "", onChange }) => {
|
|
50
|
+
const visibleColumns = useMemo(() => columns.filter((column) => isSearchMatch(search, column.name)), [columns, search]);
|
|
51
|
+
const handleChange = (next) => {
|
|
52
|
+
const visibleNames = new Set(visibleColumns.map((column) => column.name));
|
|
53
|
+
const kept = columns.map((column) => column.name).filter((name) => next.includes(name) || locked.includes(name) || !visibleNames.has(name) && selected.includes(name));
|
|
54
|
+
if (kept.length > 0) onChange(kept);
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ jsx(InfiniteTable, {
|
|
57
|
+
ariaLabel: "Columns",
|
|
58
|
+
columns: RESOURCE_COLUMN_TABLE_COLUMNS,
|
|
59
|
+
data: visibleColumns,
|
|
60
|
+
getRowId: (row) => row.name,
|
|
61
|
+
size: InfiniteTableSize.SMALL,
|
|
62
|
+
inset: 4,
|
|
63
|
+
value: selected,
|
|
64
|
+
onChange: isDisabled ? void 0 : handleChange,
|
|
65
|
+
canSelectRow: (column) => !locked.includes(column.name),
|
|
66
|
+
emptyState: /* @__PURE__ */ jsx(EmptyLayout, {
|
|
67
|
+
size: EmptyLayoutSize.SMALL,
|
|
68
|
+
icon: MagnifyingGlassIcon,
|
|
69
|
+
header: "No columns match your search"
|
|
70
|
+
}),
|
|
71
|
+
isSelectable: true
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
75
|
+
export { PipelineResourceColumnsTable as default };
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import { Space } from '@galaxy-io/dls/theme/enums';
|
|
1
2
|
import { ReadMode, WriteMode } from '../../../../gen/ingestion/v1/common_pb';
|
|
2
3
|
export declare const READ_MODE_TO_WRITE_MODES_MAP: Record<ReadMode, WriteMode[]>;
|
|
4
|
+
export declare const PIPELINE_RESOURCE_COLUMNS_TABLE_INSET: Space;
|
|
5
|
+
export declare const PIPELINE_RESOURCE_COLUMNS_TABLE_WIDTH_TYPE = 200;
|
|
@@ -3,7 +3,8 @@ import { CanvasNode } from '../../canvas/types';
|
|
|
3
3
|
export declare enum PipelineResourceStatusField {
|
|
4
4
|
READ_MODE = "readMode",
|
|
5
5
|
CURSOR = "cursor",
|
|
6
|
-
WRITE_MODE = "writeMode"
|
|
6
|
+
WRITE_MODE = "writeMode",
|
|
7
|
+
COLUMNS = "columns"
|
|
7
8
|
}
|
|
8
9
|
export interface PipelineResourceStatus {
|
|
9
10
|
resource: Resource["name"];
|
|
@@ -3,6 +3,7 @@ var PipelineResourceStatusField = /* @__PURE__ */ function(PipelineResourceStatu
|
|
|
3
3
|
PipelineResourceStatusField["READ_MODE"] = "readMode";
|
|
4
4
|
PipelineResourceStatusField["CURSOR"] = "cursor";
|
|
5
5
|
PipelineResourceStatusField["WRITE_MODE"] = "writeMode";
|
|
6
|
+
PipelineResourceStatusField["COLUMNS"] = "columns";
|
|
6
7
|
return PipelineResourceStatusField;
|
|
7
8
|
}({});
|
|
8
9
|
//#endregion
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SelectOption } from '@galaxy-io/dls/inputs/SelectInput';
|
|
2
2
|
import { ReadMode, WriteMode } from '../../../../gen/ingestion/v1/common_pb';
|
|
3
3
|
import { Resource, ResourceColumn } from '../../../../gen/ingestion/v1/connectors_pb';
|
|
4
|
+
import { ResourceColumnSelection } from '../../../../gen/ingestion/v1/pipelines_pb';
|
|
4
5
|
import { PipelineResourceStatus } from './types';
|
|
5
6
|
export declare const getReadModeSelectOptions: (modes: ReadMode[], selected: ReadMode) => SelectOption[];
|
|
6
7
|
export declare const getWriteModeSelectOptions: (modes: WriteMode[], selected: WriteMode) => SelectOption[];
|
|
@@ -10,6 +11,22 @@ export declare const getCompatibleWriteModes: (writeModes: WriteMode[], readMode
|
|
|
10
11
|
export declare const getCursorOptions: (columns: ResourceColumn[]) => ResourceColumn[];
|
|
11
12
|
export declare const getRecommendedCursor: (columns: ResourceColumn[]) => ResourceColumn["name"];
|
|
12
13
|
export declare const getDefaultCursor: (columns: ResourceColumn[]) => ResourceColumn["name"];
|
|
14
|
+
export declare const getLockedColumnNames: ({ primaryKey, cursor, isCursorLocked, }: {
|
|
15
|
+
primaryKey: ResourceColumn["name"][];
|
|
16
|
+
cursor: ResourceColumn["name"];
|
|
17
|
+
isCursorLocked: boolean;
|
|
18
|
+
}) => ResourceColumn["name"][];
|
|
19
|
+
export declare const getEffectiveColumnSelection: ({ stored, columns, locked, }: {
|
|
20
|
+
stored: ResourceColumn["name"][] | undefined;
|
|
21
|
+
columns: ResourceColumn[] | undefined;
|
|
22
|
+
locked: ResourceColumn["name"][];
|
|
23
|
+
}) => ResourceColumn["name"][];
|
|
24
|
+
export declare const createResourceColumnSelections: ({ resource, selected, columns, }: {
|
|
25
|
+
resource: Resource["name"];
|
|
26
|
+
selected: ResourceColumn["name"][];
|
|
27
|
+
columns: ResourceColumn[];
|
|
28
|
+
}) => ResourceColumnSelection[];
|
|
29
|
+
export declare const addColumnToSelections: (selections: ResourceColumnSelection[], resource: Resource["name"], column: ResourceColumn["name"]) => ResourceColumnSelection[];
|
|
13
30
|
export declare const getDefaultReadMode: ({ columns, readModeOptions, managedIncremental, fallback, }: {
|
|
14
31
|
columns: ResourceColumn[];
|
|
15
32
|
readModeOptions: ReadMode[];
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ReadMode, WriteMode } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
2
2
|
import { createEnumSelectOptions } from "../../../../utils/select.js";
|
|
3
|
+
import { ResourceColumnSelectionSchema } from "../../../../gen/ingestion/v1/pipelines_pb.js";
|
|
3
4
|
import { READ_MODE_TO_LABEL_MAP, WRITE_MODE_TO_LABEL_MAP } from "../create/constants.js";
|
|
4
5
|
import { READ_MODE_TO_WRITE_MODES_MAP } from "./constants.js";
|
|
5
6
|
import { PipelineResourceStatusField } from "./types.js";
|
|
7
|
+
import { create } from "@bufbuild/protobuf";
|
|
6
8
|
//#region src/pages/pipelines/components/resource/utils.ts
|
|
7
9
|
var getReadModeSelectOptions = (modes, selected) => createEnumSelectOptions(selected === ReadMode.UNSPECIFIED || modes.includes(selected) ? modes : [...modes, selected], READ_MODE_TO_LABEL_MAP);
|
|
8
10
|
var getWriteModeSelectOptions = (modes, selected) => createEnumSelectOptions(selected === WriteMode.UNSPECIFIED || modes.includes(selected) ? modes : [...modes, selected], WRITE_MODE_TO_LABEL_MAP);
|
|
@@ -25,6 +27,21 @@ var getDefaultCursor = (columns) => {
|
|
|
25
27
|
const eligible = getCursorOptions(columns);
|
|
26
28
|
return eligible.length === 1 ? eligible[0].name : "";
|
|
27
29
|
};
|
|
30
|
+
var getLockedColumnNames = ({ primaryKey, cursor, isCursorLocked }) => isCursorLocked && cursor ? [...primaryKey, cursor] : primaryKey;
|
|
31
|
+
var getEffectiveColumnSelection = ({ stored, columns, locked }) => {
|
|
32
|
+
const known = columns?.map((column) => column.name);
|
|
33
|
+
if (stored === void 0) return known ?? [];
|
|
34
|
+
const kept = known ? stored.filter((name) => known.includes(name)) : stored;
|
|
35
|
+
return (known ?? [...kept, ...locked]).filter((name) => kept.includes(name) || locked.includes(name));
|
|
36
|
+
};
|
|
37
|
+
var createResourceColumnSelections = ({ resource, selected, columns }) => selected.length === 0 || selected.length === columns.length ? [] : [create(ResourceColumnSelectionSchema, {
|
|
38
|
+
resource,
|
|
39
|
+
columns: selected
|
|
40
|
+
})];
|
|
41
|
+
var addColumnToSelections = (selections, resource, column) => column === "" ? selections : selections.map((selection) => selection.resource === resource && !selection.columns.includes(column) ? create(ResourceColumnSelectionSchema, {
|
|
42
|
+
resource,
|
|
43
|
+
columns: [...selection.columns, column]
|
|
44
|
+
}) : selection);
|
|
28
45
|
var getDefaultReadMode = ({ columns, readModeOptions, managedIncremental, fallback }) => (managedIncremental || getRecommendedCursor(columns) !== "") && readModeOptions.includes(ReadMode.INCREMENTAL) ? ReadMode.INCREMENTAL : fallback;
|
|
29
46
|
var getPipelineResourceStatus = ({ resource, readMode, readModeOptions, cursorField, cursorOptions, isCursorKnown, managedIncremental, hasPrimaryKey, needsPrimaryKey }) => {
|
|
30
47
|
if (!readModeOptions.includes(readMode)) return {
|
|
@@ -55,4 +72,4 @@ var getPipelineResourceStatus = ({ resource, readMode, readModeOptions, cursorFi
|
|
|
55
72
|
};
|
|
56
73
|
};
|
|
57
74
|
//#endregion
|
|
58
|
-
export { getCompatibleWriteModes, getCursorOptions, getCursorSelectOptions, getDefaultCursor, getDefaultReadMode, getPipelineResourceStatus, getReadModeSelectOptions, getRecommendedCursor, getSharedModes, getWriteModeSelectOptions };
|
|
75
|
+
export { addColumnToSelections, createResourceColumnSelections, getCompatibleWriteModes, getCursorOptions, getCursorSelectOptions, getDefaultCursor, getDefaultReadMode, getEffectiveColumnSelection, getLockedColumnNames, getPipelineResourceStatus, getReadModeSelectOptions, getRecommendedCursor, getSharedModes, getWriteModeSelectOptions };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Pipeline } from '../../../../gen/ingestion/v1/pipelines_pb';
|
|
3
|
+
interface PipelineRunModalProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
pipelineId?: Pipeline["id"];
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare const PipelineRunModal: FC<PipelineRunModalProps>;
|
|
9
|
+
export default PipelineRunModal;
|