@galaxy-io/filament-ui 0.13.0 → 0.15.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/connections.d.ts +4 -1
- package/dist/api/queries/connections.js +9 -3
- package/dist/api/queries/runs.d.ts +1 -1
- package/dist/components/connections/ConnectorCommandIcon.d.ts +13 -0
- package/dist/components/connections/ConnectorCommandIcon.js +40 -0
- package/dist/components/connections/ConnectorLogoTile.js +4 -16
- package/dist/components/connections/constants.d.ts +2 -0
- package/dist/components/connections/constants.js +6 -1
- package/dist/components/connections/hooks/useConnectorLogoURL.d.ts +5 -0
- package/dist/components/connections/hooks/useConnectorLogoURL.js +24 -0
- package/dist/module/FilamentLayout.js +10 -5
- package/dist/module/commands.js +13 -9
- package/dist/module/hooks.d.ts +7 -2
- package/dist/module/hooks.js +4 -5
- package/dist/module/paths.d.ts +3 -0
- package/dist/module/paths.js +17 -1
- package/dist/module/routes.d.ts +5 -0
- package/dist/module/schemas.d.ts +6 -0
- package/dist/module/schemas.js +6 -1
- package/dist/module/utils.d.ts +14 -0
- package/dist/module/utils.js +8 -0
- package/dist/pages/connections/ConnectionsPage.js +2 -2
- package/dist/pages/connections/components/create/configure/CreateConnectionConfigure.js +8 -14
- package/dist/pages/connections/components/create/select/CreateConnectionSelector.js +1 -1
- package/dist/pages/connections/components/create/select/CreateConnectionSelectorCard.js +1 -1
- package/dist/pages/connections/components/create/utils.d.ts +3 -0
- package/dist/pages/connections/components/create/utils.js +20 -1
- package/dist/pages/connections/components/drawer/ConnectionDrawerWebhook.js +1 -1
- package/dist/pages/connections/components/form/ConnectionForm.js +2 -2
- package/dist/pages/connections/components/form/ConnectionFormPreviewAlert.js +1 -1
- package/dist/pages/connections/constants.d.ts +0 -1
- package/dist/pages/connections/constants.js +1 -6
- package/dist/pages/observability/ObservabilityPage.js +11 -15
- package/dist/pages/observability/components/band/ObservabilityBand.js +19 -15
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasConnections.js +1 -1
- package/dist/pages/pipelines/components/create/CreatePipelineModal.d.ts +3 -0
- package/dist/pages/pipelines/components/create/CreatePipelineModal.js +27 -5
- package/dist/pages/pipelines/components/create/CreatePipelineModalProvider.d.ts +2 -1
- package/dist/pages/pipelines/components/create/CreatePipelineModalProvider.js +3 -3
- package/dist/pages/pipelines/components/create/hooks/useCreatePipelineModalCreateConnection.d.ts +2 -0
- package/dist/pages/pipelines/components/create/hooks/useCreatePipelineModalCreateConnection.js +19 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalConnectionRow.js +2 -1
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalConnectionsPane.js +23 -11
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalConnectionsState.js +2 -6
- package/dist/pages/pipelines/components/create/types.d.ts +3 -0
- package/dist/pages/pipelines/components/create/utils.d.ts +8 -1
- package/dist/pages/pipelines/components/create/utils.js +29 -2
- package/dist/pages/pipelines/components/run/PipelineRunModal.d.ts +3 -0
- package/dist/pages/pipelines/components/run/PipelineRunModal.js +15 -9
- package/dist/pages/pipelines/components/run/types.d.ts +8 -0
- package/dist/pages/pipelines/components/run/utils.d.ts +6 -1
- package/dist/pages/pipelines/components/run/utils.js +12 -1
- package/dist/pages/pipelines/settings/PipelineSettingsPageDanger.js +1 -1
- package/dist/styles.css +1 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { IS_DEBUG } from "../../../../constants.js";
|
|
2
2
|
import { GetConnectorRequestSchema, ValidateConfigRequestSchema } from "../../../../gen/ingestion/v1/connectors_pb.js";
|
|
3
|
-
import { CONNECTOR_KIND_TO_NOUN_MAP } from "../../../../components/connections/constants.js";
|
|
4
3
|
import { formatConnectorName, getConnectorFamily } from "../../../../components/connections/utils.js";
|
|
4
|
+
import { getConnectorVersions } from "../create/utils.js";
|
|
5
|
+
import { CONNECTOR_KIND_TO_NOUN_MAP } from "../../../../components/connections/constants.js";
|
|
5
6
|
import { getConnectionScopedFields, isFieldVisible } from "../../../../components/fields/utils.js";
|
|
6
7
|
import Field from "../../../../components/fields/Field.js";
|
|
7
|
-
import { getConnectorVersions } from "../create/utils.js";
|
|
8
8
|
import { useGetConnectorQuery, useListConnectorsQuery, useValidateConfigMutation } from "../../../../api/queries/connectors.js";
|
|
9
9
|
import ConnectionFormHeader from "./ConnectionFormHeader.js";
|
|
10
10
|
import ConnectionFormPreviewAlert from "./ConnectionFormPreviewAlert.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DOCUMENTATION_URL } from "../../../../constants.js";
|
|
2
|
-
import { CONNECTOR_KIND_TO_PLURAL_NOUN_MAP } from "../../../../components/connections/constants.js";
|
|
3
2
|
import { getConnectorFamilyName } from "../../../../components/connections/utils.js";
|
|
3
|
+
import { CONNECTOR_KIND_TO_PLURAL_NOUN_MAP } from "../../../../components/connections/constants.js";
|
|
4
4
|
import ConnectionKindChip from "../../../../components/connections/ConnectionKindChip.js";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import Flex, { AlignItems, JustifyContent } from "@galaxy-io/dls/layout/Flex";
|
|
@@ -8,6 +8,5 @@ export declare const CREATE_CONNECTION_SELECTOR_SHELF_ORDER: CreateConnectionSel
|
|
|
8
8
|
export declare const CREATE_CONNECTION_SELECTOR_SHELF_TO_LABEL_MAP: Record<CreateConnectionSelectorShelf, string>;
|
|
9
9
|
export declare const CREATE_CONNECTION_SELECTOR_CARD_MIN_HEIGHT = 150;
|
|
10
10
|
export declare const CONNECTOR_KIND_TO_DESCRIPTION_MAP: Record<ConnectorKind, string>;
|
|
11
|
-
export declare const CONNECTOR_KIND_TO_CREATE_TITLE_MAP: Record<ConnectorKind, string>;
|
|
12
11
|
export declare const CONNECTOR_KIND_TO_DOCS_PATH_MAP: Record<ConnectorKind, string>;
|
|
13
12
|
export declare const CONNECTOR_KIND_TO_EMPTY_MESSAGE_MAP: Record<ConnectorKind.SOURCE | ConnectorKind.SINK, string>;
|
|
@@ -13,11 +13,6 @@ var CONNECTOR_KIND_TO_DESCRIPTION_MAP = {
|
|
|
13
13
|
[ConnectorKind.SOURCE]: "Ingest data from external systems",
|
|
14
14
|
[ConnectorKind.SINK]: "Send data to external destinations"
|
|
15
15
|
};
|
|
16
|
-
var CONNECTOR_KIND_TO_CREATE_TITLE_MAP = {
|
|
17
|
-
[ConnectorKind.UNSPECIFIED]: "New connection",
|
|
18
|
-
[ConnectorKind.SOURCE]: "New source",
|
|
19
|
-
[ConnectorKind.SINK]: "New sink"
|
|
20
|
-
};
|
|
21
16
|
var CONNECTOR_KIND_TO_DOCS_PATH_MAP = {
|
|
22
17
|
[ConnectorKind.UNSPECIFIED]: "/pages/connectors/overview/introduction",
|
|
23
18
|
[ConnectorKind.SOURCE]: "/pages/connectors/overview/introduction#sources",
|
|
@@ -28,4 +23,4 @@ var CONNECTOR_KIND_TO_EMPTY_MESSAGE_MAP = {
|
|
|
28
23
|
[ConnectorKind.SINK]: "Connect data sinks to move data out."
|
|
29
24
|
};
|
|
30
25
|
//#endregion
|
|
31
|
-
export { CONNECTION_PIPELINES_PAGE_SIZE,
|
|
26
|
+
export { CONNECTION_PIPELINES_PAGE_SIZE, CONNECTOR_KIND_TO_DESCRIPTION_MAP, CONNECTOR_KIND_TO_DOCS_PATH_MAP, CONNECTOR_KIND_TO_EMPTY_MESSAGE_MAP, CREATE_CONNECTION_SELECTOR_GRID_COLUMNS, CREATE_CONNECTION_SELECTOR_SHELF_ORDER, CREATE_CONNECTION_SELECTOR_SHELF_TO_LABEL_MAP };
|
|
@@ -17,9 +17,7 @@ import { PlusIcon } from "@phosphor-icons/react";
|
|
|
17
17
|
import Button, { ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
18
18
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
19
19
|
import Flex, { FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
20
|
-
import Box from "@galaxy-io/dls/layout/Box";
|
|
21
20
|
import { styled } from "@linaria/react";
|
|
22
|
-
import Divider from "@galaxy-io/dls/layout/Divider";
|
|
23
21
|
import ScrollArea from "@galaxy-io/dls/layout/ScrollArea";
|
|
24
22
|
import GalaxyFilamentWordmark from "@galaxy-io/dls/brand/GalaxyFilamentWordmark";
|
|
25
23
|
import ChartGroupProvider from "@galaxy-io/dls/charts/ChartGroupProvider";
|
|
@@ -68,19 +66,17 @@ var ObservabilityPage = () => {
|
|
|
68
66
|
children: /* @__PURE__ */ jsxs(ScrollArea, {
|
|
69
67
|
ref: scrollRef,
|
|
70
68
|
className: OBSERVABILITY_PAGE_SCROLL_CSS,
|
|
71
|
-
children: [/* @__PURE__ */
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
})
|
|
83
|
-
] }), /* @__PURE__ */ jsx(Flex, {
|
|
69
|
+
children: [/* @__PURE__ */ jsx(ObservabilityLayout, { children: /* @__PURE__ */ jsxs(Flex, {
|
|
70
|
+
direction: FlexDirection.COLUMN,
|
|
71
|
+
gap: 12,
|
|
72
|
+
padding: 16,
|
|
73
|
+
fillWidth: true,
|
|
74
|
+
children: [/* @__PURE__ */ jsx(ObservabilityBand, {}), /* @__PURE__ */ jsxs(ObservabilityBlock, { children: [/* @__PURE__ */ jsx(ObservabilityPipelinesWidget, {}), /* @__PURE__ */ jsxs(ObservabilityBlockSide, { children: [
|
|
75
|
+
/* @__PURE__ */ jsx(ObservabilityScheduledWidget, {}),
|
|
76
|
+
/* @__PURE__ */ jsx(ObservabilityConnectionsWidget, { kind: ConnectorKind.SOURCE }),
|
|
77
|
+
/* @__PURE__ */ jsx(ObservabilityConnectionsWidget, { kind: ConnectorKind.SINK })
|
|
78
|
+
] })] })]
|
|
79
|
+
}) }), /* @__PURE__ */ jsx(Flex, {
|
|
84
80
|
ref: takeoverRef,
|
|
85
81
|
direction: FlexDirection.COLUMN,
|
|
86
82
|
height: OBSERVABILITY_RUNS_TAKEOVER_HEIGHT,
|
|
@@ -2,6 +2,7 @@ import ObservabilityBandMetricTile from "./ObservabilityBandMetricTile.js";
|
|
|
2
2
|
import ObservabilityBandRunsTile from "./ObservabilityBandRunsTile.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import Widget from "@galaxy-io/dls/widget/Widget";
|
|
5
6
|
import { styled } from "@linaria/react";
|
|
6
7
|
//#region src/pages/observability/components/band/ObservabilityBand.tsx
|
|
7
8
|
var ObservabilityBandGrid = /*#__PURE__*/ styled("div")({
|
|
@@ -9,20 +10,23 @@ var ObservabilityBandGrid = /*#__PURE__*/ styled("div")({
|
|
|
9
10
|
class: "filament-ObservabilityBand-ObservabilityBandGrid-o1u9j31d",
|
|
10
11
|
propsAsIs: false
|
|
11
12
|
});
|
|
12
|
-
var ObservabilityBand = () => /* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
var ObservabilityBand = () => /* @__PURE__ */ jsx(Widget, {
|
|
14
|
+
isFlush: true,
|
|
15
|
+
children: /* @__PURE__ */ jsxs(ObservabilityBandGrid, { children: [
|
|
16
|
+
/* @__PURE__ */ jsx(ObservabilityBandRunsTile, {}),
|
|
17
|
+
/* @__PURE__ */ jsx(ObservabilityBandMetricTile, {
|
|
18
|
+
label: "Throughput",
|
|
19
|
+
viewKey: "throughput",
|
|
20
|
+
pivotKey: "throughputPivot",
|
|
21
|
+
isStacked: true
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ jsx(ObservabilityBandMetricTile, {
|
|
24
|
+
label: "Usage",
|
|
25
|
+
viewKey: "usage",
|
|
26
|
+
pivotKey: "usagePivot",
|
|
27
|
+
isStacked: false
|
|
28
|
+
})
|
|
29
|
+
] })
|
|
30
|
+
});
|
|
27
31
|
//#endregion
|
|
28
32
|
export { ObservabilityBand as default };
|
|
@@ -7,7 +7,7 @@ var usePipelineCanvasConnections = () => {
|
|
|
7
7
|
const state = usePipelineCanvasState();
|
|
8
8
|
const connectionNodes = useMemo(() => state.nodes.filter(isConnectionNode), [state.nodes]);
|
|
9
9
|
const connectionIds = useMemo(() => [...new Set(connectionNodes.map((node) => node.data.connectionId))], [connectionNodes]);
|
|
10
|
-
const connections = useGetConnectionQueries(connectionIds);
|
|
10
|
+
const { connections } = useGetConnectionQueries(connectionIds);
|
|
11
11
|
return useMemo(() => {
|
|
12
12
|
const connectionsById = new Map(connections.map((connection) => [connection.id, connection]));
|
|
13
13
|
return new Map(connectionNodes.map((node) => [node.id, connectionsById.get(node.data.connectionId)]));
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
import { CreatePipelineModalSeedSearch } from './types';
|
|
2
3
|
interface CreatePipelineModalProps {
|
|
3
4
|
isOpen: boolean;
|
|
5
|
+
sourceId?: CreatePipelineModalSeedSearch["sourceId"];
|
|
6
|
+
sinkIds?: CreatePipelineModalSeedSearch["sinkIds"];
|
|
4
7
|
onClose: () => void;
|
|
5
8
|
}
|
|
6
9
|
declare const CreatePipelineModal: FC<CreatePipelineModalProps>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { useGetConnectionQueries } from "../../../../api/queries/connections.js";
|
|
1
2
|
import { useOverlaySession } from "../../../../hooks/useOverlaySession.js";
|
|
3
|
+
import { PIPELINE_CREATE_TITLE } from "../../../../components/pipelines/constants.js";
|
|
2
4
|
import { CreatePipelineModalStep } from "./types.js";
|
|
3
5
|
import { CREATE_PIPELINE_MODAL_STEP_TO_IS_PADDED_MAP } from "./constants.js";
|
|
6
|
+
import { getCreatePipelineModalSeedIds, mapConnectionsToCreatePipelineModalSeed } from "./utils.js";
|
|
4
7
|
import CreatePipelineModalProvider, { useCreatePipelineModalState } from "./CreatePipelineModalProvider.js";
|
|
5
8
|
import CreatePipelineModalFooter from "./components/CreatePipelineModalFooter.js";
|
|
6
9
|
import CreatePipelineModalSidebar from "./components/CreatePipelineModalSidebar.js";
|
|
@@ -11,6 +14,7 @@ import CreatePipelineModalResources from "./steps/CreatePipelineModalResources.j
|
|
|
11
14
|
import CreatePipelineModalResourcesColumnsPane from "./steps/components/CreatePipelineModalResourcesColumnsPane.js";
|
|
12
15
|
import { useState } from "react";
|
|
13
16
|
import { jsx } from "react/jsx-runtime";
|
|
17
|
+
import PendingLayout from "@galaxy-io/dls/layout/PendingLayout";
|
|
14
18
|
import Flex, { FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
15
19
|
import { match } from "ts-pattern";
|
|
16
20
|
import Box, { BoxVariant } from "@galaxy-io/dls/layout/Box";
|
|
@@ -46,7 +50,7 @@ var CreatePipelineModalContent = ({ isOpen, onClose }) => {
|
|
|
46
50
|
return /* @__PURE__ */ jsx(Modal, {
|
|
47
51
|
isOpen,
|
|
48
52
|
isFullscreen: true,
|
|
49
|
-
header:
|
|
53
|
+
header: PIPELINE_CREATE_TITLE,
|
|
50
54
|
sidebar: activeRow ? null : /* @__PURE__ */ jsx(CreatePipelineModalSidebar, {}),
|
|
51
55
|
footer: /* @__PURE__ */ jsx(CreatePipelineModalFooter, {}),
|
|
52
56
|
aside: activeRow ? /* @__PURE__ */ jsx(CreatePipelineModalResourcesColumnsPane, {
|
|
@@ -65,16 +69,34 @@ var CreatePipelineModalContent = ({ isOpen, onClose }) => {
|
|
|
65
69
|
})
|
|
66
70
|
});
|
|
67
71
|
};
|
|
68
|
-
var
|
|
69
|
-
const
|
|
70
|
-
|
|
72
|
+
var CreatePipelineModalSession = ({ isOpen, sourceId, sinkIds, onClose }) => {
|
|
73
|
+
const [seedSearch] = useState(() => ({
|
|
74
|
+
sourceId,
|
|
75
|
+
sinkIds
|
|
76
|
+
}));
|
|
77
|
+
const { connections, isLoading } = useGetConnectionQueries(getCreatePipelineModalSeedIds(seedSearch), { retry: false });
|
|
78
|
+
if (isLoading) return /* @__PURE__ */ jsx(Modal, {
|
|
79
|
+
isOpen,
|
|
80
|
+
isFullscreen: true,
|
|
81
|
+
header: PIPELINE_CREATE_TITLE,
|
|
82
|
+
onOpenChange: (isOpen) => {
|
|
83
|
+
if (!isOpen) onClose();
|
|
84
|
+
},
|
|
85
|
+
children: /* @__PURE__ */ jsx(PendingLayout, {})
|
|
86
|
+
});
|
|
71
87
|
return /* @__PURE__ */ jsx(CreatePipelineModalProvider, {
|
|
72
88
|
isOpen,
|
|
89
|
+
seed: mapConnectionsToCreatePipelineModalSeed(seedSearch, connections),
|
|
73
90
|
children: /* @__PURE__ */ jsx(CreatePipelineModalContent, {
|
|
74
91
|
isOpen,
|
|
75
92
|
onClose
|
|
76
93
|
})
|
|
77
|
-
}
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
var CreatePipelineModal = (props) => {
|
|
97
|
+
const session = useOverlaySession(props.isOpen);
|
|
98
|
+
if (!session) return null;
|
|
99
|
+
return /* @__PURE__ */ jsx(CreatePipelineModalSession, { ...props }, session);
|
|
78
100
|
};
|
|
79
101
|
//#endregion
|
|
80
102
|
export { CreatePipelineModal as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { AddNotifierAction, AddResourceAction, GoToStepAction, RemoveNotifierAction, SelectSourceAction, SetActiveSinkAction, SetDescriptionAction, SetExecutionModeAction, SetNameAction, SetNodeConfigAction, SetResourceColumnsAction, SetResourceCursorAction, SetResourcePartitionsAction, SetResourceReadModeAction, SetResourceSelectionAction, SetResourceWriteModeAction, SetScheduleAction, SetSinkWriteModeAction, SetSubmittingAction, SetWorkerConfigurationAction, ToggleSinkAction, UpdateNotifierAction } from './actions';
|
|
3
|
-
import { CreatePipelineModalContextValue } from './types';
|
|
3
|
+
import { CreatePipelineModalContextValue, CreatePipelineModalSeed } from './types';
|
|
4
4
|
export declare const useCreatePipelineModalState: () => CreatePipelineModalContextValue;
|
|
5
5
|
export declare const useCreatePipelineModalActions: () => {
|
|
6
6
|
selectSource: (payload: SelectSourceAction["payload"]) => void;
|
|
@@ -30,6 +30,7 @@ export declare const useCreatePipelineModalActions: () => {
|
|
|
30
30
|
};
|
|
31
31
|
interface CreatePipelineModalProviderProps {
|
|
32
32
|
isOpen: boolean;
|
|
33
|
+
seed: CreatePipelineModalSeed;
|
|
33
34
|
}
|
|
34
35
|
declare const CreatePipelineModalProvider: FC<PropsWithChildren<CreatePipelineModalProviderProps>>;
|
|
35
36
|
export default CreatePipelineModalProvider;
|
|
@@ -7,7 +7,7 @@ import { getDefaultPipelineName } from "./rows.js";
|
|
|
7
7
|
import { getSupportedExecutionModes } from "../../utils.js";
|
|
8
8
|
import { useCreatePipelineResources } from "./hooks/useCreatePipelineResources.js";
|
|
9
9
|
import createPipelineModalReducer from "./reducer.js";
|
|
10
|
-
import {
|
|
10
|
+
import { createSeededCreatePipelineModalState } from "./utils.js";
|
|
11
11
|
import { isPipelineNotifierValid } from "../notifier/utils.js";
|
|
12
12
|
import { formatPipelineScheduleSummary } from "../schedule/utils.js";
|
|
13
13
|
import { parseWorkerConfiguration } from "../worker/utils.js";
|
|
@@ -124,8 +124,8 @@ var useCreatePipelineModalActions = () => {
|
|
|
124
124
|
})
|
|
125
125
|
}), [dispatch]);
|
|
126
126
|
};
|
|
127
|
-
var CreatePipelineModalProvider = ({ isOpen, children }) => {
|
|
128
|
-
const [state, dispatch] = useReducer(createPipelineModalReducer,
|
|
127
|
+
var CreatePipelineModalProvider = ({ isOpen, seed, children }) => {
|
|
128
|
+
const [state, dispatch] = useReducer(createPipelineModalReducer, seed, createSeededCreatePipelineModalState);
|
|
129
129
|
const { rowsBySink, sinks, replication, hasReadLevers, issuesBySink, selectedCountBySink, isLoading, isValidating, discoverError } = useCreatePipelineResources(state, isOpen);
|
|
130
130
|
const value = useMemo(() => {
|
|
131
131
|
const supportedExecutionModes = getSupportedExecutionModes(state.sourceConnection);
|
package/dist/pages/pipelines/components/create/hooks/useCreatePipelineModalCreateConnection.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Flow } from "../../../../../module/types.js";
|
|
2
|
+
import { useFilamentFlowOpen } from "../../../../../module/hooks.js";
|
|
3
|
+
import { mapCreatePipelineModalSeedToSearch } from "../utils.js";
|
|
4
|
+
import { useCreatePipelineModalState } from "../CreatePipelineModalProvider.js";
|
|
5
|
+
//#region src/pages/pipelines/components/create/hooks/useCreatePipelineModalCreateConnection.ts
|
|
6
|
+
var useCreatePipelineModalCreateConnection = (connectorKind) => {
|
|
7
|
+
const openFlow = useFilamentFlowOpen();
|
|
8
|
+
const { sourceConnection, sinkConnections } = useCreatePipelineModalState();
|
|
9
|
+
return () => openFlow(Flow.CREATE_CONNECTION, {
|
|
10
|
+
...mapCreatePipelineModalSeedToSearch({
|
|
11
|
+
sourceConnection,
|
|
12
|
+
sinkConnections
|
|
13
|
+
}),
|
|
14
|
+
connectorKind,
|
|
15
|
+
returnFlow: Flow.CREATE_PIPELINE
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { useCreatePipelineModalCreateConnection };
|
package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalConnectionRow.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConnectorKind } from "../../../../../../gen/ingestion/v1/common_pb.js";
|
|
2
2
|
import ConnectorTile from "../../../../../../components/connections/ConnectorTile.js";
|
|
3
|
+
import { isCreatePipelineModalConnectionSelectable } from "../../utils.js";
|
|
3
4
|
import { useCreatePipelineModalActions, useCreatePipelineModalState } from "../../CreatePipelineModalProvider.js";
|
|
4
5
|
import CreatePipelineModalConnectionRowFrame from "./CreatePipelineModalConnectionRowFrame.js";
|
|
5
6
|
/* empty css */
|
|
@@ -19,7 +20,7 @@ var CreatePipelineModalConnectionRow = ({ connection, kind }) => {
|
|
|
19
20
|
const { sourceConnection, sinkConnections, executionMode } = useCreatePipelineModalState();
|
|
20
21
|
const { selectSource, toggleSink } = useCreatePipelineModalActions();
|
|
21
22
|
const isSource = kind === ConnectorKind.SOURCE;
|
|
22
|
-
const isDisabled =
|
|
23
|
+
const isDisabled = !isCreatePipelineModalConnectionSelectable(connection, executionMode);
|
|
23
24
|
const handleClick = () => {
|
|
24
25
|
if (isSource) {
|
|
25
26
|
selectSource(connection);
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { CONNECTOR_KIND_TO_PLURAL_NOUN_MAP } from "../../../../../../components/connections/constants.js";
|
|
1
|
+
import { CONNECTOR_KIND_TO_CREATE_TITLE_MAP, CONNECTOR_KIND_TO_PLURAL_NOUN_MAP } from "../../../../../../components/connections/constants.js";
|
|
2
2
|
import { createListConnectionsInput, useListConnectionsInfiniteQuery } from "../../../../../../api/queries/connections.js";
|
|
3
|
+
import { useCreatePipelineModalCreateConnection } from "../../hooks/useCreatePipelineModalCreateConnection.js";
|
|
3
4
|
import CreatePipelineModalConnectionRowFrame from "./CreatePipelineModalConnectionRowFrame.js";
|
|
4
5
|
import CreatePipelineModalConnectionRow from "./CreatePipelineModalConnectionRow.js";
|
|
5
6
|
import CreatePipelineModalConnectionsState from "./CreatePipelineModalConnectionsState.js";
|
|
7
|
+
import { PlusIcon } from "@phosphor-icons/react";
|
|
8
|
+
import Button, { ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
6
9
|
import { useState } from "react";
|
|
7
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
11
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
@@ -18,6 +21,7 @@ import { useEndReached } from "@galaxy-io/dls/hooks/useEndReached";
|
|
|
18
21
|
var DEFAULT_STATE = { q: "" };
|
|
19
22
|
var CreatePipelineModalConnectionsPane = ({ kind }) => {
|
|
20
23
|
const [state, setState] = useState(DEFAULT_STATE);
|
|
24
|
+
const handleCreateConnection = useCreatePipelineModalCreateConnection(kind);
|
|
21
25
|
const handleSearch = (q) => {
|
|
22
26
|
setState((prev) => ({
|
|
23
27
|
...prev,
|
|
@@ -93,19 +97,27 @@ var CreatePipelineModalConnectionsPane = ({ kind }) => {
|
|
|
93
97
|
basis: 0,
|
|
94
98
|
minWidth: 0,
|
|
95
99
|
children: [
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
alignItems: AlignItems.
|
|
98
|
-
direction: FlexDirection.COLUMN,
|
|
100
|
+
/* @__PURE__ */ jsxs(Flex, {
|
|
101
|
+
alignItems: AlignItems.CENTER,
|
|
99
102
|
gap: 8,
|
|
100
103
|
padding: 8,
|
|
101
104
|
fillWidth: true,
|
|
102
|
-
children: /* @__PURE__ */ jsx(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
children: [/* @__PURE__ */ jsx(FlexItem, {
|
|
106
|
+
grow: 1,
|
|
107
|
+
minWidth: 0,
|
|
108
|
+
children: /* @__PURE__ */ jsx(SearchInput, {
|
|
109
|
+
ariaLabel: `Search ${CONNECTOR_KIND_TO_PLURAL_NOUN_MAP[kind]}`,
|
|
110
|
+
placeholder: `Search ${CONNECTOR_KIND_TO_PLURAL_NOUN_MAP[kind]}...`,
|
|
111
|
+
debounceMs: 300,
|
|
112
|
+
onSearch: handleSearch,
|
|
113
|
+
fillWidth: true
|
|
114
|
+
})
|
|
115
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
116
|
+
label: CONNECTOR_KIND_TO_CREATE_TITLE_MAP[kind],
|
|
117
|
+
icon: PlusIcon,
|
|
118
|
+
variant: ButtonVariant.SECONDARY,
|
|
119
|
+
onClick: handleCreateConnection
|
|
120
|
+
})]
|
|
109
121
|
}),
|
|
110
122
|
/* @__PURE__ */ jsx(Divider, {}),
|
|
111
123
|
renderList()
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Flow } from "../../../../../../module/types.js";
|
|
2
|
-
import { useFilamentFlowOpen } from "../../../../../../module/hooks.js";
|
|
3
1
|
import { IS_DEBUG } from "../../../../../../constants.js";
|
|
4
2
|
import { CONNECTOR_KIND_TO_NOUN_MAP } from "../../../../../../components/connections/constants.js";
|
|
3
|
+
import { useCreatePipelineModalCreateConnection } from "../../hooks/useCreatePipelineModalCreateConnection.js";
|
|
5
4
|
import { PlusIcon } from "@phosphor-icons/react";
|
|
6
5
|
import Button from "@galaxy-io/dls/buttons/Button";
|
|
7
6
|
import ErrorLayout, { ErrorLayoutSize } from "@galaxy-io/dls/layout/ErrorLayout";
|
|
@@ -10,10 +9,7 @@ import Flex, { AlignItems, JustifyContent } from "@galaxy-io/dls/layout/Flex";
|
|
|
10
9
|
import EmptyLayout, { EmptyLayoutSize } from "@galaxy-io/dls/layout/EmptyLayout";
|
|
11
10
|
//#region src/pages/pipelines/components/create/steps/components/CreatePipelineModalConnectionsState.tsx
|
|
12
11
|
var CreatePipelineModalConnectionsState = ({ message, error, connectorKind }) => {
|
|
13
|
-
const
|
|
14
|
-
const handleCreateConnection = () => {
|
|
15
|
-
openFlow(Flow.CREATE_CONNECTION, { connectorKind });
|
|
16
|
-
};
|
|
12
|
+
const handleCreateConnection = useCreatePipelineModalCreateConnection(connectorKind);
|
|
17
13
|
const actions = /* @__PURE__ */ jsx(Button, {
|
|
18
14
|
label: `Create ${CONNECTOR_KIND_TO_NOUN_MAP[connectorKind]}`,
|
|
19
15
|
icon: PlusIcon,
|
|
@@ -6,6 +6,7 @@ import { PipelineNodeConfig } from '../node/types';
|
|
|
6
6
|
import { PipelineNotifier } from '../notifier/types';
|
|
7
7
|
import { PipelineResourceStatus } from '../resource/types';
|
|
8
8
|
import { PipelineScheduleState } from '../schedule/types';
|
|
9
|
+
import { FilamentFlowSeed } from '../../../../module/schemas';
|
|
9
10
|
export declare enum CreatePipelineModalStep {
|
|
10
11
|
CONNECTIONS = "CONNECTIONS",
|
|
11
12
|
RESOURCES = "RESOURCES",
|
|
@@ -35,6 +36,8 @@ export interface CreatePipelineModalState {
|
|
|
35
36
|
workerConfiguration: string;
|
|
36
37
|
isSubmitting: boolean;
|
|
37
38
|
}
|
|
39
|
+
export type CreatePipelineModalSeed = Pick<CreatePipelineModalState, "sourceConnection" | "sinkConnections">;
|
|
40
|
+
export type CreatePipelineModalSeedSearch = Pick<FilamentFlowSeed, "sourceId" | "sinkIds">;
|
|
38
41
|
export interface CreatePipelineModalResourceRow {
|
|
39
42
|
name: Resource["name"];
|
|
40
43
|
displayName: Resource["displayName"];
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExecutionMode } from '../../../../gen/ingestion/v1/common_pb';
|
|
2
|
+
import { Connection } from '../../../../gen/ingestion/v1/connections_pb';
|
|
3
|
+
import { CreatePipelineModalSeed, CreatePipelineModalSeedSearch, CreatePipelineModalState } from './types';
|
|
2
4
|
export declare const createInitialCreatePipelineModalState: () => CreatePipelineModalState;
|
|
5
|
+
export declare const isCreatePipelineModalConnectionSelectable: (connection: Connection, executionMode: ExecutionMode) => boolean;
|
|
6
|
+
export declare const getCreatePipelineModalSeedIds: ({ sourceId, sinkIds, }: CreatePipelineModalSeedSearch) => Connection["id"][];
|
|
7
|
+
export declare const mapConnectionsToCreatePipelineModalSeed: ({ sourceId, sinkIds }: CreatePipelineModalSeedSearch, connections: Connection[]) => CreatePipelineModalSeed;
|
|
8
|
+
export declare const createSeededCreatePipelineModalState: ({ sourceConnection, sinkConnections, }: CreatePipelineModalSeed) => CreatePipelineModalState;
|
|
9
|
+
export declare const mapCreatePipelineModalSeedToSearch: ({ sourceConnection, sinkConnections, }: CreatePipelineModalSeed) => CreatePipelineModalSeedSearch;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { ExecutionMode } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
1
|
+
import { ConnectorKind, ExecutionMode } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
2
|
+
import { CreatePipelineModalActionType } from "./actions.js";
|
|
2
3
|
import { CreatePipelineModalStep } from "./types.js";
|
|
3
4
|
import { CREATE_PIPELINE_MODAL_DEFAULT_CRON } from "./constants.js";
|
|
5
|
+
import createPipelineModalReducer from "./reducer.js";
|
|
4
6
|
import { PIPELINE_SCHEDULE_DEFAULT_STATE } from "../schedule/constants.js";
|
|
5
7
|
import { PIPELINE_WORKER_CONFIGURATION_DEFAULT_TEXT } from "../worker/constants.js";
|
|
8
|
+
import { match } from "ts-pattern";
|
|
6
9
|
//#region src/pages/pipelines/components/create/utils.ts
|
|
7
10
|
var createInitialCreatePipelineModalState = () => ({
|
|
8
11
|
executionMode: ExecutionMode.BOUNDED,
|
|
@@ -30,5 +33,29 @@ var createInitialCreatePipelineModalState = () => ({
|
|
|
30
33
|
workerConfiguration: PIPELINE_WORKER_CONFIGURATION_DEFAULT_TEXT,
|
|
31
34
|
isSubmitting: false
|
|
32
35
|
});
|
|
36
|
+
var isCreatePipelineModalConnectionSelectable = (connection, executionMode) => match(connection.kind).with(ConnectorKind.SOURCE, () => connection.executionModes.length > 0).with(ConnectorKind.SINK, () => connection.executionModes.includes(executionMode)).otherwise(() => false);
|
|
37
|
+
var getCreatePipelineModalSeedIds = ({ sourceId, sinkIds = [] }) => [...new Set(sourceId ? [sourceId, ...sinkIds] : sinkIds)];
|
|
38
|
+
var mapConnectionsToCreatePipelineModalSeed = ({ sourceId, sinkIds = [] }, connections) => {
|
|
39
|
+
const liveConnections = connections.filter((connection) => !connection.deletedAt);
|
|
40
|
+
return {
|
|
41
|
+
sourceConnection: liveConnections.find((connection) => connection.id === sourceId && connection.kind === ConnectorKind.SOURCE) ?? null,
|
|
42
|
+
sinkConnections: liveConnections.filter((connection) => sinkIds.includes(connection.id) && connection.kind === ConnectorKind.SINK)
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
var createSeededCreatePipelineModalState = ({ sourceConnection, sinkConnections }) => {
|
|
46
|
+
const initialState = createInitialCreatePipelineModalState();
|
|
47
|
+
const sourceState = sourceConnection && isCreatePipelineModalConnectionSelectable(sourceConnection, initialState.executionMode) ? createPipelineModalReducer(initialState, {
|
|
48
|
+
type: CreatePipelineModalActionType.SELECT_SOURCE,
|
|
49
|
+
payload: sourceConnection
|
|
50
|
+
}) : initialState;
|
|
51
|
+
return sinkConnections.filter((sinkConnection) => isCreatePipelineModalConnectionSelectable(sinkConnection, sourceState.executionMode)).reduce((state, sinkConnection) => createPipelineModalReducer(state, {
|
|
52
|
+
type: CreatePipelineModalActionType.TOGGLE_SINK,
|
|
53
|
+
payload: sinkConnection
|
|
54
|
+
}), sourceState);
|
|
55
|
+
};
|
|
56
|
+
var mapCreatePipelineModalSeedToSearch = ({ sourceConnection, sinkConnections }) => ({
|
|
57
|
+
sourceId: sourceConnection?.id,
|
|
58
|
+
sinkIds: sinkConnections.length ? sinkConnections.map((sink) => sink.id) : void 0
|
|
59
|
+
});
|
|
33
60
|
//#endregion
|
|
34
|
-
export { createInitialCreatePipelineModalState };
|
|
61
|
+
export { createInitialCreatePipelineModalState, createSeededCreatePipelineModalState, getCreatePipelineModalSeedIds, isCreatePipelineModalConnectionSelectable, mapConnectionsToCreatePipelineModalSeed, mapCreatePipelineModalSeedToSearch };
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { Pipeline } from '../../../../gen/ingestion/v1/pipelines_pb';
|
|
3
|
+
import { PipelineRunModalSeed } from './types';
|
|
3
4
|
interface PipelineRunModalProps {
|
|
4
5
|
isOpen: boolean;
|
|
5
6
|
pipelineId?: Pipeline["id"];
|
|
7
|
+
resources?: PipelineRunModalSeed["resources"];
|
|
8
|
+
resyncResources?: PipelineRunModalSeed["resyncResources"];
|
|
6
9
|
onClose: () => void;
|
|
7
10
|
}
|
|
8
11
|
declare const PipelineRunModal: FC<PipelineRunModalProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilamentPath } from "../../../../module/paths.js";
|
|
1
|
+
import { FilamentPath, createFilamentFlowSearch } from "../../../../module/paths.js";
|
|
2
2
|
import { useFilamentNavigate } from "../../../../module/hooks.js";
|
|
3
3
|
import { IS_DEBUG } from "../../../../constants.js";
|
|
4
4
|
import { isNotFoundError } from "../../../../utils/errors.js";
|
|
@@ -12,7 +12,7 @@ import { getPipelineResources } from "../../utils.js";
|
|
|
12
12
|
import { formatWorkerConfiguration, isWorkerConfigurationEqual, parseWorkerConfiguration } from "../worker/utils.js";
|
|
13
13
|
import PipelineWorkerConfigurationEditor from "../worker/PipelineWorkerConfigurationEditor.js";
|
|
14
14
|
import PipelineRunModalSectionChip from "./PipelineRunModalSectionChip.js";
|
|
15
|
-
import { canPipelineRunResync, canPipelineRunSubset } from "./utils.js";
|
|
15
|
+
import { canPipelineRunResync, canPipelineRunSubset, createPipelineRunModalState } from "./utils.js";
|
|
16
16
|
import PipelineRunModalResourcesPane from "./PipelineRunModalResourcesPane.js";
|
|
17
17
|
import { usePipelineRun } from "../../hooks/usePipelineRun.js";
|
|
18
18
|
import { CaretRightIcon, PlayIcon } from "@phosphor-icons/react";
|
|
@@ -27,7 +27,7 @@ import Widget from "@galaxy-io/dls/widget/Widget";
|
|
|
27
27
|
import Icon, { IconVariant, IconWeight } from "@galaxy-io/dls/icons/Icon";
|
|
28
28
|
import Modal, { ModalSize } from "@galaxy-io/dls/modal/Modal";
|
|
29
29
|
//#region src/pages/pipelines/components/run/PipelineRunModal.tsx
|
|
30
|
-
var PipelineRunModalContent = ({ isOpen, pipeline, onClose }) => {
|
|
30
|
+
var PipelineRunModalContent = ({ isOpen, pipeline, seed, onClose }) => {
|
|
31
31
|
const navigate = useFilamentNavigate();
|
|
32
32
|
const { startRun, isRunning } = usePipelineRun();
|
|
33
33
|
const { workerConfiguration, currentVersion } = pipeline;
|
|
@@ -42,11 +42,10 @@ var PipelineRunModalContent = ({ isOpen, pipeline, onClose }) => {
|
|
|
42
42
|
const canResync = canPipelineRunResync(pipeline, sourceData?.connection);
|
|
43
43
|
const hasResourceOptions = canSubset || canResync;
|
|
44
44
|
const defaultWorkerConfiguration = formatWorkerConfiguration(workerConfiguration);
|
|
45
|
-
const [state, setState] = useState(() => ({
|
|
45
|
+
const [state, setState] = useState(() => createPipelineRunModalState({
|
|
46
|
+
resources,
|
|
46
47
|
workerConfiguration: defaultWorkerConfiguration,
|
|
47
|
-
|
|
48
|
-
resyncResources: [],
|
|
49
|
-
isResourcesPaneOpen: false
|
|
48
|
+
seed
|
|
50
49
|
}));
|
|
51
50
|
const parsed = parseWorkerConfiguration(state.workerConfiguration);
|
|
52
51
|
const isWorkerDefault = state.workerConfiguration === defaultWorkerConfiguration || !parsed.error && isWorkerConfigurationEqual(parsed.configuration, workerConfiguration);
|
|
@@ -85,7 +84,10 @@ var PipelineRunModalContent = ({ isOpen, pipeline, onClose }) => {
|
|
|
85
84
|
onSuccess: () => void navigate({
|
|
86
85
|
to: FilamentPath.PIPELINE_CANVAS,
|
|
87
86
|
params: { id: pipeline.id },
|
|
88
|
-
search: (
|
|
87
|
+
search: (prev) => ({
|
|
88
|
+
...prev,
|
|
89
|
+
...createFilamentFlowSearch()
|
|
90
|
+
})
|
|
89
91
|
})
|
|
90
92
|
});
|
|
91
93
|
};
|
|
@@ -197,7 +199,7 @@ var PipelineRunModalContent = ({ isOpen, pipeline, onClose }) => {
|
|
|
197
199
|
})
|
|
198
200
|
});
|
|
199
201
|
};
|
|
200
|
-
var PipelineRunModal = ({ isOpen, pipelineId, onClose }) => {
|
|
202
|
+
var PipelineRunModal = ({ isOpen, pipelineId, resources, resyncResources, onClose }) => {
|
|
201
203
|
const session = useOverlaySession(isOpen);
|
|
202
204
|
const heldPipelineId = useOverlayRecord(isOpen, pipelineId);
|
|
203
205
|
const { data, error, isError } = useGetPipelineQuery({
|
|
@@ -241,6 +243,10 @@ var PipelineRunModal = ({ isOpen, pipelineId, onClose }) => {
|
|
|
241
243
|
return /* @__PURE__ */ jsx(PipelineRunModalContent, {
|
|
242
244
|
isOpen,
|
|
243
245
|
pipeline: data.pipeline,
|
|
246
|
+
seed: {
|
|
247
|
+
resources,
|
|
248
|
+
resyncResources
|
|
249
|
+
},
|
|
244
250
|
onClose
|
|
245
251
|
}, session);
|
|
246
252
|
};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
import { FilamentFlowSeed } from '../../../../module/schemas';
|
|
1
2
|
export declare enum PipelineRunResourceMode {
|
|
2
3
|
CONTINUE = "CONTINUE",
|
|
3
4
|
RESYNC = "RESYNC"
|
|
4
5
|
}
|
|
6
|
+
export interface PipelineRunModalState {
|
|
7
|
+
workerConfiguration: string;
|
|
8
|
+
selectedResources: string[];
|
|
9
|
+
resyncResources: string[];
|
|
10
|
+
isResourcesPaneOpen: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type PipelineRunModalSeed = Pick<FilamentFlowSeed, "resources" | "resyncResources">;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Connection } from '../../../../gen/ingestion/v1/connections_pb';
|
|
2
2
|
import { Pipeline } from '../../../../gen/ingestion/v1/pipelines_pb';
|
|
3
|
-
import { PipelineRunResourceMode } from './types';
|
|
3
|
+
import { PipelineRunModalSeed, PipelineRunModalState, PipelineRunResourceMode } from './types';
|
|
4
4
|
export declare const canPipelineRunSubset: (pipeline: Pipeline, source: Connection | undefined) => boolean;
|
|
5
5
|
export declare const canPipelineRunResync: (pipeline: Pipeline, source: Connection | undefined) => boolean;
|
|
6
6
|
export declare const setPipelineRunResourceMode: (resources: string[], resyncResources: string[], targets: string[], mode: PipelineRunResourceMode) => string[];
|
|
7
|
+
export declare const createPipelineRunModalState: ({ resources, workerConfiguration, seed, }: {
|
|
8
|
+
resources: string[];
|
|
9
|
+
workerConfiguration: PipelineRunModalState["workerConfiguration"];
|
|
10
|
+
seed: PipelineRunModalSeed;
|
|
11
|
+
}) => PipelineRunModalState;
|
|
@@ -4,5 +4,16 @@ import { PipelineRunResourceMode } from "./types.js";
|
|
|
4
4
|
var canPipelineRunSubset = (pipeline, source) => pipeline.executionMode !== ExecutionMode.CONTINUOUS && !!source && source.replication !== ReplicationMode.CDC;
|
|
5
5
|
var canPipelineRunResync = (pipeline, source) => pipeline.executionMode !== ExecutionMode.CONTINUOUS || source?.replication === ReplicationMode.CDC;
|
|
6
6
|
var setPipelineRunResourceMode = (resources, resyncResources, targets, mode) => resources.filter((resource) => targets.includes(resource) ? mode === PipelineRunResourceMode.RESYNC : resyncResources.includes(resource));
|
|
7
|
+
var createPipelineRunModalState = ({ resources, workerConfiguration, seed }) => {
|
|
8
|
+
const seededResources = resources.filter((resource) => seed.resources?.includes(resource));
|
|
9
|
+
const selectedResources = seededResources.length ? seededResources : resources;
|
|
10
|
+
const resyncResources = selectedResources.filter((resource) => seed.resyncResources?.includes(resource));
|
|
11
|
+
return {
|
|
12
|
+
workerConfiguration,
|
|
13
|
+
selectedResources,
|
|
14
|
+
resyncResources,
|
|
15
|
+
isResourcesPaneOpen: selectedResources.length < resources.length || resyncResources.length > 0
|
|
16
|
+
};
|
|
17
|
+
};
|
|
7
18
|
//#endregion
|
|
8
|
-
export { canPipelineRunResync, canPipelineRunSubset, setPipelineRunResourceMode };
|
|
19
|
+
export { canPipelineRunResync, canPipelineRunSubset, createPipelineRunModalState, setPipelineRunResourceMode };
|
|
@@ -22,7 +22,7 @@ var PipelineSettingsPageDanger = () => {
|
|
|
22
22
|
const { id } = usePipelineParams();
|
|
23
23
|
const { data } = useSuspenseGetPipelineQuery({ input: createGetPipelineInput(id) });
|
|
24
24
|
const pipeline = data.pipeline;
|
|
25
|
-
const sourceConnections = useGetConnectionQueries(getPipelineSourceConnectionIds(pipeline));
|
|
25
|
+
const { connections: sourceConnections } = useGetConnectionQueries(getPipelineSourceConnectionIds(pipeline));
|
|
26
26
|
const { mutate: deletePipeline } = useDeletePipelineMutation();
|
|
27
27
|
const { handleOpen, isOpen, target, handleClose, handleConfirm } = useConfirm({
|
|
28
28
|
entityLabel: "Pipeline",
|
package/dist/styles.css
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionIsland-c1w1vqzw{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--gx-color-border-primary);border-radius:var(--gx-radius-lg);background-color:var(--gx-color-background-secondary);}
|
|
11
11
|
.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionBody-c146pte1{display:grid;grid-template-rows:var(--c146pte1-0);visibility:var(--c146pte1-1);transition:grid-template-rows var(--gx-duration-base) ease-in-out,visibility 0s linear var(--c146pte1-2);}@media (prefers-reduced-motion: reduce){.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionBody-c146pte1{transition:none;}}
|
|
12
12
|
.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionToggle-c1xznl66{appearance:none;background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;width:100%;min-height:40px;flex-shrink:0;padding:0 var(--gx-space-12);cursor:pointer;transition:background-color var(--gx-duration-fast);}.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionToggle-c1xznl66:focus-visible{outline:1px solid var(--gx-color-border-focused);outline-offset:1px;}.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionToggle-c1xznl66:focus:not(:focus-visible){outline:none;}.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionToggle-c1xznl66:hover{background-color:var(--gx-color-background-hovered);}
|
|
13
|
+
.filament-ConnectorCommandIcon-ConnectorCommandLogo-c8phpdh{display:block;flex-shrink:0;width:14px;height:14px;object-fit:contain;}
|
|
13
14
|
.filament-EmptyGraphicGhostBar-EmptyGraphicGhostBar-e1loui4w{width:var(--e1loui4w-0);height:12px;background-color:var(--gx-color-background-secondary);border-radius:var(--gx-radius-sm);}
|
|
14
15
|
.filament-EmptyGraphicGhostTileFallback-EmptyGraphicGhostTileFallback-e9h9bvp{width:24px;height:24px;background-color:var(--gx-color-background-secondary);border:1px solid var(--gx-color-border-primary);border-radius:var(--gx-radius-md);}
|
|
15
16
|
.filament-EmptyGraphicGhostTile-EmptyGraphicGhostTile-e1yzbkrz{display:flex;opacity:0.3;}
|