@burdenoff/microfe-sandbox 2026.625.3 → 2026.626.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/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
|
@@ -7,20 +7,20 @@ import { SandboxTypeIcon as f } from "../components/SandboxTypeIcon.js";
|
|
|
7
7
|
import { CountdownTimer as p } from "../components/CountdownTimer.js";
|
|
8
8
|
import { useSandboxEvents as m } from "../utils/sandboxEvents.js";
|
|
9
9
|
import { PageLayout as h } from "../components/PageLayout.js";
|
|
10
|
-
import { useDeleteSandboxMutation as g, useExtendSandboxTtlMutation as _, useGetSandboxLogsLazyQuery as v, useGetSandboxQuery as
|
|
11
|
-
import { isNative as
|
|
12
|
-
import { ExtendTTLModal as
|
|
13
|
-
import { SandboxActivityTab as
|
|
14
|
-
import { SandboxAgentAppPanel as
|
|
15
|
-
import { SandboxScriptRunnerPanel as
|
|
16
|
-
import { useCallback as
|
|
17
|
-
import { AlertCircle as
|
|
18
|
-
import { useParams as
|
|
19
|
-
import { useI18n as
|
|
20
|
-
import { Fragment as
|
|
21
|
-
import { IllustratedEmptyState as
|
|
10
|
+
import { useDeleteSandboxMutation as g, useExtendSandboxTtlMutation as _, useGetSandboxLogsLazyQuery as v, useGetSandboxQuery as ee, useOnSandboxStatusChangedSubscription as te, useStopSandboxMutation as ne } from "../../generated/wspace-operations.js";
|
|
11
|
+
import { isNative as y, nativeCopyText as b, nativeImpact as x, nativeNotify as S, nativeToast as C } from "../../utils/nativeBridge.js";
|
|
12
|
+
import { ExtendTTLModal as re } from "../components/ExtendTTLModal.js";
|
|
13
|
+
import { SandboxActivityTab as ie } from "../components/SandboxActivityTab.js";
|
|
14
|
+
import { SandboxAgentAppPanel as ae } from "../components/SandboxAgentAppPanel.js";
|
|
15
|
+
import { SandboxScriptRunnerPanel as oe } from "../components/SandboxScriptRunnerPanel.js";
|
|
16
|
+
import { useCallback as w, useEffect as T, useRef as E, useState as D } from "react";
|
|
17
|
+
import { AlertCircle as se, ArrowLeft as ce, CheckCircle2 as O, Clock as le, Cog as ue, Container as de, Copy as k, Database as fe, Download as A, Info as j, Network as M, Play as pe, RefreshCw as N, Shield as me, StopCircle as P, Terminal as F, Timer as I, Trash2 as he } from "lucide-react";
|
|
18
|
+
import { useParams as ge } from "react-router-dom";
|
|
19
|
+
import { useI18n as L } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
20
|
+
import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
21
|
+
import { IllustratedEmptyState as _e, NextSteps as ve, PagePurpose as ye } from "@burdenoff/fe-libs/ui";
|
|
22
22
|
//#region src/sandbox/pages/SandboxDetailPage.tsx
|
|
23
|
-
function
|
|
23
|
+
function V(e) {
|
|
24
24
|
return new Date(e).toLocaleString(void 0, {
|
|
25
25
|
year: "numeric",
|
|
26
26
|
month: "short",
|
|
@@ -29,380 +29,417 @@ function K(e) {
|
|
|
29
29
|
minute: "2-digit"
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function be(e) {
|
|
33
33
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60);
|
|
34
34
|
return t > 0 ? `${t}h ${n}m` : `${n}m`;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function xe(e) {
|
|
37
37
|
if (!e) return null;
|
|
38
38
|
let t = new Date(e).getTime() - Date.now();
|
|
39
39
|
if (t <= 0) return "Expired";
|
|
40
40
|
let n = Math.floor(t / 36e5), r = Math.floor(t % 36e5 / 6e4);
|
|
41
41
|
return n > 0 ? `${n}h ${r}m remaining` : `${r}m remaining`;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return /* @__PURE__ */
|
|
43
|
+
function H({ isCopied: e, onCopy: t, ariaLabel: n }) {
|
|
44
|
+
return /* @__PURE__ */ z("button", {
|
|
45
45
|
type: "button",
|
|
46
46
|
onClick: t,
|
|
47
47
|
className: "p-1 rounded hover:bg-bg-sunken transition-colors",
|
|
48
48
|
"aria-label": n,
|
|
49
|
-
children: e ? /* @__PURE__ */
|
|
49
|
+
children: e ? /* @__PURE__ */ z(O, {
|
|
50
50
|
size: 14,
|
|
51
51
|
className: "text-status-success-text"
|
|
52
|
-
}) : /* @__PURE__ */
|
|
52
|
+
}) : /* @__PURE__ */ z(k, {
|
|
53
53
|
size: 14,
|
|
54
54
|
className: "text-text-secondary"
|
|
55
55
|
})
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
return /* @__PURE__ */
|
|
58
|
+
function U({ value: e, field: t, copiedField: n, onCopy: r, ariaLabel: i }) {
|
|
59
|
+
return /* @__PURE__ */ z(H, {
|
|
60
60
|
isCopied: n === t,
|
|
61
61
|
onCopy: () => r(e, t),
|
|
62
62
|
ariaLabel: i
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
return e ? /* @__PURE__ */
|
|
65
|
+
function Se({ enabled: e, collapsedHeight: t, children: n }) {
|
|
66
|
+
return e ? /* @__PURE__ */ z(c, {
|
|
67
67
|
collapsedHeight: t,
|
|
68
68
|
children: n
|
|
69
|
-
}) : /* @__PURE__ */
|
|
69
|
+
}) : /* @__PURE__ */ z(R, { children: n });
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
let { sandboxId: c } =
|
|
71
|
+
function W() {
|
|
72
|
+
let { sandboxId: c } = ge(), { basePath: v = "/", navigate: w, workspaceId: T } = e(), { t: E } = L(), [O, k] = D(null), [A, H] = D(!1), [W, G] = D(!1), { data: we, loading: Te, refetch: K } = ee({
|
|
73
73
|
variables: {
|
|
74
|
-
context: { workspaceId:
|
|
74
|
+
context: { workspaceId: T },
|
|
75
75
|
id: c
|
|
76
76
|
},
|
|
77
|
-
skip: !c || !
|
|
77
|
+
skip: !c || !T
|
|
78
78
|
});
|
|
79
|
-
|
|
79
|
+
te({
|
|
80
80
|
variables: {
|
|
81
|
-
workspaceId:
|
|
81
|
+
workspaceId: T,
|
|
82
82
|
sandboxId: c
|
|
83
83
|
},
|
|
84
|
-
skip: !c || !
|
|
84
|
+
skip: !c || !T
|
|
85
85
|
});
|
|
86
|
-
let [
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
if (
|
|
86
|
+
let [q] = ne(), [Ee] = g(), [De] = _(), Oe = m(), J = we?.getSandbox, ke = async (e, t) => {
|
|
87
|
+
x("light"), await b(e) ? (S("success"), y() && C(`Copied ${t}`), k(t), setTimeout(() => k(null), 2e3)) : S("error");
|
|
88
|
+
}, Y = (e, t) => {
|
|
89
|
+
ke(e, t);
|
|
90
|
+
}, X = (e) => l(E, "sandbox.detail.actions.copy.ariaLabel", "Copy {field}", { field: e });
|
|
91
|
+
if (Te) return /* @__PURE__ */ z(h, {
|
|
92
92
|
showHeader: !1,
|
|
93
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ z("div", {
|
|
94
94
|
className: "flex items-center justify-center h-64",
|
|
95
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ z(N, {
|
|
96
96
|
size: 24,
|
|
97
97
|
className: "animate-spin text-text-secondary"
|
|
98
98
|
})
|
|
99
99
|
})
|
|
100
100
|
});
|
|
101
|
-
if (!
|
|
101
|
+
if (!J) return /* @__PURE__ */ z(h, {
|
|
102
102
|
showHeader: !1,
|
|
103
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ z(_e, {
|
|
104
104
|
illustration: "empty-generic",
|
|
105
|
-
title: l(
|
|
106
|
-
action: /* @__PURE__ */
|
|
105
|
+
title: l(E, "sandbox.detail.notFound.message", "Sandbox not found"),
|
|
106
|
+
action: /* @__PURE__ */ z(n, {
|
|
107
107
|
variant: "outline",
|
|
108
|
-
onClick: () =>
|
|
109
|
-
children: l(
|
|
108
|
+
onClick: () => w?.(v),
|
|
109
|
+
children: l(E, "sandbox.detail.notFound.backButton", "Back to Sandboxes")
|
|
110
110
|
})
|
|
111
111
|
})
|
|
112
112
|
});
|
|
113
|
-
let
|
|
114
|
-
...
|
|
115
|
-
label: l(
|
|
116
|
-
onSelect: () =>
|
|
117
|
-
icon: /* @__PURE__ */
|
|
113
|
+
let Ae = J.status === "RUNNING" || J.status === "PROVISIONING" || J.status === "PENDING", Z = J.status === "RUNNING", je = J.status === "STOPPED" || J.status === "ERROR" || J.status === "EXPIRED" || J.status === "FAILED", Q = J.status === "RUNNING", Me = [
|
|
114
|
+
...Q ? [{
|
|
115
|
+
label: l(E, "sandbox.detail.actions.extendTtl", "Extend TTL"),
|
|
116
|
+
onSelect: () => H(!0),
|
|
117
|
+
icon: /* @__PURE__ */ z(I, { size: 16 })
|
|
118
118
|
}] : [],
|
|
119
|
-
...
|
|
120
|
-
label: l(
|
|
121
|
-
onSelect: () => void
|
|
122
|
-
context: { workspaceId:
|
|
123
|
-
id:
|
|
124
|
-
} }).then(() =>
|
|
125
|
-
icon: /* @__PURE__ */
|
|
119
|
+
...Z ? [{
|
|
120
|
+
label: l(E, "sandbox.detail.actions.stop", "Stop"),
|
|
121
|
+
onSelect: () => void q({ variables: {
|
|
122
|
+
context: { workspaceId: T },
|
|
123
|
+
id: J.id
|
|
124
|
+
} }).then(() => K()),
|
|
125
|
+
icon: /* @__PURE__ */ z(P, { size: 16 })
|
|
126
126
|
}] : [],
|
|
127
|
-
...
|
|
128
|
-
label: l(
|
|
129
|
-
onSelect: () => void
|
|
130
|
-
context: { workspaceId:
|
|
131
|
-
id:
|
|
127
|
+
...je ? [{
|
|
128
|
+
label: l(E, "sandbox.detail.actions.delete", "Delete"),
|
|
129
|
+
onSelect: () => void Ee({ variables: {
|
|
130
|
+
context: { workspaceId: T },
|
|
131
|
+
id: J.id
|
|
132
132
|
} }).then(() => {
|
|
133
|
-
|
|
133
|
+
w?.(v);
|
|
134
134
|
}),
|
|
135
|
-
icon: /* @__PURE__ */
|
|
135
|
+
icon: /* @__PURE__ */ z(he, { size: 16 }),
|
|
136
136
|
intent: "destructive"
|
|
137
137
|
}] : []
|
|
138
|
-
]
|
|
139
|
-
|
|
138
|
+
], $ = [
|
|
139
|
+
J.network?.internalUrl && J.status === "RUNNING" ? {
|
|
140
|
+
id: "copy-url",
|
|
141
|
+
label: l(E, "sandbox.detail.nextSteps.copyUrl.label", "Copy the internal URL to connect"),
|
|
142
|
+
description: l(E, "sandbox.detail.nextSteps.copyUrl.desc", "Use it to reach the running service from another sandbox or tool."),
|
|
143
|
+
icon: /* @__PURE__ */ z(M, { size: 16 }),
|
|
144
|
+
onClick: () => Y(J.network.internalUrl, "internalUrl")
|
|
145
|
+
} : null,
|
|
146
|
+
J.status === "RUNNING" ? {
|
|
147
|
+
id: "run-script",
|
|
148
|
+
label: l(E, "sandbox.detail.nextSteps.runScript.label", "Run a script inside the sandbox"),
|
|
149
|
+
description: l(E, "sandbox.detail.nextSteps.runScript.desc", "Execute a command or generated script, review the output, then promote it."),
|
|
150
|
+
icon: /* @__PURE__ */ z(F, { size: 16 }),
|
|
151
|
+
href: "#sandbox-script-runner"
|
|
152
|
+
} : null,
|
|
153
|
+
Q ? {
|
|
154
|
+
id: "extend-ttl",
|
|
155
|
+
label: l(E, "sandbox.detail.nextSteps.extendTtl.label", "Extend the time-to-live"),
|
|
156
|
+
description: l(E, "sandbox.detail.nextSteps.extendTtl.desc", "Keep this sandbox alive longer before it auto-expires."),
|
|
157
|
+
icon: /* @__PURE__ */ z(I, { size: 16 }),
|
|
158
|
+
onClick: () => H(!0)
|
|
159
|
+
} : null,
|
|
160
|
+
Z ? {
|
|
161
|
+
id: "stop",
|
|
162
|
+
label: l(E, "sandbox.detail.nextSteps.stop.label", "Stop the sandbox when you are done"),
|
|
163
|
+
description: l(E, "sandbox.detail.nextSteps.stop.desc", "Frees up resources and concurrency for your workspace."),
|
|
164
|
+
icon: /* @__PURE__ */ z(P, { size: 16 }),
|
|
165
|
+
onClick: () => void q({ variables: {
|
|
166
|
+
context: { workspaceId: T },
|
|
167
|
+
id: J.id
|
|
168
|
+
} }).then(() => K())
|
|
169
|
+
} : null
|
|
170
|
+
].filter((e) => e !== null);
|
|
171
|
+
return /* @__PURE__ */ B(h, {
|
|
140
172
|
showHeader: !1,
|
|
141
173
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ B(o, {
|
|
143
175
|
className: "overflow-hidden bg-hero-mesh",
|
|
144
176
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ B("div", {
|
|
146
178
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ B("div", {
|
|
148
180
|
className: "flex items-center gap-3 min-w-0",
|
|
149
181
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ z("button", {
|
|
151
183
|
type: "button",
|
|
152
|
-
onClick: () =>
|
|
184
|
+
onClick: () => w?.(v),
|
|
153
185
|
className: "flex size-11 flex-shrink-0 items-center justify-center rounded-lg hover:bg-bg-sunken/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border",
|
|
154
|
-
"aria-label": l(
|
|
155
|
-
children: /* @__PURE__ */
|
|
186
|
+
"aria-label": l(E, "sandbox.detail.header.back.ariaLabel", "Back to sandboxes"),
|
|
187
|
+
children: /* @__PURE__ */ z(ce, { size: 20 })
|
|
156
188
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
type:
|
|
189
|
+
/* @__PURE__ */ z(f, {
|
|
190
|
+
type: J.template,
|
|
159
191
|
size: 28
|
|
160
192
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ B("div", {
|
|
162
194
|
className: "min-w-0",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ z("h1", {
|
|
164
196
|
className: "truncate text-2xl sm:text-3xl font-bold",
|
|
165
|
-
children:
|
|
166
|
-
}), /* @__PURE__ */
|
|
197
|
+
children: J.name
|
|
198
|
+
}), /* @__PURE__ */ B("div", {
|
|
167
199
|
className: "flex flex-wrap items-center gap-2 mt-1",
|
|
168
200
|
children: [
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
status:
|
|
201
|
+
/* @__PURE__ */ z(u, {
|
|
202
|
+
status: J.status,
|
|
171
203
|
size: "md"
|
|
172
204
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ z("span", {
|
|
174
206
|
className: "text-sm text-text-secondary font-mono truncate",
|
|
175
|
-
children:
|
|
207
|
+
children: J.id
|
|
176
208
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
value:
|
|
209
|
+
/* @__PURE__ */ z(U, {
|
|
210
|
+
value: J.id,
|
|
179
211
|
field: "id",
|
|
180
|
-
copiedField:
|
|
181
|
-
onCopy:
|
|
182
|
-
ariaLabel:
|
|
212
|
+
copiedField: O,
|
|
213
|
+
onCopy: Y,
|
|
214
|
+
ariaLabel: X("id")
|
|
183
215
|
})
|
|
184
216
|
]
|
|
185
217
|
})]
|
|
186
218
|
})
|
|
187
219
|
]
|
|
188
|
-
}), /* @__PURE__ */
|
|
220
|
+
}), /* @__PURE__ */ z(r, {
|
|
189
221
|
className: "flex-shrink-0",
|
|
190
222
|
primary: {
|
|
191
|
-
label: l(
|
|
192
|
-
onSelect: () => void
|
|
193
|
-
icon: /* @__PURE__ */
|
|
223
|
+
label: l(E, "sandbox.detail.actions.refresh", "Refresh"),
|
|
224
|
+
onSelect: () => void K(),
|
|
225
|
+
icon: /* @__PURE__ */ z(N, { size: 16 })
|
|
194
226
|
},
|
|
195
|
-
actions:
|
|
227
|
+
actions: Me
|
|
196
228
|
})]
|
|
197
229
|
}),
|
|
198
|
-
|
|
230
|
+
J.network?.internalUrl && J.status === "RUNNING" && /* @__PURE__ */ z("div", {
|
|
199
231
|
className: "mt-4",
|
|
200
|
-
children: /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ B(t, {
|
|
201
233
|
variant: "outline",
|
|
202
234
|
className: "gap-1.5 px-3 py-1.5 text-sm border-border-seam",
|
|
203
235
|
children: [
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
-
value:
|
|
236
|
+
/* @__PURE__ */ z(M, { size: 14 }),
|
|
237
|
+
J.network.internalUrl,
|
|
238
|
+
/* @__PURE__ */ z(U, {
|
|
239
|
+
value: J.network.internalUrl,
|
|
208
240
|
field: "internalUrl",
|
|
209
|
-
copiedField:
|
|
210
|
-
onCopy:
|
|
211
|
-
ariaLabel:
|
|
241
|
+
copiedField: O,
|
|
242
|
+
onCopy: Y,
|
|
243
|
+
ariaLabel: X("internalUrl")
|
|
212
244
|
})
|
|
213
245
|
]
|
|
214
246
|
})
|
|
215
247
|
}),
|
|
216
|
-
|
|
248
|
+
J.status === "RUNNING" && J.expiresAt && /* @__PURE__ */ z("div", {
|
|
217
249
|
className: "mt-4",
|
|
218
|
-
children: /* @__PURE__ */
|
|
219
|
-
expiresAt:
|
|
220
|
-
onExpired: () =>
|
|
221
|
-
onExtend: () =>
|
|
250
|
+
children: /* @__PURE__ */ z(p, {
|
|
251
|
+
expiresAt: J.expiresAt,
|
|
252
|
+
onExpired: () => K(),
|
|
253
|
+
onExtend: () => H(!0)
|
|
222
254
|
})
|
|
223
255
|
})
|
|
224
256
|
]
|
|
225
257
|
}),
|
|
226
|
-
|
|
258
|
+
/* @__PURE__ */ z(ye, { children: l(E, "sandbox.detail.purpose", "This is the control room for a single sandbox — inspect its status, networking, containers, storage and live logs, run scripts inside it, extend its lifetime, or tear it down. Everything you do here is isolated to this one disposable environment.") }),
|
|
259
|
+
$.length > 0 && /* @__PURE__ */ z(ve, {
|
|
260
|
+
storageKey: "sandbox-detail",
|
|
261
|
+
steps: $
|
|
262
|
+
}),
|
|
263
|
+
J.description && /* @__PURE__ */ z(i, {
|
|
227
264
|
className: "border-border-seam",
|
|
228
|
-
children: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ z(a, {
|
|
229
266
|
className: "p-5",
|
|
230
|
-
children: /* @__PURE__ */
|
|
267
|
+
children: /* @__PURE__ */ B("div", {
|
|
231
268
|
className: "flex items-start gap-3",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ z(j, {
|
|
233
270
|
size: 18,
|
|
234
271
|
className: "text-primary flex-shrink-0 mt-0.5"
|
|
235
|
-
}), /* @__PURE__ */
|
|
272
|
+
}), /* @__PURE__ */ z("p", {
|
|
236
273
|
className: "text-sm text-text-secondary leading-relaxed",
|
|
237
|
-
children:
|
|
274
|
+
children: J.description
|
|
238
275
|
})]
|
|
239
276
|
})
|
|
240
277
|
})
|
|
241
278
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ B("div", {
|
|
243
280
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
244
281
|
children: [
|
|
245
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ z(s, {
|
|
246
283
|
treatment: "plain",
|
|
247
284
|
className: "border-border-seam",
|
|
248
|
-
children: /* @__PURE__ */
|
|
285
|
+
children: /* @__PURE__ */ B("div", {
|
|
249
286
|
className: "p-5",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ B("h3", {
|
|
251
288
|
className: "font-semibold mb-4 flex items-center gap-2",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ z("div", {
|
|
253
290
|
className: "p-1.5 rounded-lg bg-action-primary-bg/10",
|
|
254
|
-
children: /* @__PURE__ */
|
|
291
|
+
children: /* @__PURE__ */ z(N, {
|
|
255
292
|
size: 14,
|
|
256
293
|
className: "text-primary"
|
|
257
294
|
})
|
|
258
|
-
}), l(
|
|
259
|
-
}), /* @__PURE__ */
|
|
260
|
-
cpuRequest:
|
|
261
|
-
cpuLimit:
|
|
262
|
-
memoryRequest:
|
|
263
|
-
memoryLimit:
|
|
264
|
-
containerCount:
|
|
295
|
+
}), l(E, "sandbox.detail.cards.resources.title", "Resources")]
|
|
296
|
+
}), /* @__PURE__ */ z(d, {
|
|
297
|
+
cpuRequest: J.resources?.cpuRequest ?? "0",
|
|
298
|
+
cpuLimit: J.resources?.cpuLimit,
|
|
299
|
+
memoryRequest: J.resources?.memoryRequest ?? "0",
|
|
300
|
+
memoryLimit: J.resources?.memoryLimit,
|
|
301
|
+
containerCount: J.containers?.length,
|
|
265
302
|
layout: "grid"
|
|
266
303
|
})]
|
|
267
304
|
})
|
|
268
305
|
}),
|
|
269
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ z(s, {
|
|
270
307
|
treatment: "plain",
|
|
271
308
|
className: "border-border-seam",
|
|
272
|
-
children: /* @__PURE__ */
|
|
309
|
+
children: /* @__PURE__ */ B("div", {
|
|
273
310
|
className: "p-5",
|
|
274
|
-
children: [/* @__PURE__ */
|
|
311
|
+
children: [/* @__PURE__ */ B("h3", {
|
|
275
312
|
className: "font-semibold mb-4 flex items-center gap-2",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
313
|
+
children: [/* @__PURE__ */ z("div", {
|
|
277
314
|
className: "p-1.5 rounded-lg bg-action-primary-bg/10",
|
|
278
|
-
children: /* @__PURE__ */
|
|
315
|
+
children: /* @__PURE__ */ z(me, {
|
|
279
316
|
size: 14,
|
|
280
317
|
className: "text-primary"
|
|
281
318
|
})
|
|
282
|
-
}), l(
|
|
283
|
-
}), /* @__PURE__ */
|
|
319
|
+
}), l(E, "sandbox.detail.cards.kubernetes.title", "Kubernetes")]
|
|
320
|
+
}), /* @__PURE__ */ B("div", {
|
|
284
321
|
className: "space-y-3",
|
|
285
322
|
children: [
|
|
286
|
-
|
|
323
|
+
J.crdName && /* @__PURE__ */ B("div", {
|
|
287
324
|
className: "flex items-center justify-between",
|
|
288
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ z("span", {
|
|
289
326
|
className: "text-sm text-text-secondary",
|
|
290
|
-
children: l(
|
|
291
|
-
}), /* @__PURE__ */
|
|
327
|
+
children: l(E, "sandbox.detail.cards.kubernetes.crdName", "CRD Name")
|
|
328
|
+
}), /* @__PURE__ */ B("div", {
|
|
292
329
|
className: "flex items-center gap-1.5",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ z("span", {
|
|
294
331
|
className: "text-sm font-mono",
|
|
295
|
-
children:
|
|
296
|
-
}), /* @__PURE__ */
|
|
297
|
-
value:
|
|
332
|
+
children: J.crdName
|
|
333
|
+
}), /* @__PURE__ */ z(U, {
|
|
334
|
+
value: J.crdName,
|
|
298
335
|
field: "crdName",
|
|
299
|
-
copiedField:
|
|
300
|
-
onCopy:
|
|
301
|
-
ariaLabel:
|
|
336
|
+
copiedField: O,
|
|
337
|
+
onCopy: Y,
|
|
338
|
+
ariaLabel: X("crdName")
|
|
302
339
|
})]
|
|
303
340
|
})]
|
|
304
341
|
}),
|
|
305
|
-
|
|
342
|
+
J.podName && /* @__PURE__ */ B("div", {
|
|
306
343
|
className: "flex items-center justify-between",
|
|
307
|
-
children: [/* @__PURE__ */
|
|
344
|
+
children: [/* @__PURE__ */ z("span", {
|
|
308
345
|
className: "text-sm text-text-secondary",
|
|
309
|
-
children: l(
|
|
310
|
-
}), /* @__PURE__ */
|
|
346
|
+
children: l(E, "sandbox.detail.cards.kubernetes.podName", "Pod Name")
|
|
347
|
+
}), /* @__PURE__ */ B("div", {
|
|
311
348
|
className: "flex items-center gap-1.5",
|
|
312
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ z("span", {
|
|
313
350
|
className: "text-sm font-mono",
|
|
314
|
-
children:
|
|
315
|
-
}), /* @__PURE__ */
|
|
316
|
-
value:
|
|
351
|
+
children: J.podName
|
|
352
|
+
}), /* @__PURE__ */ z(U, {
|
|
353
|
+
value: J.podName,
|
|
317
354
|
field: "podName",
|
|
318
|
-
copiedField:
|
|
319
|
-
onCopy:
|
|
320
|
-
ariaLabel:
|
|
355
|
+
copiedField: O,
|
|
356
|
+
onCopy: Y,
|
|
357
|
+
ariaLabel: X("podName")
|
|
321
358
|
})]
|
|
322
359
|
})]
|
|
323
360
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ B("div", {
|
|
325
362
|
className: "flex items-center justify-between",
|
|
326
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ z("span", {
|
|
327
364
|
className: "text-sm text-text-secondary",
|
|
328
|
-
children: l(
|
|
329
|
-
}), /* @__PURE__ */
|
|
365
|
+
children: l(E, "sandbox.detail.cards.kubernetes.namespace", "Namespace")
|
|
366
|
+
}), /* @__PURE__ */ z("span", {
|
|
330
367
|
className: "text-sm font-mono",
|
|
331
|
-
children:
|
|
368
|
+
children: J.namespace
|
|
332
369
|
})]
|
|
333
370
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ B("div", {
|
|
335
372
|
className: "flex items-center justify-between",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
373
|
+
children: [/* @__PURE__ */ z("span", {
|
|
337
374
|
className: "text-sm text-text-secondary",
|
|
338
|
-
children: l(
|
|
339
|
-
}), /* @__PURE__ */
|
|
375
|
+
children: l(E, "sandbox.detail.cards.kubernetes.runtimeClass", "Runtime Class")
|
|
376
|
+
}), /* @__PURE__ */ z(t, {
|
|
340
377
|
variant: "secondary",
|
|
341
378
|
className: "font-mono text-xs",
|
|
342
|
-
children:
|
|
379
|
+
children: J.runtimeClass
|
|
343
380
|
})]
|
|
344
381
|
}),
|
|
345
|
-
|
|
382
|
+
J.network?.serviceName && /* @__PURE__ */ B("div", {
|
|
346
383
|
className: "flex items-center justify-between",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
384
|
+
children: [/* @__PURE__ */ z("span", {
|
|
348
385
|
className: "text-sm text-text-secondary",
|
|
349
|
-
children: l(
|
|
350
|
-
}), /* @__PURE__ */
|
|
386
|
+
children: l(E, "sandbox.detail.cards.kubernetes.serviceName", "Service Name")
|
|
387
|
+
}), /* @__PURE__ */ B("div", {
|
|
351
388
|
className: "flex items-center gap-1.5",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
389
|
+
children: [/* @__PURE__ */ z("span", {
|
|
353
390
|
className: "text-sm font-mono",
|
|
354
|
-
children:
|
|
355
|
-
}), /* @__PURE__ */
|
|
356
|
-
value:
|
|
391
|
+
children: J.network.serviceName
|
|
392
|
+
}), /* @__PURE__ */ z(U, {
|
|
393
|
+
value: J.network.serviceName,
|
|
357
394
|
field: "serviceName",
|
|
358
|
-
copiedField:
|
|
359
|
-
onCopy:
|
|
360
|
-
ariaLabel:
|
|
395
|
+
copiedField: O,
|
|
396
|
+
onCopy: Y,
|
|
397
|
+
ariaLabel: X("serviceName")
|
|
361
398
|
})]
|
|
362
399
|
})]
|
|
363
400
|
}),
|
|
364
|
-
|
|
401
|
+
J.network?.internalUrl && /* @__PURE__ */ B("div", {
|
|
365
402
|
className: "flex items-center justify-between",
|
|
366
|
-
children: [/* @__PURE__ */
|
|
403
|
+
children: [/* @__PURE__ */ z("span", {
|
|
367
404
|
className: "text-sm text-text-secondary",
|
|
368
|
-
children: l(
|
|
369
|
-
}), /* @__PURE__ */
|
|
405
|
+
children: l(E, "sandbox.detail.cards.kubernetes.internalUrl", "Internal URL")
|
|
406
|
+
}), /* @__PURE__ */ B("div", {
|
|
370
407
|
className: "flex items-center gap-1.5",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ z("span", {
|
|
372
409
|
className: "text-sm text-primary font-mono truncate max-w-48",
|
|
373
|
-
children:
|
|
374
|
-
}), /* @__PURE__ */
|
|
375
|
-
value:
|
|
410
|
+
children: J.network.internalUrl
|
|
411
|
+
}), /* @__PURE__ */ z(U, {
|
|
412
|
+
value: J.network.internalUrl,
|
|
376
413
|
field: "internalUrl",
|
|
377
|
-
copiedField:
|
|
378
|
-
onCopy:
|
|
379
|
-
ariaLabel:
|
|
414
|
+
copiedField: O,
|
|
415
|
+
onCopy: Y,
|
|
416
|
+
ariaLabel: X("internalUrl")
|
|
380
417
|
})]
|
|
381
418
|
})]
|
|
382
419
|
}),
|
|
383
|
-
|
|
420
|
+
J.network?.containerUrls && typeof J.network.containerUrls == "object" && Object.keys(J.network.containerUrls).filter((e) => !e.includes(":")).length > 1 && /* @__PURE__ */ B("div", {
|
|
384
421
|
className: "mt-3 pt-3 border-t border-border-subtle/30",
|
|
385
|
-
children: [/* @__PURE__ */
|
|
422
|
+
children: [/* @__PURE__ */ z("p", {
|
|
386
423
|
className: "text-xs font-semibold text-text-secondary mb-2",
|
|
387
|
-
children: l(
|
|
388
|
-
}), /* @__PURE__ */
|
|
424
|
+
children: l(E, "sandbox.detail.cards.kubernetes.containerEndpoints", "Container Endpoints")
|
|
425
|
+
}), /* @__PURE__ */ z("div", {
|
|
389
426
|
className: "space-y-1.5",
|
|
390
|
-
children: Object.entries(
|
|
427
|
+
children: Object.entries(J.network.containerUrls).reduce((e, [t, n]) => (t.includes(":") || e.push(/* @__PURE__ */ B("div", {
|
|
391
428
|
className: "flex items-center justify-between",
|
|
392
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ z("span", {
|
|
393
430
|
className: "text-xs text-text-secondary font-mono",
|
|
394
431
|
children: t
|
|
395
|
-
}), /* @__PURE__ */
|
|
432
|
+
}), /* @__PURE__ */ B("div", {
|
|
396
433
|
className: "flex items-center gap-1.5",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
434
|
+
children: [/* @__PURE__ */ z("span", {
|
|
398
435
|
className: "text-xs text-primary font-mono truncate max-w-40",
|
|
399
436
|
children: n
|
|
400
|
-
}), /* @__PURE__ */
|
|
437
|
+
}), /* @__PURE__ */ z(U, {
|
|
401
438
|
value: n,
|
|
402
439
|
field: `container-${t}`,
|
|
403
|
-
copiedField:
|
|
404
|
-
onCopy:
|
|
405
|
-
ariaLabel:
|
|
440
|
+
copiedField: O,
|
|
441
|
+
onCopy: Y,
|
|
442
|
+
ariaLabel: X(`container-${t}`)
|
|
406
443
|
})]
|
|
407
444
|
})]
|
|
408
445
|
}, t)), e), [])
|
|
@@ -412,142 +449,142 @@ function Y() {
|
|
|
412
449
|
})]
|
|
413
450
|
})
|
|
414
451
|
}),
|
|
415
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ z(s, {
|
|
416
453
|
treatment: "plain",
|
|
417
454
|
className: "border-border-seam",
|
|
418
|
-
children: /* @__PURE__ */
|
|
455
|
+
children: /* @__PURE__ */ B("div", {
|
|
419
456
|
className: "p-5",
|
|
420
|
-
children: [/* @__PURE__ */
|
|
457
|
+
children: [/* @__PURE__ */ B("h3", {
|
|
421
458
|
className: "font-semibold mb-4 flex items-center gap-2",
|
|
422
|
-
children: [/* @__PURE__ */
|
|
459
|
+
children: [/* @__PURE__ */ z("div", {
|
|
423
460
|
className: "p-1.5 rounded-lg bg-action-primary-bg/10",
|
|
424
|
-
children: /* @__PURE__ */
|
|
461
|
+
children: /* @__PURE__ */ z(le, {
|
|
425
462
|
size: 14,
|
|
426
463
|
className: "text-primary"
|
|
427
464
|
})
|
|
428
|
-
}), l(
|
|
429
|
-
}), /* @__PURE__ */
|
|
465
|
+
}), l(E, "sandbox.detail.cards.lifecycle.title", "Lifecycle")]
|
|
466
|
+
}), /* @__PURE__ */ B("div", {
|
|
430
467
|
className: "space-y-3",
|
|
431
468
|
children: [
|
|
432
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ B("div", {
|
|
433
470
|
className: "flex items-center justify-between",
|
|
434
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ z("span", {
|
|
435
472
|
className: "text-sm text-text-secondary",
|
|
436
|
-
children: l(
|
|
437
|
-
}), /* @__PURE__ */
|
|
473
|
+
children: l(E, "sandbox.detail.cards.lifecycle.ttl", "TTL")
|
|
474
|
+
}), /* @__PURE__ */ z("span", {
|
|
438
475
|
className: "text-sm font-medium",
|
|
439
|
-
children:
|
|
476
|
+
children: be(J.ttlSeconds)
|
|
440
477
|
})]
|
|
441
478
|
}),
|
|
442
|
-
|
|
479
|
+
J.expiresAt && Ae && /* @__PURE__ */ B("div", {
|
|
443
480
|
className: "flex items-center justify-between",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
481
|
+
children: [/* @__PURE__ */ z("span", {
|
|
445
482
|
className: "text-sm text-text-secondary",
|
|
446
|
-
children: l(
|
|
447
|
-
}), /* @__PURE__ */
|
|
483
|
+
children: l(E, "sandbox.detail.cards.lifecycle.expires", "Expires")
|
|
484
|
+
}), /* @__PURE__ */ B(t, {
|
|
448
485
|
variant: "outline",
|
|
449
486
|
className: "gap-1",
|
|
450
|
-
children: [/* @__PURE__ */
|
|
487
|
+
children: [/* @__PURE__ */ z(I, { size: 12 }), xe(J.expiresAt)]
|
|
451
488
|
})]
|
|
452
489
|
}),
|
|
453
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ B("div", {
|
|
454
491
|
className: "flex items-center justify-between",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
492
|
+
children: [/* @__PURE__ */ z("span", {
|
|
456
493
|
className: "text-sm text-text-secondary",
|
|
457
|
-
children: l(
|
|
458
|
-
}), /* @__PURE__ */
|
|
494
|
+
children: l(E, "sandbox.detail.cards.lifecycle.created", "Created")
|
|
495
|
+
}), /* @__PURE__ */ z("span", {
|
|
459
496
|
className: "text-sm",
|
|
460
|
-
children:
|
|
497
|
+
children: V(J.createdAt)
|
|
461
498
|
})]
|
|
462
499
|
}),
|
|
463
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ B("div", {
|
|
464
501
|
className: "flex items-center justify-between",
|
|
465
|
-
children: [/* @__PURE__ */
|
|
502
|
+
children: [/* @__PURE__ */ z("span", {
|
|
466
503
|
className: "text-sm text-text-secondary",
|
|
467
|
-
children: l(
|
|
468
|
-
}), /* @__PURE__ */
|
|
504
|
+
children: l(E, "sandbox.detail.cards.lifecycle.updated", "Updated")
|
|
505
|
+
}), /* @__PURE__ */ z("span", {
|
|
469
506
|
className: "text-sm",
|
|
470
|
-
children:
|
|
507
|
+
children: V(J.updatedAt)
|
|
471
508
|
})]
|
|
472
509
|
}),
|
|
473
|
-
|
|
510
|
+
J.stoppedAt && /* @__PURE__ */ B("div", {
|
|
474
511
|
className: "flex items-center justify-between",
|
|
475
|
-
children: [/* @__PURE__ */
|
|
512
|
+
children: [/* @__PURE__ */ z("span", {
|
|
476
513
|
className: "text-sm text-text-secondary",
|
|
477
|
-
children: l(
|
|
478
|
-
}), /* @__PURE__ */
|
|
514
|
+
children: l(E, "sandbox.detail.cards.lifecycle.stopped", "Stopped")
|
|
515
|
+
}), /* @__PURE__ */ z("span", {
|
|
479
516
|
className: "text-sm",
|
|
480
|
-
children:
|
|
517
|
+
children: V(J.stoppedAt)
|
|
481
518
|
})]
|
|
482
519
|
})
|
|
483
520
|
]
|
|
484
521
|
})]
|
|
485
522
|
})
|
|
486
523
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ z(s, {
|
|
488
525
|
treatment: "plain",
|
|
489
526
|
className: "border-border-seam",
|
|
490
|
-
children: /* @__PURE__ */
|
|
527
|
+
children: /* @__PURE__ */ B("div", {
|
|
491
528
|
className: "p-5",
|
|
492
|
-
children: [/* @__PURE__ */
|
|
529
|
+
children: [/* @__PURE__ */ B("h3", {
|
|
493
530
|
className: "font-semibold mb-4 flex items-center gap-2",
|
|
494
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ z("div", {
|
|
495
532
|
className: "p-1.5 rounded-lg bg-action-primary-bg/10",
|
|
496
|
-
children: /* @__PURE__ */
|
|
533
|
+
children: /* @__PURE__ */ z(j, {
|
|
497
534
|
size: 14,
|
|
498
535
|
className: "text-primary"
|
|
499
536
|
})
|
|
500
|
-
}), l(
|
|
501
|
-
}), /* @__PURE__ */
|
|
537
|
+
}), l(E, "sandbox.detail.cards.details.title", "Details")]
|
|
538
|
+
}), /* @__PURE__ */ B("div", {
|
|
502
539
|
className: "space-y-3",
|
|
503
540
|
children: [
|
|
504
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ B("div", {
|
|
505
542
|
className: "flex items-center justify-between",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
543
|
+
children: [/* @__PURE__ */ z("span", {
|
|
507
544
|
className: "text-sm text-text-secondary",
|
|
508
|
-
children: l(
|
|
509
|
-
}), /* @__PURE__ */
|
|
510
|
-
type:
|
|
545
|
+
children: l(E, "sandbox.detail.cards.details.template", "Template")
|
|
546
|
+
}), /* @__PURE__ */ z(f, {
|
|
547
|
+
type: J.template,
|
|
511
548
|
showLabel: !0
|
|
512
549
|
})]
|
|
513
550
|
}),
|
|
514
|
-
/* @__PURE__ */
|
|
551
|
+
/* @__PURE__ */ B("div", {
|
|
515
552
|
className: "flex items-center justify-between",
|
|
516
|
-
children: [/* @__PURE__ */
|
|
553
|
+
children: [/* @__PURE__ */ z("span", {
|
|
517
554
|
className: "text-sm text-text-secondary",
|
|
518
|
-
children: l(
|
|
519
|
-
}), /* @__PURE__ */
|
|
555
|
+
children: l(E, "sandbox.detail.cards.details.mode", "Mode")
|
|
556
|
+
}), /* @__PURE__ */ z(t, {
|
|
520
557
|
variant: "outline",
|
|
521
558
|
className: "gap-1 text-xs font-mono",
|
|
522
|
-
children:
|
|
523
|
-
/* @__PURE__ */
|
|
559
|
+
children: J.mode === "JOB" ? /* @__PURE__ */ B(R, { children: [
|
|
560
|
+
/* @__PURE__ */ z(pe, { size: 12 }),
|
|
524
561
|
" ",
|
|
525
|
-
l(
|
|
526
|
-
] }) : /* @__PURE__ */
|
|
527
|
-
/* @__PURE__ */
|
|
562
|
+
l(E, "sandbox.detail.cards.details.mode.job", "Job")
|
|
563
|
+
] }) : /* @__PURE__ */ B(R, { children: [
|
|
564
|
+
/* @__PURE__ */ z(ue, { size: 12 }),
|
|
528
565
|
" ",
|
|
529
|
-
l(
|
|
566
|
+
l(E, "sandbox.detail.cards.details.mode.deployment", "Deployment")
|
|
530
567
|
] })
|
|
531
568
|
})]
|
|
532
569
|
}),
|
|
533
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ B("div", {
|
|
534
571
|
className: "flex items-center justify-between",
|
|
535
|
-
children: [/* @__PURE__ */
|
|
572
|
+
children: [/* @__PURE__ */ z("span", {
|
|
536
573
|
className: "text-sm text-text-secondary",
|
|
537
|
-
children: l(
|
|
538
|
-
}), /* @__PURE__ */
|
|
574
|
+
children: l(E, "sandbox.detail.cards.details.workspace", "Workspace")
|
|
575
|
+
}), /* @__PURE__ */ z("span", {
|
|
539
576
|
className: "text-sm font-mono",
|
|
540
|
-
children:
|
|
577
|
+
children: J.workspaceId
|
|
541
578
|
})]
|
|
542
579
|
}),
|
|
543
|
-
/* @__PURE__ */
|
|
580
|
+
/* @__PURE__ */ B("div", {
|
|
544
581
|
className: "flex items-center justify-between",
|
|
545
|
-
children: [/* @__PURE__ */
|
|
582
|
+
children: [/* @__PURE__ */ z("span", {
|
|
546
583
|
className: "text-sm text-text-secondary",
|
|
547
|
-
children: l(
|
|
548
|
-
}), /* @__PURE__ */
|
|
584
|
+
children: l(E, "sandbox.detail.cards.details.createdBy", "Created By")
|
|
585
|
+
}), /* @__PURE__ */ z("span", {
|
|
549
586
|
className: "text-sm",
|
|
550
|
-
children:
|
|
587
|
+
children: J.createdBy
|
|
551
588
|
})]
|
|
552
589
|
})
|
|
553
590
|
]
|
|
@@ -556,53 +593,53 @@ function Y() {
|
|
|
556
593
|
})
|
|
557
594
|
]
|
|
558
595
|
}),
|
|
559
|
-
|
|
596
|
+
J.containers && J.containers.length > 0 && /* @__PURE__ */ z(s, {
|
|
560
597
|
treatment: "plain",
|
|
561
598
|
className: "border-border-seam",
|
|
562
|
-
children: /* @__PURE__ */
|
|
599
|
+
children: /* @__PURE__ */ B("div", {
|
|
563
600
|
className: "p-5",
|
|
564
|
-
children: [/* @__PURE__ */
|
|
601
|
+
children: [/* @__PURE__ */ B("h3", {
|
|
565
602
|
className: "font-semibold mb-4 flex items-center gap-2",
|
|
566
603
|
children: [
|
|
567
|
-
/* @__PURE__ */
|
|
604
|
+
/* @__PURE__ */ z("div", {
|
|
568
605
|
className: "p-1.5 rounded-lg bg-action-primary-bg/10",
|
|
569
|
-
children: /* @__PURE__ */
|
|
606
|
+
children: /* @__PURE__ */ z(de, {
|
|
570
607
|
size: 14,
|
|
571
608
|
className: "text-primary"
|
|
572
609
|
})
|
|
573
610
|
}),
|
|
574
|
-
l(
|
|
575
|
-
/* @__PURE__ */
|
|
611
|
+
l(E, "sandbox.detail.cards.containers.title", "Containers"),
|
|
612
|
+
/* @__PURE__ */ z(t, {
|
|
576
613
|
variant: "secondary",
|
|
577
614
|
className: "ml-1",
|
|
578
|
-
children:
|
|
615
|
+
children: J.containers.length
|
|
579
616
|
})
|
|
580
617
|
]
|
|
581
|
-
}), /* @__PURE__ */
|
|
582
|
-
enabled:
|
|
618
|
+
}), /* @__PURE__ */ z(Se, {
|
|
619
|
+
enabled: J.containers.length > 4,
|
|
583
620
|
collapsedHeight: 220,
|
|
584
|
-
children: /* @__PURE__ */
|
|
621
|
+
children: /* @__PURE__ */ z("div", {
|
|
585
622
|
className: "space-y-3",
|
|
586
|
-
children:
|
|
587
|
-
let r =
|
|
588
|
-
return /* @__PURE__ */
|
|
623
|
+
children: J.containers.map((e, n) => {
|
|
624
|
+
let r = J.containerStatuses?.find((t) => t.name === e.name);
|
|
625
|
+
return /* @__PURE__ */ B("div", {
|
|
589
626
|
className: "flex items-center justify-between p-3 rounded-lg border border-border-seam hover:bg-bg-sunken/30 transition-colors",
|
|
590
|
-
children: [/* @__PURE__ */
|
|
627
|
+
children: [/* @__PURE__ */ B("div", {
|
|
591
628
|
className: "flex items-center gap-3 min-w-0",
|
|
592
|
-
children: [/* @__PURE__ */
|
|
629
|
+
children: [/* @__PURE__ */ z("div", { className: `w-2.5 h-2.5 rounded-full flex-shrink-0 ${r?.ready ? "bg-status-success-text motion-safe:animate-vc-glow-pulse" : r ? "bg-status-warning-text animate-pulse" : "bg-text-tertiary"}` }), /* @__PURE__ */ B("div", {
|
|
593
630
|
className: "min-w-0",
|
|
594
|
-
children: [/* @__PURE__ */
|
|
631
|
+
children: [/* @__PURE__ */ z("p", {
|
|
595
632
|
className: "text-sm font-medium",
|
|
596
633
|
children: e.name
|
|
597
|
-
}), /* @__PURE__ */
|
|
634
|
+
}), /* @__PURE__ */ z("p", {
|
|
598
635
|
className: "text-xs text-text-secondary font-mono truncate",
|
|
599
636
|
children: e.image
|
|
600
637
|
})]
|
|
601
638
|
})]
|
|
602
|
-
}), /* @__PURE__ */
|
|
639
|
+
}), /* @__PURE__ */ B("div", {
|
|
603
640
|
className: "flex items-center gap-2 flex-shrink-0",
|
|
604
641
|
children: [
|
|
605
|
-
e.ports?.map((e) => /* @__PURE__ */
|
|
642
|
+
e.ports?.map((e) => /* @__PURE__ */ B(t, {
|
|
606
643
|
variant: "outline",
|
|
607
644
|
className: "text-xs font-mono",
|
|
608
645
|
children: [
|
|
@@ -611,12 +648,12 @@ function Y() {
|
|
|
611
648
|
e.name ? ` (${e.name})` : ""
|
|
612
649
|
]
|
|
613
650
|
}, e.containerPort)),
|
|
614
|
-
r && /* @__PURE__ */
|
|
651
|
+
r && /* @__PURE__ */ z(t, {
|
|
615
652
|
variant: r.ready ? "default" : "secondary",
|
|
616
653
|
className: `text-xs ${r.ready ? "bg-status-success-bg-subtle text-status-success-text" : ""}`,
|
|
617
|
-
children: r.ready ? l(
|
|
654
|
+
children: r.ready ? l(E, "sandbox.detail.cards.containers.status.ready", "Ready") : l(E, "sandbox.detail.cards.containers.status.notReady", "Not Ready")
|
|
618
655
|
}),
|
|
619
|
-
r?.restartCount !== void 0 && r.restartCount > 0 && /* @__PURE__ */
|
|
656
|
+
r?.restartCount !== void 0 && r.restartCount > 0 && /* @__PURE__ */ B(t, {
|
|
620
657
|
variant: "outline",
|
|
621
658
|
className: "text-xs text-status-warning-text",
|
|
622
659
|
children: [
|
|
@@ -633,88 +670,88 @@ function Y() {
|
|
|
633
670
|
})]
|
|
634
671
|
})
|
|
635
672
|
}),
|
|
636
|
-
|
|
673
|
+
J.storage && J.storage.mode !== "NONE" && /* @__PURE__ */ z(s, {
|
|
637
674
|
treatment: "plain",
|
|
638
675
|
className: "border-border-seam",
|
|
639
|
-
children: /* @__PURE__ */
|
|
676
|
+
children: /* @__PURE__ */ B("div", {
|
|
640
677
|
className: "p-5",
|
|
641
|
-
children: [/* @__PURE__ */
|
|
678
|
+
children: [/* @__PURE__ */ B("h3", {
|
|
642
679
|
className: "font-semibold mb-4 flex items-center gap-2",
|
|
643
|
-
children: [/* @__PURE__ */
|
|
680
|
+
children: [/* @__PURE__ */ z("div", {
|
|
644
681
|
className: "p-1.5 rounded-lg bg-action-primary-bg/10",
|
|
645
|
-
children: /* @__PURE__ */
|
|
682
|
+
children: /* @__PURE__ */ z(fe, {
|
|
646
683
|
size: 14,
|
|
647
684
|
className: "text-primary"
|
|
648
685
|
})
|
|
649
|
-
}), l(
|
|
650
|
-
}), /* @__PURE__ */
|
|
686
|
+
}), l(E, "sandbox.detail.cards.storage.title", "Storage")]
|
|
687
|
+
}), /* @__PURE__ */ B("div", {
|
|
651
688
|
className: "space-y-3",
|
|
652
689
|
children: [
|
|
653
|
-
/* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ B("div", {
|
|
654
691
|
className: "flex items-center justify-between",
|
|
655
|
-
children: [/* @__PURE__ */
|
|
692
|
+
children: [/* @__PURE__ */ z("span", {
|
|
656
693
|
className: "text-sm text-text-secondary",
|
|
657
|
-
children: l(
|
|
658
|
-
}), /* @__PURE__ */
|
|
694
|
+
children: l(E, "sandbox.detail.cards.storage.mode", "Mode")
|
|
695
|
+
}), /* @__PURE__ */ z(t, {
|
|
659
696
|
variant: "outline",
|
|
660
|
-
children:
|
|
697
|
+
children: J.storage.mode === "EPHEMERAL" ? l(E, "sandbox.detail.cards.storage.ephemeral", "Ephemeral") : l(E, "sandbox.detail.cards.storage.persistent", "Persistent")
|
|
661
698
|
})]
|
|
662
699
|
}),
|
|
663
|
-
|
|
700
|
+
J.storage.sizeGi && /* @__PURE__ */ B("div", {
|
|
664
701
|
className: "flex items-center justify-between",
|
|
665
|
-
children: [/* @__PURE__ */
|
|
702
|
+
children: [/* @__PURE__ */ z("span", {
|
|
666
703
|
className: "text-sm text-text-secondary",
|
|
667
|
-
children: l(
|
|
668
|
-
}), /* @__PURE__ */
|
|
704
|
+
children: l(E, "sandbox.detail.cards.storage.size", "Size")
|
|
705
|
+
}), /* @__PURE__ */ B("span", {
|
|
669
706
|
className: "text-sm font-medium",
|
|
670
|
-
children: [
|
|
707
|
+
children: [J.storage.sizeGi, " GiB"]
|
|
671
708
|
})]
|
|
672
709
|
}),
|
|
673
|
-
|
|
710
|
+
J.storage.mountPath && /* @__PURE__ */ B("div", {
|
|
674
711
|
className: "flex items-center justify-between",
|
|
675
|
-
children: [/* @__PURE__ */
|
|
712
|
+
children: [/* @__PURE__ */ z("span", {
|
|
676
713
|
className: "text-sm text-text-secondary",
|
|
677
|
-
children: l(
|
|
678
|
-
}), /* @__PURE__ */
|
|
714
|
+
children: l(E, "sandbox.detail.cards.storage.mountPath", "Mount Path")
|
|
715
|
+
}), /* @__PURE__ */ z("span", {
|
|
679
716
|
className: "text-sm font-mono",
|
|
680
|
-
children:
|
|
717
|
+
children: J.storage.mountPath
|
|
681
718
|
})]
|
|
682
719
|
}),
|
|
683
|
-
/* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ B("div", {
|
|
684
721
|
className: "flex items-center justify-between",
|
|
685
|
-
children: [/* @__PURE__ */
|
|
722
|
+
children: [/* @__PURE__ */ z("span", {
|
|
686
723
|
className: "text-sm text-text-secondary",
|
|
687
|
-
children: l(
|
|
688
|
-
}), /* @__PURE__ */
|
|
689
|
-
variant:
|
|
690
|
-
children:
|
|
724
|
+
children: l(E, "sandbox.detail.cards.storage.retainOnDelete", "Retain on Delete")
|
|
725
|
+
}), /* @__PURE__ */ z(t, {
|
|
726
|
+
variant: J.storage.retainOnDelete ? "default" : "secondary",
|
|
727
|
+
children: J.storage.retainOnDelete ? l(E, "sandbox.detail.cards.storage.retainYes", "Yes") : l(E, "sandbox.detail.cards.storage.retainNo", "No")
|
|
691
728
|
})]
|
|
692
729
|
})
|
|
693
730
|
]
|
|
694
731
|
})]
|
|
695
732
|
})
|
|
696
733
|
}),
|
|
697
|
-
|
|
734
|
+
J.errorMessage && /* @__PURE__ */ z(i, {
|
|
698
735
|
className: "border-status-error-border/50 bg-status-error-bg/5",
|
|
699
|
-
children: /* @__PURE__ */
|
|
736
|
+
children: /* @__PURE__ */ B(a, {
|
|
700
737
|
className: "p-5",
|
|
701
|
-
children: [/* @__PURE__ */
|
|
738
|
+
children: [/* @__PURE__ */ B("h3", {
|
|
702
739
|
className: "font-semibold text-status-error-text mb-2 flex items-center gap-2",
|
|
703
|
-
children: [/* @__PURE__ */
|
|
704
|
-
}), /* @__PURE__ */
|
|
740
|
+
children: [/* @__PURE__ */ z(se, { size: 18 }), l(E, "sandbox.detail.cards.errorDetails.title", "Error Details")]
|
|
741
|
+
}), /* @__PURE__ */ z("p", {
|
|
705
742
|
className: "text-sm text-status-error-text/80 font-mono bg-status-error-bg/5 rounded-lg p-3",
|
|
706
|
-
children:
|
|
743
|
+
children: J.errorMessage
|
|
707
744
|
})]
|
|
708
745
|
})
|
|
709
746
|
}),
|
|
710
747
|
(() => {
|
|
711
|
-
let e =
|
|
712
|
-
return !t && !n ? null : /* @__PURE__ */
|
|
748
|
+
let e = J.metadata ?? null, t = e?.devPortalApplicationId ?? e?.appId, n = e?.clientId, r = e?.clientSecretRevealOnce;
|
|
749
|
+
return !t && !n ? null : /* @__PURE__ */ z(s, {
|
|
713
750
|
treatment: "plain",
|
|
714
751
|
className: "border-border-seam",
|
|
715
|
-
children: /* @__PURE__ */
|
|
752
|
+
children: /* @__PURE__ */ z("div", {
|
|
716
753
|
className: "p-5",
|
|
717
|
-
children: /* @__PURE__ */
|
|
754
|
+
children: /* @__PURE__ */ z(ae, {
|
|
718
755
|
appId: t,
|
|
719
756
|
clientId: n,
|
|
720
757
|
clientSecret: r
|
|
@@ -722,57 +759,60 @@ function Y() {
|
|
|
722
759
|
})
|
|
723
760
|
});
|
|
724
761
|
})(),
|
|
725
|
-
/* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ z(s, {
|
|
726
763
|
treatment: "plain",
|
|
727
764
|
className: "border-border-seam",
|
|
728
|
-
children: /* @__PURE__ */
|
|
765
|
+
children: /* @__PURE__ */ B("div", {
|
|
729
766
|
className: "p-5",
|
|
730
|
-
children: [/* @__PURE__ */
|
|
767
|
+
children: [/* @__PURE__ */ z("h3", {
|
|
731
768
|
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
732
|
-
children: l(
|
|
733
|
-
}), /* @__PURE__ */
|
|
734
|
-
sandboxId:
|
|
735
|
-
workspaceId:
|
|
769
|
+
children: l(E, "sandbox.detail.cards.activity.title", "Activity")
|
|
770
|
+
}), /* @__PURE__ */ z(ie, {
|
|
771
|
+
sandboxId: J.id,
|
|
772
|
+
workspaceId: T ?? ""
|
|
736
773
|
})]
|
|
737
774
|
})
|
|
738
775
|
}),
|
|
739
|
-
/* @__PURE__ */
|
|
740
|
-
sandbox:
|
|
741
|
-
workspaceId:
|
|
776
|
+
/* @__PURE__ */ z(Ce, {
|
|
777
|
+
sandbox: J,
|
|
778
|
+
workspaceId: T ?? ""
|
|
742
779
|
}),
|
|
743
|
-
/* @__PURE__ */
|
|
744
|
-
|
|
745
|
-
|
|
780
|
+
/* @__PURE__ */ z("div", {
|
|
781
|
+
id: "sandbox-script-runner",
|
|
782
|
+
children: /* @__PURE__ */ z(oe, {
|
|
783
|
+
sandbox: J,
|
|
784
|
+
workspaceId: T ?? ""
|
|
785
|
+
})
|
|
746
786
|
}),
|
|
747
|
-
|
|
748
|
-
isOpen:
|
|
749
|
-
onClose: () =>
|
|
750
|
-
currentExpiresAt:
|
|
751
|
-
isLoading:
|
|
787
|
+
J.expiresAt && /* @__PURE__ */ z(re, {
|
|
788
|
+
isOpen: A,
|
|
789
|
+
onClose: () => H(!1),
|
|
790
|
+
currentExpiresAt: J.expiresAt,
|
|
791
|
+
isLoading: W,
|
|
752
792
|
onExtend: (e) => {
|
|
753
|
-
|
|
754
|
-
context: { workspaceId:
|
|
755
|
-
id:
|
|
793
|
+
G(!0), De({ variables: {
|
|
794
|
+
context: { workspaceId: T },
|
|
795
|
+
id: J.id,
|
|
756
796
|
additionalSeconds: e
|
|
757
797
|
} }).then((t) => {
|
|
758
798
|
let n = t.data?.extendSandboxTTL;
|
|
759
|
-
n &&
|
|
799
|
+
n && Oe.sandboxExtended({
|
|
760
800
|
sandboxId: n.id,
|
|
761
801
|
addedSeconds: e,
|
|
762
802
|
newExpiresAt: n.expiresAt
|
|
763
|
-
}),
|
|
803
|
+
}), K();
|
|
764
804
|
}).catch((e) => {
|
|
765
805
|
console.error("Failed to extend TTL:", e);
|
|
766
806
|
}).finally(() => {
|
|
767
|
-
|
|
807
|
+
G(!1), H(!1);
|
|
768
808
|
});
|
|
769
809
|
}
|
|
770
810
|
})
|
|
771
811
|
]
|
|
772
812
|
});
|
|
773
813
|
}
|
|
774
|
-
function
|
|
775
|
-
let { t: r } =
|
|
814
|
+
function Ce({ sandbox: e, workspaceId: t }) {
|
|
815
|
+
let { t: r } = L(), [i, a] = D(e.containers?.[0]?.name ?? ""), [o, c] = D(100), u = E(null), [d, { data: f, loading: p, error: m }] = v(), h = e.status === "RUNNING" || e.status === "PROVISIONING", g = w(() => {
|
|
776
816
|
!i || !h || d({ variables: {
|
|
777
817
|
context: { workspaceId: t },
|
|
778
818
|
id: e.id,
|
|
@@ -787,88 +827,88 @@ function ge({ sandbox: e, workspaceId: t }) {
|
|
|
787
827
|
o,
|
|
788
828
|
h
|
|
789
829
|
]);
|
|
790
|
-
|
|
830
|
+
T(() => {
|
|
791
831
|
h && i && g();
|
|
792
832
|
}, [
|
|
793
833
|
i,
|
|
794
834
|
h,
|
|
795
835
|
g
|
|
796
|
-
]),
|
|
836
|
+
]), T(() => {
|
|
797
837
|
u.current?.scrollIntoView({ behavior: "smooth" });
|
|
798
838
|
}, [f]);
|
|
799
839
|
let _ = f?.getSandboxLogs?.split("\n") ?? [];
|
|
800
|
-
return /* @__PURE__ */
|
|
840
|
+
return /* @__PURE__ */ z(s, {
|
|
801
841
|
treatment: "plain",
|
|
802
842
|
className: "border-border-seam",
|
|
803
|
-
children: /* @__PURE__ */
|
|
843
|
+
children: /* @__PURE__ */ B("div", {
|
|
804
844
|
className: "p-5",
|
|
805
|
-
children: [/* @__PURE__ */
|
|
845
|
+
children: [/* @__PURE__ */ B("div", {
|
|
806
846
|
className: "flex items-center justify-between mb-4",
|
|
807
|
-
children: [/* @__PURE__ */
|
|
847
|
+
children: [/* @__PURE__ */ B("h3", {
|
|
808
848
|
className: "font-semibold flex items-center gap-2",
|
|
809
|
-
children: [/* @__PURE__ */
|
|
849
|
+
children: [/* @__PURE__ */ z("div", {
|
|
810
850
|
className: "p-1.5 rounded-lg bg-action-primary-bg/10",
|
|
811
|
-
children: /* @__PURE__ */
|
|
851
|
+
children: /* @__PURE__ */ z(F, {
|
|
812
852
|
size: 14,
|
|
813
853
|
className: "text-primary"
|
|
814
854
|
})
|
|
815
855
|
}), l(r, "sandbox.detail.logs.title", "Logs")]
|
|
816
|
-
}), /* @__PURE__ */
|
|
856
|
+
}), /* @__PURE__ */ B("div", {
|
|
817
857
|
className: "flex items-center gap-2",
|
|
818
858
|
children: [
|
|
819
|
-
e.containers && e.containers.length > 1 && /* @__PURE__ */
|
|
859
|
+
e.containers && e.containers.length > 1 && /* @__PURE__ */ z("select", {
|
|
820
860
|
value: i,
|
|
821
861
|
onChange: (e) => a(e.target.value),
|
|
822
862
|
className: "px-2 py-1 text-xs border rounded-lg bg-bg-surface font-mono",
|
|
823
|
-
children: e.containers.map((e) => /* @__PURE__ */
|
|
863
|
+
children: e.containers.map((e) => /* @__PURE__ */ z("option", {
|
|
824
864
|
value: e.name,
|
|
825
865
|
children: e.name
|
|
826
866
|
}, e.name))
|
|
827
867
|
}),
|
|
828
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ B("select", {
|
|
829
869
|
value: o,
|
|
830
870
|
onChange: (e) => c(Number(e.target.value)),
|
|
831
871
|
className: "px-2 py-1 text-xs border rounded-lg bg-bg-surface font-mono",
|
|
832
872
|
children: [
|
|
833
|
-
/* @__PURE__ */
|
|
873
|
+
/* @__PURE__ */ z("option", {
|
|
834
874
|
value: 50,
|
|
835
875
|
children: l(r, "sandbox.detail.logs.tailLines.50", "50 lines")
|
|
836
876
|
}),
|
|
837
|
-
/* @__PURE__ */
|
|
877
|
+
/* @__PURE__ */ z("option", {
|
|
838
878
|
value: 100,
|
|
839
879
|
children: l(r, "sandbox.detail.logs.tailLines.100", "100 lines")
|
|
840
880
|
}),
|
|
841
|
-
/* @__PURE__ */
|
|
881
|
+
/* @__PURE__ */ z("option", {
|
|
842
882
|
value: 500,
|
|
843
883
|
children: l(r, "sandbox.detail.logs.tailLines.500", "500 lines")
|
|
844
884
|
}),
|
|
845
|
-
/* @__PURE__ */
|
|
885
|
+
/* @__PURE__ */ z("option", {
|
|
846
886
|
value: 1e3,
|
|
847
887
|
children: l(r, "sandbox.detail.logs.tailLines.1000", "1000 lines")
|
|
848
888
|
})
|
|
849
889
|
]
|
|
850
890
|
}),
|
|
851
|
-
/* @__PURE__ */
|
|
891
|
+
/* @__PURE__ */ B(n, {
|
|
852
892
|
variant: "ghost",
|
|
853
893
|
size: "sm",
|
|
854
894
|
onClick: g,
|
|
855
895
|
disabled: !h || p,
|
|
856
|
-
children: [/* @__PURE__ */
|
|
896
|
+
children: [/* @__PURE__ */ z(N, {
|
|
857
897
|
size: 14,
|
|
858
898
|
className: p ? "animate-spin" : ""
|
|
859
899
|
}), l(r, "sandbox.detail.logs.refresh", "Refresh")]
|
|
860
900
|
}),
|
|
861
|
-
_.length > 0 && /* @__PURE__ */
|
|
901
|
+
_.length > 0 && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(n, {
|
|
862
902
|
variant: "ghost",
|
|
863
903
|
size: "sm",
|
|
864
904
|
onClick: () => {
|
|
865
|
-
|
|
866
|
-
e ? (
|
|
905
|
+
x("light"), b(_.join("\n")).then((e) => {
|
|
906
|
+
e ? (S("success"), y() && C("Copied logs")) : S("error");
|
|
867
907
|
});
|
|
868
908
|
},
|
|
869
909
|
title: l(r, "sandbox.detail.logs.copy.title", "Copy logs to clipboard"),
|
|
870
|
-
children: /* @__PURE__ */
|
|
871
|
-
}), /* @__PURE__ */
|
|
910
|
+
children: /* @__PURE__ */ z(k, { size: 14 })
|
|
911
|
+
}), /* @__PURE__ */ z(n, {
|
|
872
912
|
variant: "ghost",
|
|
873
913
|
size: "sm",
|
|
874
914
|
onClick: () => {
|
|
@@ -876,39 +916,39 @@ function ge({ sandbox: e, workspaceId: t }) {
|
|
|
876
916
|
r.href = n, r.download = `sandbox-${e.name}-logs.txt`, r.click(), URL.revokeObjectURL(n);
|
|
877
917
|
},
|
|
878
918
|
title: l(r, "sandbox.detail.logs.download.title", "Download logs"),
|
|
879
|
-
children: /* @__PURE__ */
|
|
919
|
+
children: /* @__PURE__ */ z(A, { size: 14 })
|
|
880
920
|
})] })
|
|
881
921
|
]
|
|
882
922
|
})]
|
|
883
|
-
}), /* @__PURE__ */
|
|
923
|
+
}), /* @__PURE__ */ B("div", {
|
|
884
924
|
className: "bg-zinc-950 text-zinc-300 rounded-lg p-4 font-mono text-xs leading-relaxed min-h-[200px] max-h-[500px] overflow-y-auto",
|
|
885
925
|
children: [
|
|
886
|
-
!h && /* @__PURE__ */
|
|
926
|
+
!h && /* @__PURE__ */ z("p", {
|
|
887
927
|
className: "text-zinc-500",
|
|
888
928
|
children: l(r, "sandbox.detail.logs.unavailable", "Logs are available when the sandbox is running.")
|
|
889
929
|
}),
|
|
890
|
-
p && /* @__PURE__ */
|
|
930
|
+
p && /* @__PURE__ */ z("p", {
|
|
891
931
|
className: "text-zinc-500 animate-pulse",
|
|
892
932
|
children: l(r, "sandbox.detail.logs.fetching", "Fetching logs...")
|
|
893
933
|
}),
|
|
894
|
-
m && /* @__PURE__ */
|
|
934
|
+
m && /* @__PURE__ */ z("p", {
|
|
895
935
|
className: "text-status-error-text",
|
|
896
936
|
children: l(r, "sandbox.detail.logs.fetchError", "Failed to fetch logs: {message}", { message: m.message })
|
|
897
937
|
}),
|
|
898
|
-
_.length > 0 && !p ? _.map((e, t) => /* @__PURE__ */
|
|
938
|
+
_.length > 0 && !p ? _.map((e, t) => /* @__PURE__ */ z("p", {
|
|
899
939
|
className: e.toLowerCase().includes("error") ? "text-status-error-text" : e.toLowerCase().includes("warn") ? "text-status-warning-text" : "text-zinc-300",
|
|
900
940
|
children: e
|
|
901
|
-
}, `${t}:${e}`)) : !p && h && !m && /* @__PURE__ */
|
|
941
|
+
}, `${t}:${e}`)) : !p && h && !m && /* @__PURE__ */ z("p", {
|
|
902
942
|
className: "text-zinc-500",
|
|
903
943
|
children: l(r, "sandbox.detail.logs.empty", "No logs yet. Click Refresh to fetch.")
|
|
904
944
|
}),
|
|
905
|
-
/* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ z("div", { ref: u })
|
|
906
946
|
]
|
|
907
947
|
})]
|
|
908
948
|
})
|
|
909
949
|
});
|
|
910
950
|
}
|
|
911
951
|
//#endregion
|
|
912
|
-
export {
|
|
952
|
+
export { W as SandboxDetailPage };
|
|
913
953
|
|
|
914
954
|
//# sourceMappingURL=SandboxDetailPage.js.map
|