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