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