@cobaltcore-dev/aurora 0.2.2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/AuroraApp.d.ts +10 -0
- package/dist/client/{ContentHeader-DtBiIwRY.mjs → ContentHeader-BXZoN3B9.mjs} +15 -15
- package/dist/client/{ContentHeader-DtBiIwRY.mjs.map → ContentHeader-BXZoN3B9.mjs.map} +1 -1
- package/dist/client/{DeleteFlavorModal-rmuYIafD.mjs → DeleteFlavorModal-BusYn32r.mjs} +148 -148
- package/dist/client/{DeleteFlavorModal-rmuYIafD.mjs.map → DeleteFlavorModal-BusYn32r.mjs.map} +1 -1
- package/dist/client/{EditSecurityGroupModal-B7Sz9puM.mjs → EditSecurityGroupModal-Dl6m7wUe.mjs} +16 -16
- package/dist/client/{EditSecurityGroupModal-B7Sz9puM.mjs.map → EditSecurityGroupModal-Dl6m7wUe.mjs.map} +1 -1
- package/dist/client/FiltersInput-BgNaHFBt.mjs +81 -0
- package/dist/client/FiltersInput-BgNaHFBt.mjs.map +1 -0
- package/dist/client/{FloatingIpActionModals-CfRJiZqD.mjs → FloatingIpActionModals-By2hXR9m.mjs} +51 -51
- package/dist/client/{FloatingIpActionModals-CfRJiZqD.mjs.map → FloatingIpActionModals-By2hXR9m.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications-Cw30RXsw.mjs → ImageToastNotifications-fHI8jB2j.mjs} +369 -369
- package/dist/client/{ImageToastNotifications-Cw30RXsw.mjs.map → ImageToastNotifications-fHI8jB2j.mjs.map} +1 -1
- package/dist/client/ListToolbar-BvtCo8dk.mjs +129 -0
- package/dist/client/ListToolbar-BvtCo8dk.mjs.map +1 -0
- package/dist/client/{RouteError-Cyto623-.mjs → RouteError-pDEWC_k7.mjs} +2 -2
- package/dist/client/{RouteError-Cyto623-.mjs.map → RouteError-pDEWC_k7.mjs.map} +1 -1
- package/dist/client/SortInput-DXWSqSny.mjs +34 -0
- package/dist/client/SortInput-DXWSqSny.mjs.map +1 -0
- package/dist/client/{_flavorId-B-1fYadl.mjs → _flavorId-BRonXvCo.mjs} +46 -46
- package/dist/client/_flavorId-BRonXvCo.mjs.map +1 -0
- package/dist/client/{_flavorId-BYfIHIV_.mjs → _flavorId-BoNcxYmF.mjs} +10 -10
- package/dist/client/_flavorId-BoNcxYmF.mjs.map +1 -0
- package/dist/client/_floatingIpId-BpUfL8Im2.mjs +228 -0
- package/dist/client/_floatingIpId-BpUfL8Im2.mjs.map +1 -0
- package/dist/client/{_floatingIpId-IrnN-ozB.mjs → _floatingIpId-CwHiXazi.mjs} +2 -2
- package/dist/client/{_floatingIpId-IrnN-ozB.mjs.map → _floatingIpId-CwHiXazi.mjs.map} +1 -1
- package/dist/client/{_imageId-Tx_9bqEc.mjs → _imageId-CdOOJjw0.mjs} +158 -158
- package/dist/client/_imageId-CdOOJjw0.mjs.map +1 -0
- package/dist/client/{_pcaId-CFuKY82d.mjs → _pcaId-CwlH1Kvl.mjs} +132 -132
- package/dist/client/{_pcaId-CFuKY82d.mjs.map → _pcaId-CwlH1Kvl.mjs.map} +1 -1
- package/dist/client/{_pcaId-Bck7S7gJ.mjs → _pcaId-D1ZEaCdp.mjs} +2 -2
- package/dist/client/{_pcaId-Bck7S7gJ.mjs.map → _pcaId-D1ZEaCdp.mjs.map} +1 -1
- package/dist/client/_projectId-D1gGribM.mjs +316 -0
- package/dist/client/_projectId-D1gGribM.mjs.map +1 -0
- package/dist/client/{_projectId-PSpuCKO7.mjs → _projectId-DhLpIalx.mjs} +9 -9
- package/dist/client/{_projectId-PSpuCKO7.mjs.map → _projectId-DhLpIalx.mjs.map} +1 -1
- package/dist/client/{_projectId-B1VjDd0Z.mjs → _projectId-Dj_InfSc.mjs} +3 -3
- package/dist/client/{_projectId-B1VjDd0Z.mjs.map → _projectId-Dj_InfSc.mjs.map} +1 -1
- package/dist/client/{_projectId-Pxp-RXK4.mjs → _projectId-OW2xkK43.mjs} +2 -2
- package/dist/client/{_projectId-Pxp-RXK4.mjs.map → _projectId-OW2xkK43.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-VV2lUcGQ.mjs → _securityGroupId-B0llWH9A.mjs} +2 -2
- package/dist/client/{_securityGroupId-VV2lUcGQ.mjs.map → _securityGroupId-B0llWH9A.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-Dqi6ddw4.mjs → _securityGroupId-gbUnd5Wv.mjs} +363 -363
- package/dist/client/{_securityGroupId-Dqi6ddw4.mjs.map → _securityGroupId-gbUnd5Wv.mjs.map} +1 -1
- package/dist/client/{about-B2AzqxFI.mjs → about-DCe6LsKz.mjs} +8 -8
- package/dist/client/{about-B2AzqxFI.mjs.map → about-DCe6LsKz.mjs.map} +1 -1
- package/dist/client/{build-Cf7iWbpH.mjs → build-BJDfnAyi.mjs} +1573 -1564
- package/dist/client/{build-Cf7iWbpH.mjs.map → build-BJDfnAyi.mjs.map} +1 -1
- package/dist/client/{buildFilterParams-ngVK3ybs.mjs → buildFilterParams-By33pG59.mjs} +1 -1
- package/dist/client/{buildFilterParams-ngVK3ybs.mjs.map → buildFilterParams-By33pG59.mjs.map} +1 -1
- package/dist/client/{constants-CCgR6fKI.mjs → constants-CAjjRTo_.mjs} +9 -9
- package/dist/client/{constants-CCgR6fKI.mjs.map → constants-CAjjRTo_.mjs.map} +1 -1
- package/dist/client/{containers-BWERuY0O.mjs → containers-BuXUVb1N.mjs} +811 -811
- package/dist/client/{containers-BWERuY0O.mjs.map → containers-BuXUVb1N.mjs.map} +1 -1
- package/dist/client/{containers-Cs5vOeR2.mjs → containers-Ca5V1EBS.mjs} +1 -1
- package/dist/client/containers-Ca5V1EBS.mjs.map +1 -0
- package/dist/client/{containers-DovytjVP.mjs → containers-NW7RnHTI.mjs} +6 -6
- package/dist/client/containers-NW7RnHTI.mjs.map +1 -0
- package/dist/client/flavors-BXPYAFyQ.mjs.map +1 -1
- package/dist/client/{flavors-CUiALHcB.mjs → flavors-D8oElC2K.mjs} +2 -2
- package/dist/client/{flavors-CUiALHcB.mjs.map → flavors-D8oElC2K.mjs.map} +1 -1
- package/dist/client/flavors-qvgPSI7J.mjs +613 -0
- package/dist/client/flavors-qvgPSI7J.mjs.map +1 -0
- package/dist/client/{floatingips-BrjDiY2t.mjs → floatingips-Be3zLoaD.mjs} +126 -126
- package/dist/client/{floatingips-BrjDiY2t.mjs.map → floatingips-Be3zLoaD.mjs.map} +1 -1
- package/dist/client/{images-BZP3pBqj.mjs → images-BiEBENaj.mjs} +2 -2
- package/dist/client/{images-BZP3pBqj.mjs.map → images-BiEBENaj.mjs.map} +1 -1
- package/dist/client/images-CCYBAphP2.mjs +1900 -0
- package/dist/client/images-CCYBAphP2.mjs.map +1 -0
- package/dist/client/images-DM9I8G0p.mjs.map +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.js +410 -412
- package/dist/client/index.js.map +1 -1
- package/dist/client/{network-SCVadZsv.mjs → network-nbSbl0X0.mjs} +1 -1
- package/dist/client/{network-SCVadZsv.mjs.map → network-nbSbl0X0.mjs.map} +1 -1
- package/dist/client/{objects-D4zBka5e.mjs → objects-CU5ws07o.mjs} +6 -6
- package/dist/client/objects-CU5ws07o.mjs.map +1 -0
- package/dist/client/objects-FXN0VWLI.mjs +4760 -0
- package/dist/client/{objects-Cw4Vu01M.mjs.map → objects-FXN0VWLI.mjs.map} +1 -1
- package/dist/client/{objects-B4yrYf_a.mjs → objects-GmuIOaHd.mjs} +1 -1
- package/dist/client/objects-GmuIOaHd.mjs.map +1 -0
- package/dist/client/{overview-BtIXpYBo.mjs → overview-B3gdnWTG.mjs} +2 -2
- package/dist/client/{overview-BtIXpYBo.mjs.map → overview-B3gdnWTG.mjs.map} +1 -1
- package/dist/client/{overview-2J54-loz.mjs → overview-DzYBiNfD.mjs} +2 -2
- package/dist/client/{overview-2J54-loz.mjs.map → overview-DzYBiNfD.mjs.map} +1 -1
- package/dist/client/{overview-D0AAvsmL.mjs → overview-EhfPY8Je.mjs} +2 -2
- package/dist/client/{overview-D0AAvsmL.mjs.map → overview-EhfPY8Je.mjs.map} +1 -1
- package/dist/client/{overview-BnmukbFh.mjs → overview-XueZI4LQ.mjs} +7 -7
- package/dist/client/{overview-BnmukbFh.mjs.map → overview-XueZI4LQ.mjs.map} +1 -1
- package/dist/client/{pca-BqZycwCu.mjs → pca-DSM71LhW.mjs} +2 -2
- package/dist/client/{pca-BqZycwCu.mjs.map → pca-DSM71LhW.mjs.map} +1 -1
- package/dist/client/{pca-V2aaOxZA.mjs → pca-x9if8xU-.mjs} +59 -59
- package/dist/client/{pca-V2aaOxZA.mjs.map → pca-x9if8xU-.mjs.map} +1 -1
- package/dist/client/{projects-jyIHL6DE.mjs → projects-B6BPo2Ar.mjs} +2 -2
- package/dist/client/projects-B6BPo2Ar.mjs.map +1 -0
- package/dist/client/{projects-BsN4bvU2.mjs → projects-BilrmHLu.mjs} +1 -1
- package/dist/client/projects-BilrmHLu.mjs.map +1 -0
- package/dist/client/{projects-0feOw_b6.mjs → projects-Bt0XptpG.mjs} +2 -2
- package/dist/client/projects-Bt0XptpG.mjs.map +1 -0
- package/dist/client/projects-CnmZIB2Q.mjs +95 -0
- package/dist/client/projects-CnmZIB2Q.mjs.map +1 -0
- package/dist/client/{securitygroups-B4MkSBtI.mjs → securitygroups-BdzieS7Z.mjs} +121 -121
- package/dist/client/{securitygroups-B4MkSBtI.mjs.map → securitygroups-BdzieS7Z.mjs.map} +1 -1
- package/dist/client/{useListWithFiltering-CEDh1LO-.mjs → useListWithFiltering-CqQbAjEe.mjs} +1 -1
- package/dist/client/{useListWithFiltering-CEDh1LO-.mjs.map → useListWithFiltering-CqQbAjEe.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/client/ListToolbar-DuazvsAu.mjs +0 -223
- package/dist/client/ListToolbar-DuazvsAu.mjs.map +0 -1
- package/dist/client/_flavorId-B-1fYadl.mjs.map +0 -1
- package/dist/client/_flavorId-BYfIHIV_.mjs.map +0 -1
- package/dist/client/_floatingIpId-FQ5P2qMV.mjs +0 -228
- package/dist/client/_floatingIpId-FQ5P2qMV.mjs.map +0 -1
- package/dist/client/_imageId-Tx_9bqEc.mjs.map +0 -1
- package/dist/client/_projectId-Bs4W9hos.mjs +0 -283
- package/dist/client/_projectId-Bs4W9hos.mjs.map +0 -1
- package/dist/client/containers-Cs5vOeR2.mjs.map +0 -1
- package/dist/client/containers-DovytjVP.mjs.map +0 -1
- package/dist/client/flavors-Bovz-I2U.mjs +0 -565
- package/dist/client/flavors-Bovz-I2U.mjs.map +0 -1
- package/dist/client/images-DaaCUXMI.mjs +0 -1797
- package/dist/client/images-DaaCUXMI.mjs.map +0 -1
- package/dist/client/objects-B4yrYf_a.mjs.map +0 -1
- package/dist/client/objects-Cw4Vu01M.mjs +0 -4760
- package/dist/client/objects-D4zBka5e.mjs.map +0 -1
- package/dist/client/projects-0feOw_b6.mjs.map +0 -1
- package/dist/client/projects-BsN4bvU2.mjs.map +0 -1
- package/dist/client/projects-C1IYOvFQ.mjs +0 -144
- package/dist/client/projects-C1IYOvFQ.mjs.map +0 -1
- package/dist/client/projects-jyIHL6DE.mjs.map +0 -1
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
import { $ as e, A as t,
|
|
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
2
|
import { r as T } from "./trpcClient-BxguzNYF.mjs";
|
|
3
|
-
import { t as E } from "./containers-
|
|
4
|
-
import { t as D } from "./ContentHeader-
|
|
5
|
-
import { t as O } from "./
|
|
6
|
-
import { t as k } from "./
|
|
7
|
-
import { t as A } from "./
|
|
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
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
|
|
10
|
-
import { useNavigate as
|
|
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
11
|
import { Trans as B, useLingui as V } from "@lingui/react";
|
|
12
12
|
import { i18n as H } from "@lingui/core";
|
|
13
13
|
import { ErrorBoundary as U } from "react-error-boundary";
|
|
14
14
|
import { useVirtualizer as W } from "@tanstack/react-virtual";
|
|
15
15
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/CreateContainerModal.tsx
|
|
16
|
-
var G = ({ isOpen:
|
|
17
|
-
let { i18n:
|
|
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
18
|
onSuccess: () => {
|
|
19
19
|
p.storage.swift.listContainers.invalidate();
|
|
20
|
-
let e =
|
|
21
|
-
|
|
20
|
+
let e = c.trim();
|
|
21
|
+
n?.(e);
|
|
22
22
|
},
|
|
23
23
|
onError: (e) => {
|
|
24
|
-
|
|
24
|
+
r?.(c.trim(), e.message);
|
|
25
25
|
},
|
|
26
26
|
onSettled: () => {
|
|
27
27
|
h();
|
|
28
28
|
}
|
|
29
29
|
}), h = () => {
|
|
30
|
-
|
|
31
|
-
}, g = (e) => e.trim() ? e.length >
|
|
30
|
+
l(""), f(null), m.reset(), t();
|
|
31
|
+
}, g = (e) => e.trim() ? e.length > i ? (f(a._({
|
|
32
32
|
id: "r5SQFW",
|
|
33
|
-
values: { maxContainerNameLength:
|
|
34
|
-
})), !1) : e.includes("/") ? (f(
|
|
33
|
+
values: { maxContainerNameLength: i }
|
|
34
|
+
})), !1) : e.includes("/") ? (f(a._({ id: "9J93Xr" })), !1) : (f(null), !0) : (f(a._({ id: "JNGYAW" })), !1), _ = (e) => {
|
|
35
35
|
let t = e.target.value;
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
g(
|
|
39
|
-
project_id:
|
|
40
|
-
container:
|
|
36
|
+
l(t), d && g(t);
|
|
37
|
+
}, v = () => {
|
|
38
|
+
g(c) && m.mutate({
|
|
39
|
+
project_id: s,
|
|
40
|
+
container: c.trim()
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
|
-
return
|
|
44
|
-
title:
|
|
45
|
-
open:
|
|
43
|
+
return e ? /* @__PURE__ */ M(x, {
|
|
44
|
+
title: a._({ id: "vTh35P" }),
|
|
45
|
+
open: e,
|
|
46
46
|
onCancel: h,
|
|
47
|
-
confirmButtonLabel:
|
|
48
|
-
onConfirm:
|
|
49
|
-
cancelButtonLabel:
|
|
47
|
+
confirmButtonLabel: a._({ id: "hYgDIe" }),
|
|
48
|
+
onConfirm: v,
|
|
49
|
+
cancelButtonLabel: a._({ id: "dEgA5A" }),
|
|
50
50
|
size: "small",
|
|
51
|
-
disableConfirmButton: m.isPending || !
|
|
52
|
-
children: /* @__PURE__ */ N(
|
|
51
|
+
disableConfirmButton: m.isPending || !c.trim(),
|
|
52
|
+
children: /* @__PURE__ */ N(b, {
|
|
53
53
|
direction: "vertical",
|
|
54
54
|
gap: "6",
|
|
55
55
|
children: [/* @__PURE__ */ M("p", {
|
|
56
56
|
className: "text-theme-default",
|
|
57
57
|
children: /* @__PURE__ */ M(B, { id: "ne/GWZ" })
|
|
58
|
-
}), /* @__PURE__ */ M(
|
|
59
|
-
label:
|
|
58
|
+
}), /* @__PURE__ */ M(u, {
|
|
59
|
+
label: a._({ id: "SUSS9i" }),
|
|
60
60
|
required: !0,
|
|
61
|
-
value:
|
|
61
|
+
value: c,
|
|
62
62
|
onChange: _,
|
|
63
63
|
onKeyDown: (e) => {
|
|
64
|
-
e.key === "Enter" &&
|
|
64
|
+
e.key === "Enter" && v();
|
|
65
65
|
},
|
|
66
66
|
invalid: !!d,
|
|
67
67
|
errortext: d || void 0,
|
|
68
68
|
disabled: m.isPending,
|
|
69
69
|
autoFocus: !0,
|
|
70
|
-
placeholder:
|
|
70
|
+
placeholder: a._({ id: "W5FkH9" })
|
|
71
71
|
})]
|
|
72
72
|
})
|
|
73
73
|
}) : null;
|
|
74
|
-
}, te = ({ isOpen:
|
|
75
|
-
let { i18n:
|
|
76
|
-
|
|
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
77
|
E(!0), setTimeout(() => E(!1), 2e3);
|
|
78
78
|
});
|
|
79
79
|
}, j = T.useUtils(), { data: P, isLoading: F, error: I } = T.storage.swift.listObjects.useQuery({
|
|
80
|
-
project_id:
|
|
81
|
-
container:
|
|
80
|
+
project_id: m,
|
|
81
|
+
container: t?.name ?? "",
|
|
82
82
|
format: "json",
|
|
83
83
|
limit: 100
|
|
84
|
-
}, { enabled:
|
|
84
|
+
}, { enabled: e && t !== null }), R = T.storage.swift.emptyContainer.useMutation({
|
|
85
85
|
onSuccess: (e) => {
|
|
86
86
|
j.storage.swift.listContainers.invalidate(), j.storage.swift.listObjects.invalidate({
|
|
87
|
-
project_id:
|
|
87
|
+
project_id: m,
|
|
88
88
|
container: D.current
|
|
89
|
-
}),
|
|
89
|
+
}), o?.(D.current, e);
|
|
90
90
|
},
|
|
91
91
|
onError: (e) => {
|
|
92
|
-
|
|
92
|
+
c?.(D.current, e.message);
|
|
93
93
|
},
|
|
94
94
|
onSettled: () => {
|
|
95
95
|
z();
|
|
96
96
|
}
|
|
97
97
|
}), z = () => {
|
|
98
|
-
|
|
98
|
+
y(""), C(null), R.reset(), r();
|
|
99
99
|
}, H = (e) => {
|
|
100
100
|
let t = e.target.value;
|
|
101
|
-
|
|
101
|
+
y(t), S && C(null);
|
|
102
102
|
}, U = () => {
|
|
103
|
-
if (
|
|
104
|
-
if (
|
|
105
|
-
|
|
103
|
+
if (t) {
|
|
104
|
+
if (g.trim() !== t.name) {
|
|
105
|
+
C(f._({ id: "jS4B2+" }));
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
|
-
D.current =
|
|
109
|
-
project_id:
|
|
110
|
-
container:
|
|
108
|
+
D.current = t.name, R.mutate({
|
|
109
|
+
project_id: m,
|
|
110
|
+
container: t.name
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
}, W = (e) => {
|
|
114
114
|
e.key === "Enter" && U();
|
|
115
115
|
};
|
|
116
|
-
if (!
|
|
117
|
-
let G = P?.length ?? 0, te = !F &&
|
|
118
|
-
return /* @__PURE__ */ N(
|
|
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
119
|
title: /* @__PURE__ */ N("span", {
|
|
120
120
|
className: "flex max-w-[400px] items-center gap-2",
|
|
121
121
|
children: [
|
|
@@ -125,30 +125,30 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
125
125
|
}),
|
|
126
126
|
/* @__PURE__ */ M("span", {
|
|
127
127
|
className: "truncate",
|
|
128
|
-
title:
|
|
129
|
-
children:
|
|
128
|
+
title: t.name,
|
|
129
|
+
children: t.name
|
|
130
130
|
}),
|
|
131
131
|
!F && !K && /* @__PURE__ */ M("button", {
|
|
132
132
|
type: "button",
|
|
133
|
-
onClick:
|
|
134
|
-
title:
|
|
133
|
+
onClick: A,
|
|
134
|
+
title: w ? f._({ id: "PiH3UR" }) : f._({ id: "NQU1Nn" }),
|
|
135
135
|
className: "text-theme-light hover:text-theme-default inline-flex items-center transition-colors",
|
|
136
|
-
children: /* @__PURE__ */ M(
|
|
137
|
-
icon:
|
|
136
|
+
children: /* @__PURE__ */ M(v, {
|
|
137
|
+
icon: w ? "checkCircle" : "contentCopy",
|
|
138
138
|
size: "16"
|
|
139
139
|
})
|
|
140
140
|
})
|
|
141
141
|
]
|
|
142
142
|
}),
|
|
143
|
-
open:
|
|
143
|
+
open: e,
|
|
144
144
|
onCancel: z,
|
|
145
|
-
confirmButtonLabel: K ? void 0 :
|
|
145
|
+
confirmButtonLabel: K ? void 0 : f._({ id: "N2S1rs" }),
|
|
146
146
|
confirmButtonVariant: "primary-danger",
|
|
147
147
|
onConfirm: K ? void 0 : U,
|
|
148
|
-
cancelButtonLabel: K ? void 0 :
|
|
149
|
-
modalFooter: K ? /* @__PURE__ */ M(
|
|
148
|
+
cancelButtonLabel: K ? void 0 : f._({ id: "dEgA5A" }),
|
|
149
|
+
modalFooter: K ? /* @__PURE__ */ M(n, {
|
|
150
150
|
className: "flex justify-end",
|
|
151
|
-
children: /* @__PURE__ */ M(_, { children: /* @__PURE__ */ M(
|
|
151
|
+
children: /* @__PURE__ */ M(_, { children: /* @__PURE__ */ M(h, {
|
|
152
152
|
variant: "primary",
|
|
153
153
|
onClick: z,
|
|
154
154
|
"data-testid": "empty-info-close-button",
|
|
@@ -156,7 +156,7 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
156
156
|
}) })
|
|
157
157
|
}) : void 0,
|
|
158
158
|
size: "small",
|
|
159
|
-
disableConfirmButton: F ||
|
|
159
|
+
disableConfirmButton: F || R.isPending || !K && !g.trim() || !K && g.trim() !== t.name,
|
|
160
160
|
children: [I && /* @__PURE__ */ M("p", {
|
|
161
161
|
className: "text-theme-error mb-4",
|
|
162
162
|
children: (() => {
|
|
@@ -166,16 +166,16 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
166
166
|
values: { errorMessage: e }
|
|
167
167
|
});
|
|
168
168
|
})()
|
|
169
|
-
}), F ? /* @__PURE__ */ N(
|
|
169
|
+
}), F ? /* @__PURE__ */ N(b, {
|
|
170
170
|
direction: "horizontal",
|
|
171
171
|
alignment: "center",
|
|
172
172
|
gap: "2",
|
|
173
173
|
className: "py-4",
|
|
174
|
-
children: [/* @__PURE__ */ M(
|
|
174
|
+
children: [/* @__PURE__ */ M(l, { size: "small" }), /* @__PURE__ */ M(B, { id: "ujK/QN" })]
|
|
175
175
|
}) : K && !I ? /* @__PURE__ */ M("p", {
|
|
176
176
|
className: "text-theme-default py-2",
|
|
177
177
|
children: te ? /* @__PURE__ */ M(B, { id: "jNm/qL" }) : /* @__PURE__ */ M(B, { id: "WefafP" })
|
|
178
|
-
}) : I ? null : /* @__PURE__ */ N(
|
|
178
|
+
}) : I ? null : /* @__PURE__ */ N(b, {
|
|
179
179
|
direction: "vertical",
|
|
180
180
|
gap: "6",
|
|
181
181
|
children: [
|
|
@@ -197,10 +197,10 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
197
197
|
/* @__PURE__ */ N("div", {
|
|
198
198
|
className: "border-theme-background-lvl-3 overflow-hidden rounded border",
|
|
199
199
|
children: [
|
|
200
|
-
|
|
200
|
+
t.count > G && /* @__PURE__ */ M("p", {
|
|
201
201
|
className: "text-theme-light px-3 py-2 text-xs",
|
|
202
202
|
children: (() => {
|
|
203
|
-
let e =
|
|
203
|
+
let e = t.count;
|
|
204
204
|
return /* @__PURE__ */ M(B, {
|
|
205
205
|
id: "1iQtS2",
|
|
206
206
|
values: {
|
|
@@ -210,93 +210,93 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
210
210
|
});
|
|
211
211
|
})()
|
|
212
212
|
}),
|
|
213
|
-
/* @__PURE__ */ M(
|
|
213
|
+
/* @__PURE__ */ M(d, {
|
|
214
214
|
columns: 3,
|
|
215
215
|
className: "text-sm",
|
|
216
|
-
children: /* @__PURE__ */ N(
|
|
217
|
-
/* @__PURE__ */ M(
|
|
218
|
-
/* @__PURE__ */ M(
|
|
219
|
-
/* @__PURE__ */ M(
|
|
216
|
+
children: /* @__PURE__ */ N(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
220
|
] })
|
|
221
221
|
}),
|
|
222
222
|
/* @__PURE__ */ M("div", {
|
|
223
223
|
className: "max-h-48 overflow-y-auto",
|
|
224
|
-
children: /* @__PURE__ */ M(
|
|
224
|
+
children: /* @__PURE__ */ M(d, {
|
|
225
225
|
columns: 3,
|
|
226
226
|
className: "text-sm",
|
|
227
|
-
children: P.map((e) => /* @__PURE__ */ N(
|
|
228
|
-
/* @__PURE__ */ M(
|
|
227
|
+
children: P.map((e) => /* @__PURE__ */ N(a, { children: [
|
|
228
|
+
/* @__PURE__ */ M(s, {
|
|
229
229
|
className: "max-w-[200px] truncate",
|
|
230
230
|
title: e.name,
|
|
231
231
|
children: e.name
|
|
232
232
|
}),
|
|
233
|
-
/* @__PURE__ */ M(
|
|
234
|
-
/* @__PURE__ */ M(
|
|
233
|
+
/* @__PURE__ */ M(s, { children: O(e.bytes) }),
|
|
234
|
+
/* @__PURE__ */ M(s, { children: e.last_modified ? new Date(e.last_modified).toLocaleString() : f._({ id: "fj5byd" }) })
|
|
235
235
|
] }, e.name))
|
|
236
236
|
})
|
|
237
237
|
})
|
|
238
238
|
]
|
|
239
239
|
}),
|
|
240
|
-
/* @__PURE__ */ M(
|
|
241
|
-
label:
|
|
240
|
+
/* @__PURE__ */ M(u, {
|
|
241
|
+
label: f._({ id: "33F2A+" }),
|
|
242
242
|
required: !0,
|
|
243
|
-
value:
|
|
243
|
+
value: g,
|
|
244
244
|
onChange: H,
|
|
245
245
|
onKeyDown: W,
|
|
246
|
-
invalid: !!
|
|
247
|
-
errortext:
|
|
248
|
-
disabled:
|
|
246
|
+
invalid: !!S,
|
|
247
|
+
errortext: S || void 0,
|
|
248
|
+
disabled: R.isPending,
|
|
249
249
|
autoFocus: !0,
|
|
250
|
-
placeholder:
|
|
250
|
+
placeholder: t.name
|
|
251
251
|
})
|
|
252
252
|
]
|
|
253
253
|
})]
|
|
254
254
|
});
|
|
255
|
-
}, ne = ({ isOpen:
|
|
256
|
-
let { i18n:
|
|
257
|
-
project_id:
|
|
258
|
-
container:
|
|
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
259
|
format: "json",
|
|
260
260
|
limit: 1
|
|
261
|
-
}, { enabled:
|
|
262
|
-
project_id:
|
|
263
|
-
container:
|
|
264
|
-
}, { enabled:
|
|
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
265
|
onSuccess: () => {
|
|
266
|
-
|
|
266
|
+
y.storage.swift.listContainers.invalidate(), i?.(t.name);
|
|
267
267
|
},
|
|
268
268
|
onError: (e) => {
|
|
269
|
-
|
|
269
|
+
a?.(t.name, e.message);
|
|
270
270
|
},
|
|
271
271
|
onSettled: () => {
|
|
272
272
|
P();
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
275
|
I(() => {
|
|
276
|
-
|
|
277
|
-
}, [
|
|
276
|
+
e || (f(""), m(null), v(!1), j.reset());
|
|
277
|
+
}, [e, t?.name]);
|
|
278
278
|
let P = () => {
|
|
279
|
-
|
|
279
|
+
f(""), m(null), v(!1), j.reset(), r();
|
|
280
280
|
}, F = (e) => {
|
|
281
281
|
let t = e.target.value;
|
|
282
|
-
|
|
283
|
-
},
|
|
284
|
-
if (
|
|
285
|
-
if (
|
|
286
|
-
|
|
282
|
+
f(t), p && m(null);
|
|
283
|
+
}, ee = () => {
|
|
284
|
+
if (t && !(E || O)) {
|
|
285
|
+
if (d.trim() !== "delete") {
|
|
286
|
+
m(o._({ id: "b5aNMO" }));
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
|
-
|
|
290
|
-
project_id:
|
|
291
|
-
container:
|
|
289
|
+
A && !g || j.mutate({
|
|
290
|
+
project_id: c,
|
|
291
|
+
container: t.name
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
|
-
},
|
|
295
|
-
e.key === "Enter" &&
|
|
294
|
+
}, R = (e) => {
|
|
295
|
+
e.key === "Enter" && ee();
|
|
296
296
|
};
|
|
297
|
-
if (!
|
|
298
|
-
let z = S?.length ?? 0, H = !
|
|
299
|
-
return /* @__PURE__ */ N(
|
|
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
300
|
title: /* @__PURE__ */ N("span", {
|
|
301
301
|
className: "flex max-w-[400px] items-center gap-2",
|
|
302
302
|
children: [/* @__PURE__ */ M("span", {
|
|
@@ -304,19 +304,19 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
304
304
|
children: /* @__PURE__ */ M(B, { id: "Vzlopx" })
|
|
305
305
|
}), /* @__PURE__ */ M("span", {
|
|
306
306
|
className: "truncate",
|
|
307
|
-
title:
|
|
308
|
-
children:
|
|
307
|
+
title: t.name,
|
|
308
|
+
children: t.name
|
|
309
309
|
})]
|
|
310
310
|
}),
|
|
311
|
-
open:
|
|
311
|
+
open: e,
|
|
312
312
|
onCancel: P,
|
|
313
|
-
confirmButtonLabel: H ? void 0 :
|
|
313
|
+
confirmButtonLabel: H ? void 0 : o._({ id: "cnGeoo" }),
|
|
314
314
|
confirmButtonVariant: H ? void 0 : "primary-danger",
|
|
315
|
-
onConfirm: H ? void 0 :
|
|
316
|
-
cancelButtonLabel: H ? void 0 :
|
|
317
|
-
modalFooter: H ? /* @__PURE__ */ M(
|
|
315
|
+
onConfirm: H ? void 0 : ee,
|
|
316
|
+
cancelButtonLabel: H ? void 0 : o._({ id: "dEgA5A" }),
|
|
317
|
+
modalFooter: H ? /* @__PURE__ */ M(n, {
|
|
318
318
|
className: "flex justify-end",
|
|
319
|
-
children: /* @__PURE__ */ M(_, { children: /* @__PURE__ */ M(
|
|
319
|
+
children: /* @__PURE__ */ M(_, { children: /* @__PURE__ */ M(h, {
|
|
320
320
|
variant: "primary",
|
|
321
321
|
onClick: P,
|
|
322
322
|
"data-testid": "delete-has-objects-close-button",
|
|
@@ -324,8 +324,8 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
324
324
|
}) })
|
|
325
325
|
}) : void 0,
|
|
326
326
|
size: "small",
|
|
327
|
-
disableConfirmButton:
|
|
328
|
-
children: [(E || O) && /* @__PURE__ */ N(
|
|
327
|
+
disableConfirmButton: C || W || j.isPending || !H && d.trim() !== "delete" || !H && A && !g,
|
|
328
|
+
children: [(E || O) && /* @__PURE__ */ N(b, {
|
|
329
329
|
direction: "vertical",
|
|
330
330
|
gap: "2",
|
|
331
331
|
className: "mb-4",
|
|
@@ -350,13 +350,13 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
350
350
|
});
|
|
351
351
|
})()
|
|
352
352
|
})]
|
|
353
|
-
}),
|
|
353
|
+
}), C ? /* @__PURE__ */ N(b, {
|
|
354
354
|
direction: "horizontal",
|
|
355
355
|
alignment: "center",
|
|
356
356
|
gap: "2",
|
|
357
357
|
className: "py-4",
|
|
358
|
-
children: [/* @__PURE__ */ M(
|
|
359
|
-
}) : H ? /* @__PURE__ */ N(
|
|
358
|
+
children: [/* @__PURE__ */ M(l, { size: "small" }), /* @__PURE__ */ M(B, { id: "Z3FXyt" })]
|
|
359
|
+
}) : H ? /* @__PURE__ */ N(b, {
|
|
360
360
|
direction: "vertical",
|
|
361
361
|
gap: "3",
|
|
362
362
|
children: [/* @__PURE__ */ M("p", {
|
|
@@ -366,7 +366,7 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
366
366
|
className: "text-theme-default",
|
|
367
367
|
children: /* @__PURE__ */ M(B, { id: "x3T4pq" })
|
|
368
368
|
})]
|
|
369
|
-
}) : /* @__PURE__ */ N(
|
|
369
|
+
}) : /* @__PURE__ */ N(b, {
|
|
370
370
|
direction: "vertical",
|
|
371
371
|
gap: "6",
|
|
372
372
|
children: [
|
|
@@ -381,23 +381,23 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
381
381
|
})
|
|
382
382
|
]
|
|
383
383
|
}),
|
|
384
|
-
|
|
385
|
-
label:
|
|
384
|
+
A && /* @__PURE__ */ M(w, {
|
|
385
|
+
label: o._({ id: "V/8B9A" }),
|
|
386
386
|
checked: g,
|
|
387
|
-
onChange: (e) =>
|
|
387
|
+
onChange: (e) => v(e.target.checked),
|
|
388
388
|
invalid: !g
|
|
389
389
|
}),
|
|
390
|
-
/* @__PURE__ */ M(
|
|
391
|
-
label:
|
|
390
|
+
/* @__PURE__ */ M(u, {
|
|
391
|
+
label: o._({ id: "QytzQr" }),
|
|
392
392
|
required: !0,
|
|
393
|
-
value:
|
|
393
|
+
value: d,
|
|
394
394
|
onChange: F,
|
|
395
|
-
onKeyDown:
|
|
396
|
-
invalid: !!
|
|
397
|
-
errortext:
|
|
395
|
+
onKeyDown: R,
|
|
396
|
+
invalid: !!p,
|
|
397
|
+
errortext: p || void 0,
|
|
398
398
|
disabled: j.isPending,
|
|
399
399
|
autoFocus: !0,
|
|
400
|
-
placeholder:
|
|
400
|
+
placeholder: o._({ id: "HNlEFZ" })
|
|
401
401
|
})
|
|
402
402
|
]
|
|
403
403
|
})]
|
|
@@ -409,23 +409,23 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
409
409
|
"web-listings",
|
|
410
410
|
"web-listings-css",
|
|
411
411
|
"web-error"
|
|
412
|
-
]), re = 50, ie = /^[a-zA-Z0-9!#$%&'*+\-.^_`|~]+$/, ae = ({ isOpen:
|
|
413
|
-
let { i18n:
|
|
414
|
-
project_id:
|
|
415
|
-
container:
|
|
416
|
-
}, { enabled:
|
|
417
|
-
project_id:
|
|
418
|
-
container:
|
|
419
|
-
}, { enabled:
|
|
412
|
+
]), re = 50, ie = /^[a-zA-Z0-9!#$%&'*+\-.^_`|~]+$/, ae = ({ isOpen: 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
420
|
let t = e.target.value;
|
|
421
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 !==
|
|
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
423
|
I(() => {
|
|
424
|
-
if (!
|
|
425
|
-
se(
|
|
426
|
-
let e =
|
|
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
427
|
pe(e["web-index"] ?? ""), me(e["web-listings"] === "1" || e["web-listings"] === "true");
|
|
428
|
-
let t =
|
|
428
|
+
let t = C.metadata ?? {};
|
|
429
429
|
ye(Object.entries(t).filter(([e]) => !K.has(e)).map(([e, t]) => ({
|
|
430
430
|
key: e,
|
|
431
431
|
value: t,
|
|
@@ -434,29 +434,29 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
434
434
|
originalKey: e,
|
|
435
435
|
originalValue: t
|
|
436
436
|
})));
|
|
437
|
-
}, [
|
|
438
|
-
|
|
439
|
-
}, [
|
|
437
|
+
}, [C]), I(() => {
|
|
438
|
+
e || je();
|
|
439
|
+
}, [e]);
|
|
440
440
|
let je = () => {
|
|
441
441
|
se(""), le(null), ue(""), Y(null), pe(""), me(!1), ge(!1), ve(""), z(""), U(""), W.current && clearTimeout(W.current), ye([]), xe({}), Ce(!1), we(""), Ee(""), Oe(null), Ae(null), Me.reset();
|
|
442
442
|
}, Me = T.storage.swift.updateContainerMetadata.useMutation({
|
|
443
443
|
onSuccess: () => {
|
|
444
|
-
oe.storage.swift.getContainerMetadata.invalidate({ container:
|
|
444
|
+
oe.storage.swift.getContainerMetadata.invalidate({ container: n.name }), oe.storage.swift.listContainers.invalidate(), o?.(n.name), We();
|
|
445
445
|
},
|
|
446
446
|
onError: (e) => {
|
|
447
|
-
f?.(
|
|
447
|
+
f?.(n.name, e.message);
|
|
448
448
|
}
|
|
449
449
|
}), Ne = () => {
|
|
450
450
|
let e = !0;
|
|
451
|
-
return q !== "" && (isNaN(Number(q)) || Number(q) < 0) ? (le(
|
|
452
|
-
}, Pe = (e, t) => e.trim() ? ie.test(e) ? /[a-zA-Z0-9]/.test(e) ? K.has(e.toLowerCase()) ?
|
|
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
453
|
let e = Pe(Q);
|
|
454
454
|
if (e) {
|
|
455
455
|
Oe(e);
|
|
456
456
|
return;
|
|
457
457
|
}
|
|
458
458
|
if (!Te.trim()) {
|
|
459
|
-
Ae(
|
|
459
|
+
Ae(g._({ id: "hXUWyd" }));
|
|
460
460
|
return;
|
|
461
461
|
}
|
|
462
462
|
ye([...Z, {
|
|
@@ -482,7 +482,7 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
484
484
|
if (!t.value.trim()) {
|
|
485
|
-
xe({ [`edit-${e}`]:
|
|
485
|
+
xe({ [`edit-${e}`]: g._({ id: "hXUWyd" }) });
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
488
|
ye(Z.map((t, n) => n === e ? {
|
|
@@ -517,32 +517,32 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
517
517
|
return delete n[`edit-${e}`], n;
|
|
518
518
|
});
|
|
519
519
|
}, Ue = () => {
|
|
520
|
-
if (!
|
|
521
|
-
let e =
|
|
520
|
+
if (!n || !Ne()) return;
|
|
521
|
+
let e = C?.metadata ?? {}, t = {}, r = [];
|
|
522
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 &&
|
|
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
524
|
});
|
|
525
|
-
let
|
|
526
|
-
|
|
527
|
-
!
|
|
528
|
-
}),
|
|
529
|
-
let o = !!(
|
|
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
530
|
Me.mutate({
|
|
531
|
-
project_id:
|
|
532
|
-
container:
|
|
531
|
+
project_id: S,
|
|
532
|
+
container: n.name,
|
|
533
533
|
metadata: t,
|
|
534
|
-
removeMetadata:
|
|
534
|
+
removeMetadata: r.length ? r : void 0,
|
|
535
535
|
quotaBytes: q === "" ? void 0 : Number(q),
|
|
536
536
|
quotaCount: J === "" ? void 0 : Number(J),
|
|
537
537
|
versionsLocation: he && (!o || _e !== s) && _e ? _e : void 0,
|
|
538
538
|
removeVersionsLocation: !he && o ? !0 : void 0
|
|
539
539
|
});
|
|
540
540
|
}, We = () => {
|
|
541
|
-
je(),
|
|
541
|
+
je(), r();
|
|
542
542
|
};
|
|
543
|
-
if (!
|
|
544
|
-
let $ = E || Me.isPending, Ge = D && !E, Ke = Z.some((e) => e.isEditing), qe =
|
|
545
|
-
return /* @__PURE__ */ N(
|
|
543
|
+
if (!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
546
|
title: /* @__PURE__ */ N("span", {
|
|
547
547
|
className: "flex max-w-[500px] items-center gap-2",
|
|
548
548
|
children: [/* @__PURE__ */ M("span", {
|
|
@@ -550,15 +550,15 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
550
550
|
children: /* @__PURE__ */ M(B, { id: "y02Bu1" })
|
|
551
551
|
}), /* @__PURE__ */ M("span", {
|
|
552
552
|
className: "truncate",
|
|
553
|
-
title:
|
|
554
|
-
children:
|
|
553
|
+
title: n.name,
|
|
554
|
+
children: n.name
|
|
555
555
|
})]
|
|
556
556
|
}),
|
|
557
|
-
open:
|
|
557
|
+
open: e,
|
|
558
558
|
onCancel: We,
|
|
559
|
-
confirmButtonLabel:
|
|
559
|
+
confirmButtonLabel: g._({ id: "tfDRzk" }),
|
|
560
560
|
onConfirm: Ue,
|
|
561
|
-
cancelButtonLabel:
|
|
561
|
+
cancelButtonLabel: g._({ id: "dEgA5A" }),
|
|
562
562
|
size: "large",
|
|
563
563
|
disableConfirmButton: $ || Se || Ke || tt || Ge,
|
|
564
564
|
children: [Me.isError && /* @__PURE__ */ M("p", {
|
|
@@ -570,12 +570,12 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
570
570
|
values: { errorMessage: e }
|
|
571
571
|
});
|
|
572
572
|
})()
|
|
573
|
-
}), E ? /* @__PURE__ */ N(
|
|
573
|
+
}), E ? /* @__PURE__ */ N(b, {
|
|
574
574
|
direction: "horizontal",
|
|
575
575
|
alignment: "center",
|
|
576
576
|
gap: "2",
|
|
577
577
|
className: "py-8",
|
|
578
|
-
children: [/* @__PURE__ */ M(
|
|
578
|
+
children: [/* @__PURE__ */ M(l, { size: "small" }), /* @__PURE__ */ M(B, { id: "WRZ3Mt" })]
|
|
579
579
|
}) : Ge ? /* @__PURE__ */ M("p", {
|
|
580
580
|
className: "text-theme-error py-8 text-center",
|
|
581
581
|
children: /* @__PURE__ */ M(B, {
|
|
@@ -584,50 +584,50 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
584
584
|
})
|
|
585
585
|
}) : /* @__PURE__ */ M("div", {
|
|
586
586
|
className: "max-h-[65vh] overflow-y-auto pr-1 pl-1",
|
|
587
|
-
children: /* @__PURE__ */ N(
|
|
587
|
+
children: /* @__PURE__ */ N(b, {
|
|
588
588
|
direction: "vertical",
|
|
589
589
|
gap: "6",
|
|
590
590
|
children: [
|
|
591
591
|
/* @__PURE__ */ N("div", {
|
|
592
592
|
className: "grid grid-cols-2 gap-4",
|
|
593
|
-
children: [/* @__PURE__ */ M(
|
|
594
|
-
label:
|
|
595
|
-
value: String(
|
|
593
|
+
children: [/* @__PURE__ */ M(u, {
|
|
594
|
+
label: g._({ id: "z45o5B" }),
|
|
595
|
+
value: String(n.count),
|
|
596
596
|
disabled: !0,
|
|
597
597
|
readOnly: !0
|
|
598
|
-
}), /* @__PURE__ */ M(
|
|
599
|
-
label:
|
|
600
|
-
value:
|
|
598
|
+
}), /* @__PURE__ */ M(u, {
|
|
599
|
+
label: g._({ id: "/InK0O" }),
|
|
600
|
+
value: C?.bytesUsed == null ? `${n.bytes.toLocaleString()} B` : `${C.bytesUsed.toLocaleString()} B`,
|
|
601
601
|
disabled: !0,
|
|
602
602
|
readOnly: !0
|
|
603
603
|
})]
|
|
604
604
|
}),
|
|
605
605
|
/* @__PURE__ */ N("div", {
|
|
606
606
|
className: "grid grid-cols-2 gap-4",
|
|
607
|
-
children: [/* @__PURE__ */ M("div", { children: /* @__PURE__ */ M(
|
|
608
|
-
label:
|
|
607
|
+
children: [/* @__PURE__ */ M("div", { children: /* @__PURE__ */ M(u, {
|
|
608
|
+
label: g._({ id: "k0vAWv" }),
|
|
609
609
|
value: J,
|
|
610
610
|
onChange: (e) => {
|
|
611
611
|
ue(e.target.value), de && Y(null);
|
|
612
612
|
},
|
|
613
|
-
placeholder:
|
|
613
|
+
placeholder: g._({ id: "qtoOYG" }),
|
|
614
614
|
invalid: !!de,
|
|
615
615
|
errortext: de ?? void 0,
|
|
616
616
|
disabled: $
|
|
617
|
-
}) }), /* @__PURE__ */ M("div", { children: /* @__PURE__ */ M(
|
|
618
|
-
label:
|
|
617
|
+
}) }), /* @__PURE__ */ M("div", { children: /* @__PURE__ */ M(u, {
|
|
618
|
+
label: g._({ id: "KOpPMt" }),
|
|
619
619
|
value: q,
|
|
620
620
|
onChange: (e) => {
|
|
621
621
|
se(e.target.value), ce && le(null);
|
|
622
622
|
},
|
|
623
|
-
placeholder:
|
|
623
|
+
placeholder: g._({ id: "qtoOYG" }),
|
|
624
624
|
invalid: !!ce,
|
|
625
625
|
errortext: ce ?? void 0,
|
|
626
626
|
disabled: $,
|
|
627
627
|
helptext: q && nt ? nt : void 0
|
|
628
628
|
}) })]
|
|
629
629
|
}),
|
|
630
|
-
|
|
630
|
+
A && j && /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("p", {
|
|
631
631
|
className: "text-theme-default mb-1 text-sm font-semibold",
|
|
632
632
|
children: [
|
|
633
633
|
/* @__PURE__ */ M(B, { id: "mvz5Eo" }),
|
|
@@ -640,7 +640,7 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
640
640
|
children: /* @__PURE__ */ M(B, { id: "Alx2/L" })
|
|
641
641
|
})
|
|
642
642
|
]
|
|
643
|
-
}), /* @__PURE__ */ M(
|
|
643
|
+
}), /* @__PURE__ */ M(u, {
|
|
644
644
|
value: j,
|
|
645
645
|
disabled: !0,
|
|
646
646
|
readOnly: !0
|
|
@@ -648,14 +648,14 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
648
648
|
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
649
649
|
className: "text-theme-default mb-3 text-sm font-semibold",
|
|
650
650
|
children: /* @__PURE__ */ M(B, { id: "6CDYXS" })
|
|
651
|
-
}),
|
|
651
|
+
}), A ? /* @__PURE__ */ N(b, {
|
|
652
652
|
direction: "vertical",
|
|
653
653
|
gap: "4",
|
|
654
|
-
children: [/* @__PURE__ */ N(
|
|
654
|
+
children: [/* @__PURE__ */ N(b, {
|
|
655
655
|
direction: "vertical",
|
|
656
656
|
gap: "1",
|
|
657
|
-
children: [/* @__PURE__ */ M(
|
|
658
|
-
label:
|
|
657
|
+
children: [/* @__PURE__ */ M(w, {
|
|
658
|
+
label: g._({ id: "6+7EwD" }),
|
|
659
659
|
checked: !!fe,
|
|
660
660
|
onChange: (e) => {
|
|
661
661
|
e.target.checked ? fe || pe("index.html") : pe("");
|
|
@@ -663,7 +663,7 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
663
663
|
disabled: $
|
|
664
664
|
}), /* @__PURE__ */ M("div", {
|
|
665
665
|
className: "pl-6",
|
|
666
|
-
children: /* @__PURE__ */ M(
|
|
666
|
+
children: /* @__PURE__ */ M(u, {
|
|
667
667
|
value: fe,
|
|
668
668
|
onChange: (e) => pe(e.target.value),
|
|
669
669
|
placeholder: "index.html",
|
|
@@ -671,22 +671,22 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
671
671
|
className: "flex-1"
|
|
672
672
|
})
|
|
673
673
|
})]
|
|
674
|
-
}), /* @__PURE__ */ N(
|
|
674
|
+
}), /* @__PURE__ */ N(b, {
|
|
675
675
|
direction: "horizontal",
|
|
676
676
|
alignment: "start",
|
|
677
677
|
gap: "2",
|
|
678
|
-
children: [/* @__PURE__ */ M(
|
|
679
|
-
label:
|
|
678
|
+
children: [/* @__PURE__ */ M(w, {
|
|
679
|
+
label: g._({ id: "NeUjqc" }),
|
|
680
680
|
checked: X,
|
|
681
681
|
onChange: (e) => me(e.target.checked),
|
|
682
682
|
disabled: $
|
|
683
|
-
}), /* @__PURE__ */ N(
|
|
683
|
+
}), /* @__PURE__ */ N(p, {
|
|
684
684
|
triggerEvent: "hover",
|
|
685
|
-
children: [/* @__PURE__ */ M(
|
|
685
|
+
children: [/* @__PURE__ */ M(c, { children: /* @__PURE__ */ M(v, {
|
|
686
686
|
icon: "help",
|
|
687
687
|
size: "16",
|
|
688
688
|
className: "text-theme-light cursor-help"
|
|
689
|
-
}) }), /* @__PURE__ */ M(
|
|
689
|
+
}) }), /* @__PURE__ */ M(t, {
|
|
690
690
|
className: "z-10 max-w-[220px]",
|
|
691
691
|
children: /* @__PURE__ */ M(B, { id: "Oxl1UN" })
|
|
692
692
|
})]
|
|
@@ -702,23 +702,23 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
702
702
|
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
703
703
|
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
704
704
|
children: /* @__PURE__ */ M(B, { id: "jNzyQo" })
|
|
705
|
-
}), Ye && !_e ? /* @__PURE__ */ M(
|
|
706
|
-
label:
|
|
705
|
+
}), Ye && !_e ? /* @__PURE__ */ M(w, {
|
|
706
|
+
label: g._({ id: "Nvfd2b" }),
|
|
707
707
|
checked: !0,
|
|
708
708
|
onChange: (e) => {
|
|
709
709
|
e.target.checked || (ge(!1), ve(""), z(""), U(""));
|
|
710
710
|
},
|
|
711
711
|
disabled: !0
|
|
712
|
-
}) : !he && !_e ? /* @__PURE__ */ M(
|
|
713
|
-
label:
|
|
712
|
+
}) : !he && !_e ? /* @__PURE__ */ M(w, {
|
|
713
|
+
label: g._({ id: "WyKwnD" }),
|
|
714
714
|
checked: !1,
|
|
715
715
|
onChange: (e) => ge(e.target.checked),
|
|
716
716
|
disabled: $
|
|
717
|
-
}) : /* @__PURE__ */ N(
|
|
717
|
+
}) : /* @__PURE__ */ N(b, {
|
|
718
718
|
direction: "vertical",
|
|
719
719
|
gap: "1",
|
|
720
|
-
children: [/* @__PURE__ */ M(
|
|
721
|
-
label:
|
|
720
|
+
children: [/* @__PURE__ */ M(w, {
|
|
721
|
+
label: g._({ id: "b0uU1G" }),
|
|
722
722
|
checked: he,
|
|
723
723
|
onChange: (e) => {
|
|
724
724
|
ge(e.target.checked), e.target.checked || (ve(""), z(""), U(""));
|
|
@@ -726,16 +726,16 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
726
726
|
disabled: $
|
|
727
727
|
}), he && /* @__PURE__ */ M("div", {
|
|
728
728
|
className: "pl-6",
|
|
729
|
-
children: /* @__PURE__ */ M(
|
|
729
|
+
children: /* @__PURE__ */ M(m, {
|
|
730
730
|
value: _e,
|
|
731
731
|
onChange: (e) => ve(e),
|
|
732
732
|
onInputChange: G,
|
|
733
|
-
placeholder:
|
|
733
|
+
placeholder: g._({ id: "a13wDR" }),
|
|
734
734
|
helptext: (() => {
|
|
735
|
-
if (
|
|
735
|
+
if (R.trim().length === 0) return g._({ id: "c+fUtV" });
|
|
736
736
|
if (ae > 0) {
|
|
737
737
|
let e = re, t = te.length;
|
|
738
|
-
return
|
|
738
|
+
return g._({
|
|
739
739
|
id: "qzhUb9",
|
|
740
740
|
values: {
|
|
741
741
|
maxOptions: e,
|
|
@@ -745,7 +745,7 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
745
745
|
}
|
|
746
746
|
})(),
|
|
747
747
|
disabled: $,
|
|
748
|
-
children: ne.map((e) => /* @__PURE__ */ M(
|
|
748
|
+
children: ne.map((e) => /* @__PURE__ */ M(y, {
|
|
749
749
|
value: e.name,
|
|
750
750
|
children: e.name
|
|
751
751
|
}, e.name))
|
|
@@ -753,7 +753,7 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
753
753
|
})]
|
|
754
754
|
})] }),
|
|
755
755
|
/* @__PURE__ */ N("div", { children: [
|
|
756
|
-
/* @__PURE__ */ N(
|
|
756
|
+
/* @__PURE__ */ N(b, {
|
|
757
757
|
direction: "horizontal",
|
|
758
758
|
alignment: "center",
|
|
759
759
|
distribution: "between",
|
|
@@ -766,122 +766,122 @@ var G = ({ isOpen: t, onClose: n, onSuccess: r, onError: i, maxContainerNameLeng
|
|
|
766
766
|
children: /* @__PURE__ */ M(B, { id: "kuYWaD" })
|
|
767
767
|
})]
|
|
768
768
|
}),
|
|
769
|
-
/* @__PURE__ */ M(
|
|
769
|
+
/* @__PURE__ */ M(b, {
|
|
770
770
|
direction: "horizontal",
|
|
771
771
|
className: "jn:bg-theme-background-lvl-1 justify-end p-2",
|
|
772
|
-
children: /* @__PURE__ */ M(
|
|
773
|
-
label:
|
|
772
|
+
children: /* @__PURE__ */ M(h, {
|
|
773
|
+
label: g._({ id: "sWBLli" }),
|
|
774
774
|
onClick: () => Ce(!0),
|
|
775
775
|
variant: "primary",
|
|
776
776
|
icon: "addCircle",
|
|
777
777
|
disabled: Se || Ke || $
|
|
778
778
|
})
|
|
779
779
|
}),
|
|
780
|
-
/* @__PURE__ */ N(
|
|
780
|
+
/* @__PURE__ */ N(d, {
|
|
781
781
|
columns: 3,
|
|
782
782
|
children: [
|
|
783
|
-
/* @__PURE__ */ N(
|
|
784
|
-
/* @__PURE__ */ M(
|
|
785
|
-
/* @__PURE__ */ M(
|
|
786
|
-
/* @__PURE__ */ M(
|
|
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
787
|
] }),
|
|
788
|
-
Se && /* @__PURE__ */ N(
|
|
789
|
-
/* @__PURE__ */ M(
|
|
788
|
+
Se && /* @__PURE__ */ N(a, { children: [
|
|
789
|
+
/* @__PURE__ */ M(s, { children: /* @__PURE__ */ M(u, {
|
|
790
790
|
value: Q,
|
|
791
791
|
onChange: (e) => {
|
|
792
792
|
we(e.target.value), De && Oe(null);
|
|
793
793
|
},
|
|
794
|
-
placeholder:
|
|
794
|
+
placeholder: g._({ id: "x9AdZ8" }),
|
|
795
795
|
errortext: De ?? void 0,
|
|
796
796
|
invalid: !!De,
|
|
797
797
|
autoFocus: !0
|
|
798
798
|
}) }),
|
|
799
|
-
/* @__PURE__ */ M(
|
|
799
|
+
/* @__PURE__ */ M(s, { children: /* @__PURE__ */ M(u, {
|
|
800
800
|
value: Te,
|
|
801
801
|
onChange: (e) => {
|
|
802
802
|
Ee(e.target.value), ke && Ae(null);
|
|
803
803
|
},
|
|
804
|
-
placeholder:
|
|
804
|
+
placeholder: g._({ id: "wMHvYH" }),
|
|
805
805
|
errortext: ke ?? void 0,
|
|
806
806
|
invalid: !!ke
|
|
807
807
|
}) }),
|
|
808
|
-
/* @__PURE__ */ M(
|
|
808
|
+
/* @__PURE__ */ M(s, { children: /* @__PURE__ */ N(b, {
|
|
809
809
|
direction: "horizontal",
|
|
810
810
|
gap: "2",
|
|
811
|
-
children: [/* @__PURE__ */ M(
|
|
811
|
+
children: [/* @__PURE__ */ M(h, {
|
|
812
812
|
size: "small",
|
|
813
813
|
variant: "primary",
|
|
814
814
|
onClick: Fe,
|
|
815
815
|
icon: "check",
|
|
816
|
-
title:
|
|
817
|
-
}), /* @__PURE__ */ M(
|
|
816
|
+
title: g._({ id: "tfDRzk" })
|
|
817
|
+
}), /* @__PURE__ */ M(h, {
|
|
818
818
|
size: "small",
|
|
819
819
|
variant: "subdued",
|
|
820
820
|
onClick: Ie,
|
|
821
821
|
icon: "close",
|
|
822
|
-
title:
|
|
822
|
+
title: g._({ id: "bzSI52" })
|
|
823
823
|
})]
|
|
824
824
|
}) })
|
|
825
825
|
] }),
|
|
826
|
-
Z.map((
|
|
827
|
-
/* @__PURE__ */ M(
|
|
828
|
-
value:
|
|
829
|
-
onChange: (e) => Ve(
|
|
830
|
-
errortext: be[`edit-${
|
|
831
|
-
invalid: !!be[`edit-${
|
|
826
|
+
Z.map((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
832
|
}) : /* @__PURE__ */ M("span", {
|
|
833
833
|
className: "block max-w-xs truncate font-mono text-sm",
|
|
834
|
-
title:
|
|
835
|
-
children:
|
|
834
|
+
title: e.key,
|
|
835
|
+
children: e.key
|
|
836
836
|
}) }),
|
|
837
|
-
/* @__PURE__ */ M(
|
|
838
|
-
value:
|
|
839
|
-
onChange: (e) => He(
|
|
837
|
+
/* @__PURE__ */ M(s, { children: e.isEditing ? /* @__PURE__ */ M(u, {
|
|
838
|
+
value: e.value,
|
|
839
|
+
onChange: (e) => He(t, e.target.value)
|
|
840
840
|
}) : /* @__PURE__ */ M("span", {
|
|
841
841
|
className: "block max-w-md truncate text-sm",
|
|
842
|
-
title:
|
|
843
|
-
children:
|
|
842
|
+
title: e.value,
|
|
843
|
+
children: e.value
|
|
844
844
|
}) }),
|
|
845
|
-
/* @__PURE__ */ M(
|
|
845
|
+
/* @__PURE__ */ M(s, { children: e.isEditing ? /* @__PURE__ */ N(b, {
|
|
846
846
|
direction: "horizontal",
|
|
847
847
|
gap: "2",
|
|
848
|
-
children: [/* @__PURE__ */ M(
|
|
848
|
+
children: [/* @__PURE__ */ M(h, {
|
|
849
849
|
size: "small",
|
|
850
850
|
variant: "primary",
|
|
851
|
-
onClick: () => Re(
|
|
851
|
+
onClick: () => Re(t),
|
|
852
852
|
icon: "check",
|
|
853
|
-
title:
|
|
854
|
-
}), /* @__PURE__ */ M(
|
|
853
|
+
title: g._({ id: "tfDRzk" })
|
|
854
|
+
}), /* @__PURE__ */ M(h, {
|
|
855
855
|
size: "small",
|
|
856
856
|
variant: "subdued",
|
|
857
|
-
onClick: () => ze(
|
|
857
|
+
onClick: () => ze(t),
|
|
858
858
|
icon: "close",
|
|
859
|
-
title:
|
|
859
|
+
title: g._({ id: "bzSI52" })
|
|
860
860
|
})]
|
|
861
|
-
}) : /* @__PURE__ */ N(
|
|
861
|
+
}) : /* @__PURE__ */ N(b, {
|
|
862
862
|
direction: "horizontal",
|
|
863
863
|
gap: "2",
|
|
864
|
-
children: [/* @__PURE__ */ M(
|
|
864
|
+
children: [/* @__PURE__ */ M(h, {
|
|
865
865
|
size: "small",
|
|
866
866
|
variant: "subdued",
|
|
867
|
-
onClick: () => Le(
|
|
867
|
+
onClick: () => Le(t),
|
|
868
868
|
icon: "edit",
|
|
869
|
-
title:
|
|
869
|
+
title: g._({ id: "ePK91l" }),
|
|
870
870
|
disabled: Se || Ke || $
|
|
871
|
-
}), /* @__PURE__ */ M(
|
|
871
|
+
}), /* @__PURE__ */ M(h, {
|
|
872
872
|
size: "small",
|
|
873
873
|
variant: "primary-danger",
|
|
874
|
-
onClick: () => Be(
|
|
874
|
+
onClick: () => Be(t),
|
|
875
875
|
icon: "deleteForever",
|
|
876
|
-
title:
|
|
876
|
+
title: g._({ id: "cnGeoo" }),
|
|
877
877
|
disabled: Se || Ke || $
|
|
878
878
|
})]
|
|
879
879
|
}) })
|
|
880
|
-
] },
|
|
881
|
-
Z.length === 0 && !Se && /* @__PURE__ */ M(
|
|
880
|
+
] }, t)),
|
|
881
|
+
Z.length === 0 && !Se && /* @__PURE__ */ M(a, { children: /* @__PURE__ */ M(s, {
|
|
882
882
|
colSpan: 3,
|
|
883
883
|
className: "py-6 text-center",
|
|
884
|
-
children: /* @__PURE__ */ M(
|
|
884
|
+
children: /* @__PURE__ */ M(b, {
|
|
885
885
|
alignment: "center",
|
|
886
886
|
children: /* @__PURE__ */ M("span", {
|
|
887
887
|
className: "text-theme-light text-sm",
|
|
@@ -1018,70 +1018,70 @@ function ue(e) {
|
|
|
1018
1018
|
default: return e.raw;
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
|
-
var de = ({ isOpen:
|
|
1022
|
-
let { i18n:
|
|
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
1023
|
I(() => {
|
|
1024
|
-
!
|
|
1025
|
-
}, [
|
|
1026
|
-
let { data:
|
|
1027
|
-
project_id:
|
|
1028
|
-
container:
|
|
1029
|
-
}, { enabled:
|
|
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
1030
|
I(() => {
|
|
1031
|
-
if (!
|
|
1032
|
-
let e =
|
|
1033
|
-
|
|
1034
|
-
}, [
|
|
1031
|
+
if (!v) return;
|
|
1032
|
+
let e = v.read ?? "", t = v.write ?? "";
|
|
1033
|
+
u(e), f(t), m(ce(e));
|
|
1034
|
+
}, [v]);
|
|
1035
1035
|
let D = T.useUtils(), O = T.storage.swift.updateContainerMetadata.useMutation({
|
|
1036
1036
|
onSuccess: () => {
|
|
1037
1037
|
D.storage.swift.getContainerMetadata.invalidate({
|
|
1038
|
-
project_id:
|
|
1039
|
-
container:
|
|
1040
|
-
}), D.storage.swift.listContainers.invalidate(),
|
|
1038
|
+
project_id: s,
|
|
1039
|
+
container: t.name
|
|
1040
|
+
}), D.storage.swift.listContainers.invalidate(), r?.(t.name), P();
|
|
1041
1041
|
},
|
|
1042
1042
|
onError: (e) => {
|
|
1043
|
-
|
|
1043
|
+
i?.(t.name, e.message);
|
|
1044
1044
|
}
|
|
1045
|
-
}),
|
|
1046
|
-
|
|
1045
|
+
}), A = ee(O.reset);
|
|
1046
|
+
A.current = O.reset;
|
|
1047
1047
|
let P = () => {
|
|
1048
|
-
|
|
1048
|
+
u(""), f(""), m(!1), _(!1), O.reset(), n();
|
|
1049
1049
|
};
|
|
1050
1050
|
I(() => {
|
|
1051
|
-
|
|
1052
|
-
}, [
|
|
1051
|
+
e || (u(""), f(""), m(!1), A.current());
|
|
1052
|
+
}, [e]);
|
|
1053
1053
|
let F = (e) => {
|
|
1054
1054
|
let t = e.target.checked;
|
|
1055
|
-
|
|
1056
|
-
},
|
|
1055
|
+
m(t), u((e) => t ? le(e) : J(e));
|
|
1056
|
+
}, R = (e) => {
|
|
1057
1057
|
let t = e.target.value;
|
|
1058
|
-
|
|
1058
|
+
u(t), m(ce(t));
|
|
1059
1059
|
}, z = () => {
|
|
1060
|
-
|
|
1061
|
-
project_id:
|
|
1062
|
-
container:
|
|
1063
|
-
read:
|
|
1064
|
-
write:
|
|
1060
|
+
t && O.mutate({
|
|
1061
|
+
project_id: s,
|
|
1062
|
+
container: t.name,
|
|
1063
|
+
read: c.trim(),
|
|
1064
|
+
write: d.trim()
|
|
1065
1065
|
});
|
|
1066
1066
|
};
|
|
1067
|
-
if (!
|
|
1068
|
-
let H =
|
|
1069
|
-
return /* @__PURE__ */ N(
|
|
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
1070
|
title: /* @__PURE__ */ N("span", {
|
|
1071
1071
|
className: "flex items-center gap-2",
|
|
1072
1072
|
children: [/* @__PURE__ */ M(B, { id: "6Kjltl" }), /* @__PURE__ */ M("span", {
|
|
1073
1073
|
className: "max-w-[250px] truncate font-mono",
|
|
1074
|
-
title:
|
|
1075
|
-
children:
|
|
1074
|
+
title: t.name,
|
|
1075
|
+
children: t.name
|
|
1076
1076
|
})]
|
|
1077
1077
|
}),
|
|
1078
|
-
open:
|
|
1078
|
+
open: e,
|
|
1079
1079
|
onCancel: P,
|
|
1080
|
-
confirmButtonLabel:
|
|
1080
|
+
confirmButtonLabel: a._({ id: "tfDRzk" }),
|
|
1081
1081
|
onConfirm: z,
|
|
1082
|
-
cancelButtonLabel:
|
|
1082
|
+
cancelButtonLabel: a._({ id: "dEgA5A" }),
|
|
1083
1083
|
size: "xl",
|
|
1084
|
-
disableConfirmButton: H ||
|
|
1084
|
+
disableConfirmButton: H || S,
|
|
1085
1085
|
children: [O.isError && /* @__PURE__ */ M("p", {
|
|
1086
1086
|
className: "text-theme-error mb-4",
|
|
1087
1087
|
children: (() => {
|
|
@@ -1102,13 +1102,13 @@ var de = ({ isOpen: t, container: r, onClose: a, onSuccess: o, onError: s }) =>
|
|
|
1102
1102
|
className: "text-theme-default",
|
|
1103
1103
|
children: /* @__PURE__ */ M(B, { id: "g9m7gK" })
|
|
1104
1104
|
})]
|
|
1105
|
-
}),
|
|
1105
|
+
}), y ? /* @__PURE__ */ N(b, {
|
|
1106
1106
|
direction: "horizontal",
|
|
1107
1107
|
alignment: "center",
|
|
1108
1108
|
gap: "2",
|
|
1109
1109
|
className: "py-6",
|
|
1110
|
-
children: [/* @__PURE__ */ M(
|
|
1111
|
-
}) :
|
|
1110
|
+
children: [/* @__PURE__ */ M(l, { size: "small" }), /* @__PURE__ */ M(B, { id: "poCbZw" })]
|
|
1111
|
+
}) : S ? /* @__PURE__ */ M("p", {
|
|
1112
1112
|
className: "text-theme-error py-2",
|
|
1113
1113
|
children: /* @__PURE__ */ M(B, {
|
|
1114
1114
|
id: "QNHur0",
|
|
@@ -1118,46 +1118,46 @@ var de = ({ isOpen: t, container: r, onClose: a, onSuccess: o, onError: s }) =>
|
|
|
1118
1118
|
className: "flex gap-6",
|
|
1119
1119
|
children: [/* @__PURE__ */ M("div", {
|
|
1120
1120
|
className: "min-w-0 flex-1",
|
|
1121
|
-
children: /* @__PURE__ */ N(
|
|
1121
|
+
children: /* @__PURE__ */ N(b, {
|
|
1122
1122
|
direction: "vertical",
|
|
1123
1123
|
gap: "6",
|
|
1124
1124
|
children: [
|
|
1125
1125
|
/* @__PURE__ */ N("div", { children: [
|
|
1126
|
-
/* @__PURE__ */ M(fe, { label:
|
|
1127
|
-
/* @__PURE__ */ M(
|
|
1128
|
-
value:
|
|
1129
|
-
onChange:
|
|
1130
|
-
disabled: H ||
|
|
1131
|
-
placeholder:
|
|
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
1132
|
className: "font-mono text-sm",
|
|
1133
1133
|
rows: 3
|
|
1134
1134
|
}),
|
|
1135
|
-
/* @__PURE__ */ M(
|
|
1136
|
-
label:
|
|
1137
|
-
checked:
|
|
1135
|
+
/* @__PURE__ */ M(w, {
|
|
1136
|
+
label: a._({ id: "23wBCX" }),
|
|
1137
|
+
checked: p,
|
|
1138
1138
|
onChange: F,
|
|
1139
1139
|
disabled: H,
|
|
1140
1140
|
className: "mt-2"
|
|
1141
1141
|
})
|
|
1142
1142
|
] }),
|
|
1143
|
-
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M(fe, { label:
|
|
1144
|
-
value:
|
|
1143
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M(fe, { label: a._({ id: "6qzsuS" }) }), /* @__PURE__ */ M(C, {
|
|
1144
|
+
value: d,
|
|
1145
1145
|
onChange: (e) => {
|
|
1146
1146
|
let t = e.target.value;
|
|
1147
|
-
|
|
1147
|
+
f(t);
|
|
1148
1148
|
},
|
|
1149
1149
|
disabled: H,
|
|
1150
|
-
placeholder:
|
|
1150
|
+
placeholder: a._({ id: "UVFHGY" }),
|
|
1151
1151
|
className: "font-mono text-sm",
|
|
1152
1152
|
rows: 3
|
|
1153
1153
|
})] }),
|
|
1154
|
-
U && /* @__PURE__ */ M(
|
|
1155
|
-
label:
|
|
1156
|
-
onClick: () =>
|
|
1154
|
+
U && /* @__PURE__ */ M(h, {
|
|
1155
|
+
label: g ? a._({ id: "we28Pq" }) : a._({ id: "YiMCKk" }),
|
|
1156
|
+
onClick: () => _((e) => !e),
|
|
1157
1157
|
variant: "subdued",
|
|
1158
1158
|
disabled: H
|
|
1159
1159
|
}),
|
|
1160
|
-
|
|
1160
|
+
g && (W.length > 0 || G.length > 0) && /* @__PURE__ */ N(b, {
|
|
1161
1161
|
direction: "vertical",
|
|
1162
1162
|
gap: "4",
|
|
1163
1163
|
children: [W.length > 0 && /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
@@ -1215,29 +1215,29 @@ var de = ({ isOpen: t, container: r, onClose: a, onSuccess: o, onError: s }) =>
|
|
|
1215
1215
|
className: "text-theme-light mb-3 text-xs",
|
|
1216
1216
|
children: /* @__PURE__ */ M(B, { id: "dd2ndz" })
|
|
1217
1217
|
}),
|
|
1218
|
-
/* @__PURE__ */ N(
|
|
1218
|
+
/* @__PURE__ */ N(b, {
|
|
1219
1219
|
direction: "vertical",
|
|
1220
1220
|
gap: "4",
|
|
1221
1221
|
children: [
|
|
1222
1222
|
/* @__PURE__ */ M(Y, {
|
|
1223
1223
|
code: ".r:*",
|
|
1224
|
-
description:
|
|
1224
|
+
description: a._({ id: "VV1fdg" })
|
|
1225
1225
|
}),
|
|
1226
1226
|
/* @__PURE__ */ M(Y, {
|
|
1227
1227
|
code: ".rlistings",
|
|
1228
|
-
description:
|
|
1228
|
+
description: a._({ id: "s/s1lz" })
|
|
1229
1229
|
}),
|
|
1230
1230
|
/* @__PURE__ */ M(Y, {
|
|
1231
1231
|
code: "PROJECT_ID:USER_ID",
|
|
1232
|
-
description:
|
|
1232
|
+
description: a._({ id: "zhM8FP" })
|
|
1233
1233
|
}),
|
|
1234
1234
|
/* @__PURE__ */ M(Y, {
|
|
1235
1235
|
code: "PROJECT_ID:*",
|
|
1236
|
-
description:
|
|
1236
|
+
description: a._({ id: "BCJPTn" })
|
|
1237
1237
|
}),
|
|
1238
1238
|
/* @__PURE__ */ M(Y, {
|
|
1239
1239
|
code: "*:USER_ID",
|
|
1240
|
-
description:
|
|
1240
|
+
description: a._({ id: "/xnbdQ" })
|
|
1241
1241
|
})
|
|
1242
1242
|
]
|
|
1243
1243
|
}),
|
|
@@ -1259,14 +1259,14 @@ var de = ({ isOpen: t, container: r, onClose: a, onSuccess: o, onError: s }) =>
|
|
|
1259
1259
|
})]
|
|
1260
1260
|
});
|
|
1261
1261
|
};
|
|
1262
|
-
function Y({ code:
|
|
1263
|
-
return /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M(
|
|
1262
|
+
function Y({ code: t, description: n }) {
|
|
1263
|
+
return /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M(e, {
|
|
1264
1264
|
variant: "info",
|
|
1265
1265
|
className: "mb-1 font-mono text-xs",
|
|
1266
|
-
children:
|
|
1266
|
+
children: t
|
|
1267
1267
|
}), /* @__PURE__ */ M("p", {
|
|
1268
1268
|
className: "text-theme-light text-xs leading-relaxed",
|
|
1269
|
-
children:
|
|
1269
|
+
children: n
|
|
1270
1270
|
})] });
|
|
1271
1271
|
}
|
|
1272
1272
|
function fe({ label: e }) {
|
|
@@ -1275,13 +1275,13 @@ function fe({ label: e }) {
|
|
|
1275
1275
|
children: [/* @__PURE__ */ M("label", {
|
|
1276
1276
|
className: "text-theme-default text-sm font-semibold",
|
|
1277
1277
|
children: e
|
|
1278
|
-
}), /* @__PURE__ */ N(
|
|
1278
|
+
}), /* @__PURE__ */ N(p, {
|
|
1279
1279
|
triggerEvent: "hover",
|
|
1280
|
-
children: [/* @__PURE__ */ M(
|
|
1280
|
+
children: [/* @__PURE__ */ M(c, { children: /* @__PURE__ */ M(v, {
|
|
1281
1281
|
icon: "info",
|
|
1282
1282
|
size: "14",
|
|
1283
1283
|
className: "text-theme-light cursor-help"
|
|
1284
|
-
}) }), /* @__PURE__ */ M(
|
|
1284
|
+
}) }), /* @__PURE__ */ M(t, {
|
|
1285
1285
|
className: "z-10 max-w-[350px]",
|
|
1286
1286
|
children: /* @__PURE__ */ M(B, { id: "AdtLNV" })
|
|
1287
1287
|
})]
|
|
@@ -1290,8 +1290,8 @@ function fe({ label: e }) {
|
|
|
1290
1290
|
}
|
|
1291
1291
|
//#endregion
|
|
1292
1292
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ContainerTableView.tsx
|
|
1293
|
-
var pe = ({ containers: e, createModalOpen:
|
|
1294
|
-
let { projectId: C, provider: T } = z({ from: "/_auth/projects/$projectId/storage/$provider/containers/" }), { i18n: E, _: D } = V(),
|
|
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
1295
|
I(() => {
|
|
1296
1296
|
A.current && F(A.current.offsetWidth - A.current.clientWidth);
|
|
1297
1297
|
}, [e.length]);
|
|
@@ -1311,11 +1311,11 @@ var pe = ({ containers: e, createModalOpen: r, setCreateModalOpen: i, maxContain
|
|
|
1311
1311
|
}, fe = (e) => {
|
|
1312
1312
|
x.includes(e) ? S(x.filter((t) => t !== e)) : S([...x, e]);
|
|
1313
1313
|
};
|
|
1314
|
-
if (!e || e.length === 0) return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(
|
|
1314
|
+
if (!e || e.length === 0) return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(d, {
|
|
1315
1315
|
columns: 4,
|
|
1316
1316
|
className: "containers",
|
|
1317
1317
|
"data-testid": "no-containers",
|
|
1318
|
-
children: /* @__PURE__ */ M(
|
|
1318
|
+
children: /* @__PURE__ */ M(a, { children: /* @__PURE__ */ M(s, {
|
|
1319
1319
|
colSpan: 4,
|
|
1320
1320
|
children: /* @__PURE__ */ N("div", {
|
|
1321
1321
|
className: "py-8 text-center",
|
|
@@ -1329,11 +1329,11 @@ var pe = ({ containers: e, createModalOpen: r, setCreateModalOpen: i, maxContain
|
|
|
1329
1329
|
})
|
|
1330
1330
|
}) })
|
|
1331
1331
|
}), /* @__PURE__ */ M(G, {
|
|
1332
|
-
isOpen:
|
|
1333
|
-
onClose: () =>
|
|
1334
|
-
onSuccess:
|
|
1335
|
-
onError:
|
|
1336
|
-
maxContainerNameLength:
|
|
1332
|
+
isOpen: t,
|
|
1333
|
+
onClose: () => n(!1),
|
|
1334
|
+
onSuccess: c,
|
|
1335
|
+
onError: l,
|
|
1336
|
+
maxContainerNameLength: o
|
|
1337
1337
|
})] });
|
|
1338
1338
|
let pe = "40px minmax(200px, 2fr) minmax(100px, 1fr) minmax(180px, 2fr) minmax(100px, 1fr) 60px";
|
|
1339
1339
|
return /* @__PURE__ */ N(j, { children: [
|
|
@@ -1341,22 +1341,22 @@ var pe = ({ containers: e, createModalOpen: r, setCreateModalOpen: i, maxContain
|
|
|
1341
1341
|
className: "relative",
|
|
1342
1342
|
children: [/* @__PURE__ */ M("div", {
|
|
1343
1343
|
style: { paddingRight: `${P}px` },
|
|
1344
|
-
children: /* @__PURE__ */ M(
|
|
1344
|
+
children: /* @__PURE__ */ M(d, {
|
|
1345
1345
|
columns: 6,
|
|
1346
1346
|
gridColumnTemplate: pe,
|
|
1347
1347
|
className: "containers",
|
|
1348
1348
|
"data-testid": "containers-table-header",
|
|
1349
|
-
children: /* @__PURE__ */ N(
|
|
1350
|
-
/* @__PURE__ */ M(
|
|
1349
|
+
children: /* @__PURE__ */ N(a, { children: [
|
|
1350
|
+
/* @__PURE__ */ M(i, { children: /* @__PURE__ */ M(w, {
|
|
1351
1351
|
checked: ue,
|
|
1352
1352
|
onChange: Y,
|
|
1353
1353
|
"data-testid": "select-all-containers"
|
|
1354
1354
|
}) }),
|
|
1355
|
-
/* @__PURE__ */ M(
|
|
1356
|
-
/* @__PURE__ */ M(
|
|
1357
|
-
/* @__PURE__ */ M(
|
|
1358
|
-
/* @__PURE__ */ M(
|
|
1359
|
-
/* @__PURE__ */ M(
|
|
1355
|
+
/* @__PURE__ */ M(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
1360
|
] })
|
|
1361
1361
|
})
|
|
1362
1362
|
}), /* @__PURE__ */ M("div", {
|
|
@@ -1370,17 +1370,17 @@ var pe = ({ containers: e, createModalOpen: r, setCreateModalOpen: i, maxContain
|
|
|
1370
1370
|
width: "100%",
|
|
1371
1371
|
position: "relative"
|
|
1372
1372
|
},
|
|
1373
|
-
children: le.getVirtualItems().map((
|
|
1374
|
-
let
|
|
1373
|
+
children: le.getVirtualItems().map((t) => {
|
|
1374
|
+
let n = e[t.index], i = x.includes(n.name), a = () => k({
|
|
1375
1375
|
to: "/projects/$projectId/storage/$provider/containers/$containerName/objects",
|
|
1376
1376
|
params: {
|
|
1377
1377
|
projectId: C,
|
|
1378
1378
|
provider: T,
|
|
1379
|
-
containerName:
|
|
1379
|
+
containerName: n.name
|
|
1380
1380
|
}
|
|
1381
1381
|
});
|
|
1382
1382
|
return /* @__PURE__ */ N("div", {
|
|
1383
|
-
"data-index":
|
|
1383
|
+
"data-index": t.index,
|
|
1384
1384
|
ref: le.measureElement,
|
|
1385
1385
|
className: "juno-datagrid group hover:bg-theme-background-lvl-1 cursor-pointer",
|
|
1386
1386
|
style: {
|
|
@@ -1388,78 +1388,78 @@ var pe = ({ containers: e, createModalOpen: r, setCreateModalOpen: i, maxContain
|
|
|
1388
1388
|
top: 0,
|
|
1389
1389
|
left: 0,
|
|
1390
1390
|
width: "100%",
|
|
1391
|
-
transform: `translateY(${
|
|
1391
|
+
transform: `translateY(${t.start}px)`,
|
|
1392
1392
|
display: "grid",
|
|
1393
1393
|
gridTemplateColumns: pe,
|
|
1394
1394
|
alignItems: "stretch"
|
|
1395
1395
|
},
|
|
1396
|
-
"data-testid": `container-row-${
|
|
1396
|
+
"data-testid": `container-row-${n.name}`,
|
|
1397
1397
|
role: "link",
|
|
1398
1398
|
tabIndex: 0,
|
|
1399
|
-
onClick:
|
|
1399
|
+
onClick: a,
|
|
1400
1400
|
onKeyDown: (e) => {
|
|
1401
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
1401
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
1402
1402
|
},
|
|
1403
1403
|
children: [
|
|
1404
|
-
/* @__PURE__ */ M(
|
|
1404
|
+
/* @__PURE__ */ M(s, {
|
|
1405
1405
|
onClick: (e) => e.stopPropagation(),
|
|
1406
1406
|
onKeyDown: (e) => {
|
|
1407
1407
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
1408
1408
|
},
|
|
1409
|
-
children: /* @__PURE__ */ M(
|
|
1410
|
-
checked:
|
|
1411
|
-
onChange: () => fe(
|
|
1412
|
-
"data-testid": `select-container-${
|
|
1409
|
+
children: /* @__PURE__ */ M(w, {
|
|
1410
|
+
checked: i,
|
|
1411
|
+
onChange: () => fe(n.name),
|
|
1412
|
+
"data-testid": `select-container-${n.name}`
|
|
1413
1413
|
})
|
|
1414
1414
|
}),
|
|
1415
|
-
/* @__PURE__ */ M(
|
|
1415
|
+
/* @__PURE__ */ M(s, {
|
|
1416
1416
|
className: "min-w-0 overflow-hidden",
|
|
1417
1417
|
children: /* @__PURE__ */ M("span", {
|
|
1418
1418
|
className: "block truncate",
|
|
1419
|
-
title:
|
|
1420
|
-
children:
|
|
1419
|
+
title: n.name,
|
|
1420
|
+
children: n.name
|
|
1421
1421
|
})
|
|
1422
1422
|
}),
|
|
1423
|
-
/* @__PURE__ */ M(
|
|
1424
|
-
/* @__PURE__ */ M(
|
|
1425
|
-
/* @__PURE__ */ M(
|
|
1426
|
-
/* @__PURE__ */ M(
|
|
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
1427
|
onClick: (e) => e.stopPropagation(),
|
|
1428
|
-
children: /* @__PURE__ */ M(
|
|
1428
|
+
children: /* @__PURE__ */ M(g, { children: /* @__PURE__ */ N(r, { children: [
|
|
1429
1429
|
/* @__PURE__ */ M(f, {
|
|
1430
1430
|
label: E._({ id: "cWbW6w" }),
|
|
1431
|
-
onClick: () => se(
|
|
1432
|
-
"data-testid": `access-control-action-${
|
|
1431
|
+
onClick: () => se(n),
|
|
1432
|
+
"data-testid": `access-control-action-${n.name}`
|
|
1433
1433
|
}),
|
|
1434
1434
|
/* @__PURE__ */ M(f, {
|
|
1435
1435
|
label: E._({ id: "Oc8Aqv" }),
|
|
1436
|
-
onClick: () => oe(
|
|
1437
|
-
"data-testid": `properties-action-${
|
|
1436
|
+
onClick: () => oe(n),
|
|
1437
|
+
"data-testid": `properties-action-${n.name}`
|
|
1438
1438
|
}),
|
|
1439
1439
|
/* @__PURE__ */ M(f, {
|
|
1440
1440
|
label: E._({ id: "N2S1rs" }),
|
|
1441
|
-
onClick: () => U(
|
|
1442
|
-
"data-testid": `empty-action-${
|
|
1441
|
+
onClick: () => U(n),
|
|
1442
|
+
"data-testid": `empty-action-${n.name}`
|
|
1443
1443
|
}),
|
|
1444
1444
|
/* @__PURE__ */ M(f, {
|
|
1445
1445
|
label: E._({ id: "cnGeoo" }),
|
|
1446
|
-
onClick: () => re(
|
|
1447
|
-
"data-testid": `delete-action-${
|
|
1446
|
+
onClick: () => re(n),
|
|
1447
|
+
"data-testid": `delete-action-${n.name}`
|
|
1448
1448
|
})
|
|
1449
1449
|
] }) })
|
|
1450
1450
|
})
|
|
1451
1451
|
]
|
|
1452
|
-
},
|
|
1452
|
+
}, n.name);
|
|
1453
1453
|
})
|
|
1454
1454
|
})
|
|
1455
1455
|
})]
|
|
1456
1456
|
}),
|
|
1457
1457
|
/* @__PURE__ */ M(G, {
|
|
1458
|
-
isOpen:
|
|
1459
|
-
onClose: () =>
|
|
1460
|
-
onSuccess:
|
|
1461
|
-
onError:
|
|
1462
|
-
maxContainerNameLength:
|
|
1458
|
+
isOpen: t,
|
|
1459
|
+
onClose: () => n(!1),
|
|
1460
|
+
onSuccess: c,
|
|
1461
|
+
onError: l,
|
|
1462
|
+
maxContainerNameLength: o
|
|
1463
1463
|
}),
|
|
1464
1464
|
/* @__PURE__ */ M(te, {
|
|
1465
1465
|
isOpen: H !== null,
|
|
@@ -1472,8 +1472,8 @@ var pe = ({ containers: e, createModalOpen: r, setCreateModalOpen: i, maxContain
|
|
|
1472
1472
|
isOpen: K !== null,
|
|
1473
1473
|
container: K,
|
|
1474
1474
|
onClose: () => re(null),
|
|
1475
|
-
onSuccess:
|
|
1476
|
-
onError:
|
|
1475
|
+
onSuccess: m,
|
|
1476
|
+
onError: h
|
|
1477
1477
|
}),
|
|
1478
1478
|
/* @__PURE__ */ M(ae, {
|
|
1479
1479
|
isOpen: ie !== null,
|
|
@@ -1493,13 +1493,13 @@ var pe = ({ containers: e, createModalOpen: r, setCreateModalOpen: i, maxContain
|
|
|
1493
1493
|
};
|
|
1494
1494
|
//#endregion
|
|
1495
1495
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ContainerToastNotifications.tsx
|
|
1496
|
-
function X({ title:
|
|
1497
|
-
return /* @__PURE__ */ N(
|
|
1496
|
+
function X({ title: e, description: t }) {
|
|
1497
|
+
return /* @__PURE__ */ N(b, {
|
|
1498
1498
|
direction: "vertical",
|
|
1499
1499
|
gap: "1.5",
|
|
1500
|
-
children: [/* @__PURE__ */ M("span", { children:
|
|
1500
|
+
children: [/* @__PURE__ */ M("span", { children: e }), /* @__PURE__ */ M("span", {
|
|
1501
1501
|
className: "text-theme-light",
|
|
1502
|
-
children:
|
|
1502
|
+
children: t
|
|
1503
1503
|
})]
|
|
1504
1504
|
});
|
|
1505
1505
|
}
|
|
@@ -1650,37 +1650,37 @@ var me = (e, t) => ({
|
|
|
1650
1650
|
autoDismiss: !0,
|
|
1651
1651
|
autoDismissTimeout: n.autoDismissTimeout ?? 5e3,
|
|
1652
1652
|
onDismiss: n.onDismiss
|
|
1653
|
-
}), Ce = (t, n, r
|
|
1654
|
-
let
|
|
1653
|
+
}), Ce = (e, t, n, r) => {
|
|
1654
|
+
let i = n.length > 0, a = e > 0, o = i && a;
|
|
1655
1655
|
return {
|
|
1656
|
-
variant:
|
|
1656
|
+
variant: o ? "warning" : i ? "error" : "success",
|
|
1657
1657
|
children: /* @__PURE__ */ M(X, {
|
|
1658
|
-
title:
|
|
1659
|
-
description: /* @__PURE__ */ N(
|
|
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
1660
|
direction: "vertical",
|
|
1661
1661
|
gap: "1",
|
|
1662
|
-
children: [
|
|
1662
|
+
children: [a && /* @__PURE__ */ M("span", { children: /* @__PURE__ */ M(B, {
|
|
1663
1663
|
id: "1NS3nd",
|
|
1664
1664
|
values: {
|
|
1665
|
-
emptiedCount:
|
|
1666
|
-
totalDeleted:
|
|
1665
|
+
emptiedCount: e,
|
|
1666
|
+
totalDeleted: t
|
|
1667
1667
|
}
|
|
1668
|
-
}) }),
|
|
1668
|
+
}) }), i && /* @__PURE__ */ M("span", {
|
|
1669
1669
|
className: "whitespace-pre-line",
|
|
1670
1670
|
children: /* @__PURE__ */ M(B, {
|
|
1671
1671
|
id: "JrmKyf",
|
|
1672
|
-
values: { errorDetails:
|
|
1672
|
+
values: { errorDetails: n.join("\n") }
|
|
1673
1673
|
})
|
|
1674
1674
|
})]
|
|
1675
1675
|
})
|
|
1676
1676
|
}),
|
|
1677
1677
|
autoDismiss: !0,
|
|
1678
|
-
autoDismissTimeout:
|
|
1679
|
-
onDismiss:
|
|
1678
|
+
autoDismissTimeout: r.autoDismissTimeout ?? 5e3,
|
|
1679
|
+
onDismiss: r.onDismiss
|
|
1680
1680
|
};
|
|
1681
1681
|
}, Q = ({ label: e, value: t }) => t == null ? null : /* @__PURE__ */ N("span", {
|
|
1682
1682
|
className: "flex items-start gap-1.5",
|
|
1683
|
-
children: [/* @__PURE__ */ M(
|
|
1683
|
+
children: [/* @__PURE__ */ M(v, {
|
|
1684
1684
|
icon: "check",
|
|
1685
1685
|
size: "16px",
|
|
1686
1686
|
className: "text-theme-success mt-0.5 shrink-0"
|
|
@@ -1694,7 +1694,7 @@ var me = (e, t) => ({
|
|
|
1694
1694
|
] })]
|
|
1695
1695
|
}), we = ({ label: e }) => /* @__PURE__ */ N("span", {
|
|
1696
1696
|
className: "flex items-start gap-1.5",
|
|
1697
|
-
children: [/* @__PURE__ */ M(
|
|
1697
|
+
children: [/* @__PURE__ */ M(v, {
|
|
1698
1698
|
icon: "check",
|
|
1699
1699
|
size: "16px",
|
|
1700
1700
|
className: "text-theme-success mt-0.5 shrink-0"
|
|
@@ -1705,108 +1705,108 @@ var me = (e, t) => ({
|
|
|
1705
1705
|
className: "text-theme-default block font-semibold",
|
|
1706
1706
|
children: e
|
|
1707
1707
|
}), t]
|
|
1708
|
-
}), Ee = ({ serviceInfo: e, accountInfo:
|
|
1709
|
-
let { i18n:
|
|
1710
|
-
account_quotas:
|
|
1711
|
-
container_quotas:
|
|
1712
|
-
bulk_delete:
|
|
1713
|
-
bulk_upload:
|
|
1714
|
-
slo:
|
|
1715
|
-
container_sync:
|
|
1716
|
-
tempurl:
|
|
1717
|
-
symlink:
|
|
1718
|
-
versioned_writes:
|
|
1719
|
-
}, s = Object.entries(
|
|
1720
|
-
return /* @__PURE__ */ N(
|
|
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
1721
|
triggerEvent: "hover",
|
|
1722
1722
|
placement: "bottom-end",
|
|
1723
|
-
children: [/* @__PURE__ */ M(
|
|
1723
|
+
children: [/* @__PURE__ */ M(c, {
|
|
1724
1724
|
asChild: !0,
|
|
1725
|
-
children: /* @__PURE__ */ M(
|
|
1725
|
+
children: /* @__PURE__ */ M(v, {
|
|
1726
1726
|
icon: "info",
|
|
1727
1727
|
size: "20px",
|
|
1728
1728
|
className: "text-theme-light hover:text-theme-default cursor-pointer"
|
|
1729
1729
|
})
|
|
1730
|
-
}), /* @__PURE__ */ M(
|
|
1730
|
+
}), /* @__PURE__ */ M(t, {
|
|
1731
1731
|
className: "z-10 w-72 text-sm",
|
|
1732
1732
|
children: /* @__PURE__ */ N("span", {
|
|
1733
1733
|
className: "flex flex-col gap-3 p-1",
|
|
1734
1734
|
children: [
|
|
1735
|
-
|
|
1735
|
+
n && /* @__PURE__ */ N(Te, {
|
|
1736
1736
|
title: /* @__PURE__ */ M(B, { id: "AeXO77" }),
|
|
1737
1737
|
children: [
|
|
1738
1738
|
/* @__PURE__ */ M(Q, {
|
|
1739
|
-
label:
|
|
1740
|
-
value:
|
|
1739
|
+
label: r._({ id: "ClGcRq" }),
|
|
1740
|
+
value: n.containerCount.toLocaleString()
|
|
1741
1741
|
}),
|
|
1742
1742
|
/* @__PURE__ */ M(Q, {
|
|
1743
|
-
label:
|
|
1744
|
-
value:
|
|
1743
|
+
label: r._({ id: "B3toQF" }),
|
|
1744
|
+
value: n.objectCount.toLocaleString()
|
|
1745
1745
|
}),
|
|
1746
1746
|
/* @__PURE__ */ M(Q, {
|
|
1747
|
-
label:
|
|
1748
|
-
value:
|
|
1747
|
+
label: r._({ id: "aL1w5Z" }),
|
|
1748
|
+
value: O(n.bytesUsed)
|
|
1749
1749
|
}),
|
|
1750
|
-
|
|
1751
|
-
label:
|
|
1752
|
-
value:
|
|
1750
|
+
n.quotaBytes !== void 0 && /* @__PURE__ */ M(Q, {
|
|
1751
|
+
label: r._({ id: "vEkTR9" }),
|
|
1752
|
+
value: O(n.quotaBytes)
|
|
1753
1753
|
})
|
|
1754
1754
|
]
|
|
1755
1755
|
}),
|
|
1756
|
-
|
|
1756
|
+
a && /* @__PURE__ */ N(Te, {
|
|
1757
1757
|
title: /* @__PURE__ */ M(B, { id: "6BDqha" }),
|
|
1758
1758
|
children: [
|
|
1759
1759
|
/* @__PURE__ */ M(Q, {
|
|
1760
|
-
label:
|
|
1761
|
-
value:
|
|
1760
|
+
label: r._({ id: "wTg+FY" }),
|
|
1761
|
+
value: a.max_file_size === void 0 ? void 0 : O(a.max_file_size)
|
|
1762
1762
|
}),
|
|
1763
1763
|
/* @__PURE__ */ M(Q, {
|
|
1764
|
-
label:
|
|
1765
|
-
value:
|
|
1764
|
+
label: r._({ id: "Rih53k" }),
|
|
1765
|
+
value: a.max_container_name_length
|
|
1766
1766
|
}),
|
|
1767
1767
|
/* @__PURE__ */ M(Q, {
|
|
1768
|
-
label:
|
|
1769
|
-
value:
|
|
1768
|
+
label: r._({ id: "qAkkjP" }),
|
|
1769
|
+
value: a.max_object_name_length
|
|
1770
1770
|
}),
|
|
1771
1771
|
/* @__PURE__ */ M(Q, {
|
|
1772
|
-
label:
|
|
1773
|
-
value:
|
|
1772
|
+
label: r._({ id: "OZImTR" }),
|
|
1773
|
+
value: a.container_listing_limit?.toLocaleString()
|
|
1774
1774
|
}),
|
|
1775
1775
|
/* @__PURE__ */ M(Q, {
|
|
1776
|
-
label:
|
|
1777
|
-
value:
|
|
1776
|
+
label: r._({ id: "a4A2uB" }),
|
|
1777
|
+
value: a.account_listing_limit?.toLocaleString()
|
|
1778
1778
|
}),
|
|
1779
1779
|
/* @__PURE__ */ M(Q, {
|
|
1780
|
-
label:
|
|
1781
|
-
value:
|
|
1780
|
+
label: r._({ id: "zWb/Nn" }),
|
|
1781
|
+
value: a.max_header_size
|
|
1782
1782
|
}),
|
|
1783
1783
|
/* @__PURE__ */ M(Q, {
|
|
1784
|
-
label:
|
|
1785
|
-
value:
|
|
1784
|
+
label: r._({ id: "RGwfoL" }),
|
|
1785
|
+
value: a.max_meta_count
|
|
1786
1786
|
}),
|
|
1787
1787
|
/* @__PURE__ */ M(Q, {
|
|
1788
|
-
label:
|
|
1789
|
-
value:
|
|
1788
|
+
label: r._({ id: "8c3/77" }),
|
|
1789
|
+
value: a.max_meta_name_length
|
|
1790
1790
|
}),
|
|
1791
1791
|
/* @__PURE__ */ M(Q, {
|
|
1792
|
-
label:
|
|
1793
|
-
value:
|
|
1792
|
+
label: r._({ id: "5JDSvn" }),
|
|
1793
|
+
value: a.max_meta_value_length
|
|
1794
1794
|
}),
|
|
1795
1795
|
/* @__PURE__ */ M(Q, {
|
|
1796
|
-
label:
|
|
1797
|
-
value:
|
|
1796
|
+
label: r._({ id: "ZAx+d1" }),
|
|
1797
|
+
value: a.max_meta_overall_size
|
|
1798
1798
|
}),
|
|
1799
|
-
|
|
1800
|
-
label:
|
|
1801
|
-
value:
|
|
1799
|
+
a.bulk_delete && /* @__PURE__ */ M(Q, {
|
|
1800
|
+
label: r._({ id: "lQ3EIe" }),
|
|
1801
|
+
value: a.bulk_delete.max_deletes_per_request.toLocaleString()
|
|
1802
1802
|
}),
|
|
1803
|
-
|
|
1804
|
-
label:
|
|
1805
|
-
value:
|
|
1803
|
+
a.bulk_upload && /* @__PURE__ */ M(Q, {
|
|
1804
|
+
label: r._({ id: "STc+7E" }),
|
|
1805
|
+
value: a.bulk_upload.max_containers_per_extraction.toLocaleString()
|
|
1806
1806
|
}),
|
|
1807
|
-
|
|
1808
|
-
label:
|
|
1809
|
-
value:
|
|
1807
|
+
a.slo && /* @__PURE__ */ M(Q, {
|
|
1808
|
+
label: r._({ id: "RNBvdl" }),
|
|
1809
|
+
value: a.slo.max_manifest_segments.toLocaleString()
|
|
1810
1810
|
})
|
|
1811
1811
|
]
|
|
1812
1812
|
}),
|
|
@@ -1818,61 +1818,61 @@ var me = (e, t) => ({
|
|
|
1818
1818
|
})
|
|
1819
1819
|
})]
|
|
1820
1820
|
});
|
|
1821
|
-
}, De = 20, Oe = ({ isOpen:
|
|
1822
|
-
let { i18n:
|
|
1823
|
-
|
|
1824
|
-
},
|
|
1825
|
-
let e = 0,
|
|
1826
|
-
for (let
|
|
1827
|
-
|
|
1828
|
-
current:
|
|
1829
|
-
total:
|
|
1821
|
+
}, De = 20, Oe = ({ isOpen: 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
1830
|
});
|
|
1831
|
-
let
|
|
1831
|
+
let s = t[r];
|
|
1832
1832
|
try {
|
|
1833
|
-
let
|
|
1834
|
-
project_id:
|
|
1835
|
-
container:
|
|
1833
|
+
let t = await d.mutateAsync({
|
|
1834
|
+
project_id: o,
|
|
1835
|
+
container: s.name
|
|
1836
1836
|
});
|
|
1837
|
-
|
|
1837
|
+
n += t, e++;
|
|
1838
1838
|
} catch (e) {
|
|
1839
1839
|
let t = e instanceof Error ? e.message : String(e);
|
|
1840
|
-
|
|
1840
|
+
i.push(`${s.name}: ${t}`);
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
|
-
e > 0 && await
|
|
1843
|
+
e > 0 && await u.storage.swift.listContainers.invalidate(), r?.({
|
|
1844
1844
|
emptiedCount: e,
|
|
1845
|
-
totalDeleted:
|
|
1846
|
-
errors:
|
|
1847
|
-
}),
|
|
1845
|
+
totalDeleted: n,
|
|
1846
|
+
errors: i
|
|
1847
|
+
}), f();
|
|
1848
1848
|
};
|
|
1849
|
-
if (!
|
|
1850
|
-
let
|
|
1851
|
-
return /* @__PURE__ */ M(
|
|
1852
|
-
title:
|
|
1853
|
-
open:
|
|
1854
|
-
onCancel:
|
|
1855
|
-
confirmButtonLabel:
|
|
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
1856
|
confirmButtonVariant: "primary-danger",
|
|
1857
|
-
cancelButtonLabel:
|
|
1858
|
-
onConfirm:
|
|
1859
|
-
disableConfirmButton:
|
|
1860
|
-
disableCancelButton:
|
|
1861
|
-
disableCloseButton:
|
|
1857
|
+
cancelButtonLabel: i._({ id: "dEgA5A" }),
|
|
1858
|
+
onConfirm: p,
|
|
1859
|
+
disableConfirmButton: _,
|
|
1860
|
+
disableCancelButton: _,
|
|
1861
|
+
disableCloseButton: _,
|
|
1862
1862
|
size: "small",
|
|
1863
|
-
children:
|
|
1863
|
+
children: _ ? /* @__PURE__ */ N(b, {
|
|
1864
1864
|
direction: "vertical",
|
|
1865
1865
|
distribution: "center",
|
|
1866
1866
|
alignment: "center",
|
|
1867
1867
|
gap: "2",
|
|
1868
1868
|
className: "py-4",
|
|
1869
|
-
children: [/* @__PURE__ */ M(
|
|
1869
|
+
children: [/* @__PURE__ */ M(l, { variant: "primary" }), s && /* @__PURE__ */ M("p", {
|
|
1870
1870
|
className: "text-theme-light text-sm",
|
|
1871
1871
|
children: /* @__PURE__ */ M(B, {
|
|
1872
1872
|
id: "7NSdfG",
|
|
1873
1873
|
values: {
|
|
1874
|
-
progressCurrent:
|
|
1875
|
-
progressTotal:
|
|
1874
|
+
progressCurrent: v,
|
|
1875
|
+
progressTotal: y
|
|
1876
1876
|
}
|
|
1877
1877
|
})
|
|
1878
1878
|
})]
|
|
@@ -1897,21 +1897,21 @@ var me = (e, t) => ({
|
|
|
1897
1897
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
1898
1898
|
children: /* @__PURE__ */ M(B, {
|
|
1899
1899
|
id: "VKmlZ+",
|
|
1900
|
-
values: { totalCount:
|
|
1900
|
+
values: { totalCount: m }
|
|
1901
1901
|
})
|
|
1902
1902
|
}), /* @__PURE__ */ N("div", {
|
|
1903
1903
|
className: "jn:bg-theme-background-lvl-1 max-h-48 overflow-y-auto rounded p-4",
|
|
1904
1904
|
children: [/* @__PURE__ */ M("ul", {
|
|
1905
1905
|
className: "space-y-1",
|
|
1906
|
-
children:
|
|
1906
|
+
children: h.map((e) => /* @__PURE__ */ M("li", {
|
|
1907
1907
|
className: "jn:text-theme-default font-mono text-sm",
|
|
1908
1908
|
children: e.name
|
|
1909
1909
|
}, e.name))
|
|
1910
|
-
}),
|
|
1910
|
+
}), g > 0 && /* @__PURE__ */ M("p", {
|
|
1911
1911
|
className: "text-theme-light mt-2 text-xs",
|
|
1912
1912
|
children: /* @__PURE__ */ M(B, {
|
|
1913
1913
|
id: "yqPflB",
|
|
1914
|
-
values: { hiddenCount:
|
|
1914
|
+
values: { hiddenCount: g }
|
|
1915
1915
|
})
|
|
1916
1916
|
})]
|
|
1917
1917
|
})]
|
|
@@ -1919,7 +1919,7 @@ var me = (e, t) => ({
|
|
|
1919
1919
|
})
|
|
1920
1920
|
});
|
|
1921
1921
|
}, ke = () => {
|
|
1922
|
-
let { i18n:
|
|
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
1923
|
_(me(e, { onDismiss: v }));
|
|
1924
1924
|
}, x = (e, t) => {
|
|
1925
1925
|
_(he(e, t, { onDismiss: v }));
|
|
@@ -1935,44 +1935,44 @@ var me = (e, t) => ({
|
|
|
1935
1935
|
_(ye(e, { onDismiss: v }));
|
|
1936
1936
|
}, I = (e, t) => {
|
|
1937
1937
|
_(be(e, t, { onDismiss: v }));
|
|
1938
|
-
},
|
|
1938
|
+
}, ee = (e) => {
|
|
1939
1939
|
_(xe(e, { onDismiss: v }));
|
|
1940
1940
|
}, z = (e, t) => {
|
|
1941
1941
|
_(Se(e, t, { onDismiss: v }));
|
|
1942
1942
|
}, H = ({ emptiedCount: e, totalDeleted: t, errors: n }) => {
|
|
1943
|
-
if (n.length === 0)
|
|
1943
|
+
if (n.length === 0) m([]);
|
|
1944
1944
|
else {
|
|
1945
1945
|
let e = new Set(n.map((e) => e.split(": ")[0]));
|
|
1946
|
-
|
|
1946
|
+
m((t) => t.filter((t) => e.has(t)));
|
|
1947
1947
|
}
|
|
1948
1948
|
_(Ce(e, t, n, { onDismiss: v }));
|
|
1949
1949
|
}, U = {
|
|
1950
1950
|
options: [
|
|
1951
1951
|
{
|
|
1952
|
-
label:
|
|
1952
|
+
label: e._({ id: "6YtxFj" }),
|
|
1953
1953
|
value: "name"
|
|
1954
1954
|
},
|
|
1955
1955
|
{
|
|
1956
|
-
label:
|
|
1956
|
+
label: e._({ id: "sxbP3b" }),
|
|
1957
1957
|
value: "count"
|
|
1958
1958
|
},
|
|
1959
1959
|
{
|
|
1960
|
-
label:
|
|
1960
|
+
label: e._({ id: "hgpMHD" }),
|
|
1961
1961
|
value: "bytes"
|
|
1962
1962
|
},
|
|
1963
1963
|
{
|
|
1964
|
-
label:
|
|
1964
|
+
label: e._({ id: "sjMCOP" }),
|
|
1965
1965
|
value: "last_modified"
|
|
1966
1966
|
}
|
|
1967
1967
|
],
|
|
1968
|
-
sortBy:
|
|
1969
|
-
sortDirection:
|
|
1968
|
+
sortBy: i ?? "name",
|
|
1969
|
+
sortDirection: a ?? "asc"
|
|
1970
1970
|
}, { data: W, isLoading: G, error: te } = T.storage.swift.listContainers.useQuery({
|
|
1971
|
-
project_id:
|
|
1971
|
+
project_id: n,
|
|
1972
1972
|
format: "json"
|
|
1973
|
-
}), { data: ne } = T.storage.swift.getAccountMetadata.useQuery({ project_id:
|
|
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
1974
|
let n;
|
|
1975
|
-
switch (
|
|
1975
|
+
switch (i ?? "name") {
|
|
1976
1976
|
case "name":
|
|
1977
1977
|
n = e.name.localeCompare(t.name);
|
|
1978
1978
|
break;
|
|
@@ -1988,11 +1988,11 @@ var me = (e, t) => ({
|
|
|
1988
1988
|
break;
|
|
1989
1989
|
default: n = e.name.localeCompare(t.name);
|
|
1990
1990
|
}
|
|
1991
|
-
return (
|
|
1992
|
-
}), ie = (W || []).filter((e) => e.name.toLowerCase().includes(
|
|
1991
|
+
return (a ?? "asc") === "desc" ? -n : n;
|
|
1992
|
+
}), ie = (W || []).filter((e) => e.name.toLowerCase().includes(s.toLowerCase())), ae = re(ie), oe = (e) => {
|
|
1993
1993
|
let t = typeof e == "string" ? e : "";
|
|
1994
1994
|
P(() => {
|
|
1995
|
-
|
|
1995
|
+
r({ search: (e) => ({
|
|
1996
1996
|
...e,
|
|
1997
1997
|
search: t || void 0
|
|
1998
1998
|
}) });
|
|
@@ -2000,55 +2000,55 @@ var me = (e, t) => ({
|
|
|
2000
2000
|
}, q = (e) => {
|
|
2001
2001
|
let t = e.sortBy?.toString() || "name", n = e.sortDirection || "asc";
|
|
2002
2002
|
P(() => {
|
|
2003
|
-
|
|
2003
|
+
r({ search: (e) => ({
|
|
2004
2004
|
...e,
|
|
2005
2005
|
sortBy: t,
|
|
2006
2006
|
sortDirection: n
|
|
2007
2007
|
}) });
|
|
2008
2008
|
});
|
|
2009
2009
|
};
|
|
2010
|
-
if (G) return /* @__PURE__ */ N(
|
|
2010
|
+
if (G) return /* @__PURE__ */ N(b, {
|
|
2011
2011
|
className: "fixed inset-0",
|
|
2012
2012
|
distribution: "center",
|
|
2013
2013
|
alignment: "center",
|
|
2014
2014
|
direction: "vertical",
|
|
2015
|
-
children: [/* @__PURE__ */ M(
|
|
2015
|
+
children: [/* @__PURE__ */ M(l, {
|
|
2016
2016
|
variant: "primary",
|
|
2017
2017
|
size: "large",
|
|
2018
2018
|
className: "mb-2"
|
|
2019
2019
|
}), /* @__PURE__ */ M(B, { id: "WYiUDa" })]
|
|
2020
2020
|
});
|
|
2021
2021
|
if (te) {
|
|
2022
|
-
let
|
|
2023
|
-
return /* @__PURE__ */ M(
|
|
2022
|
+
let e = te.message;
|
|
2023
|
+
return /* @__PURE__ */ M(b, {
|
|
2024
2024
|
className: "fixed inset-0",
|
|
2025
2025
|
distribution: "center",
|
|
2026
2026
|
alignment: "center",
|
|
2027
2027
|
direction: "vertical",
|
|
2028
2028
|
children: /* @__PURE__ */ M(B, {
|
|
2029
2029
|
id: "dLFiER",
|
|
2030
|
-
values: { errorMessage:
|
|
2030
|
+
values: { errorMessage: e }
|
|
2031
2031
|
})
|
|
2032
2032
|
});
|
|
2033
2033
|
}
|
|
2034
|
-
let se = ne?.bytesUsed || 0, ce = ne?.quotaBytes || 0, le = ce > 0 ? ce - se : 0, J = (W || []).filter((e) =>
|
|
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
2035
|
return /* @__PURE__ */ N("div", {
|
|
2036
2036
|
className: "relative",
|
|
2037
2037
|
children: [
|
|
2038
|
-
/* @__PURE__ */ M(
|
|
2038
|
+
/* @__PURE__ */ M(A, {
|
|
2039
2039
|
sortSettings: U,
|
|
2040
|
-
searchTerm:
|
|
2040
|
+
searchTerm: s,
|
|
2041
2041
|
onSort: q,
|
|
2042
2042
|
onSearch: oe,
|
|
2043
|
-
actions: /* @__PURE__ */ N(
|
|
2043
|
+
actions: /* @__PURE__ */ N(b, {
|
|
2044
2044
|
direction: "horizontal",
|
|
2045
2045
|
gap: "4",
|
|
2046
2046
|
alignment: "center",
|
|
2047
|
-
children: [/* @__PURE__ */ M(
|
|
2047
|
+
children: [/* @__PURE__ */ M(h, {
|
|
2048
2048
|
variant: "primary",
|
|
2049
2049
|
onClick: () => u(!0),
|
|
2050
2050
|
children: /* @__PURE__ */ M(B, { id: "vTh35P" })
|
|
2051
|
-
}), /* @__PURE__ */ M(
|
|
2051
|
+
}), /* @__PURE__ */ M(h, {
|
|
2052
2052
|
variant: "primary-danger",
|
|
2053
2053
|
onClick: () => f(!0),
|
|
2054
2054
|
disabled: !ue,
|
|
@@ -2078,7 +2078,7 @@ var me = (e, t) => ({
|
|
|
2078
2078
|
" ",
|
|
2079
2079
|
/* @__PURE__ */ M("span", {
|
|
2080
2080
|
className: "text-theme-default font-semibold",
|
|
2081
|
-
children:
|
|
2081
|
+
children: O(le)
|
|
2082
2082
|
})
|
|
2083
2083
|
] })] }),
|
|
2084
2084
|
/* @__PURE__ */ M(Ee, {
|
|
@@ -2089,10 +2089,10 @@ var me = (e, t) => ({
|
|
|
2089
2089
|
}),
|
|
2090
2090
|
/* @__PURE__ */ M(pe, {
|
|
2091
2091
|
containers: ae,
|
|
2092
|
-
createModalOpen:
|
|
2092
|
+
createModalOpen: c,
|
|
2093
2093
|
setCreateModalOpen: u,
|
|
2094
2094
|
maxContainerNameLength: K?.swift?.max_container_name_length,
|
|
2095
|
-
onCreateSuccess:
|
|
2095
|
+
onCreateSuccess: y,
|
|
2096
2096
|
onCreateError: x,
|
|
2097
2097
|
onEmptySuccess: S,
|
|
2098
2098
|
onEmptyError: C,
|
|
@@ -2100,10 +2100,10 @@ var me = (e, t) => ({
|
|
|
2100
2100
|
onDeleteError: D,
|
|
2101
2101
|
onPropertiesSuccess: F,
|
|
2102
2102
|
onPropertiesError: I,
|
|
2103
|
-
onAclSuccess:
|
|
2103
|
+
onAclSuccess: ee,
|
|
2104
2104
|
onAclError: z,
|
|
2105
|
-
selectedContainers:
|
|
2106
|
-
setSelectedContainers:
|
|
2105
|
+
selectedContainers: p,
|
|
2106
|
+
setSelectedContainers: m
|
|
2107
2107
|
}),
|
|
2108
2108
|
/* @__PURE__ */ M(Oe, {
|
|
2109
2109
|
isOpen: d,
|
|
@@ -2111,7 +2111,7 @@ var me = (e, t) => ({
|
|
|
2111
2111
|
onClose: () => f(!1),
|
|
2112
2112
|
onComplete: H
|
|
2113
2113
|
}),
|
|
2114
|
-
g && /* @__PURE__ */ M(
|
|
2114
|
+
g && /* @__PURE__ */ M(o, {
|
|
2115
2115
|
...g,
|
|
2116
2116
|
className: "border-theme-light fixed top-5 right-5 z-50 rounded-lg border shadow-lg"
|
|
2117
2117
|
})
|
|
@@ -2127,142 +2127,142 @@ var me = (e, t) => ({
|
|
|
2127
2127
|
".mrap",
|
|
2128
2128
|
"--x-s3",
|
|
2129
2129
|
"--table-s3"
|
|
2130
|
-
], Pe = ({ isOpen:
|
|
2131
|
-
let { i18n:
|
|
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
2132
|
onSuccess: () => {
|
|
2133
|
-
|
|
2134
|
-
let e =
|
|
2135
|
-
|
|
2133
|
+
f.storage.ceph.containers.list.invalidate();
|
|
2134
|
+
let e = s.trim();
|
|
2135
|
+
n?.(e);
|
|
2136
2136
|
},
|
|
2137
2137
|
onError: (e) => {
|
|
2138
|
-
|
|
2138
|
+
r?.(s.trim(), e.message);
|
|
2139
2139
|
},
|
|
2140
2140
|
onSettled: () => {
|
|
2141
|
-
|
|
2141
|
+
m();
|
|
2142
2142
|
}
|
|
2143
|
-
}),
|
|
2144
|
-
|
|
2145
|
-
},
|
|
2143
|
+
}), m = () => {
|
|
2144
|
+
c(""), d(null), p.reset(), t();
|
|
2145
|
+
}, h = (e) => {
|
|
2146
2146
|
let t = e.trim();
|
|
2147
|
-
if (!t) return
|
|
2148
|
-
if (t.length < 3) return
|
|
2149
|
-
if (t.length > 63) return
|
|
2150
|
-
if (!Ae.test(t)) return
|
|
2151
|
-
if (!/^[a-z0-9]/.test(t) || !/[a-z0-9]$/.test(t)) return
|
|
2152
|
-
if (t.includes("..")) return
|
|
2153
|
-
if (je.test(t)) return
|
|
2154
|
-
for (let e of Me) if (t.startsWith(e)) return
|
|
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
2155
|
id: "B2SpR8",
|
|
2156
2156
|
values: { prefix: e }
|
|
2157
2157
|
})), !1;
|
|
2158
|
-
for (let e of Ne) if (t.endsWith(e)) return
|
|
2158
|
+
for (let e of Ne) if (t.endsWith(e)) return d(i._({
|
|
2159
2159
|
id: "QRlXaL",
|
|
2160
2160
|
values: { suffix: e }
|
|
2161
2161
|
})), !1;
|
|
2162
|
-
return
|
|
2163
|
-
},
|
|
2162
|
+
return d(null), !0;
|
|
2163
|
+
}, g = (e) => {
|
|
2164
2164
|
let t = e.target.value;
|
|
2165
|
-
|
|
2166
|
-
},
|
|
2167
|
-
|
|
2168
|
-
project_id:
|
|
2169
|
-
bucketName:
|
|
2165
|
+
c(t), l && h(t);
|
|
2166
|
+
}, _ = () => {
|
|
2167
|
+
h(s) && p.mutate({
|
|
2168
|
+
project_id: o,
|
|
2169
|
+
bucketName: s.trim()
|
|
2170
2170
|
});
|
|
2171
2171
|
};
|
|
2172
|
-
return
|
|
2173
|
-
title:
|
|
2174
|
-
open:
|
|
2175
|
-
onCancel:
|
|
2176
|
-
confirmButtonLabel:
|
|
2177
|
-
onConfirm:
|
|
2178
|
-
cancelButtonLabel:
|
|
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
2179
|
size: "small",
|
|
2180
|
-
disableConfirmButton:
|
|
2181
|
-
children: /* @__PURE__ */ N(
|
|
2180
|
+
disableConfirmButton: p.isPending || !s.trim(),
|
|
2181
|
+
children: /* @__PURE__ */ N(b, {
|
|
2182
2182
|
direction: "vertical",
|
|
2183
2183
|
gap: "6",
|
|
2184
|
-
children: [/* @__PURE__ */ M(
|
|
2184
|
+
children: [/* @__PURE__ */ M(S, {
|
|
2185
2185
|
variant: "info",
|
|
2186
2186
|
children: /* @__PURE__ */ M(B, { id: "ASJMIw" })
|
|
2187
|
-
}), /* @__PURE__ */ M(
|
|
2188
|
-
label:
|
|
2187
|
+
}), /* @__PURE__ */ M(u, {
|
|
2188
|
+
label: i._({ id: "NNpgo3" }),
|
|
2189
2189
|
required: !0,
|
|
2190
|
-
value:
|
|
2191
|
-
onChange:
|
|
2190
|
+
value: s,
|
|
2191
|
+
onChange: g,
|
|
2192
2192
|
onKeyDown: (e) => {
|
|
2193
|
-
e.key === "Enter" &&
|
|
2193
|
+
e.key === "Enter" && _();
|
|
2194
2194
|
},
|
|
2195
|
-
invalid: !!
|
|
2196
|
-
errortext:
|
|
2197
|
-
disabled:
|
|
2195
|
+
invalid: !!l,
|
|
2196
|
+
errortext: l || void 0,
|
|
2197
|
+
disabled: p.isPending,
|
|
2198
2198
|
autoFocus: !0,
|
|
2199
|
-
placeholder:
|
|
2199
|
+
placeholder: i._({ id: "yDHGP+" })
|
|
2200
2200
|
})]
|
|
2201
2201
|
})
|
|
2202
2202
|
}) : null;
|
|
2203
|
-
}, Fe = ({ isOpen:
|
|
2204
|
-
let { i18n:
|
|
2205
|
-
|
|
2206
|
-
|
|
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
2207
|
});
|
|
2208
|
-
},
|
|
2209
|
-
g.storage.ceph.containers.list.invalidate(),
|
|
2210
|
-
} }),
|
|
2211
|
-
|
|
2212
|
-
},
|
|
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
2213
|
let t = e.target.value;
|
|
2214
|
-
|
|
2214
|
+
l(t), d && f(null);
|
|
2215
2215
|
}, w = () => {
|
|
2216
|
-
if (!
|
|
2217
|
-
if (
|
|
2218
|
-
|
|
2216
|
+
if (!t) return;
|
|
2217
|
+
if (c.trim() !== t.name) {
|
|
2218
|
+
f(a._({ id: "wxVsr5" }));
|
|
2219
2219
|
return;
|
|
2220
2220
|
}
|
|
2221
|
-
let e =
|
|
2222
|
-
|
|
2223
|
-
project_id:
|
|
2221
|
+
let e = t.name;
|
|
2222
|
+
v.mutate({
|
|
2223
|
+
project_id: s,
|
|
2224
2224
|
containerName: e
|
|
2225
2225
|
}, {
|
|
2226
2226
|
onSuccess: (t) => {
|
|
2227
|
-
|
|
2227
|
+
r?.(e, t);
|
|
2228
2228
|
},
|
|
2229
2229
|
onError: (t) => {
|
|
2230
|
-
|
|
2230
|
+
i?.(e, t.message);
|
|
2231
2231
|
}
|
|
2232
2232
|
});
|
|
2233
2233
|
}, E = (e) => {
|
|
2234
2234
|
e.key === "Enter" && w();
|
|
2235
2235
|
};
|
|
2236
|
-
if (!
|
|
2237
|
-
let D =
|
|
2238
|
-
return /* @__PURE__ */ M(
|
|
2239
|
-
title:
|
|
2240
|
-
open:
|
|
2241
|
-
onCancel:
|
|
2242
|
-
confirmButtonLabel: D ?
|
|
2243
|
-
onConfirm: D ?
|
|
2244
|
-
cancelButtonLabel: D ? void 0 :
|
|
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
2245
|
size: "small",
|
|
2246
|
-
disableConfirmButton:
|
|
2247
|
-
children: D ? /* @__PURE__ */ M(
|
|
2246
|
+
disableConfirmButton: v.isPending || !D && c.trim() !== t.name,
|
|
2247
|
+
children: D ? /* @__PURE__ */ M(S, {
|
|
2248
2248
|
variant: "info",
|
|
2249
2249
|
children: /* @__PURE__ */ M(B, { id: "tL9it8" })
|
|
2250
|
-
}) : /* @__PURE__ */ N(
|
|
2250
|
+
}) : /* @__PURE__ */ N(b, {
|
|
2251
2251
|
direction: "vertical",
|
|
2252
2252
|
gap: "6",
|
|
2253
2253
|
children: [
|
|
2254
|
-
/* @__PURE__ */ M(
|
|
2254
|
+
/* @__PURE__ */ M(S, {
|
|
2255
2255
|
variant: "warning",
|
|
2256
2256
|
children: /* @__PURE__ */ M(B, {
|
|
2257
2257
|
id: "8HrqL8",
|
|
2258
2258
|
values: {
|
|
2259
2259
|
bucketCount: O,
|
|
2260
|
-
bucketName:
|
|
2260
|
+
bucketName: A
|
|
2261
2261
|
},
|
|
2262
2262
|
components: { 0: /* @__PURE__ */ M("strong", {}) }
|
|
2263
2263
|
})
|
|
2264
2264
|
}),
|
|
2265
|
-
/* @__PURE__ */ N(
|
|
2265
|
+
/* @__PURE__ */ N(b, {
|
|
2266
2266
|
direction: "vertical",
|
|
2267
2267
|
gap: "2",
|
|
2268
2268
|
children: [/* @__PURE__ */ N("div", {
|
|
@@ -2270,108 +2270,108 @@ var me = (e, t) => ({
|
|
|
2270
2270
|
children: [/* @__PURE__ */ M("span", {
|
|
2271
2271
|
className: "text-juno-grey-light-1 text-sm",
|
|
2272
2272
|
children: /* @__PURE__ */ M(B, { id: "FrLdVI" })
|
|
2273
|
-
}), /* @__PURE__ */ M(
|
|
2273
|
+
}), /* @__PURE__ */ M(h, {
|
|
2274
2274
|
size: "small",
|
|
2275
2275
|
variant: "subdued",
|
|
2276
2276
|
onClick: _,
|
|
2277
|
-
icon:
|
|
2278
|
-
label:
|
|
2277
|
+
icon: p ? "check" : "contentCopy",
|
|
2278
|
+
label: p ? a._({ id: "6V3Ea3" }) : a._({ id: "he3ygx" })
|
|
2279
2279
|
})]
|
|
2280
2280
|
}), /* @__PURE__ */ M("div", {
|
|
2281
2281
|
className: "bg-juno-grey-blue-10 rounded p-2 font-mono text-sm",
|
|
2282
|
-
children:
|
|
2282
|
+
children: t.name
|
|
2283
2283
|
})]
|
|
2284
2284
|
}),
|
|
2285
|
-
/* @__PURE__ */ M(
|
|
2286
|
-
label:
|
|
2285
|
+
/* @__PURE__ */ M(u, {
|
|
2286
|
+
label: a._({ id: "dEHa3L" }),
|
|
2287
2287
|
required: !0,
|
|
2288
|
-
value:
|
|
2289
|
-
onChange:
|
|
2288
|
+
value: c,
|
|
2289
|
+
onChange: C,
|
|
2290
2290
|
onKeyDown: E,
|
|
2291
|
-
invalid: !!
|
|
2292
|
-
errortext:
|
|
2293
|
-
disabled:
|
|
2294
|
-
placeholder:
|
|
2291
|
+
invalid: !!d,
|
|
2292
|
+
errortext: d || void 0,
|
|
2293
|
+
disabled: v.isPending,
|
|
2294
|
+
placeholder: t.name,
|
|
2295
2295
|
autoFocus: !0
|
|
2296
2296
|
})
|
|
2297
2297
|
]
|
|
2298
2298
|
})
|
|
2299
2299
|
});
|
|
2300
|
-
}, Ie = ({ isOpen:
|
|
2301
|
-
let { i18n:
|
|
2302
|
-
|
|
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
2303
|
g(!0), setTimeout(() => g(!1), 2e3);
|
|
2304
2304
|
});
|
|
2305
|
-
},
|
|
2306
|
-
project_id:
|
|
2307
|
-
containerName:
|
|
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
2308
|
maxKeys: 1
|
|
2309
|
-
}, { enabled:
|
|
2310
|
-
|
|
2309
|
+
}, { enabled: e && t !== null }), E = T.storage.ceph.containers.delete.useMutation({ onSettled: () => {
|
|
2310
|
+
v.storage.ceph.containers.list.invalidate(), D();
|
|
2311
2311
|
} });
|
|
2312
2312
|
I(() => {
|
|
2313
|
-
|
|
2314
|
-
}, [
|
|
2313
|
+
e || (d(""), p(null), E.reset());
|
|
2314
|
+
}, [e, t?.name]);
|
|
2315
2315
|
let D = () => {
|
|
2316
|
-
|
|
2316
|
+
d(""), p(null), E.reset(), n();
|
|
2317
2317
|
}, O = (e) => {
|
|
2318
2318
|
let t = e.target.value;
|
|
2319
|
-
|
|
2320
|
-
},
|
|
2321
|
-
if (!
|
|
2322
|
-
if (
|
|
2323
|
-
|
|
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
2324
|
return;
|
|
2325
2325
|
}
|
|
2326
|
-
let e =
|
|
2326
|
+
let e = t.name;
|
|
2327
2327
|
E.mutate({
|
|
2328
|
-
project_id:
|
|
2328
|
+
project_id: s,
|
|
2329
2329
|
bucketName: e
|
|
2330
2330
|
}, {
|
|
2331
2331
|
onSuccess: () => {
|
|
2332
|
-
|
|
2332
|
+
r?.(e);
|
|
2333
2333
|
},
|
|
2334
2334
|
onError: (t) => {
|
|
2335
|
-
|
|
2335
|
+
i?.(e, t.message);
|
|
2336
2336
|
}
|
|
2337
2337
|
});
|
|
2338
2338
|
}, P = (e) => {
|
|
2339
|
-
e.key === "Enter" &&
|
|
2339
|
+
e.key === "Enter" && A();
|
|
2340
2340
|
};
|
|
2341
|
-
if (!
|
|
2342
|
-
let F =
|
|
2343
|
-
return /* @__PURE__ */ M(
|
|
2344
|
-
title:
|
|
2345
|
-
open:
|
|
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
2346
|
onCancel: D,
|
|
2347
|
-
confirmButtonLabel:
|
|
2348
|
-
onConfirm:
|
|
2349
|
-
cancelButtonLabel:
|
|
2347
|
+
confirmButtonLabel: a._({ id: "IwlPLb" }),
|
|
2348
|
+
onConfirm: A,
|
|
2349
|
+
cancelButtonLabel: a._({ id: "dEgA5A" }),
|
|
2350
2350
|
size: "small",
|
|
2351
|
-
disableConfirmButton: E.isPending ||
|
|
2352
|
-
children: /* @__PURE__ */ N(
|
|
2351
|
+
disableConfirmButton: E.isPending || C || ee || c.trim() !== t.name,
|
|
2352
|
+
children: /* @__PURE__ */ N(b, {
|
|
2353
2353
|
direction: "vertical",
|
|
2354
2354
|
gap: "6",
|
|
2355
|
-
children: [
|
|
2355
|
+
children: [C ? /* @__PURE__ */ N(b, {
|
|
2356
2356
|
direction: "horizontal",
|
|
2357
2357
|
gap: "2",
|
|
2358
2358
|
alignment: "center",
|
|
2359
|
-
children: [/* @__PURE__ */ M(
|
|
2359
|
+
children: [/* @__PURE__ */ M(l, {}), /* @__PURE__ */ M("span", {
|
|
2360
2360
|
className: "text-juno-grey-light-1 text-sm",
|
|
2361
2361
|
children: /* @__PURE__ */ M(B, { id: "rPuPb+" })
|
|
2362
2362
|
})]
|
|
2363
|
-
}) :
|
|
2363
|
+
}) : ee ? /* @__PURE__ */ M(S, {
|
|
2364
2364
|
variant: "error",
|
|
2365
2365
|
children: /* @__PURE__ */ M(B, {
|
|
2366
2366
|
id: "50Piuj",
|
|
2367
2367
|
values: { actualObjectCount: F }
|
|
2368
2368
|
})
|
|
2369
2369
|
}) : /* @__PURE__ */ N(j, { children: [
|
|
2370
|
-
/* @__PURE__ */ M(
|
|
2370
|
+
/* @__PURE__ */ M(S, {
|
|
2371
2371
|
variant: "warning",
|
|
2372
2372
|
children: /* @__PURE__ */ M(B, { id: "/pOQrn" })
|
|
2373
2373
|
}),
|
|
2374
|
-
/* @__PURE__ */ N(
|
|
2374
|
+
/* @__PURE__ */ N(b, {
|
|
2375
2375
|
direction: "vertical",
|
|
2376
2376
|
gap: "2",
|
|
2377
2377
|
children: [/* @__PURE__ */ N("div", {
|
|
@@ -2379,40 +2379,40 @@ var me = (e, t) => ({
|
|
|
2379
2379
|
children: [/* @__PURE__ */ M("span", {
|
|
2380
2380
|
className: "text-juno-grey-light-1 text-sm",
|
|
2381
2381
|
children: /* @__PURE__ */ M(B, { id: "No++00" })
|
|
2382
|
-
}), /* @__PURE__ */ M(
|
|
2382
|
+
}), /* @__PURE__ */ M(h, {
|
|
2383
2383
|
size: "small",
|
|
2384
2384
|
variant: "subdued",
|
|
2385
2385
|
onClick: _,
|
|
2386
|
-
icon:
|
|
2387
|
-
label:
|
|
2386
|
+
icon: m ? "check" : "contentCopy",
|
|
2387
|
+
label: m ? a._({ id: "6V3Ea3" }) : a._({ id: "he3ygx" })
|
|
2388
2388
|
})]
|
|
2389
2389
|
}), /* @__PURE__ */ M("div", {
|
|
2390
2390
|
className: "bg-juno-grey-blue-10 rounded p-2 font-mono text-sm",
|
|
2391
|
-
children:
|
|
2391
|
+
children: t.name
|
|
2392
2392
|
})]
|
|
2393
2393
|
}),
|
|
2394
|
-
/* @__PURE__ */ M(
|
|
2395
|
-
label:
|
|
2394
|
+
/* @__PURE__ */ M(u, {
|
|
2395
|
+
label: a._({ id: "dEHa3L" }),
|
|
2396
2396
|
required: !0,
|
|
2397
|
-
value:
|
|
2397
|
+
value: c,
|
|
2398
2398
|
onChange: O,
|
|
2399
2399
|
onKeyDown: P,
|
|
2400
|
-
invalid: !!
|
|
2401
|
-
errortext:
|
|
2400
|
+
invalid: !!f,
|
|
2401
|
+
errortext: f || void 0,
|
|
2402
2402
|
disabled: E.isPending,
|
|
2403
|
-
placeholder:
|
|
2403
|
+
placeholder: t.name
|
|
2404
2404
|
})
|
|
2405
|
-
] }), w && /* @__PURE__ */ M(
|
|
2405
|
+
] }), w && /* @__PURE__ */ M(S, {
|
|
2406
2406
|
variant: "error",
|
|
2407
2407
|
children: /* @__PURE__ */ M(B, {
|
|
2408
2408
|
id: "MJLqeY",
|
|
2409
|
-
values: { errorMessage:
|
|
2409
|
+
values: { errorMessage: R }
|
|
2410
2410
|
})
|
|
2411
2411
|
})]
|
|
2412
2412
|
})
|
|
2413
2413
|
});
|
|
2414
|
-
}, Le = ({ containers: e, createModalOpen:
|
|
2415
|
-
let { projectId: v, provider: y } = z({ strict: !1 }), { i18n: b, _: x } = V(), S =
|
|
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
2416
|
I(() => {
|
|
2417
2417
|
C.current && E(C.current.offsetWidth - C.current.clientWidth);
|
|
2418
2418
|
}, [e.length]);
|
|
@@ -2427,16 +2427,16 @@ var me = (e, t) => ({
|
|
|
2427
2427
|
getScrollElement: () => C.current,
|
|
2428
2428
|
estimateSize: () => 48,
|
|
2429
2429
|
overscan: 10
|
|
2430
|
-
}), U = new Set(
|
|
2430
|
+
}), U = new Set(h), G = e.length > 0 && e.every((e) => U.has(e.name)), te = () => {
|
|
2431
2431
|
_(G ? [] : e.map((e) => e.name));
|
|
2432
2432
|
}, ne = (e) => {
|
|
2433
|
-
|
|
2433
|
+
h.includes(e) ? _(h.filter((t) => t !== e)) : _([...h, e]);
|
|
2434
2434
|
};
|
|
2435
|
-
if (!e || e.length === 0) return /* @__PURE__ */ M(
|
|
2435
|
+
if (!e || e.length === 0) return /* @__PURE__ */ M(d, {
|
|
2436
2436
|
columns: 4,
|
|
2437
2437
|
className: "containers",
|
|
2438
2438
|
"data-testid": "no-containers",
|
|
2439
|
-
children: /* @__PURE__ */ M(
|
|
2439
|
+
children: /* @__PURE__ */ M(a, { children: /* @__PURE__ */ M(s, {
|
|
2440
2440
|
colSpan: 4,
|
|
2441
2441
|
children: /* @__PURE__ */ N("div", {
|
|
2442
2442
|
className: "py-8 text-center",
|
|
@@ -2457,22 +2457,22 @@ var me = (e, t) => ({
|
|
|
2457
2457
|
children: [
|
|
2458
2458
|
/* @__PURE__ */ M("div", {
|
|
2459
2459
|
style: { paddingRight: `${T}px` },
|
|
2460
|
-
children: /* @__PURE__ */ M(
|
|
2460
|
+
children: /* @__PURE__ */ M(d, {
|
|
2461
2461
|
columns: 6,
|
|
2462
2462
|
gridColumnTemplate: K,
|
|
2463
2463
|
className: "containers",
|
|
2464
2464
|
"data-testid": "containers-table-header",
|
|
2465
|
-
children: /* @__PURE__ */ N(
|
|
2466
|
-
/* @__PURE__ */ M(
|
|
2465
|
+
children: /* @__PURE__ */ N(a, { children: [
|
|
2466
|
+
/* @__PURE__ */ M(i, { children: /* @__PURE__ */ M(w, {
|
|
2467
2467
|
checked: G,
|
|
2468
2468
|
onChange: te,
|
|
2469
2469
|
"data-testid": "select-all-containers"
|
|
2470
2470
|
}) }),
|
|
2471
|
-
/* @__PURE__ */ M(
|
|
2472
|
-
/* @__PURE__ */ M(
|
|
2473
|
-
/* @__PURE__ */ M(
|
|
2474
|
-
/* @__PURE__ */ M(
|
|
2475
|
-
/* @__PURE__ */ M(
|
|
2471
|
+
/* @__PURE__ */ M(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
2476
|
] })
|
|
2477
2477
|
})
|
|
2478
2478
|
}),
|
|
@@ -2487,17 +2487,17 @@ var me = (e, t) => ({
|
|
|
2487
2487
|
width: "100%",
|
|
2488
2488
|
position: "relative"
|
|
2489
2489
|
},
|
|
2490
|
-
children: H.getVirtualItems().map((
|
|
2491
|
-
let
|
|
2490
|
+
children: H.getVirtualItems().map((t) => {
|
|
2491
|
+
let n = e[t.index], i = h.includes(n.name), a = () => S({
|
|
2492
2492
|
to: "/projects/$projectId/storage/$provider/containers/$containerName/objects",
|
|
2493
2493
|
params: {
|
|
2494
2494
|
projectId: v ?? "",
|
|
2495
2495
|
provider: y ?? "ceph",
|
|
2496
|
-
containerName:
|
|
2496
|
+
containerName: n.name
|
|
2497
2497
|
}
|
|
2498
2498
|
});
|
|
2499
2499
|
return /* @__PURE__ */ N("div", {
|
|
2500
|
-
"data-index":
|
|
2500
|
+
"data-index": t.index,
|
|
2501
2501
|
ref: H.measureElement,
|
|
2502
2502
|
className: "juno-datagrid group hover:bg-theme-background-lvl-1 cursor-pointer",
|
|
2503
2503
|
style: {
|
|
@@ -2505,55 +2505,55 @@ var me = (e, t) => ({
|
|
|
2505
2505
|
top: 0,
|
|
2506
2506
|
left: 0,
|
|
2507
2507
|
width: "100%",
|
|
2508
|
-
transform: `translateY(${
|
|
2508
|
+
transform: `translateY(${t.start}px)`,
|
|
2509
2509
|
display: "grid",
|
|
2510
2510
|
gridTemplateColumns: K,
|
|
2511
2511
|
alignItems: "stretch"
|
|
2512
2512
|
},
|
|
2513
|
-
"data-testid": `container-row-${
|
|
2513
|
+
"data-testid": `container-row-${n.name}`,
|
|
2514
2514
|
role: "link",
|
|
2515
2515
|
tabIndex: 0,
|
|
2516
|
-
onClick:
|
|
2516
|
+
onClick: a,
|
|
2517
2517
|
onKeyDown: (e) => {
|
|
2518
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
2518
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
2519
2519
|
},
|
|
2520
2520
|
children: [
|
|
2521
|
-
/* @__PURE__ */ M(
|
|
2521
|
+
/* @__PURE__ */ M(s, {
|
|
2522
2522
|
onClick: (e) => e.stopPropagation(),
|
|
2523
2523
|
onKeyDown: (e) => {
|
|
2524
2524
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
2525
2525
|
},
|
|
2526
|
-
children: /* @__PURE__ */ M(
|
|
2527
|
-
checked:
|
|
2528
|
-
onChange: () => ne(
|
|
2529
|
-
"data-testid": `select-container-${
|
|
2526
|
+
children: /* @__PURE__ */ M(w, {
|
|
2527
|
+
checked: i,
|
|
2528
|
+
onChange: () => ne(n.name),
|
|
2529
|
+
"data-testid": `select-container-${n.name}`
|
|
2530
2530
|
})
|
|
2531
2531
|
}),
|
|
2532
|
-
/* @__PURE__ */ M(
|
|
2532
|
+
/* @__PURE__ */ M(s, {
|
|
2533
2533
|
className: "min-w-0 overflow-hidden",
|
|
2534
2534
|
children: /* @__PURE__ */ M("span", {
|
|
2535
2535
|
className: "block truncate",
|
|
2536
|
-
title:
|
|
2537
|
-
children:
|
|
2536
|
+
title: n.name,
|
|
2537
|
+
children: n.name
|
|
2538
2538
|
})
|
|
2539
2539
|
}),
|
|
2540
|
-
/* @__PURE__ */ M(
|
|
2541
|
-
/* @__PURE__ */ M(
|
|
2542
|
-
/* @__PURE__ */ M(
|
|
2543
|
-
/* @__PURE__ */ M(
|
|
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
2544
|
onClick: (e) => e.stopPropagation(),
|
|
2545
|
-
children: /* @__PURE__ */ M(
|
|
2545
|
+
children: /* @__PURE__ */ M(g, { children: /* @__PURE__ */ N(r, { children: [/* @__PURE__ */ M(f, {
|
|
2546
2546
|
label: b._({ id: "N2S1rs" }),
|
|
2547
|
-
onClick: () =>
|
|
2548
|
-
"data-testid": `empty-action-${
|
|
2547
|
+
onClick: () => k(n),
|
|
2548
|
+
"data-testid": `empty-action-${n.name}`
|
|
2549
2549
|
}), /* @__PURE__ */ M(f, {
|
|
2550
2550
|
label: b._({ id: "cnGeoo" }),
|
|
2551
|
-
onClick: () => P(
|
|
2552
|
-
"data-testid": `delete-action-${
|
|
2551
|
+
onClick: () => P(n),
|
|
2552
|
+
"data-testid": `delete-action-${n.name}`
|
|
2553
2553
|
})] }) })
|
|
2554
2554
|
})
|
|
2555
2555
|
]
|
|
2556
|
-
},
|
|
2556
|
+
}, n.name);
|
|
2557
2557
|
})
|
|
2558
2558
|
})
|
|
2559
2559
|
}),
|
|
@@ -2570,16 +2570,16 @@ var me = (e, t) => ({
|
|
|
2570
2570
|
]
|
|
2571
2571
|
}),
|
|
2572
2572
|
/* @__PURE__ */ M(Pe, {
|
|
2573
|
-
isOpen:
|
|
2574
|
-
onClose: () =>
|
|
2575
|
-
onSuccess:
|
|
2576
|
-
onError:
|
|
2573
|
+
isOpen: t,
|
|
2574
|
+
onClose: () => n(!1),
|
|
2575
|
+
onSuccess: o,
|
|
2576
|
+
onError: c
|
|
2577
2577
|
}),
|
|
2578
2578
|
/* @__PURE__ */ M(Fe, {
|
|
2579
2579
|
isOpen: D !== null,
|
|
2580
2580
|
bucket: D,
|
|
2581
|
-
onClose: () =>
|
|
2582
|
-
onSuccess:
|
|
2581
|
+
onClose: () => k(null),
|
|
2582
|
+
onSuccess: l,
|
|
2583
2583
|
onError: u
|
|
2584
2584
|
}),
|
|
2585
2585
|
/* @__PURE__ */ M(Ie, {
|
|
@@ -2587,19 +2587,19 @@ var me = (e, t) => ({
|
|
|
2587
2587
|
bucket: A,
|
|
2588
2588
|
onClose: () => P(null),
|
|
2589
2589
|
onSuccess: p,
|
|
2590
|
-
onError:
|
|
2590
|
+
onError: m
|
|
2591
2591
|
})
|
|
2592
2592
|
] });
|
|
2593
2593
|
};
|
|
2594
2594
|
//#endregion
|
|
2595
2595
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Containers/ContainerToastNotifications.tsx
|
|
2596
|
-
function Re({ title:
|
|
2597
|
-
return /* @__PURE__ */ N(
|
|
2596
|
+
function Re({ title: e, description: t }) {
|
|
2597
|
+
return /* @__PURE__ */ N(b, {
|
|
2598
2598
|
direction: "vertical",
|
|
2599
2599
|
gap: "1.5",
|
|
2600
|
-
children: [/* @__PURE__ */ M("span", { children:
|
|
2600
|
+
children: [/* @__PURE__ */ M("span", { children: e }), /* @__PURE__ */ M("span", {
|
|
2601
2601
|
className: "text-theme-light",
|
|
2602
|
-
children:
|
|
2602
|
+
children: t
|
|
2603
2603
|
})]
|
|
2604
2604
|
});
|
|
2605
2605
|
}
|
|
@@ -2722,78 +2722,78 @@ var ze = (e, t) => ({
|
|
|
2722
2722
|
autoDismissTimeout: r.autoDismissTimeout ?? 5e3,
|
|
2723
2723
|
onDismiss: r.onDismiss
|
|
2724
2724
|
};
|
|
2725
|
-
}, Ge = 20, Ke = ({ isOpen:
|
|
2726
|
-
let { i18n:
|
|
2727
|
-
|
|
2728
|
-
},
|
|
2729
|
-
let e = 0,
|
|
2730
|
-
for (let
|
|
2731
|
-
|
|
2732
|
-
current:
|
|
2733
|
-
total:
|
|
2725
|
+
}, Ge = 20, Ke = ({ isOpen: 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
2734
|
});
|
|
2735
|
-
let
|
|
2735
|
+
let s = t[r];
|
|
2736
2736
|
try {
|
|
2737
|
-
let
|
|
2738
|
-
project_id:
|
|
2739
|
-
containerName:
|
|
2737
|
+
let t = await d.mutateAsync({
|
|
2738
|
+
project_id: o,
|
|
2739
|
+
containerName: s.name
|
|
2740
2740
|
});
|
|
2741
|
-
|
|
2741
|
+
n += t, e++;
|
|
2742
2742
|
} catch (e) {
|
|
2743
2743
|
let t = e instanceof Error ? e.message : String(e);
|
|
2744
|
-
|
|
2744
|
+
i.push(`${s.name}: ${t}`);
|
|
2745
2745
|
}
|
|
2746
2746
|
}
|
|
2747
|
-
e > 0 && await
|
|
2747
|
+
e > 0 && await u.storage.ceph.containers.list.invalidate(), r?.({
|
|
2748
2748
|
emptiedCount: e,
|
|
2749
|
-
totalDeleted:
|
|
2750
|
-
errors:
|
|
2751
|
-
}),
|
|
2749
|
+
totalDeleted: n,
|
|
2750
|
+
errors: i
|
|
2751
|
+
}), f();
|
|
2752
2752
|
};
|
|
2753
|
-
if (!
|
|
2754
|
-
let
|
|
2755
|
-
return /* @__PURE__ */ M(
|
|
2756
|
-
title:
|
|
2757
|
-
open:
|
|
2758
|
-
onCancel:
|
|
2759
|
-
confirmButtonLabel:
|
|
2760
|
-
cancelButtonLabel:
|
|
2761
|
-
onConfirm:
|
|
2762
|
-
disableConfirmButton:
|
|
2763
|
-
disableCancelButton:
|
|
2764
|
-
disableCloseButton:
|
|
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
2765
|
size: "small",
|
|
2766
|
-
children:
|
|
2766
|
+
children: _ ? /* @__PURE__ */ N(b, {
|
|
2767
2767
|
direction: "vertical",
|
|
2768
2768
|
distribution: "center",
|
|
2769
2769
|
alignment: "center",
|
|
2770
2770
|
gap: "2",
|
|
2771
2771
|
className: "py-4",
|
|
2772
|
-
children: [/* @__PURE__ */ M(
|
|
2772
|
+
children: [/* @__PURE__ */ M(l, { variant: "primary" }), s && /* @__PURE__ */ M("p", {
|
|
2773
2773
|
className: "text-theme-light text-sm",
|
|
2774
2774
|
children: /* @__PURE__ */ M(B, {
|
|
2775
2775
|
id: "NW1XEL",
|
|
2776
2776
|
values: {
|
|
2777
|
-
progressCurrent:
|
|
2778
|
-
progressTotal:
|
|
2777
|
+
progressCurrent: v,
|
|
2778
|
+
progressTotal: y
|
|
2779
2779
|
}
|
|
2780
2780
|
})
|
|
2781
2781
|
})]
|
|
2782
|
-
}) : /* @__PURE__ */ N(
|
|
2782
|
+
}) : /* @__PURE__ */ N(b, {
|
|
2783
2783
|
direction: "vertical",
|
|
2784
2784
|
gap: "4",
|
|
2785
|
-
children: [/* @__PURE__ */ M(
|
|
2785
|
+
children: [/* @__PURE__ */ M(S, {
|
|
2786
2786
|
variant: "warning",
|
|
2787
2787
|
children: /* @__PURE__ */ M(B, {
|
|
2788
2788
|
id: "CtiFDz",
|
|
2789
|
-
values: { totalCount:
|
|
2789
|
+
values: { totalCount: m }
|
|
2790
2790
|
})
|
|
2791
2791
|
}), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
2792
2792
|
className: "text-theme-light mb-2 text-sm",
|
|
2793
2793
|
children: /* @__PURE__ */ M(B, { id: "Zshv0H" })
|
|
2794
2794
|
}), /* @__PURE__ */ N("ul", {
|
|
2795
2795
|
className: "list-inside list-disc space-y-1 text-sm",
|
|
2796
|
-
children: [
|
|
2796
|
+
children: [h.map((e) => {
|
|
2797
2797
|
let t = e.name, n = e.count;
|
|
2798
2798
|
return /* @__PURE__ */ N("li", {
|
|
2799
2799
|
className: "font-mono",
|
|
@@ -2811,18 +2811,18 @@ var ze = (e, t) => ({
|
|
|
2811
2811
|
]
|
|
2812
2812
|
})]
|
|
2813
2813
|
}, t);
|
|
2814
|
-
}),
|
|
2814
|
+
}), g > 0 && /* @__PURE__ */ M("li", {
|
|
2815
2815
|
className: "text-theme-light",
|
|
2816
2816
|
children: /* @__PURE__ */ M(B, {
|
|
2817
2817
|
id: "yqPflB",
|
|
2818
|
-
values: { hiddenCount:
|
|
2818
|
+
values: { hiddenCount: g }
|
|
2819
2819
|
})
|
|
2820
2820
|
})]
|
|
2821
2821
|
})] })]
|
|
2822
2822
|
})
|
|
2823
2823
|
});
|
|
2824
2824
|
}, qe = () => {
|
|
2825
|
-
let { i18n:
|
|
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
2826
|
_(ze(e, { onDismiss: v }));
|
|
2827
2827
|
}, x = (e, t) => {
|
|
2828
2828
|
_(Be(e, t, { onDismiss: v }));
|
|
@@ -2834,43 +2834,43 @@ var ze = (e, t) => ({
|
|
|
2834
2834
|
_(Ue(e, { onDismiss: v }));
|
|
2835
2835
|
}, D = (e, t) => {
|
|
2836
2836
|
_(We(e, t, { onDismiss: v }));
|
|
2837
|
-
},
|
|
2838
|
-
if (n.length === 0)
|
|
2837
|
+
}, O = ({ emptiedCount: e, totalDeleted: t, errors: n }) => {
|
|
2838
|
+
if (n.length === 0) m([]);
|
|
2839
2839
|
else {
|
|
2840
2840
|
let e = new Set(n.map((e) => e.split(": ")[0]));
|
|
2841
|
-
|
|
2841
|
+
m((t) => t.filter((t) => e.has(t)));
|
|
2842
2842
|
}
|
|
2843
2843
|
_($(e, t, n, { onDismiss: v }));
|
|
2844
2844
|
}, j = {
|
|
2845
2845
|
options: [
|
|
2846
2846
|
{
|
|
2847
|
-
label:
|
|
2847
|
+
label: e._({ id: "6YtxFj" }),
|
|
2848
2848
|
value: "name"
|
|
2849
2849
|
},
|
|
2850
2850
|
{
|
|
2851
|
-
label:
|
|
2851
|
+
label: e._({ id: "sxbP3b" }),
|
|
2852
2852
|
value: "count"
|
|
2853
2853
|
},
|
|
2854
2854
|
{
|
|
2855
|
-
label:
|
|
2855
|
+
label: e._({ id: "hgpMHD" }),
|
|
2856
2856
|
value: "bytes"
|
|
2857
2857
|
},
|
|
2858
2858
|
{
|
|
2859
|
-
label:
|
|
2859
|
+
label: e._({ id: "sjMCOP" }),
|
|
2860
2860
|
value: "last_modified"
|
|
2861
2861
|
}
|
|
2862
2862
|
],
|
|
2863
|
-
sortBy:
|
|
2864
|
-
sortDirection:
|
|
2865
|
-
}, { data: F, isLoading: I, error:
|
|
2866
|
-
project_id:
|
|
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
2867
|
includeMetadata: !0
|
|
2868
2868
|
}, {
|
|
2869
|
-
enabled: !!
|
|
2869
|
+
enabled: !!n,
|
|
2870
2870
|
retry: !1
|
|
2871
2871
|
}), z = ((e) => [...e].sort((e, t) => {
|
|
2872
2872
|
let n;
|
|
2873
|
-
switch (
|
|
2873
|
+
switch (i ?? "name") {
|
|
2874
2874
|
case "name":
|
|
2875
2875
|
n = e.name.localeCompare(t.name);
|
|
2876
2876
|
break;
|
|
@@ -2888,11 +2888,11 @@ var ze = (e, t) => ({
|
|
|
2888
2888
|
break;
|
|
2889
2889
|
default: n = e.name.localeCompare(t.name);
|
|
2890
2890
|
}
|
|
2891
|
-
return (
|
|
2892
|
-
}))((F || []).filter((e) => e.name.toLowerCase().includes(
|
|
2891
|
+
return (a ?? "asc") === "desc" ? -n : n;
|
|
2892
|
+
}))((F || []).filter((e) => e.name.toLowerCase().includes(s.toLowerCase()))), H = (e) => {
|
|
2893
2893
|
let t = typeof e == "string" ? e : "";
|
|
2894
2894
|
P(() => {
|
|
2895
|
-
|
|
2895
|
+
r({ search: (e) => ({
|
|
2896
2896
|
...e,
|
|
2897
2897
|
search: t || void 0
|
|
2898
2898
|
}) });
|
|
@@ -2900,55 +2900,55 @@ var ze = (e, t) => ({
|
|
|
2900
2900
|
}, U = (e) => {
|
|
2901
2901
|
let t = e.sortBy?.toString() || "name", n = e.sortDirection || "asc";
|
|
2902
2902
|
P(() => {
|
|
2903
|
-
|
|
2903
|
+
r({ search: (e) => ({
|
|
2904
2904
|
...e,
|
|
2905
2905
|
sortBy: t,
|
|
2906
2906
|
sortDirection: n
|
|
2907
2907
|
}) });
|
|
2908
2908
|
});
|
|
2909
2909
|
};
|
|
2910
|
-
if (I) return /* @__PURE__ */ N(
|
|
2910
|
+
if (I) return /* @__PURE__ */ N(b, {
|
|
2911
2911
|
className: "fixed inset-0",
|
|
2912
2912
|
distribution: "center",
|
|
2913
2913
|
alignment: "center",
|
|
2914
2914
|
direction: "vertical",
|
|
2915
|
-
children: [/* @__PURE__ */ M(
|
|
2915
|
+
children: [/* @__PURE__ */ M(l, {
|
|
2916
2916
|
variant: "primary",
|
|
2917
2917
|
size: "large",
|
|
2918
2918
|
className: "mb-2"
|
|
2919
2919
|
}), /* @__PURE__ */ M(B, { id: "c5i+X0" })]
|
|
2920
2920
|
});
|
|
2921
|
-
if (
|
|
2922
|
-
let
|
|
2923
|
-
return /* @__PURE__ */ M(
|
|
2921
|
+
if (ee) {
|
|
2922
|
+
let e = ee.message;
|
|
2923
|
+
return /* @__PURE__ */ M(b, {
|
|
2924
2924
|
className: "fixed inset-0",
|
|
2925
2925
|
distribution: "center",
|
|
2926
2926
|
alignment: "center",
|
|
2927
2927
|
direction: "vertical",
|
|
2928
2928
|
children: /* @__PURE__ */ M(B, {
|
|
2929
2929
|
id: "JofLr3",
|
|
2930
|
-
values: { errorMessage:
|
|
2930
|
+
values: { errorMessage: e }
|
|
2931
2931
|
})
|
|
2932
2932
|
});
|
|
2933
2933
|
}
|
|
2934
|
-
let W = (F || []).filter((e) =>
|
|
2934
|
+
let W = (F || []).filter((e) => p.includes(e.name)), G = W.length > 0, te = W.length;
|
|
2935
2935
|
return /* @__PURE__ */ N("div", {
|
|
2936
2936
|
className: "relative",
|
|
2937
2937
|
children: [
|
|
2938
|
-
/* @__PURE__ */ M(
|
|
2938
|
+
/* @__PURE__ */ M(A, {
|
|
2939
2939
|
sortSettings: j,
|
|
2940
|
-
searchTerm:
|
|
2940
|
+
searchTerm: s,
|
|
2941
2941
|
onSort: U,
|
|
2942
2942
|
onSearch: H,
|
|
2943
|
-
actions: /* @__PURE__ */ N(
|
|
2943
|
+
actions: /* @__PURE__ */ N(b, {
|
|
2944
2944
|
direction: "horizontal",
|
|
2945
2945
|
gap: "4",
|
|
2946
2946
|
alignment: "center",
|
|
2947
|
-
children: [/* @__PURE__ */ M(
|
|
2947
|
+
children: [/* @__PURE__ */ M(h, {
|
|
2948
2948
|
variant: "primary",
|
|
2949
2949
|
onClick: () => u(!0),
|
|
2950
2950
|
children: /* @__PURE__ */ M(B, { id: "HiDAFk" })
|
|
2951
|
-
}), /* @__PURE__ */ M(
|
|
2951
|
+
}), /* @__PURE__ */ M(h, {
|
|
2952
2952
|
variant: "primary-danger",
|
|
2953
2953
|
onClick: () => f(!0),
|
|
2954
2954
|
disabled: !G,
|
|
@@ -2961,24 +2961,24 @@ var ze = (e, t) => ({
|
|
|
2961
2961
|
}),
|
|
2962
2962
|
/* @__PURE__ */ M(Le, {
|
|
2963
2963
|
containers: z,
|
|
2964
|
-
createModalOpen:
|
|
2964
|
+
createModalOpen: c,
|
|
2965
2965
|
setCreateModalOpen: u,
|
|
2966
|
-
onCreateSuccess:
|
|
2966
|
+
onCreateSuccess: y,
|
|
2967
2967
|
onCreateError: x,
|
|
2968
2968
|
onEmptySuccess: S,
|
|
2969
2969
|
onEmptyError: C,
|
|
2970
2970
|
onDeleteSuccess: w,
|
|
2971
2971
|
onDeleteError: D,
|
|
2972
|
-
selectedContainers:
|
|
2973
|
-
setSelectedContainers:
|
|
2972
|
+
selectedContainers: p,
|
|
2973
|
+
setSelectedContainers: m
|
|
2974
2974
|
}),
|
|
2975
2975
|
/* @__PURE__ */ M(Ke, {
|
|
2976
2976
|
isOpen: d,
|
|
2977
2977
|
buckets: W,
|
|
2978
2978
|
onClose: () => f(!1),
|
|
2979
|
-
onComplete:
|
|
2979
|
+
onComplete: O
|
|
2980
2980
|
}),
|
|
2981
|
-
g && /* @__PURE__ */ M(
|
|
2981
|
+
g && /* @__PURE__ */ M(o, {
|
|
2982
2982
|
...g,
|
|
2983
2983
|
className: "border-theme-light fixed top-5 right-5 z-50 rounded-lg border shadow-lg"
|
|
2984
2984
|
})
|
|
@@ -3028,4 +3028,4 @@ var Ye = () => /* @__PURE__ */ M(Je, {});
|
|
|
3028
3028
|
//#endregion
|
|
3029
3029
|
export { Ye as component };
|
|
3030
3030
|
|
|
3031
|
-
//# sourceMappingURL=containers-
|
|
3031
|
+
//# sourceMappingURL=containers-BuXUVb1N.mjs.map
|