@burdenoff/microfe-sandbox 2026.519.2 → 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 +398 -388
- package/dist/sandbox/pages/SandboxCreatePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,20 +3,21 @@ import { Badge as t, Button as n, Card as r, CardContent as i } from "../compone
|
|
|
3
3
|
import { tWithFallback as a } from "../utils/i18n.js";
|
|
4
4
|
import { useSandboxEvents as o } from "../utils/sandboxEvents.js";
|
|
5
5
|
import { PageLayout as s } from "../components/PageLayout.js";
|
|
6
|
-
import { useCreateSandboxMutation as
|
|
7
|
-
import { TagsInput as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
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",
|
|
@@ -24,7 +25,7 @@ var D = [{
|
|
|
24
25
|
descriptionKey: "sandbox.create.templateType.customSandbox.description",
|
|
25
26
|
descriptionFallback: "Configure your own container image and resources",
|
|
26
27
|
icon: x
|
|
27
|
-
}],
|
|
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,167 +235,168 @@ function P() {
|
|
|
233
235
|
limitsMemory: e.limitsMemory || void 0
|
|
234
236
|
} : void 0
|
|
235
237
|
};
|
|
236
|
-
}), t = await
|
|
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
264
|
} } });
|
|
262
265
|
if (t.error) {
|
|
263
|
-
X("error", a(
|
|
266
|
+
X("error", a(L, "sandbox.create.notifications.createFailed", "Failed to create sandbox") + `: ${t.error.message}`);
|
|
264
267
|
return;
|
|
265
268
|
}
|
|
266
269
|
let n = t.data?.createSandbox;
|
|
267
270
|
if (!n) {
|
|
268
|
-
X("error", a(
|
|
271
|
+
X("error", a(L, "sandbox.create.notifications.createFailed", "Failed to create sandbox"));
|
|
269
272
|
return;
|
|
270
273
|
}
|
|
271
|
-
|
|
274
|
+
I.sandboxCreated({
|
|
272
275
|
sandboxId: n.id,
|
|
273
276
|
kind: n.kind?.toLowerCase?.() === "internal" ? "internal" : "user",
|
|
274
277
|
source: n.source ?? "manual"
|
|
275
|
-
}), X("success", a(
|
|
276
|
-
let r = `${
|
|
277
|
-
setTimeout(() =>
|
|
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);
|
|
278
281
|
} catch {
|
|
279
|
-
X("error", a(
|
|
282
|
+
X("error", a(L, "sandbox.create.notifications.createFailed", "Failed to create sandbox"));
|
|
280
283
|
} finally {
|
|
281
|
-
|
|
284
|
+
q(!1);
|
|
282
285
|
}
|
|
283
286
|
}, $ = (e) => {
|
|
284
287
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60);
|
|
285
288
|
return t > 0 && n > 0 ? `${t}h ${n}m` : t > 0 ? `${t}h` : `${n}m`;
|
|
286
289
|
};
|
|
287
|
-
return /* @__PURE__ */
|
|
290
|
+
return /* @__PURE__ */ D(s, {
|
|
288
291
|
showHeader: !1,
|
|
289
292
|
children: [
|
|
290
|
-
|
|
291
|
-
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"}`,
|
|
292
295
|
children: [
|
|
293
|
-
|
|
294
|
-
/* @__PURE__ */
|
|
296
|
+
W.type === "success" ? /* @__PURE__ */ E(te, { size: 20 }) : /* @__PURE__ */ E(f, { size: 20 }),
|
|
297
|
+
/* @__PURE__ */ E("span", {
|
|
295
298
|
className: "font-medium",
|
|
296
|
-
children:
|
|
299
|
+
children: W.message
|
|
297
300
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
onClick: () =>
|
|
301
|
+
/* @__PURE__ */ E("button", {
|
|
302
|
+
onClick: () => G(null),
|
|
300
303
|
className: "ml-2 p-1 rounded-md hover:bg-accent",
|
|
301
|
-
children: /* @__PURE__ */
|
|
304
|
+
children: /* @__PURE__ */ E(w, { size: 16 })
|
|
302
305
|
})
|
|
303
306
|
]
|
|
304
307
|
}),
|
|
305
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ D("div", {
|
|
306
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",
|
|
307
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ D("div", {
|
|
308
311
|
className: "relative z-10 flex items-center gap-4",
|
|
309
|
-
children: [/* @__PURE__ */
|
|
310
|
-
onClick: () =>
|
|
312
|
+
children: [/* @__PURE__ */ E("button", {
|
|
313
|
+
onClick: () => j?.(v),
|
|
311
314
|
className: "p-2.5 hover:bg-accent rounded-lg transition-all duration-200 hover:scale-110",
|
|
312
|
-
"aria-label": a(
|
|
313
|
-
children: /* @__PURE__ */
|
|
314
|
-
}), /* @__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", {
|
|
315
318
|
className: "flex items-center gap-3",
|
|
316
|
-
children: [/* @__PURE__ */
|
|
319
|
+
children: [/* @__PURE__ */ E("div", {
|
|
317
320
|
className: "p-2.5 rounded-lg bg-primary/10 backdrop-blur-sm",
|
|
318
|
-
children: /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ E(m, {
|
|
319
322
|
size: 24,
|
|
320
323
|
className: "text-primary"
|
|
321
324
|
})
|
|
322
|
-
}), /* @__PURE__ */
|
|
325
|
+
}), /* @__PURE__ */ E("h1", {
|
|
323
326
|
className: "text-2xl sm:text-3xl font-bold",
|
|
324
|
-
children: a(
|
|
327
|
+
children: a(L, "sandbox.create.header.title", "Create Sandbox")
|
|
325
328
|
})]
|
|
326
329
|
})]
|
|
327
|
-
}), /* @__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" })]
|
|
328
331
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
330
|
-
onSubmit:
|
|
332
|
+
/* @__PURE__ */ D("form", {
|
|
333
|
+
onSubmit: me,
|
|
331
334
|
className: "space-y-6",
|
|
332
335
|
children: [
|
|
333
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ E(r, { children: /* @__PURE__ */ D(i, {
|
|
334
337
|
className: "p-6 space-y-5",
|
|
335
338
|
children: [
|
|
336
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ D("h2", {
|
|
337
340
|
className: "text-lg font-bold flex items-center gap-2",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
341
|
+
children: [/* @__PURE__ */ E(ne, {
|
|
339
342
|
size: 18,
|
|
340
343
|
className: "text-primary"
|
|
341
|
-
}), a(
|
|
344
|
+
}), a(L, "sandbox.create.sections.basicInfo.title", "Basic Information")]
|
|
342
345
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ D("div", { children: [
|
|
347
|
+
/* @__PURE__ */ D("label", {
|
|
345
348
|
htmlFor: "name",
|
|
346
349
|
className: "block text-sm font-semibold mb-2",
|
|
347
350
|
children: [
|
|
348
|
-
a(
|
|
351
|
+
a(L, "sandbox.create.fields.name.label", "Name"),
|
|
349
352
|
" ",
|
|
350
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ E("span", {
|
|
351
354
|
className: "text-destructive",
|
|
352
355
|
children: "*"
|
|
353
356
|
})
|
|
354
357
|
]
|
|
355
358
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ E("input", {
|
|
357
360
|
type: "text",
|
|
358
361
|
id: "name",
|
|
359
|
-
value:
|
|
362
|
+
value: B.name,
|
|
360
363
|
onChange: (e) => Z("name", e.target.value),
|
|
361
|
-
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 ${
|
|
362
|
-
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")
|
|
363
366
|
}),
|
|
364
|
-
|
|
367
|
+
H.name && /* @__PURE__ */ D("p", {
|
|
365
368
|
className: "text-sm text-destructive mt-1 flex items-center gap-1",
|
|
366
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ E(f, { size: 14 }), H.name]
|
|
367
370
|
})
|
|
368
371
|
] }),
|
|
369
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
|
|
370
373
|
htmlFor: "description",
|
|
371
374
|
className: "block text-sm font-semibold mb-2",
|
|
372
|
-
children: a(
|
|
373
|
-
}), /* @__PURE__ */
|
|
375
|
+
children: a(L, "sandbox.create.fields.description.label", "Description")
|
|
376
|
+
}), /* @__PURE__ */ E("textarea", {
|
|
374
377
|
id: "description",
|
|
375
|
-
value:
|
|
378
|
+
value: B.description,
|
|
376
379
|
onChange: (e) => Z("description", e.target.value),
|
|
377
380
|
rows: 3,
|
|
378
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",
|
|
379
|
-
placeholder: a(
|
|
382
|
+
placeholder: a(L, "sandbox.create.fields.description.placeholder", "What is this sandbox for?")
|
|
380
383
|
})] }),
|
|
381
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
|
|
382
385
|
className: "block text-sm font-semibold mb-3",
|
|
383
|
-
children: a(
|
|
384
|
-
}), /* @__PURE__ */
|
|
386
|
+
children: a(L, "sandbox.create.fields.template.label", "Template")
|
|
387
|
+
}), /* @__PURE__ */ E("div", {
|
|
385
388
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
386
|
-
children:
|
|
387
|
-
let t = e.icon, n =
|
|
388
|
-
return /* @__PURE__ */
|
|
389
|
+
children: O.map((e) => {
|
|
390
|
+
let t = e.icon, n = B.template === e.value;
|
|
391
|
+
return /* @__PURE__ */ D("button", {
|
|
389
392
|
type: "button",
|
|
390
393
|
onClick: () => {
|
|
391
|
-
e.value === "MISC_SHELL" ?
|
|
394
|
+
e.value === "MISC_SHELL" ? V((e) => ({
|
|
392
395
|
...e,
|
|
393
396
|
template: "MISC_SHELL",
|
|
394
397
|
containers: [{
|
|
395
398
|
name: "main",
|
|
396
|
-
image:
|
|
399
|
+
image: M,
|
|
397
400
|
ports: [{
|
|
398
401
|
containerPort: 80,
|
|
399
402
|
name: "nginx"
|
|
@@ -408,11 +411,11 @@ function P() {
|
|
|
408
411
|
limitsMemory: "2Gi",
|
|
409
412
|
_registryType: "burdenoff"
|
|
410
413
|
}]
|
|
411
|
-
})) :
|
|
414
|
+
})) : V((e) => ({
|
|
412
415
|
...e,
|
|
413
416
|
template: "CUSTOM",
|
|
414
417
|
containers: [{
|
|
415
|
-
...
|
|
418
|
+
...k,
|
|
416
419
|
name: "main",
|
|
417
420
|
image: ""
|
|
418
421
|
}]
|
|
@@ -420,26 +423,26 @@ function P() {
|
|
|
420
423
|
},
|
|
421
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"}`,
|
|
422
425
|
children: [
|
|
423
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ E(t, {
|
|
424
427
|
size: 24,
|
|
425
428
|
className: n ? "text-primary" : "text-muted-foreground"
|
|
426
429
|
}),
|
|
427
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ E("p", {
|
|
428
431
|
className: "font-medium mt-2",
|
|
429
|
-
children: a(
|
|
432
|
+
children: a(L, e.labelKey, e.labelFallback)
|
|
430
433
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ E("p", {
|
|
432
435
|
className: "text-xs text-muted-foreground mt-0.5",
|
|
433
|
-
children: a(
|
|
436
|
+
children: a(L, e.descriptionKey, e.descriptionFallback)
|
|
434
437
|
})
|
|
435
438
|
]
|
|
436
439
|
}, e.value);
|
|
437
440
|
})
|
|
438
441
|
})] }),
|
|
439
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ D("label", {
|
|
440
443
|
className: "block text-sm font-semibold mb-3",
|
|
441
|
-
children: [a(
|
|
442
|
-
}), /* @__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", {
|
|
443
446
|
className: "grid grid-cols-2 gap-3",
|
|
444
447
|
children: [{
|
|
445
448
|
value: "DEPLOYMENT",
|
|
@@ -453,247 +456,247 @@ function P() {
|
|
|
453
456
|
labelFallback: "Job",
|
|
454
457
|
descKey: "sandbox.create.fields.executionMode.job.description",
|
|
455
458
|
descFallback: "Run-to-completion task (exits when done)"
|
|
456
|
-
}].map((e) => /* @__PURE__ */
|
|
459
|
+
}].map((e) => /* @__PURE__ */ D("button", {
|
|
457
460
|
type: "button",
|
|
458
461
|
onClick: () => Z("mode", e.value),
|
|
459
|
-
className: `p-3 rounded-lg border-2 text-left transition-all duration-200 ${
|
|
460
|
-
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", {
|
|
461
464
|
className: "font-medium text-sm",
|
|
462
|
-
children: a(
|
|
463
|
-
}), /* @__PURE__ */
|
|
465
|
+
children: a(L, e.labelKey, e.labelFallback)
|
|
466
|
+
}), /* @__PURE__ */ E("p", {
|
|
464
467
|
className: "text-xs text-muted-foreground mt-0.5",
|
|
465
|
-
children: a(
|
|
468
|
+
children: a(L, e.descKey, e.descFallback)
|
|
466
469
|
})]
|
|
467
470
|
}, e.value))
|
|
468
471
|
})] })
|
|
469
472
|
]
|
|
470
473
|
}) }),
|
|
471
|
-
Y.length > 0 && /* @__PURE__ */
|
|
474
|
+
Y.length > 0 && /* @__PURE__ */ E(r, { children: /* @__PURE__ */ D(i, {
|
|
472
475
|
className: "p-6 space-y-4",
|
|
473
476
|
children: [
|
|
474
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ D("h2", {
|
|
475
478
|
className: "text-lg font-bold flex items-center gap-2",
|
|
476
|
-
children: [/* @__PURE__ */
|
|
479
|
+
children: [/* @__PURE__ */ E(m, {
|
|
477
480
|
size: 18,
|
|
478
481
|
className: "text-primary"
|
|
479
|
-
}), a(
|
|
482
|
+
}), a(L, "sandbox.create.sections.quickStartTemplates.title", "Quick Start Templates")]
|
|
480
483
|
}),
|
|
481
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ E("div", {
|
|
482
485
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",
|
|
483
|
-
children: Y.map((e) => /* @__PURE__ */
|
|
486
|
+
children: Y.map((e) => /* @__PURE__ */ D("button", {
|
|
484
487
|
type: "button",
|
|
485
|
-
onClick: () =>
|
|
486
|
-
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"}`,
|
|
487
490
|
children: [
|
|
488
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ D("div", {
|
|
489
492
|
className: "flex items-center gap-2 mb-2",
|
|
490
|
-
children: [/* @__PURE__ */
|
|
493
|
+
children: [/* @__PURE__ */ E("span", {
|
|
491
494
|
className: "font-medium text-sm",
|
|
492
495
|
children: e.name
|
|
493
|
-
}), e.isDefault && /* @__PURE__ */
|
|
496
|
+
}), e.isDefault && /* @__PURE__ */ E(t, {
|
|
494
497
|
variant: "secondary",
|
|
495
498
|
className: "text-xs",
|
|
496
|
-
children: a(
|
|
499
|
+
children: a(L, "sandbox.create.sections.quickStartTemplates.defaultBadge", "Default")
|
|
497
500
|
})]
|
|
498
501
|
}),
|
|
499
|
-
e.description && /* @__PURE__ */
|
|
502
|
+
e.description && /* @__PURE__ */ E("p", {
|
|
500
503
|
className: "text-xs text-muted-foreground mb-2",
|
|
501
504
|
children: e.description
|
|
502
505
|
}),
|
|
503
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ D("div", {
|
|
504
507
|
className: "flex items-center gap-2 text-xs text-muted-foreground",
|
|
505
508
|
children: [
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ D("span", { children: [e.resources?.cpuRequest ?? "?", " CPU"] }),
|
|
510
|
+
/* @__PURE__ */ E("span", {
|
|
508
511
|
className: "text-muted-foreground/40",
|
|
509
512
|
children: "|"
|
|
510
513
|
}),
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ D("span", { children: [e.resources?.memoryRequest ?? "?", " mem"] }),
|
|
515
|
+
/* @__PURE__ */ E("span", {
|
|
513
516
|
className: "text-muted-foreground/40",
|
|
514
517
|
children: "|"
|
|
515
518
|
}),
|
|
516
|
-
/* @__PURE__ */
|
|
517
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ D("span", { children: [e.containers?.length ?? 0, " containers"] }),
|
|
520
|
+
/* @__PURE__ */ E("span", {
|
|
518
521
|
className: "text-muted-foreground/40",
|
|
519
522
|
children: "|"
|
|
520
523
|
}),
|
|
521
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ E("span", { children: $(e.ttlSeconds) })
|
|
522
525
|
]
|
|
523
526
|
})
|
|
524
527
|
]
|
|
525
528
|
}, e.id))
|
|
526
529
|
}),
|
|
527
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ E("p", {
|
|
528
531
|
className: "text-xs text-muted-foreground",
|
|
529
|
-
children: a(
|
|
532
|
+
children: a(L, "sandbox.create.sections.quickStartTemplates.hint", "Select a template or customize resources below")
|
|
530
533
|
})
|
|
531
534
|
]
|
|
532
535
|
}) }),
|
|
533
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ E(r, { children: /* @__PURE__ */ D(i, {
|
|
534
537
|
className: "p-6 space-y-5",
|
|
535
538
|
children: [
|
|
536
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ D("div", {
|
|
537
540
|
className: "flex items-center justify-between",
|
|
538
|
-
children: [/* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ D("h2", {
|
|
539
542
|
className: "text-lg font-bold flex items-center gap-2",
|
|
540
543
|
children: [
|
|
541
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ E(h, {
|
|
542
545
|
size: 18,
|
|
543
546
|
className: "text-primary"
|
|
544
547
|
}),
|
|
545
|
-
a(
|
|
546
|
-
/* @__PURE__ */
|
|
547
|
-
/* @__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, {
|
|
548
551
|
variant: "secondary",
|
|
549
|
-
children:
|
|
552
|
+
children: B.containers.length
|
|
550
553
|
})
|
|
551
554
|
]
|
|
552
|
-
}), /* @__PURE__ */
|
|
555
|
+
}), /* @__PURE__ */ D(n, {
|
|
553
556
|
type: "button",
|
|
554
557
|
variant: "outline",
|
|
555
558
|
size: "sm",
|
|
556
|
-
onClick:
|
|
557
|
-
children: [/* @__PURE__ */
|
|
559
|
+
onClick: se,
|
|
560
|
+
children: [/* @__PURE__ */ E(re, { size: 14 }), a(L, "sandbox.create.sections.containers.addContainer", "Add Container")]
|
|
558
561
|
})]
|
|
559
562
|
}),
|
|
560
|
-
|
|
563
|
+
H.containers && /* @__PURE__ */ D("p", {
|
|
561
564
|
className: "text-sm text-destructive flex items-center gap-1",
|
|
562
|
-
children: [/* @__PURE__ */
|
|
565
|
+
children: [/* @__PURE__ */ E(f, { size: 14 }), H.containers]
|
|
563
566
|
}),
|
|
564
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ E("div", {
|
|
565
568
|
className: "space-y-4",
|
|
566
|
-
children:
|
|
569
|
+
children: B.containers.map((e, t) => /* @__PURE__ */ D("div", {
|
|
567
570
|
className: "p-4 rounded-lg border-2 border-border/50 bg-muted/20 space-y-4",
|
|
568
571
|
children: [
|
|
569
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ D("div", {
|
|
570
573
|
className: "flex items-center justify-between",
|
|
571
|
-
children: [/* @__PURE__ */
|
|
574
|
+
children: [/* @__PURE__ */ D("h3", {
|
|
572
575
|
className: "font-semibold text-sm",
|
|
573
|
-
children: [a(
|
|
574
|
-
}),
|
|
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, {
|
|
575
578
|
type: "button",
|
|
576
579
|
variant: "ghost",
|
|
577
580
|
size: "icon",
|
|
578
581
|
className: "text-destructive hover:text-destructive h-7 w-7",
|
|
579
|
-
onClick: () =>
|
|
580
|
-
children: /* @__PURE__ */
|
|
582
|
+
onClick: () => ce(t),
|
|
583
|
+
children: /* @__PURE__ */ E(C, { size: 14 })
|
|
581
584
|
})]
|
|
582
585
|
}),
|
|
583
|
-
/* @__PURE__ */
|
|
584
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ D("div", { children: [
|
|
587
|
+
/* @__PURE__ */ D("label", {
|
|
585
588
|
className: "block text-xs font-semibold mb-1",
|
|
586
589
|
children: [
|
|
587
|
-
a(
|
|
590
|
+
a(L, "sandbox.create.container.fields.name.label", "Name"),
|
|
588
591
|
" ",
|
|
589
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ E("span", {
|
|
590
593
|
className: "text-destructive",
|
|
591
594
|
children: "*"
|
|
592
595
|
})
|
|
593
596
|
]
|
|
594
597
|
}),
|
|
595
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ E("input", {
|
|
596
599
|
type: "text",
|
|
597
600
|
value: e.name,
|
|
598
601
|
onChange: (e) => Q(t, "name", e.target.value),
|
|
599
|
-
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 ${
|
|
600
|
-
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")
|
|
601
604
|
}),
|
|
602
|
-
|
|
605
|
+
H[`container_${t}_name`] && /* @__PURE__ */ E("p", {
|
|
603
606
|
className: "text-xs text-destructive mt-1",
|
|
604
|
-
children:
|
|
607
|
+
children: H[`container_${t}_name`]
|
|
605
608
|
})
|
|
606
609
|
] }),
|
|
607
|
-
/* @__PURE__ */
|
|
608
|
-
/* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ D("div", { children: [
|
|
611
|
+
/* @__PURE__ */ D("label", {
|
|
609
612
|
className: "block text-xs font-semibold mb-1",
|
|
610
613
|
children: [
|
|
611
|
-
a(
|
|
614
|
+
a(L, "sandbox.create.container.fields.image.label", "Image"),
|
|
612
615
|
" ",
|
|
613
|
-
/* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ E("span", {
|
|
614
617
|
className: "text-destructive",
|
|
615
618
|
children: "*"
|
|
616
619
|
})
|
|
617
620
|
]
|
|
618
621
|
}),
|
|
619
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ D("div", {
|
|
620
623
|
className: "flex gap-2 mb-2",
|
|
621
|
-
children: [/* @__PURE__ */
|
|
624
|
+
children: [/* @__PURE__ */ E("button", {
|
|
622
625
|
type: "button",
|
|
623
626
|
onClick: () => Q(t, "_registryType", "burdenoff"),
|
|
624
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"}`,
|
|
625
|
-
children: a(
|
|
626
|
-
}), /* @__PURE__ */
|
|
628
|
+
children: a(L, "sandbox.create.container.fields.image.registryBurdenoff", "Burdenoff Repositories")
|
|
629
|
+
}), /* @__PURE__ */ E("button", {
|
|
627
630
|
type: "button",
|
|
628
631
|
onClick: () => Q(t, "_registryType", "custom"),
|
|
629
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"}`,
|
|
630
|
-
children: a(
|
|
633
|
+
children: a(L, "sandbox.create.container.fields.image.registryCustom", "Custom (Docker Hub)")
|
|
631
634
|
})]
|
|
632
635
|
}),
|
|
633
|
-
(e._registryType || "burdenoff") === "burdenoff" ? /* @__PURE__ */
|
|
636
|
+
(e._registryType || "burdenoff") === "burdenoff" ? /* @__PURE__ */ D("div", {
|
|
634
637
|
className: "flex items-center",
|
|
635
|
-
children: [/* @__PURE__ */
|
|
638
|
+
children: [/* @__PURE__ */ E("span", {
|
|
636
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",
|
|
637
640
|
children: "burdenoffregistry.azurecr.io/"
|
|
638
|
-
}), /* @__PURE__ */
|
|
641
|
+
}), /* @__PURE__ */ E("input", {
|
|
639
642
|
type: "text",
|
|
640
643
|
value: e.image,
|
|
641
644
|
onChange: (e) => Q(t, "image", e.target.value),
|
|
642
|
-
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 ${
|
|
643
|
-
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
|
|
644
647
|
})]
|
|
645
|
-
}) : /* @__PURE__ */
|
|
648
|
+
}) : /* @__PURE__ */ E("input", {
|
|
646
649
|
type: "text",
|
|
647
650
|
value: e.image,
|
|
648
651
|
onChange: (e) => Q(t, "image", e.target.value),
|
|
649
|
-
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"}`,
|
|
650
653
|
placeholder: "nginx:alpine"
|
|
651
654
|
}),
|
|
652
|
-
|
|
655
|
+
H[`container_${t}_image`] && /* @__PURE__ */ E("p", {
|
|
653
656
|
className: "text-xs text-destructive mt-1",
|
|
654
|
-
children:
|
|
657
|
+
children: H[`container_${t}_image`]
|
|
655
658
|
})
|
|
656
659
|
] }),
|
|
657
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
658
661
|
className: "text-xs font-semibold mb-2 text-muted-foreground",
|
|
659
|
-
children: a(
|
|
660
|
-
}), /* @__PURE__ */
|
|
662
|
+
children: a(L, "sandbox.create.container.resources.title", "Per-Container Resources (optional)")
|
|
663
|
+
}), /* @__PURE__ */ D("div", {
|
|
661
664
|
className: "grid grid-cols-2 sm:grid-cols-4 gap-3",
|
|
662
665
|
children: [
|
|
663
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
|
|
664
667
|
className: "block text-xs text-muted-foreground mb-1",
|
|
665
|
-
children: a(
|
|
666
|
-
}), /* @__PURE__ */
|
|
668
|
+
children: a(L, "sandbox.create.container.resources.cpuReq", "CPU Req")
|
|
669
|
+
}), /* @__PURE__ */ E("input", {
|
|
667
670
|
type: "text",
|
|
668
671
|
value: e.requestsCpu,
|
|
669
672
|
onChange: (e) => Q(t, "requestsCpu", e.target.value),
|
|
670
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",
|
|
671
674
|
placeholder: "250m"
|
|
672
675
|
})] }),
|
|
673
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
|
|
674
677
|
className: "block text-xs text-muted-foreground mb-1",
|
|
675
|
-
children: a(
|
|
676
|
-
}), /* @__PURE__ */
|
|
678
|
+
children: a(L, "sandbox.create.container.resources.cpuLim", "CPU Lim")
|
|
679
|
+
}), /* @__PURE__ */ E("input", {
|
|
677
680
|
type: "text",
|
|
678
681
|
value: e.limitsCpu,
|
|
679
682
|
onChange: (e) => Q(t, "limitsCpu", e.target.value),
|
|
680
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",
|
|
681
684
|
placeholder: "1"
|
|
682
685
|
})] }),
|
|
683
|
-
/* @__PURE__ */
|
|
686
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
|
|
684
687
|
className: "block text-xs text-muted-foreground mb-1",
|
|
685
|
-
children: a(
|
|
686
|
-
}), /* @__PURE__ */
|
|
688
|
+
children: a(L, "sandbox.create.container.resources.memReq", "Mem Req")
|
|
689
|
+
}), /* @__PURE__ */ E("input", {
|
|
687
690
|
type: "text",
|
|
688
691
|
value: e.requestsMemory,
|
|
689
692
|
onChange: (e) => Q(t, "requestsMemory", e.target.value),
|
|
690
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",
|
|
691
694
|
placeholder: "512Mi"
|
|
692
695
|
})] }),
|
|
693
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
|
|
694
697
|
className: "block text-xs text-muted-foreground mb-1",
|
|
695
|
-
children: a(
|
|
696
|
-
}), /* @__PURE__ */
|
|
698
|
+
children: a(L, "sandbox.create.container.resources.memLim", "Mem Lim")
|
|
699
|
+
}), /* @__PURE__ */ E("input", {
|
|
697
700
|
type: "text",
|
|
698
701
|
value: e.limitsMemory,
|
|
699
702
|
onChange: (e) => Q(t, "limitsMemory", e.target.value),
|
|
@@ -702,21 +705,21 @@ function P() {
|
|
|
702
705
|
})] })
|
|
703
706
|
]
|
|
704
707
|
})] }),
|
|
705
|
-
/* @__PURE__ */
|
|
708
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ D("div", {
|
|
706
709
|
className: "flex items-center justify-between mb-2",
|
|
707
|
-
children: [/* @__PURE__ */
|
|
710
|
+
children: [/* @__PURE__ */ E("p", {
|
|
708
711
|
className: "text-xs font-semibold text-muted-foreground",
|
|
709
|
-
children: a(
|
|
710
|
-
}), /* @__PURE__ */
|
|
712
|
+
children: a(L, "sandbox.create.container.ports.title", "Ports")
|
|
713
|
+
}), /* @__PURE__ */ E("button", {
|
|
711
714
|
type: "button",
|
|
712
|
-
onClick: () =>
|
|
715
|
+
onClick: () => le(t),
|
|
713
716
|
className: "text-xs text-primary hover:underline",
|
|
714
|
-
children: a(
|
|
717
|
+
children: a(L, "sandbox.create.container.ports.add", "+ Add Port")
|
|
715
718
|
})]
|
|
716
|
-
}), e.ports.map((n, r) => /* @__PURE__ */
|
|
719
|
+
}), e.ports.map((n, r) => /* @__PURE__ */ D("div", {
|
|
717
720
|
className: "flex items-center gap-2 mb-2",
|
|
718
721
|
children: [
|
|
719
|
-
/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ E("input", {
|
|
720
723
|
type: "number",
|
|
721
724
|
value: n.containerPort,
|
|
722
725
|
onChange: (n) => {
|
|
@@ -729,7 +732,7 @@ function P() {
|
|
|
729
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",
|
|
730
733
|
placeholder: "8080"
|
|
731
734
|
}),
|
|
732
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ E("input", {
|
|
733
736
|
type: "text",
|
|
734
737
|
value: n.name,
|
|
735
738
|
onChange: (n) => {
|
|
@@ -740,31 +743,31 @@ function P() {
|
|
|
740
743
|
}, Q(t, "ports", i);
|
|
741
744
|
},
|
|
742
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",
|
|
743
|
-
placeholder: a(
|
|
746
|
+
placeholder: a(L, "sandbox.create.container.ports.namePlaceholder", "Port name (optional)")
|
|
744
747
|
}),
|
|
745
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ E("button", {
|
|
746
749
|
type: "button",
|
|
747
|
-
onClick: () =>
|
|
750
|
+
onClick: () => ue(t, r),
|
|
748
751
|
className: "p-1.5 text-destructive hover:bg-destructive/10 rounded",
|
|
749
|
-
children: /* @__PURE__ */
|
|
752
|
+
children: /* @__PURE__ */ E(w, { size: 12 })
|
|
750
753
|
})
|
|
751
754
|
]
|
|
752
755
|
}, r))] }),
|
|
753
|
-
/* @__PURE__ */
|
|
756
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ D("div", {
|
|
754
757
|
className: "flex items-center justify-between mb-2",
|
|
755
|
-
children: [/* @__PURE__ */
|
|
758
|
+
children: [/* @__PURE__ */ E("p", {
|
|
756
759
|
className: "text-xs font-semibold text-muted-foreground",
|
|
757
|
-
children: a(
|
|
758
|
-
}), /* @__PURE__ */
|
|
760
|
+
children: a(L, "sandbox.create.container.envVars.title", "Environment Variables")
|
|
761
|
+
}), /* @__PURE__ */ E("button", {
|
|
759
762
|
type: "button",
|
|
760
|
-
onClick: () =>
|
|
763
|
+
onClick: () => de(t),
|
|
761
764
|
className: "text-xs text-primary hover:underline",
|
|
762
|
-
children: a(
|
|
765
|
+
children: a(L, "sandbox.create.container.envVars.add", "+ Add Variable")
|
|
763
766
|
})]
|
|
764
|
-
}), e.env.map((n, r) => /* @__PURE__ */
|
|
767
|
+
}), e.env.map((n, r) => /* @__PURE__ */ D("div", {
|
|
765
768
|
className: "flex items-center gap-2 mb-2",
|
|
766
769
|
children: [
|
|
767
|
-
/* @__PURE__ */
|
|
770
|
+
/* @__PURE__ */ E("input", {
|
|
768
771
|
type: "text",
|
|
769
772
|
value: n.name,
|
|
770
773
|
onChange: (n) => {
|
|
@@ -777,7 +780,7 @@ function P() {
|
|
|
777
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",
|
|
778
781
|
placeholder: "KEY"
|
|
779
782
|
}),
|
|
780
|
-
/* @__PURE__ */
|
|
783
|
+
/* @__PURE__ */ E("input", {
|
|
781
784
|
type: "text",
|
|
782
785
|
value: n.value,
|
|
783
786
|
onChange: (n) => {
|
|
@@ -790,11 +793,11 @@ function P() {
|
|
|
790
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",
|
|
791
794
|
placeholder: "value"
|
|
792
795
|
}),
|
|
793
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ E("button", {
|
|
794
797
|
type: "button",
|
|
795
|
-
onClick: () =>
|
|
798
|
+
onClick: () => fe(t, r),
|
|
796
799
|
className: "p-1.5 text-destructive hover:bg-destructive/10 rounded",
|
|
797
|
-
children: /* @__PURE__ */
|
|
800
|
+
children: /* @__PURE__ */ E(w, { size: 12 })
|
|
798
801
|
})
|
|
799
802
|
]
|
|
800
803
|
}, r))] })
|
|
@@ -803,319 +806,326 @@ function P() {
|
|
|
803
806
|
})
|
|
804
807
|
]
|
|
805
808
|
}) }),
|
|
806
|
-
/* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ E(r, { children: /* @__PURE__ */ D(i, {
|
|
807
810
|
className: "p-6 space-y-5",
|
|
808
811
|
children: [
|
|
809
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ D("h2", {
|
|
810
813
|
className: "text-lg font-bold flex items-center gap-2",
|
|
811
814
|
children: [
|
|
812
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ E(g, {
|
|
813
816
|
size: 18,
|
|
814
817
|
className: "text-primary"
|
|
815
818
|
}),
|
|
816
|
-
a(
|
|
817
|
-
/* @__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.") })
|
|
818
821
|
]
|
|
819
822
|
}),
|
|
820
|
-
/* @__PURE__ */
|
|
823
|
+
/* @__PURE__ */ D("div", {
|
|
821
824
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
822
825
|
children: [
|
|
823
|
-
/* @__PURE__ */
|
|
824
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ D("div", { children: [
|
|
827
|
+
/* @__PURE__ */ D("label", {
|
|
825
828
|
htmlFor: "cpuRequest",
|
|
826
829
|
className: "text-sm font-semibold mb-2 flex items-center gap-2",
|
|
827
|
-
children: [/* @__PURE__ */
|
|
830
|
+
children: [/* @__PURE__ */ E(g, {
|
|
828
831
|
size: 14,
|
|
829
832
|
className: "text-status-info-text"
|
|
830
|
-
}), a(
|
|
833
|
+
}), a(L, "sandbox.create.fields.cpuRequest.label", "CPU Request")]
|
|
831
834
|
}),
|
|
832
|
-
/* @__PURE__ */
|
|
835
|
+
/* @__PURE__ */ E("input", {
|
|
833
836
|
type: "text",
|
|
834
837
|
id: "cpuRequest",
|
|
835
|
-
value:
|
|
838
|
+
value: B.cpuRequest,
|
|
836
839
|
onChange: (e) => Z("cpuRequest", e.target.value),
|
|
837
|
-
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"}`,
|
|
838
841
|
placeholder: "500m"
|
|
839
842
|
}),
|
|
840
|
-
|
|
843
|
+
H.cpuRequest && /* @__PURE__ */ E("p", {
|
|
841
844
|
className: "text-sm text-destructive mt-1",
|
|
842
|
-
children:
|
|
845
|
+
children: H.cpuRequest
|
|
843
846
|
})
|
|
844
847
|
] }),
|
|
845
|
-
/* @__PURE__ */
|
|
846
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ D("div", { children: [
|
|
849
|
+
/* @__PURE__ */ D("label", {
|
|
847
850
|
htmlFor: "cpuLimit",
|
|
848
851
|
className: "text-sm font-semibold mb-2 flex items-center gap-2",
|
|
849
|
-
children: [/* @__PURE__ */
|
|
852
|
+
children: [/* @__PURE__ */ E(g, {
|
|
850
853
|
size: 14,
|
|
851
854
|
className: "text-status-info-text"
|
|
852
|
-
}), a(
|
|
855
|
+
}), a(L, "sandbox.create.fields.cpuLimit.label", "CPU Limit")]
|
|
853
856
|
}),
|
|
854
|
-
/* @__PURE__ */
|
|
857
|
+
/* @__PURE__ */ E("input", {
|
|
855
858
|
type: "text",
|
|
856
859
|
id: "cpuLimit",
|
|
857
|
-
value:
|
|
860
|
+
value: B.cpuLimit,
|
|
858
861
|
onChange: (e) => Z("cpuLimit", e.target.value),
|
|
859
|
-
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"}`,
|
|
860
863
|
placeholder: "2"
|
|
861
864
|
}),
|
|
862
|
-
|
|
865
|
+
H.cpuLimit && /* @__PURE__ */ E("p", {
|
|
863
866
|
className: "text-sm text-destructive mt-1",
|
|
864
|
-
children:
|
|
867
|
+
children: H.cpuLimit
|
|
865
868
|
})
|
|
866
869
|
] }),
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
870
|
+
/* @__PURE__ */ D("div", { children: [
|
|
871
|
+
/* @__PURE__ */ D("label", {
|
|
869
872
|
htmlFor: "memoryRequest",
|
|
870
873
|
className: "text-sm font-semibold mb-2 flex items-center gap-2",
|
|
871
|
-
children: [/* @__PURE__ */
|
|
874
|
+
children: [/* @__PURE__ */ E(b, {
|
|
872
875
|
size: 14,
|
|
873
876
|
className: "text-accent-purple-subtle"
|
|
874
|
-
}), a(
|
|
877
|
+
}), a(L, "sandbox.create.fields.memoryRequest.label", "Memory Request")]
|
|
875
878
|
}),
|
|
876
|
-
/* @__PURE__ */
|
|
879
|
+
/* @__PURE__ */ E("input", {
|
|
877
880
|
type: "text",
|
|
878
881
|
id: "memoryRequest",
|
|
879
|
-
value:
|
|
882
|
+
value: B.memoryRequest,
|
|
880
883
|
onChange: (e) => Z("memoryRequest", e.target.value),
|
|
881
|
-
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-background font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
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"}`,
|
|
882
885
|
placeholder: "1Gi"
|
|
883
886
|
}),
|
|
884
|
-
|
|
887
|
+
H.memoryRequest && /* @__PURE__ */ E("p", {
|
|
885
888
|
className: "text-sm text-destructive mt-1",
|
|
886
|
-
children:
|
|
889
|
+
children: H.memoryRequest
|
|
887
890
|
})
|
|
888
891
|
] }),
|
|
889
|
-
/* @__PURE__ */
|
|
890
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ D("div", { children: [
|
|
893
|
+
/* @__PURE__ */ D("label", {
|
|
891
894
|
htmlFor: "memoryLimit",
|
|
892
895
|
className: "text-sm font-semibold mb-2 flex items-center gap-2",
|
|
893
|
-
children: [/* @__PURE__ */
|
|
896
|
+
children: [/* @__PURE__ */ E(b, {
|
|
894
897
|
size: 14,
|
|
895
898
|
className: "text-accent-purple-subtle"
|
|
896
|
-
}), a(
|
|
899
|
+
}), a(L, "sandbox.create.fields.memoryLimit.label", "Memory Limit")]
|
|
897
900
|
}),
|
|
898
|
-
/* @__PURE__ */
|
|
901
|
+
/* @__PURE__ */ E("input", {
|
|
899
902
|
type: "text",
|
|
900
903
|
id: "memoryLimit",
|
|
901
|
-
value:
|
|
904
|
+
value: B.memoryLimit,
|
|
902
905
|
onChange: (e) => Z("memoryLimit", e.target.value),
|
|
903
|
-
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-background font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
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"}`,
|
|
904
907
|
placeholder: "4Gi"
|
|
905
908
|
}),
|
|
906
|
-
|
|
909
|
+
H.memoryLimit && /* @__PURE__ */ E("p", {
|
|
907
910
|
className: "text-sm text-destructive mt-1",
|
|
908
|
-
children:
|
|
911
|
+
children: H.memoryLimit
|
|
909
912
|
})
|
|
910
913
|
] })
|
|
911
914
|
]
|
|
912
915
|
}),
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ D("div", { children: [
|
|
917
|
+
/* @__PURE__ */ D("label", {
|
|
915
918
|
htmlFor: "ttlSeconds",
|
|
916
919
|
className: "text-sm font-semibold mb-2 flex items-center gap-2",
|
|
917
920
|
children: [
|
|
918
|
-
/* @__PURE__ */
|
|
921
|
+
/* @__PURE__ */ E(S, {
|
|
919
922
|
size: 14,
|
|
920
923
|
className: "text-status-info-text"
|
|
921
924
|
}),
|
|
922
|
-
a(
|
|
923
|
-
/* @__PURE__ */
|
|
924
|
-
/* @__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, {
|
|
925
928
|
variant: "outline",
|
|
926
929
|
className: "text-xs ml-auto",
|
|
927
|
-
children: $(
|
|
930
|
+
children: $(B.ttlSeconds)
|
|
928
931
|
})
|
|
929
932
|
]
|
|
930
933
|
}),
|
|
931
|
-
/* @__PURE__ */
|
|
934
|
+
/* @__PURE__ */ E("input", {
|
|
932
935
|
type: "range",
|
|
933
936
|
id: "ttlSeconds",
|
|
934
937
|
min: 600,
|
|
935
938
|
max: 86400,
|
|
936
939
|
step: 600,
|
|
937
|
-
value:
|
|
940
|
+
value: B.ttlSeconds,
|
|
938
941
|
onChange: (e) => Z("ttlSeconds", Number(e.target.value)),
|
|
939
942
|
className: "w-full mt-2 accent-primary"
|
|
940
943
|
}),
|
|
941
|
-
/* @__PURE__ */
|
|
944
|
+
/* @__PURE__ */ D("div", {
|
|
942
945
|
className: "flex justify-between text-xs text-muted-foreground mt-1",
|
|
943
946
|
children: [
|
|
944
|
-
/* @__PURE__ */
|
|
945
|
-
/* @__PURE__ */
|
|
946
|
-
/* @__PURE__ */
|
|
947
|
-
/* @__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" })
|
|
948
951
|
]
|
|
949
952
|
}),
|
|
950
|
-
|
|
953
|
+
H.ttlSeconds && /* @__PURE__ */ E("p", {
|
|
951
954
|
className: "text-sm text-destructive mt-1",
|
|
952
|
-
children:
|
|
955
|
+
children: H.ttlSeconds
|
|
953
956
|
})
|
|
954
957
|
] }),
|
|
955
|
-
/* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ D("label", {
|
|
956
959
|
className: "text-sm font-semibold mb-2 flex items-center gap-2",
|
|
957
|
-
children: [a(
|
|
958
|
-
}), /* @__PURE__ */
|
|
959
|
-
value:
|
|
960
|
-
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
|
|
961
964
|
})] })
|
|
962
965
|
]
|
|
963
966
|
}) }),
|
|
964
|
-
/* @__PURE__ */
|
|
967
|
+
/* @__PURE__ */ E(r, { children: /* @__PURE__ */ D(i, {
|
|
965
968
|
className: "p-6 space-y-5",
|
|
966
969
|
children: [
|
|
967
|
-
/* @__PURE__ */
|
|
970
|
+
/* @__PURE__ */ D("h2", {
|
|
968
971
|
className: "text-lg font-bold flex items-center gap-2",
|
|
969
972
|
children: [
|
|
970
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ E(_, {
|
|
971
974
|
size: 18,
|
|
972
975
|
className: "text-primary"
|
|
973
976
|
}),
|
|
974
|
-
a(
|
|
975
|
-
/* @__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.") })
|
|
976
979
|
]
|
|
977
980
|
}),
|
|
978
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
|
|
979
982
|
className: "block text-sm font-semibold mb-3",
|
|
980
|
-
children: a(
|
|
981
|
-
}), /* @__PURE__ */
|
|
983
|
+
children: a(L, "sandbox.create.fields.storageMode.label", "Mode")
|
|
984
|
+
}), /* @__PURE__ */ E("div", {
|
|
982
985
|
className: "grid grid-cols-3 gap-3",
|
|
983
986
|
children: [
|
|
984
987
|
"NONE",
|
|
985
988
|
"EPHEMERAL",
|
|
986
989
|
"PERSISTENT"
|
|
987
990
|
].map((e) => {
|
|
988
|
-
let t =
|
|
989
|
-
NONE: a(
|
|
990
|
-
EPHEMERAL: a(
|
|
991
|
-
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")
|
|
992
995
|
}, r = {
|
|
993
|
-
NONE: a(
|
|
994
|
-
EPHEMERAL: a(
|
|
995
|
-
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")
|
|
996
999
|
};
|
|
997
|
-
return /* @__PURE__ */
|
|
1000
|
+
return /* @__PURE__ */ D("button", {
|
|
998
1001
|
type: "button",
|
|
999
1002
|
onClick: () => Z("storageMode", e),
|
|
1000
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"}`,
|
|
1001
|
-
children: [/* @__PURE__ */
|
|
1004
|
+
children: [/* @__PURE__ */ E("p", {
|
|
1002
1005
|
className: "font-medium text-sm",
|
|
1003
1006
|
children: n[e]
|
|
1004
|
-
}), /* @__PURE__ */
|
|
1007
|
+
}), /* @__PURE__ */ E("p", {
|
|
1005
1008
|
className: "text-xs text-muted-foreground mt-0.5",
|
|
1006
1009
|
children: r[e]
|
|
1007
1010
|
})]
|
|
1008
1011
|
}, e);
|
|
1009
1012
|
})
|
|
1010
1013
|
})] }),
|
|
1011
|
-
|
|
1014
|
+
B.storageMode !== "NONE" && /* @__PURE__ */ D("div", {
|
|
1012
1015
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
1013
1016
|
children: [
|
|
1014
|
-
/* @__PURE__ */
|
|
1017
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
|
|
1015
1018
|
htmlFor: "storageSizeGi",
|
|
1016
1019
|
className: "block text-sm font-semibold mb-2",
|
|
1017
|
-
children: a(
|
|
1018
|
-
}), /* @__PURE__ */
|
|
1020
|
+
children: a(L, "sandbox.create.fields.storageSizeGi.label", "Size (GiB)")
|
|
1021
|
+
}), /* @__PURE__ */ E("input", {
|
|
1019
1022
|
type: "number",
|
|
1020
1023
|
id: "storageSizeGi",
|
|
1021
|
-
value:
|
|
1024
|
+
value: B.storageSizeGi,
|
|
1022
1025
|
onChange: (e) => Z("storageSizeGi", Number(e.target.value)),
|
|
1023
1026
|
min: 1,
|
|
1024
1027
|
max: 200,
|
|
1025
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"
|
|
1026
1029
|
})] }),
|
|
1027
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
|
|
1028
1031
|
htmlFor: "storageMountPath",
|
|
1029
1032
|
className: "block text-sm font-semibold mb-2",
|
|
1030
|
-
children: a(
|
|
1031
|
-
}), /* @__PURE__ */
|
|
1033
|
+
children: a(L, "sandbox.create.fields.storageMountPath.label", "Mount Path")
|
|
1034
|
+
}), /* @__PURE__ */ E("input", {
|
|
1032
1035
|
type: "text",
|
|
1033
1036
|
id: "storageMountPath",
|
|
1034
|
-
value:
|
|
1037
|
+
value: B.storageMountPath,
|
|
1035
1038
|
onChange: (e) => Z("storageMountPath", e.target.value),
|
|
1036
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",
|
|
1037
1040
|
placeholder: "/data"
|
|
1038
1041
|
})] }),
|
|
1039
|
-
|
|
1042
|
+
B.storageMode === "PERSISTENT" && /* @__PURE__ */ D("div", {
|
|
1040
1043
|
className: "flex items-center gap-3 sm:col-span-2",
|
|
1041
|
-
children: [/* @__PURE__ */
|
|
1044
|
+
children: [/* @__PURE__ */ E("input", {
|
|
1042
1045
|
type: "checkbox",
|
|
1043
1046
|
id: "storageRetainOnDelete",
|
|
1044
|
-
checked:
|
|
1047
|
+
checked: B.storageRetainOnDelete,
|
|
1045
1048
|
onChange: (e) => Z("storageRetainOnDelete", e.target.checked),
|
|
1046
1049
|
className: "w-4 h-4 rounded border-border text-primary focus:ring-primary/20"
|
|
1047
|
-
}), /* @__PURE__ */
|
|
1050
|
+
}), /* @__PURE__ */ E("label", {
|
|
1048
1051
|
htmlFor: "storageRetainOnDelete",
|
|
1049
1052
|
className: "text-sm font-medium",
|
|
1050
|
-
children: a(
|
|
1053
|
+
children: a(L, "sandbox.create.fields.storageRetainOnDelete.label", "Retain volume data when sandbox is deleted")
|
|
1051
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
|
+
})
|
|
1052
1062
|
})
|
|
1053
1063
|
]
|
|
1054
1064
|
})
|
|
1055
1065
|
]
|
|
1056
1066
|
}) }),
|
|
1057
|
-
|
|
1067
|
+
B.template === "MISC_SHELL" && /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E(i, {
|
|
1058
1068
|
className: "p-5",
|
|
1059
|
-
children: /* @__PURE__ */
|
|
1069
|
+
children: /* @__PURE__ */ D("details", { children: [/* @__PURE__ */ D("summary", {
|
|
1060
1070
|
className: "cursor-pointer text-sm font-semibold text-muted-foreground flex items-center gap-2",
|
|
1061
1071
|
children: [
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
a(
|
|
1064
|
-
/* @__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.") })
|
|
1065
1075
|
]
|
|
1066
|
-
}), /* @__PURE__ */
|
|
1076
|
+
}), /* @__PURE__ */ D("div", {
|
|
1067
1077
|
className: "mt-4 space-y-4",
|
|
1068
|
-
children: [/* @__PURE__ */
|
|
1069
|
-
/* @__PURE__ */
|
|
1078
|
+
children: [/* @__PURE__ */ D("div", { children: [
|
|
1079
|
+
/* @__PURE__ */ E("label", {
|
|
1070
1080
|
className: "block text-sm font-medium text-foreground mb-1",
|
|
1071
|
-
children: a(
|
|
1081
|
+
children: a(L, "sandbox.create.fields.globalGatewayUrl.label", "Global Gateway URL")
|
|
1072
1082
|
}),
|
|
1073
|
-
/* @__PURE__ */
|
|
1083
|
+
/* @__PURE__ */ E("input", {
|
|
1074
1084
|
type: "text",
|
|
1075
|
-
value:
|
|
1085
|
+
value: B.globalGatewayUrl,
|
|
1076
1086
|
onChange: (e) => Z("globalGatewayUrl", e.target.value),
|
|
1077
|
-
placeholder:
|
|
1087
|
+
placeholder: N,
|
|
1078
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"
|
|
1079
1089
|
}),
|
|
1080
|
-
/* @__PURE__ */
|
|
1090
|
+
/* @__PURE__ */ E("p", {
|
|
1081
1091
|
className: "text-xs text-muted-foreground mt-1",
|
|
1082
|
-
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.")
|
|
1083
1093
|
})
|
|
1084
|
-
] }), /* @__PURE__ */
|
|
1085
|
-
/* @__PURE__ */
|
|
1094
|
+
] }), /* @__PURE__ */ D("div", { children: [
|
|
1095
|
+
/* @__PURE__ */ E("label", {
|
|
1086
1096
|
className: "block text-sm font-medium text-foreground mb-1",
|
|
1087
|
-
children: a(
|
|
1097
|
+
children: a(L, "sandbox.create.fields.workspaceGatewayUrl.label", "Workspace Gateway URL")
|
|
1088
1098
|
}),
|
|
1089
|
-
/* @__PURE__ */
|
|
1099
|
+
/* @__PURE__ */ E("input", {
|
|
1090
1100
|
type: "text",
|
|
1091
|
-
value:
|
|
1101
|
+
value: B.workspaceGatewayUrl,
|
|
1092
1102
|
onChange: (e) => Z("workspaceGatewayUrl", e.target.value),
|
|
1093
|
-
placeholder:
|
|
1103
|
+
placeholder: P,
|
|
1094
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"
|
|
1095
1105
|
}),
|
|
1096
|
-
/* @__PURE__ */
|
|
1106
|
+
/* @__PURE__ */ E("p", {
|
|
1097
1107
|
className: "text-xs text-muted-foreground mt-1",
|
|
1098
|
-
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.")
|
|
1099
1109
|
})
|
|
1100
1110
|
] })]
|
|
1101
1111
|
})] })
|
|
1102
1112
|
}) }),
|
|
1103
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ D("div", {
|
|
1104
1114
|
className: "flex flex-col sm:flex-row gap-3 pt-2",
|
|
1105
|
-
children: [/* @__PURE__ */
|
|
1115
|
+
children: [/* @__PURE__ */ D(n, {
|
|
1106
1116
|
type: "submit",
|
|
1107
|
-
disabled:
|
|
1117
|
+
disabled: K,
|
|
1108
1118
|
size: "lg",
|
|
1109
|
-
children: [
|
|
1119
|
+
children: [K ? /* @__PURE__ */ E(y, {
|
|
1110
1120
|
size: 18,
|
|
1111
1121
|
className: "animate-spin"
|
|
1112
|
-
}) : /* @__PURE__ */
|
|
1113
|
-
}), /* @__PURE__ */
|
|
1122
|
+
}) : /* @__PURE__ */ E(ie, { size: 18 }), a(L, "sandbox.create.actions.submit", "Create Sandbox")]
|
|
1123
|
+
}), /* @__PURE__ */ E(n, {
|
|
1114
1124
|
type: "button",
|
|
1115
1125
|
variant: "outline",
|
|
1116
|
-
onClick: () =>
|
|
1117
|
-
disabled:
|
|
1118
|
-
children: a(
|
|
1126
|
+
onClick: () => j?.(v),
|
|
1127
|
+
disabled: K,
|
|
1128
|
+
children: a(L, "sandbox.create.actions.cancel", "Cancel")
|
|
1119
1129
|
})]
|
|
1120
1130
|
})
|
|
1121
1131
|
]
|
|
@@ -1124,6 +1134,6 @@ function P() {
|
|
|
1124
1134
|
});
|
|
1125
1135
|
}
|
|
1126
1136
|
//#endregion
|
|
1127
|
-
export {
|
|
1137
|
+
export { F as SandboxCreatePage };
|
|
1128
1138
|
|
|
1129
1139
|
//# sourceMappingURL=SandboxCreatePage.js.map
|