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