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