@galaxy-io/filament-ui 0.7.0 → 0.8.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/components/BaseHeader.d.ts +2 -0
- package/dist/components/BaseHeader.js +3 -2
- package/dist/components/fields/Field.js +31 -27
- package/dist/components/fields/utils.js +2 -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/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/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/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/observability/components/setup/ObservabilitySetupChecklist.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/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 +7 -9
- 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/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/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 +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/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
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { Space } from '@galaxy-io/dls/theme/enums';
|
|
2
2
|
export declare const PIPELINE_CANVAS_ROUTES_ROW_HEIGHT = 44;
|
|
3
3
|
export declare const PIPELINE_CANVAS_ROUTES_ISLAND_HEIGHT = 30;
|
|
4
|
-
export declare const PIPELINE_CANVAS_ROUTES_SOURCE_ISLAND_WIDTH =
|
|
4
|
+
export declare const PIPELINE_CANVAS_ROUTES_SOURCE_ISLAND_WIDTH = 340;
|
|
5
|
+
export declare const PIPELINE_CANVAS_ROUTES_SOURCE_ISLAND_MIN_WIDTH = 220;
|
|
5
6
|
export declare const PIPELINE_CANVAS_ROUTES_SINK_ISLAND_WIDTH = 200;
|
|
7
|
+
export declare const PIPELINE_CANVAS_ROUTES_SINK_ISLAND_MIN_WIDTH = 120;
|
|
6
8
|
export declare const PIPELINE_CANVAS_ROUTES_LIST_PADDING_X: Space;
|
|
7
9
|
export declare const PIPELINE_CANVAS_ROUTES_LIST_PADDING_Y: Space;
|
|
8
10
|
export declare const PIPELINE_CANVAS_ROUTES_OVERSCAN = 6;
|
|
9
11
|
export declare const PIPELINE_CANVAS_ROUTES_EDGE_CONTROL_INSET = 24;
|
|
10
12
|
export declare const PIPELINE_CANVAS_ROUTES_EDGE_CONTROL_GAP: Space;
|
|
11
|
-
export declare const PIPELINE_CANVAS_ROUTES_EDGE_MIN_WIDTH =
|
|
13
|
+
export declare const PIPELINE_CANVAS_ROUTES_EDGE_MIN_WIDTH = 440;
|
|
12
14
|
export declare const PIPELINE_CANVAS_ROUTES_ROW_MIN_WIDTH: number;
|
|
13
15
|
export declare const PIPELINE_CANVAS_ROUTES_EDGE_HIT_PADDING = 4;
|
|
14
16
|
export declare const PIPELINE_CANVAS_ROUTES_EDGE_FAN_CONTROL_X = 22;
|
|
@@ -17,7 +19,13 @@ export declare const PIPELINE_CANVAS_ROUTES_EDGE_DASH_ARRAY = "5 5";
|
|
|
17
19
|
export declare const PIPELINE_CANVAS_ROUTES_EDGE_DASH_PERIOD = 10;
|
|
18
20
|
export declare const PIPELINE_CANVAS_ROUTES_EDGE_DASH_DURATION = "0.5s";
|
|
19
21
|
export declare const PIPELINE_CANVAS_ROUTES_SEARCH_WIDTH = 280;
|
|
22
|
+
export declare const PIPELINE_CANVAS_ROUTES_SEARCH_MIN_WIDTH = 96;
|
|
20
23
|
export declare const PIPELINE_CANVAS_ROUTES_SINK_FILTER_WIDTH = 220;
|
|
24
|
+
export declare const PIPELINE_CANVAS_ROUTES_SINK_FILTER_MIN_WIDTH = 88;
|
|
25
|
+
export declare const PIPELINE_CANVAS_ROUTES_SINK_FILTER_SHRINK = 3;
|
|
26
|
+
export declare const PIPELINE_CANVAS_ROUTES_TOOLBAR_COMPACT_WIDTH = 580;
|
|
27
|
+
export declare const PIPELINE_CANVAS_ROUTES_TOOLBAR_ICON_ONLY_WIDTH = 500;
|
|
28
|
+
export declare const PIPELINE_CANVAS_ROUTES_TOOLBAR_NO_SINK_FILTER_WIDTH = 380;
|
|
21
29
|
export declare const PIPELINE_CANVAS_ROUTES_READ_MODE_SELECT_WIDTH = 112;
|
|
22
30
|
export declare const PIPELINE_CANVAS_ROUTES_CURSOR_SELECT_WIDTH = 136;
|
|
23
31
|
export declare const PIPELINE_CANVAS_ROUTES_WRITE_MODE_SELECT_WIDTH = 104;
|
|
@@ -31,6 +31,7 @@ export type PipelineCanvasPlaceholderNode = Node<PipelineCanvasPlaceholderNodeDa
|
|
|
31
31
|
export type CanvasNode = PipelineCanvasSourceNode | PipelineCanvasSinkNode | PipelineCanvasPlaceholderNode;
|
|
32
32
|
export type PipelineCanvasEdgeTransform = JsonObject;
|
|
33
33
|
export type PipelineCanvasEdgeData = Pick<PipelineEdge, "readMode" | "writeMode" | "cursors"> & {
|
|
34
|
+
columns?: PipelineEdge["columns"];
|
|
34
35
|
transform?: PipelineCanvasEdgeTransform;
|
|
35
36
|
destinationResource?: string;
|
|
36
37
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { Rect } from '@xyflow/react';
|
|
1
2
|
import { Theme } from '@galaxy-io/dls/theme/tokens/types';
|
|
2
3
|
import { EdgeValidation } from '../../../gen/ingestion/v1/capabilities_pb';
|
|
3
4
|
import { ReadMode, WriteMode } from '../../../gen/ingestion/v1/common_pb';
|
|
4
5
|
import { Connection } from '../../../gen/ingestion/v1/connections_pb';
|
|
5
6
|
import { ResourceColumn } from '../../../gen/ingestion/v1/connectors_pb';
|
|
6
7
|
import { PipelineEdge } from '../../../gen/ingestion/v1/pipelines_pb';
|
|
8
|
+
import { RunInfo } from '../../../gen/ingestion/v1/runs_pb';
|
|
7
9
|
import { PipelineFlowEndpoints } from '../../../components/pipelines/utils';
|
|
8
10
|
import { PipelineCanvasEdgeResources } from './hooks/usePipelineCanvasEdgeResources';
|
|
9
11
|
import { CanvasEdge, CanvasNode, PipelineCanvasEdgeTransform, PipelineCanvasSinkNode, PipelineCanvasSourceNode } from './types';
|
|
@@ -29,7 +31,9 @@ export declare const mapElementsToSelected: <T extends {
|
|
|
29
31
|
selected?: boolean;
|
|
30
32
|
}>(elements: T[], selectedId: string | undefined) => T[];
|
|
31
33
|
export declare const getDefaultDestinationResource: (resource: PipelineEdge["resource"]) => string;
|
|
32
|
-
export declare const
|
|
34
|
+
export declare const getPipelineCanvasRevealBounds: (bounds: Rect, nodes: CanvasNode[], isDiscovering: boolean) => Rect;
|
|
35
|
+
export declare const isPipelineCanvasRouteRunning: (runs: RunInfo[], sourceConnectionId: Connection["id"] | undefined, sinkConnectionId: Connection["id"] | undefined, resource: PipelineEdge["resource"]) => boolean;
|
|
36
|
+
export declare const mapEdgesToStyledEdges: (edges: CanvasEdge[], nodes: CanvasNode[], theme: Theme, runningEdgeIds: Set<CanvasEdge["id"]>, invalidEdgeIds: Set<CanvasEdge["id"]>) => CanvasEdge[];
|
|
33
37
|
export declare const mapCanvasNodesToFlowEndpoints: (nodes: CanvasNode[]) => PipelineFlowEndpoints;
|
|
34
38
|
export declare const isConnectionNode: (node: CanvasNode) => node is PipelineCanvasSourceNode | PipelineCanvasSinkNode;
|
|
35
39
|
export declare const isPipelineCanvasConnectionDisabled: (connection: Connection, isSourceDisabled: boolean) => boolean;
|
|
@@ -2,7 +2,7 @@ import { ConnectorKind, ReadMode, WriteMode } from "../../../gen/ingestion/v1/co
|
|
|
2
2
|
import { PipelineCanvasNodeType } from "./types.js";
|
|
3
3
|
import { isJsonObject } from "../../../components/fields/utils.js";
|
|
4
4
|
import { getPipelineResourceStatus, getRecommendedCursor, getSharedModes } from "../components/resource/utils.js";
|
|
5
|
-
import { PIPELINE_CANVAS_EDGE_Z_INDEX } from "./constants.js";
|
|
5
|
+
import { PIPELINE_CANVAS_EDGE_Z_INDEX, PIPELINE_CANVAS_SOURCE_NODE_EXPECTED_HEIGHT } from "./constants.js";
|
|
6
6
|
//#region src/pages/pipelines/canvas/utils.ts
|
|
7
7
|
var getEdgeModeOptions = (verdict, hasReadLevers) => ({
|
|
8
8
|
readModeOptions: verdict && hasReadLevers ? getSharedModes(verdict.resources.map((resource) => resource.supportedReadModes)) : [],
|
|
@@ -38,9 +38,19 @@ var mapElementsToSelected = (elements, selectedId) => elements.map((element) =>
|
|
|
38
38
|
};
|
|
39
39
|
});
|
|
40
40
|
var getDefaultDestinationResource = (resource) => resource.replace(/[^a-zA-Z0-9_]+/g, "_").replace(/^_+|_+$/g, "");
|
|
41
|
-
var
|
|
41
|
+
var getPipelineCanvasRevealBounds = (bounds, nodes, isDiscovering) => {
|
|
42
|
+
if (!isDiscovering) return bounds;
|
|
43
|
+
const bottom = nodes.filter((node) => node.type === PipelineCanvasNodeType.SOURCE).reduce((max, node) => Math.max(max, node.position.y + PIPELINE_CANVAS_SOURCE_NODE_EXPECTED_HEIGHT), bounds.y + bounds.height);
|
|
44
|
+
return {
|
|
45
|
+
...bounds,
|
|
46
|
+
height: bottom - bounds.y
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
var isPipelineCanvasRouteRunning = (runs, sourceConnectionId, sinkConnectionId, resource) => runs.some((run) => run.sourceConnectionId === sourceConnectionId && run.sinkConnectionId === sinkConnectionId && (run.resources.length === 0 || run.resources.includes(resource)));
|
|
50
|
+
var mapEdgesToStyledEdges = (edges, nodes, theme, runningEdgeIds, invalidEdgeIds) => {
|
|
42
51
|
const selectedNodeIds = new Set(nodes.filter((node) => node.selected).map((node) => node.id));
|
|
43
52
|
return edges.map((edge) => {
|
|
53
|
+
const isRunning = runningEdgeIds.has(edge.id);
|
|
44
54
|
const isConnectedToSelected = selectedNodeIds.has(edge.source) || selectedNodeIds.has(edge.target);
|
|
45
55
|
const isHighlighted = edge.selected || isConnectedToSelected;
|
|
46
56
|
const isInvalid = invalidEdgeIds.has(edge.id);
|
|
@@ -64,4 +74,4 @@ var mapCanvasNodesToFlowEndpoints = (nodes) => ({
|
|
|
64
74
|
var isConnectionNode = (node) => node.type === PipelineCanvasNodeType.SOURCE || node.type === PipelineCanvasNodeType.SINK;
|
|
65
75
|
var isPipelineCanvasConnectionDisabled = (connection, isSourceDisabled) => isSourceDisabled && connection.kind === ConnectorKind.SOURCE;
|
|
66
76
|
//#endregion
|
|
67
|
-
export { getDefaultDestinationResource, getEdgeModeOptions, getEdgeResourceStatus, getTransformStepCount, isConnectionNode, isPipelineCanvasConnectionDisabled, mapCanvasNodesToFlowEndpoints, mapEdgesToStyledEdges, mapElementsToSelected };
|
|
77
|
+
export { getDefaultDestinationResource, getEdgeModeOptions, getEdgeResourceStatus, getPipelineCanvasRevealBounds, getTransformStepCount, isConnectionNode, isPipelineCanvasConnectionDisabled, isPipelineCanvasRouteRunning, mapCanvasNodesToFlowEndpoints, mapEdgesToStyledEdges, mapElementsToSelected };
|
|
@@ -8,20 +8,31 @@ import CreatePipelineModalConnections from "./steps/CreatePipelineModalConnectio
|
|
|
8
8
|
import CreatePipelineModalDelivery from "./steps/CreatePipelineModalDelivery.js";
|
|
9
9
|
import CreatePipelineModalDetails from "./steps/CreatePipelineModalDetails.js";
|
|
10
10
|
import CreatePipelineModalResources from "./steps/CreatePipelineModalResources.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import CreatePipelineModalResourcesColumnsPane from "./steps/components/CreatePipelineModalResourcesColumnsPane.js";
|
|
12
|
+
import { useState } from "react";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
import Flex, { FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
13
15
|
import { match } from "ts-pattern";
|
|
14
16
|
import Box, { BoxVariant } from "@galaxy-io/dls/layout/Box";
|
|
15
|
-
import Modal
|
|
16
|
-
import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
17
|
-
import { Orientation, Radius } from "@galaxy-io/dls/theme/enums";
|
|
18
|
-
import Divider from "@galaxy-io/dls/layout/Divider";
|
|
17
|
+
import Modal from "@galaxy-io/dls/modal/Modal";
|
|
19
18
|
import ScrollArea from "@galaxy-io/dls/layout/ScrollArea";
|
|
20
19
|
//#region src/pages/pipelines/components/create/CreatePipelineModal.tsx
|
|
20
|
+
var DEFAULT_CONTENT_STATE = {};
|
|
21
21
|
var CreatePipelineModalContent = ({ isOpen, onClose }) => {
|
|
22
|
-
const { step } = useCreatePipelineModalState();
|
|
22
|
+
const { step, rowsBySink, activeSinkId } = useCreatePipelineModalState();
|
|
23
|
+
const [localState, setLocalState] = useState(DEFAULT_CONTENT_STATE);
|
|
24
|
+
const activeRow = step === CreatePipelineModalStep.RESOURCES ? rowsBySink[activeSinkId]?.find((row) => row.name === localState.activeResource && row.isColumnSelectable) : void 0;
|
|
25
|
+
const handleActiveResourceChange = (activeResource) => {
|
|
26
|
+
setLocalState((prev) => ({
|
|
27
|
+
...prev,
|
|
28
|
+
activeResource
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
23
31
|
const renderBody = () => {
|
|
24
|
-
const body = match(step).with(CreatePipelineModalStep.CONNECTIONS, () => /* @__PURE__ */ jsx(CreatePipelineModalConnections, {})).with(CreatePipelineModalStep.RESOURCES, () => /* @__PURE__ */ jsx(CreatePipelineModalResources, {
|
|
32
|
+
const body = match(step).with(CreatePipelineModalStep.CONNECTIONS, () => /* @__PURE__ */ jsx(CreatePipelineModalConnections, {})).with(CreatePipelineModalStep.RESOURCES, () => /* @__PURE__ */ jsx(CreatePipelineModalResources, {
|
|
33
|
+
activeRow,
|
|
34
|
+
onActiveResourceChange: handleActiveResourceChange
|
|
35
|
+
})).with(CreatePipelineModalStep.DELIVERY, () => /* @__PURE__ */ jsx(CreatePipelineModalDelivery, {})).with(CreatePipelineModalStep.DETAILS, () => /* @__PURE__ */ jsx(CreatePipelineModalDetails, {})).exhaustive();
|
|
25
36
|
if (CREATE_PIPELINE_MODAL_STEP_TO_IS_PADDED_MAP[step]) return /* @__PURE__ */ jsx(ScrollArea, { children: /* @__PURE__ */ jsx(Box, {
|
|
26
37
|
padding: 16,
|
|
27
38
|
children: body
|
|
@@ -34,32 +45,23 @@ var CreatePipelineModalContent = ({ isOpen, onClose }) => {
|
|
|
34
45
|
};
|
|
35
46
|
return /* @__PURE__ */ jsx(Modal, {
|
|
36
47
|
isOpen,
|
|
37
|
-
|
|
38
|
-
header: "
|
|
48
|
+
isFullscreen: true,
|
|
49
|
+
header: "New pipeline",
|
|
50
|
+
sidebar: activeRow ? null : /* @__PURE__ */ jsx(CreatePipelineModalSidebar, {}),
|
|
39
51
|
footer: /* @__PURE__ */ jsx(CreatePipelineModalFooter, {}),
|
|
52
|
+
aside: activeRow ? /* @__PURE__ */ jsx(CreatePipelineModalResourcesColumnsPane, {
|
|
53
|
+
row: activeRow,
|
|
54
|
+
onClose: () => handleActiveResourceChange(void 0)
|
|
55
|
+
}, activeRow.name) : null,
|
|
56
|
+
hasDividers: true,
|
|
57
|
+
isFlush: true,
|
|
40
58
|
onOpenChange: (isOpen) => {
|
|
41
59
|
if (!isOpen) onClose();
|
|
42
60
|
},
|
|
43
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ jsx(Box, {
|
|
62
|
+
variant: BoxVariant.BASE,
|
|
44
63
|
height: "100%",
|
|
45
|
-
|
|
46
|
-
hasBorder: true,
|
|
47
|
-
radius: Radius.LG,
|
|
48
|
-
overflow: "hidden",
|
|
49
|
-
children: [
|
|
50
|
-
/* @__PURE__ */ jsx(CreatePipelineModalSidebar, {}),
|
|
51
|
-
/* @__PURE__ */ jsx(Divider, { orientation: Orientation.VERTICAL }),
|
|
52
|
-
/* @__PURE__ */ jsx(FlexItem, {
|
|
53
|
-
grow: 1,
|
|
54
|
-
basis: 0,
|
|
55
|
-
minWidth: 0,
|
|
56
|
-
children: /* @__PURE__ */ jsx(Box, {
|
|
57
|
-
variant: BoxVariant.BASE,
|
|
58
|
-
height: "100%",
|
|
59
|
-
children: renderBody()
|
|
60
|
-
})
|
|
61
|
-
})
|
|
62
|
-
]
|
|
64
|
+
children: renderBody()
|
|
63
65
|
})
|
|
64
66
|
});
|
|
65
67
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
|
-
import { AddNotifierAction, AddResourceAction, GoToStepAction, RemoveNotifierAction, SelectSourceAction, SetActiveSinkAction, SetDescriptionAction, SetExecutionModeAction, SetNameAction, SetNodeConfigAction, SetResourceCursorAction, SetResourceReadModeAction, SetResourceSelectionAction, SetResourceWriteModeAction, SetScheduleAction, SetSinkWriteModeAction, SetSubmittingAction, SetWorkerConfigurationAction, ToggleSinkAction, UpdateNotifierAction } from './actions';
|
|
2
|
+
import { AddNotifierAction, AddResourceAction, GoToStepAction, RemoveNotifierAction, SelectSourceAction, SetActiveSinkAction, SetDescriptionAction, SetExecutionModeAction, SetNameAction, SetNodeConfigAction, SetResourceColumnsAction, SetResourceCursorAction, SetResourceReadModeAction, SetResourceSelectionAction, SetResourceWriteModeAction, SetScheduleAction, SetSinkWriteModeAction, SetSubmittingAction, SetWorkerConfigurationAction, ToggleSinkAction, UpdateNotifierAction } from './actions';
|
|
3
3
|
import { CreatePipelineModalContextValue } from './types';
|
|
4
4
|
export declare const useCreatePipelineModalState: () => CreatePipelineModalContextValue;
|
|
5
5
|
export declare const useCreatePipelineModalActions: () => {
|
|
@@ -11,6 +11,7 @@ export declare const useCreatePipelineModalActions: () => {
|
|
|
11
11
|
setResourceSelection: (payload: SetResourceSelectionAction["payload"]) => void;
|
|
12
12
|
setResourceReadMode: (payload: SetResourceReadModeAction["payload"]) => void;
|
|
13
13
|
setResourceCursor: (payload: SetResourceCursorAction["payload"]) => void;
|
|
14
|
+
setResourceColumns: (payload: SetResourceColumnsAction["payload"]) => void;
|
|
14
15
|
setResourceWriteMode: (payload: SetResourceWriteModeAction["payload"]) => void;
|
|
15
16
|
setSinkWriteMode: (payload: SetSinkWriteModeAction["payload"]) => void;
|
|
16
17
|
setNodeConfig: (payload: SetNodeConfigAction["payload"]) => void;
|
|
@@ -64,6 +64,10 @@ var useCreatePipelineModalActions = () => {
|
|
|
64
64
|
type: CreatePipelineModalActionType.SET_RESOURCE_CURSOR,
|
|
65
65
|
payload
|
|
66
66
|
}),
|
|
67
|
+
setResourceColumns: (payload) => dispatch({
|
|
68
|
+
type: CreatePipelineModalActionType.SET_RESOURCE_COLUMNS,
|
|
69
|
+
payload
|
|
70
|
+
}),
|
|
67
71
|
setResourceWriteMode: (payload) => dispatch({
|
|
68
72
|
type: CreatePipelineModalActionType.SET_RESOURCE_WRITE_MODE,
|
|
69
73
|
payload
|
|
@@ -15,6 +15,7 @@ export declare enum CreatePipelineModalActionType {
|
|
|
15
15
|
SET_RESOURCE_SELECTION = "SET_RESOURCE_SELECTION",
|
|
16
16
|
SET_RESOURCE_READ_MODE = "SET_RESOURCE_READ_MODE",
|
|
17
17
|
SET_RESOURCE_CURSOR = "SET_RESOURCE_CURSOR",
|
|
18
|
+
SET_RESOURCE_COLUMNS = "SET_RESOURCE_COLUMNS",
|
|
18
19
|
SET_RESOURCE_WRITE_MODE = "SET_RESOURCE_WRITE_MODE",
|
|
19
20
|
SET_SINK_WRITE_MODE = "SET_SINK_WRITE_MODE",
|
|
20
21
|
SET_NODE_CONFIG = "SET_NODE_CONFIG",
|
|
@@ -77,6 +78,14 @@ export interface SetResourceCursorAction {
|
|
|
77
78
|
cursorField: ResourceColumn["name"];
|
|
78
79
|
};
|
|
79
80
|
}
|
|
81
|
+
export interface SetResourceColumnsAction {
|
|
82
|
+
type: CreatePipelineModalActionType.SET_RESOURCE_COLUMNS;
|
|
83
|
+
payload: {
|
|
84
|
+
sinkId: Connection["id"];
|
|
85
|
+
resource: Resource["name"];
|
|
86
|
+
columns: ResourceColumn["name"][];
|
|
87
|
+
};
|
|
88
|
+
}
|
|
80
89
|
export interface SetResourceWriteModeAction {
|
|
81
90
|
type: CreatePipelineModalActionType.SET_RESOURCE_WRITE_MODE;
|
|
82
91
|
payload: {
|
|
@@ -144,5 +153,5 @@ export interface SetSubmittingAction {
|
|
|
144
153
|
type: CreatePipelineModalActionType.SET_SUBMITTING;
|
|
145
154
|
payload: boolean;
|
|
146
155
|
}
|
|
147
|
-
export type CreatePipelineModalAction = SelectSourceAction | ToggleSinkAction | SetActiveSinkAction | SetExecutionModeAction | AddResourceAction | SetResourceSelectionAction | SetResourceReadModeAction | SetResourceCursorAction | SetResourceWriteModeAction | SetSinkWriteModeAction | SetNodeConfigAction | SetNameAction | SetDescriptionAction | SetScheduleAction | AddNotifierAction | UpdateNotifierAction | RemoveNotifierAction | SetWorkerConfigurationAction | GoToStepAction | GoBackAction | GoNextAction | SetSubmittingAction;
|
|
156
|
+
export type CreatePipelineModalAction = SelectSourceAction | ToggleSinkAction | SetActiveSinkAction | SetExecutionModeAction | AddResourceAction | SetResourceSelectionAction | SetResourceReadModeAction | SetResourceCursorAction | SetResourceColumnsAction | SetResourceWriteModeAction | SetSinkWriteModeAction | SetNodeConfigAction | SetNameAction | SetDescriptionAction | SetScheduleAction | AddNotifierAction | UpdateNotifierAction | RemoveNotifierAction | SetWorkerConfigurationAction | GoToStepAction | GoBackAction | GoNextAction | SetSubmittingAction;
|
|
148
157
|
export {};
|
|
@@ -8,6 +8,7 @@ var CreatePipelineModalActionType = /* @__PURE__ */ function(CreatePipelineModal
|
|
|
8
8
|
CreatePipelineModalActionType["SET_RESOURCE_SELECTION"] = "SET_RESOURCE_SELECTION";
|
|
9
9
|
CreatePipelineModalActionType["SET_RESOURCE_READ_MODE"] = "SET_RESOURCE_READ_MODE";
|
|
10
10
|
CreatePipelineModalActionType["SET_RESOURCE_CURSOR"] = "SET_RESOURCE_CURSOR";
|
|
11
|
+
CreatePipelineModalActionType["SET_RESOURCE_COLUMNS"] = "SET_RESOURCE_COLUMNS";
|
|
11
12
|
CreatePipelineModalActionType["SET_RESOURCE_WRITE_MODE"] = "SET_RESOURCE_WRITE_MODE";
|
|
12
13
|
CreatePipelineModalActionType["SET_SINK_WRITE_MODE"] = "SET_SINK_WRITE_MODE";
|
|
13
14
|
CreatePipelineModalActionType["SET_NODE_CONFIG"] = "SET_NODE_CONFIG";
|
|
@@ -8,10 +8,8 @@ import { useCreatePipelineModalActions, useCreatePipelineModalState } from "../C
|
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import Flex, { AlignItems, FlexDirection, JustifyContent } from "@galaxy-io/dls/layout/Flex";
|
|
10
10
|
import { match } from "ts-pattern";
|
|
11
|
-
import Box, { BoxVariant } from "@galaxy-io/dls/layout/Box";
|
|
12
11
|
import Text, { TextSize, TextVariant, TextWeight } from "@galaxy-io/dls/text/Text";
|
|
13
12
|
import Widget, { WidgetVariant } from "@galaxy-io/dls/widget/Widget";
|
|
14
|
-
import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
15
13
|
import { Orientation } from "@galaxy-io/dls/theme/enums";
|
|
16
14
|
import pluralize from "pluralize";
|
|
17
15
|
import Stepper, { StepperSize } from "@galaxy-io/dls/navigation/Stepper";
|
|
@@ -34,60 +32,52 @@ var CreatePipelineModalSidebar = () => {
|
|
|
34
32
|
const handleStepChange = (index) => {
|
|
35
33
|
goToStep(CREATE_PIPELINE_MODAL_STEP_ORDER[index]);
|
|
36
34
|
};
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
36
|
+
direction: FlexDirection.COLUMN,
|
|
37
|
+
justifyContent: JustifyContent.SPACE_BETWEEN,
|
|
38
|
+
grow: 1,
|
|
39
|
+
children: [/* @__PURE__ */ jsx(Flex, {
|
|
40
|
+
alignItems: AlignItems.STRETCH,
|
|
41
|
+
direction: FlexDirection.COLUMN,
|
|
42
|
+
padding: 12,
|
|
43
|
+
fillWidth: true,
|
|
44
|
+
children: /* @__PURE__ */ jsx(Widget, {
|
|
45
|
+
variant: WidgetVariant.SECONDARY,
|
|
46
|
+
children: /* @__PURE__ */ jsxs(Flex, {
|
|
48
47
|
alignItems: AlignItems.STRETCH,
|
|
49
48
|
direction: FlexDirection.COLUMN,
|
|
50
|
-
padding: 12,
|
|
51
|
-
fillWidth: true,
|
|
52
|
-
children: /* @__PURE__ */ jsx(Widget, {
|
|
53
|
-
variant: WidgetVariant.SECONDARY,
|
|
54
|
-
children: /* @__PURE__ */ jsxs(Flex, {
|
|
55
|
-
alignItems: AlignItems.STRETCH,
|
|
56
|
-
direction: FlexDirection.COLUMN,
|
|
57
|
-
gap: 12,
|
|
58
|
-
children: [/* @__PURE__ */ jsx(Text, {
|
|
59
|
-
size: TextSize.BODY_SM,
|
|
60
|
-
weight: TextWeight.MEDIUM,
|
|
61
|
-
variant: TextVariant.TERTIARY,
|
|
62
|
-
children: "Steps"
|
|
63
|
-
}), /* @__PURE__ */ jsx(Stepper, {
|
|
64
|
-
steps,
|
|
65
|
-
value: stepIndex,
|
|
66
|
-
onChange: isSubmitting ? void 0 : handleStepChange,
|
|
67
|
-
orientation: Orientation.VERTICAL,
|
|
68
|
-
size: StepperSize.SMALL,
|
|
69
|
-
ariaLabel: "Pipeline setup"
|
|
70
|
-
})]
|
|
71
|
-
})
|
|
72
|
-
})
|
|
73
|
-
}), /* @__PURE__ */ jsxs(Flex, {
|
|
74
|
-
alignItems: AlignItems.START,
|
|
75
|
-
direction: FlexDirection.COLUMN,
|
|
76
49
|
gap: 12,
|
|
77
|
-
padding: 16,
|
|
78
|
-
fillWidth: true,
|
|
79
50
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
80
|
-
|
|
81
|
-
weight: TextWeight.
|
|
51
|
+
size: TextSize.BODY_SM,
|
|
52
|
+
weight: TextWeight.MEDIUM,
|
|
82
53
|
variant: TextVariant.TERTIARY,
|
|
83
|
-
children:
|
|
84
|
-
}), /* @__PURE__ */ jsx(
|
|
85
|
-
|
|
86
|
-
|
|
54
|
+
children: "Steps"
|
|
55
|
+
}), /* @__PURE__ */ jsx(Stepper, {
|
|
56
|
+
steps,
|
|
57
|
+
value: stepIndex,
|
|
58
|
+
onChange: isSubmitting ? void 0 : handleStepChange,
|
|
59
|
+
orientation: Orientation.VERTICAL,
|
|
60
|
+
size: StepperSize.SMALL,
|
|
61
|
+
ariaLabel: "Pipeline setup"
|
|
87
62
|
})]
|
|
88
|
-
})
|
|
63
|
+
})
|
|
89
64
|
})
|
|
90
|
-
})
|
|
65
|
+
}), /* @__PURE__ */ jsxs(Flex, {
|
|
66
|
+
alignItems: AlignItems.START,
|
|
67
|
+
direction: FlexDirection.COLUMN,
|
|
68
|
+
gap: 12,
|
|
69
|
+
padding: 16,
|
|
70
|
+
fillWidth: true,
|
|
71
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
72
|
+
isProse: true,
|
|
73
|
+
weight: TextWeight.REGULAR,
|
|
74
|
+
variant: TextVariant.TERTIARY,
|
|
75
|
+
children: CREATE_PIPELINE_MODAL_STEP_TO_DESCRIPTION_MAP[step]
|
|
76
|
+
}), /* @__PURE__ */ jsx(DocsLink, {
|
|
77
|
+
label: "Pipeline setup guide",
|
|
78
|
+
path: PIPELINES_DOCS_PATH
|
|
79
|
+
})]
|
|
80
|
+
})]
|
|
91
81
|
});
|
|
92
82
|
};
|
|
93
83
|
//#endregion
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { Icon as PhosphorIcon } from '@phosphor-icons/react';
|
|
2
2
|
import { ExecutionMode, ReadMode, WriteMode } from '../../../../gen/ingestion/v1/common_pb';
|
|
3
3
|
import { CreatePipelineModalStep } from './types';
|
|
4
|
-
export declare const CREATE_PIPELINE_MODAL_SIDEBAR_WIDTH = 240;
|
|
5
4
|
export declare const CREATE_PIPELINE_MODAL_CONNECTION_GHOST_COUNT = 4;
|
|
6
5
|
export declare const CREATE_PIPELINE_MODAL_CONNECTION_ROW_HEIGHT = 40;
|
|
7
6
|
export declare const CREATE_PIPELINE_MODAL_CONNECTION_CARET_WIDTH = 12;
|
|
8
7
|
export declare const CREATE_PIPELINE_MODAL_COLUMN_WIDTH_READ_MODE = 180;
|
|
9
8
|
export declare const CREATE_PIPELINE_MODAL_COLUMN_WIDTH_CURSOR = 180;
|
|
10
9
|
export declare const CREATE_PIPELINE_MODAL_COLUMN_WIDTH_WRITE_MODE = 160;
|
|
10
|
+
export declare const CREATE_PIPELINE_MODAL_COLUMN_WIDTH_OPEN = 36;
|
|
11
|
+
export declare const CREATE_PIPELINE_MODAL_OPEN_CARET_SIZE = 12;
|
|
12
|
+
export declare const CREATE_PIPELINE_MODAL_RESOURCES_COLUMNS_PANE_WIDTH = 440;
|
|
13
|
+
export declare const CREATE_PIPELINE_MODAL_RESOURCES_COLUMNS_PANE_FIELD_HEIGHT = 32;
|
|
14
|
+
export declare const CREATE_PIPELINE_MODAL_RESOURCES_COLUMNS_PANE_LABEL_WIDTH = 96;
|
|
11
15
|
export declare const CREATE_PIPELINE_MODAL_STEP_ORDER: CreatePipelineModalStep[];
|
|
12
16
|
export declare const CREATE_PIPELINE_MODAL_STEP_TO_TITLE_MAP: Record<CreatePipelineModalStep, string>;
|
|
13
17
|
export declare const CREATE_PIPELINE_MODAL_STEP_TO_IS_PADDED_MAP: Record<CreatePipelineModalStep, boolean>;
|
|
@@ -44,8 +44,8 @@ var EXECUTION_MODE_TO_LABEL_MAP = {
|
|
|
44
44
|
};
|
|
45
45
|
var EXECUTION_MODE_TO_DESCRIPTION_MAP = {
|
|
46
46
|
[ExecutionMode.UNSPECIFIED]: "",
|
|
47
|
-
[ExecutionMode.BOUNDED]: "Reads available data then stops
|
|
48
|
-
[ExecutionMode.CONTINUOUS]: "Streams new data until stopped
|
|
47
|
+
[ExecutionMode.BOUNDED]: "Reads available data then stops",
|
|
48
|
+
[ExecutionMode.CONTINUOUS]: "Streams new data until stopped"
|
|
49
49
|
};
|
|
50
50
|
var EXECUTION_MODE_TO_DETAILS_MAP = {
|
|
51
51
|
[ExecutionMode.UNSPECIFIED]: "",
|
|
@@ -5,7 +5,9 @@ export declare const useCreatePipelineResources: (state: CreatePipelineModalStat
|
|
|
5
5
|
sinks: import('../types').CreatePipelineModalSinkRow[];
|
|
6
6
|
replication: ReplicationMode;
|
|
7
7
|
hasReadLevers: boolean;
|
|
8
|
-
issuesBySink:
|
|
8
|
+
issuesBySink: {
|
|
9
|
+
[k: string]: string[];
|
|
10
|
+
};
|
|
9
11
|
selectedCountBySink: Record<string, number>;
|
|
10
12
|
isLoading: boolean;
|
|
11
13
|
isValidating: boolean;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ConnectorKind, ExecutionMode, ReadMode, ReplicationMode, WriteMode } from "../../../../../gen/ingestion/v1/common_pb.js";
|
|
2
2
|
import { DiscoverResourcesRequestSchema, GetResourceColumnsRequestSchema, ResourceSchema } from "../../../../../gen/ingestion/v1/connectors_pb.js";
|
|
3
|
-
import { PipelineEdgeSchema, PipelineGraphSchema, PipelineNodeSchema } from "../../../../../gen/ingestion/v1/pipelines_pb.js";
|
|
3
|
+
import { PipelineEdgeSchema, PipelineGraphSchema, PipelineNodeSchema, ResourceColumnSelectionSchema } from "../../../../../gen/ingestion/v1/pipelines_pb.js";
|
|
4
4
|
import { ValidatePipelineRequestSchema } from "../../../../../gen/ingestion/v1/capabilities_pb.js";
|
|
5
5
|
import { useDiscoverResourcesQuery, useGetResourceColumnsQuery } from "../../../../../api/queries/connectors.js";
|
|
6
6
|
import { useValidatePipelineQuery } from "../../../../../api/queries/capabilities.js";
|
|
7
7
|
import { PROBE_QUERY_OPTIONS } from "../../../../../api/queries/constants.js";
|
|
8
8
|
import { CREATE_PIPELINE_MODAL_DEFAULT_WRITE_MODE } from "../constants.js";
|
|
9
|
+
import { PipelineResourceStatusField } from "../../resource/types.js";
|
|
9
10
|
import { createResourceRowsBySink, createSinkRows, getIssuesBySink, getSelectedCountBySink, isResourceSelected } from "../rows.js";
|
|
10
11
|
import { getEdgeValidationErrors } from "../../../utils.js";
|
|
11
12
|
import { useMemo } from "react";
|
|
@@ -39,11 +40,15 @@ var useCreatePipelineResources = (state, isOpen) => {
|
|
|
39
40
|
}),
|
|
40
41
|
options: {
|
|
41
42
|
...PROBE_QUERY_OPTIONS,
|
|
42
|
-
enabled: isOpen &&
|
|
43
|
+
enabled: isOpen && connectionId !== "" && resourceNames.length > 0
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
|
-
const { sinkConnections, sinkWriteModes, nodeConfigs, resourceSelection, executionMode } = state;
|
|
46
|
+
const { sinkConnections, sinkWriteModes, nodeConfigs, resourceSelection, resourceColumns, executionMode } = state;
|
|
46
47
|
const validationInput = useMemo(() => {
|
|
48
|
+
const createColumnSelections = (sinkId, resource) => Object.entries(resourceColumns[sinkId] ?? {}).filter(([name]) => resource === "" || name === resource).map(([name, columns]) => create(ResourceColumnSelectionSchema, {
|
|
49
|
+
resource: name,
|
|
50
|
+
columns
|
|
51
|
+
}));
|
|
47
52
|
const createSinkEdges = (sink) => {
|
|
48
53
|
const writeMode = sinkWriteModes[sink.id] ?? (hasReadLevers ? CREATE_PIPELINE_MODAL_DEFAULT_WRITE_MODE : WriteMode.APPEND);
|
|
49
54
|
const selected = isContinuous ? resources.filter((resource) => isResourceSelected(resourceSelection[sink.id], resource)) : [];
|
|
@@ -52,7 +57,8 @@ var useCreatePipelineResources = (state, isOpen) => {
|
|
|
52
57
|
toNode: sink.id,
|
|
53
58
|
resource,
|
|
54
59
|
readMode: hasReadLevers ? ReadMode.FULL : ReadMode.UNSPECIFIED,
|
|
55
|
-
writeMode
|
|
60
|
+
writeMode,
|
|
61
|
+
columns: createColumnSelections(sink.id, resource)
|
|
56
62
|
}));
|
|
57
63
|
};
|
|
58
64
|
return create(ValidatePipelineRequestSchema, {
|
|
@@ -78,6 +84,7 @@ var useCreatePipelineResources = (state, isOpen) => {
|
|
|
78
84
|
sinkWriteModes,
|
|
79
85
|
nodeConfigs,
|
|
80
86
|
resourceSelection,
|
|
87
|
+
resourceColumns,
|
|
81
88
|
executionMode,
|
|
82
89
|
resources,
|
|
83
90
|
hasReadLevers,
|
|
@@ -93,7 +100,7 @@ var useCreatePipelineResources = (state, isOpen) => {
|
|
|
93
100
|
});
|
|
94
101
|
const supportedReadModesBySink = useMemo(() => Object.fromEntries((validation?.edges ?? []).map((edge) => [edge.toNode, Object.fromEntries(edge.resources.map((resource) => [resource.resource, resource.supportedReadModes]))])), [validation?.edges]);
|
|
95
102
|
const supportedWriteModesBySink = useMemo(() => Object.fromEntries((validation?.edges ?? []).map((edge) => [edge.toNode, edge.supportedWriteModes])), [validation?.edges]);
|
|
96
|
-
const isLoading = isLoadingResources || isLoadingValidation ||
|
|
103
|
+
const isLoading = isLoadingResources || isLoadingValidation || resourceNames.length > 0 && isLoadingResourceColumns;
|
|
97
104
|
const rowsBySink = useMemo(() => isLoading ? {} : createResourceRowsBySink({
|
|
98
105
|
state,
|
|
99
106
|
resources,
|
|
@@ -122,7 +129,11 @@ var useCreatePipelineResources = (state, isOpen) => {
|
|
|
122
129
|
issuesBySink: useMemo(() => {
|
|
123
130
|
if (isLoading || discoverError) return {};
|
|
124
131
|
const issues = getIssuesBySink(rowsBySink, sinks);
|
|
125
|
-
if (!isContinuous) return
|
|
132
|
+
if (!isContinuous) return Object.fromEntries(sinks.map((sink) => {
|
|
133
|
+
const sinkId = sink.connection.id;
|
|
134
|
+
const columnErrors = (validation?.edges ?? []).filter((edge) => edge.toNode === sinkId).flatMap((edge) => edge.errors).filter((error) => error.field === PipelineResourceStatusField.COLUMNS).map((error) => error.message);
|
|
135
|
+
return [sinkId, [.../* @__PURE__ */ new Set([...issues[sinkId] ?? [], ...columnErrors])]];
|
|
136
|
+
}));
|
|
126
137
|
const graphErrors = [...validationError ? [validationError.message] : [], ...(validation?.errors ?? []).map((error) => error.message)];
|
|
127
138
|
return Object.fromEntries(sinks.map((sink) => {
|
|
128
139
|
const sinkId = sink.connection.id;
|
|
@@ -12,6 +12,7 @@ function applyExecutionMode(state, executionMode) {
|
|
|
12
12
|
resourceSelection: {},
|
|
13
13
|
resourceReadModes: {},
|
|
14
14
|
resourceCursors: {},
|
|
15
|
+
resourceColumns: {},
|
|
15
16
|
resourceWriteModes: {},
|
|
16
17
|
sinkWriteModes: {}
|
|
17
18
|
};
|
|
@@ -29,6 +30,7 @@ function selectSource(state, action) {
|
|
|
29
30
|
resourceSelection: {},
|
|
30
31
|
resourceReadModes: {},
|
|
31
32
|
resourceCursors: {},
|
|
33
|
+
resourceColumns: {},
|
|
32
34
|
resourceWriteModes: {}
|
|
33
35
|
});
|
|
34
36
|
}
|
|
@@ -131,6 +133,19 @@ function setResourceCursor(state, action) {
|
|
|
131
133
|
}
|
|
132
134
|
};
|
|
133
135
|
}
|
|
136
|
+
function setResourceColumns(state, action) {
|
|
137
|
+
const { sinkId, resource, columns } = action.payload;
|
|
138
|
+
return {
|
|
139
|
+
...state,
|
|
140
|
+
resourceColumns: {
|
|
141
|
+
...state.resourceColumns,
|
|
142
|
+
[sinkId]: {
|
|
143
|
+
...state.resourceColumns[sinkId],
|
|
144
|
+
[resource]: columns
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
134
149
|
function setName(state, action) {
|
|
135
150
|
return {
|
|
136
151
|
...state,
|
|
@@ -216,6 +231,7 @@ var createPipelineModalReducer = (state, action) => {
|
|
|
216
231
|
case CreatePipelineModalActionType.SET_RESOURCE_SELECTION: return setResourceSelection(state, action);
|
|
217
232
|
case CreatePipelineModalActionType.SET_RESOURCE_READ_MODE: return setResourceReadMode(state, action);
|
|
218
233
|
case CreatePipelineModalActionType.SET_RESOURCE_CURSOR: return setResourceCursor(state, action);
|
|
234
|
+
case CreatePipelineModalActionType.SET_RESOURCE_COLUMNS: return setResourceColumns(state, action);
|
|
219
235
|
case CreatePipelineModalActionType.SET_RESOURCE_WRITE_MODE: return setResourceWriteMode(state, action);
|
|
220
236
|
case CreatePipelineModalActionType.SET_SINK_WRITE_MODE: return setSinkWriteMode(state, action);
|
|
221
237
|
case CreatePipelineModalActionType.SET_NODE_CONFIG: return setNodeConfig(state, action);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WriteMode } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
1
|
+
import { ReadMode, WriteMode } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
2
2
|
import { CREATE_PIPELINE_MODAL_DEFAULT_READ_MODE, CREATE_PIPELINE_MODAL_DEFAULT_WRITE_MODE } from "./constants.js";
|
|
3
|
-
import { getCompatibleWriteModes, getCursorOptions, getDefaultCursor, getDefaultReadMode, getPipelineResourceStatus } from "../resource/utils.js";
|
|
3
|
+
import { getCompatibleWriteModes, getCursorOptions, getDefaultCursor, getDefaultReadMode, getEffectiveColumnSelection, getLockedColumnNames, getPipelineResourceStatus } from "../resource/utils.js";
|
|
4
4
|
//#region src/pages/pipelines/components/create/rows.ts
|
|
5
5
|
var getDefaultPipelineName = (source, sinks) => {
|
|
6
6
|
const sinkNames = sinks.map((sink) => sink.name).join(", ");
|
|
@@ -11,6 +11,7 @@ var getDefaultPipelineName = (source, sinks) => {
|
|
|
11
11
|
var isResourceSelected = (selection, resource) => resource.isSelectable && (selection?.[resource.name] ?? resource.metadata.default_resources !== "false");
|
|
12
12
|
var createResourceRows = ({ state, sinkId, resources, columns, supportedReadModes, supportedWriteModes, hasReadLevers }) => {
|
|
13
13
|
const columnsByResource = new Map((columns?.resources ?? []).map((entry) => [entry.resource, entry.columns]));
|
|
14
|
+
const selectableResources = new Set((columns?.resources ?? []).filter((entry) => entry.selectableColumns).map((entry) => entry.resource));
|
|
14
15
|
const managedResources = new Set((columns?.resources ?? []).filter((entry) => entry.managedIncremental).map((entry) => entry.resource));
|
|
15
16
|
return resources.map((resource) => {
|
|
16
17
|
const managedIncremental = managedResources.has(resource.name);
|
|
@@ -30,6 +31,17 @@ var createResourceRows = ({ state, sinkId, resources, columns, supportedReadMode
|
|
|
30
31
|
const writeMode = writeModeOptions.includes(storedWriteMode) ? storedWriteMode : writeModeOptions[0] ?? WriteMode.UNSPECIFIED;
|
|
31
32
|
const isSelected = isResourceSelected(state.resourceSelection[sinkId], resource);
|
|
32
33
|
const cursorField = managedIncremental ? "" : state.resourceCursors[sinkId]?.[resource.name] ?? getDefaultCursor(resourceColumns ?? []);
|
|
34
|
+
const storedColumns = state.resourceColumns[sinkId]?.[resource.name];
|
|
35
|
+
const lockedColumns = getLockedColumnNames({
|
|
36
|
+
primaryKey: resource.primaryKey,
|
|
37
|
+
cursor: cursorField,
|
|
38
|
+
isCursorLocked: hasReadLevers && readMode === ReadMode.INCREMENTAL
|
|
39
|
+
});
|
|
40
|
+
const selectedColumns = getEffectiveColumnSelection({
|
|
41
|
+
stored: storedColumns,
|
|
42
|
+
columns: resourceColumns,
|
|
43
|
+
locked: lockedColumns
|
|
44
|
+
});
|
|
33
45
|
return {
|
|
34
46
|
name: resource.name,
|
|
35
47
|
displayName: resource.displayName || resource.name,
|
|
@@ -42,6 +54,10 @@ var createResourceRows = ({ state, sinkId, resources, columns, supportedReadMode
|
|
|
42
54
|
cursorField,
|
|
43
55
|
cursorOptions,
|
|
44
56
|
managedIncremental,
|
|
57
|
+
columns: resourceColumns ?? [],
|
|
58
|
+
selectedColumns,
|
|
59
|
+
lockedColumns,
|
|
60
|
+
isColumnSelectable: selectableResources.has(resource.name) || storedColumns !== void 0,
|
|
45
61
|
status: !hasReadLevers || !isSelected ? void 0 : getPipelineResourceStatus({
|
|
46
62
|
readMode,
|
|
47
63
|
readModeOptions,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ConnectorKind, ExecutionMode, ReadMode, ReplicationMode } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
2
2
|
import { CreatePipelineRequestSchema, CreatePipelineVersionRequestSchema, PipelineEdgeSchema, PipelineNodeSchema, ResourceCursorConfigSchema } from "../../../../gen/ingestion/v1/pipelines_pb.js";
|
|
3
3
|
import { CreatePipelineNotifierRequestSchema } from "../../../../gen/ingestion/v1/notifiers_pb.js";
|
|
4
|
+
import { createResourceColumnSelections } from "../resource/utils.js";
|
|
4
5
|
import { mapPipelineNotifierStateToInput } from "../notifier/utils.js";
|
|
5
6
|
import { parseWorkerConfiguration } from "../worker/utils.js";
|
|
6
7
|
import { create } from "@bufbuild/protobuf";
|
|
@@ -27,6 +28,11 @@ var createCursors = (rows, readMode) => {
|
|
|
27
28
|
lookbackSeconds: 0n
|
|
28
29
|
}));
|
|
29
30
|
};
|
|
31
|
+
var createColumns = (row) => row.isColumnSelectable ? createResourceColumnSelections({
|
|
32
|
+
resource: row.name,
|
|
33
|
+
selected: row.selectedColumns,
|
|
34
|
+
columns: row.columns
|
|
35
|
+
}) : [];
|
|
30
36
|
var createSinkEdges = ({ sourceId, rows, sink, hasReadLevers }) => rows.filter((row) => row.isSelected).map((row) => {
|
|
31
37
|
const readMode = hasReadLevers ? row.readMode : ReadMode.UNSPECIFIED;
|
|
32
38
|
return create(PipelineEdgeSchema, {
|
|
@@ -35,7 +41,8 @@ var createSinkEdges = ({ sourceId, rows, sink, hasReadLevers }) => rows.filter((
|
|
|
35
41
|
toNode: sink.connection.id,
|
|
36
42
|
readMode,
|
|
37
43
|
writeMode: hasReadLevers ? row.writeMode : sink.writeMode,
|
|
38
|
-
cursors: hasReadLevers ? createCursors([row], readMode) : []
|
|
44
|
+
cursors: hasReadLevers ? createCursors([row], readMode) : [],
|
|
45
|
+
columns: createColumns(row)
|
|
39
46
|
});
|
|
40
47
|
});
|
|
41
48
|
var createEdges = ({ sourceConnection, rowsBySink, sinks, hasReadLevers }) => {
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
|
|
2
|
+
import { CreatePipelineModalResourceRow } from '../types';
|
|
3
|
+
interface CreatePipelineModalResourcesProps {
|
|
4
|
+
activeRow?: CreatePipelineModalResourceRow;
|
|
5
|
+
onActiveResourceChange: (name?: CreatePipelineModalResourceRow["name"]) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const CreatePipelineModalResources: FC<CreatePipelineModalResourcesProps>;
|
|
3
8
|
export default CreatePipelineModalResources;
|
|
@@ -20,7 +20,7 @@ var DEFAULT_RESOURCES_STATE = {
|
|
|
20
20
|
search: "",
|
|
21
21
|
isCreating: false
|
|
22
22
|
};
|
|
23
|
-
var CreatePipelineModalResources = () => {
|
|
23
|
+
var CreatePipelineModalResources = ({ activeRow, onActiveResourceChange }) => {
|
|
24
24
|
const { rowsBySink, sinks, activeSinkId, discoverError, executionMode } = useCreatePipelineModalState();
|
|
25
25
|
const { addResource } = useCreatePipelineModalActions();
|
|
26
26
|
const [localState, setLocalState] = useState(DEFAULT_RESOURCES_STATE);
|
|
@@ -99,7 +99,11 @@ var CreatePipelineModalResources = () => {
|
|
|
99
99
|
onCancel: () => setCreating(false),
|
|
100
100
|
variant: WidgetVariant.PRIMARY
|
|
101
101
|
}), /* @__PURE__ */ jsx(Divider, {})] }),
|
|
102
|
-
/* @__PURE__ */ jsx(CreatePipelineModalResourcesTable, {
|
|
102
|
+
/* @__PURE__ */ jsx(CreatePipelineModalResourcesTable, {
|
|
103
|
+
rows: filteredRows,
|
|
104
|
+
activeRow,
|
|
105
|
+
onActiveResourceChange
|
|
106
|
+
})
|
|
103
107
|
]
|
|
104
108
|
});
|
|
105
109
|
};
|