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