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