@cobaltcore-dev/aurora 0.22.0 → 0.23.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/client/{AuthProvider-p1e1DuKU.mjs → AuthProvider-CQ6Yppoh.mjs} +2 -2
- package/dist/client/{AuthProvider-p1e1DuKU.mjs.map → AuthProvider-CQ6Yppoh.mjs.map} +1 -1
- package/dist/client/{BucketToastNotifications-BGd2wVmh.mjs → BucketToastNotifications-Dq4dudkM.mjs} +224 -172
- package/dist/client/BucketToastNotifications-Dq4dudkM.mjs.map +1 -0
- package/dist/client/{ContentHeader-BIScbvb4.mjs → ContentHeader-9KZdhOoA.mjs} +2 -2
- package/dist/client/{ContentHeader-BIScbvb4.mjs.map → ContentHeader-9KZdhOoA.mjs.map} +1 -1
- package/dist/client/{DeleteFlavorModal-lFMExcq_.mjs → DeleteFlavorModal-Be2qZo4w.mjs} +2 -2
- package/dist/client/{DeleteFlavorModal-lFMExcq_.mjs.map → DeleteFlavorModal-Be2qZo4w.mjs.map} +1 -1
- package/dist/client/{DeletePcaModal-Dg9dej-H.mjs → DeletePcaModal-CIFsGWyj.mjs} +4 -4
- package/dist/client/{DeletePcaModal-Dg9dej-H.mjs.map → DeletePcaModal-CIFsGWyj.mjs.map} +1 -1
- package/dist/client/{DetailsInfo-DwCo9P1o.mjs → DetailsInfo-CHVD7d-W.mjs} +3 -3
- package/dist/client/{DetailsInfo-DwCo9P1o.mjs.map → DetailsInfo-CHVD7d-W.mjs.map} +1 -1
- package/dist/client/{FiltersInput-cOaaRpcQ.mjs → FiltersInput-DqT08Ib-.mjs} +2 -2
- package/dist/client/{FiltersInput-cOaaRpcQ.mjs.map → FiltersInput-DqT08Ib-.mjs.map} +1 -1
- package/dist/client/{FloatingIpActionModals-CDF8LVtX.mjs → FloatingIpActionModals-BcceUHcg.mjs} +4 -4
- package/dist/client/{FloatingIpActionModals-CDF8LVtX.mjs.map → FloatingIpActionModals-BcceUHcg.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications-Dzq6jNTm.mjs → ImageToastNotifications-BGyX2J6j.mjs} +5 -5
- package/dist/client/ImageToastNotifications-BGyX2J6j.mjs.map +1 -0
- package/dist/client/{RouteError-BmZRk_ss.mjs → RouteError-Rm08PcxN.mjs} +2 -2
- package/dist/client/{RouteError-BmZRk_ss.mjs.map → RouteError-Rm08PcxN.mjs.map} +1 -1
- package/dist/client/{SortInput-DjaEHvcO.mjs → SortInput-D_q_jDfe.mjs} +2 -2
- package/dist/client/{SortInput-DjaEHvcO.mjs.map → SortInput-D_q_jDfe.mjs.map} +1 -1
- package/dist/client/{StatusError-CLB026fg.mjs → StatusError-2ZU1gFpu.mjs} +2 -2
- package/dist/client/{StatusError-CLB026fg.mjs.map → StatusError-2ZU1gFpu.mjs.map} +1 -1
- package/dist/client/{_auth-Dut7CaMR.mjs → _auth-D5_QNUos.mjs} +2 -2
- package/dist/client/{_auth-Dut7CaMR.mjs.map → _auth-D5_QNUos.mjs.map} +1 -1
- package/dist/client/{_flavorId-DUWdFEMH.mjs → _flavorId-BsmqS9hP.mjs} +7 -7
- package/dist/client/{_flavorId-DUWdFEMH.mjs.map → _flavorId-BsmqS9hP.mjs.map} +1 -1
- package/dist/client/{_flavorId-BMJcnI7H.mjs → _flavorId-CFmkmg2Y.mjs} +2 -2
- package/dist/client/{_flavorId-BMJcnI7H.mjs.map → _flavorId-CFmkmg2Y.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-KcWWq9ZW2.mjs → _floatingIpId-Bb9ZEJ6b.mjs} +6 -6
- package/dist/client/_floatingIpId-Bb9ZEJ6b.mjs.map +1 -0
- package/dist/client/{_floatingIpId-CjQLzpC5.mjs → _floatingIpId-Dzh6_JCI.mjs} +2 -2
- package/dist/client/{_floatingIpId-CjQLzpC5.mjs.map → _floatingIpId-Dzh6_JCI.mjs.map} +1 -1
- package/dist/client/{_imageId-BkEpwbCr.mjs → _imageId-C3As7sHE.mjs} +5 -5
- package/dist/client/{_imageId-BkEpwbCr.mjs.map → _imageId-C3As7sHE.mjs.map} +1 -1
- package/dist/client/{_pcaId-BcwGho7g.mjs → _pcaId-n0q0aDb6.mjs} +6 -6
- package/dist/client/{_pcaId-BcwGho7g.mjs.map → _pcaId-n0q0aDb6.mjs.map} +1 -1
- package/dist/client/{_projectId-hMtrqW6m.mjs → _projectId-BuBIFdgG.mjs} +3 -3
- package/dist/client/{_projectId-hMtrqW6m.mjs.map → _projectId-BuBIFdgG.mjs.map} +1 -1
- package/dist/client/{_projectId-CoMD6nq6.mjs → _projectId-CAQkJHZ4.mjs} +3 -3
- package/dist/client/{_projectId-CoMD6nq6.mjs.map → _projectId-CAQkJHZ4.mjs.map} +1 -1
- package/dist/client/_projectId-D-b7paXE.mjs +29 -0
- package/dist/client/_projectId-D-b7paXE.mjs.map +1 -0
- package/dist/client/{_projectId-D8FHe0gr.mjs → _projectId-DNZsNxJw.mjs} +3 -3
- package/dist/client/{_projectId-D8FHe0gr.mjs.map → _projectId-DNZsNxJw.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-B5-gJe1u.mjs → _securityGroupId-DFdNKa2l.mjs} +641 -504
- package/dist/client/_securityGroupId-DFdNKa2l.mjs.map +1 -0
- package/dist/client/{_securityGroupId-fPJWtDPU.mjs → _securityGroupId-DRkY3Gt6.mjs} +2 -2
- package/dist/client/_securityGroupId-DRkY3Gt6.mjs.map +1 -0
- package/dist/client/{_storageType-CI5f4CsI.mjs → _storageType-Cn7TSOki.mjs} +2 -2
- package/dist/client/{_storageType-CI5f4CsI.mjs.map → _storageType-Cn7TSOki.mjs.map} +1 -1
- package/dist/client/{_storageType-DePX1Aah.mjs → _storageType-_8Ambhxc.mjs} +832 -843
- package/dist/client/_storageType-_8Ambhxc.mjs.map +1 -0
- package/dist/client/{about-B4sGnxeW.mjs → about-C8tTrQaW.mjs} +2 -2
- package/dist/client/{about-B4sGnxeW.mjs.map → about-C8tTrQaW.mjs.map} +1 -1
- package/dist/client/assets/objectDownload.worker-BAc5Au4B.js.map +1 -0
- package/dist/client/{aurora-Dp_NPGe8.mjs → aurora-jyvXcI4T.mjs} +2 -2
- package/dist/client/{aurora-Dp_NPGe8.mjs.map → aurora-jyvXcI4T.mjs.map} +1 -1
- package/dist/client/{build-DgeVmENN.mjs → build-CRLQyqu2.mjs} +2616 -3346
- package/dist/client/{build-DgeVmENN.mjs.map → build-CRLQyqu2.mjs.map} +1 -1
- package/dist/client/{flavors-DkGuWvge.mjs → flavors-BfTXqmoD.mjs} +6 -6
- package/dist/client/{flavors-DkGuWvge.mjs.map → flavors-BfTXqmoD.mjs.map} +1 -1
- package/dist/client/{flavors-DLxUiBhE.mjs → flavors-Dy-2mRGv.mjs} +2 -2
- package/dist/client/{flavors-DLxUiBhE.mjs.map → flavors-Dy-2mRGv.mjs.map} +1 -1
- package/dist/client/floatingips-zhNK6Xxn.mjs +562 -0
- package/dist/client/floatingips-zhNK6Xxn.mjs.map +1 -0
- package/dist/client/hooks/useAvailableViewportHeight.d.ts +30 -0
- package/dist/client/hooks/useVirtualizedTableBody.d.ts +39 -0
- package/dist/client/{hooks-D0wGUhRF.mjs → hooks-Bw3sHHOg.mjs} +2 -2
- package/dist/client/{hooks-D0wGUhRF.mjs.map → hooks-Bw3sHHOg.mjs.map} +1 -1
- package/dist/client/{images-h9i7S4LN.mjs → images-DPKUXryV.mjs} +2 -2
- package/dist/client/{images-h9i7S4LN.mjs.map → images-DPKUXryV.mjs.map} +1 -1
- package/dist/client/{images-D9nfOtSC.mjs → images-DhZnqUG_.mjs} +29 -29
- package/dist/client/images-DhZnqUG_.mjs.map +1 -0
- package/dist/client/images-NBf2bV43.mjs.map +1 -1
- package/dist/client/index.js +303 -312
- package/dist/client/index.js.map +1 -1
- package/dist/client/{objects-CGOfO00N.mjs → objects-B3mbk6V0.mjs} +1361 -1082
- package/dist/client/objects-B3mbk6V0.mjs.map +1 -0
- package/dist/client/{objects-B3Z8h4RU.mjs → objects-BQ8xvSW8.mjs} +2 -2
- package/dist/client/{objects-B3Z8h4RU.mjs.map → objects-BQ8xvSW8.mjs.map} +1 -1
- package/dist/client/{pca-Nppb8aVa.mjs → pca-B60iWWfG.mjs} +7 -7
- package/dist/client/{pca-Nppb8aVa.mjs.map → pca-B60iWWfG.mjs.map} +1 -1
- package/dist/client/{pca-C7cMT8fW.mjs → pca-D0kKxHp4.mjs} +2 -2
- package/dist/client/{pca-C7cMT8fW.mjs.map → pca-D0kKxHp4.mjs.map} +1 -1
- package/dist/client/projects-yiK0HGSA.mjs.map +1 -1
- package/dist/client/{routes-CaqfgBYu.mjs → routes-BOf-GDMM.mjs} +4 -4
- package/dist/client/{routes-CaqfgBYu.mjs.map → routes-BOf-GDMM.mjs.map} +1 -1
- package/dist/client/{routes-Bz4zb2H4.mjs → routes-CtfnI-aY.mjs} +2 -2
- package/dist/client/{routes-Bz4zb2H4.mjs.map → routes-CtfnI-aY.mjs.map} +1 -1
- package/dist/client/securitygroups-B8aLyFK7.mjs +17 -0
- package/dist/client/securitygroups-B8aLyFK7.mjs.map +1 -0
- package/dist/client/securitygroups-DRhFle2O.mjs +589 -0
- package/dist/client/securitygroups-DRhFle2O.mjs.map +1 -0
- package/dist/client/trpcClient-Di56hpVv.mjs +71 -0
- package/dist/client/trpcClient-Di56hpVv.mjs.map +1 -0
- package/dist/client/trpcClient.d.ts +40 -4
- package/dist/client/useListWithFiltering-aPTUNRaW.mjs +32 -0
- package/dist/client/useListWithFiltering-aPTUNRaW.mjs.map +1 -0
- package/dist/client/useSecurityGroupPermissions-BPS1ibWq.mjs +161 -0
- package/dist/client/useSecurityGroupPermissions-BPS1ibWq.mjs.map +1 -0
- package/dist/server/index.d.ts +56 -53
- package/dist/server/index.js +297 -20
- package/package.json +14 -14
- package/dist/client/BucketToastNotifications-BGd2wVmh.mjs.map +0 -1
- package/dist/client/EditSecurityGroupModal-BGPXglju.mjs +0 -137
- package/dist/client/EditSecurityGroupModal-BGPXglju.mjs.map +0 -1
- package/dist/client/ImageToastNotifications-Dzq6jNTm.mjs.map +0 -1
- package/dist/client/_floatingIpId-KcWWq9ZW2.mjs.map +0 -1
- package/dist/client/_projectId-MjFv839t.mjs +0 -25
- package/dist/client/_projectId-MjFv839t.mjs.map +0 -1
- package/dist/client/_securityGroupId-B5-gJe1u.mjs.map +0 -1
- package/dist/client/_securityGroupId-fPJWtDPU.mjs.map +0 -1
- package/dist/client/_storageType-DePX1Aah.mjs.map +0 -1
- package/dist/client/buildFilterParams-DoZzMKX9.mjs +0 -15
- package/dist/client/buildFilterParams-DoZzMKX9.mjs.map +0 -1
- package/dist/client/floatingips-DC5OrR8h.mjs +0 -434
- package/dist/client/floatingips-DC5OrR8h.mjs.map +0 -1
- package/dist/client/images-B5ktfqg6.mjs +0 -8
- package/dist/client/images-B5ktfqg6.mjs.map +0 -1
- package/dist/client/images-D9nfOtSC.mjs.map +0 -1
- package/dist/client/objects-CGOfO00N.mjs.map +0 -1
- package/dist/client/projects-DvSiI5Vg.mjs +0 -12
- package/dist/client/projects-DvSiI5Vg.mjs.map +0 -1
- package/dist/client/securitygroups-JMvcJLpb.mjs +0 -440
- package/dist/client/securitygroups-JMvcJLpb.mjs.map +0 -1
- package/dist/client/trpcClient-BxcNKnhv.mjs +0 -65
- package/dist/client/trpcClient-BxcNKnhv.mjs.map +0 -1
- package/dist/client/useListWithFiltering-BuhE81I6.mjs +0 -157
- package/dist/client/useListWithFiltering-BuhE81I6.mjs.map +0 -1
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, D as r, E as i, F as a, G as o, K as s, L as c, N as l, P as u, R as d, U as f, at as p, ct as m, et as h, f as g, g as _, l as v, lt as y, n as b, ot as x, q as S, r as C, rt as w, s as T, st as E, tt as D, ut as O, w as k, y as A } from "./build-
|
|
2
|
-
import {
|
|
3
|
-
import { t as M } from "./_storageType-
|
|
1
|
+
import { $ as e, A as t, B as n, D as r, E as i, F as a, G as o, K as s, L as c, N as l, P as u, R as d, U as f, at as p, ct as m, et as h, f as g, g as _, l as v, lt as y, n as b, ot as x, q as S, r as C, rt as w, s as T, st as E, tt as D, ut as O, w as k, y as A } from "./build-CRLQyqu2.mjs";
|
|
2
|
+
import { a as j } from "./trpcClient-Di56hpVv.mjs";
|
|
3
|
+
import { t as M } from "./_storageType-Cn7TSOki.mjs";
|
|
4
4
|
import { t as N } from "./useProjectId-DBc5lpoU.mjs";
|
|
5
|
-
import { t as P } from "./ContentHeader-
|
|
6
|
-
import { t as ee } from "./SortInput-
|
|
5
|
+
import { t as P } from "./ContentHeader-9KZdhOoA.mjs";
|
|
6
|
+
import { t as ee } from "./SortInput-D_q_jDfe.mjs";
|
|
7
7
|
import { t as F } from "./formatBytes-CZv_XyCY.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { useNavigate as
|
|
12
|
-
import { Trans as
|
|
13
|
-
import { ErrorBoundary as
|
|
14
|
-
import { i18n as
|
|
15
|
-
import { useVirtualizer as fe } from "@tanstack/react-virtual";
|
|
8
|
+
import { S as I, _ as te, a as L, i as ne, l as re, n as ie, o as R, r as z, t as ae, v as B, x as V } from "./BucketToastNotifications-Dq4dudkM.mjs";
|
|
9
|
+
import { Fragment as oe, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
10
|
+
import { Fragment as se, startTransition as ce, useCallback as le, useEffect as ue, useRef as de, useState as W } from "react";
|
|
11
|
+
import { useNavigate as fe, useParams as pe } from "@tanstack/react-router";
|
|
12
|
+
import { Trans as G, useLingui as K } from "@lingui/react";
|
|
13
|
+
import { ErrorBoundary as me } from "react-error-boundary";
|
|
14
|
+
import { i18n as q } from "@lingui/core";
|
|
16
15
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/CreateContainerModal.tsx
|
|
17
|
-
var
|
|
18
|
-
let { i18n: a, _: o } =
|
|
16
|
+
var J = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLength: i = 256 }) => {
|
|
17
|
+
let { i18n: a, _: o } = K(), s = N(), [c, l] = W(""), [u, d] = W(null), p = j.useUtils(), m = j.storage.swift.createContainer.useMutation({
|
|
19
18
|
onSuccess: () => {
|
|
20
19
|
p.storage.swift.listContainers.invalidate();
|
|
21
20
|
let e = c.trim();
|
|
@@ -41,7 +40,7 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
41
40
|
container: c.trim()
|
|
42
41
|
});
|
|
43
42
|
};
|
|
44
|
-
return e ? /*#__PURE__*/
|
|
43
|
+
return e ? /*#__PURE__*/ H(C, {
|
|
45
44
|
title: a._({ id: "vTh35P" }),
|
|
46
45
|
open: e,
|
|
47
46
|
onCancel: h,
|
|
@@ -50,13 +49,13 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
50
49
|
cancelButtonLabel: a._({ id: "dEgA5A" }),
|
|
51
50
|
size: "small",
|
|
52
51
|
disableConfirmButton: m.isPending || !c.trim(),
|
|
53
|
-
children: /*#__PURE__*/
|
|
52
|
+
children: /*#__PURE__*/ U(D, {
|
|
54
53
|
direction: "vertical",
|
|
55
54
|
gap: "6",
|
|
56
|
-
children: [/*#__PURE__*/
|
|
55
|
+
children: [/*#__PURE__*/ H("p", {
|
|
57
56
|
className: "text-theme-default",
|
|
58
|
-
children: /*#__PURE__*/
|
|
59
|
-
}), /*#__PURE__*/
|
|
57
|
+
children: /*#__PURE__*/ H(G, { id: "ne/GWZ" })
|
|
58
|
+
}), /*#__PURE__*/ H(f, {
|
|
60
59
|
label: a._({ id: "SUSS9i" }),
|
|
61
60
|
required: !0,
|
|
62
61
|
value: c,
|
|
@@ -72,8 +71,8 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
72
71
|
})]
|
|
73
72
|
})
|
|
74
73
|
}) : null;
|
|
75
|
-
},
|
|
76
|
-
let { i18n: c, _: l } =
|
|
74
|
+
}, he = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: a }) => {
|
|
75
|
+
let { i18n: c, _: l } = K(), p = N(), [m, h] = W(""), [v, y] = W(null), [b, x] = W(!1), S = de(""), w = () => {
|
|
77
76
|
t && navigator.clipboard.writeText(t.name).then(() => {
|
|
78
77
|
x(!0), setTimeout(() => x(!1), 2e3);
|
|
79
78
|
});
|
|
@@ -115,26 +114,26 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
115
114
|
e.key === "Enter" && te();
|
|
116
115
|
};
|
|
117
116
|
if (!e || !t) return null;
|
|
118
|
-
let
|
|
119
|
-
return /*#__PURE__*/
|
|
120
|
-
title: /* @__PURE__ */
|
|
117
|
+
let ne = E?.length ?? 0, re = !k && t.count === 0 && ne === 0, ie = !k && t.count > 0 && ne === 0, R = re || ie;
|
|
118
|
+
return /*#__PURE__*/ U(C, {
|
|
119
|
+
title: /* @__PURE__ */ U("span", {
|
|
121
120
|
className: "flex max-w-[400px] items-center gap-2",
|
|
122
121
|
children: [
|
|
123
|
-
/*#__PURE__*/
|
|
122
|
+
/*#__PURE__*/ H("span", {
|
|
124
123
|
className: "shrink-0",
|
|
125
|
-
children: /*#__PURE__*/
|
|
124
|
+
children: /*#__PURE__*/ H(G, { id: "5Okch2" })
|
|
126
125
|
}),
|
|
127
|
-
/*#__PURE__*/
|
|
126
|
+
/*#__PURE__*/ H("span", {
|
|
128
127
|
className: "truncate",
|
|
129
128
|
title: t.name,
|
|
130
129
|
children: t.name
|
|
131
130
|
}),
|
|
132
|
-
!k && !
|
|
131
|
+
!k && !R && /*#__PURE__*/ H("button", {
|
|
133
132
|
type: "button",
|
|
134
133
|
onClick: w,
|
|
135
134
|
title: b ? c._({ id: "PiH3UR" }) : c._({ id: "NQU1Nn" }),
|
|
136
135
|
className: "text-theme-light hover:text-theme-default inline-flex items-center transition-colors",
|
|
137
|
-
children: /*#__PURE__*/
|
|
136
|
+
children: /*#__PURE__*/ H(g, {
|
|
138
137
|
icon: b ? "checkCircle" : "contentCopy",
|
|
139
138
|
size: "16"
|
|
140
139
|
})
|
|
@@ -143,102 +142,102 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
143
142
|
}),
|
|
144
143
|
open: e,
|
|
145
144
|
onCancel: ee,
|
|
146
|
-
confirmButtonLabel:
|
|
145
|
+
confirmButtonLabel: R ? void 0 : c._({ id: "N2S1rs" }),
|
|
147
146
|
confirmButtonVariant: "primary-danger",
|
|
148
|
-
onConfirm:
|
|
149
|
-
cancelButtonLabel:
|
|
150
|
-
modalFooter:
|
|
147
|
+
onConfirm: R ? void 0 : te,
|
|
148
|
+
cancelButtonLabel: R ? void 0 : c._({ id: "dEgA5A" }),
|
|
149
|
+
modalFooter: R ? /*#__PURE__*/ H(_, {
|
|
151
150
|
className: "flex justify-end",
|
|
152
|
-
children: /*#__PURE__*/
|
|
151
|
+
children: /*#__PURE__*/ H(O, { children: /*#__PURE__*/ H(A, {
|
|
153
152
|
variant: "primary",
|
|
154
153
|
onClick: ee,
|
|
155
154
|
"data-testid": "empty-info-close-button",
|
|
156
|
-
children: /*#__PURE__*/
|
|
155
|
+
children: /*#__PURE__*/ H(G, { id: "yz7wBu" })
|
|
157
156
|
}) })
|
|
158
157
|
}) : void 0,
|
|
159
158
|
size: "small",
|
|
160
|
-
disableConfirmButton: k || P.isPending || !
|
|
161
|
-
children: [M && /*#__PURE__*/
|
|
159
|
+
disableConfirmButton: k || P.isPending || !R && !m.trim() || !R && m.trim() !== t.name,
|
|
160
|
+
children: [M && /*#__PURE__*/ H("p", {
|
|
162
161
|
className: "text-theme-error mb-4",
|
|
163
162
|
children: (() => {
|
|
164
163
|
let e = M.message;
|
|
165
|
-
return /*#__PURE__*/
|
|
164
|
+
return /*#__PURE__*/ H(G, {
|
|
166
165
|
id: "56IxdF",
|
|
167
166
|
values: { errorMessage: e }
|
|
168
167
|
});
|
|
169
168
|
})()
|
|
170
|
-
}), k ? /*#__PURE__*/
|
|
169
|
+
}), k ? /*#__PURE__*/ U(D, {
|
|
171
170
|
direction: "horizontal",
|
|
172
171
|
alignment: "center",
|
|
173
172
|
gap: "2",
|
|
174
173
|
className: "py-4",
|
|
175
|
-
children: [/*#__PURE__*/
|
|
176
|
-
}) :
|
|
174
|
+
children: [/*#__PURE__*/ H(s, { size: "small" }), /*#__PURE__*/ H(G, { id: "ujK/QN" })]
|
|
175
|
+
}) : R && !M ? /*#__PURE__*/ H("p", {
|
|
177
176
|
className: "text-theme-default py-2",
|
|
178
|
-
children:
|
|
179
|
-
}) : M ? null : /*#__PURE__*/
|
|
177
|
+
children: re ? /*#__PURE__*/ H(G, { id: "jNm/qL" }) : /*#__PURE__*/ H(G, { id: "WefafP" })
|
|
178
|
+
}) : M ? null : /*#__PURE__*/ U(D, {
|
|
180
179
|
direction: "vertical",
|
|
181
180
|
gap: "6",
|
|
182
181
|
children: [
|
|
183
|
-
/*#__PURE__*/
|
|
182
|
+
/*#__PURE__*/ U("p", {
|
|
184
183
|
className: "text-theme-default",
|
|
185
184
|
children: [
|
|
186
|
-
/*#__PURE__*/
|
|
187
|
-
/*#__PURE__*/
|
|
188
|
-
/*#__PURE__*/
|
|
185
|
+
/*#__PURE__*/ H(G, { id: "Ioblgz" }),
|
|
186
|
+
/*#__PURE__*/ H("br", {}),
|
|
187
|
+
/*#__PURE__*/ H(G, {
|
|
189
188
|
id: "kiRrtv",
|
|
190
189
|
components: {
|
|
191
|
-
0: /*#__PURE__*/
|
|
192
|
-
1: /*#__PURE__*/
|
|
193
|
-
2: /*#__PURE__*/
|
|
190
|
+
0: /*#__PURE__*/ H("strong", {}),
|
|
191
|
+
1: /*#__PURE__*/ H("strong", {}),
|
|
192
|
+
2: /*#__PURE__*/ H("strong", {})
|
|
194
193
|
}
|
|
195
194
|
})
|
|
196
195
|
]
|
|
197
196
|
}),
|
|
198
|
-
/*#__PURE__*/
|
|
197
|
+
/*#__PURE__*/ U("div", {
|
|
199
198
|
className: "border-theme-background-lvl-3 overflow-hidden rounded border",
|
|
200
199
|
children: [
|
|
201
|
-
t.count >
|
|
200
|
+
t.count > ne && /*#__PURE__*/ H("p", {
|
|
202
201
|
className: "text-theme-light px-3 py-2 text-xs",
|
|
203
202
|
children: (() => {
|
|
204
203
|
let e = t.count;
|
|
205
|
-
return /*#__PURE__*/
|
|
204
|
+
return /*#__PURE__*/ H(G, {
|
|
206
205
|
id: "1iQtS2",
|
|
207
206
|
values: {
|
|
208
|
-
actualObjectCount:
|
|
207
|
+
actualObjectCount: ne,
|
|
209
208
|
total: e
|
|
210
209
|
}
|
|
211
210
|
});
|
|
212
211
|
})()
|
|
213
212
|
}),
|
|
214
|
-
/*#__PURE__*/
|
|
213
|
+
/*#__PURE__*/ H(u, {
|
|
215
214
|
columns: 3,
|
|
216
215
|
className: "text-sm",
|
|
217
|
-
children: /*#__PURE__*/
|
|
218
|
-
/*#__PURE__*/
|
|
219
|
-
/*#__PURE__*/
|
|
220
|
-
/*#__PURE__*/
|
|
216
|
+
children: /*#__PURE__*/ U(i, { children: [
|
|
217
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "6YtxFj" }) }),
|
|
218
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "Cj2Gtd" }) }),
|
|
219
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "sjMCOP" }) })
|
|
221
220
|
] })
|
|
222
221
|
}),
|
|
223
|
-
/*#__PURE__*/
|
|
222
|
+
/*#__PURE__*/ H("div", {
|
|
224
223
|
className: "max-h-48 overflow-y-auto",
|
|
225
|
-
children: /*#__PURE__*/
|
|
224
|
+
children: /*#__PURE__*/ H(u, {
|
|
226
225
|
columns: 3,
|
|
227
226
|
className: "text-sm",
|
|
228
|
-
children: E.map((e) => /*#__PURE__*/
|
|
229
|
-
/*#__PURE__*/
|
|
227
|
+
children: E.map((e) => /*#__PURE__*/ U(i, { children: [
|
|
228
|
+
/*#__PURE__*/ H(o, {
|
|
230
229
|
className: "max-w-[200px] truncate",
|
|
231
230
|
title: e.name,
|
|
232
231
|
children: e.name
|
|
233
232
|
}),
|
|
234
|
-
/*#__PURE__*/
|
|
235
|
-
/*#__PURE__*/
|
|
233
|
+
/*#__PURE__*/ H(o, { children: F(e.bytes) }),
|
|
234
|
+
/*#__PURE__*/ H(o, { children: e.last_modified ? new Date(e.last_modified).toLocaleString() : c._({ id: "fj5byd" }) })
|
|
236
235
|
] }, e.name))
|
|
237
236
|
})
|
|
238
237
|
})
|
|
239
238
|
]
|
|
240
239
|
}),
|
|
241
|
-
/*#__PURE__*/
|
|
240
|
+
/*#__PURE__*/ H(f, {
|
|
242
241
|
label: c._({ id: "33F2A+" }),
|
|
243
242
|
required: !0,
|
|
244
243
|
value: m,
|
|
@@ -253,8 +252,8 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
253
252
|
]
|
|
254
253
|
})]
|
|
255
254
|
});
|
|
256
|
-
},
|
|
257
|
-
let { i18n: a, _: o } =
|
|
255
|
+
}, ge = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) => {
|
|
256
|
+
let { i18n: a, _: o } = K(), c = N(), [l, u] = W(""), [d, p] = W(null), [m, h] = W(!1), g = j.useUtils(), { data: v, isLoading: b, error: x } = j.storage.swift.listObjects.useQuery({
|
|
258
257
|
project_id: c,
|
|
259
258
|
container: t?.name ?? "",
|
|
260
259
|
format: "json",
|
|
@@ -273,7 +272,7 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
273
272
|
k();
|
|
274
273
|
}
|
|
275
274
|
});
|
|
276
|
-
|
|
275
|
+
ue(() => {
|
|
277
276
|
e || (u(""), p(null), h(!1), E.reset());
|
|
278
277
|
}, [e, t?.name]);
|
|
279
278
|
let k = () => {
|
|
@@ -297,13 +296,13 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
297
296
|
};
|
|
298
297
|
if (!e || !t) return null;
|
|
299
298
|
let F = v?.length ?? 0, I = !b && (F > 0 || t.count > 0), te = !b && t.count > 0 && F === 0, L = !!(x || w);
|
|
300
|
-
return /*#__PURE__*/
|
|
301
|
-
title: /* @__PURE__ */
|
|
299
|
+
return /*#__PURE__*/ U(C, {
|
|
300
|
+
title: /* @__PURE__ */ U("span", {
|
|
302
301
|
className: "flex max-w-[400px] items-center gap-2",
|
|
303
|
-
children: [/*#__PURE__*/
|
|
302
|
+
children: [/*#__PURE__*/ H("span", {
|
|
304
303
|
className: "shrink-0",
|
|
305
|
-
children: /*#__PURE__*/
|
|
306
|
-
}), /*#__PURE__*/
|
|
304
|
+
children: /*#__PURE__*/ H(G, { id: "Vzlopx" })
|
|
305
|
+
}), /*#__PURE__*/ H("span", {
|
|
307
306
|
className: "truncate",
|
|
308
307
|
title: t.name,
|
|
309
308
|
children: t.name
|
|
@@ -315,80 +314,80 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
315
314
|
confirmButtonVariant: I ? void 0 : "primary-danger",
|
|
316
315
|
onConfirm: I ? void 0 : P,
|
|
317
316
|
cancelButtonLabel: I ? void 0 : a._({ id: "dEgA5A" }),
|
|
318
|
-
modalFooter: I ? /*#__PURE__*/
|
|
317
|
+
modalFooter: I ? /*#__PURE__*/ H(_, {
|
|
319
318
|
className: "flex justify-end",
|
|
320
|
-
children: /*#__PURE__*/
|
|
319
|
+
children: /*#__PURE__*/ H(O, { children: /*#__PURE__*/ H(A, {
|
|
321
320
|
variant: "primary",
|
|
322
321
|
onClick: k,
|
|
323
322
|
"data-testid": "delete-has-objects-close-button",
|
|
324
|
-
children: /*#__PURE__*/
|
|
323
|
+
children: /*#__PURE__*/ H(G, { id: "yz7wBu" })
|
|
325
324
|
}) })
|
|
326
325
|
}) : void 0,
|
|
327
326
|
size: "small",
|
|
328
327
|
disableConfirmButton: b || L || E.isPending || !I && l.trim() !== "delete" || !I && T && !m,
|
|
329
|
-
children: [(x || w) && /*#__PURE__*/
|
|
328
|
+
children: [(x || w) && /*#__PURE__*/ U(D, {
|
|
330
329
|
direction: "vertical",
|
|
331
330
|
gap: "2",
|
|
332
331
|
className: "mb-4",
|
|
333
332
|
role: "alert",
|
|
334
333
|
"aria-live": "assertive",
|
|
335
|
-
children: [x && /*#__PURE__*/
|
|
334
|
+
children: [x && /*#__PURE__*/ H("p", {
|
|
336
335
|
className: "text-theme-error",
|
|
337
336
|
children: (() => {
|
|
338
337
|
let e = x.message;
|
|
339
|
-
return /*#__PURE__*/
|
|
338
|
+
return /*#__PURE__*/ H(G, {
|
|
340
339
|
id: "56IxdF",
|
|
341
340
|
values: { errorMessage: e }
|
|
342
341
|
});
|
|
343
342
|
})()
|
|
344
|
-
}), w && /*#__PURE__*/
|
|
343
|
+
}), w && /*#__PURE__*/ H("p", {
|
|
345
344
|
className: "text-theme-error",
|
|
346
345
|
children: (() => {
|
|
347
346
|
let e = w.message;
|
|
348
|
-
return /*#__PURE__*/
|
|
347
|
+
return /*#__PURE__*/ H(G, {
|
|
349
348
|
id: "BCXapL",
|
|
350
349
|
values: { errorMessage: e }
|
|
351
350
|
});
|
|
352
351
|
})()
|
|
353
352
|
})]
|
|
354
|
-
}), b ? /*#__PURE__*/
|
|
353
|
+
}), b ? /*#__PURE__*/ U(D, {
|
|
355
354
|
direction: "horizontal",
|
|
356
355
|
alignment: "center",
|
|
357
356
|
gap: "2",
|
|
358
357
|
className: "py-4",
|
|
359
|
-
children: [/*#__PURE__*/
|
|
360
|
-
}) : I ? /*#__PURE__*/
|
|
358
|
+
children: [/*#__PURE__*/ H(s, { size: "small" }), /*#__PURE__*/ H(G, { id: "Z3FXyt" })]
|
|
359
|
+
}) : I ? /*#__PURE__*/ U(D, {
|
|
361
360
|
direction: "vertical",
|
|
362
361
|
gap: "3",
|
|
363
|
-
children: [/*#__PURE__*/
|
|
362
|
+
children: [/*#__PURE__*/ H("p", {
|
|
364
363
|
className: "text-theme-default",
|
|
365
|
-
children: /*#__PURE__*/
|
|
366
|
-
}), te && /*#__PURE__*/
|
|
364
|
+
children: /*#__PURE__*/ H(G, { id: "3dBmvU" })
|
|
365
|
+
}), te && /*#__PURE__*/ H("p", {
|
|
367
366
|
className: "text-theme-default",
|
|
368
|
-
children: /*#__PURE__*/
|
|
367
|
+
children: /*#__PURE__*/ H(G, { id: "x3T4pq" })
|
|
369
368
|
})]
|
|
370
|
-
}) : /*#__PURE__*/
|
|
369
|
+
}) : /*#__PURE__*/ U(D, {
|
|
371
370
|
direction: "vertical",
|
|
372
371
|
gap: "6",
|
|
373
372
|
children: [
|
|
374
|
-
/*#__PURE__*/
|
|
373
|
+
/*#__PURE__*/ U("p", {
|
|
375
374
|
className: "text-theme-default",
|
|
376
375
|
children: [
|
|
377
|
-
/*#__PURE__*/
|
|
378
|
-
/*#__PURE__*/
|
|
379
|
-
/*#__PURE__*/
|
|
376
|
+
/*#__PURE__*/ H(G, { id: "Y8M9Uc" }),
|
|
377
|
+
/*#__PURE__*/ H("br", {}),
|
|
378
|
+
/*#__PURE__*/ H(G, {
|
|
380
379
|
id: "YzUoh9",
|
|
381
|
-
components: { 0: /*#__PURE__*/
|
|
380
|
+
components: { 0: /*#__PURE__*/ H("strong", {}) }
|
|
382
381
|
})
|
|
383
382
|
]
|
|
384
383
|
}),
|
|
385
|
-
T && /*#__PURE__*/
|
|
384
|
+
T && /*#__PURE__*/ H(y, {
|
|
386
385
|
label: a._({ id: "V/8B9A" }),
|
|
387
386
|
checked: m,
|
|
388
387
|
onChange: (e) => h(e.target.checked),
|
|
389
388
|
invalid: !m
|
|
390
389
|
}),
|
|
391
|
-
/*#__PURE__*/
|
|
390
|
+
/*#__PURE__*/ H(f, {
|
|
392
391
|
label: a._({ id: "QytzQr" }),
|
|
393
392
|
required: !0,
|
|
394
393
|
value: l,
|
|
@@ -403,31 +402,31 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
403
402
|
]
|
|
404
403
|
})]
|
|
405
404
|
});
|
|
406
|
-
},
|
|
405
|
+
}, _e = new Set([
|
|
407
406
|
"quota-bytes",
|
|
408
407
|
"quota-count",
|
|
409
408
|
"web-index",
|
|
410
409
|
"web-listings",
|
|
411
410
|
"web-listings-css",
|
|
412
411
|
"web-error"
|
|
413
|
-
]),
|
|
414
|
-
let { i18n: p, _: m } =
|
|
412
|
+
]), ve = 50, ye = /^[a-zA-Z0-9!#$%&'*+\-.^_`|~]+$/, Y = ({ isOpen: t, container: n, onClose: r, onSuccess: a, onError: l }) => {
|
|
413
|
+
let { i18n: p, _: m } = K(), h = N(), { data: _, isLoading: b, isError: S, error: w } = j.storage.swift.getContainerMetadata.useQuery({
|
|
415
414
|
project_id: h,
|
|
416
415
|
container: n?.name ?? ""
|
|
417
416
|
}, { enabled: t && n !== null }), E = _?.read === ".r:*,.rlistings", { data: O } = j.storage.swift.getContainerPublicUrl.useQuery({
|
|
418
417
|
project_id: h,
|
|
419
418
|
container: n?.name ?? ""
|
|
420
|
-
}, { enabled: t && n !== null && E }), { data: k } = j.storage.swift.listContainers.useQuery({ project_id: h }, { enabled: t }), [M, P] =
|
|
419
|
+
}, { enabled: t && n !== null && E }), { data: k } = j.storage.swift.listContainers.useQuery({ project_id: h }, { enabled: t }), [M, P] = W(""), [ee, F] = W(""), I = de(null), te = le((e) => {
|
|
421
420
|
let t = e.target.value;
|
|
422
421
|
P(t), I.current && clearTimeout(I.current), I.current = setTimeout(() => F(t), 300);
|
|
423
|
-
}, []), L = ee.trim().length > 0 ? (k ?? []).filter((e) => e.name !== n?.name && e.name.toLowerCase().includes(ee.toLowerCase())) : [],
|
|
424
|
-
|
|
422
|
+
}, []), L = ee.trim().length > 0 ? (k ?? []).filter((e) => e.name !== n?.name && e.name.toLowerCase().includes(ee.toLowerCase())) : [], ne = L.slice(0, ve), re = L.length - ne.length, ie = j.useUtils(), [R, z] = W(""), [ae, B] = W(null), [V, oe] = W(""), [se, ce] = W(null), [fe, pe] = W(""), [me, q] = W(!1), [J, he] = W(!1), [ge, Y] = W(""), [X, Z] = W([]), [be, xe] = W({}), [Se, Ce] = W(!1), [we, Te] = W(""), [Ee, De] = W(""), [Oe, ke] = W(null), [Ae, je] = W(null);
|
|
423
|
+
ue(() => {
|
|
425
424
|
if (!_) return;
|
|
426
|
-
|
|
425
|
+
z(_.quotaBytes == null ? "" : String(_.quotaBytes)), oe(_.quotaCount == null ? "" : String(_.quotaCount)), he(!!(_.versionsEnabled || _.versionsLocation || _.historyLocation)), Y(_.versionsLocation || _.historyLocation || "");
|
|
427
426
|
let e = _.metadata ?? {};
|
|
428
|
-
|
|
427
|
+
pe(e["web-index"] ?? ""), q(e["web-listings"] === "1" || e["web-listings"] === "true");
|
|
429
428
|
let t = _.metadata ?? {};
|
|
430
|
-
|
|
429
|
+
Z(Object.entries(t).filter(([e]) => !_e.has(e)).map(([e, t]) => ({
|
|
431
430
|
key: e,
|
|
432
431
|
value: t,
|
|
433
432
|
isNew: !1,
|
|
@@ -435,307 +434,307 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
435
434
|
originalKey: e,
|
|
436
435
|
originalValue: t
|
|
437
436
|
})));
|
|
438
|
-
}, [_]),
|
|
439
|
-
t ||
|
|
437
|
+
}, [_]), ue(() => {
|
|
438
|
+
t || Me();
|
|
440
439
|
}, [t]);
|
|
441
|
-
let
|
|
442
|
-
|
|
443
|
-
},
|
|
440
|
+
let Me = () => {
|
|
441
|
+
z(""), B(null), oe(""), ce(null), pe(""), q(!1), he(!1), Y(""), P(""), F(""), I.current && clearTimeout(I.current), Z([]), xe({}), Ce(!1), Te(""), De(""), ke(null), je(null), Ne.reset();
|
|
442
|
+
}, Ne = j.storage.swift.updateContainerMetadata.useMutation({
|
|
444
443
|
onSuccess: () => {
|
|
445
|
-
|
|
444
|
+
ie.storage.swift.getContainerMetadata.invalidate({ container: n.name }), ie.storage.swift.listContainers.invalidate(), a?.(n.name), We();
|
|
446
445
|
},
|
|
447
446
|
onError: (e) => {
|
|
448
447
|
l?.(n.name, e.message);
|
|
449
448
|
}
|
|
450
|
-
}),
|
|
449
|
+
}), Pe = () => {
|
|
451
450
|
let e = !0;
|
|
452
|
-
return
|
|
453
|
-
},
|
|
454
|
-
let e =
|
|
451
|
+
return R !== "" && (isNaN(Number(R)) || Number(R) < 0) ? (B(p._({ id: "AuQtzx" })), e = !1) : B(null), V !== "" && (isNaN(Number(V)) || Number(V) < 0) ? (ce(p._({ id: "AuQtzx" })), e = !1) : ce(null), e;
|
|
452
|
+
}, Fe = (e, t) => e.trim() ? ye.test(e) ? /[a-zA-Z0-9]/.test(e) ? _e.has(e.toLowerCase()) ? p._({ id: "JeRXll" }) : X.some((n) => n.key.toLowerCase() === e.toLowerCase() && n.originalKey !== t) ? p._({ id: "i6/ygf" }) : null : p._({ id: "dTNzBI" }) : p._({ id: "XYZLy9" }) : p._({ id: "QV1ZPO" }), Ie = () => {
|
|
453
|
+
let e = Fe(we);
|
|
455
454
|
if (e) {
|
|
456
|
-
|
|
455
|
+
ke(e);
|
|
457
456
|
return;
|
|
458
457
|
}
|
|
459
|
-
if (!
|
|
460
|
-
|
|
458
|
+
if (!Ee.trim()) {
|
|
459
|
+
je(p._({ id: "hXUWyd" }));
|
|
461
460
|
return;
|
|
462
461
|
}
|
|
463
|
-
|
|
464
|
-
key:
|
|
465
|
-
value:
|
|
462
|
+
Z([...X, {
|
|
463
|
+
key: we.trim(),
|
|
464
|
+
value: Ee.trim(),
|
|
466
465
|
isNew: !0,
|
|
467
466
|
isEditing: !1
|
|
468
|
-
}]),
|
|
469
|
-
},
|
|
470
|
-
|
|
471
|
-
},
|
|
472
|
-
|
|
467
|
+
}]), Te(""), De(""), Ce(!1), ke(null), je(null);
|
|
468
|
+
}, Le = () => {
|
|
469
|
+
Te(""), De(""), Ce(!1), ke(null), je(null);
|
|
470
|
+
}, Re = (e) => {
|
|
471
|
+
Z(X.map((t, n) => n === e ? {
|
|
473
472
|
...t,
|
|
474
473
|
isEditing: !0
|
|
475
474
|
} : {
|
|
476
475
|
...t,
|
|
477
476
|
isEditing: !1
|
|
478
|
-
})),
|
|
479
|
-
},
|
|
480
|
-
let t =
|
|
477
|
+
})), Ce(!1);
|
|
478
|
+
}, ze = (e) => {
|
|
479
|
+
let t = X[e], n = Fe(t.key, t.originalKey);
|
|
481
480
|
if (n) {
|
|
482
|
-
|
|
481
|
+
xe({ [`edit-${e}`]: n });
|
|
483
482
|
return;
|
|
484
483
|
}
|
|
485
484
|
if (!t.value.trim()) {
|
|
486
|
-
|
|
485
|
+
xe({ [`edit-${e}`]: p._({ id: "hXUWyd" }) });
|
|
487
486
|
return;
|
|
488
487
|
}
|
|
489
|
-
|
|
488
|
+
Z(X.map((t, n) => n === e ? {
|
|
490
489
|
...t,
|
|
491
490
|
isEditing: !1,
|
|
492
491
|
key: t.key.trim(),
|
|
493
492
|
value: t.value.trim()
|
|
494
|
-
} : t)),
|
|
495
|
-
},
|
|
496
|
-
|
|
493
|
+
} : t)), xe({});
|
|
494
|
+
}, Q = (e) => {
|
|
495
|
+
Z(X.map((t, n) => n === e ? {
|
|
497
496
|
...t,
|
|
498
497
|
isEditing: !1,
|
|
499
498
|
key: t.originalKey ?? t.key,
|
|
500
499
|
value: t.originalValue ?? t.value
|
|
501
|
-
} : t)),
|
|
502
|
-
},
|
|
503
|
-
|
|
504
|
-
},
|
|
505
|
-
|
|
500
|
+
} : t)), xe({});
|
|
501
|
+
}, Be = (e) => {
|
|
502
|
+
Z(X.filter((t, n) => n !== e)), xe({});
|
|
503
|
+
}, Ve = (e, t) => {
|
|
504
|
+
Z(X.map((n, r) => r === e ? {
|
|
506
505
|
...n,
|
|
507
506
|
key: t
|
|
508
|
-
} : n)),
|
|
507
|
+
} : n)), xe((t) => {
|
|
509
508
|
let n = { ...t };
|
|
510
509
|
return delete n[`edit-${e}`], n;
|
|
511
510
|
});
|
|
512
|
-
},
|
|
513
|
-
|
|
511
|
+
}, He = (e, t) => {
|
|
512
|
+
Z(X.map((n, r) => r === e ? {
|
|
514
513
|
...n,
|
|
515
514
|
value: t
|
|
516
|
-
} : n)),
|
|
515
|
+
} : n)), xe((t) => {
|
|
517
516
|
let n = { ...t };
|
|
518
517
|
return delete n[`edit-${e}`], n;
|
|
519
518
|
});
|
|
520
|
-
},
|
|
521
|
-
if (!n || !
|
|
519
|
+
}, Ue = () => {
|
|
520
|
+
if (!n || !Pe()) return;
|
|
522
521
|
let e = _?.metadata ?? {}, t = {}, r = [];
|
|
523
|
-
|
|
522
|
+
X.forEach((e) => {
|
|
524
523
|
(e.isNew || e.value !== e.originalValue || e.key !== e.originalKey) && (t[e.key] = e.value, !e.isNew && e.originalKey && e.key !== e.originalKey && r.push(e.originalKey));
|
|
525
524
|
});
|
|
526
|
-
let i = Object.keys(e).filter((e) => !
|
|
525
|
+
let i = Object.keys(e).filter((e) => !_e.has(e)), a = X.map((e) => e.originalKey).filter(Boolean);
|
|
527
526
|
i.forEach((e) => {
|
|
528
527
|
!a.includes(e) && !r.includes(e) && r.push(e);
|
|
529
|
-
}), E && (
|
|
528
|
+
}), E && (fe ? t["web-index"] = fe : _?.metadata?.["web-index"] && r.push("web-index"), me ? t["web-listings"] = "1" : _?.metadata?.["web-listings"] && r.push("web-listings"));
|
|
530
529
|
let o = !!(_?.versionsEnabled || _?.versionsLocation || _?.historyLocation), s = _?.versionsLocation || _?.historyLocation || "";
|
|
531
|
-
|
|
530
|
+
Ne.mutate({
|
|
532
531
|
project_id: h,
|
|
533
532
|
container: n.name,
|
|
534
533
|
metadata: t,
|
|
535
534
|
removeMetadata: r.length ? r : void 0,
|
|
536
|
-
quotaBytes:
|
|
537
|
-
quotaCount:
|
|
538
|
-
versionsLocation:
|
|
539
|
-
removeVersionsLocation: !
|
|
535
|
+
quotaBytes: R === "" ? void 0 : Number(R),
|
|
536
|
+
quotaCount: V === "" ? void 0 : Number(V),
|
|
537
|
+
versionsLocation: J && (!o || ge !== s) && ge ? ge : void 0,
|
|
538
|
+
removeVersionsLocation: !J && o ? !0 : void 0
|
|
540
539
|
});
|
|
541
|
-
},
|
|
542
|
-
|
|
540
|
+
}, We = () => {
|
|
541
|
+
Me(), r();
|
|
543
542
|
};
|
|
544
543
|
if (!t || !n) return null;
|
|
545
|
-
let
|
|
546
|
-
return /*#__PURE__*/
|
|
547
|
-
title: /*#__PURE__*/
|
|
544
|
+
let $ = b || Ne.isPending, Ge = S && !b, Ke = X.some((e) => e.isEditing), qe = _?.quotaBytes == null ? "" : String(_.quotaBytes), Je = _?.quotaCount == null ? "" : String(_.quotaCount), Ye = !!_?.versionsEnabled, Xe = _?.versionsLocation || _?.historyLocation || "", Ze = _?.metadata?.["web-index"] ?? "", Qe = _?.metadata?.["web-listings"] === "1" || _?.metadata?.["web-listings"] === "true", $e = Object.keys(_?.metadata ?? {}).filter((e) => !_e.has(e)), et = X.length === $e.length && X.every((e) => !e.isNew && e.key === e.originalKey && e.value === e.originalValue), tt = R === qe && V === Je && J === Ye && ge === Xe && fe === Ze && me === Qe && et, nt = _?.quotaBytes == null ? null : `${_.quotaBytes} B`;
|
|
545
|
+
return /*#__PURE__*/ U(C, {
|
|
546
|
+
title: /*#__PURE__*/ U("span", {
|
|
548
547
|
className: "flex max-w-[500px] items-center gap-2",
|
|
549
|
-
children: [/*#__PURE__*/
|
|
548
|
+
children: [/*#__PURE__*/ H("span", {
|
|
550
549
|
className: "shrink-0",
|
|
551
|
-
children: /*#__PURE__*/
|
|
552
|
-
}), /*#__PURE__*/
|
|
550
|
+
children: /*#__PURE__*/ H(G, { id: "y02Bu1" })
|
|
551
|
+
}), /*#__PURE__*/ H("span", {
|
|
553
552
|
className: "truncate",
|
|
554
553
|
title: n.name,
|
|
555
554
|
children: n.name
|
|
556
555
|
})]
|
|
557
556
|
}),
|
|
558
557
|
open: t,
|
|
559
|
-
onCancel:
|
|
558
|
+
onCancel: We,
|
|
560
559
|
confirmButtonLabel: p._({ id: "tfDRzk" }),
|
|
561
|
-
onConfirm:
|
|
560
|
+
onConfirm: Ue,
|
|
562
561
|
cancelButtonLabel: p._({ id: "dEgA5A" }),
|
|
563
562
|
size: "large",
|
|
564
|
-
disableConfirmButton:
|
|
565
|
-
children: [
|
|
563
|
+
disableConfirmButton: $ || Se || Ke || tt || Ge,
|
|
564
|
+
children: [Ne.isError && /*#__PURE__*/ H("p", {
|
|
566
565
|
className: "text-theme-error mb-4",
|
|
567
566
|
children: (() => {
|
|
568
|
-
let e =
|
|
569
|
-
return /*#__PURE__*/
|
|
567
|
+
let e = Ne.error.message;
|
|
568
|
+
return /*#__PURE__*/ H(G, {
|
|
570
569
|
id: "nUuaq8",
|
|
571
570
|
values: { errorMessage: e }
|
|
572
571
|
});
|
|
573
572
|
})()
|
|
574
|
-
}), b ? /*#__PURE__*/
|
|
573
|
+
}), b ? /*#__PURE__*/ U(D, {
|
|
575
574
|
direction: "horizontal",
|
|
576
575
|
alignment: "center",
|
|
577
576
|
gap: "2",
|
|
578
577
|
className: "py-8",
|
|
579
|
-
children: [/*#__PURE__*/
|
|
580
|
-
}) : Ge ? /*#__PURE__*/
|
|
578
|
+
children: [/*#__PURE__*/ H(s, { size: "small" }), /*#__PURE__*/ H(G, { id: "WRZ3Mt" })]
|
|
579
|
+
}) : Ge ? /*#__PURE__*/ H("p", {
|
|
581
580
|
className: "text-theme-error py-8 text-center",
|
|
582
|
-
children: /*#__PURE__*/
|
|
581
|
+
children: /*#__PURE__*/ H(G, {
|
|
583
582
|
id: "BCXapL",
|
|
584
583
|
values: { errorMessage: w?.message ?? "Unknown error" }
|
|
585
584
|
})
|
|
586
|
-
}) : /*#__PURE__*/
|
|
585
|
+
}) : /*#__PURE__*/ H("div", {
|
|
587
586
|
className: "max-h-[65vh] overflow-y-auto pr-1 pl-1",
|
|
588
|
-
children: /*#__PURE__*/
|
|
587
|
+
children: /*#__PURE__*/ U(D, {
|
|
589
588
|
direction: "vertical",
|
|
590
589
|
gap: "6",
|
|
591
590
|
children: [
|
|
592
|
-
/*#__PURE__*/
|
|
591
|
+
/*#__PURE__*/ U("div", {
|
|
593
592
|
className: "grid grid-cols-2 gap-4",
|
|
594
|
-
children: [/*#__PURE__*/
|
|
593
|
+
children: [/*#__PURE__*/ H(f, {
|
|
595
594
|
label: p._({ id: "z45o5B" }),
|
|
596
595
|
value: String(n.count),
|
|
597
596
|
disabled: !0,
|
|
598
597
|
readOnly: !0
|
|
599
|
-
}), /*#__PURE__*/
|
|
598
|
+
}), /*#__PURE__*/ H(f, {
|
|
600
599
|
label: p._({ id: "/InK0O" }),
|
|
601
600
|
value: _?.bytesUsed == null ? `${n.bytes.toLocaleString()} B` : `${_.bytesUsed.toLocaleString()} B`,
|
|
602
601
|
disabled: !0,
|
|
603
602
|
readOnly: !0
|
|
604
603
|
})]
|
|
605
604
|
}),
|
|
606
|
-
/*#__PURE__*/
|
|
605
|
+
/*#__PURE__*/ U("div", {
|
|
607
606
|
className: "grid grid-cols-2 gap-4",
|
|
608
|
-
children: [/*#__PURE__*/
|
|
607
|
+
children: [/*#__PURE__*/ H("div", { children: /*#__PURE__*/ H(f, {
|
|
609
608
|
label: p._({ id: "k0vAWv" }),
|
|
610
|
-
value:
|
|
609
|
+
value: V,
|
|
611
610
|
onChange: (e) => {
|
|
612
|
-
|
|
611
|
+
oe(e.target.value), se && ce(null);
|
|
613
612
|
},
|
|
614
613
|
placeholder: p._({ id: "qtoOYG" }),
|
|
615
|
-
invalid: !!
|
|
616
|
-
errortext:
|
|
617
|
-
disabled:
|
|
618
|
-
}) }), /*#__PURE__*/
|
|
614
|
+
invalid: !!se,
|
|
615
|
+
errortext: se ?? void 0,
|
|
616
|
+
disabled: $
|
|
617
|
+
}) }), /*#__PURE__*/ H("div", { children: /*#__PURE__*/ H(f, {
|
|
619
618
|
label: p._({ id: "KOpPMt" }),
|
|
620
|
-
value:
|
|
619
|
+
value: R,
|
|
621
620
|
onChange: (e) => {
|
|
622
|
-
|
|
621
|
+
z(e.target.value), ae && B(null);
|
|
623
622
|
},
|
|
624
623
|
placeholder: p._({ id: "qtoOYG" }),
|
|
625
|
-
invalid: !!
|
|
626
|
-
errortext:
|
|
627
|
-
disabled:
|
|
628
|
-
helptext:
|
|
624
|
+
invalid: !!ae,
|
|
625
|
+
errortext: ae ?? void 0,
|
|
626
|
+
disabled: $,
|
|
627
|
+
helptext: R && nt ? nt : void 0
|
|
629
628
|
}) })]
|
|
630
629
|
}),
|
|
631
|
-
E && O && /*#__PURE__*/
|
|
630
|
+
E && O && /*#__PURE__*/ U("div", { children: [/*#__PURE__*/ U("p", {
|
|
632
631
|
className: "text-theme-default mb-1 text-sm font-semibold",
|
|
633
632
|
children: [
|
|
634
|
-
/*#__PURE__*/
|
|
633
|
+
/*#__PURE__*/ H(G, { id: "mvz5Eo" }),
|
|
635
634
|
" ",
|
|
636
|
-
/*#__PURE__*/
|
|
635
|
+
/*#__PURE__*/ H("a", {
|
|
637
636
|
href: O,
|
|
638
637
|
target: "_blank",
|
|
639
638
|
rel: "noopener noreferrer",
|
|
640
639
|
className: "text-theme-info text-xs font-normal underline",
|
|
641
|
-
children: /*#__PURE__*/
|
|
640
|
+
children: /*#__PURE__*/ H(G, { id: "Alx2/L" })
|
|
642
641
|
})
|
|
643
642
|
]
|
|
644
|
-
}), /*#__PURE__*/
|
|
643
|
+
}), /*#__PURE__*/ H(f, {
|
|
645
644
|
value: O,
|
|
646
645
|
disabled: !0,
|
|
647
646
|
readOnly: !0
|
|
648
647
|
})] }),
|
|
649
|
-
/*#__PURE__*/
|
|
648
|
+
/*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H("p", {
|
|
650
649
|
className: "text-theme-default mb-3 text-sm font-semibold",
|
|
651
|
-
children: /*#__PURE__*/
|
|
652
|
-
}), E ? /*#__PURE__*/
|
|
650
|
+
children: /*#__PURE__*/ H(G, { id: "6CDYXS" })
|
|
651
|
+
}), E ? /*#__PURE__*/ U(D, {
|
|
653
652
|
direction: "vertical",
|
|
654
653
|
gap: "4",
|
|
655
|
-
children: [/*#__PURE__*/
|
|
654
|
+
children: [/*#__PURE__*/ U(D, {
|
|
656
655
|
direction: "vertical",
|
|
657
656
|
gap: "1",
|
|
658
|
-
children: [/*#__PURE__*/
|
|
657
|
+
children: [/*#__PURE__*/ H(y, {
|
|
659
658
|
label: p._({ id: "6+7EwD" }),
|
|
660
|
-
checked: !!
|
|
659
|
+
checked: !!fe,
|
|
661
660
|
onChange: (e) => {
|
|
662
|
-
e.target.checked ?
|
|
661
|
+
e.target.checked ? fe || pe("index.html") : pe("");
|
|
663
662
|
},
|
|
664
|
-
disabled:
|
|
665
|
-
}), /*#__PURE__*/
|
|
663
|
+
disabled: $
|
|
664
|
+
}), /*#__PURE__*/ H("div", {
|
|
666
665
|
className: "pl-6",
|
|
667
|
-
children: /*#__PURE__*/
|
|
668
|
-
value:
|
|
669
|
-
onChange: (e) =>
|
|
666
|
+
children: /*#__PURE__*/ H(f, {
|
|
667
|
+
value: fe,
|
|
668
|
+
onChange: (e) => pe(e.target.value),
|
|
670
669
|
placeholder: "index.html",
|
|
671
|
-
disabled:
|
|
670
|
+
disabled: $ || !fe,
|
|
672
671
|
className: "flex-1"
|
|
673
672
|
})
|
|
674
673
|
})]
|
|
675
|
-
}), /*#__PURE__*/
|
|
674
|
+
}), /*#__PURE__*/ U(D, {
|
|
676
675
|
direction: "horizontal",
|
|
677
676
|
alignment: "start",
|
|
678
677
|
gap: "2",
|
|
679
|
-
children: [/*#__PURE__*/
|
|
678
|
+
children: [/*#__PURE__*/ H(y, {
|
|
680
679
|
label: p._({ id: "NeUjqc" }),
|
|
681
|
-
checked:
|
|
682
|
-
onChange: (e) =>
|
|
683
|
-
disabled:
|
|
684
|
-
}), /*#__PURE__*/
|
|
680
|
+
checked: me,
|
|
681
|
+
onChange: (e) => q(e.target.checked),
|
|
682
|
+
disabled: $
|
|
683
|
+
}), /*#__PURE__*/ U(x, {
|
|
685
684
|
triggerEvent: "hover",
|
|
686
|
-
children: [/*#__PURE__*/
|
|
685
|
+
children: [/*#__PURE__*/ H(T, { children: /*#__PURE__*/ H(g, {
|
|
687
686
|
icon: "help",
|
|
688
687
|
size: "16",
|
|
689
688
|
className: "text-theme-light cursor-help"
|
|
690
|
-
}) }), /*#__PURE__*/
|
|
689
|
+
}) }), /*#__PURE__*/ H(v, {
|
|
691
690
|
className: "z-10 max-w-[220px]",
|
|
692
|
-
children: /*#__PURE__*/
|
|
691
|
+
children: /*#__PURE__*/ H(G, { id: "Oxl1UN" })
|
|
693
692
|
})]
|
|
694
693
|
})]
|
|
695
694
|
})]
|
|
696
|
-
}) : /*#__PURE__*/
|
|
695
|
+
}) : /*#__PURE__*/ H("p", {
|
|
697
696
|
className: "text-theme-default text-sm",
|
|
698
|
-
children: /*#__PURE__*/
|
|
697
|
+
children: /*#__PURE__*/ H(G, {
|
|
699
698
|
id: "aSsVD3",
|
|
700
|
-
components: { 0: /*#__PURE__*/
|
|
699
|
+
components: { 0: /*#__PURE__*/ H("strong", {}) }
|
|
701
700
|
})
|
|
702
701
|
})] }),
|
|
703
|
-
/*#__PURE__*/
|
|
702
|
+
/*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H("p", {
|
|
704
703
|
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
705
|
-
children: /*#__PURE__*/
|
|
706
|
-
}), Ye && !
|
|
704
|
+
children: /*#__PURE__*/ H(G, { id: "jNzyQo" })
|
|
705
|
+
}), Ye && !ge ? /*#__PURE__*/ H(y, {
|
|
707
706
|
label: p._({ id: "Nvfd2b" }),
|
|
708
707
|
checked: !0,
|
|
709
708
|
onChange: (e) => {
|
|
710
|
-
e.target.checked || (
|
|
709
|
+
e.target.checked || (he(!1), Y(""), P(""), F(""));
|
|
711
710
|
},
|
|
712
711
|
disabled: !0
|
|
713
|
-
}) : !
|
|
712
|
+
}) : !J && !ge ? /*#__PURE__*/ H(y, {
|
|
714
713
|
label: p._({ id: "WyKwnD" }),
|
|
715
714
|
checked: !1,
|
|
716
|
-
onChange: (e) =>
|
|
717
|
-
disabled:
|
|
718
|
-
}) : /*#__PURE__*/
|
|
715
|
+
onChange: (e) => he(e.target.checked),
|
|
716
|
+
disabled: $
|
|
717
|
+
}) : /*#__PURE__*/ U(D, {
|
|
719
718
|
direction: "vertical",
|
|
720
719
|
gap: "1",
|
|
721
|
-
children: [/*#__PURE__*/
|
|
720
|
+
children: [/*#__PURE__*/ H(y, {
|
|
722
721
|
label: p._({ id: "b0uU1G" }),
|
|
723
|
-
checked:
|
|
722
|
+
checked: J,
|
|
724
723
|
onChange: (e) => {
|
|
725
|
-
|
|
724
|
+
he(e.target.checked), e.target.checked || (Y(""), P(""), F(""));
|
|
726
725
|
},
|
|
727
|
-
disabled:
|
|
728
|
-
}),
|
|
726
|
+
disabled: $
|
|
727
|
+
}), J && /*#__PURE__*/ H("div", {
|
|
729
728
|
className: "pl-6",
|
|
730
|
-
children: /*#__PURE__*/
|
|
731
|
-
value:
|
|
732
|
-
onChange: (e) =>
|
|
729
|
+
children: /*#__PURE__*/ H(e, {
|
|
730
|
+
value: ge,
|
|
731
|
+
onChange: (e) => Y(e),
|
|
733
732
|
onInputChange: te,
|
|
734
733
|
placeholder: p._({ id: "a13wDR" }),
|
|
735
734
|
helptext: (() => {
|
|
736
735
|
if (M.trim().length === 0) return p._({ id: "c+fUtV" });
|
|
737
|
-
if (
|
|
738
|
-
let e =
|
|
736
|
+
if (re > 0) {
|
|
737
|
+
let e = ve, t = L.length;
|
|
739
738
|
return p._({
|
|
740
739
|
id: "qzhUb9",
|
|
741
740
|
values: {
|
|
@@ -745,149 +744,149 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
745
744
|
});
|
|
746
745
|
}
|
|
747
746
|
})(),
|
|
748
|
-
disabled:
|
|
749
|
-
children:
|
|
747
|
+
disabled: $,
|
|
748
|
+
children: ne.map((e) => /*#__PURE__*/ H(c, {
|
|
750
749
|
value: e.name,
|
|
751
750
|
children: e.name
|
|
752
751
|
}, e.name))
|
|
753
752
|
})
|
|
754
753
|
})]
|
|
755
754
|
})] }),
|
|
756
|
-
/*#__PURE__*/
|
|
757
|
-
/*#__PURE__*/
|
|
755
|
+
/*#__PURE__*/ U("div", { children: [
|
|
756
|
+
/*#__PURE__*/ U(D, {
|
|
758
757
|
direction: "horizontal",
|
|
759
758
|
alignment: "center",
|
|
760
759
|
distribution: "between",
|
|
761
760
|
className: "mb-3",
|
|
762
|
-
children: [/*#__PURE__*/
|
|
761
|
+
children: [/*#__PURE__*/ H("p", {
|
|
763
762
|
className: "text-theme-default text-sm font-semibold",
|
|
764
|
-
children: /*#__PURE__*/
|
|
765
|
-
}), /*#__PURE__*/
|
|
763
|
+
children: /*#__PURE__*/ H(G, { id: "6GBt0m" })
|
|
764
|
+
}), /*#__PURE__*/ H("p", {
|
|
766
765
|
className: "text-theme-light text-xs",
|
|
767
|
-
children: /*#__PURE__*/
|
|
766
|
+
children: /*#__PURE__*/ H(G, { id: "kuYWaD" })
|
|
768
767
|
})]
|
|
769
768
|
}),
|
|
770
|
-
/*#__PURE__*/
|
|
769
|
+
/*#__PURE__*/ H(D, {
|
|
771
770
|
direction: "horizontal",
|
|
772
771
|
className: "jn:bg-theme-background-lvl-1 justify-end p-2",
|
|
773
|
-
children: /*#__PURE__*/
|
|
772
|
+
children: /*#__PURE__*/ H(A, {
|
|
774
773
|
label: p._({ id: "sWBLli" }),
|
|
775
|
-
onClick: () =>
|
|
774
|
+
onClick: () => Ce(!0),
|
|
776
775
|
variant: "primary",
|
|
777
776
|
icon: "addCircle",
|
|
778
777
|
size: "small",
|
|
779
|
-
disabled:
|
|
778
|
+
disabled: Se || Ke || $
|
|
780
779
|
})
|
|
781
780
|
}),
|
|
782
|
-
/*#__PURE__*/
|
|
781
|
+
/*#__PURE__*/ U(u, {
|
|
783
782
|
columns: 3,
|
|
784
783
|
children: [
|
|
785
|
-
/*#__PURE__*/
|
|
786
|
-
/*#__PURE__*/
|
|
787
|
-
/*#__PURE__*/
|
|
788
|
-
/*#__PURE__*/
|
|
784
|
+
/*#__PURE__*/ U(i, { children: [
|
|
785
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "7sMeHQ" }) }),
|
|
786
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "wMHvYH" }) }),
|
|
787
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "7L01XJ" }) })
|
|
789
788
|
] }),
|
|
790
|
-
|
|
791
|
-
/*#__PURE__*/
|
|
792
|
-
value:
|
|
789
|
+
Se && /*#__PURE__*/ U(i, { children: [
|
|
790
|
+
/*#__PURE__*/ H(o, { children: /*#__PURE__*/ H(f, {
|
|
791
|
+
value: we,
|
|
793
792
|
onChange: (e) => {
|
|
794
|
-
|
|
793
|
+
Te(e.target.value), Oe && ke(null);
|
|
795
794
|
},
|
|
796
795
|
placeholder: p._({ id: "x9AdZ8" }),
|
|
797
|
-
errortext:
|
|
798
|
-
invalid: !!
|
|
796
|
+
errortext: Oe ?? void 0,
|
|
797
|
+
invalid: !!Oe,
|
|
799
798
|
autoFocus: !0
|
|
800
799
|
}) }),
|
|
801
|
-
/*#__PURE__*/
|
|
802
|
-
value:
|
|
800
|
+
/*#__PURE__*/ H(o, { children: /*#__PURE__*/ H(f, {
|
|
801
|
+
value: Ee,
|
|
803
802
|
onChange: (e) => {
|
|
804
|
-
|
|
803
|
+
De(e.target.value), Ae && je(null);
|
|
805
804
|
},
|
|
806
805
|
placeholder: p._({ id: "wMHvYH" }),
|
|
807
|
-
errortext:
|
|
808
|
-
invalid: !!
|
|
806
|
+
errortext: Ae ?? void 0,
|
|
807
|
+
invalid: !!Ae
|
|
809
808
|
}) }),
|
|
810
|
-
/*#__PURE__*/
|
|
809
|
+
/*#__PURE__*/ H(o, { children: /*#__PURE__*/ U(D, {
|
|
811
810
|
direction: "horizontal",
|
|
812
811
|
gap: "2",
|
|
813
|
-
children: [/*#__PURE__*/
|
|
812
|
+
children: [/*#__PURE__*/ H(A, {
|
|
814
813
|
size: "small",
|
|
815
814
|
variant: "primary",
|
|
816
|
-
onClick:
|
|
815
|
+
onClick: Ie,
|
|
817
816
|
icon: "check",
|
|
818
817
|
title: p._({ id: "tfDRzk" })
|
|
819
|
-
}), /*#__PURE__*/
|
|
818
|
+
}), /*#__PURE__*/ H(A, {
|
|
820
819
|
size: "small",
|
|
821
820
|
variant: "subdued",
|
|
822
|
-
onClick:
|
|
821
|
+
onClick: Le,
|
|
823
822
|
icon: "close",
|
|
824
823
|
title: p._({ id: "bzSI52" })
|
|
825
824
|
})]
|
|
826
825
|
}) })
|
|
827
826
|
] }),
|
|
828
|
-
|
|
829
|
-
/*#__PURE__*/
|
|
827
|
+
X.map((e, t) => /*#__PURE__*/ U(i, { children: [
|
|
828
|
+
/*#__PURE__*/ H(o, { children: e.isEditing ? /*#__PURE__*/ H(f, {
|
|
830
829
|
value: e.key,
|
|
831
|
-
onChange: (e) =>
|
|
832
|
-
errortext:
|
|
833
|
-
invalid: !!
|
|
834
|
-
}) : /*#__PURE__*/
|
|
830
|
+
onChange: (e) => Ve(t, e.target.value),
|
|
831
|
+
errortext: be[`edit-${t}`],
|
|
832
|
+
invalid: !!be[`edit-${t}`]
|
|
833
|
+
}) : /*#__PURE__*/ H("span", {
|
|
835
834
|
className: "block max-w-xs truncate text-sm",
|
|
836
835
|
title: e.key,
|
|
837
836
|
children: e.key
|
|
838
837
|
}) }),
|
|
839
|
-
/*#__PURE__*/
|
|
838
|
+
/*#__PURE__*/ H(o, { children: e.isEditing ? /*#__PURE__*/ H(f, {
|
|
840
839
|
value: e.value,
|
|
841
|
-
onChange: (e) =>
|
|
842
|
-
}) : /*#__PURE__*/
|
|
840
|
+
onChange: (e) => He(t, e.target.value)
|
|
841
|
+
}) : /*#__PURE__*/ H("span", {
|
|
843
842
|
className: "block max-w-md truncate text-sm",
|
|
844
843
|
title: e.value,
|
|
845
844
|
children: e.value
|
|
846
845
|
}) }),
|
|
847
|
-
/*#__PURE__*/
|
|
846
|
+
/*#__PURE__*/ H(o, { children: e.isEditing ? /*#__PURE__*/ U(D, {
|
|
848
847
|
direction: "horizontal",
|
|
849
848
|
gap: "2",
|
|
850
|
-
children: [/*#__PURE__*/
|
|
849
|
+
children: [/*#__PURE__*/ H(A, {
|
|
851
850
|
size: "small",
|
|
852
851
|
variant: "primary",
|
|
853
|
-
onClick: () =>
|
|
852
|
+
onClick: () => ze(t),
|
|
854
853
|
icon: "check",
|
|
855
854
|
title: p._({ id: "tfDRzk" })
|
|
856
|
-
}), /*#__PURE__*/
|
|
855
|
+
}), /*#__PURE__*/ H(A, {
|
|
857
856
|
size: "small",
|
|
858
857
|
variant: "subdued",
|
|
859
|
-
onClick: () =>
|
|
858
|
+
onClick: () => Q(t),
|
|
860
859
|
icon: "close",
|
|
861
860
|
title: p._({ id: "bzSI52" })
|
|
862
861
|
})]
|
|
863
|
-
}) : /*#__PURE__*/
|
|
862
|
+
}) : /*#__PURE__*/ U(D, {
|
|
864
863
|
direction: "horizontal",
|
|
865
864
|
gap: "2",
|
|
866
|
-
children: [/*#__PURE__*/
|
|
865
|
+
children: [/*#__PURE__*/ H(A, {
|
|
867
866
|
size: "small",
|
|
868
867
|
variant: "subdued",
|
|
869
|
-
onClick: () =>
|
|
868
|
+
onClick: () => Re(t),
|
|
870
869
|
icon: "edit",
|
|
871
870
|
title: p._({ id: "ePK91l" }),
|
|
872
|
-
disabled:
|
|
873
|
-
}), /*#__PURE__*/
|
|
871
|
+
disabled: Se || Ke || $
|
|
872
|
+
}), /*#__PURE__*/ H(A, {
|
|
874
873
|
size: "small",
|
|
875
874
|
variant: "primary-danger",
|
|
876
|
-
onClick: () =>
|
|
875
|
+
onClick: () => Be(t),
|
|
877
876
|
icon: "deleteForever",
|
|
878
877
|
title: p._({ id: "cnGeoo" }),
|
|
879
|
-
disabled:
|
|
878
|
+
disabled: Se || Ke || $
|
|
880
879
|
})]
|
|
881
880
|
}) })
|
|
882
881
|
] }, t)),
|
|
883
|
-
|
|
882
|
+
X.length === 0 && !Se && /*#__PURE__*/ H(i, { children: /*#__PURE__*/ H(o, {
|
|
884
883
|
colSpan: 3,
|
|
885
884
|
className: "py-6 text-center",
|
|
886
|
-
children: /*#__PURE__*/
|
|
885
|
+
children: /*#__PURE__*/ H(D, {
|
|
887
886
|
alignment: "center",
|
|
888
|
-
children: /*#__PURE__*/
|
|
887
|
+
children: /*#__PURE__*/ H("span", {
|
|
889
888
|
className: "text-theme-light text-sm",
|
|
890
|
-
children: /*#__PURE__*/
|
|
889
|
+
children: /*#__PURE__*/ H(G, { id: "F02e8I" })
|
|
891
890
|
})
|
|
892
891
|
})
|
|
893
892
|
}) })
|
|
@@ -901,7 +900,7 @@ var pe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
901
900
|
};
|
|
902
901
|
//#endregion
|
|
903
902
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ManageContainerAccessModal.tsx
|
|
904
|
-
function
|
|
903
|
+
function X(e) {
|
|
905
904
|
let t = e.trim();
|
|
906
905
|
if (t === ".r:*") return {
|
|
907
906
|
raw: t,
|
|
@@ -960,56 +959,56 @@ function Z(e) {
|
|
|
960
959
|
requiresToken: !0
|
|
961
960
|
};
|
|
962
961
|
}
|
|
963
|
-
function
|
|
964
|
-
return e.trim() ? e.split(",").map((e) => e.trim()).filter(Boolean).map(
|
|
965
|
-
}
|
|
966
|
-
var ye = [".r:*", ".rlistings"];
|
|
967
|
-
function be(e) {
|
|
968
|
-
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
969
|
-
return ye.every((e) => t.includes(e));
|
|
962
|
+
function Z(e) {
|
|
963
|
+
return e.trim() ? e.split(",").map((e) => e.trim()).filter(Boolean).map(X) : [];
|
|
970
964
|
}
|
|
965
|
+
var be = [".r:*", ".rlistings"];
|
|
971
966
|
function xe(e) {
|
|
972
967
|
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
973
|
-
return
|
|
968
|
+
return be.every((e) => t.includes(e));
|
|
974
969
|
}
|
|
975
970
|
function Se(e) {
|
|
976
|
-
|
|
971
|
+
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
972
|
+
return [...new Set([...be, ...t])].join(",");
|
|
977
973
|
}
|
|
978
974
|
function Ce(e) {
|
|
975
|
+
return e.split(",").map((e) => e.trim()).filter((e) => !be.includes(e)).join(",");
|
|
976
|
+
}
|
|
977
|
+
function we(e) {
|
|
979
978
|
switch (e.type) {
|
|
980
|
-
case "any-referrer": return
|
|
979
|
+
case "any-referrer": return q._({ id: "HVdrr1" });
|
|
981
980
|
case "denied-referrer": {
|
|
982
981
|
let t = e.host || "";
|
|
983
|
-
return
|
|
982
|
+
return q._({
|
|
984
983
|
id: "7XQ3QJ",
|
|
985
984
|
values: { host: t }
|
|
986
985
|
});
|
|
987
986
|
}
|
|
988
987
|
case "specific-referrer": {
|
|
989
988
|
let t = e.host || "";
|
|
990
|
-
return
|
|
989
|
+
return q._({
|
|
991
990
|
id: "Dqnh7K",
|
|
992
991
|
values: { host: t }
|
|
993
992
|
});
|
|
994
993
|
}
|
|
995
|
-
case "listing-access": return
|
|
994
|
+
case "listing-access": return q._({ id: "ntNlXu" });
|
|
996
995
|
case "all-project-users": {
|
|
997
996
|
let t = e.projectId || "";
|
|
998
|
-
return
|
|
997
|
+
return q._({
|
|
999
998
|
id: "sa4CV6",
|
|
1000
999
|
values: { projectId: t }
|
|
1001
1000
|
});
|
|
1002
1001
|
}
|
|
1003
1002
|
case "specific-user-any-project": {
|
|
1004
1003
|
let t = e.userId || "";
|
|
1005
|
-
return
|
|
1004
|
+
return q._({
|
|
1006
1005
|
id: "izMhIO",
|
|
1007
1006
|
values: { userId: t }
|
|
1008
1007
|
});
|
|
1009
1008
|
}
|
|
1010
1009
|
case "specific-user": {
|
|
1011
1010
|
let t = e.projectId || "", n = e.userId || "";
|
|
1012
|
-
return
|
|
1011
|
+
return q._({
|
|
1013
1012
|
id: "cXuXkb",
|
|
1014
1013
|
values: {
|
|
1015
1014
|
userId: n,
|
|
@@ -1020,19 +1019,19 @@ function Ce(e) {
|
|
|
1020
1019
|
default: return e.raw;
|
|
1021
1020
|
}
|
|
1022
1021
|
}
|
|
1023
|
-
var
|
|
1024
|
-
let { i18n: l, _: u } =
|
|
1025
|
-
|
|
1022
|
+
var Te = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) => {
|
|
1023
|
+
let { i18n: l, _: u } = K(), d = N(), [f, p] = W(""), [m, g] = W(""), [_, v] = W(!1), [b, x] = W(!1);
|
|
1024
|
+
ue(() => {
|
|
1026
1025
|
!f.trim() && !m.trim() && x(!1);
|
|
1027
1026
|
}, [f, m]);
|
|
1028
1027
|
let { data: w, isLoading: T, isError: E, error: O } = j.storage.swift.getContainerMetadata.useQuery({
|
|
1029
1028
|
project_id: d,
|
|
1030
1029
|
container: t?.name ?? ""
|
|
1031
1030
|
}, { enabled: e && t !== null });
|
|
1032
|
-
|
|
1031
|
+
ue(() => {
|
|
1033
1032
|
if (!w) return;
|
|
1034
1033
|
let e = w.read ?? "", t = w.write ?? "";
|
|
1035
|
-
p(e), g(t), v(
|
|
1034
|
+
p(e), g(t), v(xe(e));
|
|
1036
1035
|
}, [w]);
|
|
1037
1036
|
let k = j.useUtils(), M = j.storage.swift.updateContainerMetadata.useMutation({
|
|
1038
1037
|
onSuccess: () => {
|
|
@@ -1044,20 +1043,20 @@ var we = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1044
1043
|
onError: (e) => {
|
|
1045
1044
|
c?.(t.name, e.message);
|
|
1046
1045
|
}
|
|
1047
|
-
}), P =
|
|
1046
|
+
}), P = de(M.reset);
|
|
1048
1047
|
P.current = M.reset;
|
|
1049
1048
|
let ee = () => {
|
|
1050
1049
|
p(""), g(""), v(!1), x(!1), M.reset(), i();
|
|
1051
1050
|
};
|
|
1052
|
-
|
|
1051
|
+
ue(() => {
|
|
1053
1052
|
e || (p(""), g(""), v(!1), P.current());
|
|
1054
1053
|
}, [e]);
|
|
1055
1054
|
let F = (e) => {
|
|
1056
1055
|
let t = e.target.checked;
|
|
1057
|
-
v(t), p((e) => t ?
|
|
1056
|
+
v(t), p((e) => t ? Se(e) : Ce(e));
|
|
1058
1057
|
}, I = (e) => {
|
|
1059
1058
|
let t = e.target.value;
|
|
1060
|
-
p(t), v(
|
|
1059
|
+
p(t), v(xe(t));
|
|
1061
1060
|
}, te = () => {
|
|
1062
1061
|
t && M.mutate({
|
|
1063
1062
|
project_id: d,
|
|
@@ -1067,11 +1066,11 @@ var we = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1067
1066
|
});
|
|
1068
1067
|
};
|
|
1069
1068
|
if (!e || !t) return null;
|
|
1070
|
-
let L = T || M.isPending,
|
|
1071
|
-
return /*#__PURE__*/
|
|
1072
|
-
title: /* @__PURE__ */
|
|
1069
|
+
let L = T || M.isPending, ne = f.trim().length > 0 || m.trim().length > 0, re = Z(f), ie = Z(m);
|
|
1070
|
+
return /*#__PURE__*/ U(C, {
|
|
1071
|
+
title: /* @__PURE__ */ U("span", {
|
|
1073
1072
|
className: "flex items-center gap-2",
|
|
1074
|
-
children: [/*#__PURE__*/
|
|
1073
|
+
children: [/*#__PURE__*/ H(G, { id: "EdxcAN" }), /*#__PURE__*/ H("span", {
|
|
1075
1074
|
className: "max-w-[250px] truncate",
|
|
1076
1075
|
title: t.name,
|
|
1077
1076
|
children: t.name
|
|
@@ -1084,49 +1083,49 @@ var we = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1084
1083
|
cancelButtonLabel: l._({ id: "dEgA5A" }),
|
|
1085
1084
|
size: "xl",
|
|
1086
1085
|
disableConfirmButton: L || E,
|
|
1087
|
-
children: [M.isError && /*#__PURE__*/
|
|
1086
|
+
children: [M.isError && /*#__PURE__*/ H("p", {
|
|
1088
1087
|
className: "text-theme-error mb-4",
|
|
1089
1088
|
children: (() => {
|
|
1090
1089
|
let e = M.error.message;
|
|
1091
|
-
return /*#__PURE__*/
|
|
1090
|
+
return /*#__PURE__*/ H(G, {
|
|
1092
1091
|
id: "u2xIeO",
|
|
1093
1092
|
values: { errorMessage: e }
|
|
1094
1093
|
});
|
|
1095
1094
|
})()
|
|
1096
|
-
}), /*#__PURE__*/
|
|
1095
|
+
}), /*#__PURE__*/ U("div", {
|
|
1097
1096
|
className: "max-h-[70vh] overflow-y-auto pr-1 pl-1",
|
|
1098
1097
|
children: [
|
|
1099
|
-
/*#__PURE__*/
|
|
1098
|
+
/*#__PURE__*/ H("div", {
|
|
1100
1099
|
className: "mb-4",
|
|
1101
|
-
children: /*#__PURE__*/
|
|
1100
|
+
children: /*#__PURE__*/ H(n, {
|
|
1102
1101
|
variant: "warning",
|
|
1103
1102
|
className: "mb-4",
|
|
1104
|
-
children: /*#__PURE__*/
|
|
1103
|
+
children: /*#__PURE__*/ H(G, { id: "wH0MtN" })
|
|
1105
1104
|
})
|
|
1106
1105
|
}),
|
|
1107
|
-
T ? /*#__PURE__*/
|
|
1106
|
+
T ? /*#__PURE__*/ U(D, {
|
|
1108
1107
|
direction: "horizontal",
|
|
1109
1108
|
alignment: "center",
|
|
1110
1109
|
gap: "2",
|
|
1111
1110
|
className: "py-6",
|
|
1112
|
-
children: [/*#__PURE__*/
|
|
1113
|
-
}) : E ? /*#__PURE__*/
|
|
1111
|
+
children: [/*#__PURE__*/ H(s, { size: "small" }), /*#__PURE__*/ H(G, { id: "poCbZw" })]
|
|
1112
|
+
}) : E ? /*#__PURE__*/ H("p", {
|
|
1114
1113
|
className: "text-theme-error py-2",
|
|
1115
|
-
children: /*#__PURE__*/
|
|
1114
|
+
children: /*#__PURE__*/ H(G, {
|
|
1116
1115
|
id: "QNHur0",
|
|
1117
1116
|
values: { errorMessage: O?.message ?? "" }
|
|
1118
1117
|
})
|
|
1119
|
-
}) : /*#__PURE__*/
|
|
1118
|
+
}) : /*#__PURE__*/ H(oe, { children: /*#__PURE__*/ U("div", {
|
|
1120
1119
|
className: "flex gap-6",
|
|
1121
|
-
children: [/*#__PURE__*/
|
|
1120
|
+
children: [/*#__PURE__*/ H("div", {
|
|
1122
1121
|
className: "min-w-0 flex-1",
|
|
1123
|
-
children: /*#__PURE__*/
|
|
1122
|
+
children: /*#__PURE__*/ U(D, {
|
|
1124
1123
|
direction: "vertical",
|
|
1125
1124
|
gap: "6",
|
|
1126
1125
|
children: [
|
|
1127
|
-
/*#__PURE__*/
|
|
1128
|
-
/*#__PURE__*/
|
|
1129
|
-
/*#__PURE__*/
|
|
1126
|
+
/*#__PURE__*/ U("div", { children: [
|
|
1127
|
+
/*#__PURE__*/ H(De, { label: l._({ id: "SBGiGm" }) }),
|
|
1128
|
+
/*#__PURE__*/ H(h, {
|
|
1130
1129
|
value: f,
|
|
1131
1130
|
onChange: I,
|
|
1132
1131
|
disabled: L || _,
|
|
@@ -1134,7 +1133,7 @@ var we = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1134
1133
|
className: "text-sm",
|
|
1135
1134
|
rows: 3
|
|
1136
1135
|
}),
|
|
1137
|
-
/*#__PURE__*/
|
|
1136
|
+
/*#__PURE__*/ H(y, {
|
|
1138
1137
|
label: l._({ id: "23wBCX" }),
|
|
1139
1138
|
checked: _,
|
|
1140
1139
|
onChange: F,
|
|
@@ -1142,7 +1141,7 @@ var we = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1142
1141
|
className: "mt-2"
|
|
1143
1142
|
})
|
|
1144
1143
|
] }),
|
|
1145
|
-
/*#__PURE__*/
|
|
1144
|
+
/*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H(De, { label: l._({ id: "6qzsuS" }) }), /*#__PURE__*/ H(h, {
|
|
1146
1145
|
value: m,
|
|
1147
1146
|
onChange: (e) => {
|
|
1148
1147
|
let t = e.target.value;
|
|
@@ -1153,67 +1152,67 @@ var we = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1153
1152
|
className: "text-sm",
|
|
1154
1153
|
rows: 3
|
|
1155
1154
|
})] }),
|
|
1156
|
-
|
|
1155
|
+
ne && /*#__PURE__*/ H(A, {
|
|
1157
1156
|
label: b ? l._({ id: "we28Pq" }) : l._({ id: "YiMCKk" }),
|
|
1158
1157
|
onClick: () => x((e) => !e),
|
|
1159
1158
|
variant: "subdued",
|
|
1160
1159
|
disabled: L,
|
|
1161
1160
|
className: "self-start"
|
|
1162
1161
|
}),
|
|
1163
|
-
b && (
|
|
1162
|
+
b && (re.length > 0 || ie.length > 0) && /*#__PURE__*/ U(D, {
|
|
1164
1163
|
direction: "vertical",
|
|
1165
1164
|
gap: "4",
|
|
1166
|
-
children: [
|
|
1165
|
+
children: [re.length > 0 && /*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H("p", {
|
|
1167
1166
|
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
1168
|
-
children: /*#__PURE__*/
|
|
1169
|
-
}), /*#__PURE__*/
|
|
1167
|
+
children: /*#__PURE__*/ H(G, { id: "x7SF89" })
|
|
1168
|
+
}), /*#__PURE__*/ H("div", {
|
|
1170
1169
|
className: "border-theme-background-lvl-3 rounded border p-3",
|
|
1171
|
-
children: /*#__PURE__*/
|
|
1170
|
+
children: /*#__PURE__*/ H(a, {
|
|
1172
1171
|
className: "grid-cols-2",
|
|
1173
1172
|
alignTerms: "left",
|
|
1174
|
-
children:
|
|
1173
|
+
children: re.map((e, t) => /*#__PURE__*/ U(se, { children: [/*#__PURE__*/ H(S, {
|
|
1175
1174
|
className: "col-span-1",
|
|
1176
|
-
children: /*#__PURE__*/
|
|
1175
|
+
children: /*#__PURE__*/ H("span", {
|
|
1177
1176
|
className: "block truncate text-xs",
|
|
1178
1177
|
title: e.raw,
|
|
1179
1178
|
children: e.raw
|
|
1180
1179
|
})
|
|
1181
|
-
}), /*#__PURE__*/
|
|
1180
|
+
}), /*#__PURE__*/ U(r, {
|
|
1182
1181
|
className: "col-span-1",
|
|
1183
|
-
children: [/*#__PURE__*/
|
|
1182
|
+
children: [/*#__PURE__*/ H("span", {
|
|
1184
1183
|
className: "block truncate text-sm",
|
|
1185
|
-
title:
|
|
1186
|
-
children:
|
|
1187
|
-
}), /*#__PURE__*/
|
|
1184
|
+
title: we(e),
|
|
1185
|
+
children: we(e)
|
|
1186
|
+
}), /*#__PURE__*/ H("span", {
|
|
1188
1187
|
className: "text-theme-light block text-xs",
|
|
1189
|
-
children: e.requiresToken ? /*#__PURE__*/
|
|
1188
|
+
children: e.requiresToken ? /*#__PURE__*/ H(G, { id: "z+zpLP" }) : /*#__PURE__*/ H(G, { id: "t7ff15" })
|
|
1190
1189
|
})]
|
|
1191
1190
|
})] }, t))
|
|
1192
1191
|
})
|
|
1193
|
-
})] }),
|
|
1192
|
+
})] }), ie.length > 0 && /*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H("p", {
|
|
1194
1193
|
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
1195
|
-
children: /*#__PURE__*/
|
|
1196
|
-
}), /*#__PURE__*/
|
|
1194
|
+
children: /*#__PURE__*/ H(G, { id: "lRRkwQ" })
|
|
1195
|
+
}), /*#__PURE__*/ H("div", {
|
|
1197
1196
|
className: "border-theme-background-lvl-3 rounded border p-3",
|
|
1198
|
-
children: /*#__PURE__*/
|
|
1197
|
+
children: /*#__PURE__*/ H(a, {
|
|
1199
1198
|
className: "grid-cols-2",
|
|
1200
1199
|
alignTerms: "left",
|
|
1201
|
-
children:
|
|
1200
|
+
children: ie.map((e, t) => /*#__PURE__*/ U(se, { children: [/*#__PURE__*/ H(S, {
|
|
1202
1201
|
className: "col-span-1",
|
|
1203
|
-
children: /*#__PURE__*/
|
|
1202
|
+
children: /*#__PURE__*/ H("span", {
|
|
1204
1203
|
className: "block truncate text-xs",
|
|
1205
1204
|
title: e.raw,
|
|
1206
1205
|
children: e.raw
|
|
1207
1206
|
})
|
|
1208
|
-
}), /*#__PURE__*/
|
|
1207
|
+
}), /*#__PURE__*/ U(r, {
|
|
1209
1208
|
className: "col-span-1",
|
|
1210
|
-
children: [/*#__PURE__*/
|
|
1209
|
+
children: [/*#__PURE__*/ H("span", {
|
|
1211
1210
|
className: "block truncate text-sm",
|
|
1212
|
-
title:
|
|
1213
|
-
children:
|
|
1214
|
-
}), /*#__PURE__*/
|
|
1211
|
+
title: we(e),
|
|
1212
|
+
children: we(e)
|
|
1213
|
+
}), /*#__PURE__*/ H("span", {
|
|
1215
1214
|
className: "text-theme-light block text-xs",
|
|
1216
|
-
children: e.requiresToken ? /*#__PURE__*/
|
|
1215
|
+
children: e.requiresToken ? /*#__PURE__*/ H(G, { id: "z+zpLP" }) : /*#__PURE__*/ H(G, { id: "t7ff15" })
|
|
1217
1216
|
})]
|
|
1218
1217
|
})] }, t))
|
|
1219
1218
|
})
|
|
@@ -1221,44 +1220,44 @@ var we = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1221
1220
|
})
|
|
1222
1221
|
]
|
|
1223
1222
|
})
|
|
1224
|
-
}), /*#__PURE__*/
|
|
1223
|
+
}), /*#__PURE__*/ U("div", {
|
|
1225
1224
|
className: "border-theme-background-lvl-3 w-72 shrink-0 border-l pl-6",
|
|
1226
1225
|
children: [
|
|
1227
|
-
/*#__PURE__*/
|
|
1226
|
+
/*#__PURE__*/ H("p", {
|
|
1228
1227
|
className: "text-theme-light mb-3 text-xs",
|
|
1229
|
-
children: /*#__PURE__*/
|
|
1228
|
+
children: /*#__PURE__*/ H(G, { id: "dd2ndz" })
|
|
1230
1229
|
}),
|
|
1231
|
-
/*#__PURE__*/
|
|
1230
|
+
/*#__PURE__*/ U(D, {
|
|
1232
1231
|
direction: "vertical",
|
|
1233
1232
|
gap: "4",
|
|
1234
1233
|
children: [
|
|
1235
|
-
/*#__PURE__*/
|
|
1234
|
+
/*#__PURE__*/ H(Ee, {
|
|
1236
1235
|
code: ".r:*",
|
|
1237
1236
|
description: l._({ id: "VV1fdg" })
|
|
1238
1237
|
}),
|
|
1239
|
-
/*#__PURE__*/
|
|
1238
|
+
/*#__PURE__*/ H(Ee, {
|
|
1240
1239
|
code: ".rlistings",
|
|
1241
1240
|
description: l._({ id: "s/s1lz" })
|
|
1242
1241
|
}),
|
|
1243
|
-
/*#__PURE__*/
|
|
1242
|
+
/*#__PURE__*/ H(Ee, {
|
|
1244
1243
|
code: "PROJECT_ID:USER_ID",
|
|
1245
1244
|
description: l._({ id: "zhM8FP" })
|
|
1246
1245
|
}),
|
|
1247
|
-
/*#__PURE__*/
|
|
1246
|
+
/*#__PURE__*/ H(Ee, {
|
|
1248
1247
|
code: "PROJECT_ID:*",
|
|
1249
1248
|
description: l._({ id: "BCJPTn" })
|
|
1250
1249
|
}),
|
|
1251
|
-
/*#__PURE__*/
|
|
1250
|
+
/*#__PURE__*/ H(Ee, {
|
|
1252
1251
|
code: "*:USER_ID",
|
|
1253
1252
|
description: l._({ id: "/xnbdQ" })
|
|
1254
1253
|
})
|
|
1255
1254
|
]
|
|
1256
1255
|
}),
|
|
1257
|
-
/*#__PURE__*/
|
|
1256
|
+
/*#__PURE__*/ H("p", {
|
|
1258
1257
|
className: "text-theme-light mt-4 text-xs",
|
|
1259
|
-
children: /*#__PURE__*/
|
|
1258
|
+
children: /*#__PURE__*/ H(G, {
|
|
1260
1259
|
id: "rrjuul",
|
|
1261
|
-
components: { 0: /*#__PURE__*/
|
|
1260
|
+
components: { 0: /*#__PURE__*/ H("a", {
|
|
1262
1261
|
href: "https://docs.openstack.org/swift/latest/overview_acl.html",
|
|
1263
1262
|
target: "_blank",
|
|
1264
1263
|
rel: "noopener noreferrer",
|
|
@@ -1269,120 +1268,115 @@ var we = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1269
1268
|
]
|
|
1270
1269
|
})]
|
|
1271
1270
|
}) }),
|
|
1272
|
-
!T && !E && /*#__PURE__*/
|
|
1271
|
+
!T && !E && /*#__PURE__*/ H("p", {
|
|
1273
1272
|
className: "text-theme-light mt-4 text-xs",
|
|
1274
|
-
children: /*#__PURE__*/
|
|
1273
|
+
children: /*#__PURE__*/ H(G, { id: "j9lCXl" })
|
|
1275
1274
|
})
|
|
1276
1275
|
]
|
|
1277
1276
|
})]
|
|
1278
1277
|
});
|
|
1279
1278
|
};
|
|
1280
|
-
function
|
|
1281
|
-
return /*#__PURE__*/
|
|
1279
|
+
function Ee({ code: e, description: t }) {
|
|
1280
|
+
return /*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H(k, {
|
|
1282
1281
|
variant: "info",
|
|
1283
1282
|
className: "mb-1 text-xs",
|
|
1284
1283
|
children: e
|
|
1285
|
-
}), /*#__PURE__*/
|
|
1284
|
+
}), /*#__PURE__*/ H("p", {
|
|
1286
1285
|
className: "text-theme-light text-xs leading-relaxed",
|
|
1287
1286
|
children: t
|
|
1288
1287
|
})] });
|
|
1289
1288
|
}
|
|
1290
|
-
function
|
|
1291
|
-
return /*#__PURE__*/
|
|
1289
|
+
function De({ label: e }) {
|
|
1290
|
+
return /*#__PURE__*/ U("div", {
|
|
1292
1291
|
className: "mb-1 flex items-center gap-1",
|
|
1293
|
-
children: [/*#__PURE__*/
|
|
1292
|
+
children: [/*#__PURE__*/ H("label", {
|
|
1294
1293
|
className: "text-theme-default text-sm font-semibold",
|
|
1295
1294
|
children: e
|
|
1296
|
-
}), /*#__PURE__*/
|
|
1295
|
+
}), /*#__PURE__*/ U(x, {
|
|
1297
1296
|
triggerEvent: "hover",
|
|
1298
|
-
children: [/*#__PURE__*/
|
|
1297
|
+
children: [/*#__PURE__*/ H(T, { children: /*#__PURE__*/ H(g, {
|
|
1299
1298
|
icon: "info",
|
|
1300
1299
|
size: "14",
|
|
1301
1300
|
className: "text-theme-light cursor-help"
|
|
1302
|
-
}) }), /*#__PURE__*/
|
|
1301
|
+
}) }), /*#__PURE__*/ H(v, {
|
|
1303
1302
|
className: "z-10 max-w-[350px]",
|
|
1304
|
-
children: /*#__PURE__*/
|
|
1303
|
+
children: /*#__PURE__*/ H(G, { id: "AdtLNV" })
|
|
1305
1304
|
})]
|
|
1306
1305
|
})]
|
|
1307
1306
|
});
|
|
1308
1307
|
}
|
|
1309
1308
|
//#endregion
|
|
1310
1309
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ContainerTableView.tsx
|
|
1311
|
-
var
|
|
1312
|
-
let { projectId: T, provider: E, storageType: D } =
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
}, [e.length]);
|
|
1316
|
-
let
|
|
1310
|
+
var Oe = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContainerNameLength: a, onCreateSuccess: s, onCreateError: c, onEmptySuccess: l, onEmptyError: f, onDeleteSuccess: m, onDeleteError: h, onPropertiesSuccess: g, onPropertiesError: _, onAclSuccess: v, onAclError: b, selectedContainers: x, setSelectedContainers: S, hasAnyBulkAction: C = !0 }) => {
|
|
1311
|
+
let { projectId: T, provider: E, storageType: D } = pe({ from: "/_auth/projects/$projectId/storage/$provider/$storageType/" }), { i18n: O, _: k } = K(), A = fe(), [j, M] = W(0), [N, P] = W(null), [ee, te] = W(null), [L, ne] = W(null), [re, ie] = W(null), { ref: R, elementRef: z, height: ae, virtualItems: B, totalSize: V, measureElement: se } = I({ count: e.length });
|
|
1312
|
+
ue(() => {
|
|
1313
|
+
z.current && M(z.current.offsetWidth - z.current.clientWidth);
|
|
1314
|
+
}, [e.length, ae]);
|
|
1315
|
+
let ce = (e) => {
|
|
1317
1316
|
try {
|
|
1318
1317
|
return new Date(e).toLocaleString();
|
|
1319
1318
|
} catch {
|
|
1320
1319
|
return O._({ id: "fj5byd" });
|
|
1321
1320
|
}
|
|
1322
|
-
},
|
|
1323
|
-
count: e.length,
|
|
1324
|
-
getScrollElement: () => j.current,
|
|
1325
|
-
estimateSize: () => 48,
|
|
1326
|
-
overscan: 10
|
|
1327
|
-
}), ie = (e) => {
|
|
1321
|
+
}, le = (e) => {
|
|
1328
1322
|
x.includes(e) ? S(x.filter((t) => t !== e)) : S([...x, e]);
|
|
1329
1323
|
};
|
|
1330
|
-
if (!e || e.length === 0) return /*#__PURE__*/
|
|
1324
|
+
if (!e || e.length === 0) return /*#__PURE__*/ U(oe, { children: [/*#__PURE__*/ H(u, {
|
|
1331
1325
|
columns: 4,
|
|
1332
1326
|
className: "containers",
|
|
1333
1327
|
"data-testid": "no-containers",
|
|
1334
|
-
children: /*#__PURE__*/
|
|
1328
|
+
children: /*#__PURE__*/ H(i, { children: /*#__PURE__*/ H(o, {
|
|
1335
1329
|
colSpan: 4,
|
|
1336
|
-
children: /*#__PURE__*/
|
|
1330
|
+
children: /*#__PURE__*/ U("div", {
|
|
1337
1331
|
className: "py-8 text-center",
|
|
1338
|
-
children: [/*#__PURE__*/
|
|
1332
|
+
children: [/*#__PURE__*/ H("h3", {
|
|
1339
1333
|
className: "text-lg font-semibold",
|
|
1340
|
-
children: /*#__PURE__*/
|
|
1341
|
-
}), /*#__PURE__*/
|
|
1334
|
+
children: /*#__PURE__*/ H(G, { id: "Hiw1Ha" })
|
|
1335
|
+
}), /*#__PURE__*/ H("p", {
|
|
1342
1336
|
className: "text-theme-light mt-2",
|
|
1343
|
-
children: /*#__PURE__*/
|
|
1337
|
+
children: /*#__PURE__*/ H(G, { id: "x1bK0h" })
|
|
1344
1338
|
})]
|
|
1345
1339
|
})
|
|
1346
1340
|
}) })
|
|
1347
|
-
}), /*#__PURE__*/
|
|
1341
|
+
}), /*#__PURE__*/ H(J, {
|
|
1348
1342
|
isOpen: n,
|
|
1349
1343
|
onClose: () => r(!1),
|
|
1350
1344
|
onSuccess: s,
|
|
1351
1345
|
onError: c,
|
|
1352
1346
|
maxContainerNameLength: a
|
|
1353
1347
|
})] });
|
|
1354
|
-
let
|
|
1355
|
-
return /*#__PURE__*/
|
|
1356
|
-
/*#__PURE__*/
|
|
1348
|
+
let de = C ? 6 : 5, me = C ? "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";
|
|
1349
|
+
return /*#__PURE__*/ U(oe, { children: [
|
|
1350
|
+
/*#__PURE__*/ U("div", {
|
|
1357
1351
|
className: "relative",
|
|
1358
|
-
children: [/*#__PURE__*/
|
|
1359
|
-
style: { paddingRight: `${
|
|
1360
|
-
children: /*#__PURE__*/
|
|
1361
|
-
columns:
|
|
1362
|
-
gridColumnTemplate:
|
|
1352
|
+
children: [/*#__PURE__*/ H("div", {
|
|
1353
|
+
style: { paddingRight: `${j}px` },
|
|
1354
|
+
children: /*#__PURE__*/ H(u, {
|
|
1355
|
+
columns: de,
|
|
1356
|
+
gridColumnTemplate: me,
|
|
1363
1357
|
className: "containers",
|
|
1364
1358
|
"data-testid": "containers-table-header",
|
|
1365
|
-
children: /*#__PURE__*/
|
|
1366
|
-
C && /*#__PURE__*/
|
|
1367
|
-
/*#__PURE__*/
|
|
1368
|
-
/*#__PURE__*/
|
|
1369
|
-
/*#__PURE__*/
|
|
1370
|
-
/*#__PURE__*/
|
|
1371
|
-
/*#__PURE__*/
|
|
1359
|
+
children: /*#__PURE__*/ U(i, { children: [
|
|
1360
|
+
C && /*#__PURE__*/ H(d, {}),
|
|
1361
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "t0X9+8" }) }),
|
|
1362
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "sxbP3b" }) }),
|
|
1363
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "sjMCOP" }) }),
|
|
1364
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "hgpMHD" }) }),
|
|
1365
|
+
/*#__PURE__*/ H(d, { style: { marginRight: `-${j}px` } })
|
|
1372
1366
|
] })
|
|
1373
1367
|
})
|
|
1374
|
-
}), /*#__PURE__*/
|
|
1375
|
-
ref:
|
|
1368
|
+
}), /*#__PURE__*/ H("div", {
|
|
1369
|
+
ref: R,
|
|
1376
1370
|
className: "overflow-auto",
|
|
1377
|
-
style: { height:
|
|
1371
|
+
style: { height: `${ae ?? 0}px` },
|
|
1378
1372
|
"data-testid": "containers-table-body",
|
|
1379
|
-
children: /*#__PURE__*/
|
|
1373
|
+
children: /*#__PURE__*/ H("div", {
|
|
1380
1374
|
style: {
|
|
1381
|
-
height: `${
|
|
1375
|
+
height: `${V}px`,
|
|
1382
1376
|
width: "100%",
|
|
1383
1377
|
position: "relative"
|
|
1384
1378
|
},
|
|
1385
|
-
children: B.
|
|
1379
|
+
children: B.map((n) => {
|
|
1386
1380
|
let r = e[n.index], i = x.includes(r.name), a = () => A({
|
|
1387
1381
|
to: "/projects/$projectId/storage/$provider/$storageType/$containerName/objects",
|
|
1388
1382
|
params: {
|
|
@@ -1392,9 +1386,9 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1392
1386
|
containerName: r.name
|
|
1393
1387
|
}
|
|
1394
1388
|
});
|
|
1395
|
-
return /*#__PURE__*/
|
|
1389
|
+
return /*#__PURE__*/ U("div", {
|
|
1396
1390
|
"data-index": n.index,
|
|
1397
|
-
ref:
|
|
1391
|
+
ref: se,
|
|
1398
1392
|
className: "juno-datagrid group hover:bg-theme-background-lvl-1 cursor-pointer",
|
|
1399
1393
|
style: {
|
|
1400
1394
|
position: "absolute",
|
|
@@ -1403,7 +1397,7 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1403
1397
|
width: "100%",
|
|
1404
1398
|
transform: `translateY(${n.start}px)`,
|
|
1405
1399
|
display: "grid",
|
|
1406
|
-
gridTemplateColumns:
|
|
1400
|
+
gridTemplateColumns: me,
|
|
1407
1401
|
alignItems: "stretch"
|
|
1408
1402
|
},
|
|
1409
1403
|
"data-testid": `container-row-${r.name}`,
|
|
@@ -1414,47 +1408,47 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1414
1408
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
1415
1409
|
},
|
|
1416
1410
|
children: [
|
|
1417
|
-
C && /*#__PURE__*/
|
|
1411
|
+
C && /*#__PURE__*/ H(o, {
|
|
1418
1412
|
onClick: (e) => e.stopPropagation(),
|
|
1419
1413
|
onKeyDown: (e) => {
|
|
1420
1414
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
1421
1415
|
},
|
|
1422
|
-
children: /*#__PURE__*/
|
|
1416
|
+
children: /*#__PURE__*/ H(y, {
|
|
1423
1417
|
checked: i,
|
|
1424
|
-
onChange: () =>
|
|
1418
|
+
onChange: () => le(r.name),
|
|
1425
1419
|
"data-testid": `select-container-${r.name}`
|
|
1426
1420
|
})
|
|
1427
1421
|
}),
|
|
1428
|
-
/*#__PURE__*/
|
|
1422
|
+
/*#__PURE__*/ H(o, {
|
|
1429
1423
|
className: "min-w-0 overflow-hidden",
|
|
1430
|
-
children: /*#__PURE__*/
|
|
1424
|
+
children: /*#__PURE__*/ H("span", {
|
|
1431
1425
|
className: "block truncate",
|
|
1432
1426
|
title: r.name,
|
|
1433
1427
|
children: r.name
|
|
1434
1428
|
})
|
|
1435
1429
|
}),
|
|
1436
|
-
/*#__PURE__*/
|
|
1437
|
-
/*#__PURE__*/
|
|
1438
|
-
/*#__PURE__*/
|
|
1439
|
-
/*#__PURE__*/
|
|
1430
|
+
/*#__PURE__*/ H(o, { children: r.count.toLocaleString() }),
|
|
1431
|
+
/*#__PURE__*/ H(o, { children: r.last_modified ? ce(r.last_modified) : O._({ id: "fj5byd" }) }),
|
|
1432
|
+
/*#__PURE__*/ H(o, { children: F(r.bytes) }),
|
|
1433
|
+
/*#__PURE__*/ H(o, {
|
|
1440
1434
|
onClick: (e) => e.stopPropagation(),
|
|
1441
|
-
children: /*#__PURE__*/
|
|
1442
|
-
/*#__PURE__*/
|
|
1435
|
+
children: /*#__PURE__*/ H(w, { children: /*#__PURE__*/ U(t, { children: [
|
|
1436
|
+
/*#__PURE__*/ H(p, {
|
|
1443
1437
|
label: O._({ id: "cWbW6w" }),
|
|
1444
|
-
onClick: () =>
|
|
1438
|
+
onClick: () => ie(r),
|
|
1445
1439
|
"data-testid": `access-control-action-${r.name}`
|
|
1446
1440
|
}),
|
|
1447
|
-
/*#__PURE__*/
|
|
1441
|
+
/*#__PURE__*/ H(p, {
|
|
1448
1442
|
label: O._({ id: "Oc8Aqv" }),
|
|
1449
|
-
onClick: () =>
|
|
1443
|
+
onClick: () => ne(r),
|
|
1450
1444
|
"data-testid": `properties-action-${r.name}`
|
|
1451
1445
|
}),
|
|
1452
|
-
/*#__PURE__*/
|
|
1446
|
+
/*#__PURE__*/ H(p, {
|
|
1453
1447
|
label: O._({ id: "N2S1rs" }),
|
|
1454
|
-
onClick: () =>
|
|
1448
|
+
onClick: () => P(r),
|
|
1455
1449
|
"data-testid": `empty-action-${r.name}`
|
|
1456
1450
|
}),
|
|
1457
|
-
/*#__PURE__*/
|
|
1451
|
+
/*#__PURE__*/ H(p, {
|
|
1458
1452
|
label: O._({ id: "cnGeoo" }),
|
|
1459
1453
|
onClick: () => te(r),
|
|
1460
1454
|
"data-testid": `delete-action-${r.name}`
|
|
@@ -1467,181 +1461,181 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1467
1461
|
})
|
|
1468
1462
|
})]
|
|
1469
1463
|
}),
|
|
1470
|
-
/*#__PURE__*/
|
|
1464
|
+
/*#__PURE__*/ H(J, {
|
|
1471
1465
|
isOpen: n,
|
|
1472
1466
|
onClose: () => r(!1),
|
|
1473
1467
|
onSuccess: s,
|
|
1474
1468
|
onError: c,
|
|
1475
1469
|
maxContainerNameLength: a
|
|
1476
1470
|
}),
|
|
1477
|
-
/*#__PURE__*/
|
|
1478
|
-
isOpen:
|
|
1479
|
-
container:
|
|
1480
|
-
onClose: () =>
|
|
1471
|
+
/*#__PURE__*/ H(he, {
|
|
1472
|
+
isOpen: N !== null,
|
|
1473
|
+
container: N,
|
|
1474
|
+
onClose: () => P(null),
|
|
1481
1475
|
onSuccess: l,
|
|
1482
1476
|
onError: f
|
|
1483
1477
|
}),
|
|
1484
|
-
/*#__PURE__*/
|
|
1485
|
-
isOpen:
|
|
1486
|
-
container:
|
|
1478
|
+
/*#__PURE__*/ H(ge, {
|
|
1479
|
+
isOpen: ee !== null,
|
|
1480
|
+
container: ee,
|
|
1487
1481
|
onClose: () => te(null),
|
|
1488
1482
|
onSuccess: m,
|
|
1489
1483
|
onError: h
|
|
1490
1484
|
}),
|
|
1491
|
-
/*#__PURE__*/
|
|
1485
|
+
/*#__PURE__*/ H(Y, {
|
|
1492
1486
|
isOpen: L !== null,
|
|
1493
1487
|
container: L,
|
|
1494
|
-
onClose: () =>
|
|
1488
|
+
onClose: () => ne(null),
|
|
1495
1489
|
onSuccess: g,
|
|
1496
1490
|
onError: _
|
|
1497
1491
|
}),
|
|
1498
|
-
/*#__PURE__*/
|
|
1499
|
-
isOpen:
|
|
1500
|
-
container:
|
|
1501
|
-
onClose: () =>
|
|
1492
|
+
/*#__PURE__*/ H(Te, {
|
|
1493
|
+
isOpen: re !== null,
|
|
1494
|
+
container: re,
|
|
1495
|
+
onClose: () => ie(null),
|
|
1502
1496
|
onSuccess: v,
|
|
1503
1497
|
onError: b
|
|
1504
1498
|
})
|
|
1505
1499
|
] });
|
|
1506
|
-
},
|
|
1507
|
-
message: /*#__PURE__*/
|
|
1508
|
-
description: /*#__PURE__*/
|
|
1500
|
+
}, ke = (e) => ({
|
|
1501
|
+
message: /*#__PURE__*/ H(G, { id: "6w+VnM" }),
|
|
1502
|
+
description: /*#__PURE__*/ H(G, {
|
|
1509
1503
|
id: "XwxJJB",
|
|
1510
1504
|
values: { containerName: e }
|
|
1511
1505
|
})
|
|
1512
|
-
}),
|
|
1513
|
-
message: /*#__PURE__*/
|
|
1514
|
-
description: /*#__PURE__*/
|
|
1506
|
+
}), Ae = (e, t) => ({
|
|
1507
|
+
message: /*#__PURE__*/ H(G, { id: "Vj8XFg" }),
|
|
1508
|
+
description: /*#__PURE__*/ H(G, {
|
|
1515
1509
|
id: "Vz+7ZA",
|
|
1516
1510
|
values: {
|
|
1517
1511
|
containerName: e,
|
|
1518
1512
|
errorMessage: t
|
|
1519
1513
|
}
|
|
1520
1514
|
})
|
|
1521
|
-
}),
|
|
1522
|
-
message: /*#__PURE__*/
|
|
1523
|
-
description: t === 0 ? /*#__PURE__*/
|
|
1515
|
+
}), je = (e, t) => ({
|
|
1516
|
+
message: /*#__PURE__*/ H(G, { id: "6OopEX" }),
|
|
1517
|
+
description: t === 0 ? /*#__PURE__*/ H(G, {
|
|
1524
1518
|
id: "nkpZyk",
|
|
1525
1519
|
values: { containerName: e }
|
|
1526
|
-
}) : t === 1 ? /*#__PURE__*/
|
|
1520
|
+
}) : t === 1 ? /*#__PURE__*/ H(G, {
|
|
1527
1521
|
id: "TZJiVf",
|
|
1528
1522
|
values: {
|
|
1529
1523
|
containerName: e,
|
|
1530
1524
|
deletedCount: t
|
|
1531
1525
|
}
|
|
1532
|
-
}) : /*#__PURE__*/
|
|
1526
|
+
}) : /*#__PURE__*/ H(G, {
|
|
1533
1527
|
id: "Sb/VT5",
|
|
1534
1528
|
values: {
|
|
1535
1529
|
containerName: e,
|
|
1536
1530
|
deletedCount: t
|
|
1537
1531
|
}
|
|
1538
1532
|
})
|
|
1539
|
-
}),
|
|
1540
|
-
message: /*#__PURE__*/
|
|
1541
|
-
description: /*#__PURE__*/
|
|
1533
|
+
}), Me = (e, t) => ({
|
|
1534
|
+
message: /*#__PURE__*/ H(G, { id: "S8/j2h" }),
|
|
1535
|
+
description: /*#__PURE__*/ H(G, {
|
|
1542
1536
|
id: "1rLu3+",
|
|
1543
1537
|
values: {
|
|
1544
1538
|
containerName: e,
|
|
1545
1539
|
errorMessage: t
|
|
1546
1540
|
}
|
|
1547
1541
|
})
|
|
1548
|
-
}),
|
|
1549
|
-
message: /*#__PURE__*/
|
|
1550
|
-
description: /*#__PURE__*/
|
|
1542
|
+
}), Ne = (e) => ({
|
|
1543
|
+
message: /*#__PURE__*/ H(G, { id: "odVI9Y" }),
|
|
1544
|
+
description: /*#__PURE__*/ H(G, {
|
|
1551
1545
|
id: "V1TzeS",
|
|
1552
1546
|
values: { containerName: e }
|
|
1553
1547
|
})
|
|
1554
|
-
}),
|
|
1555
|
-
message: /*#__PURE__*/
|
|
1556
|
-
description: /*#__PURE__*/
|
|
1548
|
+
}), Pe = (e, t) => ({
|
|
1549
|
+
message: /*#__PURE__*/ H(G, { id: "BJt+PJ" }),
|
|
1550
|
+
description: /*#__PURE__*/ H(G, {
|
|
1557
1551
|
id: "RGrgxg",
|
|
1558
1552
|
values: {
|
|
1559
1553
|
containerName: e,
|
|
1560
1554
|
errorMessage: t
|
|
1561
1555
|
}
|
|
1562
1556
|
})
|
|
1563
|
-
}),
|
|
1564
|
-
message: /*#__PURE__*/
|
|
1565
|
-
description: /*#__PURE__*/
|
|
1557
|
+
}), Fe = (e) => ({
|
|
1558
|
+
message: /*#__PURE__*/ H(G, { id: "a7C4YS" }),
|
|
1559
|
+
description: /*#__PURE__*/ H(G, {
|
|
1566
1560
|
id: "/NeNjH",
|
|
1567
1561
|
values: { containerName: e }
|
|
1568
1562
|
})
|
|
1569
|
-
}),
|
|
1570
|
-
message: /*#__PURE__*/
|
|
1571
|
-
description: /*#__PURE__*/
|
|
1563
|
+
}), Ie = (e, t) => ({
|
|
1564
|
+
message: /*#__PURE__*/ H(G, { id: "5MF8U2" }),
|
|
1565
|
+
description: /*#__PURE__*/ H(G, {
|
|
1572
1566
|
id: "uLtFAr",
|
|
1573
1567
|
values: {
|
|
1574
1568
|
containerName: e,
|
|
1575
1569
|
errorMessage: t
|
|
1576
1570
|
}
|
|
1577
1571
|
})
|
|
1578
|
-
}),
|
|
1579
|
-
message: /*#__PURE__*/
|
|
1580
|
-
description: /*#__PURE__*/
|
|
1572
|
+
}), Le = (e) => ({
|
|
1573
|
+
message: /*#__PURE__*/ H(G, { id: "olfSYj" }),
|
|
1574
|
+
description: /*#__PURE__*/ H(G, {
|
|
1581
1575
|
id: "tM5SEI",
|
|
1582
1576
|
values: { containerName: e }
|
|
1583
1577
|
})
|
|
1584
|
-
}),
|
|
1585
|
-
message: /*#__PURE__*/
|
|
1586
|
-
description: /*#__PURE__*/
|
|
1578
|
+
}), Re = (e, t) => ({
|
|
1579
|
+
message: /*#__PURE__*/ H(G, { id: "p7DzCB" }),
|
|
1580
|
+
description: /*#__PURE__*/ H(G, {
|
|
1587
1581
|
id: "DcMIiu",
|
|
1588
1582
|
values: {
|
|
1589
1583
|
containerName: e,
|
|
1590
1584
|
errorMessage: t
|
|
1591
1585
|
}
|
|
1592
1586
|
})
|
|
1593
|
-
}),
|
|
1587
|
+
}), ze = (e, t, n) => {
|
|
1594
1588
|
let r = n.length > 0, i = e > 0, a = r && i;
|
|
1595
1589
|
return {
|
|
1596
1590
|
severity: a ? "warning" : r ? "error" : "success",
|
|
1597
|
-
message: a ? /*#__PURE__*/
|
|
1598
|
-
description: /*#__PURE__*/
|
|
1591
|
+
message: a ? /*#__PURE__*/ H(G, { id: "q44uUq" }) : r ? /*#__PURE__*/ H(G, { id: "wFaT8w" }) : /*#__PURE__*/ H(G, { id: "0WsqO0" }),
|
|
1592
|
+
description: /*#__PURE__*/ U(D, {
|
|
1599
1593
|
direction: "vertical",
|
|
1600
1594
|
gap: "1",
|
|
1601
|
-
children: [i && /*#__PURE__*/
|
|
1595
|
+
children: [i && /*#__PURE__*/ H("span", { children: /*#__PURE__*/ H(G, {
|
|
1602
1596
|
id: "1NS3nd",
|
|
1603
1597
|
values: {
|
|
1604
1598
|
emptiedCount: e,
|
|
1605
1599
|
totalDeleted: t
|
|
1606
1600
|
}
|
|
1607
|
-
}) }), r && /*#__PURE__*/
|
|
1601
|
+
}) }), r && /*#__PURE__*/ H("span", {
|
|
1608
1602
|
className: "whitespace-pre-line",
|
|
1609
|
-
children: /*#__PURE__*/
|
|
1603
|
+
children: /*#__PURE__*/ H(G, {
|
|
1610
1604
|
id: "JrmKyf",
|
|
1611
1605
|
values: { errorDetails: n.join("\n") }
|
|
1612
1606
|
})
|
|
1613
1607
|
})]
|
|
1614
1608
|
})
|
|
1615
1609
|
};
|
|
1616
|
-
},
|
|
1610
|
+
}, Q = ({ label: e, value: t }) => t == null ? null : /*#__PURE__*/ U("span", {
|
|
1617
1611
|
className: "flex items-start gap-1.5",
|
|
1618
|
-
children: [/*#__PURE__*/
|
|
1612
|
+
children: [/*#__PURE__*/ H(g, {
|
|
1619
1613
|
icon: "check",
|
|
1620
1614
|
size: "16px",
|
|
1621
1615
|
className: "text-theme-success mt-0.5 shrink-0"
|
|
1622
|
-
}), /*#__PURE__*/
|
|
1623
|
-
/*#__PURE__*/
|
|
1616
|
+
}), /*#__PURE__*/ U("span", { children: [
|
|
1617
|
+
/*#__PURE__*/ U("span", {
|
|
1624
1618
|
className: "font-medium",
|
|
1625
1619
|
children: [e, ":"]
|
|
1626
1620
|
}),
|
|
1627
1621
|
" ",
|
|
1628
1622
|
t
|
|
1629
1623
|
] })]
|
|
1630
|
-
}),
|
|
1624
|
+
}), Be = ({ label: e }) => /*#__PURE__*/ U("span", {
|
|
1631
1625
|
className: "flex items-start gap-1.5",
|
|
1632
|
-
children: [/*#__PURE__*/
|
|
1626
|
+
children: [/*#__PURE__*/ H(g, {
|
|
1633
1627
|
icon: "check",
|
|
1634
1628
|
size: "16px",
|
|
1635
1629
|
className: "text-theme-success mt-0.5 shrink-0"
|
|
1636
|
-
}), /*#__PURE__*/
|
|
1637
|
-
}),
|
|
1630
|
+
}), /*#__PURE__*/ H("span", { children: e })]
|
|
1631
|
+
}), Ve = ({ title: e, children: t }) => /*#__PURE__*/ U("span", {
|
|
1638
1632
|
className: "flex flex-col gap-1.5",
|
|
1639
|
-
children: [/*#__PURE__*/
|
|
1633
|
+
children: [/*#__PURE__*/ H("span", {
|
|
1640
1634
|
className: "text-theme-default block font-semibold",
|
|
1641
1635
|
children: e
|
|
1642
1636
|
}), t]
|
|
1643
|
-
}),
|
|
1644
|
-
let { i18n: r, _: i } =
|
|
1637
|
+
}), He = ({ serviceInfo: e, accountInfo: t, open: n }) => {
|
|
1638
|
+
let { i18n: r, _: i } = K(), a = e?.swift, o = {
|
|
1645
1639
|
account_quotas: r._({ id: "DJT9tB" }),
|
|
1646
1640
|
container_quotas: r._({ id: "USiuNX" }),
|
|
1647
1641
|
bulk_delete: r._({ id: "F6YIQe" }),
|
|
@@ -1652,110 +1646,110 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1652
1646
|
symlink: r._({ id: "Q2xmVl" }),
|
|
1653
1647
|
versioned_writes: r._({ id: "8jLXs3" })
|
|
1654
1648
|
}, s = Object.entries(o).filter(([e]) => a?.[e]).map(([, e]) => e);
|
|
1655
|
-
return /*#__PURE__*/
|
|
1649
|
+
return /*#__PURE__*/ U(x, {
|
|
1656
1650
|
triggerEvent: "hover",
|
|
1657
1651
|
placement: "bottom-end",
|
|
1658
1652
|
open: n,
|
|
1659
|
-
children: [/*#__PURE__*/
|
|
1653
|
+
children: [/*#__PURE__*/ H(T, {
|
|
1660
1654
|
asChild: !0,
|
|
1661
|
-
children: /*#__PURE__*/
|
|
1655
|
+
children: /*#__PURE__*/ H(g, {
|
|
1662
1656
|
icon: "info",
|
|
1663
1657
|
size: "20px",
|
|
1664
1658
|
className: "text-theme-light hover:text-theme-default cursor-pointer"
|
|
1665
1659
|
})
|
|
1666
|
-
}), /*#__PURE__*/
|
|
1660
|
+
}), /*#__PURE__*/ H(v, {
|
|
1667
1661
|
className: "z-10 w-72 text-sm",
|
|
1668
|
-
children: /*#__PURE__*/
|
|
1662
|
+
children: /*#__PURE__*/ U("span", {
|
|
1669
1663
|
className: "flex flex-col gap-3 p-1",
|
|
1670
1664
|
children: [
|
|
1671
|
-
t && /*#__PURE__*/
|
|
1672
|
-
title: /*#__PURE__*/
|
|
1665
|
+
t && /*#__PURE__*/ U(Ve, {
|
|
1666
|
+
title: /*#__PURE__*/ H(G, { id: "AeXO77" }),
|
|
1673
1667
|
children: [
|
|
1674
|
-
/*#__PURE__*/
|
|
1668
|
+
/*#__PURE__*/ H(Q, {
|
|
1675
1669
|
label: r._({ id: "ClGcRq" }),
|
|
1676
1670
|
value: t.containerCount.toLocaleString()
|
|
1677
1671
|
}),
|
|
1678
|
-
/*#__PURE__*/
|
|
1672
|
+
/*#__PURE__*/ H(Q, {
|
|
1679
1673
|
label: r._({ id: "B3toQF" }),
|
|
1680
1674
|
value: t.objectCount.toLocaleString()
|
|
1681
1675
|
}),
|
|
1682
|
-
/*#__PURE__*/
|
|
1676
|
+
/*#__PURE__*/ H(Q, {
|
|
1683
1677
|
label: r._({ id: "aL1w5Z" }),
|
|
1684
1678
|
value: F(t.bytesUsed)
|
|
1685
1679
|
}),
|
|
1686
|
-
t.quotaBytes !== void 0 && /*#__PURE__*/
|
|
1680
|
+
t.quotaBytes !== void 0 && /*#__PURE__*/ H(Q, {
|
|
1687
1681
|
label: r._({ id: "vEkTR9" }),
|
|
1688
1682
|
value: F(t.quotaBytes)
|
|
1689
1683
|
})
|
|
1690
1684
|
]
|
|
1691
1685
|
}),
|
|
1692
|
-
a && /*#__PURE__*/
|
|
1693
|
-
title: /*#__PURE__*/
|
|
1686
|
+
a && /*#__PURE__*/ U(Ve, {
|
|
1687
|
+
title: /*#__PURE__*/ H(G, { id: "6BDqha" }),
|
|
1694
1688
|
children: [
|
|
1695
|
-
/*#__PURE__*/
|
|
1689
|
+
/*#__PURE__*/ H(Q, {
|
|
1696
1690
|
label: r._({ id: "wTg+FY" }),
|
|
1697
1691
|
value: a.max_file_size === void 0 ? void 0 : F(a.max_file_size)
|
|
1698
1692
|
}),
|
|
1699
|
-
/*#__PURE__*/
|
|
1693
|
+
/*#__PURE__*/ H(Q, {
|
|
1700
1694
|
label: r._({ id: "Rih53k" }),
|
|
1701
1695
|
value: a.max_container_name_length
|
|
1702
1696
|
}),
|
|
1703
|
-
/*#__PURE__*/
|
|
1697
|
+
/*#__PURE__*/ H(Q, {
|
|
1704
1698
|
label: r._({ id: "qAkkjP" }),
|
|
1705
1699
|
value: a.max_object_name_length
|
|
1706
1700
|
}),
|
|
1707
|
-
/*#__PURE__*/
|
|
1701
|
+
/*#__PURE__*/ H(Q, {
|
|
1708
1702
|
label: r._({ id: "OZImTR" }),
|
|
1709
1703
|
value: a.container_listing_limit?.toLocaleString()
|
|
1710
1704
|
}),
|
|
1711
|
-
/*#__PURE__*/
|
|
1705
|
+
/*#__PURE__*/ H(Q, {
|
|
1712
1706
|
label: r._({ id: "a4A2uB" }),
|
|
1713
1707
|
value: a.account_listing_limit?.toLocaleString()
|
|
1714
1708
|
}),
|
|
1715
|
-
/*#__PURE__*/
|
|
1709
|
+
/*#__PURE__*/ H(Q, {
|
|
1716
1710
|
label: r._({ id: "zWb/Nn" }),
|
|
1717
1711
|
value: a.max_header_size
|
|
1718
1712
|
}),
|
|
1719
|
-
/*#__PURE__*/
|
|
1713
|
+
/*#__PURE__*/ H(Q, {
|
|
1720
1714
|
label: r._({ id: "RGwfoL" }),
|
|
1721
1715
|
value: a.max_meta_count
|
|
1722
1716
|
}),
|
|
1723
|
-
/*#__PURE__*/
|
|
1717
|
+
/*#__PURE__*/ H(Q, {
|
|
1724
1718
|
label: r._({ id: "8c3/77" }),
|
|
1725
1719
|
value: a.max_meta_name_length
|
|
1726
1720
|
}),
|
|
1727
|
-
/*#__PURE__*/
|
|
1721
|
+
/*#__PURE__*/ H(Q, {
|
|
1728
1722
|
label: r._({ id: "5JDSvn" }),
|
|
1729
1723
|
value: a.max_meta_value_length
|
|
1730
1724
|
}),
|
|
1731
|
-
/*#__PURE__*/
|
|
1725
|
+
/*#__PURE__*/ H(Q, {
|
|
1732
1726
|
label: r._({ id: "ZAx+d1" }),
|
|
1733
1727
|
value: a.max_meta_overall_size
|
|
1734
1728
|
}),
|
|
1735
|
-
a.bulk_delete && /*#__PURE__*/
|
|
1729
|
+
a.bulk_delete && /*#__PURE__*/ H(Q, {
|
|
1736
1730
|
label: r._({ id: "lQ3EIe" }),
|
|
1737
1731
|
value: a.bulk_delete.max_deletes_per_request.toLocaleString()
|
|
1738
1732
|
}),
|
|
1739
|
-
a.bulk_upload && /*#__PURE__*/
|
|
1733
|
+
a.bulk_upload && /*#__PURE__*/ H(Q, {
|
|
1740
1734
|
label: r._({ id: "STc+7E" }),
|
|
1741
1735
|
value: a.bulk_upload.max_containers_per_extraction.toLocaleString()
|
|
1742
1736
|
}),
|
|
1743
|
-
a.slo && /*#__PURE__*/
|
|
1737
|
+
a.slo && /*#__PURE__*/ H(Q, {
|
|
1744
1738
|
label: r._({ id: "RNBvdl" }),
|
|
1745
1739
|
value: a.slo.max_manifest_segments.toLocaleString()
|
|
1746
1740
|
})
|
|
1747
1741
|
]
|
|
1748
1742
|
}),
|
|
1749
|
-
s.length > 0 && /*#__PURE__*/
|
|
1750
|
-
title: /*#__PURE__*/
|
|
1751
|
-
children: s.map((e) => /*#__PURE__*/
|
|
1743
|
+
s.length > 0 && /*#__PURE__*/ H(Ve, {
|
|
1744
|
+
title: /*#__PURE__*/ H(G, { id: "Qx7DM7" }),
|
|
1745
|
+
children: s.map((e) => /*#__PURE__*/ H(Be, { label: e }, e))
|
|
1752
1746
|
})
|
|
1753
1747
|
]
|
|
1754
1748
|
})
|
|
1755
1749
|
})]
|
|
1756
1750
|
});
|
|
1757
|
-
},
|
|
1758
|
-
let { i18n: c, i18n: l, _: u } =
|
|
1751
|
+
}, Ue = 20, We = "empty", $ = ({ isOpen: e, containers: t, onClose: i, onComplete: o }) => {
|
|
1752
|
+
let { i18n: c, i18n: l, _: u } = K(), d = N(), [p, m] = W(null), [h, g] = W(""), _ = h.trim() === We, v = j.useUtils(), y = j.storage.swift.emptyContainer.useMutation(), b = () => {
|
|
1759
1753
|
y.reset(), m(null), g(""), i();
|
|
1760
1754
|
}, x = async () => {
|
|
1761
1755
|
let e = 0, n = 0, r = [], i = t.length;
|
|
@@ -1783,9 +1777,9 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1783
1777
|
}), b();
|
|
1784
1778
|
};
|
|
1785
1779
|
if (!e || t.length === 0) return null;
|
|
1786
|
-
let w = t.length, T = t.slice(0,
|
|
1787
|
-
return /*#__PURE__*/
|
|
1788
|
-
title: /*#__PURE__*/
|
|
1780
|
+
let w = t.length, T = t.slice(0, Ue), E = w - T.length, O = y.isPending || p !== null, k = p?.current, A = p?.total;
|
|
1781
|
+
return /*#__PURE__*/ H(C, {
|
|
1782
|
+
title: /*#__PURE__*/ H(G, {
|
|
1789
1783
|
id: "0efWir",
|
|
1790
1784
|
values: { totalCount: w }
|
|
1791
1785
|
}),
|
|
@@ -1799,15 +1793,15 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1799
1793
|
disableCancelButton: O,
|
|
1800
1794
|
disableCloseButton: O,
|
|
1801
1795
|
size: "small",
|
|
1802
|
-
children: O ? /*#__PURE__*/
|
|
1796
|
+
children: O ? /*#__PURE__*/ U(D, {
|
|
1803
1797
|
direction: "vertical",
|
|
1804
1798
|
distribution: "center",
|
|
1805
1799
|
alignment: "center",
|
|
1806
1800
|
gap: "2",
|
|
1807
1801
|
className: "py-4",
|
|
1808
|
-
children: [/*#__PURE__*/
|
|
1802
|
+
children: [/*#__PURE__*/ H(s, { variant: "primary" }), p && /*#__PURE__*/ H("p", {
|
|
1809
1803
|
className: "text-theme-light text-sm",
|
|
1810
|
-
children: /*#__PURE__*/
|
|
1804
|
+
children: /*#__PURE__*/ H(G, {
|
|
1811
1805
|
id: "7NSdfG",
|
|
1812
1806
|
values: {
|
|
1813
1807
|
progressCurrent: k,
|
|
@@ -1815,49 +1809,49 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1815
1809
|
}
|
|
1816
1810
|
})
|
|
1817
1811
|
})]
|
|
1818
|
-
}) : /*#__PURE__*/
|
|
1812
|
+
}) : /*#__PURE__*/ U("div", {
|
|
1819
1813
|
className: "my-6",
|
|
1820
1814
|
children: [
|
|
1821
|
-
/*#__PURE__*/
|
|
1815
|
+
/*#__PURE__*/ H(n, {
|
|
1822
1816
|
variant: "danger",
|
|
1823
1817
|
className: "mb-6",
|
|
1824
|
-
children: /*#__PURE__*/
|
|
1818
|
+
children: /*#__PURE__*/ H(G, { id: "JuOpPY" })
|
|
1825
1819
|
}),
|
|
1826
|
-
/*#__PURE__*/
|
|
1820
|
+
/*#__PURE__*/ H("p", {
|
|
1827
1821
|
className: "text-theme-default mb-6 text-sm",
|
|
1828
|
-
children: /*#__PURE__*/
|
|
1822
|
+
children: /*#__PURE__*/ H(G, {
|
|
1829
1823
|
id: "XXjbEV",
|
|
1830
1824
|
components: {
|
|
1831
|
-
0: /*#__PURE__*/
|
|
1832
|
-
1: /*#__PURE__*/
|
|
1825
|
+
0: /*#__PURE__*/ H("strong", {}),
|
|
1826
|
+
1: /*#__PURE__*/ H("strong", {})
|
|
1833
1827
|
}
|
|
1834
1828
|
})
|
|
1835
1829
|
}),
|
|
1836
|
-
/*#__PURE__*/
|
|
1830
|
+
/*#__PURE__*/ U("div", {
|
|
1837
1831
|
className: "mb-6",
|
|
1838
|
-
children: [/*#__PURE__*/
|
|
1832
|
+
children: [/*#__PURE__*/ H("h3", {
|
|
1839
1833
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
1840
|
-
children: /*#__PURE__*/
|
|
1834
|
+
children: /*#__PURE__*/ H(G, {
|
|
1841
1835
|
id: "VKmlZ+",
|
|
1842
1836
|
values: { totalCount: w }
|
|
1843
1837
|
})
|
|
1844
|
-
}), /*#__PURE__*/
|
|
1838
|
+
}), /*#__PURE__*/ U("div", {
|
|
1845
1839
|
className: "jn:bg-theme-background-lvl-1 max-h-48 overflow-y-auto rounded p-4",
|
|
1846
|
-
children: [/*#__PURE__*/
|
|
1840
|
+
children: [/*#__PURE__*/ H(a, {
|
|
1847
1841
|
className: "grid-cols-2",
|
|
1848
1842
|
alignTerms: "left",
|
|
1849
1843
|
children: T.map((e) => {
|
|
1850
1844
|
let t = e.count;
|
|
1851
|
-
return /*#__PURE__*/
|
|
1845
|
+
return /*#__PURE__*/ U(se, { children: [/*#__PURE__*/ H(S, {
|
|
1852
1846
|
className: "col-span-1",
|
|
1853
|
-
children: /*#__PURE__*/
|
|
1847
|
+
children: /*#__PURE__*/ H("span", {
|
|
1854
1848
|
className: "block truncate",
|
|
1855
1849
|
title: e.name,
|
|
1856
1850
|
children: e.name
|
|
1857
1851
|
})
|
|
1858
|
-
}), /*#__PURE__*/
|
|
1852
|
+
}), /*#__PURE__*/ H(r, {
|
|
1859
1853
|
className: "col-span-1",
|
|
1860
|
-
children: /*#__PURE__*/
|
|
1854
|
+
children: /*#__PURE__*/ H("span", {
|
|
1861
1855
|
className: "whitespace-nowrap",
|
|
1862
1856
|
children: t == null ? "" : l._(c._({
|
|
1863
1857
|
id: "7Ocn0b",
|
|
@@ -1866,18 +1860,18 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1866
1860
|
})
|
|
1867
1861
|
})] }, e.name);
|
|
1868
1862
|
})
|
|
1869
|
-
}), E > 0 && /*#__PURE__*/
|
|
1863
|
+
}), E > 0 && /*#__PURE__*/ H("p", {
|
|
1870
1864
|
className: "text-theme-light mt-2 text-xs",
|
|
1871
|
-
children: /*#__PURE__*/
|
|
1865
|
+
children: /*#__PURE__*/ H(G, {
|
|
1872
1866
|
id: "yqPflB",
|
|
1873
1867
|
values: { hiddenCount: E }
|
|
1874
1868
|
})
|
|
1875
1869
|
})]
|
|
1876
1870
|
})]
|
|
1877
1871
|
}),
|
|
1878
|
-
/*#__PURE__*/
|
|
1872
|
+
/*#__PURE__*/ H(f, {
|
|
1879
1873
|
label: c._({ id: "Ghp863" }),
|
|
1880
|
-
placeholder:
|
|
1874
|
+
placeholder: We,
|
|
1881
1875
|
value: h,
|
|
1882
1876
|
onChange: (e) => g(e.target.value)
|
|
1883
1877
|
})
|
|
@@ -1885,49 +1879,49 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1885
1879
|
})
|
|
1886
1880
|
});
|
|
1887
1881
|
}, Ge = () => {
|
|
1888
|
-
let { i18n: e, i18n: n, _: r } =
|
|
1889
|
-
|
|
1882
|
+
let { i18n: e, i18n: n, _: r } = K(), i = N(), a = fe({ from: M.fullPath }), { sortBy: o, sortDirection: c, search: u = "" } = M.useSearch(), [d, f] = W(!1), [h, g] = W(!1), [_, v] = W([]), [x, S] = W(u), C = de(void 0);
|
|
1883
|
+
ue(() => () => clearTimeout(C.current), []), ue(() => {
|
|
1890
1884
|
S(u);
|
|
1891
1885
|
}, [u]);
|
|
1892
1886
|
let T = (e) => {
|
|
1893
|
-
let { message: t, ...n } =
|
|
1887
|
+
let { message: t, ...n } = ke(e);
|
|
1894
1888
|
l.success(t, n);
|
|
1895
1889
|
}, O = (e, t) => {
|
|
1896
|
-
let { message: n, ...r } =
|
|
1890
|
+
let { message: n, ...r } = Ae(e, t);
|
|
1897
1891
|
l.error(n, r);
|
|
1898
1892
|
}, k = (e, t) => {
|
|
1899
|
-
let { message: n, ...r } =
|
|
1893
|
+
let { message: n, ...r } = je(e, t);
|
|
1900
1894
|
l.success(n, r);
|
|
1901
1895
|
}, P = (e, t) => {
|
|
1902
|
-
let { message: n, ...r } =
|
|
1896
|
+
let { message: n, ...r } = Me(e, t);
|
|
1903
1897
|
l.error(n, r);
|
|
1904
1898
|
}, I = (e) => {
|
|
1905
|
-
let { message: t, ...n } =
|
|
1899
|
+
let { message: t, ...n } = Ne(e);
|
|
1906
1900
|
l.success(t, n);
|
|
1907
1901
|
}, te = (e, t) => {
|
|
1908
|
-
let { message: n, ...r } =
|
|
1902
|
+
let { message: n, ...r } = Pe(e, t);
|
|
1909
1903
|
l.error(n, r);
|
|
1910
1904
|
}, L = (e) => {
|
|
1911
|
-
let { message: t, ...n } =
|
|
1905
|
+
let { message: t, ...n } = Fe(e);
|
|
1912
1906
|
l.success(t, n);
|
|
1913
|
-
},
|
|
1914
|
-
let { message: n, ...r } =
|
|
1907
|
+
}, ne = (e, t) => {
|
|
1908
|
+
let { message: n, ...r } = Ie(e, t);
|
|
1915
1909
|
l.error(n, r);
|
|
1916
|
-
},
|
|
1917
|
-
let { message: t, ...n } =
|
|
1910
|
+
}, re = (e) => {
|
|
1911
|
+
let { message: t, ...n } = Le(e);
|
|
1918
1912
|
l.success(t, n);
|
|
1919
|
-
},
|
|
1920
|
-
let { message: n, ...r } =
|
|
1913
|
+
}, ie = (e, t) => {
|
|
1914
|
+
let { message: n, ...r } = Re(e, t);
|
|
1921
1915
|
l.error(n, r);
|
|
1922
|
-
},
|
|
1916
|
+
}, R = ({ emptiedCount: e, totalDeleted: t, errors: n }) => {
|
|
1923
1917
|
if (n.length === 0) v([]);
|
|
1924
1918
|
else {
|
|
1925
1919
|
let e = new Set(n.map((e) => e.split(": ")[0]));
|
|
1926
1920
|
v((t) => t.filter((t) => e.has(t)));
|
|
1927
1921
|
}
|
|
1928
|
-
let { message: r, severity: i, ...a } =
|
|
1922
|
+
let { message: r, severity: i, ...a } = ze(e, t, n);
|
|
1929
1923
|
l[i](r, a);
|
|
1930
|
-
},
|
|
1924
|
+
}, z = {
|
|
1931
1925
|
options: [
|
|
1932
1926
|
{
|
|
1933
1927
|
label: e._({ id: "6YtxFj" }),
|
|
@@ -1948,10 +1942,10 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1948
1942
|
],
|
|
1949
1943
|
sortBy: o ?? "name",
|
|
1950
1944
|
sortDirection: c ?? "asc"
|
|
1951
|
-
}, { data:
|
|
1945
|
+
}, { data: ae, isLoading: B, error: V } = j.storage.swift.listContainers.useQuery({
|
|
1952
1946
|
project_id: i,
|
|
1953
1947
|
format: "json"
|
|
1954
|
-
}), { data: se } = j.storage.swift.getAccountMetadata.useQuery({ project_id: i }), { data:
|
|
1948
|
+
}), { data: se } = j.storage.swift.getAccountMetadata.useQuery({ project_id: i }), { data: le } = j.storage.swift.getServiceInfo.useQuery(), pe = (e) => [...e].sort((e, t) => {
|
|
1955
1949
|
let n;
|
|
1956
1950
|
switch (o ?? "name") {
|
|
1957
1951
|
case "name":
|
|
@@ -1970,17 +1964,17 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1970
1964
|
default: n = e.name.localeCompare(t.name);
|
|
1971
1965
|
}
|
|
1972
1966
|
return (c ?? "asc") === "desc" ? -n : n;
|
|
1973
|
-
}),
|
|
1967
|
+
}), me = (ae || []).filter((e) => e.name.toLowerCase().includes(u.toLowerCase())), q = pe(me), J = (e) => {
|
|
1974
1968
|
let t = typeof e == "string" ? e : "";
|
|
1975
|
-
|
|
1969
|
+
ce(() => {
|
|
1976
1970
|
a({ search: (e) => ({
|
|
1977
1971
|
...e,
|
|
1978
1972
|
search: t || void 0
|
|
1979
1973
|
}) });
|
|
1980
1974
|
});
|
|
1981
|
-
},
|
|
1975
|
+
}, he = (e) => {
|
|
1982
1976
|
let t = e.sortBy?.toString() || "name", n = e.sortDirection || "asc";
|
|
1983
|
-
|
|
1977
|
+
ce(() => {
|
|
1984
1978
|
a({ search: (e) => ({
|
|
1985
1979
|
...e,
|
|
1986
1980
|
sortBy: t,
|
|
@@ -1988,146 +1982,146 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1988
1982
|
}) });
|
|
1989
1983
|
});
|
|
1990
1984
|
};
|
|
1991
|
-
if (
|
|
1985
|
+
if (B) return /*#__PURE__*/ U(D, {
|
|
1992
1986
|
className: "absolute inset-0",
|
|
1993
1987
|
distribution: "center",
|
|
1994
1988
|
alignment: "center",
|
|
1995
1989
|
direction: "vertical",
|
|
1996
|
-
children: [/*#__PURE__*/
|
|
1990
|
+
children: [/*#__PURE__*/ H(s, {
|
|
1997
1991
|
variant: "primary",
|
|
1998
1992
|
size: "large",
|
|
1999
1993
|
className: "mb-2"
|
|
2000
|
-
}), /*#__PURE__*/
|
|
1994
|
+
}), /*#__PURE__*/ H(G, { id: "WYiUDa" })]
|
|
2001
1995
|
});
|
|
2002
|
-
if (
|
|
2003
|
-
let e =
|
|
2004
|
-
return /*#__PURE__*/
|
|
1996
|
+
if (V) {
|
|
1997
|
+
let e = V.message;
|
|
1998
|
+
return /*#__PURE__*/ H(D, {
|
|
2005
1999
|
className: "absolute inset-0",
|
|
2006
2000
|
distribution: "center",
|
|
2007
2001
|
alignment: "center",
|
|
2008
2002
|
direction: "vertical",
|
|
2009
|
-
children: /*#__PURE__*/
|
|
2003
|
+
children: /*#__PURE__*/ H(G, {
|
|
2010
2004
|
id: "dLFiER",
|
|
2011
2005
|
values: { errorMessage: e }
|
|
2012
2006
|
})
|
|
2013
2007
|
});
|
|
2014
2008
|
}
|
|
2015
|
-
let
|
|
2016
|
-
return /*#__PURE__*/
|
|
2009
|
+
let ge = se?.bytesUsed || 0, _e = se?.quotaBytes || 0, ve = _e > 0 ? _e - ge : 0, ye = (ae || []).filter((e) => _.includes(e.name)), Y = ye.length > 0, X = ye.length, Z = (ae || []).length, be = me.length, xe = be !== Z, Se = q.map((e) => e.name), Ce = Se.length > 0 && Se.every((e) => _.includes(e)), we = Se.some((e) => _.includes(e));
|
|
2010
|
+
return /*#__PURE__*/ U("div", {
|
|
2017
2011
|
className: "relative",
|
|
2018
2012
|
children: [
|
|
2019
|
-
/*#__PURE__*/
|
|
2013
|
+
/*#__PURE__*/ U(D, {
|
|
2020
2014
|
direction: "vertical",
|
|
2021
2015
|
children: [
|
|
2022
|
-
/*#__PURE__*/
|
|
2016
|
+
/*#__PURE__*/ U(D, {
|
|
2023
2017
|
distribution: "end",
|
|
2024
2018
|
alignment: "center",
|
|
2025
2019
|
gap: "2",
|
|
2026
2020
|
className: "pb-2",
|
|
2027
|
-
children: [/*#__PURE__*/
|
|
2021
|
+
children: [/*#__PURE__*/ H(D, {
|
|
2028
2022
|
gap: "0.5",
|
|
2029
2023
|
alignment: "center",
|
|
2030
|
-
children: /*#__PURE__*/
|
|
2031
|
-
options:
|
|
2032
|
-
sortBy:
|
|
2033
|
-
sortDirection:
|
|
2034
|
-
onSortByChange: (e) =>
|
|
2035
|
-
...
|
|
2024
|
+
children: /*#__PURE__*/ H(ee, {
|
|
2025
|
+
options: z.options,
|
|
2026
|
+
sortBy: z.sortBy,
|
|
2027
|
+
sortDirection: z.sortDirection ?? "asc",
|
|
2028
|
+
onSortByChange: (e) => he({
|
|
2029
|
+
...z,
|
|
2036
2030
|
sortBy: e,
|
|
2037
|
-
sortDirection:
|
|
2031
|
+
sortDirection: z.sortDirection
|
|
2038
2032
|
}),
|
|
2039
|
-
onSortDirectionChange: (e) =>
|
|
2040
|
-
...
|
|
2033
|
+
onSortDirectionChange: (e) => he({
|
|
2034
|
+
...z,
|
|
2041
2035
|
sortDirection: e
|
|
2042
2036
|
})
|
|
2043
2037
|
})
|
|
2044
|
-
}), /*#__PURE__*/
|
|
2038
|
+
}), /*#__PURE__*/ H(A, {
|
|
2045
2039
|
variant: "primary",
|
|
2046
2040
|
className: "whitespace-nowrap",
|
|
2047
2041
|
onClick: () => f(!0),
|
|
2048
|
-
children: /*#__PURE__*/
|
|
2042
|
+
children: /*#__PURE__*/ H(G, { id: "vTh35P" })
|
|
2049
2043
|
})]
|
|
2050
2044
|
}),
|
|
2051
|
-
/*#__PURE__*/
|
|
2045
|
+
/*#__PURE__*/ H(m, { children: /*#__PURE__*/ H(D, {
|
|
2052
2046
|
direction: "vertical",
|
|
2053
2047
|
gap: "2",
|
|
2054
|
-
children: /*#__PURE__*/
|
|
2048
|
+
children: /*#__PURE__*/ H(D, {
|
|
2055
2049
|
distribution: "end",
|
|
2056
2050
|
alignment: "center",
|
|
2057
|
-
children: /*#__PURE__*/
|
|
2051
|
+
children: /*#__PURE__*/ H(b, {
|
|
2058
2052
|
placeholder: e._({ id: "TipzDp" }),
|
|
2059
2053
|
"data-testid": "searchbar",
|
|
2060
2054
|
value: x,
|
|
2061
2055
|
onInput: (e) => {
|
|
2062
2056
|
let t = e.currentTarget.value;
|
|
2063
|
-
S(t), clearTimeout(C.current), C.current = window.setTimeout(() =>
|
|
2057
|
+
S(t), clearTimeout(C.current), C.current = window.setTimeout(() => J(t), 500);
|
|
2064
2058
|
},
|
|
2065
2059
|
onSearch: (e) => {
|
|
2066
|
-
clearTimeout(C.current),
|
|
2060
|
+
clearTimeout(C.current), J(typeof e == "string" ? e : "");
|
|
2067
2061
|
},
|
|
2068
2062
|
onClear: () => {
|
|
2069
|
-
clearTimeout(C.current), S(""),
|
|
2063
|
+
clearTimeout(C.current), S(""), J("");
|
|
2070
2064
|
}
|
|
2071
2065
|
})
|
|
2072
2066
|
})
|
|
2073
2067
|
}) }),
|
|
2074
|
-
/*#__PURE__*/
|
|
2068
|
+
/*#__PURE__*/ H(m, { children: /*#__PURE__*/ U(D, {
|
|
2075
2069
|
distribution: "start",
|
|
2076
2070
|
gap: "2",
|
|
2077
2071
|
alignment: "center",
|
|
2078
2072
|
className: "text-sm",
|
|
2079
|
-
children: [/*#__PURE__*/
|
|
2073
|
+
children: [/*#__PURE__*/ U(D, {
|
|
2080
2074
|
gap: "2",
|
|
2081
2075
|
alignment: "center",
|
|
2082
|
-
children: [/*#__PURE__*/
|
|
2083
|
-
checked:
|
|
2084
|
-
indeterminate:
|
|
2076
|
+
children: [/*#__PURE__*/ H(y, {
|
|
2077
|
+
checked: Ce,
|
|
2078
|
+
indeterminate: we && !Ce,
|
|
2085
2079
|
onChange: () => {
|
|
2086
|
-
v(
|
|
2080
|
+
v(Ce ? (e) => e.filter((e) => !Se.includes(e)) : (e) => [...new Set([...e, ...Se])]);
|
|
2087
2081
|
}
|
|
2088
|
-
}), /*#__PURE__*/
|
|
2082
|
+
}), /*#__PURE__*/ U(w, {
|
|
2089
2083
|
className: "flex items-center",
|
|
2090
|
-
children: [/*#__PURE__*/
|
|
2084
|
+
children: [/*#__PURE__*/ H(E, {
|
|
2091
2085
|
as: "div",
|
|
2092
|
-
children: /*#__PURE__*/
|
|
2093
|
-
disabled: !
|
|
2086
|
+
children: /*#__PURE__*/ H(A, {
|
|
2087
|
+
disabled: !Y,
|
|
2094
2088
|
size: "small",
|
|
2095
2089
|
icon: "moreVert",
|
|
2096
2090
|
label: e._({ id: "7L01XJ" })
|
|
2097
2091
|
})
|
|
2098
|
-
}),
|
|
2099
|
-
disabled: !
|
|
2092
|
+
}), Y && /*#__PURE__*/ H(t, { children: /*#__PURE__*/ H(p, {
|
|
2093
|
+
disabled: !Y,
|
|
2100
2094
|
label: n._(e._({
|
|
2101
2095
|
id: "0Th0CH",
|
|
2102
|
-
values: { selectedCount:
|
|
2096
|
+
values: { selectedCount: X }
|
|
2103
2097
|
})),
|
|
2104
2098
|
onClick: () => g(!0)
|
|
2105
2099
|
}) })]
|
|
2106
2100
|
})]
|
|
2107
|
-
}), /*#__PURE__*/
|
|
2101
|
+
}), /*#__PURE__*/ U("div", {
|
|
2108
2102
|
className: "text-theme-light flex items-center gap-1",
|
|
2109
2103
|
"data-testid": "containers-info-block",
|
|
2110
2104
|
children: [
|
|
2111
|
-
|
|
2105
|
+
xe ? /*#__PURE__*/ H(G, {
|
|
2112
2106
|
id: "8uPTwT",
|
|
2113
2107
|
values: {
|
|
2114
|
-
filteredCount:
|
|
2115
|
-
totalCount:
|
|
2108
|
+
filteredCount: be,
|
|
2109
|
+
totalCount: Z
|
|
2116
2110
|
}
|
|
2117
|
-
}) : /*#__PURE__*/
|
|
2111
|
+
}) : /*#__PURE__*/ H(G, {
|
|
2118
2112
|
id: "ywe1H/",
|
|
2119
|
-
values: { totalCount:
|
|
2113
|
+
values: { totalCount: Z }
|
|
2120
2114
|
}),
|
|
2121
|
-
|
|
2122
|
-
/*#__PURE__*/
|
|
2115
|
+
_e > 0 && /*#__PURE__*/ U(oe, { children: [/*#__PURE__*/ H("span", { children: "," }), /*#__PURE__*/ U("span", { children: [
|
|
2116
|
+
/*#__PURE__*/ H(G, { id: "kKK8AH" }),
|
|
2123
2117
|
" ",
|
|
2124
|
-
/*#__PURE__*/
|
|
2118
|
+
/*#__PURE__*/ H("span", {
|
|
2125
2119
|
className: "text-theme-default font-semibold",
|
|
2126
|
-
children: F(
|
|
2120
|
+
children: F(ve)
|
|
2127
2121
|
})
|
|
2128
2122
|
] })] }),
|
|
2129
|
-
/*#__PURE__*/
|
|
2130
|
-
serviceInfo:
|
|
2123
|
+
/*#__PURE__*/ H(He, {
|
|
2124
|
+
serviceInfo: le,
|
|
2131
2125
|
accountInfo: se
|
|
2132
2126
|
})
|
|
2133
2127
|
]
|
|
@@ -2135,11 +2129,11 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2135
2129
|
}) })
|
|
2136
2130
|
]
|
|
2137
2131
|
}),
|
|
2138
|
-
/*#__PURE__*/
|
|
2139
|
-
containers:
|
|
2132
|
+
/*#__PURE__*/ H(Oe, {
|
|
2133
|
+
containers: q,
|
|
2140
2134
|
createModalOpen: d,
|
|
2141
2135
|
setCreateModalOpen: f,
|
|
2142
|
-
maxContainerNameLength:
|
|
2136
|
+
maxContainerNameLength: le?.swift?.max_container_name_length,
|
|
2143
2137
|
onCreateSuccess: T,
|
|
2144
2138
|
onCreateError: O,
|
|
2145
2139
|
onEmptySuccess: k,
|
|
@@ -2147,18 +2141,18 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2147
2141
|
onDeleteSuccess: I,
|
|
2148
2142
|
onDeleteError: te,
|
|
2149
2143
|
onPropertiesSuccess: L,
|
|
2150
|
-
onPropertiesError:
|
|
2151
|
-
onAclSuccess:
|
|
2152
|
-
onAclError:
|
|
2144
|
+
onPropertiesError: ne,
|
|
2145
|
+
onAclSuccess: re,
|
|
2146
|
+
onAclError: ie,
|
|
2153
2147
|
selectedContainers: _,
|
|
2154
2148
|
setSelectedContainers: v,
|
|
2155
2149
|
hasAnyBulkAction: !0
|
|
2156
2150
|
}),
|
|
2157
|
-
/*#__PURE__*/
|
|
2151
|
+
/*#__PURE__*/ H($, {
|
|
2158
2152
|
isOpen: h,
|
|
2159
|
-
containers:
|
|
2153
|
+
containers: ye,
|
|
2160
2154
|
onClose: () => g(!1),
|
|
2161
|
-
onComplete:
|
|
2155
|
+
onComplete: R
|
|
2162
2156
|
})
|
|
2163
2157
|
]
|
|
2164
2158
|
});
|
|
@@ -2173,7 +2167,7 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2173
2167
|
"--x-s3",
|
|
2174
2168
|
"--table-s3"
|
|
2175
2169
|
], Xe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r }) => {
|
|
2176
|
-
let { i18n: i, _: a } =
|
|
2170
|
+
let { i18n: i, _: a } = K(), o = N(), [s, c] = W(""), [l, u] = W(null), [d, p] = W(!1), { trackClose: m, markSubmitted: h, resetTracking: g } = V({
|
|
2177
2171
|
isOpen: e,
|
|
2178
2172
|
actionPrefix: "storage.ceph.bucket.create"
|
|
2179
2173
|
}), _ = j.useUtils(), v = j.storage.ceph.containers.create.useMutation({
|
|
@@ -2218,7 +2212,7 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2218
2212
|
enableVersioning: d
|
|
2219
2213
|
}));
|
|
2220
2214
|
};
|
|
2221
|
-
return e ? /*#__PURE__*/
|
|
2215
|
+
return e ? /*#__PURE__*/ H(C, {
|
|
2222
2216
|
title: i._({ id: "HiDAFk" }),
|
|
2223
2217
|
open: e,
|
|
2224
2218
|
onCancel: () => {
|
|
@@ -2229,15 +2223,15 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2229
2223
|
cancelButtonLabel: i._({ id: "dEgA5A" }),
|
|
2230
2224
|
size: "small",
|
|
2231
2225
|
disableConfirmButton: v.isPending || !s.trim(),
|
|
2232
|
-
children: /*#__PURE__*/
|
|
2226
|
+
children: /*#__PURE__*/ U(D, {
|
|
2233
2227
|
direction: "vertical",
|
|
2234
2228
|
gap: "6",
|
|
2235
2229
|
children: [
|
|
2236
|
-
/*#__PURE__*/
|
|
2230
|
+
/*#__PURE__*/ H("p", {
|
|
2237
2231
|
className: "text-theme-default",
|
|
2238
|
-
children: /*#__PURE__*/
|
|
2232
|
+
children: /*#__PURE__*/ H(G, { id: "ASJMIw" })
|
|
2239
2233
|
}),
|
|
2240
|
-
/*#__PURE__*/
|
|
2234
|
+
/*#__PURE__*/ H(f, {
|
|
2241
2235
|
label: i._({ id: "NNpgo3" }),
|
|
2242
2236
|
required: !0,
|
|
2243
2237
|
value: s,
|
|
@@ -2251,7 +2245,7 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2251
2245
|
autoFocus: !0,
|
|
2252
2246
|
placeholder: i._({ id: "yDHGP+" })
|
|
2253
2247
|
}),
|
|
2254
|
-
/*#__PURE__*/
|
|
2248
|
+
/*#__PURE__*/ H(y, {
|
|
2255
2249
|
label: i._({ id: "ifQSTI" }),
|
|
2256
2250
|
helptext: i._({ id: "WM+Nm7" }),
|
|
2257
2251
|
checked: d,
|
|
@@ -2262,72 +2256,67 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2262
2256
|
})
|
|
2263
2257
|
}) : null;
|
|
2264
2258
|
}, Ze = ({ buckets: e, createModalOpen: n, setCreateModalOpen: r, onCreateSuccess: a, onCreateError: s, onEmptySuccess: c, onEmptyError: l, onDeleteSuccess: f, onDeleteError: m, selectedBuckets: h, setSelectedBuckets: g, hasAnyBulkAction: _ = !0 }) => {
|
|
2265
|
-
let { projectId: v, provider: b, storageType: x } =
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
}, [e.length]);
|
|
2269
|
-
let
|
|
2259
|
+
let { projectId: v, provider: b, storageType: x } = pe({ strict: !1 }), { i18n: S, _: C } = K(), T = fe(), [E, D] = W(0), [O, k] = W(null), [A, j] = W(null), { ref: M, elementRef: N, height: P, virtualItems: ee, totalSize: L, measureElement: ne } = I({ count: e.length });
|
|
2260
|
+
ue(() => {
|
|
2261
|
+
N.current && D(N.current.offsetWidth - N.current.clientWidth);
|
|
2262
|
+
}, [e.length, P]);
|
|
2263
|
+
let re = (e) => {
|
|
2270
2264
|
try {
|
|
2271
2265
|
return new Date(e).toLocaleString();
|
|
2272
2266
|
} catch {
|
|
2273
2267
|
return S._({ id: "fj5byd" });
|
|
2274
2268
|
}
|
|
2275
|
-
},
|
|
2276
|
-
count: e.length,
|
|
2277
|
-
getScrollElement: () => E.current,
|
|
2278
|
-
estimateSize: () => 48,
|
|
2279
|
-
overscan: 10
|
|
2280
|
-
}), ee = (e) => {
|
|
2269
|
+
}, ie = (e) => {
|
|
2281
2270
|
h.includes(e) ? g(h.filter((t) => t !== e)) : g([...h, e]);
|
|
2282
|
-
},
|
|
2283
|
-
return /*#__PURE__*/
|
|
2284
|
-
|
|
2271
|
+
}, R = !e || e.length === 0, z = _ ? 6 : 5, ae = _ ? "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";
|
|
2272
|
+
return /*#__PURE__*/ U(oe, { children: [
|
|
2273
|
+
R ? /*#__PURE__*/ H(u, {
|
|
2285
2274
|
columns: 4,
|
|
2286
2275
|
className: "buckets",
|
|
2287
2276
|
"data-testid": "no-buckets",
|
|
2288
|
-
children: /*#__PURE__*/
|
|
2277
|
+
children: /*#__PURE__*/ H(i, { children: /*#__PURE__*/ H(o, {
|
|
2289
2278
|
colSpan: 4,
|
|
2290
|
-
children: /*#__PURE__*/
|
|
2279
|
+
children: /*#__PURE__*/ U("div", {
|
|
2291
2280
|
className: "py-8 text-center",
|
|
2292
|
-
children: [/*#__PURE__*/
|
|
2281
|
+
children: [/*#__PURE__*/ H("h3", {
|
|
2293
2282
|
className: "text-lg font-semibold",
|
|
2294
|
-
children: /*#__PURE__*/
|
|
2295
|
-
}), /*#__PURE__*/
|
|
2283
|
+
children: /*#__PURE__*/ H(G, { id: "ih2lfP" })
|
|
2284
|
+
}), /*#__PURE__*/ H("p", {
|
|
2296
2285
|
className: "text-theme-light mt-2",
|
|
2297
|
-
children: /*#__PURE__*/
|
|
2286
|
+
children: /*#__PURE__*/ H(G, { id: "emkxJa" })
|
|
2298
2287
|
})]
|
|
2299
2288
|
})
|
|
2300
2289
|
}) })
|
|
2301
|
-
}) : /*#__PURE__*/
|
|
2290
|
+
}) : /*#__PURE__*/ U("div", {
|
|
2302
2291
|
className: "relative",
|
|
2303
|
-
children: [/*#__PURE__*/
|
|
2304
|
-
style: { paddingRight: `${
|
|
2305
|
-
children: /*#__PURE__*/
|
|
2306
|
-
columns:
|
|
2307
|
-
gridColumnTemplate:
|
|
2292
|
+
children: [/*#__PURE__*/ H("div", {
|
|
2293
|
+
style: { paddingRight: `${E}px` },
|
|
2294
|
+
children: /*#__PURE__*/ H(u, {
|
|
2295
|
+
columns: z,
|
|
2296
|
+
gridColumnTemplate: ae,
|
|
2308
2297
|
className: "buckets",
|
|
2309
2298
|
"data-testid": "buckets-table-header",
|
|
2310
|
-
children: /*#__PURE__*/
|
|
2311
|
-
_ && /*#__PURE__*/
|
|
2312
|
-
/*#__PURE__*/
|
|
2313
|
-
/*#__PURE__*/
|
|
2314
|
-
/*#__PURE__*/
|
|
2315
|
-
/*#__PURE__*/
|
|
2316
|
-
/*#__PURE__*/
|
|
2299
|
+
children: /*#__PURE__*/ U(i, { children: [
|
|
2300
|
+
_ && /*#__PURE__*/ H(d, {}),
|
|
2301
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "BTsbBe" }) }),
|
|
2302
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "sxbP3b" }) }),
|
|
2303
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "sjMCOP" }) }),
|
|
2304
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "hgpMHD" }) }),
|
|
2305
|
+
/*#__PURE__*/ H(d, { style: { marginRight: `-${E}px` } })
|
|
2317
2306
|
] })
|
|
2318
2307
|
})
|
|
2319
|
-
}), /*#__PURE__*/
|
|
2320
|
-
ref:
|
|
2308
|
+
}), /*#__PURE__*/ H("div", {
|
|
2309
|
+
ref: M,
|
|
2321
2310
|
className: "overflow-auto",
|
|
2322
|
-
style: { height:
|
|
2311
|
+
style: { height: `${P ?? 0}px` },
|
|
2323
2312
|
"data-testid": "buckets-table-body",
|
|
2324
|
-
children: /*#__PURE__*/
|
|
2313
|
+
children: /*#__PURE__*/ H("div", {
|
|
2325
2314
|
style: {
|
|
2326
|
-
height: `${
|
|
2315
|
+
height: `${L}px`,
|
|
2327
2316
|
width: "100%",
|
|
2328
2317
|
position: "relative"
|
|
2329
2318
|
},
|
|
2330
|
-
children:
|
|
2319
|
+
children: ee.map((n) => {
|
|
2331
2320
|
let r = e[n.index], i = h.includes(r.name), a = () => T({
|
|
2332
2321
|
to: "/projects/$projectId/storage/$provider/$storageType/$containerName/objects",
|
|
2333
2322
|
params: {
|
|
@@ -2337,9 +2326,9 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2337
2326
|
containerName: r.name
|
|
2338
2327
|
}
|
|
2339
2328
|
});
|
|
2340
|
-
return /*#__PURE__*/
|
|
2329
|
+
return /*#__PURE__*/ U("div", {
|
|
2341
2330
|
"data-index": n.index,
|
|
2342
|
-
ref:
|
|
2331
|
+
ref: ne,
|
|
2343
2332
|
className: "juno-datagrid group hover:bg-theme-background-lvl-1 cursor-pointer",
|
|
2344
2333
|
style: {
|
|
2345
2334
|
position: "absolute",
|
|
@@ -2348,7 +2337,7 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2348
2337
|
width: "100%",
|
|
2349
2338
|
transform: `translateY(${n.start}px)`,
|
|
2350
2339
|
display: "grid",
|
|
2351
|
-
gridTemplateColumns:
|
|
2340
|
+
gridTemplateColumns: ae,
|
|
2352
2341
|
alignItems: "stretch"
|
|
2353
2342
|
},
|
|
2354
2343
|
"data-testid": `bucket-row-${r.name}`,
|
|
@@ -2359,44 +2348,44 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2359
2348
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
2360
2349
|
},
|
|
2361
2350
|
children: [
|
|
2362
|
-
_ && /*#__PURE__*/
|
|
2351
|
+
_ && /*#__PURE__*/ H(o, {
|
|
2363
2352
|
onClick: (e) => e.stopPropagation(),
|
|
2364
2353
|
onKeyDown: (e) => {
|
|
2365
2354
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
2366
2355
|
},
|
|
2367
|
-
children: /*#__PURE__*/
|
|
2356
|
+
children: /*#__PURE__*/ H(y, {
|
|
2368
2357
|
checked: i,
|
|
2369
|
-
onChange: () =>
|
|
2358
|
+
onChange: () => ie(r.name),
|
|
2370
2359
|
"data-testid": `select-bucket-${r.name}`
|
|
2371
2360
|
})
|
|
2372
2361
|
}),
|
|
2373
|
-
/*#__PURE__*/
|
|
2362
|
+
/*#__PURE__*/ H(o, {
|
|
2374
2363
|
className: "min-w-0 overflow-hidden",
|
|
2375
|
-
children: /*#__PURE__*/
|
|
2364
|
+
children: /*#__PURE__*/ H("span", {
|
|
2376
2365
|
className: "block truncate",
|
|
2377
2366
|
title: r.name,
|
|
2378
2367
|
children: r.name
|
|
2379
2368
|
})
|
|
2380
2369
|
}),
|
|
2381
|
-
/*#__PURE__*/
|
|
2382
|
-
/*#__PURE__*/
|
|
2383
|
-
/*#__PURE__*/
|
|
2384
|
-
/*#__PURE__*/
|
|
2370
|
+
/*#__PURE__*/ H(o, { children: r.count.toLocaleString() }),
|
|
2371
|
+
/*#__PURE__*/ H(o, { children: re(r.last_modified || r.creationDate || "") }),
|
|
2372
|
+
/*#__PURE__*/ H(o, { children: F(r.bytes) }),
|
|
2373
|
+
/*#__PURE__*/ H(o, {
|
|
2385
2374
|
onClick: (e) => e.stopPropagation(),
|
|
2386
|
-
children: /*#__PURE__*/
|
|
2387
|
-
/*#__PURE__*/
|
|
2375
|
+
children: /*#__PURE__*/ H(w, { children: /*#__PURE__*/ U(t, { children: [
|
|
2376
|
+
/*#__PURE__*/ H(p, {
|
|
2388
2377
|
label: S._({ id: "v0hPHE" }),
|
|
2389
2378
|
onClick: a,
|
|
2390
2379
|
"data-testid": `show-details-action-${r.name}`
|
|
2391
2380
|
}),
|
|
2392
|
-
/*#__PURE__*/
|
|
2381
|
+
/*#__PURE__*/ H(p, {
|
|
2393
2382
|
label: S._({ id: "N2S1rs" }),
|
|
2394
|
-
onClick: () =>
|
|
2383
|
+
onClick: () => k(r),
|
|
2395
2384
|
"data-testid": `empty-action-${r.name}`
|
|
2396
2385
|
}),
|
|
2397
|
-
/*#__PURE__*/
|
|
2386
|
+
/*#__PURE__*/ H(p, {
|
|
2398
2387
|
label: S._({ id: "cnGeoo" }),
|
|
2399
|
-
onClick: () =>
|
|
2388
|
+
onClick: () => j(r),
|
|
2400
2389
|
"data-testid": `delete-action-${r.name}`
|
|
2401
2390
|
})
|
|
2402
2391
|
] }) })
|
|
@@ -2407,29 +2396,29 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2407
2396
|
})
|
|
2408
2397
|
})]
|
|
2409
2398
|
}),
|
|
2410
|
-
/*#__PURE__*/
|
|
2399
|
+
/*#__PURE__*/ H(Xe, {
|
|
2411
2400
|
isOpen: n,
|
|
2412
2401
|
onClose: () => r(!1),
|
|
2413
2402
|
onSuccess: a,
|
|
2414
2403
|
onError: s
|
|
2415
2404
|
}),
|
|
2416
|
-
/*#__PURE__*/
|
|
2417
|
-
isOpen:
|
|
2418
|
-
bucket:
|
|
2419
|
-
onClose: () =>
|
|
2405
|
+
/*#__PURE__*/ H(B, {
|
|
2406
|
+
isOpen: O !== null,
|
|
2407
|
+
bucket: O,
|
|
2408
|
+
onClose: () => k(null),
|
|
2420
2409
|
onSuccess: c,
|
|
2421
2410
|
onError: l
|
|
2422
2411
|
}),
|
|
2423
|
-
/*#__PURE__*/
|
|
2424
|
-
isOpen:
|
|
2425
|
-
bucket:
|
|
2426
|
-
onClose: () =>
|
|
2412
|
+
/*#__PURE__*/ H(te, {
|
|
2413
|
+
isOpen: A !== null,
|
|
2414
|
+
bucket: A,
|
|
2415
|
+
onClose: () => j(null),
|
|
2427
2416
|
onSuccess: f,
|
|
2428
2417
|
onError: m
|
|
2429
2418
|
})
|
|
2430
2419
|
] });
|
|
2431
2420
|
}, Qe = 20, $e = ({ isOpen: e, buckets: t, onClose: n, onComplete: r }) => {
|
|
2432
|
-
let { i18n: i, _: a } =
|
|
2421
|
+
let { i18n: i, _: a } = K(), o = N(), [c, l] = W(null), [u, d] = W(""), { trackClose: p, markSubmitted: m, resetTracking: h } = V({
|
|
2433
2422
|
isOpen: e,
|
|
2434
2423
|
actionPrefix: "storage.ceph.buckets.empty"
|
|
2435
2424
|
}), g = j.useUtils(), _ = j.storage.ceph.objects.deleteAll.useMutation(), v = () => {
|
|
@@ -2462,8 +2451,8 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2462
2451
|
};
|
|
2463
2452
|
if (!e || t.length === 0) return null;
|
|
2464
2453
|
let b = t.length, x = t.slice(0, Qe), S = b - x.length, w = _.isPending || c !== null, T = c?.current, E = c?.total, O = u === "empty";
|
|
2465
|
-
return /*#__PURE__*/
|
|
2466
|
-
title: /*#__PURE__*/
|
|
2454
|
+
return /*#__PURE__*/ H(C, {
|
|
2455
|
+
title: /*#__PURE__*/ H(G, {
|
|
2467
2456
|
id: "DWBWmW",
|
|
2468
2457
|
values: { totalCount: b }
|
|
2469
2458
|
}),
|
|
@@ -2479,15 +2468,15 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2479
2468
|
disableCancelButton: w,
|
|
2480
2469
|
disableCloseButton: w,
|
|
2481
2470
|
size: "small",
|
|
2482
|
-
children: w ? /*#__PURE__*/
|
|
2471
|
+
children: w ? /*#__PURE__*/ U(D, {
|
|
2483
2472
|
direction: "vertical",
|
|
2484
2473
|
distribution: "center",
|
|
2485
2474
|
alignment: "center",
|
|
2486
2475
|
gap: "2",
|
|
2487
2476
|
className: "py-4",
|
|
2488
|
-
children: [/*#__PURE__*/
|
|
2477
|
+
children: [/*#__PURE__*/ H(s, { variant: "primary" }), c && /*#__PURE__*/ H("p", {
|
|
2489
2478
|
className: "text-theme-light text-sm",
|
|
2490
|
-
children: /*#__PURE__*/
|
|
2479
|
+
children: /*#__PURE__*/ H(G, {
|
|
2491
2480
|
id: "NW1XEL",
|
|
2492
2481
|
values: {
|
|
2493
2482
|
progressCurrent: T,
|
|
@@ -2495,28 +2484,28 @@ var De = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
2495
2484
|
}
|
|
2496
2485
|
})
|
|
2497
2486
|
})]
|
|
2498
|
-
}) : /*#__PURE__*/
|
|
2487
|
+
}) : /*#__PURE__*/ U(D, {
|
|
2499
2488
|
direction: "vertical",
|
|
2500
2489
|
gap: "4",
|
|
2501
2490
|
children: [
|
|
2502
|
-
/*#__PURE__*/
|
|
2491
|
+
/*#__PURE__*/ H(G, {
|
|
2503
2492
|
id: "CtiFDz",
|
|
2504
2493
|
values: { totalCount: b }
|
|
2505
2494
|
}),
|
|
2506
|
-
/*#__PURE__*/
|
|
2495
|
+
/*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H("p", {
|
|
2507
2496
|
className: "text-theme-light mb-2 text-sm",
|
|
2508
|
-
children: /*#__PURE__*/
|
|
2509
|
-
}), /*#__PURE__*/
|
|
2497
|
+
children: /*#__PURE__*/ H(G, { id: "Zshv0H" })
|
|
2498
|
+
}), /*#__PURE__*/ U("ul", {
|
|
2510
2499
|
className: "list-inside list-disc space-y-1 text-sm",
|
|
2511
|
-
children: [x.map((e) => /*#__PURE__*/
|
|
2500
|
+
children: [x.map((e) => /*#__PURE__*/ H("li", { children: e.name }, e.name)), S > 0 && /*#__PURE__*/ H("li", {
|
|
2512
2501
|
className: "text-theme-light",
|
|
2513
|
-
children: /*#__PURE__*/
|
|
2502
|
+
children: /*#__PURE__*/ H(G, {
|
|
2514
2503
|
id: "yqPflB",
|
|
2515
2504
|
values: { hiddenCount: S }
|
|
2516
2505
|
})
|
|
2517
2506
|
})]
|
|
2518
2507
|
})] }),
|
|
2519
|
-
/*#__PURE__*/
|
|
2508
|
+
/*#__PURE__*/ H(f, {
|
|
2520
2509
|
label: i._({ id: "Ghp863" }),
|
|
2521
2510
|
value: u,
|
|
2522
2511
|
onChange: (e) => d(e.target.value),
|
|
@@ -2536,33 +2525,33 @@ function et({ onSuccess: e }) {
|
|
|
2536
2525
|
},
|
|
2537
2526
|
onError: (e) => {
|
|
2538
2527
|
let t = e.message;
|
|
2539
|
-
l.error(/*#__PURE__*/
|
|
2528
|
+
l.error(/*#__PURE__*/ H(G, {
|
|
2540
2529
|
id: "rcBt6T",
|
|
2541
2530
|
values: { errorMessage: t }
|
|
2542
2531
|
}));
|
|
2543
2532
|
}
|
|
2544
2533
|
});
|
|
2545
|
-
return /*#__PURE__*/
|
|
2534
|
+
return /*#__PURE__*/ U(D, {
|
|
2546
2535
|
direction: "vertical",
|
|
2547
2536
|
gap: "4",
|
|
2548
2537
|
className: "mt-8 max-w-lg",
|
|
2549
2538
|
children: [
|
|
2550
|
-
/*#__PURE__*/
|
|
2539
|
+
/*#__PURE__*/ H("h2", {
|
|
2551
2540
|
className: "text-lg font-semibold",
|
|
2552
|
-
children: /*#__PURE__*/
|
|
2541
|
+
children: /*#__PURE__*/ H(G, { id: "jq5wGQ" })
|
|
2553
2542
|
}),
|
|
2554
|
-
/*#__PURE__*/
|
|
2543
|
+
/*#__PURE__*/ H("p", {
|
|
2555
2544
|
className: "text-theme-default",
|
|
2556
|
-
children: /*#__PURE__*/
|
|
2545
|
+
children: /*#__PURE__*/ H(G, { id: "+8m5QE" })
|
|
2557
2546
|
}),
|
|
2558
|
-
/*#__PURE__*/
|
|
2547
|
+
/*#__PURE__*/ H("p", {
|
|
2559
2548
|
className: "text-theme-default text-sm",
|
|
2560
|
-
children: /*#__PURE__*/
|
|
2549
|
+
children: /*#__PURE__*/ H(G, { id: "+1xG4p" })
|
|
2561
2550
|
}),
|
|
2562
|
-
/*#__PURE__*/
|
|
2551
|
+
/*#__PURE__*/ H("div", { children: /*#__PURE__*/ H(A, {
|
|
2563
2552
|
onClick: () => t && r.mutate({ project_id: t }),
|
|
2564
2553
|
disabled: r.isPending || !t,
|
|
2565
|
-
children: r.isPending ? /*#__PURE__*/
|
|
2554
|
+
children: r.isPending ? /*#__PURE__*/ H(G, { id: "k/zHK7" }) : /*#__PURE__*/ H(G, { id: "FJO48W" })
|
|
2566
2555
|
}) })
|
|
2567
2556
|
]
|
|
2568
2557
|
});
|
|
@@ -2570,37 +2559,37 @@ function et({ onSuccess: e }) {
|
|
|
2570
2559
|
//#endregion
|
|
2571
2560
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Buckets/index.tsx
|
|
2572
2561
|
var tt = () => {
|
|
2573
|
-
let { i18n: e, i18n: n, _: r } =
|
|
2574
|
-
|
|
2562
|
+
let { i18n: e, i18n: n, _: r } = K(), i = N(), a = fe({ from: M.fullPath }), { sortBy: o, sortDirection: c, search: u = "" } = M.useSearch(), [d, f] = W(!1), [h, g] = W(!1), [_, v] = W([]), [x, S] = W(u), C = de(void 0);
|
|
2563
|
+
ue(() => () => clearTimeout(C.current), []), ue(() => {
|
|
2575
2564
|
S(u);
|
|
2576
2565
|
}, [u]);
|
|
2577
2566
|
let T = (e) => {
|
|
2578
|
-
let { message: t, ...n } =
|
|
2567
|
+
let { message: t, ...n } = ie(e);
|
|
2579
2568
|
l.success(t, n);
|
|
2580
2569
|
}, O = (e, t) => {
|
|
2581
|
-
let { message: n, ...r } =
|
|
2570
|
+
let { message: n, ...r } = ae(e, t);
|
|
2582
2571
|
l.error(n, r);
|
|
2583
2572
|
}, k = (e, t) => {
|
|
2584
|
-
let { message: n, ...r } =
|
|
2573
|
+
let { message: n, ...r } = L(e, t);
|
|
2585
2574
|
l.success(n, r);
|
|
2586
2575
|
}, P = (e, t) => {
|
|
2587
|
-
let { message: n, ...r } =
|
|
2576
|
+
let { message: n, ...r } = R(e, t);
|
|
2588
2577
|
l.error(n, r);
|
|
2589
2578
|
}, F = (e) => {
|
|
2590
|
-
let { message: t, ...n } =
|
|
2579
|
+
let { message: t, ...n } = ne(e);
|
|
2591
2580
|
l.success(t, n);
|
|
2592
2581
|
}, I = (e, t) => {
|
|
2593
2582
|
let { message: n, ...r } = z(e, t);
|
|
2594
2583
|
l.error(n, r);
|
|
2595
|
-
},
|
|
2584
|
+
}, te = ({ emptiedCount: e, totalDeleted: t, errors: n }) => {
|
|
2596
2585
|
if (n.length === 0) v([]);
|
|
2597
2586
|
else {
|
|
2598
2587
|
let e = new Set(n.map((e) => e.split(": ")[0]));
|
|
2599
2588
|
v((t) => t.filter((t) => e.has(t)));
|
|
2600
2589
|
}
|
|
2601
|
-
let { message: r, ...i } =
|
|
2590
|
+
let { message: r, ...i } = re(e, t, n);
|
|
2602
2591
|
n.length > 0 ? l.warning(r, i) : l.success(r, i);
|
|
2603
|
-
},
|
|
2592
|
+
}, B = {
|
|
2604
2593
|
options: [
|
|
2605
2594
|
{
|
|
2606
2595
|
label: e._({ id: "6YtxFj" }),
|
|
@@ -2621,13 +2610,13 @@ var tt = () => {
|
|
|
2621
2610
|
],
|
|
2622
2611
|
sortBy: o ?? "name",
|
|
2623
2612
|
sortDirection: c ?? "asc"
|
|
2624
|
-
}, { data:
|
|
2613
|
+
}, { data: V, isLoading: oe, error: se } = j.storage.ceph.containers.list.useQuery({
|
|
2625
2614
|
project_id: i,
|
|
2626
2615
|
includeMetadata: !0
|
|
2627
2616
|
}, {
|
|
2628
2617
|
enabled: !!i,
|
|
2629
2618
|
retry: !1
|
|
2630
|
-
}),
|
|
2619
|
+
}), le = (e) => [...e].sort((e, t) => {
|
|
2631
2620
|
let n;
|
|
2632
2621
|
switch (o ?? "name") {
|
|
2633
2622
|
case "name":
|
|
@@ -2648,17 +2637,17 @@ var tt = () => {
|
|
|
2648
2637
|
default: n = e.name.localeCompare(t.name);
|
|
2649
2638
|
}
|
|
2650
2639
|
return (c ?? "asc") === "desc" ? -n : n;
|
|
2651
|
-
}),
|
|
2640
|
+
}), pe = (V || []).filter((e) => e.name.toLowerCase().includes(u.toLowerCase())), me = le(pe), q = (e) => {
|
|
2652
2641
|
let t = typeof e == "string" ? e : "";
|
|
2653
|
-
|
|
2642
|
+
ce(() => {
|
|
2654
2643
|
a({ search: (e) => ({
|
|
2655
2644
|
...e,
|
|
2656
2645
|
search: t || void 0
|
|
2657
2646
|
}) });
|
|
2658
2647
|
});
|
|
2659
|
-
},
|
|
2648
|
+
}, J = (e) => {
|
|
2660
2649
|
let t = e.sortBy?.toString() || "name", n = e.sortDirection || "asc";
|
|
2661
|
-
|
|
2650
|
+
ce(() => {
|
|
2662
2651
|
a({ search: (e) => ({
|
|
2663
2652
|
...e,
|
|
2664
2653
|
sortBy: t,
|
|
@@ -2666,141 +2655,141 @@ var tt = () => {
|
|
|
2666
2655
|
}) });
|
|
2667
2656
|
});
|
|
2668
2657
|
};
|
|
2669
|
-
if (
|
|
2658
|
+
if (oe) return /*#__PURE__*/ U(D, {
|
|
2670
2659
|
className: "absolute inset-0",
|
|
2671
2660
|
distribution: "center",
|
|
2672
2661
|
alignment: "center",
|
|
2673
2662
|
direction: "vertical",
|
|
2674
|
-
children: [/*#__PURE__*/
|
|
2663
|
+
children: [/*#__PURE__*/ H(s, {
|
|
2675
2664
|
variant: "primary",
|
|
2676
2665
|
size: "large",
|
|
2677
2666
|
className: "mb-2"
|
|
2678
|
-
}), /*#__PURE__*/
|
|
2667
|
+
}), /*#__PURE__*/ H(G, { id: "c5i+X0" })]
|
|
2679
2668
|
});
|
|
2680
2669
|
if (se) {
|
|
2681
2670
|
let e = se.message;
|
|
2682
|
-
if (e === "NO_CEPH_CREDENTIALS") return /*#__PURE__*/
|
|
2671
|
+
if (e === "NO_CEPH_CREDENTIALS") return /*#__PURE__*/ H(et, { onSuccess: () => window.location.reload() });
|
|
2683
2672
|
let t = e.includes("Access denied") || e.includes("AccessDenied"), n = e.includes("Invalid access key") || e.includes("InvalidAccessKeyId");
|
|
2684
|
-
return /*#__PURE__*/
|
|
2673
|
+
return /*#__PURE__*/ H("div", { children: /*#__PURE__*/ H("p", {
|
|
2685
2674
|
className: "text-theme-default text-sm",
|
|
2686
|
-
children: t ? /*#__PURE__*/
|
|
2675
|
+
children: t ? /*#__PURE__*/ H(G, { id: "HAcOOW" }) : n ? /*#__PURE__*/ H(G, { id: "xIXYTK" }) : /*#__PURE__*/ H(G, {
|
|
2687
2676
|
id: "yDAMyU",
|
|
2688
2677
|
values: { errorMessage: e }
|
|
2689
2678
|
})
|
|
2690
2679
|
}) });
|
|
2691
2680
|
}
|
|
2692
|
-
let
|
|
2693
|
-
return /*#__PURE__*/
|
|
2681
|
+
let he = (V || []).filter((e) => _.includes(e.name)), ge = he.length > 0, _e = he.length, ve = (V || []).length, ye = pe.length, Y = me.map((e) => e.name), X = Y.length > 0 && Y.every((e) => _.includes(e)), Z = Y.some((e) => _.includes(e));
|
|
2682
|
+
return /*#__PURE__*/ U("div", {
|
|
2694
2683
|
className: "relative",
|
|
2695
2684
|
children: [
|
|
2696
|
-
/*#__PURE__*/
|
|
2685
|
+
/*#__PURE__*/ U(D, {
|
|
2697
2686
|
direction: "vertical",
|
|
2698
2687
|
children: [
|
|
2699
|
-
/*#__PURE__*/
|
|
2688
|
+
/*#__PURE__*/ U(D, {
|
|
2700
2689
|
distribution: "end",
|
|
2701
2690
|
alignment: "center",
|
|
2702
2691
|
gap: "2",
|
|
2703
2692
|
className: "pb-2",
|
|
2704
|
-
children: [/*#__PURE__*/
|
|
2693
|
+
children: [/*#__PURE__*/ H(D, {
|
|
2705
2694
|
gap: "0.5",
|
|
2706
2695
|
alignment: "center",
|
|
2707
|
-
children: /*#__PURE__*/
|
|
2708
|
-
options:
|
|
2709
|
-
sortBy:
|
|
2710
|
-
sortDirection:
|
|
2696
|
+
children: /*#__PURE__*/ H(ee, {
|
|
2697
|
+
options: B.options,
|
|
2698
|
+
sortBy: B.sortBy,
|
|
2699
|
+
sortDirection: B.sortDirection ?? "asc",
|
|
2711
2700
|
selectClassName: "w-40",
|
|
2712
|
-
onSortByChange: (e) =>
|
|
2713
|
-
...
|
|
2701
|
+
onSortByChange: (e) => J({
|
|
2702
|
+
...B,
|
|
2714
2703
|
sortBy: e,
|
|
2715
|
-
sortDirection:
|
|
2704
|
+
sortDirection: B.sortDirection
|
|
2716
2705
|
}),
|
|
2717
|
-
onSortDirectionChange: (e) =>
|
|
2718
|
-
...
|
|
2706
|
+
onSortDirectionChange: (e) => J({
|
|
2707
|
+
...B,
|
|
2719
2708
|
sortDirection: e
|
|
2720
2709
|
})
|
|
2721
2710
|
})
|
|
2722
|
-
}), /*#__PURE__*/
|
|
2711
|
+
}), /*#__PURE__*/ H(A, {
|
|
2723
2712
|
variant: "primary",
|
|
2724
2713
|
className: "whitespace-nowrap",
|
|
2725
2714
|
onClick: () => f(!0),
|
|
2726
|
-
children: /*#__PURE__*/
|
|
2715
|
+
children: /*#__PURE__*/ H(G, { id: "HiDAFk" })
|
|
2727
2716
|
})]
|
|
2728
2717
|
}),
|
|
2729
|
-
/*#__PURE__*/
|
|
2718
|
+
/*#__PURE__*/ H(m, { children: /*#__PURE__*/ H(D, {
|
|
2730
2719
|
direction: "vertical",
|
|
2731
2720
|
gap: "2",
|
|
2732
|
-
children: /*#__PURE__*/
|
|
2721
|
+
children: /*#__PURE__*/ H(D, {
|
|
2733
2722
|
distribution: "end",
|
|
2734
2723
|
alignment: "center",
|
|
2735
|
-
children: /*#__PURE__*/
|
|
2724
|
+
children: /*#__PURE__*/ H(b, {
|
|
2736
2725
|
placeholder: e._({ id: "VeDAv2" }),
|
|
2737
2726
|
"data-testid": "searchbar",
|
|
2738
2727
|
value: x,
|
|
2739
2728
|
onInput: (e) => {
|
|
2740
2729
|
let t = e.currentTarget.value;
|
|
2741
|
-
S(t), clearTimeout(C.current), C.current = window.setTimeout(() =>
|
|
2730
|
+
S(t), clearTimeout(C.current), C.current = window.setTimeout(() => q(t), 500);
|
|
2742
2731
|
},
|
|
2743
2732
|
onSearch: (e) => {
|
|
2744
|
-
clearTimeout(C.current),
|
|
2733
|
+
clearTimeout(C.current), q(typeof e == "string" ? e : "");
|
|
2745
2734
|
},
|
|
2746
2735
|
onClear: () => {
|
|
2747
|
-
clearTimeout(C.current), S(""),
|
|
2736
|
+
clearTimeout(C.current), S(""), q("");
|
|
2748
2737
|
}
|
|
2749
2738
|
})
|
|
2750
2739
|
})
|
|
2751
2740
|
}) }),
|
|
2752
|
-
/*#__PURE__*/
|
|
2741
|
+
/*#__PURE__*/ H(m, { children: /*#__PURE__*/ U(D, {
|
|
2753
2742
|
distribution: "start",
|
|
2754
2743
|
gap: "2",
|
|
2755
2744
|
alignment: "center",
|
|
2756
2745
|
className: "text-sm",
|
|
2757
|
-
children: [/*#__PURE__*/
|
|
2746
|
+
children: [/*#__PURE__*/ U(D, {
|
|
2758
2747
|
gap: "2",
|
|
2759
2748
|
alignment: "center",
|
|
2760
|
-
children: [/*#__PURE__*/
|
|
2761
|
-
checked:
|
|
2762
|
-
indeterminate:
|
|
2749
|
+
children: [/*#__PURE__*/ H(y, {
|
|
2750
|
+
checked: X,
|
|
2751
|
+
indeterminate: Z && !X,
|
|
2763
2752
|
onChange: () => {
|
|
2764
|
-
v(
|
|
2753
|
+
v(X ? (e) => e.filter((e) => !Y.includes(e)) : (e) => [...new Set([...e, ...Y])]);
|
|
2765
2754
|
}
|
|
2766
|
-
}), /*#__PURE__*/
|
|
2755
|
+
}), /*#__PURE__*/ U(w, {
|
|
2767
2756
|
className: "flex items-center",
|
|
2768
|
-
children: [/*#__PURE__*/
|
|
2757
|
+
children: [/*#__PURE__*/ H(E, {
|
|
2769
2758
|
as: "div",
|
|
2770
|
-
children: /*#__PURE__*/
|
|
2771
|
-
disabled: !
|
|
2759
|
+
children: /*#__PURE__*/ H(A, {
|
|
2760
|
+
disabled: !ge,
|
|
2772
2761
|
size: "small",
|
|
2773
2762
|
icon: "moreVert",
|
|
2774
2763
|
label: e._({ id: "7L01XJ" })
|
|
2775
2764
|
})
|
|
2776
|
-
}),
|
|
2777
|
-
disabled: !
|
|
2765
|
+
}), ge && /*#__PURE__*/ H(t, { children: /*#__PURE__*/ H(p, {
|
|
2766
|
+
disabled: !ge,
|
|
2778
2767
|
label: n._(e._({
|
|
2779
2768
|
id: "P2tWBZ",
|
|
2780
|
-
values: { selectedCount:
|
|
2769
|
+
values: { selectedCount: _e }
|
|
2781
2770
|
})),
|
|
2782
2771
|
onClick: () => g(!0)
|
|
2783
2772
|
}) })]
|
|
2784
2773
|
})]
|
|
2785
|
-
}), /*#__PURE__*/
|
|
2774
|
+
}), /*#__PURE__*/ H("div", {
|
|
2786
2775
|
className: "text-theme-light flex items-center gap-1",
|
|
2787
2776
|
"data-testid": "buckets-info-block",
|
|
2788
|
-
children: u.trim() ? /*#__PURE__*/
|
|
2777
|
+
children: u.trim() ? /*#__PURE__*/ H(G, {
|
|
2789
2778
|
id: "xOvKAE",
|
|
2790
2779
|
values: {
|
|
2791
|
-
totalCount:
|
|
2792
|
-
filteredCount:
|
|
2780
|
+
totalCount: ve,
|
|
2781
|
+
filteredCount: ye
|
|
2793
2782
|
}
|
|
2794
|
-
}) : /*#__PURE__*/
|
|
2783
|
+
}) : /*#__PURE__*/ H(G, {
|
|
2795
2784
|
id: "Ux/pNd",
|
|
2796
|
-
values: { totalCount:
|
|
2785
|
+
values: { totalCount: ve }
|
|
2797
2786
|
})
|
|
2798
2787
|
})]
|
|
2799
2788
|
}) })
|
|
2800
2789
|
]
|
|
2801
2790
|
}),
|
|
2802
|
-
/*#__PURE__*/
|
|
2803
|
-
buckets:
|
|
2791
|
+
/*#__PURE__*/ H(Ze, {
|
|
2792
|
+
buckets: me,
|
|
2804
2793
|
createModalOpen: d,
|
|
2805
2794
|
setCreateModalOpen: f,
|
|
2806
2795
|
onCreateSuccess: T,
|
|
@@ -2813,11 +2802,11 @@ var tt = () => {
|
|
|
2813
2802
|
setSelectedBuckets: v,
|
|
2814
2803
|
hasAnyBulkAction: !0
|
|
2815
2804
|
}),
|
|
2816
|
-
/*#__PURE__*/
|
|
2805
|
+
/*#__PURE__*/ H($e, {
|
|
2817
2806
|
isOpen: h,
|
|
2818
|
-
buckets:
|
|
2807
|
+
buckets: he,
|
|
2819
2808
|
onClose: () => g(!1),
|
|
2820
|
-
onComplete:
|
|
2809
|
+
onComplete: te
|
|
2821
2810
|
})
|
|
2822
2811
|
]
|
|
2823
2812
|
});
|
|
@@ -2825,14 +2814,14 @@ var tt = () => {
|
|
|
2825
2814
|
//#endregion
|
|
2826
2815
|
//#region src/client/routes/_auth/projects/$projectId/storage/$provider/$storageType/index.tsx?tsr-split=component
|
|
2827
2816
|
function nt() {
|
|
2828
|
-
let { project: e, provider: t } =
|
|
2817
|
+
let { project: e, provider: t } = pe({
|
|
2829
2818
|
from: "/_auth/projects/$projectId/storage/$provider/$storageType/",
|
|
2830
2819
|
select: (e) => ({
|
|
2831
2820
|
project: e.projectId,
|
|
2832
2821
|
provider: e.provider,
|
|
2833
2822
|
storageType: e.storageType
|
|
2834
2823
|
})
|
|
2835
|
-
}), { i18n: n, _: r } =
|
|
2824
|
+
}), { i18n: n, _: r } = K(), i;
|
|
2836
2825
|
switch (t) {
|
|
2837
2826
|
case "swift":
|
|
2838
2827
|
i = n._({ id: "+OEi73" });
|
|
@@ -2842,29 +2831,29 @@ function nt() {
|
|
|
2842
2831
|
break;
|
|
2843
2832
|
default: i = n._({ id: "IWF68U" });
|
|
2844
2833
|
}
|
|
2845
|
-
return /*#__PURE__*/
|
|
2834
|
+
return /*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H(P, {
|
|
2846
2835
|
title: i,
|
|
2847
2836
|
projectId: e
|
|
2848
|
-
}), e ? /*#__PURE__*/
|
|
2837
|
+
}), e ? /*#__PURE__*/ H(me, {
|
|
2849
2838
|
resetKeys: [e, t],
|
|
2850
|
-
fallback: /*#__PURE__*/
|
|
2839
|
+
fallback: /*#__PURE__*/ H("div", {
|
|
2851
2840
|
className: "p-4 text-center",
|
|
2852
|
-
children: /*#__PURE__*/
|
|
2841
|
+
children: /*#__PURE__*/ H(G, { id: "diFNkW" })
|
|
2853
2842
|
}),
|
|
2854
2843
|
children: (() => {
|
|
2855
2844
|
switch (t) {
|
|
2856
|
-
case "swift": return /*#__PURE__*/
|
|
2857
|
-
case "ceph": return /*#__PURE__*/
|
|
2858
|
-
default: return /*#__PURE__*/
|
|
2845
|
+
case "swift": return /*#__PURE__*/ H(Ge, {});
|
|
2846
|
+
case "ceph": return /*#__PURE__*/ H(tt, {});
|
|
2847
|
+
default: return /*#__PURE__*/ H("div", { children: "Storage Overview Page" });
|
|
2859
2848
|
}
|
|
2860
2849
|
})()
|
|
2861
|
-
}) : /*#__PURE__*/
|
|
2850
|
+
}) : /*#__PURE__*/ H("div", {
|
|
2862
2851
|
className: "p-4 text-center",
|
|
2863
|
-
children: /*#__PURE__*/
|
|
2852
|
+
children: /*#__PURE__*/ H(G, { id: "Z2fZGD" })
|
|
2864
2853
|
})] });
|
|
2865
2854
|
}
|
|
2866
|
-
var rt = () => /*#__PURE__*/
|
|
2855
|
+
var rt = () => /*#__PURE__*/ H(nt, {});
|
|
2867
2856
|
//#endregion
|
|
2868
2857
|
export { rt as component };
|
|
2869
2858
|
|
|
2870
|
-
//# sourceMappingURL=_storageType-
|
|
2859
|
+
//# sourceMappingURL=_storageType-_8Ambhxc.mjs.map
|