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