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