@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,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { CountdownTimer as ue } from "../components/CountdownTimer.js";
|
|
10
|
-
import { useSandboxStore as de } from "../store/sandboxStore.js";
|
|
1
|
+
import { Badge as e, Button as t, CTAOverflowMenu as n, Card as r, CardContent as i, Checkbox as a, GlassCard as ee, Input as te, Select as ne, SelectContent as re, SelectItem as o, SelectTrigger as ie, SelectValue as ae, Skeleton as s } from "../components/ui.js";
|
|
2
|
+
import { cn as c } from "../utils/cn.js";
|
|
3
|
+
import { StatusBadge as oe } from "../components/StatusBadge.js";
|
|
4
|
+
import { ResourceDisplay as se } from "../components/ResourceDisplay.js";
|
|
5
|
+
import { SandboxTypeIcon as ce } from "../components/SandboxTypeIcon.js";
|
|
6
|
+
import { CountdownTimer as le } from "../components/CountdownTimer.js";
|
|
7
|
+
import { useSandboxStore as ue } from "../store/sandboxStore.js";
|
|
8
|
+
import { useSandbox as de } from "../providers/SandboxProvider.js";
|
|
11
9
|
import { useSandboxEvents as fe } from "../utils/sandboxEvents.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
10
|
+
import { joinPath as pe } from "../utils/navigation.js";
|
|
11
|
+
import { PageLayout as me } from "../components/PageLayout.js";
|
|
12
|
+
import { tWithFallback as l } from "../utils/i18n.js";
|
|
13
|
+
import { SandboxUsageBanner as he } from "../components/SandboxUsageBanner.js";
|
|
14
|
+
import { ExportSandboxesDialog as ge } from "../components/ExportSandboxesDialog.js";
|
|
15
|
+
import { ListSandboxesDocument as _e, useDeleteSandboxMutation as ve, useExtendSandboxTtlMutation as ye, useListSandboxesQuery as be, useOnSandboxesChangedSubscription as xe, useStopSandboxMutation as Se } from "../../generated/wspace-operations.js";
|
|
16
|
+
import { SandboxKind as u } from "../../generated/wspace-types.js";
|
|
17
|
+
import { nativeImpact as Ce, nativeNotify as we } from "../../utils/nativeBridge.js";
|
|
18
|
+
import { useCallback as d, useMemo as f, useState as p } from "react";
|
|
19
|
+
import { PermissionGate as Te } from "@burdenoff/fe-libs/shared/components";
|
|
20
|
+
import { AlertCircle as Ee, Box as De, CheckCircle2 as Oe, ChevronLeft as ke, ChevronRight as Ae, Container as je, Database as Me, Download as Ne, Filter as Pe, Loader2 as m, Plus as Fe, Search as Ie, StopCircle as h, Timer as Le, Trash2 as g, X as _ } from "lucide-react";
|
|
21
21
|
import { useApolloClient as Re } from "@apollo/client/react";
|
|
22
22
|
import { useI18n as ze } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
23
23
|
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
24
24
|
import { AlertDialog as Be, AlertDialogAction as Ve, AlertDialogCancel as He, AlertDialogContent as Ue, AlertDialogDescription as We, AlertDialogFooter as Ge, AlertDialogHeader as Ke, AlertDialogTitle as qe, AuroraBackground as Je, EmphasisPanel as Ye, GradientText as Xe, IllustratedEmptyState as Ze, PagePurpose as Qe } from "@burdenoff/fe-libs/ui";
|
|
25
|
-
|
|
25
|
+
// src/sandbox/pages/SandboxListPage.tsx
|
|
26
26
|
var x = ["RUNNING"], S = ["RUNNING", "PENDING"], C = [
|
|
27
27
|
"STOPPED",
|
|
28
28
|
"ERROR",
|
|
@@ -41,95 +41,95 @@ function et(e) {
|
|
|
41
41
|
...e.search?.trim() ? { search: e.search.trim() } : {},
|
|
42
42
|
...e.template && e.template !== "all" ? { template: e.template } : {},
|
|
43
43
|
...e.status && e.status !== "all" ? { status: e.status } : {},
|
|
44
|
-
kind:
|
|
44
|
+
kind: u.User
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function tt(e) {
|
|
48
48
|
return x.includes(e.status);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function nt(e) {
|
|
51
51
|
return S.includes(e.status);
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function rt(e) {
|
|
54
54
|
return C.includes(e.status);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function T(e, t) {
|
|
57
57
|
return e instanceof Error && e.message.trim() ? e.message : t;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function it(e, t, n, r) {
|
|
60
60
|
let i = [`${e} ${t} sandbox${t === 1 ? "" : "es"}`];
|
|
61
61
|
return n > 0 && i.push(`${n} failed`), r > 0 && i.push(`${r} skipped`), i.join(" • ");
|
|
62
62
|
}
|
|
63
|
-
async function
|
|
63
|
+
async function at(e, t, n = w) {
|
|
64
64
|
let r = [];
|
|
65
65
|
for (let i = 0; i < e.length; i += n) {
|
|
66
|
-
let a = e.slice(i, i + n),
|
|
67
|
-
r.push(...
|
|
66
|
+
let a = e.slice(i, i + n), ee = await Promise.allSettled(a.map(t));
|
|
67
|
+
r.push(...ee);
|
|
68
68
|
}
|
|
69
69
|
return r;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
let { basePath:
|
|
71
|
+
function E() {
|
|
72
|
+
let { basePath: u = "/", navigate: x } = de(), { sandboxFilter: S, updateFilter: C, resetFilter: w } = ue(), E = Re(), { t: D } = ze(), [O, ot] = p(!1), [k, A] = p(1), [j, M] = p(/* @__PURE__ */ new Map()), [N, P] = p(null), [F, I] = p(null), [st, L] = p(null), { workspaceId: R } = de(), z = et(S), { data: ct, loading: lt, refetch: B } = be({
|
|
73
73
|
variables: {
|
|
74
|
-
context: { workspaceId:
|
|
75
|
-
filter:
|
|
74
|
+
context: { workspaceId: R },
|
|
75
|
+
filter: z,
|
|
76
76
|
pagination: {
|
|
77
|
-
page:
|
|
77
|
+
page: k,
|
|
78
78
|
limit: 20
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
-
skip: !
|
|
82
|
-
}), [
|
|
83
|
-
|
|
84
|
-
variables: { workspaceId:
|
|
85
|
-
skip: !
|
|
81
|
+
skip: !R
|
|
82
|
+
}), [V] = Se(), [H] = ve(), [ut] = ye(), dt = fe(), [ft, pt] = p(!1);
|
|
83
|
+
xe({
|
|
84
|
+
variables: { workspaceId: R },
|
|
85
|
+
skip: !R,
|
|
86
86
|
onData: ({ data: e }) => {
|
|
87
87
|
let t = e.data?.onSandboxesChanged;
|
|
88
|
-
t && (t.changeType === "CREATED" || t.changeType === "DELETED") &&
|
|
88
|
+
t && (t.changeType === "CREATED" || t.changeType === "DELETED") && B();
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
let
|
|
92
|
-
C({ search: e }),
|
|
93
|
-
}, [C]),
|
|
94
|
-
w(),
|
|
95
|
-
}, [w]),
|
|
96
|
-
x?.(
|
|
91
|
+
let mt = ct?.listSandboxes?.items ?? [], U = ct?.listSandboxes?.total ?? 0, ht = lt, gt = mt, W = Math.ceil(U / 20), G = gt, K = S.search || S.template && S.template !== "all" || S.status && S.status !== "all", q = mt.filter((e) => e.status === "RUNNING").length, _t = U, vt = f(() => Array.from(j.keys()), [j]), J = f(() => Array.from(j.values()), [j]), Y = f(() => G.filter((e) => j.has(e.id)).length, [G, j]), X = f(() => J.filter(tt), [J]), Z = f(() => J.filter(rt), [J]), yt = vt.length > 0, bt = G.length > 0 && Y === G.length, xt = Y > 0 && Y < G.length, Q = N !== null, St = N === "select-all", Ct = N === "stop", wt = N === "delete", Tt = d((e) => {
|
|
92
|
+
C({ search: e }), A(1);
|
|
93
|
+
}, [C]), Et = d(() => {
|
|
94
|
+
w(), A(1);
|
|
95
|
+
}, [w]), $ = () => {
|
|
96
|
+
x?.(pe(u, "new"));
|
|
97
97
|
}, Dt = (e) => {
|
|
98
|
-
x?.(
|
|
99
|
-
}, Ot =
|
|
100
|
-
|
|
98
|
+
x?.(pe(u, e));
|
|
99
|
+
}, Ot = d((e, t) => {
|
|
100
|
+
M((n) => {
|
|
101
101
|
let r = new Map(n);
|
|
102
102
|
return t ? r.set(e.id, e) : r.delete(e.id), r;
|
|
103
103
|
});
|
|
104
|
-
}, []), kt =
|
|
105
|
-
|
|
104
|
+
}, []), kt = d((e) => {
|
|
105
|
+
M((t) => {
|
|
106
106
|
let n = new Map(t);
|
|
107
|
-
for (let t of
|
|
107
|
+
for (let t of G) e ? n.set(t.id, t) : n.delete(t.id);
|
|
108
108
|
return n;
|
|
109
109
|
});
|
|
110
|
-
}, [
|
|
111
|
-
|
|
112
|
-
}, []), jt =
|
|
113
|
-
|
|
110
|
+
}, [G]), At = d(() => {
|
|
111
|
+
M(/* @__PURE__ */ new Map());
|
|
112
|
+
}, []), jt = d((e) => {
|
|
113
|
+
M((t) => {
|
|
114
114
|
if (!t.has(e)) return t;
|
|
115
115
|
let n = new Map(t);
|
|
116
116
|
return n.delete(e), n;
|
|
117
117
|
});
|
|
118
|
-
}, []), Mt =
|
|
119
|
-
|
|
118
|
+
}, []), Mt = d((e) => {
|
|
119
|
+
M((t) => {
|
|
120
120
|
if (!t.has(e.id)) return t;
|
|
121
121
|
let n = new Map(t);
|
|
122
122
|
return n.set(e.id, e), n;
|
|
123
123
|
});
|
|
124
|
-
}, []), Nt =
|
|
125
|
-
if (!
|
|
124
|
+
}, []), Nt = d(async () => {
|
|
125
|
+
if (!R) return [];
|
|
126
126
|
let e = [], t = 1;
|
|
127
127
|
for (;;) {
|
|
128
|
-
let n = (await
|
|
129
|
-
query:
|
|
128
|
+
let n = (await E.query({
|
|
129
|
+
query: _e,
|
|
130
130
|
variables: {
|
|
131
|
-
context: { workspaceId:
|
|
132
|
-
filter:
|
|
131
|
+
context: { workspaceId: R },
|
|
132
|
+
filter: z,
|
|
133
133
|
pagination: {
|
|
134
134
|
page: t,
|
|
135
135
|
limit: 100
|
|
@@ -142,13 +142,13 @@ function D() {
|
|
|
142
142
|
}
|
|
143
143
|
return e;
|
|
144
144
|
}, [
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
]), Pt =
|
|
145
|
+
E,
|
|
146
|
+
z,
|
|
147
|
+
R
|
|
148
|
+
]), Pt = d(async (e) => {
|
|
149
149
|
try {
|
|
150
|
-
let t = (await
|
|
151
|
-
context: { workspaceId:
|
|
150
|
+
let t = (await V({ variables: {
|
|
151
|
+
context: { workspaceId: R },
|
|
152
152
|
id: e.id
|
|
153
153
|
} })).data?.stopSandbox;
|
|
154
154
|
if (!t) throw Error(`Failed to stop sandbox "${e.name}".`);
|
|
@@ -156,173 +156,173 @@ function D() {
|
|
|
156
156
|
...e,
|
|
157
157
|
status: t.status,
|
|
158
158
|
stoppedAt: t.stoppedAt ?? e.stoppedAt
|
|
159
|
-
}), await
|
|
159
|
+
}), await B();
|
|
160
160
|
} catch (t) {
|
|
161
|
-
|
|
161
|
+
I({
|
|
162
162
|
kind: "error",
|
|
163
|
-
message:
|
|
163
|
+
message: T(t, `Failed to stop sandbox "${e.name}".`)
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
}, [
|
|
167
|
+
B,
|
|
167
168
|
V,
|
|
168
|
-
H,
|
|
169
169
|
Mt,
|
|
170
|
-
|
|
171
|
-
]), Ft =
|
|
172
|
-
|
|
170
|
+
R
|
|
171
|
+
]), Ft = d(async (e) => {
|
|
172
|
+
Ce("medium");
|
|
173
173
|
try {
|
|
174
|
-
if (!(await
|
|
175
|
-
context: { workspaceId:
|
|
174
|
+
if (!(await H({ variables: {
|
|
175
|
+
context: { workspaceId: R },
|
|
176
176
|
id: e.id
|
|
177
177
|
} })).data?.deleteSandbox) throw Error(`Failed to delete sandbox "${e.name}".`);
|
|
178
|
-
|
|
178
|
+
we("success"), dt.sandboxDeleted({ sandboxId: e.id }), jt(e.id), await B();
|
|
179
179
|
} catch (t) {
|
|
180
|
-
|
|
180
|
+
we("error"), I({
|
|
181
181
|
kind: "error",
|
|
182
|
-
message:
|
|
182
|
+
message: T(t, `Failed to delete sandbox "${e.name}".`)
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
}, [
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
H,
|
|
187
|
+
B,
|
|
188
188
|
jt,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
]), It =
|
|
192
|
-
|
|
189
|
+
dt,
|
|
190
|
+
R
|
|
191
|
+
]), It = d(async () => {
|
|
192
|
+
P("select-all");
|
|
193
193
|
try {
|
|
194
194
|
let e = await Nt();
|
|
195
|
-
|
|
195
|
+
M(new Map(e.map((e) => [e.id, e]))), I({
|
|
196
196
|
kind: "success",
|
|
197
197
|
message: `Selected ${e.length} sandbox${e.length === 1 ? "" : "es"}.`
|
|
198
198
|
});
|
|
199
199
|
} catch (e) {
|
|
200
|
-
|
|
200
|
+
I({
|
|
201
201
|
kind: "error",
|
|
202
|
-
message:
|
|
202
|
+
message: T(e, "Failed to select all matching sandboxes.")
|
|
203
203
|
});
|
|
204
204
|
} finally {
|
|
205
|
-
|
|
205
|
+
P(null);
|
|
206
206
|
}
|
|
207
|
-
}, [Nt]), Lt =
|
|
208
|
-
if (
|
|
209
|
-
|
|
207
|
+
}, [Nt]), Lt = d(async () => {
|
|
208
|
+
if (X.length === 0) {
|
|
209
|
+
I({
|
|
210
210
|
kind: "error",
|
|
211
211
|
message: "Select at least one running sandbox to stop."
|
|
212
212
|
});
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
|
-
let e =
|
|
216
|
-
|
|
215
|
+
let e = J.length - X.length;
|
|
216
|
+
P("stop");
|
|
217
217
|
try {
|
|
218
|
-
let t = await
|
|
219
|
-
let t = await
|
|
220
|
-
context: { workspaceId:
|
|
218
|
+
let t = await at(X, async (e) => {
|
|
219
|
+
let t = await V({ variables: {
|
|
220
|
+
context: { workspaceId: R },
|
|
221
221
|
id: e.id
|
|
222
222
|
} });
|
|
223
223
|
if (!t.data?.stopSandbox) throw Error(`Failed to stop sandbox "${e.name}".`);
|
|
224
224
|
return t.data.stopSandbox;
|
|
225
225
|
}), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
226
|
-
|
|
226
|
+
M(/* @__PURE__ */ new Map()), await B(), I({
|
|
227
227
|
kind: r === 0 ? "success" : "error",
|
|
228
|
-
message:
|
|
228
|
+
message: it("Stopped", n, r, e)
|
|
229
229
|
});
|
|
230
230
|
} catch (e) {
|
|
231
|
-
|
|
231
|
+
I({
|
|
232
232
|
kind: "error",
|
|
233
|
-
message:
|
|
233
|
+
message: T(e, "Failed to stop selected sandboxes.")
|
|
234
234
|
});
|
|
235
235
|
} finally {
|
|
236
|
-
|
|
236
|
+
P(null);
|
|
237
237
|
}
|
|
238
238
|
}, [
|
|
239
|
+
B,
|
|
240
|
+
J.length,
|
|
241
|
+
X,
|
|
239
242
|
V,
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
]), Rt = f(() => {
|
|
245
|
-
if (Q.length === 0) {
|
|
246
|
-
L({
|
|
243
|
+
R
|
|
244
|
+
]), Rt = d(() => {
|
|
245
|
+
if (Z.length === 0) {
|
|
246
|
+
I({
|
|
247
247
|
kind: "error",
|
|
248
248
|
message: "Select at least one stopped, failed, expired, or errored sandbox to delete."
|
|
249
249
|
});
|
|
250
250
|
return;
|
|
251
251
|
}
|
|
252
|
-
let e =
|
|
253
|
-
|
|
254
|
-
}, [
|
|
255
|
-
if (
|
|
256
|
-
let e =
|
|
257
|
-
|
|
252
|
+
let e = J.length - Z.length;
|
|
253
|
+
L({ message: e > 0 ? `Delete ${Z.length} selected sandbox(es)? ${e} selected sandbox(es) cannot be deleted right now and will be skipped. This cannot be undone.` : `Delete ${Z.length} selected sandbox(es)? This cannot be undone.` });
|
|
254
|
+
}, [Z.length, J.length]), zt = d(async () => {
|
|
255
|
+
if (L(null), Z.length === 0) return;
|
|
256
|
+
let e = J.length - Z.length;
|
|
257
|
+
P("delete");
|
|
258
258
|
try {
|
|
259
|
-
let t = await
|
|
260
|
-
let t = await
|
|
261
|
-
context: { workspaceId:
|
|
259
|
+
let t = await at(Z, async (e) => {
|
|
260
|
+
let t = await H({ variables: {
|
|
261
|
+
context: { workspaceId: R },
|
|
262
262
|
id: e.id
|
|
263
263
|
} });
|
|
264
264
|
if (!t.data?.deleteSandbox) throw Error(`Failed to delete sandbox "${e.name}".`);
|
|
265
265
|
return t.data.deleteSandbox;
|
|
266
266
|
}), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
267
|
-
|
|
267
|
+
M(/* @__PURE__ */ new Map()), await B(), I({
|
|
268
268
|
kind: r === 0 ? "success" : "error",
|
|
269
|
-
message:
|
|
269
|
+
message: it("Deleted", n, r, e)
|
|
270
270
|
});
|
|
271
271
|
} catch (e) {
|
|
272
|
-
|
|
272
|
+
I({
|
|
273
273
|
kind: "error",
|
|
274
|
-
message:
|
|
274
|
+
message: T(e, "Failed to delete selected sandboxes.")
|
|
275
275
|
});
|
|
276
276
|
} finally {
|
|
277
|
-
|
|
277
|
+
P(null);
|
|
278
278
|
}
|
|
279
279
|
}, [
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
280
|
+
H,
|
|
281
|
+
B,
|
|
282
|
+
Z,
|
|
283
|
+
J.length,
|
|
284
|
+
R
|
|
285
285
|
]);
|
|
286
|
-
return /* @__PURE__ */ b(
|
|
286
|
+
return /* @__PURE__ */ b(me, {
|
|
287
287
|
heroBackdrop: /* @__PURE__ */ y(Je, { intensity: "subtle" }),
|
|
288
|
-
title: /* @__PURE__ */ y(Xe, { children:
|
|
289
|
-
subtitle:
|
|
290
|
-
icon: /* @__PURE__ */ y(
|
|
288
|
+
title: /* @__PURE__ */ y(Xe, { children: l(D, "sandbox.list.title", "Sandboxes") }),
|
|
289
|
+
subtitle: l(D, "sandbox.list.subtitle", "Manage ephemeral sandbox environments for development and testing"),
|
|
290
|
+
icon: /* @__PURE__ */ y(De, { size: 24 }),
|
|
291
291
|
headerActions: /* @__PURE__ */ b("div", {
|
|
292
292
|
className: "flex items-center gap-2",
|
|
293
|
-
children: [/* @__PURE__ */ y(
|
|
293
|
+
children: [/* @__PURE__ */ y(Te, {
|
|
294
294
|
permission: "sandbox:create",
|
|
295
|
-
children: /* @__PURE__ */ b(
|
|
296
|
-
onClick:
|
|
295
|
+
children: /* @__PURE__ */ b(t, {
|
|
296
|
+
onClick: $,
|
|
297
297
|
size: "lg",
|
|
298
298
|
"data-tour": "sandbox-list-create-button",
|
|
299
|
-
children: [/* @__PURE__ */ y(
|
|
299
|
+
children: [/* @__PURE__ */ y(Fe, { size: 18 }), l(D, "sandbox.list.actions.create", "Create Sandbox")]
|
|
300
300
|
})
|
|
301
|
-
}), /* @__PURE__ */ y(
|
|
302
|
-
label:
|
|
303
|
-
onSelect: () =>
|
|
304
|
-
icon: /* @__PURE__ */ y(
|
|
301
|
+
}), /* @__PURE__ */ y(n, { actions: [{
|
|
302
|
+
label: l(D, "sandbox.list.actions.export.label", "Export"),
|
|
303
|
+
onSelect: () => pt(!0),
|
|
304
|
+
icon: /* @__PURE__ */ y(Ne, { size: 16 })
|
|
305
305
|
}] })]
|
|
306
306
|
}),
|
|
307
|
-
headerContent:
|
|
307
|
+
headerContent: _t > 0 ? /* @__PURE__ */ b("div", {
|
|
308
308
|
className: "flex items-center gap-3 flex-wrap",
|
|
309
|
-
children: [/* @__PURE__ */ y(
|
|
309
|
+
children: [/* @__PURE__ */ y(e, {
|
|
310
310
|
variant: "secondary",
|
|
311
311
|
className: "gap-1.5",
|
|
312
|
-
children:
|
|
313
|
-
}), /* @__PURE__ */ y(
|
|
312
|
+
children: l(D, "sandbox.list.header.total", "{count} total", { count: _t })
|
|
313
|
+
}), /* @__PURE__ */ y(e, {
|
|
314
314
|
variant: "default",
|
|
315
315
|
className: "gap-1.5 bg-status-success-bg-subtle text-status-success-text border-border-default",
|
|
316
|
-
children:
|
|
316
|
+
children: l(D, "sandbox.list.header.running", "{count} running", { count: q })
|
|
317
317
|
})]
|
|
318
318
|
}) : null,
|
|
319
319
|
children: [
|
|
320
|
-
/* @__PURE__ */ y(Qe, { children:
|
|
320
|
+
/* @__PURE__ */ y(Qe, { children: l(D, "sandbox.list.purpose", "Sandboxes are disposable, isolated environments where you can safely run code, try an AI builder, reproduce a bug, or test a workflow without touching your real projects. Spin one up, experiment, and let it expire — nothing here affects production.") }),
|
|
321
321
|
/* @__PURE__ */ y(Ye, {
|
|
322
322
|
className: "p-4",
|
|
323
|
-
children: /* @__PURE__ */ y(
|
|
324
|
-
runningCount:
|
|
325
|
-
maxConcurrent: Math.max(
|
|
323
|
+
children: /* @__PURE__ */ y(he, {
|
|
324
|
+
runningCount: q,
|
|
325
|
+
maxConcurrent: Math.max(q, 10)
|
|
326
326
|
})
|
|
327
327
|
}),
|
|
328
328
|
/* @__PURE__ */ b("div", {
|
|
@@ -332,27 +332,27 @@ function D() {
|
|
|
332
332
|
className: "flex flex-col sm:flex-row gap-3",
|
|
333
333
|
children: [/* @__PURE__ */ b("div", {
|
|
334
334
|
className: "flex-1 relative group",
|
|
335
|
-
children: [/* @__PURE__ */ y(
|
|
335
|
+
children: [/* @__PURE__ */ y(Ie, {
|
|
336
336
|
size: 18,
|
|
337
337
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors"
|
|
338
|
-
}), /* @__PURE__ */ y(
|
|
338
|
+
}), /* @__PURE__ */ y(te, {
|
|
339
339
|
type: "text",
|
|
340
|
-
placeholder:
|
|
340
|
+
placeholder: l(D, "sandbox.list.search.placeholder", "Search sandboxes by name, description, or ID..."),
|
|
341
341
|
value: S.search,
|
|
342
|
-
onChange: (e) =>
|
|
342
|
+
onChange: (e) => Tt(e.target.value),
|
|
343
343
|
className: "pl-[3.25rem] h-10",
|
|
344
|
-
"aria-label":
|
|
344
|
+
"aria-label": l(D, "sandbox.list.search.ariaLabel", "Search sandboxes"),
|
|
345
345
|
"data-tour": "sandbox-list-search-input"
|
|
346
346
|
})]
|
|
347
|
-
}), /* @__PURE__ */ b(
|
|
348
|
-
variant:
|
|
349
|
-
onClick: () =>
|
|
350
|
-
"aria-label":
|
|
347
|
+
}), /* @__PURE__ */ b(t, {
|
|
348
|
+
variant: O || K ? "default" : "outline",
|
|
349
|
+
onClick: () => ot(!O),
|
|
350
|
+
"aria-label": l(D, "sandbox.list.filters.toggle.ariaLabel", "Toggle filters"),
|
|
351
351
|
"data-tour": "sandbox-list-filters-button",
|
|
352
352
|
children: [
|
|
353
|
-
/* @__PURE__ */ y(
|
|
354
|
-
|
|
355
|
-
|
|
353
|
+
/* @__PURE__ */ y(Pe, { size: 16 }),
|
|
354
|
+
O ? l(D, "sandbox.list.filters.toggle.hide", "Hide") : l(D, "sandbox.list.filters.toggle.show", "Filter"),
|
|
355
|
+
K && /* @__PURE__ */ y(e, {
|
|
356
356
|
variant: "secondary",
|
|
357
357
|
className: "ml-1 h-5 min-w-5 px-1.5",
|
|
358
358
|
children: [
|
|
@@ -364,24 +364,24 @@ function D() {
|
|
|
364
364
|
]
|
|
365
365
|
})]
|
|
366
366
|
}),
|
|
367
|
-
|
|
367
|
+
O && /* @__PURE__ */ y(r, {
|
|
368
368
|
className: "animate-in slide-in-from-top-2 duration-200",
|
|
369
|
-
children: /* @__PURE__ */ b(
|
|
369
|
+
children: /* @__PURE__ */ b(i, {
|
|
370
370
|
className: "p-4",
|
|
371
371
|
children: [/* @__PURE__ */ b("div", {
|
|
372
372
|
className: "flex items-center justify-between mb-4",
|
|
373
373
|
children: [/* @__PURE__ */ b("h3", {
|
|
374
374
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
375
|
-
children: [/* @__PURE__ */ y(
|
|
375
|
+
children: [/* @__PURE__ */ y(Pe, {
|
|
376
376
|
size: 16,
|
|
377
377
|
className: "text-primary"
|
|
378
|
-
}),
|
|
379
|
-
}),
|
|
378
|
+
}), l(D, "sandbox.list.filters.panel.title", "Filter Sandboxes")]
|
|
379
|
+
}), K && /* @__PURE__ */ b(t, {
|
|
380
380
|
variant: "ghost",
|
|
381
381
|
size: "sm",
|
|
382
|
-
onClick:
|
|
382
|
+
onClick: Et,
|
|
383
383
|
className: "text-text-secondary hover:text-status-error-text",
|
|
384
|
-
children: [/* @__PURE__ */ y(_, { size: 16 }),
|
|
384
|
+
children: [/* @__PURE__ */ y(_, { size: 16 }), l(D, "sandbox.list.filters.clearAll", "Clear All")]
|
|
385
385
|
})]
|
|
386
386
|
}), /* @__PURE__ */ b("div", {
|
|
387
387
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
@@ -389,32 +389,32 @@ function D() {
|
|
|
389
389
|
className: "space-y-2",
|
|
390
390
|
children: [/* @__PURE__ */ y("label", {
|
|
391
391
|
className: "block text-sm font-medium text-text-primary",
|
|
392
|
-
children:
|
|
393
|
-
}), /* @__PURE__ */ b(
|
|
392
|
+
children: l(D, "sandbox.list.filters.template.label", "Template")
|
|
393
|
+
}), /* @__PURE__ */ b(ne, {
|
|
394
394
|
value: S.template || "all",
|
|
395
395
|
onValueChange: (e) => {
|
|
396
|
-
C({ template: e }),
|
|
396
|
+
C({ template: e }), A(1);
|
|
397
397
|
},
|
|
398
|
-
children: [/* @__PURE__ */ y(
|
|
399
|
-
/* @__PURE__ */ y(
|
|
398
|
+
children: [/* @__PURE__ */ y(ie, { children: /* @__PURE__ */ y(ae, { placeholder: l(D, "sandbox.list.filters.template.all", "All Templates") }) }), /* @__PURE__ */ b(re, { children: [
|
|
399
|
+
/* @__PURE__ */ y(o, {
|
|
400
400
|
value: "all",
|
|
401
|
-
children:
|
|
401
|
+
children: l(D, "sandbox.list.filters.template.all", "All Templates")
|
|
402
402
|
}),
|
|
403
|
-
/* @__PURE__ */ y(
|
|
403
|
+
/* @__PURE__ */ y(o, {
|
|
404
404
|
value: "AI_BUILDER",
|
|
405
|
-
children:
|
|
405
|
+
children: l(D, "sandbox.list.filters.template.aiBuilder", "AI Builder")
|
|
406
406
|
}),
|
|
407
|
-
/* @__PURE__ */ y(
|
|
407
|
+
/* @__PURE__ */ y(o, {
|
|
408
408
|
value: "WORKFLOW_MULTI_NODE",
|
|
409
|
-
children:
|
|
409
|
+
children: l(D, "sandbox.list.filters.template.workflowMultiNode", "Workflow Multi-Node")
|
|
410
410
|
}),
|
|
411
|
-
/* @__PURE__ */ y(
|
|
411
|
+
/* @__PURE__ */ y(o, {
|
|
412
412
|
value: "MISC_SHELL",
|
|
413
|
-
children:
|
|
413
|
+
children: l(D, "sandbox.list.filters.template.miscShell", "Misc Shell")
|
|
414
414
|
}),
|
|
415
|
-
/* @__PURE__ */ y(
|
|
415
|
+
/* @__PURE__ */ y(o, {
|
|
416
416
|
value: "CUSTOM",
|
|
417
|
-
children:
|
|
417
|
+
children: l(D, "sandbox.list.filters.template.custom", "Custom")
|
|
418
418
|
})
|
|
419
419
|
] })]
|
|
420
420
|
})]
|
|
@@ -422,48 +422,48 @@ function D() {
|
|
|
422
422
|
className: "space-y-2",
|
|
423
423
|
children: [/* @__PURE__ */ y("label", {
|
|
424
424
|
className: "block text-sm font-medium text-text-primary",
|
|
425
|
-
children:
|
|
426
|
-
}), /* @__PURE__ */ b(
|
|
425
|
+
children: l(D, "sandbox.list.filters.status.label", "Status")
|
|
426
|
+
}), /* @__PURE__ */ b(ne, {
|
|
427
427
|
value: S.status || "all",
|
|
428
428
|
onValueChange: (e) => {
|
|
429
|
-
C({ status: e }),
|
|
429
|
+
C({ status: e }), A(1);
|
|
430
430
|
},
|
|
431
|
-
children: [/* @__PURE__ */ y(
|
|
432
|
-
/* @__PURE__ */ y(
|
|
431
|
+
children: [/* @__PURE__ */ y(ie, { children: /* @__PURE__ */ y(ae, { placeholder: l(D, "sandbox.list.filters.status.all", "All Statuses") }) }), /* @__PURE__ */ b(re, { children: [
|
|
432
|
+
/* @__PURE__ */ y(o, {
|
|
433
433
|
value: "all",
|
|
434
|
-
children:
|
|
434
|
+
children: l(D, "sandbox.list.filters.status.all", "All Statuses")
|
|
435
435
|
}),
|
|
436
|
-
/* @__PURE__ */ y(
|
|
436
|
+
/* @__PURE__ */ y(o, {
|
|
437
437
|
value: "PENDING",
|
|
438
|
-
children:
|
|
438
|
+
children: l(D, "sandbox.list.filters.status.pending", "Pending")
|
|
439
439
|
}),
|
|
440
|
-
/* @__PURE__ */ y(
|
|
440
|
+
/* @__PURE__ */ y(o, {
|
|
441
441
|
value: "PROVISIONING",
|
|
442
|
-
children:
|
|
442
|
+
children: l(D, "sandbox.list.filters.status.provisioning", "Provisioning")
|
|
443
443
|
}),
|
|
444
|
-
/* @__PURE__ */ y(
|
|
444
|
+
/* @__PURE__ */ y(o, {
|
|
445
445
|
value: "RUNNING",
|
|
446
|
-
children:
|
|
446
|
+
children: l(D, "sandbox.list.filters.status.running", "Running")
|
|
447
447
|
}),
|
|
448
|
-
/* @__PURE__ */ y(
|
|
448
|
+
/* @__PURE__ */ y(o, {
|
|
449
449
|
value: "STOPPING",
|
|
450
|
-
children:
|
|
450
|
+
children: l(D, "sandbox.list.filters.status.stopping", "Stopping")
|
|
451
451
|
}),
|
|
452
|
-
/* @__PURE__ */ y(
|
|
452
|
+
/* @__PURE__ */ y(o, {
|
|
453
453
|
value: "STOPPED",
|
|
454
|
-
children:
|
|
454
|
+
children: l(D, "sandbox.list.filters.status.stopped", "Stopped")
|
|
455
455
|
}),
|
|
456
|
-
/* @__PURE__ */ y(
|
|
456
|
+
/* @__PURE__ */ y(o, {
|
|
457
457
|
value: "ERROR",
|
|
458
|
-
children:
|
|
458
|
+
children: l(D, "sandbox.list.filters.status.error", "Error")
|
|
459
459
|
}),
|
|
460
|
-
/* @__PURE__ */ y(
|
|
460
|
+
/* @__PURE__ */ y(o, {
|
|
461
461
|
value: "EXPIRED",
|
|
462
|
-
children:
|
|
462
|
+
children: l(D, "sandbox.list.filters.status.expired", "Expired")
|
|
463
463
|
}),
|
|
464
|
-
/* @__PURE__ */ y(
|
|
464
|
+
/* @__PURE__ */ y(o, {
|
|
465
465
|
value: "FAILED",
|
|
466
|
-
children:
|
|
466
|
+
children: l(D, "sandbox.list.filters.status.failed", "Failed")
|
|
467
467
|
})
|
|
468
468
|
] })]
|
|
469
469
|
})]
|
|
@@ -471,64 +471,64 @@ function D() {
|
|
|
471
471
|
})]
|
|
472
472
|
})
|
|
473
473
|
}),
|
|
474
|
-
|
|
475
|
-
className:
|
|
476
|
-
children: /* @__PURE__ */ b(
|
|
474
|
+
F && /* @__PURE__ */ y(r, {
|
|
475
|
+
className: c("border-l-4", F.kind === "success" ? "border-l-status-success-text bg-status-success-bg-subtle" : "border-l-destructive bg-status-error-bg/5"),
|
|
476
|
+
children: /* @__PURE__ */ b(i, {
|
|
477
477
|
className: "p-4 flex items-start justify-between gap-3",
|
|
478
478
|
children: [/* @__PURE__ */ b("div", {
|
|
479
|
-
role:
|
|
479
|
+
role: F.kind === "error" ? "alert" : "status",
|
|
480
480
|
className: "flex items-start gap-2 text-sm",
|
|
481
|
-
children: [
|
|
481
|
+
children: [F.kind === "success" ? /* @__PURE__ */ y(Oe, {
|
|
482
482
|
size: 16,
|
|
483
483
|
className: "mt-0.5 text-status-success-text"
|
|
484
|
-
}) : /* @__PURE__ */ y(
|
|
484
|
+
}) : /* @__PURE__ */ y(Ee, {
|
|
485
485
|
size: 16,
|
|
486
486
|
className: "mt-0.5 text-status-error-text"
|
|
487
487
|
}), /* @__PURE__ */ y("span", {
|
|
488
|
-
className:
|
|
489
|
-
children:
|
|
488
|
+
className: c("font-medium", F.kind === "success" ? "text-status-success-text" : "text-status-error-text"),
|
|
489
|
+
children: F.message
|
|
490
490
|
})]
|
|
491
|
-
}), /* @__PURE__ */ y(
|
|
491
|
+
}), /* @__PURE__ */ y(t, {
|
|
492
492
|
variant: "ghost",
|
|
493
493
|
size: "icon",
|
|
494
|
-
onClick: () =>
|
|
495
|
-
"aria-label":
|
|
494
|
+
onClick: () => I(null),
|
|
495
|
+
"aria-label": l(D, "sandbox.list.bulk.feedback.dismiss.ariaLabel", "Dismiss bulk action message"),
|
|
496
496
|
children: /* @__PURE__ */ y(_, { size: 16 })
|
|
497
497
|
})]
|
|
498
498
|
})
|
|
499
499
|
})
|
|
500
500
|
]
|
|
501
501
|
}),
|
|
502
|
-
|
|
502
|
+
ht && /* @__PURE__ */ y("div", {
|
|
503
503
|
className: "space-y-4 animate-in fade-in-0 duration-200",
|
|
504
504
|
children: [...[
|
|
505
505
|
,
|
|
506
506
|
,
|
|
507
507
|
,
|
|
508
|
-
]].map((e, t) => /* @__PURE__ */ y(
|
|
508
|
+
]].map((e, t) => /* @__PURE__ */ y(r, { children: /* @__PURE__ */ y(i, {
|
|
509
509
|
className: "p-5",
|
|
510
510
|
children: /* @__PURE__ */ b("div", {
|
|
511
511
|
className: "flex items-start gap-4 motion-safe:animate-vc-shimmer",
|
|
512
|
-
children: [/* @__PURE__ */ y(
|
|
512
|
+
children: [/* @__PURE__ */ y(s, { className: "size-12 rounded-lg" }), /* @__PURE__ */ b("div", {
|
|
513
513
|
className: "flex-1 space-y-2",
|
|
514
514
|
children: [
|
|
515
|
-
/* @__PURE__ */ y(
|
|
516
|
-
/* @__PURE__ */ y(
|
|
515
|
+
/* @__PURE__ */ y(s, { className: "h-5 w-1/3" }),
|
|
516
|
+
/* @__PURE__ */ y(s, { className: "h-4 w-2/3" }),
|
|
517
517
|
/* @__PURE__ */ b("div", {
|
|
518
518
|
className: "flex gap-2 pt-1",
|
|
519
|
-
children: [/* @__PURE__ */ y(
|
|
519
|
+
children: [/* @__PURE__ */ y(s, { className: "h-5 w-20 rounded-full" }), /* @__PURE__ */ y(s, { className: "h-5 w-24 rounded-full" })]
|
|
520
520
|
})
|
|
521
521
|
]
|
|
522
522
|
})]
|
|
523
523
|
})
|
|
524
524
|
}) }, t))
|
|
525
525
|
}),
|
|
526
|
-
!
|
|
526
|
+
!ht && /* @__PURE__ */ y("div", {
|
|
527
527
|
className: "space-y-4",
|
|
528
|
-
children:
|
|
529
|
-
/* @__PURE__ */ y(
|
|
528
|
+
children: G.length > 0 ? /* @__PURE__ */ b(v, { children: [
|
|
529
|
+
/* @__PURE__ */ y(r, {
|
|
530
530
|
className: "animate-in fade-in-0 duration-200",
|
|
531
|
-
children: /* @__PURE__ */ b(
|
|
531
|
+
children: /* @__PURE__ */ b(i, {
|
|
532
532
|
className: "p-4 space-y-3",
|
|
533
533
|
children: [/* @__PURE__ */ b("div", {
|
|
534
534
|
className: "flex flex-col gap-3 xl:flex-row xl:items-center xl:justify-between",
|
|
@@ -538,81 +538,81 @@ function D() {
|
|
|
538
538
|
children: [
|
|
539
539
|
/* @__PURE__ */ b("label", {
|
|
540
540
|
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
541
|
-
children: [/* @__PURE__ */ y(
|
|
542
|
-
checked:
|
|
541
|
+
children: [/* @__PURE__ */ y(a, {
|
|
542
|
+
checked: bt ? !0 : xt ? "indeterminate" : !1,
|
|
543
543
|
onCheckedChange: (e) => kt(e === !0),
|
|
544
|
-
"aria-label":
|
|
545
|
-
}), /* @__PURE__ */ y("span", { children:
|
|
544
|
+
"aria-label": l(D, "sandbox.list.bulk.selectPage.ariaLabel", "Select all sandboxes on this page")
|
|
545
|
+
}), /* @__PURE__ */ y("span", { children: l(D, "sandbox.list.bulk.selectPage.label", "Select page") })]
|
|
546
546
|
}),
|
|
547
|
-
|
|
547
|
+
U > G.length && /* @__PURE__ */ b(t, {
|
|
548
548
|
variant: "ghost",
|
|
549
549
|
size: "sm",
|
|
550
550
|
onClick: It,
|
|
551
|
-
disabled:
|
|
552
|
-
children: [
|
|
551
|
+
disabled: Q,
|
|
552
|
+
children: [St ? /* @__PURE__ */ y(m, {
|
|
553
553
|
size: 14,
|
|
554
554
|
className: "animate-spin"
|
|
555
|
-
}) : null,
|
|
555
|
+
}) : null, l(D, "sandbox.list.bulk.selectAll", "Select all {count}", { count: U })]
|
|
556
556
|
}),
|
|
557
|
-
|
|
557
|
+
yt && /* @__PURE__ */ y(t, {
|
|
558
558
|
variant: "ghost",
|
|
559
559
|
size: "sm",
|
|
560
560
|
onClick: At,
|
|
561
|
-
disabled:
|
|
562
|
-
children:
|
|
561
|
+
disabled: Q,
|
|
562
|
+
children: l(D, "sandbox.list.bulk.clearSelection", "Clear selection")
|
|
563
563
|
})
|
|
564
564
|
]
|
|
565
565
|
}), /* @__PURE__ */ b("div", {
|
|
566
566
|
className: "flex flex-wrap items-center gap-2",
|
|
567
567
|
children: [
|
|
568
|
-
/* @__PURE__ */ y(
|
|
569
|
-
variant:
|
|
568
|
+
/* @__PURE__ */ y(e, {
|
|
569
|
+
variant: yt ? "default" : "secondary",
|
|
570
570
|
className: "gap-1.5",
|
|
571
|
-
children:
|
|
571
|
+
children: l(D, "sandbox.list.bulk.selectedCount", "{count} selected", { count: vt.length })
|
|
572
572
|
}),
|
|
573
|
-
/* @__PURE__ */ b(
|
|
573
|
+
/* @__PURE__ */ b(t, {
|
|
574
574
|
variant: "outline",
|
|
575
575
|
onClick: Lt,
|
|
576
|
-
disabled:
|
|
576
|
+
disabled: Q || X.length === 0,
|
|
577
577
|
children: [
|
|
578
|
-
|
|
578
|
+
Ct ? /* @__PURE__ */ y(m, {
|
|
579
579
|
size: 16,
|
|
580
580
|
className: "animate-spin"
|
|
581
|
-
}) : /* @__PURE__ */ y(
|
|
582
|
-
|
|
583
|
-
|
|
581
|
+
}) : /* @__PURE__ */ y(h, { size: 16 }),
|
|
582
|
+
l(D, "sandbox.list.bulk.stopSelected", "Stop Selected"),
|
|
583
|
+
X.length > 0 ? ` (${X.length})` : ""
|
|
584
584
|
]
|
|
585
585
|
}),
|
|
586
|
-
/* @__PURE__ */ b(
|
|
586
|
+
/* @__PURE__ */ b(t, {
|
|
587
587
|
variant: "outline",
|
|
588
588
|
className: "text-status-error-text border-status-error-border/50 hover:bg-status-error-bg/10",
|
|
589
589
|
onClick: Rt,
|
|
590
|
-
disabled:
|
|
590
|
+
disabled: Q || Z.length === 0,
|
|
591
591
|
children: [
|
|
592
|
-
|
|
592
|
+
wt ? /* @__PURE__ */ y(m, {
|
|
593
593
|
size: 16,
|
|
594
594
|
className: "animate-spin"
|
|
595
595
|
}) : /* @__PURE__ */ y(g, { size: 16 }),
|
|
596
|
-
|
|
597
|
-
|
|
596
|
+
l(D, "sandbox.list.bulk.deleteSelected", "Delete Selected"),
|
|
597
|
+
Z.length > 0 ? ` (${Z.length})` : ""
|
|
598
598
|
]
|
|
599
599
|
})
|
|
600
600
|
]
|
|
601
601
|
})]
|
|
602
602
|
}), /* @__PURE__ */ y("p", {
|
|
603
603
|
className: "text-xs text-text-secondary",
|
|
604
|
-
children:
|
|
604
|
+
children: l(D, "sandbox.list.bulk.helpText", "Select one, many, or every sandbox on the current filter set. Only running sandboxes can be stopped, and only stopped, failed, expired, or errored sandboxes can be deleted.")
|
|
605
605
|
})]
|
|
606
606
|
})
|
|
607
607
|
}),
|
|
608
608
|
/* @__PURE__ */ y("div", {
|
|
609
609
|
className: "space-y-3",
|
|
610
|
-
children:
|
|
611
|
-
let
|
|
612
|
-
return /* @__PURE__ */ y(
|
|
610
|
+
children: G.map((e, n) => {
|
|
611
|
+
let r = j.has(e.id);
|
|
612
|
+
return /* @__PURE__ */ y(ee, {
|
|
613
613
|
treatment: "insight",
|
|
614
|
-
className:
|
|
615
|
-
style: { animationDelay: `${
|
|
614
|
+
className: c("cursor-pointer overflow-hidden group", "animate-in fade-in-0 slide-in-from-bottom-2", r && "border-action-primary-border bg-accent-wash"),
|
|
615
|
+
style: { animationDelay: `${n * 40}ms` },
|
|
616
616
|
onClick: () => Dt(e.id),
|
|
617
617
|
tabIndex: 0,
|
|
618
618
|
onKeyDown: (t) => {
|
|
@@ -626,16 +626,16 @@ function D() {
|
|
|
626
626
|
children: [
|
|
627
627
|
/* @__PURE__ */ y("div", {
|
|
628
628
|
className: "pt-1",
|
|
629
|
-
children: /* @__PURE__ */ y(
|
|
630
|
-
checked:
|
|
629
|
+
children: /* @__PURE__ */ y(a, {
|
|
630
|
+
checked: r,
|
|
631
631
|
onCheckedChange: (t) => Ot(e, t === !0),
|
|
632
632
|
onClick: (e) => e.stopPropagation(),
|
|
633
|
-
"aria-label":
|
|
633
|
+
"aria-label": l(D, "sandbox.list.item.select.ariaLabel", "Select sandbox {name}", { name: e.name })
|
|
634
634
|
})
|
|
635
635
|
}),
|
|
636
636
|
/* @__PURE__ */ y("div", {
|
|
637
637
|
className: "flex-shrink-0 p-3 rounded-lg bg-bg-sunken/50",
|
|
638
|
-
children: /* @__PURE__ */ y(
|
|
638
|
+
children: /* @__PURE__ */ y(ce, {
|
|
639
639
|
type: e.template,
|
|
640
640
|
size: 24
|
|
641
641
|
})
|
|
@@ -652,44 +652,44 @@ function D() {
|
|
|
652
652
|
children: [/* @__PURE__ */ y("h3", {
|
|
653
653
|
className: "font-semibold text-base truncate",
|
|
654
654
|
children: e.name
|
|
655
|
-
}), /* @__PURE__ */ y(
|
|
655
|
+
}), /* @__PURE__ */ y(oe, { status: e.status })]
|
|
656
656
|
}), e.description && /* @__PURE__ */ y("p", {
|
|
657
657
|
className: "text-sm text-text-secondary line-clamp-1 mb-2",
|
|
658
658
|
children: e.description
|
|
659
659
|
})]
|
|
660
660
|
}), /* @__PURE__ */ b("div", {
|
|
661
|
-
className:
|
|
661
|
+
className: c("flex items-center gap-1 transition-opacity flex-shrink-0", r ? "opacity-100" : "opacity-0 group-hover:opacity-100"),
|
|
662
662
|
children: [
|
|
663
|
-
|
|
663
|
+
tt(e) && /* @__PURE__ */ y(t, {
|
|
664
664
|
variant: "ghost",
|
|
665
665
|
size: "icon",
|
|
666
666
|
onClick: (t) => {
|
|
667
667
|
t.stopPropagation(), Pt(e);
|
|
668
668
|
},
|
|
669
|
-
"aria-label":
|
|
670
|
-
children: /* @__PURE__ */ y(
|
|
669
|
+
"aria-label": l(D, "sandbox.list.item.actions.stop.ariaLabel", "Stop sandbox"),
|
|
670
|
+
children: /* @__PURE__ */ y(h, { size: 16 })
|
|
671
671
|
}),
|
|
672
|
-
|
|
672
|
+
nt(e) && /* @__PURE__ */ y(t, {
|
|
673
673
|
variant: "ghost",
|
|
674
674
|
size: "icon",
|
|
675
675
|
onClick: (t) => {
|
|
676
|
-
t.stopPropagation(),
|
|
677
|
-
context: { workspaceId:
|
|
676
|
+
t.stopPropagation(), ut({ variables: {
|
|
677
|
+
context: { workspaceId: R },
|
|
678
678
|
id: e.id,
|
|
679
679
|
additionalSeconds: 3600
|
|
680
|
-
} }).then(() =>
|
|
680
|
+
} }).then(() => B());
|
|
681
681
|
},
|
|
682
|
-
"aria-label":
|
|
682
|
+
"aria-label": l(D, "sandbox.list.item.actions.extendTtl.ariaLabel", "Extend TTL"),
|
|
683
683
|
children: /* @__PURE__ */ y(Le, { size: 16 })
|
|
684
684
|
}),
|
|
685
|
-
|
|
685
|
+
rt(e) && /* @__PURE__ */ y(t, {
|
|
686
686
|
variant: "ghost",
|
|
687
687
|
size: "icon",
|
|
688
688
|
className: "text-status-error-text hover:text-status-error-text",
|
|
689
689
|
onClick: (t) => {
|
|
690
690
|
t.stopPropagation(), Ft(e);
|
|
691
691
|
},
|
|
692
|
-
"aria-label":
|
|
692
|
+
"aria-label": l(D, "sandbox.list.item.actions.delete.ariaLabel", "Delete sandbox"),
|
|
693
693
|
children: /* @__PURE__ */ y(g, { size: 16 })
|
|
694
694
|
})
|
|
695
695
|
]
|
|
@@ -698,7 +698,7 @@ function D() {
|
|
|
698
698
|
/* @__PURE__ */ b("div", {
|
|
699
699
|
className: "flex flex-wrap items-center gap-x-4 gap-y-2 text-xs text-text-secondary",
|
|
700
700
|
children: [
|
|
701
|
-
/* @__PURE__ */ y(
|
|
701
|
+
/* @__PURE__ */ y(se, {
|
|
702
702
|
cpuRequest: e.resources?.cpuRequest ?? "0",
|
|
703
703
|
memoryRequest: e.resources?.memoryRequest ?? "0",
|
|
704
704
|
containerCount: e.containers?.length,
|
|
@@ -708,7 +708,7 @@ function D() {
|
|
|
708
708
|
className: "text-text-secondary/40",
|
|
709
709
|
children: "|"
|
|
710
710
|
}),
|
|
711
|
-
/* @__PURE__ */ y(
|
|
711
|
+
/* @__PURE__ */ y(ce, {
|
|
712
712
|
type: e.template,
|
|
713
713
|
size: 12,
|
|
714
714
|
showLabel: !0
|
|
@@ -719,8 +719,8 @@ function D() {
|
|
|
719
719
|
}), /* @__PURE__ */ b("span", {
|
|
720
720
|
className: "inline-flex items-center gap-1",
|
|
721
721
|
children: [
|
|
722
|
-
/* @__PURE__ */ y(
|
|
723
|
-
e.storage.mode === "EPHEMERAL" ?
|
|
722
|
+
/* @__PURE__ */ y(Me, { size: 12 }),
|
|
723
|
+
e.storage.mode === "EPHEMERAL" ? l(D, "sandbox.list.item.storage.ephemeral", "Ephemeral") : l(D, "sandbox.list.item.storage.persistent", "Persistent"),
|
|
724
724
|
e.storage.sizeGi && ` ${e.storage.sizeGi}Gi`
|
|
725
725
|
]
|
|
726
726
|
})] }),
|
|
@@ -729,12 +729,12 @@ function D() {
|
|
|
729
729
|
children: "|"
|
|
730
730
|
}), /* @__PURE__ */ b("span", {
|
|
731
731
|
className: "inline-flex items-center gap-1",
|
|
732
|
-
children: [/* @__PURE__ */ y(
|
|
732
|
+
children: [/* @__PURE__ */ y(je, { size: 12 }), l(D, "sandbox.list.item.containers", "{count} container{count, plural, one {} other {s}}", { count: e.containers.length })]
|
|
733
733
|
})] }),
|
|
734
734
|
e.expiresAt && e.status === "RUNNING" && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("span", {
|
|
735
735
|
className: "text-text-secondary/40",
|
|
736
736
|
children: "|"
|
|
737
|
-
}), /* @__PURE__ */ y(
|
|
737
|
+
}), /* @__PURE__ */ y(le, {
|
|
738
738
|
compact: !0,
|
|
739
739
|
expiresAt: e.expiresAt
|
|
740
740
|
})] }),
|
|
@@ -742,12 +742,12 @@ function D() {
|
|
|
742
742
|
className: "text-text-secondary/40",
|
|
743
743
|
children: "|"
|
|
744
744
|
}),
|
|
745
|
-
/* @__PURE__ */ y("span", { children:
|
|
745
|
+
/* @__PURE__ */ y("span", { children: l(D, "sandbox.list.item.created", "Created {time}", { time: $e(e.createdAt) }) })
|
|
746
746
|
]
|
|
747
747
|
}),
|
|
748
748
|
e.errorMessage && /* @__PURE__ */ b("div", {
|
|
749
749
|
className: "mt-2 flex items-start gap-1.5 text-xs text-status-error-text bg-status-error-bg-subtle px-2.5 py-1.5 rounded-md",
|
|
750
|
-
children: [/* @__PURE__ */ y(
|
|
750
|
+
children: [/* @__PURE__ */ y(Ee, {
|
|
751
751
|
size: 12,
|
|
752
752
|
className: "flex-shrink-0 mt-0.5"
|
|
753
753
|
}), /* @__PURE__ */ y("span", {
|
|
@@ -763,73 +763,73 @@ function D() {
|
|
|
763
763
|
}, e.id);
|
|
764
764
|
})
|
|
765
765
|
}),
|
|
766
|
-
|
|
766
|
+
W > 1 && /* @__PURE__ */ y(r, {
|
|
767
767
|
className: "animate-in fade-in-0 duration-200",
|
|
768
|
-
children: /* @__PURE__ */ b(
|
|
768
|
+
children: /* @__PURE__ */ b(i, {
|
|
769
769
|
className: "p-4 flex flex-col sm:flex-row items-center justify-between gap-3",
|
|
770
770
|
children: [/* @__PURE__ */ y("p", {
|
|
771
771
|
className: "text-sm text-text-secondary",
|
|
772
|
-
children:
|
|
773
|
-
from: (
|
|
774
|
-
to: Math.min(
|
|
775
|
-
total:
|
|
772
|
+
children: l(D, "sandbox.list.pagination.showing", "Showing {from}-{to} of {total}", {
|
|
773
|
+
from: (k - 1) * 20 + 1,
|
|
774
|
+
to: Math.min(k * 20, U),
|
|
775
|
+
total: U
|
|
776
776
|
})
|
|
777
777
|
}), /* @__PURE__ */ b("div", {
|
|
778
778
|
className: "flex items-center gap-2",
|
|
779
779
|
children: [
|
|
780
|
-
/* @__PURE__ */ y(
|
|
780
|
+
/* @__PURE__ */ y(t, {
|
|
781
781
|
variant: "outline",
|
|
782
782
|
size: "icon",
|
|
783
|
-
onClick: () =>
|
|
784
|
-
disabled:
|
|
785
|
-
"aria-label":
|
|
786
|
-
children: /* @__PURE__ */ y(
|
|
783
|
+
onClick: () => A((e) => Math.max(1, e - 1)),
|
|
784
|
+
disabled: k === 1,
|
|
785
|
+
"aria-label": l(D, "sandbox.list.pagination.previous.ariaLabel", "Previous page"),
|
|
786
|
+
children: /* @__PURE__ */ y(ke, { size: 18 })
|
|
787
787
|
}),
|
|
788
|
-
/* @__PURE__ */ y(
|
|
788
|
+
/* @__PURE__ */ y(e, {
|
|
789
789
|
variant: "secondary",
|
|
790
790
|
className: "px-4 py-2 text-sm",
|
|
791
|
-
children:
|
|
792
|
-
current:
|
|
793
|
-
total:
|
|
791
|
+
children: l(D, "sandbox.list.pagination.pageOf", "Page {current} of {total}", {
|
|
792
|
+
current: k,
|
|
793
|
+
total: W
|
|
794
794
|
})
|
|
795
795
|
}),
|
|
796
|
-
/* @__PURE__ */ y(
|
|
796
|
+
/* @__PURE__ */ y(t, {
|
|
797
797
|
variant: "outline",
|
|
798
798
|
size: "icon",
|
|
799
|
-
onClick: () =>
|
|
800
|
-
disabled:
|
|
801
|
-
"aria-label":
|
|
802
|
-
children: /* @__PURE__ */ y(
|
|
799
|
+
onClick: () => A((e) => Math.min(W, e + 1)),
|
|
800
|
+
disabled: k === W,
|
|
801
|
+
"aria-label": l(D, "sandbox.list.pagination.next.ariaLabel", "Next page"),
|
|
802
|
+
children: /* @__PURE__ */ y(Ae, { size: 18 })
|
|
803
803
|
})
|
|
804
804
|
]
|
|
805
805
|
})]
|
|
806
806
|
})
|
|
807
807
|
})
|
|
808
808
|
] }) : /* @__PURE__ */ y(Ze, {
|
|
809
|
-
illustration:
|
|
810
|
-
title:
|
|
811
|
-
description:
|
|
812
|
-
action:
|
|
809
|
+
illustration: K ? "empty-search" : "empty-generic",
|
|
810
|
+
title: K ? l(D, "sandbox.list.empty.filtered.title", "No matching sandboxes") : l(D, "sandbox.list.empty.title", "No sandboxes yet"),
|
|
811
|
+
description: K ? l(D, "sandbox.list.empty.filtered.description", "Try adjusting your search or filters to find what you're looking for.") : l(D, "sandbox.list.empty.description", "Create your first sandbox to start building and testing in isolated environments."),
|
|
812
|
+
action: K ? /* @__PURE__ */ b(t, {
|
|
813
813
|
variant: "outline",
|
|
814
|
-
onClick: Tt,
|
|
815
|
-
children: [/* @__PURE__ */ y(_, { size: 16 }), u(O, "sandbox.list.empty.filtered.clearFilters", "Clear Filters")]
|
|
816
|
-
}) : /* @__PURE__ */ b(r, {
|
|
817
814
|
onClick: Et,
|
|
818
|
-
children: [/* @__PURE__ */ y(
|
|
815
|
+
children: [/* @__PURE__ */ y(_, { size: 16 }), l(D, "sandbox.list.empty.filtered.clearFilters", "Clear Filters")]
|
|
816
|
+
}) : /* @__PURE__ */ b(t, {
|
|
817
|
+
onClick: $,
|
|
818
|
+
children: [/* @__PURE__ */ y(Fe, { size: 16 }), l(D, "sandbox.list.empty.createFirst", "Create First Sandbox")]
|
|
819
819
|
})
|
|
820
820
|
})
|
|
821
821
|
}),
|
|
822
|
-
/* @__PURE__ */ y(
|
|
823
|
-
workspaceId:
|
|
824
|
-
open:
|
|
825
|
-
onClose: () =>
|
|
822
|
+
/* @__PURE__ */ y(ge, {
|
|
823
|
+
workspaceId: R ?? "",
|
|
824
|
+
open: ft,
|
|
825
|
+
onClose: () => pt(!1)
|
|
826
826
|
}),
|
|
827
827
|
/* @__PURE__ */ y(Be, {
|
|
828
|
-
open:
|
|
828
|
+
open: st !== null,
|
|
829
829
|
onOpenChange: (e) => {
|
|
830
|
-
e ||
|
|
830
|
+
e || L(null);
|
|
831
831
|
},
|
|
832
|
-
children: /* @__PURE__ */ b(Ue, { children: [/* @__PURE__ */ b(Ke, { children: [/* @__PURE__ */ y(qe, { children:
|
|
832
|
+
children: /* @__PURE__ */ b(Ue, { children: [/* @__PURE__ */ b(Ke, { children: [/* @__PURE__ */ y(qe, { children: l(D, "sandbox.list.bulk.deleteSelected", "Delete Selected") }), /* @__PURE__ */ y(We, { children: st?.message })] }), /* @__PURE__ */ b(Ge, { children: [/* @__PURE__ */ y(He, { children: "Cancel" }), /* @__PURE__ */ y(Ve, {
|
|
833
833
|
className: "bg-status-error-bg text-status-error-text hover:bg-status-error-bg/90",
|
|
834
834
|
onClick: () => {
|
|
835
835
|
zt();
|
|
@@ -840,7 +840,6 @@ function D() {
|
|
|
840
840
|
]
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
|
-
|
|
844
|
-
export { D as SandboxListPage };
|
|
843
|
+
export { E as SandboxListPage };
|
|
845
844
|
|
|
846
845
|
//# sourceMappingURL=SandboxListPage.js.map
|