@galaxy-io/filament-ui 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/queries/connectors.d.ts +2 -0
- package/dist/api/queries/connectors.js +9 -2
- package/dist/api/queries/pipeline_versions.d.ts +5 -0
- package/dist/api/queries/runs.d.ts +2 -0
- package/dist/api/queries/version.d.ts +6 -0
- package/dist/api/queries/version.js +11 -0
- package/dist/components/BaseHeader.d.ts +2 -0
- package/dist/components/BaseHeader.js +3 -2
- package/dist/components/connections/constants.js +1 -1
- package/dist/components/fields/Field.js +31 -27
- package/dist/components/fields/utils.js +2 -1
- package/dist/components/pipelines/PipelineName.js +1 -1
- package/dist/components/runs/PipelineRunRecords.js +1 -1
- package/dist/components/runs/PipelineRunVolume.js +1 -1
- package/dist/gen/ingestion/v1/connectors_pb.d.ts +6 -0
- package/dist/gen/ingestion/v1/connectors_pb.js +1 -1
- package/dist/gen/ingestion/v1/pipelines_pb.d.ts +26 -0
- package/dist/gen/ingestion/v1/pipelines_pb.js +17 -12
- package/dist/gen/ingestion/v1/runs_pb.d.ts +23 -0
- package/dist/gen/ingestion/v1/runs_pb.js +1 -1
- package/dist/gen/ingestion/v1/service_pb.d.ts +11 -0
- package/dist/gen/ingestion/v1/service_pb.js +5 -3
- package/dist/gen/ingestion/v1/version_pb.d.ts +37 -0
- package/dist/gen/ingestion/v1/version_pb.js +8 -0
- package/dist/layouts/main/MainLayoutSidebar.js +7 -1
- package/dist/module/FilamentLayout.js +8 -2
- package/dist/module/commands.js +1 -1
- package/dist/module/hooks.d.ts +4 -3
- package/dist/module/hooks.js +3 -2
- package/dist/module/routes.d.ts +1 -0
- package/dist/module/schemas.d.ts +1 -0
- package/dist/module/schemas.js +1 -0
- package/dist/module/types.d.ts +2 -1
- package/dist/module/types.js +1 -0
- package/dist/pages/connections/ConnectionsPage.js +1 -1
- package/dist/pages/connections/components/card/ConnectionCard.js +2 -2
- package/dist/pages/connections/components/create/select/CreateConnectionSelector.js +21 -7
- package/dist/pages/connections/components/create/select/CreateConnectionSelectorBody.d.ts +5 -3
- package/dist/pages/connections/components/create/select/CreateConnectionSelectorBody.js +50 -140
- package/dist/pages/connections/components/create/select/CreateConnectionSelectorSidebar.d.ts +12 -0
- package/dist/pages/connections/components/create/select/CreateConnectionSelectorSidebar.js +54 -0
- package/dist/pages/connections/components/create/select/hooks/useCreateConnectionSelectorCatalog.d.ts +11 -0
- package/dist/pages/connections/components/create/select/hooks/useCreateConnectionSelectorCatalog.js +45 -0
- package/dist/pages/connections/components/drawer/ConnectionDrawer.js +1 -1
- package/dist/pages/connections/components/drawer/ConnectionDrawerJsonSection.js +2 -10
- package/dist/pages/connections/components/edit/EditConnectionModal.js +0 -3
- package/dist/pages/connections/components/form/ConnectionForm.js +0 -4
- package/dist/pages/connections/components/form/ConnectionFormWrapper.d.ts +0 -2
- package/dist/pages/connections/components/form/ConnectionFormWrapper.js +1 -2
- package/dist/pages/connections/constants.d.ts +0 -1
- package/dist/pages/connections/hooks/useConnectionPipelines.js +1 -1
- package/dist/pages/observability/components/metrics/ObservabilityMetricsWidget.js +1 -1
- package/dist/pages/observability/components/runs/ObservabilityRunsPastTable.js +2 -2
- package/dist/pages/observability/components/runs/ObservabilityRunsUpcomingTable.js +1 -1
- package/dist/pages/observability/components/setup/ObservabilitySetupChecklist.js +1 -1
- package/dist/pages/observability/components/setup/constants.js +1 -1
- package/dist/pages/pipelines/PipelineHistoryPage.js +1 -1
- package/dist/pages/pipelines/canvas/PipelineCanvasConnectionSelectorEmpty.js +1 -1
- package/dist/pages/pipelines/canvas/PipelineCanvasFlow.js +5 -7
- package/dist/pages/pipelines/canvas/PipelineCanvasViewSwitcher.d.ts +4 -1
- package/dist/pages/pipelines/canvas/PipelineCanvasViewSwitcher.js +9 -6
- package/dist/pages/pipelines/canvas/constants.d.ts +4 -1
- package/dist/pages/pipelines/canvas/constants.js +3 -5
- package/dist/pages/pipelines/canvas/graph/diff.js +4 -1
- package/dist/pages/pipelines/canvas/graph/serialize.js +1 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasActiveRuns.d.ts +2 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasActiveRuns.js +11 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasEdgeConfig.js +5 -2
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasEdgeResources.d.ts +1 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasEdgeResources.js +1 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasIsConnectionRunning.d.ts +2 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasIsConnectionRunning.js +5 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasIsRunning.js +2 -7
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasPanelResourceOptions.d.ts +1 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasPanelResourceOptions.js +2 -1
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasRunningEdgeIds.d.ts +2 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasRunningEdgeIds.js +18 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasSelectionReveal.js +43 -6
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNode.d.ts +1 -0
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNode.js +4 -2
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeIsland.d.ts +1 -0
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeIsland.js +3 -4
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSink.js +3 -0
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSource.js +5 -1
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSourceIsland.d.ts +1 -0
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSourceIsland.js +2 -1
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSourceIslandTableList.js +11 -3
- package/dist/pages/pipelines/canvas/nodes/constants.d.ts +0 -1
- package/dist/pages/pipelines/canvas/nodes/utils.d.ts +2 -0
- package/dist/pages/pipelines/canvas/nodes/utils.js +9 -1
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelHeader.js +2 -0
- package/dist/pages/pipelines/canvas/panel/activity/PipelineCanvasPanelActivityHeader.js +53 -26
- package/dist/pages/pipelines/canvas/panel/activity/constants.d.ts +1 -0
- package/dist/pages/pipelines/canvas/panel/constants.d.ts +1 -0
- package/dist/pages/pipelines/canvas/panel/constants.js +3 -1
- package/dist/pages/pipelines/canvas/panel/overview/PipelineCanvasPanelOverview.js +1 -1
- package/dist/pages/pipelines/canvas/panel/overview/node/PipelineCanvasPanelNodeDetail.js +1 -1
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceColumnsSection.d.ts +12 -0
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceColumnsSection.js +37 -0
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceDetail.js +58 -14
- package/dist/pages/pipelines/canvas/panel/overview/resource/transform/PipelineCanvasPanelResourceTransformSection.js +1 -1
- package/dist/pages/pipelines/canvas/panel/overview/resource/transform/PipelineCanvasPanelResourceTransformSectionPending.js +1 -0
- package/dist/pages/pipelines/canvas/providers/canvas/PipelineCanvasProvider.d.ts +2 -1
- package/dist/pages/pipelines/canvas/providers/canvas/PipelineCanvasProvider.js +8 -0
- package/dist/pages/pipelines/canvas/providers/canvas/actions.d.ts +12 -3
- package/dist/pages/pipelines/canvas/providers/canvas/actions.js +1 -0
- package/dist/pages/pipelines/canvas/providers/canvas/reducer.js +27 -0
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesDraftRow.js +8 -10
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesIsland.d.ts +1 -0
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesIsland.js +8 -5
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesList.js +4 -3
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesRow.js +11 -11
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesSinkIsland.js +1 -0
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesSourceIsland.js +2 -1
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesToolbar.js +39 -17
- package/dist/pages/pipelines/canvas/routes/constants.d.ts +10 -2
- package/dist/pages/pipelines/canvas/types.d.ts +1 -0
- package/dist/pages/pipelines/canvas/utils.d.ts +5 -1
- package/dist/pages/pipelines/canvas/utils.js +13 -3
- package/dist/pages/pipelines/components/create/CreatePipelineModal.js +31 -29
- package/dist/pages/pipelines/components/create/CreatePipelineModalProvider.d.ts +2 -1
- package/dist/pages/pipelines/components/create/CreatePipelineModalProvider.js +4 -0
- package/dist/pages/pipelines/components/create/actions.d.ts +10 -1
- package/dist/pages/pipelines/components/create/actions.js +1 -0
- package/dist/pages/pipelines/components/create/components/CreatePipelineModalSidebar.js +39 -49
- package/dist/pages/pipelines/components/create/constants.d.ts +5 -1
- package/dist/pages/pipelines/components/create/constants.js +2 -2
- package/dist/pages/pipelines/components/create/hooks/useCreatePipelineResources.d.ts +3 -1
- package/dist/pages/pipelines/components/create/hooks/useCreatePipelineResources.js +17 -6
- package/dist/pages/pipelines/components/create/reducer.js +16 -0
- package/dist/pages/pipelines/components/create/rows.js +18 -2
- package/dist/pages/pipelines/components/create/serialize.js +8 -1
- package/dist/pages/pipelines/components/create/steps/CreatePipelineModalResources.d.ts +6 -1
- package/dist/pages/pipelines/components/create/steps/CreatePipelineModalResources.js +6 -2
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalConnectionsState.js +1 -1
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesColumnsPane.d.ts +8 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesColumnsPane.js +83 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesColumnsPaneFooter.d.ts +7 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesColumnsPaneFooter.js +50 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesCursorCell.js +1 -1
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesReadModeCell.js +1 -1
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesTable.d.ts +2 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesTable.js +50 -12
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesWriteModeCell.js +1 -1
- package/dist/pages/pipelines/components/create/types.d.ts +5 -0
- package/dist/pages/pipelines/components/create/utils.js +1 -1
- package/dist/pages/pipelines/components/header/PipelinePageEditActions.js +6 -2
- package/dist/pages/pipelines/components/header/PipelinePageHeading.js +1 -1
- package/dist/pages/pipelines/components/header/PipelinePagePreviewBanner.js +2 -1
- package/dist/pages/pipelines/components/header/PipelinePageRunActions.js +5 -16
- package/dist/pages/pipelines/components/header/PipelinePageRunButton.d.ts +1 -4
- package/dist/pages/pipelines/components/header/PipelinePageRunButton.js +15 -89
- package/dist/pages/pipelines/components/header/PipelinePageScheduleBanner.js +1 -1
- package/dist/pages/pipelines/components/header/constants.d.ts +0 -1
- package/dist/pages/pipelines/components/resource/PipelineResourceColumnsChip.d.ts +8 -0
- package/dist/pages/pipelines/components/resource/PipelineResourceColumnsChip.js +14 -0
- package/dist/pages/pipelines/components/resource/PipelineResourceColumnsTable.d.ts +12 -0
- package/dist/pages/pipelines/components/resource/PipelineResourceColumnsTable.js +75 -0
- package/dist/pages/pipelines/components/resource/constants.d.ts +3 -0
- package/dist/pages/pipelines/components/resource/types.d.ts +2 -1
- package/dist/pages/pipelines/components/resource/types.js +1 -0
- package/dist/pages/pipelines/components/resource/utils.d.ts +17 -0
- package/dist/pages/pipelines/components/resource/utils.js +18 -1
- package/dist/pages/pipelines/components/run/PipelineRunModal.d.ts +9 -0
- package/dist/pages/pipelines/components/run/PipelineRunModal.js +245 -0
- package/dist/pages/pipelines/components/run/PipelineRunModalResourcesPane.d.ts +13 -0
- package/dist/pages/pipelines/components/run/PipelineRunModalResourcesPane.js +120 -0
- package/dist/pages/pipelines/components/run/PipelineRunModalSectionChip.d.ts +6 -0
- package/dist/pages/pipelines/components/run/PipelineRunModalSectionChip.js +14 -0
- package/dist/pages/pipelines/components/run/constants.d.ts +9 -0
- package/dist/pages/pipelines/components/run/constants.js +11 -0
- package/dist/pages/pipelines/components/run/types.d.ts +4 -0
- package/dist/pages/pipelines/components/run/types.js +8 -0
- package/dist/pages/pipelines/components/run/utils.d.ts +5 -0
- package/dist/pages/pipelines/components/run/utils.js +7 -0
- package/dist/pages/pipelines/components/table/PipelinesTable.js +2 -2
- package/dist/pages/pipelines/components/table/columns/PipelinesTableColumnRecentRuns.js +1 -1
- package/dist/pages/pipelines/components/table/columns/PipelinesTableColumnRecentRunsTooltip.js +2 -2
- package/dist/pages/pipelines/history/PipelineHistoryRunContinuousSummary.js +1 -1
- package/dist/pages/pipelines/history/PipelineHistoryRunInfo.js +2 -3
- package/dist/pages/pipelines/history/components/PipelineHistoryRunInfoConnectionColumn.js +1 -1
- package/dist/pages/pipelines/hooks/usePipelineRun.d.ts +3 -1
- package/dist/pages/pipelines/hooks/usePipelineRun.js +3 -1
- package/dist/pages/pipelines/utils.d.ts +1 -0
- package/dist/pages/pipelines/utils.js +2 -1
- package/dist/styles.css +6 -5
- package/dist/utils/format.d.ts +1 -0
- package/dist/utils/format.js +2 -1
- package/package.json +3 -3
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSourceIslandTableShimmer.d.ts +0 -3
- package/dist/pages/pipelines/canvas/nodes/PipelineCanvasNodeSourceIslandTableShimmer.js +0 -10
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { FilamentPath } from "../../../../module/paths.js";
|
|
2
|
+
import { useFilamentNavigate } from "../../../../module/hooks.js";
|
|
3
|
+
import { IS_DEBUG } from "../../../../constants.js";
|
|
4
|
+
import { isNotFoundError } from "../../../../utils/errors.js";
|
|
5
|
+
import { createGetConnectionInput, useGetConnectionQuery } from "../../../../api/queries/connections.js";
|
|
6
|
+
import { useOverlayRecord } from "../../../../hooks/useOverlayRecord.js";
|
|
7
|
+
import { useOverlaySession } from "../../../../hooks/useOverlaySession.js";
|
|
8
|
+
import PipelineFlow, { PipelineFlowSize } from "../../../../components/pipelines/PipelineFlow.js";
|
|
9
|
+
import { formatPipelineName, mapVersionNodesToFlowEndpoints } from "../../../../components/pipelines/utils.js";
|
|
10
|
+
import { createGetPipelineInput, useGetPipelineQuery } from "../../../../api/queries/pipelines.js";
|
|
11
|
+
import { getPipelineResources } from "../../utils.js";
|
|
12
|
+
import { formatWorkerConfiguration, isWorkerConfigurationEqual, parseWorkerConfiguration } from "../worker/utils.js";
|
|
13
|
+
import PipelineWorkerConfigurationEditor from "../worker/PipelineWorkerConfigurationEditor.js";
|
|
14
|
+
import PipelineRunModalSectionChip from "./PipelineRunModalSectionChip.js";
|
|
15
|
+
import { canPipelineRunSubset } from "./utils.js";
|
|
16
|
+
import PipelineRunModalResourcesPane from "./PipelineRunModalResourcesPane.js";
|
|
17
|
+
import { usePipelineRun } from "../../hooks/usePipelineRun.js";
|
|
18
|
+
import { CaretRightIcon, PlayIcon } from "@phosphor-icons/react";
|
|
19
|
+
import Button, { ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
20
|
+
import ErrorLayout from "@galaxy-io/dls/layout/ErrorLayout";
|
|
21
|
+
import { useCallback, useState } from "react";
|
|
22
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
import PendingLayout from "@galaxy-io/dls/layout/PendingLayout";
|
|
24
|
+
import Flex, { AlignItems, FlexDirection, JustifyContent } from "@galaxy-io/dls/layout/Flex";
|
|
25
|
+
import Text, { TextSize, TextVariant, TextWeight } from "@galaxy-io/dls/text/Text";
|
|
26
|
+
import Widget from "@galaxy-io/dls/widget/Widget";
|
|
27
|
+
import Icon, { IconVariant, IconWeight } from "@galaxy-io/dls/icons/Icon";
|
|
28
|
+
import Modal, { ModalSize } from "@galaxy-io/dls/modal/Modal";
|
|
29
|
+
//#region src/pages/pipelines/components/run/PipelineRunModal.tsx
|
|
30
|
+
var PipelineRunModalContent = ({ isOpen, pipeline, onClose }) => {
|
|
31
|
+
const navigate = useFilamentNavigate();
|
|
32
|
+
const { startRun, isRunning } = usePipelineRun();
|
|
33
|
+
const { workerConfiguration, currentVersion } = pipeline;
|
|
34
|
+
const resources = getPipelineResources(currentVersion);
|
|
35
|
+
const { sourceId, sinkIds } = mapVersionNodesToFlowEndpoints(currentVersion?.graph?.nodes ?? []);
|
|
36
|
+
const pipelineName = formatPipelineName(pipeline);
|
|
37
|
+
const { data: sourceData } = useGetConnectionQuery({
|
|
38
|
+
input: createGetConnectionInput(sourceId ?? ""),
|
|
39
|
+
options: { enabled: !!sourceId }
|
|
40
|
+
});
|
|
41
|
+
const canSubset = canPipelineRunSubset(pipeline, sourceData?.connection);
|
|
42
|
+
const defaultWorkerConfiguration = formatWorkerConfiguration(workerConfiguration);
|
|
43
|
+
const [state, setState] = useState(() => ({
|
|
44
|
+
workerConfiguration: defaultWorkerConfiguration,
|
|
45
|
+
selectedResources: resources,
|
|
46
|
+
resyncResources: [],
|
|
47
|
+
isResourcesPaneOpen: false
|
|
48
|
+
}));
|
|
49
|
+
const parsed = parseWorkerConfiguration(state.workerConfiguration);
|
|
50
|
+
const isWorkerDefault = state.workerConfiguration === defaultWorkerConfiguration || !parsed.error && isWorkerConfigurationEqual(parsed.configuration, workerConfiguration);
|
|
51
|
+
const runResources = canSubset ? state.selectedResources : resources;
|
|
52
|
+
const isSubset = runResources.length < resources.length;
|
|
53
|
+
const resyncResources = state.resyncResources.filter((resource) => runResources.includes(resource));
|
|
54
|
+
const isResourcesDefault = !isSubset && resyncResources.length === 0;
|
|
55
|
+
const isDefault = isWorkerDefault && isResourcesDefault;
|
|
56
|
+
const handleSelectedResourcesChange = useCallback((selectedResources) => setState((prev) => ({
|
|
57
|
+
...prev,
|
|
58
|
+
selectedResources
|
|
59
|
+
})), []);
|
|
60
|
+
const handleResyncResourcesChange = useCallback((resyncResources) => setState((prev) => ({
|
|
61
|
+
...prev,
|
|
62
|
+
resyncResources
|
|
63
|
+
})), []);
|
|
64
|
+
const handleResourcesPaneToggle = (isResourcesPaneOpen) => setState((prev) => ({
|
|
65
|
+
...prev,
|
|
66
|
+
isResourcesPaneOpen
|
|
67
|
+
}));
|
|
68
|
+
const handleWorkerConfigurationChange = (workerConfiguration) => setState((prev) => ({
|
|
69
|
+
...prev,
|
|
70
|
+
workerConfiguration
|
|
71
|
+
}));
|
|
72
|
+
const handleReset = () => setState((prev) => ({
|
|
73
|
+
...prev,
|
|
74
|
+
workerConfiguration: defaultWorkerConfiguration,
|
|
75
|
+
selectedResources: resources,
|
|
76
|
+
resyncResources: []
|
|
77
|
+
}));
|
|
78
|
+
const handleRun = () => {
|
|
79
|
+
startRun(pipeline, {
|
|
80
|
+
workerConfiguration: isWorkerDefault ? void 0 : parsed.configuration,
|
|
81
|
+
resources: isSubset ? runResources : [],
|
|
82
|
+
resyncResources,
|
|
83
|
+
onSuccess: () => void navigate({
|
|
84
|
+
to: FilamentPath.PIPELINE_CANVAS,
|
|
85
|
+
params: { id: pipeline.id },
|
|
86
|
+
search: ({ flow: _, pipelineId: __, ...rest }) => rest
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
return /* @__PURE__ */ jsx(Modal, {
|
|
91
|
+
isOpen,
|
|
92
|
+
header: /* @__PURE__ */ jsxs(Flex, {
|
|
93
|
+
alignItems: AlignItems.CENTER,
|
|
94
|
+
gap: 8,
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
97
|
+
component: PlayIcon,
|
|
98
|
+
size: 15,
|
|
99
|
+
weight: IconWeight.FILL,
|
|
100
|
+
variant: IconVariant.PRIMARY
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ jsx(Text, {
|
|
103
|
+
size: TextSize.BODY_LG,
|
|
104
|
+
weight: TextWeight.MEDIUM,
|
|
105
|
+
children: "Run"
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ jsx(PipelineFlow, {
|
|
108
|
+
sourceId,
|
|
109
|
+
sinkIds,
|
|
110
|
+
size: PipelineFlowSize.SMALL
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ jsx(Text, {
|
|
113
|
+
size: TextSize.BODY_LG,
|
|
114
|
+
weight: TextWeight.MEDIUM,
|
|
115
|
+
children: pipelineName
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
}),
|
|
119
|
+
ariaLabel: `Run ${pipelineName}`,
|
|
120
|
+
size: ModalSize.MEDIUM,
|
|
121
|
+
aside: state.isResourcesPaneOpen ? /* @__PURE__ */ jsx(PipelineRunModalResourcesPane, {
|
|
122
|
+
resources,
|
|
123
|
+
selectedResources: runResources,
|
|
124
|
+
resyncResources: state.resyncResources,
|
|
125
|
+
isDefault: isResourcesDefault,
|
|
126
|
+
canSubset,
|
|
127
|
+
onSelectedChange: handleSelectedResourcesChange,
|
|
128
|
+
onResyncChange: handleResyncResourcesChange,
|
|
129
|
+
onClose: () => handleResourcesPaneToggle(false)
|
|
130
|
+
}) : null,
|
|
131
|
+
footer: /* @__PURE__ */ jsxs(Flex, {
|
|
132
|
+
justifyContent: JustifyContent.END,
|
|
133
|
+
gap: 8,
|
|
134
|
+
fillWidth: true,
|
|
135
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
136
|
+
label: "Reset",
|
|
137
|
+
variant: ButtonVariant.SECONDARY,
|
|
138
|
+
isDisabled: isDefault,
|
|
139
|
+
onClick: handleReset
|
|
140
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
141
|
+
label: isDefault ? "Run now" : "Start custom run",
|
|
142
|
+
icon: PlayIcon,
|
|
143
|
+
iconWeight: IconWeight.FILL,
|
|
144
|
+
variant: ButtonVariant.PRIMARY,
|
|
145
|
+
isLoading: isRunning,
|
|
146
|
+
isDisabled: !!parsed.error || runResources.length === 0,
|
|
147
|
+
onClick: handleRun
|
|
148
|
+
})]
|
|
149
|
+
}),
|
|
150
|
+
hasDividers: true,
|
|
151
|
+
onOpenChange: (isOpen) => {
|
|
152
|
+
if (!isOpen) onClose();
|
|
153
|
+
},
|
|
154
|
+
children: /* @__PURE__ */ jsxs(Flex, {
|
|
155
|
+
direction: FlexDirection.COLUMN,
|
|
156
|
+
alignItems: AlignItems.STRETCH,
|
|
157
|
+
gap: 12,
|
|
158
|
+
children: [/* @__PURE__ */ jsx(Widget, {
|
|
159
|
+
isInteractive: true,
|
|
160
|
+
ariaLabel: state.isResourcesPaneOpen ? "Close resources" : "Open resources",
|
|
161
|
+
isDisabled: resources.length === 0,
|
|
162
|
+
onClick: () => handleResourcesPaneToggle(!state.isResourcesPaneOpen),
|
|
163
|
+
children: /* @__PURE__ */ jsxs(Flex, {
|
|
164
|
+
alignItems: AlignItems.CENTER,
|
|
165
|
+
justifyContent: JustifyContent.SPACE_BETWEEN,
|
|
166
|
+
gap: 8,
|
|
167
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
168
|
+
size: TextSize.BODY_MD,
|
|
169
|
+
weight: TextWeight.MEDIUM,
|
|
170
|
+
variant: state.isResourcesPaneOpen ? TextVariant.PRIMARY : TextVariant.SECONDARY,
|
|
171
|
+
children: "Resources"
|
|
172
|
+
}), /* @__PURE__ */ jsxs(Flex, {
|
|
173
|
+
alignItems: AlignItems.CENTER,
|
|
174
|
+
gap: 8,
|
|
175
|
+
children: [/* @__PURE__ */ jsx(PipelineRunModalSectionChip, { isDefault: isResourcesDefault }), /* @__PURE__ */ jsx(Icon, {
|
|
176
|
+
component: CaretRightIcon,
|
|
177
|
+
size: 12,
|
|
178
|
+
variant: IconVariant.SECONDARY
|
|
179
|
+
})]
|
|
180
|
+
})]
|
|
181
|
+
})
|
|
182
|
+
}), /* @__PURE__ */ jsx(Widget, {
|
|
183
|
+
isCollapsible: true,
|
|
184
|
+
defaultIsOpen: true,
|
|
185
|
+
header: "Worker configuration",
|
|
186
|
+
actions: /* @__PURE__ */ jsx(PipelineRunModalSectionChip, { isDefault: isWorkerDefault }),
|
|
187
|
+
children: /* @__PURE__ */ jsx(PipelineWorkerConfigurationEditor, {
|
|
188
|
+
value: state.workerConfiguration,
|
|
189
|
+
onChange: handleWorkerConfigurationChange,
|
|
190
|
+
error: parsed.error,
|
|
191
|
+
isPerRun: true
|
|
192
|
+
})
|
|
193
|
+
})]
|
|
194
|
+
})
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
var PipelineRunModal = ({ isOpen, pipelineId, onClose }) => {
|
|
198
|
+
const session = useOverlaySession(isOpen);
|
|
199
|
+
const heldPipelineId = useOverlayRecord(isOpen, pipelineId);
|
|
200
|
+
const { data, error, isError } = useGetPipelineQuery({
|
|
201
|
+
input: createGetPipelineInput(heldPipelineId ?? ""),
|
|
202
|
+
options: {
|
|
203
|
+
enabled: !!session && !!heldPipelineId,
|
|
204
|
+
retry: false
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
if (!session) return null;
|
|
208
|
+
if (isError) {
|
|
209
|
+
const isNotFound = isNotFoundError(error);
|
|
210
|
+
return /* @__PURE__ */ jsx(Modal, {
|
|
211
|
+
isOpen,
|
|
212
|
+
header: "Run pipeline",
|
|
213
|
+
size: ModalSize.MEDIUM,
|
|
214
|
+
onOpenChange: (isOpen) => {
|
|
215
|
+
if (!isOpen) onClose();
|
|
216
|
+
},
|
|
217
|
+
children: /* @__PURE__ */ jsx(ErrorLayout, {
|
|
218
|
+
header: isNotFound ? "Pipeline not found" : "Failed to load pipeline",
|
|
219
|
+
description: isNotFound ? "This pipeline no longer exists." : "The pipeline could not be loaded. Try again later.",
|
|
220
|
+
detail: IS_DEBUG ? error?.message : void 0,
|
|
221
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
222
|
+
label: "Close",
|
|
223
|
+
onClick: onClose,
|
|
224
|
+
variant: ButtonVariant.SECONDARY
|
|
225
|
+
})
|
|
226
|
+
})
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
if (!data?.pipeline) return /* @__PURE__ */ jsx(Modal, {
|
|
230
|
+
isOpen,
|
|
231
|
+
header: "Run pipeline",
|
|
232
|
+
size: ModalSize.MEDIUM,
|
|
233
|
+
onOpenChange: (isOpen) => {
|
|
234
|
+
if (!isOpen) onClose();
|
|
235
|
+
},
|
|
236
|
+
children: /* @__PURE__ */ jsx(PendingLayout, {})
|
|
237
|
+
});
|
|
238
|
+
return /* @__PURE__ */ jsx(PipelineRunModalContent, {
|
|
239
|
+
isOpen,
|
|
240
|
+
pipeline: data.pipeline,
|
|
241
|
+
onClose
|
|
242
|
+
}, session);
|
|
243
|
+
};
|
|
244
|
+
//#endregion
|
|
245
|
+
export { PipelineRunModal as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface PipelineRunModalResourcesPaneProps {
|
|
3
|
+
resources: string[];
|
|
4
|
+
selectedResources: string[];
|
|
5
|
+
resyncResources: string[];
|
|
6
|
+
isDefault: boolean;
|
|
7
|
+
canSubset: boolean;
|
|
8
|
+
onSelectedChange: (selectedResources: string[]) => void;
|
|
9
|
+
onResyncChange: (resyncResources: string[]) => void;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const PipelineRunModalResourcesPane: FC<PipelineRunModalResourcesPaneProps>;
|
|
13
|
+
export default PipelineRunModalResourcesPane;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import BaseHeader, { BaseHeaderSize } from "../../../../components/BaseHeader.js";
|
|
2
|
+
import { PipelineRunResourceMode } from "./types.js";
|
|
3
|
+
import { PIPELINE_RUN_RESOURCE_MODE_OPTIONS } from "./constants.js";
|
|
4
|
+
import PipelineRunModalSectionChip from "./PipelineRunModalSectionChip.js";
|
|
5
|
+
import { setPipelineRunResourceMode } from "./utils.js";
|
|
6
|
+
import { FlowArrowIcon, MagnifyingGlassIcon } from "@phosphor-icons/react";
|
|
7
|
+
import { useMemo, useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import Flex, { AlignItems, FlexDirection, JustifyContent } from "@galaxy-io/dls/layout/Flex";
|
|
10
|
+
import Box from "@galaxy-io/dls/layout/Box";
|
|
11
|
+
import Text, { TextSize } from "@galaxy-io/dls/text/Text";
|
|
12
|
+
import { FontFamily } from "@galaxy-io/dls/theme/enums";
|
|
13
|
+
import SearchInput from "@galaxy-io/dls/inputs/SearchInput";
|
|
14
|
+
import Divider from "@galaxy-io/dls/layout/Divider";
|
|
15
|
+
import { isSearchMatch } from "@galaxy-io/dls/utils/search";
|
|
16
|
+
import EmptyLayout, { EmptyLayoutSize } from "@galaxy-io/dls/layout/EmptyLayout";
|
|
17
|
+
import InfiniteTable, { InfiniteTableSize } from "@galaxy-io/dls/table/InfiniteTable";
|
|
18
|
+
import ToggleInput, { ToggleInputSize } from "@galaxy-io/dls/inputs/ToggleInput";
|
|
19
|
+
//#region src/pages/pipelines/components/run/PipelineRunModalResourcesPane.tsx
|
|
20
|
+
var PipelineRunModalResourcesPane = ({ resources, selectedResources, resyncResources, isDefault, canSubset, onSelectedChange, onResyncChange, onClose }) => {
|
|
21
|
+
const [search, setSearch] = useState("");
|
|
22
|
+
const visibleResources = useMemo(() => resources.filter((resource) => isSearchMatch(search, resource)), [resources, search]);
|
|
23
|
+
const handleSelectedChange = (next) => onSelectedChange(resources.filter((resource) => next.includes(resource) || !visibleResources.includes(resource) && selectedResources.includes(resource)));
|
|
24
|
+
const columns = useMemo(() => [{
|
|
25
|
+
id: "name",
|
|
26
|
+
header: "Resource",
|
|
27
|
+
isRowHeader: true,
|
|
28
|
+
cell: ({ row }) => /* @__PURE__ */ jsx(Text, {
|
|
29
|
+
size: TextSize.BODY_SM,
|
|
30
|
+
family: FontFamily.MONO,
|
|
31
|
+
lineClamp: 1,
|
|
32
|
+
children: row
|
|
33
|
+
})
|
|
34
|
+
}, {
|
|
35
|
+
id: "mode",
|
|
36
|
+
header: "Mode",
|
|
37
|
+
width: 130,
|
|
38
|
+
align: "right",
|
|
39
|
+
cell: ({ row }) => /* @__PURE__ */ jsx(Flex, {
|
|
40
|
+
justifyContent: JustifyContent.END,
|
|
41
|
+
fillWidth: true,
|
|
42
|
+
children: /* @__PURE__ */ jsx(ToggleInput, {
|
|
43
|
+
ariaLabel: `${row} mode`,
|
|
44
|
+
options: PIPELINE_RUN_RESOURCE_MODE_OPTIONS,
|
|
45
|
+
value: resyncResources.includes(row) ? PipelineRunResourceMode.RESYNC : PipelineRunResourceMode.CONTINUE,
|
|
46
|
+
onChange: (mode) => onResyncChange(setPipelineRunResourceMode(resources, resyncResources, [row], mode)),
|
|
47
|
+
size: ToggleInputSize.X_SMALL,
|
|
48
|
+
isDisabled: !selectedResources.includes(row)
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
}], [
|
|
52
|
+
resources,
|
|
53
|
+
selectedResources,
|
|
54
|
+
resyncResources,
|
|
55
|
+
onResyncChange
|
|
56
|
+
]);
|
|
57
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
58
|
+
width: 420,
|
|
59
|
+
height: "100%",
|
|
60
|
+
children: /* @__PURE__ */ jsxs(Flex, {
|
|
61
|
+
direction: FlexDirection.COLUMN,
|
|
62
|
+
height: "100%",
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsx(Flex, {
|
|
65
|
+
alignItems: AlignItems.CENTER,
|
|
66
|
+
padding: [
|
|
67
|
+
12,
|
|
68
|
+
12,
|
|
69
|
+
12,
|
|
70
|
+
16
|
|
71
|
+
],
|
|
72
|
+
shrink: 0,
|
|
73
|
+
children: /* @__PURE__ */ jsx(BaseHeader, {
|
|
74
|
+
title: "Resources",
|
|
75
|
+
icon: FlowArrowIcon,
|
|
76
|
+
size: BaseHeaderSize.MEDIUM,
|
|
77
|
+
actions: [/* @__PURE__ */ jsx(PipelineRunModalSectionChip, { isDefault }, "status")],
|
|
78
|
+
onClose
|
|
79
|
+
})
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
82
|
+
/* @__PURE__ */ jsx(Box, {
|
|
83
|
+
padding: 8,
|
|
84
|
+
children: /* @__PURE__ */ jsx(SearchInput, {
|
|
85
|
+
value: search,
|
|
86
|
+
onChange: setSearch,
|
|
87
|
+
placeholder: "Search resources...",
|
|
88
|
+
ariaLabel: "Search resources",
|
|
89
|
+
fillWidth: true
|
|
90
|
+
})
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
93
|
+
/* @__PURE__ */ jsx(Flex, {
|
|
94
|
+
direction: FlexDirection.COLUMN,
|
|
95
|
+
grow: 1,
|
|
96
|
+
basis: 0,
|
|
97
|
+
minHeight: 0,
|
|
98
|
+
children: /* @__PURE__ */ jsx(InfiniteTable, {
|
|
99
|
+
ariaLabel: "Resources",
|
|
100
|
+
columns,
|
|
101
|
+
data: visibleResources,
|
|
102
|
+
getRowId: (row) => row,
|
|
103
|
+
size: InfiniteTableSize.SMALL,
|
|
104
|
+
inset: 4,
|
|
105
|
+
value: canSubset ? selectedResources : void 0,
|
|
106
|
+
onChange: canSubset ? handleSelectedChange : void 0,
|
|
107
|
+
isSelectable: canSubset,
|
|
108
|
+
emptyState: /* @__PURE__ */ jsx(EmptyLayout, {
|
|
109
|
+
size: EmptyLayoutSize.SMALL,
|
|
110
|
+
icon: MagnifyingGlassIcon,
|
|
111
|
+
header: "No resources match your search"
|
|
112
|
+
})
|
|
113
|
+
})
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
//#endregion
|
|
120
|
+
export { PipelineRunModalResourcesPane as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import Chip, { ChipSize, ChipVariant } from "@galaxy-io/dls/chips/Chip";
|
|
3
|
+
//#region src/pages/pipelines/components/run/PipelineRunModalSectionChip.tsx
|
|
4
|
+
var PipelineRunModalSectionChip = ({ isDefault }) => isDefault ? /* @__PURE__ */ jsx(Chip, {
|
|
5
|
+
label: "Default",
|
|
6
|
+
size: ChipSize.SMALL,
|
|
7
|
+
variant: ChipVariant.SECONDARY
|
|
8
|
+
}) : /* @__PURE__ */ jsx(Chip, {
|
|
9
|
+
label: "Custom",
|
|
10
|
+
size: ChipSize.SMALL,
|
|
11
|
+
variant: ChipVariant.WARNING
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { PipelineRunModalSectionChip as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipelineRunResourceMode } from './types';
|
|
2
|
+
export declare const PIPELINE_RUN_MODAL_TITLE_ICON_SIZE = 15;
|
|
3
|
+
export declare const PIPELINE_RUN_MODAL_RESOURCES_CARET_SIZE = 12;
|
|
4
|
+
export declare const PIPELINE_RUN_MODAL_RESOURCES_PANE_WIDTH = 420;
|
|
5
|
+
export declare const PIPELINE_RUN_MODAL_RESOURCE_MODE_COLUMN_WIDTH = 130;
|
|
6
|
+
export declare const PIPELINE_RUN_RESOURCE_MODE_OPTIONS: {
|
|
7
|
+
id: PipelineRunResourceMode;
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PipelineRunResourceMode } from "./types.js";
|
|
2
|
+
//#region src/pages/pipelines/components/run/constants.ts
|
|
3
|
+
var PIPELINE_RUN_RESOURCE_MODE_OPTIONS = [{
|
|
4
|
+
id: PipelineRunResourceMode.CONTINUE,
|
|
5
|
+
label: "Continue"
|
|
6
|
+
}, {
|
|
7
|
+
id: PipelineRunResourceMode.RESYNC,
|
|
8
|
+
label: "Resync"
|
|
9
|
+
}];
|
|
10
|
+
//#endregion
|
|
11
|
+
export { PIPELINE_RUN_RESOURCE_MODE_OPTIONS };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/pages/pipelines/components/run/types.ts
|
|
2
|
+
var PipelineRunResourceMode = /* @__PURE__ */ function(PipelineRunResourceMode) {
|
|
3
|
+
PipelineRunResourceMode["CONTINUE"] = "CONTINUE";
|
|
4
|
+
PipelineRunResourceMode["RESYNC"] = "RESYNC";
|
|
5
|
+
return PipelineRunResourceMode;
|
|
6
|
+
}({});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { PipelineRunResourceMode };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Connection } from '../../../../gen/ingestion/v1/connections_pb';
|
|
2
|
+
import { Pipeline } from '../../../../gen/ingestion/v1/pipelines_pb';
|
|
3
|
+
import { PipelineRunResourceMode } from './types';
|
|
4
|
+
export declare const canPipelineRunSubset: (pipeline: Pipeline, source: Connection | undefined) => boolean;
|
|
5
|
+
export declare const setPipelineRunResourceMode: (resources: string[], resyncResources: string[], targets: string[], mode: PipelineRunResourceMode) => string[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExecutionMode, ReplicationMode } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
2
|
+
import { PipelineRunResourceMode } from "./types.js";
|
|
3
|
+
//#region src/pages/pipelines/components/run/utils.ts
|
|
4
|
+
var canPipelineRunSubset = (pipeline, source) => pipeline.executionMode !== ExecutionMode.CONTINUOUS && !!source && source.replication !== ReplicationMode.CDC;
|
|
5
|
+
var setPipelineRunResourceMode = (resources, resyncResources, targets, mode) => resources.filter((resource) => targets.includes(resource) ? mode === PipelineRunResourceMode.RESYNC : resyncResources.includes(resource));
|
|
6
|
+
//#endregion
|
|
7
|
+
export { canPipelineRunSubset, setPipelineRunResourceMode };
|
|
@@ -5,22 +5,22 @@ import { getErrorMessage } from "../../../../utils/errors.js";
|
|
|
5
5
|
import { formatRunDuration } from "../../../../utils/runs.js";
|
|
6
6
|
import PipelineName from "../../../../components/pipelines/PipelineName.js";
|
|
7
7
|
import PipelineScheduleIndicator from "../../../../components/pipelines/PipelineScheduleIndicator.js";
|
|
8
|
+
import { usePipelineRun } from "../../hooks/usePipelineRun.js";
|
|
8
9
|
import PipelineRunStatus from "../../../../components/runs/PipelineRunStatus.js";
|
|
9
10
|
import { PIPELINES_TABLE_COLUMN_ID_PIPELINE, PIPELINES_TABLE_COLUMN_LAYOUT_STORAGE_KEY } from "./constants.js";
|
|
10
11
|
import PipelinesTableColumnFlow from "./columns/PipelinesTableColumnFlow.js";
|
|
11
12
|
import PipelinesTableColumnRecentRuns from "./columns/PipelinesTableColumnRecentRuns.js";
|
|
12
13
|
import PipelinesTableRowActions from "./PipelinesTableRowActions.js";
|
|
13
|
-
import { usePipelineRun } from "../../hooks/usePipelineRun.js";
|
|
14
14
|
import { useUpdatePipelineScheduleMutation } from "../../../../api/queries/schedules.js";
|
|
15
15
|
import { MagnifyingGlassIcon } from "@phosphor-icons/react";
|
|
16
16
|
import { create } from "@bufbuild/protobuf";
|
|
17
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
18
|
import { useLocalStorage } from "@galaxy-io/dls/hooks/useLocalStorage";
|
|
19
19
|
import Flex, { AlignItems, FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
20
|
+
import { EMPTY_VALUE, formatNumber, formatRelativeTime } from "@galaxy-io/dls/utils/format";
|
|
20
21
|
import { ToastVariant } from "@galaxy-io/dls/toast/Toast";
|
|
21
22
|
import { useToast } from "@galaxy-io/dls/toast/useToast";
|
|
22
23
|
import Text, { TextSize, TextVariant } from "@galaxy-io/dls/text/Text";
|
|
23
|
-
import { EMPTY_VALUE, formatNumber, formatRelativeTime } from "@galaxy-io/dls/utils/format";
|
|
24
24
|
import { FontFamily } from "@galaxy-io/dls/theme/enums";
|
|
25
25
|
import EmptyLayout from "@galaxy-io/dls/layout/EmptyLayout";
|
|
26
26
|
import InfiniteTable from "@galaxy-io/dls/table/InfiniteTable";
|
|
@@ -4,9 +4,9 @@ import { ListRunsRequestSchema, RunStatus } from "../../../../../gen/ingestion/v
|
|
|
4
4
|
import { PIPELINE_RUN_EXECUTED_STATUSES, PIPELINE_RUN_STATUS_TO_LABEL_MAP } from "../../../../../components/runs/constants.js";
|
|
5
5
|
import PipelineRunStatusSwatch from "../../../../../components/runs/PipelineRunStatusSwatch.js";
|
|
6
6
|
import { useFilamentNavigate } from "../../../../../module/hooks.js";
|
|
7
|
+
import { formatTimestamp } from "../../../../../utils/format.js";
|
|
7
8
|
import { getPipelineNextFireAt } from "../../../../../components/pipelines/utils.js";
|
|
8
9
|
import { useListRunsQuery } from "../../../../../api/queries/runs.js";
|
|
9
|
-
import { formatTimestamp } from "../../../../../utils/format.js";
|
|
10
10
|
import PipelinesTableColumnRecentRunsTooltip from "./PipelinesTableColumnRecentRunsTooltip.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { useMemo } from "react";
|
package/dist/pages/pipelines/components/table/columns/PipelinesTableColumnRecentRunsTooltip.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { formatRunDuration } from "../../../../../utils/runs.js";
|
|
2
1
|
import { formatTimestamp } from "../../../../../utils/format.js";
|
|
2
|
+
import { formatRunDuration } from "../../../../../utils/runs.js";
|
|
3
3
|
import { getPipelineHistoryRunTimestamp } from "../../../history/utils.js";
|
|
4
4
|
import { Fragment } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import Flex, { AlignItems, FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
7
|
+
import { formatBytes, formatNumber } from "@galaxy-io/dls/utils/format";
|
|
7
8
|
import Box from "@galaxy-io/dls/layout/Box";
|
|
8
9
|
import Text, { TextSize, TextVariant, TextWeight } from "@galaxy-io/dls/text/Text";
|
|
9
|
-
import { formatBytes, formatNumber } from "@galaxy-io/dls/utils/format";
|
|
10
10
|
import { FontFamily } from "@galaxy-io/dls/theme/enums";
|
|
11
11
|
import Grid, { GridAlignItems } from "@galaxy-io/dls/layout/Grid";
|
|
12
12
|
//#region src/pages/pipelines/components/table/columns/PipelinesTableColumnRecentRunsTooltip.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { formatTimestamp } from "../../../utils/format.js";
|
|
1
2
|
import KeyValueList from "../../../components/KeyValueList.js";
|
|
2
3
|
import KeyValueListRow from "../../../components/KeyValueListRow.js";
|
|
3
|
-
import { formatTimestamp } from "../../../utils/format.js";
|
|
4
4
|
import PipelineRunRecords from "../../../components/runs/PipelineRunRecords.js";
|
|
5
5
|
import PipelineRunVolume from "../../../components/runs/PipelineRunVolume.js";
|
|
6
6
|
import PipelineRunStatus from "../../../components/runs/PipelineRunStatus.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { ExecutionMode } from "../../../gen/ingestion/v1/common_pb.js";
|
|
2
2
|
import { GetRunRequestSchema, RunStatus } from "../../../gen/ingestion/v1/runs_pb.js";
|
|
3
|
-
import { useGetRunQuery } from "../../../api/queries/runs.js";
|
|
4
3
|
import { formatTimestamp } from "../../../utils/format.js";
|
|
4
|
+
import { useGetRunQuery } from "../../../api/queries/runs.js";
|
|
5
5
|
import PipelineHistoryRunInfoConnectionColumn from "./components/PipelineHistoryRunInfoConnectionColumn.js";
|
|
6
6
|
import PipelineHistoryRunContinuousSummary from "./PipelineHistoryRunContinuousSummary.js";
|
|
7
7
|
import { useMemo } from "react";
|
|
8
8
|
import { create } from "@bufbuild/protobuf";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import Flex, { AlignItems } from "@galaxy-io/dls/layout/Flex";
|
|
11
|
+
import { formatBytes, formatNumber } from "@galaxy-io/dls/utils/format";
|
|
11
12
|
import Box, { BoxVariant } from "@galaxy-io/dls/layout/Box";
|
|
12
13
|
import Skeleton from "@galaxy-io/dls/feedback/Skeleton";
|
|
13
14
|
import Text, { TextSize, TextVariant } from "@galaxy-io/dls/text/Text";
|
|
14
|
-
import { formatBytes, formatNumber } from "@galaxy-io/dls/utils/format";
|
|
15
15
|
import { FontFamily } from "@galaxy-io/dls/theme/enums";
|
|
16
16
|
import Divider from "@galaxy-io/dls/layout/Divider";
|
|
17
17
|
import InfiniteTable, { InfiniteTableSize } from "@galaxy-io/dls/table/InfiniteTable";
|
|
@@ -115,7 +115,6 @@ var PipelineHistoryRunInfo = ({ runId }) => {
|
|
|
115
115
|
return /* @__PURE__ */ jsx(Box, {
|
|
116
116
|
variant: BoxVariant.PRIMARY,
|
|
117
117
|
fillWidth: true,
|
|
118
|
-
height: "100%",
|
|
119
118
|
children: renderBody()
|
|
120
119
|
});
|
|
121
120
|
};
|
|
@@ -4,8 +4,8 @@ import ConnectorTile from "../../../../components/connections/ConnectorTile.js";
|
|
|
4
4
|
import { createGetConnectionInput, useGetConnectionQuery } from "../../../../api/queries/connections.js";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import Flex, { AlignItems } from "@galaxy-io/dls/layout/Flex";
|
|
7
|
-
import Text, { TextSize, TextVariant, TextWeight } from "@galaxy-io/dls/text/Text";
|
|
8
7
|
import { EMPTY_VALUE } from "@galaxy-io/dls/utils/format";
|
|
8
|
+
import Text, { TextSize, TextVariant, TextWeight } from "@galaxy-io/dls/text/Text";
|
|
9
9
|
import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
10
10
|
import { FontFamily } from "@galaxy-io/dls/theme/enums";
|
|
11
11
|
//#region src/pages/pipelines/history/components/PipelineHistoryRunInfoConnectionColumn.tsx
|
|
@@ -2,10 +2,12 @@ import { WorkerConfiguration } from '../../../gen/ingestion/v1/common_pb';
|
|
|
2
2
|
import { Pipeline } from '../../../gen/ingestion/v1/pipelines_pb';
|
|
3
3
|
interface PipelineRunOptions {
|
|
4
4
|
workerConfiguration?: WorkerConfiguration;
|
|
5
|
+
resources?: string[];
|
|
6
|
+
resyncResources?: string[];
|
|
5
7
|
onSuccess?: () => void;
|
|
6
8
|
}
|
|
7
9
|
export declare const usePipelineRun: () => {
|
|
8
|
-
startRun: (pipeline: Pipeline, { workerConfiguration, onSuccess }?: PipelineRunOptions) => void;
|
|
10
|
+
startRun: (pipeline: Pipeline, { workerConfiguration, resources, resyncResources, onSuccess }?: PipelineRunOptions) => void;
|
|
9
11
|
isRunning: boolean;
|
|
10
12
|
};
|
|
11
13
|
export {};
|
|
@@ -11,10 +11,12 @@ var usePipelineRun = () => {
|
|
|
11
11
|
const { toast } = useToast();
|
|
12
12
|
const { mutateAsync: runPipeline, isPending: isRunning } = useRunPipelineMutation();
|
|
13
13
|
return {
|
|
14
|
-
startRun: useCallback((pipeline, { workerConfiguration, onSuccess } = {}) => {
|
|
14
|
+
startRun: useCallback((pipeline, { workerConfiguration, resources, resyncResources, onSuccess } = {}) => {
|
|
15
15
|
const run = runPipeline(create(RunPipelineRequestSchema, {
|
|
16
16
|
pipelineId: pipeline.id,
|
|
17
17
|
workerConfiguration,
|
|
18
|
+
resources,
|
|
19
|
+
resyncResources,
|
|
18
20
|
options: { executionMode: pipeline.executionMode }
|
|
19
21
|
}));
|
|
20
22
|
toast.promise(run, {
|
|
@@ -9,4 +9,5 @@ export declare const getRunStopSignal: (run: RunInfo) => RunSignal.CANCEL | RunS
|
|
|
9
9
|
export declare const getEdgeBlockingRequirements: (edge: EdgeValidation) => Requirement[];
|
|
10
10
|
export declare const getEdgeValidationErrors: (edge: EdgeValidation) => string[];
|
|
11
11
|
export declare const getPipelineValidationErrors: (validation: ValidatePipelineResponse | undefined) => string[];
|
|
12
|
+
export declare const getPipelineResources: (version: PipelineVersion | undefined) => string[];
|
|
12
13
|
export declare const isPipelineRunnable: (version: PipelineVersion | undefined) => boolean;
|
|
@@ -11,6 +11,7 @@ var getRunStopSignal = (run) => isContinuousRun(run) ? RunSignal.STOP : RunSigna
|
|
|
11
11
|
var getEdgeBlockingRequirements = (edge) => [...edge.requirements, ...edge.resources.flatMap((resource) => resource.requirements)].filter((requirement) => requirement.blocking);
|
|
12
12
|
var getEdgeValidationErrors = (edge) => [...edge.errors.map((error) => error.message), ...getEdgeBlockingRequirements(edge).map((requirement) => requirement.message)];
|
|
13
13
|
var getPipelineValidationErrors = (validation) => [.../* @__PURE__ */ new Set([...(validation?.errors ?? []).map((error) => error.message), ...(validation?.edges ?? []).flatMap(getEdgeValidationErrors)])];
|
|
14
|
+
var getPipelineResources = (version) => [...new Set((version?.graph?.edges ?? []).map((edge) => edge.resource).filter(Boolean))];
|
|
14
15
|
var isPipelineRunnable = (version) => (version?.graph?.nodes ?? []).some((node) => node.kind === ConnectorKind.SOURCE) && (version?.graph?.nodes ?? []).some((node) => node.kind === ConnectorKind.SINK) && (version?.graph?.edges ?? []).length > 0;
|
|
15
16
|
//#endregion
|
|
16
|
-
export { getEdgeBlockingRequirements, getEdgeValidationErrors, getPipelineValidationErrors, getRunPauseSignal, getRunStopSignal, getSupportedExecutionModes, isPipelineRunnable };
|
|
17
|
+
export { getEdgeBlockingRequirements, getEdgeValidationErrors, getPipelineResources, getPipelineValidationErrors, getRunPauseSignal, getRunStopSignal, getSupportedExecutionModes, isPipelineRunnable };
|