@burdenoff/microfe-sandbox 2026.625.3 → 2026.626.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sandbox/components/SandboxActivityTab.js +26 -23
- package/dist/sandbox/components/SandboxActivityTab.js.map +1 -1
- package/dist/sandbox/pages/AdminPage.js +327 -291
- package/dist/sandbox/pages/AdminPage.js.map +1 -1
- package/dist/sandbox/pages/AdminTemplatesPage.js +137 -132
- package/dist/sandbox/pages/AdminTemplatesPage.js.map +1 -1
- package/dist/sandbox/pages/SandboxCreatePage.js +300 -297
- package/dist/sandbox/pages/SandboxCreatePage.js.map +1 -1
- package/dist/sandbox/pages/SandboxDetailPage.js +422 -382
- package/dist/sandbox/pages/SandboxDetailPage.js.map +1 -1
- package/dist/sandbox/pages/SandboxListPage.js +301 -297
- package/dist/sandbox/pages/SandboxListPage.js.map +1 -1
- package/dist/sandbox/pages/TemplateDetailPage.js +249 -245
- package/dist/sandbox/pages/TemplateDetailPage.js.map +1 -1
- package/dist/sandbox/pages/UserTemplatesPage.js +26 -25
- package/dist/sandbox/pages/UserTemplatesPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
import { useSandbox as e } from "../providers/SandboxProvider.js";
|
|
2
2
|
import { joinPath as t } from "../utils/navigation.js";
|
|
3
|
-
import { Badge as n, Button as r, CTAOverflowMenu as i, Card as a, CardContent as o, Checkbox as ee, GlassCard as te, Input as ne, Select as re, SelectContent as ie, SelectItem as s, SelectTrigger as ae, SelectValue as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { tWithFallback as
|
|
6
|
-
import { StatusBadge as
|
|
7
|
-
import { ResourceDisplay as
|
|
8
|
-
import { SandboxTypeIcon as
|
|
9
|
-
import { CountdownTimer as
|
|
10
|
-
import { useSandboxStore as
|
|
11
|
-
import { useSandboxEvents as
|
|
12
|
-
import { PageLayout as
|
|
13
|
-
import { SandboxUsageBanner as
|
|
14
|
-
import { ExportSandboxesDialog as
|
|
15
|
-
import { ListSandboxesDocument as
|
|
16
|
-
import { SandboxKind as
|
|
17
|
-
import { nativeImpact as
|
|
18
|
-
import { useCallback as
|
|
19
|
-
import { PermissionGate as
|
|
20
|
-
import { AlertCircle as
|
|
21
|
-
import { useApolloClient as
|
|
22
|
-
import { useI18n as
|
|
23
|
-
import { Fragment as
|
|
24
|
-
import { AlertDialog as
|
|
3
|
+
import { Badge as n, Button as r, CTAOverflowMenu as i, Card as a, CardContent as o, Checkbox as ee, GlassCard as te, Input as ne, Select as re, SelectContent as ie, SelectItem as s, SelectTrigger as ae, SelectValue as oe, Skeleton as c } from "../components/ui.js";
|
|
4
|
+
import { cn as l } from "../utils/cn.js";
|
|
5
|
+
import { tWithFallback as u } from "../utils/i18n.js";
|
|
6
|
+
import { StatusBadge as se } from "../components/StatusBadge.js";
|
|
7
|
+
import { ResourceDisplay as ce } from "../components/ResourceDisplay.js";
|
|
8
|
+
import { SandboxTypeIcon as le } from "../components/SandboxTypeIcon.js";
|
|
9
|
+
import { CountdownTimer as ue } from "../components/CountdownTimer.js";
|
|
10
|
+
import { useSandboxStore as de } from "../store/sandboxStore.js";
|
|
11
|
+
import { useSandboxEvents as fe } from "../utils/sandboxEvents.js";
|
|
12
|
+
import { PageLayout as pe } from "../components/PageLayout.js";
|
|
13
|
+
import { SandboxUsageBanner as me } from "../components/SandboxUsageBanner.js";
|
|
14
|
+
import { ExportSandboxesDialog as he } from "../components/ExportSandboxesDialog.js";
|
|
15
|
+
import { ListSandboxesDocument as ge, useDeleteSandboxMutation as _e, useExtendSandboxTtlMutation as ve, useListSandboxesQuery as ye, useOnSandboxesChangedSubscription as be, useStopSandboxMutation as xe } from "../../generated/wspace-operations.js";
|
|
16
|
+
import { SandboxKind as d } from "../../generated/wspace-types.js";
|
|
17
|
+
import { nativeImpact as Se, nativeNotify as Ce } from "../../utils/nativeBridge.js";
|
|
18
|
+
import { useCallback as f, useMemo as p, useState as m } from "react";
|
|
19
|
+
import { PermissionGate as we } from "@burdenoff/fe-libs/shared/components";
|
|
20
|
+
import { AlertCircle as Te, Box as Ee, CheckCircle2 as De, ChevronLeft as Oe, ChevronRight as ke, Container as Ae, Database as je, Download as Me, Filter as Ne, Loader2 as h, Plus as Pe, Search as Fe, StopCircle as Ie, Timer as Le, Trash2 as g, X as _ } from "lucide-react";
|
|
21
|
+
import { useApolloClient as Re } from "@apollo/client/react";
|
|
22
|
+
import { useI18n as ze } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
23
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
24
|
+
import { AlertDialog as Be, AlertDialogAction as Ve, AlertDialogCancel as He, AlertDialogContent as Ue, AlertDialogDescription as We, AlertDialogFooter as Ge, AlertDialogHeader as Ke, AlertDialogTitle as qe, AuroraBackground as Je, EmphasisPanel as Ye, GradientText as Xe, IllustratedEmptyState as Ze, PagePurpose as Qe } from "@burdenoff/fe-libs/ui";
|
|
25
25
|
//#region src/sandbox/pages/SandboxListPage.tsx
|
|
26
|
-
var
|
|
26
|
+
var x = ["RUNNING"], S = ["RUNNING", "PENDING"], C = [
|
|
27
27
|
"STOPPED",
|
|
28
28
|
"ERROR",
|
|
29
29
|
"EXPIRED",
|
|
30
30
|
"FAILED"
|
|
31
|
-
],
|
|
32
|
-
function
|
|
31
|
+
], w = 5;
|
|
32
|
+
function $e(e) {
|
|
33
33
|
let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 6e4);
|
|
34
34
|
if (n < 1) return "just now";
|
|
35
35
|
if (n < 60) return `${n}m ago`;
|
|
36
36
|
let r = Math.floor(n / 60);
|
|
37
37
|
return r < 24 ? `${r}h ago` : `${Math.floor(r / 24)}d ago`;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function et(e) {
|
|
40
40
|
return {
|
|
41
41
|
...e.search?.trim() ? { search: e.search.trim() } : {},
|
|
42
42
|
...e.template && e.template !== "all" ? { template: e.template } : {},
|
|
43
43
|
...e.status && e.status !== "all" ? { status: e.status } : {},
|
|
44
|
-
kind:
|
|
44
|
+
kind: d.User
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function T(e) {
|
|
48
|
+
return x.includes(e.status);
|
|
49
|
+
}
|
|
50
|
+
function tt(e) {
|
|
48
51
|
return S.includes(e.status);
|
|
49
52
|
}
|
|
50
|
-
function
|
|
53
|
+
function nt(e) {
|
|
51
54
|
return C.includes(e.status);
|
|
52
55
|
}
|
|
53
|
-
function et(e) {
|
|
54
|
-
return w.includes(e.status);
|
|
55
|
-
}
|
|
56
56
|
function E(e, t) {
|
|
57
57
|
return e instanceof Error && e.message.trim() ? e.message : t;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function rt(e, t, n, r) {
|
|
60
60
|
let i = [`${e} ${t} sandbox${t === 1 ? "" : "es"}`];
|
|
61
61
|
return n > 0 && i.push(`${n} failed`), r > 0 && i.push(`${r} skipped`), i.join(" • ");
|
|
62
62
|
}
|
|
63
|
-
async function
|
|
63
|
+
async function it(e, t, n = w) {
|
|
64
64
|
let r = [];
|
|
65
65
|
for (let i = 0; i < e.length; i += n) {
|
|
66
66
|
let a = e.slice(i, i + n), o = await Promise.allSettled(a.map(t));
|
|
@@ -69,7 +69,7 @@ async function nt(e, t, n = T) {
|
|
|
69
69
|
return r;
|
|
70
70
|
}
|
|
71
71
|
function D() {
|
|
72
|
-
let { basePath:
|
|
72
|
+
let { basePath: d = "/", navigate: x } = e(), { sandboxFilter: S, updateFilter: C, resetFilter: w } = de(), D = Re(), { t: O } = ze(), [k, at] = m(!1), [A, j] = m(1), [M, N] = m(/* @__PURE__ */ new Map()), [P, F] = m(null), [I, L] = m(null), [ot, R] = m(null), { workspaceId: z } = e(), B = et(S), { data: st, loading: ct, refetch: V } = ye({
|
|
73
73
|
variables: {
|
|
74
74
|
context: { workspaceId: z },
|
|
75
75
|
filter: B,
|
|
@@ -79,8 +79,8 @@ function D() {
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
skip: !z
|
|
82
|
-
}), [H] =
|
|
83
|
-
|
|
82
|
+
}), [H] = xe(), [U] = _e(), [lt] = ve(), ut = fe(), [dt, ft] = m(!1);
|
|
83
|
+
be({
|
|
84
84
|
variables: { workspaceId: z },
|
|
85
85
|
skip: !z,
|
|
86
86
|
onData: ({ data: e }) => {
|
|
@@ -88,45 +88,45 @@ function D() {
|
|
|
88
88
|
t && (t.changeType === "CREATED" || t.changeType === "DELETED") && V();
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
let
|
|
92
|
-
|
|
93
|
-
}, [
|
|
94
|
-
|
|
95
|
-
}, [
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
},
|
|
91
|
+
let pt = st?.listSandboxes?.items ?? [], W = st?.listSandboxes?.total ?? 0, mt = ct, ht = pt, G = Math.ceil(W / 20), K = ht, q = S.search || S.template && S.template !== "all" || S.status && S.status !== "all", J = pt.filter((e) => e.status === "RUNNING").length, gt = W, _t = p(() => Array.from(M.keys()), [M]), Y = p(() => Array.from(M.values()), [M]), X = p(() => K.filter((e) => M.has(e.id)).length, [K, M]), Z = p(() => Y.filter(T), [Y]), Q = p(() => Y.filter(nt), [Y]), vt = _t.length > 0, yt = K.length > 0 && X === K.length, bt = X > 0 && X < K.length, $ = P !== null, xt = P === "select-all", St = P === "stop", Ct = P === "delete", wt = f((e) => {
|
|
92
|
+
C({ search: e }), j(1);
|
|
93
|
+
}, [C]), Tt = f(() => {
|
|
94
|
+
w(), j(1);
|
|
95
|
+
}, [w]), Et = () => {
|
|
96
|
+
x?.(t(d, "new"));
|
|
97
|
+
}, Dt = (e) => {
|
|
98
|
+
x?.(t(d, e));
|
|
99
|
+
}, Ot = f((e, t) => {
|
|
100
100
|
N((n) => {
|
|
101
101
|
let r = new Map(n);
|
|
102
102
|
return t ? r.set(e.id, e) : r.delete(e.id), r;
|
|
103
103
|
});
|
|
104
|
-
}, []),
|
|
104
|
+
}, []), kt = f((e) => {
|
|
105
105
|
N((t) => {
|
|
106
106
|
let n = new Map(t);
|
|
107
107
|
for (let t of K) e ? n.set(t.id, t) : n.delete(t.id);
|
|
108
108
|
return n;
|
|
109
109
|
});
|
|
110
|
-
}, [K]),
|
|
110
|
+
}, [K]), At = f(() => {
|
|
111
111
|
N(/* @__PURE__ */ new Map());
|
|
112
|
-
}, []),
|
|
112
|
+
}, []), jt = f((e) => {
|
|
113
113
|
N((t) => {
|
|
114
114
|
if (!t.has(e)) return t;
|
|
115
115
|
let n = new Map(t);
|
|
116
116
|
return n.delete(e), n;
|
|
117
117
|
});
|
|
118
|
-
}, []),
|
|
118
|
+
}, []), Mt = f((e) => {
|
|
119
119
|
N((t) => {
|
|
120
120
|
if (!t.has(e.id)) return t;
|
|
121
121
|
let n = new Map(t);
|
|
122
122
|
return n.set(e.id, e), n;
|
|
123
123
|
});
|
|
124
|
-
}, []),
|
|
124
|
+
}, []), Nt = f(async () => {
|
|
125
125
|
if (!z) return [];
|
|
126
126
|
let e = [], t = 1;
|
|
127
127
|
for (;;) {
|
|
128
128
|
let n = (await D.query({
|
|
129
|
-
query:
|
|
129
|
+
query: ge,
|
|
130
130
|
variables: {
|
|
131
131
|
context: { workspaceId: z },
|
|
132
132
|
filter: B,
|
|
@@ -145,14 +145,14 @@ function D() {
|
|
|
145
145
|
D,
|
|
146
146
|
B,
|
|
147
147
|
z
|
|
148
|
-
]),
|
|
148
|
+
]), Pt = f(async (e) => {
|
|
149
149
|
try {
|
|
150
150
|
let t = (await H({ variables: {
|
|
151
151
|
context: { workspaceId: z },
|
|
152
152
|
id: e.id
|
|
153
153
|
} })).data?.stopSandbox;
|
|
154
154
|
if (!t) throw Error(`Failed to stop sandbox "${e.name}".`);
|
|
155
|
-
|
|
155
|
+
Mt({
|
|
156
156
|
...e,
|
|
157
157
|
status: t.status,
|
|
158
158
|
stoppedAt: t.stoppedAt ?? e.stoppedAt
|
|
@@ -166,18 +166,18 @@ function D() {
|
|
|
166
166
|
}, [
|
|
167
167
|
V,
|
|
168
168
|
H,
|
|
169
|
-
|
|
169
|
+
Mt,
|
|
170
170
|
z
|
|
171
|
-
]),
|
|
172
|
-
|
|
171
|
+
]), Ft = f(async (e) => {
|
|
172
|
+
Se("medium");
|
|
173
173
|
try {
|
|
174
174
|
if (!(await U({ variables: {
|
|
175
175
|
context: { workspaceId: z },
|
|
176
176
|
id: e.id
|
|
177
177
|
} })).data?.deleteSandbox) throw Error(`Failed to delete sandbox "${e.name}".`);
|
|
178
|
-
|
|
178
|
+
Ce("success"), ut.sandboxDeleted({ sandboxId: e.id }), jt(e.id), await V();
|
|
179
179
|
} catch (t) {
|
|
180
|
-
|
|
180
|
+
Ce("error"), L({
|
|
181
181
|
kind: "error",
|
|
182
182
|
message: E(t, `Failed to delete sandbox "${e.name}".`)
|
|
183
183
|
});
|
|
@@ -185,13 +185,13 @@ function D() {
|
|
|
185
185
|
}, [
|
|
186
186
|
U,
|
|
187
187
|
V,
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
jt,
|
|
189
|
+
ut,
|
|
190
190
|
z
|
|
191
|
-
]),
|
|
191
|
+
]), It = f(async () => {
|
|
192
192
|
F("select-all");
|
|
193
193
|
try {
|
|
194
|
-
let e = await
|
|
194
|
+
let e = await Nt();
|
|
195
195
|
N(new Map(e.map((e) => [e.id, e]))), L({
|
|
196
196
|
kind: "success",
|
|
197
197
|
message: `Selected ${e.length} sandbox${e.length === 1 ? "" : "es"}.`
|
|
@@ -204,7 +204,7 @@ function D() {
|
|
|
204
204
|
} finally {
|
|
205
205
|
F(null);
|
|
206
206
|
}
|
|
207
|
-
}, [
|
|
207
|
+
}, [Nt]), Lt = f(async () => {
|
|
208
208
|
if (Z.length === 0) {
|
|
209
209
|
L({
|
|
210
210
|
kind: "error",
|
|
@@ -215,7 +215,7 @@ function D() {
|
|
|
215
215
|
let e = Y.length - Z.length;
|
|
216
216
|
F("stop");
|
|
217
217
|
try {
|
|
218
|
-
let t = await
|
|
218
|
+
let t = await it(Z, async (e) => {
|
|
219
219
|
let t = await H({ variables: {
|
|
220
220
|
context: { workspaceId: z },
|
|
221
221
|
id: e.id
|
|
@@ -225,7 +225,7 @@ function D() {
|
|
|
225
225
|
}), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
226
226
|
N(/* @__PURE__ */ new Map()), await V(), L({
|
|
227
227
|
kind: r === 0 ? "success" : "error",
|
|
228
|
-
message:
|
|
228
|
+
message: rt("Stopped", n, r, e)
|
|
229
229
|
});
|
|
230
230
|
} catch (e) {
|
|
231
231
|
L({
|
|
@@ -241,7 +241,7 @@ function D() {
|
|
|
241
241
|
Z,
|
|
242
242
|
H,
|
|
243
243
|
z
|
|
244
|
-
]),
|
|
244
|
+
]), Rt = f(() => {
|
|
245
245
|
if (Q.length === 0) {
|
|
246
246
|
L({
|
|
247
247
|
kind: "error",
|
|
@@ -251,12 +251,12 @@ function D() {
|
|
|
251
251
|
}
|
|
252
252
|
let e = Y.length - Q.length;
|
|
253
253
|
R({ message: e > 0 ? `Delete ${Q.length} selected sandbox(es)? ${e} selected sandbox(es) cannot be deleted right now and will be skipped. This cannot be undone.` : `Delete ${Q.length} selected sandbox(es)? This cannot be undone.` });
|
|
254
|
-
}, [Q.length, Y.length]),
|
|
254
|
+
}, [Q.length, Y.length]), zt = f(async () => {
|
|
255
255
|
if (R(null), Q.length === 0) return;
|
|
256
256
|
let e = Y.length - Q.length;
|
|
257
257
|
F("delete");
|
|
258
258
|
try {
|
|
259
|
-
let t = await
|
|
259
|
+
let t = await it(Q, async (e) => {
|
|
260
260
|
let t = await U({ variables: {
|
|
261
261
|
context: { workspaceId: z },
|
|
262
262
|
id: e.id
|
|
@@ -266,7 +266,7 @@ function D() {
|
|
|
266
266
|
}), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
267
267
|
N(/* @__PURE__ */ new Map()), await V(), L({
|
|
268
268
|
kind: r === 0 ? "success" : "error",
|
|
269
|
-
message:
|
|
269
|
+
message: rt("Deleted", n, r, e)
|
|
270
270
|
});
|
|
271
271
|
} catch (e) {
|
|
272
272
|
L({
|
|
@@ -283,183 +283,187 @@ function D() {
|
|
|
283
283
|
Y.length,
|
|
284
284
|
z
|
|
285
285
|
]);
|
|
286
|
-
return /* @__PURE__ */
|
|
287
|
-
heroBackdrop: /* @__PURE__ */
|
|
288
|
-
title: /* @__PURE__ */
|
|
289
|
-
subtitle:
|
|
290
|
-
icon: /* @__PURE__ */
|
|
291
|
-
headerActions: /* @__PURE__ */
|
|
286
|
+
return /* @__PURE__ */ b(pe, {
|
|
287
|
+
heroBackdrop: /* @__PURE__ */ y(Je, { intensity: "subtle" }),
|
|
288
|
+
title: /* @__PURE__ */ y(Xe, { children: u(O, "sandbox.list.title", "Sandboxes") }),
|
|
289
|
+
subtitle: u(O, "sandbox.list.subtitle", "Manage ephemeral sandbox environments for development and testing"),
|
|
290
|
+
icon: /* @__PURE__ */ y(Ee, { size: 24 }),
|
|
291
|
+
headerActions: /* @__PURE__ */ b("div", {
|
|
292
292
|
className: "flex items-center gap-2",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ y(we, {
|
|
294
294
|
permission: "sandbox:create",
|
|
295
|
-
children: /* @__PURE__ */
|
|
296
|
-
onClick:
|
|
295
|
+
children: /* @__PURE__ */ b(r, {
|
|
296
|
+
onClick: Et,
|
|
297
297
|
size: "lg",
|
|
298
298
|
"data-tour": "sandbox-list-create-button",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ y(Pe, { size: 18 }), u(O, "sandbox.list.actions.create", "Create Sandbox")]
|
|
300
300
|
})
|
|
301
|
-
}), /* @__PURE__ */
|
|
302
|
-
label:
|
|
303
|
-
onSelect: () =>
|
|
304
|
-
icon: /* @__PURE__ */
|
|
301
|
+
}), /* @__PURE__ */ y(i, { actions: [{
|
|
302
|
+
label: u(O, "sandbox.list.actions.export.label", "Export"),
|
|
303
|
+
onSelect: () => ft(!0),
|
|
304
|
+
icon: /* @__PURE__ */ y(Me, { size: 16 })
|
|
305
305
|
}] })]
|
|
306
306
|
}),
|
|
307
|
-
headerContent:
|
|
307
|
+
headerContent: gt > 0 ? /* @__PURE__ */ b("div", {
|
|
308
308
|
className: "flex items-center gap-3 flex-wrap",
|
|
309
|
-
children: [/* @__PURE__ */
|
|
309
|
+
children: [/* @__PURE__ */ y(n, {
|
|
310
310
|
variant: "secondary",
|
|
311
311
|
className: "gap-1.5",
|
|
312
|
-
children:
|
|
313
|
-
}), /* @__PURE__ */
|
|
312
|
+
children: u(O, "sandbox.list.header.total", "{count} total", { count: gt })
|
|
313
|
+
}), /* @__PURE__ */ y(n, {
|
|
314
314
|
variant: "default",
|
|
315
315
|
className: "gap-1.5 bg-status-success-bg-subtle text-status-success-text border-border-default",
|
|
316
|
-
children:
|
|
316
|
+
children: u(O, "sandbox.list.header.running", "{count} running", { count: J })
|
|
317
317
|
})]
|
|
318
318
|
}) : null,
|
|
319
319
|
children: [
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
/* @__PURE__ */ y(Qe, { children: u(O, "sandbox.list.purpose", "Sandboxes are disposable, isolated environments where you can safely run code, try an AI builder, reproduce a bug, or test a workflow without touching your real projects. Spin one up, experiment, and let it expire — nothing here affects production.") }),
|
|
321
|
+
/* @__PURE__ */ y(Ye, {
|
|
322
|
+
className: "p-4",
|
|
323
|
+
children: /* @__PURE__ */ y(me, {
|
|
324
|
+
runningCount: J,
|
|
325
|
+
maxConcurrent: Math.max(J, 10)
|
|
326
|
+
})
|
|
323
327
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ b("div", {
|
|
325
329
|
className: "space-y-4",
|
|
326
330
|
children: [
|
|
327
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ b("div", {
|
|
328
332
|
className: "flex flex-col sm:flex-row gap-3",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
333
|
+
children: [/* @__PURE__ */ b("div", {
|
|
330
334
|
className: "flex-1 relative group",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
335
|
+
children: [/* @__PURE__ */ y(Fe, {
|
|
332
336
|
size: 18,
|
|
333
337
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors"
|
|
334
|
-
}), /* @__PURE__ */
|
|
338
|
+
}), /* @__PURE__ */ y(ne, {
|
|
335
339
|
type: "text",
|
|
336
|
-
placeholder:
|
|
337
|
-
value:
|
|
338
|
-
onChange: (e) =>
|
|
340
|
+
placeholder: u(O, "sandbox.list.search.placeholder", "Search sandboxes by name, description, or ID..."),
|
|
341
|
+
value: S.search,
|
|
342
|
+
onChange: (e) => wt(e.target.value),
|
|
339
343
|
className: "pl-[3.25rem] h-10",
|
|
340
|
-
"aria-label":
|
|
344
|
+
"aria-label": u(O, "sandbox.list.search.ariaLabel", "Search sandboxes"),
|
|
341
345
|
"data-tour": "sandbox-list-search-input"
|
|
342
346
|
})]
|
|
343
|
-
}), /* @__PURE__ */
|
|
347
|
+
}), /* @__PURE__ */ b(r, {
|
|
344
348
|
variant: k || q ? "default" : "outline",
|
|
345
|
-
onClick: () =>
|
|
346
|
-
"aria-label":
|
|
349
|
+
onClick: () => at(!k),
|
|
350
|
+
"aria-label": u(O, "sandbox.list.filters.toggle.ariaLabel", "Toggle filters"),
|
|
347
351
|
"data-tour": "sandbox-list-filters-button",
|
|
348
352
|
children: [
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
k ?
|
|
351
|
-
q && /* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ y(Ne, { size: 16 }),
|
|
354
|
+
k ? u(O, "sandbox.list.filters.toggle.hide", "Hide") : u(O, "sandbox.list.filters.toggle.show", "Filter"),
|
|
355
|
+
q && /* @__PURE__ */ y(n, {
|
|
352
356
|
variant: "secondary",
|
|
353
357
|
className: "ml-1 h-5 min-w-5 px-1.5",
|
|
354
358
|
children: [
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
359
|
+
S.search,
|
|
360
|
+
S.template !== "all" && S.template,
|
|
361
|
+
S.status !== "all" && S.status
|
|
358
362
|
].filter(Boolean).length
|
|
359
363
|
})
|
|
360
364
|
]
|
|
361
365
|
})]
|
|
362
366
|
}),
|
|
363
|
-
k && /* @__PURE__ */
|
|
367
|
+
k && /* @__PURE__ */ y(a, {
|
|
364
368
|
className: "animate-in slide-in-from-top-2 duration-200",
|
|
365
|
-
children: /* @__PURE__ */
|
|
369
|
+
children: /* @__PURE__ */ b(o, {
|
|
366
370
|
className: "p-4",
|
|
367
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ b("div", {
|
|
368
372
|
className: "flex items-center justify-between mb-4",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
373
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
370
374
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
375
|
+
children: [/* @__PURE__ */ y(Ne, {
|
|
372
376
|
size: 16,
|
|
373
377
|
className: "text-primary"
|
|
374
|
-
}),
|
|
375
|
-
}), q && /* @__PURE__ */
|
|
378
|
+
}), u(O, "sandbox.list.filters.panel.title", "Filter Sandboxes")]
|
|
379
|
+
}), q && /* @__PURE__ */ b(r, {
|
|
376
380
|
variant: "ghost",
|
|
377
381
|
size: "sm",
|
|
378
|
-
onClick:
|
|
382
|
+
onClick: Tt,
|
|
379
383
|
className: "text-text-secondary hover:text-status-error-text",
|
|
380
|
-
children: [/* @__PURE__ */
|
|
384
|
+
children: [/* @__PURE__ */ y(_, { size: 16 }), u(O, "sandbox.list.filters.clearAll", "Clear All")]
|
|
381
385
|
})]
|
|
382
|
-
}), /* @__PURE__ */
|
|
386
|
+
}), /* @__PURE__ */ b("div", {
|
|
383
387
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
388
|
+
children: [/* @__PURE__ */ b("div", {
|
|
385
389
|
className: "space-y-2",
|
|
386
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ y("label", {
|
|
387
391
|
className: "block text-sm font-medium text-text-primary",
|
|
388
|
-
children:
|
|
389
|
-
}), /* @__PURE__ */
|
|
390
|
-
value:
|
|
392
|
+
children: u(O, "sandbox.list.filters.template.label", "Template")
|
|
393
|
+
}), /* @__PURE__ */ b(re, {
|
|
394
|
+
value: S.template || "all",
|
|
391
395
|
onValueChange: (e) => {
|
|
392
|
-
|
|
396
|
+
C({ template: e }), j(1);
|
|
393
397
|
},
|
|
394
|
-
children: [/* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ y(ae, { children: /* @__PURE__ */ y(oe, { placeholder: u(O, "sandbox.list.filters.template.all", "All Templates") }) }), /* @__PURE__ */ b(ie, { children: [
|
|
399
|
+
/* @__PURE__ */ y(s, {
|
|
396
400
|
value: "all",
|
|
397
|
-
children:
|
|
401
|
+
children: u(O, "sandbox.list.filters.template.all", "All Templates")
|
|
398
402
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ y(s, {
|
|
400
404
|
value: "AI_BUILDER",
|
|
401
|
-
children:
|
|
405
|
+
children: u(O, "sandbox.list.filters.template.aiBuilder", "AI Builder")
|
|
402
406
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ y(s, {
|
|
404
408
|
value: "WORKFLOW_MULTI_NODE",
|
|
405
|
-
children:
|
|
409
|
+
children: u(O, "sandbox.list.filters.template.workflowMultiNode", "Workflow Multi-Node")
|
|
406
410
|
}),
|
|
407
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ y(s, {
|
|
408
412
|
value: "MISC_SHELL",
|
|
409
|
-
children:
|
|
413
|
+
children: u(O, "sandbox.list.filters.template.miscShell", "Misc Shell")
|
|
410
414
|
}),
|
|
411
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ y(s, {
|
|
412
416
|
value: "CUSTOM",
|
|
413
|
-
children:
|
|
417
|
+
children: u(O, "sandbox.list.filters.template.custom", "Custom")
|
|
414
418
|
})
|
|
415
419
|
] })]
|
|
416
420
|
})]
|
|
417
|
-
}), /* @__PURE__ */
|
|
421
|
+
}), /* @__PURE__ */ b("div", {
|
|
418
422
|
className: "space-y-2",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
423
|
+
children: [/* @__PURE__ */ y("label", {
|
|
420
424
|
className: "block text-sm font-medium text-text-primary",
|
|
421
|
-
children:
|
|
422
|
-
}), /* @__PURE__ */
|
|
423
|
-
value:
|
|
425
|
+
children: u(O, "sandbox.list.filters.status.label", "Status")
|
|
426
|
+
}), /* @__PURE__ */ b(re, {
|
|
427
|
+
value: S.status || "all",
|
|
424
428
|
onValueChange: (e) => {
|
|
425
|
-
|
|
429
|
+
C({ status: e }), j(1);
|
|
426
430
|
},
|
|
427
|
-
children: [/* @__PURE__ */
|
|
428
|
-
/* @__PURE__ */
|
|
431
|
+
children: [/* @__PURE__ */ y(ae, { children: /* @__PURE__ */ y(oe, { placeholder: u(O, "sandbox.list.filters.status.all", "All Statuses") }) }), /* @__PURE__ */ b(ie, { children: [
|
|
432
|
+
/* @__PURE__ */ y(s, {
|
|
429
433
|
value: "all",
|
|
430
|
-
children:
|
|
434
|
+
children: u(O, "sandbox.list.filters.status.all", "All Statuses")
|
|
431
435
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ y(s, {
|
|
433
437
|
value: "PENDING",
|
|
434
|
-
children:
|
|
438
|
+
children: u(O, "sandbox.list.filters.status.pending", "Pending")
|
|
435
439
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ y(s, {
|
|
437
441
|
value: "PROVISIONING",
|
|
438
|
-
children:
|
|
442
|
+
children: u(O, "sandbox.list.filters.status.provisioning", "Provisioning")
|
|
439
443
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ y(s, {
|
|
441
445
|
value: "RUNNING",
|
|
442
|
-
children:
|
|
446
|
+
children: u(O, "sandbox.list.filters.status.running", "Running")
|
|
443
447
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ y(s, {
|
|
445
449
|
value: "STOPPING",
|
|
446
|
-
children:
|
|
450
|
+
children: u(O, "sandbox.list.filters.status.stopping", "Stopping")
|
|
447
451
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ y(s, {
|
|
449
453
|
value: "STOPPED",
|
|
450
|
-
children:
|
|
454
|
+
children: u(O, "sandbox.list.filters.status.stopped", "Stopped")
|
|
451
455
|
}),
|
|
452
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ y(s, {
|
|
453
457
|
value: "ERROR",
|
|
454
|
-
children:
|
|
458
|
+
children: u(O, "sandbox.list.filters.status.error", "Error")
|
|
455
459
|
}),
|
|
456
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ y(s, {
|
|
457
461
|
value: "EXPIRED",
|
|
458
|
-
children:
|
|
462
|
+
children: u(O, "sandbox.list.filters.status.expired", "Expired")
|
|
459
463
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ y(s, {
|
|
461
465
|
value: "FAILED",
|
|
462
|
-
children:
|
|
466
|
+
children: u(O, "sandbox.list.filters.status.failed", "Failed")
|
|
463
467
|
})
|
|
464
468
|
] })]
|
|
465
469
|
})]
|
|
@@ -467,286 +471,286 @@ function D() {
|
|
|
467
471
|
})]
|
|
468
472
|
})
|
|
469
473
|
}),
|
|
470
|
-
I && /* @__PURE__ */
|
|
471
|
-
className:
|
|
472
|
-
children: /* @__PURE__ */
|
|
474
|
+
I && /* @__PURE__ */ y(a, {
|
|
475
|
+
className: l("border-l-4", I.kind === "success" ? "border-l-status-success-text bg-status-success-bg-subtle" : "border-l-destructive bg-status-error-bg/5"),
|
|
476
|
+
children: /* @__PURE__ */ b(o, {
|
|
473
477
|
className: "p-4 flex items-start justify-between gap-3",
|
|
474
|
-
children: [/* @__PURE__ */
|
|
478
|
+
children: [/* @__PURE__ */ b("div", {
|
|
475
479
|
role: I.kind === "error" ? "alert" : "status",
|
|
476
480
|
className: "flex items-start gap-2 text-sm",
|
|
477
|
-
children: [I.kind === "success" ? /* @__PURE__ */
|
|
481
|
+
children: [I.kind === "success" ? /* @__PURE__ */ y(De, {
|
|
478
482
|
size: 16,
|
|
479
483
|
className: "mt-0.5 text-status-success-text"
|
|
480
|
-
}) : /* @__PURE__ */
|
|
484
|
+
}) : /* @__PURE__ */ y(Te, {
|
|
481
485
|
size: 16,
|
|
482
486
|
className: "mt-0.5 text-status-error-text"
|
|
483
|
-
}), /* @__PURE__ */
|
|
484
|
-
className:
|
|
487
|
+
}), /* @__PURE__ */ y("span", {
|
|
488
|
+
className: l("font-medium", I.kind === "success" ? "text-status-success-text" : "text-status-error-text"),
|
|
485
489
|
children: I.message
|
|
486
490
|
})]
|
|
487
|
-
}), /* @__PURE__ */
|
|
491
|
+
}), /* @__PURE__ */ y(r, {
|
|
488
492
|
variant: "ghost",
|
|
489
493
|
size: "icon",
|
|
490
494
|
onClick: () => L(null),
|
|
491
|
-
"aria-label":
|
|
492
|
-
children: /* @__PURE__ */
|
|
495
|
+
"aria-label": u(O, "sandbox.list.bulk.feedback.dismiss.ariaLabel", "Dismiss bulk action message"),
|
|
496
|
+
children: /* @__PURE__ */ y(_, { size: 16 })
|
|
493
497
|
})]
|
|
494
498
|
})
|
|
495
499
|
})
|
|
496
500
|
]
|
|
497
501
|
}),
|
|
498
|
-
|
|
502
|
+
mt && /* @__PURE__ */ y("div", {
|
|
499
503
|
className: "space-y-4 animate-in fade-in-0 duration-200",
|
|
500
504
|
children: [...[
|
|
501
505
|
,
|
|
502
506
|
,
|
|
503
507
|
,
|
|
504
|
-
]].map((e, t) => /* @__PURE__ */
|
|
508
|
+
]].map((e, t) => /* @__PURE__ */ y(a, { children: /* @__PURE__ */ y(o, {
|
|
505
509
|
className: "p-5",
|
|
506
|
-
children: /* @__PURE__ */
|
|
510
|
+
children: /* @__PURE__ */ b("div", {
|
|
507
511
|
className: "flex items-start gap-4 motion-safe:animate-vc-shimmer",
|
|
508
|
-
children: [/* @__PURE__ */
|
|
512
|
+
children: [/* @__PURE__ */ y(c, { className: "size-12 rounded-lg" }), /* @__PURE__ */ b("div", {
|
|
509
513
|
className: "flex-1 space-y-2",
|
|
510
514
|
children: [
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
-
/* @__PURE__ */
|
|
513
|
-
/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ y(c, { className: "h-5 w-1/3" }),
|
|
516
|
+
/* @__PURE__ */ y(c, { className: "h-4 w-2/3" }),
|
|
517
|
+
/* @__PURE__ */ b("div", {
|
|
514
518
|
className: "flex gap-2 pt-1",
|
|
515
|
-
children: [/* @__PURE__ */
|
|
519
|
+
children: [/* @__PURE__ */ y(c, { className: "h-5 w-20 rounded-full" }), /* @__PURE__ */ y(c, { className: "h-5 w-24 rounded-full" })]
|
|
516
520
|
})
|
|
517
521
|
]
|
|
518
522
|
})]
|
|
519
523
|
})
|
|
520
524
|
}) }, t))
|
|
521
525
|
}),
|
|
522
|
-
!
|
|
526
|
+
!mt && /* @__PURE__ */ y("div", {
|
|
523
527
|
className: "space-y-4",
|
|
524
|
-
children: K.length > 0 ? /* @__PURE__ */
|
|
525
|
-
/* @__PURE__ */
|
|
528
|
+
children: K.length > 0 ? /* @__PURE__ */ b(v, { children: [
|
|
529
|
+
/* @__PURE__ */ y(a, {
|
|
526
530
|
className: "animate-in fade-in-0 duration-200",
|
|
527
|
-
children: /* @__PURE__ */
|
|
531
|
+
children: /* @__PURE__ */ b(o, {
|
|
528
532
|
className: "p-4 space-y-3",
|
|
529
|
-
children: [/* @__PURE__ */
|
|
533
|
+
children: [/* @__PURE__ */ b("div", {
|
|
530
534
|
className: "flex flex-col gap-3 xl:flex-row xl:items-center xl:justify-between",
|
|
531
535
|
"data-tour": "sandbox-list-bulk-controls",
|
|
532
|
-
children: [/* @__PURE__ */
|
|
536
|
+
children: [/* @__PURE__ */ b("div", {
|
|
533
537
|
className: "flex flex-wrap items-center gap-3",
|
|
534
538
|
children: [
|
|
535
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ b("label", {
|
|
536
540
|
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
537
|
-
children: [/* @__PURE__ */
|
|
538
|
-
checked:
|
|
539
|
-
onCheckedChange: (e) =>
|
|
540
|
-
"aria-label":
|
|
541
|
-
}), /* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ y(ee, {
|
|
542
|
+
checked: yt ? !0 : bt ? "indeterminate" : !1,
|
|
543
|
+
onCheckedChange: (e) => kt(e === !0),
|
|
544
|
+
"aria-label": u(O, "sandbox.list.bulk.selectPage.ariaLabel", "Select all sandboxes on this page")
|
|
545
|
+
}), /* @__PURE__ */ y("span", { children: u(O, "sandbox.list.bulk.selectPage.label", "Select page") })]
|
|
542
546
|
}),
|
|
543
|
-
W > K.length && /* @__PURE__ */
|
|
547
|
+
W > K.length && /* @__PURE__ */ b(r, {
|
|
544
548
|
variant: "ghost",
|
|
545
549
|
size: "sm",
|
|
546
|
-
onClick:
|
|
550
|
+
onClick: It,
|
|
547
551
|
disabled: $,
|
|
548
|
-
children: [
|
|
552
|
+
children: [xt ? /* @__PURE__ */ y(h, {
|
|
549
553
|
size: 14,
|
|
550
554
|
className: "animate-spin"
|
|
551
|
-
}) : null,
|
|
555
|
+
}) : null, u(O, "sandbox.list.bulk.selectAll", "Select all {count}", { count: W })]
|
|
552
556
|
}),
|
|
553
|
-
|
|
557
|
+
vt && /* @__PURE__ */ y(r, {
|
|
554
558
|
variant: "ghost",
|
|
555
559
|
size: "sm",
|
|
556
|
-
onClick:
|
|
560
|
+
onClick: At,
|
|
557
561
|
disabled: $,
|
|
558
|
-
children:
|
|
562
|
+
children: u(O, "sandbox.list.bulk.clearSelection", "Clear selection")
|
|
559
563
|
})
|
|
560
564
|
]
|
|
561
|
-
}), /* @__PURE__ */
|
|
565
|
+
}), /* @__PURE__ */ b("div", {
|
|
562
566
|
className: "flex flex-wrap items-center gap-2",
|
|
563
567
|
children: [
|
|
564
|
-
/* @__PURE__ */
|
|
565
|
-
variant:
|
|
568
|
+
/* @__PURE__ */ y(n, {
|
|
569
|
+
variant: vt ? "default" : "secondary",
|
|
566
570
|
className: "gap-1.5",
|
|
567
|
-
children:
|
|
571
|
+
children: u(O, "sandbox.list.bulk.selectedCount", "{count} selected", { count: _t.length })
|
|
568
572
|
}),
|
|
569
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ b(r, {
|
|
570
574
|
variant: "outline",
|
|
571
|
-
onClick:
|
|
575
|
+
onClick: Lt,
|
|
572
576
|
disabled: $ || Z.length === 0,
|
|
573
577
|
children: [
|
|
574
|
-
|
|
578
|
+
St ? /* @__PURE__ */ y(h, {
|
|
575
579
|
size: 16,
|
|
576
580
|
className: "animate-spin"
|
|
577
|
-
}) : /* @__PURE__ */
|
|
578
|
-
|
|
581
|
+
}) : /* @__PURE__ */ y(Ie, { size: 16 }),
|
|
582
|
+
u(O, "sandbox.list.bulk.stopSelected", "Stop Selected"),
|
|
579
583
|
Z.length > 0 ? ` (${Z.length})` : ""
|
|
580
584
|
]
|
|
581
585
|
}),
|
|
582
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ b(r, {
|
|
583
587
|
variant: "outline",
|
|
584
588
|
className: "text-status-error-text border-status-error-border/50 hover:bg-status-error-bg/10",
|
|
585
|
-
onClick:
|
|
589
|
+
onClick: Rt,
|
|
586
590
|
disabled: $ || Q.length === 0,
|
|
587
591
|
children: [
|
|
588
|
-
|
|
592
|
+
Ct ? /* @__PURE__ */ y(h, {
|
|
589
593
|
size: 16,
|
|
590
594
|
className: "animate-spin"
|
|
591
|
-
}) : /* @__PURE__ */
|
|
592
|
-
|
|
595
|
+
}) : /* @__PURE__ */ y(g, { size: 16 }),
|
|
596
|
+
u(O, "sandbox.list.bulk.deleteSelected", "Delete Selected"),
|
|
593
597
|
Q.length > 0 ? ` (${Q.length})` : ""
|
|
594
598
|
]
|
|
595
599
|
})
|
|
596
600
|
]
|
|
597
601
|
})]
|
|
598
|
-
}), /* @__PURE__ */
|
|
602
|
+
}), /* @__PURE__ */ y("p", {
|
|
599
603
|
className: "text-xs text-text-secondary",
|
|
600
|
-
children:
|
|
604
|
+
children: u(O, "sandbox.list.bulk.helpText", "Select one, many, or every sandbox on the current filter set. Only running sandboxes can be stopped, and only stopped, failed, expired, or errored sandboxes can be deleted.")
|
|
601
605
|
})]
|
|
602
606
|
})
|
|
603
607
|
}),
|
|
604
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ y("div", {
|
|
605
609
|
className: "space-y-3",
|
|
606
610
|
children: K.map((e, t) => {
|
|
607
611
|
let n = M.has(e.id);
|
|
608
|
-
return /* @__PURE__ */
|
|
612
|
+
return /* @__PURE__ */ y(te, {
|
|
609
613
|
treatment: "insight",
|
|
610
|
-
className:
|
|
614
|
+
className: l("cursor-pointer overflow-hidden group", "animate-in fade-in-0 slide-in-from-bottom-2", n && "border-action-primary-border bg-accent-wash"),
|
|
611
615
|
style: { animationDelay: `${t * 40}ms` },
|
|
612
|
-
onClick: () =>
|
|
616
|
+
onClick: () => Dt(e.id),
|
|
613
617
|
tabIndex: 0,
|
|
614
618
|
onKeyDown: (t) => {
|
|
615
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
619
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), Dt(e.id));
|
|
616
620
|
},
|
|
617
621
|
"data-tour": "sandbox-list-item-card",
|
|
618
|
-
children: /* @__PURE__ */
|
|
622
|
+
children: /* @__PURE__ */ y("div", {
|
|
619
623
|
className: "p-5",
|
|
620
|
-
children: /* @__PURE__ */
|
|
624
|
+
children: /* @__PURE__ */ b("div", {
|
|
621
625
|
className: "flex items-start gap-4",
|
|
622
626
|
children: [
|
|
623
|
-
/* @__PURE__ */
|
|
627
|
+
/* @__PURE__ */ y("div", {
|
|
624
628
|
className: "pt-1",
|
|
625
|
-
children: /* @__PURE__ */
|
|
629
|
+
children: /* @__PURE__ */ y(ee, {
|
|
626
630
|
checked: n,
|
|
627
|
-
onCheckedChange: (t) =>
|
|
631
|
+
onCheckedChange: (t) => Ot(e, t === !0),
|
|
628
632
|
onClick: (e) => e.stopPropagation(),
|
|
629
|
-
"aria-label":
|
|
633
|
+
"aria-label": u(O, "sandbox.list.item.select.ariaLabel", "Select sandbox {name}", { name: e.name })
|
|
630
634
|
})
|
|
631
635
|
}),
|
|
632
|
-
/* @__PURE__ */
|
|
636
|
+
/* @__PURE__ */ y("div", {
|
|
633
637
|
className: "flex-shrink-0 p-3 rounded-lg bg-bg-sunken/50",
|
|
634
|
-
children: /* @__PURE__ */
|
|
638
|
+
children: /* @__PURE__ */ y(le, {
|
|
635
639
|
type: e.template,
|
|
636
640
|
size: 24
|
|
637
641
|
})
|
|
638
642
|
}),
|
|
639
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ b("div", {
|
|
640
644
|
className: "flex-1 min-w-0",
|
|
641
645
|
children: [
|
|
642
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ b("div", {
|
|
643
647
|
className: "flex items-start justify-between gap-3",
|
|
644
|
-
children: [/* @__PURE__ */
|
|
648
|
+
children: [/* @__PURE__ */ b("div", {
|
|
645
649
|
className: "min-w-0",
|
|
646
|
-
children: [/* @__PURE__ */
|
|
650
|
+
children: [/* @__PURE__ */ b("div", {
|
|
647
651
|
className: "flex items-center gap-2 mb-1",
|
|
648
|
-
children: [/* @__PURE__ */
|
|
652
|
+
children: [/* @__PURE__ */ y("h3", {
|
|
649
653
|
className: "font-semibold text-base truncate",
|
|
650
654
|
children: e.name
|
|
651
|
-
}), /* @__PURE__ */
|
|
652
|
-
}), e.description && /* @__PURE__ */
|
|
655
|
+
}), /* @__PURE__ */ y(se, { status: e.status })]
|
|
656
|
+
}), e.description && /* @__PURE__ */ y("p", {
|
|
653
657
|
className: "text-sm text-text-secondary line-clamp-1 mb-2",
|
|
654
658
|
children: e.description
|
|
655
659
|
})]
|
|
656
|
-
}), /* @__PURE__ */
|
|
657
|
-
className:
|
|
660
|
+
}), /* @__PURE__ */ b("div", {
|
|
661
|
+
className: l("flex items-center gap-1 transition-opacity flex-shrink-0", n ? "opacity-100" : "opacity-0 group-hover:opacity-100"),
|
|
658
662
|
children: [
|
|
659
|
-
|
|
663
|
+
T(e) && /* @__PURE__ */ y(r, {
|
|
660
664
|
variant: "ghost",
|
|
661
665
|
size: "icon",
|
|
662
666
|
onClick: (t) => {
|
|
663
|
-
t.stopPropagation(),
|
|
667
|
+
t.stopPropagation(), Pt(e);
|
|
664
668
|
},
|
|
665
|
-
"aria-label":
|
|
666
|
-
children: /* @__PURE__ */
|
|
669
|
+
"aria-label": u(O, "sandbox.list.item.actions.stop.ariaLabel", "Stop sandbox"),
|
|
670
|
+
children: /* @__PURE__ */ y(Ie, { size: 16 })
|
|
667
671
|
}),
|
|
668
|
-
|
|
672
|
+
tt(e) && /* @__PURE__ */ y(r, {
|
|
669
673
|
variant: "ghost",
|
|
670
674
|
size: "icon",
|
|
671
675
|
onClick: (t) => {
|
|
672
|
-
t.stopPropagation(),
|
|
676
|
+
t.stopPropagation(), lt({ variables: {
|
|
673
677
|
context: { workspaceId: z },
|
|
674
678
|
id: e.id,
|
|
675
679
|
additionalSeconds: 3600
|
|
676
680
|
} }).then(() => V());
|
|
677
681
|
},
|
|
678
|
-
"aria-label":
|
|
679
|
-
children: /* @__PURE__ */
|
|
682
|
+
"aria-label": u(O, "sandbox.list.item.actions.extendTtl.ariaLabel", "Extend TTL"),
|
|
683
|
+
children: /* @__PURE__ */ y(Le, { size: 16 })
|
|
680
684
|
}),
|
|
681
|
-
|
|
685
|
+
nt(e) && /* @__PURE__ */ y(r, {
|
|
682
686
|
variant: "ghost",
|
|
683
687
|
size: "icon",
|
|
684
688
|
className: "text-status-error-text hover:text-status-error-text",
|
|
685
689
|
onClick: (t) => {
|
|
686
|
-
t.stopPropagation(),
|
|
690
|
+
t.stopPropagation(), Ft(e);
|
|
687
691
|
},
|
|
688
|
-
"aria-label":
|
|
689
|
-
children: /* @__PURE__ */
|
|
692
|
+
"aria-label": u(O, "sandbox.list.item.actions.delete.ariaLabel", "Delete sandbox"),
|
|
693
|
+
children: /* @__PURE__ */ y(g, { size: 16 })
|
|
690
694
|
})
|
|
691
695
|
]
|
|
692
696
|
})]
|
|
693
697
|
}),
|
|
694
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ b("div", {
|
|
695
699
|
className: "flex flex-wrap items-center gap-x-4 gap-y-2 text-xs text-text-secondary",
|
|
696
700
|
children: [
|
|
697
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ y(ce, {
|
|
698
702
|
cpuRequest: e.resources?.cpuRequest ?? "0",
|
|
699
703
|
memoryRequest: e.resources?.memoryRequest ?? "0",
|
|
700
704
|
containerCount: e.containers?.length,
|
|
701
705
|
className: "text-xs"
|
|
702
706
|
}),
|
|
703
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ y("span", {
|
|
704
708
|
className: "text-text-secondary/40",
|
|
705
709
|
children: "|"
|
|
706
710
|
}),
|
|
707
|
-
/* @__PURE__ */
|
|
711
|
+
/* @__PURE__ */ y(le, {
|
|
708
712
|
type: e.template,
|
|
709
713
|
size: 12,
|
|
710
714
|
showLabel: !0
|
|
711
715
|
}),
|
|
712
|
-
e.storage?.mode && e.storage.mode !== "NONE" && /* @__PURE__ */
|
|
716
|
+
e.storage?.mode && e.storage.mode !== "NONE" && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("span", {
|
|
713
717
|
className: "text-text-secondary/40",
|
|
714
718
|
children: "|"
|
|
715
|
-
}), /* @__PURE__ */
|
|
719
|
+
}), /* @__PURE__ */ b("span", {
|
|
716
720
|
className: "inline-flex items-center gap-1",
|
|
717
721
|
children: [
|
|
718
|
-
/* @__PURE__ */
|
|
719
|
-
e.storage.mode === "EPHEMERAL" ?
|
|
722
|
+
/* @__PURE__ */ y(je, { size: 12 }),
|
|
723
|
+
e.storage.mode === "EPHEMERAL" ? u(O, "sandbox.list.item.storage.ephemeral", "Ephemeral") : u(O, "sandbox.list.item.storage.persistent", "Persistent"),
|
|
720
724
|
e.storage.sizeGi && ` ${e.storage.sizeGi}Gi`
|
|
721
725
|
]
|
|
722
726
|
})] }),
|
|
723
|
-
e.containers?.length > 0 && /* @__PURE__ */
|
|
727
|
+
e.containers?.length > 0 && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("span", {
|
|
724
728
|
className: "text-text-secondary/40",
|
|
725
729
|
children: "|"
|
|
726
|
-
}), /* @__PURE__ */
|
|
730
|
+
}), /* @__PURE__ */ b("span", {
|
|
727
731
|
className: "inline-flex items-center gap-1",
|
|
728
|
-
children: [/* @__PURE__ */
|
|
732
|
+
children: [/* @__PURE__ */ y(Ae, { size: 12 }), u(O, "sandbox.list.item.containers", "{count} container{count, plural, one {} other {s}}", { count: e.containers.length })]
|
|
729
733
|
})] }),
|
|
730
|
-
e.expiresAt && e.status === "RUNNING" && /* @__PURE__ */
|
|
734
|
+
e.expiresAt && e.status === "RUNNING" && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("span", {
|
|
731
735
|
className: "text-text-secondary/40",
|
|
732
736
|
children: "|"
|
|
733
|
-
}), /* @__PURE__ */
|
|
737
|
+
}), /* @__PURE__ */ y(ue, {
|
|
734
738
|
compact: !0,
|
|
735
739
|
expiresAt: e.expiresAt
|
|
736
740
|
})] }),
|
|
737
|
-
/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ y("span", {
|
|
738
742
|
className: "text-text-secondary/40",
|
|
739
743
|
children: "|"
|
|
740
744
|
}),
|
|
741
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ y("span", { children: u(O, "sandbox.list.item.created", "Created {time}", { time: $e(e.createdAt) }) })
|
|
742
746
|
]
|
|
743
747
|
}),
|
|
744
|
-
e.errorMessage && /* @__PURE__ */
|
|
748
|
+
e.errorMessage && /* @__PURE__ */ b("div", {
|
|
745
749
|
className: "mt-2 flex items-start gap-1.5 text-xs text-status-error-text bg-status-error-bg-subtle px-2.5 py-1.5 rounded-md",
|
|
746
|
-
children: [/* @__PURE__ */
|
|
750
|
+
children: [/* @__PURE__ */ y(Te, {
|
|
747
751
|
size: 12,
|
|
748
752
|
className: "flex-shrink-0 mt-0.5"
|
|
749
|
-
}), /* @__PURE__ */
|
|
753
|
+
}), /* @__PURE__ */ y("span", {
|
|
750
754
|
className: "line-clamp-1",
|
|
751
755
|
children: e.errorMessage
|
|
752
756
|
})]
|
|
@@ -759,76 +763,76 @@ function D() {
|
|
|
759
763
|
}, e.id);
|
|
760
764
|
})
|
|
761
765
|
}),
|
|
762
|
-
G > 1 && /* @__PURE__ */
|
|
766
|
+
G > 1 && /* @__PURE__ */ y(a, {
|
|
763
767
|
className: "animate-in fade-in-0 duration-200",
|
|
764
|
-
children: /* @__PURE__ */
|
|
768
|
+
children: /* @__PURE__ */ b(o, {
|
|
765
769
|
className: "p-4 flex flex-col sm:flex-row items-center justify-between gap-3",
|
|
766
|
-
children: [/* @__PURE__ */
|
|
770
|
+
children: [/* @__PURE__ */ y("p", {
|
|
767
771
|
className: "text-sm text-text-secondary",
|
|
768
|
-
children:
|
|
772
|
+
children: u(O, "sandbox.list.pagination.showing", "Showing {from}-{to} of {total}", {
|
|
769
773
|
from: (A - 1) * 20 + 1,
|
|
770
774
|
to: Math.min(A * 20, W),
|
|
771
775
|
total: W
|
|
772
776
|
})
|
|
773
|
-
}), /* @__PURE__ */
|
|
777
|
+
}), /* @__PURE__ */ b("div", {
|
|
774
778
|
className: "flex items-center gap-2",
|
|
775
779
|
children: [
|
|
776
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ y(r, {
|
|
777
781
|
variant: "outline",
|
|
778
782
|
size: "icon",
|
|
779
783
|
onClick: () => j((e) => Math.max(1, e - 1)),
|
|
780
784
|
disabled: A === 1,
|
|
781
|
-
"aria-label":
|
|
782
|
-
children: /* @__PURE__ */
|
|
785
|
+
"aria-label": u(O, "sandbox.list.pagination.previous.ariaLabel", "Previous page"),
|
|
786
|
+
children: /* @__PURE__ */ y(Oe, { size: 18 })
|
|
783
787
|
}),
|
|
784
|
-
/* @__PURE__ */
|
|
788
|
+
/* @__PURE__ */ y(n, {
|
|
785
789
|
variant: "secondary",
|
|
786
790
|
className: "px-4 py-2 text-sm",
|
|
787
|
-
children:
|
|
791
|
+
children: u(O, "sandbox.list.pagination.pageOf", "Page {current} of {total}", {
|
|
788
792
|
current: A,
|
|
789
793
|
total: G
|
|
790
794
|
})
|
|
791
795
|
}),
|
|
792
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ y(r, {
|
|
793
797
|
variant: "outline",
|
|
794
798
|
size: "icon",
|
|
795
799
|
onClick: () => j((e) => Math.min(G, e + 1)),
|
|
796
800
|
disabled: A === G,
|
|
797
|
-
"aria-label":
|
|
798
|
-
children: /* @__PURE__ */
|
|
801
|
+
"aria-label": u(O, "sandbox.list.pagination.next.ariaLabel", "Next page"),
|
|
802
|
+
children: /* @__PURE__ */ y(ke, { size: 18 })
|
|
799
803
|
})
|
|
800
804
|
]
|
|
801
805
|
})]
|
|
802
806
|
})
|
|
803
807
|
})
|
|
804
|
-
] }) : /* @__PURE__ */
|
|
808
|
+
] }) : /* @__PURE__ */ y(Ze, {
|
|
805
809
|
illustration: q ? "empty-search" : "empty-generic",
|
|
806
|
-
title: q ?
|
|
807
|
-
description: q ?
|
|
808
|
-
action: q ? /* @__PURE__ */
|
|
810
|
+
title: q ? u(O, "sandbox.list.empty.filtered.title", "No matching sandboxes") : u(O, "sandbox.list.empty.title", "No sandboxes yet"),
|
|
811
|
+
description: q ? u(O, "sandbox.list.empty.filtered.description", "Try adjusting your search or filters to find what you're looking for.") : u(O, "sandbox.list.empty.description", "Create your first sandbox to start building and testing in isolated environments."),
|
|
812
|
+
action: q ? /* @__PURE__ */ b(r, {
|
|
809
813
|
variant: "outline",
|
|
810
|
-
onClick:
|
|
811
|
-
children: [/* @__PURE__ */
|
|
812
|
-
}) : /* @__PURE__ */
|
|
813
|
-
onClick:
|
|
814
|
-
children: [/* @__PURE__ */
|
|
814
|
+
onClick: Tt,
|
|
815
|
+
children: [/* @__PURE__ */ y(_, { size: 16 }), u(O, "sandbox.list.empty.filtered.clearFilters", "Clear Filters")]
|
|
816
|
+
}) : /* @__PURE__ */ b(r, {
|
|
817
|
+
onClick: Et,
|
|
818
|
+
children: [/* @__PURE__ */ y(Pe, { size: 16 }), u(O, "sandbox.list.empty.createFirst", "Create First Sandbox")]
|
|
815
819
|
})
|
|
816
820
|
})
|
|
817
821
|
}),
|
|
818
|
-
/* @__PURE__ */
|
|
822
|
+
/* @__PURE__ */ y(he, {
|
|
819
823
|
workspaceId: z ?? "",
|
|
820
|
-
open:
|
|
821
|
-
onClose: () =>
|
|
824
|
+
open: dt,
|
|
825
|
+
onClose: () => ft(!1)
|
|
822
826
|
}),
|
|
823
|
-
/* @__PURE__ */
|
|
824
|
-
open:
|
|
827
|
+
/* @__PURE__ */ y(Be, {
|
|
828
|
+
open: ot !== null,
|
|
825
829
|
onOpenChange: (e) => {
|
|
826
830
|
e || R(null);
|
|
827
831
|
},
|
|
828
|
-
children: /* @__PURE__ */
|
|
832
|
+
children: /* @__PURE__ */ b(Ue, { children: [/* @__PURE__ */ b(Ke, { children: [/* @__PURE__ */ y(qe, { children: u(O, "sandbox.list.bulk.deleteSelected", "Delete Selected") }), /* @__PURE__ */ y(We, { children: ot?.message })] }), /* @__PURE__ */ b(Ge, { children: [/* @__PURE__ */ y(He, { children: "Cancel" }), /* @__PURE__ */ y(Ve, {
|
|
829
833
|
className: "bg-status-error-bg text-status-error-text hover:bg-status-error-bg/90",
|
|
830
834
|
onClick: () => {
|
|
831
|
-
|
|
835
|
+
zt();
|
|
832
836
|
},
|
|
833
837
|
children: "Delete"
|
|
834
838
|
})] })] })
|