@cobaltcore-dev/aurora 2.1.1 → 2.2.0
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/README.md +31 -25
- package/dist/client/AuroraApp.d.ts +9 -2
- package/dist/client/context/AppConfigContext.d.ts +44 -0
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +41221 -845
- package/dist/client/index.js.map +1 -1
- package/dist/client/trpcClient.d.ts +314 -0
- package/dist/client/utils/appConfigGating.d.ts +21 -0
- package/dist/server/index.d.ts +694 -3
- package/dist/server/index.js +1748 -722
- package/package.json +3 -3
- package/dist/client/AuthProvider-CVSAwW9f.mjs +0 -83
- package/dist/client/AuthProvider-CVSAwW9f.mjs.map +0 -1
- package/dist/client/ContentHeader-fKKZVu-o.mjs +0 -116
- package/dist/client/ContentHeader-fKKZVu-o.mjs.map +0 -1
- package/dist/client/DeleteFlavorModal-C4nAi7gY.mjs +0 -724
- package/dist/client/DeleteFlavorModal-C4nAi7gY.mjs.map +0 -1
- package/dist/client/DynamicBreadcrumbContext-CVcUQFou.mjs +0 -26
- package/dist/client/DynamicBreadcrumbContext-CVcUQFou.mjs.map +0 -1
- package/dist/client/FiltersInput-Becwxo_J.mjs +0 -85
- package/dist/client/FiltersInput-Becwxo_J.mjs.map +0 -1
- package/dist/client/FloatingIpActionModals-Cq10WljB.mjs +0 -466
- package/dist/client/FloatingIpActionModals-Cq10WljB.mjs.map +0 -1
- package/dist/client/RouteIdLevelDefaultError-DPF_x2tG.mjs +0 -26
- package/dist/client/RouteIdLevelDefaultError-DPF_x2tG.mjs.map +0 -1
- package/dist/client/Slot-CWb612-_.mjs +0 -28
- package/dist/client/Slot-CWb612-_.mjs.map +0 -1
- package/dist/client/SortInput-4g7nSTHW.mjs +0 -34
- package/dist/client/SortInput-4g7nSTHW.mjs.map +0 -1
- package/dist/client/StorageNotFound-B-zVinVD.mjs +0 -30
- package/dist/client/StorageNotFound-B-zVinVD.mjs.map +0 -1
- package/dist/client/TwoColumnDescriptionList-DKS42RKa.mjs +0 -28
- package/dist/client/TwoColumnDescriptionList-DKS42RKa.mjs.map +0 -1
- package/dist/client/_-CAsCx-Ay.mjs +0 -6
- package/dist/client/_-CAsCx-Ay.mjs.map +0 -1
- package/dist/client/_auth-SrDjHL6j.mjs +0 -12
- package/dist/client/_auth-SrDjHL6j.mjs.map +0 -1
- package/dist/client/_flavorId-BPvssEzn.mjs +0 -277
- package/dist/client/_flavorId-BPvssEzn.mjs.map +0 -1
- package/dist/client/_flavorId-CFUBcU-l.mjs +0 -27
- package/dist/client/_flavorId-CFUBcU-l.mjs.map +0 -1
- package/dist/client/_flavorId-CZcIp0Ih.mjs +0 -22
- package/dist/client/_flavorId-CZcIp0Ih.mjs.map +0 -1
- package/dist/client/_floatingIpId-B8r64AL9.mjs +0 -196
- package/dist/client/_floatingIpId-B8r64AL9.mjs.map +0 -1
- package/dist/client/_floatingIpId-lEobpOER.mjs +0 -26
- package/dist/client/_floatingIpId-lEobpOER.mjs.map +0 -1
- package/dist/client/_imageId-BAezmV0Y.mjs +0 -526
- package/dist/client/_imageId-BAezmV0Y.mjs.map +0 -1
- package/dist/client/_imageId-D-jqz3e3.mjs +0 -40
- package/dist/client/_imageId-D-jqz3e3.mjs.map +0 -1
- package/dist/client/_imageId-gMdrdnVt.mjs +0 -22
- package/dist/client/_imageId-gMdrdnVt.mjs.map +0 -1
- package/dist/client/_projectId-BYccdAtX.mjs +0 -77
- package/dist/client/_projectId-BYccdAtX.mjs.map +0 -1
- package/dist/client/_projectId-CBjZC1tv.mjs +0 -283
- package/dist/client/_projectId-CBjZC1tv.mjs.map +0 -1
- package/dist/client/_projectId-CLEa1zgw.mjs +0 -30
- package/dist/client/_projectId-CLEa1zgw.mjs.map +0 -1
- package/dist/client/_projectId-D3VOH5lN.mjs +0 -94
- package/dist/client/_projectId-D3VOH5lN.mjs.map +0 -1
- package/dist/client/_securityGroupId-BwgZnoiR.mjs +0 -29
- package/dist/client/_securityGroupId-BwgZnoiR.mjs.map +0 -1
- package/dist/client/_securityGroupId-Cz2NUHdB.mjs +0 -1819
- package/dist/client/_securityGroupId-Cz2NUHdB.mjs.map +0 -1
- package/dist/client/_serviceType-DS8DxsrP.mjs +0 -20
- package/dist/client/_serviceType-DS8DxsrP.mjs.map +0 -1
- package/dist/client/_serviceType-M8d9rOT6.mjs +0 -6
- package/dist/client/_serviceType-M8d9rOT6.mjs.map +0 -1
- package/dist/client/_storageType-BNpP1A2N.mjs +0 -13
- package/dist/client/_storageType-BNpP1A2N.mjs.map +0 -1
- package/dist/client/_storageType-BxSGKhAI.mjs +0 -15
- package/dist/client/_storageType-BxSGKhAI.mjs.map +0 -1
- package/dist/client/_storageType-DZYCmiLt.mjs +0 -30
- package/dist/client/_storageType-DZYCmiLt.mjs.map +0 -1
- package/dist/client/_storageType-UqAMP-8d.mjs +0 -859
- package/dist/client/_storageType-UqAMP-8d.mjs.map +0 -1
- package/dist/client/_storageType-u51_7OwJ.mjs +0 -7
- package/dist/client/_storageType-u51_7OwJ.mjs.map +0 -1
- package/dist/client/about-BmQTyLWc.mjs +0 -92
- package/dist/client/about-BmQTyLWc.mjs.map +0 -1
- package/dist/client/assets/__mocks__/svgMock.d.ts +0 -3
- package/dist/client/aurora-CIml-f2f.mjs +0 -19
- package/dist/client/aurora-CIml-f2f.mjs.map +0 -1
- package/dist/client/build-WuxXRAqf.mjs +0 -14530
- package/dist/client/build-WuxXRAqf.mjs.map +0 -1
- package/dist/client/cn-DM4Cy3jv.mjs +0 -10
- package/dist/client/cn-DM4Cy3jv.mjs.map +0 -1
- package/dist/client/flavors-CJVSNz6R.mjs +0 -15
- package/dist/client/flavors-CJVSNz6R.mjs.map +0 -1
- package/dist/client/flavors-CflJDIEH.mjs +0 -667
- package/dist/client/flavors-CflJDIEH.mjs.map +0 -1
- package/dist/client/flavors-DWMZ6TuJ.mjs +0 -8
- package/dist/client/flavors-DWMZ6TuJ.mjs.map +0 -1
- package/dist/client/floatingips-Cz9k80cc.mjs +0 -8
- package/dist/client/floatingips-Cz9k80cc.mjs.map +0 -1
- package/dist/client/floatingips-DXnRlLvV.mjs +0 -551
- package/dist/client/floatingips-DXnRlLvV.mjs.map +0 -1
- package/dist/client/floatingips-HRbuLxiN.mjs +0 -22
- package/dist/client/floatingips-HRbuLxiN.mjs.map +0 -1
- package/dist/client/floatingips-nN1kQmsu.mjs +0 -14
- package/dist/client/floatingips-nN1kQmsu.mjs.map +0 -1
- package/dist/client/formatBytes-CZv_XyCY.mjs +0 -38
- package/dist/client/formatBytes-CZv_XyCY.mjs.map +0 -1
- package/dist/client/helpers-1PpYf-fC.mjs +0 -6
- package/dist/client/helpers-1PpYf-fC.mjs.map +0 -1
- package/dist/client/hooks-D0yKIumu.mjs +0 -22
- package/dist/client/hooks-D0yKIumu.mjs.map +0 -1
- package/dist/client/imageHelpers-DBhL2ebL.mjs +0 -1272
- package/dist/client/imageHelpers-DBhL2ebL.mjs.map +0 -1
- package/dist/client/images-BsylWUiH.mjs +0 -2011
- package/dist/client/images-BsylWUiH.mjs.map +0 -1
- package/dist/client/images-NBf2bV43.mjs +0 -8
- package/dist/client/images-NBf2bV43.mjs.map +0 -1
- package/dist/client/images-zQq1nSVv.mjs +0 -15
- package/dist/client/images-zQq1nSVv.mjs.map +0 -1
- package/dist/client/md-kvaGCNAK.mjs +0 -336
- package/dist/client/md-kvaGCNAK.mjs.map +0 -1
- package/dist/client/network-DuZm76BZ.mjs +0 -8
- package/dist/client/network-DuZm76BZ.mjs.map +0 -1
- package/dist/client/objects-BudUAfWY.mjs +0 -12909
- package/dist/client/objects-BudUAfWY.mjs.map +0 -1
- package/dist/client/objects-Dc7sKUr8.mjs +0 -67
- package/dist/client/objects-Dc7sKUr8.mjs.map +0 -1
- package/dist/client/objects-Dw7oeTq2.mjs +0 -80
- package/dist/client/objects-Dw7oeTq2.mjs.map +0 -1
- package/dist/client/objects-_g7nGIn5.mjs +0 -25
- package/dist/client/objects-_g7nGIn5.mjs.map +0 -1
- package/dist/client/objects-eBxvY6_n.mjs +0 -78
- package/dist/client/objects-eBxvY6_n.mjs.map +0 -1
- package/dist/client/projects-yiK0HGSA.mjs +0 -7
- package/dist/client/projects-yiK0HGSA.mjs.map +0 -1
- package/dist/client/routeInfo-DP3v74Wg.mjs +0 -19
- package/dist/client/routeInfo-DP3v74Wg.mjs.map +0 -1
- package/dist/client/routes-CJj7SR_K.mjs +0 -10
- package/dist/client/routes-CJj7SR_K.mjs.map +0 -1
- package/dist/client/routes-xofA3ksU.mjs +0 -110
- package/dist/client/routes-xofA3ksU.mjs.map +0 -1
- package/dist/client/securitygroups-CSmsBzUb.mjs +0 -581
- package/dist/client/securitygroups-CSmsBzUb.mjs.map +0 -1
- package/dist/client/securitygroups-CtKne8UQ.mjs +0 -8
- package/dist/client/securitygroups-CtKne8UQ.mjs.map +0 -1
- package/dist/client/securitygroups-T7kaNFEp.mjs +0 -15
- package/dist/client/securitygroups-T7kaNFEp.mjs.map +0 -1
- package/dist/client/securitygroups-WLB1_IM6.mjs +0 -22
- package/dist/client/securitygroups-WLB1_IM6.mjs.map +0 -1
- package/dist/client/securitygroups-o0IXZM6S.mjs +0 -14
- package/dist/client/securitygroups-o0IXZM6S.mjs.map +0 -1
- package/dist/client/serviceCatalog-B3lKWC9V.mjs +0 -6
- package/dist/client/serviceCatalog-B3lKWC9V.mjs.map +0 -1
- package/dist/client/services-D1PbooD1.mjs +0 -6
- package/dist/client/services-D1PbooD1.mjs.map +0 -1
- package/dist/client/services-DEMVtFyn.mjs +0 -9
- package/dist/client/services-DEMVtFyn.mjs.map +0 -1
- package/dist/client/storageProviders-CJ5rOh13.mjs +0 -15
- package/dist/client/storageProviders-CJ5rOh13.mjs.map +0 -1
- package/dist/client/trpcClient-D7gpR7YG.mjs +0 -71
- package/dist/client/trpcClient-D7gpR7YG.mjs.map +0 -1
- package/dist/client/useBreadcrumbs-ha3IlaxX.mjs +0 -54
- package/dist/client/useBreadcrumbs-ha3IlaxX.mjs.map +0 -1
- package/dist/client/useErrorTranslation-Dc0eE8Zt.mjs +0 -83
- package/dist/client/useErrorTranslation-Dc0eE8Zt.mjs.map +0 -1
- package/dist/client/useModal-DCs1OJh7.mjs +0 -12
- package/dist/client/useModal-DCs1OJh7.mjs.map +0 -1
- package/dist/client/useModalTracking-BYd37pXm.mjs +0 -37
- package/dist/client/useModalTracking-BYd37pXm.mjs.map +0 -1
- package/dist/client/useProjectId-DBc5lpoU.mjs +0 -11
- package/dist/client/useProjectId-DBc5lpoU.mjs.map +0 -1
- package/dist/client/useSecurityGroupPermissions--hK4aR8Y.mjs +0 -294
- package/dist/client/useSecurityGroupPermissions--hK4aR8Y.mjs.map +0 -1
- package/dist/client/useSetBreadcrumb-tn7lBaQV.mjs +0 -19
- package/dist/client/useSetBreadcrumb-tn7lBaQV.mjs.map +0 -1
- package/dist/client/utils/trpcErrors.d.ts +0 -13
|
@@ -1,859 +0,0 @@
|
|
|
1
|
-
import { C as e, D as t, H as n, L as r, Q as i, S as a, T as o, X as s, Z as c, c as l, d as u, ft as d, g as f, i as p, l as m, m as h, o as g, ot as _, p as v, rt as y, st as b, t as x, tt as S, x as C } from "./build-WuxXRAqf.mjs";
|
|
2
|
-
import { a as w } from "./trpcClient-D7gpR7YG.mjs";
|
|
3
|
-
import { t as T } from "./storageProviders-CJ5rOh13.mjs";
|
|
4
|
-
import { E, O as D, T as O, _ as k, a as A, c as ee, d as te, f as ne, g as j, h as re, i as M, l as ie, m as ae, o as oe, p as se, r as ce, s as le, u as ue, w as de, y as N } from "./objects-BudUAfWY.mjs";
|
|
5
|
-
import { t as P } from "./useProjectId-DBc5lpoU.mjs";
|
|
6
|
-
import { t as fe } from "./SortInput-4g7nSTHW.mjs";
|
|
7
|
-
import { t as F } from "./formatBytes-CZv_XyCY.mjs";
|
|
8
|
-
import { t as I } from "./useModalTracking-BYd37pXm.mjs";
|
|
9
|
-
import { t as L } from "./ContentHeader-fKKZVu-o.mjs";
|
|
10
|
-
import { Fragment as pe, jsx as R, jsxs as z } from "react/jsx-runtime";
|
|
11
|
-
import { startTransition as B, useEffect as me, useRef as he, useState as V } from "react";
|
|
12
|
-
import { useNavigate as ge, useParams as _e } from "@tanstack/react-router";
|
|
13
|
-
import { Trans as H, useLingui as U } from "@lingui/react";
|
|
14
|
-
import { z as W } from "zod";
|
|
15
|
-
import { ErrorBoundary as G } from "react-error-boundary";
|
|
16
|
-
import { useForm as ve, useStore as ye } from "@tanstack/react-form";
|
|
17
|
-
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/CreateContainerModal.tsx
|
|
18
|
-
var K = ({ isOpen: e, onClose: t, onSuccess: n, onPartialSuccess: a, maxContainerNameLength: o = 256, existingContainers: c = [] }) => {
|
|
19
|
-
let { i18n: l, _: u } = U(), d = P(), [f, p] = V(""), [m, g] = V(null), [_, v] = V(null), { trackClose: y, markSubmitted: b, resetTracking: x } = I({
|
|
20
|
-
isOpen: e,
|
|
21
|
-
actionPrefix: "storage.swift.container.create"
|
|
22
|
-
}), S = w.useUtils(), C = w.storage.swift.createContainer.useMutation({
|
|
23
|
-
onSuccess: (e) => {
|
|
24
|
-
S.storage.swift.listContainers.invalidate();
|
|
25
|
-
let t = f.trim();
|
|
26
|
-
e.optionsApplied ? n?.(t) : a?.(t, e.optionsError ?? l._({ id: "m7tlyr" })), T();
|
|
27
|
-
},
|
|
28
|
-
onError: (e) => {
|
|
29
|
-
e.data?.code === "CONFLICT" ? (g(l._({ id: "F75mLW" })), v(null)) : v(e.message || l._({ id: "19EgAF" })), x();
|
|
30
|
-
}
|
|
31
|
-
}), T = () => {
|
|
32
|
-
y(), p(""), g(null), v(null), x(), C.reset(), t();
|
|
33
|
-
}, E = (e) => {
|
|
34
|
-
let t = e.trim();
|
|
35
|
-
return t ? t.length > o ? (g(l._({
|
|
36
|
-
id: "r5SQFW",
|
|
37
|
-
values: { maxContainerNameLength: o }
|
|
38
|
-
})), !1) : t.includes("/") ? (g(l._({ id: "9J93Xr" })), !1) : c.some((e) => e.name === t) ? (g(l._({ id: "F75mLW" })), !1) : (g(null), !0) : (g(l._({ id: "JNGYAW" })), !1);
|
|
39
|
-
}, D = (e) => {
|
|
40
|
-
let t = e.target.value;
|
|
41
|
-
p(t), v(null), m && E(t);
|
|
42
|
-
}, O = () => {
|
|
43
|
-
E(f) && (v(null), b(), C.mutate({
|
|
44
|
-
project_id: d,
|
|
45
|
-
container: f.trim()
|
|
46
|
-
}));
|
|
47
|
-
};
|
|
48
|
-
return e ? /*#__PURE__*/ R(s, {
|
|
49
|
-
title: l._({ id: "vTh35P" }),
|
|
50
|
-
open: e,
|
|
51
|
-
onCancel: T,
|
|
52
|
-
confirmButtonLabel: C.isPending ? l._({ id: "HM56Bx" }) : l._({ id: "hYgDIe" }),
|
|
53
|
-
onConfirm: O,
|
|
54
|
-
cancelButtonLabel: l._({ id: "dEgA5A" }),
|
|
55
|
-
size: "small",
|
|
56
|
-
disableConfirmButton: C.isPending || !f.trim(),
|
|
57
|
-
disableCancelButton: C.isPending,
|
|
58
|
-
disableCloseButton: C.isPending,
|
|
59
|
-
children: /*#__PURE__*/ z(i, {
|
|
60
|
-
direction: "vertical",
|
|
61
|
-
gap: "6",
|
|
62
|
-
children: [
|
|
63
|
-
_ && /*#__PURE__*/ R(r, {
|
|
64
|
-
variant: "error",
|
|
65
|
-
dismissible: !0,
|
|
66
|
-
onDismiss: () => v(null),
|
|
67
|
-
role: "alert",
|
|
68
|
-
"aria-live": "assertive",
|
|
69
|
-
"data-testid": "create-container-error",
|
|
70
|
-
children: _
|
|
71
|
-
}),
|
|
72
|
-
/*#__PURE__*/ R("p", {
|
|
73
|
-
className: "text-theme-default",
|
|
74
|
-
children: /*#__PURE__*/ R(H, { id: "ne/GWZ" })
|
|
75
|
-
}),
|
|
76
|
-
/*#__PURE__*/ R(h, {
|
|
77
|
-
label: l._({ id: "SUSS9i" }),
|
|
78
|
-
required: !0,
|
|
79
|
-
value: f,
|
|
80
|
-
onChange: D,
|
|
81
|
-
onKeyDown: (e) => {
|
|
82
|
-
e.key === "Enter" && O();
|
|
83
|
-
},
|
|
84
|
-
invalid: !!m,
|
|
85
|
-
errortext: m || void 0,
|
|
86
|
-
disabled: C.isPending,
|
|
87
|
-
autoFocus: !0,
|
|
88
|
-
placeholder: l._({ id: "W5FkH9" })
|
|
89
|
-
})
|
|
90
|
-
]
|
|
91
|
-
})
|
|
92
|
-
}) : null;
|
|
93
|
-
}, be = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContainerNameLength: i, existingContainers: s = [], onCreateSuccess: c, onCreatePartialSuccess: u, onEmptySuccess: d, onEmptyError: m, onDeleteSuccess: h, onDeleteError: _, onPropertiesSuccess: v, onPropertiesError: S, onAclSuccess: w, onAclError: T, selectedContainers: E, setSelectedContainers: D, hasAnyBulkAction: A = !0 }) => {
|
|
94
|
-
let { projectId: ee, provider: te, storageType: ne } = _e({ from: "/_auth/projects/$projectId/storage/$provider/$storageType/" }), { i18n: M, _: ie } = U(), oe = ge(), [se, ce] = V(0), [le, ue] = V(null), [N, P] = V(null), [fe, I] = V(null), [L, B] = V(null), { ref: he, elementRef: W, height: G, virtualItems: ve, totalSize: ye, measureElement: be } = de({ count: e.length });
|
|
95
|
-
me(() => {
|
|
96
|
-
if (W.current) {
|
|
97
|
-
let e = W.current.offsetWidth - W.current.clientWidth;
|
|
98
|
-
ce(e);
|
|
99
|
-
}
|
|
100
|
-
}, [e.length, G]);
|
|
101
|
-
let q = (e) => {
|
|
102
|
-
E.includes(e) ? D(E.filter((t) => t !== e)) : D([...E, e]);
|
|
103
|
-
}, J = A ? 6 : 5, Y = A ? "40px minmax(200px, 2fr) minmax(100px, 1fr) minmax(180px, 2fr) minmax(100px, 1fr) 60px" : "minmax(200px, 2fr) minmax(100px, 1fr) minmax(180px, 2fr) minmax(100px, 1fr) 60px";
|
|
104
|
-
return /*#__PURE__*/ z(pe, { children: [
|
|
105
|
-
/*#__PURE__*/ z("div", {
|
|
106
|
-
className: "relative",
|
|
107
|
-
children: [/*#__PURE__*/ R("div", {
|
|
108
|
-
style: { paddingRight: `${se}px` },
|
|
109
|
-
children: /*#__PURE__*/ z(g, {
|
|
110
|
-
columns: J,
|
|
111
|
-
gridColumnTemplate: Y,
|
|
112
|
-
className: "containers",
|
|
113
|
-
"data-testid": "containers-table-header",
|
|
114
|
-
children: [/*#__PURE__*/ z(o, { children: [
|
|
115
|
-
A && /*#__PURE__*/ R(a, {}),
|
|
116
|
-
/*#__PURE__*/ R(a, { children: /*#__PURE__*/ R(H, { id: "t0X9+8" }) }),
|
|
117
|
-
/*#__PURE__*/ R(a, { children: /*#__PURE__*/ R(H, { id: "sxbP3b" }) }),
|
|
118
|
-
/*#__PURE__*/ R(a, { children: /*#__PURE__*/ R(H, { id: "sjMCOP" }) }),
|
|
119
|
-
/*#__PURE__*/ R(a, { children: /*#__PURE__*/ R(H, { id: "hgpMHD" }) }),
|
|
120
|
-
/*#__PURE__*/ R(a, { style: { marginRight: `-${se}px` } })
|
|
121
|
-
] }), (!e || e.length === 0) && /*#__PURE__*/ R(o, { children: /*#__PURE__*/ R(x, {
|
|
122
|
-
colSpan: J,
|
|
123
|
-
children: /*#__PURE__*/ R(y, {
|
|
124
|
-
status: "empty",
|
|
125
|
-
title: M._({ id: "Hiw1Ha" }),
|
|
126
|
-
body: M._({ id: "x1bK0h" })
|
|
127
|
-
})
|
|
128
|
-
}) })]
|
|
129
|
-
})
|
|
130
|
-
}), /*#__PURE__*/ R("div", {
|
|
131
|
-
ref: he,
|
|
132
|
-
className: "overflow-auto",
|
|
133
|
-
style: { height: `${G ?? 0}px` },
|
|
134
|
-
"data-testid": "containers-table-body",
|
|
135
|
-
children: /*#__PURE__*/ R(g, {
|
|
136
|
-
columns: J,
|
|
137
|
-
gridColumnTemplate: Y,
|
|
138
|
-
style: {
|
|
139
|
-
height: `${ye}px`,
|
|
140
|
-
width: "100%",
|
|
141
|
-
position: "relative"
|
|
142
|
-
},
|
|
143
|
-
children: ve.map((n) => {
|
|
144
|
-
let r = e[n.index], i = E.includes(r.name), a = () => oe({
|
|
145
|
-
to: "/projects/$projectId/storage/$provider/$storageType/$containerName/objects",
|
|
146
|
-
params: {
|
|
147
|
-
projectId: ee,
|
|
148
|
-
provider: te,
|
|
149
|
-
storageType: ne,
|
|
150
|
-
containerName: r.name
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
return /*#__PURE__*/ z(o, {
|
|
154
|
-
"data-index": n.index,
|
|
155
|
-
ref: be,
|
|
156
|
-
style: {
|
|
157
|
-
position: "absolute",
|
|
158
|
-
top: 0,
|
|
159
|
-
left: 0,
|
|
160
|
-
width: "100%",
|
|
161
|
-
transform: `translateY(${n.start}px)`,
|
|
162
|
-
display: "grid",
|
|
163
|
-
gridTemplateColumns: Y,
|
|
164
|
-
alignItems: "stretch"
|
|
165
|
-
},
|
|
166
|
-
"data-testid": `container-row-${r.name}`,
|
|
167
|
-
tabIndex: 0,
|
|
168
|
-
onClick: a,
|
|
169
|
-
onKeyDown: (e) => {
|
|
170
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
171
|
-
},
|
|
172
|
-
children: [
|
|
173
|
-
A && /*#__PURE__*/ R(x, {
|
|
174
|
-
onClick: (e) => e.stopPropagation(),
|
|
175
|
-
onKeyDown: (e) => {
|
|
176
|
-
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
177
|
-
},
|
|
178
|
-
children: /*#__PURE__*/ R(b, {
|
|
179
|
-
checked: i,
|
|
180
|
-
onChange: () => q(r.name),
|
|
181
|
-
"data-testid": `select-container-${r.name}`
|
|
182
|
-
})
|
|
183
|
-
}),
|
|
184
|
-
/*#__PURE__*/ R(x, {
|
|
185
|
-
className: "min-w-0 overflow-hidden",
|
|
186
|
-
children: /*#__PURE__*/ R("span", {
|
|
187
|
-
className: "block truncate",
|
|
188
|
-
title: r.name,
|
|
189
|
-
children: r.name
|
|
190
|
-
})
|
|
191
|
-
}),
|
|
192
|
-
/*#__PURE__*/ R(x, { children: r.count.toLocaleString() }),
|
|
193
|
-
/*#__PURE__*/ R(x, { children: O(r.last_modified) ?? M._({ id: "fj5byd" }) }),
|
|
194
|
-
/*#__PURE__*/ R(x, { children: F(r.bytes) }),
|
|
195
|
-
/*#__PURE__*/ R(x, {
|
|
196
|
-
onClick: (e) => e.stopPropagation(),
|
|
197
|
-
children: /*#__PURE__*/ z(t, { children: [/*#__PURE__*/ R(l, {
|
|
198
|
-
as: "div",
|
|
199
|
-
children: /*#__PURE__*/ R(p, {
|
|
200
|
-
icon: "moreVert",
|
|
201
|
-
title: M._({ id: "jnnDNd" }),
|
|
202
|
-
"aria-label": M._({ id: "jnnDNd" }),
|
|
203
|
-
className: "!bg-transparent"
|
|
204
|
-
})
|
|
205
|
-
}), /*#__PURE__*/ z(f, { children: [
|
|
206
|
-
/*#__PURE__*/ R(C, {
|
|
207
|
-
label: M._({ id: "cWbW6w" }),
|
|
208
|
-
onClick: () => B(r),
|
|
209
|
-
"data-testid": `access-control-action-${r.name}`
|
|
210
|
-
}),
|
|
211
|
-
/*#__PURE__*/ R(C, {
|
|
212
|
-
label: M._({ id: "Oc8Aqv" }),
|
|
213
|
-
onClick: () => I(r),
|
|
214
|
-
"data-testid": `properties-action-${r.name}`
|
|
215
|
-
}),
|
|
216
|
-
/*#__PURE__*/ R(C, {
|
|
217
|
-
label: M._({ id: "foCwki" }),
|
|
218
|
-
onClick: () => ue(r),
|
|
219
|
-
"data-testid": `empty-action-${r.name}`
|
|
220
|
-
}),
|
|
221
|
-
/*#__PURE__*/ R(C, {
|
|
222
|
-
label: M._({ id: "t1J6VC" }),
|
|
223
|
-
onClick: () => P(r),
|
|
224
|
-
"data-testid": `delete-action-${r.name}`
|
|
225
|
-
})
|
|
226
|
-
] })] })
|
|
227
|
-
})
|
|
228
|
-
]
|
|
229
|
-
}, r.name);
|
|
230
|
-
})
|
|
231
|
-
})
|
|
232
|
-
})]
|
|
233
|
-
}),
|
|
234
|
-
/*#__PURE__*/ R(K, {
|
|
235
|
-
isOpen: n,
|
|
236
|
-
onClose: () => r(!1),
|
|
237
|
-
onSuccess: c,
|
|
238
|
-
onPartialSuccess: u,
|
|
239
|
-
maxContainerNameLength: i,
|
|
240
|
-
existingContainers: s
|
|
241
|
-
}),
|
|
242
|
-
/*#__PURE__*/ R(re, {
|
|
243
|
-
isOpen: le !== null,
|
|
244
|
-
container: le,
|
|
245
|
-
onClose: () => ue(null),
|
|
246
|
-
onSuccess: d,
|
|
247
|
-
onError: m
|
|
248
|
-
}),
|
|
249
|
-
/*#__PURE__*/ R(ae, {
|
|
250
|
-
isOpen: N !== null,
|
|
251
|
-
container: N,
|
|
252
|
-
onClose: () => P(null),
|
|
253
|
-
onSuccess: h,
|
|
254
|
-
onError: _
|
|
255
|
-
}),
|
|
256
|
-
/*#__PURE__*/ R(j, {
|
|
257
|
-
isOpen: fe !== null,
|
|
258
|
-
container: fe,
|
|
259
|
-
onClose: () => I(null),
|
|
260
|
-
onSuccess: v,
|
|
261
|
-
onError: S
|
|
262
|
-
}),
|
|
263
|
-
/*#__PURE__*/ R(k, {
|
|
264
|
-
isOpen: L !== null,
|
|
265
|
-
container: L,
|
|
266
|
-
onClose: () => B(null),
|
|
267
|
-
onSuccess: w,
|
|
268
|
-
onError: T
|
|
269
|
-
})
|
|
270
|
-
] });
|
|
271
|
-
}, q = ({ label: e, value: t }) => t == null ? null : /*#__PURE__*/ z("span", {
|
|
272
|
-
className: "flex items-start gap-1.5",
|
|
273
|
-
children: [/*#__PURE__*/ R(u, {
|
|
274
|
-
icon: "check",
|
|
275
|
-
size: "16px",
|
|
276
|
-
className: "text-theme-success mt-0.5 shrink-0"
|
|
277
|
-
}), /*#__PURE__*/ z("span", { children: [
|
|
278
|
-
/*#__PURE__*/ z("span", {
|
|
279
|
-
className: "font-medium",
|
|
280
|
-
children: [e, ":"]
|
|
281
|
-
}),
|
|
282
|
-
" ",
|
|
283
|
-
t
|
|
284
|
-
] })]
|
|
285
|
-
}), J = ({ label: e }) => /*#__PURE__*/ z("span", {
|
|
286
|
-
className: "flex items-start gap-1.5",
|
|
287
|
-
children: [/*#__PURE__*/ R(u, {
|
|
288
|
-
icon: "check",
|
|
289
|
-
size: "16px",
|
|
290
|
-
className: "text-theme-success mt-0.5 shrink-0"
|
|
291
|
-
}), /*#__PURE__*/ R("span", { children: e })]
|
|
292
|
-
}), Y = ({ title: e, children: t }) => /*#__PURE__*/ z("span", {
|
|
293
|
-
className: "flex flex-col gap-1.5",
|
|
294
|
-
children: [/*#__PURE__*/ R("span", {
|
|
295
|
-
className: "text-theme-default block font-semibold",
|
|
296
|
-
children: e
|
|
297
|
-
}), t]
|
|
298
|
-
}), xe = ({ serviceInfo: e, accountInfo: t, open: r }) => {
|
|
299
|
-
let { i18n: i, _: a } = U(), o = e?.swift, s = {
|
|
300
|
-
account_quotas: i._({ id: "DJT9tB" }),
|
|
301
|
-
container_quotas: i._({ id: "USiuNX" }),
|
|
302
|
-
bulk_delete: i._({ id: "F6YIQe" }),
|
|
303
|
-
bulk_upload: i._({ id: "2Inn83" }),
|
|
304
|
-
slo: i._({ id: "cpw++p" }),
|
|
305
|
-
container_sync: i._({ id: "ezT9KW" }),
|
|
306
|
-
tempurl: i._({ id: "UO3hJ2" }),
|
|
307
|
-
symlink: i._({ id: "Q2xmVl" }),
|
|
308
|
-
versioned_writes: i._({ id: "8jLXs3" })
|
|
309
|
-
}, l = Object.entries(s).filter(([e]) => o?.[e]).map(([, e]) => e);
|
|
310
|
-
return /*#__PURE__*/ z(c, {
|
|
311
|
-
triggerEvent: "hover",
|
|
312
|
-
placement: "bottom-end",
|
|
313
|
-
open: r,
|
|
314
|
-
children: [/*#__PURE__*/ R(S, {
|
|
315
|
-
className: "max-h-5",
|
|
316
|
-
children: /*#__PURE__*/ R("span", { children: /*#__PURE__*/ R(u, {
|
|
317
|
-
icon: "info",
|
|
318
|
-
size: "20px",
|
|
319
|
-
className: "text-theme-light hover:text-theme-default cursor-pointer"
|
|
320
|
-
}) })
|
|
321
|
-
}), /*#__PURE__*/ R(n, {
|
|
322
|
-
className: "z-10 w-72 text-sm",
|
|
323
|
-
children: /*#__PURE__*/ z("span", {
|
|
324
|
-
className: "flex flex-col gap-3 p-1",
|
|
325
|
-
children: [
|
|
326
|
-
t && /*#__PURE__*/ z(Y, {
|
|
327
|
-
title: /*#__PURE__*/ R(H, { id: "AeXO77" }),
|
|
328
|
-
children: [
|
|
329
|
-
/*#__PURE__*/ R(q, {
|
|
330
|
-
label: i._({ id: "B3toQF" }),
|
|
331
|
-
value: t.objectCount.toLocaleString()
|
|
332
|
-
}),
|
|
333
|
-
/*#__PURE__*/ R(q, {
|
|
334
|
-
label: i._({ id: "aL1w5Z" }),
|
|
335
|
-
value: F(t.bytesUsed)
|
|
336
|
-
}),
|
|
337
|
-
t.quotaBytes !== void 0 && /*#__PURE__*/ R(q, {
|
|
338
|
-
label: i._({ id: "vEkTR9" }),
|
|
339
|
-
value: F(t.quotaBytes)
|
|
340
|
-
})
|
|
341
|
-
]
|
|
342
|
-
}),
|
|
343
|
-
o && /*#__PURE__*/ z(Y, {
|
|
344
|
-
title: /*#__PURE__*/ R(H, { id: "6BDqha" }),
|
|
345
|
-
children: [
|
|
346
|
-
/*#__PURE__*/ R(q, {
|
|
347
|
-
label: i._({ id: "wTg+FY" }),
|
|
348
|
-
value: o.max_file_size === void 0 ? void 0 : F(o.max_file_size)
|
|
349
|
-
}),
|
|
350
|
-
/*#__PURE__*/ R(q, {
|
|
351
|
-
label: i._({ id: "Rih53k" }),
|
|
352
|
-
value: o.max_container_name_length
|
|
353
|
-
}),
|
|
354
|
-
/*#__PURE__*/ R(q, {
|
|
355
|
-
label: i._({ id: "qAkkjP" }),
|
|
356
|
-
value: o.max_object_name_length
|
|
357
|
-
}),
|
|
358
|
-
/*#__PURE__*/ R(q, {
|
|
359
|
-
label: i._({ id: "OZImTR" }),
|
|
360
|
-
value: o.container_listing_limit?.toLocaleString()
|
|
361
|
-
}),
|
|
362
|
-
/*#__PURE__*/ R(q, {
|
|
363
|
-
label: i._({ id: "a4A2uB" }),
|
|
364
|
-
value: o.account_listing_limit?.toLocaleString()
|
|
365
|
-
}),
|
|
366
|
-
/*#__PURE__*/ R(q, {
|
|
367
|
-
label: i._({ id: "zWb/Nn" }),
|
|
368
|
-
value: o.max_header_size
|
|
369
|
-
}),
|
|
370
|
-
/*#__PURE__*/ R(q, {
|
|
371
|
-
label: i._({ id: "RGwfoL" }),
|
|
372
|
-
value: o.max_meta_count
|
|
373
|
-
}),
|
|
374
|
-
/*#__PURE__*/ R(q, {
|
|
375
|
-
label: i._({ id: "8c3/77" }),
|
|
376
|
-
value: o.max_meta_name_length
|
|
377
|
-
}),
|
|
378
|
-
/*#__PURE__*/ R(q, {
|
|
379
|
-
label: i._({ id: "5JDSvn" }),
|
|
380
|
-
value: o.max_meta_value_length
|
|
381
|
-
}),
|
|
382
|
-
/*#__PURE__*/ R(q, {
|
|
383
|
-
label: i._({ id: "ZAx+d1" }),
|
|
384
|
-
value: o.max_meta_overall_size
|
|
385
|
-
}),
|
|
386
|
-
o.bulk_delete && /*#__PURE__*/ R(q, {
|
|
387
|
-
label: i._({ id: "lQ3EIe" }),
|
|
388
|
-
value: o.bulk_delete.max_deletes_per_request.toLocaleString()
|
|
389
|
-
}),
|
|
390
|
-
o.bulk_upload && /*#__PURE__*/ R(q, {
|
|
391
|
-
label: i._({ id: "STc+7E" }),
|
|
392
|
-
value: o.bulk_upload.max_containers_per_extraction.toLocaleString()
|
|
393
|
-
}),
|
|
394
|
-
o.slo && /*#__PURE__*/ R(q, {
|
|
395
|
-
label: i._({ id: "RNBvdl" }),
|
|
396
|
-
value: o.slo.max_manifest_segments.toLocaleString()
|
|
397
|
-
})
|
|
398
|
-
]
|
|
399
|
-
}),
|
|
400
|
-
l.length > 0 && /*#__PURE__*/ R(Y, {
|
|
401
|
-
title: /*#__PURE__*/ R(H, { id: "Qx7DM7" }),
|
|
402
|
-
children: l.map((e) => /*#__PURE__*/ R(J, { label: e }, e))
|
|
403
|
-
})
|
|
404
|
-
]
|
|
405
|
-
})
|
|
406
|
-
})]
|
|
407
|
-
});
|
|
408
|
-
}, X = 20, Z = "empty", Se = ({ isOpen: e, containers: t, onClose: n, onComplete: r }) => {
|
|
409
|
-
let { i18n: a, i18n: o, _: c } = U(), l = P(), [u, f] = V(null), { trackClose: p, markSubmitted: m, resetTracking: g } = I({
|
|
410
|
-
isOpen: e,
|
|
411
|
-
actionPrefix: "storage.swift.containers.empty"
|
|
412
|
-
}), _ = W.object({ confirm: W.string().transform((e) => e.trim()).refine((e) => e === Z, { message: a._({
|
|
413
|
-
id: "xyaMox",
|
|
414
|
-
values: { CONFIRM_WORD: Z }
|
|
415
|
-
}) }) }), b = ve({
|
|
416
|
-
defaultValues: { confirm: "" },
|
|
417
|
-
validators: { onSubmit: _ },
|
|
418
|
-
onSubmit: async () => {
|
|
419
|
-
if (C.isPending || u !== null) return;
|
|
420
|
-
m();
|
|
421
|
-
let e = 0, n = 0, i = [], a = t.length;
|
|
422
|
-
for (let r = 0; r < t.length; r++) {
|
|
423
|
-
f({
|
|
424
|
-
current: r + 1,
|
|
425
|
-
total: a
|
|
426
|
-
});
|
|
427
|
-
let o = t[r];
|
|
428
|
-
try {
|
|
429
|
-
let t = await C.mutateAsync({
|
|
430
|
-
project_id: l,
|
|
431
|
-
container: o.name
|
|
432
|
-
});
|
|
433
|
-
n += t, e++;
|
|
434
|
-
} catch (e) {
|
|
435
|
-
let t = e instanceof Error ? e.message : String(e);
|
|
436
|
-
i.push(`${o.name}: ${t}`);
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
e > 0 && await S.storage.swift.listContainers.invalidate(), r?.({
|
|
440
|
-
emptiedCount: e,
|
|
441
|
-
totalDeleted: n,
|
|
442
|
-
errors: i
|
|
443
|
-
}), T();
|
|
444
|
-
}
|
|
445
|
-
}), x = ye(b.store, (e) => e.isSubmitting || e.values.confirm.trim() !== Z), S = w.useUtils(), C = w.storage.swift.emptyContainer.useMutation(), T = () => {
|
|
446
|
-
p(), C.reset(), f(null), b.reset(), g(), n();
|
|
447
|
-
};
|
|
448
|
-
if (!e || t.length === 0) return null;
|
|
449
|
-
let E = t.length, D = t.slice(0, X), O = E - D.length, k = C.isPending || u !== null, A = u?.current, ee = u?.total;
|
|
450
|
-
return /*#__PURE__*/ R(s, {
|
|
451
|
-
title: /*#__PURE__*/ R(H, {
|
|
452
|
-
id: "0efWir",
|
|
453
|
-
values: { totalCount: E }
|
|
454
|
-
}),
|
|
455
|
-
open: e,
|
|
456
|
-
onCancel: () => {
|
|
457
|
-
p(), T();
|
|
458
|
-
},
|
|
459
|
-
confirmButtonLabel: k ? a._({ id: "s4Vnq2" }) : a._({ id: "N2S1rs" }),
|
|
460
|
-
confirmButtonVariant: "primary-danger",
|
|
461
|
-
cancelButtonLabel: a._({ id: "dEgA5A" }),
|
|
462
|
-
onConfirm: b.handleSubmit,
|
|
463
|
-
disableConfirmButton: k || x,
|
|
464
|
-
disableCancelButton: k,
|
|
465
|
-
disableCloseButton: k,
|
|
466
|
-
size: "small",
|
|
467
|
-
children: k ? /*#__PURE__*/ R(y, {
|
|
468
|
-
status: "progress",
|
|
469
|
-
title: u ? a._({
|
|
470
|
-
id: "3A+Lhe",
|
|
471
|
-
values: {
|
|
472
|
-
progressCurrent: A,
|
|
473
|
-
progressTotal: ee
|
|
474
|
-
}
|
|
475
|
-
}) : a._({ id: "s4Vnq2" }),
|
|
476
|
-
className: "mt-0"
|
|
477
|
-
}) : /*#__PURE__*/ z("div", { children: [
|
|
478
|
-
/*#__PURE__*/ R("p", { children: /*#__PURE__*/ R(H, { id: "JuOpPY" }) }),
|
|
479
|
-
/*#__PURE__*/ R("p", { children: /*#__PURE__*/ R(H, {
|
|
480
|
-
id: "XXjbEV",
|
|
481
|
-
components: {
|
|
482
|
-
0: /*#__PURE__*/ R("strong", {}),
|
|
483
|
-
1: /*#__PURE__*/ R("strong", {})
|
|
484
|
-
}
|
|
485
|
-
}) }),
|
|
486
|
-
/*#__PURE__*/ z("div", {
|
|
487
|
-
className: "my-6",
|
|
488
|
-
children: [/*#__PURE__*/ R("p", {
|
|
489
|
-
className: "text-sm font-semibold",
|
|
490
|
-
children: /*#__PURE__*/ R(H, { id: "F6WEvK" })
|
|
491
|
-
}), /*#__PURE__*/ R("div", {
|
|
492
|
-
className: "bg-theme-background-lvl-2 mt-2 max-h-48 overflow-y-auto rounded p-3",
|
|
493
|
-
children: /*#__PURE__*/ z(i, {
|
|
494
|
-
direction: "vertical",
|
|
495
|
-
gap: "1",
|
|
496
|
-
children: [D.map((e) => {
|
|
497
|
-
let t = e.count;
|
|
498
|
-
return /*#__PURE__*/ z("div", {
|
|
499
|
-
className: "text-theme-default overflow-x-hidden text-sm wrap-anywhere",
|
|
500
|
-
children: [e.name, t != null && /*#__PURE__*/ z("span", {
|
|
501
|
-
className: "text-theme-light ml-2",
|
|
502
|
-
children: [
|
|
503
|
-
"(",
|
|
504
|
-
o._(a._({
|
|
505
|
-
id: "7Ocn0b",
|
|
506
|
-
values: { count: t }
|
|
507
|
-
})),
|
|
508
|
-
")"
|
|
509
|
-
]
|
|
510
|
-
})]
|
|
511
|
-
}, e.name);
|
|
512
|
-
}), O > 0 && /*#__PURE__*/ R("div", {
|
|
513
|
-
className: "text-theme-light pt-2 text-sm",
|
|
514
|
-
children: /*#__PURE__*/ R(H, {
|
|
515
|
-
id: "20afDk",
|
|
516
|
-
values: { hiddenCount: O }
|
|
517
|
-
})
|
|
518
|
-
})]
|
|
519
|
-
})
|
|
520
|
-
})]
|
|
521
|
-
}),
|
|
522
|
-
/*#__PURE__*/ R(d, {
|
|
523
|
-
className: "mb-0",
|
|
524
|
-
id: "empty-containers-form",
|
|
525
|
-
onSubmit: (e) => {
|
|
526
|
-
e.preventDefault(), b.handleSubmit();
|
|
527
|
-
},
|
|
528
|
-
children: /*#__PURE__*/ R(v, { children: /*#__PURE__*/ R(b.Field, {
|
|
529
|
-
name: "confirm",
|
|
530
|
-
children: (e) => /*#__PURE__*/ R(h, {
|
|
531
|
-
label: a._({ id: "Ghp863" }),
|
|
532
|
-
placeholder: Z,
|
|
533
|
-
id: e.name,
|
|
534
|
-
name: e.name,
|
|
535
|
-
value: e.state.value,
|
|
536
|
-
onChange: (t) => e.handleChange(t.target.value),
|
|
537
|
-
disabled: k,
|
|
538
|
-
autoFocus: !0,
|
|
539
|
-
required: !0
|
|
540
|
-
})
|
|
541
|
-
}) })
|
|
542
|
-
})
|
|
543
|
-
] })
|
|
544
|
-
});
|
|
545
|
-
}, Ce = () => {
|
|
546
|
-
let { i18n: n, i18n: r, _: a } = U(), o = P(), s = ge({ from: D.fullPath }), { sortBy: c, sortDirection: u, search: d = "" } = D.useSearch(), [h, g] = V(!1), [v, x] = V(!1), [S, T] = V([]), [O, k] = V(d), j = he(void 0);
|
|
547
|
-
me(() => () => clearTimeout(j.current), []), me(() => {
|
|
548
|
-
k(d);
|
|
549
|
-
}, [d]);
|
|
550
|
-
let re = (e) => {
|
|
551
|
-
let { message: t, ...n } = A(e);
|
|
552
|
-
_.success(t, n);
|
|
553
|
-
}, ae = (e, t) => {
|
|
554
|
-
let { message: n, ...r } = oe(e, t);
|
|
555
|
-
_.warning(n, r);
|
|
556
|
-
}, de = (e, t) => {
|
|
557
|
-
let { message: n, ...r } = ie(e, t);
|
|
558
|
-
_.success(n, r);
|
|
559
|
-
}, N = (e, t) => {
|
|
560
|
-
let { message: n, ...r } = ue(e, t);
|
|
561
|
-
_.error(n, r);
|
|
562
|
-
}, I = (e) => {
|
|
563
|
-
let { message: t, ...n } = ee(e);
|
|
564
|
-
_.success(t, n);
|
|
565
|
-
}, L = (e, t) => {
|
|
566
|
-
let { message: n, ...r } = le(e, t);
|
|
567
|
-
_.error(n, r);
|
|
568
|
-
}, _e = (e) => {
|
|
569
|
-
let { message: t, ...n } = ne(e);
|
|
570
|
-
_.success(t, n);
|
|
571
|
-
}, W = (e, t) => {
|
|
572
|
-
let { message: n, ...r } = te(e, t);
|
|
573
|
-
_.error(n, r);
|
|
574
|
-
}, G = (e) => {
|
|
575
|
-
let { message: t, ...n } = M(e);
|
|
576
|
-
_.success(t, n);
|
|
577
|
-
}, ve = (e, t) => {
|
|
578
|
-
let { message: n, ...r } = ce(e, t);
|
|
579
|
-
_.error(n, r);
|
|
580
|
-
}, ye = ({ emptiedCount: e, totalDeleted: t, errors: n }) => {
|
|
581
|
-
if (n.length === 0) T([]);
|
|
582
|
-
else {
|
|
583
|
-
let e = new Set(n.map((e) => e.split(": ")[0]));
|
|
584
|
-
T((t) => t.filter((t) => e.has(t)));
|
|
585
|
-
}
|
|
586
|
-
let { message: r, severity: i, ...a } = se(e, t, n);
|
|
587
|
-
_[i](r, a);
|
|
588
|
-
}, K = {
|
|
589
|
-
options: [
|
|
590
|
-
{
|
|
591
|
-
label: n._({ id: "t0X9+8" }),
|
|
592
|
-
value: "name"
|
|
593
|
-
},
|
|
594
|
-
{
|
|
595
|
-
label: n._({ id: "sxbP3b" }),
|
|
596
|
-
value: "count"
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
label: n._({ id: "hgpMHD" }),
|
|
600
|
-
value: "bytes"
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
label: n._({ id: "sjMCOP" }),
|
|
604
|
-
value: "last_modified"
|
|
605
|
-
}
|
|
606
|
-
],
|
|
607
|
-
sortBy: c ?? "name",
|
|
608
|
-
sortDirection: u ?? "asc"
|
|
609
|
-
}, { data: q, isLoading: J, error: Y } = w.storage.swift.listContainers.useQuery({
|
|
610
|
-
project_id: o,
|
|
611
|
-
format: "json"
|
|
612
|
-
}), { data: X } = w.storage.swift.getAccountMetadata.useQuery({ project_id: o }), { data: Z } = w.storage.swift.getServiceInfo.useQuery(), Ce = (e) => [...e].sort((e, t) => {
|
|
613
|
-
let n;
|
|
614
|
-
switch (c ?? "name") {
|
|
615
|
-
case "name":
|
|
616
|
-
n = e.name.localeCompare(t.name);
|
|
617
|
-
break;
|
|
618
|
-
case "count":
|
|
619
|
-
n = e.count - t.count;
|
|
620
|
-
break;
|
|
621
|
-
case "bytes":
|
|
622
|
-
n = e.bytes - t.bytes;
|
|
623
|
-
break;
|
|
624
|
-
case "last_modified": {
|
|
625
|
-
if (!e.last_modified && !t.last_modified) return 0;
|
|
626
|
-
if (!e.last_modified || !t.last_modified) return e.last_modified ? -1 : 1;
|
|
627
|
-
let r = E(e.last_modified)?.getTime(), i = E(t.last_modified)?.getTime();
|
|
628
|
-
n = r == null || i == null ? 0 : r - i;
|
|
629
|
-
break;
|
|
630
|
-
}
|
|
631
|
-
default: n = e.name.localeCompare(t.name);
|
|
632
|
-
}
|
|
633
|
-
return (u ?? "asc") === "desc" ? -n : n;
|
|
634
|
-
}), we = (q || []).filter((e) => e.name.toLowerCase().includes(d.toLowerCase())), Te = Ce(we), Ee = (e) => {
|
|
635
|
-
let t = typeof e == "string" ? e : "";
|
|
636
|
-
B(() => {
|
|
637
|
-
s({ search: (e) => ({
|
|
638
|
-
...e,
|
|
639
|
-
search: t || void 0
|
|
640
|
-
}) });
|
|
641
|
-
});
|
|
642
|
-
}, De = (e) => {
|
|
643
|
-
let t = e.sortBy?.toString() || "name", n = e.sortDirection || "asc";
|
|
644
|
-
B(() => {
|
|
645
|
-
s({ search: (e) => ({
|
|
646
|
-
...e,
|
|
647
|
-
sortBy: t,
|
|
648
|
-
sortDirection: n
|
|
649
|
-
}) });
|
|
650
|
-
});
|
|
651
|
-
};
|
|
652
|
-
if (J) return /*#__PURE__*/ R(y, {
|
|
653
|
-
status: "progress",
|
|
654
|
-
title: n._({ id: "WYiUDa" })
|
|
655
|
-
});
|
|
656
|
-
if (Y) return /*#__PURE__*/ R(y, {
|
|
657
|
-
status: "error",
|
|
658
|
-
title: n._({ id: "WZWHIv" }),
|
|
659
|
-
body: Y.message
|
|
660
|
-
});
|
|
661
|
-
let Oe = X?.bytesUsed || 0, Q = X?.quotaBytes || 0, ke = Q > 0 ? Q - Oe : 0, Ae = (q || []).filter((e) => S.includes(e.name)), je = Ae.length > 0, Me = Ae.length, Ne = (q || []).length, Pe = we.length, Fe = Pe !== Ne, $ = Te.map((e) => e.name), Ie = $.length > 0 && $.every((e) => S.includes(e)), Le = $.some((e) => S.includes(e));
|
|
662
|
-
return /*#__PURE__*/ z("div", {
|
|
663
|
-
className: "relative",
|
|
664
|
-
children: [
|
|
665
|
-
/*#__PURE__*/ z(i, {
|
|
666
|
-
direction: "vertical",
|
|
667
|
-
children: [
|
|
668
|
-
/*#__PURE__*/ z(i, {
|
|
669
|
-
distribution: "end",
|
|
670
|
-
alignment: "center",
|
|
671
|
-
gap: "2",
|
|
672
|
-
className: "pb-2",
|
|
673
|
-
children: [/*#__PURE__*/ R(i, {
|
|
674
|
-
gap: "0.5",
|
|
675
|
-
alignment: "center",
|
|
676
|
-
children: /*#__PURE__*/ R(fe, {
|
|
677
|
-
options: K.options,
|
|
678
|
-
sortBy: K.sortBy,
|
|
679
|
-
sortDirection: K.sortDirection ?? "asc",
|
|
680
|
-
selectClassName: "min-w-40",
|
|
681
|
-
onSortByChange: (e) => De({
|
|
682
|
-
...K,
|
|
683
|
-
sortBy: e,
|
|
684
|
-
sortDirection: K.sortDirection
|
|
685
|
-
}),
|
|
686
|
-
onSortDirectionChange: (e) => De({
|
|
687
|
-
...K,
|
|
688
|
-
sortDirection: e
|
|
689
|
-
})
|
|
690
|
-
})
|
|
691
|
-
}), /*#__PURE__*/ R(p, {
|
|
692
|
-
variant: "primary",
|
|
693
|
-
className: "whitespace-nowrap",
|
|
694
|
-
onClick: () => g(!0),
|
|
695
|
-
children: /*#__PURE__*/ R(H, { id: "vTh35P" })
|
|
696
|
-
})]
|
|
697
|
-
}),
|
|
698
|
-
/*#__PURE__*/ R(m, { children: /*#__PURE__*/ R(i, {
|
|
699
|
-
direction: "vertical",
|
|
700
|
-
gap: "2",
|
|
701
|
-
children: /*#__PURE__*/ R(i, {
|
|
702
|
-
distribution: "end",
|
|
703
|
-
alignment: "center",
|
|
704
|
-
children: /*#__PURE__*/ R(e, {
|
|
705
|
-
placeholder: n._({ id: "TipzDp" }),
|
|
706
|
-
"data-testid": "searchbar",
|
|
707
|
-
value: O,
|
|
708
|
-
onInput: (e) => {
|
|
709
|
-
let t = e.currentTarget.value;
|
|
710
|
-
k(t), clearTimeout(j.current), j.current = window.setTimeout(() => Ee(t), 500);
|
|
711
|
-
},
|
|
712
|
-
onSearch: (e) => {
|
|
713
|
-
clearTimeout(j.current), Ee(typeof e == "string" ? e : "");
|
|
714
|
-
},
|
|
715
|
-
onClear: () => {
|
|
716
|
-
clearTimeout(j.current), k(""), Ee("");
|
|
717
|
-
}
|
|
718
|
-
})
|
|
719
|
-
})
|
|
720
|
-
}) }),
|
|
721
|
-
/*#__PURE__*/ R(m, { children: /*#__PURE__*/ z(i, {
|
|
722
|
-
distribution: "start",
|
|
723
|
-
gap: "2",
|
|
724
|
-
alignment: "center",
|
|
725
|
-
className: "text-sm",
|
|
726
|
-
children: [/*#__PURE__*/ z(i, {
|
|
727
|
-
gap: "2",
|
|
728
|
-
alignment: "center",
|
|
729
|
-
children: [/*#__PURE__*/ R(b, {
|
|
730
|
-
checked: Ie,
|
|
731
|
-
indeterminate: Le && !Ie,
|
|
732
|
-
onChange: () => {
|
|
733
|
-
T(Ie ? (e) => e.filter((e) => !$.includes(e)) : (e) => [.../* @__PURE__ */ new Set([...e, ...$])]);
|
|
734
|
-
}
|
|
735
|
-
}), /*#__PURE__*/ z(t, {
|
|
736
|
-
className: "flex items-center",
|
|
737
|
-
children: [/*#__PURE__*/ R(l, {
|
|
738
|
-
as: "div",
|
|
739
|
-
children: /*#__PURE__*/ R(p, {
|
|
740
|
-
disabled: !je,
|
|
741
|
-
size: "small",
|
|
742
|
-
icon: "moreVert",
|
|
743
|
-
label: n._({ id: "7L01XJ" })
|
|
744
|
-
})
|
|
745
|
-
}), je && /*#__PURE__*/ R(f, { children: /*#__PURE__*/ R(C, {
|
|
746
|
-
disabled: !je,
|
|
747
|
-
label: r._(n._({
|
|
748
|
-
id: "0Th0CH",
|
|
749
|
-
values: { selectedCount: Me }
|
|
750
|
-
})),
|
|
751
|
-
onClick: () => x(!0)
|
|
752
|
-
}) })]
|
|
753
|
-
})]
|
|
754
|
-
}), /*#__PURE__*/ z("div", {
|
|
755
|
-
className: "text-theme-light ml-auto flex items-center gap-1",
|
|
756
|
-
"data-testid": "containers-info-block",
|
|
757
|
-
children: [
|
|
758
|
-
Fe ? /*#__PURE__*/ R(H, {
|
|
759
|
-
id: "8uPTwT",
|
|
760
|
-
values: {
|
|
761
|
-
filteredCount: Pe,
|
|
762
|
-
totalCount: Ne
|
|
763
|
-
}
|
|
764
|
-
}) : /*#__PURE__*/ R(H, {
|
|
765
|
-
id: "ywe1H/",
|
|
766
|
-
values: { totalCount: Ne }
|
|
767
|
-
}),
|
|
768
|
-
Q > 0 && /*#__PURE__*/ z(pe, { children: [/*#__PURE__*/ R("span", { children: "," }), /*#__PURE__*/ z("span", { children: [
|
|
769
|
-
/*#__PURE__*/ R(H, { id: "kKK8AH" }),
|
|
770
|
-
" ",
|
|
771
|
-
/*#__PURE__*/ R("span", {
|
|
772
|
-
className: "text-theme-default font-semibold",
|
|
773
|
-
children: F(ke)
|
|
774
|
-
})
|
|
775
|
-
] })] }),
|
|
776
|
-
/*#__PURE__*/ R(xe, {
|
|
777
|
-
serviceInfo: Z,
|
|
778
|
-
accountInfo: X
|
|
779
|
-
})
|
|
780
|
-
]
|
|
781
|
-
})]
|
|
782
|
-
}) })
|
|
783
|
-
]
|
|
784
|
-
}),
|
|
785
|
-
/*#__PURE__*/ R(be, {
|
|
786
|
-
containers: Te,
|
|
787
|
-
createModalOpen: h,
|
|
788
|
-
setCreateModalOpen: g,
|
|
789
|
-
maxContainerNameLength: Z?.swift?.max_container_name_length,
|
|
790
|
-
existingContainers: q,
|
|
791
|
-
onCreateSuccess: re,
|
|
792
|
-
onCreatePartialSuccess: ae,
|
|
793
|
-
onEmptySuccess: de,
|
|
794
|
-
onEmptyError: N,
|
|
795
|
-
onDeleteSuccess: I,
|
|
796
|
-
onDeleteError: L,
|
|
797
|
-
onPropertiesSuccess: _e,
|
|
798
|
-
onPropertiesError: W,
|
|
799
|
-
onAclSuccess: G,
|
|
800
|
-
onAclError: ve,
|
|
801
|
-
selectedContainers: S,
|
|
802
|
-
setSelectedContainers: T,
|
|
803
|
-
hasAnyBulkAction: !0
|
|
804
|
-
}),
|
|
805
|
-
/*#__PURE__*/ R(Se, {
|
|
806
|
-
isOpen: v,
|
|
807
|
-
containers: Ae,
|
|
808
|
-
onClose: () => x(!1),
|
|
809
|
-
onComplete: ye
|
|
810
|
-
})
|
|
811
|
-
]
|
|
812
|
-
});
|
|
813
|
-
};
|
|
814
|
-
//#endregion
|
|
815
|
-
//#region src/client/routes/_auth/projects/$projectId/storage/$provider/$storageType/index.tsx?tsr-split=component
|
|
816
|
-
function we() {
|
|
817
|
-
let { project: e, provider: t } = _e({
|
|
818
|
-
from: "/_auth/projects/$projectId/storage/$provider/$storageType/",
|
|
819
|
-
select: (e) => ({
|
|
820
|
-
project: e.projectId,
|
|
821
|
-
provider: e.provider,
|
|
822
|
-
storageType: e.storageType
|
|
823
|
-
})
|
|
824
|
-
}), { i18n: n, _: r } = U(), i;
|
|
825
|
-
switch (t) {
|
|
826
|
-
case T.SWIFT:
|
|
827
|
-
i = n._({ id: "+OEi73" });
|
|
828
|
-
break;
|
|
829
|
-
case T.CEPH:
|
|
830
|
-
i = n._({ id: "KhNDX4" });
|
|
831
|
-
break;
|
|
832
|
-
default: i = n._({ id: "IWF68U" });
|
|
833
|
-
}
|
|
834
|
-
return /*#__PURE__*/ z("div", { children: [/*#__PURE__*/ R(L, {
|
|
835
|
-
title: i,
|
|
836
|
-
projectId: e
|
|
837
|
-
}), e ? /*#__PURE__*/ R(G, {
|
|
838
|
-
resetKeys: [e, t],
|
|
839
|
-
fallback: /*#__PURE__*/ R("div", {
|
|
840
|
-
className: "p-4 text-center",
|
|
841
|
-
children: /*#__PURE__*/ R(H, { id: "diFNkW" })
|
|
842
|
-
}),
|
|
843
|
-
children: (() => {
|
|
844
|
-
switch (t) {
|
|
845
|
-
case T.SWIFT: return /*#__PURE__*/ R(Ce, {});
|
|
846
|
-
case T.CEPH: return /*#__PURE__*/ R(N, {});
|
|
847
|
-
default: return /*#__PURE__*/ R("div", { children: "Storage Overview Page" });
|
|
848
|
-
}
|
|
849
|
-
})()
|
|
850
|
-
}) : /*#__PURE__*/ R("div", {
|
|
851
|
-
className: "p-4 text-center",
|
|
852
|
-
children: /*#__PURE__*/ R(H, { id: "Z2fZGD" })
|
|
853
|
-
})] });
|
|
854
|
-
}
|
|
855
|
-
var Te = () => /*#__PURE__*/ R(we, {});
|
|
856
|
-
//#endregion
|
|
857
|
-
export { Te as component };
|
|
858
|
-
|
|
859
|
-
//# sourceMappingURL=_storageType-UqAMP-8d.mjs.map
|