@burdenoff/microfe-sandbox 2026.1101.2 → 2026.1109.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/dev/Dashboard.d.ts +1 -2
- package/dist/dev/SandboxApp.d.ts +1 -2
- package/dist/dev/main.d.ts +0 -2
- package/dist/generated/global-operations.d.ts +4 -2
- package/dist/generated/global-types.d.ts +2 -22
- package/dist/generated/wspace-operations.d.ts +525 -438
- package/dist/generated/wspace-operations.js +2 -3
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +4 -24
- package/dist/generated/wspace-types.js +1 -2
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/node_modules/clsx/dist/clsx.js +8 -7
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/sandbox/AdminRoutes.d.ts +1 -2
- package/dist/sandbox/AdminRoutes.js +1 -2
- package/dist/sandbox/AdminRoutes.js.map +1 -1
- package/dist/sandbox/SandboxAdminRoot.d.ts +0 -2
- package/dist/sandbox/SandboxAdminRoot.js +13 -10
- package/dist/sandbox/SandboxAdminRoot.js.map +1 -1
- package/dist/sandbox/SandboxRoot.d.ts +0 -2
- package/dist/sandbox/SandboxRoot.js +13 -10
- package/dist/sandbox/SandboxRoot.js.map +1 -1
- package/dist/sandbox/UserRoutes.d.ts +1 -2
- package/dist/sandbox/UserRoutes.js +1 -2
- package/dist/sandbox/UserRoutes.js.map +1 -1
- package/dist/sandbox/components/ContainerImagePicker.d.ts +1 -2
- package/dist/sandbox/components/CountdownTimer.d.ts +1 -2
- package/dist/sandbox/components/CountdownTimer.js +1 -2
- package/dist/sandbox/components/CountdownTimer.js.map +1 -1
- package/dist/sandbox/components/ExportSandboxesDialog.d.ts +1 -2
- package/dist/sandbox/components/ExportSandboxesDialog.js +22 -23
- package/dist/sandbox/components/ExportSandboxesDialog.js.map +1 -1
- package/dist/sandbox/components/ExtendTTLModal.d.ts +1 -2
- package/dist/sandbox/components/ExtendTTLModal.js +1 -2
- package/dist/sandbox/components/ExtendTTLModal.js.map +1 -1
- package/dist/sandbox/components/FilesFolderPicker.d.ts +1 -2
- package/dist/sandbox/components/FilesFolderPicker.js +1 -2
- package/dist/sandbox/components/FilesFolderPicker.js.map +1 -1
- package/dist/sandbox/components/PageLayout.d.ts +2 -4
- package/dist/sandbox/components/PageLayout.js +1 -2
- package/dist/sandbox/components/PageLayout.js.map +1 -1
- package/dist/sandbox/components/ResourceDisplay.d.ts +0 -2
- package/dist/sandbox/components/ResourceDisplay.js +1 -2
- package/dist/sandbox/components/ResourceDisplay.js.map +1 -1
- package/dist/sandbox/components/RouteUtils.d.ts +2 -4
- package/dist/sandbox/components/RouteUtils.js +2 -7
- package/dist/sandbox/components/RouteUtils.js.map +1 -1
- package/dist/sandbox/components/SandboxActivityTab.d.ts +1 -2
- package/dist/sandbox/components/SandboxActivityTab.js +4 -3
- package/dist/sandbox/components/SandboxActivityTab.js.map +1 -1
- package/dist/sandbox/components/SandboxAgentAppPanel.d.ts +1 -2
- package/dist/sandbox/components/SandboxAgentAppPanel.js +1 -2
- package/dist/sandbox/components/SandboxAgentAppPanel.js.map +1 -1
- package/dist/sandbox/components/SandboxScriptRunnerPanel.d.ts +0 -1
- package/dist/sandbox/components/SandboxScriptRunnerPanel.js +2 -3
- package/dist/sandbox/components/SandboxScriptRunnerPanel.js.map +1 -1
- package/dist/sandbox/components/SandboxTypeIcon.d.ts +0 -2
- package/dist/sandbox/components/SandboxTypeIcon.js +1 -2
- package/dist/sandbox/components/SandboxTypeIcon.js.map +1 -1
- package/dist/sandbox/components/SandboxTypeSelector.d.ts +1 -2
- package/dist/sandbox/components/SandboxUsageBanner.d.ts +1 -2
- package/dist/sandbox/components/SandboxUsageBanner.js +1 -2
- package/dist/sandbox/components/SandboxUsageBanner.js.map +1 -1
- package/dist/sandbox/components/StatusBadge.d.ts +0 -2
- package/dist/sandbox/components/StatusBadge.js +1 -2
- package/dist/sandbox/components/StatusBadge.js.map +1 -1
- package/dist/sandbox/components/TagsInput.d.ts +1 -2
- package/dist/sandbox/components/TagsInput.js +1 -2
- package/dist/sandbox/components/TagsInput.js.map +1 -1
- package/dist/sandbox/components/ui.d.ts +0 -1
- package/dist/sandbox/components/ui.js +1 -2
- package/dist/sandbox/hooks/useIsSuperAdmin.d.ts +0 -1
- package/dist/sandbox/hooks/useRemainingSeconds.d.ts +0 -1
- package/dist/sandbox/hooks/useRemainingSeconds.js +1 -2
- package/dist/sandbox/hooks/useRemainingSeconds.js.map +1 -1
- package/dist/sandbox/hooks/useTr.d.ts +0 -1
- package/dist/sandbox/hooks/useTr.js +1 -2
- package/dist/sandbox/hooks/useTr.js.map +1 -1
- package/dist/sandbox/index.d.ts +0 -1
- package/dist/sandbox/index.js +6 -5
- package/dist/sandbox/pages/AdminLandingPage.d.ts +1 -2
- package/dist/sandbox/pages/AdminLandingPage.js +7 -8
- package/dist/sandbox/pages/AdminLandingPage.js.map +1 -1
- package/dist/sandbox/pages/AdminPage.d.ts +1 -2
- package/dist/sandbox/pages/AdminPage.js +87 -88
- package/dist/sandbox/pages/AdminPage.js.map +1 -1
- package/dist/sandbox/pages/AdminTemplatesPage.d.ts +1 -2
- package/dist/sandbox/pages/AdminTemplatesPage.js +59 -60
- package/dist/sandbox/pages/AdminTemplatesPage.js.map +1 -1
- package/dist/sandbox/pages/SandboxCreatePage.d.ts +1 -2
- package/dist/sandbox/pages/SandboxCreatePage.js +269 -265
- package/dist/sandbox/pages/SandboxCreatePage.js.map +1 -1
- package/dist/sandbox/pages/SandboxDetailPage.d.ts +1 -2
- package/dist/sandbox/pages/SandboxDetailPage.js +453 -454
- package/dist/sandbox/pages/SandboxDetailPage.js.map +1 -1
- package/dist/sandbox/pages/SandboxListPage.d.ts +1 -2
- package/dist/sandbox/pages/SandboxListPage.js +319 -320
- package/dist/sandbox/pages/SandboxListPage.js.map +1 -1
- package/dist/sandbox/pages/TemplateDetailPage.d.ts +1 -2
- package/dist/sandbox/pages/TemplateDetailPage.js +326 -328
- package/dist/sandbox/pages/TemplateDetailPage.js.map +1 -1
- package/dist/sandbox/pages/UserLandingPage.d.ts +1 -2
- package/dist/sandbox/pages/UserLandingPage.js +10 -11
- package/dist/sandbox/pages/UserLandingPage.js.map +1 -1
- package/dist/sandbox/pages/UserTemplatesPage.d.ts +1 -2
- package/dist/sandbox/pages/UserTemplatesPage.js +47 -48
- package/dist/sandbox/pages/UserTemplatesPage.js.map +1 -1
- package/dist/sandbox/providers/SandboxProvider.d.ts +0 -2
- package/dist/sandbox/providers/SandboxProvider.js +5 -12
- package/dist/sandbox/providers/SandboxProvider.js.map +1 -1
- package/dist/sandbox/store/sandboxStore.d.ts +0 -2
- package/dist/sandbox/store/sandboxStore.js +1 -2
- package/dist/sandbox/store/sandboxStore.js.map +1 -1
- package/dist/sandbox/types/index.d.ts +0 -1
- package/dist/sandbox/utils/cn.d.ts +0 -2
- package/dist/sandbox/utils/cn.js +2 -3
- package/dist/sandbox/utils/cn.js.map +1 -1
- package/dist/sandbox/utils/formatters.d.ts +0 -1
- package/dist/sandbox/utils/formatters.js +1 -2
- package/dist/sandbox/utils/formatters.js.map +1 -1
- package/dist/sandbox/utils/i18n.d.ts +0 -2
- package/dist/sandbox/utils/i18n.js +1 -2
- package/dist/sandbox/utils/i18n.js.map +1 -1
- package/dist/sandbox/utils/imageRegistry.d.ts +0 -1
- package/dist/sandbox/utils/imageRegistry.js +1 -2
- package/dist/sandbox/utils/imageRegistry.js.map +1 -1
- package/dist/sandbox/utils/navigation.d.ts +0 -1
- package/dist/sandbox/utils/navigation.js +1 -2
- package/dist/sandbox/utils/navigation.js.map +1 -1
- package/dist/sandbox/utils/sandboxEvents.d.ts +0 -2
- package/dist/sandbox/utils/sandboxEvents.js +1 -2
- package/dist/sandbox/utils/sandboxEvents.js.map +1 -1
- package/dist/translations/en.d.ts +0 -1
- package/dist/translations/en.js +1 -2
- package/dist/translations/en.js.map +1 -1
- package/dist/translations/hi.d.ts +0 -2
- package/dist/translations/hi.js +3 -4
- package/dist/translations/hi.js.map +1 -1
- package/dist/translations/index.d.ts +0 -1
- package/dist/translations/index.js +4 -3
- package/dist/translations/ta.d.ts +0 -2
- package/dist/translations/ta.js +3 -4
- package/dist/translations/ta.js.map +1 -1
- package/dist/utils/nativeBridge.d.ts +0 -1
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +60 -46
- package/dist/dev/Dashboard.d.ts.map +0 -1
- package/dist/dev/SandboxApp.d.ts.map +0 -1
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/sandbox/AdminRoutes.d.ts.map +0 -1
- package/dist/sandbox/SandboxAdminRoot.d.ts.map +0 -1
- package/dist/sandbox/SandboxRoot.d.ts.map +0 -1
- package/dist/sandbox/UserRoutes.d.ts.map +0 -1
- package/dist/sandbox/components/ContainerImagePicker.d.ts.map +0 -1
- package/dist/sandbox/components/CountdownTimer.d.ts.map +0 -1
- package/dist/sandbox/components/ExportSandboxesDialog.d.ts.map +0 -1
- package/dist/sandbox/components/ExtendTTLModal.d.ts.map +0 -1
- package/dist/sandbox/components/FilesFolderPicker.d.ts.map +0 -1
- package/dist/sandbox/components/PageLayout.d.ts.map +0 -1
- package/dist/sandbox/components/ResourceDisplay.d.ts.map +0 -1
- package/dist/sandbox/components/RouteUtils.d.ts.map +0 -1
- package/dist/sandbox/components/SandboxActivityTab.d.ts.map +0 -1
- package/dist/sandbox/components/SandboxAgentAppPanel.d.ts.map +0 -1
- package/dist/sandbox/components/SandboxScriptRunnerPanel.d.ts.map +0 -1
- package/dist/sandbox/components/SandboxTypeIcon.d.ts.map +0 -1
- package/dist/sandbox/components/SandboxTypeSelector.d.ts.map +0 -1
- package/dist/sandbox/components/SandboxUsageBanner.d.ts.map +0 -1
- package/dist/sandbox/components/StatusBadge.d.ts.map +0 -1
- package/dist/sandbox/components/TagsInput.d.ts.map +0 -1
- package/dist/sandbox/components/ui.d.ts.map +0 -1
- package/dist/sandbox/hooks/useIsSuperAdmin.d.ts.map +0 -1
- package/dist/sandbox/hooks/useRemainingSeconds.d.ts.map +0 -1
- package/dist/sandbox/hooks/useTr.d.ts.map +0 -1
- package/dist/sandbox/index.d.ts.map +0 -1
- package/dist/sandbox/pages/AdminLandingPage.d.ts.map +0 -1
- package/dist/sandbox/pages/AdminPage.d.ts.map +0 -1
- package/dist/sandbox/pages/AdminTemplatesPage.d.ts.map +0 -1
- package/dist/sandbox/pages/SandboxCreatePage.d.ts.map +0 -1
- package/dist/sandbox/pages/SandboxDetailPage.d.ts.map +0 -1
- package/dist/sandbox/pages/SandboxListPage.d.ts.map +0 -1
- package/dist/sandbox/pages/TemplateDetailPage.d.ts.map +0 -1
- package/dist/sandbox/pages/UserLandingPage.d.ts.map +0 -1
- package/dist/sandbox/pages/UserTemplatesPage.d.ts.map +0 -1
- package/dist/sandbox/providers/SandboxProvider.d.ts.map +0 -1
- package/dist/sandbox/store/sandboxStore.d.ts.map +0 -1
- package/dist/sandbox/types/index.d.ts.map +0 -1
- package/dist/sandbox/utils/cn.d.ts.map +0 -1
- package/dist/sandbox/utils/formatters.d.ts.map +0 -1
- package/dist/sandbox/utils/i18n.d.ts.map +0 -1
- package/dist/sandbox/utils/imageRegistry.d.ts.map +0 -1
- package/dist/sandbox/utils/navigation.d.ts.map +0 -1
- package/dist/sandbox/utils/sandboxEvents.d.ts.map +0 -1
- package/dist/translations/en.d.ts.map +0 -1
- package/dist/translations/hi.d.ts.map +0 -1
- package/dist/translations/index.d.ts.map +0 -1
- package/dist/translations/ta.d.ts.map +0 -1
- package/dist/utils/nativeBridge.d.ts.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Badge as e, Button as t, Card as n, CardContent as r, EmphasisPanel as i } from "../components/ui.js";
|
|
2
|
+
import { useSandbox as a } from "../providers/SandboxProvider.js";
|
|
3
|
+
import { joinPath as o } from "../utils/navigation.js";
|
|
4
4
|
import { tWithFallback as s } from "../utils/i18n.js";
|
|
5
|
-
import {
|
|
6
|
-
import { PageLayout as ee } from "../components/PageLayout.js";
|
|
5
|
+
import { PageLayout as c } from "../components/PageLayout.js";
|
|
7
6
|
import { useCreateSandboxTemplateMutation as l, useGetSandboxTemplateQuery as u, useUpdateSandboxTemplateMutation as d } from "../../generated/wspace-operations.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
import { useTr as f } from "../hooks/useTr.js";
|
|
8
|
+
import { useEffect as p, useState as m } from "react";
|
|
9
|
+
import { AlertCircle as h, ArrowLeft as ee, CheckCircle2 as te, Container as g, Cpu as _, Database as ne, Image as v, Info as y, LayoutTemplate as re, Loader2 as ie, MemoryStick as b, Plus as x, Save as S, Timer as C, Trash2 as w, X as T } from "lucide-react";
|
|
10
|
+
import { useParams as E } from "react-router";
|
|
11
|
+
import { useI18n as D } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
12
|
+
import { jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
13
|
+
import { PagePurpose as ae } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
// src/sandbox/pages/TemplateDetailPage.tsx
|
|
15
|
+
var A = 0;
|
|
16
|
+
function j() {
|
|
17
|
+
return A += 1, `tpl-row-${A}-${Date.now()}`;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function M() {
|
|
20
20
|
return {
|
|
21
|
-
_rowId:
|
|
21
|
+
_rowId: j(),
|
|
22
22
|
name: "",
|
|
23
23
|
image: "",
|
|
24
24
|
ports: [],
|
|
@@ -29,14 +29,14 @@ function N() {
|
|
|
29
29
|
limitsMemory: ""
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
let { templateId:
|
|
32
|
+
function N() {
|
|
33
|
+
let { templateId: A } = E(), { basePath: N = "/", navigate: P, workspaceId: F } = a(), { t: I } = D(), L = f(), R = !!A && A !== "new", [z] = l(), [B] = d(), { data: V } = u({
|
|
34
34
|
variables: {
|
|
35
|
-
context: { workspaceId:
|
|
36
|
-
id:
|
|
35
|
+
context: { workspaceId: F },
|
|
36
|
+
id: A
|
|
37
37
|
},
|
|
38
|
-
skip: !
|
|
39
|
-
}), [
|
|
38
|
+
skip: !R || !A || !F
|
|
39
|
+
}), [H, U] = m({
|
|
40
40
|
name: "",
|
|
41
41
|
description: "",
|
|
42
42
|
template: "AI_BUILDER",
|
|
@@ -47,7 +47,7 @@ function P() {
|
|
|
47
47
|
memoryLimit: "4Gi",
|
|
48
48
|
ttlSeconds: 14400,
|
|
49
49
|
containers: [{
|
|
50
|
-
...
|
|
50
|
+
...M(),
|
|
51
51
|
name: "main"
|
|
52
52
|
}],
|
|
53
53
|
storageMode: "NONE",
|
|
@@ -56,9 +56,9 @@ function P() {
|
|
|
56
56
|
storageRetainOnDelete: !1,
|
|
57
57
|
allowedImages: []
|
|
58
58
|
});
|
|
59
|
-
|
|
60
|
-
let e =
|
|
61
|
-
e &&
|
|
59
|
+
p(() => {
|
|
60
|
+
let e = V?.getSandboxTemplate;
|
|
61
|
+
e && U({
|
|
62
62
|
name: e.name ?? "",
|
|
63
63
|
description: e.description ?? "",
|
|
64
64
|
template: e.template ?? "AI_BUILDER",
|
|
@@ -69,11 +69,11 @@ function P() {
|
|
|
69
69
|
memoryLimit: e.resources?.memoryLimit ?? "4Gi",
|
|
70
70
|
ttlSeconds: e.ttlSeconds ?? 14400,
|
|
71
71
|
containers: e.containers && e.containers.length > 0 ? e.containers.map((e) => ({
|
|
72
|
-
_rowId:
|
|
72
|
+
_rowId: j(),
|
|
73
73
|
name: e.name ?? "",
|
|
74
74
|
image: e.image ?? "",
|
|
75
75
|
ports: e.ports?.map((e) => ({
|
|
76
|
-
_rowId:
|
|
76
|
+
_rowId: j(),
|
|
77
77
|
containerPort: e.containerPort,
|
|
78
78
|
name: e.name ?? ""
|
|
79
79
|
})) ?? [],
|
|
@@ -83,7 +83,7 @@ function P() {
|
|
|
83
83
|
limitsCpu: e.resources?.limitsCpu ?? "",
|
|
84
84
|
limitsMemory: e.resources?.limitsMemory ?? ""
|
|
85
85
|
})) : [{
|
|
86
|
-
...
|
|
86
|
+
...M(),
|
|
87
87
|
name: "main"
|
|
88
88
|
}],
|
|
89
89
|
storageMode: e.storage?.mode ?? "NONE",
|
|
@@ -92,32 +92,32 @@ function P() {
|
|
|
92
92
|
storageRetainOnDelete: e.storage?.retainOnDelete ?? !1,
|
|
93
93
|
allowedImages: e.allowedImages ?? []
|
|
94
94
|
});
|
|
95
|
-
}, [
|
|
96
|
-
let [
|
|
97
|
-
|
|
95
|
+
}, [V]);
|
|
96
|
+
let [W, G] = m({}), [K, q] = m(null), [J, Y] = m(!1), X = (e, t) => {
|
|
97
|
+
q({
|
|
98
98
|
type: e,
|
|
99
99
|
message: t
|
|
100
|
-
}), setTimeout(() =>
|
|
101
|
-
},
|
|
102
|
-
|
|
100
|
+
}), setTimeout(() => q(null), 5e3);
|
|
101
|
+
}, Z = (e, t) => {
|
|
102
|
+
U((n) => ({
|
|
103
103
|
...n,
|
|
104
104
|
[e]: t
|
|
105
|
-
})), typeof t == "string" &&
|
|
105
|
+
})), typeof t == "string" && W[e] && G((t) => {
|
|
106
106
|
let n = { ...t };
|
|
107
107
|
return delete n[e], n;
|
|
108
108
|
});
|
|
109
|
-
},
|
|
110
|
-
|
|
109
|
+
}, oe = () => {
|
|
110
|
+
U((e) => ({
|
|
111
111
|
...e,
|
|
112
|
-
containers: [...e.containers,
|
|
112
|
+
containers: [...e.containers, M()]
|
|
113
113
|
}));
|
|
114
|
-
},
|
|
115
|
-
|
|
114
|
+
}, Q = (e) => {
|
|
115
|
+
U((t) => ({
|
|
116
116
|
...t,
|
|
117
117
|
containers: t.containers.filter((t, n) => n !== e)
|
|
118
118
|
}));
|
|
119
119
|
}, $ = (e, t, n) => {
|
|
120
|
-
|
|
120
|
+
U((r) => ({
|
|
121
121
|
...r,
|
|
122
122
|
containers: r.containers.map((r, i) => i === e ? {
|
|
123
123
|
...r,
|
|
@@ -125,350 +125,349 @@ function P() {
|
|
|
125
125
|
} : r)
|
|
126
126
|
}));
|
|
127
127
|
}, se = () => {
|
|
128
|
-
|
|
128
|
+
U((e) => ({
|
|
129
129
|
...e,
|
|
130
130
|
allowedImages: [...e.allowedImages, ""]
|
|
131
131
|
}));
|
|
132
132
|
}, ce = (e) => {
|
|
133
|
-
|
|
133
|
+
U((t) => ({
|
|
134
134
|
...t,
|
|
135
135
|
allowedImages: t.allowedImages.filter((t, n) => n !== e)
|
|
136
136
|
}));
|
|
137
137
|
}, le = (e, t) => {
|
|
138
|
-
|
|
138
|
+
U((n) => ({
|
|
139
139
|
...n,
|
|
140
140
|
allowedImages: n.allowedImages.map((n, r) => r === e ? t : n)
|
|
141
141
|
}));
|
|
142
142
|
}, ue = () => {
|
|
143
143
|
let e = {};
|
|
144
|
-
return
|
|
144
|
+
return H.name.trim() || (e.name = s(I, "sandbox.template.errors.nameRequired", "Name is required")), H.cpuRequest.trim() || (e.cpuRequest = s(I, "sandbox.template.errors.cpuRequestRequired", "CPU request is required")), H.cpuLimit.trim() || (e.cpuLimit = s(I, "sandbox.template.errors.cpuLimitRequired", "CPU limit is required")), H.memoryRequest.trim() || (e.memoryRequest = s(I, "sandbox.template.errors.memoryRequestRequired", "Memory request is required")), H.memoryLimit.trim() || (e.memoryLimit = s(I, "sandbox.template.errors.memoryLimitRequired", "Memory limit is required")), G(e), Object.keys(e).length === 0;
|
|
145
145
|
};
|
|
146
|
-
return /* @__PURE__ */
|
|
146
|
+
return /* @__PURE__ */ k(c, {
|
|
147
147
|
showHeader: !1,
|
|
148
148
|
children: [
|
|
149
|
-
|
|
150
|
-
className: `fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200 ${
|
|
149
|
+
K && /* @__PURE__ */ k("div", {
|
|
150
|
+
className: `fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200 ${K.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"}`,
|
|
151
151
|
children: [
|
|
152
|
-
|
|
153
|
-
/* @__PURE__ */
|
|
152
|
+
K.type === "success" ? /* @__PURE__ */ O(te, { size: 20 }) : /* @__PURE__ */ O(h, { size: 20 }),
|
|
153
|
+
/* @__PURE__ */ O("span", {
|
|
154
154
|
className: "font-medium",
|
|
155
|
-
children:
|
|
155
|
+
children: K.message
|
|
156
156
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ O("button", {
|
|
158
158
|
type: "button",
|
|
159
|
-
onClick: () =>
|
|
160
|
-
"aria-label":
|
|
159
|
+
onClick: () => q(null),
|
|
160
|
+
"aria-label": L("sandbox.template.notification.dismiss", "Dismiss notification"),
|
|
161
161
|
className: "ml-2 p-1 rounded-md hover:bg-accent",
|
|
162
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ O(T, { size: 16 })
|
|
163
163
|
})
|
|
164
164
|
]
|
|
165
165
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ k(i, {
|
|
167
167
|
className: "overflow-hidden bg-hero-mesh",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ k("div", {
|
|
169
169
|
className: "flex items-center gap-4",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
170
|
+
children: [/* @__PURE__ */ O("button", {
|
|
171
171
|
type: "button",
|
|
172
|
-
onClick: () =>
|
|
172
|
+
onClick: () => P?.(o(N, "templates")),
|
|
173
173
|
className: "flex size-11 flex-shrink-0 items-center justify-center rounded-lg hover:bg-bg-sunken/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border",
|
|
174
|
-
"aria-label": s(
|
|
175
|
-
children: /* @__PURE__ */
|
|
176
|
-
}), /* @__PURE__ */
|
|
174
|
+
"aria-label": s(I, "sandbox.template.actions.backToTemplates", "Back to templates"),
|
|
175
|
+
children: /* @__PURE__ */ O(ee, { size: 20 })
|
|
176
|
+
}), /* @__PURE__ */ k("div", {
|
|
177
177
|
className: "flex items-center gap-3",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
178
|
+
children: [/* @__PURE__ */ O("div", {
|
|
179
179
|
className: "p-2.5 rounded-lg bg-action-primary-bg/10",
|
|
180
|
-
children: /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ O(re, {
|
|
181
181
|
size: 24,
|
|
182
182
|
className: "text-primary"
|
|
183
183
|
})
|
|
184
|
-
}), /* @__PURE__ */
|
|
184
|
+
}), /* @__PURE__ */ O("h1", {
|
|
185
185
|
className: "text-2xl sm:text-3xl font-bold",
|
|
186
|
-
children:
|
|
186
|
+
children: R ? s(I, "sandbox.template.title.edit", "Edit Template") : s(I, "sandbox.template.title.create", "Create Template")
|
|
187
187
|
})]
|
|
188
188
|
})]
|
|
189
|
-
}), /* @__PURE__ */
|
|
189
|
+
}), /* @__PURE__ */ O(ae, {
|
|
190
190
|
className: "mt-3",
|
|
191
|
-
children:
|
|
191
|
+
children: R ? s(I, "sandbox.template.purpose.edit", "Adjust this blueprint — its base image, containers, CPU/memory, storage, time-to-live and the images members are allowed to pick. Changes apply to sandboxes created from this template going forward, giving your team a consistent, governed starting point.") : s(I, "sandbox.template.purpose.create", "Define a reusable sandbox blueprint so members can launch a ready-to-go environment in one click. Set the base image, containers, resources, storage, time-to-live and which images are allowed — then optionally make it the workspace default.")
|
|
192
192
|
})]
|
|
193
193
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ k("form", {
|
|
195
195
|
onSubmit: async (e) => {
|
|
196
|
-
if (e.preventDefault(), !ue())
|
|
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
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
X(!1);
|
|
196
|
+
if (e.preventDefault(), !ue()) X("error", s(I, "sandbox.template.errors.fixFormErrors", "Please fix the form errors"));
|
|
197
|
+
else {
|
|
198
|
+
Y(!0);
|
|
199
|
+
try {
|
|
200
|
+
let e = H.containers.reduce((e, t) => (!t.name.trim() || !t.image.trim() || e.push({
|
|
201
|
+
name: t.name,
|
|
202
|
+
image: t.image,
|
|
203
|
+
ports: t.ports.length > 0 ? t.ports : void 0,
|
|
204
|
+
env: t.env.length > 0 ? t.env.filter((e) => e.name.trim()) : void 0,
|
|
205
|
+
resources: t.requestsCpu || t.requestsMemory || t.limitsCpu || t.limitsMemory ? {
|
|
206
|
+
requestsCpu: t.requestsCpu || void 0,
|
|
207
|
+
requestsMemory: t.requestsMemory || void 0,
|
|
208
|
+
limitsCpu: t.limitsCpu || void 0,
|
|
209
|
+
limitsMemory: t.limitsMemory || void 0
|
|
210
|
+
} : void 0
|
|
211
|
+
}), e), []), t = {
|
|
212
|
+
context: { workspaceId: F },
|
|
213
|
+
name: H.name,
|
|
214
|
+
description: H.description || void 0,
|
|
215
|
+
template: H.template,
|
|
216
|
+
isDefault: H.isDefault,
|
|
217
|
+
containers: e,
|
|
218
|
+
resources: {
|
|
219
|
+
cpuRequest: H.cpuRequest,
|
|
220
|
+
cpuLimit: H.cpuLimit,
|
|
221
|
+
memoryRequest: H.memoryRequest,
|
|
222
|
+
memoryLimit: H.memoryLimit
|
|
223
|
+
},
|
|
224
|
+
storage: {
|
|
225
|
+
mode: H.storageMode,
|
|
226
|
+
sizeGi: H.storageMode === "NONE" ? void 0 : H.storageSizeGi,
|
|
227
|
+
mountPath: H.storageMode === "NONE" ? void 0 : H.storageMountPath,
|
|
228
|
+
retainOnDelete: H.storageMode === "PERSISTENT" && H.storageRetainOnDelete
|
|
229
|
+
},
|
|
230
|
+
allowedImages: H.allowedImages.filter((e) => e.trim()),
|
|
231
|
+
ttlSeconds: H.ttlSeconds
|
|
232
|
+
};
|
|
233
|
+
R ? await B({ variables: { input: {
|
|
234
|
+
id: A,
|
|
235
|
+
...t
|
|
236
|
+
} } }) : await z({ variables: { input: t } }), X("success", R ? s(I, "sandbox.template.success.updated", "Template updated!") : s(I, "sandbox.template.success.created", "Template created!")), setTimeout(() => P?.(o(N, "templates")), 1500);
|
|
237
|
+
} catch {
|
|
238
|
+
X("error", s(I, "sandbox.template.errors.saveFailed", "Failed to save template"));
|
|
239
|
+
} finally {
|
|
240
|
+
Y(!1);
|
|
241
|
+
}
|
|
243
242
|
}
|
|
244
243
|
},
|
|
245
244
|
className: "space-y-6",
|
|
246
245
|
children: [
|
|
247
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ O(n, {
|
|
248
247
|
className: "border-border-seam",
|
|
249
|
-
children: /* @__PURE__ */
|
|
248
|
+
children: /* @__PURE__ */ k(r, {
|
|
250
249
|
className: "p-6 space-y-5",
|
|
251
250
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ k("h2", {
|
|
253
252
|
className: "text-lg font-bold flex items-center gap-2",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ O(y, {
|
|
255
254
|
size: 18,
|
|
256
255
|
className: "text-primary"
|
|
257
|
-
}), s(
|
|
256
|
+
}), s(I, "sandbox.template.sections.info", "Template Information")]
|
|
258
257
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ k("div", { children: [
|
|
259
|
+
/* @__PURE__ */ k("label", {
|
|
261
260
|
htmlFor: "name",
|
|
262
261
|
className: "block text-sm font-semibold mb-2",
|
|
263
262
|
children: [
|
|
264
|
-
|
|
263
|
+
L("sandbox.template.fields.name.label", "Name"),
|
|
265
264
|
" ",
|
|
266
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ O("span", {
|
|
267
266
|
className: "text-status-error-text",
|
|
268
267
|
children: "*"
|
|
269
268
|
})
|
|
270
269
|
]
|
|
271
270
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
"aria-label":
|
|
271
|
+
/* @__PURE__ */ O("input", {
|
|
272
|
+
"aria-label": L("sandbox.template.fields.name.label", "Name"),
|
|
274
273
|
type: "text",
|
|
275
274
|
id: "name",
|
|
276
|
-
value:
|
|
277
|
-
onChange: (e) =>
|
|
278
|
-
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
279
|
-
placeholder:
|
|
275
|
+
value: H.name,
|
|
276
|
+
onChange: (e) => Z("name", e.target.value),
|
|
277
|
+
className: `w-full px-4 py-2.5 border-2 rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${W.name ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
278
|
+
placeholder: L("sandbox.template.fields.name.placeholder", "AI Builder - Standard")
|
|
280
279
|
}),
|
|
281
|
-
|
|
280
|
+
W.name && /* @__PURE__ */ k("p", {
|
|
282
281
|
className: "text-sm text-status-error-text mt-1 flex items-center gap-1",
|
|
283
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ O(h, { size: 14 }), W.name]
|
|
284
283
|
})
|
|
285
284
|
] }),
|
|
286
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
287
286
|
htmlFor: "description",
|
|
288
287
|
className: "block text-sm font-semibold mb-2",
|
|
289
|
-
children:
|
|
290
|
-
}), /* @__PURE__ */
|
|
291
|
-
"aria-label":
|
|
288
|
+
children: L("sandbox.template.fields.description.label", "Description")
|
|
289
|
+
}), /* @__PURE__ */ O("textarea", {
|
|
290
|
+
"aria-label": L("sandbox.template.fields.description.label", "Description"),
|
|
292
291
|
id: "description",
|
|
293
|
-
value:
|
|
294
|
-
onChange: (e) =>
|
|
292
|
+
value: H.description,
|
|
293
|
+
onChange: (e) => Z("description", e.target.value),
|
|
295
294
|
rows: 3,
|
|
296
295
|
className: "w-full px-4 py-2.5 border-2 border-border-subtle rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all",
|
|
297
|
-
placeholder:
|
|
296
|
+
placeholder: L("sandbox.template.fields.description.placeholder", "Template description...")
|
|
298
297
|
})] }),
|
|
299
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ k("div", {
|
|
300
299
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
302
301
|
htmlFor: "template",
|
|
303
302
|
className: "block text-sm font-semibold mb-2",
|
|
304
|
-
children:
|
|
305
|
-
}), /* @__PURE__ */
|
|
303
|
+
children: L("sandbox.template.fields.templateType.label", "Template Type")
|
|
304
|
+
}), /* @__PURE__ */ k("select", {
|
|
306
305
|
id: "template",
|
|
307
|
-
value:
|
|
308
|
-
onChange: (e) =>
|
|
306
|
+
value: H.template,
|
|
307
|
+
onChange: (e) => Z("template", e.target.value),
|
|
309
308
|
className: "w-full px-4 py-2.5 border-2 border-border-subtle rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
310
309
|
children: [
|
|
311
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ O("option", {
|
|
312
311
|
value: "AI_BUILDER",
|
|
313
|
-
children:
|
|
312
|
+
children: L("sandbox.typeIcon.aiBuilder", "AI Builder")
|
|
314
313
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ O("option", {
|
|
316
315
|
value: "WORKFLOW_MULTI_NODE",
|
|
317
|
-
children:
|
|
316
|
+
children: L("sandbox.typeIcon.workflowMultiNode", "Workflow Multi-Node")
|
|
318
317
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ O("option", {
|
|
320
319
|
value: "MISC_SHELL",
|
|
321
|
-
children:
|
|
320
|
+
children: L("sandbox.typeIcon.miscShell", "Misc Shell")
|
|
322
321
|
}),
|
|
323
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ O("option", {
|
|
324
323
|
value: "CUSTOM",
|
|
325
|
-
children:
|
|
324
|
+
children: L("sandbox.typeIcon.custom", "Custom")
|
|
326
325
|
})
|
|
327
326
|
]
|
|
328
|
-
})] }), /* @__PURE__ */
|
|
327
|
+
})] }), /* @__PURE__ */ k("div", {
|
|
329
328
|
className: "flex items-center gap-3 pt-7",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
331
|
-
"aria-label":
|
|
329
|
+
children: [/* @__PURE__ */ O("input", {
|
|
330
|
+
"aria-label": L("sandbox.template.fields.isDefault.label", "Default template"),
|
|
332
331
|
type: "checkbox",
|
|
333
332
|
id: "isDefault",
|
|
334
|
-
checked:
|
|
335
|
-
onChange: (e) =>
|
|
333
|
+
checked: H.isDefault,
|
|
334
|
+
onChange: (e) => Z("isDefault", e.target.checked),
|
|
336
335
|
className: "size-4 rounded border-border-subtle text-primary focus:ring-primary/20"
|
|
337
|
-
}), /* @__PURE__ */
|
|
336
|
+
}), /* @__PURE__ */ O("label", {
|
|
338
337
|
htmlFor: "isDefault",
|
|
339
338
|
className: "text-sm font-medium",
|
|
340
|
-
children:
|
|
339
|
+
children: L("sandbox.template.fields.isDefault.help", "Set as default template for this type")
|
|
341
340
|
})]
|
|
342
341
|
})]
|
|
343
342
|
})
|
|
344
343
|
]
|
|
345
344
|
})
|
|
346
345
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ O(n, {
|
|
348
347
|
className: "border-border-seam",
|
|
349
|
-
children: /* @__PURE__ */
|
|
348
|
+
children: /* @__PURE__ */ k(r, {
|
|
350
349
|
className: "p-6 space-y-5",
|
|
351
|
-
children: [/* @__PURE__ */
|
|
350
|
+
children: [/* @__PURE__ */ k("div", {
|
|
352
351
|
className: "flex items-center justify-between",
|
|
353
|
-
children: [/* @__PURE__ */
|
|
352
|
+
children: [/* @__PURE__ */ k("h2", {
|
|
354
353
|
className: "text-lg font-bold flex items-center gap-2",
|
|
355
354
|
children: [
|
|
356
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ O(g, {
|
|
357
356
|
size: 18,
|
|
358
357
|
className: "text-primary"
|
|
359
358
|
}),
|
|
360
|
-
s(
|
|
361
|
-
/* @__PURE__ */
|
|
359
|
+
s(I, "sandbox.template.sections.containers", "Default Containers"),
|
|
360
|
+
/* @__PURE__ */ O(e, {
|
|
362
361
|
variant: "secondary",
|
|
363
|
-
children:
|
|
362
|
+
children: H.containers.length
|
|
364
363
|
})
|
|
365
364
|
]
|
|
366
|
-
}), /* @__PURE__ */
|
|
365
|
+
}), /* @__PURE__ */ k(t, {
|
|
367
366
|
type: "button",
|
|
368
367
|
variant: "outline",
|
|
369
368
|
size: "sm",
|
|
370
|
-
onClick:
|
|
371
|
-
children: [/* @__PURE__ */
|
|
369
|
+
onClick: oe,
|
|
370
|
+
children: [/* @__PURE__ */ O(x, { size: 14 }), L("sandbox.template.container.addContainer", "Add Container")]
|
|
372
371
|
})]
|
|
373
|
-
}), /* @__PURE__ */
|
|
372
|
+
}), /* @__PURE__ */ O("div", {
|
|
374
373
|
className: "space-y-4",
|
|
375
|
-
children:
|
|
374
|
+
children: H.containers.map((e, n) => /* @__PURE__ */ k("div", {
|
|
376
375
|
className: "p-4 rounded-lg border-2 border-border-subtle/50 bg-bg-sunken/20 space-y-3",
|
|
377
376
|
children: [
|
|
378
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ k("div", {
|
|
379
378
|
className: "flex items-center justify-between",
|
|
380
|
-
children: [/* @__PURE__ */
|
|
379
|
+
children: [/* @__PURE__ */ k("h3", {
|
|
381
380
|
className: "font-semibold text-sm",
|
|
382
|
-
children: [
|
|
383
|
-
}),
|
|
381
|
+
children: [L("sandbox.template.container.heading", "Container #{number}", { number: n + 1 }), e.name && `: ${e.name}`]
|
|
382
|
+
}), H.containers.length > 1 && /* @__PURE__ */ O(t, {
|
|
384
383
|
type: "button",
|
|
385
384
|
variant: "ghost",
|
|
386
385
|
size: "icon",
|
|
387
386
|
className: "text-status-error-text hover:text-status-error-text size-7",
|
|
388
|
-
onClick: () =>
|
|
389
|
-
children: /* @__PURE__ */
|
|
387
|
+
onClick: () => Q(n),
|
|
388
|
+
children: /* @__PURE__ */ O(w, { size: 14 })
|
|
390
389
|
})]
|
|
391
390
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ k("div", {
|
|
393
392
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
394
|
-
children: [/* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
395
394
|
htmlFor: `tpl-${e._rowId}-name`,
|
|
396
395
|
className: "block text-xs font-semibold mb-1",
|
|
397
|
-
children:
|
|
398
|
-
}), /* @__PURE__ */
|
|
399
|
-
"aria-label":
|
|
396
|
+
children: L("sandbox.create.container.fields.name.label", "Name")
|
|
397
|
+
}), /* @__PURE__ */ O("input", {
|
|
398
|
+
"aria-label": L("sandbox.create.container.fields.name.label", "Name"),
|
|
400
399
|
id: `tpl-${e._rowId}-name`,
|
|
401
400
|
type: "text",
|
|
402
401
|
value: e.name,
|
|
403
|
-
onChange: (e) => $(
|
|
402
|
+
onChange: (e) => $(n, "name", e.target.value),
|
|
404
403
|
className: "w-full px-3 py-2 border-2 border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all",
|
|
405
|
-
placeholder:
|
|
406
|
-
})] }), /* @__PURE__ */
|
|
404
|
+
placeholder: L("sandbox.create.container.fields.name.placeholder", "main")
|
|
405
|
+
})] }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
407
406
|
htmlFor: `tpl-${e._rowId}-image`,
|
|
408
407
|
className: "block text-xs font-semibold mb-1",
|
|
409
|
-
children:
|
|
410
|
-
}), /* @__PURE__ */
|
|
411
|
-
"aria-label":
|
|
408
|
+
children: L("sandbox.create.container.fields.image.label", "Image")
|
|
409
|
+
}), /* @__PURE__ */ O("input", {
|
|
410
|
+
"aria-label": L("sandbox.create.container.fields.image.label", "Image"),
|
|
412
411
|
id: `tpl-${e._rowId}-image`,
|
|
413
412
|
type: "text",
|
|
414
413
|
value: e.image,
|
|
415
|
-
onChange: (e) => $(
|
|
414
|
+
onChange: (e) => $(n, "image", e.target.value),
|
|
416
415
|
className: "w-full px-3 py-2 border-2 border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all",
|
|
417
|
-
placeholder:
|
|
416
|
+
placeholder: L("sandbox.template.container.imagePlaceholder", "harbor-internal.burdenoff.com/sandbox/python:3.12")
|
|
418
417
|
})] })]
|
|
419
418
|
}),
|
|
420
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ k("div", {
|
|
421
420
|
className: "grid grid-cols-2 sm:grid-cols-4 gap-3",
|
|
422
421
|
children: [
|
|
423
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
424
423
|
htmlFor: `tpl-${e._rowId}-cpuReq`,
|
|
425
424
|
className: "block text-xs text-text-secondary mb-1",
|
|
426
|
-
children:
|
|
427
|
-
}), /* @__PURE__ */
|
|
428
|
-
"aria-label":
|
|
425
|
+
children: L("sandbox.create.container.resources.cpuReq", "CPU Req")
|
|
426
|
+
}), /* @__PURE__ */ O("input", {
|
|
427
|
+
"aria-label": L("sandbox.create.container.resources.cpuReq", "CPU Req"),
|
|
429
428
|
id: `tpl-${e._rowId}-cpuReq`,
|
|
430
429
|
type: "text",
|
|
431
430
|
value: e.requestsCpu,
|
|
432
|
-
onChange: (e) => $(
|
|
431
|
+
onChange: (e) => $(n, "requestsCpu", e.target.value),
|
|
433
432
|
className: "w-full px-3 py-1.5 border rounded-lg bg-bg-surface text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
434
433
|
placeholder: "250m"
|
|
435
434
|
})] }),
|
|
436
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
437
436
|
htmlFor: `tpl-${e._rowId}-cpuLim`,
|
|
438
437
|
className: "block text-xs text-text-secondary mb-1",
|
|
439
|
-
children:
|
|
440
|
-
}), /* @__PURE__ */
|
|
441
|
-
"aria-label":
|
|
438
|
+
children: L("sandbox.create.container.resources.cpuLim", "CPU Lim")
|
|
439
|
+
}), /* @__PURE__ */ O("input", {
|
|
440
|
+
"aria-label": L("sandbox.create.container.resources.cpuLim", "CPU Lim"),
|
|
442
441
|
id: `tpl-${e._rowId}-cpuLim`,
|
|
443
442
|
type: "text",
|
|
444
443
|
value: e.limitsCpu,
|
|
445
|
-
onChange: (e) => $(
|
|
444
|
+
onChange: (e) => $(n, "limitsCpu", e.target.value),
|
|
446
445
|
className: "w-full px-3 py-1.5 border rounded-lg bg-bg-surface text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
447
446
|
placeholder: "1"
|
|
448
447
|
})] }),
|
|
449
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
450
449
|
htmlFor: `tpl-${e._rowId}-memReq`,
|
|
451
450
|
className: "block text-xs text-text-secondary mb-1",
|
|
452
|
-
children:
|
|
453
|
-
}), /* @__PURE__ */
|
|
454
|
-
"aria-label":
|
|
451
|
+
children: L("sandbox.create.container.resources.memReq", "Mem Req")
|
|
452
|
+
}), /* @__PURE__ */ O("input", {
|
|
453
|
+
"aria-label": L("sandbox.create.container.resources.memReq", "Mem Req"),
|
|
455
454
|
id: `tpl-${e._rowId}-memReq`,
|
|
456
455
|
type: "text",
|
|
457
456
|
value: e.requestsMemory,
|
|
458
|
-
onChange: (e) => $(
|
|
457
|
+
onChange: (e) => $(n, "requestsMemory", e.target.value),
|
|
459
458
|
className: "w-full px-3 py-1.5 border rounded-lg bg-bg-surface text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
460
459
|
placeholder: "512Mi"
|
|
461
460
|
})] }),
|
|
462
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
463
462
|
htmlFor: `tpl-${e._rowId}-memLim`,
|
|
464
463
|
className: "block text-xs text-text-secondary mb-1",
|
|
465
|
-
children:
|
|
466
|
-
}), /* @__PURE__ */
|
|
467
|
-
"aria-label":
|
|
464
|
+
children: L("sandbox.create.container.resources.memLim", "Mem Lim")
|
|
465
|
+
}), /* @__PURE__ */ O("input", {
|
|
466
|
+
"aria-label": L("sandbox.create.container.resources.memLim", "Mem Lim"),
|
|
468
467
|
id: `tpl-${e._rowId}-memLim`,
|
|
469
468
|
type: "text",
|
|
470
469
|
value: e.limitsMemory,
|
|
471
|
-
onChange: (e) => $(
|
|
470
|
+
onChange: (e) => $(n, "limitsMemory", e.target.value),
|
|
472
471
|
className: "w-full px-3 py-1.5 border rounded-lg bg-bg-surface text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
473
472
|
placeholder: "2Gi"
|
|
474
473
|
})] })
|
|
@@ -479,220 +478,220 @@ function P() {
|
|
|
479
478
|
})]
|
|
480
479
|
})
|
|
481
480
|
}),
|
|
482
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ O(n, {
|
|
483
482
|
className: "border-border-seam",
|
|
484
|
-
children: /* @__PURE__ */
|
|
483
|
+
children: /* @__PURE__ */ k(r, {
|
|
485
484
|
className: "p-6 space-y-5",
|
|
486
485
|
children: [
|
|
487
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ k("h2", {
|
|
488
487
|
className: "text-lg font-bold flex items-center gap-2",
|
|
489
|
-
children: [/* @__PURE__ */
|
|
488
|
+
children: [/* @__PURE__ */ O(_, {
|
|
490
489
|
size: 18,
|
|
491
490
|
className: "text-primary"
|
|
492
|
-
}), s(
|
|
491
|
+
}), s(I, "sandbox.template.sections.resources", "Default Pod Resources")]
|
|
493
492
|
}),
|
|
494
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ k("div", {
|
|
495
494
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
496
495
|
children: [
|
|
497
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("label", {
|
|
498
497
|
htmlFor: "cpuRequest",
|
|
499
498
|
className: "text-sm font-semibold flex items-center gap-2",
|
|
500
499
|
children: [
|
|
501
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ O(_, {
|
|
502
501
|
size: 14,
|
|
503
502
|
className: "text-status-info-text"
|
|
504
503
|
}),
|
|
505
504
|
" ",
|
|
506
|
-
|
|
505
|
+
L("sandbox.create.fields.cpuRequest.label", "CPU Request")
|
|
507
506
|
]
|
|
508
|
-
}), /* @__PURE__ */
|
|
509
|
-
"aria-label":
|
|
507
|
+
}), /* @__PURE__ */ O("input", {
|
|
508
|
+
"aria-label": L("sandbox.create.fields.cpuRequest.label", "CPU Request"),
|
|
510
509
|
type: "text",
|
|
511
510
|
id: "cpuRequest",
|
|
512
|
-
value:
|
|
513
|
-
onChange: (e) =>
|
|
514
|
-
className: `w-full px-4 py-2.5 mt-2 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
511
|
+
value: H.cpuRequest,
|
|
512
|
+
onChange: (e) => Z("cpuRequest", e.target.value),
|
|
513
|
+
className: `w-full px-4 py-2.5 mt-2 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${W.cpuRequest ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
515
514
|
placeholder: "500m"
|
|
516
515
|
})] }),
|
|
517
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("label", {
|
|
518
517
|
htmlFor: "cpuLimit",
|
|
519
518
|
className: "text-sm font-semibold flex items-center gap-2",
|
|
520
519
|
children: [
|
|
521
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ O(_, {
|
|
522
521
|
size: 14,
|
|
523
522
|
className: "text-status-info-text"
|
|
524
523
|
}),
|
|
525
524
|
" ",
|
|
526
|
-
|
|
525
|
+
L("sandbox.create.fields.cpuLimit.label", "CPU Limit")
|
|
527
526
|
]
|
|
528
|
-
}), /* @__PURE__ */
|
|
529
|
-
"aria-label":
|
|
527
|
+
}), /* @__PURE__ */ O("input", {
|
|
528
|
+
"aria-label": L("sandbox.create.fields.cpuLimit.label", "CPU Limit"),
|
|
530
529
|
type: "text",
|
|
531
530
|
id: "cpuLimit",
|
|
532
|
-
value:
|
|
533
|
-
onChange: (e) =>
|
|
534
|
-
className: `w-full px-4 py-2.5 mt-2 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
531
|
+
value: H.cpuLimit,
|
|
532
|
+
onChange: (e) => Z("cpuLimit", e.target.value),
|
|
533
|
+
className: `w-full px-4 py-2.5 mt-2 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${W.cpuLimit ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
535
534
|
placeholder: "2"
|
|
536
535
|
})] }),
|
|
537
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("label", {
|
|
538
537
|
htmlFor: "memoryRequest",
|
|
539
538
|
className: "text-sm font-semibold flex items-center gap-2",
|
|
540
539
|
children: [
|
|
541
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ O(b, {
|
|
542
541
|
size: 14,
|
|
543
542
|
className: "text-accent-purple-subtle"
|
|
544
543
|
}),
|
|
545
544
|
" ",
|
|
546
|
-
|
|
545
|
+
L("sandbox.create.fields.memoryRequest.label", "Memory Request")
|
|
547
546
|
]
|
|
548
|
-
}), /* @__PURE__ */
|
|
549
|
-
"aria-label":
|
|
547
|
+
}), /* @__PURE__ */ O("input", {
|
|
548
|
+
"aria-label": L("sandbox.create.fields.memoryRequest.label", "Memory Request"),
|
|
550
549
|
type: "text",
|
|
551
550
|
id: "memoryRequest",
|
|
552
|
-
value:
|
|
553
|
-
onChange: (e) =>
|
|
554
|
-
className: `w-full px-4 py-2.5 mt-2 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
551
|
+
value: H.memoryRequest,
|
|
552
|
+
onChange: (e) => Z("memoryRequest", e.target.value),
|
|
553
|
+
className: `w-full px-4 py-2.5 mt-2 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${W.memoryRequest ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
555
554
|
placeholder: "1Gi"
|
|
556
555
|
})] }),
|
|
557
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("label", {
|
|
558
557
|
htmlFor: "memoryLimit",
|
|
559
558
|
className: "text-sm font-semibold flex items-center gap-2",
|
|
560
559
|
children: [
|
|
561
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ O(b, {
|
|
562
561
|
size: 14,
|
|
563
562
|
className: "text-accent-purple-subtle"
|
|
564
563
|
}),
|
|
565
564
|
" ",
|
|
566
|
-
|
|
565
|
+
L("sandbox.create.fields.memoryLimit.label", "Memory Limit")
|
|
567
566
|
]
|
|
568
|
-
}), /* @__PURE__ */
|
|
569
|
-
"aria-label":
|
|
567
|
+
}), /* @__PURE__ */ O("input", {
|
|
568
|
+
"aria-label": L("sandbox.create.fields.memoryLimit.label", "Memory Limit"),
|
|
570
569
|
type: "text",
|
|
571
570
|
id: "memoryLimit",
|
|
572
|
-
value:
|
|
573
|
-
onChange: (e) =>
|
|
574
|
-
className: `w-full px-4 py-2.5 mt-2 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${
|
|
571
|
+
value: H.memoryLimit,
|
|
572
|
+
onChange: (e) => Z("memoryLimit", e.target.value),
|
|
573
|
+
className: `w-full px-4 py-2.5 mt-2 border-2 rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all ${W.memoryLimit ? "border-status-error-border" : "border-border-subtle focus:border-primary"}`,
|
|
575
574
|
placeholder: "4Gi"
|
|
576
575
|
})] })
|
|
577
576
|
]
|
|
578
577
|
}),
|
|
579
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("label", {
|
|
580
579
|
htmlFor: "ttlSeconds",
|
|
581
580
|
className: "text-sm font-semibold flex items-center gap-2",
|
|
582
581
|
children: [
|
|
583
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ O(C, {
|
|
584
583
|
size: 14,
|
|
585
584
|
className: "text-status-info-text"
|
|
586
585
|
}),
|
|
587
586
|
" ",
|
|
588
|
-
|
|
589
|
-
/* @__PURE__ */
|
|
587
|
+
L("sandbox.template.fields.ttl.label", "Default TTL"),
|
|
588
|
+
/* @__PURE__ */ O(e, {
|
|
590
589
|
variant: "outline",
|
|
591
590
|
className: "text-xs ml-auto",
|
|
592
591
|
children: ((e) => {
|
|
593
592
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60);
|
|
594
593
|
return t > 0 && n > 0 ? `${t}h ${n}m` : t > 0 ? `${t}h` : `${n}m`;
|
|
595
|
-
})(
|
|
594
|
+
})(H.ttlSeconds)
|
|
596
595
|
})
|
|
597
596
|
]
|
|
598
|
-
}), /* @__PURE__ */
|
|
599
|
-
"aria-label":
|
|
597
|
+
}), /* @__PURE__ */ O("input", {
|
|
598
|
+
"aria-label": L("sandbox.template.fields.ttl.label", "Default TTL"),
|
|
600
599
|
type: "range",
|
|
601
600
|
id: "ttlSeconds",
|
|
602
601
|
min: 600,
|
|
603
602
|
max: 86400,
|
|
604
603
|
step: 600,
|
|
605
|
-
value:
|
|
606
|
-
onChange: (e) =>
|
|
604
|
+
value: H.ttlSeconds,
|
|
605
|
+
onChange: (e) => Z("ttlSeconds", Number(e.target.value)),
|
|
607
606
|
className: "w-full mt-2 accent-primary"
|
|
608
607
|
})] })
|
|
609
608
|
]
|
|
610
609
|
})
|
|
611
610
|
}),
|
|
612
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ O(n, {
|
|
613
612
|
className: "border-border-seam",
|
|
614
|
-
children: /* @__PURE__ */
|
|
613
|
+
children: /* @__PURE__ */ k(r, {
|
|
615
614
|
className: "p-6 space-y-5",
|
|
616
615
|
children: [
|
|
617
|
-
/* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ k("h2", {
|
|
618
617
|
className: "text-lg font-bold flex items-center gap-2",
|
|
619
|
-
children: [/* @__PURE__ */
|
|
618
|
+
children: [/* @__PURE__ */ O(ne, {
|
|
620
619
|
size: 18,
|
|
621
620
|
className: "text-primary"
|
|
622
|
-
}), s(
|
|
621
|
+
}), s(I, "sandbox.template.sections.storage", "Default Storage")]
|
|
623
622
|
}),
|
|
624
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
625
624
|
htmlFor: "storageModeGroup",
|
|
626
625
|
className: "block text-sm font-semibold mb-3",
|
|
627
|
-
children:
|
|
628
|
-
}), /* @__PURE__ */
|
|
626
|
+
children: L("sandbox.template.fields.storageMode.label", "Mode")
|
|
627
|
+
}), /* @__PURE__ */ O("div", {
|
|
629
628
|
id: "storageModeGroup",
|
|
630
|
-
"aria-label":
|
|
629
|
+
"aria-label": L("sandbox.template.fields.storageMode.label", "Mode"),
|
|
631
630
|
className: "grid grid-cols-3 gap-3",
|
|
632
631
|
children: [
|
|
633
632
|
"NONE",
|
|
634
633
|
"EPHEMERAL",
|
|
635
634
|
"PERSISTENT"
|
|
636
635
|
].map((e) => {
|
|
637
|
-
let t =
|
|
638
|
-
NONE:
|
|
639
|
-
EPHEMERAL:
|
|
640
|
-
PERSISTENT:
|
|
636
|
+
let t = H.storageMode === e, n = {
|
|
637
|
+
NONE: L("sandbox.template.fields.storageMode.none.label", "None"),
|
|
638
|
+
EPHEMERAL: L("sandbox.template.fields.storageMode.ephemeral.label", "Ephemeral"),
|
|
639
|
+
PERSISTENT: L("sandbox.template.fields.storageMode.persistent.label", "Persistent")
|
|
641
640
|
};
|
|
642
|
-
return /* @__PURE__ */
|
|
641
|
+
return /* @__PURE__ */ O("button", {
|
|
643
642
|
type: "button",
|
|
644
|
-
onClick: () =>
|
|
643
|
+
onClick: () => Z("storageMode", e),
|
|
645
644
|
className: `p-3 rounded-lg border-2 text-left transition-all duration-200 ${t ? "border-primary bg-action-primary-bg/5 shadow-sm" : "border-border-subtle hover:border-primary/50 hover:bg-bg-sunken/50"}`,
|
|
646
|
-
children: /* @__PURE__ */
|
|
645
|
+
children: /* @__PURE__ */ O("p", {
|
|
647
646
|
className: "font-medium text-sm",
|
|
648
647
|
children: n[e]
|
|
649
648
|
})
|
|
650
649
|
}, e);
|
|
651
650
|
})
|
|
652
651
|
})] }),
|
|
653
|
-
|
|
652
|
+
H.storageMode !== "NONE" && /* @__PURE__ */ k("div", {
|
|
654
653
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
655
654
|
children: [
|
|
656
|
-
/* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
657
656
|
htmlFor: "tplStorageSizeGi",
|
|
658
657
|
className: "block text-sm font-semibold mb-2",
|
|
659
|
-
children:
|
|
660
|
-
}), /* @__PURE__ */
|
|
658
|
+
children: L("sandbox.template.fields.storageSizeGi.label", "Size (GiB)")
|
|
659
|
+
}), /* @__PURE__ */ O("input", {
|
|
661
660
|
id: "tplStorageSizeGi",
|
|
662
|
-
"aria-label":
|
|
661
|
+
"aria-label": L("sandbox.template.fields.storageSizeGi.ariaLabel", "Size (GiB)"),
|
|
663
662
|
type: "number",
|
|
664
|
-
value:
|
|
665
|
-
onChange: (e) =>
|
|
663
|
+
value: H.storageSizeGi,
|
|
664
|
+
onChange: (e) => Z("storageSizeGi", Number(e.target.value)),
|
|
666
665
|
min: 1,
|
|
667
666
|
max: 200,
|
|
668
667
|
className: "w-full px-4 py-2.5 border-2 border-border-subtle rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all"
|
|
669
668
|
})] }),
|
|
670
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
671
670
|
htmlFor: "tplStorageMountPath",
|
|
672
671
|
className: "block text-sm font-semibold mb-2",
|
|
673
|
-
children:
|
|
674
|
-
}), /* @__PURE__ */
|
|
672
|
+
children: L("sandbox.template.fields.storageMountPath.label", "Mount Path")
|
|
673
|
+
}), /* @__PURE__ */ O("input", {
|
|
675
674
|
id: "tplStorageMountPath",
|
|
676
|
-
"aria-label":
|
|
675
|
+
"aria-label": L("sandbox.template.fields.storageMountPath.ariaLabel", "Mount Path"),
|
|
677
676
|
type: "text",
|
|
678
|
-
value:
|
|
679
|
-
onChange: (e) =>
|
|
677
|
+
value: H.storageMountPath,
|
|
678
|
+
onChange: (e) => Z("storageMountPath", e.target.value),
|
|
680
679
|
className: "w-full px-4 py-2.5 border-2 border-border-subtle rounded-lg bg-bg-surface font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all",
|
|
681
680
|
placeholder: "/data"
|
|
682
681
|
})] }),
|
|
683
|
-
|
|
682
|
+
H.storageMode === "PERSISTENT" && /* @__PURE__ */ k("div", {
|
|
684
683
|
className: "flex items-center gap-3 sm:col-span-2",
|
|
685
|
-
children: [/* @__PURE__ */
|
|
686
|
-
"aria-label":
|
|
684
|
+
children: [/* @__PURE__ */ O("input", {
|
|
685
|
+
"aria-label": L("sandbox.template.fields.storageRetainOnDelete.ariaLabel", "Retain storage on delete"),
|
|
687
686
|
type: "checkbox",
|
|
688
687
|
id: "storageRetainOnDelete",
|
|
689
|
-
checked:
|
|
690
|
-
onChange: (e) =>
|
|
688
|
+
checked: H.storageRetainOnDelete,
|
|
689
|
+
onChange: (e) => Z("storageRetainOnDelete", e.target.checked),
|
|
691
690
|
className: "size-4 rounded border-border-subtle text-primary focus:ring-primary/20"
|
|
692
|
-
}), /* @__PURE__ */
|
|
691
|
+
}), /* @__PURE__ */ O("label", {
|
|
693
692
|
htmlFor: "storageRetainOnDelete",
|
|
694
693
|
className: "text-sm font-medium",
|
|
695
|
-
children:
|
|
694
|
+
children: L("sandbox.template.fields.storageRetainOnDelete.label", "Retain volume data when sandbox is deleted")
|
|
696
695
|
})]
|
|
697
696
|
})
|
|
698
697
|
]
|
|
@@ -700,73 +699,73 @@ function P() {
|
|
|
700
699
|
]
|
|
701
700
|
})
|
|
702
701
|
}),
|
|
703
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ O(n, {
|
|
704
703
|
className: "border-border-seam",
|
|
705
|
-
children: /* @__PURE__ */
|
|
704
|
+
children: /* @__PURE__ */ k(r, {
|
|
706
705
|
className: "p-6 space-y-5",
|
|
707
706
|
children: [
|
|
708
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ k("div", {
|
|
709
708
|
className: "flex items-center justify-between",
|
|
710
|
-
children: [/* @__PURE__ */
|
|
709
|
+
children: [/* @__PURE__ */ k("h2", {
|
|
711
710
|
className: "text-lg font-bold flex items-center gap-2",
|
|
712
711
|
children: [
|
|
713
|
-
/* @__PURE__ */
|
|
712
|
+
/* @__PURE__ */ O(v, {
|
|
714
713
|
size: 18,
|
|
715
714
|
className: "text-primary"
|
|
716
715
|
}),
|
|
717
|
-
s(
|
|
718
|
-
|
|
716
|
+
s(I, "sandbox.template.sections.allowedImages", "Allowed Images"),
|
|
717
|
+
H.allowedImages.length > 0 && /* @__PURE__ */ O(e, {
|
|
719
718
|
variant: "secondary",
|
|
720
|
-
children:
|
|
719
|
+
children: H.allowedImages.length
|
|
721
720
|
})
|
|
722
721
|
]
|
|
723
|
-
}), /* @__PURE__ */
|
|
722
|
+
}), /* @__PURE__ */ k(t, {
|
|
724
723
|
type: "button",
|
|
725
724
|
variant: "outline",
|
|
726
725
|
size: "sm",
|
|
727
726
|
onClick: se,
|
|
728
|
-
children: [/* @__PURE__ */
|
|
727
|
+
children: [/* @__PURE__ */ O(x, { size: 14 }), L("sandbox.template.actions.addImage", "Add Image")]
|
|
729
728
|
})]
|
|
730
729
|
}),
|
|
731
|
-
/* @__PURE__ */
|
|
730
|
+
/* @__PURE__ */ O("p", {
|
|
732
731
|
className: "text-xs text-text-secondary",
|
|
733
|
-
children: s(
|
|
732
|
+
children: s(I, "sandbox.template.allowedImages.hint", "Restrict which container images can be used with this template. Leave empty to allow any image.")
|
|
734
733
|
}),
|
|
735
|
-
|
|
734
|
+
H.allowedImages.map((e, t) => /* @__PURE__ */ k("div", {
|
|
736
735
|
className: "flex items-center gap-2",
|
|
737
|
-
children: [/* @__PURE__ */
|
|
738
|
-
"aria-label":
|
|
736
|
+
children: [/* @__PURE__ */ O("input", {
|
|
737
|
+
"aria-label": L("sandbox.template.fields.allowedImages.label", "Allowed image"),
|
|
739
738
|
type: "text",
|
|
740
739
|
value: e,
|
|
741
740
|
onChange: (e) => le(t, e.target.value),
|
|
742
741
|
className: "flex-1 px-4 py-2 border-2 border-border-subtle rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all",
|
|
743
|
-
placeholder:
|
|
744
|
-
}), /* @__PURE__ */
|
|
742
|
+
placeholder: L("sandbox.template.fields.allowedImages.placeholder", "harbor-internal.burdenoff.com/sandbox/*")
|
|
743
|
+
}), /* @__PURE__ */ O("button", {
|
|
745
744
|
type: "button",
|
|
746
745
|
onClick: () => ce(t),
|
|
747
746
|
className: "p-2 text-status-error-text hover:bg-status-error-bg/10 rounded-lg",
|
|
748
|
-
children: /* @__PURE__ */
|
|
747
|
+
children: /* @__PURE__ */ O(w, { size: 14 })
|
|
749
748
|
})]
|
|
750
749
|
}, `allowed-img-${t}-${e}`))
|
|
751
750
|
]
|
|
752
751
|
})
|
|
753
752
|
}),
|
|
754
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ k("div", {
|
|
755
754
|
className: "flex flex-col sm:flex-row gap-3 pt-2",
|
|
756
|
-
children: [/* @__PURE__ */
|
|
755
|
+
children: [/* @__PURE__ */ k(t, {
|
|
757
756
|
type: "submit",
|
|
758
|
-
disabled:
|
|
757
|
+
disabled: J,
|
|
759
758
|
size: "lg",
|
|
760
|
-
children: [
|
|
759
|
+
children: [J ? /* @__PURE__ */ O(ie, {
|
|
761
760
|
size: 18,
|
|
762
761
|
className: "animate-spin"
|
|
763
|
-
}) : /* @__PURE__ */
|
|
764
|
-
}), /* @__PURE__ */
|
|
762
|
+
}) : /* @__PURE__ */ O(S, { size: 18 }), R ? s(I, "sandbox.template.actions.saveChanges", "Save Changes") : s(I, "sandbox.template.actions.create", "Create Template")]
|
|
763
|
+
}), /* @__PURE__ */ O(t, {
|
|
765
764
|
type: "button",
|
|
766
765
|
variant: "outline",
|
|
767
|
-
onClick: () =>
|
|
768
|
-
disabled:
|
|
769
|
-
children: s(
|
|
766
|
+
onClick: () => P?.(o(N, "templates")),
|
|
767
|
+
disabled: J,
|
|
768
|
+
children: s(I, "sandbox.template.actions.cancel", "Cancel")
|
|
770
769
|
})]
|
|
771
770
|
})
|
|
772
771
|
]
|
|
@@ -774,7 +773,6 @@ function P() {
|
|
|
774
773
|
]
|
|
775
774
|
});
|
|
776
775
|
}
|
|
777
|
-
|
|
778
|
-
export { P as TemplateDetailPage };
|
|
776
|
+
export { N as TemplateDetailPage };
|
|
779
777
|
|
|
780
778
|
//# sourceMappingURL=TemplateDetailPage.js.map
|