@burdenoff/microfe-sandbox 2026.1101.1 → 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 +1 -2
- 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 +577 -556
- 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,40 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { useState as
|
|
11
|
-
import { AlertCircle as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { AlertDialog as e, AlertDialogAction as t, AlertDialogCancel as n, AlertDialogContent as r, AlertDialogDescription as i, AlertDialogFooter as ee, AlertDialogHeader as te, AlertDialogTitle as ne, Badge as a, Button as o, Card as s, CardContent as c, EmphasisPanel as l } from "../components/ui.js";
|
|
2
|
+
import { useSandbox as u } from "../providers/SandboxProvider.js";
|
|
3
|
+
import { PageLayout as re } from "../components/PageLayout.js";
|
|
4
|
+
import { TagsInput as ie } from "../components/TagsInput.js";
|
|
5
|
+
import { FilesFolderPicker as ae } from "../components/FilesFolderPicker.js";
|
|
6
|
+
import { useSandboxEvents as oe } from "../utils/sandboxEvents.js";
|
|
7
|
+
import { tWithFallback as d } from "../utils/i18n.js";
|
|
8
|
+
import { BURDENOFF_REGISTRY as se, DEFAULT_SANDBOX_AGENT_IMAGE as f, stripBurdenoffRegistry as p, withBurdenoffRegistry as m } from "../utils/imageRegistry.js";
|
|
9
|
+
import { useCreateSandboxMutation as h, useListSandboxTemplatesQuery as g } from "../../generated/wspace-operations.js";
|
|
10
|
+
import { useState as _ } from "react";
|
|
11
|
+
import { AlertCircle as v, ArrowLeft as ce, Box as y, CheckCircle2 as le, Container as ue, Cpu as b, Database as de, HelpCircle as fe, Info as pe, Loader2 as me, MemoryStick as x, Plus as he, Save as ge, Settings as S, Timer as _e, Trash2 as ve, X as C } from "lucide-react";
|
|
12
|
+
import { isQuotaExhaustedError as w } from "@burdenoff/fe-libs/shared/utils";
|
|
13
|
+
import { useI18n as ye } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
14
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
15
|
+
import { OptionalFields as be, PagePurpose as xe } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
// src/sandbox/pages/SandboxCreatePage.tsx
|
|
17
|
+
var D = 0;
|
|
18
|
+
function O() {
|
|
19
|
+
return D += 1, `row-${D}-${Date.now()}`;
|
|
19
20
|
}
|
|
20
|
-
var
|
|
21
|
+
var k = [{
|
|
21
22
|
value: "MISC_SHELL",
|
|
22
23
|
labelKey: "sandbox.create.templateType.defaultSandbox.label",
|
|
23
24
|
labelFallback: "Default Sandbox",
|
|
24
25
|
descriptionKey: "sandbox.create.templateType.defaultSandbox.description",
|
|
25
26
|
descriptionFallback: "Pre-configured development environment with VibeControls agent, Bun, nginx, and common dev tools",
|
|
26
|
-
icon:
|
|
27
|
+
icon: y
|
|
27
28
|
}, {
|
|
28
29
|
value: "CUSTOM",
|
|
29
30
|
labelKey: "sandbox.create.templateType.customSandbox.label",
|
|
30
31
|
labelFallback: "Custom Sandbox",
|
|
31
32
|
descriptionKey: "sandbox.create.templateType.customSandbox.description",
|
|
32
33
|
descriptionFallback: "Configure your own container image and resources",
|
|
33
|
-
icon:
|
|
34
|
+
icon: S
|
|
34
35
|
}];
|
|
35
|
-
function
|
|
36
|
+
function A() {
|
|
36
37
|
return {
|
|
37
|
-
_rowId:
|
|
38
|
+
_rowId: O(),
|
|
38
39
|
name: "",
|
|
39
40
|
image: "",
|
|
40
41
|
ports: [],
|
|
@@ -45,9 +46,9 @@ function j() {
|
|
|
45
46
|
limitsMemory: ""
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
|
-
var
|
|
49
|
-
function
|
|
50
|
-
let { basePath:
|
|
49
|
+
var j = typeof window < "u" && (window.location.hostname.includes("alpha") || window.location.hostname.endsWith(".local.burdenoff.com") || window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1"), M = p(f), N = j ? "https://alphagraphql.burdenoff.com/global/graphql" : "https://graphql.burdenoff.com/global/graphql", P = j ? "https://alphagraphqlworkspaces.burdenoff.com/workspaces/graphql" : "https://graphqlworkspaces.burdenoff.com/workspaces/graphql";
|
|
50
|
+
function F() {
|
|
51
|
+
let { basePath: f = "/", navigate: D, workspaceId: j } = u(), F = oe(), { t: I } = ye(), [L, Se] = _([]), [R, z] = _({
|
|
51
52
|
name: "",
|
|
52
53
|
description: "",
|
|
53
54
|
template: "MISC_SHELL",
|
|
@@ -59,15 +60,15 @@ function I() {
|
|
|
59
60
|
ttlSeconds: 10800,
|
|
60
61
|
templateId: "",
|
|
61
62
|
containers: [{
|
|
62
|
-
_rowId:
|
|
63
|
+
_rowId: O(),
|
|
63
64
|
name: "main",
|
|
64
|
-
image:
|
|
65
|
+
image: M,
|
|
65
66
|
ports: [{
|
|
66
|
-
_rowId:
|
|
67
|
+
_rowId: O(),
|
|
67
68
|
containerPort: 80,
|
|
68
69
|
name: "nginx"
|
|
69
70
|
}, {
|
|
70
|
-
_rowId:
|
|
71
|
+
_rowId: O(),
|
|
71
72
|
containerPort: 3005,
|
|
72
73
|
name: "agent"
|
|
73
74
|
}],
|
|
@@ -83,43 +84,43 @@ function I() {
|
|
|
83
84
|
storageMountPath: "/data",
|
|
84
85
|
storageRetainOnDelete: !1,
|
|
85
86
|
filesFolderId: null,
|
|
86
|
-
globalGatewayUrl:
|
|
87
|
-
workspaceGatewayUrl:
|
|
88
|
-
}), [
|
|
89
|
-
function
|
|
90
|
-
let [t, n] =
|
|
91
|
-
return /* @__PURE__ */
|
|
87
|
+
globalGatewayUrl: N,
|
|
88
|
+
workspaceGatewayUrl: P
|
|
89
|
+
}), [B, V] = _({}), [H, U] = _(null), [W, G] = _(!1), [Ce, K] = _(!1);
|
|
90
|
+
function q({ text: e }) {
|
|
91
|
+
let [t, n] = _(!1);
|
|
92
|
+
return /* @__PURE__ */ E("span", {
|
|
92
93
|
className: "relative inline-block ml-1.5",
|
|
93
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ T("button", {
|
|
94
95
|
type: "button",
|
|
95
96
|
onClick: () => n(!t),
|
|
96
97
|
className: "text-text-tertiary hover:text-text-secondary transition-colors",
|
|
97
|
-
children: /* @__PURE__ */
|
|
98
|
-
}), t && /* @__PURE__ */
|
|
98
|
+
children: /* @__PURE__ */ T(fe, { size: 14 })
|
|
99
|
+
}), t && /* @__PURE__ */ E("div", {
|
|
99
100
|
className: "absolute left-0 top-6 z-50 w-64 rounded-lg border border-border-default bg-bg-surface p-3 text-xs text-text-secondary shadow-lg",
|
|
100
|
-
children: [e, /* @__PURE__ */
|
|
101
|
+
children: [e, /* @__PURE__ */ T("button", {
|
|
101
102
|
type: "button",
|
|
102
103
|
onClick: () => n(!1),
|
|
103
|
-
"aria-label":
|
|
104
|
+
"aria-label": d(I, "sandbox.create.helpTip.closeAriaLabel", "Close help tip"),
|
|
104
105
|
className: "absolute top-1 right-1 text-text-tertiary hover:text-text-secondary",
|
|
105
|
-
children: /* @__PURE__ */
|
|
106
|
+
children: /* @__PURE__ */ T(C, { size: 12 })
|
|
106
107
|
})]
|
|
107
108
|
})]
|
|
108
109
|
});
|
|
109
110
|
}
|
|
110
|
-
let { data:
|
|
111
|
+
let { data: we } = g({
|
|
111
112
|
variables: {
|
|
112
|
-
context: { workspaceId:
|
|
113
|
-
template:
|
|
113
|
+
context: { workspaceId: j },
|
|
114
|
+
template: R.template
|
|
114
115
|
},
|
|
115
|
-
skip: !
|
|
116
|
-
}), [
|
|
117
|
-
|
|
116
|
+
skip: !j
|
|
117
|
+
}), [Te] = h(), J = we?.listSandboxTemplates?.items ?? [], Y = (e, t) => {
|
|
118
|
+
U({
|
|
118
119
|
type: e,
|
|
119
120
|
message: t
|
|
120
|
-
}), setTimeout(() =>
|
|
121
|
-
},
|
|
122
|
-
|
|
121
|
+
}), setTimeout(() => U(null), 5e3);
|
|
122
|
+
}, Ee = (e) => {
|
|
123
|
+
z((t) => ({
|
|
123
124
|
...t,
|
|
124
125
|
templateId: e.id,
|
|
125
126
|
cpuRequest: e.resources?.cpuRequest ?? t.cpuRequest,
|
|
@@ -129,11 +130,11 @@ function I() {
|
|
|
129
130
|
ttlSeconds: e.ttlSeconds,
|
|
130
131
|
template: e.template,
|
|
131
132
|
containers: e.containers && e.containers.length > 0 ? e.containers.map((e) => ({
|
|
132
|
-
_rowId:
|
|
133
|
+
_rowId: O(),
|
|
133
134
|
name: e.name,
|
|
134
135
|
image: e.image,
|
|
135
136
|
ports: e.ports?.map((e) => ({
|
|
136
|
-
_rowId:
|
|
137
|
+
_rowId: O(),
|
|
137
138
|
containerPort: e.containerPort,
|
|
138
139
|
name: e.name ?? ""
|
|
139
140
|
})) ?? [],
|
|
@@ -148,8 +149,8 @@ function I() {
|
|
|
148
149
|
storageMountPath: e.storage?.mountPath ?? t.storageMountPath,
|
|
149
150
|
storageRetainOnDelete: e.storage?.retainOnDelete ?? t.storageRetainOnDelete
|
|
150
151
|
}));
|
|
151
|
-
},
|
|
152
|
-
|
|
152
|
+
}, X = (e, t) => {
|
|
153
|
+
z((n) => ({
|
|
153
154
|
...n,
|
|
154
155
|
[e]: t
|
|
155
156
|
})), e !== "templateId" && ([
|
|
@@ -158,27 +159,27 @@ function I() {
|
|
|
158
159
|
"memoryRequest",
|
|
159
160
|
"memoryLimit",
|
|
160
161
|
"ttlSeconds"
|
|
161
|
-
].includes(e) &&
|
|
162
|
+
].includes(e) && z((e) => ({
|
|
162
163
|
...e,
|
|
163
164
|
templateId: ""
|
|
164
|
-
})),
|
|
165
|
+
})), B[e] && V((t) => {
|
|
165
166
|
let n = { ...t };
|
|
166
167
|
return delete n[e], n;
|
|
167
168
|
}));
|
|
168
|
-
},
|
|
169
|
-
|
|
169
|
+
}, De = () => {
|
|
170
|
+
z((e) => ({
|
|
170
171
|
...e,
|
|
171
|
-
containers: [...e.containers,
|
|
172
|
+
containers: [...e.containers, A()],
|
|
172
173
|
templateId: ""
|
|
173
174
|
}));
|
|
174
|
-
},
|
|
175
|
-
|
|
175
|
+
}, Oe = (e) => {
|
|
176
|
+
z((t) => ({
|
|
176
177
|
...t,
|
|
177
178
|
containers: t.containers.filter((t, n) => n !== e),
|
|
178
179
|
templateId: ""
|
|
179
180
|
}));
|
|
180
|
-
},
|
|
181
|
-
|
|
181
|
+
}, Z = (e, t, n) => {
|
|
182
|
+
z((r) => ({
|
|
182
183
|
...r,
|
|
183
184
|
containers: r.containers.map((r, i) => i === e ? {
|
|
184
185
|
...r,
|
|
@@ -186,28 +187,28 @@ function I() {
|
|
|
186
187
|
} : r),
|
|
187
188
|
templateId: ""
|
|
188
189
|
}));
|
|
189
|
-
},
|
|
190
|
-
|
|
190
|
+
}, ke = (e) => {
|
|
191
|
+
z((t) => ({
|
|
191
192
|
...t,
|
|
192
193
|
containers: t.containers.map((t, n) => n === e ? {
|
|
193
194
|
...t,
|
|
194
195
|
ports: [...t.ports, {
|
|
195
|
-
_rowId:
|
|
196
|
+
_rowId: O(),
|
|
196
197
|
containerPort: 8080,
|
|
197
198
|
name: ""
|
|
198
199
|
}]
|
|
199
200
|
} : t)
|
|
200
201
|
}));
|
|
201
|
-
},
|
|
202
|
-
|
|
202
|
+
}, Ae = (e, t) => {
|
|
203
|
+
z((n) => ({
|
|
203
204
|
...n,
|
|
204
205
|
containers: n.containers.map((n, r) => r === e ? {
|
|
205
206
|
...n,
|
|
206
207
|
ports: n.ports.filter((e, n) => n !== t)
|
|
207
208
|
} : n)
|
|
208
209
|
}));
|
|
209
|
-
},
|
|
210
|
-
|
|
210
|
+
}, je = (e) => {
|
|
211
|
+
z((t) => ({
|
|
211
212
|
...t,
|
|
212
213
|
containers: t.containers.map((t, n) => n === e ? {
|
|
213
214
|
...t,
|
|
@@ -217,222 +218,229 @@ function I() {
|
|
|
217
218
|
}]
|
|
218
219
|
} : t)
|
|
219
220
|
}));
|
|
220
|
-
},
|
|
221
|
-
|
|
221
|
+
}, Q = (e, t) => {
|
|
222
|
+
z((n) => ({
|
|
222
223
|
...n,
|
|
223
224
|
containers: n.containers.map((n, r) => r === e ? {
|
|
224
225
|
...n,
|
|
225
226
|
env: n.env.filter((e, n) => n !== t)
|
|
226
227
|
} : n)
|
|
227
228
|
}));
|
|
228
|
-
},
|
|
229
|
+
}, Me = () => {
|
|
229
230
|
let e = {};
|
|
230
|
-
return
|
|
231
|
-
t.name.trim() || (e[`container_${n}_name`] =
|
|
232
|
-
}),
|
|
233
|
-
},
|
|
234
|
-
if (e.preventDefault(), !
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
231
|
+
return R.name.trim() || (e.name = d(I, "sandbox.create.errors.nameRequired", "Name is required")), R.cpuRequest.trim() || (e.cpuRequest = d(I, "sandbox.create.errors.cpuRequestRequired", "CPU request is required")), R.cpuLimit.trim() || (e.cpuLimit = d(I, "sandbox.create.errors.cpuLimitRequired", "CPU limit is required")), R.memoryRequest.trim() || (e.memoryRequest = d(I, "sandbox.create.errors.memoryRequestRequired", "Memory request is required")), R.memoryLimit.trim() || (e.memoryLimit = d(I, "sandbox.create.errors.memoryLimitRequired", "Memory limit is required")), (R.ttlSeconds < 600 || R.ttlSeconds > 86400) && (e.ttlSeconds = d(I, "sandbox.create.errors.ttlRange", "TTL must be 10m-24h")), R.containers.length === 0 && (e.containers = d(I, "sandbox.create.errors.containersRequired", "At least one container is required")), R.containers.forEach((t, n) => {
|
|
232
|
+
t.name.trim() || (e[`container_${n}_name`] = d(I, "sandbox.create.errors.containerNameRequired", "Container name is required")), t.image.trim() || (e[`container_${n}_image`] = d(I, "sandbox.create.errors.containerImageRequired", "Container image is required"));
|
|
233
|
+
}), V(e), Object.keys(e).length === 0;
|
|
234
|
+
}, Ne = async (e) => {
|
|
235
|
+
if (e.preventDefault(), !Me()) Y("error", d(I, "sandbox.create.notifications.fixErrors", "Please fix the form errors"));
|
|
236
|
+
else {
|
|
237
|
+
G(!0);
|
|
238
|
+
try {
|
|
239
|
+
let e = R.containers.map((e) => {
|
|
240
|
+
let t = (e._registryType || "burdenoff") === "burdenoff" ? m(e.image) : e.image;
|
|
241
|
+
return {
|
|
242
|
+
name: e.name,
|
|
243
|
+
image: t,
|
|
244
|
+
ports: e.ports.length > 0 ? e.ports.map((e) => ({
|
|
245
|
+
containerPort: e.containerPort,
|
|
246
|
+
name: e.name || void 0
|
|
247
|
+
})) : void 0,
|
|
248
|
+
env: e.env.length > 0 ? e.env.filter((e) => e.name.trim()) : void 0,
|
|
249
|
+
resources: e.requestsCpu || e.requestsMemory || e.limitsCpu || e.limitsMemory ? {
|
|
250
|
+
requestsCpu: e.requestsCpu || void 0,
|
|
251
|
+
requestsMemory: e.requestsMemory || void 0,
|
|
252
|
+
limitsCpu: e.limitsCpu || void 0,
|
|
253
|
+
limitsMemory: e.limitsMemory || void 0
|
|
254
|
+
} : void 0
|
|
255
|
+
};
|
|
256
|
+
}), t = await Te({ variables: { input: {
|
|
257
|
+
context: { workspaceId: j },
|
|
258
|
+
name: R.name,
|
|
259
|
+
description: R.description || void 0,
|
|
260
|
+
template: R.template,
|
|
261
|
+
mode: R.mode,
|
|
262
|
+
containers: e,
|
|
263
|
+
resources: {
|
|
264
|
+
cpuRequest: R.cpuRequest,
|
|
265
|
+
cpuLimit: R.cpuLimit,
|
|
266
|
+
memoryRequest: R.memoryRequest,
|
|
267
|
+
memoryLimit: R.memoryLimit
|
|
268
|
+
},
|
|
269
|
+
storage: {
|
|
270
|
+
mode: R.storageMode,
|
|
271
|
+
sizeGi: R.storageMode === "NONE" ? void 0 : R.storageSizeGi,
|
|
272
|
+
mountPath: R.storageMode === "NONE" ? void 0 : R.storageMountPath,
|
|
273
|
+
retainOnDelete: R.storageMode === "PERSISTENT" && R.storageRetainOnDelete,
|
|
274
|
+
filesFolderId: R.storageMode !== "NONE" && R.filesFolderId ? R.filesFolderId : void 0
|
|
275
|
+
},
|
|
276
|
+
ttlSeconds: R.ttlSeconds,
|
|
277
|
+
metadata: {
|
|
278
|
+
globalGatewayUrl: R.globalGatewayUrl || void 0,
|
|
279
|
+
workspaceGatewayUrl: R.workspaceGatewayUrl || void 0,
|
|
280
|
+
tags: L.length ? L : void 0
|
|
281
|
+
}
|
|
282
|
+
} } });
|
|
283
|
+
if (t.error) {
|
|
284
|
+
if (w(t.error)) {
|
|
285
|
+
K(!0);
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
Y("error", d(I, "sandbox.create.notifications.createFailed", "Failed to create sandbox") + `: ${t.error.message}`);
|
|
289
|
+
return;
|
|
282
290
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
291
|
+
let n = t.data?.createSandbox;
|
|
292
|
+
if (!n) {
|
|
293
|
+
Y("error", d(I, "sandbox.create.notifications.createFailed", "Failed to create sandbox"));
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
F.sandboxCreated({
|
|
297
|
+
sandboxId: n.id,
|
|
298
|
+
kind: n.kind?.toLowerCase?.() === "internal" ? "internal" : "user",
|
|
299
|
+
source: n.source ?? "manual"
|
|
300
|
+
}), Y("success", d(I, "sandbox.create.notifications.createSuccess", "Sandbox created successfully! Provisioning..."));
|
|
301
|
+
let r = `${f.replace(/\/$/, "")}/${n.id}`;
|
|
302
|
+
setTimeout(() => D?.(r), 1500);
|
|
303
|
+
} catch (e) {
|
|
304
|
+
if (w(e)) {
|
|
305
|
+
K(!0);
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
Y("error", d(I, "sandbox.create.notifications.createFailed", "Failed to create sandbox"));
|
|
309
|
+
} finally {
|
|
310
|
+
G(!1);
|
|
292
311
|
}
|
|
293
|
-
I.sandboxCreated({
|
|
294
|
-
sandboxId: n.id,
|
|
295
|
-
kind: n.kind?.toLowerCase?.() === "internal" ? "internal" : "user",
|
|
296
|
-
source: n.source ?? "manual"
|
|
297
|
-
}), X("success", a(L, "sandbox.create.notifications.createSuccess", "Sandbox created successfully! Provisioning..."));
|
|
298
|
-
let r = `${l.replace(/\/$/, "")}/${n.id}`;
|
|
299
|
-
setTimeout(() => k?.(r), 1500);
|
|
300
|
-
} catch {
|
|
301
|
-
X("error", a(L, "sandbox.create.notifications.createFailed", "Failed to create sandbox"));
|
|
302
|
-
} finally {
|
|
303
|
-
q(!1);
|
|
304
312
|
}
|
|
305
313
|
}, $ = (e) => {
|
|
306
314
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60);
|
|
307
315
|
return t > 0 && n > 0 ? `${t}h ${n}m` : t > 0 ? `${t}h` : `${n}m`;
|
|
308
316
|
};
|
|
309
|
-
return /* @__PURE__ */
|
|
317
|
+
return /* @__PURE__ */ E(re, {
|
|
310
318
|
showHeader: !1,
|
|
311
319
|
children: [
|
|
312
|
-
|
|
313
|
-
className: `fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200 ${
|
|
320
|
+
H && /* @__PURE__ */ E("div", {
|
|
321
|
+
className: `fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200 ${H.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border-border-default" : "bg-status-error-bg-subtle text-status-error-text border-border-default"}`,
|
|
314
322
|
children: [
|
|
315
|
-
|
|
316
|
-
/* @__PURE__ */
|
|
323
|
+
H.type === "success" ? /* @__PURE__ */ T(le, { size: 20 }) : /* @__PURE__ */ T(v, { size: 20 }),
|
|
324
|
+
/* @__PURE__ */ T("span", {
|
|
317
325
|
className: "font-medium",
|
|
318
|
-
children:
|
|
326
|
+
children: H.message
|
|
319
327
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ T("button", {
|
|
321
329
|
type: "button",
|
|
322
|
-
onClick: () =>
|
|
323
|
-
"aria-label":
|
|
330
|
+
onClick: () => U(null),
|
|
331
|
+
"aria-label": d(I, "sandbox.create.notification.dismiss", "Dismiss notification"),
|
|
324
332
|
className: "ml-2 p-1 rounded-md hover:bg-accent",
|
|
325
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ T(C, { size: 16 })
|
|
326
334
|
})
|
|
327
335
|
]
|
|
328
336
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ E(l, {
|
|
330
338
|
className: "overflow-hidden bg-hero-mesh",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ E("div", {
|
|
332
340
|
className: "flex items-center gap-4",
|
|
333
|
-
children: [/* @__PURE__ */
|
|
341
|
+
children: [/* @__PURE__ */ T("button", {
|
|
334
342
|
type: "button",
|
|
335
|
-
onClick: () =>
|
|
343
|
+
onClick: () => D?.(f),
|
|
336
344
|
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",
|
|
337
|
-
"aria-label":
|
|
338
|
-
children: /* @__PURE__ */
|
|
339
|
-
}), /* @__PURE__ */
|
|
345
|
+
"aria-label": d(I, "sandbox.create.header.back.ariaLabel", "Back to sandboxes"),
|
|
346
|
+
children: /* @__PURE__ */ T(ce, { size: 20 })
|
|
347
|
+
}), /* @__PURE__ */ E("div", {
|
|
340
348
|
className: "flex items-center gap-3",
|
|
341
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ T("div", {
|
|
342
350
|
className: "p-2.5 rounded-lg bg-action-primary-bg/10",
|
|
343
|
-
children: /* @__PURE__ */
|
|
351
|
+
children: /* @__PURE__ */ T(y, {
|
|
344
352
|
size: 24,
|
|
345
353
|
className: "text-primary"
|
|
346
354
|
})
|
|
347
|
-
}), /* @__PURE__ */
|
|
355
|
+
}), /* @__PURE__ */ T("h1", {
|
|
348
356
|
className: "text-2xl sm:text-3xl font-bold",
|
|
349
|
-
children:
|
|
357
|
+
children: d(I, "sandbox.create.header.title", "Create Sandbox")
|
|
350
358
|
})]
|
|
351
359
|
})]
|
|
352
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ T(xe, {
|
|
353
361
|
className: "mt-3",
|
|
354
|
-
children:
|
|
362
|
+
children: d(I, "sandbox.create.purpose", "Define a fresh, throwaway environment: pick a base image (or a template), set how much CPU/memory it gets, choose storage and a time-to-live, then launch. Use it to test a build, demo an AI agent, or reproduce an issue — it tears itself down when the TTL runs out.")
|
|
355
363
|
})]
|
|
356
364
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
onSubmit:
|
|
365
|
+
/* @__PURE__ */ E("form", {
|
|
366
|
+
onSubmit: Ne,
|
|
359
367
|
className: "space-y-6",
|
|
360
368
|
children: [
|
|
361
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ T(s, {
|
|
362
370
|
className: "border-border-seam",
|
|
363
|
-
children: /* @__PURE__ */
|
|
371
|
+
children: /* @__PURE__ */ E(c, {
|
|
364
372
|
className: "p-6 space-y-5",
|
|
365
373
|
children: [
|
|
366
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ E("h2", {
|
|
367
375
|
className: "text-lg font-bold flex items-center gap-2",
|
|
368
|
-
children: [/* @__PURE__ */
|
|
376
|
+
children: [/* @__PURE__ */ T(pe, {
|
|
369
377
|
size: 18,
|
|
370
378
|
className: "text-primary"
|
|
371
|
-
}),
|
|
379
|
+
}), d(I, "sandbox.create.sections.basicInfo.title", "Basic Information")]
|
|
372
380
|
}),
|
|
373
|
-
/* @__PURE__ */
|
|
374
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ E("div", { children: [
|
|
382
|
+
/* @__PURE__ */ E("label", {
|
|
375
383
|
htmlFor: "name",
|
|
376
384
|
className: "block text-sm font-semibold mb-2",
|
|
377
385
|
children: [
|
|
378
|
-
|
|
386
|
+
d(I, "sandbox.create.fields.name.label", "Name"),
|
|
379
387
|
" ",
|
|
380
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ T("span", {
|
|
381
389
|
className: "text-status-error-text",
|
|
382
390
|
children: "*"
|
|
383
391
|
})
|
|
384
392
|
]
|
|
385
393
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
"aria-label":
|
|
394
|
+
/* @__PURE__ */ T("input", {
|
|
395
|
+
"aria-label": d(I, "sandbox.create.fields.name.ariaLabel", "Name"),
|
|
388
396
|
type: "text",
|
|
389
397
|
id: "name",
|
|
390
|
-
value:
|
|
391
|
-
onChange: (e) =>
|
|
392
|
-
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
393
|
-
placeholder:
|
|
398
|
+
value: R.name,
|
|
399
|
+
onChange: (e) => X("name", e.target.value),
|
|
400
|
+
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${B.name ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
401
|
+
placeholder: d(I, "sandbox.create.fields.name.placeholder", "My Sandbox")
|
|
394
402
|
}),
|
|
395
|
-
|
|
403
|
+
B.name && /* @__PURE__ */ E("p", {
|
|
396
404
|
className: "text-sm text-status-error-text mt-1 flex items-center gap-1",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ T(v, { size: 14 }), B.name]
|
|
398
406
|
})
|
|
399
407
|
] }),
|
|
400
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
401
409
|
htmlFor: "description",
|
|
402
410
|
className: "block text-sm font-semibold mb-2",
|
|
403
|
-
children:
|
|
404
|
-
}), /* @__PURE__ */
|
|
405
|
-
"aria-label":
|
|
411
|
+
children: d(I, "sandbox.create.fields.description.label", "Description")
|
|
412
|
+
}), /* @__PURE__ */ T("textarea", {
|
|
413
|
+
"aria-label": d(I, "sandbox.create.fields.description.ariaLabel", "Description"),
|
|
406
414
|
id: "description",
|
|
407
|
-
value:
|
|
408
|
-
onChange: (e) =>
|
|
415
|
+
value: R.description,
|
|
416
|
+
onChange: (e) => X("description", e.target.value),
|
|
409
417
|
rows: 3,
|
|
410
418
|
className: "w-full px-4 py-2.5 border-2 border-border-subtle rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all",
|
|
411
|
-
placeholder:
|
|
419
|
+
placeholder: d(I, "sandbox.create.fields.description.placeholder", "What is this sandbox for?")
|
|
412
420
|
})] }),
|
|
413
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
414
422
|
className: "block text-sm font-semibold mb-3",
|
|
415
|
-
children:
|
|
416
|
-
}), /* @__PURE__ */
|
|
423
|
+
children: d(I, "sandbox.create.fields.template.label", "Template")
|
|
424
|
+
}), /* @__PURE__ */ T("div", {
|
|
417
425
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
418
|
-
children:
|
|
419
|
-
let t = e.icon, n =
|
|
420
|
-
return /* @__PURE__ */
|
|
426
|
+
children: k.map((e) => {
|
|
427
|
+
let t = e.icon, n = R.template === e.value;
|
|
428
|
+
return /* @__PURE__ */ E("button", {
|
|
421
429
|
type: "button",
|
|
422
430
|
onClick: () => {
|
|
423
|
-
e.value === "MISC_SHELL" ?
|
|
431
|
+
e.value === "MISC_SHELL" ? z((e) => ({
|
|
424
432
|
...e,
|
|
425
433
|
template: "MISC_SHELL",
|
|
426
434
|
containers: [{
|
|
427
|
-
_rowId:
|
|
435
|
+
_rowId: O(),
|
|
428
436
|
name: "main",
|
|
429
|
-
image:
|
|
437
|
+
image: M,
|
|
430
438
|
ports: [{
|
|
431
|
-
_rowId:
|
|
439
|
+
_rowId: O(),
|
|
432
440
|
containerPort: 80,
|
|
433
441
|
name: "nginx"
|
|
434
442
|
}, {
|
|
435
|
-
_rowId:
|
|
443
|
+
_rowId: O(),
|
|
436
444
|
containerPort: 3005,
|
|
437
445
|
name: "agent"
|
|
438
446
|
}],
|
|
@@ -443,11 +451,11 @@ function I() {
|
|
|
443
451
|
limitsMemory: "2Gi",
|
|
444
452
|
_registryType: "burdenoff"
|
|
445
453
|
}]
|
|
446
|
-
})) :
|
|
454
|
+
})) : z((e) => ({
|
|
447
455
|
...e,
|
|
448
456
|
template: "CUSTOM",
|
|
449
457
|
containers: [{
|
|
450
|
-
...
|
|
458
|
+
...A(),
|
|
451
459
|
name: "main",
|
|
452
460
|
image: ""
|
|
453
461
|
}]
|
|
@@ -455,26 +463,26 @@ function I() {
|
|
|
455
463
|
},
|
|
456
464
|
className: `p-4 rounded-lg border-2 text-left transition-all duration-200 ${n ? "border-primary bg-action-primary-bg/5 shadow-sm" : "border-border-subtle hover:border-primary/50 hover:bg-bg-sunken/50"}`,
|
|
457
465
|
children: [
|
|
458
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ T(t, {
|
|
459
467
|
size: 24,
|
|
460
468
|
className: n ? "text-primary" : "text-text-secondary"
|
|
461
469
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ T("p", {
|
|
463
471
|
className: "font-medium mt-2",
|
|
464
|
-
children:
|
|
472
|
+
children: d(I, e.labelKey, e.labelFallback)
|
|
465
473
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ T("p", {
|
|
467
475
|
className: "text-xs text-text-secondary mt-0.5",
|
|
468
|
-
children:
|
|
476
|
+
children: d(I, e.descriptionKey, e.descriptionFallback)
|
|
469
477
|
})
|
|
470
478
|
]
|
|
471
479
|
}, e.value);
|
|
472
480
|
})
|
|
473
481
|
})] }),
|
|
474
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("label", {
|
|
475
483
|
className: "block text-sm font-semibold mb-3",
|
|
476
|
-
children: [
|
|
477
|
-
}), /* @__PURE__ */
|
|
484
|
+
children: [d(I, "sandbox.create.fields.executionMode.label", "Execution Mode"), /* @__PURE__ */ T(q, { text: d(I, "sandbox.create.fields.executionMode.help", "Deployment keeps your sandbox running continuously and restarts on failure. Job runs to completion and exits when done.") })]
|
|
485
|
+
}), /* @__PURE__ */ T("div", {
|
|
478
486
|
className: "grid grid-cols-2 gap-3",
|
|
479
487
|
children: [{
|
|
480
488
|
value: "DEPLOYMENT",
|
|
@@ -488,284 +496,290 @@ function I() {
|
|
|
488
496
|
labelFallback: "Job",
|
|
489
497
|
descKey: "sandbox.create.fields.executionMode.job.description",
|
|
490
498
|
descFallback: "Run-to-completion task (exits when done)"
|
|
491
|
-
}].map((e) =>
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
className:
|
|
497
|
-
children:
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
499
|
+
}].map((e) => {
|
|
500
|
+
let t = R.mode === e.value;
|
|
501
|
+
return /* @__PURE__ */ E("button", {
|
|
502
|
+
type: "button",
|
|
503
|
+
onClick: () => X("mode", e.value),
|
|
504
|
+
className: `p-3 rounded-lg border-2 text-left transition-all duration-200 ${t ? "border-primary bg-action-primary-bg/5 shadow-sm" : "border-border-subtle hover:border-primary/50 hover:bg-bg-sunken/50"}`,
|
|
505
|
+
children: [/* @__PURE__ */ T("p", {
|
|
506
|
+
className: "font-medium text-sm",
|
|
507
|
+
children: d(I, e.labelKey, e.labelFallback)
|
|
508
|
+
}), /* @__PURE__ */ T("p", {
|
|
509
|
+
className: "text-xs text-text-secondary mt-0.5",
|
|
510
|
+
children: d(I, e.descKey, e.descFallback)
|
|
511
|
+
})]
|
|
512
|
+
}, e.value);
|
|
513
|
+
})
|
|
503
514
|
})] })
|
|
504
515
|
]
|
|
505
516
|
})
|
|
506
517
|
}),
|
|
507
|
-
|
|
518
|
+
J.length > 0 && /* @__PURE__ */ T(s, {
|
|
508
519
|
className: "border-border-seam",
|
|
509
|
-
children: /* @__PURE__ */
|
|
520
|
+
children: /* @__PURE__ */ E(c, {
|
|
510
521
|
className: "p-6 space-y-4",
|
|
511
522
|
children: [
|
|
512
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ E("h2", {
|
|
513
524
|
className: "text-lg font-bold flex items-center gap-2",
|
|
514
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ T(y, {
|
|
515
526
|
size: 18,
|
|
516
527
|
className: "text-primary"
|
|
517
|
-
}),
|
|
528
|
+
}), d(I, "sandbox.create.sections.quickStartTemplates.title", "Quick Start Templates")]
|
|
518
529
|
}),
|
|
519
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ T("div", {
|
|
520
531
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",
|
|
521
|
-
children:
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
className: "
|
|
530
|
-
children:
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
532
|
+
children: J.map((e) => {
|
|
533
|
+
let t = R.templateId === e.id;
|
|
534
|
+
return /* @__PURE__ */ E("button", {
|
|
535
|
+
type: "button",
|
|
536
|
+
onClick: () => Ee(e),
|
|
537
|
+
className: `p-4 rounded-lg border-2 text-left transition-all duration-200 ${t ? "border-primary bg-action-primary-bg/5 shadow-sm" : "border-border-subtle hover:border-primary/50 hover:bg-bg-sunken/50"}`,
|
|
538
|
+
children: [
|
|
539
|
+
/* @__PURE__ */ E("div", {
|
|
540
|
+
className: "flex items-center gap-2 mb-2",
|
|
541
|
+
children: [/* @__PURE__ */ T("span", {
|
|
542
|
+
className: "font-medium text-sm",
|
|
543
|
+
children: e.name
|
|
544
|
+
}), e.isDefault && /* @__PURE__ */ T(a, {
|
|
545
|
+
variant: "secondary",
|
|
546
|
+
className: "text-xs",
|
|
547
|
+
children: d(I, "sandbox.create.sections.quickStartTemplates.defaultBadge", "Default")
|
|
548
|
+
})]
|
|
549
|
+
}),
|
|
550
|
+
e.description && /* @__PURE__ */ T("p", {
|
|
551
|
+
className: "text-xs text-text-secondary mb-2",
|
|
552
|
+
children: e.description
|
|
553
|
+
}),
|
|
554
|
+
/* @__PURE__ */ E("div", {
|
|
555
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
556
|
+
children: [
|
|
557
|
+
/* @__PURE__ */ E("span", { children: [e.resources?.cpuRequest ?? "?", " CPU"] }),
|
|
558
|
+
/* @__PURE__ */ T("span", {
|
|
559
|
+
className: "text-text-secondary/40",
|
|
560
|
+
children: "|"
|
|
561
|
+
}),
|
|
562
|
+
/* @__PURE__ */ E("span", { children: [e.resources?.memoryRequest ?? "?", " mem"] }),
|
|
563
|
+
/* @__PURE__ */ T("span", {
|
|
564
|
+
className: "text-text-secondary/40",
|
|
565
|
+
children: "|"
|
|
566
|
+
}),
|
|
567
|
+
/* @__PURE__ */ E("span", { children: [e.containers?.length ?? 0, " containers"] }),
|
|
568
|
+
/* @__PURE__ */ T("span", {
|
|
569
|
+
className: "text-text-secondary/40",
|
|
570
|
+
children: "|"
|
|
571
|
+
}),
|
|
572
|
+
/* @__PURE__ */ T("span", { children: $(e.ttlSeconds) })
|
|
573
|
+
]
|
|
574
|
+
})
|
|
575
|
+
]
|
|
576
|
+
}, e.id);
|
|
577
|
+
})
|
|
564
578
|
}),
|
|
565
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ T("p", {
|
|
566
580
|
className: "text-xs text-text-secondary",
|
|
567
|
-
children:
|
|
581
|
+
children: d(I, "sandbox.create.sections.quickStartTemplates.hint", "Select a template or customize resources below")
|
|
568
582
|
})
|
|
569
583
|
]
|
|
570
584
|
})
|
|
571
585
|
}),
|
|
572
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ T(s, {
|
|
573
587
|
className: "border-border-seam",
|
|
574
|
-
children: /* @__PURE__ */
|
|
588
|
+
children: /* @__PURE__ */ E(c, {
|
|
575
589
|
className: "p-6 space-y-5",
|
|
576
590
|
children: [
|
|
577
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ E("div", {
|
|
578
592
|
className: "flex items-center justify-between",
|
|
579
|
-
children: [/* @__PURE__ */
|
|
593
|
+
children: [/* @__PURE__ */ E("h2", {
|
|
580
594
|
className: "text-lg font-bold flex items-center gap-2",
|
|
581
595
|
children: [
|
|
582
|
-
/* @__PURE__ */
|
|
596
|
+
/* @__PURE__ */ T(ue, {
|
|
583
597
|
size: 18,
|
|
584
598
|
className: "text-primary"
|
|
585
599
|
}),
|
|
586
|
-
|
|
587
|
-
/* @__PURE__ */
|
|
588
|
-
/* @__PURE__ */
|
|
600
|
+
d(I, "sandbox.create.sections.containers.title", "Containers"),
|
|
601
|
+
/* @__PURE__ */ T(q, { text: d(I, "sandbox.create.sections.containers.help", "A container is the application that runs inside your sandbox. The default sandbox image includes VibeControls agent, Bun, nginx, and common dev tools pre-installed.") }),
|
|
602
|
+
/* @__PURE__ */ T(a, {
|
|
589
603
|
variant: "secondary",
|
|
590
|
-
children:
|
|
604
|
+
children: R.containers.length
|
|
591
605
|
})
|
|
592
606
|
]
|
|
593
|
-
}), /* @__PURE__ */
|
|
607
|
+
}), /* @__PURE__ */ E(o, {
|
|
594
608
|
type: "button",
|
|
595
609
|
variant: "outline",
|
|
596
610
|
size: "sm",
|
|
597
|
-
onClick:
|
|
598
|
-
children: [/* @__PURE__ */
|
|
611
|
+
onClick: De,
|
|
612
|
+
children: [/* @__PURE__ */ T(he, { size: 14 }), d(I, "sandbox.create.sections.containers.addContainer", "Add Container")]
|
|
599
613
|
})]
|
|
600
614
|
}),
|
|
601
|
-
|
|
615
|
+
B.containers && /* @__PURE__ */ E("p", {
|
|
602
616
|
className: "text-sm text-status-error-text flex items-center gap-1",
|
|
603
|
-
children: [/* @__PURE__ */
|
|
617
|
+
children: [/* @__PURE__ */ T(v, { size: 14 }), B.containers]
|
|
604
618
|
}),
|
|
605
|
-
/* @__PURE__ */
|
|
619
|
+
/* @__PURE__ */ T("div", {
|
|
606
620
|
className: "space-y-4",
|
|
607
|
-
children:
|
|
621
|
+
children: R.containers.map((e, t) => /* @__PURE__ */ E("div", {
|
|
608
622
|
className: "p-4 rounded-lg border-2 border-border-subtle/50 bg-bg-sunken/20 space-y-4",
|
|
609
623
|
children: [
|
|
610
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ E("div", {
|
|
611
625
|
className: "flex items-center justify-between",
|
|
612
|
-
children: [/* @__PURE__ */
|
|
626
|
+
children: [/* @__PURE__ */ E("h3", {
|
|
613
627
|
className: "font-semibold text-sm",
|
|
614
|
-
children: [
|
|
615
|
-
}),
|
|
628
|
+
children: [d(I, "sandbox.create.container.heading", "Container #{number}", { number: t + 1 }), e.name && `: ${e.name}`]
|
|
629
|
+
}), R.containers.length > 1 && /* @__PURE__ */ T(o, {
|
|
616
630
|
type: "button",
|
|
617
631
|
variant: "ghost",
|
|
618
632
|
size: "icon",
|
|
619
633
|
className: "text-status-error-text hover:text-status-error-text size-7",
|
|
620
|
-
onClick: () =>
|
|
621
|
-
children: /* @__PURE__ */
|
|
634
|
+
onClick: () => Oe(t),
|
|
635
|
+
children: /* @__PURE__ */ T(ve, { size: 14 })
|
|
622
636
|
})]
|
|
623
637
|
}),
|
|
624
|
-
/* @__PURE__ */
|
|
625
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ E("div", { children: [
|
|
639
|
+
/* @__PURE__ */ E("label", {
|
|
626
640
|
className: "block text-xs font-semibold mb-1",
|
|
627
641
|
children: [
|
|
628
|
-
|
|
642
|
+
d(I, "sandbox.create.container.fields.name.label", "Name"),
|
|
629
643
|
" ",
|
|
630
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ T("span", {
|
|
631
645
|
className: "text-status-error-text",
|
|
632
646
|
children: "*"
|
|
633
647
|
})
|
|
634
648
|
]
|
|
635
649
|
}),
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
"aria-label":
|
|
650
|
+
/* @__PURE__ */ T("input", {
|
|
651
|
+
"aria-label": d(I, "sandbox.create.container.fields.name.label", "Name"),
|
|
638
652
|
type: "text",
|
|
639
653
|
value: e.name,
|
|
640
|
-
onChange: (e) =>
|
|
641
|
-
className: `w-full px-3 py-2 border-2 rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
642
|
-
placeholder:
|
|
654
|
+
onChange: (e) => Z(t, "name", e.target.value),
|
|
655
|
+
className: `w-full px-3 py-2 border-2 rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${B[`container_${t}_name`] ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
656
|
+
placeholder: d(I, "sandbox.create.container.fields.name.placeholder", "main")
|
|
643
657
|
}),
|
|
644
|
-
|
|
658
|
+
B[`container_${t}_name`] && /* @__PURE__ */ T("p", {
|
|
645
659
|
className: "text-xs text-status-error-text mt-1",
|
|
646
|
-
children:
|
|
660
|
+
children: B[`container_${t}_name`]
|
|
647
661
|
})
|
|
648
662
|
] }),
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
/* @__PURE__ */
|
|
663
|
+
/* @__PURE__ */ E("div", { children: [
|
|
664
|
+
/* @__PURE__ */ E("label", {
|
|
651
665
|
className: "block text-xs font-semibold mb-1",
|
|
652
666
|
children: [
|
|
653
|
-
|
|
667
|
+
d(I, "sandbox.create.container.fields.image.label", "Image"),
|
|
654
668
|
" ",
|
|
655
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ T("span", {
|
|
656
670
|
className: "text-status-error-text",
|
|
657
671
|
children: "*"
|
|
658
672
|
})
|
|
659
673
|
]
|
|
660
674
|
}),
|
|
661
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ E("div", {
|
|
662
676
|
className: "flex gap-2 mb-2",
|
|
663
|
-
children: [/* @__PURE__ */
|
|
677
|
+
children: [/* @__PURE__ */ T("button", {
|
|
664
678
|
type: "button",
|
|
665
|
-
onClick: () =>
|
|
679
|
+
onClick: () => Z(t, "_registryType", "burdenoff"),
|
|
666
680
|
className: `flex-1 rounded-lg border px-3 py-1.5 text-xs font-medium transition-colors ${(e._registryType || "burdenoff") === "burdenoff" ? "border-primary bg-action-primary-bg/10 text-primary" : "border-border-default text-text-secondary hover:bg-bg-sunken"}`,
|
|
667
|
-
children:
|
|
668
|
-
}), /* @__PURE__ */
|
|
681
|
+
children: d(I, "sandbox.create.container.fields.image.registryBurdenoff", "Burdenoff Repositories")
|
|
682
|
+
}), /* @__PURE__ */ T("button", {
|
|
669
683
|
type: "button",
|
|
670
|
-
onClick: () =>
|
|
684
|
+
onClick: () => Z(t, "_registryType", "custom"),
|
|
671
685
|
className: `flex-1 rounded-lg border px-3 py-1.5 text-xs font-medium transition-colors ${e._registryType === "custom" ? "border-primary bg-action-primary-bg/10 text-primary" : "border-border-default text-text-secondary hover:bg-bg-sunken"}`,
|
|
672
|
-
children:
|
|
686
|
+
children: d(I, "sandbox.create.container.fields.image.registryCustom", "Custom (Docker Hub)")
|
|
673
687
|
})]
|
|
674
688
|
}),
|
|
675
|
-
(e._registryType || "burdenoff") === "burdenoff" ? /* @__PURE__ */
|
|
689
|
+
(e._registryType || "burdenoff") === "burdenoff" ? /* @__PURE__ */ E("div", {
|
|
676
690
|
className: "flex items-center",
|
|
677
|
-
children: [/* @__PURE__ */
|
|
691
|
+
children: [/* @__PURE__ */ E("span", {
|
|
678
692
|
className: "px-3 py-2 border-2 border-r-0 rounded-l-lg bg-bg-sunken text-xs text-text-secondary font-mono whitespace-nowrap",
|
|
679
|
-
children: [
|
|
680
|
-
}), /* @__PURE__ */
|
|
681
|
-
"aria-label":
|
|
693
|
+
children: [se, "/"]
|
|
694
|
+
}), /* @__PURE__ */ T("input", {
|
|
695
|
+
"aria-label": d(I, "sandbox.create.container.fields.image.label", "Image"),
|
|
682
696
|
type: "text",
|
|
683
|
-
value:
|
|
684
|
-
onChange: (e) =>
|
|
685
|
-
className: `w-full px-3 py-2 border-2 rounded-r-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
686
|
-
placeholder:
|
|
697
|
+
value: p(e.image),
|
|
698
|
+
onChange: (e) => Z(t, "image", e.target.value),
|
|
699
|
+
className: `w-full px-3 py-2 border-2 rounded-r-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${B[`container_${t}_image`] ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
700
|
+
placeholder: M
|
|
687
701
|
})]
|
|
688
|
-
}) : /* @__PURE__ */
|
|
689
|
-
"aria-label":
|
|
702
|
+
}) : /* @__PURE__ */ T("input", {
|
|
703
|
+
"aria-label": d(I, "sandbox.create.container.fields.image.label", "Image"),
|
|
690
704
|
type: "text",
|
|
691
705
|
value: e.image,
|
|
692
|
-
onChange: (e) =>
|
|
693
|
-
className: `w-full px-3 py-2 border-2 rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
694
|
-
placeholder:
|
|
706
|
+
onChange: (e) => Z(t, "image", e.target.value),
|
|
707
|
+
className: `w-full px-3 py-2 border-2 rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${B[`container_${t}_image`] ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
708
|
+
placeholder: d(I, "sandbox.create.container.fields.image.placeholderCustom", "nginx:alpine")
|
|
695
709
|
}),
|
|
696
|
-
|
|
710
|
+
B[`container_${t}_image`] && /* @__PURE__ */ T("p", {
|
|
697
711
|
className: "text-xs text-status-error-text mt-1",
|
|
698
|
-
children:
|
|
712
|
+
children: B[`container_${t}_image`]
|
|
699
713
|
})
|
|
700
714
|
] }),
|
|
701
|
-
/* @__PURE__ */
|
|
715
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
702
716
|
className: "text-xs font-semibold mb-2 text-text-secondary",
|
|
703
|
-
children:
|
|
704
|
-
}), /* @__PURE__ */
|
|
717
|
+
children: d(I, "sandbox.create.container.resources.title", "Per-Container Resources (optional)")
|
|
718
|
+
}), /* @__PURE__ */ E("div", {
|
|
705
719
|
className: "grid grid-cols-2 sm:grid-cols-4 gap-3",
|
|
706
720
|
children: [
|
|
707
|
-
/* @__PURE__ */
|
|
721
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
708
722
|
className: "block text-xs text-text-secondary mb-1",
|
|
709
|
-
children:
|
|
710
|
-
}), /* @__PURE__ */
|
|
711
|
-
"aria-label":
|
|
723
|
+
children: d(I, "sandbox.create.container.resources.cpuReq", "CPU Req")
|
|
724
|
+
}), /* @__PURE__ */ T("input", {
|
|
725
|
+
"aria-label": d(I, "sandbox.create.container.resources.cpuReq", "CPU Req"),
|
|
712
726
|
type: "text",
|
|
713
727
|
value: e.requestsCpu,
|
|
714
|
-
onChange: (e) =>
|
|
728
|
+
onChange: (e) => Z(t, "requestsCpu", e.target.value),
|
|
715
729
|
className: "w-full px-3 py-1.5 border rounded-lg bg-bg-surface text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
716
730
|
placeholder: "250m"
|
|
717
731
|
})] }),
|
|
718
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
719
733
|
className: "block text-xs text-text-secondary mb-1",
|
|
720
|
-
children:
|
|
721
|
-
}), /* @__PURE__ */
|
|
722
|
-
"aria-label":
|
|
734
|
+
children: d(I, "sandbox.create.container.resources.cpuLim", "CPU Lim")
|
|
735
|
+
}), /* @__PURE__ */ T("input", {
|
|
736
|
+
"aria-label": d(I, "sandbox.create.container.resources.cpuLim", "CPU Lim"),
|
|
723
737
|
type: "text",
|
|
724
738
|
value: e.limitsCpu,
|
|
725
|
-
onChange: (e) =>
|
|
739
|
+
onChange: (e) => Z(t, "limitsCpu", e.target.value),
|
|
726
740
|
className: "w-full px-3 py-1.5 border rounded-lg bg-bg-surface text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
727
741
|
placeholder: "1"
|
|
728
742
|
})] }),
|
|
729
|
-
/* @__PURE__ */
|
|
743
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
730
744
|
className: "block text-xs text-text-secondary mb-1",
|
|
731
|
-
children:
|
|
732
|
-
}), /* @__PURE__ */
|
|
733
|
-
"aria-label":
|
|
745
|
+
children: d(I, "sandbox.create.container.resources.memReq", "Mem Req")
|
|
746
|
+
}), /* @__PURE__ */ T("input", {
|
|
747
|
+
"aria-label": d(I, "sandbox.create.container.resources.memReq", "Mem Req"),
|
|
734
748
|
type: "text",
|
|
735
749
|
value: e.requestsMemory,
|
|
736
|
-
onChange: (e) =>
|
|
750
|
+
onChange: (e) => Z(t, "requestsMemory", e.target.value),
|
|
737
751
|
className: "w-full px-3 py-1.5 border rounded-lg bg-bg-surface text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
738
752
|
placeholder: "512Mi"
|
|
739
753
|
})] }),
|
|
740
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
741
755
|
className: "block text-xs text-text-secondary mb-1",
|
|
742
|
-
children:
|
|
743
|
-
}), /* @__PURE__ */
|
|
744
|
-
"aria-label":
|
|
756
|
+
children: d(I, "sandbox.create.container.resources.memLim", "Mem Lim")
|
|
757
|
+
}), /* @__PURE__ */ T("input", {
|
|
758
|
+
"aria-label": d(I, "sandbox.create.container.resources.memLim", "Mem Lim"),
|
|
745
759
|
type: "text",
|
|
746
760
|
value: e.limitsMemory,
|
|
747
|
-
onChange: (e) =>
|
|
761
|
+
onChange: (e) => Z(t, "limitsMemory", e.target.value),
|
|
748
762
|
className: "w-full px-3 py-1.5 border rounded-lg bg-bg-surface text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
749
763
|
placeholder: "2Gi"
|
|
750
764
|
})] })
|
|
751
765
|
]
|
|
752
766
|
})] }),
|
|
753
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("div", {
|
|
754
768
|
className: "flex items-center justify-between mb-2",
|
|
755
|
-
children: [/* @__PURE__ */
|
|
769
|
+
children: [/* @__PURE__ */ T("p", {
|
|
756
770
|
className: "text-xs font-semibold text-text-secondary",
|
|
757
|
-
children:
|
|
758
|
-
}), /* @__PURE__ */
|
|
771
|
+
children: d(I, "sandbox.create.container.ports.title", "Ports")
|
|
772
|
+
}), /* @__PURE__ */ T("button", {
|
|
759
773
|
type: "button",
|
|
760
|
-
onClick: () =>
|
|
774
|
+
onClick: () => ke(t),
|
|
761
775
|
className: "text-xs text-primary hover:underline",
|
|
762
|
-
children:
|
|
776
|
+
children: d(I, "sandbox.create.container.ports.add", "+ Add Port")
|
|
763
777
|
})]
|
|
764
|
-
}), e.ports.map((n, r) => /* @__PURE__ */
|
|
778
|
+
}), e.ports.map((n, r) => /* @__PURE__ */ E("div", {
|
|
765
779
|
className: "flex items-center gap-2 mb-2",
|
|
766
780
|
children: [
|
|
767
|
-
/* @__PURE__ */
|
|
768
|
-
"aria-label":
|
|
781
|
+
/* @__PURE__ */ T("input", {
|
|
782
|
+
"aria-label": d(I, "sandbox.create.container.ports.portNumber", "Port"),
|
|
769
783
|
type: "number",
|
|
770
784
|
value: n.containerPort,
|
|
771
785
|
onChange: (n) => {
|
|
@@ -773,13 +787,13 @@ function I() {
|
|
|
773
787
|
i[r] = {
|
|
774
788
|
...i[r],
|
|
775
789
|
containerPort: Number(n.target.value)
|
|
776
|
-
},
|
|
790
|
+
}, Z(t, "ports", i);
|
|
777
791
|
},
|
|
778
792
|
className: "w-24 px-3 py-1.5 border rounded-lg bg-bg-surface text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
779
793
|
placeholder: "8080"
|
|
780
794
|
}),
|
|
781
|
-
/* @__PURE__ */
|
|
782
|
-
"aria-label":
|
|
795
|
+
/* @__PURE__ */ T("input", {
|
|
796
|
+
"aria-label": d(I, "sandbox.create.container.ports.portName", "Port name"),
|
|
783
797
|
type: "text",
|
|
784
798
|
value: n.name,
|
|
785
799
|
onChange: (n) => {
|
|
@@ -787,35 +801,35 @@ function I() {
|
|
|
787
801
|
i[r] = {
|
|
788
802
|
...i[r],
|
|
789
803
|
name: n.target.value
|
|
790
|
-
},
|
|
804
|
+
}, Z(t, "ports", i);
|
|
791
805
|
},
|
|
792
806
|
className: "flex-1 px-3 py-1.5 border rounded-lg bg-bg-surface text-xs focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
793
|
-
placeholder:
|
|
807
|
+
placeholder: d(I, "sandbox.create.container.ports.namePlaceholder", "Port name (optional)")
|
|
794
808
|
}),
|
|
795
|
-
/* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ T("button", {
|
|
796
810
|
type: "button",
|
|
797
|
-
onClick: () =>
|
|
811
|
+
onClick: () => Ae(t, r),
|
|
798
812
|
className: "p-1.5 text-status-error-text hover:bg-status-error-bg/10 rounded",
|
|
799
|
-
children: /* @__PURE__ */
|
|
813
|
+
children: /* @__PURE__ */ T(C, { size: 12 })
|
|
800
814
|
})
|
|
801
815
|
]
|
|
802
816
|
}, n._rowId))] }),
|
|
803
|
-
/* @__PURE__ */
|
|
817
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("div", {
|
|
804
818
|
className: "flex items-center justify-between mb-2",
|
|
805
|
-
children: [/* @__PURE__ */
|
|
819
|
+
children: [/* @__PURE__ */ T("p", {
|
|
806
820
|
className: "text-xs font-semibold text-text-secondary",
|
|
807
|
-
children:
|
|
808
|
-
}), /* @__PURE__ */
|
|
821
|
+
children: d(I, "sandbox.create.container.envVars.title", "Environment Variables")
|
|
822
|
+
}), /* @__PURE__ */ T("button", {
|
|
809
823
|
type: "button",
|
|
810
|
-
onClick: () =>
|
|
824
|
+
onClick: () => je(t),
|
|
811
825
|
className: "text-xs text-primary hover:underline",
|
|
812
|
-
children:
|
|
826
|
+
children: d(I, "sandbox.create.container.envVars.add", "+ Add Variable")
|
|
813
827
|
})]
|
|
814
|
-
}), e.env.map((n, r) => /* @__PURE__ */
|
|
828
|
+
}), e.env.map((n, r) => /* @__PURE__ */ E("div", {
|
|
815
829
|
className: "flex items-center gap-2 mb-2",
|
|
816
830
|
children: [
|
|
817
|
-
/* @__PURE__ */
|
|
818
|
-
"aria-label":
|
|
831
|
+
/* @__PURE__ */ T("input", {
|
|
832
|
+
"aria-label": d(I, "sandbox.create.container.envVars.key", "Key"),
|
|
819
833
|
type: "text",
|
|
820
834
|
value: n.name,
|
|
821
835
|
onChange: (n) => {
|
|
@@ -823,13 +837,13 @@ function I() {
|
|
|
823
837
|
i[r] = {
|
|
824
838
|
...i[r],
|
|
825
839
|
name: n.target.value
|
|
826
|
-
},
|
|
840
|
+
}, Z(t, "env", i);
|
|
827
841
|
},
|
|
828
842
|
className: "w-1/3 px-3 py-1.5 border rounded-lg bg-bg-surface text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
829
|
-
placeholder:
|
|
843
|
+
placeholder: d(I, "sandbox.create.container.envVars.key", "KEY")
|
|
830
844
|
}),
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
"aria-label":
|
|
845
|
+
/* @__PURE__ */ T("input", {
|
|
846
|
+
"aria-label": d(I, "sandbox.create.container.envVars.value", "Value"),
|
|
833
847
|
type: "text",
|
|
834
848
|
value: n.value,
|
|
835
849
|
onChange: (n) => {
|
|
@@ -837,16 +851,16 @@ function I() {
|
|
|
837
851
|
i[r] = {
|
|
838
852
|
...i[r],
|
|
839
853
|
value: n.target.value
|
|
840
|
-
},
|
|
854
|
+
}, Z(t, "env", i);
|
|
841
855
|
},
|
|
842
856
|
className: "flex-1 px-3 py-1.5 border rounded-lg bg-bg-surface text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
843
|
-
placeholder:
|
|
857
|
+
placeholder: d(I, "sandbox.create.container.envVars.value", "value")
|
|
844
858
|
}),
|
|
845
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ T("button", {
|
|
846
860
|
type: "button",
|
|
847
|
-
onClick: () =>
|
|
861
|
+
onClick: () => Q(t, r),
|
|
848
862
|
className: "p-1.5 text-status-error-text hover:bg-status-error-bg/10 rounded",
|
|
849
|
-
children: /* @__PURE__ */
|
|
863
|
+
children: /* @__PURE__ */ T(C, { size: 12 })
|
|
850
864
|
})
|
|
851
865
|
]
|
|
852
866
|
}, `${e._rowId}-env-${r}-${n.name}`))] })
|
|
@@ -856,275 +870,275 @@ function I() {
|
|
|
856
870
|
]
|
|
857
871
|
})
|
|
858
872
|
}),
|
|
859
|
-
/* @__PURE__ */
|
|
873
|
+
/* @__PURE__ */ T(s, {
|
|
860
874
|
className: "border-border-seam",
|
|
861
|
-
children: /* @__PURE__ */
|
|
875
|
+
children: /* @__PURE__ */ E(c, {
|
|
862
876
|
className: "p-6 space-y-5",
|
|
863
877
|
children: [
|
|
864
|
-
/* @__PURE__ */
|
|
878
|
+
/* @__PURE__ */ E("h2", {
|
|
865
879
|
className: "text-lg font-bold flex items-center gap-2",
|
|
866
880
|
children: [
|
|
867
|
-
/* @__PURE__ */
|
|
881
|
+
/* @__PURE__ */ T(b, {
|
|
868
882
|
size: 18,
|
|
869
883
|
className: "text-primary"
|
|
870
884
|
}),
|
|
871
|
-
|
|
872
|
-
/* @__PURE__ */
|
|
885
|
+
d(I, "sandbox.create.sections.podResources.title", "Pod Resources"),
|
|
886
|
+
/* @__PURE__ */ T(q, { text: d(I, "sandbox.create.sections.podResources.help", "Resources allocated to the entire sandbox. CPU is in millicores (1000m = 1 CPU core). Memory in MiB or GiB.") })
|
|
873
887
|
]
|
|
874
888
|
}),
|
|
875
|
-
/* @__PURE__ */
|
|
876
|
-
title:
|
|
877
|
-
description:
|
|
878
|
-
children: /* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ T(be, {
|
|
890
|
+
title: d(I, "sandbox.create.sections.podResources.advancedTitle", "Advanced resource limits"),
|
|
891
|
+
description: d(I, "sandbox.create.sections.podResources.advancedDescription", "CPU and memory requests/limits. Defaults work for most sandboxes."),
|
|
892
|
+
children: /* @__PURE__ */ E("div", {
|
|
879
893
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
880
894
|
children: [
|
|
881
|
-
/* @__PURE__ */
|
|
882
|
-
/* @__PURE__ */
|
|
895
|
+
/* @__PURE__ */ E("div", { children: [
|
|
896
|
+
/* @__PURE__ */ E("label", {
|
|
883
897
|
htmlFor: "cpuRequest",
|
|
884
898
|
className: "text-sm font-semibold mb-2 flex items-center gap-2",
|
|
885
|
-
children: [/* @__PURE__ */
|
|
899
|
+
children: [/* @__PURE__ */ T(b, {
|
|
886
900
|
size: 14,
|
|
887
901
|
className: "text-status-info-text"
|
|
888
|
-
}),
|
|
902
|
+
}), d(I, "sandbox.create.fields.cpuRequest.label", "CPU Request")]
|
|
889
903
|
}),
|
|
890
|
-
/* @__PURE__ */
|
|
891
|
-
"aria-label":
|
|
904
|
+
/* @__PURE__ */ T("input", {
|
|
905
|
+
"aria-label": d(I, "sandbox.create.fields.cpuRequest.label", "CPU Request"),
|
|
892
906
|
type: "text",
|
|
893
907
|
id: "cpuRequest",
|
|
894
|
-
value:
|
|
895
|
-
onChange: (e) =>
|
|
896
|
-
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
908
|
+
value: R.cpuRequest,
|
|
909
|
+
onChange: (e) => X("cpuRequest", e.target.value),
|
|
910
|
+
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${B.cpuRequest ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
897
911
|
placeholder: "500m"
|
|
898
912
|
}),
|
|
899
|
-
|
|
913
|
+
B.cpuRequest && /* @__PURE__ */ T("p", {
|
|
900
914
|
className: "text-sm text-status-error-text mt-1",
|
|
901
|
-
children:
|
|
915
|
+
children: B.cpuRequest
|
|
902
916
|
})
|
|
903
917
|
] }),
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ E("div", { children: [
|
|
919
|
+
/* @__PURE__ */ E("label", {
|
|
906
920
|
htmlFor: "cpuLimit",
|
|
907
921
|
className: "text-sm font-semibold mb-2 flex items-center gap-2",
|
|
908
|
-
children: [/* @__PURE__ */
|
|
922
|
+
children: [/* @__PURE__ */ T(b, {
|
|
909
923
|
size: 14,
|
|
910
924
|
className: "text-status-info-text"
|
|
911
|
-
}),
|
|
925
|
+
}), d(I, "sandbox.create.fields.cpuLimit.label", "CPU Limit")]
|
|
912
926
|
}),
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
"aria-label":
|
|
927
|
+
/* @__PURE__ */ T("input", {
|
|
928
|
+
"aria-label": d(I, "sandbox.create.fields.cpuLimit.label", "CPU Limit"),
|
|
915
929
|
type: "text",
|
|
916
930
|
id: "cpuLimit",
|
|
917
|
-
value:
|
|
918
|
-
onChange: (e) =>
|
|
919
|
-
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
931
|
+
value: R.cpuLimit,
|
|
932
|
+
onChange: (e) => X("cpuLimit", e.target.value),
|
|
933
|
+
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${B.cpuLimit ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
920
934
|
placeholder: "2"
|
|
921
935
|
}),
|
|
922
|
-
|
|
936
|
+
B.cpuLimit && /* @__PURE__ */ T("p", {
|
|
923
937
|
className: "text-sm text-status-error-text mt-1",
|
|
924
|
-
children:
|
|
938
|
+
children: B.cpuLimit
|
|
925
939
|
})
|
|
926
940
|
] }),
|
|
927
|
-
/* @__PURE__ */
|
|
928
|
-
/* @__PURE__ */
|
|
941
|
+
/* @__PURE__ */ E("div", { children: [
|
|
942
|
+
/* @__PURE__ */ E("label", {
|
|
929
943
|
htmlFor: "memoryRequest",
|
|
930
944
|
className: "text-sm font-semibold mb-2 flex items-center gap-2",
|
|
931
|
-
children: [/* @__PURE__ */
|
|
945
|
+
children: [/* @__PURE__ */ T(x, {
|
|
932
946
|
size: 14,
|
|
933
947
|
className: "text-accent-purple-subtle"
|
|
934
|
-
}),
|
|
948
|
+
}), d(I, "sandbox.create.fields.memoryRequest.label", "Memory Request")]
|
|
935
949
|
}),
|
|
936
|
-
/* @__PURE__ */
|
|
937
|
-
"aria-label":
|
|
950
|
+
/* @__PURE__ */ T("input", {
|
|
951
|
+
"aria-label": d(I, "sandbox.create.fields.memoryRequest.label", "Memory Request"),
|
|
938
952
|
type: "text",
|
|
939
953
|
id: "memoryRequest",
|
|
940
|
-
value:
|
|
941
|
-
onChange: (e) =>
|
|
942
|
-
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
954
|
+
value: R.memoryRequest,
|
|
955
|
+
onChange: (e) => X("memoryRequest", e.target.value),
|
|
956
|
+
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${B.memoryRequest ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
943
957
|
placeholder: "1Gi"
|
|
944
958
|
}),
|
|
945
|
-
|
|
959
|
+
B.memoryRequest && /* @__PURE__ */ T("p", {
|
|
946
960
|
className: "text-sm text-status-error-text mt-1",
|
|
947
|
-
children:
|
|
961
|
+
children: B.memoryRequest
|
|
948
962
|
})
|
|
949
963
|
] }),
|
|
950
|
-
/* @__PURE__ */
|
|
951
|
-
/* @__PURE__ */
|
|
964
|
+
/* @__PURE__ */ E("div", { children: [
|
|
965
|
+
/* @__PURE__ */ E("label", {
|
|
952
966
|
htmlFor: "memoryLimit",
|
|
953
967
|
className: "text-sm font-semibold mb-2 flex items-center gap-2",
|
|
954
|
-
children: [/* @__PURE__ */
|
|
968
|
+
children: [/* @__PURE__ */ T(x, {
|
|
955
969
|
size: 14,
|
|
956
970
|
className: "text-accent-purple-subtle"
|
|
957
|
-
}),
|
|
971
|
+
}), d(I, "sandbox.create.fields.memoryLimit.label", "Memory Limit")]
|
|
958
972
|
}),
|
|
959
|
-
/* @__PURE__ */
|
|
960
|
-
"aria-label":
|
|
973
|
+
/* @__PURE__ */ T("input", {
|
|
974
|
+
"aria-label": d(I, "sandbox.create.fields.memoryLimit.label", "Memory Limit"),
|
|
961
975
|
type: "text",
|
|
962
976
|
id: "memoryLimit",
|
|
963
|
-
value:
|
|
964
|
-
onChange: (e) =>
|
|
965
|
-
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
977
|
+
value: R.memoryLimit,
|
|
978
|
+
onChange: (e) => X("memoryLimit", e.target.value),
|
|
979
|
+
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${B.memoryLimit ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
966
980
|
placeholder: "4Gi"
|
|
967
981
|
}),
|
|
968
|
-
|
|
982
|
+
B.memoryLimit && /* @__PURE__ */ T("p", {
|
|
969
983
|
className: "text-sm text-status-error-text mt-1",
|
|
970
|
-
children:
|
|
984
|
+
children: B.memoryLimit
|
|
971
985
|
})
|
|
972
986
|
] })
|
|
973
987
|
]
|
|
974
988
|
})
|
|
975
989
|
}),
|
|
976
|
-
/* @__PURE__ */
|
|
977
|
-
/* @__PURE__ */
|
|
990
|
+
/* @__PURE__ */ E("div", { children: [
|
|
991
|
+
/* @__PURE__ */ E("label", {
|
|
978
992
|
htmlFor: "ttlSeconds",
|
|
979
993
|
className: "text-sm font-semibold mb-2 flex items-center gap-2",
|
|
980
994
|
children: [
|
|
981
|
-
/* @__PURE__ */
|
|
995
|
+
/* @__PURE__ */ T(_e, {
|
|
982
996
|
size: 14,
|
|
983
997
|
className: "text-status-info-text"
|
|
984
998
|
}),
|
|
985
|
-
|
|
986
|
-
/* @__PURE__ */
|
|
987
|
-
/* @__PURE__ */
|
|
999
|
+
d(I, "sandbox.create.fields.ttl.label", "Time to Live"),
|
|
1000
|
+
/* @__PURE__ */ T(q, { text: d(I, "sandbox.create.fields.ttl.help", "Your sandbox will be automatically destroyed after this duration to save resources. You can extend it while it's running.") }),
|
|
1001
|
+
/* @__PURE__ */ T(a, {
|
|
988
1002
|
variant: "outline",
|
|
989
1003
|
className: "text-xs ml-auto",
|
|
990
|
-
children: $(
|
|
1004
|
+
children: $(R.ttlSeconds)
|
|
991
1005
|
})
|
|
992
1006
|
]
|
|
993
1007
|
}),
|
|
994
|
-
/* @__PURE__ */
|
|
995
|
-
"aria-label":
|
|
1008
|
+
/* @__PURE__ */ T("input", {
|
|
1009
|
+
"aria-label": d(I, "sandbox.create.fields.ttl.label", "Time to Live"),
|
|
996
1010
|
type: "range",
|
|
997
1011
|
id: "ttlSeconds",
|
|
998
1012
|
min: 600,
|
|
999
1013
|
max: 86400,
|
|
1000
1014
|
step: 600,
|
|
1001
|
-
value:
|
|
1002
|
-
onChange: (e) =>
|
|
1015
|
+
value: R.ttlSeconds,
|
|
1016
|
+
onChange: (e) => X("ttlSeconds", Number(e.target.value)),
|
|
1003
1017
|
className: "w-full mt-2 accent-primary"
|
|
1004
1018
|
}),
|
|
1005
|
-
/* @__PURE__ */
|
|
1019
|
+
/* @__PURE__ */ E("div", {
|
|
1006
1020
|
className: "flex justify-between text-xs text-text-secondary mt-1",
|
|
1007
1021
|
children: [
|
|
1008
|
-
/* @__PURE__ */
|
|
1009
|
-
/* @__PURE__ */
|
|
1010
|
-
/* @__PURE__ */
|
|
1011
|
-
/* @__PURE__ */
|
|
1022
|
+
/* @__PURE__ */ T("span", { children: "10m" }),
|
|
1023
|
+
/* @__PURE__ */ T("span", { children: "4h" }),
|
|
1024
|
+
/* @__PURE__ */ T("span", { children: "12h" }),
|
|
1025
|
+
/* @__PURE__ */ T("span", { children: "24h" })
|
|
1012
1026
|
]
|
|
1013
1027
|
}),
|
|
1014
|
-
|
|
1028
|
+
B.ttlSeconds && /* @__PURE__ */ T("p", {
|
|
1015
1029
|
className: "text-sm text-status-error-text mt-1",
|
|
1016
|
-
children:
|
|
1030
|
+
children: B.ttlSeconds
|
|
1017
1031
|
})
|
|
1018
1032
|
] }),
|
|
1019
|
-
/* @__PURE__ */
|
|
1033
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("label", {
|
|
1020
1034
|
className: "text-sm font-semibold mb-2 flex items-center gap-2",
|
|
1021
|
-
children: [
|
|
1022
|
-
}), /* @__PURE__ */
|
|
1023
|
-
value:
|
|
1024
|
-
onChange:
|
|
1035
|
+
children: [d(I, "sandbox.create.fields.tags.label", "Tags"), /* @__PURE__ */ T(q, { text: d(I, "sandbox.create.fields.tags.help", "Free-form labels. Use them to filter the sandbox list. Max 32 tags, 64 chars each.") })]
|
|
1036
|
+
}), /* @__PURE__ */ T(ie, {
|
|
1037
|
+
value: L,
|
|
1038
|
+
onChange: Se
|
|
1025
1039
|
})] })
|
|
1026
1040
|
]
|
|
1027
1041
|
})
|
|
1028
1042
|
}),
|
|
1029
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ T(s, {
|
|
1030
1044
|
className: "border-border-seam",
|
|
1031
|
-
children: /* @__PURE__ */
|
|
1045
|
+
children: /* @__PURE__ */ E(c, {
|
|
1032
1046
|
className: "p-6 space-y-5",
|
|
1033
1047
|
children: [
|
|
1034
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ E("h2", {
|
|
1035
1049
|
className: "text-lg font-bold flex items-center gap-2",
|
|
1036
1050
|
children: [
|
|
1037
|
-
/* @__PURE__ */
|
|
1051
|
+
/* @__PURE__ */ T(de, {
|
|
1038
1052
|
size: 18,
|
|
1039
1053
|
className: "text-primary"
|
|
1040
1054
|
}),
|
|
1041
|
-
|
|
1042
|
-
/* @__PURE__ */
|
|
1055
|
+
d(I, "sandbox.create.sections.storage.title", "Storage"),
|
|
1056
|
+
/* @__PURE__ */ T(q, { text: d(I, "sandbox.create.sections.storage.help", "Ephemeral storage is fast but lost when the sandbox stops. Persistent storage survives restarts.") })
|
|
1043
1057
|
]
|
|
1044
1058
|
}),
|
|
1045
|
-
/* @__PURE__ */
|
|
1059
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
1046
1060
|
className: "block text-sm font-semibold mb-3",
|
|
1047
|
-
children:
|
|
1048
|
-
}), /* @__PURE__ */
|
|
1061
|
+
children: d(I, "sandbox.create.fields.storageMode.label", "Mode")
|
|
1062
|
+
}), /* @__PURE__ */ T("div", {
|
|
1049
1063
|
className: "grid grid-cols-3 gap-3",
|
|
1050
1064
|
children: [
|
|
1051
1065
|
"NONE",
|
|
1052
1066
|
"EPHEMERAL",
|
|
1053
1067
|
"PERSISTENT"
|
|
1054
1068
|
].map((e) => {
|
|
1055
|
-
let t =
|
|
1056
|
-
NONE:
|
|
1057
|
-
EPHEMERAL:
|
|
1058
|
-
PERSISTENT:
|
|
1069
|
+
let t = R.storageMode === e, n = {
|
|
1070
|
+
NONE: d(I, "sandbox.create.fields.storageMode.none.label", "None"),
|
|
1071
|
+
EPHEMERAL: d(I, "sandbox.create.fields.storageMode.ephemeral.label", "Ephemeral"),
|
|
1072
|
+
PERSISTENT: d(I, "sandbox.create.fields.storageMode.persistent.label", "Persistent")
|
|
1059
1073
|
}, r = {
|
|
1060
|
-
NONE:
|
|
1061
|
-
EPHEMERAL:
|
|
1062
|
-
PERSISTENT:
|
|
1074
|
+
NONE: d(I, "sandbox.create.fields.storageMode.none.description", "No persistent storage"),
|
|
1075
|
+
EPHEMERAL: d(I, "sandbox.create.fields.storageMode.ephemeral.description", "Lost when sandbox stops"),
|
|
1076
|
+
PERSISTENT: d(I, "sandbox.create.fields.storageMode.persistent.description", "Retained across restarts")
|
|
1063
1077
|
};
|
|
1064
|
-
return /* @__PURE__ */
|
|
1078
|
+
return /* @__PURE__ */ E("button", {
|
|
1065
1079
|
type: "button",
|
|
1066
|
-
onClick: () =>
|
|
1080
|
+
onClick: () => X("storageMode", e),
|
|
1067
1081
|
className: `p-3 rounded-lg border-2 text-left transition-all duration-200 ${t ? "border-primary bg-action-primary-bg/5 shadow-sm" : "border-border-subtle hover:border-primary/50 hover:bg-bg-sunken/50"}`,
|
|
1068
|
-
children: [/* @__PURE__ */
|
|
1082
|
+
children: [/* @__PURE__ */ T("p", {
|
|
1069
1083
|
className: "font-medium text-sm",
|
|
1070
1084
|
children: n[e]
|
|
1071
|
-
}), /* @__PURE__ */
|
|
1085
|
+
}), /* @__PURE__ */ T("p", {
|
|
1072
1086
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1073
1087
|
children: r[e]
|
|
1074
1088
|
})]
|
|
1075
1089
|
}, e);
|
|
1076
1090
|
})
|
|
1077
1091
|
})] }),
|
|
1078
|
-
|
|
1092
|
+
R.storageMode !== "NONE" && /* @__PURE__ */ E("div", {
|
|
1079
1093
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
1080
1094
|
children: [
|
|
1081
|
-
/* @__PURE__ */
|
|
1095
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
1082
1096
|
htmlFor: "storageSizeGi",
|
|
1083
1097
|
className: "block text-sm font-semibold mb-2",
|
|
1084
|
-
children:
|
|
1085
|
-
}), /* @__PURE__ */
|
|
1086
|
-
"aria-label":
|
|
1098
|
+
children: d(I, "sandbox.create.fields.storageSizeGi.label", "Size (GiB)")
|
|
1099
|
+
}), /* @__PURE__ */ T("input", {
|
|
1100
|
+
"aria-label": d(I, "sandbox.create.fields.storageSizeGi.label", "Size (GiB)"),
|
|
1087
1101
|
type: "number",
|
|
1088
1102
|
id: "storageSizeGi",
|
|
1089
|
-
value:
|
|
1090
|
-
onChange: (e) =>
|
|
1103
|
+
value: R.storageSizeGi,
|
|
1104
|
+
onChange: (e) => X("storageSizeGi", Number(e.target.value)),
|
|
1091
1105
|
min: 1,
|
|
1092
1106
|
max: 200,
|
|
1093
1107
|
className: "w-full px-4 py-2.5 border-2 border-border-subtle rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all"
|
|
1094
1108
|
})] }),
|
|
1095
|
-
/* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
1096
1110
|
htmlFor: "storageMountPath",
|
|
1097
1111
|
className: "block text-sm font-semibold mb-2",
|
|
1098
|
-
children:
|
|
1099
|
-
}), /* @__PURE__ */
|
|
1100
|
-
"aria-label":
|
|
1112
|
+
children: d(I, "sandbox.create.fields.storageMountPath.label", "Mount Path")
|
|
1113
|
+
}), /* @__PURE__ */ T("input", {
|
|
1114
|
+
"aria-label": d(I, "sandbox.create.fields.storageMountPath.label", "Mount Path"),
|
|
1101
1115
|
type: "text",
|
|
1102
1116
|
id: "storageMountPath",
|
|
1103
|
-
value:
|
|
1104
|
-
onChange: (e) =>
|
|
1117
|
+
value: R.storageMountPath,
|
|
1118
|
+
onChange: (e) => X("storageMountPath", e.target.value),
|
|
1105
1119
|
className: "w-full px-4 py-2.5 border-2 border-border-subtle rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all",
|
|
1106
1120
|
placeholder: "/data"
|
|
1107
1121
|
})] }),
|
|
1108
|
-
|
|
1122
|
+
R.storageMode === "PERSISTENT" && /* @__PURE__ */ E("div", {
|
|
1109
1123
|
className: "flex items-center gap-3 sm:col-span-2",
|
|
1110
|
-
children: [/* @__PURE__ */
|
|
1111
|
-
"aria-label":
|
|
1124
|
+
children: [/* @__PURE__ */ T("input", {
|
|
1125
|
+
"aria-label": d(I, "sandbox.create.fields.storageRetainOnDelete.label", "Retain volume data when sandbox is deleted"),
|
|
1112
1126
|
type: "checkbox",
|
|
1113
1127
|
id: "storageRetainOnDelete",
|
|
1114
|
-
checked:
|
|
1115
|
-
onChange: (e) =>
|
|
1128
|
+
checked: R.storageRetainOnDelete,
|
|
1129
|
+
onChange: (e) => X("storageRetainOnDelete", e.target.checked),
|
|
1116
1130
|
className: "size-4 rounded border-border-subtle text-primary focus:ring-primary/20"
|
|
1117
|
-
}), /* @__PURE__ */
|
|
1131
|
+
}), /* @__PURE__ */ T("label", {
|
|
1118
1132
|
htmlFor: "storageRetainOnDelete",
|
|
1119
1133
|
className: "text-sm font-medium",
|
|
1120
|
-
children:
|
|
1134
|
+
children: d(I, "sandbox.create.fields.storageRetainOnDelete.label", "Retain volume data when sandbox is deleted")
|
|
1121
1135
|
})]
|
|
1122
1136
|
}),
|
|
1123
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ T("div", {
|
|
1124
1138
|
className: "sm:col-span-2",
|
|
1125
|
-
children: /* @__PURE__ */
|
|
1126
|
-
value:
|
|
1127
|
-
onChange: (e) =>
|
|
1139
|
+
children: /* @__PURE__ */ T(ae, {
|
|
1140
|
+
value: R.filesFolderId,
|
|
1141
|
+
onChange: (e) => X("filesFolderId", e)
|
|
1128
1142
|
})
|
|
1129
1143
|
})
|
|
1130
1144
|
]
|
|
@@ -1132,81 +1146,88 @@ function I() {
|
|
|
1132
1146
|
]
|
|
1133
1147
|
})
|
|
1134
1148
|
}),
|
|
1135
|
-
|
|
1149
|
+
R.template === "MISC_SHELL" && /* @__PURE__ */ T(s, {
|
|
1136
1150
|
className: "border-border-seam",
|
|
1137
|
-
children: /* @__PURE__ */
|
|
1151
|
+
children: /* @__PURE__ */ T(c, {
|
|
1138
1152
|
className: "p-5",
|
|
1139
|
-
children: /* @__PURE__ */
|
|
1153
|
+
children: /* @__PURE__ */ E("details", { children: [/* @__PURE__ */ E("summary", {
|
|
1140
1154
|
className: "cursor-pointer text-sm font-semibold text-text-secondary flex items-center gap-2",
|
|
1141
1155
|
children: [
|
|
1142
|
-
/* @__PURE__ */
|
|
1143
|
-
|
|
1144
|
-
/* @__PURE__ */
|
|
1156
|
+
/* @__PURE__ */ T(S, { size: 14 }),
|
|
1157
|
+
d(I, "sandbox.create.sections.advancedSettings.title", "Advanced Settings"),
|
|
1158
|
+
/* @__PURE__ */ T(q, { text: d(I, "sandbox.create.sections.advancedSettings.help", "Override the gateway URLs the sandbox agent uses for authentication and API calls. Useful when exposing local gateways via tunnel for development.") })
|
|
1145
1159
|
]
|
|
1146
|
-
}), /* @__PURE__ */
|
|
1160
|
+
}), /* @__PURE__ */ E("div", {
|
|
1147
1161
|
className: "mt-4 space-y-4",
|
|
1148
|
-
children: [/* @__PURE__ */
|
|
1149
|
-
/* @__PURE__ */
|
|
1162
|
+
children: [/* @__PURE__ */ E("div", { children: [
|
|
1163
|
+
/* @__PURE__ */ T("label", {
|
|
1150
1164
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
1151
|
-
children:
|
|
1165
|
+
children: d(I, "sandbox.create.fields.globalGatewayUrl.label", "Global Gateway URL")
|
|
1152
1166
|
}),
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
-
"aria-label":
|
|
1167
|
+
/* @__PURE__ */ T("input", {
|
|
1168
|
+
"aria-label": d(I, "sandbox.create.fields.globalGatewayUrl.label", "Global Gateway URL"),
|
|
1155
1169
|
type: "text",
|
|
1156
|
-
value:
|
|
1157
|
-
onChange: (e) =>
|
|
1158
|
-
placeholder:
|
|
1170
|
+
value: R.globalGatewayUrl,
|
|
1171
|
+
onChange: (e) => X("globalGatewayUrl", e.target.value),
|
|
1172
|
+
placeholder: N,
|
|
1159
1173
|
className: "w-full rounded-lg border border-border-subtle px-3 py-2 text-sm font-mono bg-bg-surface focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"
|
|
1160
1174
|
}),
|
|
1161
|
-
/* @__PURE__ */
|
|
1175
|
+
/* @__PURE__ */ T("p", {
|
|
1162
1176
|
className: "text-xs text-text-secondary mt-1",
|
|
1163
|
-
children:
|
|
1177
|
+
children: d(I, "sandbox.create.fields.globalGatewayUrl.hint", "The agent authenticates via this URL. Override with a tunnel URL to reach local gateways.")
|
|
1164
1178
|
})
|
|
1165
|
-
] }), /* @__PURE__ */
|
|
1166
|
-
/* @__PURE__ */
|
|
1179
|
+
] }), /* @__PURE__ */ E("div", { children: [
|
|
1180
|
+
/* @__PURE__ */ T("label", {
|
|
1167
1181
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
1168
|
-
children:
|
|
1182
|
+
children: d(I, "sandbox.create.fields.workspaceGatewayUrl.label", "Workspace Gateway URL")
|
|
1169
1183
|
}),
|
|
1170
|
-
/* @__PURE__ */
|
|
1171
|
-
"aria-label":
|
|
1184
|
+
/* @__PURE__ */ T("input", {
|
|
1185
|
+
"aria-label": d(I, "sandbox.create.fields.workspaceGatewayUrl.label", "Workspace Gateway URL"),
|
|
1172
1186
|
type: "text",
|
|
1173
|
-
value:
|
|
1174
|
-
onChange: (e) =>
|
|
1175
|
-
placeholder:
|
|
1187
|
+
value: R.workspaceGatewayUrl,
|
|
1188
|
+
onChange: (e) => X("workspaceGatewayUrl", e.target.value),
|
|
1189
|
+
placeholder: P,
|
|
1176
1190
|
className: "w-full rounded-lg border border-border-subtle px-3 py-2 text-sm font-mono bg-bg-surface focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"
|
|
1177
1191
|
}),
|
|
1178
|
-
/* @__PURE__ */
|
|
1192
|
+
/* @__PURE__ */ T("p", {
|
|
1179
1193
|
className: "text-xs text-text-secondary mt-1",
|
|
1180
|
-
children:
|
|
1194
|
+
children: d(I, "sandbox.create.fields.workspaceGatewayUrl.hint", "The agent reports to this URL. Override with a tunnel URL to reach local gateways.")
|
|
1181
1195
|
})
|
|
1182
1196
|
] })]
|
|
1183
1197
|
})] })
|
|
1184
1198
|
})
|
|
1185
1199
|
}),
|
|
1186
|
-
/* @__PURE__ */
|
|
1200
|
+
/* @__PURE__ */ E("div", {
|
|
1187
1201
|
className: "flex flex-col sm:flex-row gap-3 pt-2",
|
|
1188
|
-
children: [/* @__PURE__ */
|
|
1202
|
+
children: [/* @__PURE__ */ E(o, {
|
|
1189
1203
|
type: "submit",
|
|
1190
|
-
disabled:
|
|
1204
|
+
disabled: W,
|
|
1191
1205
|
size: "lg",
|
|
1192
|
-
children: [
|
|
1206
|
+
children: [W ? /* @__PURE__ */ T(me, {
|
|
1193
1207
|
size: 18,
|
|
1194
1208
|
className: "animate-spin"
|
|
1195
|
-
}) : /* @__PURE__ */
|
|
1196
|
-
}), /* @__PURE__ */
|
|
1209
|
+
}) : /* @__PURE__ */ T(ge, { size: 18 }), d(I, "sandbox.create.actions.submit", "Create Sandbox")]
|
|
1210
|
+
}), /* @__PURE__ */ T(o, {
|
|
1197
1211
|
type: "button",
|
|
1198
1212
|
variant: "outline",
|
|
1199
|
-
onClick: () =>
|
|
1200
|
-
disabled:
|
|
1201
|
-
children:
|
|
1213
|
+
onClick: () => D?.(f),
|
|
1214
|
+
disabled: W,
|
|
1215
|
+
children: d(I, "sandbox.create.actions.cancel", "Cancel")
|
|
1202
1216
|
})]
|
|
1203
1217
|
})
|
|
1204
1218
|
]
|
|
1219
|
+
}),
|
|
1220
|
+
/* @__PURE__ */ T(e, {
|
|
1221
|
+
open: Ce,
|
|
1222
|
+
onOpenChange: K,
|
|
1223
|
+
children: /* @__PURE__ */ E(r, { children: [/* @__PURE__ */ E(te, { children: [/* @__PURE__ */ T(ne, { children: d(I, "sandbox.create.quota.title", "Sandbox limit reached") }), /* @__PURE__ */ T(i, { children: d(I, "sandbox.create.quota.description", "You have reached your concurrent sandbox limit. Stop an existing sandbox or upgrade your plan to continue.") })] }), /* @__PURE__ */ E(ee, { children: [/* @__PURE__ */ T(n, { children: d(I, "sandbox.create.quota.dismiss", "Dismiss") }), /* @__PURE__ */ T(t, {
|
|
1224
|
+
onClick: () => D?.("/billing"),
|
|
1225
|
+
children: d(I, "sandbox.create.quota.billing", "View Billing")
|
|
1226
|
+
})] })] })
|
|
1205
1227
|
})
|
|
1206
1228
|
]
|
|
1207
1229
|
});
|
|
1208
1230
|
}
|
|
1209
|
-
|
|
1210
|
-
export { I as SandboxCreatePage };
|
|
1231
|
+
export { F as SandboxCreatePage };
|
|
1211
1232
|
|
|
1212
1233
|
//# sourceMappingURL=SandboxCreatePage.js.map
|