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