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