@burdenoff/microfe-cosmicintersection 2026.801.1 → 2026.827.1
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/api/cosmicApi.d.ts +84 -2
- package/dist/cosmicintersection/api/cosmicApi.d.ts.map +1 -1
- package/dist/cosmicintersection/api/cosmicApi.js +135 -79
- package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
- package/dist/cosmicintersection/components/LineageGraph.d.ts +6 -1
- package/dist/cosmicintersection/components/LineageGraph.d.ts.map +1 -1
- package/dist/cosmicintersection/components/LineageGraph.js.map +1 -1
- package/dist/cosmicintersection/components/StepDAG.d.ts.map +1 -1
- package/dist/cosmicintersection/components/StepDAG.js +22 -18
- package/dist/cosmicintersection/components/StepDAG.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionsPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionsPage.js +52 -38
- package/dist/cosmicintersection/pages/collections/CollectionsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +212 -164
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js +252 -118
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { useCosmicIntersection as e } from "../../context/CosmicIntersectionContext.js";
|
|
2
2
|
import { notify as t } from "../../lib/toast.js";
|
|
3
|
-
import { useCosAddRunStepMutation as n,
|
|
3
|
+
import { useCosAddRunStepMutation as n, useCosDatasetSummaryQuery as r, useCosPipelineFailedRunsQuery as i, useCosRunQuery as ee, useCosRunStepsQuery as te, useCosTransitionRunMutation as ne } from "../../api/cosmicApi.js";
|
|
4
4
|
import a from "../../components/EmptyState.js";
|
|
5
5
|
import o from "../../components/ErrorState.js";
|
|
6
6
|
import s from "../../components/LoadingState.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import re from "../../components/ActivityFeedPanel.js";
|
|
8
|
+
import ie from "../../components/SafeLink.js";
|
|
9
9
|
import c from "../../components/PageLayout.js";
|
|
10
10
|
import l, { formatEnumLabel as u } from "../../components/StatusBadge.js";
|
|
11
11
|
import "../../components/index.js";
|
|
12
|
-
import { describeError as
|
|
13
|
-
import { useMemo as
|
|
14
|
-
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
15
|
-
import { useParams as
|
|
16
|
-
import { Check as
|
|
17
|
-
import { Button as S, Card as C, CardContent as w, CardHeader as T, CardTitle as E, Dialog as
|
|
12
|
+
import { describeError as ae, mutationSucceeded as d } from "../../lib/mutationResult.js";
|
|
13
|
+
import { useMemo as f, useState as p } from "react";
|
|
14
|
+
import { Fragment as oe, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
15
|
+
import { useParams as se } from "react-router";
|
|
16
|
+
import { Check as g, Circle as _, ListTree as ce, Loader2 as v, Plus as y, SearchX as le, X as b } from "lucide-react";
|
|
17
|
+
import { Badge as x, Button as S, Card as C, CardContent as w, CardHeader as T, CardTitle as E, Dialog as ue, DialogContent as de, DialogDescription as fe, DialogFooter as pe, DialogHeader as me, DialogTitle as he, Input as D, Label as O, Select as ge, SelectContent as _e, SelectItem as ve, SelectTrigger as ye, SelectValue as be, Table as xe, TableBody as Se, TableCell as k, TableHead as A, TableHeader as Ce, TableRow as j, Textarea as we } from "@burdenoff/fe-libs/ui";
|
|
18
18
|
//#region src/cosmicintersection/pages/runs/RunDetailPage.tsx
|
|
19
|
-
var
|
|
19
|
+
var Te = [
|
|
20
20
|
"INGEST",
|
|
21
21
|
"CALIBRATE",
|
|
22
22
|
"TRANSFORM",
|
|
23
23
|
"ANALYZE",
|
|
24
24
|
"EXPORT",
|
|
25
25
|
"NOTIFY"
|
|
26
|
-
],
|
|
26
|
+
], Ee = {
|
|
27
27
|
QUEUED: ["RUNNING", "CANCELLED"],
|
|
28
28
|
RUNNING: [
|
|
29
29
|
"SUCCEEDED",
|
|
@@ -33,45 +33,49 @@ var he = [
|
|
|
33
33
|
SUCCEEDED: [],
|
|
34
34
|
FAILED: [],
|
|
35
35
|
CANCELLED: []
|
|
36
|
-
},
|
|
36
|
+
}, M = {
|
|
37
37
|
SUCCEEDED: {
|
|
38
|
-
icon:
|
|
38
|
+
icon: g,
|
|
39
39
|
spin: !1,
|
|
40
40
|
wrap: "border-status-success-border bg-status-success-bg-subtle text-status-success-text"
|
|
41
41
|
},
|
|
42
42
|
RUNNING: {
|
|
43
|
-
icon:
|
|
43
|
+
icon: v,
|
|
44
44
|
spin: !0,
|
|
45
45
|
wrap: "border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text"
|
|
46
46
|
},
|
|
47
47
|
FAILED: {
|
|
48
|
-
icon:
|
|
48
|
+
icon: b,
|
|
49
49
|
spin: !1,
|
|
50
50
|
wrap: "border-status-error-border bg-status-error-bg-subtle text-status-error-text"
|
|
51
51
|
},
|
|
52
52
|
QUEUED: {
|
|
53
|
-
icon:
|
|
53
|
+
icon: _,
|
|
54
54
|
spin: !1,
|
|
55
55
|
wrap: "border-status-info-border bg-status-info-bg-subtle text-status-info-text"
|
|
56
56
|
},
|
|
57
57
|
CANCELLED: {
|
|
58
|
-
icon:
|
|
58
|
+
icon: b,
|
|
59
59
|
spin: !1,
|
|
60
60
|
wrap: "border-border-default bg-bg-sunken text-text-secondary"
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
function
|
|
63
|
+
function N(e) {
|
|
64
64
|
if (!e) return "—";
|
|
65
65
|
let t = new Date(e);
|
|
66
66
|
return Number.isNaN(t.getTime()) ? "—" : t.toLocaleString();
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function P(e) {
|
|
69
69
|
if (e == null) return "—";
|
|
70
70
|
if (e < 1e3) return `${e} ms`;
|
|
71
71
|
let t = e / 1e3;
|
|
72
72
|
return t < 60 ? `${t.toFixed(1)} s` : `${Math.floor(t / 60)}m ${Math.round(t % 60)}s`;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function F(e) {
|
|
75
|
+
let t = (e ?? []).filter((e) => e.status === "FAILED");
|
|
76
|
+
return t.length === 0 ? null : t.reduce((e, t) => t.position < e.position ? t : e);
|
|
77
|
+
}
|
|
78
|
+
function I({ label: e, children: t }) {
|
|
75
79
|
return /* @__PURE__ */ h("div", {
|
|
76
80
|
className: "flex flex-col gap-1 border-b border-border-seam py-3 last:border-0 sm:flex-row sm:items-start sm:gap-4",
|
|
77
81
|
children: [/* @__PURE__ */ m("span", {
|
|
@@ -83,7 +87,7 @@ function P({ label: e, children: t }) {
|
|
|
83
87
|
})]
|
|
84
88
|
});
|
|
85
89
|
}
|
|
86
|
-
function
|
|
90
|
+
function L({ value: e }) {
|
|
87
91
|
return !e || Object.keys(e).length === 0 ? /* @__PURE__ */ m("span", {
|
|
88
92
|
className: "text-sm text-text-secondary",
|
|
89
93
|
children: "—"
|
|
@@ -92,29 +96,43 @@ function F({ value: e }) {
|
|
|
92
96
|
children: JSON.stringify(e, null, 2)
|
|
93
97
|
});
|
|
94
98
|
}
|
|
95
|
-
function
|
|
96
|
-
let { id:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
id:
|
|
99
|
+
function R() {
|
|
100
|
+
let { id: g = "" } = se(), { navigate: _ } = e(), { data: v, loading: b, error: R, refetch: z } = ee(g), { data: B, loading: De, error: Oe, refetch: V } = te(g), [ke, { loading: Ae }] = ne(), [je, { loading: H }] = n(), [Me, U] = p(!1), [W, G] = p(""), [Ne, Pe] = p("INGEST"), [K, Fe] = p(""), [q, Ie] = p(""), J = v?.cosRun, Y = f(() => [...B?.cosListRunSteps ?? []].sort((e, t) => e.position - t.position), [B]), { data: Le } = r(J?.datasetId), Re = Le?.cosDataset?.name ?? null, ze = J?.status === "FAILED", { data: Be, loading: Ve, error: He, refetch: Ue } = i(J?.pipelineId, { skip: !ze }), X = f(() => F(Y), [Y]), Z = f(() => (Be?.cosListRuns.items ?? []).filter((e) => e.id !== J?.id).map((e) => {
|
|
101
|
+
let t = F(e.steps);
|
|
102
|
+
return {
|
|
103
|
+
id: e.id,
|
|
104
|
+
runNumber: e.runNumber,
|
|
105
|
+
step: t,
|
|
106
|
+
error: t?.errorMessage ?? e.errorMessage ?? null,
|
|
107
|
+
when: e.finishedAt ?? e.startedAt ?? e.createdAt,
|
|
108
|
+
sameStep: X !== null && t !== null && t.name === X.name
|
|
109
|
+
};
|
|
110
|
+
}).slice(0, 8), [
|
|
111
|
+
Be,
|
|
112
|
+
J?.id,
|
|
113
|
+
X
|
|
114
|
+
]), We = async (e) => {
|
|
115
|
+
if (!J) return;
|
|
116
|
+
let n = await ke({ variables: {
|
|
117
|
+
id: J.id,
|
|
100
118
|
status: e
|
|
101
119
|
} });
|
|
102
|
-
|
|
120
|
+
d(n, n.data?.cosTransitionRun?.id, "Could not update the run") && (t.success("Run updated", `Run #${J.runNumber} moved to ${u(e)}.`), await Promise.all([z(), V()]));
|
|
103
121
|
}, Q = () => {
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
if (!
|
|
107
|
-
if (!
|
|
122
|
+
G(""), Pe("INGEST"), Fe(""), Ie("");
|
|
123
|
+
}, Ge = async () => {
|
|
124
|
+
if (!J) return;
|
|
125
|
+
if (!W.trim()) {
|
|
108
126
|
t.error("Step name is required", "Give the step a name before adding it.");
|
|
109
127
|
return;
|
|
110
128
|
}
|
|
111
129
|
let e;
|
|
112
|
-
if (
|
|
113
|
-
let t = JSON.parse(
|
|
130
|
+
if (q.trim()) try {
|
|
131
|
+
let t = JSON.parse(q.trim());
|
|
114
132
|
if (typeof t != "object" || !t || Array.isArray(t)) throw Error("Inputs must be a JSON object.");
|
|
115
133
|
e = t;
|
|
116
134
|
} catch (e) {
|
|
117
|
-
t.error("Invalid inputs JSON",
|
|
135
|
+
t.error("Invalid inputs JSON", ae(e) ?? "Please provide valid JSON.");
|
|
118
136
|
return;
|
|
119
137
|
}
|
|
120
138
|
let n = K.trim() ? Number(K.trim()) : void 0;
|
|
@@ -122,26 +140,26 @@ function I() {
|
|
|
122
140
|
t.error("Invalid position", "Position must be a non-negative number.");
|
|
123
141
|
return;
|
|
124
142
|
}
|
|
125
|
-
let r = await
|
|
126
|
-
runId:
|
|
127
|
-
name:
|
|
128
|
-
kind:
|
|
143
|
+
let r = await je({ variables: { input: {
|
|
144
|
+
runId: J.id,
|
|
145
|
+
name: W.trim(),
|
|
146
|
+
kind: Ne,
|
|
129
147
|
inputs: e,
|
|
130
148
|
position: n
|
|
131
149
|
} } });
|
|
132
|
-
|
|
150
|
+
d(r, r.data?.cosAddRunStep?.id, "Could not add the step") && (t.success("Step added", `“${W.trim()}” was added to the run.`), U(!1), Q(), await V());
|
|
133
151
|
};
|
|
134
|
-
if (
|
|
152
|
+
if (b) return /* @__PURE__ */ m(c, {
|
|
135
153
|
title: "Run",
|
|
136
154
|
backPath: "runs",
|
|
137
155
|
children: /* @__PURE__ */ m(s, { label: "Loading run…" })
|
|
138
156
|
});
|
|
139
|
-
if (
|
|
157
|
+
if (R) return /* @__PURE__ */ m(c, {
|
|
140
158
|
title: "Run",
|
|
141
159
|
backPath: "runs",
|
|
142
|
-
children: /* @__PURE__ */ m(o, { onRetry: () => void
|
|
160
|
+
children: /* @__PURE__ */ m(o, { onRetry: () => void z() })
|
|
143
161
|
});
|
|
144
|
-
if (!
|
|
162
|
+
if (!J) return /* @__PURE__ */ m(c, {
|
|
145
163
|
title: "Run",
|
|
146
164
|
backPath: "runs",
|
|
147
165
|
children: /* @__PURE__ */ m(a, {
|
|
@@ -150,89 +168,102 @@ function I() {
|
|
|
150
168
|
action: /* @__PURE__ */ m(S, {
|
|
151
169
|
type: "button",
|
|
152
170
|
variant: "outline",
|
|
153
|
-
onClick: () =>
|
|
171
|
+
onClick: () => _("runs"),
|
|
154
172
|
children: "Back to runs"
|
|
155
173
|
})
|
|
156
174
|
})
|
|
157
175
|
});
|
|
158
|
-
let $ =
|
|
176
|
+
let $ = Ee[J.status] ?? [];
|
|
159
177
|
return /* @__PURE__ */ h(c, {
|
|
160
|
-
title: `Run #${
|
|
161
|
-
description:
|
|
178
|
+
title: `Run #${J.runNumber}`,
|
|
179
|
+
description: J.pipeline ? `Pipeline: ${J.pipeline.name}` : void 0,
|
|
162
180
|
backPath: "runs",
|
|
163
181
|
actions: /* @__PURE__ */ h("div", {
|
|
164
182
|
className: "flex flex-wrap items-center gap-2",
|
|
165
183
|
children: [$.map((e) => /* @__PURE__ */ m(S, {
|
|
166
184
|
type: "button",
|
|
167
185
|
variant: e === "CANCELLED" || e === "FAILED" ? "outline" : "default",
|
|
168
|
-
onClick: () => void
|
|
169
|
-
disabled:
|
|
186
|
+
onClick: () => void We(e),
|
|
187
|
+
disabled: Ae,
|
|
170
188
|
children: `Mark ${u(e)}`
|
|
171
189
|
}, e)), /* @__PURE__ */ h(S, {
|
|
172
190
|
type: "button",
|
|
173
191
|
variant: "outline",
|
|
174
|
-
onClick: () =>
|
|
175
|
-
children: [/* @__PURE__ */ m(
|
|
192
|
+
onClick: () => U(!0),
|
|
193
|
+
children: [/* @__PURE__ */ m(y, { className: "size-4" }), "Add step"]
|
|
176
194
|
})]
|
|
177
195
|
}),
|
|
178
196
|
children: [/* @__PURE__ */ h("div", {
|
|
179
197
|
className: "space-y-6",
|
|
180
198
|
children: [
|
|
181
199
|
/* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(T, { children: /* @__PURE__ */ m(E, { children: "Overview" }) }), /* @__PURE__ */ h(w, { children: [
|
|
182
|
-
/* @__PURE__ */ m(
|
|
200
|
+
/* @__PURE__ */ m(I, {
|
|
183
201
|
label: "Status",
|
|
184
|
-
children: /* @__PURE__ */ m(l, { status:
|
|
202
|
+
children: /* @__PURE__ */ m(l, { status: J.status })
|
|
185
203
|
}),
|
|
186
|
-
/* @__PURE__ */ m(
|
|
204
|
+
/* @__PURE__ */ m(I, {
|
|
187
205
|
label: "Pipeline",
|
|
188
|
-
children:
|
|
206
|
+
children: J.pipeline ? /* @__PURE__ */ m("button", {
|
|
189
207
|
type: "button",
|
|
190
208
|
className: "text-text-primary underline-offset-2 hover:underline",
|
|
191
|
-
onClick: () =>
|
|
192
|
-
children:
|
|
209
|
+
onClick: () => _(`pipelines/${J.pipelineId}`),
|
|
210
|
+
children: J.pipeline.name
|
|
193
211
|
}) : /* @__PURE__ */ m("span", {
|
|
194
212
|
className: "font-mono text-xs",
|
|
195
|
-
children:
|
|
213
|
+
children: J.pipelineId
|
|
196
214
|
})
|
|
197
215
|
}),
|
|
198
|
-
/* @__PURE__ */ m(
|
|
216
|
+
/* @__PURE__ */ m(I, {
|
|
199
217
|
label: "Dataset",
|
|
200
|
-
children:
|
|
218
|
+
children: J.datasetId ? /* @__PURE__ */ m("button", {
|
|
201
219
|
type: "button",
|
|
202
220
|
className: "text-text-primary underline-offset-2 hover:underline",
|
|
203
|
-
onClick: () =>
|
|
204
|
-
children: /* @__PURE__ */ m("span", {
|
|
221
|
+
onClick: () => _(`datasets/${J.datasetId}`),
|
|
222
|
+
children: Re ?? /* @__PURE__ */ m("span", {
|
|
205
223
|
className: "font-mono text-xs",
|
|
206
|
-
children:
|
|
224
|
+
children: J.datasetId
|
|
207
225
|
})
|
|
208
226
|
}) : "—"
|
|
209
227
|
}),
|
|
210
|
-
/* @__PURE__ */ m(
|
|
228
|
+
J.pipeline ? /* @__PURE__ */ m(I, {
|
|
229
|
+
label: "Pipeline trigger",
|
|
230
|
+
children: /* @__PURE__ */ h("span", {
|
|
231
|
+
className: "inline-flex flex-wrap items-center gap-2",
|
|
232
|
+
children: [/* @__PURE__ */ m(l, {
|
|
233
|
+
status: J.pipeline.trigger,
|
|
234
|
+
tone: "neutral"
|
|
235
|
+
}), J.pipeline.trigger === "SCHEDULED" && J.pipeline.schedule ? /* @__PURE__ */ m("span", {
|
|
236
|
+
className: "font-mono text-xs text-text-secondary",
|
|
237
|
+
children: J.pipeline.schedule
|
|
238
|
+
}) : null]
|
|
239
|
+
})
|
|
240
|
+
}) : null,
|
|
241
|
+
/* @__PURE__ */ m(I, {
|
|
211
242
|
label: "Triggered by",
|
|
212
|
-
children:
|
|
243
|
+
children: J.triggeredBy || "—"
|
|
213
244
|
}),
|
|
214
|
-
/* @__PURE__ */ m(
|
|
245
|
+
/* @__PURE__ */ m(I, {
|
|
215
246
|
label: "Started",
|
|
216
|
-
children:
|
|
247
|
+
children: N(J.startedAt)
|
|
217
248
|
}),
|
|
218
|
-
/* @__PURE__ */ m(
|
|
249
|
+
/* @__PURE__ */ m(I, {
|
|
219
250
|
label: "Finished",
|
|
220
|
-
children:
|
|
251
|
+
children: N(J.finishedAt)
|
|
221
252
|
}),
|
|
222
|
-
/* @__PURE__ */ m(
|
|
253
|
+
/* @__PURE__ */ m(I, {
|
|
223
254
|
label: "Duration",
|
|
224
|
-
children:
|
|
255
|
+
children: P(J.durationMs)
|
|
225
256
|
}),
|
|
226
|
-
|
|
257
|
+
J.errorMessage ? /* @__PURE__ */ m(I, {
|
|
227
258
|
label: "Error",
|
|
228
259
|
children: /* @__PURE__ */ m("span", {
|
|
229
260
|
className: "text-status-error-text",
|
|
230
|
-
children:
|
|
261
|
+
children: J.errorMessage
|
|
231
262
|
})
|
|
232
263
|
}) : null,
|
|
233
|
-
$.length === 0 ? /* @__PURE__ */ m(
|
|
264
|
+
$.length === 0 ? /* @__PURE__ */ m(I, {
|
|
234
265
|
label: "Discuss",
|
|
235
|
-
children: /* @__PURE__ */ m(
|
|
266
|
+
children: /* @__PURE__ */ m(ie, {
|
|
236
267
|
href: "/conversations",
|
|
237
268
|
className: "text-text-primary underline-offset-2 hover:underline",
|
|
238
269
|
children: "Open discussions"
|
|
@@ -241,28 +272,28 @@ function I() {
|
|
|
241
272
|
] })] }),
|
|
242
273
|
/* @__PURE__ */ h("div", {
|
|
243
274
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
244
|
-
children: [/* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(T, { children: /* @__PURE__ */ m(E, { children: "Parameters" }) }), /* @__PURE__ */ m(w, { children: /* @__PURE__ */ m(
|
|
275
|
+
children: [/* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(T, { children: /* @__PURE__ */ m(E, { children: "Parameters" }) }), /* @__PURE__ */ m(w, { children: /* @__PURE__ */ m(L, { value: J.params }) })] }), /* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(T, { children: /* @__PURE__ */ m(E, { children: "Metrics" }) }), /* @__PURE__ */ m(w, { children: /* @__PURE__ */ m(L, { value: J.metrics }) })] })]
|
|
245
276
|
}),
|
|
246
|
-
/* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(T, { children: /* @__PURE__ */ m(E, { children: "Steps" }) }), /* @__PURE__ */ m(w, { children:
|
|
277
|
+
/* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(T, { children: /* @__PURE__ */ m(E, { children: "Steps" }) }), /* @__PURE__ */ m(w, { children: De ? /* @__PURE__ */ m(s, {
|
|
247
278
|
variant: "rows",
|
|
248
279
|
rows: 4,
|
|
249
280
|
label: "Loading steps…"
|
|
250
|
-
}) :
|
|
281
|
+
}) : Oe ? /* @__PURE__ */ m(o, {
|
|
251
282
|
message: "Could not load steps.",
|
|
252
|
-
onRetry: () => void
|
|
253
|
-
}) :
|
|
254
|
-
icon:
|
|
283
|
+
onRetry: () => void V()
|
|
284
|
+
}) : Y.length === 0 ? /* @__PURE__ */ m(a, {
|
|
285
|
+
icon: ce,
|
|
255
286
|
title: "No steps yet",
|
|
256
287
|
description: "Add steps to record the ingest, calibration, transform, analyze or export stages of this run.",
|
|
257
288
|
action: /* @__PURE__ */ h(S, {
|
|
258
289
|
type: "button",
|
|
259
|
-
onClick: () =>
|
|
260
|
-
children: [/* @__PURE__ */ m(
|
|
290
|
+
onClick: () => U(!0),
|
|
291
|
+
children: [/* @__PURE__ */ m(y, { className: "size-4" }), "Add step"]
|
|
261
292
|
})
|
|
262
293
|
}) : /* @__PURE__ */ m("ol", {
|
|
263
294
|
className: "flex flex-col",
|
|
264
|
-
children:
|
|
265
|
-
let n =
|
|
295
|
+
children: Y.map((e, t) => {
|
|
296
|
+
let n = M[e.status] ?? M.QUEUED, r = n.icon, i = t === Y.length - 1;
|
|
266
297
|
return /* @__PURE__ */ h("li", {
|
|
267
298
|
className: "flex gap-4",
|
|
268
299
|
children: [/* @__PURE__ */ h("div", {
|
|
@@ -307,37 +338,140 @@ function I() {
|
|
|
307
338
|
}) : null,
|
|
308
339
|
/* @__PURE__ */ h("p", {
|
|
309
340
|
className: "mt-1.5 text-xs text-text-secondary",
|
|
310
|
-
children: ["Duration: ",
|
|
341
|
+
children: ["Duration: ", P(e.durationMs)]
|
|
311
342
|
})
|
|
312
343
|
]
|
|
313
344
|
})]
|
|
314
345
|
}, e.id);
|
|
315
346
|
})
|
|
316
347
|
}) })] }),
|
|
317
|
-
/* @__PURE__ */ h(C, { children: [/* @__PURE__ */
|
|
318
|
-
|
|
348
|
+
ze ? /* @__PURE__ */ h(C, { children: [/* @__PURE__ */ h(T, { children: [/* @__PURE__ */ m(E, { children: "Similar failures" }), /* @__PURE__ */ m("p", {
|
|
349
|
+
className: "text-sm text-text-secondary",
|
|
350
|
+
children: X ? `Other runs of this pipeline that ended in Failed. “Same step” marks the ones that broke at “${X.name}” too.` : "Other runs of this pipeline that ended in Failed."
|
|
351
|
+
})] }), /* @__PURE__ */ m(w, { children: Ve ? /* @__PURE__ */ m(s, {
|
|
352
|
+
variant: "rows",
|
|
353
|
+
rows: 3,
|
|
354
|
+
label: "Loading failure history…"
|
|
355
|
+
}) : He ? /* @__PURE__ */ m(o, {
|
|
356
|
+
message: "Could not load the pipeline's failure history.",
|
|
357
|
+
onRetry: () => void Ue()
|
|
358
|
+
}) : Z.length === 0 ? /* @__PURE__ */ m(a, {
|
|
359
|
+
icon: le,
|
|
360
|
+
title: "No other failed runs",
|
|
361
|
+
description: "This is the only run of this pipeline that has failed so far."
|
|
362
|
+
}) : /* @__PURE__ */ h(oe, { children: [/* @__PURE__ */ m("div", {
|
|
363
|
+
className: "hidden overflow-hidden rounded-card border border-border-default md:block",
|
|
364
|
+
children: /* @__PURE__ */ h(xe, { children: [/* @__PURE__ */ m(Ce, { children: /* @__PURE__ */ h(j, { children: [
|
|
365
|
+
/* @__PURE__ */ m(A, { children: "Run" }),
|
|
366
|
+
/* @__PURE__ */ m(A, { children: "Step" }),
|
|
367
|
+
/* @__PURE__ */ m(A, { children: "Error" }),
|
|
368
|
+
/* @__PURE__ */ m(A, { children: "When" })
|
|
369
|
+
] }) }), /* @__PURE__ */ m(Se, { children: Z.map((e) => /* @__PURE__ */ h(j, {
|
|
370
|
+
className: "cursor-pointer",
|
|
371
|
+
onClick: () => _(`runs/${e.id}`),
|
|
372
|
+
children: [
|
|
373
|
+
/* @__PURE__ */ h(k, {
|
|
374
|
+
className: "whitespace-nowrap font-medium text-text-primary",
|
|
375
|
+
children: ["Run #", e.runNumber]
|
|
376
|
+
}),
|
|
377
|
+
/* @__PURE__ */ m(k, { children: e.step ? /* @__PURE__ */ h("span", {
|
|
378
|
+
className: "inline-flex flex-wrap items-center gap-1.5",
|
|
379
|
+
children: [
|
|
380
|
+
/* @__PURE__ */ m("span", {
|
|
381
|
+
className: "text-sm text-text-primary",
|
|
382
|
+
children: e.step.name
|
|
383
|
+
}),
|
|
384
|
+
/* @__PURE__ */ m(l, {
|
|
385
|
+
status: e.step.kind,
|
|
386
|
+
tone: "neutral"
|
|
387
|
+
}),
|
|
388
|
+
e.sameStep ? /* @__PURE__ */ m(x, {
|
|
389
|
+
variant: "outline",
|
|
390
|
+
className: "border-status-warning-border bg-status-warning-bg-subtle text-xs text-status-warning-text",
|
|
391
|
+
children: "Same step"
|
|
392
|
+
}) : null
|
|
393
|
+
]
|
|
394
|
+
}) : /* @__PURE__ */ m("span", {
|
|
395
|
+
className: "text-sm text-text-secondary",
|
|
396
|
+
children: "Not recorded"
|
|
397
|
+
}) }),
|
|
398
|
+
/* @__PURE__ */ m(k, {
|
|
399
|
+
className: "max-w-md text-sm text-text-secondary",
|
|
400
|
+
children: /* @__PURE__ */ m("span", {
|
|
401
|
+
className: "line-clamp-2",
|
|
402
|
+
children: e.error ?? "—"
|
|
403
|
+
})
|
|
404
|
+
}),
|
|
405
|
+
/* @__PURE__ */ m(k, {
|
|
406
|
+
className: "whitespace-nowrap text-sm text-text-secondary",
|
|
407
|
+
children: N(e.when)
|
|
408
|
+
})
|
|
409
|
+
]
|
|
410
|
+
}, e.id)) })] })
|
|
411
|
+
}), /* @__PURE__ */ m("ul", {
|
|
412
|
+
className: "space-y-3 md:hidden",
|
|
413
|
+
children: Z.map((e) => /* @__PURE__ */ m("li", { children: /* @__PURE__ */ h("button", {
|
|
414
|
+
type: "button",
|
|
415
|
+
onClick: () => _(`runs/${e.id}`),
|
|
416
|
+
className: "flex w-full flex-col gap-2 rounded-card border border-border-default bg-bg-elevated p-4 text-left transition-colors hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
417
|
+
children: [
|
|
418
|
+
/* @__PURE__ */ h("div", {
|
|
419
|
+
className: "flex flex-wrap items-center gap-1.5",
|
|
420
|
+
children: [
|
|
421
|
+
/* @__PURE__ */ h("span", {
|
|
422
|
+
className: "font-medium text-text-primary",
|
|
423
|
+
children: ["Run #", e.runNumber]
|
|
424
|
+
}),
|
|
425
|
+
e.step ? /* @__PURE__ */ m(l, {
|
|
426
|
+
status: e.step.kind,
|
|
427
|
+
tone: "neutral"
|
|
428
|
+
}) : null,
|
|
429
|
+
e.sameStep ? /* @__PURE__ */ m(x, {
|
|
430
|
+
variant: "outline",
|
|
431
|
+
className: "border-status-warning-border bg-status-warning-bg-subtle text-xs text-status-warning-text",
|
|
432
|
+
children: "Same step"
|
|
433
|
+
}) : null
|
|
434
|
+
]
|
|
435
|
+
}),
|
|
436
|
+
/* @__PURE__ */ m("p", {
|
|
437
|
+
className: "text-sm text-text-primary",
|
|
438
|
+
children: e.step ? e.step.name : "Step not recorded"
|
|
439
|
+
}),
|
|
440
|
+
/* @__PURE__ */ m("p", {
|
|
441
|
+
className: "text-xs text-text-secondary",
|
|
442
|
+
children: e.error ?? "—"
|
|
443
|
+
}),
|
|
444
|
+
/* @__PURE__ */ m("p", {
|
|
445
|
+
className: "text-xs text-text-tertiary",
|
|
446
|
+
children: N(e.when)
|
|
447
|
+
})
|
|
448
|
+
]
|
|
449
|
+
}) }, e.id))
|
|
450
|
+
})] }) })] }) : null,
|
|
451
|
+
/* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(T, { children: /* @__PURE__ */ m(E, { children: "Activity" }) }), /* @__PURE__ */ m(w, { children: /* @__PURE__ */ m(re, {
|
|
452
|
+
resourceId: J.id,
|
|
319
453
|
resourceType: "cosmicintersection-run"
|
|
320
454
|
}) })] })
|
|
321
455
|
]
|
|
322
|
-
}), /* @__PURE__ */ m(
|
|
323
|
-
open:
|
|
456
|
+
}), /* @__PURE__ */ m(ue, {
|
|
457
|
+
open: Me,
|
|
324
458
|
onOpenChange: (e) => {
|
|
325
|
-
|
|
459
|
+
H || (U(e), e || Q());
|
|
326
460
|
},
|
|
327
|
-
children: /* @__PURE__ */ h(
|
|
328
|
-
/* @__PURE__ */ h(
|
|
461
|
+
children: /* @__PURE__ */ h(de, { children: [
|
|
462
|
+
/* @__PURE__ */ h(me, { children: [/* @__PURE__ */ m(he, { children: "Add step" }), /* @__PURE__ */ m(fe, { children: "Record a stage of this run — its kind, order and optional inputs." })] }),
|
|
329
463
|
/* @__PURE__ */ h("div", {
|
|
330
464
|
className: "space-y-4",
|
|
331
465
|
children: [
|
|
332
466
|
/* @__PURE__ */ h("div", {
|
|
333
467
|
className: "space-y-1",
|
|
334
|
-
children: [/* @__PURE__ */ m(
|
|
468
|
+
children: [/* @__PURE__ */ m(O, {
|
|
335
469
|
htmlFor: "step-name",
|
|
336
470
|
children: "Name"
|
|
337
|
-
}), /* @__PURE__ */ m(
|
|
471
|
+
}), /* @__PURE__ */ m(D, {
|
|
338
472
|
id: "step-name",
|
|
339
|
-
value:
|
|
340
|
-
onChange: (e) =>
|
|
473
|
+
value: W,
|
|
474
|
+
onChange: (e) => G(e.target.value),
|
|
341
475
|
placeholder: "e.g. Calibrate flat fields"
|
|
342
476
|
})]
|
|
343
477
|
}),
|
|
@@ -345,32 +479,32 @@ function I() {
|
|
|
345
479
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
346
480
|
children: [/* @__PURE__ */ h("div", {
|
|
347
481
|
className: "space-y-1",
|
|
348
|
-
children: [/* @__PURE__ */ m(
|
|
482
|
+
children: [/* @__PURE__ */ m(O, {
|
|
349
483
|
htmlFor: "step-kind",
|
|
350
484
|
children: "Kind"
|
|
351
|
-
}), /* @__PURE__ */ h(
|
|
352
|
-
value:
|
|
353
|
-
onValueChange: (e) =>
|
|
354
|
-
children: [/* @__PURE__ */ m(
|
|
485
|
+
}), /* @__PURE__ */ h(ge, {
|
|
486
|
+
value: Ne,
|
|
487
|
+
onValueChange: (e) => Pe(e),
|
|
488
|
+
children: [/* @__PURE__ */ m(ye, {
|
|
355
489
|
id: "step-kind",
|
|
356
490
|
"aria-label": "Step kind",
|
|
357
|
-
children: /* @__PURE__ */ m(
|
|
358
|
-
}), /* @__PURE__ */ m(
|
|
491
|
+
children: /* @__PURE__ */ m(be, {})
|
|
492
|
+
}), /* @__PURE__ */ m(_e, { children: Te.map((e) => /* @__PURE__ */ m(ve, {
|
|
359
493
|
value: e,
|
|
360
494
|
children: u(e)
|
|
361
495
|
}, e)) })]
|
|
362
496
|
})]
|
|
363
497
|
}), /* @__PURE__ */ h("div", {
|
|
364
498
|
className: "space-y-1",
|
|
365
|
-
children: [/* @__PURE__ */ m(
|
|
499
|
+
children: [/* @__PURE__ */ m(O, {
|
|
366
500
|
htmlFor: "step-position",
|
|
367
501
|
children: "Position"
|
|
368
|
-
}), /* @__PURE__ */ m(
|
|
502
|
+
}), /* @__PURE__ */ m(D, {
|
|
369
503
|
id: "step-position",
|
|
370
504
|
type: "number",
|
|
371
505
|
min: "0",
|
|
372
506
|
value: K,
|
|
373
|
-
onChange: (e) =>
|
|
507
|
+
onChange: (e) => Fe(e.target.value),
|
|
374
508
|
placeholder: "Auto"
|
|
375
509
|
})]
|
|
376
510
|
})]
|
|
@@ -378,14 +512,14 @@ function I() {
|
|
|
378
512
|
/* @__PURE__ */ h("div", {
|
|
379
513
|
className: "space-y-1",
|
|
380
514
|
children: [
|
|
381
|
-
/* @__PURE__ */ m(
|
|
515
|
+
/* @__PURE__ */ m(O, {
|
|
382
516
|
htmlFor: "step-inputs",
|
|
383
517
|
children: "Inputs (JSON)"
|
|
384
518
|
}),
|
|
385
|
-
/* @__PURE__ */ m(
|
|
519
|
+
/* @__PURE__ */ m(we, {
|
|
386
520
|
id: "step-inputs",
|
|
387
|
-
value:
|
|
388
|
-
onChange: (e) =>
|
|
521
|
+
value: q,
|
|
522
|
+
onChange: (e) => Ie(e.target.value),
|
|
389
523
|
rows: 4,
|
|
390
524
|
spellCheck: !1,
|
|
391
525
|
className: "font-mono text-xs",
|
|
@@ -399,25 +533,25 @@ function I() {
|
|
|
399
533
|
})
|
|
400
534
|
]
|
|
401
535
|
}),
|
|
402
|
-
/* @__PURE__ */ h(
|
|
536
|
+
/* @__PURE__ */ h(pe, { children: [/* @__PURE__ */ m(S, {
|
|
403
537
|
type: "button",
|
|
404
538
|
variant: "outline",
|
|
405
539
|
onClick: () => {
|
|
406
|
-
|
|
540
|
+
U(!1), Q();
|
|
407
541
|
},
|
|
408
|
-
disabled:
|
|
542
|
+
disabled: H,
|
|
409
543
|
children: "Cancel"
|
|
410
544
|
}), /* @__PURE__ */ h(S, {
|
|
411
545
|
type: "button",
|
|
412
|
-
onClick: () => void
|
|
413
|
-
disabled:
|
|
414
|
-
children: [/* @__PURE__ */ m(
|
|
546
|
+
onClick: () => void Ge(),
|
|
547
|
+
disabled: H,
|
|
548
|
+
children: [/* @__PURE__ */ m(y, { className: "size-4" }), H ? "Adding…" : "Add step"]
|
|
415
549
|
})] })
|
|
416
550
|
] })
|
|
417
551
|
})]
|
|
418
552
|
});
|
|
419
553
|
}
|
|
420
554
|
//#endregion
|
|
421
|
-
export {
|
|
555
|
+
export { R as default };
|
|
422
556
|
|
|
423
557
|
//# sourceMappingURL=RunDetailPage.js.map
|