@cobaltcore-dev/aurora 0.7.0 → 0.8.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/README.md +101 -7
- package/dist/client/AuroraApp.d.ts +38 -0
- package/dist/client/{ContentHeader-kx1Th5Sq.mjs → ContentHeader-C51H95X8.mjs} +24 -20
- package/dist/client/ContentHeader-C51H95X8.mjs.map +1 -0
- package/dist/client/{DeleteFlavorModal-C3cb7YiJ.mjs → DeleteFlavorModal-C3m7bQJu.mjs} +163 -163
- package/dist/client/{DeleteFlavorModal-C3cb7YiJ.mjs.map → DeleteFlavorModal-C3m7bQJu.mjs.map} +1 -1
- package/dist/client/{EditSecurityGroupModal-CpP54WIK.mjs → EditSecurityGroupModal-DKusxfta.mjs} +18 -18
- package/dist/client/{EditSecurityGroupModal-CpP54WIK.mjs.map → EditSecurityGroupModal-DKusxfta.mjs.map} +1 -1
- package/dist/client/{FiltersInput-DxcyR6Bp.mjs → FiltersInput-GzR4D0q6.mjs} +21 -21
- package/dist/client/{FiltersInput-DxcyR6Bp.mjs.map → FiltersInput-GzR4D0q6.mjs.map} +1 -1
- package/dist/client/{FloatingIpActionModals-BP8RWHbu.mjs → FloatingIpActionModals-CRvROJ3H.mjs} +51 -51
- package/dist/client/{FloatingIpActionModals-BP8RWHbu.mjs.map → FloatingIpActionModals-CRvROJ3H.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications-TZ3EfQg-.mjs → ImageToastNotifications-BuDXpTkl.mjs} +344 -344
- package/dist/client/{ImageToastNotifications-TZ3EfQg-.mjs.map → ImageToastNotifications-BuDXpTkl.mjs.map} +1 -1
- package/dist/client/{RouteError-QSV7qOoJ.mjs → RouteError-DVAiT0mT.mjs} +2 -2
- package/dist/client/{RouteError-QSV7qOoJ.mjs.map → RouteError-DVAiT0mT.mjs.map} +1 -1
- package/dist/client/{SortInput-CYv2_Pur.mjs → SortInput-VK7IYqQv.mjs} +6 -6
- package/dist/client/{SortInput-CYv2_Pur.mjs.map → SortInput-VK7IYqQv.mjs.map} +1 -1
- package/dist/client/{_flavorId-C2x43-6S.mjs → _flavorId-DU4gcFna.mjs} +8 -8
- package/dist/client/{_flavorId-C2x43-6S.mjs.map → _flavorId-DU4gcFna.mjs.map} +1 -1
- package/dist/client/{_flavorId-CR8ZUI-P.mjs → _flavorId-iZE2j210.mjs} +62 -62
- package/dist/client/{_flavorId-CR8ZUI-P.mjs.map → _flavorId-iZE2j210.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-BCk41_Lb.mjs → _floatingIpId-B5GMSLeQ.mjs} +2 -2
- package/dist/client/{_floatingIpId-BCk41_Lb.mjs.map → _floatingIpId-B5GMSLeQ.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-BGrOAmPT.mjs → _floatingIpId-C2-BeRmF.mjs} +27 -27
- package/dist/client/{_floatingIpId-BGrOAmPT.mjs.map → _floatingIpId-C2-BeRmF.mjs.map} +1 -1
- package/dist/client/_imageId-zmaSymWe.mjs +534 -0
- package/dist/client/{_imageId-CvfD832b.mjs.map → _imageId-zmaSymWe.mjs.map} +1 -1
- package/dist/client/_pcaId-BwTvJJgh.mjs +479 -0
- package/dist/client/_pcaId-BwTvJJgh.mjs.map +1 -0
- package/dist/client/{_pcaId-DOHycvCf.mjs → _pcaId-DUHQd0rB.mjs} +2 -2
- package/dist/client/{_pcaId-DOHycvCf.mjs.map → _pcaId-DUHQd0rB.mjs.map} +1 -1
- package/dist/client/{_projectId-DOgwFiqD.mjs → _projectId-B_2sZKk-.mjs} +2 -2
- package/dist/client/_projectId-B_2sZKk-.mjs.map +1 -0
- package/dist/client/_projectId-C8BaEHUj.mjs +273 -0
- package/dist/client/_projectId-C8BaEHUj.mjs.map +1 -0
- package/dist/client/_projectId-COt93OEF.mjs +84 -0
- package/dist/client/_projectId-COt93OEF.mjs.map +1 -0
- package/dist/client/{_securityGroupId-KKw4RPdH.mjs → _securityGroupId-DYxmXUOP.mjs} +319 -319
- package/dist/client/{_securityGroupId-KKw4RPdH.mjs.map → _securityGroupId-DYxmXUOP.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-CJJanWiY.mjs → _securityGroupId-fhK1CuZh.mjs} +2 -2
- package/dist/client/{_securityGroupId-CJJanWiY.mjs.map → _securityGroupId-fhK1CuZh.mjs.map} +1 -1
- package/dist/client/{_storageType-DYjo-6ej.mjs → _storageType-B-qGcGUQ.mjs} +699 -698
- package/dist/client/_storageType-B-qGcGUQ.mjs.map +1 -0
- package/dist/client/{_storageType-4wSxI__0.mjs → _storageType-CepuevDG.mjs} +2 -2
- package/dist/client/{_storageType-4wSxI__0.mjs.map → _storageType-CepuevDG.mjs.map} +1 -1
- package/dist/client/{about-Bo9vxGHy.mjs → about-Nsxkyh9U.mjs} +2 -2
- package/dist/client/{about-Bo9vxGHy.mjs.map → about-Nsxkyh9U.mjs.map} +1 -1
- package/dist/client/{build-DeJcDjPi.mjs → build-BdRRmNf5.mjs} +3290 -3274
- package/dist/client/{build-DeJcDjPi.mjs.map → build-BdRRmNf5.mjs.map} +1 -1
- package/dist/client/{constants-BmcGYeR-.mjs → constants-J5nm9hbP.mjs} +15 -15
- package/dist/client/{constants-BmcGYeR-.mjs.map → constants-J5nm9hbP.mjs.map} +1 -1
- package/dist/client/{flavors-BxFVqgnb.mjs → flavors-8bZVlzzb.mjs} +2 -2
- package/dist/client/{flavors-BxFVqgnb.mjs.map → flavors-8bZVlzzb.mjs.map} +1 -1
- package/dist/client/{flavors-CfdgjsZY.mjs → flavors-BfsEBUE-.mjs} +238 -221
- package/dist/client/flavors-BfsEBUE-.mjs.map +1 -0
- package/dist/client/{floatingips-ByRb82wS.mjs → floatingips-Dq4DXQYb.mjs} +90 -90
- package/dist/client/{floatingips-ByRb82wS.mjs.map → floatingips-Dq4DXQYb.mjs.map} +1 -1
- package/dist/client/{images-CenluYV8.mjs → images-8FOgju2f.mjs} +2 -2
- package/dist/client/{images-CenluYV8.mjs.map → images-8FOgju2f.mjs.map} +1 -1
- package/dist/client/images-BPnTuKFO2.mjs +1890 -0
- package/dist/client/images-BPnTuKFO2.mjs.map +1 -0
- package/dist/client/{images-C_dX7nY6.mjs → images-Dbjo4yKn.mjs} +2 -2
- package/dist/client/{images-C_dX7nY6.mjs.map → images-Dbjo4yKn.mjs.map} +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +382 -351
- package/dist/client/index.js.map +1 -1
- package/dist/client/{objects-gxSjvbvF.mjs → objects-DKWp9RtR.mjs} +2 -2
- package/dist/client/{objects-gxSjvbvF.mjs.map → objects-DKWp9RtR.mjs.map} +1 -1
- package/dist/client/{objects-BJM6YeuF.mjs → objects-DaCuy_CB.mjs} +1156 -1156
- package/dist/client/{objects-BJM6YeuF.mjs.map → objects-DaCuy_CB.mjs.map} +1 -1
- package/dist/client/pca-5wOBf_KI.mjs +202 -0
- package/dist/client/pca-5wOBf_KI.mjs.map +1 -0
- package/dist/client/{pca-Bl8NmoVZ.mjs → pca-dhrOFfrE.mjs} +2 -2
- package/dist/client/{pca-Bl8NmoVZ.mjs.map → pca-dhrOFfrE.mjs.map} +1 -1
- package/dist/client/{projects-D2iewAzu.mjs → projects-B_PPyZD1.mjs} +2 -2
- package/dist/client/{projects-D2iewAzu.mjs.map → projects-B_PPyZD1.mjs.map} +1 -1
- package/dist/client/{projects-pe2_dCnV.mjs → projects-CHYn7L5e.mjs} +2 -2
- package/dist/client/{projects-pe2_dCnV.mjs.map → projects-CHYn7L5e.mjs.map} +1 -1
- package/dist/client/{projects-CgclWI16.mjs → projects-Dmewygrp.mjs} +12 -12
- package/dist/client/projects-Dmewygrp.mjs.map +1 -0
- package/dist/client/routeInfo-CHiJfum5.mjs +73 -0
- package/dist/client/routeInfo-CHiJfum5.mjs.map +1 -0
- package/dist/client/{securitygroups-DahZkVYQ.mjs → securitygroups-CNFLu9zS.mjs} +112 -112
- package/dist/client/{securitygroups-DahZkVYQ.mjs.map → securitygroups-CNFLu9zS.mjs.map} +1 -1
- package/dist/client/{useListWithFiltering-DaYcu5AB.mjs → useListWithFiltering-v2A0-SZb.mjs} +9 -9
- package/dist/client/{useListWithFiltering-DaYcu5AB.mjs.map → useListWithFiltering-v2A0-SZb.mjs.map} +1 -1
- package/dist/server/index.d.ts +6 -1
- package/dist/server/index.js +37 -52
- package/package.json +4 -4
- package/dist/client/ContentHeader-kx1Th5Sq.mjs.map +0 -1
- package/dist/client/_imageId-CvfD832b.mjs +0 -534
- package/dist/client/_pcaId-BxBt5DXi.mjs +0 -459
- package/dist/client/_pcaId-BxBt5DXi.mjs.map +0 -1
- package/dist/client/_projectId-BDSWnMGj.mjs +0 -46
- package/dist/client/_projectId-BDSWnMGj.mjs.map +0 -1
- package/dist/client/_projectId-DOgwFiqD.mjs.map +0 -1
- package/dist/client/_projectId-DS4nR59B.mjs +0 -299
- package/dist/client/_projectId-DS4nR59B.mjs.map +0 -1
- package/dist/client/_projectId-MxcHrXW4.mjs +0 -84
- package/dist/client/_projectId-MxcHrXW4.mjs.map +0 -1
- package/dist/client/_storageType-DYjo-6ej.mjs.map +0 -1
- package/dist/client/flavors-CfdgjsZY.mjs.map +0 -1
- package/dist/client/images-CKqIXUq52.mjs +0 -1873
- package/dist/client/images-CKqIXUq52.mjs.map +0 -1
- package/dist/client/pca-RSiWpJs9.mjs +0 -182
- package/dist/client/pca-RSiWpJs9.mjs.map +0 -1
- package/dist/client/projects-CgclWI16.mjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as e, A as t, C as n, D as r, G as i, H as a, J as o, L as s, N as c, T as l, U as u, V as d, Y as f, _ as p, c as m, ct as h, d as g, et as _, f as v, it as y, k as b, lt as x, m as S, nt as C, o as w, ot as T, rt as E, t as D } from "./build-BdRRmNf5.mjs";
|
|
2
2
|
import { r as O } from "./trpcClient-BzPUgiM2.mjs";
|
|
3
|
-
import { t as k } from "./_storageType-
|
|
4
|
-
import { t as A } from "./ContentHeader-
|
|
5
|
-
import { t as j } from "./SortInput-
|
|
3
|
+
import { t as k } from "./_storageType-CepuevDG.mjs";
|
|
4
|
+
import { t as A } from "./ContentHeader-C51H95X8.mjs";
|
|
5
|
+
import { t as j } from "./SortInput-VK7IYqQv.mjs";
|
|
6
6
|
import { t as M } from "./formatBytes-CZv_XyCY.mjs";
|
|
7
7
|
import { t as N } from "./useProjectId-DBc5lpoU.mjs";
|
|
8
8
|
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
@@ -14,33 +14,33 @@ import { ErrorBoundary as te } from "react-error-boundary";
|
|
|
14
14
|
import { useVirtualizer as ne } from "@tanstack/react-virtual";
|
|
15
15
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/CreateContainerModal.tsx
|
|
16
16
|
var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLength: i = 256 }) => {
|
|
17
|
-
let { i18n: a, _: o } = W(),
|
|
17
|
+
let { i18n: a, _: o } = W(), s = N(), [c, l] = V(""), [u, d] = V(null), p = O.useUtils(), m = O.storage.swift.createContainer.useMutation({
|
|
18
18
|
onSuccess: () => {
|
|
19
|
-
|
|
20
|
-
let e =
|
|
19
|
+
p.storage.swift.listContainers.invalidate();
|
|
20
|
+
let e = c.trim();
|
|
21
21
|
n?.(e);
|
|
22
22
|
},
|
|
23
23
|
onError: (e) => {
|
|
24
|
-
r?.(
|
|
24
|
+
r?.(c.trim(), e.message);
|
|
25
25
|
},
|
|
26
26
|
onSettled: () => {
|
|
27
27
|
g();
|
|
28
28
|
}
|
|
29
29
|
}), g = () => {
|
|
30
|
-
|
|
31
|
-
}, _ = (e) => e.trim() ? e.length > i ? (
|
|
30
|
+
l(""), d(null), m.reset(), t();
|
|
31
|
+
}, _ = (e) => e.trim() ? e.length > i ? (d(a._({
|
|
32
32
|
id: "r5SQFW",
|
|
33
33
|
values: { maxContainerNameLength: i }
|
|
34
|
-
})), !1) : e.includes("/") ? (
|
|
34
|
+
})), !1) : e.includes("/") ? (d(a._({ id: "9J93Xr" })), !1) : (d(null), !0) : (d(a._({ id: "JNGYAW" })), !1), v = (e) => {
|
|
35
35
|
let t = e.target.value;
|
|
36
|
-
|
|
36
|
+
l(t), u && _(t);
|
|
37
37
|
}, y = () => {
|
|
38
|
-
_(
|
|
39
|
-
project_id:
|
|
40
|
-
container:
|
|
38
|
+
_(c) && m.mutate({
|
|
39
|
+
project_id: s,
|
|
40
|
+
container: c.trim()
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
|
-
return e ? /*#__PURE__*/ F(
|
|
43
|
+
return e ? /*#__PURE__*/ F(h, {
|
|
44
44
|
title: a._({ id: "vTh35P" }),
|
|
45
45
|
open: e,
|
|
46
46
|
onCancel: g,
|
|
@@ -48,65 +48,65 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
48
48
|
onConfirm: y,
|
|
49
49
|
cancelButtonLabel: a._({ id: "dEgA5A" }),
|
|
50
50
|
size: "small",
|
|
51
|
-
disableConfirmButton:
|
|
52
|
-
children: /*#__PURE__*/ I(
|
|
51
|
+
disableConfirmButton: m.isPending || !c.trim(),
|
|
52
|
+
children: /*#__PURE__*/ I(f, {
|
|
53
53
|
direction: "vertical",
|
|
54
54
|
gap: "6",
|
|
55
55
|
children: [/*#__PURE__*/ F("p", {
|
|
56
56
|
className: "text-theme-default",
|
|
57
57
|
children: /*#__PURE__*/ F(U, { id: "ne/GWZ" })
|
|
58
|
-
}), /*#__PURE__*/ F(
|
|
58
|
+
}), /*#__PURE__*/ F(S, {
|
|
59
59
|
label: a._({ id: "SUSS9i" }),
|
|
60
60
|
required: !0,
|
|
61
|
-
value:
|
|
61
|
+
value: c,
|
|
62
62
|
onChange: v,
|
|
63
63
|
onKeyDown: (e) => {
|
|
64
64
|
e.key === "Enter" && y();
|
|
65
65
|
},
|
|
66
|
-
invalid: !!
|
|
67
|
-
errortext:
|
|
68
|
-
disabled:
|
|
66
|
+
invalid: !!u,
|
|
67
|
+
errortext: u || void 0,
|
|
68
|
+
disabled: m.isPending,
|
|
69
69
|
autoFocus: !0,
|
|
70
70
|
placeholder: a._({ id: "W5FkH9" })
|
|
71
71
|
})]
|
|
72
72
|
})
|
|
73
73
|
}) : null;
|
|
74
|
-
}, re = ({ isOpen: e, container: t, onClose:
|
|
75
|
-
let { i18n: l, _:
|
|
74
|
+
}, re = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: o }) => {
|
|
75
|
+
let { i18n: l, _: u } = W(), d = N(), [g, y] = V(""), [b, C] = V(null), [w, T] = V(!1), E = B(""), D = () => {
|
|
76
76
|
t && navigator.clipboard.writeText(t.name).then(() => {
|
|
77
|
-
|
|
77
|
+
T(!0), setTimeout(() => T(!1), 2e3);
|
|
78
78
|
});
|
|
79
79
|
}, k = O.useUtils(), { data: A, isLoading: j, error: P } = O.storage.swift.listObjects.useQuery({
|
|
80
|
-
project_id:
|
|
80
|
+
project_id: d,
|
|
81
81
|
container: t?.name ?? "",
|
|
82
82
|
format: "json",
|
|
83
83
|
limit: 100
|
|
84
84
|
}, { enabled: e && t !== null }), L = O.storage.swift.emptyContainer.useMutation({
|
|
85
85
|
onSuccess: (e) => {
|
|
86
86
|
k.storage.swift.listContainers.invalidate(), k.storage.swift.listObjects.invalidate({
|
|
87
|
-
project_id:
|
|
88
|
-
container:
|
|
89
|
-
}),
|
|
87
|
+
project_id: d,
|
|
88
|
+
container: E.current
|
|
89
|
+
}), r?.(E.current, e);
|
|
90
90
|
},
|
|
91
91
|
onError: (e) => {
|
|
92
|
-
o?.(
|
|
92
|
+
o?.(E.current, e.message);
|
|
93
93
|
},
|
|
94
94
|
onSettled: () => {
|
|
95
95
|
R();
|
|
96
96
|
}
|
|
97
97
|
}), R = () => {
|
|
98
|
-
|
|
98
|
+
y(""), C(null), L.reset(), n();
|
|
99
99
|
}, z = (e) => {
|
|
100
100
|
let t = e.target.value;
|
|
101
|
-
|
|
101
|
+
y(t), b && C(null);
|
|
102
102
|
}, ee = () => {
|
|
103
103
|
if (t) {
|
|
104
|
-
if (
|
|
105
|
-
|
|
104
|
+
if (g.trim() !== t.name) {
|
|
105
|
+
C(l._({ id: "jS4B2+" }));
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
project_id:
|
|
108
|
+
E.current = t.name, L.mutate({
|
|
109
|
+
project_id: d,
|
|
110
110
|
container: t.name
|
|
111
111
|
});
|
|
112
112
|
}
|
|
@@ -115,7 +115,7 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
115
115
|
};
|
|
116
116
|
if (!e || !t) return null;
|
|
117
117
|
let G = A?.length ?? 0, te = !j && t.count === 0 && G === 0, ne = !j && t.count > 0 && G === 0, K = te || ne;
|
|
118
|
-
return /*#__PURE__*/ I(
|
|
118
|
+
return /*#__PURE__*/ I(h, {
|
|
119
119
|
title: /* @__PURE__ */ I("span", {
|
|
120
120
|
className: "flex max-w-[400px] items-center gap-2",
|
|
121
121
|
children: [
|
|
@@ -130,11 +130,11 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
130
130
|
}),
|
|
131
131
|
!j && !K && /*#__PURE__*/ F("button", {
|
|
132
132
|
type: "button",
|
|
133
|
-
onClick:
|
|
134
|
-
title:
|
|
133
|
+
onClick: D,
|
|
134
|
+
title: w ? l._({ id: "PiH3UR" }) : l._({ id: "NQU1Nn" }),
|
|
135
135
|
className: "text-theme-light hover:text-theme-default inline-flex items-center transition-colors",
|
|
136
|
-
children: /*#__PURE__*/ F(
|
|
137
|
-
icon:
|
|
136
|
+
children: /*#__PURE__*/ F(m, {
|
|
137
|
+
icon: w ? "checkCircle" : "contentCopy",
|
|
138
138
|
size: "16"
|
|
139
139
|
})
|
|
140
140
|
})
|
|
@@ -146,9 +146,9 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
146
146
|
confirmButtonVariant: "primary-danger",
|
|
147
147
|
onConfirm: K ? void 0 : ee,
|
|
148
148
|
cancelButtonLabel: K ? void 0 : l._({ id: "dEgA5A" }),
|
|
149
|
-
modalFooter: K ? /*#__PURE__*/ F(
|
|
149
|
+
modalFooter: K ? /*#__PURE__*/ F(v, {
|
|
150
150
|
className: "flex justify-end",
|
|
151
|
-
children: /*#__PURE__*/ F(
|
|
151
|
+
children: /*#__PURE__*/ F(x, { children: /*#__PURE__*/ F(p, {
|
|
152
152
|
variant: "primary",
|
|
153
153
|
onClick: R,
|
|
154
154
|
"data-testid": "empty-info-close-button",
|
|
@@ -156,7 +156,7 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
156
156
|
}) })
|
|
157
157
|
}) : void 0,
|
|
158
158
|
size: "small",
|
|
159
|
-
disableConfirmButton: j || L.isPending || !K && !
|
|
159
|
+
disableConfirmButton: j || L.isPending || !K && !g.trim() || !K && g.trim() !== t.name,
|
|
160
160
|
children: [P && /*#__PURE__*/ F("p", {
|
|
161
161
|
className: "text-theme-error mb-4",
|
|
162
162
|
children: (() => {
|
|
@@ -166,16 +166,16 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
166
166
|
values: { errorMessage: e }
|
|
167
167
|
});
|
|
168
168
|
})()
|
|
169
|
-
}), j ? /*#__PURE__*/ I(
|
|
169
|
+
}), j ? /*#__PURE__*/ I(f, {
|
|
170
170
|
direction: "horizontal",
|
|
171
171
|
alignment: "center",
|
|
172
172
|
gap: "2",
|
|
173
173
|
className: "py-4",
|
|
174
|
-
children: [/*#__PURE__*/ F(
|
|
174
|
+
children: [/*#__PURE__*/ F(a, { size: "small" }), /*#__PURE__*/ F(U, { id: "ujK/QN" })]
|
|
175
175
|
}) : K && !P ? /*#__PURE__*/ F("p", {
|
|
176
176
|
className: "text-theme-default py-2",
|
|
177
177
|
children: te ? /*#__PURE__*/ F(U, { id: "jNm/qL" }) : /*#__PURE__*/ F(U, { id: "WefafP" })
|
|
178
|
-
}) : P ? null : /*#__PURE__*/ I(
|
|
178
|
+
}) : P ? null : /*#__PURE__*/ I(f, {
|
|
179
179
|
direction: "vertical",
|
|
180
180
|
gap: "6",
|
|
181
181
|
children: [
|
|
@@ -210,41 +210,41 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
210
210
|
});
|
|
211
211
|
})()
|
|
212
212
|
}),
|
|
213
|
-
/*#__PURE__*/ F(
|
|
213
|
+
/*#__PURE__*/ F(_, {
|
|
214
214
|
columns: 3,
|
|
215
215
|
className: "text-sm",
|
|
216
|
-
children: /*#__PURE__*/ I(
|
|
217
|
-
/*#__PURE__*/ F(
|
|
218
|
-
/*#__PURE__*/ F(
|
|
219
|
-
/*#__PURE__*/ F(
|
|
216
|
+
children: /*#__PURE__*/ I(c, { children: [
|
|
217
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "6YtxFj" }) }),
|
|
218
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "Cj2Gtd" }) }),
|
|
219
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "sjMCOP" }) })
|
|
220
220
|
] })
|
|
221
221
|
}),
|
|
222
222
|
/*#__PURE__*/ F("div", {
|
|
223
223
|
className: "max-h-48 overflow-y-auto",
|
|
224
|
-
children: /*#__PURE__*/ F(
|
|
224
|
+
children: /*#__PURE__*/ F(_, {
|
|
225
225
|
columns: 3,
|
|
226
226
|
className: "text-sm",
|
|
227
|
-
children: A.map((e) => /*#__PURE__*/ I(
|
|
228
|
-
/*#__PURE__*/ F(
|
|
227
|
+
children: A.map((e) => /*#__PURE__*/ I(c, { children: [
|
|
228
|
+
/*#__PURE__*/ F(i, {
|
|
229
229
|
className: "max-w-[200px] truncate",
|
|
230
230
|
title: e.name,
|
|
231
231
|
children: e.name
|
|
232
232
|
}),
|
|
233
|
-
/*#__PURE__*/ F(
|
|
234
|
-
/*#__PURE__*/ F(
|
|
233
|
+
/*#__PURE__*/ F(i, { children: M(e.bytes) }),
|
|
234
|
+
/*#__PURE__*/ F(i, { children: e.last_modified ? new Date(e.last_modified).toLocaleString() : l._({ id: "fj5byd" }) })
|
|
235
235
|
] }, e.name))
|
|
236
236
|
})
|
|
237
237
|
})
|
|
238
238
|
]
|
|
239
239
|
}),
|
|
240
|
-
/*#__PURE__*/ F(
|
|
240
|
+
/*#__PURE__*/ F(S, {
|
|
241
241
|
label: l._({ id: "33F2A+" }),
|
|
242
242
|
required: !0,
|
|
243
|
-
value:
|
|
243
|
+
value: g,
|
|
244
244
|
onChange: z,
|
|
245
245
|
onKeyDown: H,
|
|
246
|
-
invalid: !!
|
|
247
|
-
errortext:
|
|
246
|
+
invalid: !!b,
|
|
247
|
+
errortext: b || void 0,
|
|
248
248
|
disabled: L.isPending,
|
|
249
249
|
autoFocus: !0,
|
|
250
250
|
placeholder: t.name
|
|
@@ -253,13 +253,13 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
253
253
|
})]
|
|
254
254
|
});
|
|
255
255
|
}, q = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) => {
|
|
256
|
-
let { i18n:
|
|
257
|
-
project_id:
|
|
256
|
+
let { i18n: o, _: s } = W(), c = N(), [l, u] = V(""), [d, m] = V(null), [g, _] = V(!1), b = O.useUtils(), { data: C, isLoading: w, error: T } = O.storage.swift.listObjects.useQuery({
|
|
257
|
+
project_id: c,
|
|
258
258
|
container: t?.name ?? "",
|
|
259
259
|
format: "json",
|
|
260
260
|
limit: 1
|
|
261
261
|
}, { enabled: e && t !== null }), { data: E, error: D } = O.storage.swift.getContainerMetadata.useQuery({
|
|
262
|
-
project_id:
|
|
262
|
+
project_id: c,
|
|
263
263
|
container: t?.name ?? ""
|
|
264
264
|
}, { enabled: e && t !== null }), k = !!(E?.versionsEnabled || E?.versionsLocation || E?.historyLocation), A = O.storage.swift.deleteContainer.useMutation({
|
|
265
265
|
onSuccess: () => {
|
|
@@ -273,21 +273,21 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
275
|
z(() => {
|
|
276
|
-
e || (
|
|
276
|
+
e || (u(""), m(null), _(!1), A.reset());
|
|
277
277
|
}, [e, t?.name]);
|
|
278
278
|
let j = () => {
|
|
279
|
-
|
|
279
|
+
u(""), m(null), _(!1), A.reset(), n();
|
|
280
280
|
}, M = (e) => {
|
|
281
281
|
let t = e.target.value;
|
|
282
|
-
|
|
282
|
+
u(t), d && m(null);
|
|
283
283
|
}, P = () => {
|
|
284
284
|
if (t && !(T || D)) {
|
|
285
|
-
if (
|
|
286
|
-
|
|
285
|
+
if (l.trim() !== "delete") {
|
|
286
|
+
m(o._({ id: "b5aNMO" }));
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
|
-
k && !
|
|
290
|
-
project_id:
|
|
289
|
+
k && !g || A.mutate({
|
|
290
|
+
project_id: c,
|
|
291
291
|
container: t.name
|
|
292
292
|
});
|
|
293
293
|
}
|
|
@@ -295,8 +295,8 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
295
295
|
e.key === "Enter" && P();
|
|
296
296
|
};
|
|
297
297
|
if (!e || !t) return null;
|
|
298
|
-
let R =
|
|
299
|
-
return /*#__PURE__*/ I(
|
|
298
|
+
let R = C?.length ?? 0, B = !w && (R > 0 || t.count > 0), ee = !w && t.count > 0 && R === 0, H = !!(T || D);
|
|
299
|
+
return /*#__PURE__*/ I(h, {
|
|
300
300
|
title: /* @__PURE__ */ I("span", {
|
|
301
301
|
className: "flex max-w-[400px] items-center gap-2",
|
|
302
302
|
children: [/*#__PURE__*/ F("span", {
|
|
@@ -310,13 +310,13 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
310
310
|
}),
|
|
311
311
|
open: e,
|
|
312
312
|
onCancel: j,
|
|
313
|
-
confirmButtonLabel: B ? void 0 :
|
|
313
|
+
confirmButtonLabel: B ? void 0 : o._({ id: "cnGeoo" }),
|
|
314
314
|
confirmButtonVariant: B ? void 0 : "primary-danger",
|
|
315
315
|
onConfirm: B ? void 0 : P,
|
|
316
|
-
cancelButtonLabel: B ? void 0 :
|
|
317
|
-
modalFooter: B ? /*#__PURE__*/ F(
|
|
316
|
+
cancelButtonLabel: B ? void 0 : o._({ id: "dEgA5A" }),
|
|
317
|
+
modalFooter: B ? /*#__PURE__*/ F(v, {
|
|
318
318
|
className: "flex justify-end",
|
|
319
|
-
children: /*#__PURE__*/ F(
|
|
319
|
+
children: /*#__PURE__*/ F(x, { children: /*#__PURE__*/ F(p, {
|
|
320
320
|
variant: "primary",
|
|
321
321
|
onClick: j,
|
|
322
322
|
"data-testid": "delete-has-objects-close-button",
|
|
@@ -324,8 +324,8 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
324
324
|
}) })
|
|
325
325
|
}) : void 0,
|
|
326
326
|
size: "small",
|
|
327
|
-
disableConfirmButton:
|
|
328
|
-
children: [(T || D) && /*#__PURE__*/ I(
|
|
327
|
+
disableConfirmButton: w || H || A.isPending || !B && l.trim() !== "delete" || !B && k && !g,
|
|
328
|
+
children: [(T || D) && /*#__PURE__*/ I(f, {
|
|
329
329
|
direction: "vertical",
|
|
330
330
|
gap: "2",
|
|
331
331
|
className: "mb-4",
|
|
@@ -350,13 +350,13 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
350
350
|
});
|
|
351
351
|
})()
|
|
352
352
|
})]
|
|
353
|
-
}),
|
|
353
|
+
}), w ? /*#__PURE__*/ I(f, {
|
|
354
354
|
direction: "horizontal",
|
|
355
355
|
alignment: "center",
|
|
356
356
|
gap: "2",
|
|
357
357
|
className: "py-4",
|
|
358
|
-
children: [/*#__PURE__*/ F(
|
|
359
|
-
}) : B ? /*#__PURE__*/ I(
|
|
358
|
+
children: [/*#__PURE__*/ F(a, { size: "small" }), /*#__PURE__*/ F(U, { id: "Z3FXyt" })]
|
|
359
|
+
}) : B ? /*#__PURE__*/ I(f, {
|
|
360
360
|
direction: "vertical",
|
|
361
361
|
gap: "3",
|
|
362
362
|
children: [/*#__PURE__*/ F("p", {
|
|
@@ -366,7 +366,7 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
366
366
|
className: "text-theme-default",
|
|
367
367
|
children: /*#__PURE__*/ F(U, { id: "x3T4pq" })
|
|
368
368
|
})]
|
|
369
|
-
}) : /*#__PURE__*/ I(
|
|
369
|
+
}) : /*#__PURE__*/ I(f, {
|
|
370
370
|
direction: "vertical",
|
|
371
371
|
gap: "6",
|
|
372
372
|
children: [
|
|
@@ -381,23 +381,23 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
381
381
|
})
|
|
382
382
|
]
|
|
383
383
|
}),
|
|
384
|
-
k && /*#__PURE__*/ F(
|
|
385
|
-
label:
|
|
386
|
-
checked:
|
|
387
|
-
onChange: (e) =>
|
|
388
|
-
invalid: !
|
|
384
|
+
k && /*#__PURE__*/ F(y, {
|
|
385
|
+
label: o._({ id: "V/8B9A" }),
|
|
386
|
+
checked: g,
|
|
387
|
+
onChange: (e) => _(e.target.checked),
|
|
388
|
+
invalid: !g
|
|
389
389
|
}),
|
|
390
|
-
/*#__PURE__*/ F(
|
|
391
|
-
label:
|
|
390
|
+
/*#__PURE__*/ F(S, {
|
|
391
|
+
label: o._({ id: "QytzQr" }),
|
|
392
392
|
required: !0,
|
|
393
|
-
value:
|
|
393
|
+
value: l,
|
|
394
394
|
onChange: M,
|
|
395
395
|
onKeyDown: L,
|
|
396
|
-
invalid: !!
|
|
397
|
-
errortext:
|
|
396
|
+
invalid: !!d,
|
|
397
|
+
errortext: d || void 0,
|
|
398
398
|
disabled: A.isPending,
|
|
399
399
|
autoFocus: !0,
|
|
400
|
-
placeholder:
|
|
400
|
+
placeholder: o._({ id: "HNlEFZ" })
|
|
401
401
|
})
|
|
402
402
|
]
|
|
403
403
|
})]
|
|
@@ -409,23 +409,23 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
409
409
|
"web-listings",
|
|
410
410
|
"web-listings-css",
|
|
411
411
|
"web-error"
|
|
412
|
-
]), ae = 50, oe = /^[a-zA-Z0-9!#$%&'*+\-.^_`|~]+$/, se = ({ isOpen: e, container:
|
|
413
|
-
let { i18n:
|
|
414
|
-
project_id:
|
|
415
|
-
container:
|
|
416
|
-
}, { enabled: e &&
|
|
417
|
-
project_id:
|
|
418
|
-
container:
|
|
419
|
-
}, { enabled: e &&
|
|
412
|
+
]), ae = 50, oe = /^[a-zA-Z0-9!#$%&'*+\-.^_`|~]+$/, se = ({ isOpen: e, container: r, onClose: o, onSuccess: l, onError: u }) => {
|
|
413
|
+
let { i18n: d, _: v } = W(), b = N(), { data: x, isLoading: C, isError: T, error: E } = O.storage.swift.getContainerMetadata.useQuery({
|
|
414
|
+
project_id: b,
|
|
415
|
+
container: r?.name ?? ""
|
|
416
|
+
}, { enabled: e && r !== null }), k = x?.read === ".r:*,.rlistings", { data: A } = O.storage.swift.getContainerPublicUrl.useQuery({
|
|
417
|
+
project_id: b,
|
|
418
|
+
container: r?.name ?? ""
|
|
419
|
+
}, { enabled: e && r !== null && k }), { data: j } = O.storage.swift.listContainers.useQuery({ project_id: b }, { enabled: e }), [M, P] = V(""), [L, ee] = V(""), H = B(null), G = R((e) => {
|
|
420
420
|
let t = e.target.value;
|
|
421
421
|
P(t), H.current && clearTimeout(H.current), H.current = setTimeout(() => ee(t), 300);
|
|
422
|
-
}, []), te = L.trim().length > 0 ? (j ?? []).filter((e) => e.name !==
|
|
422
|
+
}, []), te = L.trim().length > 0 ? (j ?? []).filter((e) => e.name !== r?.name && e.name.toLowerCase().includes(L.toLowerCase())) : [], ne = te.slice(0, ae), K = te.length - ne.length, re = O.useUtils(), [q, se] = V(""), [ce, J] = V(null), [Y, le] = V(""), [ue, de] = V(null), [X, fe] = V(""), [pe, me] = V(!1), [he, Z] = V(!1), [ge, _e] = V(""), [Q, ve] = V([]), [ye, be] = V({}), [xe, Se] = V(!1), [Ce, we] = V(""), [Te, $] = V(""), [Ee, De] = V(null), [Oe, ke] = V(null);
|
|
423
423
|
z(() => {
|
|
424
|
-
if (!
|
|
425
|
-
se(
|
|
426
|
-
let e =
|
|
424
|
+
if (!x) return;
|
|
425
|
+
se(x.quotaBytes == null ? "" : String(x.quotaBytes)), le(x.quotaCount == null ? "" : String(x.quotaCount)), Z(!!(x.versionsEnabled || x.versionsLocation || x.historyLocation)), _e(x.versionsLocation || x.historyLocation || "");
|
|
426
|
+
let e = x.metadata ?? {};
|
|
427
427
|
fe(e["web-index"] ?? ""), me(e["web-listings"] === "1" || e["web-listings"] === "true");
|
|
428
|
-
let t =
|
|
428
|
+
let t = x.metadata ?? {};
|
|
429
429
|
ve(Object.entries(t).filter(([e]) => !ie.has(e)).map(([e, t]) => ({
|
|
430
430
|
key: e,
|
|
431
431
|
value: t,
|
|
@@ -434,29 +434,29 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
434
434
|
originalKey: e,
|
|
435
435
|
originalValue: t
|
|
436
436
|
})));
|
|
437
|
-
}, [
|
|
437
|
+
}, [x]), z(() => {
|
|
438
438
|
e || Ae();
|
|
439
439
|
}, [e]);
|
|
440
440
|
let Ae = () => {
|
|
441
441
|
se(""), J(null), le(""), de(null), fe(""), me(!1), Z(!1), _e(""), P(""), ee(""), H.current && clearTimeout(H.current), ve([]), be({}), Se(!1), we(""), $(""), De(null), ke(null), je.reset();
|
|
442
442
|
}, je = O.storage.swift.updateContainerMetadata.useMutation({
|
|
443
443
|
onSuccess: () => {
|
|
444
|
-
re.storage.swift.getContainerMetadata.invalidate({ container:
|
|
444
|
+
re.storage.swift.getContainerMetadata.invalidate({ container: r.name }), re.storage.swift.listContainers.invalidate(), l?.(r.name), Ue();
|
|
445
445
|
},
|
|
446
446
|
onError: (e) => {
|
|
447
|
-
|
|
447
|
+
u?.(r.name, e.message);
|
|
448
448
|
}
|
|
449
449
|
}), Me = () => {
|
|
450
450
|
let e = !0;
|
|
451
|
-
return q !== "" && (isNaN(Number(q)) || Number(q) < 0) ? (J(
|
|
452
|
-
}, Ne = (e, t) => e.trim() ? oe.test(e) ? /[a-zA-Z0-9]/.test(e) ? ie.has(e.toLowerCase()) ?
|
|
451
|
+
return q !== "" && (isNaN(Number(q)) || Number(q) < 0) ? (J(d._({ id: "AuQtzx" })), e = !1) : J(null), Y !== "" && (isNaN(Number(Y)) || Number(Y) < 0) ? (de(d._({ id: "AuQtzx" })), e = !1) : de(null), e;
|
|
452
|
+
}, Ne = (e, t) => e.trim() ? oe.test(e) ? /[a-zA-Z0-9]/.test(e) ? ie.has(e.toLowerCase()) ? d._({ id: "JeRXll" }) : Q.some((n) => n.key.toLowerCase() === e.toLowerCase() && n.originalKey !== t) ? d._({ id: "i6/ygf" }) : null : d._({ id: "dTNzBI" }) : d._({ id: "XYZLy9" }) : d._({ id: "QV1ZPO" }), Pe = () => {
|
|
453
453
|
let e = Ne(Ce);
|
|
454
454
|
if (e) {
|
|
455
455
|
De(e);
|
|
456
456
|
return;
|
|
457
457
|
}
|
|
458
458
|
if (!Te.trim()) {
|
|
459
|
-
ke(
|
|
459
|
+
ke(d._({ id: "hXUWyd" }));
|
|
460
460
|
return;
|
|
461
461
|
}
|
|
462
462
|
ve([...Q, {
|
|
@@ -482,7 +482,7 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
484
484
|
if (!t.value.trim()) {
|
|
485
|
-
be({ [`edit-${e}`]:
|
|
485
|
+
be({ [`edit-${e}`]: d._({ id: "hXUWyd" }) });
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
488
|
ve(Q.map((t, n) => n === e ? {
|
|
@@ -517,32 +517,32 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
517
517
|
return delete n[`edit-${e}`], n;
|
|
518
518
|
});
|
|
519
519
|
}, He = () => {
|
|
520
|
-
if (!
|
|
521
|
-
let e =
|
|
520
|
+
if (!r || !Me()) return;
|
|
521
|
+
let e = x?.metadata ?? {}, t = {}, n = [];
|
|
522
522
|
Q.forEach((e) => {
|
|
523
|
-
(e.isNew || e.value !== e.originalValue || e.key !== e.originalKey) && (
|
|
523
|
+
(e.isNew || e.value !== e.originalValue || e.key !== e.originalKey) && (t[e.key] = e.value, !e.isNew && e.originalKey && e.key !== e.originalKey && n.push(e.originalKey));
|
|
524
524
|
});
|
|
525
525
|
let i = Object.keys(e).filter((e) => !ie.has(e)), a = Q.map((e) => e.originalKey).filter(Boolean);
|
|
526
526
|
i.forEach((e) => {
|
|
527
|
-
!a.includes(e) && !
|
|
528
|
-
}), k && (X ?
|
|
529
|
-
let o = !!(
|
|
527
|
+
!a.includes(e) && !n.includes(e) && n.push(e);
|
|
528
|
+
}), k && (X ? t["web-index"] = X : x?.metadata?.["web-index"] && n.push("web-index"), pe ? t["web-listings"] = "1" : x?.metadata?.["web-listings"] && n.push("web-listings"));
|
|
529
|
+
let o = !!(x?.versionsEnabled || x?.versionsLocation || x?.historyLocation), s = x?.versionsLocation || x?.historyLocation || "";
|
|
530
530
|
je.mutate({
|
|
531
|
-
project_id:
|
|
532
|
-
container:
|
|
533
|
-
metadata:
|
|
534
|
-
removeMetadata:
|
|
531
|
+
project_id: b,
|
|
532
|
+
container: r.name,
|
|
533
|
+
metadata: t,
|
|
534
|
+
removeMetadata: n.length ? n : void 0,
|
|
535
535
|
quotaBytes: q === "" ? void 0 : Number(q),
|
|
536
536
|
quotaCount: Y === "" ? void 0 : Number(Y),
|
|
537
537
|
versionsLocation: he && (!o || ge !== s) && ge ? ge : void 0,
|
|
538
538
|
removeVersionsLocation: !he && o ? !0 : void 0
|
|
539
539
|
});
|
|
540
540
|
}, Ue = () => {
|
|
541
|
-
Ae(),
|
|
541
|
+
Ae(), o();
|
|
542
542
|
};
|
|
543
|
-
if (!e || !
|
|
544
|
-
let We =
|
|
545
|
-
return /*#__PURE__*/ I(
|
|
543
|
+
if (!e || !r) return null;
|
|
544
|
+
let We = C || je.isPending, Ge = T && !C, Ke = Q.some((e) => e.isEditing), qe = x?.quotaBytes == null ? "" : String(x.quotaBytes), Je = x?.quotaCount == null ? "" : String(x.quotaCount), Ye = !!x?.versionsEnabled, Xe = x?.versionsLocation || x?.historyLocation || "", Ze = x?.metadata?.["web-index"] ?? "", Qe = x?.metadata?.["web-listings"] === "1" || x?.metadata?.["web-listings"] === "true", $e = Object.keys(x?.metadata ?? {}).filter((e) => !ie.has(e)), et = Q.length === $e.length && Q.every((e) => !e.isNew && e.key === e.originalKey && e.value === e.originalValue), tt = q === qe && Y === Je && he === Ye && ge === Xe && X === Ze && pe === Qe && et, nt = x?.quotaBytes == null ? null : `${x.quotaBytes} B`;
|
|
545
|
+
return /*#__PURE__*/ I(h, {
|
|
546
546
|
title: /*#__PURE__*/ I("span", {
|
|
547
547
|
className: "flex max-w-[500px] items-center gap-2",
|
|
548
548
|
children: [/*#__PURE__*/ F("span", {
|
|
@@ -550,15 +550,15 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
550
550
|
children: /*#__PURE__*/ F(U, { id: "y02Bu1" })
|
|
551
551
|
}), /*#__PURE__*/ F("span", {
|
|
552
552
|
className: "truncate",
|
|
553
|
-
title:
|
|
554
|
-
children:
|
|
553
|
+
title: r.name,
|
|
554
|
+
children: r.name
|
|
555
555
|
})]
|
|
556
556
|
}),
|
|
557
557
|
open: e,
|
|
558
558
|
onCancel: Ue,
|
|
559
|
-
confirmButtonLabel:
|
|
559
|
+
confirmButtonLabel: d._({ id: "tfDRzk" }),
|
|
560
560
|
onConfirm: He,
|
|
561
|
-
cancelButtonLabel:
|
|
561
|
+
cancelButtonLabel: d._({ id: "dEgA5A" }),
|
|
562
562
|
size: "large",
|
|
563
563
|
disableConfirmButton: We || xe || Ke || tt || Ge,
|
|
564
564
|
children: [je.isError && /*#__PURE__*/ F("p", {
|
|
@@ -570,12 +570,12 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
570
570
|
values: { errorMessage: e }
|
|
571
571
|
});
|
|
572
572
|
})()
|
|
573
|
-
}),
|
|
573
|
+
}), C ? /*#__PURE__*/ I(f, {
|
|
574
574
|
direction: "horizontal",
|
|
575
575
|
alignment: "center",
|
|
576
576
|
gap: "2",
|
|
577
577
|
className: "py-8",
|
|
578
|
-
children: [/*#__PURE__*/ F(
|
|
578
|
+
children: [/*#__PURE__*/ F(a, { size: "small" }), /*#__PURE__*/ F(U, { id: "WRZ3Mt" })]
|
|
579
579
|
}) : Ge ? /*#__PURE__*/ F("p", {
|
|
580
580
|
className: "text-theme-error py-8 text-center",
|
|
581
581
|
children: /*#__PURE__*/ F(U, {
|
|
@@ -584,43 +584,43 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
584
584
|
})
|
|
585
585
|
}) : /*#__PURE__*/ F("div", {
|
|
586
586
|
className: "max-h-[65vh] overflow-y-auto pr-1 pl-1",
|
|
587
|
-
children: /*#__PURE__*/ I(
|
|
587
|
+
children: /*#__PURE__*/ I(f, {
|
|
588
588
|
direction: "vertical",
|
|
589
589
|
gap: "6",
|
|
590
590
|
children: [
|
|
591
591
|
/*#__PURE__*/ I("div", {
|
|
592
592
|
className: "grid grid-cols-2 gap-4",
|
|
593
|
-
children: [/*#__PURE__*/ F(
|
|
594
|
-
label:
|
|
595
|
-
value: String(
|
|
593
|
+
children: [/*#__PURE__*/ F(S, {
|
|
594
|
+
label: d._({ id: "z45o5B" }),
|
|
595
|
+
value: String(r.count),
|
|
596
596
|
disabled: !0,
|
|
597
597
|
readOnly: !0
|
|
598
|
-
}), /*#__PURE__*/ F(
|
|
599
|
-
label:
|
|
600
|
-
value:
|
|
598
|
+
}), /*#__PURE__*/ F(S, {
|
|
599
|
+
label: d._({ id: "/InK0O" }),
|
|
600
|
+
value: x?.bytesUsed == null ? `${r.bytes.toLocaleString()} B` : `${x.bytesUsed.toLocaleString()} B`,
|
|
601
601
|
disabled: !0,
|
|
602
602
|
readOnly: !0
|
|
603
603
|
})]
|
|
604
604
|
}),
|
|
605
605
|
/*#__PURE__*/ I("div", {
|
|
606
606
|
className: "grid grid-cols-2 gap-4",
|
|
607
|
-
children: [/*#__PURE__*/ F("div", { children: /*#__PURE__*/ F(
|
|
608
|
-
label:
|
|
607
|
+
children: [/*#__PURE__*/ F("div", { children: /*#__PURE__*/ F(S, {
|
|
608
|
+
label: d._({ id: "k0vAWv" }),
|
|
609
609
|
value: Y,
|
|
610
610
|
onChange: (e) => {
|
|
611
611
|
le(e.target.value), ue && de(null);
|
|
612
612
|
},
|
|
613
|
-
placeholder:
|
|
613
|
+
placeholder: d._({ id: "qtoOYG" }),
|
|
614
614
|
invalid: !!ue,
|
|
615
615
|
errortext: ue ?? void 0,
|
|
616
616
|
disabled: We
|
|
617
|
-
}) }), /*#__PURE__*/ F("div", { children: /*#__PURE__*/ F(
|
|
618
|
-
label:
|
|
617
|
+
}) }), /*#__PURE__*/ F("div", { children: /*#__PURE__*/ F(S, {
|
|
618
|
+
label: d._({ id: "KOpPMt" }),
|
|
619
619
|
value: q,
|
|
620
620
|
onChange: (e) => {
|
|
621
621
|
se(e.target.value), ce && J(null);
|
|
622
622
|
},
|
|
623
|
-
placeholder:
|
|
623
|
+
placeholder: d._({ id: "qtoOYG" }),
|
|
624
624
|
invalid: !!ce,
|
|
625
625
|
errortext: ce ?? void 0,
|
|
626
626
|
disabled: We,
|
|
@@ -640,7 +640,7 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
640
640
|
children: /*#__PURE__*/ F(U, { id: "Alx2/L" })
|
|
641
641
|
})
|
|
642
642
|
]
|
|
643
|
-
}), /*#__PURE__*/ F(
|
|
643
|
+
}), /*#__PURE__*/ F(S, {
|
|
644
644
|
value: A,
|
|
645
645
|
disabled: !0,
|
|
646
646
|
readOnly: !0
|
|
@@ -648,14 +648,14 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
648
648
|
/*#__PURE__*/ I("div", { children: [/*#__PURE__*/ F("p", {
|
|
649
649
|
className: "text-theme-default mb-3 text-sm font-semibold",
|
|
650
650
|
children: /*#__PURE__*/ F(U, { id: "6CDYXS" })
|
|
651
|
-
}), k ? /*#__PURE__*/ I(
|
|
651
|
+
}), k ? /*#__PURE__*/ I(f, {
|
|
652
652
|
direction: "vertical",
|
|
653
653
|
gap: "4",
|
|
654
|
-
children: [/*#__PURE__*/ I(
|
|
654
|
+
children: [/*#__PURE__*/ I(f, {
|
|
655
655
|
direction: "vertical",
|
|
656
656
|
gap: "1",
|
|
657
|
-
children: [/*#__PURE__*/ F(
|
|
658
|
-
label:
|
|
657
|
+
children: [/*#__PURE__*/ F(y, {
|
|
658
|
+
label: d._({ id: "6+7EwD" }),
|
|
659
659
|
checked: !!X,
|
|
660
660
|
onChange: (e) => {
|
|
661
661
|
e.target.checked ? X || fe("index.html") : fe("");
|
|
@@ -663,7 +663,7 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
663
663
|
disabled: We
|
|
664
664
|
}), /*#__PURE__*/ F("div", {
|
|
665
665
|
className: "pl-6",
|
|
666
|
-
children: /*#__PURE__*/ F(
|
|
666
|
+
children: /*#__PURE__*/ F(S, {
|
|
667
667
|
value: X,
|
|
668
668
|
onChange: (e) => fe(e.target.value),
|
|
669
669
|
placeholder: "index.html",
|
|
@@ -671,22 +671,22 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
671
671
|
className: "flex-1"
|
|
672
672
|
})
|
|
673
673
|
})]
|
|
674
|
-
}), /*#__PURE__*/ I(
|
|
674
|
+
}), /*#__PURE__*/ I(f, {
|
|
675
675
|
direction: "horizontal",
|
|
676
676
|
alignment: "start",
|
|
677
677
|
gap: "2",
|
|
678
|
-
children: [/*#__PURE__*/ F(
|
|
679
|
-
label:
|
|
678
|
+
children: [/*#__PURE__*/ F(y, {
|
|
679
|
+
label: d._({ id: "NeUjqc" }),
|
|
680
680
|
checked: pe,
|
|
681
681
|
onChange: (e) => me(e.target.checked),
|
|
682
682
|
disabled: We
|
|
683
|
-
}), /*#__PURE__*/ I(
|
|
683
|
+
}), /*#__PURE__*/ I(t, {
|
|
684
684
|
triggerEvent: "hover",
|
|
685
|
-
children: [/*#__PURE__*/ F(
|
|
685
|
+
children: [/*#__PURE__*/ F(w, { children: /*#__PURE__*/ F(m, {
|
|
686
686
|
icon: "help",
|
|
687
687
|
size: "16",
|
|
688
688
|
className: "text-theme-light cursor-help"
|
|
689
|
-
}) }), /*#__PURE__*/ F(
|
|
689
|
+
}) }), /*#__PURE__*/ F(n, {
|
|
690
690
|
className: "z-10 max-w-[220px]",
|
|
691
691
|
children: /*#__PURE__*/ F(U, { id: "Oxl1UN" })
|
|
692
692
|
})]
|
|
@@ -702,23 +702,23 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
702
702
|
/*#__PURE__*/ I("div", { children: [/*#__PURE__*/ F("p", {
|
|
703
703
|
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
704
704
|
children: /*#__PURE__*/ F(U, { id: "jNzyQo" })
|
|
705
|
-
}), Ye && !ge ? /*#__PURE__*/ F(
|
|
706
|
-
label:
|
|
705
|
+
}), Ye && !ge ? /*#__PURE__*/ F(y, {
|
|
706
|
+
label: d._({ id: "Nvfd2b" }),
|
|
707
707
|
checked: !0,
|
|
708
708
|
onChange: (e) => {
|
|
709
709
|
e.target.checked || (Z(!1), _e(""), P(""), ee(""));
|
|
710
710
|
},
|
|
711
711
|
disabled: !0
|
|
712
|
-
}) : !he && !ge ? /*#__PURE__*/ F(
|
|
713
|
-
label:
|
|
712
|
+
}) : !he && !ge ? /*#__PURE__*/ F(y, {
|
|
713
|
+
label: d._({ id: "WyKwnD" }),
|
|
714
714
|
checked: !1,
|
|
715
715
|
onChange: (e) => Z(e.target.checked),
|
|
716
716
|
disabled: We
|
|
717
|
-
}) : /*#__PURE__*/ I(
|
|
717
|
+
}) : /*#__PURE__*/ I(f, {
|
|
718
718
|
direction: "vertical",
|
|
719
719
|
gap: "1",
|
|
720
|
-
children: [/*#__PURE__*/ F(
|
|
721
|
-
label:
|
|
720
|
+
children: [/*#__PURE__*/ F(y, {
|
|
721
|
+
label: d._({ id: "b0uU1G" }),
|
|
722
722
|
checked: he,
|
|
723
723
|
onChange: (e) => {
|
|
724
724
|
Z(e.target.checked), e.target.checked || (_e(""), P(""), ee(""));
|
|
@@ -726,16 +726,16 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
726
726
|
disabled: We
|
|
727
727
|
}), he && /*#__PURE__*/ F("div", {
|
|
728
728
|
className: "pl-6",
|
|
729
|
-
children: /*#__PURE__*/ F(
|
|
729
|
+
children: /*#__PURE__*/ F(g, {
|
|
730
730
|
value: ge,
|
|
731
731
|
onChange: (e) => _e(e),
|
|
732
732
|
onInputChange: G,
|
|
733
|
-
placeholder:
|
|
733
|
+
placeholder: d._({ id: "a13wDR" }),
|
|
734
734
|
helptext: (() => {
|
|
735
|
-
if (M.trim().length === 0) return
|
|
735
|
+
if (M.trim().length === 0) return d._({ id: "c+fUtV" });
|
|
736
736
|
if (K > 0) {
|
|
737
737
|
let e = ae, t = te.length;
|
|
738
|
-
return
|
|
738
|
+
return d._({
|
|
739
739
|
id: "qzhUb9",
|
|
740
740
|
values: {
|
|
741
741
|
maxOptions: e,
|
|
@@ -745,7 +745,7 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
745
745
|
}
|
|
746
746
|
})(),
|
|
747
747
|
disabled: We,
|
|
748
|
-
children: ne.map((e) => /*#__PURE__*/ F(
|
|
748
|
+
children: ne.map((e) => /*#__PURE__*/ F(D, {
|
|
749
749
|
value: e.name,
|
|
750
750
|
children: e.name
|
|
751
751
|
}, e.name))
|
|
@@ -753,7 +753,7 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
753
753
|
})]
|
|
754
754
|
})] }),
|
|
755
755
|
/*#__PURE__*/ I("div", { children: [
|
|
756
|
-
/*#__PURE__*/ I(
|
|
756
|
+
/*#__PURE__*/ I(f, {
|
|
757
757
|
direction: "horizontal",
|
|
758
758
|
alignment: "center",
|
|
759
759
|
distribution: "between",
|
|
@@ -766,11 +766,11 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
766
766
|
children: /*#__PURE__*/ F(U, { id: "kuYWaD" })
|
|
767
767
|
})]
|
|
768
768
|
}),
|
|
769
|
-
/*#__PURE__*/ F(
|
|
769
|
+
/*#__PURE__*/ F(f, {
|
|
770
770
|
direction: "horizontal",
|
|
771
771
|
className: "jn:bg-theme-background-lvl-1 justify-end p-2",
|
|
772
|
-
children: /*#__PURE__*/ F(
|
|
773
|
-
label:
|
|
772
|
+
children: /*#__PURE__*/ F(p, {
|
|
773
|
+
label: d._({ id: "sWBLli" }),
|
|
774
774
|
onClick: () => Se(!0),
|
|
775
775
|
variant: "primary",
|
|
776
776
|
icon: "addCircle",
|
|
@@ -778,54 +778,54 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
778
778
|
disabled: xe || Ke || We
|
|
779
779
|
})
|
|
780
780
|
}),
|
|
781
|
-
/*#__PURE__*/ I(
|
|
781
|
+
/*#__PURE__*/ I(_, {
|
|
782
782
|
columns: 3,
|
|
783
783
|
children: [
|
|
784
|
-
/*#__PURE__*/ I(
|
|
785
|
-
/*#__PURE__*/ F(
|
|
786
|
-
/*#__PURE__*/ F(
|
|
787
|
-
/*#__PURE__*/ F(
|
|
784
|
+
/*#__PURE__*/ I(c, { children: [
|
|
785
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "7sMeHQ" }) }),
|
|
786
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "wMHvYH" }) }),
|
|
787
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "7L01XJ" }) })
|
|
788
788
|
] }),
|
|
789
|
-
xe && /*#__PURE__*/ I(
|
|
790
|
-
/*#__PURE__*/ F(
|
|
789
|
+
xe && /*#__PURE__*/ I(c, { children: [
|
|
790
|
+
/*#__PURE__*/ F(i, { children: /*#__PURE__*/ F(S, {
|
|
791
791
|
value: Ce,
|
|
792
792
|
onChange: (e) => {
|
|
793
793
|
we(e.target.value), Ee && De(null);
|
|
794
794
|
},
|
|
795
|
-
placeholder:
|
|
795
|
+
placeholder: d._({ id: "x9AdZ8" }),
|
|
796
796
|
errortext: Ee ?? void 0,
|
|
797
797
|
invalid: !!Ee,
|
|
798
798
|
autoFocus: !0
|
|
799
799
|
}) }),
|
|
800
|
-
/*#__PURE__*/ F(
|
|
800
|
+
/*#__PURE__*/ F(i, { children: /*#__PURE__*/ F(S, {
|
|
801
801
|
value: Te,
|
|
802
802
|
onChange: (e) => {
|
|
803
803
|
$(e.target.value), Oe && ke(null);
|
|
804
804
|
},
|
|
805
|
-
placeholder:
|
|
805
|
+
placeholder: d._({ id: "wMHvYH" }),
|
|
806
806
|
errortext: Oe ?? void 0,
|
|
807
807
|
invalid: !!Oe
|
|
808
808
|
}) }),
|
|
809
|
-
/*#__PURE__*/ F(
|
|
809
|
+
/*#__PURE__*/ F(i, { children: /*#__PURE__*/ I(f, {
|
|
810
810
|
direction: "horizontal",
|
|
811
811
|
gap: "2",
|
|
812
|
-
children: [/*#__PURE__*/ F(
|
|
812
|
+
children: [/*#__PURE__*/ F(p, {
|
|
813
813
|
size: "small",
|
|
814
814
|
variant: "primary",
|
|
815
815
|
onClick: Pe,
|
|
816
816
|
icon: "check",
|
|
817
|
-
title:
|
|
818
|
-
}), /*#__PURE__*/ F(
|
|
817
|
+
title: d._({ id: "tfDRzk" })
|
|
818
|
+
}), /*#__PURE__*/ F(p, {
|
|
819
819
|
size: "small",
|
|
820
820
|
variant: "subdued",
|
|
821
821
|
onClick: Fe,
|
|
822
822
|
icon: "close",
|
|
823
|
-
title:
|
|
823
|
+
title: d._({ id: "bzSI52" })
|
|
824
824
|
})]
|
|
825
825
|
}) })
|
|
826
826
|
] }),
|
|
827
|
-
Q.map((e, t) => /*#__PURE__*/ I(
|
|
828
|
-
/*#__PURE__*/ F(
|
|
827
|
+
Q.map((e, t) => /*#__PURE__*/ I(c, { children: [
|
|
828
|
+
/*#__PURE__*/ F(i, { children: e.isEditing ? /*#__PURE__*/ F(S, {
|
|
829
829
|
value: e.key,
|
|
830
830
|
onChange: (e) => Be(t, e.target.value),
|
|
831
831
|
errortext: ye[`edit-${t}`],
|
|
@@ -835,7 +835,7 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
835
835
|
title: e.key,
|
|
836
836
|
children: e.key
|
|
837
837
|
}) }),
|
|
838
|
-
/*#__PURE__*/ F(
|
|
838
|
+
/*#__PURE__*/ F(i, { children: e.isEditing ? /*#__PURE__*/ F(S, {
|
|
839
839
|
value: e.value,
|
|
840
840
|
onChange: (e) => Ve(t, e.target.value)
|
|
841
841
|
}) : /*#__PURE__*/ F("span", {
|
|
@@ -843,46 +843,46 @@ var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLeng
|
|
|
843
843
|
title: e.value,
|
|
844
844
|
children: e.value
|
|
845
845
|
}) }),
|
|
846
|
-
/*#__PURE__*/ F(
|
|
846
|
+
/*#__PURE__*/ F(i, { children: e.isEditing ? /*#__PURE__*/ I(f, {
|
|
847
847
|
direction: "horizontal",
|
|
848
848
|
gap: "2",
|
|
849
|
-
children: [/*#__PURE__*/ F(
|
|
849
|
+
children: [/*#__PURE__*/ F(p, {
|
|
850
850
|
size: "small",
|
|
851
851
|
variant: "primary",
|
|
852
852
|
onClick: () => Le(t),
|
|
853
853
|
icon: "check",
|
|
854
|
-
title:
|
|
855
|
-
}), /*#__PURE__*/ F(
|
|
854
|
+
title: d._({ id: "tfDRzk" })
|
|
855
|
+
}), /*#__PURE__*/ F(p, {
|
|
856
856
|
size: "small",
|
|
857
857
|
variant: "subdued",
|
|
858
858
|
onClick: () => Re(t),
|
|
859
859
|
icon: "close",
|
|
860
|
-
title:
|
|
860
|
+
title: d._({ id: "bzSI52" })
|
|
861
861
|
})]
|
|
862
|
-
}) : /*#__PURE__*/ I(
|
|
862
|
+
}) : /*#__PURE__*/ I(f, {
|
|
863
863
|
direction: "horizontal",
|
|
864
864
|
gap: "2",
|
|
865
|
-
children: [/*#__PURE__*/ F(
|
|
865
|
+
children: [/*#__PURE__*/ F(p, {
|
|
866
866
|
size: "small",
|
|
867
867
|
variant: "subdued",
|
|
868
868
|
onClick: () => Ie(t),
|
|
869
869
|
icon: "edit",
|
|
870
|
-
title:
|
|
870
|
+
title: d._({ id: "ePK91l" }),
|
|
871
871
|
disabled: xe || Ke || We
|
|
872
|
-
}), /*#__PURE__*/ F(
|
|
872
|
+
}), /*#__PURE__*/ F(p, {
|
|
873
873
|
size: "small",
|
|
874
874
|
variant: "primary-danger",
|
|
875
875
|
onClick: () => ze(t),
|
|
876
876
|
icon: "deleteForever",
|
|
877
|
-
title:
|
|
877
|
+
title: d._({ id: "cnGeoo" }),
|
|
878
878
|
disabled: xe || Ke || We
|
|
879
879
|
})]
|
|
880
880
|
}) })
|
|
881
881
|
] }, t)),
|
|
882
|
-
Q.length === 0 && !xe && /*#__PURE__*/ F(
|
|
882
|
+
Q.length === 0 && !xe && /*#__PURE__*/ F(c, { children: /*#__PURE__*/ F(i, {
|
|
883
883
|
colSpan: 3,
|
|
884
884
|
className: "py-6 text-center",
|
|
885
|
-
children: /*#__PURE__*/ F(
|
|
885
|
+
children: /*#__PURE__*/ F(f, {
|
|
886
886
|
alignment: "center",
|
|
887
887
|
children: /*#__PURE__*/ F("span", {
|
|
888
888
|
className: "text-theme-light text-sm",
|
|
@@ -1020,23 +1020,23 @@ function X(e) {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
1022
|
var fe = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) => {
|
|
1023
|
-
let { i18n:
|
|
1023
|
+
let { i18n: o, _: s } = W(), c = N(), [l, d] = V(""), [m, g] = V(""), [_, v] = V(!1), [b, x] = V(!1);
|
|
1024
1024
|
z(() => {
|
|
1025
|
-
!
|
|
1026
|
-
}, [
|
|
1027
|
-
let { data:
|
|
1028
|
-
project_id:
|
|
1025
|
+
!l.trim() && !m.trim() && x(!1);
|
|
1026
|
+
}, [l, m]);
|
|
1027
|
+
let { data: S, isLoading: C, isError: w, error: T } = O.storage.swift.getContainerMetadata.useQuery({
|
|
1028
|
+
project_id: c,
|
|
1029
1029
|
container: t?.name ?? ""
|
|
1030
1030
|
}, { enabled: e && t !== null });
|
|
1031
1031
|
z(() => {
|
|
1032
|
-
if (!
|
|
1033
|
-
let e =
|
|
1034
|
-
d(e),
|
|
1035
|
-
}, [
|
|
1032
|
+
if (!S) return;
|
|
1033
|
+
let e = S.read ?? "", t = S.write ?? "";
|
|
1034
|
+
d(e), g(t), v(le(e));
|
|
1035
|
+
}, [S]);
|
|
1036
1036
|
let E = O.useUtils(), D = O.storage.swift.updateContainerMetadata.useMutation({
|
|
1037
1037
|
onSuccess: () => {
|
|
1038
1038
|
E.storage.swift.getContainerMetadata.invalidate({
|
|
1039
|
-
project_id:
|
|
1039
|
+
project_id: c,
|
|
1040
1040
|
container: t.name
|
|
1041
1041
|
}), E.storage.swift.listContainers.invalidate(), r?.(t.name), A();
|
|
1042
1042
|
},
|
|
@@ -1046,28 +1046,28 @@ var fe = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) =>
|
|
|
1046
1046
|
}), k = B(D.reset);
|
|
1047
1047
|
k.current = D.reset;
|
|
1048
1048
|
let A = () => {
|
|
1049
|
-
d(""),
|
|
1049
|
+
d(""), g(""), v(!1), x(!1), D.reset(), n();
|
|
1050
1050
|
};
|
|
1051
1051
|
z(() => {
|
|
1052
|
-
e || (d(""),
|
|
1052
|
+
e || (d(""), g(""), v(!1), k.current());
|
|
1053
1053
|
}, [e]);
|
|
1054
1054
|
let j = (e) => {
|
|
1055
1055
|
let t = e.target.checked;
|
|
1056
|
-
|
|
1056
|
+
v(t), d((e) => t ? ue(e) : de(e));
|
|
1057
1057
|
}, M = (e) => {
|
|
1058
1058
|
let t = e.target.value;
|
|
1059
|
-
d(t),
|
|
1059
|
+
d(t), v(le(t));
|
|
1060
1060
|
}, L = () => {
|
|
1061
1061
|
t && D.mutate({
|
|
1062
|
-
project_id:
|
|
1062
|
+
project_id: c,
|
|
1063
1063
|
container: t.name,
|
|
1064
|
-
read:
|
|
1065
|
-
write:
|
|
1064
|
+
read: l.trim(),
|
|
1065
|
+
write: m.trim()
|
|
1066
1066
|
});
|
|
1067
1067
|
};
|
|
1068
1068
|
if (!e || !t) return null;
|
|
1069
|
-
let R =
|
|
1070
|
-
return /*#__PURE__*/ I(
|
|
1069
|
+
let R = C || D.isPending, ee = l.trim().length > 0 || m.trim().length > 0, H = J(l), G = J(m);
|
|
1070
|
+
return /*#__PURE__*/ I(h, {
|
|
1071
1071
|
title: /* @__PURE__ */ I("span", {
|
|
1072
1072
|
className: "flex items-center gap-2",
|
|
1073
1073
|
children: [/*#__PURE__*/ F(U, { id: "6Kjltl" }), /*#__PURE__*/ F("span", {
|
|
@@ -1078,11 +1078,11 @@ var fe = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) =>
|
|
|
1078
1078
|
}),
|
|
1079
1079
|
open: e,
|
|
1080
1080
|
onCancel: A,
|
|
1081
|
-
confirmButtonLabel:
|
|
1081
|
+
confirmButtonLabel: o._({ id: "tfDRzk" }),
|
|
1082
1082
|
onConfirm: L,
|
|
1083
|
-
cancelButtonLabel:
|
|
1083
|
+
cancelButtonLabel: o._({ id: "dEgA5A" }),
|
|
1084
1084
|
size: "xl",
|
|
1085
|
-
disableConfirmButton: R ||
|
|
1085
|
+
disableConfirmButton: R || w,
|
|
1086
1086
|
children: [D.isError && /*#__PURE__*/ F("p", {
|
|
1087
1087
|
className: "text-theme-error mb-4",
|
|
1088
1088
|
children: (() => {
|
|
@@ -1103,13 +1103,13 @@ var fe = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) =>
|
|
|
1103
1103
|
className: "text-theme-default",
|
|
1104
1104
|
children: /*#__PURE__*/ F(U, { id: "g9m7gK" })
|
|
1105
1105
|
})]
|
|
1106
|
-
}),
|
|
1106
|
+
}), C ? /*#__PURE__*/ I(f, {
|
|
1107
1107
|
direction: "horizontal",
|
|
1108
1108
|
alignment: "center",
|
|
1109
1109
|
gap: "2",
|
|
1110
1110
|
className: "py-6",
|
|
1111
|
-
children: [/*#__PURE__*/ F(
|
|
1112
|
-
}) :
|
|
1111
|
+
children: [/*#__PURE__*/ F(a, { size: "small" }), /*#__PURE__*/ F(U, { id: "poCbZw" })]
|
|
1112
|
+
}) : w ? /*#__PURE__*/ F("p", {
|
|
1113
1113
|
className: "text-theme-error py-2",
|
|
1114
1114
|
children: /*#__PURE__*/ F(U, {
|
|
1115
1115
|
id: "QNHur0",
|
|
@@ -1119,46 +1119,46 @@ var fe = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) =>
|
|
|
1119
1119
|
className: "flex gap-6",
|
|
1120
1120
|
children: [/*#__PURE__*/ F("div", {
|
|
1121
1121
|
className: "min-w-0 flex-1",
|
|
1122
|
-
children: /*#__PURE__*/ I(
|
|
1122
|
+
children: /*#__PURE__*/ I(f, {
|
|
1123
1123
|
direction: "vertical",
|
|
1124
1124
|
gap: "6",
|
|
1125
1125
|
children: [
|
|
1126
1126
|
/*#__PURE__*/ I("div", { children: [
|
|
1127
|
-
/*#__PURE__*/ F(me, { label:
|
|
1128
|
-
/*#__PURE__*/ F(
|
|
1129
|
-
value:
|
|
1127
|
+
/*#__PURE__*/ F(me, { label: o._({ id: "SBGiGm" }) }),
|
|
1128
|
+
/*#__PURE__*/ F(u, {
|
|
1129
|
+
value: l,
|
|
1130
1130
|
onChange: M,
|
|
1131
|
-
disabled: R ||
|
|
1132
|
-
placeholder:
|
|
1131
|
+
disabled: R || _,
|
|
1132
|
+
placeholder: o._({ id: "FKL6Jv" }),
|
|
1133
1133
|
className: "font-mono text-sm",
|
|
1134
1134
|
rows: 3
|
|
1135
1135
|
}),
|
|
1136
|
-
/*#__PURE__*/ F(
|
|
1137
|
-
label:
|
|
1138
|
-
checked:
|
|
1136
|
+
/*#__PURE__*/ F(y, {
|
|
1137
|
+
label: o._({ id: "23wBCX" }),
|
|
1138
|
+
checked: _,
|
|
1139
1139
|
onChange: j,
|
|
1140
1140
|
disabled: R,
|
|
1141
1141
|
className: "mt-2"
|
|
1142
1142
|
})
|
|
1143
1143
|
] }),
|
|
1144
|
-
/*#__PURE__*/ I("div", { children: [/*#__PURE__*/ F(me, { label:
|
|
1145
|
-
value:
|
|
1144
|
+
/*#__PURE__*/ I("div", { children: [/*#__PURE__*/ F(me, { label: o._({ id: "6qzsuS" }) }), /*#__PURE__*/ F(u, {
|
|
1145
|
+
value: m,
|
|
1146
1146
|
onChange: (e) => {
|
|
1147
1147
|
let t = e.target.value;
|
|
1148
|
-
|
|
1148
|
+
g(t);
|
|
1149
1149
|
},
|
|
1150
1150
|
disabled: R,
|
|
1151
|
-
placeholder:
|
|
1151
|
+
placeholder: o._({ id: "UVFHGY" }),
|
|
1152
1152
|
className: "font-mono text-sm",
|
|
1153
1153
|
rows: 3
|
|
1154
1154
|
})] }),
|
|
1155
|
-
ee && /*#__PURE__*/ F(
|
|
1156
|
-
label:
|
|
1157
|
-
onClick: () =>
|
|
1155
|
+
ee && /*#__PURE__*/ F(p, {
|
|
1156
|
+
label: b ? o._({ id: "we28Pq" }) : o._({ id: "YiMCKk" }),
|
|
1157
|
+
onClick: () => x((e) => !e),
|
|
1158
1158
|
variant: "subdued",
|
|
1159
1159
|
disabled: R
|
|
1160
1160
|
}),
|
|
1161
|
-
|
|
1161
|
+
b && (H.length > 0 || G.length > 0) && /*#__PURE__*/ I(f, {
|
|
1162
1162
|
direction: "vertical",
|
|
1163
1163
|
gap: "4",
|
|
1164
1164
|
children: [H.length > 0 && /*#__PURE__*/ I("div", { children: [/*#__PURE__*/ F("p", {
|
|
@@ -1216,29 +1216,29 @@ var fe = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) =>
|
|
|
1216
1216
|
className: "text-theme-light mb-3 text-xs",
|
|
1217
1217
|
children: /*#__PURE__*/ F(U, { id: "dd2ndz" })
|
|
1218
1218
|
}),
|
|
1219
|
-
/*#__PURE__*/ I(
|
|
1219
|
+
/*#__PURE__*/ I(f, {
|
|
1220
1220
|
direction: "vertical",
|
|
1221
1221
|
gap: "4",
|
|
1222
1222
|
children: [
|
|
1223
1223
|
/*#__PURE__*/ F(pe, {
|
|
1224
1224
|
code: ".r:*",
|
|
1225
|
-
description:
|
|
1225
|
+
description: o._({ id: "VV1fdg" })
|
|
1226
1226
|
}),
|
|
1227
1227
|
/*#__PURE__*/ F(pe, {
|
|
1228
1228
|
code: ".rlistings",
|
|
1229
|
-
description:
|
|
1229
|
+
description: o._({ id: "s/s1lz" })
|
|
1230
1230
|
}),
|
|
1231
1231
|
/*#__PURE__*/ F(pe, {
|
|
1232
1232
|
code: "PROJECT_ID:USER_ID",
|
|
1233
|
-
description:
|
|
1233
|
+
description: o._({ id: "zhM8FP" })
|
|
1234
1234
|
}),
|
|
1235
1235
|
/*#__PURE__*/ F(pe, {
|
|
1236
1236
|
code: "PROJECT_ID:*",
|
|
1237
|
-
description:
|
|
1237
|
+
description: o._({ id: "BCJPTn" })
|
|
1238
1238
|
}),
|
|
1239
1239
|
/*#__PURE__*/ F(pe, {
|
|
1240
1240
|
code: "*:USER_ID",
|
|
1241
|
-
description:
|
|
1241
|
+
description: o._({ id: "/xnbdQ" })
|
|
1242
1242
|
})
|
|
1243
1243
|
]
|
|
1244
1244
|
}),
|
|
@@ -1276,13 +1276,13 @@ function me({ label: e }) {
|
|
|
1276
1276
|
children: [/*#__PURE__*/ F("label", {
|
|
1277
1277
|
className: "text-theme-default text-sm font-semibold",
|
|
1278
1278
|
children: e
|
|
1279
|
-
}), /*#__PURE__*/ I(
|
|
1279
|
+
}), /*#__PURE__*/ I(t, {
|
|
1280
1280
|
triggerEvent: "hover",
|
|
1281
|
-
children: [/*#__PURE__*/ F(
|
|
1281
|
+
children: [/*#__PURE__*/ F(w, { children: /*#__PURE__*/ F(m, {
|
|
1282
1282
|
icon: "info",
|
|
1283
1283
|
size: "14",
|
|
1284
1284
|
className: "text-theme-light cursor-help"
|
|
1285
|
-
}) }), /*#__PURE__*/ F(
|
|
1285
|
+
}) }), /*#__PURE__*/ F(n, {
|
|
1286
1286
|
className: "z-10 max-w-[350px]",
|
|
1287
1287
|
children: /*#__PURE__*/ F(U, { id: "AdtLNV" })
|
|
1288
1288
|
})]
|
|
@@ -1291,8 +1291,8 @@ function me({ label: e }) {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
//#endregion
|
|
1293
1293
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ContainerTableView.tsx
|
|
1294
|
-
var he = ({ containers: e, createModalOpen: t, setCreateModalOpen:
|
|
1295
|
-
let { projectId:
|
|
1294
|
+
var he = ({ containers: e, createModalOpen: t, setCreateModalOpen: n, maxContainerNameLength: a, onCreateSuccess: o, onCreateError: l, onEmptySuccess: u, onEmptyError: d, onDeleteSuccess: f, onDeleteError: p, onPropertiesSuccess: m, onPropertiesError: h, onAclSuccess: g, onAclError: v, selectedContainers: x, setSelectedContainers: S, hasAnyBulkAction: C = !0 }) => {
|
|
1295
|
+
let { projectId: w, provider: E, storageType: D } = H({ from: "/_auth/projects/$projectId/storage/$provider/$storageType/" }), { i18n: O, _: k } = W(), A = ee(), j = B(null), [N, L] = V(0), [R, G] = V(null), [te, ie] = V(null), [ae, oe] = V(null), [ce, J] = V(null);
|
|
1296
1296
|
z(() => {
|
|
1297
1297
|
j.current && L(j.current.offsetWidth - j.current.clientWidth);
|
|
1298
1298
|
}, [e.length]);
|
|
@@ -1307,16 +1307,16 @@ var he = ({ containers: e, createModalOpen: t, setCreateModalOpen: i, maxContain
|
|
|
1307
1307
|
getScrollElement: () => j.current,
|
|
1308
1308
|
estimateSize: () => 48,
|
|
1309
1309
|
overscan: 10
|
|
1310
|
-
}), ue = new Set(
|
|
1311
|
-
|
|
1310
|
+
}), ue = new Set(x), de = e.length > 0 && e.every((e) => ue.has(e.name)), X = () => {
|
|
1311
|
+
S(de ? [] : e.map((e) => e.name));
|
|
1312
1312
|
}, pe = (e) => {
|
|
1313
|
-
|
|
1313
|
+
x.includes(e) ? S(x.filter((t) => t !== e)) : S([...x, e]);
|
|
1314
1314
|
};
|
|
1315
|
-
if (!e || e.length === 0) return /*#__PURE__*/ I(P, { children: [/*#__PURE__*/ F(
|
|
1315
|
+
if (!e || e.length === 0) return /*#__PURE__*/ I(P, { children: [/*#__PURE__*/ F(_, {
|
|
1316
1316
|
columns: 4,
|
|
1317
1317
|
className: "containers",
|
|
1318
1318
|
"data-testid": "no-containers",
|
|
1319
|
-
children: /*#__PURE__*/ F(
|
|
1319
|
+
children: /*#__PURE__*/ F(c, { children: /*#__PURE__*/ F(i, {
|
|
1320
1320
|
colSpan: 4,
|
|
1321
1321
|
children: /*#__PURE__*/ I("div", {
|
|
1322
1322
|
className: "py-8 text-center",
|
|
@@ -1331,33 +1331,33 @@ var he = ({ containers: e, createModalOpen: t, setCreateModalOpen: i, maxContain
|
|
|
1331
1331
|
}) })
|
|
1332
1332
|
}), /*#__PURE__*/ F(K, {
|
|
1333
1333
|
isOpen: t,
|
|
1334
|
-
onClose: () =>
|
|
1335
|
-
onSuccess:
|
|
1336
|
-
onError:
|
|
1334
|
+
onClose: () => n(!1),
|
|
1335
|
+
onSuccess: o,
|
|
1336
|
+
onError: l,
|
|
1337
1337
|
maxContainerNameLength: a
|
|
1338
1338
|
})] });
|
|
1339
|
-
let me =
|
|
1339
|
+
let me = C ? 6 : 5, he = 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";
|
|
1340
1340
|
return /*#__PURE__*/ I(P, { children: [
|
|
1341
1341
|
/*#__PURE__*/ I("div", {
|
|
1342
1342
|
className: "relative",
|
|
1343
1343
|
children: [/*#__PURE__*/ F("div", {
|
|
1344
1344
|
style: { paddingRight: `${N}px` },
|
|
1345
|
-
children: /*#__PURE__*/ F(
|
|
1345
|
+
children: /*#__PURE__*/ F(_, {
|
|
1346
1346
|
columns: me,
|
|
1347
1347
|
gridColumnTemplate: he,
|
|
1348
1348
|
className: "containers",
|
|
1349
1349
|
"data-testid": "containers-table-header",
|
|
1350
|
-
children: /*#__PURE__*/ I(
|
|
1351
|
-
|
|
1350
|
+
children: /*#__PURE__*/ I(c, { children: [
|
|
1351
|
+
C && /*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(y, {
|
|
1352
1352
|
checked: de,
|
|
1353
1353
|
onChange: X,
|
|
1354
1354
|
"data-testid": "select-all-containers"
|
|
1355
1355
|
}) }),
|
|
1356
|
-
/*#__PURE__*/ F(
|
|
1357
|
-
/*#__PURE__*/ F(
|
|
1358
|
-
/*#__PURE__*/ F(
|
|
1359
|
-
/*#__PURE__*/ F(
|
|
1360
|
-
/*#__PURE__*/ F(
|
|
1356
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "t0X9+8" }) }),
|
|
1357
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "sxbP3b" }) }),
|
|
1358
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "sjMCOP" }) }),
|
|
1359
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "hgpMHD" }) }),
|
|
1360
|
+
/*#__PURE__*/ F(s, { style: { marginRight: `-${N}px` } })
|
|
1361
1361
|
] })
|
|
1362
1362
|
})
|
|
1363
1363
|
}), /*#__PURE__*/ F("div", {
|
|
@@ -1372,12 +1372,12 @@ var he = ({ containers: e, createModalOpen: t, setCreateModalOpen: i, maxContain
|
|
|
1372
1372
|
position: "relative"
|
|
1373
1373
|
},
|
|
1374
1374
|
children: le.getVirtualItems().map((t) => {
|
|
1375
|
-
let n = e[t.index],
|
|
1375
|
+
let n = e[t.index], a = x.includes(n.name), o = () => A({
|
|
1376
1376
|
to: "/projects/$projectId/storage/$provider/$storageType/$containerName/objects",
|
|
1377
1377
|
params: {
|
|
1378
|
-
projectId:
|
|
1379
|
-
provider:
|
|
1380
|
-
storageType:
|
|
1378
|
+
projectId: w,
|
|
1379
|
+
provider: E,
|
|
1380
|
+
storageType: D,
|
|
1381
1381
|
containerName: n.name
|
|
1382
1382
|
}
|
|
1383
1383
|
});
|
|
@@ -1398,23 +1398,23 @@ var he = ({ containers: e, createModalOpen: t, setCreateModalOpen: i, maxContain
|
|
|
1398
1398
|
"data-testid": `container-row-${n.name}`,
|
|
1399
1399
|
role: "link",
|
|
1400
1400
|
tabIndex: 0,
|
|
1401
|
-
onClick:
|
|
1401
|
+
onClick: o,
|
|
1402
1402
|
onKeyDown: (e) => {
|
|
1403
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
1403
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), o());
|
|
1404
1404
|
},
|
|
1405
1405
|
children: [
|
|
1406
|
-
|
|
1406
|
+
C && /*#__PURE__*/ F(i, {
|
|
1407
1407
|
onClick: (e) => e.stopPropagation(),
|
|
1408
1408
|
onKeyDown: (e) => {
|
|
1409
1409
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
1410
1410
|
},
|
|
1411
|
-
children: /*#__PURE__*/ F(
|
|
1412
|
-
checked:
|
|
1411
|
+
children: /*#__PURE__*/ F(y, {
|
|
1412
|
+
checked: a,
|
|
1413
1413
|
onChange: () => pe(n.name),
|
|
1414
1414
|
"data-testid": `select-container-${n.name}`
|
|
1415
1415
|
})
|
|
1416
1416
|
}),
|
|
1417
|
-
/*#__PURE__*/ F(
|
|
1417
|
+
/*#__PURE__*/ F(i, {
|
|
1418
1418
|
className: "min-w-0 overflow-hidden",
|
|
1419
1419
|
children: /*#__PURE__*/ F("span", {
|
|
1420
1420
|
className: "block truncate",
|
|
@@ -1422,28 +1422,28 @@ var he = ({ containers: e, createModalOpen: t, setCreateModalOpen: i, maxContain
|
|
|
1422
1422
|
children: n.name
|
|
1423
1423
|
})
|
|
1424
1424
|
}),
|
|
1425
|
-
/*#__PURE__*/ F(
|
|
1426
|
-
/*#__PURE__*/ F(
|
|
1427
|
-
/*#__PURE__*/ F(
|
|
1428
|
-
/*#__PURE__*/ F(
|
|
1425
|
+
/*#__PURE__*/ F(i, { children: n.count.toLocaleString() }),
|
|
1426
|
+
/*#__PURE__*/ F(i, { children: n.last_modified ? Y(n.last_modified) : O._({ id: "fj5byd" }) }),
|
|
1427
|
+
/*#__PURE__*/ F(i, { children: M(n.bytes) }),
|
|
1428
|
+
/*#__PURE__*/ F(i, {
|
|
1429
1429
|
onClick: (e) => e.stopPropagation(),
|
|
1430
|
-
children: /*#__PURE__*/ F(
|
|
1431
|
-
/*#__PURE__*/ F(
|
|
1430
|
+
children: /*#__PURE__*/ F(r, { children: /*#__PURE__*/ I(T, { children: [
|
|
1431
|
+
/*#__PURE__*/ F(b, {
|
|
1432
1432
|
label: O._({ id: "cWbW6w" }),
|
|
1433
1433
|
onClick: () => J(n),
|
|
1434
1434
|
"data-testid": `access-control-action-${n.name}`
|
|
1435
1435
|
}),
|
|
1436
|
-
/*#__PURE__*/ F(
|
|
1436
|
+
/*#__PURE__*/ F(b, {
|
|
1437
1437
|
label: O._({ id: "Oc8Aqv" }),
|
|
1438
1438
|
onClick: () => oe(n),
|
|
1439
1439
|
"data-testid": `properties-action-${n.name}`
|
|
1440
1440
|
}),
|
|
1441
|
-
/*#__PURE__*/ F(
|
|
1441
|
+
/*#__PURE__*/ F(b, {
|
|
1442
1442
|
label: O._({ id: "N2S1rs" }),
|
|
1443
1443
|
onClick: () => G(n),
|
|
1444
1444
|
"data-testid": `empty-action-${n.name}`
|
|
1445
1445
|
}),
|
|
1446
|
-
/*#__PURE__*/ F(
|
|
1446
|
+
/*#__PURE__*/ F(b, {
|
|
1447
1447
|
label: O._({ id: "cnGeoo" }),
|
|
1448
1448
|
onClick: () => ie(n),
|
|
1449
1449
|
"data-testid": `delete-action-${n.name}`
|
|
@@ -1458,45 +1458,45 @@ var he = ({ containers: e, createModalOpen: t, setCreateModalOpen: i, maxContain
|
|
|
1458
1458
|
}),
|
|
1459
1459
|
/*#__PURE__*/ F(K, {
|
|
1460
1460
|
isOpen: t,
|
|
1461
|
-
onClose: () =>
|
|
1462
|
-
onSuccess:
|
|
1463
|
-
onError:
|
|
1461
|
+
onClose: () => n(!1),
|
|
1462
|
+
onSuccess: o,
|
|
1463
|
+
onError: l,
|
|
1464
1464
|
maxContainerNameLength: a
|
|
1465
1465
|
}),
|
|
1466
1466
|
/*#__PURE__*/ F(re, {
|
|
1467
1467
|
isOpen: R !== null,
|
|
1468
1468
|
container: R,
|
|
1469
1469
|
onClose: () => G(null),
|
|
1470
|
-
onSuccess:
|
|
1471
|
-
onError:
|
|
1470
|
+
onSuccess: u,
|
|
1471
|
+
onError: d
|
|
1472
1472
|
}),
|
|
1473
1473
|
/*#__PURE__*/ F(q, {
|
|
1474
1474
|
isOpen: te !== null,
|
|
1475
1475
|
container: te,
|
|
1476
1476
|
onClose: () => ie(null),
|
|
1477
|
-
onSuccess:
|
|
1478
|
-
onError:
|
|
1477
|
+
onSuccess: f,
|
|
1478
|
+
onError: p
|
|
1479
1479
|
}),
|
|
1480
1480
|
/*#__PURE__*/ F(se, {
|
|
1481
1481
|
isOpen: ae !== null,
|
|
1482
1482
|
container: ae,
|
|
1483
1483
|
onClose: () => oe(null),
|
|
1484
|
-
onSuccess:
|
|
1485
|
-
onError:
|
|
1484
|
+
onSuccess: m,
|
|
1485
|
+
onError: h
|
|
1486
1486
|
}),
|
|
1487
1487
|
/*#__PURE__*/ F(fe, {
|
|
1488
1488
|
isOpen: ce !== null,
|
|
1489
1489
|
container: ce,
|
|
1490
1490
|
onClose: () => J(null),
|
|
1491
|
-
onSuccess:
|
|
1492
|
-
onError:
|
|
1491
|
+
onSuccess: g,
|
|
1492
|
+
onError: v
|
|
1493
1493
|
})
|
|
1494
1494
|
] });
|
|
1495
1495
|
};
|
|
1496
1496
|
//#endregion
|
|
1497
1497
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ContainerToastNotifications.tsx
|
|
1498
1498
|
function Z({ title: e, description: t }) {
|
|
1499
|
-
return /*#__PURE__*/ I(
|
|
1499
|
+
return /*#__PURE__*/ I(f, {
|
|
1500
1500
|
direction: "vertical",
|
|
1501
1501
|
gap: "1.5",
|
|
1502
1502
|
children: [/*#__PURE__*/ F("span", { children: e }), /*#__PURE__*/ F("span", {
|
|
@@ -1638,7 +1638,7 @@ var ge = (e, t) => ({
|
|
|
1638
1638
|
variant: o ? "warning" : i ? "error" : "success",
|
|
1639
1639
|
children: /*#__PURE__*/ F(Z, {
|
|
1640
1640
|
title: o ? /*#__PURE__*/ F(U, { id: "q44uUq" }) : i ? /*#__PURE__*/ F(U, { id: "wFaT8w" }) : /*#__PURE__*/ F(U, { id: "0WsqO0" }),
|
|
1641
|
-
description: /*#__PURE__*/ I(
|
|
1641
|
+
description: /*#__PURE__*/ I(f, {
|
|
1642
1642
|
direction: "vertical",
|
|
1643
1643
|
gap: "1",
|
|
1644
1644
|
children: [a && /*#__PURE__*/ F("span", { children: /*#__PURE__*/ F(U, {
|
|
@@ -1660,7 +1660,7 @@ var ge = (e, t) => ({
|
|
|
1660
1660
|
};
|
|
1661
1661
|
}, $ = ({ label: e, value: t }) => t == null ? null : /*#__PURE__*/ I("span", {
|
|
1662
1662
|
className: "flex items-start gap-1.5",
|
|
1663
|
-
children: [/*#__PURE__*/ F(
|
|
1663
|
+
children: [/*#__PURE__*/ F(m, {
|
|
1664
1664
|
icon: "check",
|
|
1665
1665
|
size: "16px",
|
|
1666
1666
|
className: "text-theme-success mt-0.5 shrink-0"
|
|
@@ -1674,7 +1674,7 @@ var ge = (e, t) => ({
|
|
|
1674
1674
|
] })]
|
|
1675
1675
|
}), Ee = ({ label: e }) => /*#__PURE__*/ I("span", {
|
|
1676
1676
|
className: "flex items-start gap-1.5",
|
|
1677
|
-
children: [/*#__PURE__*/ F(
|
|
1677
|
+
children: [/*#__PURE__*/ F(m, {
|
|
1678
1678
|
icon: "check",
|
|
1679
1679
|
size: "16px",
|
|
1680
1680
|
className: "text-theme-success mt-0.5 shrink-0"
|
|
@@ -1685,177 +1685,178 @@ var ge = (e, t) => ({
|
|
|
1685
1685
|
className: "text-theme-default block font-semibold",
|
|
1686
1686
|
children: e
|
|
1687
1687
|
}), t]
|
|
1688
|
-
}), Oe = ({ serviceInfo: e, accountInfo:
|
|
1689
|
-
let { i18n:
|
|
1690
|
-
account_quotas:
|
|
1691
|
-
container_quotas:
|
|
1692
|
-
bulk_delete:
|
|
1693
|
-
bulk_upload:
|
|
1694
|
-
slo:
|
|
1695
|
-
container_sync:
|
|
1696
|
-
tempurl:
|
|
1697
|
-
symlink:
|
|
1698
|
-
versioned_writes:
|
|
1699
|
-
},
|
|
1700
|
-
return /*#__PURE__*/ I(
|
|
1688
|
+
}), Oe = ({ serviceInfo: e, accountInfo: r, open: i }) => {
|
|
1689
|
+
let { i18n: a, _: o } = W(), s = e?.swift, c = {
|
|
1690
|
+
account_quotas: a._({ id: "DJT9tB" }),
|
|
1691
|
+
container_quotas: a._({ id: "USiuNX" }),
|
|
1692
|
+
bulk_delete: a._({ id: "F6YIQe" }),
|
|
1693
|
+
bulk_upload: a._({ id: "2Inn83" }),
|
|
1694
|
+
slo: a._({ id: "cpw++p" }),
|
|
1695
|
+
container_sync: a._({ id: "ezT9KW" }),
|
|
1696
|
+
tempurl: a._({ id: "UO3hJ2" }),
|
|
1697
|
+
symlink: a._({ id: "Q2xmVl" }),
|
|
1698
|
+
versioned_writes: a._({ id: "8jLXs3" })
|
|
1699
|
+
}, l = Object.entries(c).filter(([e]) => s?.[e]).map(([, e]) => e);
|
|
1700
|
+
return /*#__PURE__*/ I(t, {
|
|
1701
1701
|
triggerEvent: "hover",
|
|
1702
1702
|
placement: "bottom-end",
|
|
1703
|
-
|
|
1703
|
+
open: i,
|
|
1704
|
+
children: [/*#__PURE__*/ F(w, {
|
|
1704
1705
|
asChild: !0,
|
|
1705
|
-
children: /*#__PURE__*/ F(
|
|
1706
|
+
children: /*#__PURE__*/ F(m, {
|
|
1706
1707
|
icon: "info",
|
|
1707
1708
|
size: "20px",
|
|
1708
1709
|
className: "text-theme-light hover:text-theme-default cursor-pointer"
|
|
1709
1710
|
})
|
|
1710
|
-
}), /*#__PURE__*/ F(
|
|
1711
|
+
}), /*#__PURE__*/ F(n, {
|
|
1711
1712
|
className: "z-10 w-72 text-sm",
|
|
1712
1713
|
children: /*#__PURE__*/ I("span", {
|
|
1713
1714
|
className: "flex flex-col gap-3 p-1",
|
|
1714
1715
|
children: [
|
|
1715
|
-
|
|
1716
|
+
r && /*#__PURE__*/ I(De, {
|
|
1716
1717
|
title: /*#__PURE__*/ F(U, { id: "AeXO77" }),
|
|
1717
1718
|
children: [
|
|
1718
1719
|
/*#__PURE__*/ F($, {
|
|
1719
|
-
label:
|
|
1720
|
-
value:
|
|
1720
|
+
label: a._({ id: "ClGcRq" }),
|
|
1721
|
+
value: r.containerCount.toLocaleString()
|
|
1721
1722
|
}),
|
|
1722
1723
|
/*#__PURE__*/ F($, {
|
|
1723
|
-
label:
|
|
1724
|
-
value:
|
|
1724
|
+
label: a._({ id: "B3toQF" }),
|
|
1725
|
+
value: r.objectCount.toLocaleString()
|
|
1725
1726
|
}),
|
|
1726
1727
|
/*#__PURE__*/ F($, {
|
|
1727
|
-
label:
|
|
1728
|
-
value: M(
|
|
1728
|
+
label: a._({ id: "aL1w5Z" }),
|
|
1729
|
+
value: M(r.bytesUsed)
|
|
1729
1730
|
}),
|
|
1730
|
-
|
|
1731
|
-
label:
|
|
1732
|
-
value: M(
|
|
1731
|
+
r.quotaBytes !== void 0 && /*#__PURE__*/ F($, {
|
|
1732
|
+
label: a._({ id: "vEkTR9" }),
|
|
1733
|
+
value: M(r.quotaBytes)
|
|
1733
1734
|
})
|
|
1734
1735
|
]
|
|
1735
1736
|
}),
|
|
1736
|
-
|
|
1737
|
+
s && /*#__PURE__*/ I(De, {
|
|
1737
1738
|
title: /*#__PURE__*/ F(U, { id: "6BDqha" }),
|
|
1738
1739
|
children: [
|
|
1739
1740
|
/*#__PURE__*/ F($, {
|
|
1740
|
-
label:
|
|
1741
|
-
value:
|
|
1741
|
+
label: a._({ id: "wTg+FY" }),
|
|
1742
|
+
value: s.max_file_size === void 0 ? void 0 : M(s.max_file_size)
|
|
1742
1743
|
}),
|
|
1743
1744
|
/*#__PURE__*/ F($, {
|
|
1744
|
-
label:
|
|
1745
|
-
value:
|
|
1745
|
+
label: a._({ id: "Rih53k" }),
|
|
1746
|
+
value: s.max_container_name_length
|
|
1746
1747
|
}),
|
|
1747
1748
|
/*#__PURE__*/ F($, {
|
|
1748
|
-
label:
|
|
1749
|
-
value:
|
|
1749
|
+
label: a._({ id: "qAkkjP" }),
|
|
1750
|
+
value: s.max_object_name_length
|
|
1750
1751
|
}),
|
|
1751
1752
|
/*#__PURE__*/ F($, {
|
|
1752
|
-
label:
|
|
1753
|
-
value:
|
|
1753
|
+
label: a._({ id: "OZImTR" }),
|
|
1754
|
+
value: s.container_listing_limit?.toLocaleString()
|
|
1754
1755
|
}),
|
|
1755
1756
|
/*#__PURE__*/ F($, {
|
|
1756
|
-
label:
|
|
1757
|
-
value:
|
|
1757
|
+
label: a._({ id: "a4A2uB" }),
|
|
1758
|
+
value: s.account_listing_limit?.toLocaleString()
|
|
1758
1759
|
}),
|
|
1759
1760
|
/*#__PURE__*/ F($, {
|
|
1760
|
-
label:
|
|
1761
|
-
value:
|
|
1761
|
+
label: a._({ id: "zWb/Nn" }),
|
|
1762
|
+
value: s.max_header_size
|
|
1762
1763
|
}),
|
|
1763
1764
|
/*#__PURE__*/ F($, {
|
|
1764
|
-
label:
|
|
1765
|
-
value:
|
|
1765
|
+
label: a._({ id: "RGwfoL" }),
|
|
1766
|
+
value: s.max_meta_count
|
|
1766
1767
|
}),
|
|
1767
1768
|
/*#__PURE__*/ F($, {
|
|
1768
|
-
label:
|
|
1769
|
-
value:
|
|
1769
|
+
label: a._({ id: "8c3/77" }),
|
|
1770
|
+
value: s.max_meta_name_length
|
|
1770
1771
|
}),
|
|
1771
1772
|
/*#__PURE__*/ F($, {
|
|
1772
|
-
label:
|
|
1773
|
-
value:
|
|
1773
|
+
label: a._({ id: "5JDSvn" }),
|
|
1774
|
+
value: s.max_meta_value_length
|
|
1774
1775
|
}),
|
|
1775
1776
|
/*#__PURE__*/ F($, {
|
|
1776
|
-
label:
|
|
1777
|
-
value:
|
|
1777
|
+
label: a._({ id: "ZAx+d1" }),
|
|
1778
|
+
value: s.max_meta_overall_size
|
|
1778
1779
|
}),
|
|
1779
|
-
|
|
1780
|
-
label:
|
|
1781
|
-
value:
|
|
1780
|
+
s.bulk_delete && /*#__PURE__*/ F($, {
|
|
1781
|
+
label: a._({ id: "lQ3EIe" }),
|
|
1782
|
+
value: s.bulk_delete.max_deletes_per_request.toLocaleString()
|
|
1782
1783
|
}),
|
|
1783
|
-
|
|
1784
|
-
label:
|
|
1785
|
-
value:
|
|
1784
|
+
s.bulk_upload && /*#__PURE__*/ F($, {
|
|
1785
|
+
label: a._({ id: "STc+7E" }),
|
|
1786
|
+
value: s.bulk_upload.max_containers_per_extraction.toLocaleString()
|
|
1786
1787
|
}),
|
|
1787
|
-
|
|
1788
|
-
label:
|
|
1789
|
-
value:
|
|
1788
|
+
s.slo && /*#__PURE__*/ F($, {
|
|
1789
|
+
label: a._({ id: "RNBvdl" }),
|
|
1790
|
+
value: s.slo.max_manifest_segments.toLocaleString()
|
|
1790
1791
|
})
|
|
1791
1792
|
]
|
|
1792
1793
|
}),
|
|
1793
|
-
|
|
1794
|
+
l.length > 0 && /*#__PURE__*/ F(De, {
|
|
1794
1795
|
title: /*#__PURE__*/ F(U, { id: "Qx7DM7" }),
|
|
1795
|
-
children:
|
|
1796
|
+
children: l.map((e) => /*#__PURE__*/ F(Ee, { label: e }, e))
|
|
1796
1797
|
})
|
|
1797
1798
|
]
|
|
1798
1799
|
})
|
|
1799
1800
|
})]
|
|
1800
1801
|
});
|
|
1801
1802
|
}, ke = 20, Ae = ({ isOpen: e, containers: t, onClose: n, onComplete: r }) => {
|
|
1802
|
-
let { i18n: i, _:
|
|
1803
|
-
|
|
1803
|
+
let { i18n: i, _: o } = W(), s = N(), [c, l] = V(null), u = O.useUtils(), d = O.storage.swift.emptyContainer.useMutation(), p = () => {
|
|
1804
|
+
d.reset(), l(null), n();
|
|
1804
1805
|
}, m = async () => {
|
|
1805
1806
|
let e = 0, n = 0, i = [], a = t.length;
|
|
1806
1807
|
for (let r = 0; r < t.length; r++) {
|
|
1807
|
-
|
|
1808
|
+
l({
|
|
1808
1809
|
current: r + 1,
|
|
1809
1810
|
total: a
|
|
1810
1811
|
});
|
|
1811
|
-
let
|
|
1812
|
+
let o = t[r];
|
|
1812
1813
|
try {
|
|
1813
|
-
let t = await
|
|
1814
|
-
project_id:
|
|
1815
|
-
container:
|
|
1814
|
+
let t = await d.mutateAsync({
|
|
1815
|
+
project_id: s,
|
|
1816
|
+
container: o.name
|
|
1816
1817
|
});
|
|
1817
1818
|
n += t, e++;
|
|
1818
1819
|
} catch (e) {
|
|
1819
1820
|
let t = e instanceof Error ? e.message : String(e);
|
|
1820
|
-
i.push(`${
|
|
1821
|
+
i.push(`${o.name}: ${t}`);
|
|
1821
1822
|
}
|
|
1822
1823
|
}
|
|
1823
|
-
e > 0 && await
|
|
1824
|
+
e > 0 && await u.storage.swift.listContainers.invalidate(), r?.({
|
|
1824
1825
|
emptiedCount: e,
|
|
1825
1826
|
totalDeleted: n,
|
|
1826
1827
|
errors: i
|
|
1827
1828
|
}), p();
|
|
1828
1829
|
};
|
|
1829
1830
|
if (!e || t.length === 0) return null;
|
|
1830
|
-
let
|
|
1831
|
-
return /*#__PURE__*/ F(
|
|
1831
|
+
let g = t.length, _ = t.slice(0, ke), v = g - _.length, y = d.isPending || c !== null, b = c?.current, x = c?.total;
|
|
1832
|
+
return /*#__PURE__*/ F(h, {
|
|
1832
1833
|
title: /*#__PURE__*/ F(U, {
|
|
1833
1834
|
id: "/tejov",
|
|
1834
|
-
values: { totalCount:
|
|
1835
|
+
values: { totalCount: g }
|
|
1835
1836
|
}),
|
|
1836
1837
|
open: e,
|
|
1837
1838
|
onCancel: p,
|
|
1838
|
-
confirmButtonLabel:
|
|
1839
|
+
confirmButtonLabel: y ? i._({ id: "s4Vnq2" }) : i._({ id: "N2S1rs" }),
|
|
1839
1840
|
confirmButtonVariant: "primary-danger",
|
|
1840
1841
|
cancelButtonLabel: i._({ id: "dEgA5A" }),
|
|
1841
1842
|
onConfirm: m,
|
|
1842
|
-
disableConfirmButton:
|
|
1843
|
-
disableCancelButton:
|
|
1844
|
-
disableCloseButton:
|
|
1843
|
+
disableConfirmButton: y,
|
|
1844
|
+
disableCancelButton: y,
|
|
1845
|
+
disableCloseButton: y,
|
|
1845
1846
|
size: "small",
|
|
1846
|
-
children:
|
|
1847
|
+
children: y ? /*#__PURE__*/ I(f, {
|
|
1847
1848
|
direction: "vertical",
|
|
1848
1849
|
distribution: "center",
|
|
1849
1850
|
alignment: "center",
|
|
1850
1851
|
gap: "2",
|
|
1851
1852
|
className: "py-4",
|
|
1852
|
-
children: [/*#__PURE__*/ F(
|
|
1853
|
+
children: [/*#__PURE__*/ F(a, { variant: "primary" }), c && /*#__PURE__*/ F("p", {
|
|
1853
1854
|
className: "text-theme-light text-sm",
|
|
1854
1855
|
children: /*#__PURE__*/ F(U, {
|
|
1855
1856
|
id: "7NSdfG",
|
|
1856
1857
|
values: {
|
|
1857
|
-
progressCurrent:
|
|
1858
|
-
progressTotal:
|
|
1858
|
+
progressCurrent: b,
|
|
1859
|
+
progressTotal: x
|
|
1859
1860
|
}
|
|
1860
1861
|
})
|
|
1861
1862
|
})]
|
|
@@ -1880,21 +1881,21 @@ var ge = (e, t) => ({
|
|
|
1880
1881
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
1881
1882
|
children: /*#__PURE__*/ F(U, {
|
|
1882
1883
|
id: "VKmlZ+",
|
|
1883
|
-
values: { totalCount:
|
|
1884
|
+
values: { totalCount: g }
|
|
1884
1885
|
})
|
|
1885
1886
|
}), /*#__PURE__*/ I("div", {
|
|
1886
1887
|
className: "jn:bg-theme-background-lvl-1 max-h-48 overflow-y-auto rounded p-4",
|
|
1887
1888
|
children: [/*#__PURE__*/ F("ul", {
|
|
1888
1889
|
className: "space-y-1",
|
|
1889
|
-
children:
|
|
1890
|
+
children: _.map((e) => /*#__PURE__*/ F("li", {
|
|
1890
1891
|
className: "jn:text-theme-default font-mono text-sm",
|
|
1891
1892
|
children: e.name
|
|
1892
1893
|
}, e.name))
|
|
1893
|
-
}),
|
|
1894
|
+
}), v > 0 && /*#__PURE__*/ F("p", {
|
|
1894
1895
|
className: "text-theme-light mt-2 text-xs",
|
|
1895
1896
|
children: /*#__PURE__*/ F(U, {
|
|
1896
1897
|
id: "yqPflB",
|
|
1897
|
-
values: { hiddenCount:
|
|
1898
|
+
values: { hiddenCount: v }
|
|
1898
1899
|
})
|
|
1899
1900
|
})]
|
|
1900
1901
|
})]
|
|
@@ -1902,64 +1903,64 @@ var ge = (e, t) => ({
|
|
|
1902
1903
|
})
|
|
1903
1904
|
});
|
|
1904
1905
|
}, je = () => {
|
|
1905
|
-
let { i18n:
|
|
1906
|
+
let { i18n: t, i18n: n, _: i } = W(), o = N(), s = ee({ from: k.fullPath }), { sortBy: c, sortDirection: l, search: u = "" } = k.useSearch(), [m, h] = V(!1), [g, _] = V(!1), [v, x] = V([]), [S, w] = V(null), [D, A] = V(u), R = B(void 0);
|
|
1906
1907
|
z(() => () => clearTimeout(R.current), []), z(() => {
|
|
1907
|
-
A(
|
|
1908
|
-
}, [
|
|
1909
|
-
let H = () =>
|
|
1910
|
-
|
|
1908
|
+
A(u);
|
|
1909
|
+
}, [u]);
|
|
1910
|
+
let H = () => w(null), G = (e) => {
|
|
1911
|
+
w(ge(e, { onDismiss: H }));
|
|
1911
1912
|
}, te = (e, t) => {
|
|
1912
|
-
|
|
1913
|
+
w(_e(e, t, { onDismiss: H }));
|
|
1913
1914
|
}, ne = (e, t) => {
|
|
1914
|
-
|
|
1915
|
+
w(Q(e, t, { onDismiss: H }));
|
|
1915
1916
|
}, K = (e, t) => {
|
|
1916
|
-
|
|
1917
|
+
w(ve(e, t, { onDismiss: H }));
|
|
1917
1918
|
}, re = (e) => {
|
|
1918
|
-
|
|
1919
|
+
w(ye(e, { onDismiss: H }));
|
|
1919
1920
|
}, q = (e, t) => {
|
|
1920
|
-
|
|
1921
|
+
w(be(e, t, { onDismiss: H }));
|
|
1921
1922
|
}, ie = (e) => {
|
|
1922
|
-
|
|
1923
|
+
w(xe(e, { onDismiss: H }));
|
|
1923
1924
|
}, ae = (e, t) => {
|
|
1924
|
-
|
|
1925
|
+
w(Se(e, t, { onDismiss: H }));
|
|
1925
1926
|
}, oe = (e) => {
|
|
1926
|
-
|
|
1927
|
+
w(Ce(e, { onDismiss: H }));
|
|
1927
1928
|
}, se = (e, t) => {
|
|
1928
|
-
|
|
1929
|
+
w(we(e, t, { onDismiss: H }));
|
|
1929
1930
|
}, ce = ({ emptiedCount: e, totalDeleted: t, errors: n }) => {
|
|
1930
|
-
if (n.length === 0)
|
|
1931
|
+
if (n.length === 0) x([]);
|
|
1931
1932
|
else {
|
|
1932
1933
|
let e = new Set(n.map((e) => e.split(": ")[0]));
|
|
1933
|
-
|
|
1934
|
+
x((t) => t.filter((t) => e.has(t)));
|
|
1934
1935
|
}
|
|
1935
|
-
|
|
1936
|
+
w(Te(e, t, n, { onDismiss: H }));
|
|
1936
1937
|
}, J = {
|
|
1937
1938
|
options: [
|
|
1938
1939
|
{
|
|
1939
|
-
label:
|
|
1940
|
+
label: t._({ id: "6YtxFj" }),
|
|
1940
1941
|
value: "name"
|
|
1941
1942
|
},
|
|
1942
1943
|
{
|
|
1943
|
-
label:
|
|
1944
|
+
label: t._({ id: "sxbP3b" }),
|
|
1944
1945
|
value: "count"
|
|
1945
1946
|
},
|
|
1946
1947
|
{
|
|
1947
|
-
label:
|
|
1948
|
+
label: t._({ id: "hgpMHD" }),
|
|
1948
1949
|
value: "bytes"
|
|
1949
1950
|
},
|
|
1950
1951
|
{
|
|
1951
|
-
label:
|
|
1952
|
+
label: t._({ id: "sjMCOP" }),
|
|
1952
1953
|
value: "last_modified"
|
|
1953
1954
|
}
|
|
1954
1955
|
],
|
|
1955
|
-
sortBy:
|
|
1956
|
-
sortDirection:
|
|
1956
|
+
sortBy: c ?? "name",
|
|
1957
|
+
sortDirection: l ?? "asc"
|
|
1957
1958
|
}, { data: Y, isLoading: le, error: ue } = O.storage.swift.listContainers.useQuery({
|
|
1958
|
-
project_id:
|
|
1959
|
+
project_id: o,
|
|
1959
1960
|
format: "json"
|
|
1960
|
-
}), { data: de } = O.storage.swift.getAccountMetadata.useQuery({ project_id:
|
|
1961
|
+
}), { data: de } = O.storage.swift.getAccountMetadata.useQuery({ project_id: o }), { data: X } = O.storage.swift.getServiceInfo.useQuery(), fe = (e) => [...e].sort((e, t) => {
|
|
1961
1962
|
let n;
|
|
1962
|
-
switch (
|
|
1963
|
+
switch (c ?? "name") {
|
|
1963
1964
|
case "name":
|
|
1964
1965
|
n = e.name.localeCompare(t.name);
|
|
1965
1966
|
break;
|
|
@@ -1975,11 +1976,11 @@ var ge = (e, t) => ({
|
|
|
1975
1976
|
break;
|
|
1976
1977
|
default: n = e.name.localeCompare(t.name);
|
|
1977
1978
|
}
|
|
1978
|
-
return (
|
|
1979
|
-
}), pe = (Y || []).filter((e) => e.name.toLowerCase().includes(
|
|
1979
|
+
return (l ?? "asc") === "desc" ? -n : n;
|
|
1980
|
+
}), pe = (Y || []).filter((e) => e.name.toLowerCase().includes(u.toLowerCase())), me = fe(pe), Z = (e) => {
|
|
1980
1981
|
let t = typeof e == "string" ? e : "";
|
|
1981
1982
|
L(() => {
|
|
1982
|
-
|
|
1983
|
+
s({ search: (e) => ({
|
|
1983
1984
|
...e,
|
|
1984
1985
|
search: t || void 0
|
|
1985
1986
|
}) });
|
|
@@ -1987,19 +1988,19 @@ var ge = (e, t) => ({
|
|
|
1987
1988
|
}, $ = (e) => {
|
|
1988
1989
|
let t = e.sortBy?.toString() || "name", n = e.sortDirection || "asc";
|
|
1989
1990
|
L(() => {
|
|
1990
|
-
|
|
1991
|
+
s({ search: (e) => ({
|
|
1991
1992
|
...e,
|
|
1992
1993
|
sortBy: t,
|
|
1993
1994
|
sortDirection: n
|
|
1994
1995
|
}) });
|
|
1995
1996
|
});
|
|
1996
1997
|
};
|
|
1997
|
-
if (le) return /*#__PURE__*/ I(
|
|
1998
|
+
if (le) return /*#__PURE__*/ I(f, {
|
|
1998
1999
|
className: "absolute inset-0",
|
|
1999
2000
|
distribution: "center",
|
|
2000
2001
|
alignment: "center",
|
|
2001
2002
|
direction: "vertical",
|
|
2002
|
-
children: [/*#__PURE__*/ F(
|
|
2003
|
+
children: [/*#__PURE__*/ F(a, {
|
|
2003
2004
|
variant: "primary",
|
|
2004
2005
|
size: "large",
|
|
2005
2006
|
className: "mb-2"
|
|
@@ -2007,7 +2008,7 @@ var ge = (e, t) => ({
|
|
|
2007
2008
|
});
|
|
2008
2009
|
if (ue) {
|
|
2009
2010
|
let e = ue.message;
|
|
2010
|
-
return /*#__PURE__*/ F(
|
|
2011
|
+
return /*#__PURE__*/ F(f, {
|
|
2011
2012
|
className: "absolute inset-0",
|
|
2012
2013
|
distribution: "center",
|
|
2013
2014
|
alignment: "center",
|
|
@@ -2018,19 +2019,19 @@ var ge = (e, t) => ({
|
|
|
2018
2019
|
})
|
|
2019
2020
|
});
|
|
2020
2021
|
}
|
|
2021
|
-
let Ee = de?.bytesUsed || 0, De = de?.quotaBytes || 0, ke = De > 0 ? De - Ee : 0, je = (Y || []).filter((e) =>
|
|
2022
|
+
let Ee = de?.bytesUsed || 0, De = de?.quotaBytes || 0, ke = De > 0 ? De - Ee : 0, je = (Y || []).filter((e) => v.includes(e.name)), Me = je.length > 0, Ne = je.length, Pe = (Y || []).length, Fe = pe.length, Ie = Fe !== Pe, Le = me.map((e) => e.name), Re = Le.length > 0 && Le.every((e) => v.includes(e)), ze = Le.some((e) => v.includes(e));
|
|
2022
2023
|
return /*#__PURE__*/ I("div", {
|
|
2023
2024
|
className: "relative",
|
|
2024
2025
|
children: [
|
|
2025
|
-
/*#__PURE__*/ I(
|
|
2026
|
+
/*#__PURE__*/ I(f, {
|
|
2026
2027
|
direction: "vertical",
|
|
2027
2028
|
children: [
|
|
2028
|
-
/*#__PURE__*/ I(
|
|
2029
|
+
/*#__PURE__*/ I(f, {
|
|
2029
2030
|
distribution: "end",
|
|
2030
2031
|
alignment: "center",
|
|
2031
2032
|
gap: "2",
|
|
2032
2033
|
className: "pb-2",
|
|
2033
|
-
children: [/*#__PURE__*/ F(
|
|
2034
|
+
children: [/*#__PURE__*/ F(f, {
|
|
2034
2035
|
gap: "0.5",
|
|
2035
2036
|
alignment: "center",
|
|
2036
2037
|
children: /*#__PURE__*/ F(j, {
|
|
@@ -2047,21 +2048,21 @@ var ge = (e, t) => ({
|
|
|
2047
2048
|
sortDirection: e
|
|
2048
2049
|
})
|
|
2049
2050
|
})
|
|
2050
|
-
}), /*#__PURE__*/ F(
|
|
2051
|
+
}), /*#__PURE__*/ F(p, {
|
|
2051
2052
|
variant: "primary",
|
|
2052
2053
|
className: "whitespace-nowrap",
|
|
2053
|
-
onClick: () =>
|
|
2054
|
+
onClick: () => h(!0),
|
|
2054
2055
|
children: /*#__PURE__*/ F(U, { id: "vTh35P" })
|
|
2055
2056
|
})]
|
|
2056
2057
|
}),
|
|
2057
|
-
/*#__PURE__*/ F(
|
|
2058
|
+
/*#__PURE__*/ F(E, { children: /*#__PURE__*/ F(f, {
|
|
2058
2059
|
direction: "vertical",
|
|
2059
2060
|
gap: "2",
|
|
2060
|
-
children: /*#__PURE__*/ F(
|
|
2061
|
+
children: /*#__PURE__*/ F(f, {
|
|
2061
2062
|
distribution: "end",
|
|
2062
2063
|
alignment: "center",
|
|
2063
|
-
children: /*#__PURE__*/ F(
|
|
2064
|
-
placeholder:
|
|
2064
|
+
children: /*#__PURE__*/ F(d, {
|
|
2065
|
+
placeholder: t._({ id: "TipzDp" }),
|
|
2065
2066
|
"data-testid": "searchbar",
|
|
2066
2067
|
value: D,
|
|
2067
2068
|
onInput: (e) => {
|
|
@@ -2077,37 +2078,37 @@ var ge = (e, t) => ({
|
|
|
2077
2078
|
})
|
|
2078
2079
|
})
|
|
2079
2080
|
}) }),
|
|
2080
|
-
/*#__PURE__*/ F(
|
|
2081
|
+
/*#__PURE__*/ F(E, { children: /*#__PURE__*/ I(f, {
|
|
2081
2082
|
distribution: "start",
|
|
2082
2083
|
gap: "2",
|
|
2083
2084
|
alignment: "center",
|
|
2084
2085
|
className: "text-sm",
|
|
2085
|
-
children: [/*#__PURE__*/ I(
|
|
2086
|
+
children: [/*#__PURE__*/ I(f, {
|
|
2086
2087
|
gap: "2",
|
|
2087
2088
|
alignment: "center",
|
|
2088
|
-
children: [/*#__PURE__*/ F(
|
|
2089
|
+
children: [/*#__PURE__*/ F(y, {
|
|
2089
2090
|
checked: Re,
|
|
2090
2091
|
indeterminate: ze && !Re,
|
|
2091
2092
|
onChange: () => {
|
|
2092
|
-
|
|
2093
|
+
x(Re ? (e) => e.filter((e) => !Le.includes(e)) : (e) => [...new Set([...e, ...Le])]);
|
|
2093
2094
|
}
|
|
2094
|
-
}), /*#__PURE__*/ I(
|
|
2095
|
+
}), /*#__PURE__*/ I(r, {
|
|
2095
2096
|
className: "flex items-center",
|
|
2096
|
-
children: [/*#__PURE__*/ F(
|
|
2097
|
+
children: [/*#__PURE__*/ F(C, {
|
|
2097
2098
|
as: "div",
|
|
2098
|
-
children: /*#__PURE__*/ F(
|
|
2099
|
+
children: /*#__PURE__*/ F(p, {
|
|
2099
2100
|
disabled: !Me,
|
|
2100
2101
|
size: "small",
|
|
2101
2102
|
icon: "moreVert",
|
|
2102
|
-
label:
|
|
2103
|
+
label: t._({ id: "7L01XJ" })
|
|
2103
2104
|
})
|
|
2104
|
-
}), Me && /*#__PURE__*/ F(
|
|
2105
|
+
}), Me && /*#__PURE__*/ F(T, { children: /*#__PURE__*/ F(b, {
|
|
2105
2106
|
disabled: !Me,
|
|
2106
|
-
label: n._(
|
|
2107
|
+
label: n._(t._({
|
|
2107
2108
|
id: "dBrBc5",
|
|
2108
2109
|
values: { selectedCount: Ne }
|
|
2109
2110
|
})),
|
|
2110
|
-
onClick: () =>
|
|
2111
|
+
onClick: () => _(!0)
|
|
2111
2112
|
}) })]
|
|
2112
2113
|
})]
|
|
2113
2114
|
}), /*#__PURE__*/ I("div", {
|
|
@@ -2143,8 +2144,8 @@ var ge = (e, t) => ({
|
|
|
2143
2144
|
}),
|
|
2144
2145
|
/*#__PURE__*/ F(he, {
|
|
2145
2146
|
containers: me,
|
|
2146
|
-
createModalOpen:
|
|
2147
|
-
setCreateModalOpen:
|
|
2147
|
+
createModalOpen: m,
|
|
2148
|
+
setCreateModalOpen: h,
|
|
2148
2149
|
maxContainerNameLength: X?.swift?.max_container_name_length,
|
|
2149
2150
|
onCreateSuccess: G,
|
|
2150
2151
|
onCreateError: te,
|
|
@@ -2156,18 +2157,18 @@ var ge = (e, t) => ({
|
|
|
2156
2157
|
onPropertiesError: ae,
|
|
2157
2158
|
onAclSuccess: oe,
|
|
2158
2159
|
onAclError: se,
|
|
2159
|
-
selectedContainers:
|
|
2160
|
-
setSelectedContainers:
|
|
2160
|
+
selectedContainers: v,
|
|
2161
|
+
setSelectedContainers: x,
|
|
2161
2162
|
hasAnyBulkAction: !0
|
|
2162
2163
|
}),
|
|
2163
2164
|
/*#__PURE__*/ F(Ae, {
|
|
2164
|
-
isOpen:
|
|
2165
|
+
isOpen: g,
|
|
2165
2166
|
containers: je,
|
|
2166
|
-
onClose: () =>
|
|
2167
|
+
onClose: () => _(!1),
|
|
2167
2168
|
onComplete: ce
|
|
2168
2169
|
}),
|
|
2169
|
-
|
|
2170
|
-
...
|
|
2170
|
+
S && /*#__PURE__*/ F(e, {
|
|
2171
|
+
...S,
|
|
2171
2172
|
className: "border-theme-light fixed top-5 right-5 z-50 rounded-lg border shadow-lg"
|
|
2172
2173
|
})
|
|
2173
2174
|
]
|
|
@@ -2183,58 +2184,58 @@ var ge = (e, t) => ({
|
|
|
2183
2184
|
"--x-s3",
|
|
2184
2185
|
"--table-s3"
|
|
2185
2186
|
], Ie = ({ isOpen: e, onClose: t, onSuccess: n, onError: r }) => {
|
|
2186
|
-
let { i18n: i, _: a } = W(), o = N(), [
|
|
2187
|
+
let { i18n: i, _: a } = W(), o = N(), [s, c] = V(""), [l, u] = V(null), [d, p] = V(!1), m = O.useUtils(), g = O.storage.ceph.containers.create.useMutation({
|
|
2187
2188
|
onSuccess: () => {
|
|
2188
|
-
|
|
2189
|
-
let e =
|
|
2189
|
+
m.storage.ceph.containers.list.invalidate();
|
|
2190
|
+
let e = s.trim();
|
|
2190
2191
|
n?.(e);
|
|
2191
2192
|
},
|
|
2192
2193
|
onError: (e) => {
|
|
2193
|
-
r?.(
|
|
2194
|
+
r?.(s.trim(), e.message);
|
|
2194
2195
|
},
|
|
2195
2196
|
onSettled: () => {
|
|
2196
2197
|
_();
|
|
2197
2198
|
}
|
|
2198
2199
|
}), _ = () => {
|
|
2199
|
-
|
|
2200
|
+
c(""), u(null), p(!1), g.reset(), t();
|
|
2200
2201
|
}, v = (e) => {
|
|
2201
2202
|
let t = e.trim();
|
|
2202
|
-
if (!t) return
|
|
2203
|
-
if (t.length < 3) return
|
|
2204
|
-
if (t.length > 63) return
|
|
2205
|
-
if (!Me.test(t)) return
|
|
2206
|
-
if (!/^[a-z0-9]/.test(t) || !/[a-z0-9]$/.test(t)) return
|
|
2207
|
-
if (t.includes("..")) return
|
|
2208
|
-
if (Ne.test(t)) return
|
|
2209
|
-
for (let e of Pe) if (t.startsWith(e)) return
|
|
2203
|
+
if (!t) return u(i._({ id: "48bMai" })), !1;
|
|
2204
|
+
if (t.length < 3) return u(i._({ id: "gjop1H" })), !1;
|
|
2205
|
+
if (t.length > 63) return u(i._({ id: "is0Bhk" })), !1;
|
|
2206
|
+
if (!Me.test(t)) return u(i._({ id: "IQldU4" })), !1;
|
|
2207
|
+
if (!/^[a-z0-9]/.test(t) || !/[a-z0-9]$/.test(t)) return u(i._({ id: "VG2a+x" })), !1;
|
|
2208
|
+
if (t.includes("..")) return u(i._({ id: "V8/eES" })), !1;
|
|
2209
|
+
if (Ne.test(t)) return u(i._({ id: "W8Rb/w" })), !1;
|
|
2210
|
+
for (let e of Pe) if (t.startsWith(e)) return u(i._({
|
|
2210
2211
|
id: "B2SpR8",
|
|
2211
2212
|
values: { prefix: e }
|
|
2212
2213
|
})), !1;
|
|
2213
|
-
for (let e of Fe) if (t.endsWith(e)) return
|
|
2214
|
+
for (let e of Fe) if (t.endsWith(e)) return u(i._({
|
|
2214
2215
|
id: "QRlXaL",
|
|
2215
2216
|
values: { suffix: e }
|
|
2216
2217
|
})), !1;
|
|
2217
|
-
return
|
|
2218
|
-
},
|
|
2218
|
+
return u(null), !0;
|
|
2219
|
+
}, b = (e) => {
|
|
2219
2220
|
let t = e.target.value;
|
|
2220
|
-
|
|
2221
|
-
},
|
|
2222
|
-
v(
|
|
2221
|
+
c(t), l && v(t);
|
|
2222
|
+
}, x = () => {
|
|
2223
|
+
v(s) && g.mutate({
|
|
2223
2224
|
project_id: o,
|
|
2224
|
-
bucketName:
|
|
2225
|
-
enableVersioning:
|
|
2225
|
+
bucketName: s.trim(),
|
|
2226
|
+
enableVersioning: d
|
|
2226
2227
|
});
|
|
2227
2228
|
};
|
|
2228
|
-
return e ? /*#__PURE__*/ F(
|
|
2229
|
+
return e ? /*#__PURE__*/ F(h, {
|
|
2229
2230
|
title: i._({ id: "HiDAFk" }),
|
|
2230
2231
|
open: e,
|
|
2231
2232
|
onCancel: _,
|
|
2232
2233
|
confirmButtonLabel: i._({ id: "hYgDIe" }),
|
|
2233
|
-
onConfirm:
|
|
2234
|
+
onConfirm: x,
|
|
2234
2235
|
cancelButtonLabel: i._({ id: "dEgA5A" }),
|
|
2235
2236
|
size: "small",
|
|
2236
|
-
disableConfirmButton: g.isPending || !
|
|
2237
|
-
children: /*#__PURE__*/ I(
|
|
2237
|
+
disableConfirmButton: g.isPending || !s.trim(),
|
|
2238
|
+
children: /*#__PURE__*/ I(f, {
|
|
2238
2239
|
direction: "vertical",
|
|
2239
2240
|
gap: "6",
|
|
2240
2241
|
children: [
|
|
@@ -2242,51 +2243,51 @@ var ge = (e, t) => ({
|
|
|
2242
2243
|
className: "text-theme-default",
|
|
2243
2244
|
children: /*#__PURE__*/ F(U, { id: "ASJMIw" })
|
|
2244
2245
|
}),
|
|
2245
|
-
/*#__PURE__*/ F(
|
|
2246
|
+
/*#__PURE__*/ F(S, {
|
|
2246
2247
|
label: i._({ id: "NNpgo3" }),
|
|
2247
2248
|
required: !0,
|
|
2248
|
-
value:
|
|
2249
|
-
onChange:
|
|
2249
|
+
value: s,
|
|
2250
|
+
onChange: b,
|
|
2250
2251
|
onKeyDown: (e) => {
|
|
2251
|
-
e.key === "Enter" &&
|
|
2252
|
+
e.key === "Enter" && x();
|
|
2252
2253
|
},
|
|
2253
|
-
invalid: !!
|
|
2254
|
-
errortext:
|
|
2254
|
+
invalid: !!l,
|
|
2255
|
+
errortext: l || void 0,
|
|
2255
2256
|
disabled: g.isPending,
|
|
2256
2257
|
autoFocus: !0,
|
|
2257
2258
|
placeholder: i._({ id: "yDHGP+" })
|
|
2258
2259
|
}),
|
|
2259
|
-
/*#__PURE__*/ F(
|
|
2260
|
+
/*#__PURE__*/ F(y, {
|
|
2260
2261
|
label: i._({ id: "ifQSTI" }),
|
|
2261
2262
|
helptext: i._({ id: "WM+Nm7" }),
|
|
2262
|
-
checked:
|
|
2263
|
-
onChange: (e) =>
|
|
2263
|
+
checked: d,
|
|
2264
|
+
onChange: (e) => p(e.target.checked),
|
|
2264
2265
|
disabled: g.isPending
|
|
2265
2266
|
})
|
|
2266
2267
|
]
|
|
2267
2268
|
})
|
|
2268
2269
|
}) : null;
|
|
2269
2270
|
}, Le = ({ isOpen: e, bucket: t, onClose: n, onSuccess: r, onError: i }) => {
|
|
2270
|
-
let { i18n: a, _: o } = W(),
|
|
2271
|
+
let { i18n: a, _: o } = W(), s = N(), [c, l] = V(""), [u, d] = V(null), [m, g] = V(!1), _ = O.useUtils(), y = () => {
|
|
2271
2272
|
t && navigator.clipboard.writeText(t.name).then(() => {
|
|
2272
|
-
|
|
2273
|
+
g(!0), setTimeout(() => g(!1), 2e3);
|
|
2273
2274
|
});
|
|
2274
|
-
},
|
|
2275
|
-
|
|
2276
|
-
} }),
|
|
2277
|
-
|
|
2278
|
-
},
|
|
2275
|
+
}, b = O.storage.ceph.objects.deleteAll.useMutation({ onSettled: () => {
|
|
2276
|
+
_.storage.ceph.containers.list.invalidate(), C();
|
|
2277
|
+
} }), C = () => {
|
|
2278
|
+
l(""), d(null), g(!1), b.reset(), n();
|
|
2279
|
+
}, w = (e) => {
|
|
2279
2280
|
let t = e.target.value;
|
|
2280
|
-
|
|
2281
|
+
l(t), u && d(null);
|
|
2281
2282
|
}, T = () => {
|
|
2282
2283
|
if (!t) return;
|
|
2283
|
-
if (
|
|
2284
|
-
|
|
2284
|
+
if (c.trim() !== t.name) {
|
|
2285
|
+
d(a._({ id: "wxVsr5" }));
|
|
2285
2286
|
return;
|
|
2286
2287
|
}
|
|
2287
2288
|
let e = t.name;
|
|
2288
|
-
|
|
2289
|
-
project_id:
|
|
2289
|
+
b.mutate({
|
|
2290
|
+
project_id: s,
|
|
2290
2291
|
containerName: e
|
|
2291
2292
|
}, {
|
|
2292
2293
|
onSuccess: (t) => {
|
|
@@ -2301,29 +2302,29 @@ var ge = (e, t) => ({
|
|
|
2301
2302
|
};
|
|
2302
2303
|
if (!e || !t) return null;
|
|
2303
2304
|
let D = t.count === 0, k = t.count, A = t.name;
|
|
2304
|
-
return /*#__PURE__*/ F(
|
|
2305
|
+
return /*#__PURE__*/ F(h, {
|
|
2305
2306
|
title: a._({ id: "CfKRC1" }),
|
|
2306
2307
|
open: e,
|
|
2307
|
-
onCancel:
|
|
2308
|
+
onCancel: C,
|
|
2308
2309
|
confirmButtonLabel: D ? void 0 : a._({ id: "N2S1rs" }),
|
|
2309
2310
|
confirmButtonVariant: "primary-danger",
|
|
2310
2311
|
onConfirm: D ? void 0 : T,
|
|
2311
2312
|
cancelButtonLabel: D ? void 0 : a._({ id: "dEgA5A" }),
|
|
2312
|
-
modalFooter: D ? /*#__PURE__*/ F(
|
|
2313
|
+
modalFooter: D ? /*#__PURE__*/ F(v, {
|
|
2313
2314
|
className: "flex justify-end",
|
|
2314
|
-
children: /*#__PURE__*/ F(
|
|
2315
|
+
children: /*#__PURE__*/ F(x, { children: /*#__PURE__*/ F(p, {
|
|
2315
2316
|
variant: "primary",
|
|
2316
|
-
onClick:
|
|
2317
|
+
onClick: C,
|
|
2317
2318
|
"data-testid": "empty-info-close-button",
|
|
2318
2319
|
children: /*#__PURE__*/ F(U, { id: "yz7wBu" })
|
|
2319
2320
|
}) })
|
|
2320
2321
|
}) : void 0,
|
|
2321
2322
|
size: "small",
|
|
2322
|
-
disableConfirmButton:
|
|
2323
|
+
disableConfirmButton: b.isPending || !D && c.trim() !== t.name,
|
|
2323
2324
|
children: D ? /*#__PURE__*/ F("p", {
|
|
2324
2325
|
className: "text-theme-default py-2",
|
|
2325
2326
|
children: /*#__PURE__*/ F(U, { id: "tL9it8" })
|
|
2326
|
-
}) : /*#__PURE__*/ I(
|
|
2327
|
+
}) : /*#__PURE__*/ I(f, {
|
|
2327
2328
|
direction: "vertical",
|
|
2328
2329
|
gap: "6",
|
|
2329
2330
|
children: [
|
|
@@ -2338,7 +2339,7 @@ var ge = (e, t) => ({
|
|
|
2338
2339
|
components: { 0: /*#__PURE__*/ F("strong", {}) }
|
|
2339
2340
|
})
|
|
2340
2341
|
}),
|
|
2341
|
-
/*#__PURE__*/ I(
|
|
2342
|
+
/*#__PURE__*/ I(f, {
|
|
2342
2343
|
direction: "vertical",
|
|
2343
2344
|
gap: "2",
|
|
2344
2345
|
children: [/*#__PURE__*/ I("div", {
|
|
@@ -2346,27 +2347,27 @@ var ge = (e, t) => ({
|
|
|
2346
2347
|
children: [/*#__PURE__*/ F("span", {
|
|
2347
2348
|
className: "text-theme-light text-sm",
|
|
2348
2349
|
children: /*#__PURE__*/ F(U, { id: "FrLdVI" })
|
|
2349
|
-
}), /*#__PURE__*/ F(
|
|
2350
|
+
}), /*#__PURE__*/ F(p, {
|
|
2350
2351
|
size: "small",
|
|
2351
2352
|
variant: "subdued",
|
|
2352
|
-
onClick:
|
|
2353
|
-
icon:
|
|
2354
|
-
label:
|
|
2353
|
+
onClick: y,
|
|
2354
|
+
icon: m ? "check" : "contentCopy",
|
|
2355
|
+
label: m ? a._({ id: "6V3Ea3" }) : a._({ id: "he3ygx" })
|
|
2355
2356
|
})]
|
|
2356
2357
|
}), /*#__PURE__*/ F("div", {
|
|
2357
2358
|
className: "bg-theme-background-lvl-1 rounded p-2 text-sm",
|
|
2358
2359
|
children: t.name
|
|
2359
2360
|
})]
|
|
2360
2361
|
}),
|
|
2361
|
-
/*#__PURE__*/ F(
|
|
2362
|
+
/*#__PURE__*/ F(S, {
|
|
2362
2363
|
label: a._({ id: "dEHa3L" }),
|
|
2363
2364
|
required: !0,
|
|
2364
|
-
value:
|
|
2365
|
-
onChange:
|
|
2365
|
+
value: c,
|
|
2366
|
+
onChange: w,
|
|
2366
2367
|
onKeyDown: E,
|
|
2367
|
-
invalid: !!
|
|
2368
|
-
errortext:
|
|
2369
|
-
disabled:
|
|
2368
|
+
invalid: !!u,
|
|
2369
|
+
errortext: u || void 0,
|
|
2370
|
+
disabled: b.isPending,
|
|
2370
2371
|
placeholder: t.name,
|
|
2371
2372
|
autoFocus: !0
|
|
2372
2373
|
})
|
|
@@ -2374,34 +2375,34 @@ var ge = (e, t) => ({
|
|
|
2374
2375
|
})
|
|
2375
2376
|
});
|
|
2376
2377
|
}, Re = ({ isOpen: e, bucket: t, onClose: n, onSuccess: r, onError: i }) => {
|
|
2377
|
-
let { i18n:
|
|
2378
|
+
let { i18n: o, _: s } = W(), c = N(), [l, u] = V(""), [d, m] = V(null), [g, _] = V(!1), y = () => {
|
|
2378
2379
|
t && navigator.clipboard.writeText(t.name).then(() => {
|
|
2379
|
-
|
|
2380
|
+
_(!0), setTimeout(() => _(!1), 2e3);
|
|
2380
2381
|
});
|
|
2381
|
-
},
|
|
2382
|
-
project_id:
|
|
2382
|
+
}, b = O.useUtils(), { data: C, isLoading: w, error: T } = O.storage.ceph.objects.list.useQuery({
|
|
2383
|
+
project_id: c ?? "",
|
|
2383
2384
|
containerName: t?.name ?? "",
|
|
2384
2385
|
maxKeys: 1
|
|
2385
2386
|
}, { enabled: e && t !== null }), E = O.storage.ceph.containers.delete.useMutation({ onSettled: () => {
|
|
2386
|
-
|
|
2387
|
+
b.storage.ceph.containers.list.invalidate(), D();
|
|
2387
2388
|
} });
|
|
2388
2389
|
z(() => {
|
|
2389
|
-
e || (
|
|
2390
|
+
e || (u(""), m(null), E.reset());
|
|
2390
2391
|
}, [e, t?.name]);
|
|
2391
2392
|
let D = () => {
|
|
2392
|
-
|
|
2393
|
+
u(""), m(null), E.reset(), n();
|
|
2393
2394
|
}, k = (e) => {
|
|
2394
2395
|
let t = e.target.value;
|
|
2395
|
-
|
|
2396
|
+
u(t), d && m(null);
|
|
2396
2397
|
}, A = () => {
|
|
2397
2398
|
if (!t || T) return;
|
|
2398
|
-
if (
|
|
2399
|
-
|
|
2399
|
+
if (l.trim() !== t.name) {
|
|
2400
|
+
m(o._({ id: "wxVsr5" }));
|
|
2400
2401
|
return;
|
|
2401
2402
|
}
|
|
2402
2403
|
let e = t.name;
|
|
2403
2404
|
E.mutate({
|
|
2404
|
-
project_id:
|
|
2405
|
+
project_id: c,
|
|
2405
2406
|
bucketName: e
|
|
2406
2407
|
}, {
|
|
2407
2408
|
onSuccess: () => {
|
|
@@ -2415,18 +2416,18 @@ var ge = (e, t) => ({
|
|
|
2415
2416
|
e.key === "Enter" && A();
|
|
2416
2417
|
};
|
|
2417
2418
|
if (!e || !t) return null;
|
|
2418
|
-
let M =
|
|
2419
|
-
return /*#__PURE__*/ F(
|
|
2420
|
-
title:
|
|
2419
|
+
let M = C?.objects?.length ?? 0, L = M > 0, R = T?.message;
|
|
2420
|
+
return /*#__PURE__*/ F(h, {
|
|
2421
|
+
title: o._({ id: "IwlPLb" }),
|
|
2421
2422
|
open: e,
|
|
2422
2423
|
onCancel: D,
|
|
2423
|
-
confirmButtonLabel: L ? void 0 :
|
|
2424
|
+
confirmButtonLabel: L ? void 0 : o._({ id: "IwlPLb" }),
|
|
2424
2425
|
confirmButtonVariant: L ? void 0 : "primary-danger",
|
|
2425
2426
|
onConfirm: L ? void 0 : A,
|
|
2426
|
-
cancelButtonLabel: L ? void 0 :
|
|
2427
|
-
modalFooter: L ? /*#__PURE__*/ F(
|
|
2427
|
+
cancelButtonLabel: L ? void 0 : o._({ id: "dEgA5A" }),
|
|
2428
|
+
modalFooter: L ? /*#__PURE__*/ F(v, {
|
|
2428
2429
|
className: "flex justify-end",
|
|
2429
|
-
children: /*#__PURE__*/ F(
|
|
2430
|
+
children: /*#__PURE__*/ F(x, { children: /*#__PURE__*/ F(p, {
|
|
2430
2431
|
variant: "primary",
|
|
2431
2432
|
onClick: D,
|
|
2432
2433
|
"data-testid": "delete-has-objects-close-button",
|
|
@@ -2434,8 +2435,8 @@ var ge = (e, t) => ({
|
|
|
2434
2435
|
}) })
|
|
2435
2436
|
}) : void 0,
|
|
2436
2437
|
size: "small",
|
|
2437
|
-
disableConfirmButton: E.isPending ||
|
|
2438
|
-
children: /*#__PURE__*/ I(
|
|
2438
|
+
disableConfirmButton: E.isPending || w || !!T || l.trim() !== t.name,
|
|
2439
|
+
children: /*#__PURE__*/ I(f, {
|
|
2439
2440
|
direction: "vertical",
|
|
2440
2441
|
gap: "6",
|
|
2441
2442
|
children: [T && /*#__PURE__*/ F("p", {
|
|
@@ -2446,11 +2447,11 @@ var ge = (e, t) => ({
|
|
|
2446
2447
|
id: "MJLqeY",
|
|
2447
2448
|
values: { errorMessage: R }
|
|
2448
2449
|
})
|
|
2449
|
-
}),
|
|
2450
|
+
}), w ? /*#__PURE__*/ I(f, {
|
|
2450
2451
|
direction: "horizontal",
|
|
2451
2452
|
gap: "2",
|
|
2452
2453
|
alignment: "center",
|
|
2453
|
-
children: [/*#__PURE__*/ F(
|
|
2454
|
+
children: [/*#__PURE__*/ F(a, {}), /*#__PURE__*/ F("span", {
|
|
2454
2455
|
className: "text-juno-grey-light-1 text-sm",
|
|
2455
2456
|
children: /*#__PURE__*/ F(U, { id: "rPuPb+" })
|
|
2456
2457
|
})]
|
|
@@ -2465,7 +2466,7 @@ var ge = (e, t) => ({
|
|
|
2465
2466
|
className: "text-theme-default",
|
|
2466
2467
|
children: /*#__PURE__*/ F(U, { id: "/pOQrn" })
|
|
2467
2468
|
}),
|
|
2468
|
-
/*#__PURE__*/ I(
|
|
2469
|
+
/*#__PURE__*/ I(f, {
|
|
2469
2470
|
direction: "vertical",
|
|
2470
2471
|
gap: "2",
|
|
2471
2472
|
children: [/*#__PURE__*/ I("div", {
|
|
@@ -2473,59 +2474,59 @@ var ge = (e, t) => ({
|
|
|
2473
2474
|
children: [/*#__PURE__*/ F("span", {
|
|
2474
2475
|
className: "text-theme-light text-sm",
|
|
2475
2476
|
children: /*#__PURE__*/ F(U, { id: "No++00" })
|
|
2476
|
-
}), /*#__PURE__*/ F(
|
|
2477
|
+
}), /*#__PURE__*/ F(p, {
|
|
2477
2478
|
size: "small",
|
|
2478
2479
|
variant: "subdued",
|
|
2479
|
-
onClick:
|
|
2480
|
-
icon:
|
|
2481
|
-
label:
|
|
2480
|
+
onClick: y,
|
|
2481
|
+
icon: g ? "check" : "contentCopy",
|
|
2482
|
+
label: g ? o._({ id: "6V3Ea3" }) : o._({ id: "he3ygx" })
|
|
2482
2483
|
})]
|
|
2483
2484
|
}), /*#__PURE__*/ F("div", {
|
|
2484
2485
|
className: "bg-theme-background-lvl-1 rounded p-2 text-sm",
|
|
2485
2486
|
children: t.name
|
|
2486
2487
|
})]
|
|
2487
2488
|
}),
|
|
2488
|
-
/*#__PURE__*/ F(
|
|
2489
|
-
label:
|
|
2489
|
+
/*#__PURE__*/ F(S, {
|
|
2490
|
+
label: o._({ id: "dEHa3L" }),
|
|
2490
2491
|
required: !0,
|
|
2491
|
-
value:
|
|
2492
|
+
value: l,
|
|
2492
2493
|
onChange: k,
|
|
2493
2494
|
onKeyDown: j,
|
|
2494
|
-
invalid: !!
|
|
2495
|
-
errortext:
|
|
2495
|
+
invalid: !!d,
|
|
2496
|
+
errortext: d || void 0,
|
|
2496
2497
|
disabled: E.isPending,
|
|
2497
2498
|
placeholder: t.name
|
|
2498
2499
|
})
|
|
2499
2500
|
] })]
|
|
2500
2501
|
})
|
|
2501
2502
|
});
|
|
2502
|
-
}, ze = ({ buckets: e, createModalOpen: t, setCreateModalOpen:
|
|
2503
|
-
let { projectId:
|
|
2503
|
+
}, ze = ({ buckets: e, createModalOpen: t, setCreateModalOpen: n, onCreateSuccess: a, onCreateError: o, onEmptySuccess: l, onEmptyError: u, onDeleteSuccess: d, onDeleteError: f, selectedBuckets: p, setSelectedBuckets: m, hasAnyBulkAction: h = !0 }) => {
|
|
2504
|
+
let { projectId: g, provider: v, storageType: x } = H({ strict: !1 }), { i18n: S, _: C } = W(), w = ee(), E = B(null), [D, O] = V(0), [k, A] = V(null), [j, N] = V(null);
|
|
2504
2505
|
z(() => {
|
|
2505
|
-
|
|
2506
|
+
E.current && O(E.current.offsetWidth - E.current.clientWidth);
|
|
2506
2507
|
}, [e.length]);
|
|
2507
2508
|
let L = (e) => {
|
|
2508
2509
|
try {
|
|
2509
2510
|
return new Date(e).toLocaleString();
|
|
2510
2511
|
} catch {
|
|
2511
|
-
return
|
|
2512
|
+
return S._({ id: "fj5byd" });
|
|
2512
2513
|
}
|
|
2513
2514
|
}, R = ne({
|
|
2514
2515
|
count: e.length,
|
|
2515
|
-
getScrollElement: () =>
|
|
2516
|
+
getScrollElement: () => E.current,
|
|
2516
2517
|
estimateSize: () => 48,
|
|
2517
2518
|
overscan: 10
|
|
2518
|
-
}), G = new Set(
|
|
2519
|
+
}), G = new Set(p), te = e.length > 0 && e.every((e) => G.has(e.name)), K = () => {
|
|
2519
2520
|
let t = e.map((e) => e.name);
|
|
2520
|
-
|
|
2521
|
+
m(te ? p.filter((e) => !t.includes(e)) : [...new Set([...p, ...t])]);
|
|
2521
2522
|
}, re = (e) => {
|
|
2522
|
-
|
|
2523
|
+
p.includes(e) ? m(p.filter((t) => t !== e)) : m([...p, e]);
|
|
2523
2524
|
};
|
|
2524
|
-
if (!e || e.length === 0) return /*#__PURE__*/ F(
|
|
2525
|
+
if (!e || e.length === 0) return /*#__PURE__*/ F(_, {
|
|
2525
2526
|
columns: 4,
|
|
2526
2527
|
className: "buckets",
|
|
2527
2528
|
"data-testid": "no-buckets",
|
|
2528
|
-
children: /*#__PURE__*/ F(
|
|
2529
|
+
children: /*#__PURE__*/ F(c, { children: /*#__PURE__*/ F(i, {
|
|
2529
2530
|
colSpan: 4,
|
|
2530
2531
|
children: /*#__PURE__*/ I("div", {
|
|
2531
2532
|
className: "py-8 text-center",
|
|
@@ -2539,32 +2540,32 @@ var ge = (e, t) => ({
|
|
|
2539
2540
|
})
|
|
2540
2541
|
}) })
|
|
2541
2542
|
});
|
|
2542
|
-
let q =
|
|
2543
|
+
let q = h ? 6 : 5, ie = h ? "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";
|
|
2543
2544
|
return /*#__PURE__*/ I(P, { children: [
|
|
2544
2545
|
/*#__PURE__*/ I("div", {
|
|
2545
2546
|
className: "relative",
|
|
2546
2547
|
children: [/*#__PURE__*/ F("div", {
|
|
2547
|
-
style: { paddingRight: `${
|
|
2548
|
-
children: /*#__PURE__*/ F(
|
|
2548
|
+
style: { paddingRight: `${D}px` },
|
|
2549
|
+
children: /*#__PURE__*/ F(_, {
|
|
2549
2550
|
columns: q,
|
|
2550
2551
|
gridColumnTemplate: ie,
|
|
2551
2552
|
className: "buckets",
|
|
2552
2553
|
"data-testid": "buckets-table-header",
|
|
2553
|
-
children: /*#__PURE__*/ I(
|
|
2554
|
-
|
|
2554
|
+
children: /*#__PURE__*/ I(c, { children: [
|
|
2555
|
+
h && /*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(y, {
|
|
2555
2556
|
checked: te,
|
|
2556
2557
|
onChange: K,
|
|
2557
2558
|
"data-testid": "select-all-buckets"
|
|
2558
2559
|
}) }),
|
|
2559
|
-
/*#__PURE__*/ F(
|
|
2560
|
-
/*#__PURE__*/ F(
|
|
2561
|
-
/*#__PURE__*/ F(
|
|
2562
|
-
/*#__PURE__*/ F(
|
|
2563
|
-
/*#__PURE__*/ F(
|
|
2560
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "BTsbBe" }) }),
|
|
2561
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "sxbP3b" }) }),
|
|
2562
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "sjMCOP" }) }),
|
|
2563
|
+
/*#__PURE__*/ F(s, { children: /*#__PURE__*/ F(U, { id: "hgpMHD" }) }),
|
|
2564
|
+
/*#__PURE__*/ F(s, { style: { marginRight: `-${D}px` } })
|
|
2564
2565
|
] })
|
|
2565
2566
|
})
|
|
2566
2567
|
}), /*#__PURE__*/ F("div", {
|
|
2567
|
-
ref:
|
|
2568
|
+
ref: E,
|
|
2568
2569
|
className: "overflow-auto",
|
|
2569
2570
|
style: { height: "calc(100vh - 490px)" },
|
|
2570
2571
|
"data-testid": "buckets-table-body",
|
|
@@ -2575,12 +2576,12 @@ var ge = (e, t) => ({
|
|
|
2575
2576
|
position: "relative"
|
|
2576
2577
|
},
|
|
2577
2578
|
children: R.getVirtualItems().map((t) => {
|
|
2578
|
-
let n = e[t.index],
|
|
2579
|
+
let n = e[t.index], a = p.includes(n.name), o = () => w({
|
|
2579
2580
|
to: "/projects/$projectId/storage/$provider/$storageType/$containerName/objects",
|
|
2580
2581
|
params: {
|
|
2581
|
-
projectId:
|
|
2582
|
-
provider:
|
|
2583
|
-
storageType:
|
|
2582
|
+
projectId: g ?? "",
|
|
2583
|
+
provider: v ?? "ceph",
|
|
2584
|
+
storageType: x ?? "buckets",
|
|
2584
2585
|
containerName: n.name
|
|
2585
2586
|
}
|
|
2586
2587
|
});
|
|
@@ -2601,23 +2602,23 @@ var ge = (e, t) => ({
|
|
|
2601
2602
|
"data-testid": `bucket-row-${n.name}`,
|
|
2602
2603
|
role: "link",
|
|
2603
2604
|
tabIndex: 0,
|
|
2604
|
-
onClick:
|
|
2605
|
+
onClick: o,
|
|
2605
2606
|
onKeyDown: (e) => {
|
|
2606
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
2607
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), o());
|
|
2607
2608
|
},
|
|
2608
2609
|
children: [
|
|
2609
|
-
|
|
2610
|
+
h && /*#__PURE__*/ F(i, {
|
|
2610
2611
|
onClick: (e) => e.stopPropagation(),
|
|
2611
2612
|
onKeyDown: (e) => {
|
|
2612
2613
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
2613
2614
|
},
|
|
2614
|
-
children: /*#__PURE__*/ F(
|
|
2615
|
-
checked:
|
|
2615
|
+
children: /*#__PURE__*/ F(y, {
|
|
2616
|
+
checked: a,
|
|
2616
2617
|
onChange: () => re(n.name),
|
|
2617
2618
|
"data-testid": `select-bucket-${n.name}`
|
|
2618
2619
|
})
|
|
2619
2620
|
}),
|
|
2620
|
-
/*#__PURE__*/ F(
|
|
2621
|
+
/*#__PURE__*/ F(i, {
|
|
2621
2622
|
className: "min-w-0 overflow-hidden",
|
|
2622
2623
|
children: /*#__PURE__*/ F("span", {
|
|
2623
2624
|
className: "block truncate",
|
|
@@ -2625,17 +2626,17 @@ var ge = (e, t) => ({
|
|
|
2625
2626
|
children: n.name
|
|
2626
2627
|
})
|
|
2627
2628
|
}),
|
|
2628
|
-
/*#__PURE__*/ F(
|
|
2629
|
-
/*#__PURE__*/ F(
|
|
2630
|
-
/*#__PURE__*/ F(
|
|
2631
|
-
/*#__PURE__*/ F(
|
|
2629
|
+
/*#__PURE__*/ F(i, { children: n.count.toLocaleString() }),
|
|
2630
|
+
/*#__PURE__*/ F(i, { children: L(n.last_modified || n.creationDate || "") }),
|
|
2631
|
+
/*#__PURE__*/ F(i, { children: M(n.bytes) }),
|
|
2632
|
+
/*#__PURE__*/ F(i, {
|
|
2632
2633
|
onClick: (e) => e.stopPropagation(),
|
|
2633
|
-
children: /*#__PURE__*/ F(
|
|
2634
|
-
label:
|
|
2634
|
+
children: /*#__PURE__*/ F(r, { children: /*#__PURE__*/ I(T, { children: [/*#__PURE__*/ F(b, {
|
|
2635
|
+
label: S._({ id: "N2S1rs" }),
|
|
2635
2636
|
onClick: () => A(n),
|
|
2636
2637
|
"data-testid": `empty-action-${n.name}`
|
|
2637
|
-
}), /*#__PURE__*/ F(
|
|
2638
|
-
label:
|
|
2638
|
+
}), /*#__PURE__*/ F(b, {
|
|
2639
|
+
label: S._({ id: "cnGeoo" }),
|
|
2639
2640
|
onClick: () => N(n),
|
|
2640
2641
|
"data-testid": `delete-action-${n.name}`
|
|
2641
2642
|
})] }) })
|
|
@@ -2648,30 +2649,30 @@ var ge = (e, t) => ({
|
|
|
2648
2649
|
}),
|
|
2649
2650
|
/*#__PURE__*/ F(Ie, {
|
|
2650
2651
|
isOpen: t,
|
|
2651
|
-
onClose: () =>
|
|
2652
|
+
onClose: () => n(!1),
|
|
2652
2653
|
onSuccess: a,
|
|
2653
|
-
onError:
|
|
2654
|
+
onError: o
|
|
2654
2655
|
}),
|
|
2655
2656
|
/*#__PURE__*/ F(Le, {
|
|
2656
2657
|
isOpen: k !== null,
|
|
2657
2658
|
bucket: k,
|
|
2658
2659
|
onClose: () => A(null),
|
|
2659
|
-
onSuccess:
|
|
2660
|
-
onError:
|
|
2660
|
+
onSuccess: l,
|
|
2661
|
+
onError: u
|
|
2661
2662
|
}),
|
|
2662
2663
|
/*#__PURE__*/ F(Re, {
|
|
2663
2664
|
isOpen: j !== null,
|
|
2664
2665
|
bucket: j,
|
|
2665
2666
|
onClose: () => N(null),
|
|
2666
|
-
onSuccess:
|
|
2667
|
-
onError:
|
|
2667
|
+
onSuccess: d,
|
|
2668
|
+
onError: f
|
|
2668
2669
|
})
|
|
2669
2670
|
] });
|
|
2670
2671
|
};
|
|
2671
2672
|
//#endregion
|
|
2672
2673
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Buckets/BucketToastNotifications.tsx
|
|
2673
2674
|
function Be({ title: e, description: t }) {
|
|
2674
|
-
return /*#__PURE__*/ I(
|
|
2675
|
+
return /*#__PURE__*/ I(f, {
|
|
2675
2676
|
direction: "vertical",
|
|
2676
2677
|
gap: "1.5",
|
|
2677
2678
|
children: [/*#__PURE__*/ F("span", { children: e }), /*#__PURE__*/ F("span", {
|
|
@@ -2785,72 +2786,72 @@ var Ve = (e, t) => ({
|
|
|
2785
2786
|
}),
|
|
2786
2787
|
onDismiss: r.onDismiss
|
|
2787
2788
|
};
|
|
2788
|
-
}, Je = 20, Ye = ({ isOpen:
|
|
2789
|
-
let { i18n:
|
|
2790
|
-
g.reset(),
|
|
2789
|
+
}, Je = 20, Ye = ({ isOpen: e, buckets: t, onClose: n, onComplete: r }) => {
|
|
2790
|
+
let { i18n: i, _: s } = W(), c = N(), [l, u] = V(null), [d, p] = V(""), m = O.useUtils(), g = O.storage.ceph.objects.deleteAll.useMutation(), _ = () => {
|
|
2791
|
+
g.reset(), u(null), p(""), n();
|
|
2791
2792
|
}, v = async () => {
|
|
2792
|
-
let e = 0,
|
|
2793
|
-
for (let
|
|
2794
|
-
|
|
2795
|
-
current:
|
|
2793
|
+
let e = 0, n = 0, i = [], a = t.length;
|
|
2794
|
+
for (let r = 0; r < t.length; r++) {
|
|
2795
|
+
u({
|
|
2796
|
+
current: r + 1,
|
|
2796
2797
|
total: a
|
|
2797
2798
|
});
|
|
2798
|
-
let o =
|
|
2799
|
+
let o = t[r];
|
|
2799
2800
|
try {
|
|
2800
|
-
let
|
|
2801
|
-
project_id:
|
|
2801
|
+
let t = await g.mutateAsync({
|
|
2802
|
+
project_id: c,
|
|
2802
2803
|
containerName: o.name
|
|
2803
2804
|
});
|
|
2804
|
-
|
|
2805
|
+
n += t, e++;
|
|
2805
2806
|
} catch (e) {
|
|
2806
2807
|
let t = e instanceof Error ? e.message : String(e);
|
|
2807
|
-
|
|
2808
|
+
i.push(`${o.name}: ${t}`);
|
|
2808
2809
|
}
|
|
2809
2810
|
}
|
|
2810
|
-
e > 0 && await
|
|
2811
|
+
e > 0 && await m.storage.ceph.containers.list.invalidate(), r?.({
|
|
2811
2812
|
emptiedCount: e,
|
|
2812
|
-
totalDeleted:
|
|
2813
|
-
errors:
|
|
2813
|
+
totalDeleted: n,
|
|
2814
|
+
errors: i
|
|
2814
2815
|
}), _();
|
|
2815
2816
|
};
|
|
2816
|
-
if (!
|
|
2817
|
-
let y =
|
|
2818
|
-
return /*#__PURE__*/ F(
|
|
2817
|
+
if (!e || t.length === 0) return null;
|
|
2818
|
+
let y = t.length, b = t.slice(0, Je), x = y - b.length, C = g.isPending || l !== null, w = l?.current, T = l?.total, E = d === "empty";
|
|
2819
|
+
return /*#__PURE__*/ F(h, {
|
|
2819
2820
|
title: /*#__PURE__*/ F(U, {
|
|
2820
2821
|
id: "DWBWmW",
|
|
2821
2822
|
values: { totalCount: y }
|
|
2822
2823
|
}),
|
|
2823
|
-
open:
|
|
2824
|
+
open: e,
|
|
2824
2825
|
onCancel: _,
|
|
2825
|
-
confirmButtonLabel:
|
|
2826
|
+
confirmButtonLabel: C ? i._({ id: "s4Vnq2" }) : i._({ id: "N2S1rs" }),
|
|
2826
2827
|
confirmButtonVariant: "primary-danger",
|
|
2827
|
-
cancelButtonLabel:
|
|
2828
|
+
cancelButtonLabel: i._({ id: "dEgA5A" }),
|
|
2828
2829
|
onConfirm: v,
|
|
2829
|
-
disableConfirmButton:
|
|
2830
|
-
disableCancelButton:
|
|
2831
|
-
disableCloseButton:
|
|
2830
|
+
disableConfirmButton: C || !E,
|
|
2831
|
+
disableCancelButton: C,
|
|
2832
|
+
disableCloseButton: C,
|
|
2832
2833
|
size: "small",
|
|
2833
|
-
children:
|
|
2834
|
+
children: C ? /*#__PURE__*/ I(f, {
|
|
2834
2835
|
direction: "vertical",
|
|
2835
2836
|
distribution: "center",
|
|
2836
2837
|
alignment: "center",
|
|
2837
2838
|
gap: "2",
|
|
2838
2839
|
className: "py-4",
|
|
2839
|
-
children: [/*#__PURE__*/ F(
|
|
2840
|
+
children: [/*#__PURE__*/ F(a, { variant: "primary" }), l && /*#__PURE__*/ F("p", {
|
|
2840
2841
|
className: "text-theme-light text-sm",
|
|
2841
2842
|
children: /*#__PURE__*/ F(U, {
|
|
2842
2843
|
id: "NW1XEL",
|
|
2843
2844
|
values: {
|
|
2844
|
-
progressCurrent:
|
|
2845
|
+
progressCurrent: w,
|
|
2845
2846
|
progressTotal: T
|
|
2846
2847
|
}
|
|
2847
2848
|
})
|
|
2848
2849
|
})]
|
|
2849
|
-
}) : /*#__PURE__*/ I(
|
|
2850
|
+
}) : /*#__PURE__*/ I(f, {
|
|
2850
2851
|
direction: "vertical",
|
|
2851
2852
|
gap: "4",
|
|
2852
2853
|
children: [
|
|
2853
|
-
/*#__PURE__*/ F(
|
|
2854
|
+
/*#__PURE__*/ F(o, {
|
|
2854
2855
|
variant: "danger",
|
|
2855
2856
|
children: /*#__PURE__*/ F(U, {
|
|
2856
2857
|
id: "CtiFDz",
|
|
@@ -2885,10 +2886,10 @@ var Ve = (e, t) => ({
|
|
|
2885
2886
|
})
|
|
2886
2887
|
})]
|
|
2887
2888
|
})] }),
|
|
2888
|
-
/*#__PURE__*/ F(
|
|
2889
|
-
label:
|
|
2890
|
-
value:
|
|
2891
|
-
onChange: (e) =>
|
|
2889
|
+
/*#__PURE__*/ F(S, {
|
|
2890
|
+
label: i._({ id: "Ghp863" }),
|
|
2891
|
+
value: d,
|
|
2892
|
+
onChange: (e) => p(e.target.value),
|
|
2892
2893
|
placeholder: "empty",
|
|
2893
2894
|
autoFocus: !0
|
|
2894
2895
|
})
|
|
@@ -2898,29 +2899,29 @@ var Ve = (e, t) => ({
|
|
|
2898
2899
|
};
|
|
2899
2900
|
//#endregion
|
|
2900
2901
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Buckets/CredentialPrompt.tsx
|
|
2901
|
-
function Xe({ onSuccess:
|
|
2902
|
-
let
|
|
2902
|
+
function Xe({ onSuccess: t }) {
|
|
2903
|
+
let n = N(), [r, i] = V(null), a = O.useUtils(), o = O.storage.ceph.ec2Credentials.create.useMutation({
|
|
2903
2904
|
onSuccess: () => {
|
|
2904
|
-
a.storage.ceph.ec2Credentials.list.invalidate(),
|
|
2905
|
+
a.storage.ceph.ec2Credentials.list.invalidate(), t();
|
|
2905
2906
|
},
|
|
2906
2907
|
onError: (e) => {
|
|
2907
2908
|
let t = e.message;
|
|
2908
|
-
|
|
2909
|
+
i({
|
|
2909
2910
|
variant: "error",
|
|
2910
2911
|
children: /*#__PURE__*/ F(U, {
|
|
2911
2912
|
id: "rcBt6T",
|
|
2912
2913
|
values: { errorMessage: t }
|
|
2913
2914
|
}),
|
|
2914
|
-
onDismiss: () =>
|
|
2915
|
+
onDismiss: () => i(null)
|
|
2915
2916
|
});
|
|
2916
2917
|
}
|
|
2917
2918
|
});
|
|
2918
|
-
return /*#__PURE__*/ I(
|
|
2919
|
+
return /*#__PURE__*/ I(f, {
|
|
2919
2920
|
direction: "vertical",
|
|
2920
2921
|
gap: "4",
|
|
2921
2922
|
className: "mt-8 max-w-lg",
|
|
2922
2923
|
children: [
|
|
2923
|
-
|
|
2924
|
+
r && /*#__PURE__*/ F(e, { ...r }),
|
|
2924
2925
|
/*#__PURE__*/ F("h2", {
|
|
2925
2926
|
className: "text-lg font-semibold",
|
|
2926
2927
|
children: /*#__PURE__*/ F(U, { id: "wXxPjv" })
|
|
@@ -2933,9 +2934,9 @@ function Xe({ onSuccess: e }) {
|
|
|
2933
2934
|
className: "text-theme-default text-sm",
|
|
2934
2935
|
children: /*#__PURE__*/ F(U, { id: "+1xG4p" })
|
|
2935
2936
|
}),
|
|
2936
|
-
/*#__PURE__*/ F("div", { children: /*#__PURE__*/ F(
|
|
2937
|
-
onClick: () =>
|
|
2938
|
-
disabled: o.isPending || !
|
|
2937
|
+
/*#__PURE__*/ F("div", { children: /*#__PURE__*/ F(p, {
|
|
2938
|
+
onClick: () => n && o.mutate({ project_id: n }),
|
|
2939
|
+
disabled: o.isPending || !n,
|
|
2939
2940
|
children: o.isPending ? /*#__PURE__*/ F(U, { id: "k/zHK7" }) : /*#__PURE__*/ F(U, { id: "FJO48W" })
|
|
2940
2941
|
}) })
|
|
2941
2942
|
]
|
|
@@ -2944,59 +2945,59 @@ function Xe({ onSuccess: e }) {
|
|
|
2944
2945
|
//#endregion
|
|
2945
2946
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Buckets/index.tsx
|
|
2946
2947
|
var Ze = () => {
|
|
2947
|
-
let { i18n:
|
|
2948
|
+
let { i18n: t, i18n: n, _: i } = W(), o = N(), s = ee({ from: k.fullPath }), { sortBy: c, sortDirection: l, search: u = "" } = k.useSearch(), [m, h] = V(!1), [g, _] = V(!1), [v, x] = V([]), [S, w] = V(null), [D, A] = V(u), M = B(void 0);
|
|
2948
2949
|
z(() => () => clearTimeout(M.current), []), z(() => {
|
|
2949
|
-
A(
|
|
2950
|
-
}, [
|
|
2951
|
-
let P = () =>
|
|
2952
|
-
|
|
2950
|
+
A(u);
|
|
2951
|
+
}, [u]);
|
|
2952
|
+
let P = () => w(null), R = (e) => {
|
|
2953
|
+
w(Ve(e, { onDismiss: P }));
|
|
2953
2954
|
}, H = (e, t) => {
|
|
2954
|
-
|
|
2955
|
+
w(He(e, t, { onDismiss: P }));
|
|
2955
2956
|
}, G = (e, t) => {
|
|
2956
|
-
|
|
2957
|
+
w(Ue(e, t, { onDismiss: P }));
|
|
2957
2958
|
}, te = (e, t) => {
|
|
2958
|
-
|
|
2959
|
+
w(We(e, t, { onDismiss: P }));
|
|
2959
2960
|
}, ne = (e) => {
|
|
2960
|
-
|
|
2961
|
+
w(Ge(e, { onDismiss: P }));
|
|
2961
2962
|
}, K = (e, t) => {
|
|
2962
|
-
|
|
2963
|
+
w(Ke(e, t, { onDismiss: P }));
|
|
2963
2964
|
}, re = ({ emptiedCount: e, totalDeleted: t, errors: n }) => {
|
|
2964
|
-
if (n.length === 0)
|
|
2965
|
+
if (n.length === 0) x([]);
|
|
2965
2966
|
else {
|
|
2966
2967
|
let e = new Set(n.map((e) => e.split(": ")[0]));
|
|
2967
|
-
|
|
2968
|
+
x((t) => t.filter((t) => e.has(t)));
|
|
2968
2969
|
}
|
|
2969
|
-
|
|
2970
|
+
w(qe(e, t, n, { onDismiss: P }));
|
|
2970
2971
|
}, q = {
|
|
2971
2972
|
options: [
|
|
2972
2973
|
{
|
|
2973
|
-
label:
|
|
2974
|
+
label: t._({ id: "6YtxFj" }),
|
|
2974
2975
|
value: "name"
|
|
2975
2976
|
},
|
|
2976
2977
|
{
|
|
2977
|
-
label:
|
|
2978
|
+
label: t._({ id: "sxbP3b" }),
|
|
2978
2979
|
value: "count"
|
|
2979
2980
|
},
|
|
2980
2981
|
{
|
|
2981
|
-
label:
|
|
2982
|
+
label: t._({ id: "hgpMHD" }),
|
|
2982
2983
|
value: "bytes"
|
|
2983
2984
|
},
|
|
2984
2985
|
{
|
|
2985
|
-
label:
|
|
2986
|
+
label: t._({ id: "sjMCOP" }),
|
|
2986
2987
|
value: "last_modified"
|
|
2987
2988
|
}
|
|
2988
2989
|
],
|
|
2989
|
-
sortBy:
|
|
2990
|
-
sortDirection:
|
|
2990
|
+
sortBy: c ?? "name",
|
|
2991
|
+
sortDirection: l ?? "asc"
|
|
2991
2992
|
}, { data: ie, isLoading: ae, error: oe } = O.storage.ceph.containers.list.useQuery({
|
|
2992
|
-
project_id:
|
|
2993
|
+
project_id: o,
|
|
2993
2994
|
includeMetadata: !0
|
|
2994
2995
|
}, {
|
|
2995
|
-
enabled: !!
|
|
2996
|
+
enabled: !!o,
|
|
2996
2997
|
retry: !1
|
|
2997
2998
|
}), se = (e) => [...e].sort((e, t) => {
|
|
2998
2999
|
let n;
|
|
2999
|
-
switch (
|
|
3000
|
+
switch (c ?? "name") {
|
|
3000
3001
|
case "name":
|
|
3001
3002
|
n = e.name.localeCompare(t.name);
|
|
3002
3003
|
break;
|
|
@@ -3014,11 +3015,11 @@ var Ze = () => {
|
|
|
3014
3015
|
break;
|
|
3015
3016
|
default: n = e.name.localeCompare(t.name);
|
|
3016
3017
|
}
|
|
3017
|
-
return (
|
|
3018
|
-
}), ce = (ie || []).filter((e) => e.name.toLowerCase().includes(
|
|
3018
|
+
return (l ?? "asc") === "desc" ? -n : n;
|
|
3019
|
+
}), ce = (ie || []).filter((e) => e.name.toLowerCase().includes(u.toLowerCase())), J = se(ce), Y = (e) => {
|
|
3019
3020
|
let t = typeof e == "string" ? e : "";
|
|
3020
3021
|
L(() => {
|
|
3021
|
-
|
|
3022
|
+
s({ search: (e) => ({
|
|
3022
3023
|
...e,
|
|
3023
3024
|
search: t || void 0
|
|
3024
3025
|
}) });
|
|
@@ -3026,19 +3027,19 @@ var Ze = () => {
|
|
|
3026
3027
|
}, le = (e) => {
|
|
3027
3028
|
let t = e.sortBy?.toString() || "name", n = e.sortDirection || "asc";
|
|
3028
3029
|
L(() => {
|
|
3029
|
-
|
|
3030
|
+
s({ search: (e) => ({
|
|
3030
3031
|
...e,
|
|
3031
3032
|
sortBy: t,
|
|
3032
3033
|
sortDirection: n
|
|
3033
3034
|
}) });
|
|
3034
3035
|
});
|
|
3035
3036
|
};
|
|
3036
|
-
if (ae) return /*#__PURE__*/ I(
|
|
3037
|
+
if (ae) return /*#__PURE__*/ I(f, {
|
|
3037
3038
|
className: "absolute inset-0",
|
|
3038
3039
|
distribution: "center",
|
|
3039
3040
|
alignment: "center",
|
|
3040
3041
|
direction: "vertical",
|
|
3041
|
-
children: [/*#__PURE__*/ F(
|
|
3042
|
+
children: [/*#__PURE__*/ F(a, {
|
|
3042
3043
|
variant: "primary",
|
|
3043
3044
|
size: "large",
|
|
3044
3045
|
className: "mb-2"
|
|
@@ -3059,19 +3060,19 @@ var Ze = () => {
|
|
|
3059
3060
|
})
|
|
3060
3061
|
});
|
|
3061
3062
|
}
|
|
3062
|
-
let ue = (ie || []).filter((e) =>
|
|
3063
|
+
let ue = (ie || []).filter((e) => v.includes(e.name)), de = ue.length > 0, X = ue.length, fe = (ie || []).length, pe = ce.length, me = J.map((e) => e.name), he = me.length > 0 && me.every((e) => v.includes(e)), Z = me.some((e) => v.includes(e));
|
|
3063
3064
|
return /*#__PURE__*/ I("div", {
|
|
3064
3065
|
className: "relative",
|
|
3065
3066
|
children: [
|
|
3066
|
-
/*#__PURE__*/ I(
|
|
3067
|
+
/*#__PURE__*/ I(f, {
|
|
3067
3068
|
direction: "vertical",
|
|
3068
3069
|
children: [
|
|
3069
|
-
/*#__PURE__*/ I(
|
|
3070
|
+
/*#__PURE__*/ I(f, {
|
|
3070
3071
|
distribution: "end",
|
|
3071
3072
|
alignment: "center",
|
|
3072
3073
|
gap: "2",
|
|
3073
3074
|
className: "pb-2",
|
|
3074
|
-
children: [/*#__PURE__*/ F(
|
|
3075
|
+
children: [/*#__PURE__*/ F(f, {
|
|
3075
3076
|
gap: "0.5",
|
|
3076
3077
|
alignment: "center",
|
|
3077
3078
|
children: /*#__PURE__*/ F(j, {
|
|
@@ -3088,21 +3089,21 @@ var Ze = () => {
|
|
|
3088
3089
|
sortDirection: e
|
|
3089
3090
|
})
|
|
3090
3091
|
})
|
|
3091
|
-
}), /*#__PURE__*/ F(
|
|
3092
|
+
}), /*#__PURE__*/ F(p, {
|
|
3092
3093
|
variant: "primary",
|
|
3093
3094
|
className: "whitespace-nowrap",
|
|
3094
|
-
onClick: () =>
|
|
3095
|
+
onClick: () => h(!0),
|
|
3095
3096
|
children: /*#__PURE__*/ F(U, { id: "HiDAFk" })
|
|
3096
3097
|
})]
|
|
3097
3098
|
}),
|
|
3098
|
-
/*#__PURE__*/ F(
|
|
3099
|
+
/*#__PURE__*/ F(E, { children: /*#__PURE__*/ F(f, {
|
|
3099
3100
|
direction: "vertical",
|
|
3100
3101
|
gap: "2",
|
|
3101
|
-
children: /*#__PURE__*/ F(
|
|
3102
|
+
children: /*#__PURE__*/ F(f, {
|
|
3102
3103
|
distribution: "end",
|
|
3103
3104
|
alignment: "center",
|
|
3104
|
-
children: /*#__PURE__*/ F(
|
|
3105
|
-
placeholder:
|
|
3105
|
+
children: /*#__PURE__*/ F(d, {
|
|
3106
|
+
placeholder: t._({ id: "VeDAv2" }),
|
|
3106
3107
|
"data-testid": "searchbar",
|
|
3107
3108
|
value: D,
|
|
3108
3109
|
onInput: (e) => {
|
|
@@ -3118,43 +3119,43 @@ var Ze = () => {
|
|
|
3118
3119
|
})
|
|
3119
3120
|
})
|
|
3120
3121
|
}) }),
|
|
3121
|
-
/*#__PURE__*/ F(
|
|
3122
|
+
/*#__PURE__*/ F(E, { children: /*#__PURE__*/ I(f, {
|
|
3122
3123
|
distribution: "start",
|
|
3123
3124
|
gap: "2",
|
|
3124
3125
|
alignment: "center",
|
|
3125
3126
|
className: "text-sm",
|
|
3126
|
-
children: [/*#__PURE__*/ I(
|
|
3127
|
+
children: [/*#__PURE__*/ I(f, {
|
|
3127
3128
|
gap: "2",
|
|
3128
3129
|
alignment: "center",
|
|
3129
|
-
children: [/*#__PURE__*/ F(
|
|
3130
|
+
children: [/*#__PURE__*/ F(y, {
|
|
3130
3131
|
checked: he,
|
|
3131
3132
|
indeterminate: Z && !he,
|
|
3132
3133
|
onChange: () => {
|
|
3133
|
-
|
|
3134
|
+
x(he ? (e) => e.filter((e) => !me.includes(e)) : (e) => [...new Set([...e, ...me])]);
|
|
3134
3135
|
}
|
|
3135
|
-
}), /*#__PURE__*/ I(
|
|
3136
|
+
}), /*#__PURE__*/ I(r, {
|
|
3136
3137
|
className: "flex items-center",
|
|
3137
|
-
children: [/*#__PURE__*/ F(
|
|
3138
|
+
children: [/*#__PURE__*/ F(C, {
|
|
3138
3139
|
as: "div",
|
|
3139
|
-
children: /*#__PURE__*/ F(
|
|
3140
|
+
children: /*#__PURE__*/ F(p, {
|
|
3140
3141
|
disabled: !de,
|
|
3141
3142
|
size: "small",
|
|
3142
3143
|
icon: "moreVert",
|
|
3143
|
-
label:
|
|
3144
|
+
label: t._({ id: "7L01XJ" })
|
|
3144
3145
|
})
|
|
3145
|
-
}), de && /*#__PURE__*/ F(
|
|
3146
|
+
}), de && /*#__PURE__*/ F(T, { children: /*#__PURE__*/ F(b, {
|
|
3146
3147
|
disabled: !de,
|
|
3147
|
-
label: n._(
|
|
3148
|
+
label: n._(t._({
|
|
3148
3149
|
id: "P2tWBZ",
|
|
3149
3150
|
values: { selectedCount: X }
|
|
3150
3151
|
})),
|
|
3151
|
-
onClick: () =>
|
|
3152
|
+
onClick: () => _(!0)
|
|
3152
3153
|
}) })]
|
|
3153
3154
|
})]
|
|
3154
3155
|
}), /*#__PURE__*/ F("div", {
|
|
3155
3156
|
className: "text-theme-light flex items-center gap-1",
|
|
3156
3157
|
"data-testid": "buckets-info-block",
|
|
3157
|
-
children:
|
|
3158
|
+
children: u.trim() ? /*#__PURE__*/ F(U, {
|
|
3158
3159
|
id: "xOvKAE",
|
|
3159
3160
|
values: {
|
|
3160
3161
|
totalCount: fe,
|
|
@@ -3170,26 +3171,26 @@ var Ze = () => {
|
|
|
3170
3171
|
}),
|
|
3171
3172
|
/*#__PURE__*/ F(ze, {
|
|
3172
3173
|
buckets: J,
|
|
3173
|
-
createModalOpen:
|
|
3174
|
-
setCreateModalOpen:
|
|
3174
|
+
createModalOpen: m,
|
|
3175
|
+
setCreateModalOpen: h,
|
|
3175
3176
|
onCreateSuccess: R,
|
|
3176
3177
|
onCreateError: H,
|
|
3177
3178
|
onEmptySuccess: G,
|
|
3178
3179
|
onEmptyError: te,
|
|
3179
3180
|
onDeleteSuccess: ne,
|
|
3180
3181
|
onDeleteError: K,
|
|
3181
|
-
selectedBuckets:
|
|
3182
|
-
setSelectedBuckets:
|
|
3182
|
+
selectedBuckets: v,
|
|
3183
|
+
setSelectedBuckets: x,
|
|
3183
3184
|
hasAnyBulkAction: !0
|
|
3184
3185
|
}),
|
|
3185
3186
|
/*#__PURE__*/ F(Ye, {
|
|
3186
|
-
isOpen:
|
|
3187
|
+
isOpen: g,
|
|
3187
3188
|
buckets: ue,
|
|
3188
|
-
onClose: () =>
|
|
3189
|
+
onClose: () => _(!1),
|
|
3189
3190
|
onComplete: re
|
|
3190
3191
|
}),
|
|
3191
|
-
|
|
3192
|
-
...
|
|
3192
|
+
S && /*#__PURE__*/ F(e, {
|
|
3193
|
+
...S,
|
|
3193
3194
|
className: "border-theme-light fixed top-5 right-5 z-50 rounded-lg border shadow-lg"
|
|
3194
3195
|
})
|
|
3195
3196
|
]
|
|
@@ -3240,4 +3241,4 @@ var $e = () => /*#__PURE__*/ F(Qe, {});
|
|
|
3240
3241
|
//#endregion
|
|
3241
3242
|
export { $e as component };
|
|
3242
3243
|
|
|
3243
|
-
//# sourceMappingURL=_storageType-
|
|
3244
|
+
//# sourceMappingURL=_storageType-B-qGcGUQ.mjs.map
|