@galaxy-io/filament-ui 0.15.0 → 0.16.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/README.md +8 -1
- package/dist/module/FilamentLayout.d.ts +2 -0
- package/dist/module/FilamentLayout.js +43 -38
- package/dist/module/GalaxyProductsProvider.d.ts +8 -0
- package/dist/module/GalaxyProductsProvider.js +11 -0
- package/dist/module/commands.js +2 -2
- package/dist/module/constants.d.ts +2 -1
- package/dist/module/constants.js +3 -2
- package/dist/module/nav.js +1 -1
- package/dist/module/paths.d.ts +3 -1
- package/dist/module/paths.js +2 -1
- package/dist/module/schemas.js +1 -1
- package/dist/module/types.d.ts +5 -0
- package/dist/module/types.js +6 -1
- package/dist/pages/connections/ConnectionsPage.js +1 -1
- package/dist/pages/connections/components/drawer/ConnectionDrawerActions.js +13 -3
- package/dist/pages/connections/constants.d.ts +3 -0
- package/dist/pages/connections/constants.js +6 -1
- package/dist/pages/observability/ObservabilityPage.js +1 -1
- package/dist/pages/observability/components/setup/constants.js +1 -1
- package/dist/pages/pipelines/components/header/PipelinePageRunActions.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ pnpm check:host # type-check and build the fixture host against the package
|
|
|
40
40
|
|
|
41
41
|
| Subpath | What |
|
|
42
42
|
|---|---|
|
|
43
|
-
| `./paths` | `FilamentPath` and `
|
|
43
|
+
| `./paths` | `FilamentPath`, `createFilamentHref` and `createFilamentFlowSearch` |
|
|
44
44
|
| `./routes` | one `*RouteOptions` per page, plus `filamentLayoutRouteOptions` and `filamentNotFoundRouteOptions` |
|
|
45
45
|
| `./FilamentLayout` | the shell, its sidebar and the URL-driven drawer and modals |
|
|
46
46
|
| `./commands` | `useFilamentCommandItems({ base, transport })` for a host command palette |
|
|
@@ -62,6 +62,13 @@ pnpm check:host # type-check and build the fixture host against the package
|
|
|
62
62
|
6. **Own the query client.** Filament works with TanStack's defaults. Skip retries for `NotFound`, `PermissionDenied`, `Unauthenticated`, `InvalidArgument` and `Unimplemented`, or a missing pipeline retries for about 7s before its not-found page. A `staleTime` of 30s is recommended.
|
|
63
63
|
7. **Proxy** `/ingestion.v1.IngestionService`, `/metrics.v1.MetricsService` and `/auth.v1.AuthService` to the Filament API at the transport's `baseUrl`. When another product also serves `metrics.v1.MetricsService`, put one product behind a prefix.
|
|
64
64
|
8. **Give the layout a box.** `FilamentLayout` fills its parent, so the parent needs a definite height (a flex child with `min-height: 0`).
|
|
65
|
+
9. **Tell Filament where the other Galaxy products live** with `productUrls` on `FilamentLayout`, keyed by `GalaxyProduct` from `./paths`. Each is the product's mount path on the same origin, such as `{ alchemy: "/functions" }`, or its full URL when it runs on its own domain. A product left out gets no links.
|
|
66
|
+
|
|
67
|
+
### Links into other Galaxy products
|
|
68
|
+
|
|
69
|
+
Galaxy products hand people to each other with one shape. The callee owns its link format in a component-free `./links` export, such as `createAlchemyFunctionHref` and `parseAlchemyReturnSearch` from `@galaxy-io/alchemy-ui/links`. The link carries a seed, a `returnTo` and a `returnLabel` naming the screen that asked, and the result comes back on `returnTo` as search keys prefixed with the callee's name, such as `alchemyFunctionId`. A cancel comes back without them.
|
|
70
|
+
|
|
71
|
+
Library code reads a product's URL with `useGalaxyProductUrl(GalaxyProduct.ALCHEMY)` and hides the entry point when it is undefined. The standalone server writes its runtime config into `index.html` as the JSON script `filament-runtime-config`, with `products` set by the `GALAXY_<PRODUCT>_URL` variables, and the standalone app passes them to `FilamentLayout`. Every product reads the same variables, and a callee sends people back only to the origins of the products it was given, so a standalone pair sets both URLs on both servers. A new product adds itself to `GalaxyProduct`, to `products` in `ui/config.go` and to `galaxy.productUrls` in the chart.
|
|
65
72
|
|
|
66
73
|
### Releasing
|
|
67
74
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { GalaxyProductUrls } from './types';
|
|
2
3
|
export interface FilamentLayoutProps {
|
|
3
4
|
sidebarFooter?: ReactNode;
|
|
5
|
+
productUrls?: GalaxyProductUrls;
|
|
4
6
|
}
|
|
5
7
|
declare const FilamentLayout: FC<FilamentLayoutProps>;
|
|
6
8
|
export default FilamentLayout;
|
|
@@ -7,11 +7,13 @@ import ConnectionDrawer from "../pages/connections/components/drawer/ConnectionD
|
|
|
7
7
|
import EditConnectionModal from "../pages/connections/components/edit/EditConnectionModal.js";
|
|
8
8
|
import CreatePipelineModal from "../pages/pipelines/components/create/CreatePipelineModal.js";
|
|
9
9
|
import PipelineRunModal from "../pages/pipelines/components/run/PipelineRunModal.js";
|
|
10
|
+
import { GALAXY_DEFAULT_PRODUCT_URLS } from "./constants.js";
|
|
11
|
+
import { GalaxyProductsProvider } from "./GalaxyProductsProvider.js";
|
|
10
12
|
import { useCallback } from "react";
|
|
11
13
|
import { Outlet } from "@tanstack/react-router";
|
|
12
|
-
import {
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
15
|
//#region src/module/FilamentLayout.tsx
|
|
14
|
-
var FilamentLayout = ({ sidebarFooter }) => {
|
|
16
|
+
var FilamentLayout = ({ sidebarFooter, productUrls = GALAXY_DEFAULT_PRODUCT_URLS }) => {
|
|
15
17
|
const updateSearch = useFilamentSearchUpdate();
|
|
16
18
|
const { connectionId, pipelineId, flow, connector, connectorKind, connectorSearch, sourceId, sinkIds, resources, resyncResources } = useFilamentLayoutSearch();
|
|
17
19
|
const handleCloseDrawer = useCallback(() => {
|
|
@@ -29,42 +31,45 @@ var FilamentLayout = ({ sidebarFooter }) => {
|
|
|
29
31
|
...createFilamentFlowCloseSearch(prev)
|
|
30
32
|
}), { replace: true });
|
|
31
33
|
}, [updateSearch]);
|
|
32
|
-
return /* @__PURE__ */ jsxs(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
34
|
+
return /* @__PURE__ */ jsxs(GalaxyProductsProvider, {
|
|
35
|
+
productUrls,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx(MainLayout, {
|
|
38
|
+
sidebarFooter,
|
|
39
|
+
children: /* @__PURE__ */ jsx(Outlet, {})
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx(ConnectionDrawer, {
|
|
42
|
+
connectionId,
|
|
43
|
+
isOpen: !!connectionId,
|
|
44
|
+
onClose: handleCloseDrawer
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ jsx(CreateConnectionModal, {
|
|
47
|
+
isOpen: flow === Flow.CREATE_CONNECTION,
|
|
48
|
+
connector,
|
|
49
|
+
connectorKind,
|
|
50
|
+
connectorSearch,
|
|
51
|
+
onClose: handleCloseFlow
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ jsx(EditConnectionModal, {
|
|
54
|
+
isOpen: flow === Flow.EDIT_CONNECTION && !!connectionId,
|
|
55
|
+
connectionId,
|
|
56
|
+
onClose: handleCloseFlow
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ jsx(CreatePipelineModal, {
|
|
59
|
+
isOpen: flow === Flow.CREATE_PIPELINE,
|
|
60
|
+
sourceId,
|
|
61
|
+
sinkIds,
|
|
62
|
+
onClose: handleCloseFlow
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ jsx(PipelineRunModal, {
|
|
65
|
+
isOpen: flow === Flow.RUN_PIPELINE && !!pipelineId,
|
|
66
|
+
pipelineId,
|
|
67
|
+
resources,
|
|
68
|
+
resyncResources,
|
|
69
|
+
onClose: handleCloseFlow
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
});
|
|
68
73
|
};
|
|
69
74
|
//#endregion
|
|
70
75
|
export { FilamentLayout as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { GalaxyProduct, GalaxyProductUrls } from './types';
|
|
3
|
+
interface GalaxyProductsProviderProps {
|
|
4
|
+
productUrls: GalaxyProductUrls;
|
|
5
|
+
}
|
|
6
|
+
export declare const GalaxyProductsProvider: FC<PropsWithChildren<GalaxyProductsProviderProps>>;
|
|
7
|
+
export declare const useGalaxyProductUrl: (product: GalaxyProduct) => string | undefined;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GALAXY_DEFAULT_PRODUCT_URLS } from "./constants.js";
|
|
2
|
+
import { createContext } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/module/GalaxyProductsProvider.tsx
|
|
5
|
+
var GalaxyProductUrlsContext = createContext(GALAXY_DEFAULT_PRODUCT_URLS);
|
|
6
|
+
var GalaxyProductsProvider = ({ productUrls, children }) => /* @__PURE__ */ jsx(GalaxyProductUrlsContext.Provider, {
|
|
7
|
+
value: productUrls,
|
|
8
|
+
children
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { GalaxyProductsProvider };
|
package/dist/module/commands.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { FilamentNavItem, Flow } from "./types.js";
|
|
1
2
|
import { FilamentPath, createFilamentFlowSearch } from "./paths.js";
|
|
2
3
|
import { ConnectorKind } from "../gen/ingestion/v1/common_pb.js";
|
|
3
|
-
import { FilamentNavItem, Flow } from "./types.js";
|
|
4
4
|
import { useFilamentFlowOpen, useFilamentMountedBase, useFilamentSearchUpdate } from "./hooks.js";
|
|
5
5
|
import { FILAMENT_NAV_ITEMS, FILAMENT_NAV_ITEM_TO_COMMAND_ID_MAP, FILAMENT_NAV_ITEM_TO_ICON_MAP, FILAMENT_NAV_ITEM_TO_KEYWORDS_MAP, FILAMENT_NAV_ITEM_TO_LABEL_MAP, FILAMENT_NAV_ITEM_TO_PATH_MAP } from "./nav.js";
|
|
6
6
|
import { CONNECTOR_KIND_TO_CREATE_TITLE_MAP, CONNECTOR_KIND_TO_PATH_MAP } from "../components/connections/constants.js";
|
|
@@ -8,8 +8,8 @@ import { useListConnectionsQuery } from "../api/queries/connections.js";
|
|
|
8
8
|
import { PIPELINE_CREATE_TITLE } from "../components/pipelines/constants.js";
|
|
9
9
|
import { formatPipelineName } from "../components/pipelines/utils.js";
|
|
10
10
|
import { useListPipelinesQuery } from "../api/queries/pipelines.js";
|
|
11
|
-
import ConnectorCommandIcon from "../components/connections/ConnectorCommandIcon.js";
|
|
12
11
|
import { FILAMENT_COMMAND_GROUP_CONNECTIONS, FILAMENT_COMMAND_GROUP_CREATE, FILAMENT_COMMAND_GROUP_GO_TO, FILAMENT_COMMAND_GROUP_PIPELINES, FILAMENT_CONNECTOR_KIND_TO_CREATE_COMMAND_ID_MAP, FILAMENT_CONNECTOR_KIND_TO_NAV_ITEM_MAP } from "./constants.js";
|
|
12
|
+
import ConnectorCommandIcon from "../components/connections/ConnectorCommandIcon.js";
|
|
13
13
|
import { PlusIcon } from "@phosphor-icons/react";
|
|
14
14
|
import { useMemo } from "react";
|
|
15
15
|
import { useNavigate } from "@tanstack/react-router";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ConnectorKind } from '../gen/ingestion/v1/common_pb';
|
|
2
|
-
import { FilamentNavItem } from './types';
|
|
2
|
+
import { FilamentNavItem, GalaxyProductUrls } from './types';
|
|
3
3
|
export declare const FILAMENT_COMMAND_GROUP_GO_TO = "Go to";
|
|
4
4
|
export declare const FILAMENT_COMMAND_GROUP_CREATE = "Create";
|
|
5
5
|
export declare const FILAMENT_COMMAND_GROUP_PIPELINES = "Pipelines";
|
|
6
6
|
export declare const FILAMENT_COMMAND_GROUP_CONNECTIONS = "Connections";
|
|
7
7
|
export declare const FILAMENT_CONNECTOR_KIND_TO_NAV_ITEM_MAP: Record<ConnectorKind, FilamentNavItem>;
|
|
8
8
|
export declare const FILAMENT_CONNECTOR_KIND_TO_CREATE_COMMAND_ID_MAP: Record<ConnectorKind, string>;
|
|
9
|
+
export declare const GALAXY_DEFAULT_PRODUCT_URLS: GalaxyProductUrls;
|
package/dist/module/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConnectorKind } from "../gen/ingestion/v1/common_pb.js";
|
|
2
1
|
import { FilamentNavItem } from "./types.js";
|
|
2
|
+
import { ConnectorKind } from "../gen/ingestion/v1/common_pb.js";
|
|
3
3
|
//#region src/module/constants.ts
|
|
4
4
|
var FILAMENT_COMMAND_GROUP_GO_TO = "Go to";
|
|
5
5
|
var FILAMENT_COMMAND_GROUP_CREATE = "Create";
|
|
@@ -15,5 +15,6 @@ var FILAMENT_CONNECTOR_KIND_TO_CREATE_COMMAND_ID_MAP = {
|
|
|
15
15
|
[ConnectorKind.SOURCE]: "new-source",
|
|
16
16
|
[ConnectorKind.SINK]: "new-sink"
|
|
17
17
|
};
|
|
18
|
+
var GALAXY_DEFAULT_PRODUCT_URLS = {};
|
|
18
19
|
//#endregion
|
|
19
|
-
export { FILAMENT_COMMAND_GROUP_CONNECTIONS, FILAMENT_COMMAND_GROUP_CREATE, FILAMENT_COMMAND_GROUP_GO_TO, FILAMENT_COMMAND_GROUP_PIPELINES, FILAMENT_CONNECTOR_KIND_TO_CREATE_COMMAND_ID_MAP, FILAMENT_CONNECTOR_KIND_TO_NAV_ITEM_MAP };
|
|
20
|
+
export { FILAMENT_COMMAND_GROUP_CONNECTIONS, FILAMENT_COMMAND_GROUP_CREATE, FILAMENT_COMMAND_GROUP_GO_TO, FILAMENT_COMMAND_GROUP_PIPELINES, FILAMENT_CONNECTOR_KIND_TO_CREATE_COMMAND_ID_MAP, FILAMENT_CONNECTOR_KIND_TO_NAV_ITEM_MAP, GALAXY_DEFAULT_PRODUCT_URLS };
|
package/dist/module/nav.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FilamentPath } from "./paths.js";
|
|
2
1
|
import { FilamentNavItem } from "./types.js";
|
|
2
|
+
import { FilamentPath } from "./paths.js";
|
|
3
3
|
import { ChartLineIcon, DatabaseIcon, FlowArrowIcon, TrayArrowDownIcon } from "@phosphor-icons/react";
|
|
4
4
|
//#region src/module/nav.ts
|
|
5
5
|
var FILAMENT_NAV_ITEMS = [
|
package/dist/module/paths.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { FilamentFlowSeed, FilamentLayoutSearch } from './schemas';
|
|
2
|
-
import { Flow } from './types';
|
|
2
|
+
import { Flow, GalaxyProduct } from './types';
|
|
3
|
+
export type { GalaxyProductUrls } from './types';
|
|
4
|
+
export { GalaxyProduct };
|
|
3
5
|
export declare enum FilamentPath {
|
|
4
6
|
OBSERVABILITY = "./observability",
|
|
5
7
|
PIPELINES = "./pipelines",
|
package/dist/module/paths.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GalaxyProduct } from "./types.js";
|
|
1
2
|
//#region src/module/paths.ts
|
|
2
3
|
var FilamentPath = /* @__PURE__ */ function(FilamentPath) {
|
|
3
4
|
FilamentPath["OBSERVABILITY"] = "./observability";
|
|
@@ -30,4 +31,4 @@ var createFilamentFlowSearch = (flow, seed = {}) => ({
|
|
|
30
31
|
flow
|
|
31
32
|
});
|
|
32
33
|
//#endregion
|
|
33
|
-
export { FilamentPath, createFilamentFlowSearch, createFilamentHref };
|
|
34
|
+
export { FilamentPath, GalaxyProduct, createFilamentFlowSearch, createFilamentHref };
|
package/dist/module/schemas.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Flow } from "./types.js";
|
|
1
2
|
import { ConnectorKind } from "../gen/ingestion/v1/common_pb.js";
|
|
2
3
|
import { SortBy, SortOrder } from "../gen/ingestion/v1/sorting_pb.js";
|
|
3
4
|
import { RunStatus } from "../gen/ingestion/v1/runs_pb.js";
|
|
@@ -5,7 +6,6 @@ import { ObservabilityRefreshInterval, ObservabilityRunsView, ObservabilityThrou
|
|
|
5
6
|
import { MetricDimension } from "../gen/metrics/v1/metrics_pb.js";
|
|
6
7
|
import { PipelineCanvasView } from "../pages/pipelines/canvas/types.js";
|
|
7
8
|
import { SettingsTeamView } from "../pages/settings/types.js";
|
|
8
|
-
import { Flow } from "./types.js";
|
|
9
9
|
import z from "zod";
|
|
10
10
|
//#region src/module/schemas.ts
|
|
11
11
|
var listSearchParamsSchema = z.object({
|
package/dist/module/types.d.ts
CHANGED
package/dist/module/types.js
CHANGED
|
@@ -13,5 +13,10 @@ var FilamentNavItem = /* @__PURE__ */ function(FilamentNavItem) {
|
|
|
13
13
|
FilamentNavItem["SINKS"] = "SINKS";
|
|
14
14
|
return FilamentNavItem;
|
|
15
15
|
}({});
|
|
16
|
+
var GalaxyProduct = /* @__PURE__ */ function(GalaxyProduct) {
|
|
17
|
+
GalaxyProduct["ALCHEMY"] = "alchemy";
|
|
18
|
+
GalaxyProduct["FILAMENT"] = "filament";
|
|
19
|
+
return GalaxyProduct;
|
|
20
|
+
}({});
|
|
16
21
|
//#endregion
|
|
17
|
-
export { FilamentNavItem, Flow };
|
|
22
|
+
export { FilamentNavItem, Flow, GalaxyProduct };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConnectorKind } from "../../gen/ingestion/v1/common_pb.js";
|
|
2
1
|
import { Flow } from "../../module/types.js";
|
|
2
|
+
import { ConnectorKind } from "../../gen/ingestion/v1/common_pb.js";
|
|
3
3
|
import { useConnectionsSearch, useFilamentFlowOpen, useFilamentSearchUpdate } from "../../module/hooks.js";
|
|
4
4
|
import { CONNECTOR_KIND_TO_CREATE_TITLE_MAP, CONNECTOR_KIND_TO_PLURAL_LABEL_MAP, CONNECTOR_KIND_TO_PLURAL_NOUN_MAP } from "../../components/connections/constants.js";
|
|
5
5
|
import { createListConnectionsInput, useSuspenseListConnectionsInfiniteQuery } from "../../api/queries/connections.js";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Flow } from "../../../../module/types.js";
|
|
2
|
-
import { useFilamentSearchUpdate } from "../../../../module/hooks.js";
|
|
2
|
+
import { useFilamentFlowOpen, useFilamentSearchUpdate } from "../../../../module/hooks.js";
|
|
3
3
|
import { DeleteConnectionRequestSchema } from "../../../../gen/ingestion/v1/connections_pb.js";
|
|
4
4
|
import { useDeleteConnectionMutation } from "../../../../api/queries/connections.js";
|
|
5
|
+
import { CONNECTOR_KIND_TO_PIPELINE_SEED_MAP } from "../../constants.js";
|
|
5
6
|
import { useConfirm } from "../../../../hooks/useConfirm.js";
|
|
6
|
-
import { DotsThreeIcon, PencilIcon, TrashIcon } from "@phosphor-icons/react";
|
|
7
|
+
import { DotsThreeIcon, FlowArrowIcon, PencilIcon, TrashIcon } from "@phosphor-icons/react";
|
|
7
8
|
import Button, { ButtonSize, ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
8
9
|
import { create } from "@bufbuild/protobuf";
|
|
9
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -12,6 +13,7 @@ import ConfirmDialog from "@galaxy-io/dls/modal/ConfirmDialog";
|
|
|
12
13
|
//#region src/pages/connections/components/drawer/ConnectionDrawerActions.tsx
|
|
13
14
|
var ConnectionDrawerActions = ({ connection, isOpen, onClose }) => {
|
|
14
15
|
const updateSearch = useFilamentSearchUpdate();
|
|
16
|
+
const openFlow = useFilamentFlowOpen();
|
|
15
17
|
const { mutate: deleteConnection } = useDeleteConnectionMutation();
|
|
16
18
|
const { handleOpen, isOpen: confirmIsOpen, target, handleClose, handleConfirm } = useConfirm({
|
|
17
19
|
entityLabel: "Connection",
|
|
@@ -22,6 +24,9 @@ var ConnectionDrawerActions = ({ connection, isOpen, onClose }) => {
|
|
|
22
24
|
onConfirmed: onClose
|
|
23
25
|
});
|
|
24
26
|
const isDeleted = !!connection.deletedAt;
|
|
27
|
+
const handleCreatePipeline = () => {
|
|
28
|
+
openFlow(Flow.CREATE_PIPELINE, CONNECTOR_KIND_TO_PIPELINE_SEED_MAP[connection.kind](connection.id));
|
|
29
|
+
};
|
|
25
30
|
const handleEdit = () => {
|
|
26
31
|
updateSearch((prev) => ({
|
|
27
32
|
...prev,
|
|
@@ -32,11 +37,16 @@ var ConnectionDrawerActions = ({ connection, isOpen, onClose }) => {
|
|
|
32
37
|
trigger: /* @__PURE__ */ jsx(Button, {
|
|
33
38
|
icon: DotsThreeIcon,
|
|
34
39
|
ariaLabel: "Connection actions",
|
|
35
|
-
tooltip: "Connection actions",
|
|
36
40
|
variant: ButtonVariant.TERTIARY,
|
|
37
41
|
size: ButtonSize.SMALL
|
|
38
42
|
}),
|
|
39
43
|
children: [
|
|
44
|
+
/* @__PURE__ */ jsx(MenuItem, {
|
|
45
|
+
label: "Create pipeline",
|
|
46
|
+
icon: FlowArrowIcon,
|
|
47
|
+
onSelect: handleCreatePipeline,
|
|
48
|
+
isDisabled: isDeleted
|
|
49
|
+
}),
|
|
40
50
|
/* @__PURE__ */ jsx(MenuItem, {
|
|
41
51
|
label: "Edit connection",
|
|
42
52
|
icon: PencilIcon,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ConnectorKind } from '../../gen/ingestion/v1/common_pb';
|
|
2
|
+
import { Connection } from '../../gen/ingestion/v1/connections_pb';
|
|
2
3
|
import { CreateConnectionSelectorShelf } from './components/create/types';
|
|
4
|
+
import { FilamentFlowSeed } from '../../module/schemas';
|
|
3
5
|
export declare const CONNECTOR_GRID_MIN_COLUMN_WIDTH = 320;
|
|
4
6
|
export declare const CONNECTION_PIPELINES_PAGE_SIZE = 1000;
|
|
5
7
|
export declare const CREATE_CONNECTION_SELECTOR_GHOST_COUNT = 6;
|
|
@@ -10,3 +12,4 @@ export declare const CREATE_CONNECTION_SELECTOR_CARD_MIN_HEIGHT = 150;
|
|
|
10
12
|
export declare const CONNECTOR_KIND_TO_DESCRIPTION_MAP: Record<ConnectorKind, string>;
|
|
11
13
|
export declare const CONNECTOR_KIND_TO_DOCS_PATH_MAP: Record<ConnectorKind, string>;
|
|
12
14
|
export declare const CONNECTOR_KIND_TO_EMPTY_MESSAGE_MAP: Record<ConnectorKind.SOURCE | ConnectorKind.SINK, string>;
|
|
15
|
+
export declare const CONNECTOR_KIND_TO_PIPELINE_SEED_MAP: Record<ConnectorKind, (connectionId: Connection["id"]) => FilamentFlowSeed>;
|
|
@@ -22,5 +22,10 @@ var CONNECTOR_KIND_TO_EMPTY_MESSAGE_MAP = {
|
|
|
22
22
|
[ConnectorKind.SOURCE]: "Connect data sources to move data in.",
|
|
23
23
|
[ConnectorKind.SINK]: "Connect data sinks to move data out."
|
|
24
24
|
};
|
|
25
|
+
var CONNECTOR_KIND_TO_PIPELINE_SEED_MAP = {
|
|
26
|
+
[ConnectorKind.UNSPECIFIED]: () => ({}),
|
|
27
|
+
[ConnectorKind.SOURCE]: (sourceId) => ({ sourceId }),
|
|
28
|
+
[ConnectorKind.SINK]: (sinkId) => ({ sinkIds: [sinkId] })
|
|
29
|
+
};
|
|
25
30
|
//#endregion
|
|
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 };
|
|
31
|
+
export { CONNECTION_PIPELINES_PAGE_SIZE, CONNECTOR_KIND_TO_DESCRIPTION_MAP, CONNECTOR_KIND_TO_DOCS_PATH_MAP, CONNECTOR_KIND_TO_EMPTY_MESSAGE_MAP, CONNECTOR_KIND_TO_PIPELINE_SEED_MAP, CREATE_CONNECTION_SELECTOR_GRID_COLUMNS, CREATE_CONNECTION_SELECTOR_SHELF_ORDER, CREATE_CONNECTION_SELECTOR_SHELF_TO_LABEL_MAP };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConnectorKind } from "../../gen/ingestion/v1/common_pb.js";
|
|
2
1
|
import { Flow } from "../../module/types.js";
|
|
2
|
+
import { ConnectorKind } from "../../gen/ingestion/v1/common_pb.js";
|
|
3
3
|
import { useFilamentFlowOpen } from "../../module/hooks.js";
|
|
4
4
|
import { PIPELINE_CREATE_TITLE } from "../../components/pipelines/constants.js";
|
|
5
5
|
import ObservabilityBand from "./components/band/ObservabilityBand.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Flow } from "../../../../module/types.js";
|
|
1
2
|
import { ConnectorKind } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
2
3
|
import { ListPipelinesRequestSchema } from "../../../../gen/ingestion/v1/pipelines_pb.js";
|
|
3
|
-
import { Flow } from "../../../../module/types.js";
|
|
4
4
|
import { ListConnectionsRequestSchema } from "../../../../gen/ingestion/v1/connections_pb.js";
|
|
5
5
|
import { PIPELINE_CREATE_TITLE } from "../../../../components/pipelines/constants.js";
|
|
6
6
|
import { ObservabilitySetupStep, ObservabilitySetupStepStatus } from "./types.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExecutionMode } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
2
1
|
import { Flow } from "../../../../module/types.js";
|
|
2
|
+
import { ExecutionMode } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
3
3
|
import { useFilamentFlowOpen, usePipelineParams } from "../../../../module/hooks.js";
|
|
4
4
|
import { ValidatePipelineRequestSchema } from "../../../../gen/ingestion/v1/capabilities_pb.js";
|
|
5
5
|
import { getErrorMessage } from "../../../../utils/errors.js";
|