@burdenoff/microfe-cosmicintersection 2026.1031.1 → 2026.1101.2
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/cosmicintersection/CosmicIntersectionRoot.d.ts +0 -1
- package/dist/cosmicintersection/CosmicIntersectionRoot.js +2 -2
- package/dist/cosmicintersection/CosmicIntersectionRoutes.d.ts +1 -1
- package/dist/cosmicintersection/CosmicIntersectionRoutes.js +1 -1
- package/dist/cosmicintersection/api/cosmicApi.d.ts +0 -1
- package/dist/cosmicintersection/api/cosmicApi.js +82 -82
- package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
- package/dist/cosmicintersection/api/tagsApi.d.ts +100 -0
- package/dist/cosmicintersection/api/tagsApi.d.ts.map +1 -0
- package/dist/cosmicintersection/api/tagsApi.js +110 -0
- package/dist/cosmicintersection/api/tagsApi.js.map +1 -0
- package/dist/cosmicintersection/components/ActionMenu.d.ts +1 -2
- package/dist/cosmicintersection/components/ActionMenu.js +1 -1
- package/dist/cosmicintersection/components/ActivityFeedPanel.d.ts +1 -1
- package/dist/cosmicintersection/components/ActivityFeedPanel.js +4 -4
- package/dist/cosmicintersection/components/DiscussionPanel.d.ts +1 -1
- package/dist/cosmicintersection/components/DiscussionPanel.js +2 -2
- package/dist/cosmicintersection/components/EmptyState.d.ts +1 -2
- package/dist/cosmicintersection/components/EmptyState.js +1 -1
- package/dist/cosmicintersection/components/EntityFormShell.d.ts +1 -2
- package/dist/cosmicintersection/components/EntityFormShell.js +1 -1
- package/dist/cosmicintersection/components/EntityTagsField.d.ts +6 -6
- package/dist/cosmicintersection/components/EntityTagsField.js +1 -1
- package/dist/cosmicintersection/components/EntityTagsField.js.map +1 -1
- package/dist/cosmicintersection/components/ErrorState.d.ts +1 -1
- package/dist/cosmicintersection/components/ErrorState.js +1 -1
- package/dist/cosmicintersection/components/FacetPanel.d.ts +1 -1
- package/dist/cosmicintersection/components/FacetPanel.js +1 -1
- package/dist/cosmicintersection/components/FacetPanel.js.map +1 -1
- package/dist/cosmicintersection/components/FileUploadField.d.ts +1 -2
- package/dist/cosmicintersection/components/FileUploadField.js +1 -1
- package/dist/cosmicintersection/components/FileUploadField.js.map +1 -1
- package/dist/cosmicintersection/components/LineageGraph.d.ts +1 -2
- package/dist/cosmicintersection/components/LineageGraph.js +1 -1
- package/dist/cosmicintersection/components/LineageGraph.js.map +1 -1
- package/dist/cosmicintersection/components/LoadingState.d.ts +1 -1
- package/dist/cosmicintersection/components/LoadingState.js +1 -1
- package/dist/cosmicintersection/components/LoadingState.js.map +1 -1
- package/dist/cosmicintersection/components/PageLayout.d.ts +1 -2
- package/dist/cosmicintersection/components/PageLayout.js +1 -1
- package/dist/cosmicintersection/components/Pagination.d.ts +1 -1
- package/dist/cosmicintersection/components/Pagination.js +1 -1
- package/dist/cosmicintersection/components/ResultsChart.d.ts +1 -1
- package/dist/cosmicintersection/components/ResultsChart.js +4 -3
- package/dist/cosmicintersection/components/ResultsChart.js.map +1 -1
- package/dist/cosmicintersection/components/SafeLink.d.ts +1 -2
- package/dist/cosmicintersection/components/SafeLink.js +1 -1
- package/dist/cosmicintersection/components/StatusBadge.d.ts +1 -1
- package/dist/cosmicintersection/components/StatusBadge.js +1 -1
- package/dist/cosmicintersection/components/StatusBadge.js.map +1 -1
- package/dist/cosmicintersection/components/StepDAG.d.ts +1 -2
- package/dist/cosmicintersection/components/StepDAG.js +1 -1
- package/dist/cosmicintersection/components/StepDAG.js.map +1 -1
- package/dist/cosmicintersection/components/WorkspaceTagsPicker.d.ts +27 -0
- package/dist/cosmicintersection/components/WorkspaceTagsPicker.d.ts.map +1 -0
- package/dist/cosmicintersection/components/WorkspaceTagsPicker.js +141 -0
- package/dist/cosmicintersection/components/WorkspaceTagsPicker.js.map +1 -0
- package/dist/cosmicintersection/components/index.d.ts +1 -0
- package/dist/cosmicintersection/components/index.d.ts.map +1 -1
- package/dist/cosmicintersection/components/index.js +15 -13
- package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts +1 -2
- package/dist/cosmicintersection/context/CosmicIntersectionContext.js +2 -1
- package/dist/cosmicintersection/context/CosmicIntersectionContext.js.map +1 -1
- package/dist/cosmicintersection/hooks/useEntityTagSync.d.ts +49 -0
- package/dist/cosmicintersection/hooks/useEntityTagSync.d.ts.map +1 -0
- package/dist/cosmicintersection/hooks/useEntityTagSync.js +86 -0
- package/dist/cosmicintersection/hooks/useEntityTagSync.js.map +1 -0
- package/dist/cosmicintersection/lib/assistantAwareDialog.js +7 -5
- package/dist/cosmicintersection/lib/assistantAwareDialog.js.map +1 -1
- package/dist/cosmicintersection/lib/mutationResult.d.ts +0 -1
- package/dist/cosmicintersection/lib/toast.d.ts +0 -1
- package/dist/cosmicintersection/lib/toast.js +1 -1
- package/dist/cosmicintersection/lib/useSelectedRecord.js.map +1 -1
- package/dist/cosmicintersection/pages/access/AccessPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/access/AccessPage.js +10 -9
- package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +8 -8
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js +7 -7
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.js +80 -78
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionsPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionsPage.js +5 -5
- package/dist/cosmicintersection/pages/collections/CollectionsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.js +3 -3
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +124 -115
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.js +109 -106
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.js +7 -7
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +6 -6
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -1
- package/dist/cosmicintersection/pages/lineage/LineagePage.d.ts +1 -1
- package/dist/cosmicintersection/pages/lineage/LineagePage.js +5 -5
- package/dist/cosmicintersection/pages/lineage/LineagePage.js.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +7 -7
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.js +143 -141
- package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js +7 -7
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js +7 -7
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js +214 -212
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js +7 -7
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleaseFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/releases/ReleaseFormPage.js +5 -4
- package/dist/cosmicintersection/pages/releases/ReleaseFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +9 -9
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js +7 -7
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunsPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/runs/RunsPage.js +6 -6
- package/dist/cosmicintersection/pages/runs/RunsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.js +7 -7
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourceFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/sources/SourceFormPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourceFormPage.js +111 -108
- package/dist/cosmicintersection/pages/sources/SourceFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourcesPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/sources/SourcesPage.js +8 -8
- package/dist/cosmicintersection/pages/sources/SourcesPage.js.map +1 -1
- package/dist/cosmicintersection/types/index.d.ts +0 -1
- package/dist/cosmicintersection/utils/cn.d.ts +0 -1
- package/dist/cosmicintersection/utils/cn.js +1 -1
- package/dist/dev/main.d.ts +0 -1
- package/dist/generated/global-types.d.ts +2 -21
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.d.ts +2 -21
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/node_modules/clsx/dist/clsx.js +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +130 -130
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/stories/EmptyState.stories.d.ts +0 -1
- package/dist/stories/LoadingState.stories.d.ts +0 -1
- package/dist/stories/StatusBadge.stories.d.ts +0 -1
- package/dist/stories/WorkspaceTagsPicker.stories.d.ts +12 -0
- package/dist/stories/WorkspaceTagsPicker.stories.d.ts.map +1 -0
- package/dist/test/fakeGateway.d.ts +0 -1
- package/dist/test/fixtures.d.ts +0 -1
- package/dist/test/renderWithProviders.d.ts +0 -1
- package/dist/test/setup.d.ts +0 -1
- package/dist/utils/pageContext.d.ts +0 -2
- package/dist/utils/pageContext.d.ts.map +1 -1
- package/dist/utils/pageContext.js +4 -6
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +44 -45
- package/dist/generated/global-operations.d.ts +0 -2
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts +0 -2
- package/dist/generated/wspace-operations.d.ts.map +0 -1
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { useCosmicIntersection as e } from "../../context/CosmicIntersectionContext.js";
|
|
2
2
|
import { notify as t } from "../../lib/toast.js";
|
|
3
3
|
import { useCosCreatePipelineMutation as n, useCosPipelineQuery as r, useCosUpdatePipelineMutation as i } from "../../api/cosmicApi.js";
|
|
4
|
-
import a from "../../components/EntityFormShell.js";
|
|
5
|
-
import
|
|
6
|
-
import { formatEnumLabel as
|
|
4
|
+
import { EntityFormShell as a } from "../../components/EntityFormShell.js";
|
|
5
|
+
import { WorkspaceTagsPicker as o } from "../../components/WorkspaceTagsPicker.js";
|
|
6
|
+
import { formatEnumLabel as s } from "../../components/StatusBadge.js";
|
|
7
7
|
import "../../components/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import { useEntityTagSync as c } from "../../hooks/useEntityTagSync.js";
|
|
9
|
+
import { describeError as l, mutationSucceeded as u } from "../../lib/mutationResult.js";
|
|
10
|
+
import { useMemo as d, useState as f } from "react";
|
|
11
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
12
|
+
import { useParams as ee } from "react-router";
|
|
13
|
+
import { ArrowDown as te, ArrowUp as h, GripVertical as g, Plus as ne, Trash2 as re } from "lucide-react";
|
|
14
|
+
import { Button as _, Input as v, Label as y, Select as b, SelectContent as x, SelectItem as S, SelectTrigger as C, SelectValue as w, Textarea as T } from "@burdenoff/fe-libs/ui";
|
|
14
15
|
//#region src/cosmicintersection/pages/pipelines/PipelineFormPage.tsx
|
|
15
|
-
var
|
|
16
|
+
var E = [
|
|
16
17
|
"MANUAL",
|
|
17
18
|
"SCHEDULED",
|
|
18
19
|
"ON_INGEST",
|
|
19
20
|
"WEBHOOK"
|
|
20
|
-
],
|
|
21
|
+
], D = [
|
|
21
22
|
"INGEST",
|
|
22
23
|
"CALIBRATE",
|
|
23
24
|
"TRANSFORM",
|
|
@@ -25,10 +26,10 @@ var D = [
|
|
|
25
26
|
"EXPORT",
|
|
26
27
|
"NOTIFY"
|
|
27
28
|
];
|
|
28
|
-
function
|
|
29
|
-
return typeof e == "string" &&
|
|
29
|
+
function O(e) {
|
|
30
|
+
return typeof e == "string" && D.includes(e);
|
|
30
31
|
}
|
|
31
|
-
var
|
|
32
|
+
var k = 0, A = () => `step-${k += 1}`, j = {
|
|
32
33
|
name: "",
|
|
33
34
|
description: "",
|
|
34
35
|
trigger: "MANUAL",
|
|
@@ -36,186 +37,223 @@ var A = 0, j = () => `step-${A += 1}`, M = {
|
|
|
36
37
|
steps: [],
|
|
37
38
|
tags: []
|
|
38
39
|
};
|
|
39
|
-
function
|
|
40
|
+
function M(e) {
|
|
40
41
|
if (!e) return [];
|
|
41
42
|
let t = e.steps;
|
|
42
43
|
if (!Array.isArray(t)) return [];
|
|
43
44
|
let n = [];
|
|
44
45
|
for (let e of t) if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
45
46
|
let t = e.kind, r = e.name;
|
|
46
|
-
|
|
47
|
-
id:
|
|
47
|
+
O(t) && n.push({
|
|
48
|
+
id: A(),
|
|
48
49
|
kind: t,
|
|
49
50
|
name: typeof r == "string" ? r : ""
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
53
|
return n;
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
+
function N(e) {
|
|
55
56
|
return e.map((e) => {
|
|
56
57
|
let t = { kind: e.kind }, n = e.name.trim();
|
|
57
58
|
return n && (t.name = n), t;
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
-
let { id:
|
|
62
|
-
if (
|
|
63
|
-
|
|
64
|
-
name:
|
|
65
|
-
description:
|
|
66
|
-
trigger:
|
|
67
|
-
schedule:
|
|
68
|
-
steps:
|
|
69
|
-
tags:
|
|
61
|
+
function P() {
|
|
62
|
+
let { id: k = "" } = ee(), P = !!k, { navigate: F } = e(), { data: ie, loading: ae } = r(k), [oe, { loading: I }] = n(), [L, { loading: R }] = i(), [z, B] = f(j), { syncTags: V, syncing: H } = c("COSMICINTERSECTION_PIPELINE"), [U, W] = f({}), [G, K] = f(""), [q, J] = f(null), Y = P ? ie?.cosPipeline : null, [se, ce] = f(null);
|
|
63
|
+
if (Y && Y.id !== se) {
|
|
64
|
+
ce(Y.id), B({
|
|
65
|
+
name: Y.name ?? "",
|
|
66
|
+
description: Y.description ?? "",
|
|
67
|
+
trigger: Y.trigger ?? "MANUAL",
|
|
68
|
+
schedule: Y.schedule ?? "",
|
|
69
|
+
steps: M(Y.definition),
|
|
70
|
+
tags: Y.tags ?? []
|
|
70
71
|
});
|
|
71
|
-
let e = { ...
|
|
72
|
-
delete e.steps,
|
|
72
|
+
let e = { ...Y.definition ?? {} };
|
|
73
|
+
delete e.steps, W(e);
|
|
73
74
|
}
|
|
74
|
-
let
|
|
75
|
-
|
|
75
|
+
let X = (e, t) => {
|
|
76
|
+
B((n) => ({
|
|
76
77
|
...n,
|
|
77
78
|
[e]: t
|
|
78
79
|
}));
|
|
79
|
-
},
|
|
80
|
-
...
|
|
81
|
-
steps:
|
|
82
|
-
}, null, 2), [
|
|
83
|
-
|
|
84
|
-
id:
|
|
80
|
+
}, le = d(() => JSON.stringify({
|
|
81
|
+
...U,
|
|
82
|
+
steps: N(z.steps)
|
|
83
|
+
}, null, 2), [U, z.steps]), ue = () => {
|
|
84
|
+
X("steps", [...z.steps, {
|
|
85
|
+
id: A(),
|
|
85
86
|
kind: "INGEST",
|
|
86
87
|
name: ""
|
|
87
88
|
}]);
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
|
|
89
|
+
}, de = (e) => {
|
|
90
|
+
X("steps", z.steps.filter((t) => t.id !== e));
|
|
91
|
+
}, Z = (e, t) => {
|
|
92
|
+
X("steps", z.steps.map((n) => n.id === e ? {
|
|
92
93
|
...n,
|
|
93
94
|
...t
|
|
94
95
|
} : n));
|
|
95
|
-
},
|
|
96
|
+
}, Q = (e, t) => {
|
|
96
97
|
let n = e + t;
|
|
97
|
-
if (n < 0 || n >=
|
|
98
|
-
let r = [...
|
|
99
|
-
r.splice(n, 0, i),
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
98
|
+
if (n < 0 || n >= z.steps.length) return;
|
|
99
|
+
let r = [...z.steps], [i] = r.splice(e, 1);
|
|
100
|
+
r.splice(n, 0, i), X("steps", r);
|
|
101
|
+
}, fe = () => {
|
|
102
|
+
let e;
|
|
103
|
+
try {
|
|
104
|
+
e = JSON.parse(G);
|
|
105
|
+
} catch (e) {
|
|
106
|
+
J(l(e) ?? "Invalid JSON.");
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (!e || typeof e != "object" || Array.isArray(e)) {
|
|
110
|
+
J("Definition must be a JSON object with a \"steps\" array.");
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
let n = e.steps;
|
|
114
|
+
if (!Array.isArray(n)) {
|
|
115
|
+
J("Definition must contain a \"steps\" array.");
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
let r = [];
|
|
119
|
+
for (let e of n) {
|
|
120
|
+
if (!e || typeof e != "object" || Array.isArray(e)) {
|
|
121
|
+
J("Each step must be an object with a \"kind\".");
|
|
110
122
|
return;
|
|
111
123
|
}
|
|
112
|
-
let
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
124
|
+
let t = e.kind;
|
|
125
|
+
if (!O(t)) {
|
|
126
|
+
J(`Invalid step kind "${String(t)}". Allowed: ${D.join(", ")}.`);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
let n = e.name;
|
|
130
|
+
r.push({
|
|
131
|
+
id: A(),
|
|
132
|
+
kind: t,
|
|
133
|
+
name: typeof n == "string" ? n : ""
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
let i = { ...e };
|
|
137
|
+
delete i.steps, W(i), X("steps", r), J(null), t.success("Steps updated", "The builder now reflects your JSON.");
|
|
138
|
+
}, pe = async (e) => {
|
|
139
|
+
if (e.preventDefault(), !z.name.trim()) {
|
|
140
|
+
t.error("Name is required", "Give the pipeline a name before saving.");
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
let n = N(z.steps), r = { ...U };
|
|
144
|
+
delete r.steps;
|
|
145
|
+
let i;
|
|
146
|
+
i = n.length > 0 ? {
|
|
147
|
+
...r,
|
|
148
|
+
steps: n
|
|
149
|
+
} : Object.keys(r).length > 0 ? r : void 0;
|
|
150
|
+
let a = z.trigger === "SCHEDULED" ? z.schedule.trim() : "";
|
|
151
|
+
try {
|
|
152
|
+
if (P) {
|
|
153
|
+
let e = Y?.tags ?? [], n = await L({ variables: {
|
|
154
|
+
id: k,
|
|
155
|
+
input: {
|
|
156
|
+
name: z.name.trim(),
|
|
157
|
+
description: z.description.trim() || void 0,
|
|
158
|
+
trigger: z.trigger,
|
|
159
|
+
schedule: a || void 0,
|
|
160
|
+
definition: i,
|
|
161
|
+
tags: z.tags
|
|
162
|
+
}
|
|
163
|
+
} });
|
|
164
|
+
if (!u(n, n.data?.cosUpdatePipeline?.id, "Could not update pipeline")) return;
|
|
165
|
+
await V(k, z.tags, e) && t.success("Pipeline updated", `“${z.name.trim()}” was saved.`), F(`pipelines/${k}`);
|
|
166
|
+
return;
|
|
149
167
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
168
|
+
let e = await oe({ variables: { input: {
|
|
169
|
+
name: z.name.trim(),
|
|
170
|
+
description: z.description.trim() || void 0,
|
|
171
|
+
trigger: z.trigger,
|
|
172
|
+
schedule: a || void 0,
|
|
173
|
+
definition: i,
|
|
174
|
+
tags: z.tags
|
|
175
|
+
} } }), n = e.data?.cosCreatePipeline?.id;
|
|
176
|
+
if (!u(e, n, "Could not create pipeline")) return;
|
|
177
|
+
(!n || await V(n, z.tags)) && t.success("Pipeline created", `“${z.name.trim()}” is ready.`), F(n ? `pipelines/${n}` : "pipelines");
|
|
178
|
+
} catch (e) {
|
|
179
|
+
t.error("Could not save pipeline", l(e));
|
|
180
|
+
}
|
|
181
|
+
}, $ = I || R || H;
|
|
182
|
+
return /* @__PURE__ */ m(a, {
|
|
183
|
+
title: P ? "Edit pipeline" : "New pipeline",
|
|
184
|
+
description: "Define how raw data is ingested, processed and released.",
|
|
185
|
+
purpose: "A pipeline chains ordered steps (ingest, calibrate, transform, analyze, export) over your datasets. Choose how it is triggered, add an optional cron schedule, and build its steps below.",
|
|
186
|
+
backLabel: P ? "Back to pipeline" : "Back to pipelines",
|
|
187
|
+
onBack: () => F(P ? `pipelines/${k}` : "pipelines"),
|
|
188
|
+
onSubmit: pe,
|
|
189
|
+
submitLabel: P ? "Save changes" : "Create pipeline",
|
|
190
|
+
saving: $,
|
|
191
|
+
submitDisabled: P && ae,
|
|
154
192
|
children: [
|
|
155
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ m("div", {
|
|
156
194
|
className: "space-y-1",
|
|
157
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ p(y, {
|
|
158
196
|
htmlFor: "pipeline-name",
|
|
159
197
|
children: "Name"
|
|
160
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ p(v, {
|
|
161
199
|
id: "pipeline-name",
|
|
162
|
-
value:
|
|
163
|
-
onChange: (e) =>
|
|
200
|
+
value: z.name,
|
|
201
|
+
onChange: (e) => X("name", e.target.value),
|
|
164
202
|
placeholder: "e.g. Kepler DR3 ingest",
|
|
165
203
|
required: !0
|
|
166
204
|
})]
|
|
167
205
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ m("div", {
|
|
169
207
|
className: "space-y-1",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
208
|
+
children: [/* @__PURE__ */ p(y, {
|
|
171
209
|
htmlFor: "pipeline-description",
|
|
172
210
|
children: "Description"
|
|
173
|
-
}), /* @__PURE__ */
|
|
211
|
+
}), /* @__PURE__ */ p(T, {
|
|
174
212
|
id: "pipeline-description",
|
|
175
|
-
value:
|
|
176
|
-
onChange: (e) =>
|
|
213
|
+
value: z.description,
|
|
214
|
+
onChange: (e) => X("description", e.target.value),
|
|
177
215
|
rows: 3,
|
|
178
216
|
placeholder: "What this pipeline does and when it runs."
|
|
179
217
|
})]
|
|
180
218
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ m("div", {
|
|
182
220
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ m("div", {
|
|
184
222
|
className: "space-y-1",
|
|
185
|
-
children: [/* @__PURE__ */
|
|
223
|
+
children: [/* @__PURE__ */ p(y, {
|
|
186
224
|
htmlFor: "pipeline-trigger",
|
|
187
225
|
children: "Trigger"
|
|
188
|
-
}), /* @__PURE__ */
|
|
189
|
-
value:
|
|
190
|
-
onValueChange: (e) =>
|
|
191
|
-
children: [/* @__PURE__ */
|
|
226
|
+
}), /* @__PURE__ */ m(b, {
|
|
227
|
+
value: z.trigger,
|
|
228
|
+
onValueChange: (e) => X("trigger", e),
|
|
229
|
+
children: [/* @__PURE__ */ p(C, {
|
|
192
230
|
id: "pipeline-trigger",
|
|
193
231
|
"aria-label": "Trigger",
|
|
194
|
-
children: /* @__PURE__ */
|
|
195
|
-
}), /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ p(w, {})
|
|
233
|
+
}), /* @__PURE__ */ p(x, { children: E.map((e) => /* @__PURE__ */ p(S, {
|
|
196
234
|
value: e,
|
|
197
|
-
children:
|
|
235
|
+
children: s(e)
|
|
198
236
|
}, e)) })]
|
|
199
237
|
})]
|
|
200
|
-
}),
|
|
238
|
+
}), z.trigger === "SCHEDULED" ? /* @__PURE__ */ m("div", {
|
|
201
239
|
className: "space-y-1",
|
|
202
240
|
children: [
|
|
203
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ p(y, {
|
|
204
242
|
htmlFor: "pipeline-schedule",
|
|
205
243
|
children: "Schedule (cron)"
|
|
206
244
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ p(v, {
|
|
208
246
|
id: "pipeline-schedule",
|
|
209
|
-
value:
|
|
210
|
-
onChange: (e) =>
|
|
247
|
+
value: z.schedule,
|
|
248
|
+
onChange: (e) => X("schedule", e.target.value),
|
|
211
249
|
placeholder: "0 2 * * *",
|
|
212
250
|
className: "font-mono"
|
|
213
251
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ m("p", {
|
|
215
253
|
className: "text-xs text-text-secondary",
|
|
216
254
|
children: [
|
|
217
255
|
"Standard 5-field cron expression, e.g. ",
|
|
218
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ p("span", {
|
|
219
257
|
className: "font-mono",
|
|
220
258
|
children: "0 2 * * *"
|
|
221
259
|
}),
|
|
@@ -226,171 +264,134 @@ function F() {
|
|
|
226
264
|
]
|
|
227
265
|
}) : null]
|
|
228
266
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ m("div", {
|
|
230
268
|
className: "space-y-2",
|
|
231
269
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ p(y, { children: "Definition — steps" }),
|
|
271
|
+
/* @__PURE__ */ p("p", {
|
|
234
272
|
className: "text-xs text-text-secondary",
|
|
235
273
|
children: "The ordered stages this pipeline runs. Add a step, pick its kind, optionally name it, and reorder with the arrows."
|
|
236
274
|
}),
|
|
237
|
-
|
|
275
|
+
z.steps.length === 0 ? /* @__PURE__ */ p("div", {
|
|
238
276
|
className: "rounded-card border border-dashed border-border-default bg-bg-sunken px-4 py-6 text-center",
|
|
239
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ p("p", {
|
|
240
278
|
className: "text-sm text-text-secondary",
|
|
241
279
|
children: "No steps yet. Add the first stage to start building the flow."
|
|
242
280
|
})
|
|
243
|
-
}) : /* @__PURE__ */
|
|
281
|
+
}) : /* @__PURE__ */ p("ol", {
|
|
244
282
|
className: "space-y-2",
|
|
245
|
-
children:
|
|
283
|
+
children: z.steps.map((e, t) => /* @__PURE__ */ m("li", {
|
|
246
284
|
className: "flex items-center gap-2 rounded-card border border-border-default bg-bg-elevated p-2.5",
|
|
247
285
|
children: [
|
|
248
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ m("span", {
|
|
249
287
|
className: "flex items-center gap-1.5 text-text-secondary",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ p(g, {
|
|
251
289
|
className: "size-4 shrink-0",
|
|
252
290
|
"aria-hidden": "true"
|
|
253
|
-
}), /* @__PURE__ */
|
|
291
|
+
}), /* @__PURE__ */ p("span", {
|
|
254
292
|
className: "w-4 text-xs font-semibold tabular-nums",
|
|
255
293
|
children: t + 1
|
|
256
294
|
})]
|
|
257
295
|
}),
|
|
258
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ m("div", {
|
|
259
297
|
className: "grid min-w-0 flex-1 grid-cols-1 gap-2 sm:grid-cols-[10rem_1fr]",
|
|
260
|
-
children: [/* @__PURE__ */
|
|
298
|
+
children: [/* @__PURE__ */ m(b, {
|
|
261
299
|
value: e.kind,
|
|
262
|
-
onValueChange: (t) =>
|
|
263
|
-
children: [/* @__PURE__ */
|
|
300
|
+
onValueChange: (t) => Z(e.id, { kind: t }),
|
|
301
|
+
children: [/* @__PURE__ */ p(C, {
|
|
264
302
|
"aria-label": `Kind for step ${t + 1}`,
|
|
265
|
-
children: /* @__PURE__ */
|
|
266
|
-
}), /* @__PURE__ */
|
|
303
|
+
children: /* @__PURE__ */ p(w, {})
|
|
304
|
+
}), /* @__PURE__ */ p(x, { children: D.map((e) => /* @__PURE__ */ p(S, {
|
|
267
305
|
value: e,
|
|
268
|
-
children:
|
|
306
|
+
children: s(e)
|
|
269
307
|
}, e)) })]
|
|
270
|
-
}), /* @__PURE__ */
|
|
308
|
+
}), /* @__PURE__ */ p(v, {
|
|
271
309
|
value: e.name,
|
|
272
|
-
onChange: (t) =>
|
|
310
|
+
onChange: (t) => Z(e.id, { name: t.target.value }),
|
|
273
311
|
placeholder: "Optional step name",
|
|
274
312
|
"aria-label": `Name for step ${t + 1}`
|
|
275
313
|
})]
|
|
276
314
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ m("div", {
|
|
278
316
|
className: "flex shrink-0 items-center gap-0.5",
|
|
279
317
|
children: [
|
|
280
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ p(_, {
|
|
281
319
|
type: "button",
|
|
282
320
|
variant: "ghost",
|
|
283
321
|
size: "icon-sm",
|
|
284
|
-
onClick: () =>
|
|
322
|
+
onClick: () => Q(t, -1),
|
|
285
323
|
disabled: t === 0,
|
|
286
324
|
"aria-label": `Move step ${t + 1} up`,
|
|
287
|
-
children: /* @__PURE__ */
|
|
325
|
+
children: /* @__PURE__ */ p(h, { className: "size-4" })
|
|
288
326
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ p(_, {
|
|
290
328
|
type: "button",
|
|
291
329
|
variant: "ghost",
|
|
292
330
|
size: "icon-sm",
|
|
293
|
-
onClick: () =>
|
|
294
|
-
disabled: t ===
|
|
331
|
+
onClick: () => Q(t, 1),
|
|
332
|
+
disabled: t === z.steps.length - 1,
|
|
295
333
|
"aria-label": `Move step ${t + 1} down`,
|
|
296
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ p(te, { className: "size-4" })
|
|
297
335
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ p(_, {
|
|
299
337
|
type: "button",
|
|
300
338
|
variant: "ghost",
|
|
301
339
|
size: "icon-sm",
|
|
302
|
-
onClick: () =>
|
|
340
|
+
onClick: () => de(e.id),
|
|
303
341
|
"aria-label": `Remove step ${t + 1}`,
|
|
304
342
|
className: "text-text-secondary hover:text-status-error-text",
|
|
305
|
-
children: /* @__PURE__ */
|
|
343
|
+
children: /* @__PURE__ */ p(re, { className: "size-4" })
|
|
306
344
|
})
|
|
307
345
|
]
|
|
308
346
|
})
|
|
309
347
|
]
|
|
310
348
|
}, e.id))
|
|
311
349
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ m(_, {
|
|
313
351
|
type: "button",
|
|
314
352
|
variant: "outline",
|
|
315
353
|
size: "sm",
|
|
316
|
-
onClick:
|
|
317
|
-
children: [/* @__PURE__ */
|
|
354
|
+
onClick: ue,
|
|
355
|
+
children: [/* @__PURE__ */ p(ne, { className: "size-4" }), "Add step"]
|
|
318
356
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ m("details", {
|
|
320
358
|
className: "group mt-2 rounded-card border border-border-default bg-bg-sunken",
|
|
321
359
|
onToggle: (e) => {
|
|
322
|
-
e.currentTarget.open && (
|
|
360
|
+
e.currentTarget.open && (K(le), J(null));
|
|
323
361
|
},
|
|
324
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ m("summary", {
|
|
325
363
|
className: "flex cursor-pointer list-none items-center justify-between px-4 py-2.5 text-sm font-medium text-text-secondary transition-colors hover:text-text-primary",
|
|
326
|
-
children: ["Advanced — edit as JSON", /* @__PURE__ */
|
|
364
|
+
children: ["Advanced — edit as JSON", /* @__PURE__ */ p("span", {
|
|
327
365
|
className: "text-xs transition-transform group-open:rotate-180",
|
|
328
366
|
children: "▾"
|
|
329
367
|
})]
|
|
330
|
-
}), /* @__PURE__ */
|
|
368
|
+
}), /* @__PURE__ */ m("div", {
|
|
331
369
|
className: "space-y-2 border-t border-border-seam p-4",
|
|
332
370
|
children: [
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
-
value:
|
|
371
|
+
/* @__PURE__ */ p(T, {
|
|
372
|
+
value: G,
|
|
335
373
|
onChange: (e) => {
|
|
336
|
-
|
|
374
|
+
K(e.target.value), J(null);
|
|
337
375
|
},
|
|
338
376
|
rows: 8,
|
|
339
377
|
spellCheck: !1,
|
|
340
378
|
className: "font-mono text-xs",
|
|
341
379
|
"aria-label": "Definition JSON"
|
|
342
380
|
}),
|
|
343
|
-
|
|
381
|
+
q ? /* @__PURE__ */ p("p", {
|
|
344
382
|
className: "text-xs text-status-error-text",
|
|
345
|
-
children:
|
|
383
|
+
children: q
|
|
346
384
|
}) : null,
|
|
347
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ m("div", {
|
|
348
386
|
className: "flex items-center justify-between gap-2",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
387
|
+
children: [/* @__PURE__ */ p("p", {
|
|
350
388
|
className: "text-xs text-text-secondary",
|
|
351
389
|
children: "Edit the raw definition, then apply it back to the builder above."
|
|
352
|
-
}), /* @__PURE__ */
|
|
390
|
+
}), /* @__PURE__ */ p(_, {
|
|
353
391
|
type: "button",
|
|
354
392
|
variant: "outline",
|
|
355
393
|
size: "sm",
|
|
356
|
-
onClick:
|
|
357
|
-
let e;
|
|
358
|
-
try {
|
|
359
|
-
e = JSON.parse(K);
|
|
360
|
-
} catch (e) {
|
|
361
|
-
Y(s(e) ?? "Invalid JSON.");
|
|
362
|
-
return;
|
|
363
|
-
}
|
|
364
|
-
if (!e || typeof e != "object" || Array.isArray(e)) {
|
|
365
|
-
Y("Definition must be a JSON object with a \"steps\" array.");
|
|
366
|
-
return;
|
|
367
|
-
}
|
|
368
|
-
let n = e.steps;
|
|
369
|
-
if (!Array.isArray(n)) {
|
|
370
|
-
Y("Definition must contain a \"steps\" array.");
|
|
371
|
-
return;
|
|
372
|
-
}
|
|
373
|
-
let r = [];
|
|
374
|
-
for (let e of n) {
|
|
375
|
-
if (!e || typeof e != "object" || Array.isArray(e)) {
|
|
376
|
-
Y("Each step must be an object with a \"kind\".");
|
|
377
|
-
return;
|
|
378
|
-
}
|
|
379
|
-
let t = e.kind;
|
|
380
|
-
if (!k(t)) {
|
|
381
|
-
Y(`Invalid step kind "${String(t)}". Allowed: ${O.join(", ")}.`);
|
|
382
|
-
return;
|
|
383
|
-
}
|
|
384
|
-
let n = e.name;
|
|
385
|
-
r.push({
|
|
386
|
-
id: j(),
|
|
387
|
-
kind: t,
|
|
388
|
-
name: typeof n == "string" ? n : ""
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
let i = { ...e };
|
|
392
|
-
delete i.steps, G(i), Z("steps", r), Y(null), t.success("Steps updated", "The builder now reflects your JSON.");
|
|
393
|
-
},
|
|
394
|
+
onClick: fe,
|
|
394
395
|
children: "Apply to builder"
|
|
395
396
|
})]
|
|
396
397
|
})
|
|
@@ -399,14 +400,15 @@ function F() {
|
|
|
399
400
|
})
|
|
400
401
|
]
|
|
401
402
|
}),
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
value:
|
|
404
|
-
onChange: (e) =>
|
|
403
|
+
/* @__PURE__ */ p(o, {
|
|
404
|
+
value: z.tags,
|
|
405
|
+
onChange: (e) => X("tags", e),
|
|
406
|
+
disabled: $
|
|
405
407
|
})
|
|
406
408
|
]
|
|
407
409
|
});
|
|
408
410
|
}
|
|
409
411
|
//#endregion
|
|
410
|
-
export {
|
|
412
|
+
export { P as default };
|
|
411
413
|
|
|
412
414
|
//# sourceMappingURL=PipelineFormPage.js.map
|