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