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