@cobaltcore-dev/aurora 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/{ContentHeader-H8KGY3Wd.mjs → ContentHeader-DtBiIwRY.mjs} +15 -15
- package/dist/client/{ContentHeader-H8KGY3Wd.mjs.map → ContentHeader-DtBiIwRY.mjs.map} +1 -1
- package/dist/client/{DeleteFlavorModal-B98oiHWx.mjs → DeleteFlavorModal-rmuYIafD.mjs} +142 -142
- package/dist/client/{DeleteFlavorModal-B98oiHWx.mjs.map → DeleteFlavorModal-rmuYIafD.mjs.map} +1 -1
- package/dist/client/{EditSecurityGroupModal-wQVNIVg1.mjs → EditSecurityGroupModal-B7Sz9puM.mjs} +15 -15
- package/dist/client/{EditSecurityGroupModal-wQVNIVg1.mjs.map → EditSecurityGroupModal-B7Sz9puM.mjs.map} +1 -1
- package/dist/client/{FloatingIpActionModals-qu1NMI5a.mjs → FloatingIpActionModals-CfRJiZqD.mjs} +59 -59
- package/dist/client/{FloatingIpActionModals-qu1NMI5a.mjs.map → FloatingIpActionModals-CfRJiZqD.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications-wsQDNEh7.mjs → ImageToastNotifications-Cw30RXsw.mjs} +374 -374
- package/dist/client/{ImageToastNotifications-wsQDNEh7.mjs.map → ImageToastNotifications-Cw30RXsw.mjs.map} +1 -1
- package/dist/client/{ListToolbar-CHlkZrpl.mjs → ListToolbar-DuazvsAu.mjs} +61 -61
- package/dist/client/{ListToolbar-CHlkZrpl.mjs.map → ListToolbar-DuazvsAu.mjs.map} +1 -1
- package/dist/client/{RouteError-BwgDIwJE.mjs → RouteError-Cyto623-.mjs} +2 -2
- package/dist/client/{RouteError-BwgDIwJE.mjs.map → RouteError-Cyto623-.mjs.map} +1 -1
- package/dist/client/{_auth-CsliQdkJ.mjs → _auth-CJj1Cnbm.mjs} +1 -1
- package/dist/client/{_auth-CsliQdkJ.mjs.map → _auth-CJj1Cnbm.mjs.map} +1 -1
- package/dist/client/_flavorId-B-1fYadl.mjs +188 -0
- package/dist/client/_flavorId-B-1fYadl.mjs.map +1 -0
- package/dist/client/{_flavorId-D_A53VYa.mjs → _flavorId-BYfIHIV_.mjs} +20 -10
- package/dist/client/_flavorId-BYfIHIV_.mjs.map +1 -0
- package/dist/client/_floatingIpId-FQ5P2qMV.mjs +228 -0
- package/dist/client/_floatingIpId-FQ5P2qMV.mjs.map +1 -0
- package/dist/client/{_floatingIpId-BGgftRBQ.mjs → _floatingIpId-IrnN-ozB.mjs} +13 -3
- package/dist/client/_floatingIpId-IrnN-ozB.mjs.map +1 -0
- package/dist/client/_imageId-Tx_9bqEc.mjs +527 -0
- package/dist/client/_imageId-Tx_9bqEc.mjs.map +1 -0
- package/dist/client/{_pcaId-DBgz5V_9.mjs → _pcaId-DWHfvMhT.mjs} +16 -3
- package/dist/client/_pcaId-DWHfvMhT.mjs.map +1 -0
- package/dist/client/{_pcaId-C7Lrv1H_.mjs → _pcaId-r2BTjN9y.mjs} +81 -81
- package/dist/client/_pcaId-r2BTjN9y.mjs.map +1 -0
- package/dist/client/{_projectId-INhedXor.mjs → _projectId-B1VjDd0Z.mjs} +3 -3
- package/dist/client/{_projectId-INhedXor.mjs.map → _projectId-B1VjDd0Z.mjs.map} +1 -1
- package/dist/client/_projectId-Bs4W9hos.mjs +283 -0
- package/dist/client/_projectId-Bs4W9hos.mjs.map +1 -0
- package/dist/client/{_projectId-C-E4NNgo.mjs → _projectId-PSpuCKO7.mjs} +9 -9
- package/dist/client/{_projectId-C-E4NNgo.mjs.map → _projectId-PSpuCKO7.mjs.map} +1 -1
- package/dist/client/{_projectId-B9fln31N.mjs → _projectId-Pxp-RXK4.mjs} +2 -2
- package/dist/client/{_projectId-B9fln31N.mjs.map → _projectId-Pxp-RXK4.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-DQoRQ-yA.mjs → _securityGroupId-Dqi6ddw4.mjs} +499 -499
- package/dist/client/_securityGroupId-Dqi6ddw4.mjs.map +1 -0
- package/dist/client/{_securityGroupId-ihjy8Lcd.mjs → _securityGroupId-VV2lUcGQ.mjs} +16 -3
- package/dist/client/_securityGroupId-VV2lUcGQ.mjs.map +1 -0
- package/dist/client/{about-oT6ccz8T.mjs → about-B2AzqxFI.mjs} +8 -8
- package/dist/client/{about-oT6ccz8T.mjs.map → about-B2AzqxFI.mjs.map} +1 -1
- package/dist/client/{aurora-D_NPTbo-.mjs → aurora-CRcxVUCo.mjs} +1 -1
- package/dist/client/{aurora-D_NPTbo-.mjs.map → aurora-CRcxVUCo.mjs.map} +1 -1
- package/dist/client/{build-eu9eg0zF.mjs → build-Cf7iWbpH.mjs} +2727 -2646
- package/dist/client/build-Cf7iWbpH.mjs.map +1 -0
- package/dist/client/{buildFilterParams-BDOIRDeD.mjs → buildFilterParams-ngVK3ybs.mjs} +1 -1
- package/dist/client/{buildFilterParams-BDOIRDeD.mjs.map → buildFilterParams-ngVK3ybs.mjs.map} +1 -1
- package/dist/client/{constants-ByHCdNsI.mjs → constants-CCgR6fKI.mjs} +15 -15
- package/dist/client/{constants-ByHCdNsI.mjs.map → constants-CCgR6fKI.mjs.map} +1 -1
- package/dist/client/{containers-rn_ntCJu.mjs → containers-BWERuY0O.mjs} +978 -976
- package/dist/client/containers-BWERuY0O.mjs.map +1 -0
- package/dist/client/{containers-Dx7TYruP.mjs → containers-Cs5vOeR2.mjs} +1 -1
- package/dist/client/{containers-Dx7TYruP.mjs.map → containers-Cs5vOeR2.mjs.map} +1 -1
- package/dist/client/{containers-B_ozmVlx.mjs → containers-DovytjVP.mjs} +6 -3
- package/dist/client/containers-DovytjVP.mjs.map +1 -0
- package/dist/client/{flavors-DRZb9LJP.mjs → flavors-BXPYAFyQ.mjs} +1 -1
- package/dist/client/flavors-BXPYAFyQ.mjs.map +1 -0
- package/dist/client/{flavors-CT4auvLO.mjs → flavors-Bovz-I2U.mjs} +137 -137
- package/dist/client/flavors-Bovz-I2U.mjs.map +1 -0
- package/dist/client/flavors-CUiALHcB.mjs +16 -0
- package/dist/client/flavors-CUiALHcB.mjs.map +1 -0
- package/dist/client/floatingips-BrjDiY2t.mjs +435 -0
- package/dist/client/floatingips-BrjDiY2t.mjs.map +1 -0
- package/dist/client/{formatBytes-GYujK0dP.mjs → formatBytes-D6oa0wU9.mjs} +1 -1
- package/dist/client/{formatBytes-GYujK0dP.mjs.map → formatBytes-D6oa0wU9.mjs.map} +1 -1
- package/dist/client/{hooks-s-I8vWww.mjs → hooks-D0krAKvo.mjs} +1 -1
- package/dist/client/images-BZP3pBqj.mjs +16 -0
- package/dist/client/images-BZP3pBqj.mjs.map +1 -0
- package/dist/client/{images-DRTfx8k2.mjs → images-DM9I8G0p.mjs} +1 -1
- package/dist/client/images-DM9I8G0p.mjs.map +1 -0
- package/dist/client/{images-BTqRflJv2.mjs → images-DaaCUXMI.mjs} +413 -410
- package/dist/client/images-DaaCUXMI.mjs.map +1 -0
- package/dist/client/index.js +494 -414
- package/dist/client/index.js.map +1 -1
- package/dist/client/{md-CI9FmfYv.mjs → md-BivyCkGC.mjs} +1 -1
- package/dist/client/{md-CI9FmfYv.mjs.map → md-BivyCkGC.mjs.map} +1 -1
- package/dist/client/{network-DFVVVNS5.mjs → network-SCVadZsv.mjs} +1 -1
- package/dist/client/{network-DFVVVNS5.mjs.map → network-SCVadZsv.mjs.map} +1 -1
- package/dist/client/{objects-DkDKVSmQ.mjs → objects-B4yrYf_a.mjs} +1 -1
- package/dist/client/objects-B4yrYf_a.mjs.map +1 -0
- package/dist/client/objects-Cw4Vu01M.mjs +4760 -0
- package/dist/client/objects-Cw4Vu01M.mjs.map +1 -0
- package/dist/client/{objects-r_Vl31oj.mjs → objects-D4zBka5e.mjs} +9 -3
- package/dist/client/objects-D4zBka5e.mjs.map +1 -0
- package/dist/client/overview-2J54-loz.mjs +15 -0
- package/dist/client/overview-2J54-loz.mjs.map +1 -0
- package/dist/client/{overview-B7pXx6bt.mjs → overview-BnmukbFh.mjs} +5 -5
- package/dist/client/overview-BnmukbFh.mjs.map +1 -0
- package/dist/client/overview-BtIXpYBo.mjs +15 -0
- package/dist/client/overview-BtIXpYBo.mjs.map +1 -0
- package/dist/client/overview-D0AAvsmL.mjs +15 -0
- package/dist/client/overview-D0AAvsmL.mjs.map +1 -0
- package/dist/client/pca-BqZycwCu.mjs +16 -0
- package/dist/client/pca-BqZycwCu.mjs.map +1 -0
- package/dist/client/pca-V2aaOxZA.mjs +167 -0
- package/dist/client/pca-V2aaOxZA.mjs.map +1 -0
- package/dist/client/{projects-_Dfn6eQT.mjs → projects-0feOw_b6.mjs} +2 -2
- package/dist/client/{projects-_Dfn6eQT.mjs.map → projects-0feOw_b6.mjs.map} +1 -1
- package/dist/client/{projects-MbS1USl2.mjs → projects-BsN4bvU2.mjs} +1 -1
- package/dist/client/{projects-MbS1USl2.mjs.map → projects-BsN4bvU2.mjs.map} +1 -1
- package/dist/client/{projects-BuN69cxO.mjs → projects-C1IYOvFQ.mjs} +29 -29
- package/dist/client/{projects-BuN69cxO.mjs.map → projects-C1IYOvFQ.mjs.map} +1 -1
- package/dist/client/{projects-D1pP0XdA.mjs → projects-jyIHL6DE.mjs} +2 -2
- package/dist/client/{projects-D1pP0XdA.mjs.map → projects-jyIHL6DE.mjs.map} +1 -1
- package/dist/client/securitygroups-B4MkSBtI.mjs +441 -0
- package/dist/client/securitygroups-B4MkSBtI.mjs.map +1 -0
- package/dist/client/{useListWithFiltering-mMX_EfyI.mjs → useListWithFiltering-CEDh1LO-.mjs} +1 -1
- package/dist/client/{useListWithFiltering-mMX_EfyI.mjs.map → useListWithFiltering-CEDh1LO-.mjs.map} +1 -1
- package/dist/client/{useModal-Dg4CBeqL.mjs → useModal-DxxlilRm.mjs} +1 -1
- package/dist/client/{useModal-Dg4CBeqL.mjs.map → useModal-DxxlilRm.mjs.map} +1 -1
- package/dist/client/{useProjectId-BWaeJZOy.mjs → useProjectId-CgOTejka.mjs} +1 -1
- package/dist/client/{useProjectId-BWaeJZOy.mjs.map → useProjectId-CgOTejka.mjs.map} +1 -1
- package/package.json +8 -7
- package/permission_policies/compute.yaml +975 -0
- package/permission_policies/image.yaml +71 -0
- package/dist/client/_flavorId-D_A53VYa.mjs.map +0 -1
- package/dist/client/_flavorId-DbhYLFxY.mjs +0 -190
- package/dist/client/_flavorId-DbhYLFxY.mjs.map +0 -1
- package/dist/client/_floatingIpId-BGgftRBQ.mjs.map +0 -1
- package/dist/client/_floatingIpId-D5myuLFz.mjs +0 -228
- package/dist/client/_floatingIpId-D5myuLFz.mjs.map +0 -1
- package/dist/client/_imageId-BoHX155h.mjs +0 -27
- package/dist/client/_imageId-BoHX155h.mjs.map +0 -1
- package/dist/client/_imageId-CTa0c3Av.mjs +0 -530
- package/dist/client/_imageId-CTa0c3Av.mjs.map +0 -1
- package/dist/client/_pcaId-C7Lrv1H_.mjs.map +0 -1
- package/dist/client/_pcaId-DBgz5V_9.mjs.map +0 -1
- package/dist/client/_projectId-Be1Erj68.mjs +0 -300
- package/dist/client/_projectId-Be1Erj68.mjs.map +0 -1
- package/dist/client/_securityGroupId-DQoRQ-yA.mjs.map +0 -1
- package/dist/client/_securityGroupId-ihjy8Lcd.mjs.map +0 -1
- package/dist/client/build-eu9eg0zF.mjs.map +0 -1
- package/dist/client/containers-B_ozmVlx.mjs.map +0 -1
- package/dist/client/containers-rn_ntCJu.mjs.map +0 -1
- package/dist/client/flavors-CT4auvLO.mjs.map +0 -1
- package/dist/client/flavors-DRZb9LJP.mjs.map +0 -1
- package/dist/client/flavors-DtgMd0Ii.mjs +0 -12
- package/dist/client/flavors-DtgMd0Ii.mjs.map +0 -1
- package/dist/client/floatingips-DG5cFJSZ.mjs +0 -12
- package/dist/client/floatingips-DG5cFJSZ.mjs.map +0 -1
- package/dist/client/floatingips-iCMR0ZiL.mjs +0 -436
- package/dist/client/floatingips-iCMR0ZiL.mjs.map +0 -1
- package/dist/client/images-BTqRflJv2.mjs.map +0 -1
- package/dist/client/images-DRTfx8k2.mjs.map +0 -1
- package/dist/client/images-xBfsjxkX.mjs +0 -12
- package/dist/client/images-xBfsjxkX.mjs.map +0 -1
- package/dist/client/objects-CKk6cST_.mjs +0 -4762
- package/dist/client/objects-CKk6cST_.mjs.map +0 -1
- package/dist/client/objects-DkDKVSmQ.mjs.map +0 -1
- package/dist/client/objects-r_Vl31oj.mjs.map +0 -1
- package/dist/client/overview-B7pXx6bt.mjs.map +0 -1
- package/dist/client/overview-CKGLIu6W.mjs +0 -12
- package/dist/client/overview-CKGLIu6W.mjs.map +0 -1
- package/dist/client/overview-Ca8r3SAz.mjs +0 -16
- package/dist/client/overview-Ca8r3SAz.mjs.map +0 -1
- package/dist/client/overview-DkPM0Od5.mjs +0 -12
- package/dist/client/overview-DkPM0Od5.mjs.map +0 -1
- package/dist/client/overview-Dxm7Ef3X.mjs +0 -12
- package/dist/client/overview-Dxm7Ef3X.mjs.map +0 -1
- package/dist/client/overview-ag4Envez.mjs +0 -16
- package/dist/client/overview-ag4Envez.mjs.map +0 -1
- package/dist/client/pca-BGv7Mprl.mjs +0 -12
- package/dist/client/pca-BGv7Mprl.mjs.map +0 -1
- package/dist/client/pca-DpULpMu5.mjs +0 -167
- package/dist/client/pca-DpULpMu5.mjs.map +0 -1
- package/dist/client/securitygroups-DURjFfYK.mjs +0 -12
- package/dist/client/securitygroups-DURjFfYK.mjs.map +0 -1
- package/dist/client/securitygroups-KC2qvmH8.mjs +0 -442
- package/dist/client/securitygroups-KC2qvmH8.mjs.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { $ as e,
|
|
1
|
+
import { $ as e, A as t, C as n, J as r, K as i, L as a, M as o, N as s, Q as c, T as l, U as u, V as d, W as f, X as p, Y as m, a as h, c as g, h as _, it as v, l as y, m as b, o as x, q as S, w as C, z as w } from "./build-Cf7iWbpH.mjs";
|
|
2
2
|
import { r as T } from "./trpcClient-BxguzNYF.mjs";
|
|
3
|
-
import { t as E } from "./containers-
|
|
4
|
-
import { t as D } from "./ContentHeader-
|
|
5
|
-
import { t as O } from "./ListToolbar-
|
|
6
|
-
import { t as k } from "./formatBytes-
|
|
7
|
-
import { t as A } from "./useProjectId-
|
|
3
|
+
import { t as E } from "./containers-DovytjVP.mjs";
|
|
4
|
+
import { t as D } from "./ContentHeader-DtBiIwRY.mjs";
|
|
5
|
+
import { t as O } from "./ListToolbar-DuazvsAu.mjs";
|
|
6
|
+
import { t as k } from "./formatBytes-D6oa0wU9.mjs";
|
|
7
|
+
import { t as A } from "./useProjectId-CgOTejka.mjs";
|
|
8
8
|
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
9
9
|
import { startTransition as P, useCallback as F, useEffect as I, useRef as L, useState as R } from "react";
|
|
10
|
-
import { useNavigate as
|
|
11
|
-
import { Trans as
|
|
12
|
-
import { i18n as
|
|
13
|
-
import { ErrorBoundary as
|
|
14
|
-
import { useVirtualizer as
|
|
10
|
+
import { useNavigate as ee, useParams as z } from "@tanstack/react-router";
|
|
11
|
+
import { Trans as B, useLingui as V } from "@lingui/react";
|
|
12
|
+
import { i18n as H } from "@lingui/core";
|
|
13
|
+
import { ErrorBoundary as U } from "react-error-boundary";
|
|
14
|
+
import { useVirtualizer as W } from "@tanstack/react-virtual";
|
|
15
15
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/CreateContainerModal.tsx
|
|
16
|
-
var
|
|
17
|
-
let { i18n: o, _: s } =
|
|
16
|
+
var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLength: a = 256 }) => {
|
|
17
|
+
let { i18n: o, _: s } = V(), c = A(), [l, u] = R(""), [d, f] = R(null), p = T.useUtils(), m = T.storage.swift.createContainer.useMutation({
|
|
18
18
|
onSuccess: () => {
|
|
19
19
|
p.storage.swift.listContainers.invalidate();
|
|
20
20
|
let e = l.trim();
|
|
@@ -31,37 +31,37 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
31
31
|
}, g = (e) => e.trim() ? e.length > a ? (f(o._({
|
|
32
32
|
id: "r5SQFW",
|
|
33
33
|
values: { maxContainerNameLength: a }
|
|
34
|
-
})), !1) : e.includes("/") ? (f(o._({ id: "9J93Xr" })), !1) : (f(null), !0) : (f(o._({ id: "JNGYAW" })), !1),
|
|
34
|
+
})), !1) : e.includes("/") ? (f(o._({ id: "9J93Xr" })), !1) : (f(null), !0) : (f(o._({ id: "JNGYAW" })), !1), _ = (e) => {
|
|
35
35
|
let t = e.target.value;
|
|
36
36
|
u(t), d && g(t);
|
|
37
|
-
},
|
|
37
|
+
}, y = () => {
|
|
38
38
|
g(l) && m.mutate({
|
|
39
39
|
project_id: c,
|
|
40
40
|
container: l.trim()
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
|
-
return t ? /* @__PURE__ */ M(
|
|
43
|
+
return t ? /* @__PURE__ */ M(v, {
|
|
44
44
|
title: o._({ id: "vTh35P" }),
|
|
45
45
|
open: t,
|
|
46
46
|
onCancel: h,
|
|
47
47
|
confirmButtonLabel: o._({ id: "hYgDIe" }),
|
|
48
|
-
onConfirm:
|
|
48
|
+
onConfirm: y,
|
|
49
49
|
cancelButtonLabel: o._({ id: "dEgA5A" }),
|
|
50
50
|
size: "small",
|
|
51
51
|
disableConfirmButton: m.isPending || !l.trim(),
|
|
52
|
-
children: /* @__PURE__ */ N(
|
|
52
|
+
children: /* @__PURE__ */ N(e, {
|
|
53
53
|
direction: "vertical",
|
|
54
54
|
gap: "6",
|
|
55
55
|
children: [/* @__PURE__ */ M("p", {
|
|
56
56
|
className: "text-theme-default",
|
|
57
|
-
children: /* @__PURE__ */ M(
|
|
58
|
-
}), /* @__PURE__ */ M(
|
|
57
|
+
children: /* @__PURE__ */ M(B, { id: "ne/GWZ" })
|
|
58
|
+
}), /* @__PURE__ */ M(C, {
|
|
59
59
|
label: o._({ id: "SUSS9i" }),
|
|
60
60
|
required: !0,
|
|
61
61
|
value: l,
|
|
62
|
-
onChange:
|
|
62
|
+
onChange: _,
|
|
63
63
|
onKeyDown: (e) => {
|
|
64
|
-
e.key === "Enter" &&
|
|
64
|
+
e.key === "Enter" && y();
|
|
65
65
|
},
|
|
66
66
|
invalid: !!d,
|
|
67
67
|
errortext: d || void 0,
|
|
@@ -71,120 +71,120 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
71
71
|
})]
|
|
72
72
|
})
|
|
73
73
|
}) : null;
|
|
74
|
-
},
|
|
75
|
-
let { i18n: u, _:
|
|
76
|
-
|
|
74
|
+
}, te = ({ isOpen: n, container: r, onClose: o, onSuccess: c, onError: l }) => {
|
|
75
|
+
let { i18n: u, _: f } = V(), p = A(), [m, g] = R(""), [b, x] = R(null), [S, E] = R(!1), D = L(""), O = () => {
|
|
76
|
+
r && navigator.clipboard.writeText(r.name).then(() => {
|
|
77
77
|
E(!0), setTimeout(() => E(!1), 2e3);
|
|
78
78
|
});
|
|
79
79
|
}, j = T.useUtils(), { data: P, isLoading: F, error: I } = T.storage.swift.listObjects.useQuery({
|
|
80
|
-
project_id:
|
|
81
|
-
container:
|
|
80
|
+
project_id: p,
|
|
81
|
+
container: r?.name ?? "",
|
|
82
82
|
format: "json",
|
|
83
83
|
limit: 100
|
|
84
|
-
}, { enabled:
|
|
84
|
+
}, { enabled: n && r !== null }), ee = T.storage.swift.emptyContainer.useMutation({
|
|
85
85
|
onSuccess: (e) => {
|
|
86
86
|
j.storage.swift.listContainers.invalidate(), j.storage.swift.listObjects.invalidate({
|
|
87
|
-
project_id:
|
|
87
|
+
project_id: p,
|
|
88
88
|
container: D.current
|
|
89
|
-
}),
|
|
89
|
+
}), c?.(D.current, e);
|
|
90
90
|
},
|
|
91
91
|
onError: (e) => {
|
|
92
|
-
|
|
92
|
+
l?.(D.current, e.message);
|
|
93
93
|
},
|
|
94
94
|
onSettled: () => {
|
|
95
|
-
|
|
95
|
+
z();
|
|
96
96
|
}
|
|
97
|
-
}),
|
|
98
|
-
|
|
99
|
-
},
|
|
97
|
+
}), z = () => {
|
|
98
|
+
g(""), x(null), ee.reset(), o();
|
|
99
|
+
}, H = (e) => {
|
|
100
100
|
let t = e.target.value;
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
if (
|
|
104
|
-
if (
|
|
101
|
+
g(t), b && x(null);
|
|
102
|
+
}, U = () => {
|
|
103
|
+
if (r) {
|
|
104
|
+
if (m.trim() !== r.name) {
|
|
105
105
|
x(u._({ id: "jS4B2+" }));
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
|
-
D.current =
|
|
109
|
-
project_id:
|
|
110
|
-
container:
|
|
108
|
+
D.current = r.name, ee.mutate({
|
|
109
|
+
project_id: p,
|
|
110
|
+
container: r.name
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
},
|
|
114
|
-
e.key === "Enter" &&
|
|
113
|
+
}, W = (e) => {
|
|
114
|
+
e.key === "Enter" && U();
|
|
115
115
|
};
|
|
116
|
-
if (!
|
|
117
|
-
let
|
|
118
|
-
return /* @__PURE__ */ N(
|
|
116
|
+
if (!n || !r) return null;
|
|
117
|
+
let G = P?.length ?? 0, te = !F && r.count === 0 && G === 0, ne = !F && r.count > 0 && G === 0, K = te || ne;
|
|
118
|
+
return /* @__PURE__ */ N(v, {
|
|
119
119
|
title: /* @__PURE__ */ N("span", {
|
|
120
120
|
className: "flex max-w-[400px] items-center gap-2",
|
|
121
121
|
children: [
|
|
122
122
|
/* @__PURE__ */ M("span", {
|
|
123
123
|
className: "shrink-0",
|
|
124
|
-
children: /* @__PURE__ */ M(
|
|
124
|
+
children: /* @__PURE__ */ M(B, { id: "5Okch2" })
|
|
125
125
|
}),
|
|
126
126
|
/* @__PURE__ */ M("span", {
|
|
127
127
|
className: "truncate",
|
|
128
|
-
title:
|
|
129
|
-
children:
|
|
128
|
+
title: r.name,
|
|
129
|
+
children: r.name
|
|
130
130
|
}),
|
|
131
|
-
!F && !
|
|
131
|
+
!F && !K && /* @__PURE__ */ M("button", {
|
|
132
132
|
type: "button",
|
|
133
133
|
onClick: O,
|
|
134
|
-
title:
|
|
134
|
+
title: S ? u._({ id: "PiH3UR" }) : u._({ id: "NQU1Nn" }),
|
|
135
135
|
className: "text-theme-light hover:text-theme-default inline-flex items-center transition-colors",
|
|
136
|
-
children: /* @__PURE__ */ M(
|
|
137
|
-
icon:
|
|
136
|
+
children: /* @__PURE__ */ M(h, {
|
|
137
|
+
icon: S ? "checkCircle" : "contentCopy",
|
|
138
138
|
size: "16"
|
|
139
139
|
})
|
|
140
140
|
})
|
|
141
141
|
]
|
|
142
142
|
}),
|
|
143
|
-
open:
|
|
144
|
-
onCancel:
|
|
145
|
-
confirmButtonLabel:
|
|
143
|
+
open: n,
|
|
144
|
+
onCancel: z,
|
|
145
|
+
confirmButtonLabel: K ? void 0 : u._({ id: "N2S1rs" }),
|
|
146
146
|
confirmButtonVariant: "primary-danger",
|
|
147
|
-
onConfirm:
|
|
148
|
-
cancelButtonLabel:
|
|
149
|
-
modalFooter:
|
|
147
|
+
onConfirm: K ? void 0 : U,
|
|
148
|
+
cancelButtonLabel: K ? void 0 : u._({ id: "dEgA5A" }),
|
|
149
|
+
modalFooter: K ? /* @__PURE__ */ M(a, {
|
|
150
150
|
className: "flex justify-end",
|
|
151
|
-
children: /* @__PURE__ */ M(
|
|
151
|
+
children: /* @__PURE__ */ M(_, { children: /* @__PURE__ */ M(y, {
|
|
152
152
|
variant: "primary",
|
|
153
|
-
onClick:
|
|
153
|
+
onClick: z,
|
|
154
154
|
"data-testid": "empty-info-close-button",
|
|
155
|
-
children: /* @__PURE__ */ M(
|
|
155
|
+
children: /* @__PURE__ */ M(B, { id: "yz7wBu" })
|
|
156
156
|
}) })
|
|
157
157
|
}) : void 0,
|
|
158
158
|
size: "small",
|
|
159
|
-
disableConfirmButton: F ||
|
|
159
|
+
disableConfirmButton: F || ee.isPending || !K && !m.trim() || !K && m.trim() !== r.name,
|
|
160
160
|
children: [I && /* @__PURE__ */ M("p", {
|
|
161
161
|
className: "text-theme-error mb-4",
|
|
162
162
|
children: (() => {
|
|
163
163
|
let e = I.message;
|
|
164
|
-
return /* @__PURE__ */ M(
|
|
164
|
+
return /* @__PURE__ */ M(B, {
|
|
165
165
|
id: "56IxdF",
|
|
166
166
|
values: { errorMessage: e }
|
|
167
167
|
});
|
|
168
168
|
})()
|
|
169
|
-
}), F ? /* @__PURE__ */ N(
|
|
169
|
+
}), F ? /* @__PURE__ */ N(e, {
|
|
170
170
|
direction: "horizontal",
|
|
171
171
|
alignment: "center",
|
|
172
172
|
gap: "2",
|
|
173
173
|
className: "py-4",
|
|
174
|
-
children: [/* @__PURE__ */ M(
|
|
175
|
-
}) :
|
|
174
|
+
children: [/* @__PURE__ */ M(i, { size: "small" }), /* @__PURE__ */ M(B, { id: "ujK/QN" })]
|
|
175
|
+
}) : K && !I ? /* @__PURE__ */ M("p", {
|
|
176
176
|
className: "text-theme-default py-2",
|
|
177
|
-
children:
|
|
178
|
-
}) : I ? null : /* @__PURE__ */ N(
|
|
177
|
+
children: te ? /* @__PURE__ */ M(B, { id: "jNm/qL" }) : /* @__PURE__ */ M(B, { id: "WefafP" })
|
|
178
|
+
}) : I ? null : /* @__PURE__ */ N(e, {
|
|
179
179
|
direction: "vertical",
|
|
180
180
|
gap: "6",
|
|
181
181
|
children: [
|
|
182
182
|
/* @__PURE__ */ N("p", {
|
|
183
183
|
className: "text-theme-default",
|
|
184
184
|
children: [
|
|
185
|
-
/* @__PURE__ */ M(
|
|
185
|
+
/* @__PURE__ */ M(B, { id: "Ioblgz" }),
|
|
186
186
|
/* @__PURE__ */ M("br", {}),
|
|
187
|
-
/* @__PURE__ */ M(
|
|
187
|
+
/* @__PURE__ */ M(B, {
|
|
188
188
|
id: "kiRrtv",
|
|
189
189
|
components: {
|
|
190
190
|
0: /* @__PURE__ */ M("strong", {}),
|
|
@@ -197,135 +197,135 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
197
197
|
/* @__PURE__ */ N("div", {
|
|
198
198
|
className: "border-theme-background-lvl-3 overflow-hidden rounded border",
|
|
199
199
|
children: [
|
|
200
|
-
|
|
200
|
+
r.count > G && /* @__PURE__ */ M("p", {
|
|
201
201
|
className: "text-theme-light px-3 py-2 text-xs",
|
|
202
202
|
children: (() => {
|
|
203
|
-
let e =
|
|
204
|
-
return /* @__PURE__ */ M(
|
|
203
|
+
let e = r.count;
|
|
204
|
+
return /* @__PURE__ */ M(B, {
|
|
205
205
|
id: "1iQtS2",
|
|
206
206
|
values: {
|
|
207
|
-
actualObjectCount:
|
|
207
|
+
actualObjectCount: G,
|
|
208
208
|
total: e
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
211
|
})()
|
|
212
212
|
}),
|
|
213
|
-
/* @__PURE__ */ M(
|
|
213
|
+
/* @__PURE__ */ M(w, {
|
|
214
214
|
columns: 3,
|
|
215
215
|
className: "text-sm",
|
|
216
|
-
children: /* @__PURE__ */ N(
|
|
217
|
-
/* @__PURE__ */ M(
|
|
218
|
-
/* @__PURE__ */ M(
|
|
219
|
-
/* @__PURE__ */ M(
|
|
216
|
+
children: /* @__PURE__ */ N(s, { children: [
|
|
217
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "6YtxFj" }) }),
|
|
218
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "Cj2Gtd" }) }),
|
|
219
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "sjMCOP" }) })
|
|
220
220
|
] })
|
|
221
221
|
}),
|
|
222
222
|
/* @__PURE__ */ M("div", {
|
|
223
223
|
className: "max-h-48 overflow-y-auto",
|
|
224
|
-
children: /* @__PURE__ */ M(
|
|
224
|
+
children: /* @__PURE__ */ M(w, {
|
|
225
225
|
columns: 3,
|
|
226
226
|
className: "text-sm",
|
|
227
|
-
children: P.map((e) => /* @__PURE__ */ N(
|
|
228
|
-
/* @__PURE__ */ M(
|
|
227
|
+
children: P.map((e) => /* @__PURE__ */ N(s, { children: [
|
|
228
|
+
/* @__PURE__ */ M(t, {
|
|
229
229
|
className: "max-w-[200px] truncate",
|
|
230
230
|
title: e.name,
|
|
231
231
|
children: e.name
|
|
232
232
|
}),
|
|
233
|
-
/* @__PURE__ */ M(
|
|
234
|
-
/* @__PURE__ */ M(
|
|
233
|
+
/* @__PURE__ */ M(t, { children: k(e.bytes) }),
|
|
234
|
+
/* @__PURE__ */ M(t, { children: e.last_modified ? new Date(e.last_modified).toLocaleString() : u._({ id: "fj5byd" }) })
|
|
235
235
|
] }, e.name))
|
|
236
236
|
})
|
|
237
237
|
})
|
|
238
238
|
]
|
|
239
239
|
}),
|
|
240
|
-
/* @__PURE__ */ M(
|
|
240
|
+
/* @__PURE__ */ M(C, {
|
|
241
241
|
label: u._({ id: "33F2A+" }),
|
|
242
242
|
required: !0,
|
|
243
|
-
value:
|
|
244
|
-
onChange:
|
|
245
|
-
onKeyDown:
|
|
243
|
+
value: m,
|
|
244
|
+
onChange: H,
|
|
245
|
+
onKeyDown: W,
|
|
246
246
|
invalid: !!b,
|
|
247
247
|
errortext: b || void 0,
|
|
248
|
-
disabled:
|
|
248
|
+
disabled: ee.isPending,
|
|
249
249
|
autoFocus: !0,
|
|
250
|
-
placeholder:
|
|
250
|
+
placeholder: r.name
|
|
251
251
|
})
|
|
252
252
|
]
|
|
253
253
|
})]
|
|
254
254
|
});
|
|
255
|
-
},
|
|
256
|
-
let { i18n:
|
|
255
|
+
}, ne = ({ isOpen: t, container: r, onClose: o, onSuccess: s, onError: c }) => {
|
|
256
|
+
let { i18n: l, _: u } = V(), d = A(), [f, p] = R(""), [m, h] = R(null), [g, b] = R(!1), x = T.useUtils(), { data: S, isLoading: w, error: E } = T.storage.swift.listObjects.useQuery({
|
|
257
257
|
project_id: d,
|
|
258
|
-
container:
|
|
258
|
+
container: r?.name ?? "",
|
|
259
259
|
format: "json",
|
|
260
260
|
limit: 1
|
|
261
|
-
}, { enabled: t &&
|
|
261
|
+
}, { enabled: t && r !== null }), { data: D, error: O } = T.storage.swift.getContainerMetadata.useQuery({
|
|
262
262
|
project_id: d,
|
|
263
|
-
container:
|
|
264
|
-
}, { enabled: t &&
|
|
263
|
+
container: r?.name ?? ""
|
|
264
|
+
}, { enabled: t && r !== null }), k = !!(D?.versionsEnabled || D?.versionsLocation || D?.historyLocation), j = T.storage.swift.deleteContainer.useMutation({
|
|
265
265
|
onSuccess: () => {
|
|
266
|
-
x.storage.swift.listContainers.invalidate(),
|
|
266
|
+
x.storage.swift.listContainers.invalidate(), s?.(r.name);
|
|
267
267
|
},
|
|
268
268
|
onError: (e) => {
|
|
269
|
-
|
|
269
|
+
c?.(r.name, e.message);
|
|
270
270
|
},
|
|
271
271
|
onSettled: () => {
|
|
272
272
|
P();
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
275
|
I(() => {
|
|
276
|
-
t || (
|
|
277
|
-
}, [t,
|
|
276
|
+
t || (p(""), h(null), b(!1), j.reset());
|
|
277
|
+
}, [t, r?.name]);
|
|
278
278
|
let P = () => {
|
|
279
|
-
|
|
279
|
+
p(""), h(null), b(!1), j.reset(), o();
|
|
280
280
|
}, F = (e) => {
|
|
281
281
|
let t = e.target.value;
|
|
282
|
-
|
|
282
|
+
p(t), m && h(null);
|
|
283
283
|
}, L = () => {
|
|
284
|
-
if (
|
|
285
|
-
if (
|
|
286
|
-
|
|
284
|
+
if (r && !(E || O)) {
|
|
285
|
+
if (f.trim() !== "delete") {
|
|
286
|
+
h(l._({ id: "b5aNMO" }));
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
|
-
k && !
|
|
289
|
+
k && !g || j.mutate({
|
|
290
290
|
project_id: d,
|
|
291
|
-
container:
|
|
291
|
+
container: r.name
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
|
-
},
|
|
294
|
+
}, ee = (e) => {
|
|
295
295
|
e.key === "Enter" && L();
|
|
296
296
|
};
|
|
297
|
-
if (!t || !
|
|
298
|
-
let
|
|
299
|
-
return /* @__PURE__ */ N(
|
|
297
|
+
if (!t || !r) return null;
|
|
298
|
+
let z = S?.length ?? 0, H = !w && (z > 0 || r.count > 0), U = !w && r.count > 0 && z === 0, W = !!(E || O);
|
|
299
|
+
return /* @__PURE__ */ N(v, {
|
|
300
300
|
title: /* @__PURE__ */ N("span", {
|
|
301
301
|
className: "flex max-w-[400px] items-center gap-2",
|
|
302
302
|
children: [/* @__PURE__ */ M("span", {
|
|
303
303
|
className: "shrink-0",
|
|
304
|
-
children: /* @__PURE__ */ M(
|
|
304
|
+
children: /* @__PURE__ */ M(B, { id: "Vzlopx" })
|
|
305
305
|
}), /* @__PURE__ */ M("span", {
|
|
306
306
|
className: "truncate",
|
|
307
|
-
title:
|
|
308
|
-
children:
|
|
307
|
+
title: r.name,
|
|
308
|
+
children: r.name
|
|
309
309
|
})]
|
|
310
310
|
}),
|
|
311
311
|
open: t,
|
|
312
312
|
onCancel: P,
|
|
313
|
-
confirmButtonLabel:
|
|
314
|
-
confirmButtonVariant:
|
|
315
|
-
onConfirm:
|
|
316
|
-
cancelButtonLabel:
|
|
317
|
-
modalFooter:
|
|
313
|
+
confirmButtonLabel: H ? void 0 : l._({ id: "cnGeoo" }),
|
|
314
|
+
confirmButtonVariant: H ? void 0 : "primary-danger",
|
|
315
|
+
onConfirm: H ? void 0 : L,
|
|
316
|
+
cancelButtonLabel: H ? void 0 : l._({ id: "dEgA5A" }),
|
|
317
|
+
modalFooter: H ? /* @__PURE__ */ M(a, {
|
|
318
318
|
className: "flex justify-end",
|
|
319
|
-
children: /* @__PURE__ */ M(
|
|
319
|
+
children: /* @__PURE__ */ M(_, { children: /* @__PURE__ */ M(y, {
|
|
320
320
|
variant: "primary",
|
|
321
321
|
onClick: P,
|
|
322
322
|
"data-testid": "delete-has-objects-close-button",
|
|
323
|
-
children: /* @__PURE__ */ M(
|
|
323
|
+
children: /* @__PURE__ */ M(B, { id: "yz7wBu" })
|
|
324
324
|
}) })
|
|
325
325
|
}) : void 0,
|
|
326
326
|
size: "small",
|
|
327
|
-
disableConfirmButton: w ||
|
|
328
|
-
children: [(E || O) && /* @__PURE__ */ N(
|
|
327
|
+
disableConfirmButton: w || W || j.isPending || !H && f.trim() !== "delete" || !H && k && !g,
|
|
328
|
+
children: [(E || O) && /* @__PURE__ */ N(e, {
|
|
329
329
|
direction: "vertical",
|
|
330
330
|
gap: "2",
|
|
331
331
|
className: "mb-4",
|
|
@@ -335,7 +335,7 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
335
335
|
className: "text-theme-error",
|
|
336
336
|
children: (() => {
|
|
337
337
|
let e = E.message;
|
|
338
|
-
return /* @__PURE__ */ M(
|
|
338
|
+
return /* @__PURE__ */ M(B, {
|
|
339
339
|
id: "56IxdF",
|
|
340
340
|
values: { errorMessage: e }
|
|
341
341
|
});
|
|
@@ -344,89 +344,89 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
344
344
|
className: "text-theme-error",
|
|
345
345
|
children: (() => {
|
|
346
346
|
let e = O.message;
|
|
347
|
-
return /* @__PURE__ */ M(
|
|
347
|
+
return /* @__PURE__ */ M(B, {
|
|
348
348
|
id: "BCXapL",
|
|
349
349
|
values: { errorMessage: e }
|
|
350
350
|
});
|
|
351
351
|
})()
|
|
352
352
|
})]
|
|
353
|
-
}), w ? /* @__PURE__ */ N(
|
|
353
|
+
}), w ? /* @__PURE__ */ N(e, {
|
|
354
354
|
direction: "horizontal",
|
|
355
355
|
alignment: "center",
|
|
356
356
|
gap: "2",
|
|
357
357
|
className: "py-4",
|
|
358
|
-
children: [/* @__PURE__ */ M(
|
|
359
|
-
}) :
|
|
358
|
+
children: [/* @__PURE__ */ M(i, { size: "small" }), /* @__PURE__ */ M(B, { id: "Z3FXyt" })]
|
|
359
|
+
}) : H ? /* @__PURE__ */ N(e, {
|
|
360
360
|
direction: "vertical",
|
|
361
361
|
gap: "3",
|
|
362
362
|
children: [/* @__PURE__ */ M("p", {
|
|
363
363
|
className: "text-theme-default",
|
|
364
|
-
children: /* @__PURE__ */ M(
|
|
365
|
-
}),
|
|
364
|
+
children: /* @__PURE__ */ M(B, { id: "3dBmvU" })
|
|
365
|
+
}), U && /* @__PURE__ */ M("p", {
|
|
366
366
|
className: "text-theme-default",
|
|
367
|
-
children: /* @__PURE__ */ M(
|
|
367
|
+
children: /* @__PURE__ */ M(B, { id: "x3T4pq" })
|
|
368
368
|
})]
|
|
369
|
-
}) : /* @__PURE__ */ N(
|
|
369
|
+
}) : /* @__PURE__ */ N(e, {
|
|
370
370
|
direction: "vertical",
|
|
371
371
|
gap: "6",
|
|
372
372
|
children: [
|
|
373
373
|
/* @__PURE__ */ N("p", {
|
|
374
374
|
className: "text-theme-default",
|
|
375
375
|
children: [
|
|
376
|
-
/* @__PURE__ */ M(
|
|
376
|
+
/* @__PURE__ */ M(B, { id: "Y8M9Uc" }),
|
|
377
377
|
/* @__PURE__ */ M("br", {}),
|
|
378
|
-
/* @__PURE__ */ M(
|
|
378
|
+
/* @__PURE__ */ M(B, {
|
|
379
379
|
id: "YzUoh9",
|
|
380
380
|
components: { 0: /* @__PURE__ */ M("strong", {}) }
|
|
381
381
|
})
|
|
382
382
|
]
|
|
383
383
|
}),
|
|
384
|
-
k && /* @__PURE__ */ M(
|
|
385
|
-
label:
|
|
386
|
-
checked:
|
|
384
|
+
k && /* @__PURE__ */ M(n, {
|
|
385
|
+
label: l._({ id: "V/8B9A" }),
|
|
386
|
+
checked: g,
|
|
387
387
|
onChange: (e) => b(e.target.checked),
|
|
388
|
-
invalid: !
|
|
388
|
+
invalid: !g
|
|
389
389
|
}),
|
|
390
|
-
/* @__PURE__ */ M(
|
|
391
|
-
label:
|
|
390
|
+
/* @__PURE__ */ M(C, {
|
|
391
|
+
label: l._({ id: "QytzQr" }),
|
|
392
392
|
required: !0,
|
|
393
|
-
value:
|
|
393
|
+
value: f,
|
|
394
394
|
onChange: F,
|
|
395
|
-
onKeyDown:
|
|
396
|
-
invalid: !!
|
|
397
|
-
errortext:
|
|
395
|
+
onKeyDown: ee,
|
|
396
|
+
invalid: !!m,
|
|
397
|
+
errortext: m || void 0,
|
|
398
398
|
disabled: j.isPending,
|
|
399
399
|
autoFocus: !0,
|
|
400
|
-
placeholder:
|
|
400
|
+
placeholder: l._({ id: "HNlEFZ" })
|
|
401
401
|
})
|
|
402
402
|
]
|
|
403
403
|
})]
|
|
404
404
|
});
|
|
405
|
-
},
|
|
405
|
+
}, K = new Set([
|
|
406
406
|
"quota-bytes",
|
|
407
407
|
"quota-count",
|
|
408
408
|
"web-index",
|
|
409
409
|
"web-listings",
|
|
410
410
|
"web-listings-css",
|
|
411
411
|
"web-error"
|
|
412
|
-
]),
|
|
413
|
-
let { i18n:
|
|
414
|
-
project_id:
|
|
415
|
-
container:
|
|
416
|
-
}, { enabled:
|
|
417
|
-
project_id:
|
|
418
|
-
container:
|
|
419
|
-
}, { enabled:
|
|
412
|
+
]), re = 50, ie = /^[a-zA-Z0-9!#$%&'*+\-.^_`|~]+$/, ae = ({ isOpen: r, container: a, onClose: l, onSuccess: u, onError: f }) => {
|
|
413
|
+
let { i18n: p, _: m } = V(), g = A(), { data: _, isLoading: E, isError: D, error: O } = T.storage.swift.getContainerMetadata.useQuery({
|
|
414
|
+
project_id: g,
|
|
415
|
+
container: a?.name ?? ""
|
|
416
|
+
}, { enabled: r && a !== null }), k = _?.read === ".r:*,.rlistings", { data: j } = T.storage.swift.getContainerPublicUrl.useQuery({
|
|
417
|
+
project_id: g,
|
|
418
|
+
container: a?.name ?? ""
|
|
419
|
+
}, { enabled: r && a !== null && k }), { data: P } = T.storage.swift.listContainers.useQuery({ project_id: g }, { enabled: r }), [ee, z] = R(""), [H, U] = R(""), W = L(null), G = F((e) => {
|
|
420
420
|
let t = e.target.value;
|
|
421
|
-
|
|
422
|
-
}, []),
|
|
421
|
+
z(t), W.current && clearTimeout(W.current), W.current = setTimeout(() => U(t), 300);
|
|
422
|
+
}, []), te = H.trim().length > 0 ? (P ?? []).filter((e) => e.name !== a?.name && e.name.toLowerCase().includes(H.toLowerCase())) : [], ne = te.slice(0, re), ae = te.length - ne.length, oe = T.useUtils(), [q, se] = R(""), [ce, le] = R(null), [J, ue] = R(""), [de, Y] = R(null), [fe, pe] = R(""), [X, me] = R(!1), [he, ge] = R(!1), [_e, ve] = R(""), [Z, ye] = R([]), [be, xe] = R({}), [Se, Ce] = R(!1), [Q, we] = R(""), [Te, Ee] = R(""), [De, Oe] = R(null), [ke, Ae] = R(null);
|
|
423
423
|
I(() => {
|
|
424
|
-
if (!
|
|
425
|
-
|
|
426
|
-
let e =
|
|
424
|
+
if (!_) return;
|
|
425
|
+
se(_.quotaBytes == null ? "" : String(_.quotaBytes)), ue(_.quotaCount == null ? "" : String(_.quotaCount)), ge(!!(_.versionsEnabled || _.versionsLocation || _.historyLocation)), ve(_.versionsLocation || _.historyLocation || "");
|
|
426
|
+
let e = _.metadata ?? {};
|
|
427
427
|
pe(e["web-index"] ?? ""), me(e["web-listings"] === "1" || e["web-listings"] === "true");
|
|
428
|
-
let t =
|
|
429
|
-
ye(Object.entries(t).filter(([e]) => !
|
|
428
|
+
let t = _.metadata ?? {};
|
|
429
|
+
ye(Object.entries(t).filter(([e]) => !K.has(e)).map(([e, t]) => ({
|
|
430
430
|
key: e,
|
|
431
431
|
value: t,
|
|
432
432
|
isNew: !1,
|
|
@@ -434,29 +434,29 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
434
434
|
originalKey: e,
|
|
435
435
|
originalValue: t
|
|
436
436
|
})));
|
|
437
|
-
}, [
|
|
438
|
-
|
|
439
|
-
}, [
|
|
437
|
+
}, [_]), I(() => {
|
|
438
|
+
r || je();
|
|
439
|
+
}, [r]);
|
|
440
440
|
let je = () => {
|
|
441
|
-
|
|
441
|
+
se(""), le(null), ue(""), Y(null), pe(""), me(!1), ge(!1), ve(""), z(""), U(""), W.current && clearTimeout(W.current), ye([]), xe({}), Ce(!1), we(""), Ee(""), Oe(null), Ae(null), Me.reset();
|
|
442
442
|
}, Me = T.storage.swift.updateContainerMetadata.useMutation({
|
|
443
443
|
onSuccess: () => {
|
|
444
|
-
|
|
444
|
+
oe.storage.swift.getContainerMetadata.invalidate({ container: a.name }), oe.storage.swift.listContainers.invalidate(), u?.(a.name), We();
|
|
445
445
|
},
|
|
446
446
|
onError: (e) => {
|
|
447
|
-
|
|
447
|
+
f?.(a.name, e.message);
|
|
448
448
|
}
|
|
449
449
|
}), Ne = () => {
|
|
450
450
|
let e = !0;
|
|
451
|
-
return
|
|
452
|
-
}, Pe = (e, t) => e.trim() ?
|
|
451
|
+
return q !== "" && (isNaN(Number(q)) || Number(q) < 0) ? (le(p._({ id: "AuQtzx" })), e = !1) : le(null), J !== "" && (isNaN(Number(J)) || Number(J) < 0) ? (Y(p._({ id: "AuQtzx" })), e = !1) : Y(null), e;
|
|
452
|
+
}, Pe = (e, t) => e.trim() ? ie.test(e) ? /[a-zA-Z0-9]/.test(e) ? K.has(e.toLowerCase()) ? p._({ id: "JeRXll" }) : Z.some((n) => n.key.toLowerCase() === e.toLowerCase() && n.originalKey !== t) ? p._({ id: "i6/ygf" }) : null : p._({ id: "dTNzBI" }) : p._({ id: "XYZLy9" }) : p._({ id: "QV1ZPO" }), Fe = () => {
|
|
453
453
|
let e = Pe(Q);
|
|
454
454
|
if (e) {
|
|
455
455
|
Oe(e);
|
|
456
456
|
return;
|
|
457
457
|
}
|
|
458
458
|
if (!Te.trim()) {
|
|
459
|
-
Ae(
|
|
459
|
+
Ae(p._({ id: "hXUWyd" }));
|
|
460
460
|
return;
|
|
461
461
|
}
|
|
462
462
|
ye([...Z, {
|
|
@@ -482,7 +482,7 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
484
484
|
if (!t.value.trim()) {
|
|
485
|
-
xe({ [`edit-${e}`]:
|
|
485
|
+
xe({ [`edit-${e}`]: p._({ id: "hXUWyd" }) });
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
488
|
ye(Z.map((t, n) => n === e ? {
|
|
@@ -517,145 +517,145 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
517
517
|
return delete n[`edit-${e}`], n;
|
|
518
518
|
});
|
|
519
519
|
}, Ue = () => {
|
|
520
|
-
if (!
|
|
521
|
-
let e =
|
|
520
|
+
if (!a || !Ne()) return;
|
|
521
|
+
let e = _?.metadata ?? {}, t = {}, n = [];
|
|
522
522
|
Z.forEach((e) => {
|
|
523
523
|
(e.isNew || e.value !== e.originalValue || e.key !== e.originalKey) && (t[e.key] = e.value, !e.isNew && e.originalKey && e.key !== e.originalKey && n.push(e.originalKey));
|
|
524
524
|
});
|
|
525
|
-
let r = Object.keys(e).filter((e) => !
|
|
525
|
+
let r = Object.keys(e).filter((e) => !K.has(e)), i = Z.map((e) => e.originalKey).filter(Boolean);
|
|
526
526
|
r.forEach((e) => {
|
|
527
527
|
!i.includes(e) && !n.includes(e) && n.push(e);
|
|
528
|
-
}), k && (fe ? t["web-index"] = fe :
|
|
529
|
-
let
|
|
528
|
+
}), k && (fe ? t["web-index"] = fe : _?.metadata?.["web-index"] && n.push("web-index"), X ? t["web-listings"] = "1" : _?.metadata?.["web-listings"] && n.push("web-listings"));
|
|
529
|
+
let o = !!(_?.versionsEnabled || _?.versionsLocation || _?.historyLocation), s = _?.versionsLocation || _?.historyLocation || "";
|
|
530
530
|
Me.mutate({
|
|
531
|
-
project_id:
|
|
532
|
-
container:
|
|
531
|
+
project_id: g,
|
|
532
|
+
container: a.name,
|
|
533
533
|
metadata: t,
|
|
534
534
|
removeMetadata: n.length ? n : void 0,
|
|
535
|
-
quotaBytes:
|
|
536
|
-
quotaCount:
|
|
537
|
-
versionsLocation: he && (!
|
|
538
|
-
removeVersionsLocation: !he &&
|
|
535
|
+
quotaBytes: q === "" ? void 0 : Number(q),
|
|
536
|
+
quotaCount: J === "" ? void 0 : Number(J),
|
|
537
|
+
versionsLocation: he && (!o || _e !== s) && _e ? _e : void 0,
|
|
538
|
+
removeVersionsLocation: !he && o ? !0 : void 0
|
|
539
539
|
});
|
|
540
540
|
}, We = () => {
|
|
541
|
-
je(),
|
|
541
|
+
je(), l();
|
|
542
542
|
};
|
|
543
|
-
if (!
|
|
544
|
-
let $ = E || Me.isPending, Ge = D && !E, Ke = Z.some((e) => e.isEditing), qe =
|
|
545
|
-
return /* @__PURE__ */ N(
|
|
543
|
+
if (!r || !a) return null;
|
|
544
|
+
let $ = E || Me.isPending, Ge = D && !E, Ke = Z.some((e) => e.isEditing), qe = _?.quotaBytes == null ? "" : String(_.quotaBytes), Je = _?.quotaCount == null ? "" : String(_.quotaCount), Ye = !!_?.versionsEnabled, Xe = _?.versionsLocation || _?.historyLocation || "", Ze = _?.metadata?.["web-index"] ?? "", Qe = _?.metadata?.["web-listings"] === "1" || _?.metadata?.["web-listings"] === "true", $e = Object.keys(_?.metadata ?? {}).filter((e) => !K.has(e)), et = Z.length === $e.length && Z.every((e) => !e.isNew && e.key === e.originalKey && e.value === e.originalValue), tt = q === qe && J === Je && he === Ye && _e === Xe && fe === Ze && X === Qe && et, nt = _?.quotaBytes == null ? null : `${_.quotaBytes} B`;
|
|
545
|
+
return /* @__PURE__ */ N(v, {
|
|
546
546
|
title: /* @__PURE__ */ N("span", {
|
|
547
547
|
className: "flex max-w-[500px] items-center gap-2",
|
|
548
548
|
children: [/* @__PURE__ */ M("span", {
|
|
549
549
|
className: "shrink-0",
|
|
550
|
-
children: /* @__PURE__ */ M(
|
|
550
|
+
children: /* @__PURE__ */ M(B, { id: "y02Bu1" })
|
|
551
551
|
}), /* @__PURE__ */ M("span", {
|
|
552
552
|
className: "truncate",
|
|
553
|
-
title:
|
|
554
|
-
children:
|
|
553
|
+
title: a.name,
|
|
554
|
+
children: a.name
|
|
555
555
|
})]
|
|
556
556
|
}),
|
|
557
|
-
open:
|
|
557
|
+
open: r,
|
|
558
558
|
onCancel: We,
|
|
559
|
-
confirmButtonLabel:
|
|
559
|
+
confirmButtonLabel: p._({ id: "tfDRzk" }),
|
|
560
560
|
onConfirm: Ue,
|
|
561
|
-
cancelButtonLabel:
|
|
561
|
+
cancelButtonLabel: p._({ id: "dEgA5A" }),
|
|
562
562
|
size: "large",
|
|
563
563
|
disableConfirmButton: $ || Se || Ke || tt || Ge,
|
|
564
564
|
children: [Me.isError && /* @__PURE__ */ M("p", {
|
|
565
565
|
className: "text-theme-error mb-4",
|
|
566
566
|
children: (() => {
|
|
567
567
|
let e = Me.error.message;
|
|
568
|
-
return /* @__PURE__ */ M(
|
|
568
|
+
return /* @__PURE__ */ M(B, {
|
|
569
569
|
id: "nUuaq8",
|
|
570
570
|
values: { errorMessage: e }
|
|
571
571
|
});
|
|
572
572
|
})()
|
|
573
|
-
}), E ? /* @__PURE__ */ N(
|
|
573
|
+
}), E ? /* @__PURE__ */ N(e, {
|
|
574
574
|
direction: "horizontal",
|
|
575
575
|
alignment: "center",
|
|
576
576
|
gap: "2",
|
|
577
577
|
className: "py-8",
|
|
578
|
-
children: [/* @__PURE__ */ M(
|
|
578
|
+
children: [/* @__PURE__ */ M(i, { size: "small" }), /* @__PURE__ */ M(B, { id: "WRZ3Mt" })]
|
|
579
579
|
}) : Ge ? /* @__PURE__ */ M("p", {
|
|
580
580
|
className: "text-theme-error py-8 text-center",
|
|
581
|
-
children: /* @__PURE__ */ M(
|
|
581
|
+
children: /* @__PURE__ */ M(B, {
|
|
582
582
|
id: "BCXapL",
|
|
583
583
|
values: { errorMessage: O?.message ?? "Unknown error" }
|
|
584
584
|
})
|
|
585
585
|
}) : /* @__PURE__ */ M("div", {
|
|
586
586
|
className: "max-h-[65vh] overflow-y-auto pr-1 pl-1",
|
|
587
|
-
children: /* @__PURE__ */ N(
|
|
587
|
+
children: /* @__PURE__ */ N(e, {
|
|
588
588
|
direction: "vertical",
|
|
589
589
|
gap: "6",
|
|
590
590
|
children: [
|
|
591
591
|
/* @__PURE__ */ N("div", {
|
|
592
592
|
className: "grid grid-cols-2 gap-4",
|
|
593
|
-
children: [/* @__PURE__ */ M(
|
|
594
|
-
label:
|
|
595
|
-
value: String(
|
|
593
|
+
children: [/* @__PURE__ */ M(C, {
|
|
594
|
+
label: p._({ id: "z45o5B" }),
|
|
595
|
+
value: String(a.count),
|
|
596
596
|
disabled: !0,
|
|
597
597
|
readOnly: !0
|
|
598
|
-
}), /* @__PURE__ */ M(
|
|
599
|
-
label:
|
|
600
|
-
value:
|
|
598
|
+
}), /* @__PURE__ */ M(C, {
|
|
599
|
+
label: p._({ id: "/InK0O" }),
|
|
600
|
+
value: _?.bytesUsed == null ? `${a.bytes.toLocaleString()} B` : `${_.bytesUsed.toLocaleString()} B`,
|
|
601
601
|
disabled: !0,
|
|
602
602
|
readOnly: !0
|
|
603
603
|
})]
|
|
604
604
|
}),
|
|
605
605
|
/* @__PURE__ */ N("div", {
|
|
606
606
|
className: "grid grid-cols-2 gap-4",
|
|
607
|
-
children: [/* @__PURE__ */ M("div", { children: /* @__PURE__ */ M(
|
|
608
|
-
label:
|
|
609
|
-
value:
|
|
607
|
+
children: [/* @__PURE__ */ M("div", { children: /* @__PURE__ */ M(C, {
|
|
608
|
+
label: p._({ id: "k0vAWv" }),
|
|
609
|
+
value: J,
|
|
610
610
|
onChange: (e) => {
|
|
611
611
|
ue(e.target.value), de && Y(null);
|
|
612
612
|
},
|
|
613
|
-
placeholder:
|
|
613
|
+
placeholder: p._({ id: "qtoOYG" }),
|
|
614
614
|
invalid: !!de,
|
|
615
615
|
errortext: de ?? void 0,
|
|
616
616
|
disabled: $
|
|
617
|
-
}) }), /* @__PURE__ */ M("div", { children: /* @__PURE__ */ M(
|
|
618
|
-
label:
|
|
619
|
-
value:
|
|
617
|
+
}) }), /* @__PURE__ */ M("div", { children: /* @__PURE__ */ M(C, {
|
|
618
|
+
label: p._({ id: "KOpPMt" }),
|
|
619
|
+
value: q,
|
|
620
620
|
onChange: (e) => {
|
|
621
|
-
|
|
621
|
+
se(e.target.value), ce && le(null);
|
|
622
622
|
},
|
|
623
|
-
placeholder:
|
|
624
|
-
invalid: !!
|
|
625
|
-
errortext:
|
|
623
|
+
placeholder: p._({ id: "qtoOYG" }),
|
|
624
|
+
invalid: !!ce,
|
|
625
|
+
errortext: ce ?? void 0,
|
|
626
626
|
disabled: $,
|
|
627
|
-
helptext:
|
|
627
|
+
helptext: q && nt ? nt : void 0
|
|
628
628
|
}) })]
|
|
629
629
|
}),
|
|
630
630
|
k && j && /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("p", {
|
|
631
631
|
className: "text-theme-default mb-1 text-sm font-semibold",
|
|
632
632
|
children: [
|
|
633
|
-
/* @__PURE__ */ M(
|
|
633
|
+
/* @__PURE__ */ M(B, { id: "mvz5Eo" }),
|
|
634
634
|
" ",
|
|
635
635
|
/* @__PURE__ */ M("a", {
|
|
636
636
|
href: j,
|
|
637
637
|
target: "_blank",
|
|
638
638
|
rel: "noopener noreferrer",
|
|
639
639
|
className: "text-theme-info text-xs font-normal underline",
|
|
640
|
-
children: /* @__PURE__ */ M(
|
|
640
|
+
children: /* @__PURE__ */ M(B, { id: "Alx2/L" })
|
|
641
641
|
})
|
|
642
642
|
]
|
|
643
|
-
}), /* @__PURE__ */ M(
|
|
643
|
+
}), /* @__PURE__ */ M(C, {
|
|
644
644
|
value: j,
|
|
645
645
|
disabled: !0,
|
|
646
646
|
readOnly: !0
|
|
647
647
|
})] }),
|
|
648
648
|
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
649
649
|
className: "text-theme-default mb-3 text-sm font-semibold",
|
|
650
|
-
children: /* @__PURE__ */ M(
|
|
651
|
-
}), k ? /* @__PURE__ */ N(
|
|
650
|
+
children: /* @__PURE__ */ M(B, { id: "6CDYXS" })
|
|
651
|
+
}), k ? /* @__PURE__ */ N(e, {
|
|
652
652
|
direction: "vertical",
|
|
653
653
|
gap: "4",
|
|
654
|
-
children: [/* @__PURE__ */ N(
|
|
654
|
+
children: [/* @__PURE__ */ N(e, {
|
|
655
655
|
direction: "vertical",
|
|
656
656
|
gap: "1",
|
|
657
|
-
children: [/* @__PURE__ */ M(
|
|
658
|
-
label:
|
|
657
|
+
children: [/* @__PURE__ */ M(n, {
|
|
658
|
+
label: p._({ id: "6+7EwD" }),
|
|
659
659
|
checked: !!fe,
|
|
660
660
|
onChange: (e) => {
|
|
661
661
|
e.target.checked ? fe || pe("index.html") : pe("");
|
|
@@ -663,7 +663,7 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
663
663
|
disabled: $
|
|
664
664
|
}), /* @__PURE__ */ M("div", {
|
|
665
665
|
className: "pl-6",
|
|
666
|
-
children: /* @__PURE__ */ M(
|
|
666
|
+
children: /* @__PURE__ */ M(C, {
|
|
667
667
|
value: fe,
|
|
668
668
|
onChange: (e) => pe(e.target.value),
|
|
669
669
|
placeholder: "index.html",
|
|
@@ -671,71 +671,71 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
671
671
|
className: "flex-1"
|
|
672
672
|
})
|
|
673
673
|
})]
|
|
674
|
-
}), /* @__PURE__ */ N(
|
|
674
|
+
}), /* @__PURE__ */ N(e, {
|
|
675
675
|
direction: "horizontal",
|
|
676
676
|
alignment: "start",
|
|
677
677
|
gap: "2",
|
|
678
|
-
children: [/* @__PURE__ */ M(
|
|
679
|
-
label:
|
|
678
|
+
children: [/* @__PURE__ */ M(n, {
|
|
679
|
+
label: p._({ id: "NeUjqc" }),
|
|
680
680
|
checked: X,
|
|
681
681
|
onChange: (e) => me(e.target.checked),
|
|
682
682
|
disabled: $
|
|
683
|
-
}), /* @__PURE__ */ N(
|
|
683
|
+
}), /* @__PURE__ */ N(c, {
|
|
684
684
|
triggerEvent: "hover",
|
|
685
|
-
children: [/* @__PURE__ */ M(
|
|
685
|
+
children: [/* @__PURE__ */ M(S, { children: /* @__PURE__ */ M(h, {
|
|
686
686
|
icon: "help",
|
|
687
687
|
size: "16",
|
|
688
688
|
className: "text-theme-light cursor-help"
|
|
689
|
-
}) }), /* @__PURE__ */ M(
|
|
689
|
+
}) }), /* @__PURE__ */ M(o, {
|
|
690
690
|
className: "z-10 max-w-[220px]",
|
|
691
|
-
children: /* @__PURE__ */ M(
|
|
691
|
+
children: /* @__PURE__ */ M(B, { id: "Oxl1UN" })
|
|
692
692
|
})]
|
|
693
693
|
})]
|
|
694
694
|
})]
|
|
695
695
|
}) : /* @__PURE__ */ M("p", {
|
|
696
696
|
className: "text-theme-default text-sm",
|
|
697
|
-
children: /* @__PURE__ */ M(
|
|
697
|
+
children: /* @__PURE__ */ M(B, {
|
|
698
698
|
id: "aSsVD3",
|
|
699
699
|
components: { 0: /* @__PURE__ */ M("strong", {}) }
|
|
700
700
|
})
|
|
701
701
|
})] }),
|
|
702
702
|
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
703
703
|
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
704
|
-
children: /* @__PURE__ */ M(
|
|
705
|
-
}), Ye && !_e ? /* @__PURE__ */ M(
|
|
706
|
-
label:
|
|
704
|
+
children: /* @__PURE__ */ M(B, { id: "jNzyQo" })
|
|
705
|
+
}), Ye && !_e ? /* @__PURE__ */ M(n, {
|
|
706
|
+
label: p._({ id: "Nvfd2b" }),
|
|
707
707
|
checked: !0,
|
|
708
708
|
onChange: (e) => {
|
|
709
|
-
e.target.checked || (ge(!1), ve(""),
|
|
709
|
+
e.target.checked || (ge(!1), ve(""), z(""), U(""));
|
|
710
710
|
},
|
|
711
711
|
disabled: !0
|
|
712
|
-
}) : !he && !_e ? /* @__PURE__ */ M(
|
|
713
|
-
label:
|
|
712
|
+
}) : !he && !_e ? /* @__PURE__ */ M(n, {
|
|
713
|
+
label: p._({ id: "WyKwnD" }),
|
|
714
714
|
checked: !1,
|
|
715
715
|
onChange: (e) => ge(e.target.checked),
|
|
716
716
|
disabled: $
|
|
717
|
-
}) : /* @__PURE__ */ N(
|
|
717
|
+
}) : /* @__PURE__ */ N(e, {
|
|
718
718
|
direction: "vertical",
|
|
719
719
|
gap: "1",
|
|
720
|
-
children: [/* @__PURE__ */ M(
|
|
721
|
-
label:
|
|
720
|
+
children: [/* @__PURE__ */ M(n, {
|
|
721
|
+
label: p._({ id: "b0uU1G" }),
|
|
722
722
|
checked: he,
|
|
723
723
|
onChange: (e) => {
|
|
724
|
-
ge(e.target.checked), e.target.checked || (ve(""),
|
|
724
|
+
ge(e.target.checked), e.target.checked || (ve(""), z(""), U(""));
|
|
725
725
|
},
|
|
726
726
|
disabled: $
|
|
727
727
|
}), he && /* @__PURE__ */ M("div", {
|
|
728
728
|
className: "pl-6",
|
|
729
|
-
children: /* @__PURE__ */ M(
|
|
729
|
+
children: /* @__PURE__ */ M(x, {
|
|
730
730
|
value: _e,
|
|
731
731
|
onChange: (e) => ve(e),
|
|
732
|
-
onInputChange:
|
|
733
|
-
placeholder:
|
|
732
|
+
onInputChange: G,
|
|
733
|
+
placeholder: p._({ id: "a13wDR" }),
|
|
734
734
|
helptext: (() => {
|
|
735
|
-
if (
|
|
736
|
-
if (
|
|
737
|
-
let e =
|
|
738
|
-
return
|
|
735
|
+
if (ee.trim().length === 0) return p._({ id: "c+fUtV" });
|
|
736
|
+
if (ae > 0) {
|
|
737
|
+
let e = re, t = te.length;
|
|
738
|
+
return p._({
|
|
739
739
|
id: "qzhUb9",
|
|
740
740
|
values: {
|
|
741
741
|
maxOptions: e,
|
|
@@ -745,7 +745,7 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
745
745
|
}
|
|
746
746
|
})(),
|
|
747
747
|
disabled: $,
|
|
748
|
-
children:
|
|
748
|
+
children: ne.map((e) => /* @__PURE__ */ M(b, {
|
|
749
749
|
value: e.name,
|
|
750
750
|
children: e.name
|
|
751
751
|
}, e.name))
|
|
@@ -753,139 +753,139 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
753
753
|
})]
|
|
754
754
|
})] }),
|
|
755
755
|
/* @__PURE__ */ N("div", { children: [
|
|
756
|
-
/* @__PURE__ */ N(
|
|
756
|
+
/* @__PURE__ */ N(e, {
|
|
757
757
|
direction: "horizontal",
|
|
758
758
|
alignment: "center",
|
|
759
759
|
distribution: "between",
|
|
760
760
|
className: "mb-3",
|
|
761
761
|
children: [/* @__PURE__ */ M("p", {
|
|
762
762
|
className: "text-theme-default text-sm font-semibold",
|
|
763
|
-
children: /* @__PURE__ */ M(
|
|
763
|
+
children: /* @__PURE__ */ M(B, { id: "6GBt0m" })
|
|
764
764
|
}), /* @__PURE__ */ M("p", {
|
|
765
765
|
className: "text-theme-light text-xs",
|
|
766
|
-
children: /* @__PURE__ */ M(
|
|
766
|
+
children: /* @__PURE__ */ M(B, { id: "kuYWaD" })
|
|
767
767
|
})]
|
|
768
768
|
}),
|
|
769
|
-
/* @__PURE__ */ M(
|
|
769
|
+
/* @__PURE__ */ M(e, {
|
|
770
770
|
direction: "horizontal",
|
|
771
771
|
className: "jn:bg-theme-background-lvl-1 justify-end p-2",
|
|
772
|
-
children: /* @__PURE__ */ M(
|
|
773
|
-
label:
|
|
772
|
+
children: /* @__PURE__ */ M(y, {
|
|
773
|
+
label: p._({ id: "sWBLli" }),
|
|
774
774
|
onClick: () => Ce(!0),
|
|
775
775
|
variant: "primary",
|
|
776
776
|
icon: "addCircle",
|
|
777
777
|
disabled: Se || Ke || $
|
|
778
778
|
})
|
|
779
779
|
}),
|
|
780
|
-
/* @__PURE__ */ N(
|
|
780
|
+
/* @__PURE__ */ N(w, {
|
|
781
781
|
columns: 3,
|
|
782
782
|
children: [
|
|
783
|
-
/* @__PURE__ */ N(
|
|
784
|
-
/* @__PURE__ */ M(
|
|
785
|
-
/* @__PURE__ */ M(
|
|
786
|
-
/* @__PURE__ */ M(
|
|
783
|
+
/* @__PURE__ */ N(s, { children: [
|
|
784
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "7sMeHQ" }) }),
|
|
785
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "wMHvYH" }) }),
|
|
786
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "7L01XJ" }) })
|
|
787
787
|
] }),
|
|
788
|
-
Se && /* @__PURE__ */ N(
|
|
789
|
-
/* @__PURE__ */ M(
|
|
788
|
+
Se && /* @__PURE__ */ N(s, { children: [
|
|
789
|
+
/* @__PURE__ */ M(t, { children: /* @__PURE__ */ M(C, {
|
|
790
790
|
value: Q,
|
|
791
791
|
onChange: (e) => {
|
|
792
792
|
we(e.target.value), De && Oe(null);
|
|
793
793
|
},
|
|
794
|
-
placeholder:
|
|
794
|
+
placeholder: p._({ id: "x9AdZ8" }),
|
|
795
795
|
errortext: De ?? void 0,
|
|
796
796
|
invalid: !!De,
|
|
797
797
|
autoFocus: !0
|
|
798
798
|
}) }),
|
|
799
|
-
/* @__PURE__ */ M(
|
|
799
|
+
/* @__PURE__ */ M(t, { children: /* @__PURE__ */ M(C, {
|
|
800
800
|
value: Te,
|
|
801
801
|
onChange: (e) => {
|
|
802
802
|
Ee(e.target.value), ke && Ae(null);
|
|
803
803
|
},
|
|
804
|
-
placeholder:
|
|
804
|
+
placeholder: p._({ id: "wMHvYH" }),
|
|
805
805
|
errortext: ke ?? void 0,
|
|
806
806
|
invalid: !!ke
|
|
807
807
|
}) }),
|
|
808
|
-
/* @__PURE__ */ M(
|
|
808
|
+
/* @__PURE__ */ M(t, { children: /* @__PURE__ */ N(e, {
|
|
809
809
|
direction: "horizontal",
|
|
810
810
|
gap: "2",
|
|
811
|
-
children: [/* @__PURE__ */ M(
|
|
811
|
+
children: [/* @__PURE__ */ M(y, {
|
|
812
812
|
size: "small",
|
|
813
813
|
variant: "primary",
|
|
814
814
|
onClick: Fe,
|
|
815
815
|
icon: "check",
|
|
816
|
-
title:
|
|
817
|
-
}), /* @__PURE__ */ M(
|
|
816
|
+
title: p._({ id: "tfDRzk" })
|
|
817
|
+
}), /* @__PURE__ */ M(y, {
|
|
818
818
|
size: "small",
|
|
819
819
|
variant: "subdued",
|
|
820
820
|
onClick: Ie,
|
|
821
821
|
icon: "close",
|
|
822
|
-
title:
|
|
822
|
+
title: p._({ id: "bzSI52" })
|
|
823
823
|
})]
|
|
824
824
|
}) })
|
|
825
825
|
] }),
|
|
826
|
-
Z.map((
|
|
827
|
-
/* @__PURE__ */ M(
|
|
828
|
-
value:
|
|
829
|
-
onChange: (e) => Ve(
|
|
830
|
-
errortext: be[`edit-${
|
|
831
|
-
invalid: !!be[`edit-${
|
|
826
|
+
Z.map((n, r) => /* @__PURE__ */ N(s, { children: [
|
|
827
|
+
/* @__PURE__ */ M(t, { children: n.isEditing ? /* @__PURE__ */ M(C, {
|
|
828
|
+
value: n.key,
|
|
829
|
+
onChange: (e) => Ve(r, e.target.value),
|
|
830
|
+
errortext: be[`edit-${r}`],
|
|
831
|
+
invalid: !!be[`edit-${r}`]
|
|
832
832
|
}) : /* @__PURE__ */ M("span", {
|
|
833
833
|
className: "block max-w-xs truncate font-mono text-sm",
|
|
834
|
-
title:
|
|
835
|
-
children:
|
|
834
|
+
title: n.key,
|
|
835
|
+
children: n.key
|
|
836
836
|
}) }),
|
|
837
|
-
/* @__PURE__ */ M(
|
|
838
|
-
value:
|
|
839
|
-
onChange: (e) => He(
|
|
837
|
+
/* @__PURE__ */ M(t, { children: n.isEditing ? /* @__PURE__ */ M(C, {
|
|
838
|
+
value: n.value,
|
|
839
|
+
onChange: (e) => He(r, e.target.value)
|
|
840
840
|
}) : /* @__PURE__ */ M("span", {
|
|
841
841
|
className: "block max-w-md truncate text-sm",
|
|
842
|
-
title:
|
|
843
|
-
children:
|
|
842
|
+
title: n.value,
|
|
843
|
+
children: n.value
|
|
844
844
|
}) }),
|
|
845
|
-
/* @__PURE__ */ M(
|
|
845
|
+
/* @__PURE__ */ M(t, { children: n.isEditing ? /* @__PURE__ */ N(e, {
|
|
846
846
|
direction: "horizontal",
|
|
847
847
|
gap: "2",
|
|
848
|
-
children: [/* @__PURE__ */ M(
|
|
848
|
+
children: [/* @__PURE__ */ M(y, {
|
|
849
849
|
size: "small",
|
|
850
850
|
variant: "primary",
|
|
851
|
-
onClick: () => Re(
|
|
851
|
+
onClick: () => Re(r),
|
|
852
852
|
icon: "check",
|
|
853
|
-
title:
|
|
854
|
-
}), /* @__PURE__ */ M(
|
|
853
|
+
title: p._({ id: "tfDRzk" })
|
|
854
|
+
}), /* @__PURE__ */ M(y, {
|
|
855
855
|
size: "small",
|
|
856
856
|
variant: "subdued",
|
|
857
|
-
onClick: () => ze(
|
|
857
|
+
onClick: () => ze(r),
|
|
858
858
|
icon: "close",
|
|
859
|
-
title:
|
|
859
|
+
title: p._({ id: "bzSI52" })
|
|
860
860
|
})]
|
|
861
|
-
}) : /* @__PURE__ */ N(
|
|
861
|
+
}) : /* @__PURE__ */ N(e, {
|
|
862
862
|
direction: "horizontal",
|
|
863
863
|
gap: "2",
|
|
864
|
-
children: [/* @__PURE__ */ M(
|
|
864
|
+
children: [/* @__PURE__ */ M(y, {
|
|
865
865
|
size: "small",
|
|
866
866
|
variant: "subdued",
|
|
867
|
-
onClick: () => Le(
|
|
867
|
+
onClick: () => Le(r),
|
|
868
868
|
icon: "edit",
|
|
869
|
-
title:
|
|
869
|
+
title: p._({ id: "ePK91l" }),
|
|
870
870
|
disabled: Se || Ke || $
|
|
871
|
-
}), /* @__PURE__ */ M(
|
|
871
|
+
}), /* @__PURE__ */ M(y, {
|
|
872
872
|
size: "small",
|
|
873
873
|
variant: "primary-danger",
|
|
874
|
-
onClick: () => Be(
|
|
874
|
+
onClick: () => Be(r),
|
|
875
875
|
icon: "deleteForever",
|
|
876
|
-
title:
|
|
876
|
+
title: p._({ id: "cnGeoo" }),
|
|
877
877
|
disabled: Se || Ke || $
|
|
878
878
|
})]
|
|
879
879
|
}) })
|
|
880
|
-
] },
|
|
881
|
-
Z.length === 0 && !Se && /* @__PURE__ */ M(
|
|
880
|
+
] }, r)),
|
|
881
|
+
Z.length === 0 && !Se && /* @__PURE__ */ M(s, { children: /* @__PURE__ */ M(t, {
|
|
882
882
|
colSpan: 3,
|
|
883
883
|
className: "py-6 text-center",
|
|
884
|
-
children: /* @__PURE__ */ M(
|
|
884
|
+
children: /* @__PURE__ */ M(e, {
|
|
885
885
|
alignment: "center",
|
|
886
886
|
children: /* @__PURE__ */ M("span", {
|
|
887
887
|
className: "text-theme-light text-sm",
|
|
888
|
-
children: /* @__PURE__ */ M(
|
|
888
|
+
children: /* @__PURE__ */ M(B, { id: "F02e8I" })
|
|
889
889
|
})
|
|
890
890
|
})
|
|
891
891
|
}) })
|
|
@@ -899,7 +899,7 @@ var K = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
899
899
|
};
|
|
900
900
|
//#endregion
|
|
901
901
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ManageContainerAccessModal.tsx
|
|
902
|
-
function
|
|
902
|
+
function oe(e) {
|
|
903
903
|
let t = e.trim();
|
|
904
904
|
if (t === ".r:*") return {
|
|
905
905
|
raw: t,
|
|
@@ -958,56 +958,56 @@ function ae(e) {
|
|
|
958
958
|
requiresToken: !0
|
|
959
959
|
};
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
return e.trim() ? e.split(",").map((e) => e.trim()).filter(Boolean).map(
|
|
963
|
-
}
|
|
964
|
-
var oe = [".r:*", ".rlistings"];
|
|
965
|
-
function se(e) {
|
|
966
|
-
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
967
|
-
return oe.every((e) => t.includes(e));
|
|
961
|
+
function q(e) {
|
|
962
|
+
return e.trim() ? e.split(",").map((e) => e.trim()).filter(Boolean).map(oe) : [];
|
|
968
963
|
}
|
|
964
|
+
var se = [".r:*", ".rlistings"];
|
|
969
965
|
function ce(e) {
|
|
970
966
|
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
971
|
-
return
|
|
967
|
+
return se.every((e) => t.includes(e));
|
|
972
968
|
}
|
|
973
969
|
function le(e) {
|
|
974
|
-
|
|
970
|
+
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
971
|
+
return [...new Set([...se, ...t])].join(",");
|
|
972
|
+
}
|
|
973
|
+
function J(e) {
|
|
974
|
+
return e.split(",").map((e) => e.trim()).filter((e) => !se.includes(e)).join(",");
|
|
975
975
|
}
|
|
976
976
|
function ue(e) {
|
|
977
977
|
switch (e.type) {
|
|
978
|
-
case "any-referrer": return
|
|
978
|
+
case "any-referrer": return H._({ id: "HVdrr1" });
|
|
979
979
|
case "denied-referrer": {
|
|
980
980
|
let t = e.host || "";
|
|
981
|
-
return
|
|
981
|
+
return H._({
|
|
982
982
|
id: "7XQ3QJ",
|
|
983
983
|
values: { host: t }
|
|
984
984
|
});
|
|
985
985
|
}
|
|
986
986
|
case "specific-referrer": {
|
|
987
987
|
let t = e.host || "";
|
|
988
|
-
return
|
|
988
|
+
return H._({
|
|
989
989
|
id: "Dqnh7K",
|
|
990
990
|
values: { host: t }
|
|
991
991
|
});
|
|
992
992
|
}
|
|
993
|
-
case "listing-access": return
|
|
993
|
+
case "listing-access": return H._({ id: "ntNlXu" });
|
|
994
994
|
case "all-project-users": {
|
|
995
995
|
let t = e.projectId || "";
|
|
996
|
-
return
|
|
996
|
+
return H._({
|
|
997
997
|
id: "sa4CV6",
|
|
998
998
|
values: { projectId: t }
|
|
999
999
|
});
|
|
1000
1000
|
}
|
|
1001
1001
|
case "specific-user-any-project": {
|
|
1002
1002
|
let t = e.userId || "";
|
|
1003
|
-
return
|
|
1003
|
+
return H._({
|
|
1004
1004
|
id: "izMhIO",
|
|
1005
1005
|
values: { userId: t }
|
|
1006
1006
|
});
|
|
1007
1007
|
}
|
|
1008
1008
|
case "specific-user": {
|
|
1009
1009
|
let t = e.projectId || "", n = e.userId || "";
|
|
1010
|
-
return
|
|
1010
|
+
return H._({
|
|
1011
1011
|
id: "cXuXkb",
|
|
1012
1012
|
values: {
|
|
1013
1013
|
userId: n,
|
|
@@ -1018,75 +1018,75 @@ function ue(e) {
|
|
|
1018
1018
|
default: return e.raw;
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
|
-
var de = ({ isOpen:
|
|
1022
|
-
let { i18n:
|
|
1021
|
+
var de = ({ isOpen: t, container: r, onClose: a, onSuccess: o, onError: s }) => {
|
|
1022
|
+
let { i18n: c, _: l } = V(), u = A(), [d, f] = R(""), [p, m] = R(""), [h, _] = R(!1), [b, x] = R(!1);
|
|
1023
1023
|
I(() => {
|
|
1024
|
-
!
|
|
1025
|
-
}, [
|
|
1026
|
-
let { data:
|
|
1027
|
-
project_id:
|
|
1028
|
-
container:
|
|
1029
|
-
}, { enabled:
|
|
1024
|
+
!d.trim() && !p.trim() && x(!1);
|
|
1025
|
+
}, [d, p]);
|
|
1026
|
+
let { data: S, isLoading: C, isError: w, error: E } = T.storage.swift.getContainerMetadata.useQuery({
|
|
1027
|
+
project_id: u,
|
|
1028
|
+
container: r?.name ?? ""
|
|
1029
|
+
}, { enabled: t && r !== null });
|
|
1030
1030
|
I(() => {
|
|
1031
|
-
if (!
|
|
1032
|
-
let e =
|
|
1033
|
-
|
|
1034
|
-
}, [
|
|
1031
|
+
if (!S) return;
|
|
1032
|
+
let e = S.read ?? "", t = S.write ?? "";
|
|
1033
|
+
f(e), m(t), _(ce(e));
|
|
1034
|
+
}, [S]);
|
|
1035
1035
|
let D = T.useUtils(), O = T.storage.swift.updateContainerMetadata.useMutation({
|
|
1036
1036
|
onSuccess: () => {
|
|
1037
1037
|
D.storage.swift.getContainerMetadata.invalidate({
|
|
1038
|
-
project_id:
|
|
1039
|
-
container:
|
|
1040
|
-
}), D.storage.swift.listContainers.invalidate(),
|
|
1038
|
+
project_id: u,
|
|
1039
|
+
container: r.name
|
|
1040
|
+
}), D.storage.swift.listContainers.invalidate(), o?.(r.name), P();
|
|
1041
1041
|
},
|
|
1042
1042
|
onError: (e) => {
|
|
1043
|
-
|
|
1043
|
+
s?.(r.name, e.message);
|
|
1044
1044
|
}
|
|
1045
1045
|
}), k = L(O.reset);
|
|
1046
1046
|
k.current = O.reset;
|
|
1047
1047
|
let P = () => {
|
|
1048
|
-
|
|
1048
|
+
f(""), m(""), _(!1), x(!1), O.reset(), a();
|
|
1049
1049
|
};
|
|
1050
1050
|
I(() => {
|
|
1051
|
-
|
|
1052
|
-
}, [
|
|
1051
|
+
t || (f(""), m(""), _(!1), k.current());
|
|
1052
|
+
}, [t]);
|
|
1053
1053
|
let F = (e) => {
|
|
1054
1054
|
let t = e.target.checked;
|
|
1055
|
-
|
|
1056
|
-
},
|
|
1055
|
+
_(t), f((e) => t ? le(e) : J(e));
|
|
1056
|
+
}, ee = (e) => {
|
|
1057
1057
|
let t = e.target.value;
|
|
1058
|
-
|
|
1059
|
-
},
|
|
1060
|
-
|
|
1061
|
-
project_id:
|
|
1062
|
-
container:
|
|
1063
|
-
read:
|
|
1058
|
+
f(t), _(ce(t));
|
|
1059
|
+
}, z = () => {
|
|
1060
|
+
r && O.mutate({
|
|
1061
|
+
project_id: u,
|
|
1062
|
+
container: r.name,
|
|
1063
|
+
read: d.trim(),
|
|
1064
1064
|
write: p.trim()
|
|
1065
1065
|
});
|
|
1066
1066
|
};
|
|
1067
|
-
if (!
|
|
1068
|
-
let
|
|
1069
|
-
return /* @__PURE__ */ N(
|
|
1067
|
+
if (!t || !r) return null;
|
|
1068
|
+
let H = C || O.isPending, U = d.trim().length > 0 || p.trim().length > 0, W = q(d), G = q(p);
|
|
1069
|
+
return /* @__PURE__ */ N(v, {
|
|
1070
1070
|
title: /* @__PURE__ */ N("span", {
|
|
1071
1071
|
className: "flex items-center gap-2",
|
|
1072
|
-
children: [/* @__PURE__ */ M(
|
|
1072
|
+
children: [/* @__PURE__ */ M(B, { id: "6Kjltl" }), /* @__PURE__ */ M("span", {
|
|
1073
1073
|
className: "max-w-[250px] truncate font-mono",
|
|
1074
|
-
title:
|
|
1075
|
-
children:
|
|
1074
|
+
title: r.name,
|
|
1075
|
+
children: r.name
|
|
1076
1076
|
})]
|
|
1077
1077
|
}),
|
|
1078
|
-
open:
|
|
1078
|
+
open: t,
|
|
1079
1079
|
onCancel: P,
|
|
1080
|
-
confirmButtonLabel:
|
|
1081
|
-
onConfirm:
|
|
1082
|
-
cancelButtonLabel:
|
|
1080
|
+
confirmButtonLabel: c._({ id: "tfDRzk" }),
|
|
1081
|
+
onConfirm: z,
|
|
1082
|
+
cancelButtonLabel: c._({ id: "dEgA5A" }),
|
|
1083
1083
|
size: "xl",
|
|
1084
|
-
disableConfirmButton:
|
|
1084
|
+
disableConfirmButton: H || w,
|
|
1085
1085
|
children: [O.isError && /* @__PURE__ */ M("p", {
|
|
1086
1086
|
className: "text-theme-error mb-4",
|
|
1087
1087
|
children: (() => {
|
|
1088
1088
|
let e = O.error.message;
|
|
1089
|
-
return /* @__PURE__ */ M(
|
|
1089
|
+
return /* @__PURE__ */ M(B, {
|
|
1090
1090
|
id: "u2xIeO",
|
|
1091
1091
|
values: { errorMessage: e }
|
|
1092
1092
|
});
|
|
@@ -1097,20 +1097,20 @@ var de = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) =>
|
|
|
1097
1097
|
className: "mb-4",
|
|
1098
1098
|
children: [/* @__PURE__ */ M("p", {
|
|
1099
1099
|
className: "text-theme-default mb-2",
|
|
1100
|
-
children: /* @__PURE__ */ M(
|
|
1100
|
+
children: /* @__PURE__ */ M(B, { id: "PHsq3v" })
|
|
1101
1101
|
}), /* @__PURE__ */ M("p", {
|
|
1102
1102
|
className: "text-theme-default",
|
|
1103
|
-
children: /* @__PURE__ */ M(
|
|
1103
|
+
children: /* @__PURE__ */ M(B, { id: "g9m7gK" })
|
|
1104
1104
|
})]
|
|
1105
|
-
}),
|
|
1105
|
+
}), C ? /* @__PURE__ */ N(e, {
|
|
1106
1106
|
direction: "horizontal",
|
|
1107
1107
|
alignment: "center",
|
|
1108
1108
|
gap: "2",
|
|
1109
1109
|
className: "py-6",
|
|
1110
|
-
children: [/* @__PURE__ */ M(
|
|
1111
|
-
}) :
|
|
1110
|
+
children: [/* @__PURE__ */ M(i, { size: "small" }), /* @__PURE__ */ M(B, { id: "poCbZw" })]
|
|
1111
|
+
}) : w ? /* @__PURE__ */ M("p", {
|
|
1112
1112
|
className: "text-theme-error py-2",
|
|
1113
|
-
children: /* @__PURE__ */ M(
|
|
1113
|
+
children: /* @__PURE__ */ M(B, {
|
|
1114
1114
|
id: "QNHur0",
|
|
1115
1115
|
values: { errorMessage: E?.message ?? "" }
|
|
1116
1116
|
})
|
|
@@ -1118,54 +1118,54 @@ var de = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) =>
|
|
|
1118
1118
|
className: "flex gap-6",
|
|
1119
1119
|
children: [/* @__PURE__ */ M("div", {
|
|
1120
1120
|
className: "min-w-0 flex-1",
|
|
1121
|
-
children: /* @__PURE__ */ N(
|
|
1121
|
+
children: /* @__PURE__ */ N(e, {
|
|
1122
1122
|
direction: "vertical",
|
|
1123
1123
|
gap: "6",
|
|
1124
1124
|
children: [
|
|
1125
1125
|
/* @__PURE__ */ N("div", { children: [
|
|
1126
|
-
/* @__PURE__ */ M(fe, { label:
|
|
1127
|
-
/* @__PURE__ */ M(
|
|
1128
|
-
value:
|
|
1129
|
-
onChange:
|
|
1130
|
-
disabled:
|
|
1131
|
-
placeholder:
|
|
1126
|
+
/* @__PURE__ */ M(fe, { label: c._({ id: "SBGiGm" }) }),
|
|
1127
|
+
/* @__PURE__ */ M(g, {
|
|
1128
|
+
value: d,
|
|
1129
|
+
onChange: ee,
|
|
1130
|
+
disabled: H || h,
|
|
1131
|
+
placeholder: c._({ id: "FKL6Jv" }),
|
|
1132
1132
|
className: "font-mono text-sm",
|
|
1133
1133
|
rows: 3
|
|
1134
1134
|
}),
|
|
1135
|
-
/* @__PURE__ */ M(
|
|
1136
|
-
label:
|
|
1135
|
+
/* @__PURE__ */ M(n, {
|
|
1136
|
+
label: c._({ id: "23wBCX" }),
|
|
1137
1137
|
checked: h,
|
|
1138
1138
|
onChange: F,
|
|
1139
|
-
disabled:
|
|
1139
|
+
disabled: H,
|
|
1140
1140
|
className: "mt-2"
|
|
1141
1141
|
})
|
|
1142
1142
|
] }),
|
|
1143
|
-
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M(fe, { label:
|
|
1143
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M(fe, { label: c._({ id: "6qzsuS" }) }), /* @__PURE__ */ M(g, {
|
|
1144
1144
|
value: p,
|
|
1145
1145
|
onChange: (e) => {
|
|
1146
1146
|
let t = e.target.value;
|
|
1147
1147
|
m(t);
|
|
1148
1148
|
},
|
|
1149
|
-
disabled:
|
|
1150
|
-
placeholder:
|
|
1149
|
+
disabled: H,
|
|
1150
|
+
placeholder: c._({ id: "UVFHGY" }),
|
|
1151
1151
|
className: "font-mono text-sm",
|
|
1152
1152
|
rows: 3
|
|
1153
1153
|
})] }),
|
|
1154
|
-
|
|
1155
|
-
label:
|
|
1156
|
-
onClick: () =>
|
|
1154
|
+
U && /* @__PURE__ */ M(y, {
|
|
1155
|
+
label: b ? c._({ id: "we28Pq" }) : c._({ id: "YiMCKk" }),
|
|
1156
|
+
onClick: () => x((e) => !e),
|
|
1157
1157
|
variant: "subdued",
|
|
1158
|
-
disabled:
|
|
1158
|
+
disabled: H
|
|
1159
1159
|
}),
|
|
1160
|
-
|
|
1160
|
+
b && (W.length > 0 || G.length > 0) && /* @__PURE__ */ N(e, {
|
|
1161
1161
|
direction: "vertical",
|
|
1162
1162
|
gap: "4",
|
|
1163
|
-
children: [
|
|
1163
|
+
children: [W.length > 0 && /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
1164
1164
|
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
1165
|
-
children: /* @__PURE__ */ M(
|
|
1165
|
+
children: /* @__PURE__ */ M(B, { id: "SBGiGm" })
|
|
1166
1166
|
}), /* @__PURE__ */ M("div", {
|
|
1167
1167
|
className: "border-theme-background-lvl-3 divide-theme-background-lvl-3 divide-y rounded border",
|
|
1168
|
-
children:
|
|
1168
|
+
children: W.map((e, t) => /* @__PURE__ */ N("div", {
|
|
1169
1169
|
className: "flex flex-col gap-1 px-3 py-2",
|
|
1170
1170
|
children: [/* @__PURE__ */ N("div", {
|
|
1171
1171
|
className: "flex items-center justify-between gap-3",
|
|
@@ -1175,19 +1175,19 @@ var de = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) =>
|
|
|
1175
1175
|
children: ue(e)
|
|
1176
1176
|
}), /* @__PURE__ */ M("p", {
|
|
1177
1177
|
className: "text-theme-light shrink-0 text-xs",
|
|
1178
|
-
children: e.requiresToken ? /* @__PURE__ */ M(
|
|
1178
|
+
children: e.requiresToken ? /* @__PURE__ */ M(B, { id: "z+zpLP" }) : /* @__PURE__ */ M(B, { id: "t7ff15" })
|
|
1179
1179
|
})]
|
|
1180
1180
|
}), /* @__PURE__ */ M("code", {
|
|
1181
1181
|
className: "text-theme-light bg-theme-background-lvl-2 block w-full rounded px-2 py-1 font-mono text-xs break-all",
|
|
1182
1182
|
children: e.raw
|
|
1183
1183
|
})]
|
|
1184
1184
|
}, t))
|
|
1185
|
-
})] }),
|
|
1185
|
+
})] }), G.length > 0 && /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
1186
1186
|
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
1187
|
-
children: /* @__PURE__ */ M(
|
|
1187
|
+
children: /* @__PURE__ */ M(B, { id: "6qzsuS" })
|
|
1188
1188
|
}), /* @__PURE__ */ M("div", {
|
|
1189
1189
|
className: "border-theme-background-lvl-3 divide-theme-background-lvl-3 divide-y rounded border",
|
|
1190
|
-
children:
|
|
1190
|
+
children: G.map((e, t) => /* @__PURE__ */ N("div", {
|
|
1191
1191
|
className: "flex flex-col gap-1 px-3 py-2",
|
|
1192
1192
|
children: [/* @__PURE__ */ N("div", {
|
|
1193
1193
|
className: "flex items-center justify-between gap-3",
|
|
@@ -1197,7 +1197,7 @@ var de = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) =>
|
|
|
1197
1197
|
children: ue(e)
|
|
1198
1198
|
}), /* @__PURE__ */ M("p", {
|
|
1199
1199
|
className: "text-theme-light shrink-0 text-xs",
|
|
1200
|
-
children: /* @__PURE__ */ M(
|
|
1200
|
+
children: /* @__PURE__ */ M(B, { id: "z+zpLP" })
|
|
1201
1201
|
})]
|
|
1202
1202
|
}), /* @__PURE__ */ M("code", {
|
|
1203
1203
|
className: "text-theme-light bg-theme-background-lvl-2 block w-full rounded px-2 py-1 font-mono text-xs break-all",
|
|
@@ -1213,37 +1213,37 @@ var de = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) =>
|
|
|
1213
1213
|
children: [
|
|
1214
1214
|
/* @__PURE__ */ M("p", {
|
|
1215
1215
|
className: "text-theme-light mb-3 text-xs",
|
|
1216
|
-
children: /* @__PURE__ */ M(
|
|
1216
|
+
children: /* @__PURE__ */ M(B, { id: "dd2ndz" })
|
|
1217
1217
|
}),
|
|
1218
|
-
/* @__PURE__ */ N(
|
|
1218
|
+
/* @__PURE__ */ N(e, {
|
|
1219
1219
|
direction: "vertical",
|
|
1220
1220
|
gap: "4",
|
|
1221
1221
|
children: [
|
|
1222
1222
|
/* @__PURE__ */ M(Y, {
|
|
1223
1223
|
code: ".r:*",
|
|
1224
|
-
description:
|
|
1224
|
+
description: c._({ id: "VV1fdg" })
|
|
1225
1225
|
}),
|
|
1226
1226
|
/* @__PURE__ */ M(Y, {
|
|
1227
1227
|
code: ".rlistings",
|
|
1228
|
-
description:
|
|
1228
|
+
description: c._({ id: "s/s1lz" })
|
|
1229
1229
|
}),
|
|
1230
1230
|
/* @__PURE__ */ M(Y, {
|
|
1231
1231
|
code: "PROJECT_ID:USER_ID",
|
|
1232
|
-
description:
|
|
1232
|
+
description: c._({ id: "zhM8FP" })
|
|
1233
1233
|
}),
|
|
1234
1234
|
/* @__PURE__ */ M(Y, {
|
|
1235
1235
|
code: "PROJECT_ID:*",
|
|
1236
|
-
description:
|
|
1236
|
+
description: c._({ id: "BCJPTn" })
|
|
1237
1237
|
}),
|
|
1238
1238
|
/* @__PURE__ */ M(Y, {
|
|
1239
1239
|
code: "*:USER_ID",
|
|
1240
|
-
description:
|
|
1240
|
+
description: c._({ id: "/xnbdQ" })
|
|
1241
1241
|
})
|
|
1242
1242
|
]
|
|
1243
1243
|
}),
|
|
1244
1244
|
/* @__PURE__ */ M("p", {
|
|
1245
1245
|
className: "text-theme-light mt-4 text-xs",
|
|
1246
|
-
children: /* @__PURE__ */ M(
|
|
1246
|
+
children: /* @__PURE__ */ M(B, {
|
|
1247
1247
|
id: "rrjuul",
|
|
1248
1248
|
components: { 0: /* @__PURE__ */ M("a", {
|
|
1249
1249
|
href: "https://docs.openstack.org/swift/latest/overview_acl.html",
|
|
@@ -1260,7 +1260,7 @@ var de = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) =>
|
|
|
1260
1260
|
});
|
|
1261
1261
|
};
|
|
1262
1262
|
function Y({ code: e, description: t }) {
|
|
1263
|
-
return /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M(
|
|
1263
|
+
return /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M(r, {
|
|
1264
1264
|
variant: "info",
|
|
1265
1265
|
className: "mb-1 font-mono text-xs",
|
|
1266
1266
|
children: e
|
|
@@ -1275,65 +1275,65 @@ function fe({ label: e }) {
|
|
|
1275
1275
|
children: [/* @__PURE__ */ M("label", {
|
|
1276
1276
|
className: "text-theme-default text-sm font-semibold",
|
|
1277
1277
|
children: e
|
|
1278
|
-
}), /* @__PURE__ */ N(
|
|
1278
|
+
}), /* @__PURE__ */ N(c, {
|
|
1279
1279
|
triggerEvent: "hover",
|
|
1280
|
-
children: [/* @__PURE__ */ M(
|
|
1280
|
+
children: [/* @__PURE__ */ M(S, { children: /* @__PURE__ */ M(h, {
|
|
1281
1281
|
icon: "info",
|
|
1282
1282
|
size: "14",
|
|
1283
1283
|
className: "text-theme-light cursor-help"
|
|
1284
|
-
}) }), /* @__PURE__ */ M(
|
|
1284
|
+
}) }), /* @__PURE__ */ M(o, {
|
|
1285
1285
|
className: "z-10 max-w-[350px]",
|
|
1286
|
-
children: /* @__PURE__ */ M(
|
|
1286
|
+
children: /* @__PURE__ */ M(B, { id: "AdtLNV" })
|
|
1287
1287
|
})]
|
|
1288
1288
|
})]
|
|
1289
1289
|
});
|
|
1290
1290
|
}
|
|
1291
1291
|
//#endregion
|
|
1292
1292
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ContainerTableView.tsx
|
|
1293
|
-
var pe = ({ containers: e, createModalOpen:
|
|
1294
|
-
let { projectId:
|
|
1293
|
+
var pe = ({ containers: e, createModalOpen: r, setCreateModalOpen: i, maxContainerNameLength: a, onCreateSuccess: o, onCreateError: c, onEmptySuccess: u, onEmptyError: p, onDeleteSuccess: h, onDeleteError: g, onPropertiesSuccess: _, onPropertiesError: v, onAclSuccess: y, onAclError: b, selectedContainers: x, setSelectedContainers: S }) => {
|
|
1294
|
+
let { projectId: C, provider: T } = z({ from: "/_auth/projects/$projectId/storage/$provider/containers/" }), { i18n: E, _: D } = V(), O = ee(), A = L(null), [P, F] = R(0), [H, U] = R(null), [K, re] = R(null), [ie, oe] = R(null), [q, se] = R(null);
|
|
1295
1295
|
I(() => {
|
|
1296
1296
|
A.current && F(A.current.offsetWidth - A.current.clientWidth);
|
|
1297
1297
|
}, [e.length]);
|
|
1298
|
-
let
|
|
1298
|
+
let ce = (e) => {
|
|
1299
1299
|
try {
|
|
1300
1300
|
return new Date(e).toLocaleString();
|
|
1301
1301
|
} catch {
|
|
1302
1302
|
return E._({ id: "fj5byd" });
|
|
1303
1303
|
}
|
|
1304
|
-
},
|
|
1304
|
+
}, le = W({
|
|
1305
1305
|
count: e.length,
|
|
1306
1306
|
getScrollElement: () => A.current,
|
|
1307
1307
|
estimateSize: () => 48,
|
|
1308
1308
|
overscan: 10
|
|
1309
|
-
}),
|
|
1310
|
-
|
|
1309
|
+
}), J = new Set(x), ue = e.length > 0 && e.every((e) => J.has(e.name)), Y = () => {
|
|
1310
|
+
S(ue ? [] : e.map((e) => e.name));
|
|
1311
1311
|
}, fe = (e) => {
|
|
1312
|
-
|
|
1312
|
+
x.includes(e) ? S(x.filter((t) => t !== e)) : S([...x, e]);
|
|
1313
1313
|
};
|
|
1314
|
-
if (!e || e.length === 0) return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(
|
|
1314
|
+
if (!e || e.length === 0) return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(w, {
|
|
1315
1315
|
columns: 4,
|
|
1316
1316
|
className: "containers",
|
|
1317
1317
|
"data-testid": "no-containers",
|
|
1318
|
-
children: /* @__PURE__ */ M(
|
|
1318
|
+
children: /* @__PURE__ */ M(s, { children: /* @__PURE__ */ M(t, {
|
|
1319
1319
|
colSpan: 4,
|
|
1320
1320
|
children: /* @__PURE__ */ N("div", {
|
|
1321
1321
|
className: "py-8 text-center",
|
|
1322
1322
|
children: [/* @__PURE__ */ M("h3", {
|
|
1323
1323
|
className: "text-lg font-semibold",
|
|
1324
|
-
children: /* @__PURE__ */ M(
|
|
1324
|
+
children: /* @__PURE__ */ M(B, { id: "Hiw1Ha" })
|
|
1325
1325
|
}), /* @__PURE__ */ M("p", {
|
|
1326
1326
|
className: "text-theme-light mt-2",
|
|
1327
|
-
children: /* @__PURE__ */ M(
|
|
1327
|
+
children: /* @__PURE__ */ M(B, { id: "x1bK0h" })
|
|
1328
1328
|
})]
|
|
1329
1329
|
})
|
|
1330
1330
|
}) })
|
|
1331
|
-
}), /* @__PURE__ */ M(
|
|
1332
|
-
isOpen:
|
|
1333
|
-
onClose: () =>
|
|
1334
|
-
onSuccess:
|
|
1335
|
-
onError:
|
|
1336
|
-
maxContainerNameLength:
|
|
1331
|
+
}), /* @__PURE__ */ M(G, {
|
|
1332
|
+
isOpen: r,
|
|
1333
|
+
onClose: () => i(!1),
|
|
1334
|
+
onSuccess: o,
|
|
1335
|
+
onError: c,
|
|
1336
|
+
maxContainerNameLength: a
|
|
1337
1337
|
})] });
|
|
1338
1338
|
let pe = "40px minmax(200px, 2fr) minmax(100px, 1fr) minmax(180px, 2fr) minmax(100px, 1fr) 60px";
|
|
1339
1339
|
return /* @__PURE__ */ N(j, { children: [
|
|
@@ -1341,22 +1341,22 @@ var pe = ({ containers: e, createModalOpen: t, setCreateModalOpen: n, maxContain
|
|
|
1341
1341
|
className: "relative",
|
|
1342
1342
|
children: [/* @__PURE__ */ M("div", {
|
|
1343
1343
|
style: { paddingRight: `${P}px` },
|
|
1344
|
-
children: /* @__PURE__ */ M(
|
|
1344
|
+
children: /* @__PURE__ */ M(w, {
|
|
1345
1345
|
columns: 6,
|
|
1346
1346
|
gridColumnTemplate: pe,
|
|
1347
1347
|
className: "containers",
|
|
1348
1348
|
"data-testid": "containers-table-header",
|
|
1349
|
-
children: /* @__PURE__ */ N(
|
|
1350
|
-
/* @__PURE__ */ M(
|
|
1349
|
+
children: /* @__PURE__ */ N(s, { children: [
|
|
1350
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(n, {
|
|
1351
1351
|
checked: ue,
|
|
1352
1352
|
onChange: Y,
|
|
1353
1353
|
"data-testid": "select-all-containers"
|
|
1354
1354
|
}) }),
|
|
1355
|
-
/* @__PURE__ */ M(
|
|
1356
|
-
/* @__PURE__ */ M(
|
|
1357
|
-
/* @__PURE__ */ M(
|
|
1358
|
-
/* @__PURE__ */ M(
|
|
1359
|
-
/* @__PURE__ */ M(
|
|
1355
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "t0X9+8" }) }),
|
|
1356
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "sxbP3b" }) }),
|
|
1357
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "sjMCOP" }) }),
|
|
1358
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "hgpMHD" }) }),
|
|
1359
|
+
/* @__PURE__ */ M(d, { style: { marginRight: `-${P}px` } })
|
|
1360
1360
|
] })
|
|
1361
1361
|
})
|
|
1362
1362
|
}), /* @__PURE__ */ M("div", {
|
|
@@ -1366,148 +1366,148 @@ var pe = ({ containers: e, createModalOpen: t, setCreateModalOpen: n, maxContain
|
|
|
1366
1366
|
"data-testid": "containers-table-body",
|
|
1367
1367
|
children: /* @__PURE__ */ M("div", {
|
|
1368
1368
|
style: {
|
|
1369
|
-
height: `${
|
|
1369
|
+
height: `${le.getTotalSize()}px`,
|
|
1370
1370
|
width: "100%",
|
|
1371
1371
|
position: "relative"
|
|
1372
1372
|
},
|
|
1373
|
-
children:
|
|
1374
|
-
let
|
|
1373
|
+
children: le.getVirtualItems().map((r) => {
|
|
1374
|
+
let i = e[r.index], a = x.includes(i.name), o = () => O({
|
|
1375
1375
|
to: "/projects/$projectId/storage/$provider/containers/$containerName/objects",
|
|
1376
1376
|
params: {
|
|
1377
|
-
projectId:
|
|
1377
|
+
projectId: C,
|
|
1378
1378
|
provider: T,
|
|
1379
|
-
containerName:
|
|
1379
|
+
containerName: i.name
|
|
1380
1380
|
}
|
|
1381
1381
|
});
|
|
1382
1382
|
return /* @__PURE__ */ N("div", {
|
|
1383
|
-
"data-index":
|
|
1384
|
-
ref:
|
|
1383
|
+
"data-index": r.index,
|
|
1384
|
+
ref: le.measureElement,
|
|
1385
1385
|
className: "juno-datagrid group hover:bg-theme-background-lvl-1 cursor-pointer",
|
|
1386
1386
|
style: {
|
|
1387
1387
|
position: "absolute",
|
|
1388
1388
|
top: 0,
|
|
1389
1389
|
left: 0,
|
|
1390
1390
|
width: "100%",
|
|
1391
|
-
transform: `translateY(${
|
|
1391
|
+
transform: `translateY(${r.start}px)`,
|
|
1392
1392
|
display: "grid",
|
|
1393
1393
|
gridTemplateColumns: pe,
|
|
1394
1394
|
alignItems: "stretch"
|
|
1395
1395
|
},
|
|
1396
|
-
"data-testid": `container-row-${
|
|
1396
|
+
"data-testid": `container-row-${i.name}`,
|
|
1397
1397
|
role: "link",
|
|
1398
1398
|
tabIndex: 0,
|
|
1399
|
-
onClick:
|
|
1399
|
+
onClick: o,
|
|
1400
1400
|
onKeyDown: (e) => {
|
|
1401
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
1401
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), o());
|
|
1402
1402
|
},
|
|
1403
1403
|
children: [
|
|
1404
|
-
/* @__PURE__ */ M(
|
|
1404
|
+
/* @__PURE__ */ M(t, {
|
|
1405
1405
|
onClick: (e) => e.stopPropagation(),
|
|
1406
1406
|
onKeyDown: (e) => {
|
|
1407
1407
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
1408
1408
|
},
|
|
1409
|
-
children: /* @__PURE__ */ M(
|
|
1410
|
-
checked:
|
|
1411
|
-
onChange: () => fe(
|
|
1412
|
-
"data-testid": `select-container-${
|
|
1409
|
+
children: /* @__PURE__ */ M(n, {
|
|
1410
|
+
checked: a,
|
|
1411
|
+
onChange: () => fe(i.name),
|
|
1412
|
+
"data-testid": `select-container-${i.name}`
|
|
1413
1413
|
})
|
|
1414
1414
|
}),
|
|
1415
|
-
/* @__PURE__ */ M(
|
|
1415
|
+
/* @__PURE__ */ M(t, {
|
|
1416
1416
|
className: "min-w-0 overflow-hidden",
|
|
1417
1417
|
children: /* @__PURE__ */ M("span", {
|
|
1418
1418
|
className: "block truncate",
|
|
1419
|
-
title:
|
|
1420
|
-
children:
|
|
1419
|
+
title: i.name,
|
|
1420
|
+
children: i.name
|
|
1421
1421
|
})
|
|
1422
1422
|
}),
|
|
1423
|
-
/* @__PURE__ */ M(
|
|
1424
|
-
/* @__PURE__ */ M(
|
|
1425
|
-
/* @__PURE__ */ M(
|
|
1426
|
-
/* @__PURE__ */ M(
|
|
1423
|
+
/* @__PURE__ */ M(t, { children: i.count.toLocaleString() }),
|
|
1424
|
+
/* @__PURE__ */ M(t, { children: i.last_modified ? ce(i.last_modified) : E._({ id: "fj5byd" }) }),
|
|
1425
|
+
/* @__PURE__ */ M(t, { children: k(i.bytes) }),
|
|
1426
|
+
/* @__PURE__ */ M(t, {
|
|
1427
1427
|
onClick: (e) => e.stopPropagation(),
|
|
1428
|
-
children: /* @__PURE__ */ M(
|
|
1429
|
-
/* @__PURE__ */ M(
|
|
1428
|
+
children: /* @__PURE__ */ M(m, { children: /* @__PURE__ */ N(l, { children: [
|
|
1429
|
+
/* @__PURE__ */ M(f, {
|
|
1430
1430
|
label: E._({ id: "cWbW6w" }),
|
|
1431
|
-
onClick: () =>
|
|
1432
|
-
"data-testid": `access-control-action-${
|
|
1431
|
+
onClick: () => se(i),
|
|
1432
|
+
"data-testid": `access-control-action-${i.name}`
|
|
1433
1433
|
}),
|
|
1434
|
-
/* @__PURE__ */ M(
|
|
1434
|
+
/* @__PURE__ */ M(f, {
|
|
1435
1435
|
label: E._({ id: "Oc8Aqv" }),
|
|
1436
|
-
onClick: () =>
|
|
1437
|
-
"data-testid": `properties-action-${
|
|
1436
|
+
onClick: () => oe(i),
|
|
1437
|
+
"data-testid": `properties-action-${i.name}`
|
|
1438
1438
|
}),
|
|
1439
|
-
/* @__PURE__ */ M(
|
|
1439
|
+
/* @__PURE__ */ M(f, {
|
|
1440
1440
|
label: E._({ id: "N2S1rs" }),
|
|
1441
|
-
onClick: () =>
|
|
1442
|
-
"data-testid": `empty-action-${
|
|
1441
|
+
onClick: () => U(i),
|
|
1442
|
+
"data-testid": `empty-action-${i.name}`
|
|
1443
1443
|
}),
|
|
1444
|
-
/* @__PURE__ */ M(
|
|
1444
|
+
/* @__PURE__ */ M(f, {
|
|
1445
1445
|
label: E._({ id: "cnGeoo" }),
|
|
1446
|
-
onClick: () =>
|
|
1447
|
-
"data-testid": `delete-action-${
|
|
1446
|
+
onClick: () => re(i),
|
|
1447
|
+
"data-testid": `delete-action-${i.name}`
|
|
1448
1448
|
})
|
|
1449
1449
|
] }) })
|
|
1450
1450
|
})
|
|
1451
1451
|
]
|
|
1452
|
-
},
|
|
1452
|
+
}, i.name);
|
|
1453
1453
|
})
|
|
1454
1454
|
})
|
|
1455
1455
|
})]
|
|
1456
1456
|
}),
|
|
1457
|
-
/* @__PURE__ */ M(
|
|
1458
|
-
isOpen:
|
|
1459
|
-
onClose: () =>
|
|
1460
|
-
onSuccess:
|
|
1461
|
-
onError:
|
|
1462
|
-
maxContainerNameLength:
|
|
1457
|
+
/* @__PURE__ */ M(G, {
|
|
1458
|
+
isOpen: r,
|
|
1459
|
+
onClose: () => i(!1),
|
|
1460
|
+
onSuccess: o,
|
|
1461
|
+
onError: c,
|
|
1462
|
+
maxContainerNameLength: a
|
|
1463
1463
|
}),
|
|
1464
|
-
/* @__PURE__ */ M(
|
|
1465
|
-
isOpen:
|
|
1466
|
-
container:
|
|
1467
|
-
onClose: () =>
|
|
1464
|
+
/* @__PURE__ */ M(te, {
|
|
1465
|
+
isOpen: H !== null,
|
|
1466
|
+
container: H,
|
|
1467
|
+
onClose: () => U(null),
|
|
1468
1468
|
onSuccess: u,
|
|
1469
|
-
onError:
|
|
1469
|
+
onError: p
|
|
1470
1470
|
}),
|
|
1471
|
-
/* @__PURE__ */ M(
|
|
1472
|
-
isOpen:
|
|
1473
|
-
container:
|
|
1474
|
-
onClose: () =>
|
|
1475
|
-
onSuccess:
|
|
1471
|
+
/* @__PURE__ */ M(ne, {
|
|
1472
|
+
isOpen: K !== null,
|
|
1473
|
+
container: K,
|
|
1474
|
+
onClose: () => re(null),
|
|
1475
|
+
onSuccess: h,
|
|
1476
1476
|
onError: g
|
|
1477
1477
|
}),
|
|
1478
|
-
/* @__PURE__ */ M(
|
|
1479
|
-
isOpen:
|
|
1480
|
-
container:
|
|
1481
|
-
onClose: () =>
|
|
1478
|
+
/* @__PURE__ */ M(ae, {
|
|
1479
|
+
isOpen: ie !== null,
|
|
1480
|
+
container: ie,
|
|
1481
|
+
onClose: () => oe(null),
|
|
1482
1482
|
onSuccess: _,
|
|
1483
|
-
onError:
|
|
1483
|
+
onError: v
|
|
1484
1484
|
}),
|
|
1485
1485
|
/* @__PURE__ */ M(de, {
|
|
1486
|
-
isOpen:
|
|
1487
|
-
container:
|
|
1488
|
-
onClose: () =>
|
|
1489
|
-
onSuccess:
|
|
1490
|
-
onError:
|
|
1486
|
+
isOpen: q !== null,
|
|
1487
|
+
container: q,
|
|
1488
|
+
onClose: () => se(null),
|
|
1489
|
+
onSuccess: y,
|
|
1490
|
+
onError: b
|
|
1491
1491
|
})
|
|
1492
1492
|
] });
|
|
1493
1493
|
};
|
|
1494
1494
|
//#endregion
|
|
1495
1495
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ContainerToastNotifications.tsx
|
|
1496
|
-
function X({ title:
|
|
1497
|
-
return /* @__PURE__ */ N(
|
|
1496
|
+
function X({ title: t, description: n }) {
|
|
1497
|
+
return /* @__PURE__ */ N(e, {
|
|
1498
1498
|
direction: "vertical",
|
|
1499
1499
|
gap: "1.5",
|
|
1500
|
-
children: [/* @__PURE__ */ M("span", { children:
|
|
1500
|
+
children: [/* @__PURE__ */ M("span", { children: t }), /* @__PURE__ */ M("span", {
|
|
1501
1501
|
className: "text-theme-light",
|
|
1502
|
-
children:
|
|
1502
|
+
children: n
|
|
1503
1503
|
})]
|
|
1504
1504
|
});
|
|
1505
1505
|
}
|
|
1506
1506
|
var me = (e, t) => ({
|
|
1507
1507
|
variant: "success",
|
|
1508
1508
|
children: /* @__PURE__ */ M(X, {
|
|
1509
|
-
title: /* @__PURE__ */ M(
|
|
1510
|
-
description: /* @__PURE__ */ M(
|
|
1509
|
+
title: /* @__PURE__ */ M(B, { id: "6w+VnM" }),
|
|
1510
|
+
description: /* @__PURE__ */ M(B, {
|
|
1511
1511
|
id: "XwxJJB",
|
|
1512
1512
|
values: { containerName: e }
|
|
1513
1513
|
})
|
|
@@ -1518,8 +1518,8 @@ var me = (e, t) => ({
|
|
|
1518
1518
|
}), he = (e, t, n) => ({
|
|
1519
1519
|
variant: "error",
|
|
1520
1520
|
children: /* @__PURE__ */ M(X, {
|
|
1521
|
-
title: /* @__PURE__ */ M(
|
|
1522
|
-
description: /* @__PURE__ */ M(
|
|
1521
|
+
title: /* @__PURE__ */ M(B, { id: "Vj8XFg" }),
|
|
1522
|
+
description: /* @__PURE__ */ M(B, {
|
|
1523
1523
|
id: "Vz+7ZA",
|
|
1524
1524
|
values: {
|
|
1525
1525
|
containerName: e,
|
|
@@ -1533,17 +1533,17 @@ var me = (e, t) => ({
|
|
|
1533
1533
|
}), ge = (e, t, n) => ({
|
|
1534
1534
|
variant: "success",
|
|
1535
1535
|
children: /* @__PURE__ */ M(X, {
|
|
1536
|
-
title: /* @__PURE__ */ M(
|
|
1537
|
-
description: t === 0 ? /* @__PURE__ */ M(
|
|
1536
|
+
title: /* @__PURE__ */ M(B, { id: "6OopEX" }),
|
|
1537
|
+
description: t === 0 ? /* @__PURE__ */ M(B, {
|
|
1538
1538
|
id: "nkpZyk",
|
|
1539
1539
|
values: { containerName: e }
|
|
1540
|
-
}) : t === 1 ? /* @__PURE__ */ M(
|
|
1540
|
+
}) : t === 1 ? /* @__PURE__ */ M(B, {
|
|
1541
1541
|
id: "TZJiVf",
|
|
1542
1542
|
values: {
|
|
1543
1543
|
containerName: e,
|
|
1544
1544
|
deletedCount: t
|
|
1545
1545
|
}
|
|
1546
|
-
}) : /* @__PURE__ */ M(
|
|
1546
|
+
}) : /* @__PURE__ */ M(B, {
|
|
1547
1547
|
id: "Sb/VT5",
|
|
1548
1548
|
values: {
|
|
1549
1549
|
containerName: e,
|
|
@@ -1557,8 +1557,8 @@ var me = (e, t) => ({
|
|
|
1557
1557
|
}), _e = (e, t, n) => ({
|
|
1558
1558
|
variant: "error",
|
|
1559
1559
|
children: /* @__PURE__ */ M(X, {
|
|
1560
|
-
title: /* @__PURE__ */ M(
|
|
1561
|
-
description: /* @__PURE__ */ M(
|
|
1560
|
+
title: /* @__PURE__ */ M(B, { id: "S8/j2h" }),
|
|
1561
|
+
description: /* @__PURE__ */ M(B, {
|
|
1562
1562
|
id: "1rLu3+",
|
|
1563
1563
|
values: {
|
|
1564
1564
|
containerName: e,
|
|
@@ -1572,8 +1572,8 @@ var me = (e, t) => ({
|
|
|
1572
1572
|
}), ve = (e, t) => ({
|
|
1573
1573
|
variant: "success",
|
|
1574
1574
|
children: /* @__PURE__ */ M(X, {
|
|
1575
|
-
title: /* @__PURE__ */ M(
|
|
1576
|
-
description: /* @__PURE__ */ M(
|
|
1575
|
+
title: /* @__PURE__ */ M(B, { id: "odVI9Y" }),
|
|
1576
|
+
description: /* @__PURE__ */ M(B, {
|
|
1577
1577
|
id: "V1TzeS",
|
|
1578
1578
|
values: { containerName: e }
|
|
1579
1579
|
})
|
|
@@ -1584,8 +1584,8 @@ var me = (e, t) => ({
|
|
|
1584
1584
|
}), Z = (e, t, n) => ({
|
|
1585
1585
|
variant: "error",
|
|
1586
1586
|
children: /* @__PURE__ */ M(X, {
|
|
1587
|
-
title: /* @__PURE__ */ M(
|
|
1588
|
-
description: /* @__PURE__ */ M(
|
|
1587
|
+
title: /* @__PURE__ */ M(B, { id: "BJt+PJ" }),
|
|
1588
|
+
description: /* @__PURE__ */ M(B, {
|
|
1589
1589
|
id: "RGrgxg",
|
|
1590
1590
|
values: {
|
|
1591
1591
|
containerName: e,
|
|
@@ -1599,8 +1599,8 @@ var me = (e, t) => ({
|
|
|
1599
1599
|
}), ye = (e, t) => ({
|
|
1600
1600
|
variant: "success",
|
|
1601
1601
|
children: /* @__PURE__ */ M(X, {
|
|
1602
|
-
title: /* @__PURE__ */ M(
|
|
1603
|
-
description: /* @__PURE__ */ M(
|
|
1602
|
+
title: /* @__PURE__ */ M(B, { id: "a7C4YS" }),
|
|
1603
|
+
description: /* @__PURE__ */ M(B, {
|
|
1604
1604
|
id: "/NeNjH",
|
|
1605
1605
|
values: { containerName: e }
|
|
1606
1606
|
})
|
|
@@ -1611,8 +1611,8 @@ var me = (e, t) => ({
|
|
|
1611
1611
|
}), be = (e, t, n) => ({
|
|
1612
1612
|
variant: "error",
|
|
1613
1613
|
children: /* @__PURE__ */ M(X, {
|
|
1614
|
-
title: /* @__PURE__ */ M(
|
|
1615
|
-
description: /* @__PURE__ */ M(
|
|
1614
|
+
title: /* @__PURE__ */ M(B, { id: "5MF8U2" }),
|
|
1615
|
+
description: /* @__PURE__ */ M(B, {
|
|
1616
1616
|
id: "uLtFAr",
|
|
1617
1617
|
values: {
|
|
1618
1618
|
containerName: e,
|
|
@@ -1626,8 +1626,8 @@ var me = (e, t) => ({
|
|
|
1626
1626
|
}), xe = (e, t) => ({
|
|
1627
1627
|
variant: "success",
|
|
1628
1628
|
children: /* @__PURE__ */ M(X, {
|
|
1629
|
-
title: /* @__PURE__ */ M(
|
|
1630
|
-
description: /* @__PURE__ */ M(
|
|
1629
|
+
title: /* @__PURE__ */ M(B, { id: "olfSYj" }),
|
|
1630
|
+
description: /* @__PURE__ */ M(B, {
|
|
1631
1631
|
id: "tM5SEI",
|
|
1632
1632
|
values: { containerName: e }
|
|
1633
1633
|
})
|
|
@@ -1638,8 +1638,8 @@ var me = (e, t) => ({
|
|
|
1638
1638
|
}), Se = (e, t, n) => ({
|
|
1639
1639
|
variant: "error",
|
|
1640
1640
|
children: /* @__PURE__ */ M(X, {
|
|
1641
|
-
title: /* @__PURE__ */ M(
|
|
1642
|
-
description: /* @__PURE__ */ M(
|
|
1641
|
+
title: /* @__PURE__ */ M(B, { id: "p7DzCB" }),
|
|
1642
|
+
description: /* @__PURE__ */ M(B, {
|
|
1643
1643
|
id: "DcMIiu",
|
|
1644
1644
|
values: {
|
|
1645
1645
|
containerName: e,
|
|
@@ -1650,37 +1650,37 @@ var me = (e, t) => ({
|
|
|
1650
1650
|
autoDismiss: !0,
|
|
1651
1651
|
autoDismissTimeout: n.autoDismissTimeout ?? 5e3,
|
|
1652
1652
|
onDismiss: n.onDismiss
|
|
1653
|
-
}), Ce = (
|
|
1654
|
-
let
|
|
1653
|
+
}), Ce = (t, n, r, i) => {
|
|
1654
|
+
let a = r.length > 0, o = t > 0, s = a && o;
|
|
1655
1655
|
return {
|
|
1656
|
-
variant:
|
|
1656
|
+
variant: s ? "warning" : a ? "error" : "success",
|
|
1657
1657
|
children: /* @__PURE__ */ M(X, {
|
|
1658
|
-
title:
|
|
1659
|
-
description: /* @__PURE__ */ N(
|
|
1658
|
+
title: s ? /* @__PURE__ */ M(B, { id: "q44uUq" }) : a ? /* @__PURE__ */ M(B, { id: "wFaT8w" }) : /* @__PURE__ */ M(B, { id: "0WsqO0" }),
|
|
1659
|
+
description: /* @__PURE__ */ N(e, {
|
|
1660
1660
|
direction: "vertical",
|
|
1661
1661
|
gap: "1",
|
|
1662
|
-
children: [
|
|
1662
|
+
children: [o && /* @__PURE__ */ M("span", { children: /* @__PURE__ */ M(B, {
|
|
1663
1663
|
id: "1NS3nd",
|
|
1664
1664
|
values: {
|
|
1665
|
-
emptiedCount:
|
|
1666
|
-
totalDeleted:
|
|
1665
|
+
emptiedCount: t,
|
|
1666
|
+
totalDeleted: n
|
|
1667
1667
|
}
|
|
1668
|
-
}) }),
|
|
1668
|
+
}) }), a && /* @__PURE__ */ M("span", {
|
|
1669
1669
|
className: "whitespace-pre-line",
|
|
1670
|
-
children: /* @__PURE__ */ M(
|
|
1670
|
+
children: /* @__PURE__ */ M(B, {
|
|
1671
1671
|
id: "JrmKyf",
|
|
1672
|
-
values: { errorDetails:
|
|
1672
|
+
values: { errorDetails: r.join("\n") }
|
|
1673
1673
|
})
|
|
1674
1674
|
})]
|
|
1675
1675
|
})
|
|
1676
1676
|
}),
|
|
1677
1677
|
autoDismiss: !0,
|
|
1678
|
-
autoDismissTimeout:
|
|
1679
|
-
onDismiss:
|
|
1678
|
+
autoDismissTimeout: i.autoDismissTimeout ?? 5e3,
|
|
1679
|
+
onDismiss: i.onDismiss
|
|
1680
1680
|
};
|
|
1681
1681
|
}, Q = ({ label: e, value: t }) => t == null ? null : /* @__PURE__ */ N("span", {
|
|
1682
1682
|
className: "flex items-start gap-1.5",
|
|
1683
|
-
children: [/* @__PURE__ */ M(
|
|
1683
|
+
children: [/* @__PURE__ */ M(h, {
|
|
1684
1684
|
icon: "check",
|
|
1685
1685
|
size: "16px",
|
|
1686
1686
|
className: "text-theme-success mt-0.5 shrink-0"
|
|
@@ -1694,7 +1694,7 @@ var me = (e, t) => ({
|
|
|
1694
1694
|
] })]
|
|
1695
1695
|
}), we = ({ label: e }) => /* @__PURE__ */ N("span", {
|
|
1696
1696
|
className: "flex items-start gap-1.5",
|
|
1697
|
-
children: [/* @__PURE__ */ M(
|
|
1697
|
+
children: [/* @__PURE__ */ M(h, {
|
|
1698
1698
|
icon: "check",
|
|
1699
1699
|
size: "16px",
|
|
1700
1700
|
className: "text-theme-success mt-0.5 shrink-0"
|
|
@@ -1706,169 +1706,169 @@ var me = (e, t) => ({
|
|
|
1706
1706
|
children: e
|
|
1707
1707
|
}), t]
|
|
1708
1708
|
}), Ee = ({ serviceInfo: e, accountInfo: t }) => {
|
|
1709
|
-
let { i18n:
|
|
1710
|
-
account_quotas:
|
|
1711
|
-
container_quotas:
|
|
1712
|
-
bulk_delete:
|
|
1713
|
-
bulk_upload:
|
|
1714
|
-
slo:
|
|
1715
|
-
container_sync:
|
|
1716
|
-
tempurl:
|
|
1717
|
-
symlink:
|
|
1718
|
-
versioned_writes:
|
|
1719
|
-
},
|
|
1720
|
-
return /* @__PURE__ */ N(
|
|
1709
|
+
let { i18n: n, _: r } = V(), i = e?.swift, a = {
|
|
1710
|
+
account_quotas: n._({ id: "DJT9tB" }),
|
|
1711
|
+
container_quotas: n._({ id: "USiuNX" }),
|
|
1712
|
+
bulk_delete: n._({ id: "F6YIQe" }),
|
|
1713
|
+
bulk_upload: n._({ id: "2Inn83" }),
|
|
1714
|
+
slo: n._({ id: "cpw++p" }),
|
|
1715
|
+
container_sync: n._({ id: "ezT9KW" }),
|
|
1716
|
+
tempurl: n._({ id: "UO3hJ2" }),
|
|
1717
|
+
symlink: n._({ id: "Q2xmVl" }),
|
|
1718
|
+
versioned_writes: n._({ id: "8jLXs3" })
|
|
1719
|
+
}, s = Object.entries(a).filter(([e]) => i?.[e]).map(([, e]) => e);
|
|
1720
|
+
return /* @__PURE__ */ N(c, {
|
|
1721
1721
|
triggerEvent: "hover",
|
|
1722
1722
|
placement: "bottom-end",
|
|
1723
|
-
children: [/* @__PURE__ */ M(
|
|
1723
|
+
children: [/* @__PURE__ */ M(S, {
|
|
1724
1724
|
asChild: !0,
|
|
1725
|
-
children: /* @__PURE__ */ M(
|
|
1725
|
+
children: /* @__PURE__ */ M(h, {
|
|
1726
1726
|
icon: "info",
|
|
1727
1727
|
size: "20px",
|
|
1728
1728
|
className: "text-theme-light hover:text-theme-default cursor-pointer"
|
|
1729
1729
|
})
|
|
1730
|
-
}), /* @__PURE__ */ M(
|
|
1730
|
+
}), /* @__PURE__ */ M(o, {
|
|
1731
1731
|
className: "z-10 w-72 text-sm",
|
|
1732
1732
|
children: /* @__PURE__ */ N("span", {
|
|
1733
1733
|
className: "flex flex-col gap-3 p-1",
|
|
1734
1734
|
children: [
|
|
1735
1735
|
t && /* @__PURE__ */ N(Te, {
|
|
1736
|
-
title: /* @__PURE__ */ M(
|
|
1736
|
+
title: /* @__PURE__ */ M(B, { id: "AeXO77" }),
|
|
1737
1737
|
children: [
|
|
1738
1738
|
/* @__PURE__ */ M(Q, {
|
|
1739
|
-
label:
|
|
1739
|
+
label: n._({ id: "ClGcRq" }),
|
|
1740
1740
|
value: t.containerCount.toLocaleString()
|
|
1741
1741
|
}),
|
|
1742
1742
|
/* @__PURE__ */ M(Q, {
|
|
1743
|
-
label:
|
|
1743
|
+
label: n._({ id: "B3toQF" }),
|
|
1744
1744
|
value: t.objectCount.toLocaleString()
|
|
1745
1745
|
}),
|
|
1746
1746
|
/* @__PURE__ */ M(Q, {
|
|
1747
|
-
label:
|
|
1747
|
+
label: n._({ id: "aL1w5Z" }),
|
|
1748
1748
|
value: k(t.bytesUsed)
|
|
1749
1749
|
}),
|
|
1750
1750
|
t.quotaBytes !== void 0 && /* @__PURE__ */ M(Q, {
|
|
1751
|
-
label:
|
|
1751
|
+
label: n._({ id: "vEkTR9" }),
|
|
1752
1752
|
value: k(t.quotaBytes)
|
|
1753
1753
|
})
|
|
1754
1754
|
]
|
|
1755
1755
|
}),
|
|
1756
|
-
|
|
1757
|
-
title: /* @__PURE__ */ M(
|
|
1756
|
+
i && /* @__PURE__ */ N(Te, {
|
|
1757
|
+
title: /* @__PURE__ */ M(B, { id: "6BDqha" }),
|
|
1758
1758
|
children: [
|
|
1759
1759
|
/* @__PURE__ */ M(Q, {
|
|
1760
|
-
label:
|
|
1761
|
-
value:
|
|
1760
|
+
label: n._({ id: "wTg+FY" }),
|
|
1761
|
+
value: i.max_file_size === void 0 ? void 0 : k(i.max_file_size)
|
|
1762
1762
|
}),
|
|
1763
1763
|
/* @__PURE__ */ M(Q, {
|
|
1764
|
-
label:
|
|
1765
|
-
value:
|
|
1764
|
+
label: n._({ id: "Rih53k" }),
|
|
1765
|
+
value: i.max_container_name_length
|
|
1766
1766
|
}),
|
|
1767
1767
|
/* @__PURE__ */ M(Q, {
|
|
1768
|
-
label:
|
|
1769
|
-
value:
|
|
1768
|
+
label: n._({ id: "qAkkjP" }),
|
|
1769
|
+
value: i.max_object_name_length
|
|
1770
1770
|
}),
|
|
1771
1771
|
/* @__PURE__ */ M(Q, {
|
|
1772
|
-
label:
|
|
1773
|
-
value:
|
|
1772
|
+
label: n._({ id: "OZImTR" }),
|
|
1773
|
+
value: i.container_listing_limit?.toLocaleString()
|
|
1774
1774
|
}),
|
|
1775
1775
|
/* @__PURE__ */ M(Q, {
|
|
1776
|
-
label:
|
|
1777
|
-
value:
|
|
1776
|
+
label: n._({ id: "a4A2uB" }),
|
|
1777
|
+
value: i.account_listing_limit?.toLocaleString()
|
|
1778
1778
|
}),
|
|
1779
1779
|
/* @__PURE__ */ M(Q, {
|
|
1780
|
-
label:
|
|
1781
|
-
value:
|
|
1780
|
+
label: n._({ id: "zWb/Nn" }),
|
|
1781
|
+
value: i.max_header_size
|
|
1782
1782
|
}),
|
|
1783
1783
|
/* @__PURE__ */ M(Q, {
|
|
1784
|
-
label:
|
|
1785
|
-
value:
|
|
1784
|
+
label: n._({ id: "RGwfoL" }),
|
|
1785
|
+
value: i.max_meta_count
|
|
1786
1786
|
}),
|
|
1787
1787
|
/* @__PURE__ */ M(Q, {
|
|
1788
|
-
label:
|
|
1789
|
-
value:
|
|
1788
|
+
label: n._({ id: "8c3/77" }),
|
|
1789
|
+
value: i.max_meta_name_length
|
|
1790
1790
|
}),
|
|
1791
1791
|
/* @__PURE__ */ M(Q, {
|
|
1792
|
-
label:
|
|
1793
|
-
value:
|
|
1792
|
+
label: n._({ id: "5JDSvn" }),
|
|
1793
|
+
value: i.max_meta_value_length
|
|
1794
1794
|
}),
|
|
1795
1795
|
/* @__PURE__ */ M(Q, {
|
|
1796
|
-
label:
|
|
1797
|
-
value:
|
|
1796
|
+
label: n._({ id: "ZAx+d1" }),
|
|
1797
|
+
value: i.max_meta_overall_size
|
|
1798
1798
|
}),
|
|
1799
|
-
|
|
1800
|
-
label:
|
|
1801
|
-
value:
|
|
1799
|
+
i.bulk_delete && /* @__PURE__ */ M(Q, {
|
|
1800
|
+
label: n._({ id: "lQ3EIe" }),
|
|
1801
|
+
value: i.bulk_delete.max_deletes_per_request.toLocaleString()
|
|
1802
1802
|
}),
|
|
1803
|
-
|
|
1804
|
-
label:
|
|
1805
|
-
value:
|
|
1803
|
+
i.bulk_upload && /* @__PURE__ */ M(Q, {
|
|
1804
|
+
label: n._({ id: "STc+7E" }),
|
|
1805
|
+
value: i.bulk_upload.max_containers_per_extraction.toLocaleString()
|
|
1806
1806
|
}),
|
|
1807
|
-
|
|
1808
|
-
label:
|
|
1809
|
-
value:
|
|
1807
|
+
i.slo && /* @__PURE__ */ M(Q, {
|
|
1808
|
+
label: n._({ id: "RNBvdl" }),
|
|
1809
|
+
value: i.slo.max_manifest_segments.toLocaleString()
|
|
1810
1810
|
})
|
|
1811
1811
|
]
|
|
1812
1812
|
}),
|
|
1813
|
-
|
|
1814
|
-
title: /* @__PURE__ */ M(
|
|
1815
|
-
children:
|
|
1813
|
+
s.length > 0 && /* @__PURE__ */ M(Te, {
|
|
1814
|
+
title: /* @__PURE__ */ M(B, { id: "Qx7DM7" }),
|
|
1815
|
+
children: s.map((e) => /* @__PURE__ */ M(we, { label: e }, e))
|
|
1816
1816
|
})
|
|
1817
1817
|
]
|
|
1818
1818
|
})
|
|
1819
1819
|
})]
|
|
1820
1820
|
});
|
|
1821
|
-
}, De = 20, Oe = ({ isOpen:
|
|
1822
|
-
let { i18n:
|
|
1823
|
-
|
|
1824
|
-
},
|
|
1825
|
-
let e = 0,
|
|
1826
|
-
for (let
|
|
1827
|
-
|
|
1828
|
-
current:
|
|
1829
|
-
total:
|
|
1821
|
+
}, De = 20, Oe = ({ isOpen: t, containers: n, onClose: r, onComplete: a }) => {
|
|
1822
|
+
let { i18n: o, _: s } = V(), c = A(), [l, u] = R(null), d = T.useUtils(), f = T.storage.swift.emptyContainer.useMutation(), p = () => {
|
|
1823
|
+
f.reset(), u(null), r();
|
|
1824
|
+
}, m = async () => {
|
|
1825
|
+
let e = 0, t = 0, r = [], i = n.length;
|
|
1826
|
+
for (let a = 0; a < n.length; a++) {
|
|
1827
|
+
u({
|
|
1828
|
+
current: a + 1,
|
|
1829
|
+
total: i
|
|
1830
1830
|
});
|
|
1831
|
-
let
|
|
1831
|
+
let o = n[a];
|
|
1832
1832
|
try {
|
|
1833
|
-
let
|
|
1834
|
-
project_id:
|
|
1835
|
-
container:
|
|
1833
|
+
let n = await f.mutateAsync({
|
|
1834
|
+
project_id: c,
|
|
1835
|
+
container: o.name
|
|
1836
1836
|
});
|
|
1837
|
-
|
|
1837
|
+
t += n, e++;
|
|
1838
1838
|
} catch (e) {
|
|
1839
1839
|
let t = e instanceof Error ? e.message : String(e);
|
|
1840
|
-
|
|
1840
|
+
r.push(`${o.name}: ${t}`);
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
|
-
e > 0 && await
|
|
1843
|
+
e > 0 && await d.storage.swift.listContainers.invalidate(), a?.({
|
|
1844
1844
|
emptiedCount: e,
|
|
1845
|
-
totalDeleted:
|
|
1846
|
-
errors:
|
|
1847
|
-
}),
|
|
1845
|
+
totalDeleted: t,
|
|
1846
|
+
errors: r
|
|
1847
|
+
}), p();
|
|
1848
1848
|
};
|
|
1849
|
-
if (!
|
|
1850
|
-
let
|
|
1851
|
-
return /* @__PURE__ */ M(
|
|
1852
|
-
title:
|
|
1853
|
-
open:
|
|
1854
|
-
onCancel:
|
|
1855
|
-
confirmButtonLabel:
|
|
1849
|
+
if (!t || n.length === 0) return null;
|
|
1850
|
+
let h = n.length, g = n.slice(0, De), _ = h - g.length, y = f.isPending || l !== null, b = l?.current, x = l?.total;
|
|
1851
|
+
return /* @__PURE__ */ M(v, {
|
|
1852
|
+
title: o._({ id: "aOeFR+" }),
|
|
1853
|
+
open: t,
|
|
1854
|
+
onCancel: p,
|
|
1855
|
+
confirmButtonLabel: y ? o._({ id: "s4Vnq2" }) : o._({ id: "N2S1rs" }),
|
|
1856
1856
|
confirmButtonVariant: "primary-danger",
|
|
1857
|
-
cancelButtonLabel:
|
|
1858
|
-
onConfirm:
|
|
1859
|
-
disableConfirmButton:
|
|
1860
|
-
disableCancelButton:
|
|
1861
|
-
disableCloseButton:
|
|
1857
|
+
cancelButtonLabel: o._({ id: "dEgA5A" }),
|
|
1858
|
+
onConfirm: m,
|
|
1859
|
+
disableConfirmButton: y,
|
|
1860
|
+
disableCancelButton: y,
|
|
1861
|
+
disableCloseButton: y,
|
|
1862
1862
|
size: "small",
|
|
1863
|
-
children:
|
|
1863
|
+
children: y ? /* @__PURE__ */ N(e, {
|
|
1864
1864
|
direction: "vertical",
|
|
1865
1865
|
distribution: "center",
|
|
1866
1866
|
alignment: "center",
|
|
1867
1867
|
gap: "2",
|
|
1868
1868
|
className: "py-4",
|
|
1869
|
-
children: [/* @__PURE__ */ M(
|
|
1869
|
+
children: [/* @__PURE__ */ M(i, { variant: "primary" }), l && /* @__PURE__ */ M("p", {
|
|
1870
1870
|
className: "text-theme-light text-sm",
|
|
1871
|
-
children: /* @__PURE__ */ M(
|
|
1871
|
+
children: /* @__PURE__ */ M(B, {
|
|
1872
1872
|
id: "7NSdfG",
|
|
1873
1873
|
values: {
|
|
1874
1874
|
progressCurrent: b,
|
|
@@ -1881,9 +1881,9 @@ var me = (e, t) => ({
|
|
|
1881
1881
|
children: [/* @__PURE__ */ N("p", {
|
|
1882
1882
|
className: "text-theme-default mb-6",
|
|
1883
1883
|
children: [
|
|
1884
|
-
/* @__PURE__ */ M(
|
|
1884
|
+
/* @__PURE__ */ M(B, { id: "JuOpPY" }),
|
|
1885
1885
|
/* @__PURE__ */ M("br", {}),
|
|
1886
|
-
/* @__PURE__ */ M(
|
|
1886
|
+
/* @__PURE__ */ M(B, {
|
|
1887
1887
|
id: "sheDTJ",
|
|
1888
1888
|
components: {
|
|
1889
1889
|
0: /* @__PURE__ */ M("strong", {}),
|
|
@@ -1895,23 +1895,23 @@ var me = (e, t) => ({
|
|
|
1895
1895
|
className: "mb-6",
|
|
1896
1896
|
children: [/* @__PURE__ */ M("h3", {
|
|
1897
1897
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
1898
|
-
children: /* @__PURE__ */ M(
|
|
1898
|
+
children: /* @__PURE__ */ M(B, {
|
|
1899
1899
|
id: "VKmlZ+",
|
|
1900
|
-
values: { totalCount:
|
|
1900
|
+
values: { totalCount: h }
|
|
1901
1901
|
})
|
|
1902
1902
|
}), /* @__PURE__ */ N("div", {
|
|
1903
1903
|
className: "jn:bg-theme-background-lvl-1 max-h-48 overflow-y-auto rounded p-4",
|
|
1904
1904
|
children: [/* @__PURE__ */ M("ul", {
|
|
1905
1905
|
className: "space-y-1",
|
|
1906
|
-
children:
|
|
1906
|
+
children: g.map((e) => /* @__PURE__ */ M("li", {
|
|
1907
1907
|
className: "jn:text-theme-default font-mono text-sm",
|
|
1908
1908
|
children: e.name
|
|
1909
1909
|
}, e.name))
|
|
1910
|
-
}),
|
|
1910
|
+
}), _ > 0 && /* @__PURE__ */ M("p", {
|
|
1911
1911
|
className: "text-theme-light mt-2 text-xs",
|
|
1912
|
-
children: /* @__PURE__ */ M(
|
|
1912
|
+
children: /* @__PURE__ */ M(B, {
|
|
1913
1913
|
id: "yqPflB",
|
|
1914
|
-
values: { hiddenCount:
|
|
1914
|
+
values: { hiddenCount: _ }
|
|
1915
1915
|
})
|
|
1916
1916
|
})]
|
|
1917
1917
|
})]
|
|
@@ -1919,60 +1919,60 @@ var me = (e, t) => ({
|
|
|
1919
1919
|
})
|
|
1920
1920
|
});
|
|
1921
1921
|
}, ke = () => {
|
|
1922
|
-
let { i18n:
|
|
1923
|
-
|
|
1922
|
+
let { i18n: t, _: n } = V(), r = A(), a = ee({ from: E.fullPath }), { sortBy: o, sortDirection: s, search: c = "" } = E.useSearch(), [l, u] = R(!1), [d, f] = R(!1), [m, h] = R([]), [g, _] = R(null), v = () => _(null), b = (e) => {
|
|
1923
|
+
_(me(e, { onDismiss: v }));
|
|
1924
1924
|
}, x = (e, t) => {
|
|
1925
|
-
|
|
1925
|
+
_(he(e, t, { onDismiss: v }));
|
|
1926
1926
|
}, S = (e, t) => {
|
|
1927
|
-
|
|
1927
|
+
_(ge(e, t, { onDismiss: v }));
|
|
1928
1928
|
}, C = (e, t) => {
|
|
1929
|
-
|
|
1929
|
+
_(_e(e, t, { onDismiss: v }));
|
|
1930
1930
|
}, w = (e) => {
|
|
1931
|
-
|
|
1931
|
+
_(ve(e, { onDismiss: v }));
|
|
1932
1932
|
}, D = (e, t) => {
|
|
1933
|
-
|
|
1933
|
+
_(Z(e, t, { onDismiss: v }));
|
|
1934
1934
|
}, F = (e) => {
|
|
1935
|
-
|
|
1935
|
+
_(ye(e, { onDismiss: v }));
|
|
1936
1936
|
}, I = (e, t) => {
|
|
1937
|
-
|
|
1937
|
+
_(be(e, t, { onDismiss: v }));
|
|
1938
1938
|
}, L = (e) => {
|
|
1939
|
-
|
|
1940
|
-
},
|
|
1941
|
-
|
|
1942
|
-
},
|
|
1943
|
-
if (n.length === 0)
|
|
1939
|
+
_(xe(e, { onDismiss: v }));
|
|
1940
|
+
}, z = (e, t) => {
|
|
1941
|
+
_(Se(e, t, { onDismiss: v }));
|
|
1942
|
+
}, H = ({ emptiedCount: e, totalDeleted: t, errors: n }) => {
|
|
1943
|
+
if (n.length === 0) h([]);
|
|
1944
1944
|
else {
|
|
1945
1945
|
let e = new Set(n.map((e) => e.split(": ")[0]));
|
|
1946
|
-
|
|
1946
|
+
h((t) => t.filter((t) => e.has(t)));
|
|
1947
1947
|
}
|
|
1948
|
-
|
|
1949
|
-
},
|
|
1948
|
+
_(Ce(e, t, n, { onDismiss: v }));
|
|
1949
|
+
}, U = {
|
|
1950
1950
|
options: [
|
|
1951
1951
|
{
|
|
1952
|
-
label:
|
|
1952
|
+
label: t._({ id: "6YtxFj" }),
|
|
1953
1953
|
value: "name"
|
|
1954
1954
|
},
|
|
1955
1955
|
{
|
|
1956
|
-
label:
|
|
1956
|
+
label: t._({ id: "sxbP3b" }),
|
|
1957
1957
|
value: "count"
|
|
1958
1958
|
},
|
|
1959
1959
|
{
|
|
1960
|
-
label:
|
|
1960
|
+
label: t._({ id: "hgpMHD" }),
|
|
1961
1961
|
value: "bytes"
|
|
1962
1962
|
},
|
|
1963
1963
|
{
|
|
1964
|
-
label:
|
|
1964
|
+
label: t._({ id: "sjMCOP" }),
|
|
1965
1965
|
value: "last_modified"
|
|
1966
1966
|
}
|
|
1967
1967
|
],
|
|
1968
|
-
sortBy:
|
|
1969
|
-
sortDirection:
|
|
1970
|
-
}, { data:
|
|
1971
|
-
project_id:
|
|
1968
|
+
sortBy: o ?? "name",
|
|
1969
|
+
sortDirection: s ?? "asc"
|
|
1970
|
+
}, { data: W, isLoading: G, error: te } = T.storage.swift.listContainers.useQuery({
|
|
1971
|
+
project_id: r,
|
|
1972
1972
|
format: "json"
|
|
1973
|
-
}), { data:
|
|
1973
|
+
}), { data: ne } = T.storage.swift.getAccountMetadata.useQuery({ project_id: r }), { data: K } = T.storage.swift.getServiceInfo.useQuery(), re = (e) => [...e].sort((e, t) => {
|
|
1974
1974
|
let n;
|
|
1975
|
-
switch (
|
|
1975
|
+
switch (o ?? "name") {
|
|
1976
1976
|
case "name":
|
|
1977
1977
|
n = e.name.localeCompare(t.name);
|
|
1978
1978
|
break;
|
|
@@ -1988,74 +1988,74 @@ var me = (e, t) => ({
|
|
|
1988
1988
|
break;
|
|
1989
1989
|
default: n = e.name.localeCompare(t.name);
|
|
1990
1990
|
}
|
|
1991
|
-
return (
|
|
1992
|
-
}),
|
|
1991
|
+
return (s ?? "asc") === "desc" ? -n : n;
|
|
1992
|
+
}), ie = (W || []).filter((e) => e.name.toLowerCase().includes(c.toLowerCase())), ae = re(ie), oe = (e) => {
|
|
1993
1993
|
let t = typeof e == "string" ? e : "";
|
|
1994
1994
|
P(() => {
|
|
1995
|
-
|
|
1995
|
+
a({ search: (e) => ({
|
|
1996
1996
|
...e,
|
|
1997
1997
|
search: t || void 0
|
|
1998
1998
|
}) });
|
|
1999
1999
|
});
|
|
2000
|
-
},
|
|
2000
|
+
}, q = (e) => {
|
|
2001
2001
|
let t = e.sortBy?.toString() || "name", n = e.sortDirection || "asc";
|
|
2002
2002
|
P(() => {
|
|
2003
|
-
|
|
2003
|
+
a({ search: (e) => ({
|
|
2004
2004
|
...e,
|
|
2005
2005
|
sortBy: t,
|
|
2006
2006
|
sortDirection: n
|
|
2007
2007
|
}) });
|
|
2008
2008
|
});
|
|
2009
2009
|
};
|
|
2010
|
-
if (
|
|
2010
|
+
if (G) return /* @__PURE__ */ N(e, {
|
|
2011
2011
|
className: "fixed inset-0",
|
|
2012
2012
|
distribution: "center",
|
|
2013
2013
|
alignment: "center",
|
|
2014
2014
|
direction: "vertical",
|
|
2015
|
-
children: [/* @__PURE__ */ M(
|
|
2015
|
+
children: [/* @__PURE__ */ M(i, {
|
|
2016
2016
|
variant: "primary",
|
|
2017
2017
|
size: "large",
|
|
2018
2018
|
className: "mb-2"
|
|
2019
|
-
}), /* @__PURE__ */ M(
|
|
2019
|
+
}), /* @__PURE__ */ M(B, { id: "WYiUDa" })]
|
|
2020
2020
|
});
|
|
2021
|
-
if (
|
|
2022
|
-
let
|
|
2023
|
-
return /* @__PURE__ */ M(
|
|
2021
|
+
if (te) {
|
|
2022
|
+
let t = te.message;
|
|
2023
|
+
return /* @__PURE__ */ M(e, {
|
|
2024
2024
|
className: "fixed inset-0",
|
|
2025
2025
|
distribution: "center",
|
|
2026
2026
|
alignment: "center",
|
|
2027
2027
|
direction: "vertical",
|
|
2028
|
-
children: /* @__PURE__ */ M(
|
|
2028
|
+
children: /* @__PURE__ */ M(B, {
|
|
2029
2029
|
id: "dLFiER",
|
|
2030
|
-
values: { errorMessage:
|
|
2030
|
+
values: { errorMessage: t }
|
|
2031
2031
|
})
|
|
2032
2032
|
});
|
|
2033
2033
|
}
|
|
2034
|
-
let
|
|
2034
|
+
let se = ne?.bytesUsed || 0, ce = ne?.quotaBytes || 0, le = ce > 0 ? ce - se : 0, J = (W || []).filter((e) => m.includes(e.name)), ue = J.length > 0, de = J.length, Y = (W || []).length, fe = ie.length;
|
|
2035
2035
|
return /* @__PURE__ */ N("div", {
|
|
2036
2036
|
className: "relative",
|
|
2037
2037
|
children: [
|
|
2038
2038
|
/* @__PURE__ */ M(O, {
|
|
2039
|
-
sortSettings:
|
|
2040
|
-
searchTerm:
|
|
2041
|
-
onSort:
|
|
2042
|
-
onSearch:
|
|
2043
|
-
actions: /* @__PURE__ */ N(
|
|
2039
|
+
sortSettings: U,
|
|
2040
|
+
searchTerm: c,
|
|
2041
|
+
onSort: q,
|
|
2042
|
+
onSearch: oe,
|
|
2043
|
+
actions: /* @__PURE__ */ N(e, {
|
|
2044
2044
|
direction: "horizontal",
|
|
2045
2045
|
gap: "4",
|
|
2046
2046
|
alignment: "center",
|
|
2047
|
-
children: [/* @__PURE__ */ M(
|
|
2047
|
+
children: [/* @__PURE__ */ M(y, {
|
|
2048
2048
|
variant: "primary",
|
|
2049
|
-
onClick: () =>
|
|
2050
|
-
children: /* @__PURE__ */ M(
|
|
2051
|
-
}), /* @__PURE__ */ M(
|
|
2049
|
+
onClick: () => u(!0),
|
|
2050
|
+
children: /* @__PURE__ */ M(B, { id: "vTh35P" })
|
|
2051
|
+
}), /* @__PURE__ */ M(y, {
|
|
2052
2052
|
variant: "primary-danger",
|
|
2053
|
-
onClick: () =>
|
|
2053
|
+
onClick: () => f(!0),
|
|
2054
2054
|
disabled: !ue,
|
|
2055
|
-
children: ue ? /* @__PURE__ */ M(
|
|
2055
|
+
children: ue ? /* @__PURE__ */ M(B, {
|
|
2056
2056
|
id: "dPBJAJ",
|
|
2057
2057
|
values: { selectedCount: de }
|
|
2058
|
-
}) : /* @__PURE__ */ M(
|
|
2058
|
+
}) : /* @__PURE__ */ M(B, { id: "kCLnJG" })
|
|
2059
2059
|
})]
|
|
2060
2060
|
})
|
|
2061
2061
|
}),
|
|
@@ -2063,36 +2063,36 @@ var me = (e, t) => ({
|
|
|
2063
2063
|
className: "text-theme-light bg-theme-background-lvl-1 flex items-center gap-1 px-4 py-2 text-sm",
|
|
2064
2064
|
"data-testid": "containers-info-block",
|
|
2065
2065
|
children: [
|
|
2066
|
-
fe === Y ? /* @__PURE__ */ M(
|
|
2066
|
+
fe === Y ? /* @__PURE__ */ M(B, {
|
|
2067
2067
|
id: "ywe1H/",
|
|
2068
2068
|
values: { totalCount: Y }
|
|
2069
|
-
}) : /* @__PURE__ */ M(
|
|
2069
|
+
}) : /* @__PURE__ */ M(B, {
|
|
2070
2070
|
id: "8uPTwT",
|
|
2071
2071
|
values: {
|
|
2072
2072
|
filteredCount: fe,
|
|
2073
2073
|
totalCount: Y
|
|
2074
2074
|
}
|
|
2075
2075
|
}),
|
|
2076
|
-
|
|
2077
|
-
/* @__PURE__ */ M(
|
|
2076
|
+
ce > 0 && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("span", { children: "," }), /* @__PURE__ */ N("span", { children: [
|
|
2077
|
+
/* @__PURE__ */ M(B, { id: "kKK8AH" }),
|
|
2078
2078
|
" ",
|
|
2079
2079
|
/* @__PURE__ */ M("span", {
|
|
2080
2080
|
className: "text-theme-default font-semibold",
|
|
2081
|
-
children: k(
|
|
2081
|
+
children: k(le)
|
|
2082
2082
|
})
|
|
2083
2083
|
] })] }),
|
|
2084
2084
|
/* @__PURE__ */ M(Ee, {
|
|
2085
|
-
serviceInfo:
|
|
2086
|
-
accountInfo:
|
|
2085
|
+
serviceInfo: K,
|
|
2086
|
+
accountInfo: ne
|
|
2087
2087
|
})
|
|
2088
2088
|
]
|
|
2089
2089
|
}),
|
|
2090
2090
|
/* @__PURE__ */ M(pe, {
|
|
2091
|
-
containers:
|
|
2092
|
-
createModalOpen:
|
|
2093
|
-
setCreateModalOpen:
|
|
2094
|
-
maxContainerNameLength:
|
|
2095
|
-
onCreateSuccess:
|
|
2091
|
+
containers: ae,
|
|
2092
|
+
createModalOpen: l,
|
|
2093
|
+
setCreateModalOpen: u,
|
|
2094
|
+
maxContainerNameLength: K?.swift?.max_container_name_length,
|
|
2095
|
+
onCreateSuccess: b,
|
|
2096
2096
|
onCreateError: x,
|
|
2097
2097
|
onEmptySuccess: S,
|
|
2098
2098
|
onEmptyError: C,
|
|
@@ -2101,18 +2101,18 @@ var me = (e, t) => ({
|
|
|
2101
2101
|
onPropertiesSuccess: F,
|
|
2102
2102
|
onPropertiesError: I,
|
|
2103
2103
|
onAclSuccess: L,
|
|
2104
|
-
onAclError:
|
|
2105
|
-
selectedContainers:
|
|
2106
|
-
setSelectedContainers:
|
|
2104
|
+
onAclError: z,
|
|
2105
|
+
selectedContainers: m,
|
|
2106
|
+
setSelectedContainers: h
|
|
2107
2107
|
}),
|
|
2108
2108
|
/* @__PURE__ */ M(Oe, {
|
|
2109
|
-
isOpen:
|
|
2110
|
-
containers:
|
|
2111
|
-
onClose: () =>
|
|
2112
|
-
onComplete:
|
|
2109
|
+
isOpen: d,
|
|
2110
|
+
containers: J,
|
|
2111
|
+
onClose: () => f(!1),
|
|
2112
|
+
onComplete: H
|
|
2113
2113
|
}),
|
|
2114
|
-
|
|
2115
|
-
...
|
|
2114
|
+
g && /* @__PURE__ */ M(p, {
|
|
2115
|
+
...g,
|
|
2116
2116
|
className: "border-theme-light fixed top-5 right-5 z-50 rounded-lg border shadow-lg"
|
|
2117
2117
|
})
|
|
2118
2118
|
]
|
|
@@ -2128,7 +2128,7 @@ var me = (e, t) => ({
|
|
|
2128
2128
|
"--x-s3",
|
|
2129
2129
|
"--table-s3"
|
|
2130
2130
|
], Pe = ({ isOpen: t, onClose: n, onSuccess: r, onError: i }) => {
|
|
2131
|
-
let { i18n: a, _: o } =
|
|
2131
|
+
let { i18n: a, _: o } = V(), s = A(), [c, l] = R(""), [d, f] = R(null), p = T.useUtils(), m = T.storage.ceph.containers.create.useMutation({
|
|
2132
2132
|
onSuccess: () => {
|
|
2133
2133
|
p.storage.ceph.containers.list.invalidate();
|
|
2134
2134
|
let e = c.trim();
|
|
@@ -2160,37 +2160,37 @@ var me = (e, t) => ({
|
|
|
2160
2160
|
values: { suffix: e }
|
|
2161
2161
|
})), !1;
|
|
2162
2162
|
return f(null), !0;
|
|
2163
|
-
},
|
|
2163
|
+
}, _ = (e) => {
|
|
2164
2164
|
let t = e.target.value;
|
|
2165
2165
|
l(t), d && g(t);
|
|
2166
|
-
},
|
|
2166
|
+
}, y = () => {
|
|
2167
2167
|
g(c) && m.mutate({
|
|
2168
2168
|
project_id: s,
|
|
2169
2169
|
bucketName: c.trim()
|
|
2170
2170
|
});
|
|
2171
2171
|
};
|
|
2172
|
-
return t ? /* @__PURE__ */ M(
|
|
2172
|
+
return t ? /* @__PURE__ */ M(v, {
|
|
2173
2173
|
title: a._({ id: "HiDAFk" }),
|
|
2174
2174
|
open: t,
|
|
2175
2175
|
onCancel: h,
|
|
2176
2176
|
confirmButtonLabel: a._({ id: "hYgDIe" }),
|
|
2177
|
-
onConfirm:
|
|
2177
|
+
onConfirm: y,
|
|
2178
2178
|
cancelButtonLabel: a._({ id: "dEgA5A" }),
|
|
2179
2179
|
size: "small",
|
|
2180
2180
|
disableConfirmButton: m.isPending || !c.trim(),
|
|
2181
|
-
children: /* @__PURE__ */ N(
|
|
2181
|
+
children: /* @__PURE__ */ N(e, {
|
|
2182
2182
|
direction: "vertical",
|
|
2183
2183
|
gap: "6",
|
|
2184
2184
|
children: [/* @__PURE__ */ M(u, {
|
|
2185
2185
|
variant: "info",
|
|
2186
|
-
children: /* @__PURE__ */ M(
|
|
2187
|
-
}), /* @__PURE__ */ M(
|
|
2186
|
+
children: /* @__PURE__ */ M(B, { id: "ASJMIw" })
|
|
2187
|
+
}), /* @__PURE__ */ M(C, {
|
|
2188
2188
|
label: a._({ id: "NNpgo3" }),
|
|
2189
2189
|
required: !0,
|
|
2190
2190
|
value: c,
|
|
2191
|
-
onChange:
|
|
2191
|
+
onChange: _,
|
|
2192
2192
|
onKeyDown: (e) => {
|
|
2193
|
-
e.key === "Enter" &&
|
|
2193
|
+
e.key === "Enter" && y();
|
|
2194
2194
|
},
|
|
2195
2195
|
invalid: !!d,
|
|
2196
2196
|
errortext: d || void 0,
|
|
@@ -2201,25 +2201,25 @@ var me = (e, t) => ({
|
|
|
2201
2201
|
})
|
|
2202
2202
|
}) : null;
|
|
2203
2203
|
}, Fe = ({ isOpen: t, bucket: n, onClose: r, onSuccess: i, onError: a }) => {
|
|
2204
|
-
let { i18n: o, _: s } =
|
|
2204
|
+
let { i18n: o, _: s } = V(), c = A(), [l, d] = R(""), [f, p] = R(null), [m, h] = R(!1), g = T.useUtils(), _ = () => {
|
|
2205
2205
|
n && navigator.clipboard.writeText(n.name).then(() => {
|
|
2206
|
-
|
|
2206
|
+
h(!0), setTimeout(() => h(!1), 2e3);
|
|
2207
2207
|
});
|
|
2208
|
-
},
|
|
2209
|
-
|
|
2210
|
-
} }),
|
|
2211
|
-
d(""),
|
|
2212
|
-
},
|
|
2208
|
+
}, b = T.storage.ceph.objects.deleteAll.useMutation({ onSettled: () => {
|
|
2209
|
+
g.storage.ceph.containers.list.invalidate(), x();
|
|
2210
|
+
} }), x = () => {
|
|
2211
|
+
d(""), p(null), h(!1), b.reset(), r();
|
|
2212
|
+
}, S = (e) => {
|
|
2213
2213
|
let t = e.target.value;
|
|
2214
|
-
d(t),
|
|
2214
|
+
d(t), f && p(null);
|
|
2215
2215
|
}, w = () => {
|
|
2216
2216
|
if (!n) return;
|
|
2217
2217
|
if (l.trim() !== n.name) {
|
|
2218
|
-
|
|
2218
|
+
p(o._({ id: "wxVsr5" }));
|
|
2219
2219
|
return;
|
|
2220
2220
|
}
|
|
2221
2221
|
let e = n.name;
|
|
2222
|
-
|
|
2222
|
+
b.mutate({
|
|
2223
2223
|
project_id: c,
|
|
2224
2224
|
containerName: e
|
|
2225
2225
|
}, {
|
|
@@ -2235,25 +2235,25 @@ var me = (e, t) => ({
|
|
|
2235
2235
|
};
|
|
2236
2236
|
if (!t || !n) return null;
|
|
2237
2237
|
let D = n.count === 0, O = n.count, k = n.name;
|
|
2238
|
-
return /* @__PURE__ */ M(
|
|
2238
|
+
return /* @__PURE__ */ M(v, {
|
|
2239
2239
|
title: o._({ id: "CfKRC1" }),
|
|
2240
2240
|
open: t,
|
|
2241
|
-
onCancel:
|
|
2241
|
+
onCancel: x,
|
|
2242
2242
|
confirmButtonLabel: D ? o._({ id: "FPsvA8" }) : o._({ id: "N2S1rs" }),
|
|
2243
|
-
onConfirm: D ?
|
|
2243
|
+
onConfirm: D ? x : w,
|
|
2244
2244
|
cancelButtonLabel: D ? void 0 : o._({ id: "dEgA5A" }),
|
|
2245
2245
|
size: "small",
|
|
2246
|
-
disableConfirmButton:
|
|
2246
|
+
disableConfirmButton: b.isPending || !D && l.trim() !== n.name,
|
|
2247
2247
|
children: D ? /* @__PURE__ */ M(u, {
|
|
2248
2248
|
variant: "info",
|
|
2249
|
-
children: /* @__PURE__ */ M(
|
|
2250
|
-
}) : /* @__PURE__ */ N(
|
|
2249
|
+
children: /* @__PURE__ */ M(B, { id: "tL9it8" })
|
|
2250
|
+
}) : /* @__PURE__ */ N(e, {
|
|
2251
2251
|
direction: "vertical",
|
|
2252
2252
|
gap: "6",
|
|
2253
2253
|
children: [
|
|
2254
2254
|
/* @__PURE__ */ M(u, {
|
|
2255
2255
|
variant: "warning",
|
|
2256
|
-
children: /* @__PURE__ */ M(
|
|
2256
|
+
children: /* @__PURE__ */ M(B, {
|
|
2257
2257
|
id: "8HrqL8",
|
|
2258
2258
|
values: {
|
|
2259
2259
|
bucketCount: O,
|
|
@@ -2262,65 +2262,65 @@ var me = (e, t) => ({
|
|
|
2262
2262
|
components: { 0: /* @__PURE__ */ M("strong", {}) }
|
|
2263
2263
|
})
|
|
2264
2264
|
}),
|
|
2265
|
-
/* @__PURE__ */ N(
|
|
2265
|
+
/* @__PURE__ */ N(e, {
|
|
2266
2266
|
direction: "vertical",
|
|
2267
2267
|
gap: "2",
|
|
2268
2268
|
children: [/* @__PURE__ */ N("div", {
|
|
2269
2269
|
className: "flex items-center justify-between",
|
|
2270
2270
|
children: [/* @__PURE__ */ M("span", {
|
|
2271
2271
|
className: "text-juno-grey-light-1 text-sm",
|
|
2272
|
-
children: /* @__PURE__ */ M(
|
|
2273
|
-
}), /* @__PURE__ */ M(
|
|
2272
|
+
children: /* @__PURE__ */ M(B, { id: "FrLdVI" })
|
|
2273
|
+
}), /* @__PURE__ */ M(y, {
|
|
2274
2274
|
size: "small",
|
|
2275
2275
|
variant: "subdued",
|
|
2276
|
-
onClick:
|
|
2277
|
-
icon:
|
|
2278
|
-
label:
|
|
2276
|
+
onClick: _,
|
|
2277
|
+
icon: m ? "check" : "contentCopy",
|
|
2278
|
+
label: m ? o._({ id: "6V3Ea3" }) : o._({ id: "he3ygx" })
|
|
2279
2279
|
})]
|
|
2280
2280
|
}), /* @__PURE__ */ M("div", {
|
|
2281
2281
|
className: "bg-juno-grey-blue-10 rounded p-2 font-mono text-sm",
|
|
2282
2282
|
children: n.name
|
|
2283
2283
|
})]
|
|
2284
2284
|
}),
|
|
2285
|
-
/* @__PURE__ */ M(
|
|
2285
|
+
/* @__PURE__ */ M(C, {
|
|
2286
2286
|
label: o._({ id: "dEHa3L" }),
|
|
2287
2287
|
required: !0,
|
|
2288
2288
|
value: l,
|
|
2289
|
-
onChange:
|
|
2289
|
+
onChange: S,
|
|
2290
2290
|
onKeyDown: E,
|
|
2291
|
-
invalid: !!
|
|
2292
|
-
errortext:
|
|
2293
|
-
disabled:
|
|
2291
|
+
invalid: !!f,
|
|
2292
|
+
errortext: f || void 0,
|
|
2293
|
+
disabled: b.isPending,
|
|
2294
2294
|
placeholder: n.name,
|
|
2295
2295
|
autoFocus: !0
|
|
2296
2296
|
})
|
|
2297
2297
|
]
|
|
2298
2298
|
})
|
|
2299
2299
|
});
|
|
2300
|
-
}, Ie = ({ isOpen: t, bucket: n, onClose: r, onSuccess:
|
|
2301
|
-
let { i18n:
|
|
2300
|
+
}, Ie = ({ isOpen: t, bucket: n, onClose: r, onSuccess: a, onError: o }) => {
|
|
2301
|
+
let { i18n: s, _: c } = V(), l = A(), [d, f] = R(""), [p, m] = R(null), [h, g] = R(!1), _ = () => {
|
|
2302
2302
|
n && navigator.clipboard.writeText(n.name).then(() => {
|
|
2303
|
-
|
|
2303
|
+
g(!0), setTimeout(() => g(!1), 2e3);
|
|
2304
2304
|
});
|
|
2305
|
-
},
|
|
2305
|
+
}, b = T.useUtils(), { data: x, isLoading: S, error: w } = T.storage.ceph.objects.list.useQuery({
|
|
2306
2306
|
project_id: l ?? "",
|
|
2307
2307
|
containerName: n?.name ?? "",
|
|
2308
2308
|
maxKeys: 1
|
|
2309
2309
|
}, { enabled: t && n !== null }), E = T.storage.ceph.containers.delete.useMutation({ onSettled: () => {
|
|
2310
|
-
|
|
2310
|
+
b.storage.ceph.containers.list.invalidate(), D();
|
|
2311
2311
|
} });
|
|
2312
2312
|
I(() => {
|
|
2313
|
-
t || (
|
|
2313
|
+
t || (f(""), m(null), E.reset());
|
|
2314
2314
|
}, [t, n?.name]);
|
|
2315
2315
|
let D = () => {
|
|
2316
|
-
|
|
2316
|
+
f(""), m(null), E.reset(), r();
|
|
2317
2317
|
}, O = (e) => {
|
|
2318
2318
|
let t = e.target.value;
|
|
2319
|
-
|
|
2319
|
+
f(t), p && m(null);
|
|
2320
2320
|
}, k = () => {
|
|
2321
2321
|
if (!n || w) return;
|
|
2322
2322
|
if (d.trim() !== n.name) {
|
|
2323
|
-
|
|
2323
|
+
m(s._({ id: "wxVsr5" }));
|
|
2324
2324
|
return;
|
|
2325
2325
|
}
|
|
2326
2326
|
let e = n.name;
|
|
@@ -2329,285 +2329,285 @@ var me = (e, t) => ({
|
|
|
2329
2329
|
bucketName: e
|
|
2330
2330
|
}, {
|
|
2331
2331
|
onSuccess: () => {
|
|
2332
|
-
|
|
2332
|
+
a?.(e);
|
|
2333
2333
|
},
|
|
2334
2334
|
onError: (t) => {
|
|
2335
|
-
|
|
2335
|
+
o?.(e, t.message);
|
|
2336
2336
|
}
|
|
2337
2337
|
});
|
|
2338
2338
|
}, P = (e) => {
|
|
2339
2339
|
e.key === "Enter" && k();
|
|
2340
2340
|
};
|
|
2341
2341
|
if (!t || !n) return null;
|
|
2342
|
-
let F =
|
|
2343
|
-
return /* @__PURE__ */ M(
|
|
2344
|
-
title:
|
|
2342
|
+
let F = x?.objects?.length ?? 0, L = F > 0, ee = w?.message;
|
|
2343
|
+
return /* @__PURE__ */ M(v, {
|
|
2344
|
+
title: s._({ id: "IwlPLb" }),
|
|
2345
2345
|
open: t,
|
|
2346
2346
|
onCancel: D,
|
|
2347
|
-
confirmButtonLabel:
|
|
2347
|
+
confirmButtonLabel: s._({ id: "IwlPLb" }),
|
|
2348
2348
|
onConfirm: k,
|
|
2349
|
-
cancelButtonLabel:
|
|
2349
|
+
cancelButtonLabel: s._({ id: "dEgA5A" }),
|
|
2350
2350
|
size: "small",
|
|
2351
|
-
disableConfirmButton: E.isPending ||
|
|
2352
|
-
children: /* @__PURE__ */ N(
|
|
2351
|
+
disableConfirmButton: E.isPending || S || L || d.trim() !== n.name,
|
|
2352
|
+
children: /* @__PURE__ */ N(e, {
|
|
2353
2353
|
direction: "vertical",
|
|
2354
2354
|
gap: "6",
|
|
2355
|
-
children: [
|
|
2355
|
+
children: [S ? /* @__PURE__ */ N(e, {
|
|
2356
2356
|
direction: "horizontal",
|
|
2357
2357
|
gap: "2",
|
|
2358
2358
|
alignment: "center",
|
|
2359
|
-
children: [/* @__PURE__ */ M(
|
|
2359
|
+
children: [/* @__PURE__ */ M(i, {}), /* @__PURE__ */ M("span", {
|
|
2360
2360
|
className: "text-juno-grey-light-1 text-sm",
|
|
2361
|
-
children: /* @__PURE__ */ M(
|
|
2361
|
+
children: /* @__PURE__ */ M(B, { id: "rPuPb+" })
|
|
2362
2362
|
})]
|
|
2363
2363
|
}) : L ? /* @__PURE__ */ M(u, {
|
|
2364
2364
|
variant: "error",
|
|
2365
|
-
children: /* @__PURE__ */ M(
|
|
2365
|
+
children: /* @__PURE__ */ M(B, {
|
|
2366
2366
|
id: "50Piuj",
|
|
2367
2367
|
values: { actualObjectCount: F }
|
|
2368
2368
|
})
|
|
2369
2369
|
}) : /* @__PURE__ */ N(j, { children: [
|
|
2370
2370
|
/* @__PURE__ */ M(u, {
|
|
2371
2371
|
variant: "warning",
|
|
2372
|
-
children: /* @__PURE__ */ M(
|
|
2372
|
+
children: /* @__PURE__ */ M(B, { id: "/pOQrn" })
|
|
2373
2373
|
}),
|
|
2374
|
-
/* @__PURE__ */ N(
|
|
2374
|
+
/* @__PURE__ */ N(e, {
|
|
2375
2375
|
direction: "vertical",
|
|
2376
2376
|
gap: "2",
|
|
2377
2377
|
children: [/* @__PURE__ */ N("div", {
|
|
2378
2378
|
className: "flex items-center justify-between",
|
|
2379
2379
|
children: [/* @__PURE__ */ M("span", {
|
|
2380
2380
|
className: "text-juno-grey-light-1 text-sm",
|
|
2381
|
-
children: /* @__PURE__ */ M(
|
|
2382
|
-
}), /* @__PURE__ */ M(
|
|
2381
|
+
children: /* @__PURE__ */ M(B, { id: "No++00" })
|
|
2382
|
+
}), /* @__PURE__ */ M(y, {
|
|
2383
2383
|
size: "small",
|
|
2384
2384
|
variant: "subdued",
|
|
2385
|
-
onClick:
|
|
2386
|
-
icon:
|
|
2387
|
-
label:
|
|
2385
|
+
onClick: _,
|
|
2386
|
+
icon: h ? "check" : "contentCopy",
|
|
2387
|
+
label: h ? s._({ id: "6V3Ea3" }) : s._({ id: "he3ygx" })
|
|
2388
2388
|
})]
|
|
2389
2389
|
}), /* @__PURE__ */ M("div", {
|
|
2390
2390
|
className: "bg-juno-grey-blue-10 rounded p-2 font-mono text-sm",
|
|
2391
2391
|
children: n.name
|
|
2392
2392
|
})]
|
|
2393
2393
|
}),
|
|
2394
|
-
/* @__PURE__ */ M(
|
|
2395
|
-
label:
|
|
2394
|
+
/* @__PURE__ */ M(C, {
|
|
2395
|
+
label: s._({ id: "dEHa3L" }),
|
|
2396
2396
|
required: !0,
|
|
2397
2397
|
value: d,
|
|
2398
2398
|
onChange: O,
|
|
2399
2399
|
onKeyDown: P,
|
|
2400
|
-
invalid: !!
|
|
2401
|
-
errortext:
|
|
2400
|
+
invalid: !!p,
|
|
2401
|
+
errortext: p || void 0,
|
|
2402
2402
|
disabled: E.isPending,
|
|
2403
2403
|
placeholder: n.name
|
|
2404
2404
|
})
|
|
2405
2405
|
] }), w && /* @__PURE__ */ M(u, {
|
|
2406
2406
|
variant: "error",
|
|
2407
|
-
children: /* @__PURE__ */ M(
|
|
2407
|
+
children: /* @__PURE__ */ M(B, {
|
|
2408
2408
|
id: "MJLqeY",
|
|
2409
|
-
values: { errorMessage:
|
|
2409
|
+
values: { errorMessage: ee }
|
|
2410
2410
|
})
|
|
2411
2411
|
})]
|
|
2412
2412
|
})
|
|
2413
2413
|
});
|
|
2414
|
-
}, Le = ({ containers: e, createModalOpen:
|
|
2415
|
-
let { projectId:
|
|
2414
|
+
}, Le = ({ containers: e, createModalOpen: r, setCreateModalOpen: i, onCreateSuccess: a, onCreateError: o, onEmptySuccess: c, onEmptyError: u, onDeleteSuccess: p, onDeleteError: h, selectedContainers: g, setSelectedContainers: _ }) => {
|
|
2415
|
+
let { projectId: v, provider: y } = z({ strict: !1 }), { i18n: b, _: x } = V(), S = ee(), C = L(null), [T, E] = R(0), [D, O] = R(null), [A, P] = R(null);
|
|
2416
2416
|
I(() => {
|
|
2417
|
-
|
|
2417
|
+
C.current && E(C.current.offsetWidth - C.current.clientWidth);
|
|
2418
2418
|
}, [e.length]);
|
|
2419
2419
|
let F = (e) => {
|
|
2420
2420
|
try {
|
|
2421
2421
|
return new Date(e).toLocaleString();
|
|
2422
2422
|
} catch {
|
|
2423
|
-
return
|
|
2423
|
+
return b._({ id: "fj5byd" });
|
|
2424
2424
|
}
|
|
2425
|
-
},
|
|
2425
|
+
}, H = W({
|
|
2426
2426
|
count: e.length,
|
|
2427
|
-
getScrollElement: () =>
|
|
2427
|
+
getScrollElement: () => C.current,
|
|
2428
2428
|
estimateSize: () => 48,
|
|
2429
2429
|
overscan: 10
|
|
2430
|
-
}),
|
|
2431
|
-
_(
|
|
2432
|
-
},
|
|
2430
|
+
}), U = new Set(g), G = e.length > 0 && e.every((e) => U.has(e.name)), te = () => {
|
|
2431
|
+
_(G ? [] : e.map((e) => e.name));
|
|
2432
|
+
}, ne = (e) => {
|
|
2433
2433
|
g.includes(e) ? _(g.filter((t) => t !== e)) : _([...g, e]);
|
|
2434
2434
|
};
|
|
2435
|
-
if (!e || e.length === 0) return /* @__PURE__ */ M(
|
|
2435
|
+
if (!e || e.length === 0) return /* @__PURE__ */ M(w, {
|
|
2436
2436
|
columns: 4,
|
|
2437
2437
|
className: "containers",
|
|
2438
2438
|
"data-testid": "no-containers",
|
|
2439
|
-
children: /* @__PURE__ */ M(
|
|
2439
|
+
children: /* @__PURE__ */ M(s, { children: /* @__PURE__ */ M(t, {
|
|
2440
2440
|
colSpan: 4,
|
|
2441
2441
|
children: /* @__PURE__ */ N("div", {
|
|
2442
2442
|
className: "py-8 text-center",
|
|
2443
2443
|
children: [/* @__PURE__ */ M("h3", {
|
|
2444
2444
|
className: "text-lg font-semibold",
|
|
2445
|
-
children: /* @__PURE__ */ M(
|
|
2445
|
+
children: /* @__PURE__ */ M(B, { id: "ih2lfP" })
|
|
2446
2446
|
}), /* @__PURE__ */ M("p", {
|
|
2447
2447
|
className: "text-theme-light mt-2",
|
|
2448
|
-
children: /* @__PURE__ */ M(
|
|
2448
|
+
children: /* @__PURE__ */ M(B, { id: "emkxJa" })
|
|
2449
2449
|
})]
|
|
2450
2450
|
})
|
|
2451
2451
|
}) })
|
|
2452
2452
|
});
|
|
2453
|
-
let
|
|
2453
|
+
let K = "40px minmax(200px, 2fr) minmax(100px, 1fr) minmax(180px, 2fr) minmax(100px, 1fr) 60px", re = e.length;
|
|
2454
2454
|
return /* @__PURE__ */ N(j, { children: [
|
|
2455
2455
|
/* @__PURE__ */ N("div", {
|
|
2456
2456
|
className: "relative",
|
|
2457
2457
|
children: [
|
|
2458
2458
|
/* @__PURE__ */ M("div", {
|
|
2459
2459
|
style: { paddingRight: `${T}px` },
|
|
2460
|
-
children: /* @__PURE__ */ M(
|
|
2460
|
+
children: /* @__PURE__ */ M(w, {
|
|
2461
2461
|
columns: 6,
|
|
2462
|
-
gridColumnTemplate:
|
|
2462
|
+
gridColumnTemplate: K,
|
|
2463
2463
|
className: "containers",
|
|
2464
2464
|
"data-testid": "containers-table-header",
|
|
2465
|
-
children: /* @__PURE__ */ N(
|
|
2466
|
-
/* @__PURE__ */ M(
|
|
2467
|
-
checked:
|
|
2468
|
-
onChange:
|
|
2465
|
+
children: /* @__PURE__ */ N(s, { children: [
|
|
2466
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(n, {
|
|
2467
|
+
checked: G,
|
|
2468
|
+
onChange: te,
|
|
2469
2469
|
"data-testid": "select-all-containers"
|
|
2470
2470
|
}) }),
|
|
2471
|
-
/* @__PURE__ */ M(
|
|
2472
|
-
/* @__PURE__ */ M(
|
|
2473
|
-
/* @__PURE__ */ M(
|
|
2474
|
-
/* @__PURE__ */ M(
|
|
2475
|
-
/* @__PURE__ */ M(
|
|
2471
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "BTsbBe" }) }),
|
|
2472
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "sxbP3b" }) }),
|
|
2473
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "sjMCOP" }) }),
|
|
2474
|
+
/* @__PURE__ */ M(d, { children: /* @__PURE__ */ M(B, { id: "hgpMHD" }) }),
|
|
2475
|
+
/* @__PURE__ */ M(d, { style: { marginRight: `-${T}px` } })
|
|
2476
2476
|
] })
|
|
2477
2477
|
})
|
|
2478
2478
|
}),
|
|
2479
2479
|
/* @__PURE__ */ M("div", {
|
|
2480
|
-
ref:
|
|
2480
|
+
ref: C,
|
|
2481
2481
|
className: "overflow-auto",
|
|
2482
2482
|
style: { height: "calc(100vh - 545px)" },
|
|
2483
2483
|
"data-testid": "containers-table-body",
|
|
2484
2484
|
children: /* @__PURE__ */ M("div", {
|
|
2485
2485
|
style: {
|
|
2486
|
-
height: `${
|
|
2486
|
+
height: `${H.getTotalSize()}px`,
|
|
2487
2487
|
width: "100%",
|
|
2488
2488
|
position: "relative"
|
|
2489
2489
|
},
|
|
2490
|
-
children:
|
|
2491
|
-
let
|
|
2490
|
+
children: H.getVirtualItems().map((r) => {
|
|
2491
|
+
let i = e[r.index], a = g.includes(i.name), o = () => S({
|
|
2492
2492
|
to: "/projects/$projectId/storage/$provider/containers/$containerName/objects",
|
|
2493
2493
|
params: {
|
|
2494
|
-
projectId:
|
|
2495
|
-
provider:
|
|
2496
|
-
containerName:
|
|
2494
|
+
projectId: v ?? "",
|
|
2495
|
+
provider: y ?? "ceph",
|
|
2496
|
+
containerName: i.name
|
|
2497
2497
|
}
|
|
2498
2498
|
});
|
|
2499
2499
|
return /* @__PURE__ */ N("div", {
|
|
2500
|
-
"data-index":
|
|
2501
|
-
ref:
|
|
2500
|
+
"data-index": r.index,
|
|
2501
|
+
ref: H.measureElement,
|
|
2502
2502
|
className: "juno-datagrid group hover:bg-theme-background-lvl-1 cursor-pointer",
|
|
2503
2503
|
style: {
|
|
2504
2504
|
position: "absolute",
|
|
2505
2505
|
top: 0,
|
|
2506
2506
|
left: 0,
|
|
2507
2507
|
width: "100%",
|
|
2508
|
-
transform: `translateY(${
|
|
2508
|
+
transform: `translateY(${r.start}px)`,
|
|
2509
2509
|
display: "grid",
|
|
2510
|
-
gridTemplateColumns:
|
|
2510
|
+
gridTemplateColumns: K,
|
|
2511
2511
|
alignItems: "stretch"
|
|
2512
2512
|
},
|
|
2513
|
-
"data-testid": `container-row-${
|
|
2513
|
+
"data-testid": `container-row-${i.name}`,
|
|
2514
2514
|
role: "link",
|
|
2515
2515
|
tabIndex: 0,
|
|
2516
|
-
onClick:
|
|
2516
|
+
onClick: o,
|
|
2517
2517
|
onKeyDown: (e) => {
|
|
2518
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
2518
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), o());
|
|
2519
2519
|
},
|
|
2520
2520
|
children: [
|
|
2521
|
-
/* @__PURE__ */ M(
|
|
2521
|
+
/* @__PURE__ */ M(t, {
|
|
2522
2522
|
onClick: (e) => e.stopPropagation(),
|
|
2523
2523
|
onKeyDown: (e) => {
|
|
2524
2524
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
2525
2525
|
},
|
|
2526
|
-
children: /* @__PURE__ */ M(
|
|
2527
|
-
checked:
|
|
2528
|
-
onChange: () =>
|
|
2529
|
-
"data-testid": `select-container-${
|
|
2526
|
+
children: /* @__PURE__ */ M(n, {
|
|
2527
|
+
checked: a,
|
|
2528
|
+
onChange: () => ne(i.name),
|
|
2529
|
+
"data-testid": `select-container-${i.name}`
|
|
2530
2530
|
})
|
|
2531
2531
|
}),
|
|
2532
|
-
/* @__PURE__ */ M(
|
|
2532
|
+
/* @__PURE__ */ M(t, {
|
|
2533
2533
|
className: "min-w-0 overflow-hidden",
|
|
2534
2534
|
children: /* @__PURE__ */ M("span", {
|
|
2535
2535
|
className: "block truncate",
|
|
2536
|
-
title:
|
|
2537
|
-
children:
|
|
2536
|
+
title: i.name,
|
|
2537
|
+
children: i.name
|
|
2538
2538
|
})
|
|
2539
2539
|
}),
|
|
2540
|
-
/* @__PURE__ */ M(
|
|
2541
|
-
/* @__PURE__ */ M(
|
|
2542
|
-
/* @__PURE__ */ M(
|
|
2543
|
-
/* @__PURE__ */ M(
|
|
2540
|
+
/* @__PURE__ */ M(t, { children: i.count.toLocaleString() }),
|
|
2541
|
+
/* @__PURE__ */ M(t, { children: F(i.last_modified || i.creationDate || "") }),
|
|
2542
|
+
/* @__PURE__ */ M(t, { children: k(i.bytes) }),
|
|
2543
|
+
/* @__PURE__ */ M(t, {
|
|
2544
2544
|
onClick: (e) => e.stopPropagation(),
|
|
2545
|
-
children: /* @__PURE__ */ M(
|
|
2546
|
-
label:
|
|
2547
|
-
onClick: () => O(
|
|
2548
|
-
"data-testid": `empty-action-${
|
|
2549
|
-
}), /* @__PURE__ */ M(
|
|
2550
|
-
label:
|
|
2551
|
-
onClick: () => P(
|
|
2552
|
-
"data-testid": `delete-action-${
|
|
2545
|
+
children: /* @__PURE__ */ M(m, { children: /* @__PURE__ */ N(l, { children: [/* @__PURE__ */ M(f, {
|
|
2546
|
+
label: b._({ id: "N2S1rs" }),
|
|
2547
|
+
onClick: () => O(i),
|
|
2548
|
+
"data-testid": `empty-action-${i.name}`
|
|
2549
|
+
}), /* @__PURE__ */ M(f, {
|
|
2550
|
+
label: b._({ id: "cnGeoo" }),
|
|
2551
|
+
onClick: () => P(i),
|
|
2552
|
+
"data-testid": `delete-action-${i.name}`
|
|
2553
2553
|
})] }) })
|
|
2554
2554
|
})
|
|
2555
2555
|
]
|
|
2556
|
-
},
|
|
2556
|
+
}, i.name);
|
|
2557
2557
|
})
|
|
2558
2558
|
})
|
|
2559
2559
|
}),
|
|
2560
2560
|
/* @__PURE__ */ M("div", {
|
|
2561
2561
|
className: "text-theme-light border-theme-background-lvl-2 border-t px-4 py-2 text-sm",
|
|
2562
|
-
children:
|
|
2562
|
+
children: re === 1 ? /* @__PURE__ */ M(B, {
|
|
2563
2563
|
id: "rayTRr",
|
|
2564
|
-
values: { allContainersCount:
|
|
2565
|
-
}) : /* @__PURE__ */ M(
|
|
2564
|
+
values: { allContainersCount: re }
|
|
2565
|
+
}) : /* @__PURE__ */ M(B, {
|
|
2566
2566
|
id: "5Ml1iQ",
|
|
2567
|
-
values: { allContainersCount:
|
|
2567
|
+
values: { allContainersCount: re }
|
|
2568
2568
|
})
|
|
2569
2569
|
})
|
|
2570
2570
|
]
|
|
2571
2571
|
}),
|
|
2572
2572
|
/* @__PURE__ */ M(Pe, {
|
|
2573
|
-
isOpen:
|
|
2574
|
-
onClose: () =>
|
|
2575
|
-
onSuccess:
|
|
2576
|
-
onError:
|
|
2573
|
+
isOpen: r,
|
|
2574
|
+
onClose: () => i(!1),
|
|
2575
|
+
onSuccess: a,
|
|
2576
|
+
onError: o
|
|
2577
2577
|
}),
|
|
2578
2578
|
/* @__PURE__ */ M(Fe, {
|
|
2579
2579
|
isOpen: D !== null,
|
|
2580
2580
|
bucket: D,
|
|
2581
2581
|
onClose: () => O(null),
|
|
2582
|
-
onSuccess:
|
|
2582
|
+
onSuccess: c,
|
|
2583
2583
|
onError: u
|
|
2584
2584
|
}),
|
|
2585
2585
|
/* @__PURE__ */ M(Ie, {
|
|
2586
2586
|
isOpen: A !== null,
|
|
2587
2587
|
bucket: A,
|
|
2588
2588
|
onClose: () => P(null),
|
|
2589
|
-
onSuccess:
|
|
2590
|
-
onError:
|
|
2589
|
+
onSuccess: p,
|
|
2590
|
+
onError: h
|
|
2591
2591
|
})
|
|
2592
2592
|
] });
|
|
2593
2593
|
};
|
|
2594
2594
|
//#endregion
|
|
2595
2595
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Containers/ContainerToastNotifications.tsx
|
|
2596
|
-
function Re({ title:
|
|
2597
|
-
return /* @__PURE__ */ N(
|
|
2596
|
+
function Re({ title: t, description: n }) {
|
|
2597
|
+
return /* @__PURE__ */ N(e, {
|
|
2598
2598
|
direction: "vertical",
|
|
2599
2599
|
gap: "1.5",
|
|
2600
|
-
children: [/* @__PURE__ */ M("span", { children:
|
|
2600
|
+
children: [/* @__PURE__ */ M("span", { children: t }), /* @__PURE__ */ M("span", {
|
|
2601
2601
|
className: "text-theme-light",
|
|
2602
|
-
children:
|
|
2602
|
+
children: n
|
|
2603
2603
|
})]
|
|
2604
2604
|
});
|
|
2605
2605
|
}
|
|
2606
2606
|
var ze = (e, t) => ({
|
|
2607
2607
|
variant: "success",
|
|
2608
2608
|
children: /* @__PURE__ */ M(Re, {
|
|
2609
|
-
title: /* @__PURE__ */ M(
|
|
2610
|
-
description: /* @__PURE__ */ M(
|
|
2609
|
+
title: /* @__PURE__ */ M(B, { id: "M3bysB" }),
|
|
2610
|
+
description: /* @__PURE__ */ M(B, {
|
|
2611
2611
|
id: "VKCkZH",
|
|
2612
2612
|
values: { bucketName: e }
|
|
2613
2613
|
})
|
|
@@ -2618,8 +2618,8 @@ var ze = (e, t) => ({
|
|
|
2618
2618
|
}), Be = (e, t, n) => ({
|
|
2619
2619
|
variant: "error",
|
|
2620
2620
|
children: /* @__PURE__ */ M(Re, {
|
|
2621
|
-
title: /* @__PURE__ */ M(
|
|
2622
|
-
description: /* @__PURE__ */ M(
|
|
2621
|
+
title: /* @__PURE__ */ M(B, { id: "UaP7Th" }),
|
|
2622
|
+
description: /* @__PURE__ */ M(B, {
|
|
2623
2623
|
id: "boefwq",
|
|
2624
2624
|
values: {
|
|
2625
2625
|
bucketName: e,
|
|
@@ -2633,17 +2633,17 @@ var ze = (e, t) => ({
|
|
|
2633
2633
|
}), Ve = (e, t, n) => ({
|
|
2634
2634
|
variant: "success",
|
|
2635
2635
|
children: /* @__PURE__ */ M(Re, {
|
|
2636
|
-
title: /* @__PURE__ */ M(
|
|
2637
|
-
description: t === 0 ? /* @__PURE__ */ M(
|
|
2636
|
+
title: /* @__PURE__ */ M(B, { id: "b95YH9" }),
|
|
2637
|
+
description: t === 0 ? /* @__PURE__ */ M(B, {
|
|
2638
2638
|
id: "8erw15",
|
|
2639
2639
|
values: { bucketName: e }
|
|
2640
|
-
}) : t === 1 ? /* @__PURE__ */ M(
|
|
2640
|
+
}) : t === 1 ? /* @__PURE__ */ M(B, {
|
|
2641
2641
|
id: "QpbWpf",
|
|
2642
2642
|
values: {
|
|
2643
2643
|
bucketName: e,
|
|
2644
2644
|
deletedCount: t
|
|
2645
2645
|
}
|
|
2646
|
-
}) : /* @__PURE__ */ M(
|
|
2646
|
+
}) : /* @__PURE__ */ M(B, {
|
|
2647
2647
|
id: "JPWqr2",
|
|
2648
2648
|
values: {
|
|
2649
2649
|
bucketName: e,
|
|
@@ -2657,8 +2657,8 @@ var ze = (e, t) => ({
|
|
|
2657
2657
|
}), He = (e, t, n) => ({
|
|
2658
2658
|
variant: "error",
|
|
2659
2659
|
children: /* @__PURE__ */ M(Re, {
|
|
2660
|
-
title: /* @__PURE__ */ M(
|
|
2661
|
-
description: /* @__PURE__ */ M(
|
|
2660
|
+
title: /* @__PURE__ */ M(B, { id: "66YUKF" }),
|
|
2661
|
+
description: /* @__PURE__ */ M(B, {
|
|
2662
2662
|
id: "t7ewhH",
|
|
2663
2663
|
values: {
|
|
2664
2664
|
bucketName: e,
|
|
@@ -2672,8 +2672,8 @@ var ze = (e, t) => ({
|
|
|
2672
2672
|
}), Ue = (e, t) => ({
|
|
2673
2673
|
variant: "success",
|
|
2674
2674
|
children: /* @__PURE__ */ M(Re, {
|
|
2675
|
-
title: /* @__PURE__ */ M(
|
|
2676
|
-
description: /* @__PURE__ */ M(
|
|
2675
|
+
title: /* @__PURE__ */ M(B, { id: "bHUarC" }),
|
|
2676
|
+
description: /* @__PURE__ */ M(B, {
|
|
2677
2677
|
id: "hQdfmR",
|
|
2678
2678
|
values: { bucketName: e }
|
|
2679
2679
|
})
|
|
@@ -2684,8 +2684,8 @@ var ze = (e, t) => ({
|
|
|
2684
2684
|
}), We = (e, t, n) => ({
|
|
2685
2685
|
variant: "error",
|
|
2686
2686
|
children: /* @__PURE__ */ M(Re, {
|
|
2687
|
-
title: /* @__PURE__ */ M(
|
|
2688
|
-
description: /* @__PURE__ */ M(
|
|
2687
|
+
title: /* @__PURE__ */ M(B, { id: "1NFtQz" }),
|
|
2688
|
+
description: /* @__PURE__ */ M(B, {
|
|
2689
2689
|
id: "CongmL",
|
|
2690
2690
|
values: {
|
|
2691
2691
|
bucketName: e,
|
|
@@ -2701,8 +2701,8 @@ var ze = (e, t) => ({
|
|
|
2701
2701
|
return {
|
|
2702
2702
|
variant: i ? "warning" : "success",
|
|
2703
2703
|
children: /* @__PURE__ */ M(Re, {
|
|
2704
|
-
title: i ? /* @__PURE__ */ M(
|
|
2705
|
-
description: i ? /* @__PURE__ */ M(
|
|
2704
|
+
title: i ? /* @__PURE__ */ M(B, { id: "6fuDFZ" }) : /* @__PURE__ */ M(B, { id: "BOoOLQ" }),
|
|
2705
|
+
description: i ? /* @__PURE__ */ M(B, {
|
|
2706
2706
|
id: "pD/2BQ",
|
|
2707
2707
|
values: {
|
|
2708
2708
|
emptiedCount: e,
|
|
@@ -2710,7 +2710,7 @@ var ze = (e, t) => ({
|
|
|
2710
2710
|
totalDeleted: t,
|
|
2711
2711
|
errorsLength: o
|
|
2712
2712
|
}
|
|
2713
|
-
}) : /* @__PURE__ */ M(
|
|
2713
|
+
}) : /* @__PURE__ */ M(B, {
|
|
2714
2714
|
id: "YVLcyI",
|
|
2715
2715
|
values: {
|
|
2716
2716
|
emptiedCount: e,
|
|
@@ -2722,56 +2722,56 @@ var ze = (e, t) => ({
|
|
|
2722
2722
|
autoDismissTimeout: r.autoDismissTimeout ?? 5e3,
|
|
2723
2723
|
onDismiss: r.onDismiss
|
|
2724
2724
|
};
|
|
2725
|
-
}, Ge = 20, Ke = ({ isOpen:
|
|
2726
|
-
let { i18n:
|
|
2727
|
-
|
|
2728
|
-
},
|
|
2729
|
-
let e = 0,
|
|
2730
|
-
for (let
|
|
2731
|
-
|
|
2732
|
-
current:
|
|
2733
|
-
total:
|
|
2725
|
+
}, Ge = 20, Ke = ({ isOpen: t, buckets: n, onClose: r, onComplete: a }) => {
|
|
2726
|
+
let { i18n: o, _: s } = V(), c = A(), [l, d] = R(null), f = T.useUtils(), p = T.storage.ceph.objects.deleteAll.useMutation(), m = () => {
|
|
2727
|
+
p.reset(), d(null), r();
|
|
2728
|
+
}, h = async () => {
|
|
2729
|
+
let e = 0, t = 0, r = [], i = n.length;
|
|
2730
|
+
for (let a = 0; a < n.length; a++) {
|
|
2731
|
+
d({
|
|
2732
|
+
current: a + 1,
|
|
2733
|
+
total: i
|
|
2734
2734
|
});
|
|
2735
|
-
let
|
|
2735
|
+
let o = n[a];
|
|
2736
2736
|
try {
|
|
2737
|
-
let
|
|
2738
|
-
project_id:
|
|
2739
|
-
containerName:
|
|
2737
|
+
let n = await p.mutateAsync({
|
|
2738
|
+
project_id: c,
|
|
2739
|
+
containerName: o.name
|
|
2740
2740
|
});
|
|
2741
|
-
|
|
2741
|
+
t += n, e++;
|
|
2742
2742
|
} catch (e) {
|
|
2743
2743
|
let t = e instanceof Error ? e.message : String(e);
|
|
2744
|
-
|
|
2744
|
+
r.push(`${o.name}: ${t}`);
|
|
2745
2745
|
}
|
|
2746
2746
|
}
|
|
2747
|
-
e > 0 && await
|
|
2747
|
+
e > 0 && await f.storage.ceph.containers.list.invalidate(), a?.({
|
|
2748
2748
|
emptiedCount: e,
|
|
2749
|
-
totalDeleted:
|
|
2750
|
-
errors:
|
|
2751
|
-
}),
|
|
2749
|
+
totalDeleted: t,
|
|
2750
|
+
errors: r
|
|
2751
|
+
}), m();
|
|
2752
2752
|
};
|
|
2753
|
-
if (!
|
|
2754
|
-
let
|
|
2755
|
-
return /* @__PURE__ */ M(
|
|
2756
|
-
title:
|
|
2757
|
-
open:
|
|
2758
|
-
onCancel:
|
|
2759
|
-
confirmButtonLabel: b ?
|
|
2760
|
-
cancelButtonLabel:
|
|
2761
|
-
onConfirm:
|
|
2753
|
+
if (!t || n.length === 0) return null;
|
|
2754
|
+
let g = n.length, _ = n.slice(0, Ge), y = g - _.length, b = p.isPending || l !== null, x = l?.current, S = l?.total;
|
|
2755
|
+
return /* @__PURE__ */ M(v, {
|
|
2756
|
+
title: o._({ id: "7RBR/D" }),
|
|
2757
|
+
open: t,
|
|
2758
|
+
onCancel: m,
|
|
2759
|
+
confirmButtonLabel: b ? o._({ id: "s4Vnq2" }) : o._({ id: "N2S1rs" }),
|
|
2760
|
+
cancelButtonLabel: o._({ id: "dEgA5A" }),
|
|
2761
|
+
onConfirm: h,
|
|
2762
2762
|
disableConfirmButton: b,
|
|
2763
2763
|
disableCancelButton: b,
|
|
2764
2764
|
disableCloseButton: b,
|
|
2765
2765
|
size: "small",
|
|
2766
|
-
children: b ? /* @__PURE__ */ N(
|
|
2766
|
+
children: b ? /* @__PURE__ */ N(e, {
|
|
2767
2767
|
direction: "vertical",
|
|
2768
2768
|
distribution: "center",
|
|
2769
2769
|
alignment: "center",
|
|
2770
2770
|
gap: "2",
|
|
2771
2771
|
className: "py-4",
|
|
2772
|
-
children: [/* @__PURE__ */ M(
|
|
2772
|
+
children: [/* @__PURE__ */ M(i, { variant: "primary" }), l && /* @__PURE__ */ M("p", {
|
|
2773
2773
|
className: "text-theme-light text-sm",
|
|
2774
|
-
children: /* @__PURE__ */ M(
|
|
2774
|
+
children: /* @__PURE__ */ M(B, {
|
|
2775
2775
|
id: "NW1XEL",
|
|
2776
2776
|
values: {
|
|
2777
2777
|
progressCurrent: x,
|
|
@@ -2779,21 +2779,21 @@ var ze = (e, t) => ({
|
|
|
2779
2779
|
}
|
|
2780
2780
|
})
|
|
2781
2781
|
})]
|
|
2782
|
-
}) : /* @__PURE__ */ N(
|
|
2782
|
+
}) : /* @__PURE__ */ N(e, {
|
|
2783
2783
|
direction: "vertical",
|
|
2784
2784
|
gap: "4",
|
|
2785
2785
|
children: [/* @__PURE__ */ M(u, {
|
|
2786
2786
|
variant: "warning",
|
|
2787
|
-
children: /* @__PURE__ */ M(
|
|
2787
|
+
children: /* @__PURE__ */ M(B, {
|
|
2788
2788
|
id: "CtiFDz",
|
|
2789
|
-
values: { totalCount:
|
|
2789
|
+
values: { totalCount: g }
|
|
2790
2790
|
})
|
|
2791
2791
|
}), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
2792
2792
|
className: "text-theme-light mb-2 text-sm",
|
|
2793
|
-
children: /* @__PURE__ */ M(
|
|
2793
|
+
children: /* @__PURE__ */ M(B, { id: "Zshv0H" })
|
|
2794
2794
|
}), /* @__PURE__ */ N("ul", {
|
|
2795
2795
|
className: "list-inside list-disc space-y-1 text-sm",
|
|
2796
|
-
children: [
|
|
2796
|
+
children: [_.map((e) => {
|
|
2797
2797
|
let t = e.name, n = e.count;
|
|
2798
2798
|
return /* @__PURE__ */ N("li", {
|
|
2799
2799
|
className: "font-mono",
|
|
@@ -2803,7 +2803,7 @@ var ze = (e, t) => ({
|
|
|
2803
2803
|
"(",
|
|
2804
2804
|
n,
|
|
2805
2805
|
" ",
|
|
2806
|
-
/* @__PURE__ */ M(
|
|
2806
|
+
/* @__PURE__ */ M(B, {
|
|
2807
2807
|
id: "gFsjJK",
|
|
2808
2808
|
values: { bucketCount: n }
|
|
2809
2809
|
}),
|
|
@@ -2811,66 +2811,66 @@ var ze = (e, t) => ({
|
|
|
2811
2811
|
]
|
|
2812
2812
|
})]
|
|
2813
2813
|
}, t);
|
|
2814
|
-
}),
|
|
2814
|
+
}), y > 0 && /* @__PURE__ */ M("li", {
|
|
2815
2815
|
className: "text-theme-light",
|
|
2816
|
-
children: /* @__PURE__ */ M(
|
|
2816
|
+
children: /* @__PURE__ */ M(B, {
|
|
2817
2817
|
id: "yqPflB",
|
|
2818
|
-
values: { hiddenCount:
|
|
2818
|
+
values: { hiddenCount: y }
|
|
2819
2819
|
})
|
|
2820
2820
|
})]
|
|
2821
2821
|
})] })]
|
|
2822
2822
|
})
|
|
2823
2823
|
});
|
|
2824
2824
|
}, qe = () => {
|
|
2825
|
-
let { i18n:
|
|
2826
|
-
|
|
2825
|
+
let { i18n: t, _: n } = V(), r = A(), a = ee({ from: E.fullPath }), { sortBy: o, sortDirection: s, search: c = "" } = E.useSearch(), [l, u] = R(!1), [d, f] = R(!1), [m, h] = R([]), [g, _] = R(null), v = () => _(null), b = (e) => {
|
|
2826
|
+
_(ze(e, { onDismiss: v }));
|
|
2827
2827
|
}, x = (e, t) => {
|
|
2828
|
-
|
|
2828
|
+
_(Be(e, t, { onDismiss: v }));
|
|
2829
2829
|
}, S = (e, t) => {
|
|
2830
|
-
|
|
2830
|
+
_(Ve(e, t, { onDismiss: v }));
|
|
2831
2831
|
}, C = (e, t) => {
|
|
2832
|
-
|
|
2832
|
+
_(He(e, t, { onDismiss: v }));
|
|
2833
2833
|
}, w = (e) => {
|
|
2834
|
-
|
|
2834
|
+
_(Ue(e, { onDismiss: v }));
|
|
2835
2835
|
}, D = (e, t) => {
|
|
2836
|
-
|
|
2836
|
+
_(We(e, t, { onDismiss: v }));
|
|
2837
2837
|
}, k = ({ emptiedCount: e, totalDeleted: t, errors: n }) => {
|
|
2838
|
-
if (n.length === 0)
|
|
2838
|
+
if (n.length === 0) h([]);
|
|
2839
2839
|
else {
|
|
2840
2840
|
let e = new Set(n.map((e) => e.split(": ")[0]));
|
|
2841
|
-
|
|
2841
|
+
h((t) => t.filter((t) => e.has(t)));
|
|
2842
2842
|
}
|
|
2843
|
-
|
|
2843
|
+
_($(e, t, n, { onDismiss: v }));
|
|
2844
2844
|
}, j = {
|
|
2845
2845
|
options: [
|
|
2846
2846
|
{
|
|
2847
|
-
label:
|
|
2847
|
+
label: t._({ id: "6YtxFj" }),
|
|
2848
2848
|
value: "name"
|
|
2849
2849
|
},
|
|
2850
2850
|
{
|
|
2851
|
-
label:
|
|
2851
|
+
label: t._({ id: "sxbP3b" }),
|
|
2852
2852
|
value: "count"
|
|
2853
2853
|
},
|
|
2854
2854
|
{
|
|
2855
|
-
label:
|
|
2855
|
+
label: t._({ id: "hgpMHD" }),
|
|
2856
2856
|
value: "bytes"
|
|
2857
2857
|
},
|
|
2858
2858
|
{
|
|
2859
|
-
label:
|
|
2859
|
+
label: t._({ id: "sjMCOP" }),
|
|
2860
2860
|
value: "last_modified"
|
|
2861
2861
|
}
|
|
2862
2862
|
],
|
|
2863
|
-
sortBy:
|
|
2864
|
-
sortDirection:
|
|
2863
|
+
sortBy: o ?? "name",
|
|
2864
|
+
sortDirection: s ?? "asc"
|
|
2865
2865
|
}, { data: F, isLoading: I, error: L } = T.storage.ceph.containers.list.useQuery({
|
|
2866
|
-
project_id:
|
|
2866
|
+
project_id: r,
|
|
2867
2867
|
includeMetadata: !0
|
|
2868
2868
|
}, {
|
|
2869
|
-
enabled: !!
|
|
2869
|
+
enabled: !!r,
|
|
2870
2870
|
retry: !1
|
|
2871
|
-
}),
|
|
2871
|
+
}), z = ((e) => [...e].sort((e, t) => {
|
|
2872
2872
|
let n;
|
|
2873
|
-
switch (
|
|
2873
|
+
switch (o ?? "name") {
|
|
2874
2874
|
case "name":
|
|
2875
2875
|
n = e.name.localeCompare(t.name);
|
|
2876
2876
|
break;
|
|
@@ -2888,98 +2888,98 @@ var ze = (e, t) => ({
|
|
|
2888
2888
|
break;
|
|
2889
2889
|
default: n = e.name.localeCompare(t.name);
|
|
2890
2890
|
}
|
|
2891
|
-
return (
|
|
2892
|
-
}))((F || []).filter((e) => e.name.toLowerCase().includes(
|
|
2891
|
+
return (s ?? "asc") === "desc" ? -n : n;
|
|
2892
|
+
}))((F || []).filter((e) => e.name.toLowerCase().includes(c.toLowerCase()))), H = (e) => {
|
|
2893
2893
|
let t = typeof e == "string" ? e : "";
|
|
2894
2894
|
P(() => {
|
|
2895
|
-
|
|
2895
|
+
a({ search: (e) => ({
|
|
2896
2896
|
...e,
|
|
2897
2897
|
search: t || void 0
|
|
2898
2898
|
}) });
|
|
2899
2899
|
});
|
|
2900
|
-
},
|
|
2900
|
+
}, U = (e) => {
|
|
2901
2901
|
let t = e.sortBy?.toString() || "name", n = e.sortDirection || "asc";
|
|
2902
2902
|
P(() => {
|
|
2903
|
-
|
|
2903
|
+
a({ search: (e) => ({
|
|
2904
2904
|
...e,
|
|
2905
2905
|
sortBy: t,
|
|
2906
2906
|
sortDirection: n
|
|
2907
2907
|
}) });
|
|
2908
2908
|
});
|
|
2909
2909
|
};
|
|
2910
|
-
if (I) return /* @__PURE__ */ N(
|
|
2910
|
+
if (I) return /* @__PURE__ */ N(e, {
|
|
2911
2911
|
className: "fixed inset-0",
|
|
2912
2912
|
distribution: "center",
|
|
2913
2913
|
alignment: "center",
|
|
2914
2914
|
direction: "vertical",
|
|
2915
|
-
children: [/* @__PURE__ */ M(
|
|
2915
|
+
children: [/* @__PURE__ */ M(i, {
|
|
2916
2916
|
variant: "primary",
|
|
2917
2917
|
size: "large",
|
|
2918
2918
|
className: "mb-2"
|
|
2919
|
-
}), /* @__PURE__ */ M(
|
|
2919
|
+
}), /* @__PURE__ */ M(B, { id: "c5i+X0" })]
|
|
2920
2920
|
});
|
|
2921
2921
|
if (L) {
|
|
2922
|
-
let
|
|
2923
|
-
return /* @__PURE__ */ M(
|
|
2922
|
+
let t = L.message;
|
|
2923
|
+
return /* @__PURE__ */ M(e, {
|
|
2924
2924
|
className: "fixed inset-0",
|
|
2925
2925
|
distribution: "center",
|
|
2926
2926
|
alignment: "center",
|
|
2927
2927
|
direction: "vertical",
|
|
2928
|
-
children: /* @__PURE__ */ M(
|
|
2928
|
+
children: /* @__PURE__ */ M(B, {
|
|
2929
2929
|
id: "JofLr3",
|
|
2930
|
-
values: { errorMessage:
|
|
2930
|
+
values: { errorMessage: t }
|
|
2931
2931
|
})
|
|
2932
2932
|
});
|
|
2933
2933
|
}
|
|
2934
|
-
let
|
|
2934
|
+
let W = (F || []).filter((e) => m.includes(e.name)), G = W.length > 0, te = W.length;
|
|
2935
2935
|
return /* @__PURE__ */ N("div", {
|
|
2936
2936
|
className: "relative",
|
|
2937
2937
|
children: [
|
|
2938
2938
|
/* @__PURE__ */ M(O, {
|
|
2939
2939
|
sortSettings: j,
|
|
2940
|
-
searchTerm:
|
|
2941
|
-
onSort:
|
|
2942
|
-
onSearch:
|
|
2943
|
-
actions: /* @__PURE__ */ N(
|
|
2940
|
+
searchTerm: c,
|
|
2941
|
+
onSort: U,
|
|
2942
|
+
onSearch: H,
|
|
2943
|
+
actions: /* @__PURE__ */ N(e, {
|
|
2944
2944
|
direction: "horizontal",
|
|
2945
2945
|
gap: "4",
|
|
2946
2946
|
alignment: "center",
|
|
2947
|
-
children: [/* @__PURE__ */ M(
|
|
2947
|
+
children: [/* @__PURE__ */ M(y, {
|
|
2948
2948
|
variant: "primary",
|
|
2949
|
-
onClick: () =>
|
|
2950
|
-
children: /* @__PURE__ */ M(
|
|
2951
|
-
}), /* @__PURE__ */ M(
|
|
2949
|
+
onClick: () => u(!0),
|
|
2950
|
+
children: /* @__PURE__ */ M(B, { id: "HiDAFk" })
|
|
2951
|
+
}), /* @__PURE__ */ M(y, {
|
|
2952
2952
|
variant: "primary-danger",
|
|
2953
|
-
onClick: () =>
|
|
2954
|
-
disabled: !
|
|
2955
|
-
children:
|
|
2953
|
+
onClick: () => f(!0),
|
|
2954
|
+
disabled: !G,
|
|
2955
|
+
children: G ? /* @__PURE__ */ M(B, {
|
|
2956
2956
|
id: "dPBJAJ",
|
|
2957
|
-
values: { selectedCount:
|
|
2958
|
-
}) : /* @__PURE__ */ M(
|
|
2957
|
+
values: { selectedCount: te }
|
|
2958
|
+
}) : /* @__PURE__ */ M(B, { id: "kCLnJG" })
|
|
2959
2959
|
})]
|
|
2960
2960
|
})
|
|
2961
2961
|
}),
|
|
2962
2962
|
/* @__PURE__ */ M(Le, {
|
|
2963
|
-
containers:
|
|
2964
|
-
createModalOpen:
|
|
2965
|
-
setCreateModalOpen:
|
|
2966
|
-
onCreateSuccess:
|
|
2963
|
+
containers: z,
|
|
2964
|
+
createModalOpen: l,
|
|
2965
|
+
setCreateModalOpen: u,
|
|
2966
|
+
onCreateSuccess: b,
|
|
2967
2967
|
onCreateError: x,
|
|
2968
2968
|
onEmptySuccess: S,
|
|
2969
2969
|
onEmptyError: C,
|
|
2970
2970
|
onDeleteSuccess: w,
|
|
2971
2971
|
onDeleteError: D,
|
|
2972
|
-
selectedContainers:
|
|
2973
|
-
setSelectedContainers:
|
|
2972
|
+
selectedContainers: m,
|
|
2973
|
+
setSelectedContainers: h
|
|
2974
2974
|
}),
|
|
2975
2975
|
/* @__PURE__ */ M(Ke, {
|
|
2976
|
-
isOpen:
|
|
2977
|
-
buckets:
|
|
2978
|
-
onClose: () =>
|
|
2976
|
+
isOpen: d,
|
|
2977
|
+
buckets: W,
|
|
2978
|
+
onClose: () => f(!1),
|
|
2979
2979
|
onComplete: k
|
|
2980
2980
|
}),
|
|
2981
|
-
|
|
2982
|
-
...
|
|
2981
|
+
g && /* @__PURE__ */ M(p, {
|
|
2982
|
+
...g,
|
|
2983
2983
|
className: "border-theme-light fixed top-5 right-5 z-50 rounded-lg border shadow-lg"
|
|
2984
2984
|
})
|
|
2985
2985
|
]
|
|
@@ -2988,27 +2988,29 @@ var ze = (e, t) => ({
|
|
|
2988
2988
|
//#endregion
|
|
2989
2989
|
//#region src/client/routes/_auth/projects/$projectId/storage/$provider/containers/index.tsx?tsr-split=component
|
|
2990
2990
|
function Je() {
|
|
2991
|
-
let { project: e, provider: t } =
|
|
2991
|
+
let { project: e, provider: t } = z({
|
|
2992
2992
|
from: "/_auth/projects/$projectId/storage/$provider/containers/",
|
|
2993
2993
|
select: (e) => ({
|
|
2994
2994
|
project: e.projectId,
|
|
2995
2995
|
provider: e.provider
|
|
2996
2996
|
})
|
|
2997
|
-
}), {
|
|
2997
|
+
}), { i18n: n, _: r } = V(), i;
|
|
2998
2998
|
switch (t) {
|
|
2999
2999
|
case "swift":
|
|
3000
|
+
i = n._({ id: "+OEi73" });
|
|
3001
|
+
break;
|
|
3000
3002
|
case "ceph":
|
|
3001
|
-
|
|
3003
|
+
i = n._({ id: "KhNDX4" });
|
|
3002
3004
|
break;
|
|
3003
|
-
default:
|
|
3005
|
+
default: i = n._({ id: "IWF68U" });
|
|
3004
3006
|
}
|
|
3005
|
-
return
|
|
3006
|
-
title:
|
|
3007
|
+
return /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M(D, {
|
|
3008
|
+
title: i,
|
|
3007
3009
|
projectId: e
|
|
3008
|
-
}), e ? /* @__PURE__ */ M(
|
|
3010
|
+
}), e ? /* @__PURE__ */ M(U, {
|
|
3009
3011
|
fallback: /* @__PURE__ */ M("div", {
|
|
3010
3012
|
className: "p-4 text-center",
|
|
3011
|
-
children: /* @__PURE__ */ M(
|
|
3013
|
+
children: /* @__PURE__ */ M(B, { id: "diFNkW" })
|
|
3012
3014
|
}),
|
|
3013
3015
|
children: (() => {
|
|
3014
3016
|
switch (t) {
|
|
@@ -3019,11 +3021,11 @@ function Je() {
|
|
|
3019
3021
|
})()
|
|
3020
3022
|
}) : /* @__PURE__ */ M("div", {
|
|
3021
3023
|
className: "p-4 text-center",
|
|
3022
|
-
children: /* @__PURE__ */ M(
|
|
3024
|
+
children: /* @__PURE__ */ M(B, { id: "Z2fZGD" })
|
|
3023
3025
|
})] });
|
|
3024
3026
|
}
|
|
3025
3027
|
var Ye = () => /* @__PURE__ */ M(Je, {});
|
|
3026
3028
|
//#endregion
|
|
3027
3029
|
export { Ye as component };
|
|
3028
3030
|
|
|
3029
|
-
//# sourceMappingURL=containers-
|
|
3031
|
+
//# sourceMappingURL=containers-BWERuY0O.mjs.map
|