@burdenoff/microfe-sandbox 2026.608.1 → 2026.611.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/wspace-operations.js +108 -48
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/sandbox/components/SandboxScriptRunnerPanel.js +241 -0
- package/dist/sandbox/components/SandboxScriptRunnerPanel.js.map +1 -0
- package/dist/sandbox/pages/SandboxDetailPage.js +80 -75
- package/dist/sandbox/pages/SandboxDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,9 +12,10 @@ import { isNative as v, nativeCopyText as y, nativeImpact as b, nativeNotify as
|
|
|
12
12
|
import { ExtendTTLModal as C } from "../components/ExtendTTLModal.js";
|
|
13
13
|
import { SandboxActivityTab as w } from "../components/SandboxActivityTab.js";
|
|
14
14
|
import { SandboxAgentAppPanel as ee } from "../components/SandboxAgentAppPanel.js";
|
|
15
|
+
import { SandboxScriptRunnerPanel as te } from "../components/SandboxScriptRunnerPanel.js";
|
|
15
16
|
import { useCallback as T, useEffect as E, useRef as D, useState as O } from "react";
|
|
16
|
-
import { AlertCircle as
|
|
17
|
-
import { useParams as
|
|
17
|
+
import { AlertCircle as k, ArrowLeft as ne, CheckCircle2 as A, Clock as re, Cog as ie, Container as ae, Copy as j, Database as oe, Download as M, Info as N, Network as se, Play as P, RefreshCw as F, Shield as I, StopCircle as L, Terminal as R, Timer as z, Trash2 as ce } from "lucide-react";
|
|
18
|
+
import { useParams as le } from "react-router-dom";
|
|
18
19
|
import { useI18n as B } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
19
20
|
import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
20
21
|
//#region src/sandbox/pages/SandboxDetailPage.tsx
|
|
@@ -27,11 +28,11 @@ function W(e) {
|
|
|
27
28
|
minute: "2-digit"
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function G(e) {
|
|
31
32
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60);
|
|
32
33
|
return t > 0 ? `${t}h ${n}m` : `${n}m`;
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function ue(e) {
|
|
35
36
|
if (!e) return null;
|
|
36
37
|
let t = new Date(e).getTime() - Date.now();
|
|
37
38
|
if (t <= 0) return "Expired";
|
|
@@ -44,7 +45,7 @@ function K({ isCopied: e, onCopy: t, ariaLabel: n }) {
|
|
|
44
45
|
onClick: t,
|
|
45
46
|
className: "p-1 rounded hover:bg-muted transition-colors",
|
|
46
47
|
"aria-label": n,
|
|
47
|
-
children: e ? /* @__PURE__ */ H(
|
|
48
|
+
children: e ? /* @__PURE__ */ H(A, {
|
|
48
49
|
size: 14,
|
|
49
50
|
className: "text-status-success-text"
|
|
50
51
|
}) : /* @__PURE__ */ H(j, {
|
|
@@ -61,7 +62,7 @@ function q({ value: e, field: t, copiedField: n, onCopy: r, ariaLabel: i }) {
|
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
function J() {
|
|
64
|
-
let { sandboxId: m } =
|
|
65
|
+
let { sandboxId: m } = le(), { basePath: T = "/", navigate: E, workspaceId: D } = e(), { t: A } = B(), [j, M] = O(null), [R, K] = O(!1), [J, Y] = O(!1), { data: fe, loading: pe, refetch: X } = h({
|
|
65
66
|
variables: {
|
|
66
67
|
context: { workspaceId: D },
|
|
67
68
|
id: m
|
|
@@ -75,16 +76,16 @@ function J() {
|
|
|
75
76
|
},
|
|
76
77
|
skip: !m || !D
|
|
77
78
|
});
|
|
78
|
-
let [
|
|
79
|
-
b("light"), await y(e) ? (x("success"), v() && S(`Copied ${t}`),
|
|
79
|
+
let [me] = _(), [he] = f(), [ge] = p(), _e = u(), Z = fe?.getSandbox, ve = async (e, t) => {
|
|
80
|
+
b("light"), await y(e) ? (x("success"), v() && S(`Copied ${t}`), M(t), setTimeout(() => M(null), 2e3)) : x("error");
|
|
80
81
|
}, Q = (e, t) => {
|
|
81
|
-
|
|
82
|
-
}, $ = (e) => a(
|
|
83
|
-
if (
|
|
82
|
+
ve(e, t);
|
|
83
|
+
}, $ = (e) => a(A, "sandbox.detail.actions.copy.ariaLabel", "Copy {field}", { field: e });
|
|
84
|
+
if (pe) return /* @__PURE__ */ H(d, {
|
|
84
85
|
showHeader: !1,
|
|
85
86
|
children: /* @__PURE__ */ H("div", {
|
|
86
87
|
className: "flex items-center justify-center h-64",
|
|
87
|
-
children: /* @__PURE__ */ H(
|
|
88
|
+
children: /* @__PURE__ */ H(F, {
|
|
88
89
|
size: 24,
|
|
89
90
|
className: "animate-spin text-muted-foreground"
|
|
90
91
|
})
|
|
@@ -96,16 +97,16 @@ function J() {
|
|
|
96
97
|
className: "text-center py-16",
|
|
97
98
|
children: [/* @__PURE__ */ H("p", {
|
|
98
99
|
className: "text-muted-foreground",
|
|
99
|
-
children: a(
|
|
100
|
+
children: a(A, "sandbox.detail.notFound.message", "Sandbox not found")
|
|
100
101
|
}), /* @__PURE__ */ H(n, {
|
|
101
102
|
variant: "outline",
|
|
102
103
|
onClick: () => E?.(T),
|
|
103
104
|
className: "mt-4",
|
|
104
|
-
children: a(
|
|
105
|
+
children: a(A, "sandbox.detail.notFound.backButton", "Back to Sandboxes")
|
|
105
106
|
})]
|
|
106
107
|
})
|
|
107
108
|
});
|
|
108
|
-
let
|
|
109
|
+
let ye = Z.status === "RUNNING" || Z.status === "PROVISIONING" || Z.status === "PENDING", be = Z.status === "RUNNING", xe = Z.status === "STOPPED" || Z.status === "ERROR" || Z.status === "EXPIRED" || Z.status === "FAILED", Se = Z.status === "RUNNING";
|
|
109
110
|
return /* @__PURE__ */ U(d, {
|
|
110
111
|
showHeader: !1,
|
|
111
112
|
children: [
|
|
@@ -120,7 +121,7 @@ function J() {
|
|
|
120
121
|
type: "button",
|
|
121
122
|
onClick: () => E?.(T),
|
|
122
123
|
className: "p-2.5 hover:bg-accent rounded-lg transition-all duration-200 hover:scale-110",
|
|
123
|
-
"aria-label": a(
|
|
124
|
+
"aria-label": a(A, "sandbox.detail.header.back.ariaLabel", "Back to sandboxes"),
|
|
124
125
|
children: /* @__PURE__ */ H(ne, { size: 20 })
|
|
125
126
|
}), /* @__PURE__ */ U("div", {
|
|
126
127
|
className: "flex items-center gap-3 flex-1",
|
|
@@ -159,7 +160,7 @@ function J() {
|
|
|
159
160
|
variant: "outline",
|
|
160
161
|
className: "gap-1.5 px-3 py-1.5 text-sm",
|
|
161
162
|
children: [
|
|
162
|
-
/* @__PURE__ */ H(
|
|
163
|
+
/* @__PURE__ */ H(se, { size: 14 }),
|
|
163
164
|
Z.network.internalUrl,
|
|
164
165
|
/* @__PURE__ */ H(q, {
|
|
165
166
|
value: Z.network.internalUrl,
|
|
@@ -170,35 +171,35 @@ function J() {
|
|
|
170
171
|
})
|
|
171
172
|
]
|
|
172
173
|
}),
|
|
173
|
-
|
|
174
|
+
Se && /* @__PURE__ */ U(n, {
|
|
174
175
|
variant: "outline",
|
|
175
176
|
onClick: () => K(!0),
|
|
176
|
-
children: [/* @__PURE__ */ H(z, { size: 16 }), a(
|
|
177
|
+
children: [/* @__PURE__ */ H(z, { size: 16 }), a(A, "sandbox.detail.actions.extendTtl", "Extend TTL")]
|
|
177
178
|
}),
|
|
178
|
-
|
|
179
|
+
be && /* @__PURE__ */ U(n, {
|
|
179
180
|
variant: "outline",
|
|
180
181
|
className: "text-status-warning-text border-border-default hover:bg-status-warning-bg-subtle",
|
|
181
|
-
onClick: () =>
|
|
182
|
+
onClick: () => me({ variables: {
|
|
182
183
|
context: { workspaceId: D },
|
|
183
184
|
id: Z.id
|
|
184
185
|
} }).then(() => X()),
|
|
185
|
-
children: [/* @__PURE__ */ H(L, { size: 16 }), a(
|
|
186
|
+
children: [/* @__PURE__ */ H(L, { size: 16 }), a(A, "sandbox.detail.actions.stop", "Stop")]
|
|
186
187
|
}),
|
|
187
|
-
|
|
188
|
+
xe && /* @__PURE__ */ U(n, {
|
|
188
189
|
variant: "outline",
|
|
189
190
|
className: "text-destructive border-destructive/50 hover:bg-destructive/10",
|
|
190
|
-
onClick: () =>
|
|
191
|
+
onClick: () => he({ variables: {
|
|
191
192
|
context: { workspaceId: D },
|
|
192
193
|
id: Z.id
|
|
193
194
|
} }).then(() => {
|
|
194
195
|
E?.(T);
|
|
195
196
|
}),
|
|
196
|
-
children: [/* @__PURE__ */ H(
|
|
197
|
+
children: [/* @__PURE__ */ H(ce, { size: 16 }), a(A, "sandbox.detail.actions.delete", "Delete")]
|
|
197
198
|
}),
|
|
198
199
|
/* @__PURE__ */ U(n, {
|
|
199
200
|
variant: "ghost",
|
|
200
201
|
onClick: () => X(),
|
|
201
|
-
children: [/* @__PURE__ */ H(
|
|
202
|
+
children: [/* @__PURE__ */ H(F, { size: 16 }), a(A, "sandbox.detail.actions.refresh", "Refresh")]
|
|
202
203
|
})
|
|
203
204
|
]
|
|
204
205
|
}),
|
|
@@ -217,7 +218,7 @@ function J() {
|
|
|
217
218
|
className: "p-5",
|
|
218
219
|
children: /* @__PURE__ */ U("div", {
|
|
219
220
|
className: "flex items-start gap-3",
|
|
220
|
-
children: [/* @__PURE__ */ H(
|
|
221
|
+
children: [/* @__PURE__ */ H(N, {
|
|
221
222
|
size: 18,
|
|
222
223
|
className: "text-primary flex-shrink-0 mt-0.5"
|
|
223
224
|
}), /* @__PURE__ */ H("p", {
|
|
@@ -235,11 +236,11 @@ function J() {
|
|
|
235
236
|
className: "font-semibold mb-4 flex items-center gap-2",
|
|
236
237
|
children: [/* @__PURE__ */ H("div", {
|
|
237
238
|
className: "p-1.5 rounded-lg bg-primary/10",
|
|
238
|
-
children: /* @__PURE__ */ H(
|
|
239
|
+
children: /* @__PURE__ */ H(F, {
|
|
239
240
|
size: 14,
|
|
240
241
|
className: "text-primary"
|
|
241
242
|
})
|
|
242
|
-
}), a(
|
|
243
|
+
}), a(A, "sandbox.detail.cards.resources.title", "Resources")]
|
|
243
244
|
}), /* @__PURE__ */ H(s, {
|
|
244
245
|
cpuRequest: Z.resources?.cpuRequest ?? "0",
|
|
245
246
|
cpuLimit: Z.resources?.cpuLimit,
|
|
@@ -255,11 +256,11 @@ function J() {
|
|
|
255
256
|
className: "font-semibold mb-4 flex items-center gap-2",
|
|
256
257
|
children: [/* @__PURE__ */ H("div", {
|
|
257
258
|
className: "p-1.5 rounded-lg bg-primary/10",
|
|
258
|
-
children: /* @__PURE__ */ H(
|
|
259
|
+
children: /* @__PURE__ */ H(I, {
|
|
259
260
|
size: 14,
|
|
260
261
|
className: "text-primary"
|
|
261
262
|
})
|
|
262
|
-
}), a(
|
|
263
|
+
}), a(A, "sandbox.detail.cards.kubernetes.title", "Kubernetes")]
|
|
263
264
|
}), /* @__PURE__ */ U("div", {
|
|
264
265
|
className: "space-y-3",
|
|
265
266
|
children: [
|
|
@@ -267,7 +268,7 @@ function J() {
|
|
|
267
268
|
className: "flex items-center justify-between",
|
|
268
269
|
children: [/* @__PURE__ */ H("span", {
|
|
269
270
|
className: "text-sm text-muted-foreground",
|
|
270
|
-
children: a(
|
|
271
|
+
children: a(A, "sandbox.detail.cards.kubernetes.crdName", "CRD Name")
|
|
271
272
|
}), /* @__PURE__ */ U("div", {
|
|
272
273
|
className: "flex items-center gap-1.5",
|
|
273
274
|
children: [/* @__PURE__ */ H("span", {
|
|
@@ -286,7 +287,7 @@ function J() {
|
|
|
286
287
|
className: "flex items-center justify-between",
|
|
287
288
|
children: [/* @__PURE__ */ H("span", {
|
|
288
289
|
className: "text-sm text-muted-foreground",
|
|
289
|
-
children: a(
|
|
290
|
+
children: a(A, "sandbox.detail.cards.kubernetes.podName", "Pod Name")
|
|
290
291
|
}), /* @__PURE__ */ U("div", {
|
|
291
292
|
className: "flex items-center gap-1.5",
|
|
292
293
|
children: [/* @__PURE__ */ H("span", {
|
|
@@ -305,7 +306,7 @@ function J() {
|
|
|
305
306
|
className: "flex items-center justify-between",
|
|
306
307
|
children: [/* @__PURE__ */ H("span", {
|
|
307
308
|
className: "text-sm text-muted-foreground",
|
|
308
|
-
children: a(
|
|
309
|
+
children: a(A, "sandbox.detail.cards.kubernetes.namespace", "Namespace")
|
|
309
310
|
}), /* @__PURE__ */ H("span", {
|
|
310
311
|
className: "text-sm font-mono",
|
|
311
312
|
children: Z.namespace
|
|
@@ -315,7 +316,7 @@ function J() {
|
|
|
315
316
|
className: "flex items-center justify-between",
|
|
316
317
|
children: [/* @__PURE__ */ H("span", {
|
|
317
318
|
className: "text-sm text-muted-foreground",
|
|
318
|
-
children: a(
|
|
319
|
+
children: a(A, "sandbox.detail.cards.kubernetes.runtimeClass", "Runtime Class")
|
|
319
320
|
}), /* @__PURE__ */ H(t, {
|
|
320
321
|
variant: "secondary",
|
|
321
322
|
className: "font-mono text-xs",
|
|
@@ -326,7 +327,7 @@ function J() {
|
|
|
326
327
|
className: "flex items-center justify-between",
|
|
327
328
|
children: [/* @__PURE__ */ H("span", {
|
|
328
329
|
className: "text-sm text-muted-foreground",
|
|
329
|
-
children: a(
|
|
330
|
+
children: a(A, "sandbox.detail.cards.kubernetes.serviceName", "Service Name")
|
|
330
331
|
}), /* @__PURE__ */ U("div", {
|
|
331
332
|
className: "flex items-center gap-1.5",
|
|
332
333
|
children: [/* @__PURE__ */ H("span", {
|
|
@@ -345,7 +346,7 @@ function J() {
|
|
|
345
346
|
className: "flex items-center justify-between",
|
|
346
347
|
children: [/* @__PURE__ */ H("span", {
|
|
347
348
|
className: "text-sm text-muted-foreground",
|
|
348
|
-
children: a(
|
|
349
|
+
children: a(A, "sandbox.detail.cards.kubernetes.internalUrl", "Internal URL")
|
|
349
350
|
}), /* @__PURE__ */ U("div", {
|
|
350
351
|
className: "flex items-center gap-1.5",
|
|
351
352
|
children: [/* @__PURE__ */ H("span", {
|
|
@@ -364,7 +365,7 @@ function J() {
|
|
|
364
365
|
className: "mt-3 pt-3 border-t border-border/30",
|
|
365
366
|
children: [/* @__PURE__ */ H("p", {
|
|
366
367
|
className: "text-xs font-semibold text-muted-foreground mb-2",
|
|
367
|
-
children: a(
|
|
368
|
+
children: a(A, "sandbox.detail.cards.kubernetes.containerEndpoints", "Container Endpoints")
|
|
368
369
|
}), /* @__PURE__ */ H("div", {
|
|
369
370
|
className: "space-y-1.5",
|
|
370
371
|
children: Object.entries(Z.network.containerUrls).reduce((e, [t, n]) => (t.includes(":") || e.push(/* @__PURE__ */ U("div", {
|
|
@@ -401,7 +402,7 @@ function J() {
|
|
|
401
402
|
size: 14,
|
|
402
403
|
className: "text-primary"
|
|
403
404
|
})
|
|
404
|
-
}), a(
|
|
405
|
+
}), a(A, "sandbox.detail.cards.lifecycle.title", "Lifecycle")]
|
|
405
406
|
}), /* @__PURE__ */ U("div", {
|
|
406
407
|
className: "space-y-3",
|
|
407
408
|
children: [
|
|
@@ -409,28 +410,28 @@ function J() {
|
|
|
409
410
|
className: "flex items-center justify-between",
|
|
410
411
|
children: [/* @__PURE__ */ H("span", {
|
|
411
412
|
className: "text-sm text-muted-foreground",
|
|
412
|
-
children: a(
|
|
413
|
+
children: a(A, "sandbox.detail.cards.lifecycle.ttl", "TTL")
|
|
413
414
|
}), /* @__PURE__ */ H("span", {
|
|
414
415
|
className: "text-sm font-medium",
|
|
415
|
-
children:
|
|
416
|
+
children: G(Z.ttlSeconds)
|
|
416
417
|
})]
|
|
417
418
|
}),
|
|
418
|
-
Z.expiresAt &&
|
|
419
|
+
Z.expiresAt && ye && /* @__PURE__ */ U("div", {
|
|
419
420
|
className: "flex items-center justify-between",
|
|
420
421
|
children: [/* @__PURE__ */ H("span", {
|
|
421
422
|
className: "text-sm text-muted-foreground",
|
|
422
|
-
children: a(
|
|
423
|
+
children: a(A, "sandbox.detail.cards.lifecycle.expires", "Expires")
|
|
423
424
|
}), /* @__PURE__ */ U(t, {
|
|
424
425
|
variant: "outline",
|
|
425
426
|
className: "gap-1",
|
|
426
|
-
children: [/* @__PURE__ */ H(z, { size: 12 }),
|
|
427
|
+
children: [/* @__PURE__ */ H(z, { size: 12 }), ue(Z.expiresAt)]
|
|
427
428
|
})]
|
|
428
429
|
}),
|
|
429
430
|
/* @__PURE__ */ U("div", {
|
|
430
431
|
className: "flex items-center justify-between",
|
|
431
432
|
children: [/* @__PURE__ */ H("span", {
|
|
432
433
|
className: "text-sm text-muted-foreground",
|
|
433
|
-
children: a(
|
|
434
|
+
children: a(A, "sandbox.detail.cards.lifecycle.created", "Created")
|
|
434
435
|
}), /* @__PURE__ */ H("span", {
|
|
435
436
|
className: "text-sm",
|
|
436
437
|
children: W(Z.createdAt)
|
|
@@ -440,7 +441,7 @@ function J() {
|
|
|
440
441
|
className: "flex items-center justify-between",
|
|
441
442
|
children: [/* @__PURE__ */ H("span", {
|
|
442
443
|
className: "text-sm text-muted-foreground",
|
|
443
|
-
children: a(
|
|
444
|
+
children: a(A, "sandbox.detail.cards.lifecycle.updated", "Updated")
|
|
444
445
|
}), /* @__PURE__ */ H("span", {
|
|
445
446
|
className: "text-sm",
|
|
446
447
|
children: W(Z.updatedAt)
|
|
@@ -450,7 +451,7 @@ function J() {
|
|
|
450
451
|
className: "flex items-center justify-between",
|
|
451
452
|
children: [/* @__PURE__ */ H("span", {
|
|
452
453
|
className: "text-sm text-muted-foreground",
|
|
453
|
-
children: a(
|
|
454
|
+
children: a(A, "sandbox.detail.cards.lifecycle.stopped", "Stopped")
|
|
454
455
|
}), /* @__PURE__ */ H("span", {
|
|
455
456
|
className: "text-sm",
|
|
456
457
|
children: W(Z.stoppedAt)
|
|
@@ -465,11 +466,11 @@ function J() {
|
|
|
465
466
|
className: "font-semibold mb-4 flex items-center gap-2",
|
|
466
467
|
children: [/* @__PURE__ */ H("div", {
|
|
467
468
|
className: "p-1.5 rounded-lg bg-primary/10",
|
|
468
|
-
children: /* @__PURE__ */ H(
|
|
469
|
+
children: /* @__PURE__ */ H(N, {
|
|
469
470
|
size: 14,
|
|
470
471
|
className: "text-primary"
|
|
471
472
|
})
|
|
472
|
-
}), a(
|
|
473
|
+
}), a(A, "sandbox.detail.cards.details.title", "Details")]
|
|
473
474
|
}), /* @__PURE__ */ U("div", {
|
|
474
475
|
className: "space-y-3",
|
|
475
476
|
children: [
|
|
@@ -477,7 +478,7 @@ function J() {
|
|
|
477
478
|
className: "flex items-center justify-between",
|
|
478
479
|
children: [/* @__PURE__ */ H("span", {
|
|
479
480
|
className: "text-sm text-muted-foreground",
|
|
480
|
-
children: a(
|
|
481
|
+
children: a(A, "sandbox.detail.cards.details.template", "Template")
|
|
481
482
|
}), /* @__PURE__ */ H(c, {
|
|
482
483
|
type: Z.template,
|
|
483
484
|
showLabel: !0
|
|
@@ -487,18 +488,18 @@ function J() {
|
|
|
487
488
|
className: "flex items-center justify-between",
|
|
488
489
|
children: [/* @__PURE__ */ H("span", {
|
|
489
490
|
className: "text-sm text-muted-foreground",
|
|
490
|
-
children: a(
|
|
491
|
+
children: a(A, "sandbox.detail.cards.details.mode", "Mode")
|
|
491
492
|
}), /* @__PURE__ */ H(t, {
|
|
492
493
|
variant: "outline",
|
|
493
494
|
className: "gap-1 text-xs font-mono",
|
|
494
495
|
children: Z.mode === "JOB" ? /* @__PURE__ */ U(V, { children: [
|
|
495
|
-
/* @__PURE__ */ H(
|
|
496
|
+
/* @__PURE__ */ H(P, { size: 12 }),
|
|
496
497
|
" ",
|
|
497
|
-
a(
|
|
498
|
+
a(A, "sandbox.detail.cards.details.mode.job", "Job")
|
|
498
499
|
] }) : /* @__PURE__ */ U(V, { children: [
|
|
499
500
|
/* @__PURE__ */ H(ie, { size: 12 }),
|
|
500
501
|
" ",
|
|
501
|
-
a(
|
|
502
|
+
a(A, "sandbox.detail.cards.details.mode.deployment", "Deployment")
|
|
502
503
|
] })
|
|
503
504
|
})]
|
|
504
505
|
}),
|
|
@@ -506,7 +507,7 @@ function J() {
|
|
|
506
507
|
className: "flex items-center justify-between",
|
|
507
508
|
children: [/* @__PURE__ */ H("span", {
|
|
508
509
|
className: "text-sm text-muted-foreground",
|
|
509
|
-
children: a(
|
|
510
|
+
children: a(A, "sandbox.detail.cards.details.workspace", "Workspace")
|
|
510
511
|
}), /* @__PURE__ */ H("span", {
|
|
511
512
|
className: "text-sm font-mono",
|
|
512
513
|
children: Z.workspaceId
|
|
@@ -516,7 +517,7 @@ function J() {
|
|
|
516
517
|
className: "flex items-center justify-between",
|
|
517
518
|
children: [/* @__PURE__ */ H("span", {
|
|
518
519
|
className: "text-sm text-muted-foreground",
|
|
519
|
-
children: a(
|
|
520
|
+
children: a(A, "sandbox.detail.cards.details.createdBy", "Created By")
|
|
520
521
|
}), /* @__PURE__ */ H("span", {
|
|
521
522
|
className: "text-sm",
|
|
522
523
|
children: Z.createdBy
|
|
@@ -534,12 +535,12 @@ function J() {
|
|
|
534
535
|
children: [
|
|
535
536
|
/* @__PURE__ */ H("div", {
|
|
536
537
|
className: "p-1.5 rounded-lg bg-primary/10",
|
|
537
|
-
children: /* @__PURE__ */ H(
|
|
538
|
+
children: /* @__PURE__ */ H(ae, {
|
|
538
539
|
size: 14,
|
|
539
540
|
className: "text-primary"
|
|
540
541
|
})
|
|
541
542
|
}),
|
|
542
|
-
a(
|
|
543
|
+
a(A, "sandbox.detail.cards.containers.title", "Containers"),
|
|
543
544
|
/* @__PURE__ */ H(t, {
|
|
544
545
|
variant: "secondary",
|
|
545
546
|
className: "ml-1",
|
|
@@ -579,7 +580,7 @@ function J() {
|
|
|
579
580
|
r && /* @__PURE__ */ H(t, {
|
|
580
581
|
variant: r.ready ? "default" : "secondary",
|
|
581
582
|
className: `text-xs ${r.ready ? "bg-status-success-bg-subtle text-status-success-text" : ""}`,
|
|
582
|
-
children: r.ready ? a(
|
|
583
|
+
children: r.ready ? a(A, "sandbox.detail.cards.containers.status.ready", "Ready") : a(A, "sandbox.detail.cards.containers.status.notReady", "Not Ready")
|
|
583
584
|
}),
|
|
584
585
|
r?.restartCount !== void 0 && r.restartCount > 0 && /* @__PURE__ */ U(t, {
|
|
585
586
|
variant: "outline",
|
|
@@ -602,11 +603,11 @@ function J() {
|
|
|
602
603
|
className: "font-semibold mb-4 flex items-center gap-2",
|
|
603
604
|
children: [/* @__PURE__ */ H("div", {
|
|
604
605
|
className: "p-1.5 rounded-lg bg-primary/10",
|
|
605
|
-
children: /* @__PURE__ */ H(
|
|
606
|
+
children: /* @__PURE__ */ H(oe, {
|
|
606
607
|
size: 14,
|
|
607
608
|
className: "text-primary"
|
|
608
609
|
})
|
|
609
|
-
}), a(
|
|
610
|
+
}), a(A, "sandbox.detail.cards.storage.title", "Storage")]
|
|
610
611
|
}), /* @__PURE__ */ U("div", {
|
|
611
612
|
className: "space-y-3",
|
|
612
613
|
children: [
|
|
@@ -614,17 +615,17 @@ function J() {
|
|
|
614
615
|
className: "flex items-center justify-between",
|
|
615
616
|
children: [/* @__PURE__ */ H("span", {
|
|
616
617
|
className: "text-sm text-muted-foreground",
|
|
617
|
-
children: a(
|
|
618
|
+
children: a(A, "sandbox.detail.cards.storage.mode", "Mode")
|
|
618
619
|
}), /* @__PURE__ */ H(t, {
|
|
619
620
|
variant: "outline",
|
|
620
|
-
children: Z.storage.mode === "EPHEMERAL" ? a(
|
|
621
|
+
children: Z.storage.mode === "EPHEMERAL" ? a(A, "sandbox.detail.cards.storage.ephemeral", "Ephemeral") : a(A, "sandbox.detail.cards.storage.persistent", "Persistent")
|
|
621
622
|
})]
|
|
622
623
|
}),
|
|
623
624
|
Z.storage.sizeGi && /* @__PURE__ */ U("div", {
|
|
624
625
|
className: "flex items-center justify-between",
|
|
625
626
|
children: [/* @__PURE__ */ H("span", {
|
|
626
627
|
className: "text-sm text-muted-foreground",
|
|
627
|
-
children: a(
|
|
628
|
+
children: a(A, "sandbox.detail.cards.storage.size", "Size")
|
|
628
629
|
}), /* @__PURE__ */ U("span", {
|
|
629
630
|
className: "text-sm font-medium",
|
|
630
631
|
children: [Z.storage.sizeGi, " GiB"]
|
|
@@ -634,7 +635,7 @@ function J() {
|
|
|
634
635
|
className: "flex items-center justify-between",
|
|
635
636
|
children: [/* @__PURE__ */ H("span", {
|
|
636
637
|
className: "text-sm text-muted-foreground",
|
|
637
|
-
children: a(
|
|
638
|
+
children: a(A, "sandbox.detail.cards.storage.mountPath", "Mount Path")
|
|
638
639
|
}), /* @__PURE__ */ H("span", {
|
|
639
640
|
className: "text-sm font-mono",
|
|
640
641
|
children: Z.storage.mountPath
|
|
@@ -644,10 +645,10 @@ function J() {
|
|
|
644
645
|
className: "flex items-center justify-between",
|
|
645
646
|
children: [/* @__PURE__ */ H("span", {
|
|
646
647
|
className: "text-sm text-muted-foreground",
|
|
647
|
-
children: a(
|
|
648
|
+
children: a(A, "sandbox.detail.cards.storage.retainOnDelete", "Retain on Delete")
|
|
648
649
|
}), /* @__PURE__ */ H(t, {
|
|
649
650
|
variant: Z.storage.retainOnDelete ? "default" : "secondary",
|
|
650
|
-
children: Z.storage.retainOnDelete ? a(
|
|
651
|
+
children: Z.storage.retainOnDelete ? a(A, "sandbox.detail.cards.storage.retainYes", "Yes") : a(A, "sandbox.detail.cards.storage.retainNo", "No")
|
|
651
652
|
})]
|
|
652
653
|
})
|
|
653
654
|
]
|
|
@@ -659,7 +660,7 @@ function J() {
|
|
|
659
660
|
className: "p-5",
|
|
660
661
|
children: [/* @__PURE__ */ U("h3", {
|
|
661
662
|
className: "font-semibold text-destructive mb-2 flex items-center gap-2",
|
|
662
|
-
children: [/* @__PURE__ */ H(
|
|
663
|
+
children: [/* @__PURE__ */ H(k, { size: 18 }), a(A, "sandbox.detail.cards.errorDetails.title", "Error Details")]
|
|
663
664
|
}), /* @__PURE__ */ H("p", {
|
|
664
665
|
className: "text-sm text-destructive/80 font-mono bg-destructive/5 rounded-lg p-3",
|
|
665
666
|
children: Z.errorMessage
|
|
@@ -681,13 +682,17 @@ function J() {
|
|
|
681
682
|
className: "p-5",
|
|
682
683
|
children: [/* @__PURE__ */ H("h3", {
|
|
683
684
|
className: "mb-3 text-sm font-semibold text-foreground",
|
|
684
|
-
children: a(
|
|
685
|
+
children: a(A, "sandbox.detail.cards.activity.title", "Activity")
|
|
685
686
|
}), /* @__PURE__ */ H(w, {
|
|
686
687
|
sandboxId: Z.id,
|
|
687
688
|
workspaceId: D ?? ""
|
|
688
689
|
})]
|
|
689
690
|
}) }),
|
|
690
|
-
/* @__PURE__ */ H(
|
|
691
|
+
/* @__PURE__ */ H(de, {
|
|
692
|
+
sandbox: Z,
|
|
693
|
+
workspaceId: D ?? ""
|
|
694
|
+
}),
|
|
695
|
+
/* @__PURE__ */ H(te, {
|
|
691
696
|
sandbox: Z,
|
|
692
697
|
workspaceId: D ?? ""
|
|
693
698
|
}),
|
|
@@ -697,13 +702,13 @@ function J() {
|
|
|
697
702
|
currentExpiresAt: Z.expiresAt,
|
|
698
703
|
isLoading: J,
|
|
699
704
|
onExtend: (e) => {
|
|
700
|
-
Y(!0),
|
|
705
|
+
Y(!0), ge({ variables: {
|
|
701
706
|
context: { workspaceId: D },
|
|
702
707
|
id: Z.id,
|
|
703
708
|
additionalSeconds: e
|
|
704
709
|
} }).then((t) => {
|
|
705
710
|
let n = t.data?.extendSandboxTTL;
|
|
706
|
-
n &&
|
|
711
|
+
n && _e.sandboxExtended({
|
|
707
712
|
sandboxId: n.id,
|
|
708
713
|
addedSeconds: e,
|
|
709
714
|
newExpiresAt: n.expiresAt
|
|
@@ -718,7 +723,7 @@ function J() {
|
|
|
718
723
|
]
|
|
719
724
|
});
|
|
720
725
|
}
|
|
721
|
-
function
|
|
726
|
+
function de({ sandbox: e, workspaceId: t }) {
|
|
722
727
|
let { t: o } = B(), [s, c] = O(e.containers?.[0]?.name ?? ""), [l, u] = O(100), d = D(null), [f, { data: p, loading: h, error: g }] = m(), _ = e.status === "RUNNING" || e.status === "PROVISIONING", C = T(() => {
|
|
723
728
|
!s || !_ || f({ variables: {
|
|
724
729
|
context: { workspaceId: t },
|
|
@@ -797,7 +802,7 @@ function ue({ sandbox: e, workspaceId: t }) {
|
|
|
797
802
|
size: "sm",
|
|
798
803
|
onClick: C,
|
|
799
804
|
disabled: !_ || h,
|
|
800
|
-
children: [/* @__PURE__ */ H(
|
|
805
|
+
children: [/* @__PURE__ */ H(F, {
|
|
801
806
|
size: 14,
|
|
802
807
|
className: h ? "animate-spin" : ""
|
|
803
808
|
}), a(o, "sandbox.detail.logs.refresh", "Refresh")]
|
|
@@ -820,7 +825,7 @@ function ue({ sandbox: e, workspaceId: t }) {
|
|
|
820
825
|
r.href = n, r.download = `sandbox-${e.name}-logs.txt`, r.click(), URL.revokeObjectURL(n);
|
|
821
826
|
},
|
|
822
827
|
title: a(o, "sandbox.detail.logs.download.title", "Download logs"),
|
|
823
|
-
children: /* @__PURE__ */ H(
|
|
828
|
+
children: /* @__PURE__ */ H(M, { size: 14 })
|
|
824
829
|
})] })
|
|
825
830
|
]
|
|
826
831
|
})]
|