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