@devqubit/ui 0.1.11 → 0.1.12
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/client.d.ts +14 -5
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/components/ExportRunButton/ExportRunButton.d.ts +3 -3
- package/dist/components/ExportRunButton/ExportRunButton.d.ts.map +1 -1
- package/dist/components/Layout/Layout.d.ts.map +1 -1
- package/dist/components/MetricChart/MetricChart.d.ts +6 -0
- package/dist/components/MetricChart/MetricChart.d.ts.map +1 -0
- package/dist/components/MetricChart/index.d.ts +3 -0
- package/dist/components/MetricChart/index.d.ts.map +1 -0
- package/dist/components/RunsTable/RunsTable.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +51 -8
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useTheme.d.ts +29 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1819 -1369
- package/dist/pages/RunDetailPage.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +8 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +36 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useLocation as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
var m, p = {},
|
|
11
|
-
h !== void 0 && (
|
|
12
|
-
for (m in
|
|
13
|
-
if (i && i.defaultProps) for (m in
|
|
14
|
-
return { $$typeof:
|
|
1
|
+
import Bt, { useContext as dt, createContext as ut, useState as T, useEffect as de, useCallback as me, useRef as De, forwardRef as ht, useMemo as ke } from "react";
|
|
2
|
+
import { useLocation as Rs, Link as se, useSearchParams as He, useParams as xt, useNavigate as Es, Navigate as ks, createBrowserRouter as Cs, RouterProvider as Ts } from "react-router-dom";
|
|
3
|
+
var Ge = { exports: {} }, Te = {};
|
|
4
|
+
var Ft;
|
|
5
|
+
function Ss() {
|
|
6
|
+
if (Ft) return Te;
|
|
7
|
+
Ft = 1;
|
|
8
|
+
var t = Bt, s = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, l = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
9
|
+
function c(i, u, h) {
|
|
10
|
+
var m, p = {}, b = null, D = null;
|
|
11
|
+
h !== void 0 && (b = "" + h), u.key !== void 0 && (b = "" + u.key), u.ref !== void 0 && (D = u.ref);
|
|
12
|
+
for (m in u) n.call(u, m) && !o.hasOwnProperty(m) && (p[m] = u[m]);
|
|
13
|
+
if (i && i.defaultProps) for (m in u = i.defaultProps, u) p[m] === void 0 && (p[m] = u[m]);
|
|
14
|
+
return { $$typeof: s, type: i, key: b, ref: D, props: p, _owner: l.current };
|
|
15
15
|
}
|
|
16
|
-
return
|
|
17
|
-
}
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
function
|
|
21
|
-
return
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
if (
|
|
16
|
+
return Te.Fragment = a, Te.jsx = c, Te.jsxs = c, Te;
|
|
17
|
+
}
|
|
18
|
+
var Se = {};
|
|
19
|
+
var $t;
|
|
20
|
+
function Ps() {
|
|
21
|
+
return $t || ($t = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
22
|
+
var t = Bt, s = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.portal"), n = /* @__PURE__ */ Symbol.for("react.fragment"), l = /* @__PURE__ */ Symbol.for("react.strict_mode"), o = /* @__PURE__ */ Symbol.for("react.profiler"), c = /* @__PURE__ */ Symbol.for("react.provider"), i = /* @__PURE__ */ Symbol.for("react.context"), u = /* @__PURE__ */ Symbol.for("react.forward_ref"), h = /* @__PURE__ */ Symbol.for("react.suspense"), m = /* @__PURE__ */ Symbol.for("react.suspense_list"), p = /* @__PURE__ */ Symbol.for("react.memo"), b = /* @__PURE__ */ Symbol.for("react.lazy"), D = /* @__PURE__ */ Symbol.for("react.offscreen"), g = Symbol.iterator, I = "@@iterator";
|
|
23
|
+
function E(r) {
|
|
24
|
+
if (r === null || typeof r != "object")
|
|
25
25
|
return null;
|
|
26
|
-
var
|
|
27
|
-
return typeof
|
|
26
|
+
var x = g && r[g] || r[I];
|
|
27
|
+
return typeof x == "function" ? x : null;
|
|
28
28
|
}
|
|
29
|
-
var
|
|
30
|
-
function S(
|
|
29
|
+
var A = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
30
|
+
function S(r) {
|
|
31
31
|
{
|
|
32
|
-
for (var
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
for (var x = arguments.length, f = new Array(x > 1 ? x - 1 : 0), v = 1; v < x; v++)
|
|
33
|
+
f[v - 1] = arguments[v];
|
|
34
|
+
ie("error", r, f);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function ie(r, x, f) {
|
|
38
38
|
{
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
var
|
|
39
|
+
var v = A.ReactDebugCurrentFrame, k = v.getStackAddendum();
|
|
40
|
+
k !== "" && (x += "%s", f = f.concat([k]));
|
|
41
|
+
var P = f.map(function(R) {
|
|
42
42
|
return String(R);
|
|
43
43
|
});
|
|
44
|
-
|
|
44
|
+
P.unshift("Warning: " + x), Function.prototype.apply.call(console[r], console, P);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
function
|
|
50
|
-
return !!(typeof
|
|
47
|
+
var ce = !1, Z = !1, J = !1, y = !1, W = !1, ue;
|
|
48
|
+
ue = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
49
|
+
function V(r) {
|
|
50
|
+
return !!(typeof r == "string" || typeof r == "function" || r === n || r === o || W || r === l || r === h || r === m || y || r === D || ce || Z || J || typeof r == "object" && r !== null && (r.$$typeof === b || r.$$typeof === p || r.$$typeof === c || r.$$typeof === i || r.$$typeof === u || // This needs to include all possible module reference object
|
|
51
51
|
// types supported by any Flight configuration anywhere since
|
|
52
52
|
// we don't know which Flight build this will end up being used
|
|
53
53
|
// with.
|
|
54
|
-
|
|
54
|
+
r.$$typeof === ue || r.getModuleId !== void 0));
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
var
|
|
58
|
-
if (
|
|
59
|
-
return
|
|
60
|
-
var
|
|
61
|
-
return
|
|
56
|
+
function ee(r, x, f) {
|
|
57
|
+
var v = r.displayName;
|
|
58
|
+
if (v)
|
|
59
|
+
return v;
|
|
60
|
+
var k = x.displayName || x.name || "";
|
|
61
|
+
return k !== "" ? f + "(" + k + ")" : f;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
63
|
+
function je(r) {
|
|
64
|
+
return r.displayName || "Context";
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
if (
|
|
66
|
+
function ne(r) {
|
|
67
|
+
if (r == null)
|
|
68
68
|
return null;
|
|
69
|
-
if (typeof
|
|
70
|
-
return
|
|
71
|
-
if (typeof
|
|
72
|
-
return
|
|
73
|
-
switch (
|
|
74
|
-
case a:
|
|
75
|
-
return "Fragment";
|
|
69
|
+
if (typeof r.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
|
70
|
+
return r.displayName || r.name || null;
|
|
71
|
+
if (typeof r == "string")
|
|
72
|
+
return r;
|
|
73
|
+
switch (r) {
|
|
76
74
|
case n:
|
|
75
|
+
return "Fragment";
|
|
76
|
+
case a:
|
|
77
77
|
return "Portal";
|
|
78
78
|
case o:
|
|
79
79
|
return "Profiler";
|
|
80
|
-
case
|
|
80
|
+
case l:
|
|
81
81
|
return "StrictMode";
|
|
82
82
|
case h:
|
|
83
83
|
return "Suspense";
|
|
84
84
|
case m:
|
|
85
85
|
return "SuspenseList";
|
|
86
86
|
}
|
|
87
|
-
if (typeof
|
|
88
|
-
switch (
|
|
87
|
+
if (typeof r == "object")
|
|
88
|
+
switch (r.$$typeof) {
|
|
89
89
|
case i:
|
|
90
|
-
var
|
|
91
|
-
return
|
|
92
|
-
case
|
|
93
|
-
var
|
|
94
|
-
return
|
|
95
|
-
case
|
|
96
|
-
return
|
|
90
|
+
var x = r;
|
|
91
|
+
return je(x) + ".Consumer";
|
|
92
|
+
case c:
|
|
93
|
+
var f = r;
|
|
94
|
+
return je(f._context) + ".Provider";
|
|
95
|
+
case u:
|
|
96
|
+
return ee(r, r.render, "ForwardRef");
|
|
97
97
|
case p:
|
|
98
|
-
var
|
|
99
|
-
return
|
|
100
|
-
case
|
|
101
|
-
var
|
|
98
|
+
var v = r.displayName || null;
|
|
99
|
+
return v !== null ? v : ne(r.type) || "Memo";
|
|
100
|
+
case b: {
|
|
101
|
+
var k = r, P = k._payload, R = k._init;
|
|
102
102
|
try {
|
|
103
|
-
return
|
|
103
|
+
return ne(R(P));
|
|
104
104
|
} catch {
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
@@ -108,103 +108,103 @@ function pr() {
|
|
|
108
108
|
}
|
|
109
109
|
return null;
|
|
110
110
|
}
|
|
111
|
-
var
|
|
112
|
-
function
|
|
111
|
+
var te = Object.assign, le = 0, C, L, pe, he, Le, ye, qe;
|
|
112
|
+
function gt() {
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
function
|
|
114
|
+
gt.__reactDisabledLog = !0;
|
|
115
|
+
function Qt() {
|
|
116
116
|
{
|
|
117
|
-
if (
|
|
118
|
-
|
|
119
|
-
var
|
|
117
|
+
if (le === 0) {
|
|
118
|
+
C = console.log, L = console.info, pe = console.warn, he = console.error, Le = console.group, ye = console.groupCollapsed, qe = console.groupEnd;
|
|
119
|
+
var r = {
|
|
120
120
|
configurable: !0,
|
|
121
121
|
enumerable: !0,
|
|
122
|
-
value:
|
|
122
|
+
value: gt,
|
|
123
123
|
writable: !0
|
|
124
124
|
};
|
|
125
125
|
Object.defineProperties(console, {
|
|
126
|
-
info:
|
|
127
|
-
log:
|
|
128
|
-
warn:
|
|
129
|
-
error:
|
|
130
|
-
group:
|
|
131
|
-
groupCollapsed:
|
|
132
|
-
groupEnd:
|
|
126
|
+
info: r,
|
|
127
|
+
log: r,
|
|
128
|
+
warn: r,
|
|
129
|
+
error: r,
|
|
130
|
+
group: r,
|
|
131
|
+
groupCollapsed: r,
|
|
132
|
+
groupEnd: r
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
le++;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Zt() {
|
|
139
139
|
{
|
|
140
|
-
if (
|
|
141
|
-
var
|
|
140
|
+
if (le--, le === 0) {
|
|
141
|
+
var r = {
|
|
142
142
|
configurable: !0,
|
|
143
143
|
enumerable: !0,
|
|
144
144
|
writable: !0
|
|
145
145
|
};
|
|
146
146
|
Object.defineProperties(console, {
|
|
147
|
-
log:
|
|
148
|
-
value:
|
|
147
|
+
log: te({}, r, {
|
|
148
|
+
value: C
|
|
149
149
|
}),
|
|
150
|
-
info:
|
|
151
|
-
value:
|
|
150
|
+
info: te({}, r, {
|
|
151
|
+
value: L
|
|
152
152
|
}),
|
|
153
|
-
warn:
|
|
154
|
-
value:
|
|
153
|
+
warn: te({}, r, {
|
|
154
|
+
value: pe
|
|
155
155
|
}),
|
|
156
|
-
error:
|
|
157
|
-
value:
|
|
156
|
+
error: te({}, r, {
|
|
157
|
+
value: he
|
|
158
158
|
}),
|
|
159
|
-
group:
|
|
160
|
-
value:
|
|
159
|
+
group: te({}, r, {
|
|
160
|
+
value: Le
|
|
161
161
|
}),
|
|
162
|
-
groupCollapsed:
|
|
163
|
-
value:
|
|
162
|
+
groupCollapsed: te({}, r, {
|
|
163
|
+
value: ye
|
|
164
164
|
}),
|
|
165
|
-
groupEnd:
|
|
166
|
-
value:
|
|
165
|
+
groupEnd: te({}, r, {
|
|
166
|
+
value: qe
|
|
167
167
|
})
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
|
-
|
|
170
|
+
le < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
var
|
|
174
|
-
function
|
|
173
|
+
var Je = A.ReactCurrentDispatcher, Xe;
|
|
174
|
+
function Ie(r, x, f) {
|
|
175
175
|
{
|
|
176
|
-
if (
|
|
176
|
+
if (Xe === void 0)
|
|
177
177
|
try {
|
|
178
178
|
throw Error();
|
|
179
|
-
} catch (
|
|
180
|
-
var
|
|
181
|
-
|
|
179
|
+
} catch (k) {
|
|
180
|
+
var v = k.stack.trim().match(/\n( *(at )?)/);
|
|
181
|
+
Xe = v && v[1] || "";
|
|
182
182
|
}
|
|
183
183
|
return `
|
|
184
|
-
` +
|
|
184
|
+
` + Xe + r;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
var
|
|
187
|
+
var Qe = !1, Be;
|
|
188
188
|
{
|
|
189
|
-
var
|
|
190
|
-
|
|
189
|
+
var es = typeof WeakMap == "function" ? WeakMap : Map;
|
|
190
|
+
Be = new es();
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
if (!
|
|
192
|
+
function vt(r, x) {
|
|
193
|
+
if (!r || Qe)
|
|
194
194
|
return "";
|
|
195
195
|
{
|
|
196
|
-
var
|
|
197
|
-
if (
|
|
198
|
-
return
|
|
196
|
+
var f = Be.get(r);
|
|
197
|
+
if (f !== void 0)
|
|
198
|
+
return f;
|
|
199
199
|
}
|
|
200
|
-
var
|
|
201
|
-
|
|
202
|
-
var
|
|
200
|
+
var v;
|
|
201
|
+
Qe = !0;
|
|
202
|
+
var k = Error.prepareStackTrace;
|
|
203
203
|
Error.prepareStackTrace = void 0;
|
|
204
|
-
var
|
|
205
|
-
|
|
204
|
+
var P;
|
|
205
|
+
P = Je.current, Je.current = null, Qt();
|
|
206
206
|
try {
|
|
207
|
-
if (
|
|
207
|
+
if (x) {
|
|
208
208
|
var R = function() {
|
|
209
209
|
throw Error();
|
|
210
210
|
};
|
|
@@ -215,434 +215,436 @@ function pr() {
|
|
|
215
215
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
216
216
|
try {
|
|
217
217
|
Reflect.construct(R, []);
|
|
218
|
-
} catch (
|
|
219
|
-
|
|
218
|
+
} catch (X) {
|
|
219
|
+
v = X;
|
|
220
220
|
}
|
|
221
|
-
Reflect.construct(
|
|
221
|
+
Reflect.construct(r, [], R);
|
|
222
222
|
} else {
|
|
223
223
|
try {
|
|
224
224
|
R.call();
|
|
225
|
-
} catch (
|
|
226
|
-
|
|
225
|
+
} catch (X) {
|
|
226
|
+
v = X;
|
|
227
227
|
}
|
|
228
|
-
|
|
228
|
+
r.call(R.prototype);
|
|
229
229
|
}
|
|
230
230
|
} else {
|
|
231
231
|
try {
|
|
232
232
|
throw Error();
|
|
233
|
-
} catch (
|
|
234
|
-
|
|
233
|
+
} catch (X) {
|
|
234
|
+
v = X;
|
|
235
235
|
}
|
|
236
|
-
|
|
236
|
+
r();
|
|
237
237
|
}
|
|
238
|
-
} catch (
|
|
239
|
-
if (
|
|
240
|
-
for (var
|
|
241
|
-
`),
|
|
242
|
-
`),
|
|
243
|
-
|
|
244
|
-
for (;
|
|
245
|
-
if (
|
|
246
|
-
if (
|
|
238
|
+
} catch (X) {
|
|
239
|
+
if (X && v && typeof X.stack == "string") {
|
|
240
|
+
for (var _ = X.stack.split(`
|
|
241
|
+
`), z = v.stack.split(`
|
|
242
|
+
`), O = _.length - 1, M = z.length - 1; O >= 1 && M >= 0 && _[O] !== z[M]; )
|
|
243
|
+
M--;
|
|
244
|
+
for (; O >= 1 && M >= 0; O--, M--)
|
|
245
|
+
if (_[O] !== z[M]) {
|
|
246
|
+
if (O !== 1 || M !== 1)
|
|
247
247
|
do
|
|
248
|
-
if (
|
|
249
|
-
var
|
|
250
|
-
` +
|
|
251
|
-
return
|
|
248
|
+
if (O--, M--, M < 0 || _[O] !== z[M]) {
|
|
249
|
+
var ae = `
|
|
250
|
+
` + _[O].replace(" at new ", " at ");
|
|
251
|
+
return r.displayName && ae.includes("<anonymous>") && (ae = ae.replace("<anonymous>", r.displayName)), typeof r == "function" && Be.set(r, ae), ae;
|
|
252
252
|
}
|
|
253
|
-
while (
|
|
253
|
+
while (O >= 1 && M >= 0);
|
|
254
254
|
break;
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
} finally {
|
|
258
|
-
|
|
258
|
+
Qe = !1, Je.current = P, Zt(), Error.prepareStackTrace = k;
|
|
259
259
|
}
|
|
260
|
-
var
|
|
261
|
-
return typeof
|
|
260
|
+
var Ee = r ? r.displayName || r.name : "", Ne = Ee ? Ie(Ee) : "";
|
|
261
|
+
return typeof r == "function" && Be.set(r, Ne), Ne;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
return
|
|
263
|
+
function ts(r, x, f) {
|
|
264
|
+
return vt(r, !1);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
var
|
|
268
|
-
return !!(
|
|
266
|
+
function ss(r) {
|
|
267
|
+
var x = r.prototype;
|
|
268
|
+
return !!(x && x.isReactComponent);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
if (
|
|
270
|
+
function Ue(r, x, f) {
|
|
271
|
+
if (r == null)
|
|
272
272
|
return "";
|
|
273
|
-
if (typeof
|
|
274
|
-
return
|
|
275
|
-
if (typeof
|
|
276
|
-
return
|
|
277
|
-
switch (
|
|
273
|
+
if (typeof r == "function")
|
|
274
|
+
return vt(r, ss(r));
|
|
275
|
+
if (typeof r == "string")
|
|
276
|
+
return Ie(r);
|
|
277
|
+
switch (r) {
|
|
278
278
|
case h:
|
|
279
|
-
return
|
|
279
|
+
return Ie("Suspense");
|
|
280
280
|
case m:
|
|
281
|
-
return
|
|
281
|
+
return Ie("SuspenseList");
|
|
282
282
|
}
|
|
283
|
-
if (typeof
|
|
284
|
-
switch (
|
|
285
|
-
case
|
|
286
|
-
return
|
|
283
|
+
if (typeof r == "object")
|
|
284
|
+
switch (r.$$typeof) {
|
|
285
|
+
case u:
|
|
286
|
+
return ts(r.render);
|
|
287
287
|
case p:
|
|
288
|
-
return
|
|
289
|
-
case
|
|
290
|
-
var
|
|
288
|
+
return Ue(r.type, x, f);
|
|
289
|
+
case b: {
|
|
290
|
+
var v = r, k = v._payload, P = v._init;
|
|
291
291
|
try {
|
|
292
|
-
return
|
|
292
|
+
return Ue(P(k), x, f);
|
|
293
293
|
} catch {
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
return "";
|
|
298
298
|
}
|
|
299
|
-
var
|
|
300
|
-
function
|
|
301
|
-
if (
|
|
302
|
-
var
|
|
303
|
-
|
|
299
|
+
var Ce = Object.prototype.hasOwnProperty, bt = {}, yt = A.ReactDebugCurrentFrame;
|
|
300
|
+
function We(r) {
|
|
301
|
+
if (r) {
|
|
302
|
+
var x = r._owner, f = Ue(r.type, r._source, x ? x.type : null);
|
|
303
|
+
yt.setExtraStackFrame(f);
|
|
304
304
|
} else
|
|
305
|
-
|
|
305
|
+
yt.setExtraStackFrame(null);
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function rs(r, x, f, v, k) {
|
|
308
308
|
{
|
|
309
|
-
var
|
|
310
|
-
for (var R in
|
|
311
|
-
if (
|
|
312
|
-
var
|
|
309
|
+
var P = Function.call.bind(Ce);
|
|
310
|
+
for (var R in r)
|
|
311
|
+
if (P(r, R)) {
|
|
312
|
+
var _ = void 0;
|
|
313
313
|
try {
|
|
314
|
-
if (typeof
|
|
315
|
-
var
|
|
316
|
-
throw
|
|
314
|
+
if (typeof r[R] != "function") {
|
|
315
|
+
var z = Error((v || "React class") + ": " + f + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
316
|
+
throw z.name = "Invariant Violation", z;
|
|
317
317
|
}
|
|
318
|
-
|
|
319
|
-
} catch (
|
|
320
|
-
|
|
318
|
+
_ = r[R](x, R, v, f, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
319
|
+
} catch (O) {
|
|
320
|
+
_ = O;
|
|
321
321
|
}
|
|
322
|
-
|
|
322
|
+
_ && !(_ instanceof Error) && (We(k), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", f, R, typeof _), We(null)), _ instanceof Error && !(_.message in bt) && (bt[_.message] = !0, We(k), S("Failed %s type: %s", f, _.message), We(null));
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
var
|
|
327
|
-
function
|
|
328
|
-
return
|
|
326
|
+
var ns = Array.isArray;
|
|
327
|
+
function Ze(r) {
|
|
328
|
+
return ns(r);
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function as(r) {
|
|
331
331
|
{
|
|
332
|
-
var
|
|
333
|
-
return
|
|
332
|
+
var x = typeof Symbol == "function" && Symbol.toStringTag, f = x && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
333
|
+
return f;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function is(r) {
|
|
337
337
|
try {
|
|
338
|
-
return
|
|
338
|
+
return Nt(r), !1;
|
|
339
339
|
} catch {
|
|
340
340
|
return !0;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
return "" +
|
|
343
|
+
function Nt(r) {
|
|
344
|
+
return "" + r;
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
if (
|
|
348
|
-
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
346
|
+
function _t(r) {
|
|
347
|
+
if (is(r))
|
|
348
|
+
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", as(r)), Nt(r);
|
|
349
349
|
}
|
|
350
|
-
var
|
|
350
|
+
var wt = A.ReactCurrentOwner, cs = {
|
|
351
351
|
key: !0,
|
|
352
352
|
ref: !0,
|
|
353
353
|
__self: !0,
|
|
354
354
|
__source: !0
|
|
355
|
-
},
|
|
356
|
-
function
|
|
357
|
-
if (
|
|
358
|
-
var
|
|
359
|
-
if (
|
|
355
|
+
}, Rt, Et;
|
|
356
|
+
function ls(r) {
|
|
357
|
+
if (Ce.call(r, "ref")) {
|
|
358
|
+
var x = Object.getOwnPropertyDescriptor(r, "ref").get;
|
|
359
|
+
if (x && x.isReactWarning)
|
|
360
360
|
return !1;
|
|
361
361
|
}
|
|
362
|
-
return
|
|
362
|
+
return r.ref !== void 0;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
if (
|
|
366
|
-
var
|
|
367
|
-
if (
|
|
364
|
+
function os(r) {
|
|
365
|
+
if (Ce.call(r, "key")) {
|
|
366
|
+
var x = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
367
|
+
if (x && x.isReactWarning)
|
|
368
368
|
return !1;
|
|
369
369
|
}
|
|
370
|
-
return
|
|
370
|
+
return r.key !== void 0;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
typeof
|
|
372
|
+
function ds(r, x) {
|
|
373
|
+
typeof r.ref == "string" && wt.current;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function us(r, x) {
|
|
376
376
|
{
|
|
377
|
-
var
|
|
378
|
-
|
|
377
|
+
var f = function() {
|
|
378
|
+
Rt || (Rt = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
|
|
379
379
|
};
|
|
380
|
-
|
|
381
|
-
get:
|
|
380
|
+
f.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
381
|
+
get: f,
|
|
382
382
|
configurable: !0
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function hs(r, x) {
|
|
387
387
|
{
|
|
388
|
-
var
|
|
389
|
-
|
|
388
|
+
var f = function() {
|
|
389
|
+
Et || (Et = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
|
|
390
390
|
};
|
|
391
|
-
|
|
392
|
-
get:
|
|
391
|
+
f.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
|
392
|
+
get: f,
|
|
393
393
|
configurable: !0
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
var
|
|
398
|
-
var
|
|
397
|
+
var xs = function(r, x, f, v, k, P, R) {
|
|
398
|
+
var _ = {
|
|
399
399
|
// This tag allows us to uniquely identify this as a React Element
|
|
400
|
-
$$typeof:
|
|
400
|
+
$$typeof: s,
|
|
401
401
|
// Built-in properties that belong on the element
|
|
402
|
-
type:
|
|
403
|
-
key:
|
|
404
|
-
ref:
|
|
402
|
+
type: r,
|
|
403
|
+
key: x,
|
|
404
|
+
ref: f,
|
|
405
405
|
props: R,
|
|
406
406
|
// Record the component responsible for creating this element.
|
|
407
|
-
_owner:
|
|
407
|
+
_owner: P
|
|
408
408
|
};
|
|
409
|
-
return
|
|
409
|
+
return _._store = {}, Object.defineProperty(_._store, "validated", {
|
|
410
410
|
configurable: !1,
|
|
411
411
|
enumerable: !1,
|
|
412
412
|
writable: !0,
|
|
413
413
|
value: !1
|
|
414
|
-
}), Object.defineProperty(
|
|
414
|
+
}), Object.defineProperty(_, "_self", {
|
|
415
415
|
configurable: !1,
|
|
416
416
|
enumerable: !1,
|
|
417
417
|
writable: !1,
|
|
418
|
-
value:
|
|
419
|
-
}), Object.defineProperty(
|
|
418
|
+
value: v
|
|
419
|
+
}), Object.defineProperty(_, "_source", {
|
|
420
420
|
configurable: !1,
|
|
421
421
|
enumerable: !1,
|
|
422
422
|
writable: !1,
|
|
423
|
-
value:
|
|
424
|
-
}), Object.freeze && (Object.freeze(
|
|
423
|
+
value: k
|
|
424
|
+
}), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
|
|
425
425
|
};
|
|
426
|
-
function
|
|
426
|
+
function ms(r, x, f, v, k) {
|
|
427
427
|
{
|
|
428
|
-
var
|
|
429
|
-
|
|
430
|
-
for (
|
|
431
|
-
|
|
432
|
-
if (
|
|
433
|
-
var
|
|
434
|
-
for (
|
|
435
|
-
R[
|
|
428
|
+
var P, R = {}, _ = null, z = null;
|
|
429
|
+
f !== void 0 && (_t(f), _ = "" + f), os(x) && (_t(x.key), _ = "" + x.key), ls(x) && (z = x.ref, ds(x, k));
|
|
430
|
+
for (P in x)
|
|
431
|
+
Ce.call(x, P) && !cs.hasOwnProperty(P) && (R[P] = x[P]);
|
|
432
|
+
if (r && r.defaultProps) {
|
|
433
|
+
var O = r.defaultProps;
|
|
434
|
+
for (P in O)
|
|
435
|
+
R[P] === void 0 && (R[P] = O[P]);
|
|
436
436
|
}
|
|
437
|
-
if (
|
|
438
|
-
var
|
|
439
|
-
|
|
437
|
+
if (_ || z) {
|
|
438
|
+
var M = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
439
|
+
_ && us(R, M), z && hs(R, M);
|
|
440
440
|
}
|
|
441
|
-
return
|
|
441
|
+
return xs(r, _, z, k, v, wt.current, R);
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
var
|
|
445
|
-
function
|
|
446
|
-
if (
|
|
447
|
-
var
|
|
448
|
-
|
|
444
|
+
var et = A.ReactCurrentOwner, kt = A.ReactDebugCurrentFrame;
|
|
445
|
+
function Re(r) {
|
|
446
|
+
if (r) {
|
|
447
|
+
var x = r._owner, f = Ue(r.type, r._source, x ? x.type : null);
|
|
448
|
+
kt.setExtraStackFrame(f);
|
|
449
449
|
} else
|
|
450
|
-
|
|
450
|
+
kt.setExtraStackFrame(null);
|
|
451
451
|
}
|
|
452
|
-
var
|
|
453
|
-
|
|
454
|
-
function
|
|
455
|
-
return typeof
|
|
452
|
+
var tt;
|
|
453
|
+
tt = !1;
|
|
454
|
+
function st(r) {
|
|
455
|
+
return typeof r == "object" && r !== null && r.$$typeof === s;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function Ct() {
|
|
458
458
|
{
|
|
459
|
-
if (
|
|
460
|
-
var
|
|
461
|
-
if (
|
|
459
|
+
if (et.current) {
|
|
460
|
+
var r = ne(et.current.type);
|
|
461
|
+
if (r)
|
|
462
462
|
return `
|
|
463
463
|
|
|
464
|
-
Check the render method of \`` +
|
|
464
|
+
Check the render method of \`` + r + "`.";
|
|
465
465
|
}
|
|
466
466
|
return "";
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function fs(r) {
|
|
470
470
|
return "";
|
|
471
471
|
}
|
|
472
|
-
var
|
|
473
|
-
function
|
|
472
|
+
var Tt = {};
|
|
473
|
+
function js(r) {
|
|
474
474
|
{
|
|
475
|
-
var
|
|
476
|
-
if (!
|
|
477
|
-
var
|
|
478
|
-
|
|
475
|
+
var x = Ct();
|
|
476
|
+
if (!x) {
|
|
477
|
+
var f = typeof r == "string" ? r : r.displayName || r.name;
|
|
478
|
+
f && (x = `
|
|
479
479
|
|
|
480
|
-
Check the top-level render call using <` +
|
|
480
|
+
Check the top-level render call using <` + f + ">.");
|
|
481
481
|
}
|
|
482
|
-
return
|
|
482
|
+
return x;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function St(r, x) {
|
|
486
486
|
{
|
|
487
|
-
if (!
|
|
487
|
+
if (!r._store || r._store.validated || r.key != null)
|
|
488
488
|
return;
|
|
489
|
-
|
|
490
|
-
var
|
|
491
|
-
if (
|
|
489
|
+
r._store.validated = !0;
|
|
490
|
+
var f = js(x);
|
|
491
|
+
if (Tt[f])
|
|
492
492
|
return;
|
|
493
|
-
|
|
494
|
-
var
|
|
495
|
-
|
|
493
|
+
Tt[f] = !0;
|
|
494
|
+
var v = "";
|
|
495
|
+
r && r._owner && r._owner !== et.current && (v = " It was passed a child from " + ne(r._owner.type) + "."), Re(r), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', f, v), Re(null);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Pt(r, x) {
|
|
499
499
|
{
|
|
500
|
-
if (typeof
|
|
500
|
+
if (typeof r != "object")
|
|
501
501
|
return;
|
|
502
|
-
if (
|
|
503
|
-
for (var
|
|
504
|
-
var
|
|
505
|
-
|
|
502
|
+
if (Ze(r))
|
|
503
|
+
for (var f = 0; f < r.length; f++) {
|
|
504
|
+
var v = r[f];
|
|
505
|
+
st(v) && St(v, x);
|
|
506
506
|
}
|
|
507
|
-
else if (
|
|
508
|
-
|
|
509
|
-
else if (
|
|
510
|
-
var
|
|
511
|
-
if (typeof
|
|
512
|
-
for (var
|
|
513
|
-
|
|
507
|
+
else if (st(r))
|
|
508
|
+
r._store && (r._store.validated = !0);
|
|
509
|
+
else if (r) {
|
|
510
|
+
var k = E(r);
|
|
511
|
+
if (typeof k == "function" && k !== r.entries)
|
|
512
|
+
for (var P = k.call(r), R; !(R = P.next()).done; )
|
|
513
|
+
st(R.value) && St(R.value, x);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function ps(r) {
|
|
518
518
|
{
|
|
519
|
-
var
|
|
520
|
-
if (
|
|
519
|
+
var x = r.type;
|
|
520
|
+
if (x == null || typeof x == "string")
|
|
521
521
|
return;
|
|
522
|
-
var
|
|
523
|
-
if (typeof
|
|
524
|
-
|
|
525
|
-
else if (typeof
|
|
522
|
+
var f;
|
|
523
|
+
if (typeof x == "function")
|
|
524
|
+
f = x.propTypes;
|
|
525
|
+
else if (typeof x == "object" && (x.$$typeof === u || // Note: Memo only checks outer props here.
|
|
526
526
|
// Inner props are checked in the reconciler.
|
|
527
|
-
|
|
528
|
-
|
|
527
|
+
x.$$typeof === p))
|
|
528
|
+
f = x.propTypes;
|
|
529
529
|
else
|
|
530
530
|
return;
|
|
531
|
-
if (
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
} else if (
|
|
535
|
-
|
|
536
|
-
var
|
|
537
|
-
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
531
|
+
if (f) {
|
|
532
|
+
var v = ne(x);
|
|
533
|
+
rs(f, r.props, "prop", v, r);
|
|
534
|
+
} else if (x.PropTypes !== void 0 && !tt) {
|
|
535
|
+
tt = !0;
|
|
536
|
+
var k = ne(x);
|
|
537
|
+
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
|
|
538
538
|
}
|
|
539
|
-
typeof
|
|
539
|
+
typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function gs(r) {
|
|
543
543
|
{
|
|
544
|
-
for (var
|
|
545
|
-
var
|
|
546
|
-
if (
|
|
547
|
-
|
|
544
|
+
for (var x = Object.keys(r.props), f = 0; f < x.length; f++) {
|
|
545
|
+
var v = x[f];
|
|
546
|
+
if (v !== "children" && v !== "key") {
|
|
547
|
+
Re(r), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), Re(null);
|
|
548
548
|
break;
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
|
|
551
|
+
r.ref !== null && (Re(r), S("Invalid attribute `ref` supplied to `React.Fragment`."), Re(null));
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
var
|
|
555
|
-
function
|
|
554
|
+
var Dt = {};
|
|
555
|
+
function At(r, x, f, v, k, P) {
|
|
556
556
|
{
|
|
557
|
-
var R =
|
|
557
|
+
var R = V(r);
|
|
558
558
|
if (!R) {
|
|
559
|
-
var
|
|
560
|
-
(
|
|
561
|
-
var
|
|
562
|
-
|
|
563
|
-
var
|
|
564
|
-
|
|
559
|
+
var _ = "";
|
|
560
|
+
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
561
|
+
var z = fs();
|
|
562
|
+
z ? _ += z : _ += Ct();
|
|
563
|
+
var O;
|
|
564
|
+
r === null ? O = "null" : Ze(r) ? O = "array" : r !== void 0 && r.$$typeof === s ? (O = "<" + (ne(r.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : O = typeof r, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, _);
|
|
565
565
|
}
|
|
566
|
-
var
|
|
567
|
-
if (
|
|
568
|
-
return
|
|
566
|
+
var M = ms(r, x, f, k, P);
|
|
567
|
+
if (M == null)
|
|
568
|
+
return M;
|
|
569
569
|
if (R) {
|
|
570
|
-
var
|
|
571
|
-
if (
|
|
572
|
-
if (
|
|
573
|
-
if (
|
|
574
|
-
for (var
|
|
575
|
-
|
|
576
|
-
Object.freeze && Object.freeze(
|
|
570
|
+
var ae = x.children;
|
|
571
|
+
if (ae !== void 0)
|
|
572
|
+
if (v)
|
|
573
|
+
if (Ze(ae)) {
|
|
574
|
+
for (var Ee = 0; Ee < ae.length; Ee++)
|
|
575
|
+
Pt(ae[Ee], r);
|
|
576
|
+
Object.freeze && Object.freeze(ae);
|
|
577
577
|
} else
|
|
578
578
|
S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
579
579
|
else
|
|
580
|
-
|
|
580
|
+
Pt(ae, r);
|
|
581
581
|
}
|
|
582
|
-
if (
|
|
583
|
-
var
|
|
584
|
-
return
|
|
585
|
-
}),
|
|
586
|
-
if (!
|
|
587
|
-
var
|
|
582
|
+
if (Ce.call(x, "key")) {
|
|
583
|
+
var Ne = ne(r), X = Object.keys(x).filter(function(ws) {
|
|
584
|
+
return ws !== "key";
|
|
585
|
+
}), rt = X.length > 0 ? "{key: someKey, " + X.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
586
|
+
if (!Dt[Ne + rt]) {
|
|
587
|
+
var _s = X.length > 0 ? "{" + X.join(": ..., ") + ": ...}" : "{}";
|
|
588
588
|
S(`A props object containing a "key" prop is being spread into JSX:
|
|
589
589
|
let props = %s;
|
|
590
590
|
<%s {...props} />
|
|
591
591
|
React keys must be passed directly to JSX without using spread:
|
|
592
592
|
let props = %s;
|
|
593
|
-
<%s key={someKey} {...props} />`,
|
|
593
|
+
<%s key={someKey} {...props} />`, rt, Ne, _s, Ne), Dt[Ne + rt] = !0;
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
return
|
|
596
|
+
return r === n ? gs(M) : ps(M), M;
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
function
|
|
600
|
-
return
|
|
599
|
+
function vs(r, x, f) {
|
|
600
|
+
return At(r, x, f, !0);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
603
|
-
return
|
|
602
|
+
function bs(r, x, f) {
|
|
603
|
+
return At(r, x, f, !1);
|
|
604
604
|
}
|
|
605
|
-
var
|
|
606
|
-
|
|
607
|
-
})()),
|
|
605
|
+
var ys = bs, Ns = vs;
|
|
606
|
+
Se.Fragment = n, Se.jsx = ys, Se.jsxs = Ns;
|
|
607
|
+
})()), Se;
|
|
608
608
|
}
|
|
609
|
-
var
|
|
610
|
-
function
|
|
611
|
-
return
|
|
609
|
+
var Ot;
|
|
610
|
+
function Ds() {
|
|
611
|
+
return Ot || (Ot = 1, process.env.NODE_ENV === "production" ? Ge.exports = Ss() : Ge.exports = Ps()), Ge.exports;
|
|
612
612
|
}
|
|
613
|
-
var e =
|
|
614
|
-
class
|
|
615
|
-
constructor(
|
|
616
|
-
super(
|
|
613
|
+
var e = Ds();
|
|
614
|
+
class Ae extends Error {
|
|
615
|
+
constructor(s, a) {
|
|
616
|
+
super(a), this.status = s, this.name = "ApiError";
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
class
|
|
619
|
+
class As {
|
|
620
620
|
baseUrl;
|
|
621
621
|
headers;
|
|
622
|
-
constructor(
|
|
623
|
-
this.baseUrl =
|
|
622
|
+
constructor(s = {}) {
|
|
623
|
+
this.baseUrl = s.baseUrl ?? "", this.headers = {
|
|
624
624
|
"Content-Type": "application/json",
|
|
625
|
-
...
|
|
625
|
+
...s.headers
|
|
626
626
|
};
|
|
627
627
|
}
|
|
628
|
-
async request(
|
|
629
|
-
let
|
|
630
|
-
if (
|
|
631
|
-
const
|
|
632
|
-
Object.entries(
|
|
633
|
-
h != null && h !== "" &&
|
|
628
|
+
async request(s, a, n = {}) {
|
|
629
|
+
let l = `${this.baseUrl}${a}`;
|
|
630
|
+
if (n.params) {
|
|
631
|
+
const c = new URLSearchParams();
|
|
632
|
+
Object.entries(n.params).forEach(([u, h]) => {
|
|
633
|
+
h != null && h !== "" && c.set(u, String(h));
|
|
634
634
|
});
|
|
635
|
-
const i =
|
|
636
|
-
i && (
|
|
637
|
-
}
|
|
638
|
-
const o = await fetch(
|
|
639
|
-
method:
|
|
640
|
-
headers: this.headers,
|
|
641
|
-
body:
|
|
635
|
+
const i = c.toString();
|
|
636
|
+
i && (l += `?${i}`);
|
|
637
|
+
}
|
|
638
|
+
const o = await fetch(l, {
|
|
639
|
+
method: s,
|
|
640
|
+
headers: { ...this.headers, ...n.headers },
|
|
641
|
+
body: n.body ? JSON.stringify(n.body) : void 0,
|
|
642
|
+
credentials: n.credentials,
|
|
643
|
+
cache: "no-store"
|
|
642
644
|
});
|
|
643
645
|
if (!o.ok) {
|
|
644
|
-
const
|
|
645
|
-
throw new
|
|
646
|
+
const c = await o.json().catch(() => ({ detail: "Unknown error" }));
|
|
647
|
+
throw new Ae(o.status, c.detail || o.statusText);
|
|
646
648
|
}
|
|
647
649
|
if (!(o.status === 204 || o.headers.get("content-length") === "0"))
|
|
648
650
|
return o.json();
|
|
@@ -650,510 +652,625 @@ class vr {
|
|
|
650
652
|
async getCapabilities() {
|
|
651
653
|
return this.request("GET", "/api/v1/capabilities");
|
|
652
654
|
}
|
|
653
|
-
async listRuns(
|
|
654
|
-
return this.request("GET", "/api/runs", { params:
|
|
655
|
+
async listRuns(s) {
|
|
656
|
+
return this.request("GET", "/api/runs", { params: s });
|
|
655
657
|
}
|
|
656
|
-
async getRun(
|
|
657
|
-
return this.request("GET", `/api/runs/${
|
|
658
|
+
async getRun(s) {
|
|
659
|
+
return this.request("GET", `/api/runs/${s}`);
|
|
658
660
|
}
|
|
659
|
-
async deleteRun(
|
|
660
|
-
await this.request("DELETE", `/api/runs/${
|
|
661
|
+
async deleteRun(s) {
|
|
662
|
+
await this.request("DELETE", `/api/runs/${s}`);
|
|
661
663
|
}
|
|
662
|
-
async setBaseline(
|
|
663
|
-
return this.request("POST", `/api/projects/${
|
|
664
|
+
async setBaseline(s, a) {
|
|
665
|
+
return this.request("POST", `/api/projects/${s}/baseline/${a}`, {
|
|
664
666
|
params: { redirect: "false" }
|
|
665
667
|
});
|
|
666
668
|
}
|
|
667
|
-
async listProjects(
|
|
668
|
-
return this.request("GET", "/api/projects", { params:
|
|
669
|
+
async listProjects(s) {
|
|
670
|
+
return this.request("GET", "/api/projects", { params: s });
|
|
669
671
|
}
|
|
670
|
-
async listGroups(
|
|
671
|
-
return this.request("GET", "/api/groups", { params:
|
|
672
|
+
async listGroups(s) {
|
|
673
|
+
return this.request("GET", "/api/groups", { params: s });
|
|
672
674
|
}
|
|
673
|
-
async getGroup(
|
|
674
|
-
return this.request("GET", `/api/groups/${
|
|
675
|
+
async getGroup(s) {
|
|
676
|
+
return this.request("GET", `/api/groups/${s}`);
|
|
675
677
|
}
|
|
676
|
-
async getDiff(
|
|
678
|
+
async getDiff(s, a) {
|
|
677
679
|
return this.request("GET", "/api/diff", {
|
|
678
|
-
params: { a:
|
|
680
|
+
params: { a: s, b: a }
|
|
679
681
|
});
|
|
680
682
|
}
|
|
681
|
-
async getArtifact(
|
|
682
|
-
return this.request("GET", `/api/runs/${
|
|
683
|
+
async getArtifact(s, a) {
|
|
684
|
+
return this.request("GET", `/api/runs/${s}/artifacts/${a}`);
|
|
685
|
+
}
|
|
686
|
+
getArtifactDownloadUrl(s, a) {
|
|
687
|
+
return `${this.baseUrl}/api/runs/${s}/artifacts/${a}/raw`;
|
|
683
688
|
}
|
|
684
|
-
|
|
685
|
-
return
|
|
689
|
+
async createExport(s) {
|
|
690
|
+
return this.request("POST", `/api/runs/${s}/export`);
|
|
686
691
|
}
|
|
687
|
-
async
|
|
688
|
-
return this.request("
|
|
692
|
+
async getExportInfo(s) {
|
|
693
|
+
return this.request("GET", `/api/runs/${s}/export/info`);
|
|
689
694
|
}
|
|
690
|
-
|
|
691
|
-
return this.
|
|
695
|
+
getExportDownloadUrl(s) {
|
|
696
|
+
return `${this.baseUrl}/api/runs/${s}/export/download`;
|
|
692
697
|
}
|
|
693
|
-
|
|
694
|
-
return
|
|
698
|
+
async getMetricSeries(s) {
|
|
699
|
+
return this.request("GET", `/api/runs/${s}/metric_series`);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
const Fs = new As();
|
|
703
|
+
function oe(t) {
|
|
704
|
+
return t?.slice(0, 8) ?? "";
|
|
705
|
+
}
|
|
706
|
+
function ct(t) {
|
|
707
|
+
return t?.slice(0, 12) ?? "N/A";
|
|
708
|
+
}
|
|
709
|
+
function Ye(t) {
|
|
710
|
+
const s = new Date(t), n = Math.floor(((/* @__PURE__ */ new Date()).getTime() - s.getTime()) / 1e3);
|
|
711
|
+
if (n < 60) return "just now";
|
|
712
|
+
if (n < 3600) {
|
|
713
|
+
const o = Math.floor(n / 60);
|
|
714
|
+
return `${o} minute${o !== 1 ? "s" : ""} ago`;
|
|
715
|
+
}
|
|
716
|
+
if (n < 86400) {
|
|
717
|
+
const o = Math.floor(n / 3600);
|
|
718
|
+
return `${o} hour${o !== 1 ? "s" : ""} ago`;
|
|
719
|
+
}
|
|
720
|
+
if (n < 2592e3) {
|
|
721
|
+
const o = Math.floor(n / 86400);
|
|
722
|
+
return `${o} day${o !== 1 ? "s" : ""} ago`;
|
|
723
|
+
}
|
|
724
|
+
if (n < 31536e3) {
|
|
725
|
+
const o = Math.floor(n / 2592e3);
|
|
726
|
+
return `${o} month${o !== 1 ? "s" : ""} ago`;
|
|
695
727
|
}
|
|
728
|
+
const l = Math.floor(n / 31536e3);
|
|
729
|
+
return `${l} year${l !== 1 ? "s" : ""} ago`;
|
|
696
730
|
}
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
731
|
+
function lt(t, s = 6) {
|
|
732
|
+
return typeof t != "number" || isNaN(t) ? String(t) : Number(t.toPrecision(s)).toString();
|
|
733
|
+
}
|
|
734
|
+
function Ve(t) {
|
|
735
|
+
return t < 1024 ? `${t} bytes` : t < 1048576 ? `${(t / 1024).toFixed(1)} KB` : `${(t / 1048576).toFixed(1)} MB`;
|
|
736
|
+
}
|
|
737
|
+
function $s(t) {
|
|
738
|
+
return JSON.stringify(t, null, 2);
|
|
739
|
+
}
|
|
740
|
+
function Os(t, s = 60) {
|
|
741
|
+
return t ? t.length <= s ? t : t.slice(0, s - 3) + "..." : "";
|
|
742
|
+
}
|
|
743
|
+
function kr(t, s) {
|
|
744
|
+
const a = new URLSearchParams();
|
|
745
|
+
Object.entries(s).forEach(([l, o]) => {
|
|
746
|
+
o != null && o !== "" && a.set(l, String(o));
|
|
747
|
+
});
|
|
748
|
+
const n = a.toString();
|
|
749
|
+
return n ? `${t}?${n}` : t;
|
|
750
|
+
}
|
|
751
|
+
function q(...t) {
|
|
752
|
+
return t.filter(Boolean).join(" ");
|
|
753
|
+
}
|
|
754
|
+
function Ut(t, s) {
|
|
755
|
+
const a = new Date(t).getTime(), n = s ? new Date(s).getTime() : Date.now();
|
|
756
|
+
return Math.max(0, Math.floor((n - a) / 1e3));
|
|
757
|
+
}
|
|
758
|
+
function Wt(t) {
|
|
759
|
+
if (t < 60) return `${t}s`;
|
|
760
|
+
const s = Math.floor(t / 86400), a = Math.floor(t % 86400 / 3600), n = Math.floor(t % 3600 / 60), l = t % 60;
|
|
761
|
+
return s > 0 ? `${s}d ${a}h ${n}m` : a > 0 ? `${a}h ${n}m ${l}s` : `${n}m ${l}s`;
|
|
762
|
+
}
|
|
763
|
+
function $e(t) {
|
|
764
|
+
return t === "FINISHED" || t === "FAILED" || t === "KILLED";
|
|
765
|
+
}
|
|
766
|
+
const Gt = ut(null);
|
|
767
|
+
function Cr({ children: t }) {
|
|
768
|
+
const s = {
|
|
769
|
+
theme: "light",
|
|
770
|
+
resolvedTheme: "light",
|
|
771
|
+
setTheme: () => {
|
|
772
|
+
},
|
|
773
|
+
toggleTheme: () => {
|
|
774
|
+
}
|
|
775
|
+
};
|
|
776
|
+
return /* @__PURE__ */ e.jsx(Gt.Provider, { value: s, children: t });
|
|
777
|
+
}
|
|
778
|
+
function Ms() {
|
|
779
|
+
const t = dt(Gt);
|
|
780
|
+
return t || {
|
|
781
|
+
theme: "light",
|
|
782
|
+
resolvedTheme: "light",
|
|
783
|
+
setTheme: () => {
|
|
784
|
+
},
|
|
785
|
+
toggleTheme: () => {
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
function Tr() {
|
|
790
|
+
return Ms();
|
|
791
|
+
}
|
|
792
|
+
const nt = 1e3, Ls = {
|
|
793
|
+
runsActive: nt,
|
|
794
|
+
runsIdle: nt,
|
|
795
|
+
runDetail: nt
|
|
796
|
+
}, Vt = ut(null);
|
|
797
|
+
function qs({
|
|
798
|
+
children: t,
|
|
799
|
+
api: s = Fs,
|
|
800
|
+
initialWorkspace: a = null,
|
|
801
|
+
pollingConfig: n
|
|
702
802
|
}) {
|
|
703
|
-
const [
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
}
|
|
803
|
+
const [l, o] = T(null), [c, i] = T(a), u = {
|
|
804
|
+
...Ls,
|
|
805
|
+
...n
|
|
806
|
+
};
|
|
807
|
+
return de(() => {
|
|
808
|
+
s.getCapabilities().then(o).catch(console.error);
|
|
809
|
+
}, [s]), /* @__PURE__ */ e.jsx(Vt.Provider, { value: { api: s, capabilities: l, currentWorkspace: c, setCurrentWorkspace: i, pollingConfig: u }, children: t });
|
|
707
810
|
}
|
|
708
811
|
function K() {
|
|
709
|
-
const
|
|
710
|
-
if (!
|
|
711
|
-
return
|
|
812
|
+
const t = dt(Vt);
|
|
813
|
+
if (!t) throw new Error("useApp must be used within AppProvider");
|
|
814
|
+
return t;
|
|
712
815
|
}
|
|
713
|
-
function
|
|
714
|
-
const [
|
|
816
|
+
function be(t, s = []) {
|
|
817
|
+
const [a, n] = T({
|
|
715
818
|
data: null,
|
|
716
819
|
loading: !0,
|
|
717
820
|
error: null
|
|
718
|
-
}),
|
|
719
|
-
o.current =
|
|
720
|
-
const
|
|
721
|
-
|
|
821
|
+
}), l = De(!0), o = De(t);
|
|
822
|
+
o.current = t;
|
|
823
|
+
const c = me(async (u) => {
|
|
824
|
+
u || n((h) => ({ ...h, loading: !0, error: null }));
|
|
722
825
|
try {
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
} catch (
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
826
|
+
const h = await o.current();
|
|
827
|
+
l.current && n({ data: h, loading: !1, error: null });
|
|
828
|
+
} catch (h) {
|
|
829
|
+
if (l.current) {
|
|
830
|
+
const m = h instanceof Ae ? h : new Ae(500, String(h));
|
|
831
|
+
n((p) => ({
|
|
832
|
+
data: u ? p.data : null,
|
|
833
|
+
loading: !1,
|
|
834
|
+
error: m
|
|
835
|
+
}));
|
|
836
|
+
}
|
|
731
837
|
}
|
|
732
838
|
}, []);
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
}),
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
839
|
+
de(() => (l.current = !0, c(!1), () => {
|
|
840
|
+
l.current = !1;
|
|
841
|
+
}), s);
|
|
842
|
+
const i = me(() => c(!0), [c]);
|
|
843
|
+
return { ...a, refetch: i };
|
|
844
|
+
}
|
|
845
|
+
function mt(t, s, a) {
|
|
846
|
+
de(() => {
|
|
847
|
+
if (!a) return;
|
|
848
|
+
let n, l = !1;
|
|
849
|
+
const o = () => {
|
|
850
|
+
if (l) return;
|
|
851
|
+
const u = s * 0.1 * (Math.random() * 2 - 1);
|
|
852
|
+
n = setTimeout(c, Math.max(500, s + u));
|
|
853
|
+
}, c = async () => {
|
|
854
|
+
if (!l && document.visibilityState !== "hidden") {
|
|
855
|
+
try {
|
|
856
|
+
await t();
|
|
857
|
+
} catch {
|
|
858
|
+
}
|
|
859
|
+
o();
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
o();
|
|
863
|
+
const i = () => {
|
|
864
|
+
l || document.visibilityState !== "visible" || (clearTimeout(n), Promise.resolve(t()).catch(() => {
|
|
865
|
+
}).finally(o));
|
|
866
|
+
};
|
|
867
|
+
return document.addEventListener("visibilitychange", i), () => {
|
|
868
|
+
l = !0, clearTimeout(n), document.removeEventListener("visibilitychange", i);
|
|
869
|
+
};
|
|
870
|
+
}, [t, s, a]);
|
|
871
|
+
}
|
|
872
|
+
function zt(t) {
|
|
873
|
+
const { api: s, currentWorkspace: a, pollingConfig: n } = K(), l = be(
|
|
874
|
+
() => s.listRuns({ ...t, workspace: a?.id }),
|
|
875
|
+
[s, a?.id, t?.project, t?.status, t?.q, t?.limit]
|
|
876
|
+
), c = l.data?.runs.some((i) => !$e(i.status)) ?? !1 ? n.runsActive : n.runsIdle;
|
|
877
|
+
return mt(l.refetch, c, !0), l;
|
|
743
878
|
}
|
|
744
|
-
function
|
|
745
|
-
const { api:
|
|
746
|
-
return ue(
|
|
879
|
+
function Yt(t) {
|
|
880
|
+
const { api: s, pollingConfig: a } = K(), n = be(
|
|
747
881
|
async () => {
|
|
748
|
-
const { run:
|
|
749
|
-
return
|
|
882
|
+
const { run: o } = await s.getRun(t);
|
|
883
|
+
return o;
|
|
750
884
|
},
|
|
751
|
-
[
|
|
752
|
-
);
|
|
885
|
+
[s, t]
|
|
886
|
+
), l = n.data ? !$e(n.data.status) : !1;
|
|
887
|
+
return mt(n.refetch, a.runDetail, l), n;
|
|
753
888
|
}
|
|
754
|
-
function
|
|
755
|
-
const { api:
|
|
756
|
-
return
|
|
889
|
+
function Ke() {
|
|
890
|
+
const { api: t, currentWorkspace: s } = K();
|
|
891
|
+
return be(
|
|
757
892
|
async () => {
|
|
758
|
-
const { projects:
|
|
759
|
-
return
|
|
893
|
+
const { projects: a } = await t.listProjects({ workspace: s?.id });
|
|
894
|
+
return a;
|
|
760
895
|
},
|
|
761
|
-
[
|
|
896
|
+
[t, s?.id]
|
|
762
897
|
);
|
|
763
898
|
}
|
|
764
|
-
function
|
|
765
|
-
const { api:
|
|
766
|
-
return
|
|
899
|
+
function Is(t) {
|
|
900
|
+
const { api: s, currentWorkspace: a } = K();
|
|
901
|
+
return be(
|
|
767
902
|
async () => {
|
|
768
|
-
const { groups:
|
|
769
|
-
return
|
|
903
|
+
const { groups: n } = await s.listGroups({ ...t, workspace: a?.id });
|
|
904
|
+
return n;
|
|
770
905
|
},
|
|
771
|
-
[
|
|
906
|
+
[s, a?.id, t?.project]
|
|
772
907
|
);
|
|
773
908
|
}
|
|
774
|
-
function
|
|
775
|
-
const { api:
|
|
776
|
-
return
|
|
777
|
-
() =>
|
|
778
|
-
[
|
|
909
|
+
function Bs(t) {
|
|
910
|
+
const { api: s } = K();
|
|
911
|
+
return be(
|
|
912
|
+
() => s.getGroup(t),
|
|
913
|
+
[s, t]
|
|
779
914
|
);
|
|
780
915
|
}
|
|
781
|
-
function
|
|
782
|
-
const { api:
|
|
783
|
-
return
|
|
784
|
-
() =>
|
|
785
|
-
[
|
|
916
|
+
function Us(t, s) {
|
|
917
|
+
const { api: a } = K();
|
|
918
|
+
return be(
|
|
919
|
+
() => a.getDiff(t, s),
|
|
920
|
+
[a, t, s]
|
|
786
921
|
);
|
|
787
922
|
}
|
|
788
|
-
function
|
|
789
|
-
const { api:
|
|
790
|
-
return
|
|
791
|
-
() =>
|
|
792
|
-
[
|
|
923
|
+
function Ws(t, s) {
|
|
924
|
+
const { api: a } = K();
|
|
925
|
+
return be(
|
|
926
|
+
() => a.getArtifact(t, s),
|
|
927
|
+
[a, t, s]
|
|
793
928
|
);
|
|
794
929
|
}
|
|
795
|
-
function
|
|
796
|
-
const [
|
|
797
|
-
return { mutate:
|
|
798
|
-
|
|
930
|
+
function Fe(t) {
|
|
931
|
+
const [s, a] = T(!1), [n, l] = T(null);
|
|
932
|
+
return { mutate: me(async (...c) => {
|
|
933
|
+
a(!0), l(null);
|
|
799
934
|
try {
|
|
800
|
-
return await
|
|
935
|
+
return await t(...c);
|
|
801
936
|
} catch (i) {
|
|
802
|
-
const
|
|
803
|
-
throw u
|
|
937
|
+
const u = i instanceof Ae ? i : new Ae(500, String(i));
|
|
938
|
+
throw l(u), u;
|
|
804
939
|
} finally {
|
|
805
|
-
|
|
940
|
+
a(!1);
|
|
806
941
|
}
|
|
807
|
-
}, [
|
|
808
|
-
}
|
|
809
|
-
function Q(r) {
|
|
810
|
-
return r?.slice(0, 8) ?? "";
|
|
811
|
-
}
|
|
812
|
-
function He(r) {
|
|
813
|
-
return r?.slice(0, 12) ?? "N/A";
|
|
814
|
-
}
|
|
815
|
-
function Ze(r) {
|
|
816
|
-
const t = new Date(r), a = Math.floor(((/* @__PURE__ */ new Date()).getTime() - t.getTime()) / 1e3);
|
|
817
|
-
if (a < 60) return "just now";
|
|
818
|
-
if (a < 3600) {
|
|
819
|
-
const o = Math.floor(a / 60);
|
|
820
|
-
return `${o} minute${o !== 1 ? "s" : ""} ago`;
|
|
821
|
-
}
|
|
822
|
-
if (a < 86400) {
|
|
823
|
-
const o = Math.floor(a / 3600);
|
|
824
|
-
return `${o} hour${o !== 1 ? "s" : ""} ago`;
|
|
825
|
-
}
|
|
826
|
-
if (a < 2592e3) {
|
|
827
|
-
const o = Math.floor(a / 86400);
|
|
828
|
-
return `${o} day${o !== 1 ? "s" : ""} ago`;
|
|
829
|
-
}
|
|
830
|
-
if (a < 31536e3) {
|
|
831
|
-
const o = Math.floor(a / 2592e3);
|
|
832
|
-
return `${o} month${o !== 1 ? "s" : ""} ago`;
|
|
833
|
-
}
|
|
834
|
-
const u = Math.floor(a / 31536e3);
|
|
835
|
-
return `${u} year${u !== 1 ? "s" : ""} ago`;
|
|
836
|
-
}
|
|
837
|
-
function Er(r, t = 6) {
|
|
838
|
-
return typeof r != "number" || isNaN(r) ? String(r) : Number(r.toPrecision(t)).toString();
|
|
839
|
-
}
|
|
840
|
-
function Oe(r) {
|
|
841
|
-
return r < 1024 ? `${r} bytes` : r < 1048576 ? `${(r / 1024).toFixed(1)} KB` : `${(r / 1048576).toFixed(1)} MB`;
|
|
842
|
-
}
|
|
843
|
-
function Cr(r) {
|
|
844
|
-
return JSON.stringify(r, null, 2);
|
|
942
|
+
}, [t]), loading: s, error: n };
|
|
845
943
|
}
|
|
846
|
-
function
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
return
|
|
944
|
+
function Gs(t, s) {
|
|
945
|
+
const { api: a, pollingConfig: n } = K(), l = be(
|
|
946
|
+
async () => {
|
|
947
|
+
try {
|
|
948
|
+
const { series: c } = await a.getMetricSeries(t);
|
|
949
|
+
return Object.values(c).some((u) => u.length > 0) ? c : null;
|
|
950
|
+
} catch {
|
|
951
|
+
return null;
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
[a, t]
|
|
955
|
+
), o = De(s);
|
|
956
|
+
return de(() => {
|
|
957
|
+
o.current && !s && l.refetch(), o.current = s;
|
|
958
|
+
}, [s, l.refetch]), mt(l.refetch, n.runDetail, s), l;
|
|
859
959
|
}
|
|
860
|
-
const
|
|
960
|
+
const Vs = [
|
|
861
961
|
{ href: "/runs", label: "Runs", matchPaths: ["/runs"] },
|
|
862
962
|
{ href: "/projects", label: "Projects", matchPaths: ["/projects"] },
|
|
863
963
|
{ href: "/groups", label: "Groups", matchPaths: ["/groups"] },
|
|
864
964
|
{ href: "/diff", label: "Compare", matchPaths: ["/diff"] },
|
|
865
965
|
{ href: "/search", label: "Search", matchPaths: ["/search"] }
|
|
866
|
-
],
|
|
867
|
-
function
|
|
868
|
-
config:
|
|
869
|
-
children:
|
|
966
|
+
], Ht = ut(null);
|
|
967
|
+
function Sr({
|
|
968
|
+
config: t,
|
|
969
|
+
children: s
|
|
870
970
|
}) {
|
|
871
|
-
return /* @__PURE__ */ e.jsx(
|
|
971
|
+
return /* @__PURE__ */ e.jsx(Ht.Provider, { value: t, children: s });
|
|
872
972
|
}
|
|
873
|
-
function
|
|
874
|
-
return
|
|
973
|
+
function zs() {
|
|
974
|
+
return dt(Ht);
|
|
875
975
|
}
|
|
876
|
-
function
|
|
877
|
-
const
|
|
878
|
-
...
|
|
976
|
+
function Q({ children: t, config: s }) {
|
|
977
|
+
const a = Rs(), l = { ...zs(), ...s }, o = l?.navLinks ?? Vs, c = [
|
|
978
|
+
...l?.prependNavLinks ?? [],
|
|
879
979
|
...o,
|
|
880
|
-
...
|
|
881
|
-
], i =
|
|
882
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "
|
|
883
|
-
/* @__PURE__ */ e.jsx("header", { className: "
|
|
884
|
-
/* @__PURE__ */ e.jsxs("div", { className: "
|
|
885
|
-
/* @__PURE__ */ e.jsxs(
|
|
886
|
-
i.icon && /* @__PURE__ */ e.jsx("span", { className: "
|
|
980
|
+
...l?.appendNavLinks ?? []
|
|
981
|
+
], i = l?.logo ?? { text: "devqubit", icon: "⚛" }, u = (h) => h.matchPaths ? h.matchPaths.some((m) => a.pathname.startsWith(m)) : a.pathname === h.href;
|
|
982
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "dq-layout", children: [
|
|
983
|
+
/* @__PURE__ */ e.jsx("header", { className: "dq-header", children: /* @__PURE__ */ e.jsxs("div", { className: "dq-header-inner", children: [
|
|
984
|
+
/* @__PURE__ */ e.jsxs("div", { className: "dq-header-left", children: [
|
|
985
|
+
/* @__PURE__ */ e.jsxs(se, { to: "/", className: "dq-logo", children: [
|
|
986
|
+
i.icon && /* @__PURE__ */ e.jsx("span", { className: "dq-logo-icon", children: i.icon }),
|
|
887
987
|
i.text
|
|
888
988
|
] }),
|
|
889
|
-
/* @__PURE__ */ e.jsx("nav", { className: "
|
|
890
|
-
|
|
989
|
+
/* @__PURE__ */ e.jsx("nav", { className: "dq-nav", children: c.map((h) => /* @__PURE__ */ e.jsx(
|
|
990
|
+
se,
|
|
891
991
|
{
|
|
892
992
|
to: h.href,
|
|
893
|
-
className:
|
|
894
|
-
"px-3 py-2 rounded-md text-sm font-medium transition-colors duration-150",
|
|
895
|
-
f(h) ? "text-white bg-white/10" : "text-gray-400 hover:text-white hover:bg-white/5"
|
|
896
|
-
),
|
|
993
|
+
className: q("dq-nav-link", u(h) && "active"),
|
|
897
994
|
children: h.label
|
|
898
995
|
},
|
|
899
996
|
h.href
|
|
900
997
|
)) })
|
|
901
998
|
] }),
|
|
902
|
-
/* @__PURE__ */ e.jsx("div", { className: "
|
|
999
|
+
/* @__PURE__ */ e.jsx("div", { className: "dq-header-right", children: l?.headerRight })
|
|
903
1000
|
] }) }),
|
|
904
|
-
/* @__PURE__ */ e.jsx("main", { className: "
|
|
1001
|
+
/* @__PURE__ */ e.jsx("main", { className: "dq-main fade-in", children: t })
|
|
905
1002
|
] });
|
|
906
1003
|
}
|
|
907
|
-
function
|
|
908
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "
|
|
1004
|
+
function Oe({ title: t, subtitle: s, actions: a }) {
|
|
1005
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "page-header", children: [
|
|
909
1006
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
910
|
-
/* @__PURE__ */ e.jsx("h1", { className: "
|
|
911
|
-
|
|
1007
|
+
/* @__PURE__ */ e.jsx("h1", { className: "page-title", children: t }),
|
|
1008
|
+
s && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-1", children: s })
|
|
912
1009
|
] }),
|
|
913
|
-
|
|
1010
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "flex gap-2", children: a })
|
|
914
1011
|
] });
|
|
915
1012
|
}
|
|
916
|
-
function
|
|
917
|
-
return /* @__PURE__ */ e.jsx("span", { className:
|
|
1013
|
+
function re({ variant: t = "gray", className: s, children: a, ...n }) {
|
|
1014
|
+
return /* @__PURE__ */ e.jsx("span", { className: q("badge", `badge-${t}`, s), ...n, children: a });
|
|
918
1015
|
}
|
|
919
|
-
const
|
|
920
|
-
({ variant:
|
|
1016
|
+
const $ = ht(
|
|
1017
|
+
({ variant: t = "secondary", size: s = "default", loading: a, className: n, children: l, disabled: o, ...c }, i) => /* @__PURE__ */ e.jsxs(
|
|
921
1018
|
"button",
|
|
922
1019
|
{
|
|
923
1020
|
ref: i,
|
|
924
|
-
className:
|
|
1021
|
+
className: q(
|
|
925
1022
|
"btn",
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
1023
|
+
t === "ghost-danger" ? "btn-ghost-danger" : `btn-${t}`,
|
|
1024
|
+
s === "sm" && "btn-sm",
|
|
1025
|
+
n
|
|
929
1026
|
),
|
|
930
|
-
disabled: o ||
|
|
931
|
-
...
|
|
1027
|
+
disabled: o || a,
|
|
1028
|
+
...c,
|
|
932
1029
|
children: [
|
|
933
|
-
|
|
934
|
-
|
|
1030
|
+
a && /* @__PURE__ */ e.jsx(G, {}),
|
|
1031
|
+
l
|
|
935
1032
|
]
|
|
936
1033
|
}
|
|
937
1034
|
)
|
|
938
1035
|
);
|
|
939
|
-
|
|
940
|
-
function
|
|
941
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
1036
|
+
$.displayName = "Button";
|
|
1037
|
+
function N({ className: t, children: s, ...a }) {
|
|
1038
|
+
return /* @__PURE__ */ e.jsx("div", { className: q("card", t), ...a, children: s });
|
|
942
1039
|
}
|
|
943
|
-
function
|
|
944
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
1040
|
+
function Y({ className: t, children: s, ...a }) {
|
|
1041
|
+
return /* @__PURE__ */ e.jsx("div", { className: q("card-header", t), ...a, children: s });
|
|
945
1042
|
}
|
|
946
|
-
function
|
|
947
|
-
return /* @__PURE__ */ e.jsx("h3", { className:
|
|
1043
|
+
function H({ className: t, children: s, ...a }) {
|
|
1044
|
+
return /* @__PURE__ */ e.jsx("h3", { className: q("card-title", t), ...a, children: s });
|
|
948
1045
|
}
|
|
949
|
-
function
|
|
950
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
1046
|
+
function Pr({ variant: t = "info", className: s, children: a, ...n }) {
|
|
1047
|
+
return /* @__PURE__ */ e.jsx("div", { className: q("alert", `alert-${t}`, s), ...n, children: a });
|
|
951
1048
|
}
|
|
952
|
-
function
|
|
953
|
-
return /* @__PURE__ */ e.jsx("span", { className:
|
|
1049
|
+
function G({ className: t, ...s }) {
|
|
1050
|
+
return /* @__PURE__ */ e.jsx("span", { className: q("spinner", t), ...s });
|
|
954
1051
|
}
|
|
955
|
-
function
|
|
956
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
957
|
-
/* @__PURE__ */ e.jsx("p", { children:
|
|
958
|
-
|
|
1052
|
+
function we({ message: t, hint: s, className: a, ...n }) {
|
|
1053
|
+
return /* @__PURE__ */ e.jsxs("div", { className: q("empty-state", a), ...n, children: [
|
|
1054
|
+
/* @__PURE__ */ e.jsx("p", { children: t }),
|
|
1055
|
+
s && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-2", children: s })
|
|
959
1056
|
] });
|
|
960
1057
|
}
|
|
961
|
-
function
|
|
962
|
-
return /* @__PURE__ */ e.jsx("dl", { className:
|
|
963
|
-
/* @__PURE__ */ e.jsx("dt", { children:
|
|
964
|
-
/* @__PURE__ */ e.jsx("dd", { children:
|
|
965
|
-
] },
|
|
1058
|
+
function ot({ items: t, className: s, ...a }) {
|
|
1059
|
+
return /* @__PURE__ */ e.jsx("dl", { className: q("kv-list", s), ...a, children: t.map(({ label: n, value: l }) => /* @__PURE__ */ e.jsxs("div", { className: "contents", children: [
|
|
1060
|
+
/* @__PURE__ */ e.jsx("dt", { children: n }),
|
|
1061
|
+
/* @__PURE__ */ e.jsx("dd", { children: l })
|
|
1062
|
+
] }, n)) });
|
|
966
1063
|
}
|
|
967
|
-
function
|
|
968
|
-
return
|
|
1064
|
+
function ft({ open: t, onClose: s, title: a, children: n, actions: l }) {
|
|
1065
|
+
return t ? /* @__PURE__ */ e.jsx(
|
|
969
1066
|
"div",
|
|
970
1067
|
{
|
|
971
|
-
className:
|
|
972
|
-
onClick: (o) => o.target === o.currentTarget &&
|
|
1068
|
+
className: q("modal-backdrop", "active"),
|
|
1069
|
+
onClick: (o) => o.target === o.currentTarget && s(),
|
|
973
1070
|
children: /* @__PURE__ */ e.jsxs("div", { className: "modal", onClick: (o) => o.stopPropagation(), children: [
|
|
974
|
-
/* @__PURE__ */ e.jsx("h3", { className: "modal-title", children:
|
|
975
|
-
/* @__PURE__ */ e.jsx("div", { className: "modal-body", children:
|
|
976
|
-
|
|
1071
|
+
/* @__PURE__ */ e.jsx("h3", { className: "modal-title", children: a }),
|
|
1072
|
+
/* @__PURE__ */ e.jsx("div", { className: "modal-body", children: n }),
|
|
1073
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "modal-actions", children: l })
|
|
977
1074
|
] })
|
|
978
1075
|
}
|
|
979
1076
|
) : null;
|
|
980
1077
|
}
|
|
981
|
-
function
|
|
982
|
-
if (!
|
|
983
|
-
const
|
|
1078
|
+
function Me({ message: t, variant: s = "info", visible: a, onClose: n }) {
|
|
1079
|
+
if (!a) return null;
|
|
1080
|
+
const l = {
|
|
984
1081
|
success: "✓",
|
|
985
1082
|
error: "✕",
|
|
986
1083
|
info: "i"
|
|
987
|
-
}[
|
|
1084
|
+
}[s], o = {
|
|
988
1085
|
success: "text-[#059669]",
|
|
989
1086
|
error: "text-[#DC4A4A]",
|
|
990
1087
|
info: "text-[#2563EB]"
|
|
991
|
-
}[
|
|
992
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "toast", onClick:
|
|
993
|
-
/* @__PURE__ */ e.jsx("span", { className:
|
|
994
|
-
|
|
1088
|
+
}[s];
|
|
1089
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "toast", onClick: n, children: [
|
|
1090
|
+
/* @__PURE__ */ e.jsx("span", { className: q("mr-2 font-bold", o), children: l }),
|
|
1091
|
+
t
|
|
995
1092
|
] });
|
|
996
1093
|
}
|
|
997
|
-
function
|
|
998
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
1094
|
+
function xe({ children: t, className: s }) {
|
|
1095
|
+
return /* @__PURE__ */ e.jsx("div", { className: q("form-group", s), children: t });
|
|
999
1096
|
}
|
|
1000
|
-
function
|
|
1001
|
-
return /* @__PURE__ */ e.jsx("label", { className:
|
|
1097
|
+
function ve({ className: t, children: s, ...a }) {
|
|
1098
|
+
return /* @__PURE__ */ e.jsx("label", { className: q("form-label", t), ...a, children: s });
|
|
1002
1099
|
}
|
|
1003
|
-
const
|
|
1004
|
-
({ className:
|
|
1100
|
+
const jt = ht(
|
|
1101
|
+
({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx("input", { ref: a, className: q("form-input", t), ...s })
|
|
1005
1102
|
);
|
|
1006
|
-
|
|
1007
|
-
const
|
|
1008
|
-
({ className:
|
|
1103
|
+
jt.displayName = "Input";
|
|
1104
|
+
const _e = ht(
|
|
1105
|
+
({ className: t, children: s, ...a }, n) => /* @__PURE__ */ e.jsx("select", { ref: n, className: q("form-input", t), ...a, children: s })
|
|
1009
1106
|
);
|
|
1010
|
-
|
|
1011
|
-
function
|
|
1012
|
-
return /* @__PURE__ */ e.jsx("div", { className:
|
|
1107
|
+
_e.displayName = "Select";
|
|
1108
|
+
function Kt({ children: t, className: s }) {
|
|
1109
|
+
return /* @__PURE__ */ e.jsx("div", { className: q("form-row", s), children: t });
|
|
1013
1110
|
}
|
|
1014
|
-
function
|
|
1015
|
-
return /* @__PURE__ */ e.jsx("table", { className:
|
|
1111
|
+
function B({ className: t, children: s, ...a }) {
|
|
1112
|
+
return /* @__PURE__ */ e.jsx("table", { className: q("table", t), ...a, children: s });
|
|
1016
1113
|
}
|
|
1017
|
-
function
|
|
1018
|
-
return /* @__PURE__ */ e.jsx("thead", { className:
|
|
1114
|
+
function fe({ className: t, children: s, ...a }) {
|
|
1115
|
+
return /* @__PURE__ */ e.jsx("thead", { className: t, ...a, children: s });
|
|
1019
1116
|
}
|
|
1020
|
-
function
|
|
1021
|
-
return /* @__PURE__ */ e.jsx("tbody", { className:
|
|
1117
|
+
function U({ className: t, children: s, ...a }) {
|
|
1118
|
+
return /* @__PURE__ */ e.jsx("tbody", { className: t, ...a, children: s });
|
|
1022
1119
|
}
|
|
1023
|
-
function j({ className:
|
|
1024
|
-
return /* @__PURE__ */ e.jsx("tr", { className:
|
|
1120
|
+
function j({ className: t, children: s, ...a }) {
|
|
1121
|
+
return /* @__PURE__ */ e.jsx("tr", { className: t, ...a, children: s });
|
|
1025
1122
|
}
|
|
1026
|
-
function
|
|
1027
|
-
return /* @__PURE__ */ e.jsx("th", { className:
|
|
1123
|
+
function w({ className: t, children: s, ...a }) {
|
|
1124
|
+
return /* @__PURE__ */ e.jsx("th", { className: t, ...a, children: s });
|
|
1028
1125
|
}
|
|
1029
|
-
function
|
|
1030
|
-
return /* @__PURE__ */ e.jsx("td", { className:
|
|
1126
|
+
function d({ className: t, children: s, ...a }) {
|
|
1127
|
+
return /* @__PURE__ */ e.jsx("td", { className: t, ...a, children: s });
|
|
1031
1128
|
}
|
|
1032
|
-
function
|
|
1033
|
-
const
|
|
1129
|
+
function Jt({ status: t }) {
|
|
1130
|
+
const s = {
|
|
1034
1131
|
FINISHED: "success",
|
|
1035
1132
|
FAILED: "danger",
|
|
1133
|
+
KILLED: "gray",
|
|
1036
1134
|
RUNNING: "warning",
|
|
1037
1135
|
UNKNOWN: "gray"
|
|
1038
|
-
}[
|
|
1039
|
-
return /* @__PURE__ */ e.jsx(
|
|
1040
|
-
}
|
|
1041
|
-
function
|
|
1042
|
-
const
|
|
1043
|
-
|
|
1136
|
+
}[t];
|
|
1137
|
+
return /* @__PURE__ */ e.jsx(re, { variant: s, children: t });
|
|
1138
|
+
}
|
|
1139
|
+
function Ys({ createdAt: t, endedAt: s, status: a }) {
|
|
1140
|
+
const n = !$e(a), [l, o] = T(Date.now());
|
|
1141
|
+
de(() => {
|
|
1142
|
+
if (!n) return;
|
|
1143
|
+
const h = setInterval(() => o(Date.now()), 1e3);
|
|
1144
|
+
return () => clearInterval(h);
|
|
1145
|
+
}, [n]);
|
|
1146
|
+
const i = Ut(t, n ? void 0 : s), u = n ? Math.max(0, Math.floor((l - new Date(t).getTime()) / 1e3)) : i;
|
|
1147
|
+
return /* @__PURE__ */ e.jsx("span", { className: n ? "tabular-nums" : void 0, children: Wt(u) });
|
|
1148
|
+
}
|
|
1149
|
+
function pt({ runs: t, onDelete: s, loading: a, emptyHint: n, baselineRunId: l }) {
|
|
1150
|
+
const [o, c] = T(null), i = () => {
|
|
1151
|
+
o && s && (s(o.run_id), c(null));
|
|
1044
1152
|
};
|
|
1045
|
-
return
|
|
1046
|
-
/* @__PURE__ */ e.jsxs(
|
|
1047
|
-
/* @__PURE__ */ e.jsx(
|
|
1048
|
-
/* @__PURE__ */ e.jsx(
|
|
1049
|
-
/* @__PURE__ */ e.jsx(
|
|
1050
|
-
/* @__PURE__ */ e.jsx(
|
|
1051
|
-
/* @__PURE__ */ e.jsx(
|
|
1052
|
-
/* @__PURE__ */ e.jsx(
|
|
1053
|
-
/* @__PURE__ */ e.jsx(
|
|
1153
|
+
return t.length ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1154
|
+
/* @__PURE__ */ e.jsxs(B, { children: [
|
|
1155
|
+
/* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1156
|
+
/* @__PURE__ */ e.jsx(w, { children: "Run ID" }),
|
|
1157
|
+
/* @__PURE__ */ e.jsx(w, { children: "Name" }),
|
|
1158
|
+
/* @__PURE__ */ e.jsx(w, { children: "Project" }),
|
|
1159
|
+
/* @__PURE__ */ e.jsx(w, { children: "Status" }),
|
|
1160
|
+
/* @__PURE__ */ e.jsx(w, { children: "Duration" }),
|
|
1161
|
+
/* @__PURE__ */ e.jsx(w, { children: "Created" }),
|
|
1162
|
+
/* @__PURE__ */ e.jsx(w, { children: "Actions" })
|
|
1054
1163
|
] }) }),
|
|
1055
|
-
/* @__PURE__ */ e.jsx(
|
|
1056
|
-
/* @__PURE__ */ e.jsxs(
|
|
1057
|
-
/* @__PURE__ */ e.jsx(
|
|
1058
|
-
|
|
1164
|
+
/* @__PURE__ */ e.jsx(U, { children: t.map((u) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1165
|
+
/* @__PURE__ */ e.jsxs(d, { children: [
|
|
1166
|
+
/* @__PURE__ */ e.jsx(se, { to: `/runs/${u.run_id}`, className: "font-mono", children: oe(u.run_id) }),
|
|
1167
|
+
u.run_id === l && /* @__PURE__ */ e.jsx(re, { variant: "info", className: "ml-2", children: "Baseline" })
|
|
1059
1168
|
] }),
|
|
1060
|
-
/* @__PURE__ */ e.jsx(
|
|
1061
|
-
/* @__PURE__ */ e.jsx(
|
|
1062
|
-
/* @__PURE__ */ e.jsx(
|
|
1063
|
-
/* @__PURE__ */ e.jsx(
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1169
|
+
/* @__PURE__ */ e.jsx(d, { children: u.run_name || "—" }),
|
|
1170
|
+
/* @__PURE__ */ e.jsx(d, { children: u.project }),
|
|
1171
|
+
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Jt, { status: u.status }) }),
|
|
1172
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: /* @__PURE__ */ e.jsx(
|
|
1173
|
+
Ys,
|
|
1174
|
+
{
|
|
1175
|
+
createdAt: u.created_at,
|
|
1176
|
+
endedAt: u.ended_at,
|
|
1177
|
+
status: u.status
|
|
1178
|
+
}
|
|
1179
|
+
) }),
|
|
1180
|
+
/* @__PURE__ */ e.jsx(d, { className: "text-muted", children: Ye(u.created_at) }),
|
|
1181
|
+
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
1182
|
+
/* @__PURE__ */ e.jsx(se, { to: `/runs/${u.run_id}`, children: /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", children: "View" }) }),
|
|
1183
|
+
s && /* @__PURE__ */ e.jsx(
|
|
1184
|
+
$,
|
|
1068
1185
|
{
|
|
1069
1186
|
variant: "ghost-danger",
|
|
1070
1187
|
size: "sm",
|
|
1071
|
-
onClick: () =>
|
|
1072
|
-
disabled:
|
|
1188
|
+
onClick: () => c(u),
|
|
1189
|
+
disabled: a,
|
|
1073
1190
|
children: "Delete"
|
|
1074
1191
|
}
|
|
1075
1192
|
)
|
|
1076
1193
|
] }) })
|
|
1077
|
-
] },
|
|
1194
|
+
] }, u.run_id)) })
|
|
1078
1195
|
] }),
|
|
1079
1196
|
/* @__PURE__ */ e.jsxs(
|
|
1080
|
-
|
|
1197
|
+
ft,
|
|
1081
1198
|
{
|
|
1082
1199
|
open: !!o,
|
|
1083
|
-
onClose: () =>
|
|
1200
|
+
onClose: () => c(null),
|
|
1084
1201
|
title: "Delete Run",
|
|
1085
1202
|
actions: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1086
|
-
/* @__PURE__ */ e.jsx(
|
|
1087
|
-
/* @__PURE__ */ e.jsxs(
|
|
1088
|
-
|
|
1203
|
+
/* @__PURE__ */ e.jsx($, { variant: "secondary", onClick: () => c(null), children: "Cancel" }),
|
|
1204
|
+
/* @__PURE__ */ e.jsxs($, { variant: "danger", onClick: i, disabled: a, children: [
|
|
1205
|
+
a && /* @__PURE__ */ e.jsx(G, {}),
|
|
1089
1206
|
"Delete"
|
|
1090
1207
|
] })
|
|
1091
1208
|
] }),
|
|
1092
1209
|
children: [
|
|
1093
1210
|
/* @__PURE__ */ e.jsx("p", { children: "Are you sure you want to delete this run?" }),
|
|
1094
|
-
o && /* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children:
|
|
1211
|
+
o && /* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children: oe(o.run_id) }),
|
|
1095
1212
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-danger mt-2", children: "This action cannot be undone." })
|
|
1096
1213
|
]
|
|
1097
1214
|
}
|
|
1098
1215
|
)
|
|
1099
1216
|
] }) : /* @__PURE__ */ e.jsx(
|
|
1100
|
-
|
|
1217
|
+
we,
|
|
1101
1218
|
{
|
|
1102
1219
|
message: "No runs found",
|
|
1103
|
-
hint:
|
|
1220
|
+
hint: n ?? "Try adjusting your filters"
|
|
1104
1221
|
}
|
|
1105
1222
|
);
|
|
1106
1223
|
}
|
|
1107
|
-
function
|
|
1108
|
-
const [
|
|
1109
|
-
project:
|
|
1110
|
-
status:
|
|
1111
|
-
q:
|
|
1112
|
-
limit: parseInt(
|
|
1113
|
-
}), { data:
|
|
1114
|
-
|
|
1115
|
-
if (
|
|
1116
|
-
const
|
|
1117
|
-
return () => clearTimeout(
|
|
1118
|
-
}
|
|
1119
|
-
}, [
|
|
1120
|
-
const
|
|
1121
|
-
i((
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1124
|
-
}, [
|
|
1224
|
+
function Hs() {
|
|
1225
|
+
const [t, s] = He(), { api: a } = K(), { data: n } = Ke(), [l, o] = T(null), [c, i] = T({
|
|
1226
|
+
project: t.get("project") || "",
|
|
1227
|
+
status: t.get("status") || "",
|
|
1228
|
+
q: t.get("q") || "",
|
|
1229
|
+
limit: parseInt(t.get("limit") || "25", 10)
|
|
1230
|
+
}), { data: u, loading: h, refetch: m } = zt(c), p = Fe((g) => a.deleteRun(g));
|
|
1231
|
+
de(() => {
|
|
1232
|
+
if (l) {
|
|
1233
|
+
const g = setTimeout(() => o(null), 3e3);
|
|
1234
|
+
return () => clearTimeout(g);
|
|
1235
|
+
}
|
|
1236
|
+
}, [l]);
|
|
1237
|
+
const b = me((g, I) => {
|
|
1238
|
+
i((A) => ({ ...A, [g]: I }));
|
|
1239
|
+
const E = new URLSearchParams(t);
|
|
1240
|
+
I ? E.set(g, String(I)) : E.delete(g), s(E, { replace: !0 });
|
|
1241
|
+
}, [t, s]), D = me(async (g) => {
|
|
1125
1242
|
try {
|
|
1126
|
-
await p.mutate(
|
|
1243
|
+
await p.mutate(g), o({ message: "Run deleted", variant: "success" }), m();
|
|
1127
1244
|
} catch {
|
|
1128
1245
|
o({ message: "Failed to delete run", variant: "error" });
|
|
1129
1246
|
}
|
|
1130
1247
|
}, [p, m]);
|
|
1131
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1132
|
-
/* @__PURE__ */ e.jsx(
|
|
1133
|
-
/* @__PURE__ */ e.jsx(
|
|
1134
|
-
/* @__PURE__ */ e.jsxs(
|
|
1135
|
-
/* @__PURE__ */ e.jsx(
|
|
1248
|
+
return /* @__PURE__ */ e.jsxs(Q, { children: [
|
|
1249
|
+
/* @__PURE__ */ e.jsx(Oe, { title: "Runs" }),
|
|
1250
|
+
/* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsxs(Kt, { children: [
|
|
1251
|
+
/* @__PURE__ */ e.jsxs(xe, { children: [
|
|
1252
|
+
/* @__PURE__ */ e.jsx(ve, { htmlFor: "project", children: "Project" }),
|
|
1136
1253
|
/* @__PURE__ */ e.jsxs(
|
|
1137
|
-
|
|
1254
|
+
_e,
|
|
1138
1255
|
{
|
|
1139
1256
|
id: "project",
|
|
1140
|
-
value:
|
|
1141
|
-
onChange: (
|
|
1257
|
+
value: c.project,
|
|
1258
|
+
onChange: (g) => b("project", g.target.value),
|
|
1142
1259
|
children: [
|
|
1143
1260
|
/* @__PURE__ */ e.jsx("option", { value: "", children: "All projects" }),
|
|
1144
|
-
|
|
1261
|
+
n?.map((g) => /* @__PURE__ */ e.jsx("option", { value: g.name, children: g.name }, g.name))
|
|
1145
1262
|
]
|
|
1146
1263
|
}
|
|
1147
1264
|
)
|
|
1148
1265
|
] }),
|
|
1149
|
-
/* @__PURE__ */ e.jsxs(
|
|
1150
|
-
/* @__PURE__ */ e.jsx(
|
|
1266
|
+
/* @__PURE__ */ e.jsxs(xe, { children: [
|
|
1267
|
+
/* @__PURE__ */ e.jsx(ve, { htmlFor: "status", children: "Status" }),
|
|
1151
1268
|
/* @__PURE__ */ e.jsxs(
|
|
1152
|
-
|
|
1269
|
+
_e,
|
|
1153
1270
|
{
|
|
1154
1271
|
id: "status",
|
|
1155
|
-
value:
|
|
1156
|
-
onChange: (
|
|
1272
|
+
value: c.status,
|
|
1273
|
+
onChange: (g) => b("status", g.target.value),
|
|
1157
1274
|
children: [
|
|
1158
1275
|
/* @__PURE__ */ e.jsx("option", { value: "", children: "All" }),
|
|
1159
1276
|
/* @__PURE__ */ e.jsx("option", { value: "FINISHED", children: "Finished" }),
|
|
@@ -1163,26 +1280,26 @@ function Tr() {
|
|
|
1163
1280
|
}
|
|
1164
1281
|
)
|
|
1165
1282
|
] }),
|
|
1166
|
-
/* @__PURE__ */ e.jsxs(
|
|
1167
|
-
/* @__PURE__ */ e.jsx(
|
|
1283
|
+
/* @__PURE__ */ e.jsxs(xe, { children: [
|
|
1284
|
+
/* @__PURE__ */ e.jsx(ve, { htmlFor: "q", children: "Query" }),
|
|
1168
1285
|
/* @__PURE__ */ e.jsx(
|
|
1169
|
-
|
|
1286
|
+
jt,
|
|
1170
1287
|
{
|
|
1171
1288
|
id: "q",
|
|
1172
|
-
value:
|
|
1173
|
-
onChange: (
|
|
1289
|
+
value: c.q,
|
|
1290
|
+
onChange: (g) => b("q", g.target.value),
|
|
1174
1291
|
placeholder: "metric.fidelity > 0.9"
|
|
1175
1292
|
}
|
|
1176
1293
|
)
|
|
1177
1294
|
] }),
|
|
1178
|
-
/* @__PURE__ */ e.jsxs(
|
|
1179
|
-
/* @__PURE__ */ e.jsx(
|
|
1295
|
+
/* @__PURE__ */ e.jsxs(xe, { children: [
|
|
1296
|
+
/* @__PURE__ */ e.jsx(ve, { htmlFor: "limit", children: "Limit" }),
|
|
1180
1297
|
/* @__PURE__ */ e.jsxs(
|
|
1181
|
-
|
|
1298
|
+
_e,
|
|
1182
1299
|
{
|
|
1183
1300
|
id: "limit",
|
|
1184
|
-
value:
|
|
1185
|
-
onChange: (
|
|
1301
|
+
value: c.limit,
|
|
1302
|
+
onChange: (g) => b("limit", parseInt(g.target.value, 10)),
|
|
1186
1303
|
children: [
|
|
1187
1304
|
/* @__PURE__ */ e.jsx("option", { value: "25", children: "25" }),
|
|
1188
1305
|
/* @__PURE__ */ e.jsx("option", { value: "50", children: "50" }),
|
|
@@ -1191,196 +1308,187 @@ function Tr() {
|
|
|
1191
1308
|
}
|
|
1192
1309
|
)
|
|
1193
1310
|
] }),
|
|
1194
|
-
/* @__PURE__ */ e.jsxs(
|
|
1195
|
-
/* @__PURE__ */ e.jsx(
|
|
1196
|
-
h && /* @__PURE__ */ e.jsx(
|
|
1311
|
+
/* @__PURE__ */ e.jsxs(xe, { className: "flex items-end gap-2", children: [
|
|
1312
|
+
/* @__PURE__ */ e.jsx($, { variant: "primary", onClick: () => m(), children: "Filter" }),
|
|
1313
|
+
h && /* @__PURE__ */ e.jsx(G, {})
|
|
1197
1314
|
] })
|
|
1198
1315
|
] }) }),
|
|
1199
|
-
/* @__PURE__ */ e.jsx(
|
|
1200
|
-
|
|
1316
|
+
/* @__PURE__ */ e.jsx(N, { children: h && !u ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(G, {}) }) : /* @__PURE__ */ e.jsx(
|
|
1317
|
+
pt,
|
|
1201
1318
|
{
|
|
1202
|
-
runs:
|
|
1203
|
-
onDelete:
|
|
1319
|
+
runs: u?.runs ?? [],
|
|
1320
|
+
onDelete: D,
|
|
1204
1321
|
loading: p.loading,
|
|
1205
|
-
baselineRunId:
|
|
1322
|
+
baselineRunId: c.project ? n?.find((g) => g.name === c.project)?.baseline?.run_id : void 0
|
|
1206
1323
|
}
|
|
1207
1324
|
) }),
|
|
1208
|
-
|
|
1209
|
-
|
|
1325
|
+
l && /* @__PURE__ */ e.jsx(
|
|
1326
|
+
Me,
|
|
1210
1327
|
{
|
|
1211
|
-
message:
|
|
1212
|
-
variant:
|
|
1213
|
-
visible: !!
|
|
1328
|
+
message: l.message,
|
|
1329
|
+
variant: l.variant,
|
|
1330
|
+
visible: !!l,
|
|
1214
1331
|
onClose: () => o(null)
|
|
1215
1332
|
}
|
|
1216
1333
|
)
|
|
1217
1334
|
] });
|
|
1218
1335
|
}
|
|
1219
|
-
function
|
|
1220
|
-
if (!
|
|
1336
|
+
function Ks({ projects: t, currentWorkspace: s }) {
|
|
1337
|
+
if (!t.length)
|
|
1221
1338
|
return /* @__PURE__ */ e.jsx(
|
|
1222
|
-
|
|
1339
|
+
we,
|
|
1223
1340
|
{
|
|
1224
1341
|
message: "No projects yet",
|
|
1225
1342
|
hint: "Projects are created automatically when you log runs"
|
|
1226
1343
|
}
|
|
1227
1344
|
);
|
|
1228
|
-
const
|
|
1229
|
-
const
|
|
1230
|
-
return
|
|
1345
|
+
const a = (n) => {
|
|
1346
|
+
const l = new URLSearchParams({ project: n });
|
|
1347
|
+
return s && l.set("workspace", s.id), `/runs?${l}`;
|
|
1231
1348
|
};
|
|
1232
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1233
|
-
/* @__PURE__ */ e.jsx(
|
|
1234
|
-
/* @__PURE__ */ e.jsx(
|
|
1235
|
-
/* @__PURE__ */ e.jsx(
|
|
1236
|
-
/* @__PURE__ */ e.jsx(
|
|
1237
|
-
/* @__PURE__ */ e.jsx(
|
|
1349
|
+
return /* @__PURE__ */ e.jsxs(B, { children: [
|
|
1350
|
+
/* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1351
|
+
/* @__PURE__ */ e.jsx(w, { children: "Project" }),
|
|
1352
|
+
/* @__PURE__ */ e.jsx(w, { children: "Runs" }),
|
|
1353
|
+
/* @__PURE__ */ e.jsx(w, { children: "Baseline" }),
|
|
1354
|
+
/* @__PURE__ */ e.jsx(w, {})
|
|
1238
1355
|
] }) }),
|
|
1239
|
-
/* @__PURE__ */ e.jsx(
|
|
1240
|
-
/* @__PURE__ */ e.jsxs(
|
|
1241
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children:
|
|
1242
|
-
|
|
1356
|
+
/* @__PURE__ */ e.jsx(U, { children: t.map((n) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1357
|
+
/* @__PURE__ */ e.jsxs(d, { children: [
|
|
1358
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children: n.name }),
|
|
1359
|
+
n.description && /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm", children: Os(n.description) })
|
|
1243
1360
|
] }),
|
|
1244
|
-
/* @__PURE__ */ e.jsx(
|
|
1245
|
-
/* @__PURE__ */ e.jsx(
|
|
1246
|
-
/* @__PURE__ */ e.jsx(
|
|
1247
|
-
|
|
1361
|
+
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(re, { variant: "gray", children: n.run_count ?? 0 }) }),
|
|
1362
|
+
/* @__PURE__ */ e.jsx(d, { children: n.baseline ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1363
|
+
/* @__PURE__ */ e.jsx(se, { to: `/runs/${n.baseline.run_id}`, className: "font-mono text-sm", children: oe(n.baseline.run_id) }),
|
|
1364
|
+
n.baseline.run_name && /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm", children: n.baseline.run_name })
|
|
1248
1365
|
] }) : /* @__PURE__ */ e.jsx("span", { className: "text-muted", children: "—" }) }),
|
|
1249
|
-
/* @__PURE__ */ e.jsx(
|
|
1250
|
-
] },
|
|
1366
|
+
/* @__PURE__ */ e.jsx(d, { className: "text-right", children: /* @__PURE__ */ e.jsx(se, { to: a(n.name), children: /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", children: "View Runs" }) }) })
|
|
1367
|
+
] }, n.name)) })
|
|
1251
1368
|
] });
|
|
1252
1369
|
}
|
|
1253
|
-
function
|
|
1254
|
-
return
|
|
1255
|
-
/* @__PURE__ */ e.jsx(
|
|
1256
|
-
/* @__PURE__ */ e.jsx(
|
|
1257
|
-
/* @__PURE__ */ e.jsx(
|
|
1258
|
-
/* @__PURE__ */ e.jsx(
|
|
1259
|
-
/* @__PURE__ */ e.jsx(
|
|
1260
|
-
/* @__PURE__ */ e.jsx(
|
|
1370
|
+
function Js({ groups: t }) {
|
|
1371
|
+
return t.length ? /* @__PURE__ */ e.jsxs(B, { children: [
|
|
1372
|
+
/* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1373
|
+
/* @__PURE__ */ e.jsx(w, { children: "Group ID" }),
|
|
1374
|
+
/* @__PURE__ */ e.jsx(w, { children: "Name" }),
|
|
1375
|
+
/* @__PURE__ */ e.jsx(w, { children: "Project" }),
|
|
1376
|
+
/* @__PURE__ */ e.jsx(w, { children: "Runs" }),
|
|
1377
|
+
/* @__PURE__ */ e.jsx(w, { children: "Actions" })
|
|
1261
1378
|
] }) }),
|
|
1262
|
-
/* @__PURE__ */ e.jsx(
|
|
1263
|
-
/* @__PURE__ */ e.jsx(
|
|
1264
|
-
/* @__PURE__ */ e.jsx(
|
|
1265
|
-
/* @__PURE__ */ e.jsx(
|
|
1266
|
-
/* @__PURE__ */ e.jsx(
|
|
1267
|
-
/* @__PURE__ */ e.jsx(
|
|
1268
|
-
] },
|
|
1379
|
+
/* @__PURE__ */ e.jsx(U, { children: t.map((s) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1380
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: oe(s.group_id) }),
|
|
1381
|
+
/* @__PURE__ */ e.jsx(d, { children: s.group_name || "—" }),
|
|
1382
|
+
/* @__PURE__ */ e.jsx(d, { children: s.project }),
|
|
1383
|
+
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(re, { variant: "gray", children: s.run_count }) }),
|
|
1384
|
+
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(se, { to: `/groups/${s.group_id}`, children: /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", children: "View Runs" }) }) })
|
|
1385
|
+
] }, s.group_id)) })
|
|
1269
1386
|
] }) : /* @__PURE__ */ e.jsx(
|
|
1270
|
-
|
|
1387
|
+
we,
|
|
1271
1388
|
{
|
|
1272
1389
|
message: "No groups found",
|
|
1273
1390
|
hint: "Groups are created when runs have a group_id set"
|
|
1274
1391
|
}
|
|
1275
1392
|
);
|
|
1276
1393
|
}
|
|
1277
|
-
function
|
|
1278
|
-
runId:
|
|
1279
|
-
runName:
|
|
1280
|
-
variant:
|
|
1281
|
-
size:
|
|
1282
|
-
className:
|
|
1283
|
-
apiBaseUrl: o = ""
|
|
1394
|
+
function Xs({
|
|
1395
|
+
runId: t,
|
|
1396
|
+
runName: s,
|
|
1397
|
+
variant: a = "secondary",
|
|
1398
|
+
size: n = "sm",
|
|
1399
|
+
className: l = ""
|
|
1284
1400
|
}) {
|
|
1285
|
-
const [
|
|
1401
|
+
const { api: o } = K(), [c, i] = T({ status: "idle" }), [u, h] = T(!1), [m, p] = T(null), b = async () => {
|
|
1286
1402
|
i({ status: "preparing", message: "Preparing bundle..." }), h(!0);
|
|
1287
1403
|
try {
|
|
1288
|
-
const
|
|
1289
|
-
method: "POST",
|
|
1290
|
-
headers: { "Content-Type": "application/json" }
|
|
1291
|
-
});
|
|
1292
|
-
if (!k.ok) {
|
|
1293
|
-
const ne = await k.json().catch(() => ({ detail: "Export failed" }));
|
|
1294
|
-
throw new Error(ne.detail || `Export failed: ${k.statusText}`);
|
|
1295
|
-
}
|
|
1296
|
-
const O = await k.json();
|
|
1404
|
+
const E = await o.createExport(t);
|
|
1297
1405
|
i({
|
|
1298
1406
|
status: "packing",
|
|
1299
1407
|
message: "Creating bundle...",
|
|
1300
|
-
artifactCount:
|
|
1301
|
-
objectCount:
|
|
1302
|
-
}), i((
|
|
1303
|
-
...
|
|
1408
|
+
artifactCount: E.artifact_count,
|
|
1409
|
+
objectCount: E.object_count
|
|
1410
|
+
}), i((y) => ({
|
|
1411
|
+
...y,
|
|
1304
1412
|
status: "downloading",
|
|
1305
1413
|
message: "Downloading bundle..."
|
|
1306
1414
|
}));
|
|
1307
|
-
const S = await fetch(
|
|
1415
|
+
const A = o.getExportDownloadUrl(t), S = await fetch(A, {
|
|
1416
|
+
credentials: "same-origin"
|
|
1417
|
+
});
|
|
1308
1418
|
if (!S.ok)
|
|
1309
1419
|
throw new Error("Download failed");
|
|
1310
|
-
const
|
|
1311
|
-
|
|
1420
|
+
const ie = await S.blob(), ce = s ? `${s.replace(/[^a-zA-Z0-9_-]/g, "_")}_${t.slice(0, 8)}.zip` : `run_${t.slice(0, 8)}.zip`, Z = URL.createObjectURL(ie), J = document.createElement("a");
|
|
1421
|
+
J.href = Z, J.download = ce, document.body.appendChild(J), J.click(), document.body.removeChild(J), URL.revokeObjectURL(Z), i({
|
|
1312
1422
|
status: "complete",
|
|
1313
1423
|
message: "Export complete!",
|
|
1314
|
-
bundleSize:
|
|
1315
|
-
artifactCount:
|
|
1316
|
-
objectCount:
|
|
1317
|
-
})
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
}
|
|
1324
|
-
},
|
|
1325
|
-
d.status !== "preparing" && d.status !== "packing" && d.status !== "downloading" && (h(!1), i({ status: "idle" }));
|
|
1326
|
-
}, w = (k) => k < 1024 ? `${k} B` : k < 1024 * 1024 ? `${(k / 1024).toFixed(1)} KB` : `${(k / (1024 * 1024)).toFixed(1)} MB`, H = ["preparing", "packing", "downloading"].includes(d.status);
|
|
1424
|
+
bundleSize: ie.size,
|
|
1425
|
+
artifactCount: E.artifact_count,
|
|
1426
|
+
objectCount: E.object_count
|
|
1427
|
+
});
|
|
1428
|
+
} catch (E) {
|
|
1429
|
+
const A = E instanceof Error ? E.message : "Export failed";
|
|
1430
|
+
i({ status: "error", message: A }), p({ message: A, variant: "error" });
|
|
1431
|
+
}
|
|
1432
|
+
}, D = () => {
|
|
1433
|
+
c.status !== "preparing" && c.status !== "packing" && c.status !== "downloading" && (h(!1), i({ status: "idle" }));
|
|
1434
|
+
}, g = (E) => E < 1024 ? `${E} B` : E < 1024 * 1024 ? `${(E / 1024).toFixed(1)} KB` : `${(E / (1024 * 1024)).toFixed(1)} MB`, I = ["preparing", "packing", "downloading"].includes(c.status);
|
|
1327
1435
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1328
1436
|
/* @__PURE__ */ e.jsxs(
|
|
1329
|
-
|
|
1437
|
+
$,
|
|
1330
1438
|
{
|
|
1331
|
-
variant:
|
|
1332
|
-
size:
|
|
1333
|
-
onClick:
|
|
1334
|
-
disabled:
|
|
1335
|
-
className:
|
|
1439
|
+
variant: a,
|
|
1440
|
+
size: n,
|
|
1441
|
+
onClick: b,
|
|
1442
|
+
disabled: I,
|
|
1443
|
+
className: l,
|
|
1336
1444
|
children: [
|
|
1337
|
-
|
|
1338
|
-
/* @__PURE__ */ e.jsx(
|
|
1445
|
+
I && /* @__PURE__ */ e.jsx(G, {}),
|
|
1446
|
+
/* @__PURE__ */ e.jsx(Qs, {}),
|
|
1339
1447
|
"Export"
|
|
1340
1448
|
]
|
|
1341
1449
|
}
|
|
1342
1450
|
),
|
|
1343
1451
|
/* @__PURE__ */ e.jsx(
|
|
1344
|
-
|
|
1452
|
+
ft,
|
|
1345
1453
|
{
|
|
1346
|
-
open:
|
|
1347
|
-
onClose:
|
|
1454
|
+
open: u,
|
|
1455
|
+
onClose: D,
|
|
1348
1456
|
title: "Export Run",
|
|
1349
|
-
actions:
|
|
1457
|
+
actions: c.status === "error" || c.status === "complete" ? /* @__PURE__ */ e.jsx($, { variant: "secondary", onClick: D, children: "Close" }) : void 0,
|
|
1350
1458
|
children: /* @__PURE__ */ e.jsxs("div", { className: "py-4", children: [
|
|
1351
1459
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
1352
|
-
|
|
1460
|
+
c.status === "error" ? /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-danger-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(er, {}) }) : c.status === "complete" ? /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-success-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(Zs, {}) }) : /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-primary-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(G, {}) }),
|
|
1353
1461
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1354
|
-
/* @__PURE__ */ e.jsx("p", { className: "font-medium", children:
|
|
1355
|
-
|
|
1462
|
+
/* @__PURE__ */ e.jsx("p", { className: "font-medium", children: c.message }),
|
|
1463
|
+
c.status === "error" && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-[var(--dq-text-muted)]", children: "Please try again or contact support." })
|
|
1356
1464
|
] })
|
|
1357
1465
|
] }),
|
|
1358
|
-
(
|
|
1359
|
-
|
|
1360
|
-
|
|
1466
|
+
(c.artifactCount !== void 0 || c.objectCount !== void 0 || c.bundleSize !== void 0) && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap gap-2 mt-4", children: [
|
|
1467
|
+
c.artifactCount !== void 0 && /* @__PURE__ */ e.jsxs(re, { variant: "gray", children: [
|
|
1468
|
+
c.artifactCount,
|
|
1361
1469
|
" artifacts"
|
|
1362
1470
|
] }),
|
|
1363
|
-
|
|
1364
|
-
|
|
1471
|
+
c.objectCount !== void 0 && /* @__PURE__ */ e.jsxs(re, { variant: "gray", children: [
|
|
1472
|
+
c.objectCount,
|
|
1365
1473
|
" objects"
|
|
1366
1474
|
] }),
|
|
1367
|
-
|
|
1475
|
+
c.bundleSize !== void 0 && /* @__PURE__ */ e.jsx(re, { variant: "info", children: g(c.bundleSize) })
|
|
1368
1476
|
] }),
|
|
1369
1477
|
/* @__PURE__ */ e.jsxs("div", { className: "mt-4 pt-4 border-t border-[var(--dq-border-light)]", children: [
|
|
1370
1478
|
/* @__PURE__ */ e.jsxs("p", { className: "text-sm text-[var(--dq-text-muted)]", children: [
|
|
1371
1479
|
"Run ID: ",
|
|
1372
|
-
/* @__PURE__ */ e.jsx("code", { className: "text-xs", children:
|
|
1480
|
+
/* @__PURE__ */ e.jsx("code", { className: "text-xs", children: t })
|
|
1373
1481
|
] }),
|
|
1374
|
-
|
|
1482
|
+
s && /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-[var(--dq-text-muted)]", children: [
|
|
1375
1483
|
"Name: ",
|
|
1376
|
-
|
|
1484
|
+
s
|
|
1377
1485
|
] })
|
|
1378
1486
|
] })
|
|
1379
1487
|
] })
|
|
1380
1488
|
}
|
|
1381
1489
|
),
|
|
1382
1490
|
m && /* @__PURE__ */ e.jsx(
|
|
1383
|
-
|
|
1491
|
+
Me,
|
|
1384
1492
|
{
|
|
1385
1493
|
message: m.message,
|
|
1386
1494
|
variant: m.variant,
|
|
@@ -1390,7 +1498,7 @@ function Fr({
|
|
|
1390
1498
|
)
|
|
1391
1499
|
] });
|
|
1392
1500
|
}
|
|
1393
|
-
function
|
|
1501
|
+
function Qs() {
|
|
1394
1502
|
return /* @__PURE__ */ e.jsxs(
|
|
1395
1503
|
"svg",
|
|
1396
1504
|
{
|
|
@@ -1410,7 +1518,7 @@ function Or() {
|
|
|
1410
1518
|
}
|
|
1411
1519
|
);
|
|
1412
1520
|
}
|
|
1413
|
-
function
|
|
1521
|
+
function Zs() {
|
|
1414
1522
|
return /* @__PURE__ */ e.jsx(
|
|
1415
1523
|
"svg",
|
|
1416
1524
|
{
|
|
@@ -1426,7 +1534,7 @@ function $r() {
|
|
|
1426
1534
|
}
|
|
1427
1535
|
);
|
|
1428
1536
|
}
|
|
1429
|
-
function
|
|
1537
|
+
function er() {
|
|
1430
1538
|
return /* @__PURE__ */ e.jsxs(
|
|
1431
1539
|
"svg",
|
|
1432
1540
|
{
|
|
@@ -1446,403 +1554,736 @@ function Lr() {
|
|
|
1446
1554
|
}
|
|
1447
1555
|
);
|
|
1448
1556
|
}
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
),
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
if (
|
|
1463
|
-
|
|
1464
|
-
|
|
1557
|
+
const F = { top: 12, right: 16, bottom: 28, left: 56 }, at = 210, Mt = 5, Lt = [
|
|
1558
|
+
"var(--dq-primary)",
|
|
1559
|
+
"var(--dq-info)",
|
|
1560
|
+
"var(--dq-warning)",
|
|
1561
|
+
"var(--dq-danger)",
|
|
1562
|
+
"#8B5CF6",
|
|
1563
|
+
"#EC4899"
|
|
1564
|
+
];
|
|
1565
|
+
function tr(t, s) {
|
|
1566
|
+
const a = t / s, n = Math.pow(10, Math.floor(Math.log10(a))), l = a / n;
|
|
1567
|
+
return (l < 1.5 ? 1 : l < 3 ? 2 : l < 7 ? 5 : 10) * n;
|
|
1568
|
+
}
|
|
1569
|
+
function qt(t, s, a) {
|
|
1570
|
+
if (t === s) return [t];
|
|
1571
|
+
const n = tr(s - t, a), l = Math.floor(t / n) * n, o = [];
|
|
1572
|
+
for (let c = l; c <= s + n * 0.01; c += n)
|
|
1573
|
+
o.push(c);
|
|
1574
|
+
return o;
|
|
1575
|
+
}
|
|
1576
|
+
function sr(t) {
|
|
1577
|
+
const s = Math.abs(t);
|
|
1578
|
+
return s === 0 ? "0" : s >= 1e6 ? (t / 1e6).toFixed(1) + "M" : s >= 1e3 ? (t / 1e3).toFixed(1) + "k" : s >= 1 ? t.toFixed(s >= 100 ? 0 : s >= 10 ? 1 : 2) : t.toPrecision(3);
|
|
1579
|
+
}
|
|
1580
|
+
function rr(t, s) {
|
|
1581
|
+
if (t.length <= s) return t;
|
|
1582
|
+
const a = t.length / s, n = [t[0]];
|
|
1583
|
+
for (let l = 1; l < s - 1; l++) {
|
|
1584
|
+
const o = Math.floor(l * a), c = Math.min(Math.floor((l + 1) * a), t.length);
|
|
1585
|
+
let i = t[o], u = t[o];
|
|
1586
|
+
for (let h = o; h < c; h++)
|
|
1587
|
+
t[h].value < i.value && (i = t[h]), t[h].value > u.value && (u = t[h]);
|
|
1588
|
+
i.step <= u.step ? (n.push(i), i !== u && n.push(u)) : (n.push(u), i !== u && n.push(i));
|
|
1589
|
+
}
|
|
1590
|
+
return n.push(t[t.length - 1]), n;
|
|
1591
|
+
}
|
|
1592
|
+
function nr(t) {
|
|
1593
|
+
const [s, a] = T(0);
|
|
1594
|
+
return de(() => {
|
|
1595
|
+
const n = t.current;
|
|
1596
|
+
if (!n) return;
|
|
1597
|
+
const l = new ResizeObserver((o) => {
|
|
1598
|
+
const c = o[0]?.contentRect.width;
|
|
1599
|
+
c && c > 0 && a(Math.floor(c));
|
|
1600
|
+
});
|
|
1601
|
+
return l.observe(n), a(Math.floor(n.getBoundingClientRect().width) || 0), () => l.disconnect();
|
|
1602
|
+
}, [t]), s;
|
|
1603
|
+
}
|
|
1604
|
+
function ar({ x: t, y: s, value: a, step: n, chartWidth: l }) {
|
|
1605
|
+
const c = `${a} step ${n}`.length * 6.2 + 16, i = 22, u = 8;
|
|
1606
|
+
let h = s - i - u;
|
|
1607
|
+
h < 2 && (h = s + u + 4);
|
|
1608
|
+
let m = t - c / 2;
|
|
1609
|
+
return m = Math.max(F.left, Math.min(m, l - F.right - c)), /* @__PURE__ */ e.jsxs("g", { pointerEvents: "none", children: [
|
|
1610
|
+
/* @__PURE__ */ e.jsx(
|
|
1611
|
+
"rect",
|
|
1612
|
+
{
|
|
1613
|
+
x: m,
|
|
1614
|
+
y: h,
|
|
1615
|
+
width: c,
|
|
1616
|
+
height: i,
|
|
1617
|
+
rx: 4,
|
|
1618
|
+
fill: "var(--dq-bg-primary)",
|
|
1619
|
+
stroke: "var(--dq-border-color)",
|
|
1620
|
+
strokeWidth: 1
|
|
1621
|
+
}
|
|
1622
|
+
),
|
|
1623
|
+
/* @__PURE__ */ e.jsxs(
|
|
1624
|
+
"text",
|
|
1625
|
+
{
|
|
1626
|
+
x: m + 8,
|
|
1627
|
+
y: h + i / 2,
|
|
1628
|
+
dominantBaseline: "central",
|
|
1629
|
+
fontSize: 11,
|
|
1630
|
+
className: "fill-[var(--dq-text-primary)]",
|
|
1631
|
+
fontFamily: "ui-monospace, monospace",
|
|
1632
|
+
children: [
|
|
1633
|
+
/* @__PURE__ */ e.jsx("tspan", { children: a }),
|
|
1634
|
+
/* @__PURE__ */ e.jsxs("tspan", { dx: 8, className: "fill-[var(--dq-text-muted)]", children: [
|
|
1635
|
+
"step ",
|
|
1636
|
+
n
|
|
1637
|
+
] })
|
|
1638
|
+
]
|
|
1639
|
+
}
|
|
1640
|
+
)
|
|
1641
|
+
] });
|
|
1642
|
+
}
|
|
1643
|
+
function ir({ metricKey: t, points: s, color: a }) {
|
|
1644
|
+
const n = De(null), l = De(null), o = nr(n), [c, i] = T(null), u = ke(
|
|
1645
|
+
() => [...s].sort((y, W) => y.step - W.step),
|
|
1646
|
+
[s]
|
|
1647
|
+
), h = o - F.left - F.right, m = at - F.top - F.bottom, p = ke(
|
|
1648
|
+
() => h > 0 ? rr(u, h) : u,
|
|
1649
|
+
[u, h]
|
|
1650
|
+
), { xMin: b, xMax: D, yMin: g, yMax: I } = ke(() => {
|
|
1651
|
+
let y = 1 / 0, W = -1 / 0;
|
|
1652
|
+
for (const V of u)
|
|
1653
|
+
V.value < y && (y = V.value), V.value > W && (W = V.value);
|
|
1654
|
+
const ue = (W - y) * 0.05 || 0.1;
|
|
1655
|
+
return {
|
|
1656
|
+
xMin: u[0]?.step ?? 0,
|
|
1657
|
+
xMax: u[u.length - 1]?.step ?? 1,
|
|
1658
|
+
yMin: y - ue,
|
|
1659
|
+
yMax: W + ue
|
|
1660
|
+
};
|
|
1661
|
+
}, [u]), E = me(
|
|
1662
|
+
(y) => F.left + (y - b) / (D - b || 1) * h,
|
|
1663
|
+
[b, D, h]
|
|
1664
|
+
), A = me(
|
|
1665
|
+
(y) => F.top + m - (y - g) / (I - g || 1) * m,
|
|
1666
|
+
[g, I, m]
|
|
1667
|
+
), S = ke(
|
|
1668
|
+
() => p.map((y, W) => `${W === 0 ? "M" : "L"}${E(y.step).toFixed(1)},${A(y.value).toFixed(1)}`).join(" "),
|
|
1669
|
+
[p, E, A]
|
|
1670
|
+
), ie = ke(() => qt(g, I, Mt), [g, I]), ce = ke(() => qt(b, D, Mt).map(Math.round), [b, D]), Z = me(
|
|
1671
|
+
(y) => {
|
|
1672
|
+
const W = l.current?.getBoundingClientRect();
|
|
1673
|
+
if (!W || !u.length) return;
|
|
1674
|
+
const ue = y.clientX - W.left, V = b + (ue - F.left) / h * (D - b);
|
|
1675
|
+
let ee = 0, je = u.length - 1;
|
|
1676
|
+
for (; ee < je; ) {
|
|
1677
|
+
const le = ee + je >> 1;
|
|
1678
|
+
u[le].step < V ? ee = le + 1 : je = le;
|
|
1679
|
+
}
|
|
1680
|
+
const ne = ee > 0 && Math.abs(u[ee - 1].step - V) < Math.abs(u[ee].step - V) ? ee - 1 : ee, te = u[ne];
|
|
1681
|
+
i({ x: E(te.step), y: A(te.value), pt: te });
|
|
1682
|
+
},
|
|
1683
|
+
[u, b, D, h, E, A]
|
|
1684
|
+
), J = u[u.length - 1];
|
|
1685
|
+
return o < 100 ? /* @__PURE__ */ e.jsx("div", { ref: n, className: "metric-chart" }) : /* @__PURE__ */ e.jsxs("div", { ref: n, className: "metric-chart", children: [
|
|
1686
|
+
/* @__PURE__ */ e.jsxs("div", { className: "metric-chart-header", children: [
|
|
1687
|
+
/* @__PURE__ */ e.jsx("span", { className: "metric-chart-label", style: { color: a }, children: t }),
|
|
1688
|
+
J && /* @__PURE__ */ e.jsxs("span", { className: "metric-chart-latest", children: [
|
|
1689
|
+
"latest: ",
|
|
1690
|
+
lt(J.value),
|
|
1691
|
+
" @ step ",
|
|
1692
|
+
J.step
|
|
1693
|
+
] })
|
|
1694
|
+
] }),
|
|
1695
|
+
/* @__PURE__ */ e.jsxs(
|
|
1696
|
+
"svg",
|
|
1697
|
+
{
|
|
1698
|
+
ref: l,
|
|
1699
|
+
width: o,
|
|
1700
|
+
height: at,
|
|
1701
|
+
className: "metric-chart-svg",
|
|
1702
|
+
onMouseMove: Z,
|
|
1703
|
+
onMouseLeave: () => i(null),
|
|
1704
|
+
children: [
|
|
1705
|
+
ie.map((y) => /* @__PURE__ */ e.jsx(
|
|
1706
|
+
"line",
|
|
1707
|
+
{
|
|
1708
|
+
x1: F.left,
|
|
1709
|
+
x2: o - F.right,
|
|
1710
|
+
y1: A(y),
|
|
1711
|
+
y2: A(y),
|
|
1712
|
+
stroke: "var(--dq-border-color)",
|
|
1713
|
+
strokeWidth: 0.5,
|
|
1714
|
+
strokeDasharray: "3,3"
|
|
1715
|
+
},
|
|
1716
|
+
`gy-${y}`
|
|
1717
|
+
)),
|
|
1718
|
+
ce.map((y) => /* @__PURE__ */ e.jsx(
|
|
1719
|
+
"line",
|
|
1720
|
+
{
|
|
1721
|
+
x1: E(y),
|
|
1722
|
+
x2: E(y),
|
|
1723
|
+
y1: F.top,
|
|
1724
|
+
y2: F.top + m,
|
|
1725
|
+
stroke: "var(--dq-border-color)",
|
|
1726
|
+
strokeWidth: 0.5,
|
|
1727
|
+
strokeDasharray: "3,3"
|
|
1728
|
+
},
|
|
1729
|
+
`gx-${y}`
|
|
1730
|
+
)),
|
|
1731
|
+
/* @__PURE__ */ e.jsx(
|
|
1732
|
+
"line",
|
|
1733
|
+
{
|
|
1734
|
+
x1: F.left,
|
|
1735
|
+
y1: F.top,
|
|
1736
|
+
x2: F.left,
|
|
1737
|
+
y2: F.top + m,
|
|
1738
|
+
stroke: "var(--dq-border-color)",
|
|
1739
|
+
strokeWidth: 1
|
|
1740
|
+
}
|
|
1741
|
+
),
|
|
1742
|
+
/* @__PURE__ */ e.jsx(
|
|
1743
|
+
"line",
|
|
1744
|
+
{
|
|
1745
|
+
x1: F.left,
|
|
1746
|
+
y1: F.top + m,
|
|
1747
|
+
x2: o - F.right,
|
|
1748
|
+
y2: F.top + m,
|
|
1749
|
+
stroke: "var(--dq-border-color)",
|
|
1750
|
+
strokeWidth: 1
|
|
1751
|
+
}
|
|
1752
|
+
),
|
|
1753
|
+
ie.map((y) => /* @__PURE__ */ e.jsx(
|
|
1754
|
+
"text",
|
|
1755
|
+
{
|
|
1756
|
+
x: F.left - 6,
|
|
1757
|
+
y: A(y),
|
|
1758
|
+
textAnchor: "end",
|
|
1759
|
+
dominantBaseline: "middle",
|
|
1760
|
+
className: "fill-[var(--dq-text-muted)]",
|
|
1761
|
+
fontSize: 10,
|
|
1762
|
+
children: sr(y)
|
|
1763
|
+
},
|
|
1764
|
+
y
|
|
1765
|
+
)),
|
|
1766
|
+
ce.map((y) => /* @__PURE__ */ e.jsx(
|
|
1767
|
+
"text",
|
|
1768
|
+
{
|
|
1769
|
+
x: E(y),
|
|
1770
|
+
y: at - 4,
|
|
1771
|
+
textAnchor: "middle",
|
|
1772
|
+
className: "fill-[var(--dq-text-muted)]",
|
|
1773
|
+
fontSize: 10,
|
|
1774
|
+
children: y
|
|
1775
|
+
},
|
|
1776
|
+
y
|
|
1777
|
+
)),
|
|
1778
|
+
/* @__PURE__ */ e.jsx(
|
|
1779
|
+
"path",
|
|
1780
|
+
{
|
|
1781
|
+
d: S,
|
|
1782
|
+
fill: "none",
|
|
1783
|
+
stroke: a,
|
|
1784
|
+
strokeWidth: 1.5,
|
|
1785
|
+
strokeLinejoin: "round",
|
|
1786
|
+
strokeLinecap: "round"
|
|
1787
|
+
}
|
|
1788
|
+
),
|
|
1789
|
+
c && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1790
|
+
/* @__PURE__ */ e.jsx(
|
|
1791
|
+
"line",
|
|
1792
|
+
{
|
|
1793
|
+
x1: c.x,
|
|
1794
|
+
x2: c.x,
|
|
1795
|
+
y1: F.top,
|
|
1796
|
+
y2: F.top + m,
|
|
1797
|
+
stroke: "var(--dq-text-muted)",
|
|
1798
|
+
strokeWidth: 1,
|
|
1799
|
+
strokeDasharray: "3,3",
|
|
1800
|
+
opacity: 0.4
|
|
1801
|
+
}
|
|
1802
|
+
),
|
|
1803
|
+
/* @__PURE__ */ e.jsx("circle", { cx: c.x, cy: c.y, r: 3.5, fill: a }),
|
|
1804
|
+
/* @__PURE__ */ e.jsx(
|
|
1805
|
+
ar,
|
|
1806
|
+
{
|
|
1807
|
+
x: c.x,
|
|
1808
|
+
y: c.y,
|
|
1809
|
+
value: lt(c.pt.value),
|
|
1810
|
+
step: c.pt.step,
|
|
1811
|
+
chartWidth: o
|
|
1812
|
+
}
|
|
1813
|
+
)
|
|
1814
|
+
] })
|
|
1815
|
+
]
|
|
1816
|
+
}
|
|
1817
|
+
)
|
|
1818
|
+
] });
|
|
1819
|
+
}
|
|
1820
|
+
const ze = 6;
|
|
1821
|
+
function cr({ series: t }) {
|
|
1822
|
+
const s = Object.keys(t).sort(), [a, n] = T(0);
|
|
1823
|
+
if (!s.length) return null;
|
|
1824
|
+
const l = Math.ceil(s.length / ze), o = s.slice(a * ze, (a + 1) * ze);
|
|
1825
|
+
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1826
|
+
/* @__PURE__ */ e.jsx("div", { className: "metric-charts-grid", children: o.map((c, i) => /* @__PURE__ */ e.jsx(
|
|
1827
|
+
ir,
|
|
1828
|
+
{
|
|
1829
|
+
metricKey: c,
|
|
1830
|
+
points: t[c],
|
|
1831
|
+
color: Lt[(a * ze + i) % Lt.length]
|
|
1832
|
+
},
|
|
1833
|
+
c
|
|
1834
|
+
)) }),
|
|
1835
|
+
l > 1 && /* @__PURE__ */ e.jsxs("div", { className: "metric-charts-pagination", children: [
|
|
1836
|
+
/* @__PURE__ */ e.jsx(
|
|
1837
|
+
"button",
|
|
1838
|
+
{
|
|
1839
|
+
className: "metric-charts-page-btn",
|
|
1840
|
+
onClick: () => n((c) => c - 1),
|
|
1841
|
+
disabled: a === 0,
|
|
1842
|
+
children: "‹ Prev"
|
|
1843
|
+
}
|
|
1844
|
+
),
|
|
1845
|
+
/* @__PURE__ */ e.jsxs("span", { className: "metric-charts-page-info", children: [
|
|
1846
|
+
a + 1,
|
|
1847
|
+
" / ",
|
|
1848
|
+
l
|
|
1849
|
+
] }),
|
|
1850
|
+
/* @__PURE__ */ e.jsx(
|
|
1851
|
+
"button",
|
|
1852
|
+
{
|
|
1853
|
+
className: "metric-charts-page-btn",
|
|
1854
|
+
onClick: () => n((c) => c + 1),
|
|
1855
|
+
disabled: a >= l - 1,
|
|
1856
|
+
children: "Next ›"
|
|
1857
|
+
}
|
|
1858
|
+
)
|
|
1859
|
+
] })
|
|
1860
|
+
] });
|
|
1861
|
+
}
|
|
1862
|
+
function lr({ createdAt: t, endedAt: s, status: a }) {
|
|
1863
|
+
const n = !$e(a), [l, o] = T(Date.now());
|
|
1864
|
+
de(() => {
|
|
1865
|
+
if (!n) return;
|
|
1866
|
+
const i = setInterval(() => o(Date.now()), 1e3);
|
|
1867
|
+
return () => clearInterval(i);
|
|
1868
|
+
}, [n]);
|
|
1869
|
+
const c = n ? Math.max(0, Math.floor((l - new Date(t).getTime()) / 1e3)) : Ut(t, s);
|
|
1870
|
+
return /* @__PURE__ */ e.jsx("span", { className: n ? "tabular-nums" : void 0, children: Wt(c) });
|
|
1871
|
+
}
|
|
1872
|
+
function or() {
|
|
1873
|
+
const { runId: t } = xt(), s = Es(), { api: a } = K(), { data: n, loading: l, error: o, refetch: c } = Yt(t), { data: i, refetch: u } = Ke(), h = n ? !$e(n.status) : !1, { data: m } = Gs(t, h), [p, b] = T(!1), [D, g] = T(null), { mutate: I, loading: E } = Fe(
|
|
1874
|
+
() => a.setBaseline(n.project, n.run_id)
|
|
1875
|
+
), { mutate: A, loading: S } = Fe(
|
|
1876
|
+
() => a.deleteRun(t)
|
|
1877
|
+
), ce = i?.find((C) => C.name === n?.project)?.baseline?.run_id === t;
|
|
1878
|
+
if (de(() => {
|
|
1879
|
+
if (D) {
|
|
1880
|
+
const C = setTimeout(() => g(null), 3e3);
|
|
1881
|
+
return () => clearTimeout(C);
|
|
1882
|
+
}
|
|
1883
|
+
}, [D]), l)
|
|
1884
|
+
return /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(G, {}) }) });
|
|
1885
|
+
if (o || !n)
|
|
1886
|
+
return /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(
|
|
1887
|
+
we,
|
|
1465
1888
|
{
|
|
1466
1889
|
message: "Run not found",
|
|
1467
|
-
hint: o?.message || `Run ${
|
|
1890
|
+
hint: o?.message || `Run ${t} does not exist`
|
|
1468
1891
|
}
|
|
1469
1892
|
) }) });
|
|
1470
|
-
const
|
|
1893
|
+
const Z = n.backend || {}, J = n.fingerprints || {}, y = n.data?.params || {}, W = n.data?.metrics || {}, ue = n.data?.tags || {}, V = n.artifacts || [], ee = n.errors || [], je = async () => {
|
|
1471
1894
|
try {
|
|
1472
|
-
await
|
|
1895
|
+
await I(), await u(), c(), g({ message: "Baseline updated", variant: "success" });
|
|
1473
1896
|
} catch {
|
|
1474
|
-
|
|
1897
|
+
g({ message: "Failed to set baseline", variant: "error" });
|
|
1475
1898
|
}
|
|
1476
|
-
},
|
|
1899
|
+
}, ne = async () => {
|
|
1477
1900
|
try {
|
|
1478
|
-
await
|
|
1901
|
+
await A(), b(!1), g({ message: "Run deleted", variant: "success" }), setTimeout(() => s("/runs"), 1e3);
|
|
1479
1902
|
} catch {
|
|
1480
|
-
|
|
1903
|
+
g({ message: "Failed to delete run", variant: "error" }), b(!1);
|
|
1481
1904
|
}
|
|
1482
|
-
},
|
|
1483
|
-
const
|
|
1905
|
+
}, te = async (C) => {
|
|
1906
|
+
const L = V[C];
|
|
1484
1907
|
try {
|
|
1485
|
-
const
|
|
1486
|
-
if (!
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1908
|
+
const pe = a.getArtifactDownloadUrl(n.run_id, C), he = await fetch(pe);
|
|
1909
|
+
if (!he.ok) {
|
|
1910
|
+
const qe = {
|
|
1911
|
+
404: "Artifact not found",
|
|
1912
|
+
403: "Permission denied"
|
|
1913
|
+
};
|
|
1914
|
+
throw new Error(
|
|
1915
|
+
qe[he.status] ?? (he.status >= 500 ? "Server error" : `Download failed (${he.status})`)
|
|
1916
|
+
);
|
|
1917
|
+
}
|
|
1918
|
+
const Le = await he.blob(), ye = document.createElement("a");
|
|
1919
|
+
ye.href = URL.createObjectURL(Le), ye.download = L?.kind || `artifact-${C}`, ye.click(), URL.revokeObjectURL(ye.href), g({ message: "Download complete", variant: "success" });
|
|
1920
|
+
} catch (pe) {
|
|
1921
|
+
const he = pe instanceof Error && pe.message ? pe.message : "Download failed";
|
|
1922
|
+
g({ message: he, variant: "error" });
|
|
1923
|
+
}
|
|
1924
|
+
}, le = [
|
|
1925
|
+
{ label: "Project", value: /* @__PURE__ */ e.jsx(se, { to: `/runs?project=${n.project}`, children: n.project }) },
|
|
1926
|
+
{ label: "Name", value: n.run_name || "—" },
|
|
1927
|
+
{ label: "Adapter", value: n.adapter || "N/A" },
|
|
1928
|
+
{ label: "Status", value: /* @__PURE__ */ e.jsx(Jt, { status: n.status }) },
|
|
1929
|
+
{ label: "Created", value: `${n.created_at} (${Ye(n.created_at)})` },
|
|
1930
|
+
{
|
|
1931
|
+
label: "Duration",
|
|
1932
|
+
value: /* @__PURE__ */ e.jsx(lr, { createdAt: n.created_at, endedAt: n.ended_at, status: n.status })
|
|
1933
|
+
},
|
|
1934
|
+
...n.ended_at ? [{ label: "Ended", value: `${n.ended_at} (${Ye(n.ended_at)})` }] : [],
|
|
1935
|
+
{ label: "Backend", value: Z.name || "N/A" },
|
|
1936
|
+
...n.group_id ? [{
|
|
1937
|
+
label: "Group",
|
|
1938
|
+
value: /* @__PURE__ */ e.jsx(se, { to: `/groups/${n.group_id}`, children: n.group_name || oe(n.group_id) })
|
|
1939
|
+
}] : []
|
|
1940
|
+
];
|
|
1941
|
+
return /* @__PURE__ */ e.jsxs(Q, { children: [
|
|
1942
|
+
ce && /* @__PURE__ */ e.jsxs("div", { className: "mb-4 px-4 py-3 bg-[#EFF6FF] border border-[#2563EB]/20 rounded-md text-[#2563EB] text-sm font-medium", children: [
|
|
1495
1943
|
'This run is the current baseline for project "',
|
|
1496
|
-
|
|
1944
|
+
n.project,
|
|
1497
1945
|
'"'
|
|
1498
1946
|
] }),
|
|
1499
1947
|
/* @__PURE__ */ e.jsxs("div", { className: "page-header", children: [
|
|
1500
1948
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1501
|
-
/* @__PURE__ */ e.jsx("h1", { className: "page-title", children:
|
|
1502
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm font-mono", children:
|
|
1949
|
+
/* @__PURE__ */ e.jsx("h1", { className: "page-title", children: n.run_name || "Unnamed Run" }),
|
|
1950
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm font-mono", children: n.run_id })
|
|
1503
1951
|
] }),
|
|
1504
1952
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
1505
|
-
/* @__PURE__ */ e.jsx(
|
|
1506
|
-
!
|
|
1507
|
-
|
|
1953
|
+
/* @__PURE__ */ e.jsx(Xs, { runId: n.run_id, runName: n.run_name }),
|
|
1954
|
+
!ce && /* @__PURE__ */ e.jsxs($, { variant: "secondary", size: "sm", onClick: je, disabled: E, children: [
|
|
1955
|
+
E && /* @__PURE__ */ e.jsx(G, {}),
|
|
1508
1956
|
"Set as Baseline"
|
|
1509
1957
|
] }),
|
|
1510
|
-
/* @__PURE__ */ e.jsx(
|
|
1958
|
+
/* @__PURE__ */ e.jsx($, { variant: "ghost-danger", size: "sm", onClick: () => b(!0), children: "Delete" })
|
|
1511
1959
|
] })
|
|
1512
1960
|
] }),
|
|
1513
1961
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
|
|
1514
|
-
/* @__PURE__ */ e.jsxs(
|
|
1515
|
-
/* @__PURE__ */ e.jsx(
|
|
1516
|
-
/* @__PURE__ */ e.jsx(
|
|
1517
|
-
{ label: "Project", value: /* @__PURE__ */ e.jsx(z, { to: `/runs?project=${a.project}`, children: a.project }) },
|
|
1518
|
-
{ label: "Name", value: a.run_name || "—" },
|
|
1519
|
-
{ label: "Adapter", value: a.adapter || "N/A" },
|
|
1520
|
-
{ label: "Status", value: /* @__PURE__ */ e.jsx($s, { status: a.status }) },
|
|
1521
|
-
{ label: "Created", value: `${a.created_at} (${Ze(a.created_at)})` },
|
|
1522
|
-
{ label: "Backend", value: se.name || "N/A" },
|
|
1523
|
-
...a.group_id ? [{
|
|
1524
|
-
label: "Group",
|
|
1525
|
-
value: /* @__PURE__ */ e.jsx(z, { to: `/groups/${a.group_id}`, children: a.group_name || Q(a.group_id) })
|
|
1526
|
-
}] : []
|
|
1527
|
-
] })
|
|
1962
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
1963
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Overview" }) }),
|
|
1964
|
+
/* @__PURE__ */ e.jsx(ot, { items: le })
|
|
1528
1965
|
] }),
|
|
1529
|
-
/* @__PURE__ */ e.jsxs(
|
|
1530
|
-
/* @__PURE__ */ e.jsx(
|
|
1531
|
-
/* @__PURE__ */ e.jsx(
|
|
1532
|
-
{ label: "Run", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children:
|
|
1533
|
-
{ label: "Program", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children:
|
|
1966
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
1967
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Fingerprints" }) }),
|
|
1968
|
+
/* @__PURE__ */ e.jsx(ot, { items: [
|
|
1969
|
+
{ label: "Run", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children: J.run || "N/A" }) },
|
|
1970
|
+
{ label: "Program", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children: J.program || "N/A" }) }
|
|
1534
1971
|
] })
|
|
1535
1972
|
] })
|
|
1536
1973
|
] }),
|
|
1537
1974
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4 mb-4", children: [
|
|
1538
|
-
/* @__PURE__ */ e.jsxs(
|
|
1539
|
-
/* @__PURE__ */ e.jsx(
|
|
1540
|
-
Object.keys(
|
|
1541
|
-
/* @__PURE__ */ e.jsx(
|
|
1542
|
-
/* @__PURE__ */ e.jsx(
|
|
1543
|
-
] },
|
|
1975
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
1976
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Parameters" }) }),
|
|
1977
|
+
Object.keys(y).length ? /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsx(U, { children: Object.entries(y).map(([C, L]) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1978
|
+
/* @__PURE__ */ e.jsx(d, { children: C }),
|
|
1979
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(L) })
|
|
1980
|
+
] }, C)) }) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No parameters" })
|
|
1544
1981
|
] }),
|
|
1545
|
-
/* @__PURE__ */ e.jsxs(
|
|
1546
|
-
/* @__PURE__ */ e.jsx(
|
|
1547
|
-
Object.keys(
|
|
1548
|
-
/* @__PURE__ */ e.jsx(
|
|
1549
|
-
/* @__PURE__ */ e.jsx(
|
|
1550
|
-
] },
|
|
1982
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
1983
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Metrics" }) }),
|
|
1984
|
+
Object.keys(W).length ? /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsx(U, { children: Object.entries(W).map(([C, L]) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
1985
|
+
/* @__PURE__ */ e.jsx(d, { children: C }),
|
|
1986
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: typeof L == "number" ? lt(L) : String(L) })
|
|
1987
|
+
] }, C)) }) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No metrics" })
|
|
1551
1988
|
] }),
|
|
1552
|
-
/* @__PURE__ */ e.jsxs(
|
|
1553
|
-
/* @__PURE__ */ e.jsx(
|
|
1554
|
-
Object.keys(
|
|
1555
|
-
|
|
1989
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
1990
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Tags" }) }),
|
|
1991
|
+
Object.keys(ue).length ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: Object.entries(ue).map(([C, L]) => /* @__PURE__ */ e.jsxs(re, { variant: "gray", children: [
|
|
1992
|
+
C,
|
|
1556
1993
|
": ",
|
|
1557
|
-
String(
|
|
1558
|
-
] },
|
|
1994
|
+
String(L)
|
|
1995
|
+
] }, C)) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No tags" })
|
|
1559
1996
|
] })
|
|
1560
1997
|
] }),
|
|
1561
|
-
/* @__PURE__ */ e.jsxs(
|
|
1562
|
-
/* @__PURE__ */ e.jsx(
|
|
1998
|
+
m && /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
|
|
1999
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Metric History" }) }),
|
|
2000
|
+
/* @__PURE__ */ e.jsx("div", { className: "p-4", children: /* @__PURE__ */ e.jsx(cr, { series: m }) })
|
|
2001
|
+
] }),
|
|
2002
|
+
/* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
|
|
2003
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsxs(H, { children: [
|
|
1563
2004
|
"Artifacts (",
|
|
1564
|
-
|
|
2005
|
+
V.length,
|
|
1565
2006
|
")"
|
|
1566
2007
|
] }) }),
|
|
1567
|
-
|
|
1568
|
-
/* @__PURE__ */ e.jsx(
|
|
1569
|
-
/* @__PURE__ */ e.jsx(
|
|
1570
|
-
/* @__PURE__ */ e.jsx(
|
|
1571
|
-
/* @__PURE__ */ e.jsx(
|
|
1572
|
-
/* @__PURE__ */ e.jsx(
|
|
1573
|
-
/* @__PURE__ */ e.jsx(
|
|
1574
|
-
/* @__PURE__ */ e.jsx(
|
|
2008
|
+
V.length ? /* @__PURE__ */ e.jsxs(B, { children: [
|
|
2009
|
+
/* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2010
|
+
/* @__PURE__ */ e.jsx(w, { children: "#" }),
|
|
2011
|
+
/* @__PURE__ */ e.jsx(w, { children: "Kind" }),
|
|
2012
|
+
/* @__PURE__ */ e.jsx(w, { children: "Role" }),
|
|
2013
|
+
/* @__PURE__ */ e.jsx(w, { children: "Media Type" }),
|
|
2014
|
+
/* @__PURE__ */ e.jsx(w, { children: "Digest" }),
|
|
2015
|
+
/* @__PURE__ */ e.jsx(w, { children: "Actions" })
|
|
1575
2016
|
] }) }),
|
|
1576
|
-
/* @__PURE__ */ e.jsx(
|
|
1577
|
-
/* @__PURE__ */ e.jsx(
|
|
1578
|
-
/* @__PURE__ */ e.jsx(
|
|
1579
|
-
/* @__PURE__ */ e.jsx(
|
|
1580
|
-
/* @__PURE__ */ e.jsx(
|
|
1581
|
-
/* @__PURE__ */ e.jsx(
|
|
1582
|
-
/* @__PURE__ */ e.jsx(
|
|
1583
|
-
/* @__PURE__ */ e.jsx(
|
|
1584
|
-
/* @__PURE__ */ e.jsx(
|
|
2017
|
+
/* @__PURE__ */ e.jsx(U, { children: V.map((C, L) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2018
|
+
/* @__PURE__ */ e.jsx(d, { children: L }),
|
|
2019
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: C.kind }),
|
|
2020
|
+
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(re, { variant: "gray", children: C.role }) }),
|
|
2021
|
+
/* @__PURE__ */ e.jsx(d, { className: "text-muted text-sm", children: C.media_type }),
|
|
2022
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: ct(C.digest) }),
|
|
2023
|
+
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
2024
|
+
/* @__PURE__ */ e.jsx(se, { to: `/runs/${n.run_id}/artifacts/${L}`, children: /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", children: "View" }) }),
|
|
2025
|
+
/* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", onClick: () => te(L), children: "Download" })
|
|
1585
2026
|
] }) })
|
|
1586
|
-
] },
|
|
2027
|
+
] }, L)) })
|
|
1587
2028
|
] }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No artifacts" })
|
|
1588
2029
|
] }),
|
|
1589
|
-
|
|
1590
|
-
/* @__PURE__ */ e.jsx(
|
|
1591
|
-
|
|
1592
|
-
/* @__PURE__ */ e.jsx("strong", { children:
|
|
2030
|
+
ee.length > 0 && /* @__PURE__ */ e.jsxs(N, { children: [
|
|
2031
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { className: "text-danger", children: "Errors" }) }),
|
|
2032
|
+
ee.map((C, L) => /* @__PURE__ */ e.jsxs("div", { className: "mb-2", children: [
|
|
2033
|
+
/* @__PURE__ */ e.jsx("strong", { children: C.type }),
|
|
1593
2034
|
": ",
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
] },
|
|
2035
|
+
C.message,
|
|
2036
|
+
C.traceback && /* @__PURE__ */ e.jsx("pre", { className: "mt-2", children: C.traceback })
|
|
2037
|
+
] }, L))
|
|
1597
2038
|
] }),
|
|
1598
2039
|
/* @__PURE__ */ e.jsxs(
|
|
1599
|
-
|
|
2040
|
+
ft,
|
|
1600
2041
|
{
|
|
1601
|
-
open:
|
|
1602
|
-
onClose: () =>
|
|
2042
|
+
open: p,
|
|
2043
|
+
onClose: () => b(!1),
|
|
1603
2044
|
title: "Delete Run",
|
|
1604
2045
|
actions: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1605
|
-
/* @__PURE__ */ e.jsx(
|
|
1606
|
-
/* @__PURE__ */ e.jsxs(
|
|
1607
|
-
|
|
2046
|
+
/* @__PURE__ */ e.jsx($, { variant: "secondary", onClick: () => b(!1), children: "Cancel" }),
|
|
2047
|
+
/* @__PURE__ */ e.jsxs($, { variant: "danger", onClick: ne, disabled: S, children: [
|
|
2048
|
+
S && /* @__PURE__ */ e.jsx(G, {}),
|
|
1608
2049
|
"Delete"
|
|
1609
2050
|
] })
|
|
1610
2051
|
] }),
|
|
1611
2052
|
children: [
|
|
1612
2053
|
/* @__PURE__ */ e.jsx("p", { children: "Are you sure you want to delete this run?" }),
|
|
1613
|
-
/* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children:
|
|
2054
|
+
/* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children: oe(n.run_id) }),
|
|
1614
2055
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-danger mt-2", children: "This action cannot be undone." })
|
|
1615
2056
|
]
|
|
1616
2057
|
}
|
|
1617
2058
|
),
|
|
1618
|
-
|
|
1619
|
-
|
|
2059
|
+
D && /* @__PURE__ */ e.jsx(
|
|
2060
|
+
Me,
|
|
1620
2061
|
{
|
|
1621
|
-
message:
|
|
1622
|
-
variant:
|
|
1623
|
-
visible: !!
|
|
1624
|
-
onClose: () =>
|
|
2062
|
+
message: D.message,
|
|
2063
|
+
variant: D.variant,
|
|
2064
|
+
visible: !!D,
|
|
2065
|
+
onClose: () => g(null)
|
|
1625
2066
|
}
|
|
1626
2067
|
)
|
|
1627
2068
|
] });
|
|
1628
2069
|
}
|
|
1629
|
-
function
|
|
1630
|
-
const { currentWorkspace:
|
|
1631
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1632
|
-
/* @__PURE__ */ e.jsx(
|
|
1633
|
-
/* @__PURE__ */ e.jsx(
|
|
2070
|
+
function dr() {
|
|
2071
|
+
const { currentWorkspace: t } = K(), { data: s, loading: a } = Ke();
|
|
2072
|
+
return /* @__PURE__ */ e.jsxs(Q, { children: [
|
|
2073
|
+
/* @__PURE__ */ e.jsx(Oe, { title: "Projects" }),
|
|
2074
|
+
/* @__PURE__ */ e.jsx(N, { children: a ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(G, {}) }) : /* @__PURE__ */ e.jsx(Ks, { projects: s ?? [], currentWorkspace: t }) })
|
|
1634
2075
|
] });
|
|
1635
2076
|
}
|
|
1636
|
-
function
|
|
1637
|
-
const [
|
|
1638
|
-
|
|
1639
|
-
const m = new URLSearchParams(
|
|
1640
|
-
h ? m.set("project", h) : m.delete("project"),
|
|
1641
|
-
}, [
|
|
1642
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1643
|
-
/* @__PURE__ */ e.jsx(
|
|
1644
|
-
/* @__PURE__ */ e.jsx(
|
|
1645
|
-
/* @__PURE__ */ e.jsxs(
|
|
1646
|
-
/* @__PURE__ */ e.jsx(
|
|
2077
|
+
function ur() {
|
|
2078
|
+
const [t, s] = He(), { data: a } = Ke(), [n, l] = T(t.get("project") || ""), { data: o, loading: c, refetch: i } = Is({ project: n || void 0 }), u = me((h) => {
|
|
2079
|
+
l(h);
|
|
2080
|
+
const m = new URLSearchParams(t);
|
|
2081
|
+
h ? m.set("project", h) : m.delete("project"), s(m, { replace: !0 });
|
|
2082
|
+
}, [t, s]);
|
|
2083
|
+
return /* @__PURE__ */ e.jsxs(Q, { children: [
|
|
2084
|
+
/* @__PURE__ */ e.jsx(Oe, { title: "Run Groups" }),
|
|
2085
|
+
/* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsxs(Kt, { children: [
|
|
2086
|
+
/* @__PURE__ */ e.jsxs(xe, { children: [
|
|
2087
|
+
/* @__PURE__ */ e.jsx(ve, { htmlFor: "project", children: "Project" }),
|
|
1647
2088
|
/* @__PURE__ */ e.jsxs(
|
|
1648
|
-
|
|
2089
|
+
_e,
|
|
1649
2090
|
{
|
|
1650
2091
|
id: "project",
|
|
1651
|
-
value:
|
|
1652
|
-
onChange: (h) =>
|
|
2092
|
+
value: n,
|
|
2093
|
+
onChange: (h) => u(h.target.value),
|
|
1653
2094
|
children: [
|
|
1654
2095
|
/* @__PURE__ */ e.jsx("option", { value: "", children: "All projects" }),
|
|
1655
|
-
|
|
2096
|
+
a?.map((h) => /* @__PURE__ */ e.jsx("option", { value: h.name, children: h.name }, h.name))
|
|
1656
2097
|
]
|
|
1657
2098
|
}
|
|
1658
2099
|
)
|
|
1659
2100
|
] }),
|
|
1660
|
-
/* @__PURE__ */ e.jsxs(
|
|
1661
|
-
/* @__PURE__ */ e.jsx(
|
|
1662
|
-
|
|
2101
|
+
/* @__PURE__ */ e.jsxs(xe, { className: "flex items-end gap-2", children: [
|
|
2102
|
+
/* @__PURE__ */ e.jsx($, { variant: "primary", onClick: () => i(), children: "Filter" }),
|
|
2103
|
+
c && /* @__PURE__ */ e.jsx(G, {})
|
|
1663
2104
|
] })
|
|
1664
2105
|
] }) }),
|
|
1665
|
-
/* @__PURE__ */ e.jsx(
|
|
2106
|
+
/* @__PURE__ */ e.jsx(N, { children: c && !o ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(G, {}) }) : /* @__PURE__ */ e.jsx(Js, { groups: o ?? [] }) })
|
|
1666
2107
|
] });
|
|
1667
2108
|
}
|
|
1668
|
-
function
|
|
1669
|
-
const { groupId:
|
|
1670
|
-
|
|
1671
|
-
if (
|
|
2109
|
+
function hr() {
|
|
2110
|
+
const { groupId: t } = xt(), { api: s } = K(), { data: a, loading: n, error: l, refetch: o } = Bs(t), [c, i] = T(null), u = Fe((m) => s.deleteRun(m));
|
|
2111
|
+
de(() => {
|
|
2112
|
+
if (c) {
|
|
1672
2113
|
const m = setTimeout(() => i(null), 3e3);
|
|
1673
2114
|
return () => clearTimeout(m);
|
|
1674
2115
|
}
|
|
1675
|
-
}, [
|
|
2116
|
+
}, [c]);
|
|
1676
2117
|
const h = async (m) => {
|
|
1677
2118
|
try {
|
|
1678
|
-
await
|
|
2119
|
+
await u.mutate(m), i({ message: "Run deleted", variant: "success" }), o();
|
|
1679
2120
|
} catch {
|
|
1680
2121
|
i({ message: "Failed to delete run", variant: "error" });
|
|
1681
2122
|
}
|
|
1682
2123
|
};
|
|
1683
|
-
return
|
|
2124
|
+
return n ? /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(G, {}) }) }) : l || !a ? /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(we, { message: "Group not found", hint: l?.message }) }) }) : /* @__PURE__ */ e.jsxs(Q, { children: [
|
|
1684
2125
|
/* @__PURE__ */ e.jsx(
|
|
1685
|
-
|
|
2126
|
+
Oe,
|
|
1686
2127
|
{
|
|
1687
2128
|
title: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1688
2129
|
"Group ",
|
|
1689
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-mono", children:
|
|
2130
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-mono", children: oe(t) })
|
|
1690
2131
|
] }),
|
|
1691
|
-
subtitle: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-muted", children:
|
|
2132
|
+
subtitle: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-muted", children: t })
|
|
1692
2133
|
}
|
|
1693
2134
|
),
|
|
1694
|
-
/* @__PURE__ */ e.jsxs(
|
|
1695
|
-
/* @__PURE__ */ e.jsx(
|
|
2135
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
2136
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsxs(H, { children: [
|
|
1696
2137
|
"Runs in Group (",
|
|
1697
|
-
|
|
2138
|
+
a.runs.length,
|
|
1698
2139
|
")"
|
|
1699
2140
|
] }) }),
|
|
1700
2141
|
/* @__PURE__ */ e.jsx(
|
|
1701
|
-
|
|
2142
|
+
pt,
|
|
1702
2143
|
{
|
|
1703
|
-
runs:
|
|
2144
|
+
runs: a.runs,
|
|
1704
2145
|
onDelete: h,
|
|
1705
|
-
loading:
|
|
2146
|
+
loading: u.loading
|
|
1706
2147
|
}
|
|
1707
2148
|
)
|
|
1708
2149
|
] }),
|
|
1709
|
-
|
|
1710
|
-
|
|
2150
|
+
c && /* @__PURE__ */ e.jsx(
|
|
2151
|
+
Me,
|
|
1711
2152
|
{
|
|
1712
|
-
message:
|
|
1713
|
-
variant:
|
|
1714
|
-
visible: !!
|
|
2153
|
+
message: c.message,
|
|
2154
|
+
variant: c.variant,
|
|
2155
|
+
visible: !!c,
|
|
1715
2156
|
onClose: () => i(null)
|
|
1716
2157
|
}
|
|
1717
2158
|
)
|
|
1718
2159
|
] });
|
|
1719
2160
|
}
|
|
1720
|
-
function
|
|
1721
|
-
return /* @__PURE__ */ e.jsx("svg", { className:
|
|
2161
|
+
function xr({ className: t = "" }) {
|
|
2162
|
+
return /* @__PURE__ */ e.jsx("svg", { className: t, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e.jsx("polyline", { points: "20 6 9 17 4 12" }) });
|
|
1722
2163
|
}
|
|
1723
|
-
function
|
|
1724
|
-
return /* @__PURE__ */ e.jsxs("svg", { className:
|
|
2164
|
+
function mr({ className: t = "" }) {
|
|
2165
|
+
return /* @__PURE__ */ e.jsxs("svg", { className: t, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1725
2166
|
/* @__PURE__ */ e.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1726
2167
|
/* @__PURE__ */ e.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1727
2168
|
] });
|
|
1728
2169
|
}
|
|
1729
|
-
function
|
|
1730
|
-
return /* @__PURE__ */ e.jsxs("svg", { className:
|
|
2170
|
+
function fr({ className: t = "" }) {
|
|
2171
|
+
return /* @__PURE__ */ e.jsxs("svg", { className: t, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1731
2172
|
/* @__PURE__ */ e.jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
|
|
1732
2173
|
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
1733
2174
|
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
1734
2175
|
] });
|
|
1735
2176
|
}
|
|
1736
|
-
function
|
|
1737
|
-
return /* @__PURE__ */ e.jsxs("svg", { className:
|
|
2177
|
+
function it({ className: t = "" }) {
|
|
2178
|
+
return /* @__PURE__ */ e.jsxs("svg", { className: t, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1738
2179
|
/* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1739
2180
|
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
1740
2181
|
/* @__PURE__ */ e.jsx("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
1741
2182
|
] });
|
|
1742
2183
|
}
|
|
1743
|
-
function
|
|
1744
|
-
return
|
|
1745
|
-
/* @__PURE__ */ e.jsx(
|
|
2184
|
+
function Pe({ match: t }) {
|
|
2185
|
+
return t ? /* @__PURE__ */ e.jsxs("span", { className: "diff-match inline-flex items-center gap-1.5", children: [
|
|
2186
|
+
/* @__PURE__ */ e.jsx(xr, { className: "flex-shrink-0" }),
|
|
1746
2187
|
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children: "Match" })
|
|
1747
2188
|
] }) : /* @__PURE__ */ e.jsxs("span", { className: "diff-mismatch inline-flex items-center gap-1.5", children: [
|
|
1748
|
-
/* @__PURE__ */ e.jsx(
|
|
2189
|
+
/* @__PURE__ */ e.jsx(mr, { className: "flex-shrink-0" }),
|
|
1749
2190
|
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children: "Different" })
|
|
1750
2191
|
] });
|
|
1751
2192
|
}
|
|
1752
|
-
function
|
|
1753
|
-
return !
|
|
1754
|
-
/* @__PURE__ */ e.jsx(
|
|
2193
|
+
function jr({ warnings: t }) {
|
|
2194
|
+
return !t || t.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "alert alert-warning mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-3", children: [
|
|
2195
|
+
/* @__PURE__ */ e.jsx(fr, { className: "flex-shrink-0 mt-0.5" }),
|
|
1755
2196
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
|
|
1756
|
-
/* @__PURE__ */ e.jsx("p", { className: "font-semibold mb-1", children:
|
|
1757
|
-
/* @__PURE__ */ e.jsx("ul", { className: "space-y-1", children:
|
|
2197
|
+
/* @__PURE__ */ e.jsx("p", { className: "font-semibold mb-1", children: t.length === 1 ? "Warning" : `${t.length} Warnings` }),
|
|
2198
|
+
/* @__PURE__ */ e.jsx("ul", { className: "space-y-1", children: t.map((s, a) => /* @__PURE__ */ e.jsx("li", { className: "text-sm", children: s }, a)) })
|
|
1758
2199
|
] })
|
|
1759
2200
|
] }) });
|
|
1760
2201
|
}
|
|
1761
|
-
function
|
|
1762
|
-
label:
|
|
1763
|
-
run:
|
|
1764
|
-
variant:
|
|
2202
|
+
function It({
|
|
2203
|
+
label: t,
|
|
2204
|
+
run: s,
|
|
2205
|
+
variant: a
|
|
1765
2206
|
}) {
|
|
1766
2207
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
1767
|
-
/* @__PURE__ */ e.jsx("div", { className: `absolute top-0 left-0 w-1 h-full rounded-l ${
|
|
2208
|
+
/* @__PURE__ */ e.jsx("div", { className: `absolute top-0 left-0 w-1 h-full rounded-l ${a === "a" ? "bg-info" : "bg-primary"}` }),
|
|
1768
2209
|
/* @__PURE__ */ e.jsxs("div", { className: "pl-4", children: [
|
|
1769
|
-
/* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold uppercase tracking-wider mb-2 ${
|
|
1770
|
-
/* @__PURE__ */ e.jsx(
|
|
1771
|
-
/* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs mt-1 text-muted", children:
|
|
2210
|
+
/* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold uppercase tracking-wider mb-2 ${a === "a" ? "text-info" : "text-primary"}`, children: t }),
|
|
2211
|
+
/* @__PURE__ */ e.jsx(se, { to: `/runs/${s.run_id}`, className: "text-base font-medium hover:underline", children: s.run_name || "Unnamed Run" }),
|
|
2212
|
+
/* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs mt-1 text-muted", children: oe(s.run_id) }),
|
|
1772
2213
|
/* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-1 text-muted", children: [
|
|
1773
|
-
|
|
2214
|
+
s.project,
|
|
1774
2215
|
" · ",
|
|
1775
|
-
|
|
2216
|
+
Ye(s.created_at)
|
|
1776
2217
|
] })
|
|
1777
2218
|
] })
|
|
1778
2219
|
] });
|
|
1779
2220
|
}
|
|
1780
|
-
function
|
|
1781
|
-
children:
|
|
1782
|
-
badge:
|
|
2221
|
+
function ge({
|
|
2222
|
+
children: t,
|
|
2223
|
+
badge: s
|
|
1783
2224
|
}) {
|
|
1784
|
-
return /* @__PURE__ */ e.jsx(
|
|
1785
|
-
|
|
1786
|
-
|
|
2225
|
+
return /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
2226
|
+
t,
|
|
2227
|
+
s && /* @__PURE__ */ e.jsx(re, { variant: s.variant, children: s.label })
|
|
1787
2228
|
] }) }) });
|
|
1788
2229
|
}
|
|
1789
|
-
function
|
|
1790
|
-
tvd:
|
|
1791
|
-
noiseContext:
|
|
2230
|
+
function pr({
|
|
2231
|
+
tvd: t,
|
|
2232
|
+
noiseContext: s
|
|
1792
2233
|
}) {
|
|
1793
|
-
if (
|
|
2234
|
+
if (t === 0)
|
|
1794
2235
|
return /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ Distributions are identical (TVD = 0)" });
|
|
1795
|
-
if (!
|
|
1796
|
-
const { p_value:
|
|
1797
|
-
return
|
|
2236
|
+
if (!s) return null;
|
|
2237
|
+
const { p_value: a, noise_ratio: n } = s;
|
|
2238
|
+
return a != null ? a >= 0.1 ? /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ Consistent with sampling noise — difference is not statistically significant" }) : a >= 0.05 ? /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-warning", children: [
|
|
1798
2239
|
"⚠ Borderline (p=",
|
|
1799
|
-
|
|
2240
|
+
a.toFixed(2),
|
|
1800
2241
|
") — consider increasing shots"
|
|
1801
2242
|
] }) : /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-danger", children: [
|
|
1802
2243
|
"✗ Statistically significant difference (p=",
|
|
1803
|
-
|
|
2244
|
+
a.toFixed(2),
|
|
1804
2245
|
") — results show meaningful divergence"
|
|
1805
|
-
] }) :
|
|
2246
|
+
] }) : n != null ? n < 1.5 ? /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ TVD is within expected shot noise range" }) : n < 3 ? /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-warning", children: [
|
|
1806
2247
|
"⚠ Ambiguous (",
|
|
1807
|
-
|
|
2248
|
+
n.toFixed(1),
|
|
1808
2249
|
"× expected noise) — consider increasing shots"
|
|
1809
2250
|
] }) : /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-danger", children: [
|
|
1810
2251
|
"✗ TVD exceeds expected noise (",
|
|
1811
|
-
|
|
2252
|
+
n.toFixed(1),
|
|
1812
2253
|
"×) — results show meaningful differences"
|
|
1813
2254
|
] }) : null;
|
|
1814
2255
|
}
|
|
1815
|
-
function
|
|
1816
|
-
const [
|
|
1817
|
-
if (p.preventDefault(), !
|
|
2256
|
+
function gr() {
|
|
2257
|
+
const [t, s] = He(), { data: a } = zt({ limit: 100 }), n = a?.runs ?? [], [l, o] = T(t.get("a") || ""), [c, i] = T(t.get("b") || ""), [u, h] = T(""), m = (p) => {
|
|
2258
|
+
if (p.preventDefault(), !l || !c) {
|
|
1818
2259
|
h("Please select both runs to compare");
|
|
1819
2260
|
return;
|
|
1820
2261
|
}
|
|
1821
|
-
if (
|
|
2262
|
+
if (l === c) {
|
|
1822
2263
|
h("Please select two different runs");
|
|
1823
2264
|
return;
|
|
1824
2265
|
}
|
|
1825
|
-
h(""),
|
|
2266
|
+
h(""), s({ a: l, b: c });
|
|
1826
2267
|
};
|
|
1827
2268
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1828
|
-
/* @__PURE__ */ e.jsx(
|
|
2269
|
+
/* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs("form", { onSubmit: m, children: [
|
|
1829
2270
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
|
|
1830
|
-
/* @__PURE__ */ e.jsxs(
|
|
1831
|
-
/* @__PURE__ */ e.jsx(
|
|
2271
|
+
/* @__PURE__ */ e.jsxs(xe, { children: [
|
|
2272
|
+
/* @__PURE__ */ e.jsx(ve, { htmlFor: "a", children: "Run A (Baseline)" }),
|
|
1832
2273
|
/* @__PURE__ */ e.jsxs(
|
|
1833
|
-
|
|
2274
|
+
_e,
|
|
1834
2275
|
{
|
|
1835
2276
|
id: "a",
|
|
1836
|
-
value:
|
|
2277
|
+
value: l,
|
|
1837
2278
|
onChange: (p) => {
|
|
1838
2279
|
o(p.target.value), h("");
|
|
1839
2280
|
},
|
|
1840
2281
|
children: [
|
|
1841
2282
|
/* @__PURE__ */ e.jsx("option", { value: "", children: "Select run..." }),
|
|
1842
|
-
|
|
2283
|
+
n.map((p) => /* @__PURE__ */ e.jsxs("option", { value: p.run_id, children: [
|
|
1843
2284
|
p.run_name || "Unnamed",
|
|
1844
2285
|
" (",
|
|
1845
|
-
|
|
2286
|
+
oe(p.run_id),
|
|
1846
2287
|
") — ",
|
|
1847
2288
|
p.project
|
|
1848
2289
|
] }, p.run_id))
|
|
@@ -1850,22 +2291,22 @@ function Yr() {
|
|
|
1850
2291
|
}
|
|
1851
2292
|
)
|
|
1852
2293
|
] }),
|
|
1853
|
-
/* @__PURE__ */ e.jsxs(
|
|
1854
|
-
/* @__PURE__ */ e.jsx(
|
|
2294
|
+
/* @__PURE__ */ e.jsxs(xe, { children: [
|
|
2295
|
+
/* @__PURE__ */ e.jsx(ve, { htmlFor: "b", children: "Run B (Candidate)" }),
|
|
1855
2296
|
/* @__PURE__ */ e.jsxs(
|
|
1856
|
-
|
|
2297
|
+
_e,
|
|
1857
2298
|
{
|
|
1858
2299
|
id: "b",
|
|
1859
|
-
value:
|
|
2300
|
+
value: c,
|
|
1860
2301
|
onChange: (p) => {
|
|
1861
2302
|
i(p.target.value), h("");
|
|
1862
2303
|
},
|
|
1863
2304
|
children: [
|
|
1864
2305
|
/* @__PURE__ */ e.jsx("option", { value: "", children: "Select run..." }),
|
|
1865
|
-
|
|
2306
|
+
n.map((p) => /* @__PURE__ */ e.jsxs("option", { value: p.run_id, children: [
|
|
1866
2307
|
p.run_name || "Unnamed",
|
|
1867
2308
|
" (",
|
|
1868
|
-
|
|
2309
|
+
oe(p.run_id),
|
|
1869
2310
|
") — ",
|
|
1870
2311
|
p.project
|
|
1871
2312
|
] }, p.run_id))
|
|
@@ -1874,100 +2315,100 @@ function Yr() {
|
|
|
1874
2315
|
)
|
|
1875
2316
|
] })
|
|
1876
2317
|
] }),
|
|
1877
|
-
|
|
1878
|
-
/* @__PURE__ */ e.jsx(
|
|
2318
|
+
u && /* @__PURE__ */ e.jsx("p", { className: "text-sm mb-3 text-danger", children: u }),
|
|
2319
|
+
/* @__PURE__ */ e.jsx($, { type: "submit", variant: "primary", children: "Compare" })
|
|
1879
2320
|
] }) }),
|
|
1880
|
-
/* @__PURE__ */ e.jsxs(
|
|
1881
|
-
/* @__PURE__ */ e.jsx(
|
|
2321
|
+
/* @__PURE__ */ e.jsxs(N, { className: "mt-4", children: [
|
|
2322
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "How it works" }) }),
|
|
1882
2323
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2 text-sm text-muted", children: [
|
|
1883
2324
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
1884
|
-
/* @__PURE__ */ e.jsx(
|
|
2325
|
+
/* @__PURE__ */ e.jsx(it, { className: "flex-shrink-0 mt-0.5" }),
|
|
1885
2326
|
/* @__PURE__ */ e.jsx("span", { children: "Select two runs to compare their parameters, metrics, and artifacts" })
|
|
1886
2327
|
] }),
|
|
1887
2328
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
1888
|
-
/* @__PURE__ */ e.jsx(
|
|
2329
|
+
/* @__PURE__ */ e.jsx(it, { className: "flex-shrink-0 mt-0.5" }),
|
|
1889
2330
|
/* @__PURE__ */ e.jsx("span", { children: "The diff shows changed values and computes TVD for result distributions" })
|
|
1890
2331
|
] }),
|
|
1891
2332
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
1892
|
-
/* @__PURE__ */ e.jsx(
|
|
2333
|
+
/* @__PURE__ */ e.jsx(it, { className: "flex-shrink-0 mt-0.5" }),
|
|
1893
2334
|
/* @__PURE__ */ e.jsx("span", { children: "You can also compare from the run detail page" })
|
|
1894
2335
|
] })
|
|
1895
2336
|
] })
|
|
1896
2337
|
] })
|
|
1897
2338
|
] });
|
|
1898
2339
|
}
|
|
1899
|
-
function
|
|
1900
|
-
const { data:
|
|
1901
|
-
if (
|
|
1902
|
-
return /* @__PURE__ */ e.jsx(
|
|
1903
|
-
/* @__PURE__ */ e.jsx(
|
|
2340
|
+
function vr({ runIdA: t, runIdB: s }) {
|
|
2341
|
+
const { data: a, loading: n, error: l } = Us(t, s);
|
|
2342
|
+
if (n)
|
|
2343
|
+
return /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center justify-center py-12 gap-3", children: [
|
|
2344
|
+
/* @__PURE__ */ e.jsx(G, {}),
|
|
1904
2345
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted", children: "Comparing runs..." })
|
|
1905
2346
|
] }) });
|
|
1906
|
-
if (
|
|
1907
|
-
return /* @__PURE__ */ e.jsx(
|
|
1908
|
-
const { run_a: o, run_b:
|
|
2347
|
+
if (l || !a)
|
|
2348
|
+
return /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(we, { message: "Failed to load diff", hint: l?.message }) });
|
|
2349
|
+
const { run_a: o, run_b: c, report: i } = a, u = i.device_drift?.significant_drift ? { variant: "warning", label: "Drift Detected" } : i.device_drift?.has_calibration_data ? { variant: "success", label: "Stable" } : { variant: "gray", label: "No Data" };
|
|
1909
2350
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1910
|
-
/* @__PURE__ */ e.jsx(
|
|
1911
|
-
/* @__PURE__ */ e.jsx(
|
|
1912
|
-
/* @__PURE__ */ e.jsx(
|
|
1913
|
-
/* @__PURE__ */ e.jsx(
|
|
2351
|
+
/* @__PURE__ */ e.jsx(jr, { warnings: i.warnings || [] }),
|
|
2352
|
+
/* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
2353
|
+
/* @__PURE__ */ e.jsx(It, { label: "Run A (Baseline)", run: o, variant: "a" }),
|
|
2354
|
+
/* @__PURE__ */ e.jsx(It, { label: "Run B (Candidate)", run: c, variant: "b" })
|
|
1914
2355
|
] }) }),
|
|
1915
2356
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
|
|
1916
|
-
/* @__PURE__ */ e.jsxs(
|
|
1917
|
-
/* @__PURE__ */ e.jsx(
|
|
1918
|
-
/* @__PURE__ */ e.jsx(
|
|
2357
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
2358
|
+
/* @__PURE__ */ e.jsx(ge, { children: "Metadata" }),
|
|
2359
|
+
/* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
|
|
1919
2360
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1920
|
-
/* @__PURE__ */ e.jsx(
|
|
1921
|
-
/* @__PURE__ */ e.jsx(
|
|
2361
|
+
/* @__PURE__ */ e.jsx(d, { children: "Project" }),
|
|
2362
|
+
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.metadata.project_match }) })
|
|
1922
2363
|
] }),
|
|
1923
2364
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1924
|
-
/* @__PURE__ */ e.jsx(
|
|
1925
|
-
/* @__PURE__ */ e.jsx(
|
|
2365
|
+
/* @__PURE__ */ e.jsx(d, { children: "Backend" }),
|
|
2366
|
+
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.metadata.backend_match }) })
|
|
1926
2367
|
] }),
|
|
1927
2368
|
!i.metadata.project_match && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1928
2369
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1929
|
-
/* @__PURE__ */ e.jsx(
|
|
1930
|
-
/* @__PURE__ */ e.jsx(
|
|
2370
|
+
/* @__PURE__ */ e.jsx(d, { className: "text-sm text-muted", children: "Project A" }),
|
|
2371
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: i.metadata.project_a || "N/A" })
|
|
1931
2372
|
] }),
|
|
1932
2373
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1933
|
-
/* @__PURE__ */ e.jsx(
|
|
1934
|
-
/* @__PURE__ */ e.jsx(
|
|
2374
|
+
/* @__PURE__ */ e.jsx(d, { className: "text-sm text-muted", children: "Project B" }),
|
|
2375
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: i.metadata.project_b || "N/A" })
|
|
1935
2376
|
] })
|
|
1936
2377
|
] }),
|
|
1937
2378
|
!i.metadata.backend_match && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1938
2379
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1939
|
-
/* @__PURE__ */ e.jsx(
|
|
1940
|
-
/* @__PURE__ */ e.jsx(
|
|
2380
|
+
/* @__PURE__ */ e.jsx(d, { className: "text-sm text-muted", children: "Backend A" }),
|
|
2381
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: i.metadata.backend_a || "N/A" })
|
|
1941
2382
|
] }),
|
|
1942
2383
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1943
|
-
/* @__PURE__ */ e.jsx(
|
|
1944
|
-
/* @__PURE__ */ e.jsx(
|
|
2384
|
+
/* @__PURE__ */ e.jsx(d, { className: "text-sm text-muted", children: "Backend B" }),
|
|
2385
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: i.metadata.backend_b || "N/A" })
|
|
1945
2386
|
] })
|
|
1946
2387
|
] })
|
|
1947
2388
|
] }) })
|
|
1948
2389
|
] }),
|
|
1949
|
-
/* @__PURE__ */ e.jsxs(
|
|
1950
|
-
/* @__PURE__ */ e.jsx(
|
|
1951
|
-
/* @__PURE__ */ e.jsx(
|
|
2390
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
2391
|
+
/* @__PURE__ */ e.jsx(ge, { children: "Fingerprints" }),
|
|
2392
|
+
/* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
|
|
1952
2393
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1953
|
-
/* @__PURE__ */ e.jsx(
|
|
1954
|
-
/* @__PURE__ */ e.jsx(
|
|
2394
|
+
/* @__PURE__ */ e.jsx(d, { children: "Run A" }),
|
|
2395
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: ct(i.fingerprints.a) })
|
|
1955
2396
|
] }),
|
|
1956
2397
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1957
|
-
/* @__PURE__ */ e.jsx(
|
|
1958
|
-
/* @__PURE__ */ e.jsx(
|
|
2398
|
+
/* @__PURE__ */ e.jsx(d, { children: "Run B" }),
|
|
2399
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: ct(i.fingerprints.b) })
|
|
1959
2400
|
] }),
|
|
1960
2401
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1961
|
-
/* @__PURE__ */ e.jsx(
|
|
1962
|
-
/* @__PURE__ */ e.jsx(
|
|
2402
|
+
/* @__PURE__ */ e.jsx(d, { children: "Match" }),
|
|
2403
|
+
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.fingerprints.a === i.fingerprints.b }) })
|
|
1963
2404
|
] })
|
|
1964
2405
|
] }) })
|
|
1965
2406
|
] })
|
|
1966
2407
|
] }),
|
|
1967
2408
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
|
|
1968
|
-
/* @__PURE__ */ e.jsxs(
|
|
2409
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
1969
2410
|
/* @__PURE__ */ e.jsx(
|
|
1970
|
-
|
|
2411
|
+
ge,
|
|
1971
2412
|
{
|
|
1972
2413
|
badge: {
|
|
1973
2414
|
variant: i.program.exact_match ? "success" : i.program.structural_match ? "info" : "warning",
|
|
@@ -1976,69 +2417,69 @@ function Kr({ runIdA: r, runIdB: t }) {
|
|
|
1976
2417
|
children: "Program"
|
|
1977
2418
|
}
|
|
1978
2419
|
),
|
|
1979
|
-
/* @__PURE__ */ e.jsx(
|
|
2420
|
+
/* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
|
|
1980
2421
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1981
|
-
/* @__PURE__ */ e.jsx(
|
|
1982
|
-
/* @__PURE__ */ e.jsx(
|
|
2422
|
+
/* @__PURE__ */ e.jsx(d, { children: "Exact Match" }),
|
|
2423
|
+
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.program.exact_match }) })
|
|
1983
2424
|
] }),
|
|
1984
2425
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
1985
|
-
/* @__PURE__ */ e.jsx(
|
|
1986
|
-
/* @__PURE__ */ e.jsx(
|
|
2426
|
+
/* @__PURE__ */ e.jsx(d, { children: "Structural Match" }),
|
|
2427
|
+
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.program.structural_match }) })
|
|
1987
2428
|
] })
|
|
1988
2429
|
] }) })
|
|
1989
2430
|
] }),
|
|
1990
|
-
/* @__PURE__ */ e.jsxs(
|
|
1991
|
-
/* @__PURE__ */ e.jsx(
|
|
2431
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
2432
|
+
/* @__PURE__ */ e.jsx(ge, { badge: u, children: "Device Calibration" }),
|
|
1992
2433
|
i.device_drift?.significant_drift ? /* @__PURE__ */ e.jsx("p", { className: "text-sm text-warning", children: "Significant calibration drift detected between runs" }) : i.device_drift?.has_calibration_data ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "Calibration within acceptable thresholds" }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No calibration data available" })
|
|
1993
2434
|
] })
|
|
1994
2435
|
] }),
|
|
1995
|
-
/* @__PURE__ */ e.jsxs(
|
|
1996
|
-
/* @__PURE__ */ e.jsx(
|
|
1997
|
-
i.params.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All parameters match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.params.changed && Object.keys(i.params.changed).length > 0 && /* @__PURE__ */ e.jsxs(
|
|
1998
|
-
/* @__PURE__ */ e.jsx(
|
|
1999
|
-
/* @__PURE__ */ e.jsx(
|
|
2000
|
-
/* @__PURE__ */ e.jsx(
|
|
2001
|
-
/* @__PURE__ */ e.jsx(
|
|
2436
|
+
/* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
|
|
2437
|
+
/* @__PURE__ */ e.jsx(ge, { badge: { variant: i.params.match ? "success" : "warning", label: i.params.match ? "Match" : "Different" }, children: "Parameters" }),
|
|
2438
|
+
i.params.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All parameters match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.params.changed && Object.keys(i.params.changed).length > 0 && /* @__PURE__ */ e.jsxs(B, { children: [
|
|
2439
|
+
/* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2440
|
+
/* @__PURE__ */ e.jsx(w, { children: "Parameter" }),
|
|
2441
|
+
/* @__PURE__ */ e.jsx(w, { children: "Run A" }),
|
|
2442
|
+
/* @__PURE__ */ e.jsx(w, { children: "Run B" })
|
|
2002
2443
|
] }) }),
|
|
2003
|
-
/* @__PURE__ */ e.jsx(
|
|
2004
|
-
/* @__PURE__ */ e.jsx(
|
|
2005
|
-
/* @__PURE__ */ e.jsx(
|
|
2006
|
-
/* @__PURE__ */ e.jsx(
|
|
2444
|
+
/* @__PURE__ */ e.jsx(U, { children: Object.entries(i.params.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2445
|
+
/* @__PURE__ */ e.jsx(d, { children: h }),
|
|
2446
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(m.a) }),
|
|
2447
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(m.b) })
|
|
2007
2448
|
] }, h)) })
|
|
2008
2449
|
] }) })
|
|
2009
2450
|
] }),
|
|
2010
|
-
/* @__PURE__ */ e.jsxs(
|
|
2011
|
-
/* @__PURE__ */ e.jsx(
|
|
2012
|
-
i.metrics.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All metrics match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.metrics.changed && Object.keys(i.metrics.changed).length > 0 && /* @__PURE__ */ e.jsxs(
|
|
2013
|
-
/* @__PURE__ */ e.jsx(
|
|
2014
|
-
/* @__PURE__ */ e.jsx(
|
|
2015
|
-
/* @__PURE__ */ e.jsx(
|
|
2016
|
-
/* @__PURE__ */ e.jsx(
|
|
2451
|
+
/* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
|
|
2452
|
+
/* @__PURE__ */ e.jsx(ge, { badge: { variant: i.metrics.match ? "success" : "warning", label: i.metrics.match ? "Match" : "Different" }, children: "Metrics" }),
|
|
2453
|
+
i.metrics.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All metrics match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.metrics.changed && Object.keys(i.metrics.changed).length > 0 && /* @__PURE__ */ e.jsxs(B, { children: [
|
|
2454
|
+
/* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2455
|
+
/* @__PURE__ */ e.jsx(w, { children: "Metric" }),
|
|
2456
|
+
/* @__PURE__ */ e.jsx(w, { children: "Run A" }),
|
|
2457
|
+
/* @__PURE__ */ e.jsx(w, { children: "Run B" })
|
|
2017
2458
|
] }) }),
|
|
2018
|
-
/* @__PURE__ */ e.jsx(
|
|
2019
|
-
/* @__PURE__ */ e.jsx(
|
|
2020
|
-
/* @__PURE__ */ e.jsx(
|
|
2021
|
-
/* @__PURE__ */ e.jsx(
|
|
2459
|
+
/* @__PURE__ */ e.jsx(U, { children: Object.entries(i.metrics.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2460
|
+
/* @__PURE__ */ e.jsx(d, { children: h }),
|
|
2461
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: m.a }),
|
|
2462
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: m.b })
|
|
2022
2463
|
] }, h)) })
|
|
2023
2464
|
] }) })
|
|
2024
2465
|
] }),
|
|
2025
|
-
i.circuit_diff && /* @__PURE__ */ e.jsxs(
|
|
2026
|
-
/* @__PURE__ */ e.jsx(
|
|
2466
|
+
i.circuit_diff && /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
|
|
2467
|
+
/* @__PURE__ */ e.jsx(ge, { badge: { variant: i.circuit_diff.match ? "success" : "warning", label: i.circuit_diff.match ? "Match" : "Different" }, children: "Circuit" }),
|
|
2027
2468
|
i.circuit_diff.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "Circuit structure matches" }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
2028
2469
|
i.circuit_diff.changed && Object.keys(i.circuit_diff.changed).length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2029
2470
|
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "Changed Properties" }),
|
|
2030
|
-
/* @__PURE__ */ e.jsxs(
|
|
2031
|
-
/* @__PURE__ */ e.jsx(
|
|
2032
|
-
/* @__PURE__ */ e.jsx(
|
|
2033
|
-
/* @__PURE__ */ e.jsx(
|
|
2034
|
-
/* @__PURE__ */ e.jsx(
|
|
2035
|
-
/* @__PURE__ */ e.jsx(
|
|
2471
|
+
/* @__PURE__ */ e.jsxs(B, { children: [
|
|
2472
|
+
/* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2473
|
+
/* @__PURE__ */ e.jsx(w, { children: "Property" }),
|
|
2474
|
+
/* @__PURE__ */ e.jsx(w, { children: "Run A" }),
|
|
2475
|
+
/* @__PURE__ */ e.jsx(w, { children: "Run B" }),
|
|
2476
|
+
/* @__PURE__ */ e.jsx(w, { children: "Delta" })
|
|
2036
2477
|
] }) }),
|
|
2037
|
-
/* @__PURE__ */ e.jsx(
|
|
2038
|
-
/* @__PURE__ */ e.jsx(
|
|
2039
|
-
/* @__PURE__ */ e.jsx(
|
|
2040
|
-
/* @__PURE__ */ e.jsx(
|
|
2041
|
-
/* @__PURE__ */ e.jsx(
|
|
2478
|
+
/* @__PURE__ */ e.jsx(U, { children: Object.entries(i.circuit_diff.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2479
|
+
/* @__PURE__ */ e.jsx(d, { children: m.label || h }),
|
|
2480
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(m.a) }),
|
|
2481
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(m.b) }),
|
|
2482
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: m.delta != null && /* @__PURE__ */ e.jsxs("span", { className: m.delta > 0 ? "text-danger" : "text-success", children: [
|
|
2042
2483
|
m.delta > 0 ? "+" : "",
|
|
2043
2484
|
m.delta,
|
|
2044
2485
|
m.pct != null && ` (${m.pct > 0 ? "+" : ""}${m.pct.toFixed(1)}%)`
|
|
@@ -2048,89 +2489,89 @@ function Kr({ runIdA: r, runIdB: t }) {
|
|
|
2048
2489
|
] }),
|
|
2049
2490
|
i.circuit_diff.is_clifford_changed && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2050
2491
|
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "Clifford Status" }),
|
|
2051
|
-
/* @__PURE__ */ e.jsx(
|
|
2492
|
+
/* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
|
|
2052
2493
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2053
|
-
/* @__PURE__ */ e.jsx(
|
|
2054
|
-
/* @__PURE__ */ e.jsx(
|
|
2494
|
+
/* @__PURE__ */ e.jsx(d, { children: "Run A" }),
|
|
2495
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: i.circuit_diff.is_clifford_a != null ? String(i.circuit_diff.is_clifford_a) : "unknown" })
|
|
2055
2496
|
] }),
|
|
2056
2497
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2057
|
-
/* @__PURE__ */ e.jsx(
|
|
2058
|
-
/* @__PURE__ */ e.jsx(
|
|
2498
|
+
/* @__PURE__ */ e.jsx(d, { children: "Run B" }),
|
|
2499
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: i.circuit_diff.is_clifford_b != null ? String(i.circuit_diff.is_clifford_b) : "unknown" })
|
|
2059
2500
|
] })
|
|
2060
2501
|
] }) })
|
|
2061
2502
|
] }),
|
|
2062
2503
|
i.circuit_diff.added_gates && i.circuit_diff.added_gates.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2063
2504
|
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "New Gate Types (in B)" }),
|
|
2064
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.added_gates.map((h) => /* @__PURE__ */ e.jsx(
|
|
2505
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.added_gates.map((h) => /* @__PURE__ */ e.jsx(re, { variant: "success", children: h }, h)) })
|
|
2065
2506
|
] }),
|
|
2066
2507
|
i.circuit_diff.removed_gates && i.circuit_diff.removed_gates.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2067
2508
|
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "Removed Gate Types (from A)" }),
|
|
2068
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.removed_gates.map((h) => /* @__PURE__ */ e.jsx(
|
|
2509
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.removed_gates.map((h) => /* @__PURE__ */ e.jsx(re, { variant: "danger", children: h }, h)) })
|
|
2069
2510
|
] })
|
|
2070
2511
|
] })
|
|
2071
2512
|
] }),
|
|
2072
|
-
i.tvd != null && /* @__PURE__ */ e.jsxs(
|
|
2073
|
-
/* @__PURE__ */ e.jsx(
|
|
2074
|
-
/* @__PURE__ */ e.jsx(
|
|
2513
|
+
i.tvd != null && /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
|
|
2514
|
+
/* @__PURE__ */ e.jsx(ge, { children: "Results Distribution" }),
|
|
2515
|
+
/* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
|
|
2075
2516
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2076
|
-
/* @__PURE__ */ e.jsx(
|
|
2077
|
-
/* @__PURE__ */ e.jsx(
|
|
2517
|
+
/* @__PURE__ */ e.jsx(d, { children: "Total Variation Distance (TVD)" }),
|
|
2518
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono font-medium", children: i.tvd.toFixed(6) })
|
|
2078
2519
|
] }),
|
|
2079
2520
|
i.shots && /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2080
|
-
/* @__PURE__ */ e.jsx(
|
|
2081
|
-
/* @__PURE__ */ e.jsxs(
|
|
2521
|
+
/* @__PURE__ */ e.jsx(d, { children: "Total Shots (A / B)" }),
|
|
2522
|
+
/* @__PURE__ */ e.jsxs(d, { className: "font-mono", children: [
|
|
2082
2523
|
i.shots.a,
|
|
2083
2524
|
" / ",
|
|
2084
2525
|
i.shots.b
|
|
2085
2526
|
] })
|
|
2086
2527
|
] }),
|
|
2087
2528
|
i.noise_context?.noise_p95 && /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2088
|
-
/* @__PURE__ */ e.jsx(
|
|
2089
|
-
/* @__PURE__ */ e.jsx(
|
|
2529
|
+
/* @__PURE__ */ e.jsx(d, { children: "Noise Threshold (p95)" }),
|
|
2530
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: i.noise_context.noise_p95.toFixed(6) })
|
|
2090
2531
|
] }),
|
|
2091
2532
|
i.noise_context?.p_value != null && /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2092
|
-
/* @__PURE__ */ e.jsx(
|
|
2093
|
-
/* @__PURE__ */ e.jsx(
|
|
2533
|
+
/* @__PURE__ */ e.jsx(d, { children: "p-value" }),
|
|
2534
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: i.noise_context.p_value.toFixed(4) })
|
|
2094
2535
|
] })
|
|
2095
2536
|
] }) }),
|
|
2096
|
-
/* @__PURE__ */ e.jsx(
|
|
2537
|
+
/* @__PURE__ */ e.jsx(pr, { tvd: i.tvd, noiseContext: i.noise_context })
|
|
2097
2538
|
] })
|
|
2098
2539
|
] });
|
|
2099
2540
|
}
|
|
2100
|
-
function
|
|
2101
|
-
const [
|
|
2102
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2541
|
+
function br() {
|
|
2542
|
+
const [t] = He(), s = t.get("a"), a = t.get("b"), n = s && a;
|
|
2543
|
+
return /* @__PURE__ */ e.jsxs(Q, { children: [
|
|
2103
2544
|
/* @__PURE__ */ e.jsx("div", { className: "page-header", children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
2104
2545
|
/* @__PURE__ */ e.jsx("h1", { className: "page-title", children: "Compare Runs" }),
|
|
2105
|
-
|
|
2546
|
+
n && /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-1 text-muted", children: /* @__PURE__ */ e.jsx(se, { to: "/diff", children: "← Select different runs" }) })
|
|
2106
2547
|
] }) }),
|
|
2107
|
-
|
|
2548
|
+
n ? /* @__PURE__ */ e.jsx(vr, { runIdA: s, runIdB: a }) : /* @__PURE__ */ e.jsx(gr, {})
|
|
2108
2549
|
] });
|
|
2109
2550
|
}
|
|
2110
|
-
function
|
|
2111
|
-
const { api:
|
|
2112
|
-
const
|
|
2113
|
-
return
|
|
2114
|
-
}), p = (
|
|
2115
|
-
if (
|
|
2116
|
-
|
|
2551
|
+
function yr() {
|
|
2552
|
+
const { api: t } = K(), [s, a] = T(""), [n, l] = T(null), [o, c] = T(!1), [i, u] = T(""), { mutate: h, loading: m } = Fe(async () => {
|
|
2553
|
+
const b = await t.listRuns({ q: s, limit: 100 });
|
|
2554
|
+
return l(b.runs), c(!0), b;
|
|
2555
|
+
}), p = (b) => {
|
|
2556
|
+
if (b.preventDefault(), !s.trim()) {
|
|
2557
|
+
u("Please enter a search query");
|
|
2117
2558
|
return;
|
|
2118
2559
|
}
|
|
2119
|
-
|
|
2560
|
+
u(""), h();
|
|
2120
2561
|
};
|
|
2121
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2562
|
+
return /* @__PURE__ */ e.jsxs(Q, { children: [
|
|
2122
2563
|
/* @__PURE__ */ e.jsx("div", { className: "page-header", children: /* @__PURE__ */ e.jsx("h1", { className: "page-title", children: "Search Runs" }) }),
|
|
2123
|
-
/* @__PURE__ */ e.jsx(
|
|
2124
|
-
/* @__PURE__ */ e.jsxs(
|
|
2125
|
-
/* @__PURE__ */ e.jsx(
|
|
2564
|
+
/* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("form", { onSubmit: p, children: [
|
|
2565
|
+
/* @__PURE__ */ e.jsxs(xe, { children: [
|
|
2566
|
+
/* @__PURE__ */ e.jsx(ve, { htmlFor: "q", children: "Query" }),
|
|
2126
2567
|
/* @__PURE__ */ e.jsx(
|
|
2127
|
-
|
|
2568
|
+
jt,
|
|
2128
2569
|
{
|
|
2129
2570
|
id: "q",
|
|
2130
2571
|
type: "text",
|
|
2131
|
-
value:
|
|
2132
|
-
onChange: (
|
|
2133
|
-
|
|
2572
|
+
value: s,
|
|
2573
|
+
onChange: (b) => {
|
|
2574
|
+
a(b.target.value), u("");
|
|
2134
2575
|
},
|
|
2135
2576
|
placeholder: "metric.fidelity > 0.95 and params.shots = 1000",
|
|
2136
2577
|
className: "font-mono"
|
|
@@ -2139,284 +2580,293 @@ function Jr() {
|
|
|
2139
2580
|
] }),
|
|
2140
2581
|
i && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-[#DC4A4A] mb-3", children: i }),
|
|
2141
2582
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
2142
|
-
/* @__PURE__ */ e.jsxs(
|
|
2143
|
-
m && /* @__PURE__ */ e.jsx(
|
|
2583
|
+
/* @__PURE__ */ e.jsxs($, { type: "submit", variant: "primary", disabled: m, children: [
|
|
2584
|
+
m && /* @__PURE__ */ e.jsx(G, {}),
|
|
2144
2585
|
"Search"
|
|
2145
2586
|
] }),
|
|
2146
2587
|
m && /* @__PURE__ */ e.jsx("span", { className: "text-muted text-sm", children: "Searching..." })
|
|
2147
2588
|
] })
|
|
2148
2589
|
] }) }),
|
|
2149
|
-
o &&
|
|
2590
|
+
o && n && /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: n.length > 0 ? /* @__PURE__ */ e.jsx(pt, { runs: n }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted text-center py-8", children: "No runs match your query" }) }),
|
|
2150
2591
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
2151
|
-
/* @__PURE__ */ e.jsxs(
|
|
2152
|
-
/* @__PURE__ */ e.jsx(
|
|
2153
|
-
/* @__PURE__ */ e.jsxs(
|
|
2154
|
-
/* @__PURE__ */ e.jsx(
|
|
2155
|
-
/* @__PURE__ */ e.jsx(
|
|
2156
|
-
/* @__PURE__ */ e.jsx(
|
|
2592
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
2593
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Query Syntax" }) }),
|
|
2594
|
+
/* @__PURE__ */ e.jsxs(B, { children: [
|
|
2595
|
+
/* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2596
|
+
/* @__PURE__ */ e.jsx(w, { children: "Field" }),
|
|
2597
|
+
/* @__PURE__ */ e.jsx(w, { children: "Description" })
|
|
2157
2598
|
] }) }),
|
|
2158
|
-
/* @__PURE__ */ e.jsxs(
|
|
2599
|
+
/* @__PURE__ */ e.jsxs(U, { children: [
|
|
2159
2600
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2160
|
-
/* @__PURE__ */ e.jsx(
|
|
2161
|
-
/* @__PURE__ */ e.jsx(
|
|
2601
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "params.X" }),
|
|
2602
|
+
/* @__PURE__ */ e.jsx(d, { children: "Parameter value" })
|
|
2162
2603
|
] }),
|
|
2163
2604
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2164
|
-
/* @__PURE__ */ e.jsx(
|
|
2165
|
-
/* @__PURE__ */ e.jsx(
|
|
2605
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "metric.X" }),
|
|
2606
|
+
/* @__PURE__ */ e.jsx(d, { children: "Metric value" })
|
|
2166
2607
|
] }),
|
|
2167
2608
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2168
|
-
/* @__PURE__ */ e.jsx(
|
|
2169
|
-
/* @__PURE__ */ e.jsx(
|
|
2609
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "tags.X" }),
|
|
2610
|
+
/* @__PURE__ */ e.jsx(d, { children: "Tag value" })
|
|
2170
2611
|
] }),
|
|
2171
2612
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2172
|
-
/* @__PURE__ */ e.jsx(
|
|
2173
|
-
/* @__PURE__ */ e.jsx(
|
|
2613
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "status" }),
|
|
2614
|
+
/* @__PURE__ */ e.jsx(d, { children: "Run status" })
|
|
2174
2615
|
] }),
|
|
2175
2616
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2176
|
-
/* @__PURE__ */ e.jsx(
|
|
2177
|
-
/* @__PURE__ */ e.jsx(
|
|
2617
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "project" }),
|
|
2618
|
+
/* @__PURE__ */ e.jsx(d, { children: "Project name" })
|
|
2178
2619
|
] }),
|
|
2179
2620
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2180
|
-
/* @__PURE__ */ e.jsx(
|
|
2181
|
-
/* @__PURE__ */ e.jsx(
|
|
2621
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "backend" }),
|
|
2622
|
+
/* @__PURE__ */ e.jsx(d, { children: "Backend name" })
|
|
2182
2623
|
] })
|
|
2183
2624
|
] })
|
|
2184
2625
|
] })
|
|
2185
2626
|
] }),
|
|
2186
|
-
/* @__PURE__ */ e.jsxs(
|
|
2187
|
-
/* @__PURE__ */ e.jsx(
|
|
2188
|
-
/* @__PURE__ */ e.jsxs(
|
|
2189
|
-
/* @__PURE__ */ e.jsx(
|
|
2190
|
-
/* @__PURE__ */ e.jsx(
|
|
2191
|
-
/* @__PURE__ */ e.jsx(
|
|
2627
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
2628
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Operators" }) }),
|
|
2629
|
+
/* @__PURE__ */ e.jsxs(B, { children: [
|
|
2630
|
+
/* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
|
|
2631
|
+
/* @__PURE__ */ e.jsx(w, { children: "Operator" }),
|
|
2632
|
+
/* @__PURE__ */ e.jsx(w, { children: "Description" })
|
|
2192
2633
|
] }) }),
|
|
2193
|
-
/* @__PURE__ */ e.jsxs(
|
|
2634
|
+
/* @__PURE__ */ e.jsxs(U, { children: [
|
|
2194
2635
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2195
|
-
/* @__PURE__ */ e.jsx(
|
|
2196
|
-
/* @__PURE__ */ e.jsx(
|
|
2636
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "=" }),
|
|
2637
|
+
/* @__PURE__ */ e.jsx(d, { children: "Equals" })
|
|
2197
2638
|
] }),
|
|
2198
2639
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2199
|
-
/* @__PURE__ */ e.jsx(
|
|
2200
|
-
/* @__PURE__ */ e.jsx(
|
|
2640
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "!=" }),
|
|
2641
|
+
/* @__PURE__ */ e.jsx(d, { children: "Not equals" })
|
|
2201
2642
|
] }),
|
|
2202
2643
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2203
|
-
/* @__PURE__ */ e.jsx(
|
|
2204
|
-
/* @__PURE__ */ e.jsx(
|
|
2644
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: ">" }),
|
|
2645
|
+
/* @__PURE__ */ e.jsx(d, { children: "Greater than" })
|
|
2205
2646
|
] }),
|
|
2206
2647
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2207
|
-
/* @__PURE__ */ e.jsx(
|
|
2208
|
-
/* @__PURE__ */ e.jsx(
|
|
2648
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: ">=" }),
|
|
2649
|
+
/* @__PURE__ */ e.jsx(d, { children: "Greater or equal" })
|
|
2209
2650
|
] }),
|
|
2210
2651
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2211
|
-
/* @__PURE__ */ e.jsx(
|
|
2212
|
-
/* @__PURE__ */ e.jsx(
|
|
2652
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "<" }),
|
|
2653
|
+
/* @__PURE__ */ e.jsx(d, { children: "Less than" })
|
|
2213
2654
|
] }),
|
|
2214
2655
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2215
|
-
/* @__PURE__ */ e.jsx(
|
|
2216
|
-
/* @__PURE__ */ e.jsx(
|
|
2656
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "<=" }),
|
|
2657
|
+
/* @__PURE__ */ e.jsx(d, { children: "Less or equal" })
|
|
2217
2658
|
] }),
|
|
2218
2659
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2219
|
-
/* @__PURE__ */ e.jsx(
|
|
2220
|
-
/* @__PURE__ */ e.jsx(
|
|
2660
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "~" }),
|
|
2661
|
+
/* @__PURE__ */ e.jsx(d, { children: "Contains" })
|
|
2221
2662
|
] }),
|
|
2222
2663
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2223
|
-
/* @__PURE__ */ e.jsx(
|
|
2224
|
-
/* @__PURE__ */ e.jsx(
|
|
2664
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "and" }),
|
|
2665
|
+
/* @__PURE__ */ e.jsx(d, { children: "Combine conditions" })
|
|
2225
2666
|
] })
|
|
2226
2667
|
] })
|
|
2227
2668
|
] })
|
|
2228
2669
|
] })
|
|
2229
2670
|
] }),
|
|
2230
|
-
/* @__PURE__ */ e.jsxs(
|
|
2231
|
-
/* @__PURE__ */ e.jsx(
|
|
2232
|
-
/* @__PURE__ */ e.jsx(
|
|
2671
|
+
/* @__PURE__ */ e.jsxs(N, { className: "mt-4", children: [
|
|
2672
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Examples" }) }),
|
|
2673
|
+
/* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
|
|
2233
2674
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2234
|
-
/* @__PURE__ */ e.jsx(
|
|
2235
|
-
/* @__PURE__ */ e.jsx(
|
|
2675
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "metric.fidelity > 0.95" }),
|
|
2676
|
+
/* @__PURE__ */ e.jsx(d, { children: "High fidelity runs" })
|
|
2236
2677
|
] }),
|
|
2237
2678
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2238
|
-
/* @__PURE__ */ e.jsx(
|
|
2239
|
-
/* @__PURE__ */ e.jsx(
|
|
2679
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "params.shots = 1000 and status = FINISHED" }),
|
|
2680
|
+
/* @__PURE__ */ e.jsx(d, { children: "Finished runs with 1000 shots" })
|
|
2240
2681
|
] }),
|
|
2241
2682
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2242
|
-
/* @__PURE__ */ e.jsx(
|
|
2243
|
-
/* @__PURE__ */ e.jsx(
|
|
2683
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "tags.backend ~ ibm" }),
|
|
2684
|
+
/* @__PURE__ */ e.jsx(d, { children: "Runs with IBM backends" })
|
|
2244
2685
|
] }),
|
|
2245
2686
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2246
|
-
/* @__PURE__ */ e.jsx(
|
|
2247
|
-
/* @__PURE__ */ e.jsx(
|
|
2687
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "metric.error < 0.01" }),
|
|
2688
|
+
/* @__PURE__ */ e.jsx(d, { children: "Low error runs" })
|
|
2248
2689
|
] }),
|
|
2249
2690
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
2250
|
-
/* @__PURE__ */ e.jsx(
|
|
2251
|
-
/* @__PURE__ */ e.jsx(
|
|
2691
|
+
/* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "project = vqe and metric.energy < -2.0" }),
|
|
2692
|
+
/* @__PURE__ */ e.jsx(d, { children: "VQE runs with low energy" })
|
|
2252
2693
|
] })
|
|
2253
2694
|
] }) })
|
|
2254
2695
|
] })
|
|
2255
2696
|
] });
|
|
2256
2697
|
}
|
|
2257
|
-
function
|
|
2258
|
-
const { runId:
|
|
2259
|
-
|
|
2260
|
-
if (
|
|
2698
|
+
function Nr() {
|
|
2699
|
+
const { runId: t, index: s } = xt(), a = parseInt(s, 10), { api: n } = K(), { data: l } = Yt(t), { data: o, loading: c, error: i } = Ws(t, a), [u, h] = T(null);
|
|
2700
|
+
de(() => {
|
|
2701
|
+
if (u) {
|
|
2261
2702
|
const S = setTimeout(() => h(null), 3e3);
|
|
2262
2703
|
return () => clearTimeout(S);
|
|
2263
2704
|
}
|
|
2264
|
-
}, [
|
|
2705
|
+
}, [u]);
|
|
2265
2706
|
const m = async () => {
|
|
2266
2707
|
try {
|
|
2267
|
-
const S =
|
|
2268
|
-
if (!
|
|
2269
|
-
const
|
|
2270
|
-
|
|
2708
|
+
const S = n.getArtifactDownloadUrl(t, a), ie = await fetch(S);
|
|
2709
|
+
if (!ie.ok) throw new Error("Download failed");
|
|
2710
|
+
const ce = await ie.blob(), Z = document.createElement("a");
|
|
2711
|
+
Z.href = URL.createObjectURL(ce), Z.download = p?.kind || `artifact-${a}`, Z.click(), URL.revokeObjectURL(Z.href), h({ message: "Download complete", variant: "success" });
|
|
2271
2712
|
} catch {
|
|
2272
2713
|
h({ message: "Download failed", variant: "error" });
|
|
2273
2714
|
}
|
|
2274
2715
|
};
|
|
2275
|
-
if (
|
|
2276
|
-
return /* @__PURE__ */ e.jsx(
|
|
2716
|
+
if (c)
|
|
2717
|
+
return /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(G, {}) }) });
|
|
2277
2718
|
if (i || !o)
|
|
2278
|
-
return /* @__PURE__ */ e.jsx(
|
|
2279
|
-
const { artifact: p, size:
|
|
2280
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2719
|
+
return /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(we, { message: "Artifact not found", hint: i?.message }) }) });
|
|
2720
|
+
const { artifact: p, size: b, content: D, content_json: g, preview_available: I, error: E } = o, A = 10 * 1024 * 1024;
|
|
2721
|
+
return /* @__PURE__ */ e.jsxs(Q, { children: [
|
|
2281
2722
|
/* @__PURE__ */ e.jsx(
|
|
2282
|
-
|
|
2723
|
+
Oe,
|
|
2283
2724
|
{
|
|
2284
2725
|
title: p.kind,
|
|
2285
2726
|
subtitle: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2286
2727
|
"← Back to run ",
|
|
2287
|
-
/* @__PURE__ */ e.jsxs(
|
|
2288
|
-
|
|
2289
|
-
|
|
2728
|
+
/* @__PURE__ */ e.jsxs(se, { to: `/runs/${t}`, children: [
|
|
2729
|
+
oe(t),
|
|
2730
|
+
l?.run_name && ` — ${l.run_name}`
|
|
2290
2731
|
] })
|
|
2291
2732
|
] }),
|
|
2292
|
-
actions: /* @__PURE__ */ e.jsx(
|
|
2733
|
+
actions: /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: m, children: "Download" })
|
|
2293
2734
|
}
|
|
2294
2735
|
),
|
|
2295
|
-
/* @__PURE__ */ e.jsx(
|
|
2736
|
+
/* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsx(ot, { items: [
|
|
2296
2737
|
{ label: "Kind", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono", children: p.kind }) },
|
|
2297
|
-
{ label: "Role", value: /* @__PURE__ */ e.jsx(
|
|
2738
|
+
{ label: "Role", value: /* @__PURE__ */ e.jsx(re, { variant: "gray", children: p.role }) },
|
|
2298
2739
|
{ label: "Media Type", value: p.media_type },
|
|
2299
2740
|
{ label: "Digest", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm", children: p.digest }) },
|
|
2300
|
-
{ label: "Size", value:
|
|
2741
|
+
{ label: "Size", value: Ve(b) }
|
|
2301
2742
|
] }) }),
|
|
2302
|
-
/* @__PURE__ */ e.jsxs(
|
|
2303
|
-
/* @__PURE__ */ e.jsx(
|
|
2304
|
-
|
|
2743
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
2744
|
+
/* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Content" }) }),
|
|
2745
|
+
E ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2305
2746
|
/* @__PURE__ */ e.jsxs("p", { className: "text-sm text-danger", children: [
|
|
2306
2747
|
"Error loading artifact: ",
|
|
2307
|
-
|
|
2748
|
+
E
|
|
2308
2749
|
] }),
|
|
2309
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-muted mt-2", children: /* @__PURE__ */ e.jsx(
|
|
2310
|
-
] }) :
|
|
2750
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-muted mt-2", children: /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: m, children: "Download to view" }) })
|
|
2751
|
+
] }) : I ? g ? /* @__PURE__ */ e.jsx("pre", { children: $s(g) }) : D ? /* @__PURE__ */ e.jsx("pre", { children: D }) : /* @__PURE__ */ e.jsxs("p", { className: "text-muted", children: [
|
|
2311
2752
|
"Binary content (",
|
|
2312
|
-
|
|
2753
|
+
Ve(b),
|
|
2313
2754
|
") — download to view"
|
|
2314
2755
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2315
2756
|
/* @__PURE__ */ e.jsxs("p", { className: "text-muted", children: [
|
|
2316
2757
|
/* @__PURE__ */ e.jsx("strong", { children: "Artifact too large for preview" }),
|
|
2317
2758
|
" (",
|
|
2318
|
-
|
|
2759
|
+
Ve(b),
|
|
2319
2760
|
" exceeds ",
|
|
2320
|
-
|
|
2761
|
+
Ve(A),
|
|
2321
2762
|
" limit)"
|
|
2322
2763
|
] }),
|
|
2323
2764
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-2", children: "Download the artifact to view its contents." }),
|
|
2324
|
-
/* @__PURE__ */ e.jsx("p", { className: "mt-4", children: /* @__PURE__ */ e.jsx(
|
|
2765
|
+
/* @__PURE__ */ e.jsx("p", { className: "mt-4", children: /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: m, children: "Download" }) })
|
|
2325
2766
|
] })
|
|
2326
2767
|
] }),
|
|
2327
|
-
|
|
2328
|
-
|
|
2768
|
+
u && /* @__PURE__ */ e.jsx(
|
|
2769
|
+
Me,
|
|
2329
2770
|
{
|
|
2330
|
-
message:
|
|
2331
|
-
variant:
|
|
2332
|
-
visible: !!
|
|
2771
|
+
message: u.message,
|
|
2772
|
+
variant: u.variant,
|
|
2773
|
+
visible: !!u,
|
|
2333
2774
|
onClose: () => h(null)
|
|
2334
2775
|
}
|
|
2335
2776
|
)
|
|
2336
2777
|
] });
|
|
2337
2778
|
}
|
|
2338
|
-
const
|
|
2339
|
-
{ path: "/", element: /* @__PURE__ */ e.jsx(
|
|
2340
|
-
{ path: "/runs", element: /* @__PURE__ */ e.jsx(
|
|
2341
|
-
{ path: "/runs/:runId", element: /* @__PURE__ */ e.jsx(
|
|
2342
|
-
{ path: "/runs/:runId/artifacts/:index", element: /* @__PURE__ */ e.jsx(
|
|
2343
|
-
{ path: "/projects", element: /* @__PURE__ */ e.jsx(
|
|
2344
|
-
{ path: "/groups", element: /* @__PURE__ */ e.jsx(
|
|
2345
|
-
{ path: "/groups/:groupId", element: /* @__PURE__ */ e.jsx(
|
|
2346
|
-
{ path: "/diff", element: /* @__PURE__ */ e.jsx(
|
|
2347
|
-
{ path: "/search", element: /* @__PURE__ */ e.jsx(
|
|
2779
|
+
const _r = [
|
|
2780
|
+
{ path: "/", element: /* @__PURE__ */ e.jsx(ks, { to: "/runs", replace: !0 }) },
|
|
2781
|
+
{ path: "/runs", element: /* @__PURE__ */ e.jsx(Hs, {}) },
|
|
2782
|
+
{ path: "/runs/:runId", element: /* @__PURE__ */ e.jsx(or, {}) },
|
|
2783
|
+
{ path: "/runs/:runId/artifacts/:index", element: /* @__PURE__ */ e.jsx(Nr, {}) },
|
|
2784
|
+
{ path: "/projects", element: /* @__PURE__ */ e.jsx(dr, {}) },
|
|
2785
|
+
{ path: "/groups", element: /* @__PURE__ */ e.jsx(ur, {}) },
|
|
2786
|
+
{ path: "/groups/:groupId", element: /* @__PURE__ */ e.jsx(hr, {}) },
|
|
2787
|
+
{ path: "/diff", element: /* @__PURE__ */ e.jsx(br, {}) },
|
|
2788
|
+
{ path: "/search", element: /* @__PURE__ */ e.jsx(yr, {}) }
|
|
2348
2789
|
];
|
|
2349
|
-
function
|
|
2350
|
-
return
|
|
2790
|
+
function Xt(t = []) {
|
|
2791
|
+
return Cs([..._r, ...t]);
|
|
2351
2792
|
}
|
|
2352
|
-
const
|
|
2353
|
-
function
|
|
2354
|
-
const
|
|
2355
|
-
return /* @__PURE__ */ e.jsx(
|
|
2793
|
+
const wr = Xt();
|
|
2794
|
+
function Dr({ additionalRoutes: t, ...s }) {
|
|
2795
|
+
const a = t?.length ? Xt(t) : wr;
|
|
2796
|
+
return /* @__PURE__ */ e.jsx(qs, { ...s, children: /* @__PURE__ */ e.jsx(Ts, { router: a }) });
|
|
2356
2797
|
}
|
|
2357
2798
|
export {
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2799
|
+
Pr as Alert,
|
|
2800
|
+
As as ApiClient,
|
|
2801
|
+
Ae as ApiError,
|
|
2802
|
+
Dr as App,
|
|
2803
|
+
qs as AppProvider,
|
|
2804
|
+
Nr as ArtifactPage,
|
|
2805
|
+
re as Badge,
|
|
2806
|
+
$ as Button,
|
|
2807
|
+
N as Card,
|
|
2808
|
+
Y as CardHeader,
|
|
2809
|
+
H as CardTitle,
|
|
2810
|
+
br as DiffPage,
|
|
2811
|
+
we as EmptyState,
|
|
2812
|
+
Xs as ExportRunButton,
|
|
2813
|
+
xe as FormGroup,
|
|
2814
|
+
Kt as FormRow,
|
|
2815
|
+
hr as GroupDetailPage,
|
|
2816
|
+
ur as GroupsPage,
|
|
2817
|
+
Js as GroupsTable,
|
|
2818
|
+
jt as Input,
|
|
2819
|
+
ot as KVList,
|
|
2820
|
+
ve as Label,
|
|
2821
|
+
Q as Layout,
|
|
2822
|
+
Sr as LayoutConfigProvider,
|
|
2823
|
+
ft as Modal,
|
|
2824
|
+
nt as POLL_INTERVAL,
|
|
2825
|
+
Oe as PageHeader,
|
|
2826
|
+
dr as ProjectsPage,
|
|
2827
|
+
Ks as ProjectsTable,
|
|
2828
|
+
or as RunDetailPage,
|
|
2829
|
+
Hs as RunsPage,
|
|
2830
|
+
pt as RunsTable,
|
|
2831
|
+
yr as SearchPage,
|
|
2832
|
+
_e as Select,
|
|
2833
|
+
G as Spinner,
|
|
2834
|
+
Jt as StatusBadge,
|
|
2835
|
+
B as Table,
|
|
2836
|
+
U as TableBody,
|
|
2837
|
+
d as TableCell,
|
|
2838
|
+
fe as TableHead,
|
|
2839
|
+
w as TableHeader,
|
|
2397
2840
|
j as TableRow,
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2841
|
+
Cr as ThemeProvider,
|
|
2842
|
+
Me as Toast,
|
|
2843
|
+
Fs as api,
|
|
2844
|
+
kr as buildUrl,
|
|
2845
|
+
q as cn,
|
|
2846
|
+
_r as coreRoutes,
|
|
2847
|
+
Xt as createRouter,
|
|
2848
|
+
Ut as elapsedSeconds,
|
|
2849
|
+
Ve as formatBytes,
|
|
2850
|
+
Wt as formatDuration,
|
|
2851
|
+
lt as formatNumber,
|
|
2852
|
+
$e as isTerminalStatus,
|
|
2853
|
+
$s as jsonPretty,
|
|
2854
|
+
wr as router,
|
|
2855
|
+
ct as shortDigest,
|
|
2856
|
+
oe as shortId,
|
|
2857
|
+
Ye as timeAgo,
|
|
2858
|
+
Os as truncate,
|
|
2412
2859
|
K as useApp,
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2860
|
+
Ws as useArtifact,
|
|
2861
|
+
Us as useDiff,
|
|
2862
|
+
Bs as useGroup,
|
|
2863
|
+
Is as useGroups,
|
|
2864
|
+
zs as useLayoutConfig,
|
|
2865
|
+
Fe as useMutation,
|
|
2866
|
+
mt as usePolling,
|
|
2867
|
+
Ke as useProjects,
|
|
2868
|
+
Yt as useRun,
|
|
2869
|
+
zt as useRuns,
|
|
2870
|
+
Ms as useTheme,
|
|
2871
|
+
Tr as useThemeOptional
|
|
2422
2872
|
};
|