@cobaltcore-dev/aurora 1.0.0 → 1.1.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/App.d.ts +2 -1
- package/dist/client/AuroraApp.d.ts +25 -0
- package/dist/client/{AuthProvider-5TyZKZkx.mjs → AuthProvider-BS5OVv8n.mjs} +2 -2
- package/dist/client/AuthProvider-BS5OVv8n.mjs.map +1 -0
- package/dist/client/{ContentHeader-D64NtKvo.mjs → ContentHeader-BHMUzd9H.mjs} +16 -16
- package/dist/client/{ContentHeader-D64NtKvo.mjs.map → ContentHeader-BHMUzd9H.mjs.map} +1 -1
- package/dist/client/{DeleteFlavorModal-C2K43ABZ.mjs → DeleteFlavorModal-BP83t9zX.mjs} +283 -294
- package/dist/client/DeleteFlavorModal-BP83t9zX.mjs.map +1 -0
- package/dist/client/{FiltersInput-Bw8TFfwb.mjs → FiltersInput-B8CNBg1L.mjs} +23 -23
- package/dist/client/{FiltersInput-Bw8TFfwb.mjs.map → FiltersInput-B8CNBg1L.mjs.map} +1 -1
- package/dist/client/{FloatingIpActionModals-BfEDfYg9.mjs → FloatingIpActionModals-BraiJWBi.mjs} +48 -48
- package/dist/client/{FloatingIpActionModals-BfEDfYg9.mjs.map → FloatingIpActionModals-BraiJWBi.mjs.map} +1 -1
- package/dist/client/ImageToastNotifications-BXMHJaIH.mjs +1131 -0
- package/dist/client/ImageToastNotifications-BXMHJaIH.mjs.map +1 -0
- package/dist/client/{RouteError-B-NPGIv7.mjs → RouteError-hAF8_jbe.mjs} +2 -2
- package/dist/client/{RouteError-B-NPGIv7.mjs.map → RouteError-hAF8_jbe.mjs.map} +1 -1
- package/dist/client/{SortInput-DysAXpB3.mjs → SortInput-Cqs2poV3.mjs} +7 -7
- package/dist/client/{SortInput-DysAXpB3.mjs.map → SortInput-Cqs2poV3.mjs.map} +1 -1
- package/dist/client/{StatusError-DX-GvLjq.mjs → StatusError-C5KodQOq.mjs} +4 -4
- package/dist/client/{StatusError-DX-GvLjq.mjs.map → StatusError-C5KodQOq.mjs.map} +1 -1
- package/dist/client/{TwoColumnDescriptionList-B3xunXmz.mjs → TwoColumnDescriptionList-DiDx3PnH.mjs} +6 -6
- package/dist/client/{TwoColumnDescriptionList-B3xunXmz.mjs.map → TwoColumnDescriptionList-DiDx3PnH.mjs.map} +1 -1
- package/dist/client/{_auth-R5H2yKFf.mjs → _auth-DJ9wHZaj.mjs} +2 -2
- package/dist/client/{_auth-R5H2yKFf.mjs.map → _auth-DJ9wHZaj.mjs.map} +1 -1
- package/dist/client/{_flavorId-Zj7LNL-R.mjs → _flavorId-BN_qessZ.mjs} +2 -2
- package/dist/client/{_flavorId-Zj7LNL-R.mjs.map → _flavorId-BN_qessZ.mjs.map} +1 -1
- package/dist/client/{_flavorId-Dit5mM8I.mjs → _flavorId-CJjEB_Ao.mjs} +34 -34
- package/dist/client/{_flavorId-Dit5mM8I.mjs.map → _flavorId-CJjEB_Ao.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-DCQQpNO-.mjs → _floatingIpId-CwDGHkWm.mjs} +2 -2
- package/dist/client/{_floatingIpId-DCQQpNO-.mjs.map → _floatingIpId-CwDGHkWm.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-B0MCoqE3.mjs → _floatingIpId-foMIwbE4.mjs} +23 -23
- package/dist/client/{_floatingIpId-B0MCoqE3.mjs.map → _floatingIpId-foMIwbE4.mjs.map} +1 -1
- package/dist/client/_imageId-BtJ7GmYB.mjs +558 -0
- package/dist/client/{_imageId-CZYzBAVx.mjs.map → _imageId-BtJ7GmYB.mjs.map} +1 -1
- package/dist/client/{_projectId-DhSWowQo.mjs → _projectId-BmtCuzJu.mjs} +4 -4
- package/dist/client/{_projectId-DhSWowQo.mjs.map → _projectId-BmtCuzJu.mjs.map} +1 -1
- package/dist/client/_projectId-Byt3GQDW.mjs +99 -0
- package/dist/client/_projectId-Byt3GQDW.mjs.map +1 -0
- package/dist/client/_projectId-NYk1IN_a.mjs +291 -0
- package/dist/client/_projectId-NYk1IN_a.mjs.map +1 -0
- package/dist/client/{_projectId-D2pFfYIs.mjs → _projectId-QueiFczy.mjs} +3 -3
- package/dist/client/{_projectId-D2pFfYIs.mjs.map → _projectId-QueiFczy.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-Mj8NJT2-.mjs → _securityGroupId-BcbkRhsN.mjs} +2 -2
- package/dist/client/{_securityGroupId-Mj8NJT2-.mjs.map → _securityGroupId-BcbkRhsN.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-DZ4D4WwB.mjs → _securityGroupId-pPtJsCoe.mjs} +438 -442
- package/dist/client/{_securityGroupId-DZ4D4WwB.mjs.map → _securityGroupId-pPtJsCoe.mjs.map} +1 -1
- package/dist/client/_storageType-BmqrU06i.mjs +2202 -0
- package/dist/client/_storageType-BmqrU06i.mjs.map +1 -0
- package/dist/client/{about-WLyShNgE.mjs → about-_73VmpTB.mjs} +2 -2
- package/dist/client/{about-WLyShNgE.mjs.map → about-_73VmpTB.mjs.map} +1 -1
- package/dist/client/assets/{objectDownload.worker-BXFQIIU_.js.map → objectDownload.worker-CWWLPDyb.js.map} +1 -1
- package/dist/client/assets/{objectDownload.worker-ECvFtmOF.js.map → objectDownload.worker-kZlQuo3F.js.map} +1 -1
- package/dist/client/{aurora-IMO9HhqJ.mjs → aurora-EbwGRLLf.mjs} +2 -2
- package/dist/client/{aurora-IMO9HhqJ.mjs.map → aurora-EbwGRLLf.mjs.map} +1 -1
- package/dist/client/{build-DnD-T35u.mjs → build-C_4vRMCq.mjs} +2233 -2662
- package/dist/client/{build-DnD-T35u.mjs.map → build-C_4vRMCq.mjs.map} +1 -1
- package/dist/client/{flavors-Cp0LEGOH.mjs → flavors-CiHCYrtZ.mjs} +2 -2
- package/dist/client/{flavors-Cp0LEGOH.mjs.map → flavors-CiHCYrtZ.mjs.map} +1 -1
- package/dist/client/{flavors-CwMbDRHm2.mjs → flavors-DY-bDc8l.mjs} +164 -164
- package/dist/client/flavors-DY-bDc8l.mjs.map +1 -0
- package/dist/client/{floatingips-ICwo-rV_.mjs → floatingips-Ci4jHkaG.mjs} +177 -177
- package/dist/client/{floatingips-ICwo-rV_.mjs.map → floatingips-Ci4jHkaG.mjs.map} +1 -1
- package/dist/client/{hooks-CrriowRk.mjs → hooks-LutR2Yg3.mjs} +2 -2
- package/dist/client/{hooks-CrriowRk.mjs.map → hooks-LutR2Yg3.mjs.map} +1 -1
- package/dist/client/images-91U7tr9Y2.mjs +1976 -0
- package/dist/client/images-91U7tr9Y2.mjs.map +1 -0
- package/dist/client/{images-DWiM_72I.mjs → images-CS4kZQyu.mjs} +2 -2
- package/dist/client/{images-DWiM_72I.mjs.map → images-CS4kZQyu.mjs.map} +1 -1
- package/dist/client/index.d.ts +4 -1
- package/dist/client/index.js +444 -586
- package/dist/client/index.js.map +1 -1
- package/dist/client/{md-DNzcRhmz.mjs → md-kvaGCNAK.mjs} +4 -22
- package/dist/client/{md-DNzcRhmz.mjs.map → md-kvaGCNAK.mjs.map} +1 -1
- package/dist/client/{objects-DeK2WD5K.mjs → objects-C3azvW8m.mjs} +2019 -2023
- package/dist/client/{objects-DeK2WD5K.mjs.map → objects-C3azvW8m.mjs.map} +1 -1
- package/dist/client/{objects-DI1-tnKr.mjs → objects-CM265S6b.mjs} +2 -2
- package/dist/client/{objects-DI1-tnKr.mjs.map → objects-CM265S6b.mjs.map} +1 -1
- package/dist/client/{objects-D2MKUCxc.mjs → objects-EE9Cd1wI.mjs} +2 -2
- package/dist/client/{objects-D2MKUCxc.mjs.map → objects-EE9Cd1wI.mjs.map} +1 -1
- package/dist/client/{routeInfo-CdTRlSxv.mjs → routeInfo-DXqB2HCf.mjs} +3 -3
- package/dist/client/routeInfo-DXqB2HCf.mjs.map +1 -0
- package/dist/client/router.d.ts +2 -1
- package/dist/client/{routes-DOJr5onJ.mjs → routes-CBd8CCuM.mjs} +13 -13
- package/dist/client/{routes-DOJr5onJ.mjs.map → routes-CBd8CCuM.mjs.map} +1 -1
- package/dist/client/{routes-B05u5bk4.mjs → routes-CdDm-hhO.mjs} +2 -2
- package/dist/client/{routes-B05u5bk4.mjs.map → routes-CdDm-hhO.mjs.map} +1 -1
- package/dist/client/{securitygroups-Be2Qgmew.mjs → securitygroups-Bd_uV4S9.mjs} +198 -198
- package/dist/client/{securitygroups-Be2Qgmew.mjs.map → securitygroups-Bd_uV4S9.mjs.map} +1 -1
- package/dist/client/{securitygroups-_7SYN2jN.mjs → securitygroups-Byte-iSp.mjs} +2 -2
- package/dist/client/{securitygroups-_7SYN2jN.mjs.map → securitygroups-Byte-iSp.mjs.map} +1 -1
- package/dist/client/services-D1PbooD1.mjs +6 -0
- package/dist/client/services-D1PbooD1.mjs.map +1 -0
- package/dist/client/services-DEMVtFyn.mjs +9 -0
- package/dist/client/services-DEMVtFyn.mjs.map +1 -0
- package/dist/client/trpcClient.d.ts +18 -367
- package/dist/client/{useSecurityGroupPermissions-qPwm4mFt.mjs → useSecurityGroupPermissions-C29mzb3b.mjs} +15 -15
- package/dist/client/{useSecurityGroupPermissions-qPwm4mFt.mjs.map → useSecurityGroupPermissions-C29mzb3b.mjs.map} +1 -1
- package/dist/server/index.d.ts +43 -369
- package/dist/server/index.js +71 -276
- package/package.json +1 -3
- package/dist/client/AuthProvider-5TyZKZkx.mjs.map +0 -1
- package/dist/client/DeleteFlavorModal-C2K43ABZ.mjs.map +0 -1
- package/dist/client/DeletePcaModal-D9v8E0Ki.mjs +0 -92
- package/dist/client/DeletePcaModal-D9v8E0Ki.mjs.map +0 -1
- package/dist/client/DetailsInfo-h7rPJ4Jf.mjs +0 -61
- package/dist/client/DetailsInfo-h7rPJ4Jf.mjs.map +0 -1
- package/dist/client/ImageToastNotifications-C0Tluzq-.mjs +0 -1125
- package/dist/client/ImageToastNotifications-C0Tluzq-.mjs.map +0 -1
- package/dist/client/_imageId-CZYzBAVx.mjs +0 -558
- package/dist/client/_pcaId-CHRRsWmO.mjs +0 -605
- package/dist/client/_pcaId-CHRRsWmO.mjs.map +0 -1
- package/dist/client/_projectId-B8wWSxPu.mjs +0 -98
- package/dist/client/_projectId-B8wWSxPu.mjs.map +0 -1
- package/dist/client/_projectId-C5DUYIjt.mjs +0 -291
- package/dist/client/_projectId-C5DUYIjt.mjs.map +0 -1
- package/dist/client/_storageType-C-9bNkmZ.mjs +0 -2211
- package/dist/client/_storageType-C-9bNkmZ.mjs.map +0 -1
- package/dist/client/flavors-CwMbDRHm2.mjs.map +0 -1
- package/dist/client/images-DOGZmr3D.mjs +0 -1937
- package/dist/client/images-DOGZmr3D.mjs.map +0 -1
- package/dist/client/pca-BokFv4Gz.mjs +0 -239
- package/dist/client/pca-BokFv4Gz.mjs.map +0 -1
- package/dist/client/pca-D5jHAl0b.mjs +0 -26
- package/dist/client/pca-D5jHAl0b.mjs.map +0 -1
- package/dist/client/pcaAccess-Br4kVjLQ.mjs +0 -9
- package/dist/client/pcaAccess-Br4kVjLQ.mjs.map +0 -1
- package/dist/client/routeInfo-CdTRlSxv.mjs.map +0 -1
|
@@ -1,2211 +0,0 @@
|
|
|
1
|
-
import { C as e, D as t, E as n, G as r, I as i, M as a, P as o, S as s, U as c, V as l, X as u, Y as ee, Z as d, _ as f, a as p, at as m, b as h, c as g, ct as _, et as v, f as y, h as b, k as x, l as S, n as C, ot as w, q as T, s as E, t as D, u as O, w as k } from "./build-DnD-T35u.mjs";
|
|
2
|
-
import { a as A } from "./trpcClient-D7gpR7YG.mjs";
|
|
3
|
-
import { c as j, r as M, s as N } from "./objects-DeK2WD5K.mjs";
|
|
4
|
-
import { t as te } from "./useProjectId-DBc5lpoU.mjs";
|
|
5
|
-
import { t as P } from "./SortInput-DysAXpB3.mjs";
|
|
6
|
-
import { t as F } from "./formatBytes-CZv_XyCY.mjs";
|
|
7
|
-
import { t as I } from "./ContentHeader-D64NtKvo.mjs";
|
|
8
|
-
import { Fragment as ne, jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
9
|
-
import { Fragment as z, startTransition as B, useCallback as re, useEffect as V, useRef as ie, useState as H } from "react";
|
|
10
|
-
import { useNavigate as U, useParams as ae } from "@tanstack/react-router";
|
|
11
|
-
import { Trans as W, useLingui as oe } from "@lingui/react";
|
|
12
|
-
import { ErrorBoundary as se } from "react-error-boundary";
|
|
13
|
-
import { i18n as G } from "@lingui/core";
|
|
14
|
-
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/CreateContainerModal.tsx
|
|
15
|
-
var K = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLength: i = 256 }) => {
|
|
16
|
-
let { i18n: a, _: o } = oe(), s = te(), [c, l] = H(""), [u, f] = H(null), p = A.useUtils(), m = A.storage.swift.createContainer.useMutation({
|
|
17
|
-
onSuccess: () => {
|
|
18
|
-
p.storage.swift.listContainers.invalidate();
|
|
19
|
-
let e = c.trim();
|
|
20
|
-
n?.(e);
|
|
21
|
-
},
|
|
22
|
-
onError: (e) => {
|
|
23
|
-
r?.(c.trim(), e.message);
|
|
24
|
-
},
|
|
25
|
-
onSettled: () => {
|
|
26
|
-
h();
|
|
27
|
-
}
|
|
28
|
-
}), h = () => {
|
|
29
|
-
l(""), f(null), m.reset(), t();
|
|
30
|
-
}, g = (e) => e.trim() ? e.length > i ? (f(a._({
|
|
31
|
-
id: "r5SQFW",
|
|
32
|
-
values: { maxContainerNameLength: i }
|
|
33
|
-
})), !1) : e.includes("/") ? (f(a._({ id: "9J93Xr" })), !1) : (f(null), !0) : (f(a._({ id: "JNGYAW" })), !1), _ = (e) => {
|
|
34
|
-
let t = e.target.value;
|
|
35
|
-
l(t), u && g(t);
|
|
36
|
-
}, v = () => {
|
|
37
|
-
g(c) && m.mutate({
|
|
38
|
-
project_id: s,
|
|
39
|
-
container: c.trim()
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
return e ? /*#__PURE__*/ L(ee, {
|
|
43
|
-
title: a._({ id: "vTh35P" }),
|
|
44
|
-
open: e,
|
|
45
|
-
onCancel: h,
|
|
46
|
-
confirmButtonLabel: a._({ id: "hYgDIe" }),
|
|
47
|
-
onConfirm: v,
|
|
48
|
-
cancelButtonLabel: a._({ id: "dEgA5A" }),
|
|
49
|
-
size: "small",
|
|
50
|
-
disableConfirmButton: m.isPending || !c.trim(),
|
|
51
|
-
children: /*#__PURE__*/ R(d, {
|
|
52
|
-
direction: "vertical",
|
|
53
|
-
gap: "6",
|
|
54
|
-
children: [/*#__PURE__*/ L("p", {
|
|
55
|
-
className: "text-theme-default",
|
|
56
|
-
children: /*#__PURE__*/ L(W, { id: "ne/GWZ" })
|
|
57
|
-
}), /*#__PURE__*/ L(b, {
|
|
58
|
-
label: a._({ id: "SUSS9i" }),
|
|
59
|
-
required: !0,
|
|
60
|
-
value: c,
|
|
61
|
-
onChange: _,
|
|
62
|
-
onKeyDown: (e) => {
|
|
63
|
-
e.key === "Enter" && v();
|
|
64
|
-
},
|
|
65
|
-
invalid: !!u,
|
|
66
|
-
errortext: u || void 0,
|
|
67
|
-
disabled: m.isPending,
|
|
68
|
-
autoFocus: !0,
|
|
69
|
-
placeholder: a._({ id: "W5FkH9" })
|
|
70
|
-
})]
|
|
71
|
-
})
|
|
72
|
-
}) : null;
|
|
73
|
-
}, ce = ({ isOpen: t, container: i, onClose: s, onSuccess: c, onError: l }) => {
|
|
74
|
-
let { i18n: u, _: f } = oe(), m = te(), [h, g] = H(""), [_, v] = H(null), [x, S] = H(!1), C = ie(""), w = () => {
|
|
75
|
-
i && navigator.clipboard.writeText(i.name).then(() => {
|
|
76
|
-
S(!0), setTimeout(() => S(!1), 2e3);
|
|
77
|
-
});
|
|
78
|
-
}, T = A.useUtils(), { data: O, isLoading: k, error: j } = A.storage.swift.listObjects.useQuery({
|
|
79
|
-
project_id: m,
|
|
80
|
-
container: i?.name ?? "",
|
|
81
|
-
format: "json",
|
|
82
|
-
limit: 100
|
|
83
|
-
}, { enabled: t && i !== null }), M = A.storage.swift.emptyContainer.useMutation({
|
|
84
|
-
onSuccess: (e) => {
|
|
85
|
-
T.storage.swift.listContainers.invalidate(), T.storage.swift.listObjects.invalidate({
|
|
86
|
-
project_id: m,
|
|
87
|
-
container: C.current
|
|
88
|
-
}), c?.(C.current, e);
|
|
89
|
-
},
|
|
90
|
-
onError: (e) => {
|
|
91
|
-
l?.(C.current, e.message);
|
|
92
|
-
},
|
|
93
|
-
onSettled: () => {
|
|
94
|
-
N();
|
|
95
|
-
}
|
|
96
|
-
}), N = () => {
|
|
97
|
-
g(""), v(null), M.reset(), s();
|
|
98
|
-
}, P = (e) => {
|
|
99
|
-
let t = e.target.value;
|
|
100
|
-
g(t), _ && v(null);
|
|
101
|
-
}, I = () => {
|
|
102
|
-
if (i) {
|
|
103
|
-
if (h.trim() !== i.name) {
|
|
104
|
-
v(u._({ id: "jS4B2+" }));
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
C.current = i.name, M.mutate({
|
|
108
|
-
project_id: m,
|
|
109
|
-
container: i.name
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}, ne = (e) => {
|
|
113
|
-
e.key === "Enter" && I();
|
|
114
|
-
};
|
|
115
|
-
if (!t || !i) return null;
|
|
116
|
-
let z = O?.length ?? 0, B = !k && i.count === 0 && z === 0, re = !k && i.count > 0 && z === 0, V = B || re, U = /*#__PURE__*/ R("span", {
|
|
117
|
-
className: "flex max-w-100 items-center gap-2",
|
|
118
|
-
children: [
|
|
119
|
-
/*#__PURE__*/ L("span", {
|
|
120
|
-
className: "shrink-0",
|
|
121
|
-
children: /*#__PURE__*/ L(W, { id: "5Okch2" })
|
|
122
|
-
}),
|
|
123
|
-
/*#__PURE__*/ L("span", {
|
|
124
|
-
className: "truncate",
|
|
125
|
-
title: i.name,
|
|
126
|
-
children: i.name
|
|
127
|
-
}),
|
|
128
|
-
!k && !V && /*#__PURE__*/ L("button", {
|
|
129
|
-
type: "button",
|
|
130
|
-
onClick: w,
|
|
131
|
-
title: x ? u._({ id: "PiH3UR" }) : u._({ id: "NQU1Nn" }),
|
|
132
|
-
className: "text-theme-light hover:text-theme-default inline-flex items-center transition-colors",
|
|
133
|
-
children: /*#__PURE__*/ L(y, {
|
|
134
|
-
icon: x ? "checkCircle" : "contentCopy",
|
|
135
|
-
size: "16"
|
|
136
|
-
})
|
|
137
|
-
})
|
|
138
|
-
]
|
|
139
|
-
});
|
|
140
|
-
return /*#__PURE__*/ R(ee, {
|
|
141
|
-
title: U,
|
|
142
|
-
open: t,
|
|
143
|
-
onCancel: N,
|
|
144
|
-
confirmButtonLabel: V ? void 0 : u._({ id: "N2S1rs" }),
|
|
145
|
-
confirmButtonVariant: "primary-danger",
|
|
146
|
-
onConfirm: V ? void 0 : I,
|
|
147
|
-
cancelButtonLabel: V ? void 0 : u._({ id: "dEgA5A" }),
|
|
148
|
-
modalFooter: V ? /*#__PURE__*/ L(o, {
|
|
149
|
-
className: "flex justify-end",
|
|
150
|
-
children: /*#__PURE__*/ L(a, { children: /*#__PURE__*/ L(p, {
|
|
151
|
-
variant: "primary",
|
|
152
|
-
onClick: N,
|
|
153
|
-
"data-testid": "empty-info-close-button",
|
|
154
|
-
children: /*#__PURE__*/ L(W, { id: "yz7wBu" })
|
|
155
|
-
}) })
|
|
156
|
-
}) : void 0,
|
|
157
|
-
size: "small",
|
|
158
|
-
disableConfirmButton: k || M.isPending || !V && !h.trim() || !V && h.trim() !== i.name,
|
|
159
|
-
children: [j && /*#__PURE__*/ L("p", {
|
|
160
|
-
className: "text-theme-error mb-4",
|
|
161
|
-
children: (() => {
|
|
162
|
-
let e = j.message;
|
|
163
|
-
return /*#__PURE__*/ L(W, {
|
|
164
|
-
id: "56IxdF",
|
|
165
|
-
values: { errorMessage: e }
|
|
166
|
-
});
|
|
167
|
-
})()
|
|
168
|
-
}), k ? /*#__PURE__*/ R(d, {
|
|
169
|
-
direction: "horizontal",
|
|
170
|
-
alignment: "center",
|
|
171
|
-
gap: "2",
|
|
172
|
-
className: "py-4",
|
|
173
|
-
children: [/*#__PURE__*/ L(r, { size: "small" }), /*#__PURE__*/ L(W, { id: "ujK/QN" })]
|
|
174
|
-
}) : V && !j ? /*#__PURE__*/ L("p", {
|
|
175
|
-
className: "text-theme-default py-2",
|
|
176
|
-
children: B ? /*#__PURE__*/ L(W, { id: "jNm/qL" }) : /*#__PURE__*/ L(W, { id: "WefafP" })
|
|
177
|
-
}) : j ? null : /*#__PURE__*/ R(d, {
|
|
178
|
-
direction: "vertical",
|
|
179
|
-
gap: "6",
|
|
180
|
-
children: [
|
|
181
|
-
/*#__PURE__*/ R("p", {
|
|
182
|
-
className: "text-theme-default",
|
|
183
|
-
children: [
|
|
184
|
-
/*#__PURE__*/ L(W, { id: "Ioblgz" }),
|
|
185
|
-
/*#__PURE__*/ L("br", {}),
|
|
186
|
-
/*#__PURE__*/ L(W, {
|
|
187
|
-
id: "kiRrtv",
|
|
188
|
-
components: {
|
|
189
|
-
0: /*#__PURE__*/ L("strong", {}),
|
|
190
|
-
1: /*#__PURE__*/ L("strong", {}),
|
|
191
|
-
2: /*#__PURE__*/ L("strong", {})
|
|
192
|
-
}
|
|
193
|
-
})
|
|
194
|
-
]
|
|
195
|
-
}),
|
|
196
|
-
/*#__PURE__*/ R("div", {
|
|
197
|
-
className: "border-theme-background-lvl-3 overflow-hidden rounded border",
|
|
198
|
-
children: [
|
|
199
|
-
i.count > z && /*#__PURE__*/ L("p", {
|
|
200
|
-
className: "text-theme-light px-3 py-2 text-xs",
|
|
201
|
-
children: (() => {
|
|
202
|
-
let e = i.count;
|
|
203
|
-
return /*#__PURE__*/ L(W, {
|
|
204
|
-
id: "1iQtS2",
|
|
205
|
-
values: {
|
|
206
|
-
actualObjectCount: z,
|
|
207
|
-
total: e
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
})()
|
|
211
|
-
}),
|
|
212
|
-
/*#__PURE__*/ L(E, {
|
|
213
|
-
columns: 3,
|
|
214
|
-
className: "text-sm",
|
|
215
|
-
children: /*#__PURE__*/ R(n, { children: [
|
|
216
|
-
/*#__PURE__*/ L(e, { children: /*#__PURE__*/ L(W, { id: "6YtxFj" }) }),
|
|
217
|
-
/*#__PURE__*/ L(e, { children: /*#__PURE__*/ L(W, { id: "Cj2Gtd" }) }),
|
|
218
|
-
/*#__PURE__*/ L(e, { children: /*#__PURE__*/ L(W, { id: "sjMCOP" }) })
|
|
219
|
-
] })
|
|
220
|
-
}),
|
|
221
|
-
/*#__PURE__*/ L("div", {
|
|
222
|
-
className: "max-h-48 overflow-y-auto",
|
|
223
|
-
children: /*#__PURE__*/ L(E, {
|
|
224
|
-
columns: 3,
|
|
225
|
-
className: "text-sm",
|
|
226
|
-
children: O.map((e) => /*#__PURE__*/ R(n, { children: [
|
|
227
|
-
/*#__PURE__*/ L(D, {
|
|
228
|
-
className: "max-w-50 truncate",
|
|
229
|
-
title: e.name,
|
|
230
|
-
children: e.name
|
|
231
|
-
}),
|
|
232
|
-
/*#__PURE__*/ L(D, { children: F(e.bytes) }),
|
|
233
|
-
/*#__PURE__*/ L(D, { children: e.last_modified ? new Date(e.last_modified).toLocaleString() : u._({ id: "fj5byd" }) })
|
|
234
|
-
] }, e.name))
|
|
235
|
-
})
|
|
236
|
-
})
|
|
237
|
-
]
|
|
238
|
-
}),
|
|
239
|
-
/*#__PURE__*/ L(b, {
|
|
240
|
-
label: u._({ id: "33F2A+" }),
|
|
241
|
-
required: !0,
|
|
242
|
-
value: h,
|
|
243
|
-
onChange: P,
|
|
244
|
-
onKeyDown: ne,
|
|
245
|
-
invalid: !!_,
|
|
246
|
-
errortext: _ || void 0,
|
|
247
|
-
disabled: M.isPending,
|
|
248
|
-
autoFocus: !0,
|
|
249
|
-
placeholder: i.name
|
|
250
|
-
})
|
|
251
|
-
]
|
|
252
|
-
})]
|
|
253
|
-
});
|
|
254
|
-
}, le = ({ isOpen: e, container: t, onClose: n, onSuccess: i, onError: s }) => {
|
|
255
|
-
let { i18n: c, _: l } = oe(), u = te(), [f, m] = H(""), [h, g] = H(null), [_, v] = H(!1), y = A.useUtils(), { data: x, isLoading: S, error: C } = A.storage.swift.listObjects.useQuery({
|
|
256
|
-
project_id: u,
|
|
257
|
-
container: t?.name ?? "",
|
|
258
|
-
format: "json",
|
|
259
|
-
limit: 1
|
|
260
|
-
}, { enabled: e && t !== null }), { data: T, error: E } = A.storage.swift.getContainerMetadata.useQuery({
|
|
261
|
-
project_id: u,
|
|
262
|
-
container: t?.name ?? ""
|
|
263
|
-
}, { enabled: e && t !== null }), D = !!(T?.versionsEnabled || T?.versionsLocation || T?.historyLocation), O = A.storage.swift.deleteContainer.useMutation({
|
|
264
|
-
onSuccess: () => {
|
|
265
|
-
y.storage.swift.listContainers.invalidate(), i?.(t.name);
|
|
266
|
-
},
|
|
267
|
-
onError: (e) => {
|
|
268
|
-
s?.(t.name, e.message);
|
|
269
|
-
},
|
|
270
|
-
onSettled: () => {
|
|
271
|
-
k();
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
V(() => {
|
|
275
|
-
e || (m(""), g(null), v(!1), O.reset());
|
|
276
|
-
}, [e, t?.name]);
|
|
277
|
-
let k = () => {
|
|
278
|
-
m(""), g(null), v(!1), O.reset(), n();
|
|
279
|
-
}, j = (e) => {
|
|
280
|
-
let t = e.target.value;
|
|
281
|
-
m(t), h && g(null);
|
|
282
|
-
}, M = () => {
|
|
283
|
-
if (t && !(C || E)) {
|
|
284
|
-
if (f.trim() !== "delete") {
|
|
285
|
-
g(c._({ id: "b5aNMO" }));
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
D && !_ || O.mutate({
|
|
289
|
-
project_id: u,
|
|
290
|
-
container: t.name
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
}, N = (e) => {
|
|
294
|
-
e.key === "Enter" && M();
|
|
295
|
-
};
|
|
296
|
-
if (!e || !t) return null;
|
|
297
|
-
let P = x?.length ?? 0, F = !S && (P > 0 || t.count > 0), I = !S && t.count > 0 && P === 0, ne = !!(C || E), z = /*#__PURE__*/ R("span", {
|
|
298
|
-
className: "flex max-w-[400px] items-center gap-2",
|
|
299
|
-
children: [/*#__PURE__*/ L("span", {
|
|
300
|
-
className: "shrink-0",
|
|
301
|
-
children: /*#__PURE__*/ L(W, { id: "Vzlopx" })
|
|
302
|
-
}), /*#__PURE__*/ L("span", {
|
|
303
|
-
className: "truncate",
|
|
304
|
-
title: t.name,
|
|
305
|
-
children: t.name
|
|
306
|
-
})]
|
|
307
|
-
});
|
|
308
|
-
return /*#__PURE__*/ R(ee, {
|
|
309
|
-
title: z,
|
|
310
|
-
open: e,
|
|
311
|
-
onCancel: k,
|
|
312
|
-
confirmButtonLabel: F ? void 0 : c._({ id: "cnGeoo" }),
|
|
313
|
-
confirmButtonVariant: F ? void 0 : "primary-danger",
|
|
314
|
-
onConfirm: F ? void 0 : M,
|
|
315
|
-
cancelButtonLabel: F ? void 0 : c._({ id: "dEgA5A" }),
|
|
316
|
-
modalFooter: F ? /*#__PURE__*/ L(o, {
|
|
317
|
-
className: "flex justify-end",
|
|
318
|
-
children: /*#__PURE__*/ L(a, { children: /*#__PURE__*/ L(p, {
|
|
319
|
-
variant: "primary",
|
|
320
|
-
onClick: k,
|
|
321
|
-
"data-testid": "delete-has-objects-close-button",
|
|
322
|
-
children: /*#__PURE__*/ L(W, { id: "yz7wBu" })
|
|
323
|
-
}) })
|
|
324
|
-
}) : void 0,
|
|
325
|
-
size: "small",
|
|
326
|
-
disableConfirmButton: S || ne || O.isPending || !F && f.trim() !== "delete" || !F && D && !_,
|
|
327
|
-
children: [(C || E) && /*#__PURE__*/ R(d, {
|
|
328
|
-
direction: "vertical",
|
|
329
|
-
gap: "2",
|
|
330
|
-
className: "mb-4",
|
|
331
|
-
role: "alert",
|
|
332
|
-
"aria-live": "assertive",
|
|
333
|
-
children: [C && /*#__PURE__*/ L("p", {
|
|
334
|
-
className: "text-theme-error",
|
|
335
|
-
children: (() => {
|
|
336
|
-
let e = C.message;
|
|
337
|
-
return /*#__PURE__*/ L(W, {
|
|
338
|
-
id: "56IxdF",
|
|
339
|
-
values: { errorMessage: e }
|
|
340
|
-
});
|
|
341
|
-
})()
|
|
342
|
-
}), E && /*#__PURE__*/ L("p", {
|
|
343
|
-
className: "text-theme-error",
|
|
344
|
-
children: (() => {
|
|
345
|
-
let e = E.message;
|
|
346
|
-
return /*#__PURE__*/ L(W, {
|
|
347
|
-
id: "BCXapL",
|
|
348
|
-
values: { errorMessage: e }
|
|
349
|
-
});
|
|
350
|
-
})()
|
|
351
|
-
})]
|
|
352
|
-
}), S ? /*#__PURE__*/ R(d, {
|
|
353
|
-
direction: "horizontal",
|
|
354
|
-
alignment: "center",
|
|
355
|
-
gap: "2",
|
|
356
|
-
className: "py-4",
|
|
357
|
-
children: [/*#__PURE__*/ L(r, { size: "small" }), /*#__PURE__*/ L(W, { id: "Z3FXyt" })]
|
|
358
|
-
}) : F ? /*#__PURE__*/ R(d, {
|
|
359
|
-
direction: "vertical",
|
|
360
|
-
gap: "3",
|
|
361
|
-
children: [/*#__PURE__*/ L("p", {
|
|
362
|
-
className: "text-theme-default",
|
|
363
|
-
children: /*#__PURE__*/ L(W, { id: "3dBmvU" })
|
|
364
|
-
}), I && /*#__PURE__*/ L("p", {
|
|
365
|
-
className: "text-theme-default",
|
|
366
|
-
children: /*#__PURE__*/ L(W, { id: "x3T4pq" })
|
|
367
|
-
})]
|
|
368
|
-
}) : /*#__PURE__*/ R(d, {
|
|
369
|
-
direction: "vertical",
|
|
370
|
-
gap: "6",
|
|
371
|
-
children: [
|
|
372
|
-
/*#__PURE__*/ R("p", {
|
|
373
|
-
className: "text-theme-default",
|
|
374
|
-
children: [
|
|
375
|
-
/*#__PURE__*/ L(W, { id: "Y8M9Uc" }),
|
|
376
|
-
/*#__PURE__*/ L("br", {}),
|
|
377
|
-
/*#__PURE__*/ L(W, {
|
|
378
|
-
id: "YzUoh9",
|
|
379
|
-
components: { 0: /*#__PURE__*/ L("strong", {}) }
|
|
380
|
-
})
|
|
381
|
-
]
|
|
382
|
-
}),
|
|
383
|
-
D && /*#__PURE__*/ L(w, {
|
|
384
|
-
label: c._({ id: "V/8B9A" }),
|
|
385
|
-
checked: _,
|
|
386
|
-
onChange: (e) => v(e.target.checked)
|
|
387
|
-
}),
|
|
388
|
-
/*#__PURE__*/ L(b, {
|
|
389
|
-
label: c._({ id: "QytzQr" }),
|
|
390
|
-
required: !0,
|
|
391
|
-
value: f,
|
|
392
|
-
onChange: j,
|
|
393
|
-
onKeyDown: N,
|
|
394
|
-
invalid: !!h,
|
|
395
|
-
errortext: h || void 0,
|
|
396
|
-
disabled: O.isPending,
|
|
397
|
-
autoFocus: !0,
|
|
398
|
-
placeholder: c._({ id: "HNlEFZ" })
|
|
399
|
-
})
|
|
400
|
-
]
|
|
401
|
-
})]
|
|
402
|
-
});
|
|
403
|
-
}, ue = /* @__PURE__ */ new Set([
|
|
404
|
-
"quota-bytes",
|
|
405
|
-
"quota-count",
|
|
406
|
-
"web-index",
|
|
407
|
-
"web-listings",
|
|
408
|
-
"web-listings-css",
|
|
409
|
-
"web-error"
|
|
410
|
-
]), de = 50, fe = /^[a-zA-Z0-9!#$%&'*+\-.^_`|~]+$/, pe = ({ isOpen: t, container: i, onClose: a, onSuccess: o }) => {
|
|
411
|
-
let { i18n: s, _: f } = oe(), m = te(), { data: h, isLoading: g, isError: _, error: x } = A.storage.swift.getContainerMetadata.useQuery({
|
|
412
|
-
project_id: m,
|
|
413
|
-
container: i?.name ?? ""
|
|
414
|
-
}, { enabled: t && i !== null }), S = h?.read === ".r:*,.rlistings", { data: C } = A.storage.swift.getContainerPublicUrl.useQuery({
|
|
415
|
-
project_id: m,
|
|
416
|
-
container: i?.name ?? ""
|
|
417
|
-
}, { enabled: t && i !== null && S }), { data: O } = A.storage.swift.listContainers.useQuery({ project_id: m }, { enabled: t }), [k, j] = H(""), [M, N] = H(""), P = ie(null), F = re((e) => {
|
|
418
|
-
let t = e.target.value;
|
|
419
|
-
j(t), P.current && clearTimeout(P.current), P.current = setTimeout(() => N(t), 300);
|
|
420
|
-
}, []), I = M.trim().length > 0 ? (O ?? []).filter((e) => e.name !== i?.name && e.name.toLowerCase().includes(M.toLowerCase())) : [], ne = I.slice(0, de), z = I.length - ne.length, B = A.useUtils(), [U, ae] = H(""), [se, G] = H(null), [K, ce] = H(""), [le, pe] = H(null), [q, J] = H(""), [me, he] = H(!1), [ge, _e] = H(!1), [Y, ve] = H(""), [X, Z] = H([]), [ye, be] = H({}), [xe, Se] = H(!1), [Ce, we] = H(""), [Te, Ee] = H(""), [De, Oe] = H(null), [ke, Ae] = H(null);
|
|
421
|
-
V(() => {
|
|
422
|
-
if (!h) return;
|
|
423
|
-
ae(h.quotaBytes == null ? "" : String(h.quotaBytes)), ce(h.quotaCount == null ? "" : String(h.quotaCount)), _e(!!(h.versionsEnabled || h.versionsLocation || h.historyLocation)), ve(h.versionsLocation || h.historyLocation || "");
|
|
424
|
-
let e = h.metadata ?? {};
|
|
425
|
-
J(e["web-index"] ?? ""), he(e["web-listings"] === "1" || e["web-listings"] === "true");
|
|
426
|
-
let t = h.metadata ?? {}, n = Object.entries(t).filter(([e]) => !ue.has(e)).map(([e, t]) => ({
|
|
427
|
-
key: e,
|
|
428
|
-
value: t,
|
|
429
|
-
isNew: !1,
|
|
430
|
-
isEditing: !1,
|
|
431
|
-
originalKey: e,
|
|
432
|
-
originalValue: t
|
|
433
|
-
}));
|
|
434
|
-
Z(n);
|
|
435
|
-
}, [h]), V(() => {
|
|
436
|
-
t || Q();
|
|
437
|
-
}, [t]);
|
|
438
|
-
let Q = () => {
|
|
439
|
-
ae(""), G(null), ce(""), pe(null), J(""), he(!1), _e(!1), ve(""), j(""), N(""), P.current && clearTimeout(P.current), Z([]), be({}), Se(!1), we(""), Ee(""), Oe(null), Ae(null), je.reset();
|
|
440
|
-
}, je = A.storage.swift.updateContainerMetadata.useMutation({
|
|
441
|
-
onSuccess: () => {
|
|
442
|
-
B.storage.swift.getContainerMetadata.invalidate({ container: i.name }), B.storage.swift.listContainers.invalidate(), o?.(i.name), Ue();
|
|
443
|
-
},
|
|
444
|
-
onError: () => {}
|
|
445
|
-
}), Me = () => {
|
|
446
|
-
let e = !0;
|
|
447
|
-
return U !== "" && (isNaN(Number(U)) || !Number.isInteger(Number(U)) || Number(U) < 0) ? (G(s._({ id: "HG5AI8" })), e = !1) : G(null), K !== "" && (isNaN(Number(K)) || !Number.isInteger(Number(K)) || Number(K) < 0) ? (pe(s._({ id: "HG5AI8" })), e = !1) : pe(null), e;
|
|
448
|
-
}, Ne = (e, t) => e.trim() ? fe.test(e) ? /[a-zA-Z0-9]/.test(e) ? ue.has(e.toLowerCase()) ? s._({ id: "JeRXll" }) : X.some((n) => n.key.toLowerCase() === e.toLowerCase() && n.originalKey !== t) ? s._({ id: "i6/ygf" }) : null : s._({ id: "dTNzBI" }) : s._({ id: "XYZLy9" }) : s._({ id: "QV1ZPO" }), Pe = () => {
|
|
449
|
-
let e = Ne(Ce);
|
|
450
|
-
if (e) {
|
|
451
|
-
Oe(e);
|
|
452
|
-
return;
|
|
453
|
-
}
|
|
454
|
-
if (!Te.trim()) {
|
|
455
|
-
Ae(s._({ id: "hXUWyd" }));
|
|
456
|
-
return;
|
|
457
|
-
}
|
|
458
|
-
Z([...X, {
|
|
459
|
-
key: Ce.trim(),
|
|
460
|
-
value: Te.trim(),
|
|
461
|
-
isNew: !0,
|
|
462
|
-
isEditing: !1
|
|
463
|
-
}]), we(""), Ee(""), Se(!1), Oe(null), Ae(null);
|
|
464
|
-
}, Fe = () => {
|
|
465
|
-
we(""), Ee(""), Se(!1), Oe(null), Ae(null);
|
|
466
|
-
}, Ie = (e) => {
|
|
467
|
-
Z(X.map((t, n) => n === e ? {
|
|
468
|
-
...t,
|
|
469
|
-
isEditing: !0
|
|
470
|
-
} : {
|
|
471
|
-
...t,
|
|
472
|
-
isEditing: !1
|
|
473
|
-
})), Se(!1);
|
|
474
|
-
}, Le = (e) => {
|
|
475
|
-
let t = X[e], n = Ne(t.key, t.originalKey);
|
|
476
|
-
if (n) {
|
|
477
|
-
be({ [`edit-${e}`]: n });
|
|
478
|
-
return;
|
|
479
|
-
}
|
|
480
|
-
if (!t.value.trim()) {
|
|
481
|
-
be({ [`edit-${e}`]: s._({ id: "hXUWyd" }) });
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
Z(X.map((t, n) => n === e ? {
|
|
485
|
-
...t,
|
|
486
|
-
isEditing: !1,
|
|
487
|
-
key: t.key.trim(),
|
|
488
|
-
value: t.value.trim()
|
|
489
|
-
} : t)), be({});
|
|
490
|
-
}, Re = (e) => {
|
|
491
|
-
Z(X.map((t, n) => n === e ? {
|
|
492
|
-
...t,
|
|
493
|
-
isEditing: !1,
|
|
494
|
-
key: t.originalKey ?? t.key,
|
|
495
|
-
value: t.originalValue ?? t.value
|
|
496
|
-
} : t)), be({});
|
|
497
|
-
}, ze = (e) => {
|
|
498
|
-
Z(X.filter((t, n) => n !== e)), be({});
|
|
499
|
-
}, Be = (e, t) => {
|
|
500
|
-
Z(X.map((n, r) => r === e ? {
|
|
501
|
-
...n,
|
|
502
|
-
key: t
|
|
503
|
-
} : n)), be((t) => {
|
|
504
|
-
let n = { ...t };
|
|
505
|
-
return delete n[`edit-${e}`], n;
|
|
506
|
-
});
|
|
507
|
-
}, Ve = (e, t) => {
|
|
508
|
-
Z(X.map((n, r) => r === e ? {
|
|
509
|
-
...n,
|
|
510
|
-
value: t
|
|
511
|
-
} : n)), be((t) => {
|
|
512
|
-
let n = { ...t };
|
|
513
|
-
return delete n[`edit-${e}`], n;
|
|
514
|
-
});
|
|
515
|
-
}, He = () => {
|
|
516
|
-
if (!i || !Me()) return;
|
|
517
|
-
let e = h?.metadata ?? {}, t = {}, n = [];
|
|
518
|
-
X.forEach((e) => {
|
|
519
|
-
(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));
|
|
520
|
-
});
|
|
521
|
-
let r = Object.keys(e).filter((e) => !ue.has(e)), a = X.map((e) => e.originalKey).filter(Boolean);
|
|
522
|
-
r.forEach((e) => {
|
|
523
|
-
!a.includes(e) && !n.includes(e) && n.push(e);
|
|
524
|
-
}), S && (q ? t["web-index"] = q : h?.metadata?.["web-index"] && n.push("web-index"), me ? t["web-listings"] = "1" : h?.metadata?.["web-listings"] && n.push("web-listings"));
|
|
525
|
-
let o = !!(h?.versionsEnabled || h?.versionsLocation || h?.historyLocation), s = h?.versionsLocation || h?.historyLocation || "";
|
|
526
|
-
je.mutate({
|
|
527
|
-
project_id: m,
|
|
528
|
-
container: i.name,
|
|
529
|
-
metadata: t,
|
|
530
|
-
removeMetadata: n.length ? n : void 0,
|
|
531
|
-
quotaBytes: U === "" ? void 0 : Number(U),
|
|
532
|
-
quotaCount: K === "" ? void 0 : Number(K),
|
|
533
|
-
versionsLocation: ge && (!o || Y !== s) && Y ? Y : void 0,
|
|
534
|
-
removeVersionsLocation: !ge && o ? !0 : void 0
|
|
535
|
-
});
|
|
536
|
-
}, Ue = () => {
|
|
537
|
-
Q(), a();
|
|
538
|
-
};
|
|
539
|
-
if (!t || !i) return null;
|
|
540
|
-
let $ = g || je.isPending, We = _ && !g, Ge = X.some((e) => e.isEditing), Ke = h?.quotaBytes == null ? "" : String(h.quotaBytes), qe = h?.quotaCount == null ? "" : String(h.quotaCount), Je = !!h?.versionsEnabled, Ye = h?.versionsLocation || h?.historyLocation || "", Xe = h?.metadata?.["web-index"] ?? "", Ze = h?.metadata?.["web-listings"] === "1" || h?.metadata?.["web-listings"] === "true", Qe = Object.keys(h?.metadata ?? {}).filter((e) => !ue.has(e)), $e = X.length === Qe.length && X.every((e) => !e.isNew && e.key === e.originalKey && e.value === e.originalValue), et = U === Ke && K === qe && ge === Je && Y === Ye && q === Xe && me === Ze && $e, tt = h?.quotaBytes == null ? null : `${h.quotaBytes} B`;
|
|
541
|
-
return /*#__PURE__*/ R(ee, {
|
|
542
|
-
title: /*#__PURE__*/ R("span", {
|
|
543
|
-
className: "flex max-w-[500px] items-center gap-2",
|
|
544
|
-
children: [/*#__PURE__*/ L("span", {
|
|
545
|
-
className: "shrink-0",
|
|
546
|
-
children: /*#__PURE__*/ L(W, { id: "y02Bu1" })
|
|
547
|
-
}), /*#__PURE__*/ L("span", {
|
|
548
|
-
className: "truncate",
|
|
549
|
-
title: i.name,
|
|
550
|
-
children: i.name
|
|
551
|
-
})]
|
|
552
|
-
}),
|
|
553
|
-
open: t,
|
|
554
|
-
onCancel: Ue,
|
|
555
|
-
confirmButtonLabel: s._({ id: "tfDRzk" }),
|
|
556
|
-
onConfirm: He,
|
|
557
|
-
cancelButtonLabel: s._({ id: "dEgA5A" }),
|
|
558
|
-
size: "large",
|
|
559
|
-
disableConfirmButton: $ || xe || Ge || et || We,
|
|
560
|
-
children: [je.isError && /*#__PURE__*/ L("p", {
|
|
561
|
-
className: "text-theme-error mb-4",
|
|
562
|
-
children: (() => {
|
|
563
|
-
let e = je.error.message;
|
|
564
|
-
return /*#__PURE__*/ L(W, {
|
|
565
|
-
id: "nUuaq8",
|
|
566
|
-
values: { errorMessage: e }
|
|
567
|
-
});
|
|
568
|
-
})()
|
|
569
|
-
}), g ? /*#__PURE__*/ R(d, {
|
|
570
|
-
direction: "horizontal",
|
|
571
|
-
alignment: "center",
|
|
572
|
-
gap: "2",
|
|
573
|
-
className: "py-8",
|
|
574
|
-
children: [/*#__PURE__*/ L(r, { size: "small" }), /*#__PURE__*/ L(W, { id: "WRZ3Mt" })]
|
|
575
|
-
}) : We ? /*#__PURE__*/ L("p", {
|
|
576
|
-
className: "text-theme-error py-8 text-center",
|
|
577
|
-
children: (() => {
|
|
578
|
-
let e = x?.message ?? "Unknown error";
|
|
579
|
-
return /*#__PURE__*/ L(W, {
|
|
580
|
-
id: "BCXapL",
|
|
581
|
-
values: { errorMessage: e }
|
|
582
|
-
});
|
|
583
|
-
})()
|
|
584
|
-
}) : /*#__PURE__*/ L("div", {
|
|
585
|
-
className: "max-h-[65vh] overflow-y-auto pr-1 pl-1",
|
|
586
|
-
children: /*#__PURE__*/ R(d, {
|
|
587
|
-
direction: "vertical",
|
|
588
|
-
gap: "6",
|
|
589
|
-
children: [
|
|
590
|
-
/*#__PURE__*/ R("div", {
|
|
591
|
-
className: "grid grid-cols-2 gap-4",
|
|
592
|
-
children: [/*#__PURE__*/ L(b, {
|
|
593
|
-
label: s._({ id: "z45o5B" }),
|
|
594
|
-
value: String(i.count),
|
|
595
|
-
disabled: !0,
|
|
596
|
-
readOnly: !0
|
|
597
|
-
}), /*#__PURE__*/ L(b, {
|
|
598
|
-
label: s._({ id: "/InK0O" }),
|
|
599
|
-
value: h?.bytesUsed == null ? `${i.bytes.toLocaleString()} B` : `${h.bytesUsed.toLocaleString()} B`,
|
|
600
|
-
disabled: !0,
|
|
601
|
-
readOnly: !0
|
|
602
|
-
})]
|
|
603
|
-
}),
|
|
604
|
-
/*#__PURE__*/ R("div", {
|
|
605
|
-
className: "grid grid-cols-2 gap-4",
|
|
606
|
-
children: [/*#__PURE__*/ L("div", { children: /*#__PURE__*/ L(b, {
|
|
607
|
-
label: s._({ id: "k0vAWv" }),
|
|
608
|
-
value: K,
|
|
609
|
-
onChange: (e) => {
|
|
610
|
-
ce(e.target.value), le && pe(null);
|
|
611
|
-
},
|
|
612
|
-
placeholder: s._({ id: "qtoOYG" }),
|
|
613
|
-
invalid: !!le,
|
|
614
|
-
errortext: le ?? void 0,
|
|
615
|
-
disabled: $
|
|
616
|
-
}) }), /*#__PURE__*/ L("div", { children: /*#__PURE__*/ L(b, {
|
|
617
|
-
label: s._({ id: "KOpPMt" }),
|
|
618
|
-
value: U,
|
|
619
|
-
onChange: (e) => {
|
|
620
|
-
ae(e.target.value), se && G(null);
|
|
621
|
-
},
|
|
622
|
-
placeholder: s._({ id: "qtoOYG" }),
|
|
623
|
-
invalid: !!se,
|
|
624
|
-
errortext: se ?? void 0,
|
|
625
|
-
disabled: $,
|
|
626
|
-
helptext: U && tt ? tt : void 0
|
|
627
|
-
}) })]
|
|
628
|
-
}),
|
|
629
|
-
S && C && /*#__PURE__*/ R("div", { children: [/*#__PURE__*/ R("p", {
|
|
630
|
-
className: "text-theme-default mb-1 text-sm font-semibold",
|
|
631
|
-
children: [
|
|
632
|
-
/*#__PURE__*/ L(W, { id: "mvz5Eo" }),
|
|
633
|
-
" ",
|
|
634
|
-
/*#__PURE__*/ L("a", {
|
|
635
|
-
href: C,
|
|
636
|
-
target: "_blank",
|
|
637
|
-
rel: "noopener noreferrer",
|
|
638
|
-
className: "text-theme-info text-xs font-normal underline",
|
|
639
|
-
children: /*#__PURE__*/ L(W, { id: "Alx2/L" })
|
|
640
|
-
})
|
|
641
|
-
]
|
|
642
|
-
}), /*#__PURE__*/ L(b, {
|
|
643
|
-
value: C,
|
|
644
|
-
disabled: !0,
|
|
645
|
-
readOnly: !0
|
|
646
|
-
})] }),
|
|
647
|
-
/*#__PURE__*/ R("div", { children: [/*#__PURE__*/ L("p", {
|
|
648
|
-
className: "text-theme-default mb-3 text-sm font-semibold",
|
|
649
|
-
children: /*#__PURE__*/ L(W, { id: "6CDYXS" })
|
|
650
|
-
}), S ? /*#__PURE__*/ R(d, {
|
|
651
|
-
direction: "vertical",
|
|
652
|
-
gap: "4",
|
|
653
|
-
children: [/*#__PURE__*/ R(d, {
|
|
654
|
-
direction: "vertical",
|
|
655
|
-
gap: "1",
|
|
656
|
-
children: [/*#__PURE__*/ L(w, {
|
|
657
|
-
label: s._({ id: "6+7EwD" }),
|
|
658
|
-
checked: !!q,
|
|
659
|
-
onChange: (e) => {
|
|
660
|
-
e.target.checked ? q || J("index.html") : J("");
|
|
661
|
-
},
|
|
662
|
-
disabled: $
|
|
663
|
-
}), /*#__PURE__*/ L("div", {
|
|
664
|
-
className: "pl-6",
|
|
665
|
-
children: /*#__PURE__*/ L(b, {
|
|
666
|
-
value: q,
|
|
667
|
-
onChange: (e) => J(e.target.value),
|
|
668
|
-
placeholder: "index.html",
|
|
669
|
-
disabled: $ || !q,
|
|
670
|
-
className: "flex-1"
|
|
671
|
-
})
|
|
672
|
-
})]
|
|
673
|
-
}), /*#__PURE__*/ R(d, {
|
|
674
|
-
direction: "horizontal",
|
|
675
|
-
alignment: "start",
|
|
676
|
-
gap: "2",
|
|
677
|
-
children: [/*#__PURE__*/ L(w, {
|
|
678
|
-
label: s._({ id: "NeUjqc" }),
|
|
679
|
-
checked: me,
|
|
680
|
-
onChange: (e) => he(e.target.checked),
|
|
681
|
-
disabled: $
|
|
682
|
-
}), /*#__PURE__*/ R(u, {
|
|
683
|
-
triggerEvent: "hover",
|
|
684
|
-
children: [/*#__PURE__*/ L(v, { children: /*#__PURE__*/ L(y, {
|
|
685
|
-
icon: "help",
|
|
686
|
-
size: "16",
|
|
687
|
-
className: "text-theme-light cursor-help"
|
|
688
|
-
}) }), /*#__PURE__*/ L(l, {
|
|
689
|
-
className: "z-10 max-w-[220px]",
|
|
690
|
-
children: /*#__PURE__*/ L(W, { id: "Oxl1UN" })
|
|
691
|
-
})]
|
|
692
|
-
})]
|
|
693
|
-
})]
|
|
694
|
-
}) : /*#__PURE__*/ L("p", {
|
|
695
|
-
className: "text-theme-default text-sm",
|
|
696
|
-
children: /*#__PURE__*/ L(W, {
|
|
697
|
-
id: "aSsVD3",
|
|
698
|
-
components: { 0: /*#__PURE__*/ L("strong", {}) }
|
|
699
|
-
})
|
|
700
|
-
})] }),
|
|
701
|
-
/*#__PURE__*/ R("div", { children: [/*#__PURE__*/ L("p", {
|
|
702
|
-
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
703
|
-
children: /*#__PURE__*/ L(W, { id: "jNzyQo" })
|
|
704
|
-
}), Je && !Y ? /*#__PURE__*/ L(w, {
|
|
705
|
-
label: s._({ id: "Nvfd2b" }),
|
|
706
|
-
checked: !0,
|
|
707
|
-
onChange: (e) => {
|
|
708
|
-
e.target.checked || (_e(!1), ve(""), j(""), N(""));
|
|
709
|
-
},
|
|
710
|
-
disabled: !0
|
|
711
|
-
}) : !ge && !Y ? /*#__PURE__*/ L(w, {
|
|
712
|
-
label: s._({ id: "WyKwnD" }),
|
|
713
|
-
checked: !1,
|
|
714
|
-
onChange: (e) => _e(e.target.checked),
|
|
715
|
-
disabled: $
|
|
716
|
-
}) : /*#__PURE__*/ R(d, {
|
|
717
|
-
direction: "vertical",
|
|
718
|
-
gap: "1",
|
|
719
|
-
children: [/*#__PURE__*/ L(w, {
|
|
720
|
-
label: s._({ id: "b0uU1G" }),
|
|
721
|
-
checked: ge,
|
|
722
|
-
onChange: (e) => {
|
|
723
|
-
_e(e.target.checked), e.target.checked || (ve(""), j(""), N(""));
|
|
724
|
-
},
|
|
725
|
-
disabled: $
|
|
726
|
-
}), ge && /*#__PURE__*/ L("div", {
|
|
727
|
-
className: "pl-6",
|
|
728
|
-
children: /*#__PURE__*/ L(T, {
|
|
729
|
-
value: Y,
|
|
730
|
-
onChange: (e) => ve(e),
|
|
731
|
-
onInputChange: F,
|
|
732
|
-
placeholder: s._({ id: "a13wDR" }),
|
|
733
|
-
helptext: (() => {
|
|
734
|
-
if (k.trim().length === 0) return s._({ id: "c+fUtV" });
|
|
735
|
-
if (z > 0) {
|
|
736
|
-
let e = de, t = I.length;
|
|
737
|
-
return s._({
|
|
738
|
-
id: "qzhUb9",
|
|
739
|
-
values: {
|
|
740
|
-
maxOptions: e,
|
|
741
|
-
totalCount: t
|
|
742
|
-
}
|
|
743
|
-
});
|
|
744
|
-
}
|
|
745
|
-
})(),
|
|
746
|
-
disabled: $,
|
|
747
|
-
children: ne.map((e) => /*#__PURE__*/ L(c, {
|
|
748
|
-
value: e.name,
|
|
749
|
-
children: e.name
|
|
750
|
-
}, e.name))
|
|
751
|
-
})
|
|
752
|
-
})]
|
|
753
|
-
})] }),
|
|
754
|
-
/*#__PURE__*/ R("div", { children: [
|
|
755
|
-
/*#__PURE__*/ R(d, {
|
|
756
|
-
direction: "horizontal",
|
|
757
|
-
alignment: "center",
|
|
758
|
-
distribution: "between",
|
|
759
|
-
className: "mb-3",
|
|
760
|
-
children: [/*#__PURE__*/ L("p", {
|
|
761
|
-
className: "text-theme-default text-sm font-semibold",
|
|
762
|
-
children: /*#__PURE__*/ L(W, { id: "6GBt0m" })
|
|
763
|
-
}), /*#__PURE__*/ L("p", {
|
|
764
|
-
className: "text-theme-light text-xs",
|
|
765
|
-
children: /*#__PURE__*/ L(W, { id: "kuYWaD" })
|
|
766
|
-
})]
|
|
767
|
-
}),
|
|
768
|
-
/*#__PURE__*/ L(d, {
|
|
769
|
-
direction: "horizontal",
|
|
770
|
-
className: "jn:bg-theme-background-lvl-1 justify-end p-2",
|
|
771
|
-
children: /*#__PURE__*/ L(p, {
|
|
772
|
-
label: s._({ id: "sWBLli" }),
|
|
773
|
-
onClick: () => Se(!0),
|
|
774
|
-
variant: "primary",
|
|
775
|
-
icon: "addCircle",
|
|
776
|
-
size: "small",
|
|
777
|
-
disabled: xe || Ge || $
|
|
778
|
-
})
|
|
779
|
-
}),
|
|
780
|
-
/*#__PURE__*/ R(E, {
|
|
781
|
-
columns: 3,
|
|
782
|
-
children: [
|
|
783
|
-
/*#__PURE__*/ R(n, { children: [
|
|
784
|
-
/*#__PURE__*/ L(e, { children: /*#__PURE__*/ L(W, { id: "7sMeHQ" }) }),
|
|
785
|
-
/*#__PURE__*/ L(e, { children: /*#__PURE__*/ L(W, { id: "wMHvYH" }) }),
|
|
786
|
-
/*#__PURE__*/ L(e, { children: /*#__PURE__*/ L(W, { id: "7L01XJ" }) })
|
|
787
|
-
] }),
|
|
788
|
-
xe && /*#__PURE__*/ R(n, { children: [
|
|
789
|
-
/*#__PURE__*/ L(D, { children: /*#__PURE__*/ L(b, {
|
|
790
|
-
value: Ce,
|
|
791
|
-
onChange: (e) => {
|
|
792
|
-
we(e.target.value), De && Oe(null);
|
|
793
|
-
},
|
|
794
|
-
placeholder: s._({ id: "x9AdZ8" }),
|
|
795
|
-
errortext: De ?? void 0,
|
|
796
|
-
invalid: !!De,
|
|
797
|
-
autoFocus: !0
|
|
798
|
-
}) }),
|
|
799
|
-
/*#__PURE__*/ L(D, { children: /*#__PURE__*/ L(b, {
|
|
800
|
-
value: Te,
|
|
801
|
-
onChange: (e) => {
|
|
802
|
-
Ee(e.target.value), ke && Ae(null);
|
|
803
|
-
},
|
|
804
|
-
placeholder: s._({ id: "wMHvYH" }),
|
|
805
|
-
errortext: ke ?? void 0,
|
|
806
|
-
invalid: !!ke
|
|
807
|
-
}) }),
|
|
808
|
-
/*#__PURE__*/ L(D, { children: /*#__PURE__*/ R(d, {
|
|
809
|
-
direction: "horizontal",
|
|
810
|
-
gap: "2",
|
|
811
|
-
children: [/*#__PURE__*/ L(p, {
|
|
812
|
-
size: "small",
|
|
813
|
-
variant: "primary",
|
|
814
|
-
onClick: Pe,
|
|
815
|
-
icon: "check",
|
|
816
|
-
title: s._({ id: "tfDRzk" })
|
|
817
|
-
}), /*#__PURE__*/ L(p, {
|
|
818
|
-
size: "small",
|
|
819
|
-
variant: "subdued",
|
|
820
|
-
onClick: Fe,
|
|
821
|
-
icon: "close",
|
|
822
|
-
title: s._({ id: "bzSI52" })
|
|
823
|
-
})]
|
|
824
|
-
}) })
|
|
825
|
-
] }),
|
|
826
|
-
X.map((e, t) => /*#__PURE__*/ R(n, { children: [
|
|
827
|
-
/*#__PURE__*/ L(D, { children: e.isEditing ? /*#__PURE__*/ L(b, {
|
|
828
|
-
value: e.key,
|
|
829
|
-
onChange: (e) => Be(t, e.target.value),
|
|
830
|
-
errortext: ye[`edit-${t}`],
|
|
831
|
-
invalid: !!ye[`edit-${t}`]
|
|
832
|
-
}) : /*#__PURE__*/ L("span", {
|
|
833
|
-
className: "block max-w-xs truncate text-sm",
|
|
834
|
-
title: e.key,
|
|
835
|
-
children: e.key
|
|
836
|
-
}) }),
|
|
837
|
-
/*#__PURE__*/ L(D, { children: e.isEditing ? /*#__PURE__*/ L(b, {
|
|
838
|
-
value: e.value,
|
|
839
|
-
onChange: (e) => Ve(t, e.target.value)
|
|
840
|
-
}) : /*#__PURE__*/ L("span", {
|
|
841
|
-
className: "block max-w-md truncate text-sm",
|
|
842
|
-
title: e.value,
|
|
843
|
-
children: e.value
|
|
844
|
-
}) }),
|
|
845
|
-
/*#__PURE__*/ L(D, { children: e.isEditing ? /*#__PURE__*/ R(d, {
|
|
846
|
-
direction: "horizontal",
|
|
847
|
-
gap: "2",
|
|
848
|
-
children: [/*#__PURE__*/ L(p, {
|
|
849
|
-
size: "small",
|
|
850
|
-
variant: "primary",
|
|
851
|
-
onClick: () => Le(t),
|
|
852
|
-
icon: "check",
|
|
853
|
-
title: s._({ id: "tfDRzk" })
|
|
854
|
-
}), /*#__PURE__*/ L(p, {
|
|
855
|
-
size: "small",
|
|
856
|
-
variant: "subdued",
|
|
857
|
-
onClick: () => Re(t),
|
|
858
|
-
icon: "close",
|
|
859
|
-
title: s._({ id: "bzSI52" })
|
|
860
|
-
})]
|
|
861
|
-
}) : /*#__PURE__*/ R(d, {
|
|
862
|
-
direction: "horizontal",
|
|
863
|
-
gap: "2",
|
|
864
|
-
children: [/*#__PURE__*/ L(p, {
|
|
865
|
-
size: "small",
|
|
866
|
-
variant: "subdued",
|
|
867
|
-
onClick: () => Ie(t),
|
|
868
|
-
icon: "edit",
|
|
869
|
-
title: s._({ id: "ePK91l" }),
|
|
870
|
-
disabled: xe || Ge || $
|
|
871
|
-
}), /*#__PURE__*/ L(p, {
|
|
872
|
-
size: "small",
|
|
873
|
-
variant: "primary-danger",
|
|
874
|
-
onClick: () => ze(t),
|
|
875
|
-
icon: "deleteForever",
|
|
876
|
-
title: s._({ id: "cnGeoo" }),
|
|
877
|
-
disabled: xe || Ge || $
|
|
878
|
-
})]
|
|
879
|
-
}) })
|
|
880
|
-
] }, t)),
|
|
881
|
-
X.length === 0 && !xe && /*#__PURE__*/ L(n, { children: /*#__PURE__*/ L(D, {
|
|
882
|
-
colSpan: 3,
|
|
883
|
-
className: "py-6 text-center",
|
|
884
|
-
children: /*#__PURE__*/ L(d, {
|
|
885
|
-
alignment: "center",
|
|
886
|
-
children: /*#__PURE__*/ L("span", {
|
|
887
|
-
className: "text-theme-light text-sm",
|
|
888
|
-
children: /*#__PURE__*/ L(W, { id: "F02e8I" })
|
|
889
|
-
})
|
|
890
|
-
})
|
|
891
|
-
}) })
|
|
892
|
-
]
|
|
893
|
-
})
|
|
894
|
-
] })
|
|
895
|
-
]
|
|
896
|
-
})
|
|
897
|
-
})]
|
|
898
|
-
});
|
|
899
|
-
};
|
|
900
|
-
//#endregion
|
|
901
|
-
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ManageContainerAccessModal.tsx
|
|
902
|
-
function q(e) {
|
|
903
|
-
let t = e.trim();
|
|
904
|
-
if (t === ".r:*") return {
|
|
905
|
-
raw: t,
|
|
906
|
-
type: "any-referrer",
|
|
907
|
-
description: "",
|
|
908
|
-
requiresToken: !1
|
|
909
|
-
};
|
|
910
|
-
if (t.startsWith(".r:")) {
|
|
911
|
-
let e = t.slice(3), n = e.startsWith("-"), r = n ? e.slice(1) : e;
|
|
912
|
-
return {
|
|
913
|
-
raw: t,
|
|
914
|
-
type: n ? "denied-referrer" : "specific-referrer",
|
|
915
|
-
host: r,
|
|
916
|
-
description: "",
|
|
917
|
-
requiresToken: !1
|
|
918
|
-
};
|
|
919
|
-
}
|
|
920
|
-
if (t === ".rlistings") return {
|
|
921
|
-
raw: t,
|
|
922
|
-
type: "listing-access",
|
|
923
|
-
description: "",
|
|
924
|
-
requiresToken: !1
|
|
925
|
-
};
|
|
926
|
-
if (/^[^:]+:\*$/.test(t) && !t.startsWith("*")) {
|
|
927
|
-
let [e] = t.split(":");
|
|
928
|
-
return {
|
|
929
|
-
raw: t,
|
|
930
|
-
type: "all-project-users",
|
|
931
|
-
projectId: e,
|
|
932
|
-
description: "",
|
|
933
|
-
requiresToken: !0
|
|
934
|
-
};
|
|
935
|
-
}
|
|
936
|
-
if (t.startsWith("*:")) return {
|
|
937
|
-
raw: t,
|
|
938
|
-
type: "specific-user-any-project",
|
|
939
|
-
userId: t.slice(2),
|
|
940
|
-
description: "",
|
|
941
|
-
requiresToken: !0
|
|
942
|
-
};
|
|
943
|
-
if (t.includes(":")) {
|
|
944
|
-
let [e, n] = t.split(":");
|
|
945
|
-
return {
|
|
946
|
-
raw: t,
|
|
947
|
-
type: "specific-user",
|
|
948
|
-
projectId: e,
|
|
949
|
-
userId: n,
|
|
950
|
-
description: "",
|
|
951
|
-
requiresToken: !0
|
|
952
|
-
};
|
|
953
|
-
}
|
|
954
|
-
return {
|
|
955
|
-
raw: t,
|
|
956
|
-
type: "unknown",
|
|
957
|
-
description: "",
|
|
958
|
-
requiresToken: !0
|
|
959
|
-
};
|
|
960
|
-
}
|
|
961
|
-
function J(e) {
|
|
962
|
-
return e.trim() ? e.split(",").map((e) => e.trim()).filter(Boolean).map(q) : [];
|
|
963
|
-
}
|
|
964
|
-
var me = [".r:*", ".rlistings"];
|
|
965
|
-
function he(e) {
|
|
966
|
-
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
967
|
-
return me.every((e) => t.includes(e));
|
|
968
|
-
}
|
|
969
|
-
function ge(e) {
|
|
970
|
-
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
971
|
-
return [.../* @__PURE__ */ new Set([...me, ...t])].join(",");
|
|
972
|
-
}
|
|
973
|
-
function _e(e) {
|
|
974
|
-
return e.split(",").map((e) => e.trim()).filter((e) => !me.includes(e)).join(",");
|
|
975
|
-
}
|
|
976
|
-
function Y(e) {
|
|
977
|
-
switch (e.type) {
|
|
978
|
-
case "any-referrer": return G._({ id: "HVdrr1" });
|
|
979
|
-
case "denied-referrer": {
|
|
980
|
-
let t = e.host || "";
|
|
981
|
-
return G._({
|
|
982
|
-
id: "7XQ3QJ",
|
|
983
|
-
values: { host: t }
|
|
984
|
-
});
|
|
985
|
-
}
|
|
986
|
-
case "specific-referrer": {
|
|
987
|
-
let t = e.host || "";
|
|
988
|
-
return G._({
|
|
989
|
-
id: "Dqnh7K",
|
|
990
|
-
values: { host: t }
|
|
991
|
-
});
|
|
992
|
-
}
|
|
993
|
-
case "listing-access": return G._({ id: "ntNlXu" });
|
|
994
|
-
case "all-project-users": {
|
|
995
|
-
let t = e.projectId || "";
|
|
996
|
-
return G._({
|
|
997
|
-
id: "sa4CV6",
|
|
998
|
-
values: { projectId: t }
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
case "specific-user-any-project": {
|
|
1002
|
-
let t = e.userId || "";
|
|
1003
|
-
return G._({
|
|
1004
|
-
id: "izMhIO",
|
|
1005
|
-
values: { userId: t }
|
|
1006
|
-
});
|
|
1007
|
-
}
|
|
1008
|
-
case "specific-user": {
|
|
1009
|
-
let t = e.projectId || "", n = e.userId || "";
|
|
1010
|
-
return G._({
|
|
1011
|
-
id: "cXuXkb",
|
|
1012
|
-
values: {
|
|
1013
|
-
userId: n,
|
|
1014
|
-
projectId: t
|
|
1015
|
-
}
|
|
1016
|
-
});
|
|
1017
|
-
}
|
|
1018
|
-
default: return e.raw;
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
var ve = ({ isOpen: e, container: n, onClose: a, onSuccess: o, onError: s }) => {
|
|
1022
|
-
let { i18n: c, _: l } = oe(), u = te(), [f, m] = H(""), [h, v] = H(""), [y, b] = H(!1), [x, S] = H(!1);
|
|
1023
|
-
V(() => {
|
|
1024
|
-
!f.trim() && !h.trim() && S(!1);
|
|
1025
|
-
}, [f, h]);
|
|
1026
|
-
let { data: T, isLoading: E, isError: D, error: O } = A.storage.swift.getContainerMetadata.useQuery({
|
|
1027
|
-
project_id: u,
|
|
1028
|
-
container: n?.name ?? ""
|
|
1029
|
-
}, { enabled: e && n !== null });
|
|
1030
|
-
V(() => {
|
|
1031
|
-
if (!T) return;
|
|
1032
|
-
let e = T.read ?? "", t = T.write ?? "";
|
|
1033
|
-
m(e), v(t), b(he(e));
|
|
1034
|
-
}, [T]);
|
|
1035
|
-
let k = A.useUtils(), j = A.storage.swift.updateContainerMetadata.useMutation({
|
|
1036
|
-
onSuccess: () => {
|
|
1037
|
-
k.storage.swift.getContainerMetadata.invalidate({
|
|
1038
|
-
project_id: u,
|
|
1039
|
-
container: n.name
|
|
1040
|
-
}), k.storage.swift.listContainers.invalidate(), o?.(n.name), N();
|
|
1041
|
-
},
|
|
1042
|
-
onError: (e) => {
|
|
1043
|
-
s?.(n.name, e.message);
|
|
1044
|
-
}
|
|
1045
|
-
}), M = ie(j.reset);
|
|
1046
|
-
M.current = j.reset;
|
|
1047
|
-
let N = () => {
|
|
1048
|
-
m(""), v(""), b(!1), S(!1), j.reset(), a();
|
|
1049
|
-
};
|
|
1050
|
-
V(() => {
|
|
1051
|
-
e || (m(""), v(""), b(!1), M.current());
|
|
1052
|
-
}, [e]);
|
|
1053
|
-
let P = (e) => {
|
|
1054
|
-
let t = e.target.checked;
|
|
1055
|
-
b(t), m((e) => t ? ge(e) : _e(e));
|
|
1056
|
-
}, F = (e) => {
|
|
1057
|
-
let t = e.target.value;
|
|
1058
|
-
m(t), b(he(t));
|
|
1059
|
-
}, I = () => {
|
|
1060
|
-
n && j.mutate({
|
|
1061
|
-
project_id: u,
|
|
1062
|
-
container: n.name,
|
|
1063
|
-
read: f.trim(),
|
|
1064
|
-
write: h.trim()
|
|
1065
|
-
});
|
|
1066
|
-
};
|
|
1067
|
-
if (!e || !n) return null;
|
|
1068
|
-
let B = E || j.isPending, re = f.trim().length > 0 || h.trim().length > 0, U = J(f), ae = J(h), se = /*#__PURE__*/ R("span", {
|
|
1069
|
-
className: "flex items-center gap-2",
|
|
1070
|
-
children: [/*#__PURE__*/ L(W, { id: "EdxcAN" }), /*#__PURE__*/ L("span", {
|
|
1071
|
-
className: "max-w-[250px] truncate",
|
|
1072
|
-
title: n.name,
|
|
1073
|
-
children: n.name
|
|
1074
|
-
})]
|
|
1075
|
-
});
|
|
1076
|
-
return /*#__PURE__*/ R(ee, {
|
|
1077
|
-
title: se,
|
|
1078
|
-
open: e,
|
|
1079
|
-
onCancel: N,
|
|
1080
|
-
confirmButtonLabel: c._({ id: "tfDRzk" }),
|
|
1081
|
-
onConfirm: I,
|
|
1082
|
-
cancelButtonLabel: c._({ id: "dEgA5A" }),
|
|
1083
|
-
size: "xl",
|
|
1084
|
-
disableConfirmButton: B || D,
|
|
1085
|
-
children: [j.isError && /*#__PURE__*/ L("p", {
|
|
1086
|
-
className: "text-theme-error mb-4",
|
|
1087
|
-
children: (() => {
|
|
1088
|
-
let e = j.error.message;
|
|
1089
|
-
return /*#__PURE__*/ L(W, {
|
|
1090
|
-
id: "u2xIeO",
|
|
1091
|
-
values: { errorMessage: e }
|
|
1092
|
-
});
|
|
1093
|
-
})()
|
|
1094
|
-
}), /*#__PURE__*/ R("div", {
|
|
1095
|
-
className: "max-h-[70vh] overflow-y-auto pr-1 pl-1",
|
|
1096
|
-
children: [
|
|
1097
|
-
/*#__PURE__*/ L("div", {
|
|
1098
|
-
className: "mb-4",
|
|
1099
|
-
children: /*#__PURE__*/ L(i, {
|
|
1100
|
-
variant: "warning",
|
|
1101
|
-
className: "mb-4",
|
|
1102
|
-
children: /*#__PURE__*/ L(W, { id: "wH0MtN" })
|
|
1103
|
-
})
|
|
1104
|
-
}),
|
|
1105
|
-
E ? /*#__PURE__*/ R(d, {
|
|
1106
|
-
direction: "horizontal",
|
|
1107
|
-
alignment: "center",
|
|
1108
|
-
gap: "2",
|
|
1109
|
-
className: "py-6",
|
|
1110
|
-
children: [/*#__PURE__*/ L(r, { size: "small" }), /*#__PURE__*/ L(W, { id: "poCbZw" })]
|
|
1111
|
-
}) : D ? /*#__PURE__*/ L("p", {
|
|
1112
|
-
className: "text-theme-error py-2",
|
|
1113
|
-
children: (() => {
|
|
1114
|
-
let e = O?.message ?? "";
|
|
1115
|
-
return /*#__PURE__*/ L(W, {
|
|
1116
|
-
id: "QNHur0",
|
|
1117
|
-
values: { errorMessage: e }
|
|
1118
|
-
});
|
|
1119
|
-
})()
|
|
1120
|
-
}) : /*#__PURE__*/ L(ne, { children: /*#__PURE__*/ R("div", {
|
|
1121
|
-
className: "flex gap-6",
|
|
1122
|
-
children: [/*#__PURE__*/ L("div", {
|
|
1123
|
-
className: "min-w-0 flex-1",
|
|
1124
|
-
children: /*#__PURE__*/ R(d, {
|
|
1125
|
-
direction: "vertical",
|
|
1126
|
-
gap: "6",
|
|
1127
|
-
children: [
|
|
1128
|
-
/*#__PURE__*/ R("div", { children: [
|
|
1129
|
-
/*#__PURE__*/ L(Z, { label: c._({ id: "SBGiGm" }) }),
|
|
1130
|
-
/*#__PURE__*/ L(_, {
|
|
1131
|
-
value: f,
|
|
1132
|
-
onChange: F,
|
|
1133
|
-
disabled: B || y,
|
|
1134
|
-
placeholder: c._({ id: "FKL6Jv" }),
|
|
1135
|
-
className: "text-sm",
|
|
1136
|
-
rows: 3
|
|
1137
|
-
}),
|
|
1138
|
-
/*#__PURE__*/ L(w, {
|
|
1139
|
-
label: c._({ id: "23wBCX" }),
|
|
1140
|
-
checked: y,
|
|
1141
|
-
onChange: P,
|
|
1142
|
-
disabled: B,
|
|
1143
|
-
className: "mt-2"
|
|
1144
|
-
})
|
|
1145
|
-
] }),
|
|
1146
|
-
/*#__PURE__*/ R("div", { children: [/*#__PURE__*/ L(Z, { label: c._({ id: "6qzsuS" }) }), /*#__PURE__*/ L(_, {
|
|
1147
|
-
value: h,
|
|
1148
|
-
onChange: (e) => {
|
|
1149
|
-
let t = e.target.value;
|
|
1150
|
-
v(t);
|
|
1151
|
-
},
|
|
1152
|
-
disabled: B,
|
|
1153
|
-
placeholder: c._({ id: "UVFHGY" }),
|
|
1154
|
-
className: "text-sm",
|
|
1155
|
-
rows: 3
|
|
1156
|
-
})] }),
|
|
1157
|
-
re && /*#__PURE__*/ L(p, {
|
|
1158
|
-
label: x ? c._({ id: "we28Pq" }) : c._({ id: "YiMCKk" }),
|
|
1159
|
-
onClick: () => S((e) => !e),
|
|
1160
|
-
variant: "subdued",
|
|
1161
|
-
disabled: B,
|
|
1162
|
-
className: "self-start"
|
|
1163
|
-
}),
|
|
1164
|
-
x && (U.length > 0 || ae.length > 0) && /*#__PURE__*/ R(d, {
|
|
1165
|
-
direction: "vertical",
|
|
1166
|
-
gap: "4",
|
|
1167
|
-
children: [U.length > 0 && /*#__PURE__*/ R("div", { children: [/*#__PURE__*/ L("p", {
|
|
1168
|
-
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
1169
|
-
children: /*#__PURE__*/ L(W, { id: "x7SF89" })
|
|
1170
|
-
}), /*#__PURE__*/ L("div", {
|
|
1171
|
-
className: "border-theme-background-lvl-3 rounded border p-3",
|
|
1172
|
-
children: /*#__PURE__*/ L(g, {
|
|
1173
|
-
className: "grid-cols-2",
|
|
1174
|
-
alignTerms: "left",
|
|
1175
|
-
children: U.map((e, n) => /*#__PURE__*/ R(z, { children: [/*#__PURE__*/ L(C, {
|
|
1176
|
-
className: "col-span-1",
|
|
1177
|
-
children: /*#__PURE__*/ L("span", {
|
|
1178
|
-
className: "block truncate text-xs",
|
|
1179
|
-
title: e.raw,
|
|
1180
|
-
children: e.raw
|
|
1181
|
-
})
|
|
1182
|
-
}), /*#__PURE__*/ R(t, {
|
|
1183
|
-
className: "col-span-1",
|
|
1184
|
-
children: [/*#__PURE__*/ L("span", {
|
|
1185
|
-
className: "block truncate text-sm",
|
|
1186
|
-
title: Y(e),
|
|
1187
|
-
children: Y(e)
|
|
1188
|
-
}), /*#__PURE__*/ L("span", {
|
|
1189
|
-
className: "text-theme-light block text-xs",
|
|
1190
|
-
children: e.requiresToken ? /*#__PURE__*/ L(W, { id: "z+zpLP" }) : /*#__PURE__*/ L(W, { id: "t7ff15" })
|
|
1191
|
-
})]
|
|
1192
|
-
})] }, n))
|
|
1193
|
-
})
|
|
1194
|
-
})] }), ae.length > 0 && /*#__PURE__*/ R("div", { children: [/*#__PURE__*/ L("p", {
|
|
1195
|
-
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
1196
|
-
children: /*#__PURE__*/ L(W, { id: "lRRkwQ" })
|
|
1197
|
-
}), /*#__PURE__*/ L("div", {
|
|
1198
|
-
className: "border-theme-background-lvl-3 rounded border p-3",
|
|
1199
|
-
children: /*#__PURE__*/ L(g, {
|
|
1200
|
-
className: "grid-cols-2",
|
|
1201
|
-
alignTerms: "left",
|
|
1202
|
-
children: ae.map((e, n) => /*#__PURE__*/ R(z, { children: [/*#__PURE__*/ L(C, {
|
|
1203
|
-
className: "col-span-1",
|
|
1204
|
-
children: /*#__PURE__*/ L("span", {
|
|
1205
|
-
className: "block truncate text-xs",
|
|
1206
|
-
title: e.raw,
|
|
1207
|
-
children: e.raw
|
|
1208
|
-
})
|
|
1209
|
-
}), /*#__PURE__*/ R(t, {
|
|
1210
|
-
className: "col-span-1",
|
|
1211
|
-
children: [/*#__PURE__*/ L("span", {
|
|
1212
|
-
className: "block truncate text-sm",
|
|
1213
|
-
title: Y(e),
|
|
1214
|
-
children: Y(e)
|
|
1215
|
-
}), /*#__PURE__*/ L("span", {
|
|
1216
|
-
className: "text-theme-light block text-xs",
|
|
1217
|
-
children: e.requiresToken ? /*#__PURE__*/ L(W, { id: "z+zpLP" }) : /*#__PURE__*/ L(W, { id: "t7ff15" })
|
|
1218
|
-
})]
|
|
1219
|
-
})] }, n))
|
|
1220
|
-
})
|
|
1221
|
-
})] })]
|
|
1222
|
-
})
|
|
1223
|
-
]
|
|
1224
|
-
})
|
|
1225
|
-
}), /*#__PURE__*/ R("div", {
|
|
1226
|
-
className: "border-theme-background-lvl-3 w-72 shrink-0 border-l pl-6",
|
|
1227
|
-
children: [
|
|
1228
|
-
/*#__PURE__*/ L("p", {
|
|
1229
|
-
className: "text-theme-light mb-3 text-xs",
|
|
1230
|
-
children: /*#__PURE__*/ L(W, { id: "dd2ndz" })
|
|
1231
|
-
}),
|
|
1232
|
-
/*#__PURE__*/ R(d, {
|
|
1233
|
-
direction: "vertical",
|
|
1234
|
-
gap: "4",
|
|
1235
|
-
children: [
|
|
1236
|
-
/*#__PURE__*/ L(X, {
|
|
1237
|
-
code: ".r:*",
|
|
1238
|
-
description: c._({ id: "VV1fdg" })
|
|
1239
|
-
}),
|
|
1240
|
-
/*#__PURE__*/ L(X, {
|
|
1241
|
-
code: ".rlistings",
|
|
1242
|
-
description: c._({ id: "s/s1lz" })
|
|
1243
|
-
}),
|
|
1244
|
-
/*#__PURE__*/ L(X, {
|
|
1245
|
-
code: "PROJECT_ID:USER_ID",
|
|
1246
|
-
description: c._({ id: "zhM8FP" })
|
|
1247
|
-
}),
|
|
1248
|
-
/*#__PURE__*/ L(X, {
|
|
1249
|
-
code: "PROJECT_ID:*",
|
|
1250
|
-
description: c._({ id: "BCJPTn" })
|
|
1251
|
-
}),
|
|
1252
|
-
/*#__PURE__*/ L(X, {
|
|
1253
|
-
code: "*:USER_ID",
|
|
1254
|
-
description: c._({ id: "/xnbdQ" })
|
|
1255
|
-
})
|
|
1256
|
-
]
|
|
1257
|
-
}),
|
|
1258
|
-
/*#__PURE__*/ L("p", {
|
|
1259
|
-
className: "text-theme-light mt-4 text-xs",
|
|
1260
|
-
children: /*#__PURE__*/ L(W, {
|
|
1261
|
-
id: "rrjuul",
|
|
1262
|
-
components: { 0: /*#__PURE__*/ L("a", {
|
|
1263
|
-
href: "https://docs.openstack.org/swift/latest/overview_acl.html",
|
|
1264
|
-
target: "_blank",
|
|
1265
|
-
rel: "noopener noreferrer",
|
|
1266
|
-
className: "text-theme-link underline"
|
|
1267
|
-
}) }
|
|
1268
|
-
})
|
|
1269
|
-
})
|
|
1270
|
-
]
|
|
1271
|
-
})]
|
|
1272
|
-
}) }),
|
|
1273
|
-
!E && !D && /*#__PURE__*/ L("p", {
|
|
1274
|
-
className: "text-theme-light mt-4 text-xs",
|
|
1275
|
-
children: /*#__PURE__*/ L(W, { id: "j9lCXl" })
|
|
1276
|
-
})
|
|
1277
|
-
]
|
|
1278
|
-
})]
|
|
1279
|
-
});
|
|
1280
|
-
};
|
|
1281
|
-
function X({ code: e, description: t }) {
|
|
1282
|
-
return /*#__PURE__*/ R("div", { children: [/*#__PURE__*/ L(h, {
|
|
1283
|
-
variant: "info",
|
|
1284
|
-
className: "mb-1 text-xs",
|
|
1285
|
-
children: e
|
|
1286
|
-
}), /*#__PURE__*/ L("p", {
|
|
1287
|
-
className: "text-theme-light text-xs leading-relaxed",
|
|
1288
|
-
children: t
|
|
1289
|
-
})] });
|
|
1290
|
-
}
|
|
1291
|
-
function Z({ label: e }) {
|
|
1292
|
-
return /*#__PURE__*/ R("div", {
|
|
1293
|
-
className: "mb-1 flex items-center gap-1",
|
|
1294
|
-
children: [/*#__PURE__*/ L("label", {
|
|
1295
|
-
className: "text-theme-default text-sm font-semibold",
|
|
1296
|
-
children: e
|
|
1297
|
-
}), /*#__PURE__*/ R(u, {
|
|
1298
|
-
triggerEvent: "hover",
|
|
1299
|
-
children: [/*#__PURE__*/ L(v, { children: /*#__PURE__*/ L(y, {
|
|
1300
|
-
icon: "info",
|
|
1301
|
-
size: "14",
|
|
1302
|
-
className: "text-theme-light cursor-help"
|
|
1303
|
-
}) }), /*#__PURE__*/ L(l, {
|
|
1304
|
-
className: "z-10 max-w-[350px]",
|
|
1305
|
-
children: /*#__PURE__*/ L(W, { id: "AdtLNV" })
|
|
1306
|
-
})]
|
|
1307
|
-
})]
|
|
1308
|
-
});
|
|
1309
|
-
}
|
|
1310
|
-
//#endregion
|
|
1311
|
-
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ContainerTableView.tsx
|
|
1312
|
-
var ye = ({ containers: t, createModalOpen: r, setCreateModalOpen: i, maxContainerNameLength: a, onCreateSuccess: o, onCreateError: c, onEmptySuccess: l, onEmptyError: u, onDeleteSuccess: ee, onDeleteError: d, onPropertiesSuccess: p, onPropertiesError: m, onAclSuccess: h, onAclError: g, selectedContainers: _, setSelectedContainers: v, hasAnyBulkAction: y = !0 }) => {
|
|
1313
|
-
let { projectId: b, provider: S, storageType: C } = ae({ from: "/_auth/projects/$projectId/storage/$provider/$storageType/" }), { i18n: T, _: O } = oe(), k = U(), [A, j] = H(0), [M, te] = H(null), [P, I] = H(null), [z, B] = H(null), [re, ie] = H(null), { ref: se, elementRef: G, height: ue, virtualItems: de, totalSize: fe, measureElement: q } = N({ count: t.length });
|
|
1314
|
-
V(() => {
|
|
1315
|
-
if (G.current) {
|
|
1316
|
-
let e = G.current.offsetWidth - G.current.clientWidth;
|
|
1317
|
-
j(e);
|
|
1318
|
-
}
|
|
1319
|
-
}, [t.length, ue]);
|
|
1320
|
-
let J = (e) => {
|
|
1321
|
-
try {
|
|
1322
|
-
return new Date(e).toLocaleString();
|
|
1323
|
-
} catch {
|
|
1324
|
-
return T._({ id: "fj5byd" });
|
|
1325
|
-
}
|
|
1326
|
-
}, me = (e) => {
|
|
1327
|
-
_.includes(e) ? v(_.filter((t) => t !== e)) : v([..._, e]);
|
|
1328
|
-
};
|
|
1329
|
-
if (!t || t.length === 0) return /*#__PURE__*/ R(ne, { children: [/*#__PURE__*/ L(E, {
|
|
1330
|
-
columns: 4,
|
|
1331
|
-
className: "containers",
|
|
1332
|
-
"data-testid": "no-containers",
|
|
1333
|
-
children: /*#__PURE__*/ L(n, { children: /*#__PURE__*/ L(D, {
|
|
1334
|
-
colSpan: 4,
|
|
1335
|
-
children: /*#__PURE__*/ R("div", {
|
|
1336
|
-
className: "py-8 text-center",
|
|
1337
|
-
children: [/*#__PURE__*/ L("h3", {
|
|
1338
|
-
className: "text-lg font-semibold",
|
|
1339
|
-
children: /*#__PURE__*/ L(W, { id: "Hiw1Ha" })
|
|
1340
|
-
}), /*#__PURE__*/ L("p", {
|
|
1341
|
-
className: "text-theme-light mt-2",
|
|
1342
|
-
children: /*#__PURE__*/ L(W, { id: "x1bK0h" })
|
|
1343
|
-
})]
|
|
1344
|
-
})
|
|
1345
|
-
}) })
|
|
1346
|
-
}), /*#__PURE__*/ L(K, {
|
|
1347
|
-
isOpen: r,
|
|
1348
|
-
onClose: () => i(!1),
|
|
1349
|
-
onSuccess: o,
|
|
1350
|
-
onError: c,
|
|
1351
|
-
maxContainerNameLength: a
|
|
1352
|
-
})] });
|
|
1353
|
-
let he = y ? 6 : 5, ge = y ? "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";
|
|
1354
|
-
return /*#__PURE__*/ R(ne, { children: [
|
|
1355
|
-
/*#__PURE__*/ R("div", {
|
|
1356
|
-
className: "relative",
|
|
1357
|
-
children: [/*#__PURE__*/ L("div", {
|
|
1358
|
-
style: { paddingRight: `${A}px` },
|
|
1359
|
-
children: /*#__PURE__*/ L(E, {
|
|
1360
|
-
columns: he,
|
|
1361
|
-
gridColumnTemplate: ge,
|
|
1362
|
-
className: "containers",
|
|
1363
|
-
"data-testid": "containers-table-header",
|
|
1364
|
-
children: /*#__PURE__*/ R(n, { children: [
|
|
1365
|
-
y && /*#__PURE__*/ L(e, {}),
|
|
1366
|
-
/*#__PURE__*/ L(e, { children: /*#__PURE__*/ L(W, { id: "t0X9+8" }) }),
|
|
1367
|
-
/*#__PURE__*/ L(e, { children: /*#__PURE__*/ L(W, { id: "sxbP3b" }) }),
|
|
1368
|
-
/*#__PURE__*/ L(e, { children: /*#__PURE__*/ L(W, { id: "sjMCOP" }) }),
|
|
1369
|
-
/*#__PURE__*/ L(e, { children: /*#__PURE__*/ L(W, { id: "hgpMHD" }) }),
|
|
1370
|
-
/*#__PURE__*/ L(e, { style: { marginRight: `-${A}px` } })
|
|
1371
|
-
] })
|
|
1372
|
-
})
|
|
1373
|
-
}), /*#__PURE__*/ L("div", {
|
|
1374
|
-
ref: se,
|
|
1375
|
-
className: "overflow-auto",
|
|
1376
|
-
style: { height: `${ue ?? 0}px` },
|
|
1377
|
-
"data-testid": "containers-table-body",
|
|
1378
|
-
children: /*#__PURE__*/ L("div", {
|
|
1379
|
-
style: {
|
|
1380
|
-
height: `${fe}px`,
|
|
1381
|
-
width: "100%",
|
|
1382
|
-
position: "relative"
|
|
1383
|
-
},
|
|
1384
|
-
children: de.map((e) => {
|
|
1385
|
-
let n = t[e.index], r = _.includes(n.name), i = () => k({
|
|
1386
|
-
to: "/projects/$projectId/storage/$provider/$storageType/$containerName/objects",
|
|
1387
|
-
params: {
|
|
1388
|
-
projectId: b,
|
|
1389
|
-
provider: S,
|
|
1390
|
-
storageType: C,
|
|
1391
|
-
containerName: n.name
|
|
1392
|
-
}
|
|
1393
|
-
});
|
|
1394
|
-
return /*#__PURE__*/ R("div", {
|
|
1395
|
-
"data-index": e.index,
|
|
1396
|
-
ref: q,
|
|
1397
|
-
className: "juno-datagrid group hover:bg-theme-background-lvl-1 cursor-pointer",
|
|
1398
|
-
style: {
|
|
1399
|
-
position: "absolute",
|
|
1400
|
-
top: 0,
|
|
1401
|
-
left: 0,
|
|
1402
|
-
width: "100%",
|
|
1403
|
-
transform: `translateY(${e.start}px)`,
|
|
1404
|
-
display: "grid",
|
|
1405
|
-
gridTemplateColumns: ge,
|
|
1406
|
-
alignItems: "stretch"
|
|
1407
|
-
},
|
|
1408
|
-
"data-testid": `container-row-${n.name}`,
|
|
1409
|
-
role: "link",
|
|
1410
|
-
tabIndex: 0,
|
|
1411
|
-
onClick: i,
|
|
1412
|
-
onKeyDown: (e) => {
|
|
1413
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), i());
|
|
1414
|
-
},
|
|
1415
|
-
children: [
|
|
1416
|
-
y && /*#__PURE__*/ L(D, {
|
|
1417
|
-
onClick: (e) => e.stopPropagation(),
|
|
1418
|
-
onKeyDown: (e) => {
|
|
1419
|
-
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
1420
|
-
},
|
|
1421
|
-
children: /*#__PURE__*/ L(w, {
|
|
1422
|
-
checked: r,
|
|
1423
|
-
onChange: () => me(n.name),
|
|
1424
|
-
"data-testid": `select-container-${n.name}`
|
|
1425
|
-
})
|
|
1426
|
-
}),
|
|
1427
|
-
/*#__PURE__*/ L(D, {
|
|
1428
|
-
className: "min-w-0 overflow-hidden",
|
|
1429
|
-
children: /*#__PURE__*/ L("span", {
|
|
1430
|
-
className: "block truncate",
|
|
1431
|
-
title: n.name,
|
|
1432
|
-
children: n.name
|
|
1433
|
-
})
|
|
1434
|
-
}),
|
|
1435
|
-
/*#__PURE__*/ L(D, { children: n.count.toLocaleString() }),
|
|
1436
|
-
/*#__PURE__*/ L(D, { children: n.last_modified ? J(n.last_modified) : T._({ id: "fj5byd" }) }),
|
|
1437
|
-
/*#__PURE__*/ L(D, { children: F(n.bytes) }),
|
|
1438
|
-
/*#__PURE__*/ L(D, {
|
|
1439
|
-
onClick: (e) => e.stopPropagation(),
|
|
1440
|
-
children: /*#__PURE__*/ L(x, { children: /*#__PURE__*/ R(f, { children: [
|
|
1441
|
-
/*#__PURE__*/ L(s, {
|
|
1442
|
-
label: T._({ id: "cWbW6w" }),
|
|
1443
|
-
onClick: () => ie(n),
|
|
1444
|
-
"data-testid": `access-control-action-${n.name}`
|
|
1445
|
-
}),
|
|
1446
|
-
/*#__PURE__*/ L(s, {
|
|
1447
|
-
label: T._({ id: "Oc8Aqv" }),
|
|
1448
|
-
onClick: () => B(n),
|
|
1449
|
-
"data-testid": `properties-action-${n.name}`
|
|
1450
|
-
}),
|
|
1451
|
-
/*#__PURE__*/ L(s, {
|
|
1452
|
-
label: T._({ id: "N2S1rs" }),
|
|
1453
|
-
onClick: () => te(n),
|
|
1454
|
-
"data-testid": `empty-action-${n.name}`
|
|
1455
|
-
}),
|
|
1456
|
-
/*#__PURE__*/ L(s, {
|
|
1457
|
-
label: T._({ id: "cnGeoo" }),
|
|
1458
|
-
onClick: () => I(n),
|
|
1459
|
-
"data-testid": `delete-action-${n.name}`
|
|
1460
|
-
})
|
|
1461
|
-
] }) })
|
|
1462
|
-
})
|
|
1463
|
-
]
|
|
1464
|
-
}, n.name);
|
|
1465
|
-
})
|
|
1466
|
-
})
|
|
1467
|
-
})]
|
|
1468
|
-
}),
|
|
1469
|
-
/*#__PURE__*/ L(K, {
|
|
1470
|
-
isOpen: r,
|
|
1471
|
-
onClose: () => i(!1),
|
|
1472
|
-
onSuccess: o,
|
|
1473
|
-
onError: c,
|
|
1474
|
-
maxContainerNameLength: a
|
|
1475
|
-
}),
|
|
1476
|
-
/*#__PURE__*/ L(ce, {
|
|
1477
|
-
isOpen: M !== null,
|
|
1478
|
-
container: M,
|
|
1479
|
-
onClose: () => te(null),
|
|
1480
|
-
onSuccess: l,
|
|
1481
|
-
onError: u
|
|
1482
|
-
}),
|
|
1483
|
-
/*#__PURE__*/ L(le, {
|
|
1484
|
-
isOpen: P !== null,
|
|
1485
|
-
container: P,
|
|
1486
|
-
onClose: () => I(null),
|
|
1487
|
-
onSuccess: ee,
|
|
1488
|
-
onError: d
|
|
1489
|
-
}),
|
|
1490
|
-
/*#__PURE__*/ L(pe, {
|
|
1491
|
-
isOpen: z !== null,
|
|
1492
|
-
container: z,
|
|
1493
|
-
onClose: () => B(null),
|
|
1494
|
-
onSuccess: p,
|
|
1495
|
-
onError: m
|
|
1496
|
-
}),
|
|
1497
|
-
/*#__PURE__*/ L(ve, {
|
|
1498
|
-
isOpen: re !== null,
|
|
1499
|
-
container: re,
|
|
1500
|
-
onClose: () => ie(null),
|
|
1501
|
-
onSuccess: h,
|
|
1502
|
-
onError: g
|
|
1503
|
-
})
|
|
1504
|
-
] });
|
|
1505
|
-
}, be = (e) => ({
|
|
1506
|
-
message: /*#__PURE__*/ L(W, { id: "6w+VnM" }),
|
|
1507
|
-
description: /*#__PURE__*/ L(W, {
|
|
1508
|
-
id: "XwxJJB",
|
|
1509
|
-
values: { containerName: e }
|
|
1510
|
-
})
|
|
1511
|
-
}), xe = (e, t) => ({
|
|
1512
|
-
message: /*#__PURE__*/ L(W, { id: "Vj8XFg" }),
|
|
1513
|
-
description: /*#__PURE__*/ L(W, {
|
|
1514
|
-
id: "Vz+7ZA",
|
|
1515
|
-
values: {
|
|
1516
|
-
containerName: e,
|
|
1517
|
-
errorMessage: t
|
|
1518
|
-
}
|
|
1519
|
-
})
|
|
1520
|
-
}), Se = (e, t) => ({
|
|
1521
|
-
message: /*#__PURE__*/ L(W, { id: "6OopEX" }),
|
|
1522
|
-
description: t === 0 ? /*#__PURE__*/ L(W, {
|
|
1523
|
-
id: "nkpZyk",
|
|
1524
|
-
values: { containerName: e }
|
|
1525
|
-
}) : t === 1 ? /*#__PURE__*/ L(W, {
|
|
1526
|
-
id: "TZJiVf",
|
|
1527
|
-
values: {
|
|
1528
|
-
containerName: e,
|
|
1529
|
-
deletedCount: t
|
|
1530
|
-
}
|
|
1531
|
-
}) : /*#__PURE__*/ L(W, {
|
|
1532
|
-
id: "Sb/VT5",
|
|
1533
|
-
values: {
|
|
1534
|
-
containerName: e,
|
|
1535
|
-
deletedCount: t
|
|
1536
|
-
}
|
|
1537
|
-
})
|
|
1538
|
-
}), Ce = (e, t) => ({
|
|
1539
|
-
message: /*#__PURE__*/ L(W, { id: "S8/j2h" }),
|
|
1540
|
-
description: /*#__PURE__*/ L(W, {
|
|
1541
|
-
id: "1rLu3+",
|
|
1542
|
-
values: {
|
|
1543
|
-
containerName: e,
|
|
1544
|
-
errorMessage: t
|
|
1545
|
-
}
|
|
1546
|
-
})
|
|
1547
|
-
}), we = (e) => ({
|
|
1548
|
-
message: /*#__PURE__*/ L(W, { id: "odVI9Y" }),
|
|
1549
|
-
description: /*#__PURE__*/ L(W, {
|
|
1550
|
-
id: "V1TzeS",
|
|
1551
|
-
values: { containerName: e }
|
|
1552
|
-
})
|
|
1553
|
-
}), Te = (e, t) => ({
|
|
1554
|
-
message: /*#__PURE__*/ L(W, { id: "BJt+PJ" }),
|
|
1555
|
-
description: /*#__PURE__*/ L(W, {
|
|
1556
|
-
id: "RGrgxg",
|
|
1557
|
-
values: {
|
|
1558
|
-
containerName: e,
|
|
1559
|
-
errorMessage: t
|
|
1560
|
-
}
|
|
1561
|
-
})
|
|
1562
|
-
}), Ee = (e) => ({
|
|
1563
|
-
message: /*#__PURE__*/ L(W, { id: "a7C4YS" }),
|
|
1564
|
-
description: /*#__PURE__*/ L(W, {
|
|
1565
|
-
id: "/NeNjH",
|
|
1566
|
-
values: { containerName: e }
|
|
1567
|
-
})
|
|
1568
|
-
}), De = (e, t) => ({
|
|
1569
|
-
message: /*#__PURE__*/ L(W, { id: "5MF8U2" }),
|
|
1570
|
-
description: /*#__PURE__*/ L(W, {
|
|
1571
|
-
id: "uLtFAr",
|
|
1572
|
-
values: {
|
|
1573
|
-
containerName: e,
|
|
1574
|
-
errorMessage: t
|
|
1575
|
-
}
|
|
1576
|
-
})
|
|
1577
|
-
}), Oe = (e) => ({
|
|
1578
|
-
message: /*#__PURE__*/ L(W, { id: "olfSYj" }),
|
|
1579
|
-
description: /*#__PURE__*/ L(W, {
|
|
1580
|
-
id: "tM5SEI",
|
|
1581
|
-
values: { containerName: e }
|
|
1582
|
-
})
|
|
1583
|
-
}), ke = (e, t) => ({
|
|
1584
|
-
message: /*#__PURE__*/ L(W, { id: "p7DzCB" }),
|
|
1585
|
-
description: /*#__PURE__*/ L(W, {
|
|
1586
|
-
id: "DcMIiu",
|
|
1587
|
-
values: {
|
|
1588
|
-
containerName: e,
|
|
1589
|
-
errorMessage: t
|
|
1590
|
-
}
|
|
1591
|
-
})
|
|
1592
|
-
}), Ae = (e, t, n) => {
|
|
1593
|
-
let r = n.length > 0, i = e > 0, a = r && i;
|
|
1594
|
-
return {
|
|
1595
|
-
severity: a ? "warning" : r ? "error" : "success",
|
|
1596
|
-
message: a ? /*#__PURE__*/ L(W, { id: "q44uUq" }) : r ? /*#__PURE__*/ L(W, { id: "wFaT8w" }) : /*#__PURE__*/ L(W, { id: "0WsqO0" }),
|
|
1597
|
-
description: /*#__PURE__*/ R(d, {
|
|
1598
|
-
direction: "vertical",
|
|
1599
|
-
gap: "1",
|
|
1600
|
-
children: [i && /*#__PURE__*/ L("span", { children: /*#__PURE__*/ L(W, {
|
|
1601
|
-
id: "1NS3nd",
|
|
1602
|
-
values: {
|
|
1603
|
-
emptiedCount: e,
|
|
1604
|
-
totalDeleted: t
|
|
1605
|
-
}
|
|
1606
|
-
}) }), r && /*#__PURE__*/ L("span", {
|
|
1607
|
-
className: "whitespace-pre-line",
|
|
1608
|
-
children: (() => {
|
|
1609
|
-
let e = n.join("\n");
|
|
1610
|
-
return /*#__PURE__*/ L(W, {
|
|
1611
|
-
id: "JrmKyf",
|
|
1612
|
-
values: { errorDetails: e }
|
|
1613
|
-
});
|
|
1614
|
-
})()
|
|
1615
|
-
})]
|
|
1616
|
-
})
|
|
1617
|
-
};
|
|
1618
|
-
}, Q = ({ label: e, value: t }) => t == null ? null : /*#__PURE__*/ R("span", {
|
|
1619
|
-
className: "flex items-start gap-1.5",
|
|
1620
|
-
children: [/*#__PURE__*/ L(y, {
|
|
1621
|
-
icon: "check",
|
|
1622
|
-
size: "16px",
|
|
1623
|
-
className: "text-theme-success mt-0.5 shrink-0"
|
|
1624
|
-
}), /*#__PURE__*/ R("span", { children: [
|
|
1625
|
-
/*#__PURE__*/ R("span", {
|
|
1626
|
-
className: "font-medium",
|
|
1627
|
-
children: [e, ":"]
|
|
1628
|
-
}),
|
|
1629
|
-
" ",
|
|
1630
|
-
t
|
|
1631
|
-
] })]
|
|
1632
|
-
}), je = ({ label: e }) => /*#__PURE__*/ R("span", {
|
|
1633
|
-
className: "flex items-start gap-1.5",
|
|
1634
|
-
children: [/*#__PURE__*/ L(y, {
|
|
1635
|
-
icon: "check",
|
|
1636
|
-
size: "16px",
|
|
1637
|
-
className: "text-theme-success mt-0.5 shrink-0"
|
|
1638
|
-
}), /*#__PURE__*/ L("span", { children: e })]
|
|
1639
|
-
}), Me = ({ title: e, children: t }) => /*#__PURE__*/ R("span", {
|
|
1640
|
-
className: "flex flex-col gap-1.5",
|
|
1641
|
-
children: [/*#__PURE__*/ L("span", {
|
|
1642
|
-
className: "text-theme-default block font-semibold",
|
|
1643
|
-
children: e
|
|
1644
|
-
}), t]
|
|
1645
|
-
}), Ne = ({ serviceInfo: e, accountInfo: t, open: n }) => {
|
|
1646
|
-
let { i18n: r, _: i } = oe(), a = e?.swift, o = {
|
|
1647
|
-
account_quotas: r._({ id: "DJT9tB" }),
|
|
1648
|
-
container_quotas: r._({ id: "USiuNX" }),
|
|
1649
|
-
bulk_delete: r._({ id: "F6YIQe" }),
|
|
1650
|
-
bulk_upload: r._({ id: "2Inn83" }),
|
|
1651
|
-
slo: r._({ id: "cpw++p" }),
|
|
1652
|
-
container_sync: r._({ id: "ezT9KW" }),
|
|
1653
|
-
tempurl: r._({ id: "UO3hJ2" }),
|
|
1654
|
-
symlink: r._({ id: "Q2xmVl" }),
|
|
1655
|
-
versioned_writes: r._({ id: "8jLXs3" })
|
|
1656
|
-
}, s = Object.entries(o).filter(([e]) => a?.[e]).map(([, e]) => e);
|
|
1657
|
-
return /*#__PURE__*/ R(u, {
|
|
1658
|
-
triggerEvent: "hover",
|
|
1659
|
-
placement: "bottom-end",
|
|
1660
|
-
open: n,
|
|
1661
|
-
children: [/*#__PURE__*/ L(v, { children: /*#__PURE__*/ L("span", { children: /*#__PURE__*/ L(y, {
|
|
1662
|
-
icon: "info",
|
|
1663
|
-
size: "20px",
|
|
1664
|
-
className: "text-theme-light hover:text-theme-default cursor-pointer"
|
|
1665
|
-
}) }) }), /*#__PURE__*/ L(l, {
|
|
1666
|
-
className: "z-10 w-72 text-sm",
|
|
1667
|
-
children: /*#__PURE__*/ R("span", {
|
|
1668
|
-
className: "flex flex-col gap-3 p-1",
|
|
1669
|
-
children: [
|
|
1670
|
-
t && /*#__PURE__*/ R(Me, {
|
|
1671
|
-
title: /*#__PURE__*/ L(W, { id: "AeXO77" }),
|
|
1672
|
-
children: [
|
|
1673
|
-
/*#__PURE__*/ L(Q, {
|
|
1674
|
-
label: r._({ id: "ClGcRq" }),
|
|
1675
|
-
value: t.containerCount.toLocaleString()
|
|
1676
|
-
}),
|
|
1677
|
-
/*#__PURE__*/ L(Q, {
|
|
1678
|
-
label: r._({ id: "B3toQF" }),
|
|
1679
|
-
value: t.objectCount.toLocaleString()
|
|
1680
|
-
}),
|
|
1681
|
-
/*#__PURE__*/ L(Q, {
|
|
1682
|
-
label: r._({ id: "aL1w5Z" }),
|
|
1683
|
-
value: F(t.bytesUsed)
|
|
1684
|
-
}),
|
|
1685
|
-
t.quotaBytes !== void 0 && /*#__PURE__*/ L(Q, {
|
|
1686
|
-
label: r._({ id: "vEkTR9" }),
|
|
1687
|
-
value: F(t.quotaBytes)
|
|
1688
|
-
})
|
|
1689
|
-
]
|
|
1690
|
-
}),
|
|
1691
|
-
a && /*#__PURE__*/ R(Me, {
|
|
1692
|
-
title: /*#__PURE__*/ L(W, { id: "6BDqha" }),
|
|
1693
|
-
children: [
|
|
1694
|
-
/*#__PURE__*/ L(Q, {
|
|
1695
|
-
label: r._({ id: "wTg+FY" }),
|
|
1696
|
-
value: a.max_file_size === void 0 ? void 0 : F(a.max_file_size)
|
|
1697
|
-
}),
|
|
1698
|
-
/*#__PURE__*/ L(Q, {
|
|
1699
|
-
label: r._({ id: "Rih53k" }),
|
|
1700
|
-
value: a.max_container_name_length
|
|
1701
|
-
}),
|
|
1702
|
-
/*#__PURE__*/ L(Q, {
|
|
1703
|
-
label: r._({ id: "qAkkjP" }),
|
|
1704
|
-
value: a.max_object_name_length
|
|
1705
|
-
}),
|
|
1706
|
-
/*#__PURE__*/ L(Q, {
|
|
1707
|
-
label: r._({ id: "OZImTR" }),
|
|
1708
|
-
value: a.container_listing_limit?.toLocaleString()
|
|
1709
|
-
}),
|
|
1710
|
-
/*#__PURE__*/ L(Q, {
|
|
1711
|
-
label: r._({ id: "a4A2uB" }),
|
|
1712
|
-
value: a.account_listing_limit?.toLocaleString()
|
|
1713
|
-
}),
|
|
1714
|
-
/*#__PURE__*/ L(Q, {
|
|
1715
|
-
label: r._({ id: "zWb/Nn" }),
|
|
1716
|
-
value: a.max_header_size
|
|
1717
|
-
}),
|
|
1718
|
-
/*#__PURE__*/ L(Q, {
|
|
1719
|
-
label: r._({ id: "RGwfoL" }),
|
|
1720
|
-
value: a.max_meta_count
|
|
1721
|
-
}),
|
|
1722
|
-
/*#__PURE__*/ L(Q, {
|
|
1723
|
-
label: r._({ id: "8c3/77" }),
|
|
1724
|
-
value: a.max_meta_name_length
|
|
1725
|
-
}),
|
|
1726
|
-
/*#__PURE__*/ L(Q, {
|
|
1727
|
-
label: r._({ id: "5JDSvn" }),
|
|
1728
|
-
value: a.max_meta_value_length
|
|
1729
|
-
}),
|
|
1730
|
-
/*#__PURE__*/ L(Q, {
|
|
1731
|
-
label: r._({ id: "ZAx+d1" }),
|
|
1732
|
-
value: a.max_meta_overall_size
|
|
1733
|
-
}),
|
|
1734
|
-
a.bulk_delete && /*#__PURE__*/ L(Q, {
|
|
1735
|
-
label: r._({ id: "lQ3EIe" }),
|
|
1736
|
-
value: a.bulk_delete.max_deletes_per_request.toLocaleString()
|
|
1737
|
-
}),
|
|
1738
|
-
a.bulk_upload && /*#__PURE__*/ L(Q, {
|
|
1739
|
-
label: r._({ id: "STc+7E" }),
|
|
1740
|
-
value: a.bulk_upload.max_containers_per_extraction.toLocaleString()
|
|
1741
|
-
}),
|
|
1742
|
-
a.slo && /*#__PURE__*/ L(Q, {
|
|
1743
|
-
label: r._({ id: "RNBvdl" }),
|
|
1744
|
-
value: a.slo.max_manifest_segments.toLocaleString()
|
|
1745
|
-
})
|
|
1746
|
-
]
|
|
1747
|
-
}),
|
|
1748
|
-
s.length > 0 && /*#__PURE__*/ L(Me, {
|
|
1749
|
-
title: /*#__PURE__*/ L(W, { id: "Qx7DM7" }),
|
|
1750
|
-
children: s.map((e) => /*#__PURE__*/ L(je, { label: e }, e))
|
|
1751
|
-
})
|
|
1752
|
-
]
|
|
1753
|
-
})
|
|
1754
|
-
})]
|
|
1755
|
-
});
|
|
1756
|
-
}, Pe = 20, Fe = "empty", Ie = ({ isOpen: e, containers: n, onClose: a, onComplete: o }) => {
|
|
1757
|
-
let { i18n: s, i18n: c, _: l } = oe(), u = te(), [f, p] = H(null), [m, h] = H(""), _ = m.trim() === Fe, v = A.useUtils(), y = A.storage.swift.emptyContainer.useMutation(), x = () => {
|
|
1758
|
-
y.reset(), p(null), h(""), a();
|
|
1759
|
-
}, S = async () => {
|
|
1760
|
-
let e = 0, t = 0, r = [], i = n.length;
|
|
1761
|
-
for (let a = 0; a < n.length; a++) {
|
|
1762
|
-
p({
|
|
1763
|
-
current: a + 1,
|
|
1764
|
-
total: i
|
|
1765
|
-
});
|
|
1766
|
-
let o = n[a];
|
|
1767
|
-
try {
|
|
1768
|
-
let n = await y.mutateAsync({
|
|
1769
|
-
project_id: u,
|
|
1770
|
-
container: o.name
|
|
1771
|
-
});
|
|
1772
|
-
t += n, e++;
|
|
1773
|
-
} catch (e) {
|
|
1774
|
-
let t = e instanceof Error ? e.message : String(e);
|
|
1775
|
-
r.push(`${o.name}: ${t}`);
|
|
1776
|
-
}
|
|
1777
|
-
}
|
|
1778
|
-
e > 0 && await v.storage.swift.listContainers.invalidate(), o?.({
|
|
1779
|
-
emptiedCount: e,
|
|
1780
|
-
totalDeleted: t,
|
|
1781
|
-
errors: r
|
|
1782
|
-
}), x();
|
|
1783
|
-
};
|
|
1784
|
-
if (!e || n.length === 0) return null;
|
|
1785
|
-
let w = n.length, T = n.slice(0, Pe), E = w - T.length, D = y.isPending || f !== null, O = f?.current, k = f?.total;
|
|
1786
|
-
return /*#__PURE__*/ L(ee, {
|
|
1787
|
-
title: /*#__PURE__*/ L(W, {
|
|
1788
|
-
id: "0efWir",
|
|
1789
|
-
values: { totalCount: w }
|
|
1790
|
-
}),
|
|
1791
|
-
open: e,
|
|
1792
|
-
onCancel: x,
|
|
1793
|
-
confirmButtonLabel: D ? s._({ id: "s4Vnq2" }) : s._({ id: "N2S1rs" }),
|
|
1794
|
-
confirmButtonVariant: "primary-danger",
|
|
1795
|
-
cancelButtonLabel: s._({ id: "dEgA5A" }),
|
|
1796
|
-
onConfirm: S,
|
|
1797
|
-
disableConfirmButton: D || !_,
|
|
1798
|
-
disableCancelButton: D,
|
|
1799
|
-
disableCloseButton: D,
|
|
1800
|
-
size: "small",
|
|
1801
|
-
children: D ? /*#__PURE__*/ R(d, {
|
|
1802
|
-
direction: "vertical",
|
|
1803
|
-
distribution: "center",
|
|
1804
|
-
alignment: "center",
|
|
1805
|
-
gap: "2",
|
|
1806
|
-
className: "py-4",
|
|
1807
|
-
children: [/*#__PURE__*/ L(r, { variant: "primary" }), f && /*#__PURE__*/ L("p", {
|
|
1808
|
-
className: "text-theme-light text-sm",
|
|
1809
|
-
children: /*#__PURE__*/ L(W, {
|
|
1810
|
-
id: "7NSdfG",
|
|
1811
|
-
values: {
|
|
1812
|
-
progressCurrent: O,
|
|
1813
|
-
progressTotal: k
|
|
1814
|
-
}
|
|
1815
|
-
})
|
|
1816
|
-
})]
|
|
1817
|
-
}) : /*#__PURE__*/ R("div", {
|
|
1818
|
-
className: "my-6",
|
|
1819
|
-
children: [
|
|
1820
|
-
/*#__PURE__*/ L(i, {
|
|
1821
|
-
variant: "danger",
|
|
1822
|
-
className: "mb-6",
|
|
1823
|
-
children: /*#__PURE__*/ L(W, { id: "JuOpPY" })
|
|
1824
|
-
}),
|
|
1825
|
-
/*#__PURE__*/ L("p", {
|
|
1826
|
-
className: "text-theme-default mb-6 text-sm",
|
|
1827
|
-
children: /*#__PURE__*/ L(W, {
|
|
1828
|
-
id: "XXjbEV",
|
|
1829
|
-
components: {
|
|
1830
|
-
0: /*#__PURE__*/ L("strong", {}),
|
|
1831
|
-
1: /*#__PURE__*/ L("strong", {})
|
|
1832
|
-
}
|
|
1833
|
-
})
|
|
1834
|
-
}),
|
|
1835
|
-
/*#__PURE__*/ R("div", {
|
|
1836
|
-
className: "mb-6",
|
|
1837
|
-
children: [/*#__PURE__*/ L("h3", {
|
|
1838
|
-
className: "jn:text-theme-high mb-3 font-semibold",
|
|
1839
|
-
children: /*#__PURE__*/ L(W, {
|
|
1840
|
-
id: "VKmlZ+",
|
|
1841
|
-
values: { totalCount: w }
|
|
1842
|
-
})
|
|
1843
|
-
}), /*#__PURE__*/ R("div", {
|
|
1844
|
-
className: "jn:bg-theme-background-lvl-1 max-h-48 overflow-y-auto rounded p-4",
|
|
1845
|
-
children: [/*#__PURE__*/ L(g, {
|
|
1846
|
-
className: "grid-cols-2",
|
|
1847
|
-
alignTerms: "left",
|
|
1848
|
-
children: T.map((e) => {
|
|
1849
|
-
let n = e.count;
|
|
1850
|
-
return /*#__PURE__*/ R(z, { children: [/*#__PURE__*/ L(C, {
|
|
1851
|
-
className: "col-span-1",
|
|
1852
|
-
children: /*#__PURE__*/ L("span", {
|
|
1853
|
-
className: "block truncate",
|
|
1854
|
-
title: e.name,
|
|
1855
|
-
children: e.name
|
|
1856
|
-
})
|
|
1857
|
-
}), /*#__PURE__*/ L(t, {
|
|
1858
|
-
className: "col-span-1",
|
|
1859
|
-
children: /*#__PURE__*/ L("span", {
|
|
1860
|
-
className: "whitespace-nowrap",
|
|
1861
|
-
children: n == null ? "" : c._(s._({
|
|
1862
|
-
id: "7Ocn0b",
|
|
1863
|
-
values: { count: n }
|
|
1864
|
-
}))
|
|
1865
|
-
})
|
|
1866
|
-
})] }, e.name);
|
|
1867
|
-
})
|
|
1868
|
-
}), E > 0 && /*#__PURE__*/ L("p", {
|
|
1869
|
-
className: "text-theme-light mt-2 text-xs",
|
|
1870
|
-
children: /*#__PURE__*/ L(W, {
|
|
1871
|
-
id: "yqPflB",
|
|
1872
|
-
values: { hiddenCount: E }
|
|
1873
|
-
})
|
|
1874
|
-
})]
|
|
1875
|
-
})]
|
|
1876
|
-
}),
|
|
1877
|
-
/*#__PURE__*/ L(b, {
|
|
1878
|
-
label: s._({ id: "Ghp863" }),
|
|
1879
|
-
placeholder: Fe,
|
|
1880
|
-
value: m,
|
|
1881
|
-
onChange: (e) => h(e.target.value)
|
|
1882
|
-
})
|
|
1883
|
-
]
|
|
1884
|
-
})
|
|
1885
|
-
});
|
|
1886
|
-
}, Le = () => {
|
|
1887
|
-
let { i18n: e, i18n: t, _: n } = oe(), i = te(), a = U({ from: j.fullPath }), { sortBy: o, sortDirection: c, search: l = "" } = j.useSearch(), [u, ee] = H(!1), [h, g] = H(!1), [_, v] = H([]), [y, b] = H(l), C = ie(void 0);
|
|
1888
|
-
V(() => () => clearTimeout(C.current), []), V(() => {
|
|
1889
|
-
b(l);
|
|
1890
|
-
}, [l]);
|
|
1891
|
-
let T = (e) => {
|
|
1892
|
-
let { message: t, ...n } = be(e);
|
|
1893
|
-
m.success(t, n);
|
|
1894
|
-
}, E = (e, t) => {
|
|
1895
|
-
let { message: n, ...r } = xe(e, t);
|
|
1896
|
-
m.error(n, r);
|
|
1897
|
-
}, D = (e, t) => {
|
|
1898
|
-
let { message: n, ...r } = Se(e, t);
|
|
1899
|
-
m.success(n, r);
|
|
1900
|
-
}, M = (e, t) => {
|
|
1901
|
-
let { message: n, ...r } = Ce(e, t);
|
|
1902
|
-
m.error(n, r);
|
|
1903
|
-
}, N = (e) => {
|
|
1904
|
-
let { message: t, ...n } = we(e);
|
|
1905
|
-
m.success(t, n);
|
|
1906
|
-
}, I = (e, t) => {
|
|
1907
|
-
let { message: n, ...r } = Te(e, t);
|
|
1908
|
-
m.error(n, r);
|
|
1909
|
-
}, z = (e) => {
|
|
1910
|
-
let { message: t, ...n } = Ee(e);
|
|
1911
|
-
m.success(t, n);
|
|
1912
|
-
}, re = (e, t) => {
|
|
1913
|
-
let { message: n, ...r } = De(e, t);
|
|
1914
|
-
m.error(n, r);
|
|
1915
|
-
}, ae = (e) => {
|
|
1916
|
-
let { message: t, ...n } = Oe(e);
|
|
1917
|
-
m.success(t, n);
|
|
1918
|
-
}, se = (e, t) => {
|
|
1919
|
-
let { message: n, ...r } = ke(e, t);
|
|
1920
|
-
m.error(n, r);
|
|
1921
|
-
}, G = ({ emptiedCount: e, totalDeleted: t, errors: n }) => {
|
|
1922
|
-
if (n.length === 0) v([]);
|
|
1923
|
-
else {
|
|
1924
|
-
let e = new Set(n.map((e) => e.split(": ")[0]));
|
|
1925
|
-
v((t) => t.filter((t) => e.has(t)));
|
|
1926
|
-
}
|
|
1927
|
-
let { message: r, severity: i, ...a } = Ae(e, t, n);
|
|
1928
|
-
m[i](r, a);
|
|
1929
|
-
}, K = {
|
|
1930
|
-
options: [
|
|
1931
|
-
{
|
|
1932
|
-
label: e._({ id: "6YtxFj" }),
|
|
1933
|
-
value: "name"
|
|
1934
|
-
},
|
|
1935
|
-
{
|
|
1936
|
-
label: e._({ id: "sxbP3b" }),
|
|
1937
|
-
value: "count"
|
|
1938
|
-
},
|
|
1939
|
-
{
|
|
1940
|
-
label: e._({ id: "hgpMHD" }),
|
|
1941
|
-
value: "bytes"
|
|
1942
|
-
},
|
|
1943
|
-
{
|
|
1944
|
-
label: e._({ id: "sjMCOP" }),
|
|
1945
|
-
value: "last_modified"
|
|
1946
|
-
}
|
|
1947
|
-
],
|
|
1948
|
-
sortBy: o ?? "name",
|
|
1949
|
-
sortDirection: c ?? "asc"
|
|
1950
|
-
}, { data: ce, isLoading: le, error: ue } = A.storage.swift.listContainers.useQuery({
|
|
1951
|
-
project_id: i,
|
|
1952
|
-
format: "json"
|
|
1953
|
-
}), { data: de } = A.storage.swift.getAccountMetadata.useQuery({ project_id: i }), { data: fe } = A.storage.swift.getServiceInfo.useQuery(), pe = (e) => [...e].sort((e, t) => {
|
|
1954
|
-
let n;
|
|
1955
|
-
switch (o ?? "name") {
|
|
1956
|
-
case "name":
|
|
1957
|
-
n = e.name.localeCompare(t.name);
|
|
1958
|
-
break;
|
|
1959
|
-
case "count":
|
|
1960
|
-
n = e.count - t.count;
|
|
1961
|
-
break;
|
|
1962
|
-
case "bytes":
|
|
1963
|
-
n = e.bytes - t.bytes;
|
|
1964
|
-
break;
|
|
1965
|
-
case "last_modified":
|
|
1966
|
-
if (!e.last_modified || !t.last_modified) return e.last_modified ? -1 : 1;
|
|
1967
|
-
n = new Date(e.last_modified).getTime() - new Date(t.last_modified).getTime();
|
|
1968
|
-
break;
|
|
1969
|
-
default: n = e.name.localeCompare(t.name);
|
|
1970
|
-
}
|
|
1971
|
-
return (c ?? "asc") === "desc" ? -n : n;
|
|
1972
|
-
}), q = (ce || []).filter((e) => e.name.toLowerCase().includes(l.toLowerCase())), J = pe(q), me = (e) => {
|
|
1973
|
-
let t = typeof e == "string" ? e : "";
|
|
1974
|
-
B(() => {
|
|
1975
|
-
a({ search: (e) => ({
|
|
1976
|
-
...e,
|
|
1977
|
-
search: t || void 0
|
|
1978
|
-
}) });
|
|
1979
|
-
});
|
|
1980
|
-
}, he = (e) => {
|
|
1981
|
-
let t = e.sortBy?.toString() || "name", n = e.sortDirection || "asc";
|
|
1982
|
-
B(() => {
|
|
1983
|
-
a({ search: (e) => ({
|
|
1984
|
-
...e,
|
|
1985
|
-
sortBy: t,
|
|
1986
|
-
sortDirection: n
|
|
1987
|
-
}) });
|
|
1988
|
-
});
|
|
1989
|
-
};
|
|
1990
|
-
if (le) return /*#__PURE__*/ R(d, {
|
|
1991
|
-
className: "absolute inset-0",
|
|
1992
|
-
distribution: "center",
|
|
1993
|
-
alignment: "center",
|
|
1994
|
-
direction: "vertical",
|
|
1995
|
-
children: [/*#__PURE__*/ L(r, {
|
|
1996
|
-
variant: "primary",
|
|
1997
|
-
size: "large",
|
|
1998
|
-
className: "mb-2"
|
|
1999
|
-
}), /*#__PURE__*/ L(W, { id: "WYiUDa" })]
|
|
2000
|
-
});
|
|
2001
|
-
if (ue) {
|
|
2002
|
-
let e = ue.message;
|
|
2003
|
-
return /*#__PURE__*/ L(d, {
|
|
2004
|
-
className: "absolute inset-0",
|
|
2005
|
-
distribution: "center",
|
|
2006
|
-
alignment: "center",
|
|
2007
|
-
direction: "vertical",
|
|
2008
|
-
children: /*#__PURE__*/ L(W, {
|
|
2009
|
-
id: "dLFiER",
|
|
2010
|
-
values: { errorMessage: e }
|
|
2011
|
-
})
|
|
2012
|
-
});
|
|
2013
|
-
}
|
|
2014
|
-
let ge = de?.bytesUsed || 0, _e = de?.quotaBytes || 0, Y = _e > 0 ? _e - ge : 0, ve = (ce || []).filter((e) => _.includes(e.name)), X = ve.length > 0, Z = ve.length, Q = (ce || []).length, je = q.length, Me = je !== Q, Pe = J.map((e) => e.name), Fe = Pe.length > 0 && Pe.every((e) => _.includes(e)), Le = Pe.some((e) => _.includes(e));
|
|
2015
|
-
return /*#__PURE__*/ R("div", {
|
|
2016
|
-
className: "relative",
|
|
2017
|
-
children: [
|
|
2018
|
-
/*#__PURE__*/ R(d, {
|
|
2019
|
-
direction: "vertical",
|
|
2020
|
-
children: [
|
|
2021
|
-
/*#__PURE__*/ R(d, {
|
|
2022
|
-
distribution: "end",
|
|
2023
|
-
alignment: "center",
|
|
2024
|
-
gap: "2",
|
|
2025
|
-
className: "pb-2",
|
|
2026
|
-
children: [/*#__PURE__*/ L(d, {
|
|
2027
|
-
gap: "0.5",
|
|
2028
|
-
alignment: "center",
|
|
2029
|
-
children: /*#__PURE__*/ L(P, {
|
|
2030
|
-
options: K.options,
|
|
2031
|
-
sortBy: K.sortBy,
|
|
2032
|
-
sortDirection: K.sortDirection ?? "asc",
|
|
2033
|
-
selectClassName: "min-w-40",
|
|
2034
|
-
onSortByChange: (e) => he({
|
|
2035
|
-
...K,
|
|
2036
|
-
sortBy: e,
|
|
2037
|
-
sortDirection: K.sortDirection
|
|
2038
|
-
}),
|
|
2039
|
-
onSortDirectionChange: (e) => he({
|
|
2040
|
-
...K,
|
|
2041
|
-
sortDirection: e
|
|
2042
|
-
})
|
|
2043
|
-
})
|
|
2044
|
-
}), /*#__PURE__*/ L(p, {
|
|
2045
|
-
variant: "primary",
|
|
2046
|
-
className: "whitespace-nowrap",
|
|
2047
|
-
onClick: () => ee(!0),
|
|
2048
|
-
children: /*#__PURE__*/ L(W, { id: "vTh35P" })
|
|
2049
|
-
})]
|
|
2050
|
-
}),
|
|
2051
|
-
/*#__PURE__*/ L(O, { children: /*#__PURE__*/ L(d, {
|
|
2052
|
-
direction: "vertical",
|
|
2053
|
-
gap: "2",
|
|
2054
|
-
children: /*#__PURE__*/ L(d, {
|
|
2055
|
-
distribution: "end",
|
|
2056
|
-
alignment: "center",
|
|
2057
|
-
children: /*#__PURE__*/ L(k, {
|
|
2058
|
-
placeholder: e._({ id: "TipzDp" }),
|
|
2059
|
-
"data-testid": "searchbar",
|
|
2060
|
-
value: y,
|
|
2061
|
-
onInput: (e) => {
|
|
2062
|
-
let t = e.currentTarget.value;
|
|
2063
|
-
b(t), clearTimeout(C.current), C.current = window.setTimeout(() => me(t), 500);
|
|
2064
|
-
},
|
|
2065
|
-
onSearch: (e) => {
|
|
2066
|
-
clearTimeout(C.current), me(typeof e == "string" ? e : "");
|
|
2067
|
-
},
|
|
2068
|
-
onClear: () => {
|
|
2069
|
-
clearTimeout(C.current), b(""), me("");
|
|
2070
|
-
}
|
|
2071
|
-
})
|
|
2072
|
-
})
|
|
2073
|
-
}) }),
|
|
2074
|
-
/*#__PURE__*/ L(O, { children: /*#__PURE__*/ R(d, {
|
|
2075
|
-
distribution: "start",
|
|
2076
|
-
gap: "2",
|
|
2077
|
-
alignment: "center",
|
|
2078
|
-
className: "text-sm",
|
|
2079
|
-
children: [/*#__PURE__*/ R(d, {
|
|
2080
|
-
gap: "2",
|
|
2081
|
-
alignment: "center",
|
|
2082
|
-
children: [/*#__PURE__*/ L(w, {
|
|
2083
|
-
checked: Fe,
|
|
2084
|
-
indeterminate: Le && !Fe,
|
|
2085
|
-
onChange: () => {
|
|
2086
|
-
v(Fe ? (e) => e.filter((e) => !Pe.includes(e)) : (e) => [.../* @__PURE__ */ new Set([...e, ...Pe])]);
|
|
2087
|
-
}
|
|
2088
|
-
}), /*#__PURE__*/ R(x, {
|
|
2089
|
-
className: "flex items-center",
|
|
2090
|
-
children: [/*#__PURE__*/ L(S, {
|
|
2091
|
-
as: "div",
|
|
2092
|
-
children: /*#__PURE__*/ L(p, {
|
|
2093
|
-
disabled: !X,
|
|
2094
|
-
size: "small",
|
|
2095
|
-
icon: "moreVert",
|
|
2096
|
-
label: e._({ id: "7L01XJ" })
|
|
2097
|
-
})
|
|
2098
|
-
}), X && /*#__PURE__*/ L(f, { children: /*#__PURE__*/ L(s, {
|
|
2099
|
-
disabled: !X,
|
|
2100
|
-
label: t._(e._({
|
|
2101
|
-
id: "0Th0CH",
|
|
2102
|
-
values: { selectedCount: Z }
|
|
2103
|
-
})),
|
|
2104
|
-
onClick: () => g(!0)
|
|
2105
|
-
}) })]
|
|
2106
|
-
})]
|
|
2107
|
-
}), /*#__PURE__*/ R("div", {
|
|
2108
|
-
className: "text-theme-light ml-auto flex items-center gap-1",
|
|
2109
|
-
"data-testid": "containers-info-block",
|
|
2110
|
-
children: [
|
|
2111
|
-
Me ? /*#__PURE__*/ L(W, {
|
|
2112
|
-
id: "8uPTwT",
|
|
2113
|
-
values: {
|
|
2114
|
-
filteredCount: je,
|
|
2115
|
-
totalCount: Q
|
|
2116
|
-
}
|
|
2117
|
-
}) : /*#__PURE__*/ L(W, {
|
|
2118
|
-
id: "ywe1H/",
|
|
2119
|
-
values: { totalCount: Q }
|
|
2120
|
-
}),
|
|
2121
|
-
_e > 0 && /*#__PURE__*/ R(ne, { children: [/*#__PURE__*/ L("span", { children: "," }), /*#__PURE__*/ R("span", { children: [
|
|
2122
|
-
/*#__PURE__*/ L(W, { id: "kKK8AH" }),
|
|
2123
|
-
" ",
|
|
2124
|
-
/*#__PURE__*/ L("span", {
|
|
2125
|
-
className: "text-theme-default font-semibold",
|
|
2126
|
-
children: F(Y)
|
|
2127
|
-
})
|
|
2128
|
-
] })] }),
|
|
2129
|
-
/*#__PURE__*/ L(Ne, {
|
|
2130
|
-
serviceInfo: fe,
|
|
2131
|
-
accountInfo: de
|
|
2132
|
-
})
|
|
2133
|
-
]
|
|
2134
|
-
})]
|
|
2135
|
-
}) })
|
|
2136
|
-
]
|
|
2137
|
-
}),
|
|
2138
|
-
/*#__PURE__*/ L(ye, {
|
|
2139
|
-
containers: J,
|
|
2140
|
-
createModalOpen: u,
|
|
2141
|
-
setCreateModalOpen: ee,
|
|
2142
|
-
maxContainerNameLength: fe?.swift?.max_container_name_length,
|
|
2143
|
-
onCreateSuccess: T,
|
|
2144
|
-
onCreateError: E,
|
|
2145
|
-
onEmptySuccess: D,
|
|
2146
|
-
onEmptyError: M,
|
|
2147
|
-
onDeleteSuccess: N,
|
|
2148
|
-
onDeleteError: I,
|
|
2149
|
-
onPropertiesSuccess: z,
|
|
2150
|
-
onPropertiesError: re,
|
|
2151
|
-
onAclSuccess: ae,
|
|
2152
|
-
onAclError: se,
|
|
2153
|
-
selectedContainers: _,
|
|
2154
|
-
setSelectedContainers: v,
|
|
2155
|
-
hasAnyBulkAction: !0
|
|
2156
|
-
}),
|
|
2157
|
-
/*#__PURE__*/ L(Ie, {
|
|
2158
|
-
isOpen: h,
|
|
2159
|
-
containers: ve,
|
|
2160
|
-
onClose: () => g(!1),
|
|
2161
|
-
onComplete: G
|
|
2162
|
-
})
|
|
2163
|
-
]
|
|
2164
|
-
});
|
|
2165
|
-
};
|
|
2166
|
-
//#endregion
|
|
2167
|
-
//#region src/client/routes/_auth/projects/$projectId/storage/$provider/$storageType/index.tsx?tsr-split=component
|
|
2168
|
-
function Re() {
|
|
2169
|
-
let { project: e, provider: t } = ae({
|
|
2170
|
-
from: "/_auth/projects/$projectId/storage/$provider/$storageType/",
|
|
2171
|
-
select: (e) => ({
|
|
2172
|
-
project: e.projectId,
|
|
2173
|
-
provider: e.provider,
|
|
2174
|
-
storageType: e.storageType
|
|
2175
|
-
})
|
|
2176
|
-
}), { i18n: n, _: r } = oe(), i;
|
|
2177
|
-
switch (t) {
|
|
2178
|
-
case "swift":
|
|
2179
|
-
i = n._({ id: "+OEi73" });
|
|
2180
|
-
break;
|
|
2181
|
-
case "ceph":
|
|
2182
|
-
i = n._({ id: "KhNDX4" });
|
|
2183
|
-
break;
|
|
2184
|
-
default: i = n._({ id: "IWF68U" });
|
|
2185
|
-
}
|
|
2186
|
-
return /*#__PURE__*/ R("div", { children: [/*#__PURE__*/ L(I, {
|
|
2187
|
-
title: i,
|
|
2188
|
-
projectId: e
|
|
2189
|
-
}), e ? /*#__PURE__*/ L(se, {
|
|
2190
|
-
resetKeys: [e, t],
|
|
2191
|
-
fallback: /*#__PURE__*/ L("div", {
|
|
2192
|
-
className: "p-4 text-center",
|
|
2193
|
-
children: /*#__PURE__*/ L(W, { id: "diFNkW" })
|
|
2194
|
-
}),
|
|
2195
|
-
children: (() => {
|
|
2196
|
-
switch (t) {
|
|
2197
|
-
case "swift": return /*#__PURE__*/ L(Le, {});
|
|
2198
|
-
case "ceph": return /*#__PURE__*/ L(M, {});
|
|
2199
|
-
default: return /*#__PURE__*/ L("div", { children: "Storage Overview Page" });
|
|
2200
|
-
}
|
|
2201
|
-
})()
|
|
2202
|
-
}) : /*#__PURE__*/ L("div", {
|
|
2203
|
-
className: "p-4 text-center",
|
|
2204
|
-
children: /*#__PURE__*/ L(W, { id: "Z2fZGD" })
|
|
2205
|
-
})] });
|
|
2206
|
-
}
|
|
2207
|
-
var ze = () => /*#__PURE__*/ L(Re, {});
|
|
2208
|
-
//#endregion
|
|
2209
|
-
export { ze as component };
|
|
2210
|
-
|
|
2211
|
-
//# sourceMappingURL=_storageType-C-9bNkmZ.mjs.map
|