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