@burdenoff/microfe-admin 2026.625.1 → 2026.712.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/admin/AdminRoot.js +2 -2
- package/dist/admin/AdminRoot.js.map +1 -1
- package/dist/admin/AdminRoutes.js +130 -78
- package/dist/admin/AdminRoutes.js.map +1 -1
- package/dist/admin/components/AccessDenied.js +2 -2
- package/dist/admin/components/AccessDenied.js.map +1 -1
- package/dist/admin/components/ActivityFeed.js +4 -4
- package/dist/admin/components/ActivityFeed.js.map +1 -1
- package/dist/admin/components/Charts.js.map +1 -1
- package/dist/admin/components/ConfirmDialog.js +1 -1
- package/dist/admin/components/ConfirmDialog.js.map +1 -1
- package/dist/admin/components/DataTable.js.map +1 -1
- package/dist/admin/components/FormSheet.js +1 -1
- package/dist/admin/components/FormSheet.js.map +1 -1
- package/dist/admin/components/TenantSsoPanel.js +1 -1
- package/dist/admin/components/TenantSsoPanel.js.map +1 -1
- package/dist/admin/components/Toast.js +11 -11
- package/dist/admin/components/Toast.js.map +1 -1
- package/dist/admin/components/forms/SubscriptionForm.js +2 -2
- package/dist/admin/components/forms/SubscriptionForm.js.map +1 -1
- package/dist/admin/components/forms/TenantForm.js +1 -1
- package/dist/admin/components/forms/UserForm.js +1 -1
- package/dist/admin/components/ui.js +3 -3
- package/dist/admin/components/ui.js.map +1 -1
- package/dist/admin/constants/featureFlags.js +12 -0
- package/dist/admin/constants/featureFlags.js.map +1 -0
- package/dist/admin/constants/index.js +33 -24
- package/dist/admin/constants/index.js.map +1 -1
- package/dist/admin/pages/AuditLogsPage.js +92 -77
- package/dist/admin/pages/AuditLogsPage.js.map +1 -1
- package/dist/admin/pages/BillingPage.js +95 -51
- package/dist/admin/pages/BillingPage.js.map +1 -1
- package/dist/admin/pages/CommunicationsPage.js +97 -92
- package/dist/admin/pages/CommunicationsPage.js.map +1 -1
- package/dist/admin/pages/ContentPagesPage.js +274 -259
- package/dist/admin/pages/ContentPagesPage.js.map +1 -1
- package/dist/admin/pages/DashboardPage.js +113 -84
- package/dist/admin/pages/DashboardPage.js.map +1 -1
- package/dist/admin/pages/FeatureFlagsPage.js +93 -75
- package/dist/admin/pages/FeatureFlagsPage.js.map +1 -1
- package/dist/admin/pages/OrganizationsListPage.js +105 -87
- package/dist/admin/pages/OrganizationsListPage.js.map +1 -1
- package/dist/admin/pages/ProductsPage.js +138 -130
- package/dist/admin/pages/ProductsPage.js.map +1 -1
- package/dist/admin/pages/ReferralsPage.js +70 -52
- package/dist/admin/pages/ReferralsPage.js.map +1 -1
- package/dist/admin/pages/RolesPermissionsPage.js +136 -118
- package/dist/admin/pages/RolesPermissionsPage.js.map +1 -1
- package/dist/admin/pages/SREPage.js +34 -32
- package/dist/admin/pages/SREPage.js.map +1 -1
- package/dist/admin/pages/SandboxSettingsPage.js +360 -322
- package/dist/admin/pages/SandboxSettingsPage.js.map +1 -1
- package/dist/admin/pages/SettingsPage.js +64 -61
- package/dist/admin/pages/SettingsPage.js.map +1 -1
- package/dist/admin/pages/SyncFailuresPage.js +120 -118
- package/dist/admin/pages/SyncFailuresPage.js.map +1 -1
- package/dist/admin/pages/TenantDetailPage.js +286 -231
- package/dist/admin/pages/TenantDetailPage.js.map +1 -1
- package/dist/admin/pages/TenantFormRoutePage.js +78 -73
- package/dist/admin/pages/TenantFormRoutePage.js.map +1 -1
- package/dist/admin/pages/TenantsListPage.js +182 -155
- package/dist/admin/pages/TenantsListPage.js.map +1 -1
- package/dist/admin/pages/UsersListPage.js +128 -113
- package/dist/admin/pages/UsersListPage.js.map +1 -1
- package/dist/admin/pages/WaitlistPage.js +78 -63
- package/dist/admin/pages/WaitlistPage.js.map +1 -1
- package/dist/admin/pages/WorkflowsPage.js +107 -102
- package/dist/admin/pages/WorkflowsPage.js.map +1 -1
- package/dist/admin/pages/WorkspacesListPage.js +61 -49
- package/dist/admin/pages/WorkspacesListPage.js.map +1 -1
- package/dist/node_modules/@hookform/resolvers/dist/resolvers.js +2 -2
- package/dist/node_modules/@hookform/resolvers/dist/resolvers.js.map +1 -1
- package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js +35 -26
- package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js.map +1 -1
- package/dist/node_modules/react-hook-form/dist/index.esm.js +609 -516
- package/dist/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
|
@@ -9,14 +9,15 @@ import "../components/index.js";
|
|
|
9
9
|
import { useCallback as h, useEffect as g, useState as _ } from "react";
|
|
10
10
|
import { Box as v, CheckSquare as y, Cpu as b, MemoryStick as x, Save as S, Timer as C, Users as w } from "lucide-react";
|
|
11
11
|
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
12
|
+
import { NextSteps as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
|
|
12
13
|
//#region src/admin/pages/SandboxSettingsPage.tsx
|
|
13
|
-
var
|
|
14
|
+
var k = [
|
|
14
15
|
"VIBECONTROLS",
|
|
15
16
|
"AI_BUILDER",
|
|
16
17
|
"WORKFLOW_MULTI_NODE",
|
|
17
18
|
"MISC_SHELL",
|
|
18
19
|
"CUSTOM"
|
|
19
|
-
],
|
|
20
|
+
], A = [
|
|
20
21
|
{
|
|
21
22
|
label: "30 minutes",
|
|
22
23
|
value: 1800
|
|
@@ -41,17 +42,17 @@ var D = [
|
|
|
41
42
|
label: "24 hours",
|
|
42
43
|
value: 86400
|
|
43
44
|
}
|
|
44
|
-
],
|
|
45
|
+
], j = {
|
|
45
46
|
totalActive: 12,
|
|
46
47
|
totalQueued: 3,
|
|
47
48
|
totalCompleted: 847,
|
|
48
49
|
totalFailed: 14
|
|
49
50
|
};
|
|
50
|
-
function
|
|
51
|
+
function M(e) {
|
|
51
52
|
return e ? e.includes("localhost:4000") ? e.replace("localhost:4000", "localhost:4003").replace("/global/", "/workspaces/") : e.includes("/global/") ? e.replace(/\/\/graphql\./, "//graphqlworkspaces.").replace(/\/\/alphagraphql\./, "//alphagraphqlworkspaces.").replace("/global/", "/workspaces/") : "http://localhost:4003/workspaces/graphql" : "http://localhost:4003/workspaces/graphql";
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
-
let { canManageSandbox:
|
|
54
|
+
function N() {
|
|
55
|
+
let { canManageSandbox: N, isLoading: I } = n(), L = e(), { apiGatewayUrl: R, authToken: z, tenantId: B } = t(), V = M(R), [H, U] = _({
|
|
55
56
|
defaultTtl: 3600,
|
|
56
57
|
maxTtl: 14400,
|
|
57
58
|
allowedSandboxTypes: [
|
|
@@ -67,21 +68,21 @@ function j() {
|
|
|
67
68
|
defaultCpuLimit: "2",
|
|
68
69
|
defaultMemoryRequest: "512Mi",
|
|
69
70
|
defaultMemoryLimit: "4Gi"
|
|
70
|
-
}), [
|
|
71
|
+
}), [W, G] = _(!1), [K, q] = _(!1);
|
|
71
72
|
g(() => {
|
|
72
|
-
if (!
|
|
73
|
+
if (!B || I || !N) return;
|
|
73
74
|
let e = { "Content-Type": "application/json" };
|
|
74
|
-
|
|
75
|
+
z && (e.Authorization = `Bearer ${z}`), B && (e["X-Workspace-ID"] = B), q(!0), fetch(V, {
|
|
75
76
|
method: "POST",
|
|
76
77
|
headers: e,
|
|
77
78
|
body: JSON.stringify({
|
|
78
79
|
query: "query GetSandboxConfig($context: ContextInput!) {\n getSandboxConfig(context: $context) {\n id\n defaultTtlSeconds\n maxTtlSeconds\n allowedTemplates\n maxConcurrentPerUser\n maxConcurrentPerWorkspace\n defaultCpuRequest\n defaultCpuLimit\n defaultMemoryRequest\n defaultMemoryLimit\n }\n }",
|
|
79
|
-
variables: { context: { workspaceId:
|
|
80
|
+
variables: { context: { workspaceId: B } }
|
|
80
81
|
})
|
|
81
82
|
}).then((e) => e.json()).then((e) => {
|
|
82
83
|
if (e.data?.getSandboxConfig) {
|
|
83
84
|
let t = e.data.getSandboxConfig;
|
|
84
|
-
|
|
85
|
+
U({
|
|
85
86
|
defaultTtl: t.defaultTtlSeconds,
|
|
86
87
|
maxTtl: t.maxTtlSeconds,
|
|
87
88
|
allowedSandboxTypes: t.allowedTemplates,
|
|
@@ -94,387 +95,424 @@ function j() {
|
|
|
94
95
|
});
|
|
95
96
|
}
|
|
96
97
|
}).catch((e) => {
|
|
97
|
-
console.error("Failed to load sandbox config:", e),
|
|
98
|
-
}).finally(() =>
|
|
98
|
+
console.error("Failed to load sandbox config:", e), L.error("Load Failed", "Failed to load sandbox configuration.");
|
|
99
|
+
}).finally(() => q(!1));
|
|
99
100
|
}, [
|
|
100
|
-
|
|
101
|
-
L,
|
|
101
|
+
B,
|
|
102
102
|
z,
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
V,
|
|
104
|
+
I,
|
|
105
|
+
N
|
|
105
106
|
]);
|
|
106
|
-
let
|
|
107
|
-
|
|
107
|
+
let J = h((e, t) => {
|
|
108
|
+
U((n) => ({
|
|
108
109
|
...n,
|
|
109
110
|
[e]: t
|
|
110
111
|
}));
|
|
111
|
-
}, []),
|
|
112
|
-
|
|
112
|
+
}, []), Y = h((e) => {
|
|
113
|
+
U((t) => {
|
|
113
114
|
let n = t.allowedSandboxTypes.includes(e) ? t.allowedSandboxTypes.filter((t) => t !== e) : [...t.allowedSandboxTypes, e];
|
|
114
115
|
return {
|
|
115
116
|
...t,
|
|
116
117
|
allowedSandboxTypes: n
|
|
117
118
|
};
|
|
118
119
|
});
|
|
119
|
-
}, []),
|
|
120
|
-
if (
|
|
121
|
-
|
|
120
|
+
}, []), X = h(async () => {
|
|
121
|
+
if (H.maxTtl < H.defaultTtl) {
|
|
122
|
+
L.error("Validation Error", "Max TTL must be greater than or equal to Default TTL.");
|
|
122
123
|
return;
|
|
123
124
|
}
|
|
124
|
-
if (
|
|
125
|
-
|
|
125
|
+
if (H.allowedSandboxTypes.length === 0) {
|
|
126
|
+
L.error("Validation Error", "At least one sandbox type must be allowed.");
|
|
126
127
|
return;
|
|
127
128
|
}
|
|
128
|
-
|
|
129
|
+
G(!0);
|
|
129
130
|
try {
|
|
130
131
|
let e = { "Content-Type": "application/json" };
|
|
131
|
-
|
|
132
|
-
let t = await (await fetch(
|
|
132
|
+
z && (e.Authorization = `Bearer ${z}`), B && (e["X-Workspace-ID"] = B);
|
|
133
|
+
let t = await (await fetch(V, {
|
|
133
134
|
method: "POST",
|
|
134
135
|
headers: e,
|
|
135
136
|
body: JSON.stringify({
|
|
136
137
|
query: "mutation UpdateSandboxConfig($input: UpdateSandboxConfigInput!) {\n updateSandboxConfig(input: $input) {\n id\n defaultTtlSeconds\n maxTtlSeconds\n allowedTemplates\n maxConcurrentPerUser\n maxConcurrentPerWorkspace\n defaultCpuRequest\n defaultCpuLimit\n defaultMemoryRequest\n defaultMemoryLimit\n }\n }",
|
|
137
138
|
variables: { input: {
|
|
138
|
-
defaultTtlSeconds:
|
|
139
|
-
maxTtlSeconds:
|
|
140
|
-
allowedTemplates:
|
|
141
|
-
maxConcurrentPerUser:
|
|
142
|
-
maxConcurrentPerWorkspace:
|
|
143
|
-
defaultCpuRequest:
|
|
144
|
-
defaultCpuLimit:
|
|
145
|
-
defaultMemoryRequest:
|
|
146
|
-
defaultMemoryLimit:
|
|
147
|
-
context: { workspaceId:
|
|
139
|
+
defaultTtlSeconds: H.defaultTtl,
|
|
140
|
+
maxTtlSeconds: H.maxTtl,
|
|
141
|
+
allowedTemplates: H.allowedSandboxTypes,
|
|
142
|
+
maxConcurrentPerUser: H.maxConcurrentPerUser,
|
|
143
|
+
maxConcurrentPerWorkspace: H.maxConcurrentPerWorkspace,
|
|
144
|
+
defaultCpuRequest: H.defaultCpuRequest,
|
|
145
|
+
defaultCpuLimit: H.defaultCpuLimit,
|
|
146
|
+
defaultMemoryRequest: H.defaultMemoryRequest,
|
|
147
|
+
defaultMemoryLimit: H.defaultMemoryLimit,
|
|
148
|
+
context: { workspaceId: B }
|
|
148
149
|
} }
|
|
149
150
|
})
|
|
150
151
|
})).json();
|
|
151
152
|
if (t.errors) throw Error(t.errors[0]?.message || "Failed to save sandbox configuration");
|
|
152
|
-
|
|
153
|
+
L.success("Settings Saved", "Sandbox configuration has been updated successfully.");
|
|
153
154
|
} catch (e) {
|
|
154
|
-
|
|
155
|
+
L.error("Save Failed", e instanceof Error ? e.message : "Failed to update sandbox configuration. Please try again.");
|
|
155
156
|
} finally {
|
|
156
|
-
|
|
157
|
+
G(!1);
|
|
157
158
|
}
|
|
158
159
|
}, [
|
|
159
|
-
|
|
160
|
-
F,
|
|
160
|
+
H,
|
|
161
161
|
L,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
z,
|
|
163
|
+
B,
|
|
164
|
+
V
|
|
165
|
+
]), Z = "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm";
|
|
165
166
|
return /* @__PURE__ */ T(m, {
|
|
166
|
-
allowed:
|
|
167
|
-
isLoading:
|
|
167
|
+
allowed: N,
|
|
168
|
+
isLoading: I,
|
|
168
169
|
pageTitle: "Sandbox Settings",
|
|
169
170
|
denyMessage: "You don't have permission to manage sandbox settings.",
|
|
170
171
|
children: /* @__PURE__ */ E(d, {
|
|
171
172
|
title: "Sandbox Settings",
|
|
172
173
|
gradientWord: "Settings",
|
|
173
174
|
description: "Configure platform-wide sandbox defaults and resource limits",
|
|
174
|
-
children: [
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
175
|
+
children: [
|
|
176
|
+
/* @__PURE__ */ T(O, {
|
|
177
|
+
className: "mb-6",
|
|
178
|
+
children: "Sandboxes are the disposable, isolated environments users spin up to safely run or preview their code without touching anything real. This page sets the platform-wide defaults for them — how long a sandbox lives before it's cleaned up, how much CPU and memory it gets, and how many a user or tenant may run at once. Tune these to balance a smooth experience against runaway resource costs."
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ T(D, {
|
|
181
|
+
storageKey: "admin-sandbox",
|
|
182
|
+
steps: [
|
|
183
|
+
{
|
|
184
|
+
id: "set-ttl",
|
|
185
|
+
label: "Set the sandbox TTL",
|
|
186
|
+
description: "Decide how long idle sandboxes live before automatic cleanup.",
|
|
187
|
+
href: "#ttl"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: "set-limits",
|
|
191
|
+
label: "Cap CPU & memory",
|
|
192
|
+
description: "Set the resource ceiling each sandbox is allowed.",
|
|
193
|
+
href: "#resources"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: "save-config",
|
|
197
|
+
label: "Save your configuration",
|
|
198
|
+
description: "Apply these defaults across the whole platform.",
|
|
199
|
+
onClick: () => void X()
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
}),
|
|
203
|
+
/* @__PURE__ */ E(i, {
|
|
204
|
+
className: "mb-6",
|
|
205
|
+
children: [/* @__PURE__ */ E(s, { children: [/* @__PURE__ */ E("div", {
|
|
206
|
+
className: "flex items-center gap-2",
|
|
207
|
+
children: [/* @__PURE__ */ T(v, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ T(c, {
|
|
208
|
+
className: "text-lg",
|
|
209
|
+
children: "Sandbox Stats"
|
|
210
|
+
})]
|
|
211
|
+
}), /* @__PURE__ */ T(o, { children: "Current sandbox usage across the platform" })] }), /* @__PURE__ */ T(a, { children: /* @__PURE__ */ E(p, { children: [
|
|
212
|
+
/* @__PURE__ */ T(f, {
|
|
213
|
+
title: "Active Sandboxes",
|
|
214
|
+
hero: !0,
|
|
215
|
+
value: j.totalActive,
|
|
216
|
+
trend: "up"
|
|
217
|
+
}),
|
|
218
|
+
/* @__PURE__ */ T(f, {
|
|
219
|
+
title: "Queued",
|
|
220
|
+
value: j.totalQueued
|
|
221
|
+
}),
|
|
222
|
+
/* @__PURE__ */ T(f, {
|
|
223
|
+
title: "Completed (all time)",
|
|
224
|
+
value: j.totalCompleted
|
|
225
|
+
}),
|
|
226
|
+
/* @__PURE__ */ T(f, {
|
|
227
|
+
title: "Failed (all time)",
|
|
228
|
+
value: j.totalFailed,
|
|
229
|
+
trend: "down"
|
|
230
|
+
})
|
|
231
|
+
] }) })]
|
|
232
|
+
}),
|
|
233
|
+
/* @__PURE__ */ E("div", {
|
|
234
|
+
className: "grid gap-6 lg:grid-cols-3",
|
|
235
|
+
children: [/* @__PURE__ */ E("div", {
|
|
236
|
+
className: "space-y-6 lg:col-span-2",
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ E(i, {
|
|
239
|
+
id: "ttl",
|
|
240
|
+
children: [/* @__PURE__ */ E(s, { children: [/* @__PURE__ */ E("div", {
|
|
241
|
+
className: "flex items-center gap-2",
|
|
242
|
+
children: [/* @__PURE__ */ T(C, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ T(c, {
|
|
243
|
+
className: "text-lg",
|
|
244
|
+
children: "Time-to-Live (TTL)"
|
|
245
|
+
})]
|
|
246
|
+
}), /* @__PURE__ */ T(o, { children: "Control how long sandboxes stay alive before automatic cleanup" })] }), /* @__PURE__ */ T(a, {
|
|
247
|
+
className: "space-y-4",
|
|
248
|
+
children: /* @__PURE__ */ E("div", {
|
|
249
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
250
|
+
children: [/* @__PURE__ */ E("div", {
|
|
251
|
+
className: "space-y-2",
|
|
252
|
+
children: [
|
|
253
|
+
/* @__PURE__ */ T("label", {
|
|
254
|
+
className: "text-sm font-medium",
|
|
255
|
+
children: "Default TTL"
|
|
256
|
+
}),
|
|
257
|
+
/* @__PURE__ */ T("select", {
|
|
258
|
+
className: Z,
|
|
259
|
+
value: H.defaultTtl,
|
|
260
|
+
onChange: (e) => J("defaultTtl", Number(e.target.value)),
|
|
261
|
+
children: A.map((e) => /* @__PURE__ */ T("option", {
|
|
262
|
+
value: e.value,
|
|
263
|
+
children: e.label
|
|
264
|
+
}, e.value))
|
|
265
|
+
}),
|
|
266
|
+
/* @__PURE__ */ T("p", {
|
|
267
|
+
className: "text-xs text-text-secondary",
|
|
268
|
+
children: "Default lifetime for new sandboxes"
|
|
269
|
+
})
|
|
270
|
+
]
|
|
271
|
+
}), /* @__PURE__ */ E("div", {
|
|
272
|
+
className: "space-y-2",
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ T("label", {
|
|
275
|
+
className: "text-sm font-medium",
|
|
276
|
+
children: "Max TTL"
|
|
277
|
+
}),
|
|
278
|
+
/* @__PURE__ */ T("select", {
|
|
279
|
+
className: Z,
|
|
280
|
+
value: H.maxTtl,
|
|
281
|
+
onChange: (e) => J("maxTtl", Number(e.target.value)),
|
|
282
|
+
children: A.map((e) => /* @__PURE__ */ T("option", {
|
|
283
|
+
value: e.value,
|
|
284
|
+
children: e.label
|
|
285
|
+
}, e.value))
|
|
286
|
+
}),
|
|
287
|
+
/* @__PURE__ */ T("p", {
|
|
288
|
+
className: "text-xs text-text-secondary",
|
|
289
|
+
children: "Maximum allowed TTL (must be >= default)"
|
|
290
|
+
})
|
|
291
|
+
]
|
|
292
|
+
})]
|
|
293
|
+
})
|
|
294
|
+
})]
|
|
295
|
+
}),
|
|
296
|
+
/* @__PURE__ */ E(i, { children: [/* @__PURE__ */ E(s, { children: [/* @__PURE__ */ E("div", {
|
|
297
|
+
className: "flex items-center gap-2",
|
|
298
|
+
children: [/* @__PURE__ */ T(y, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ T(c, {
|
|
299
|
+
className: "text-lg",
|
|
300
|
+
children: "Allowed Sandbox Types"
|
|
301
|
+
})]
|
|
302
|
+
}), /* @__PURE__ */ T(o, { children: "Select which sandbox types users are permitted to create" })] }), /* @__PURE__ */ T(a, { children: /* @__PURE__ */ T("div", {
|
|
303
|
+
className: "space-y-3",
|
|
304
|
+
children: k.map((e) => /* @__PURE__ */ E("label", {
|
|
305
|
+
className: "flex items-center gap-3 rounded-lg border border-border-subtle p-4 cursor-pointer hover:bg-bg-sunken/50 transition-colors",
|
|
306
|
+
children: [/* @__PURE__ */ T("input", {
|
|
307
|
+
type: "checkbox",
|
|
308
|
+
checked: H.allowedSandboxTypes.includes(e),
|
|
309
|
+
onChange: () => Y(e),
|
|
310
|
+
className: "h-4 w-4 rounded border-border-default text-primary focus:ring-primary"
|
|
311
|
+
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("div", {
|
|
312
|
+
className: "font-medium text-sm",
|
|
313
|
+
children: P(e)
|
|
314
|
+
}), /* @__PURE__ */ T("div", {
|
|
315
|
+
className: "text-xs text-text-secondary",
|
|
316
|
+
children: F(e)
|
|
317
|
+
})] })]
|
|
318
|
+
}, e))
|
|
319
|
+
}) })] }),
|
|
320
|
+
/* @__PURE__ */ E(i, {
|
|
321
|
+
id: "resources",
|
|
322
|
+
children: [/* @__PURE__ */ E(s, { children: [/* @__PURE__ */ E("div", {
|
|
323
|
+
className: "flex items-center gap-2",
|
|
324
|
+
children: [/* @__PURE__ */ T(b, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ T(c, {
|
|
325
|
+
className: "text-lg",
|
|
326
|
+
children: "Default Resource Limits"
|
|
327
|
+
})]
|
|
328
|
+
}), /* @__PURE__ */ T(o, { children: "Kubernetes resource requests and limits applied to new sandboxes" })] }), /* @__PURE__ */ E(a, {
|
|
329
|
+
className: "space-y-4",
|
|
240
330
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
className: "
|
|
243
|
-
children: "
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
331
|
+
/* @__PURE__ */ E("div", {
|
|
332
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
333
|
+
children: [/* @__PURE__ */ E("div", {
|
|
334
|
+
className: "space-y-2",
|
|
335
|
+
children: [
|
|
336
|
+
/* @__PURE__ */ T("label", {
|
|
337
|
+
className: "text-sm font-medium",
|
|
338
|
+
children: "CPU Request"
|
|
339
|
+
}),
|
|
340
|
+
/* @__PURE__ */ T(l, {
|
|
341
|
+
value: H.defaultCpuRequest,
|
|
342
|
+
onChange: (e) => J("defaultCpuRequest", e.target.value),
|
|
343
|
+
placeholder: "500m"
|
|
344
|
+
}),
|
|
345
|
+
/* @__PURE__ */ T("p", {
|
|
346
|
+
className: "text-xs text-text-secondary",
|
|
347
|
+
children: "Kubernetes CPU request (e.g. 500m, 1)"
|
|
348
|
+
})
|
|
349
|
+
]
|
|
350
|
+
}), /* @__PURE__ */ E("div", {
|
|
351
|
+
className: "space-y-2",
|
|
352
|
+
children: [
|
|
353
|
+
/* @__PURE__ */ T("label", {
|
|
354
|
+
className: "text-sm font-medium",
|
|
355
|
+
children: "CPU Limit"
|
|
356
|
+
}),
|
|
357
|
+
/* @__PURE__ */ T(l, {
|
|
358
|
+
value: H.defaultCpuLimit,
|
|
359
|
+
onChange: (e) => J("defaultCpuLimit", e.target.value),
|
|
360
|
+
placeholder: "2"
|
|
361
|
+
}),
|
|
362
|
+
/* @__PURE__ */ T("p", {
|
|
363
|
+
className: "text-xs text-text-secondary",
|
|
364
|
+
children: "Kubernetes CPU limit (e.g. 1, 2, 4)"
|
|
365
|
+
})
|
|
366
|
+
]
|
|
367
|
+
})]
|
|
253
368
|
}),
|
|
254
|
-
/* @__PURE__ */ T(
|
|
255
|
-
|
|
256
|
-
|
|
369
|
+
/* @__PURE__ */ T(u, {}),
|
|
370
|
+
/* @__PURE__ */ E("div", {
|
|
371
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
372
|
+
children: [/* @__PURE__ */ E("div", {
|
|
373
|
+
className: "space-y-2",
|
|
374
|
+
children: [
|
|
375
|
+
/* @__PURE__ */ T("label", {
|
|
376
|
+
className: "text-sm font-medium",
|
|
377
|
+
children: "Memory Request"
|
|
378
|
+
}),
|
|
379
|
+
/* @__PURE__ */ T(l, {
|
|
380
|
+
value: H.defaultMemoryRequest,
|
|
381
|
+
onChange: (e) => J("defaultMemoryRequest", e.target.value),
|
|
382
|
+
placeholder: "512Mi"
|
|
383
|
+
}),
|
|
384
|
+
/* @__PURE__ */ T("p", {
|
|
385
|
+
className: "text-xs text-text-secondary",
|
|
386
|
+
children: "Kubernetes memory request (e.g. 512Mi, 1Gi)"
|
|
387
|
+
})
|
|
388
|
+
]
|
|
389
|
+
}), /* @__PURE__ */ E("div", {
|
|
390
|
+
className: "space-y-2",
|
|
391
|
+
children: [
|
|
392
|
+
/* @__PURE__ */ T("label", {
|
|
393
|
+
className: "text-sm font-medium",
|
|
394
|
+
children: "Memory Limit"
|
|
395
|
+
}),
|
|
396
|
+
/* @__PURE__ */ T(l, {
|
|
397
|
+
value: H.defaultMemoryLimit,
|
|
398
|
+
onChange: (e) => J("defaultMemoryLimit", e.target.value),
|
|
399
|
+
placeholder: "4Gi"
|
|
400
|
+
}),
|
|
401
|
+
/* @__PURE__ */ T("p", {
|
|
402
|
+
className: "text-xs text-text-secondary",
|
|
403
|
+
children: "Kubernetes memory limit (e.g. 2Gi, 4Gi, 8Gi)"
|
|
404
|
+
})
|
|
405
|
+
]
|
|
406
|
+
})]
|
|
257
407
|
})
|
|
258
408
|
]
|
|
259
409
|
})]
|
|
260
410
|
})
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
onChange: () => q(e),
|
|
276
|
-
className: "h-4 w-4 rounded border-border-default text-primary focus:ring-primary"
|
|
277
|
-
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("div", {
|
|
278
|
-
className: "font-medium text-sm",
|
|
279
|
-
children: M(e)
|
|
280
|
-
}), /* @__PURE__ */ T("div", {
|
|
281
|
-
className: "text-xs text-text-secondary",
|
|
282
|
-
children: N(e)
|
|
283
|
-
})] })]
|
|
284
|
-
}, e))
|
|
285
|
-
}) })] }),
|
|
286
|
-
/* @__PURE__ */ E(i, { children: [/* @__PURE__ */ E(s, { children: [/* @__PURE__ */ E("div", {
|
|
287
|
-
className: "flex items-center gap-2",
|
|
288
|
-
children: [/* @__PURE__ */ T(b, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ T(c, {
|
|
289
|
-
className: "text-lg",
|
|
290
|
-
children: "Default Resource Limits"
|
|
291
|
-
})]
|
|
292
|
-
}), /* @__PURE__ */ T(o, { children: "Kubernetes resource requests and limits applied to new sandboxes" })] }), /* @__PURE__ */ E(a, {
|
|
293
|
-
className: "space-y-4",
|
|
294
|
-
children: [
|
|
295
|
-
/* @__PURE__ */ E("div", {
|
|
296
|
-
className: "grid gap-4 sm:grid-cols-2",
|
|
297
|
-
children: [/* @__PURE__ */ E("div", {
|
|
298
|
-
className: "space-y-2",
|
|
299
|
-
children: [
|
|
300
|
-
/* @__PURE__ */ T("label", {
|
|
301
|
-
className: "text-sm font-medium",
|
|
302
|
-
children: "CPU Request"
|
|
303
|
-
}),
|
|
304
|
-
/* @__PURE__ */ T(l, {
|
|
305
|
-
value: B.defaultCpuRequest,
|
|
306
|
-
onChange: (e) => K("defaultCpuRequest", e.target.value),
|
|
307
|
-
placeholder: "500m"
|
|
308
|
-
}),
|
|
309
|
-
/* @__PURE__ */ T("p", {
|
|
310
|
-
className: "text-xs text-text-secondary",
|
|
311
|
-
children: "Kubernetes CPU request (e.g. 500m, 1)"
|
|
312
|
-
})
|
|
313
|
-
]
|
|
314
|
-
}), /* @__PURE__ */ E("div", {
|
|
315
|
-
className: "space-y-2",
|
|
316
|
-
children: [
|
|
317
|
-
/* @__PURE__ */ T("label", {
|
|
318
|
-
className: "text-sm font-medium",
|
|
319
|
-
children: "CPU Limit"
|
|
320
|
-
}),
|
|
321
|
-
/* @__PURE__ */ T(l, {
|
|
322
|
-
value: B.defaultCpuLimit,
|
|
323
|
-
onChange: (e) => K("defaultCpuLimit", e.target.value),
|
|
324
|
-
placeholder: "2"
|
|
325
|
-
}),
|
|
326
|
-
/* @__PURE__ */ T("p", {
|
|
327
|
-
className: "text-xs text-text-secondary",
|
|
328
|
-
children: "Kubernetes CPU limit (e.g. 1, 2, 4)"
|
|
329
|
-
})
|
|
330
|
-
]
|
|
331
|
-
})]
|
|
332
|
-
}),
|
|
333
|
-
/* @__PURE__ */ T(u, {}),
|
|
334
|
-
/* @__PURE__ */ E("div", {
|
|
335
|
-
className: "grid gap-4 sm:grid-cols-2",
|
|
336
|
-
children: [/* @__PURE__ */ E("div", {
|
|
411
|
+
]
|
|
412
|
+
}), /* @__PURE__ */ E("div", {
|
|
413
|
+
className: "space-y-6",
|
|
414
|
+
children: [
|
|
415
|
+
/* @__PURE__ */ E(i, { children: [/* @__PURE__ */ T(s, { children: /* @__PURE__ */ E("div", {
|
|
416
|
+
className: "flex items-center gap-2",
|
|
417
|
+
children: [/* @__PURE__ */ T(w, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ T(c, {
|
|
418
|
+
className: "text-lg",
|
|
419
|
+
children: "Concurrency"
|
|
420
|
+
})]
|
|
421
|
+
}) }), /* @__PURE__ */ E(a, {
|
|
422
|
+
className: "space-y-4",
|
|
423
|
+
children: [
|
|
424
|
+
/* @__PURE__ */ E("div", {
|
|
337
425
|
className: "space-y-2",
|
|
338
426
|
children: [
|
|
339
427
|
/* @__PURE__ */ T("label", {
|
|
340
428
|
className: "text-sm font-medium",
|
|
341
|
-
children: "
|
|
429
|
+
children: "Max Per User"
|
|
342
430
|
}),
|
|
343
431
|
/* @__PURE__ */ T(l, {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
432
|
+
type: "number",
|
|
433
|
+
min: 1,
|
|
434
|
+
max: 50,
|
|
435
|
+
value: H.maxConcurrentPerUser,
|
|
436
|
+
onChange: (e) => J("maxConcurrentPerUser", Number(e.target.value))
|
|
347
437
|
}),
|
|
348
438
|
/* @__PURE__ */ T("p", {
|
|
349
439
|
className: "text-xs text-text-secondary",
|
|
350
|
-
children: "
|
|
440
|
+
children: "Maximum concurrent sandboxes per user"
|
|
351
441
|
})
|
|
352
442
|
]
|
|
353
|
-
}),
|
|
443
|
+
}),
|
|
444
|
+
/* @__PURE__ */ T(u, {}),
|
|
445
|
+
/* @__PURE__ */ E("div", {
|
|
354
446
|
className: "space-y-2",
|
|
355
447
|
children: [
|
|
356
448
|
/* @__PURE__ */ T("label", {
|
|
357
449
|
className: "text-sm font-medium",
|
|
358
|
-
children: "
|
|
450
|
+
children: "Max Per Workspace"
|
|
359
451
|
}),
|
|
360
452
|
/* @__PURE__ */ T(l, {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
453
|
+
type: "number",
|
|
454
|
+
min: 1,
|
|
455
|
+
max: 200,
|
|
456
|
+
value: H.maxConcurrentPerWorkspace,
|
|
457
|
+
onChange: (e) => J("maxConcurrentPerWorkspace", Number(e.target.value))
|
|
364
458
|
}),
|
|
365
459
|
/* @__PURE__ */ T("p", {
|
|
366
460
|
className: "text-xs text-text-secondary",
|
|
367
|
-
children: "
|
|
461
|
+
children: "Maximum concurrent sandboxes per workspace"
|
|
368
462
|
})
|
|
369
463
|
]
|
|
370
|
-
})
|
|
371
|
-
|
|
372
|
-
]
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
/* @__PURE__ */ T("p", {
|
|
402
|
-
className: "text-xs text-text-secondary",
|
|
403
|
-
children: "Maximum concurrent sandboxes per user"
|
|
404
|
-
})
|
|
405
|
-
]
|
|
406
|
-
}),
|
|
407
|
-
/* @__PURE__ */ T(u, {}),
|
|
408
|
-
/* @__PURE__ */ E("div", {
|
|
409
|
-
className: "space-y-2",
|
|
410
|
-
children: [
|
|
411
|
-
/* @__PURE__ */ T("label", {
|
|
412
|
-
className: "text-sm font-medium",
|
|
413
|
-
children: "Max Per Workspace"
|
|
414
|
-
}),
|
|
415
|
-
/* @__PURE__ */ T(l, {
|
|
416
|
-
type: "number",
|
|
417
|
-
min: 1,
|
|
418
|
-
max: 200,
|
|
419
|
-
value: B.maxConcurrentPerWorkspace,
|
|
420
|
-
onChange: (e) => K("maxConcurrentPerWorkspace", Number(e.target.value))
|
|
421
|
-
}),
|
|
422
|
-
/* @__PURE__ */ T("p", {
|
|
423
|
-
className: "text-xs text-text-secondary",
|
|
424
|
-
children: "Maximum concurrent sandboxes per workspace"
|
|
425
|
-
})
|
|
426
|
-
]
|
|
427
|
-
})
|
|
428
|
-
]
|
|
429
|
-
})] }),
|
|
430
|
-
/* @__PURE__ */ E(i, { children: [/* @__PURE__ */ T(s, { children: /* @__PURE__ */ E("div", {
|
|
431
|
-
className: "flex items-center gap-2",
|
|
432
|
-
children: [/* @__PURE__ */ T(x, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ T(c, {
|
|
433
|
-
className: "text-lg",
|
|
434
|
-
children: "Resource Info"
|
|
435
|
-
})]
|
|
436
|
-
}) }), /* @__PURE__ */ E(a, {
|
|
437
|
-
className: "space-y-3",
|
|
438
|
-
children: [
|
|
439
|
-
/* @__PURE__ */ T("p", {
|
|
440
|
-
className: "text-sm text-text-secondary",
|
|
441
|
-
children: "Resource defaults are applied to all new sandboxes. Individual sandboxes can override these within the max limits defined by the sandbox type."
|
|
442
|
-
}),
|
|
443
|
-
/* @__PURE__ */ T(u, {}),
|
|
444
|
-
/* @__PURE__ */ E("div", {
|
|
445
|
-
className: "space-y-2 text-xs text-text-secondary",
|
|
446
|
-
children: [/* @__PURE__ */ E("div", {
|
|
447
|
-
className: "flex justify-between",
|
|
448
|
-
children: [/* @__PURE__ */ T("span", { children: "CPU units" }), /* @__PURE__ */ T("span", {
|
|
449
|
-
className: "font-mono",
|
|
450
|
-
children: "millicores (m)"
|
|
451
|
-
})]
|
|
452
|
-
}), /* @__PURE__ */ E("div", {
|
|
453
|
-
className: "flex justify-between",
|
|
454
|
-
children: [/* @__PURE__ */ T("span", { children: "Memory units" }), /* @__PURE__ */ T("span", {
|
|
455
|
-
className: "font-mono",
|
|
456
|
-
children: "Mi / Gi"
|
|
464
|
+
})
|
|
465
|
+
]
|
|
466
|
+
})] }),
|
|
467
|
+
/* @__PURE__ */ E(i, { children: [/* @__PURE__ */ T(s, { children: /* @__PURE__ */ E("div", {
|
|
468
|
+
className: "flex items-center gap-2",
|
|
469
|
+
children: [/* @__PURE__ */ T(x, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ T(c, {
|
|
470
|
+
className: "text-lg",
|
|
471
|
+
children: "Resource Info"
|
|
472
|
+
})]
|
|
473
|
+
}) }), /* @__PURE__ */ E(a, {
|
|
474
|
+
className: "space-y-3",
|
|
475
|
+
children: [
|
|
476
|
+
/* @__PURE__ */ T("p", {
|
|
477
|
+
className: "text-sm text-text-secondary",
|
|
478
|
+
children: "Resource defaults are applied to all new sandboxes. Individual sandboxes can override these within the max limits defined by the sandbox type."
|
|
479
|
+
}),
|
|
480
|
+
/* @__PURE__ */ T(u, {}),
|
|
481
|
+
/* @__PURE__ */ E("div", {
|
|
482
|
+
className: "space-y-2 text-xs text-text-secondary",
|
|
483
|
+
children: [/* @__PURE__ */ E("div", {
|
|
484
|
+
className: "flex justify-between",
|
|
485
|
+
children: [/* @__PURE__ */ T("span", { children: "CPU units" }), /* @__PURE__ */ T("span", {
|
|
486
|
+
className: "font-mono",
|
|
487
|
+
children: "millicores (m)"
|
|
488
|
+
})]
|
|
489
|
+
}), /* @__PURE__ */ E("div", {
|
|
490
|
+
className: "flex justify-between",
|
|
491
|
+
children: [/* @__PURE__ */ T("span", { children: "Memory units" }), /* @__PURE__ */ T("span", {
|
|
492
|
+
className: "font-mono",
|
|
493
|
+
children: "Mi / Gi"
|
|
494
|
+
})]
|
|
457
495
|
})]
|
|
458
|
-
})
|
|
496
|
+
})
|
|
497
|
+
]
|
|
498
|
+
})] }),
|
|
499
|
+
/* @__PURE__ */ T(i, { children: /* @__PURE__ */ T(a, {
|
|
500
|
+
className: "p-6",
|
|
501
|
+
children: /* @__PURE__ */ E(r, {
|
|
502
|
+
className: "w-full",
|
|
503
|
+
onClick: X,
|
|
504
|
+
disabled: W || K,
|
|
505
|
+
children: [/* @__PURE__ */ T(S, { className: "mr-2 h-4 w-4" }), W ? "Saving..." : K ? "Loading..." : "Save Configuration"]
|
|
459
506
|
})
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
className: "w-full",
|
|
466
|
-
onClick: J,
|
|
467
|
-
disabled: H || W,
|
|
468
|
-
children: [/* @__PURE__ */ T(S, { className: "mr-2 h-4 w-4" }), H ? "Saving..." : W ? "Loading..." : "Save Configuration"]
|
|
469
|
-
})
|
|
470
|
-
}) })
|
|
471
|
-
]
|
|
472
|
-
})]
|
|
473
|
-
})]
|
|
507
|
+
}) })
|
|
508
|
+
]
|
|
509
|
+
})]
|
|
510
|
+
})
|
|
511
|
+
]
|
|
474
512
|
})
|
|
475
513
|
});
|
|
476
514
|
}
|
|
477
|
-
function
|
|
515
|
+
function P(e) {
|
|
478
516
|
return {
|
|
479
517
|
VIBECONTROLS: "VibeControls",
|
|
480
518
|
AI_BUILDER: "AI Builder",
|
|
@@ -483,7 +521,7 @@ function M(e) {
|
|
|
483
521
|
CUSTOM: "Custom"
|
|
484
522
|
}[e];
|
|
485
523
|
}
|
|
486
|
-
function
|
|
524
|
+
function F(e) {
|
|
487
525
|
return {
|
|
488
526
|
VIBECONTROLS: "Full VibeControls development environment with pre-configured tooling",
|
|
489
527
|
AI_BUILDER: "AI agent development sandbox with OpenCode SDK and model access",
|
|
@@ -493,6 +531,6 @@ function N(e) {
|
|
|
493
531
|
}[e];
|
|
494
532
|
}
|
|
495
533
|
//#endregion
|
|
496
|
-
export {
|
|
534
|
+
export { N as SandboxSettingsPage };
|
|
497
535
|
|
|
498
536
|
//# sourceMappingURL=SandboxSettingsPage.js.map
|