@cobaltcore-dev/aurora 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/BucketToastNotifications-D2Cq2VrV.mjs +613 -0
- package/dist/client/BucketToastNotifications-D2Cq2VrV.mjs.map +1 -0
- package/dist/client/{_storageType-5VdpF4Wu.mjs → _storageType-B1iNA96q.mjs} +2 -2
- package/dist/client/{_storageType-5VdpF4Wu.mjs.map → _storageType-B1iNA96q.mjs.map} +1 -1
- package/dist/client/{_storageType-BIMQazHh.mjs → _storageType-Dh6osG7k.mjs} +844 -848
- package/dist/client/_storageType-Dh6osG7k.mjs.map +1 -0
- package/dist/client/index.js +4 -4
- package/dist/client/index.js.map +1 -1
- package/dist/client/{objects-gNSKHCsp.mjs → objects--igvFrFM.mjs} +4 -4
- package/dist/client/{objects-gNSKHCsp.mjs.map → objects--igvFrFM.mjs.map} +1 -1
- package/dist/client/{objects-DjDr_S5Q.mjs → objects-BdS0ac84.mjs} +2184 -2105
- package/dist/client/objects-BdS0ac84.mjs.map +1 -0
- package/dist/client/objects-o2Cj_ndZ.mjs.map +1 -1
- package/dist/server/index.d.ts +6 -0
- package/dist/server/index.js +20 -6
- package/package.json +3 -3
- package/dist/client/BucketToastNotifications-CxQ0_Spa.mjs +0 -562
- package/dist/client/BucketToastNotifications-CxQ0_Spa.mjs.map +0 -1
- package/dist/client/_storageType-BIMQazHh.mjs.map +0 -1
- package/dist/client/objects-DjDr_S5Q.mjs.map +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { $ as e, A as t, B as n, D as r, E as i, F as a, G as o, K as s, L as c, N as l, P as u, R as d, U as f, X as p, at as m, ct as h, et as g, f as _, g as v, l as y, lt as b, n as x, ot as S, q as C, r as w, rt as T, s as E, st as D, tt as O, ut as k, w as A, y as j } from "./build-DgeVmENN.mjs";
|
|
2
2
|
import { r as M } from "./trpcClient-Dy_MP_Pv.mjs";
|
|
3
|
-
import { t as N } from "./_storageType-
|
|
3
|
+
import { t as N } from "./_storageType-B1iNA96q.mjs";
|
|
4
4
|
import { t as P } from "./ContentHeader-BIScbvb4.mjs";
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { useNavigate as
|
|
5
|
+
import { t as F } from "./SortInput-DjaEHvcO.mjs";
|
|
6
|
+
import { t as I } from "./formatBytes-CZv_XyCY.mjs";
|
|
7
|
+
import { t as L } from "./useProjectId-DBc5lpoU.mjs";
|
|
8
|
+
import { _ as ee, a as R, i as te, l as ne, n as re, o as z, r as ie, t as ae, v as B, x as V } from "./BucketToastNotifications-D2Cq2VrV.mjs";
|
|
9
|
+
import { Fragment as oe, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
10
|
+
import { Fragment as se, startTransition as ce, useCallback as le, useEffect as ue, useRef as de, useState as W } from "react";
|
|
11
|
+
import { useNavigate as fe, useParams as pe } from "@tanstack/react-router";
|
|
12
12
|
import { Trans as G, useLingui as K } from "@lingui/react";
|
|
13
13
|
import { i18n as q } from "@lingui/core";
|
|
14
|
-
import { ErrorBoundary as
|
|
15
|
-
import { useVirtualizer as
|
|
14
|
+
import { ErrorBoundary as me } from "react-error-boundary";
|
|
15
|
+
import { useVirtualizer as he } from "@tanstack/react-virtual";
|
|
16
16
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/CreateContainerModal.tsx
|
|
17
|
-
var
|
|
18
|
-
let { i18n: a, _: o } = K(), s =
|
|
17
|
+
var ge = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLength: i = 256 }) => {
|
|
18
|
+
let { i18n: a, _: o } = K(), s = L(), [c, l] = W(""), [u, d] = W(null), p = M.useUtils(), m = M.storage.swift.createContainer.useMutation({
|
|
19
19
|
onSuccess: () => {
|
|
20
20
|
p.storage.swift.listContainers.invalidate();
|
|
21
21
|
let e = c.trim();
|
|
@@ -41,7 +41,7 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
41
41
|
container: c.trim()
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
|
-
return e ? /*#__PURE__*/
|
|
44
|
+
return e ? /*#__PURE__*/ H(w, {
|
|
45
45
|
title: a._({ id: "vTh35P" }),
|
|
46
46
|
open: e,
|
|
47
47
|
onCancel: h,
|
|
@@ -50,13 +50,13 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
50
50
|
cancelButtonLabel: a._({ id: "dEgA5A" }),
|
|
51
51
|
size: "small",
|
|
52
52
|
disableConfirmButton: m.isPending || !c.trim(),
|
|
53
|
-
children: /*#__PURE__*/
|
|
53
|
+
children: /*#__PURE__*/ U(O, {
|
|
54
54
|
direction: "vertical",
|
|
55
55
|
gap: "6",
|
|
56
|
-
children: [/*#__PURE__*/
|
|
56
|
+
children: [/*#__PURE__*/ H("p", {
|
|
57
57
|
className: "text-theme-default",
|
|
58
|
-
children: /*#__PURE__*/
|
|
59
|
-
}), /*#__PURE__*/
|
|
58
|
+
children: /*#__PURE__*/ H(G, { id: "ne/GWZ" })
|
|
59
|
+
}), /*#__PURE__*/ H(f, {
|
|
60
60
|
label: a._({ id: "SUSS9i" }),
|
|
61
61
|
required: !0,
|
|
62
62
|
value: c,
|
|
@@ -72,8 +72,8 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
72
72
|
})]
|
|
73
73
|
})
|
|
74
74
|
}) : null;
|
|
75
|
-
},
|
|
76
|
-
let { i18n: c, _: l } = K(), p =
|
|
75
|
+
}, J = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: a }) => {
|
|
76
|
+
let { i18n: c, _: l } = K(), p = L(), [m, h] = W(""), [g, y] = W(null), [b, x] = W(!1), S = de(""), C = () => {
|
|
77
77
|
t && navigator.clipboard.writeText(t.name).then(() => {
|
|
78
78
|
x(!0), setTimeout(() => x(!1), 2e3);
|
|
79
79
|
});
|
|
@@ -97,10 +97,10 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
97
97
|
}
|
|
98
98
|
}), P = () => {
|
|
99
99
|
h(""), y(null), N.reset(), n();
|
|
100
|
-
},
|
|
100
|
+
}, F = (e) => {
|
|
101
101
|
let t = e.target.value;
|
|
102
102
|
h(t), g && y(null);
|
|
103
|
-
},
|
|
103
|
+
}, ee = () => {
|
|
104
104
|
if (t) {
|
|
105
105
|
if (m.trim() !== t.name) {
|
|
106
106
|
y(c._({ id: "jS4B2+" }));
|
|
@@ -111,30 +111,30 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
111
111
|
container: t.name
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
},
|
|
115
|
-
e.key === "Enter" &&
|
|
114
|
+
}, R = (e) => {
|
|
115
|
+
e.key === "Enter" && ee();
|
|
116
116
|
};
|
|
117
117
|
if (!e || !t) return null;
|
|
118
|
-
let
|
|
119
|
-
return /*#__PURE__*/
|
|
120
|
-
title: /* @__PURE__ */
|
|
118
|
+
let te = E?.length ?? 0, ne = !D && t.count === 0 && te === 0, re = !D && t.count > 0 && te === 0, z = ne || re;
|
|
119
|
+
return /*#__PURE__*/ U(w, {
|
|
120
|
+
title: /* @__PURE__ */ U("span", {
|
|
121
121
|
className: "flex max-w-[400px] items-center gap-2",
|
|
122
122
|
children: [
|
|
123
|
-
/*#__PURE__*/
|
|
123
|
+
/*#__PURE__*/ H("span", {
|
|
124
124
|
className: "shrink-0",
|
|
125
|
-
children: /*#__PURE__*/
|
|
125
|
+
children: /*#__PURE__*/ H(G, { id: "5Okch2" })
|
|
126
126
|
}),
|
|
127
|
-
/*#__PURE__*/
|
|
127
|
+
/*#__PURE__*/ H("span", {
|
|
128
128
|
className: "truncate",
|
|
129
129
|
title: t.name,
|
|
130
130
|
children: t.name
|
|
131
131
|
}),
|
|
132
|
-
!D && !
|
|
132
|
+
!D && !z && /*#__PURE__*/ H("button", {
|
|
133
133
|
type: "button",
|
|
134
134
|
onClick: C,
|
|
135
135
|
title: b ? c._({ id: "PiH3UR" }) : c._({ id: "NQU1Nn" }),
|
|
136
136
|
className: "text-theme-light hover:text-theme-default inline-flex items-center transition-colors",
|
|
137
|
-
children: /*#__PURE__*/
|
|
137
|
+
children: /*#__PURE__*/ H(_, {
|
|
138
138
|
icon: b ? "checkCircle" : "contentCopy",
|
|
139
139
|
size: "16"
|
|
140
140
|
})
|
|
@@ -143,107 +143,107 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
143
143
|
}),
|
|
144
144
|
open: e,
|
|
145
145
|
onCancel: P,
|
|
146
|
-
confirmButtonLabel:
|
|
146
|
+
confirmButtonLabel: z ? void 0 : c._({ id: "N2S1rs" }),
|
|
147
147
|
confirmButtonVariant: "primary-danger",
|
|
148
|
-
onConfirm:
|
|
149
|
-
cancelButtonLabel:
|
|
150
|
-
modalFooter:
|
|
148
|
+
onConfirm: z ? void 0 : ee,
|
|
149
|
+
cancelButtonLabel: z ? void 0 : c._({ id: "dEgA5A" }),
|
|
150
|
+
modalFooter: z ? /*#__PURE__*/ H(v, {
|
|
151
151
|
className: "flex justify-end",
|
|
152
|
-
children: /*#__PURE__*/
|
|
152
|
+
children: /*#__PURE__*/ H(k, { children: /*#__PURE__*/ H(j, {
|
|
153
153
|
variant: "primary",
|
|
154
154
|
onClick: P,
|
|
155
155
|
"data-testid": "empty-info-close-button",
|
|
156
|
-
children: /*#__PURE__*/
|
|
156
|
+
children: /*#__PURE__*/ H(G, { id: "yz7wBu" })
|
|
157
157
|
}) })
|
|
158
158
|
}) : void 0,
|
|
159
159
|
size: "small",
|
|
160
|
-
disableConfirmButton: D || N.isPending || !
|
|
161
|
-
children: [A && /*#__PURE__*/
|
|
160
|
+
disableConfirmButton: D || N.isPending || !z && !m.trim() || !z && m.trim() !== t.name,
|
|
161
|
+
children: [A && /*#__PURE__*/ H("p", {
|
|
162
162
|
className: "text-theme-error mb-4",
|
|
163
163
|
children: (() => {
|
|
164
164
|
let e = A.message;
|
|
165
|
-
return /*#__PURE__*/
|
|
165
|
+
return /*#__PURE__*/ H(G, {
|
|
166
166
|
id: "56IxdF",
|
|
167
167
|
values: { errorMessage: e }
|
|
168
168
|
});
|
|
169
169
|
})()
|
|
170
|
-
}), D ? /*#__PURE__*/
|
|
170
|
+
}), D ? /*#__PURE__*/ U(O, {
|
|
171
171
|
direction: "horizontal",
|
|
172
172
|
alignment: "center",
|
|
173
173
|
gap: "2",
|
|
174
174
|
className: "py-4",
|
|
175
|
-
children: [/*#__PURE__*/
|
|
176
|
-
}) :
|
|
175
|
+
children: [/*#__PURE__*/ H(s, { size: "small" }), /*#__PURE__*/ H(G, { id: "ujK/QN" })]
|
|
176
|
+
}) : z && !A ? /*#__PURE__*/ H("p", {
|
|
177
177
|
className: "text-theme-default py-2",
|
|
178
|
-
children:
|
|
179
|
-
}) : A ? null : /*#__PURE__*/
|
|
178
|
+
children: ne ? /*#__PURE__*/ H(G, { id: "jNm/qL" }) : /*#__PURE__*/ H(G, { id: "WefafP" })
|
|
179
|
+
}) : A ? null : /*#__PURE__*/ U(O, {
|
|
180
180
|
direction: "vertical",
|
|
181
181
|
gap: "6",
|
|
182
182
|
children: [
|
|
183
|
-
/*#__PURE__*/
|
|
183
|
+
/*#__PURE__*/ U("p", {
|
|
184
184
|
className: "text-theme-default",
|
|
185
185
|
children: [
|
|
186
|
-
/*#__PURE__*/
|
|
187
|
-
/*#__PURE__*/
|
|
188
|
-
/*#__PURE__*/
|
|
186
|
+
/*#__PURE__*/ H(G, { id: "Ioblgz" }),
|
|
187
|
+
/*#__PURE__*/ H("br", {}),
|
|
188
|
+
/*#__PURE__*/ H(G, {
|
|
189
189
|
id: "kiRrtv",
|
|
190
190
|
components: {
|
|
191
|
-
0: /*#__PURE__*/
|
|
192
|
-
1: /*#__PURE__*/
|
|
193
|
-
2: /*#__PURE__*/
|
|
191
|
+
0: /*#__PURE__*/ H("strong", {}),
|
|
192
|
+
1: /*#__PURE__*/ H("strong", {}),
|
|
193
|
+
2: /*#__PURE__*/ H("strong", {})
|
|
194
194
|
}
|
|
195
195
|
})
|
|
196
196
|
]
|
|
197
197
|
}),
|
|
198
|
-
/*#__PURE__*/
|
|
198
|
+
/*#__PURE__*/ U("div", {
|
|
199
199
|
className: "border-theme-background-lvl-3 overflow-hidden rounded border",
|
|
200
200
|
children: [
|
|
201
|
-
t.count >
|
|
201
|
+
t.count > te && /*#__PURE__*/ H("p", {
|
|
202
202
|
className: "text-theme-light px-3 py-2 text-xs",
|
|
203
203
|
children: (() => {
|
|
204
204
|
let e = t.count;
|
|
205
|
-
return /*#__PURE__*/
|
|
205
|
+
return /*#__PURE__*/ H(G, {
|
|
206
206
|
id: "1iQtS2",
|
|
207
207
|
values: {
|
|
208
|
-
actualObjectCount:
|
|
208
|
+
actualObjectCount: te,
|
|
209
209
|
total: e
|
|
210
210
|
}
|
|
211
211
|
});
|
|
212
212
|
})()
|
|
213
213
|
}),
|
|
214
|
-
/*#__PURE__*/
|
|
214
|
+
/*#__PURE__*/ H(u, {
|
|
215
215
|
columns: 3,
|
|
216
216
|
className: "text-sm",
|
|
217
|
-
children: /*#__PURE__*/
|
|
218
|
-
/*#__PURE__*/
|
|
219
|
-
/*#__PURE__*/
|
|
220
|
-
/*#__PURE__*/
|
|
217
|
+
children: /*#__PURE__*/ U(i, { children: [
|
|
218
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "6YtxFj" }) }),
|
|
219
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "Cj2Gtd" }) }),
|
|
220
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "sjMCOP" }) })
|
|
221
221
|
] })
|
|
222
222
|
}),
|
|
223
|
-
/*#__PURE__*/
|
|
223
|
+
/*#__PURE__*/ H("div", {
|
|
224
224
|
className: "max-h-48 overflow-y-auto",
|
|
225
|
-
children: /*#__PURE__*/
|
|
225
|
+
children: /*#__PURE__*/ H(u, {
|
|
226
226
|
columns: 3,
|
|
227
227
|
className: "text-sm",
|
|
228
|
-
children: E.map((e) => /*#__PURE__*/
|
|
229
|
-
/*#__PURE__*/
|
|
228
|
+
children: E.map((e) => /*#__PURE__*/ U(i, { children: [
|
|
229
|
+
/*#__PURE__*/ H(o, {
|
|
230
230
|
className: "max-w-[200px] truncate",
|
|
231
231
|
title: e.name,
|
|
232
232
|
children: e.name
|
|
233
233
|
}),
|
|
234
|
-
/*#__PURE__*/
|
|
235
|
-
/*#__PURE__*/
|
|
234
|
+
/*#__PURE__*/ H(o, { children: I(e.bytes) }),
|
|
235
|
+
/*#__PURE__*/ H(o, { children: e.last_modified ? new Date(e.last_modified).toLocaleString() : c._({ id: "fj5byd" }) })
|
|
236
236
|
] }, e.name))
|
|
237
237
|
})
|
|
238
238
|
})
|
|
239
239
|
]
|
|
240
240
|
}),
|
|
241
|
-
/*#__PURE__*/
|
|
241
|
+
/*#__PURE__*/ H(f, {
|
|
242
242
|
label: c._({ id: "33F2A+" }),
|
|
243
243
|
required: !0,
|
|
244
244
|
value: m,
|
|
245
|
-
onChange:
|
|
246
|
-
onKeyDown:
|
|
245
|
+
onChange: F,
|
|
246
|
+
onKeyDown: R,
|
|
247
247
|
invalid: !!g,
|
|
248
248
|
errortext: g || void 0,
|
|
249
249
|
disabled: N.isPending,
|
|
@@ -254,7 +254,7 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
254
254
|
})]
|
|
255
255
|
});
|
|
256
256
|
}, _e = ({ isOpen: e, container: t, onClose: n, onSuccess: r, onError: i }) => {
|
|
257
|
-
let { i18n: a, _: o } = K(), c =
|
|
257
|
+
let { i18n: a, _: o } = K(), c = L(), [l, u] = W(""), [d, p] = W(null), [m, h] = W(!1), g = M.useUtils(), { data: _, isLoading: y, error: x } = M.storage.swift.listObjects.useQuery({
|
|
258
258
|
project_id: c,
|
|
259
259
|
container: t?.name ?? "",
|
|
260
260
|
format: "json",
|
|
@@ -273,7 +273,7 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
273
273
|
D();
|
|
274
274
|
}
|
|
275
275
|
});
|
|
276
|
-
|
|
276
|
+
ue(() => {
|
|
277
277
|
e || (u(""), p(null), h(!1), E.reset());
|
|
278
278
|
}, [e, t?.name]);
|
|
279
279
|
let D = () => {
|
|
@@ -296,14 +296,14 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
296
296
|
e.key === "Enter" && N();
|
|
297
297
|
};
|
|
298
298
|
if (!e || !t) return null;
|
|
299
|
-
let
|
|
300
|
-
return /*#__PURE__*/
|
|
301
|
-
title: /* @__PURE__ */
|
|
299
|
+
let F = _?.length ?? 0, I = !y && (F > 0 || t.count > 0), ee = !y && t.count > 0 && F === 0, R = !!(x || C);
|
|
300
|
+
return /*#__PURE__*/ U(w, {
|
|
301
|
+
title: /* @__PURE__ */ U("span", {
|
|
302
302
|
className: "flex max-w-[400px] items-center gap-2",
|
|
303
|
-
children: [/*#__PURE__*/
|
|
303
|
+
children: [/*#__PURE__*/ H("span", {
|
|
304
304
|
className: "shrink-0",
|
|
305
|
-
children: /*#__PURE__*/
|
|
306
|
-
}), /*#__PURE__*/
|
|
305
|
+
children: /*#__PURE__*/ H(G, { id: "Vzlopx" })
|
|
306
|
+
}), /*#__PURE__*/ H("span", {
|
|
307
307
|
className: "truncate",
|
|
308
308
|
title: t.name,
|
|
309
309
|
children: t.name
|
|
@@ -311,84 +311,84 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
311
311
|
}),
|
|
312
312
|
open: e,
|
|
313
313
|
onCancel: D,
|
|
314
|
-
confirmButtonLabel:
|
|
315
|
-
confirmButtonVariant:
|
|
316
|
-
onConfirm:
|
|
317
|
-
cancelButtonLabel:
|
|
318
|
-
modalFooter:
|
|
314
|
+
confirmButtonLabel: I ? void 0 : a._({ id: "cnGeoo" }),
|
|
315
|
+
confirmButtonVariant: I ? void 0 : "primary-danger",
|
|
316
|
+
onConfirm: I ? void 0 : N,
|
|
317
|
+
cancelButtonLabel: I ? void 0 : a._({ id: "dEgA5A" }),
|
|
318
|
+
modalFooter: I ? /*#__PURE__*/ H(v, {
|
|
319
319
|
className: "flex justify-end",
|
|
320
|
-
children: /*#__PURE__*/
|
|
320
|
+
children: /*#__PURE__*/ H(k, { children: /*#__PURE__*/ H(j, {
|
|
321
321
|
variant: "primary",
|
|
322
322
|
onClick: D,
|
|
323
323
|
"data-testid": "delete-has-objects-close-button",
|
|
324
|
-
children: /*#__PURE__*/
|
|
324
|
+
children: /*#__PURE__*/ H(G, { id: "yz7wBu" })
|
|
325
325
|
}) })
|
|
326
326
|
}) : void 0,
|
|
327
327
|
size: "small",
|
|
328
|
-
disableConfirmButton: y ||
|
|
329
|
-
children: [(x || C) && /*#__PURE__*/
|
|
328
|
+
disableConfirmButton: y || R || E.isPending || !I && l.trim() !== "delete" || !I && T && !m,
|
|
329
|
+
children: [(x || C) && /*#__PURE__*/ U(O, {
|
|
330
330
|
direction: "vertical",
|
|
331
331
|
gap: "2",
|
|
332
332
|
className: "mb-4",
|
|
333
333
|
role: "alert",
|
|
334
334
|
"aria-live": "assertive",
|
|
335
|
-
children: [x && /*#__PURE__*/
|
|
335
|
+
children: [x && /*#__PURE__*/ H("p", {
|
|
336
336
|
className: "text-theme-error",
|
|
337
337
|
children: (() => {
|
|
338
338
|
let e = x.message;
|
|
339
|
-
return /*#__PURE__*/
|
|
339
|
+
return /*#__PURE__*/ H(G, {
|
|
340
340
|
id: "56IxdF",
|
|
341
341
|
values: { errorMessage: e }
|
|
342
342
|
});
|
|
343
343
|
})()
|
|
344
|
-
}), C && /*#__PURE__*/
|
|
344
|
+
}), C && /*#__PURE__*/ H("p", {
|
|
345
345
|
className: "text-theme-error",
|
|
346
346
|
children: (() => {
|
|
347
347
|
let e = C.message;
|
|
348
|
-
return /*#__PURE__*/
|
|
348
|
+
return /*#__PURE__*/ H(G, {
|
|
349
349
|
id: "BCXapL",
|
|
350
350
|
values: { errorMessage: e }
|
|
351
351
|
});
|
|
352
352
|
})()
|
|
353
353
|
})]
|
|
354
|
-
}), y ? /*#__PURE__*/
|
|
354
|
+
}), y ? /*#__PURE__*/ U(O, {
|
|
355
355
|
direction: "horizontal",
|
|
356
356
|
alignment: "center",
|
|
357
357
|
gap: "2",
|
|
358
358
|
className: "py-4",
|
|
359
|
-
children: [/*#__PURE__*/
|
|
360
|
-
}) :
|
|
359
|
+
children: [/*#__PURE__*/ H(s, { size: "small" }), /*#__PURE__*/ H(G, { id: "Z3FXyt" })]
|
|
360
|
+
}) : I ? /*#__PURE__*/ U(O, {
|
|
361
361
|
direction: "vertical",
|
|
362
362
|
gap: "3",
|
|
363
|
-
children: [/*#__PURE__*/
|
|
363
|
+
children: [/*#__PURE__*/ H("p", {
|
|
364
364
|
className: "text-theme-default",
|
|
365
|
-
children: /*#__PURE__*/
|
|
366
|
-
}),
|
|
365
|
+
children: /*#__PURE__*/ H(G, { id: "3dBmvU" })
|
|
366
|
+
}), ee && /*#__PURE__*/ H("p", {
|
|
367
367
|
className: "text-theme-default",
|
|
368
|
-
children: /*#__PURE__*/
|
|
368
|
+
children: /*#__PURE__*/ H(G, { id: "x3T4pq" })
|
|
369
369
|
})]
|
|
370
|
-
}) : /*#__PURE__*/
|
|
370
|
+
}) : /*#__PURE__*/ U(O, {
|
|
371
371
|
direction: "vertical",
|
|
372
372
|
gap: "6",
|
|
373
373
|
children: [
|
|
374
|
-
/*#__PURE__*/
|
|
374
|
+
/*#__PURE__*/ U("p", {
|
|
375
375
|
className: "text-theme-default",
|
|
376
376
|
children: [
|
|
377
|
-
/*#__PURE__*/
|
|
378
|
-
/*#__PURE__*/
|
|
379
|
-
/*#__PURE__*/
|
|
377
|
+
/*#__PURE__*/ H(G, { id: "Y8M9Uc" }),
|
|
378
|
+
/*#__PURE__*/ H("br", {}),
|
|
379
|
+
/*#__PURE__*/ H(G, {
|
|
380
380
|
id: "YzUoh9",
|
|
381
|
-
components: { 0: /*#__PURE__*/
|
|
381
|
+
components: { 0: /*#__PURE__*/ H("strong", {}) }
|
|
382
382
|
})
|
|
383
383
|
]
|
|
384
384
|
}),
|
|
385
|
-
T && /*#__PURE__*/
|
|
385
|
+
T && /*#__PURE__*/ H(b, {
|
|
386
386
|
label: a._({ id: "V/8B9A" }),
|
|
387
387
|
checked: m,
|
|
388
388
|
onChange: (e) => h(e.target.checked),
|
|
389
389
|
invalid: !m
|
|
390
390
|
}),
|
|
391
|
-
/*#__PURE__*/
|
|
391
|
+
/*#__PURE__*/ H(f, {
|
|
392
392
|
label: a._({ id: "QytzQr" }),
|
|
393
393
|
required: !0,
|
|
394
394
|
value: l,
|
|
@@ -410,22 +410,22 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
410
410
|
"web-listings",
|
|
411
411
|
"web-listings-css",
|
|
412
412
|
"web-error"
|
|
413
|
-
]), ye = 50, be = /^[a-zA-Z0-9!#$%&'*+\-.^_`|~]+$/,
|
|
414
|
-
let { i18n: p, _: m } = K(), h =
|
|
413
|
+
]), ye = 50, be = /^[a-zA-Z0-9!#$%&'*+\-.^_`|~]+$/, Y = ({ isOpen: t, container: n, onClose: r, onSuccess: a, onError: l }) => {
|
|
414
|
+
let { i18n: p, _: m } = K(), h = L(), { data: g, isLoading: v, isError: x, error: C } = M.storage.swift.getContainerMetadata.useQuery({
|
|
415
415
|
project_id: h,
|
|
416
416
|
container: n?.name ?? ""
|
|
417
417
|
}, { enabled: t && n !== null }), T = g?.read === ".r:*,.rlistings", { data: D } = M.storage.swift.getContainerPublicUrl.useQuery({
|
|
418
418
|
project_id: h,
|
|
419
419
|
container: n?.name ?? ""
|
|
420
|
-
}, { enabled: t && n !== null && T }), { data: k } = M.storage.swift.listContainers.useQuery({ project_id: h }, { enabled: t }), [A, N] = W(""), [P,
|
|
420
|
+
}, { enabled: t && n !== null && T }), { data: k } = M.storage.swift.listContainers.useQuery({ project_id: h }, { enabled: t }), [A, N] = W(""), [P, F] = W(""), I = de(null), ee = le((e) => {
|
|
421
421
|
let t = e.target.value;
|
|
422
|
-
N(t),
|
|
423
|
-
}, []),
|
|
424
|
-
|
|
422
|
+
N(t), I.current && clearTimeout(I.current), I.current = setTimeout(() => F(t), 300);
|
|
423
|
+
}, []), R = P.trim().length > 0 ? (k ?? []).filter((e) => e.name !== n?.name && e.name.toLowerCase().includes(P.toLowerCase())) : [], te = R.slice(0, ye), ne = R.length - te.length, re = M.useUtils(), [z, ie] = W(""), [ae, B] = W(null), [V, oe] = W(""), [se, ce] = W(null), [fe, pe] = W(""), [q, me] = W(!1), [he, ge] = W(!1), [J, _e] = W(""), [Y, X] = W([]), [xe, Se] = W({}), [Ce, we] = W(!1), [Te, Z] = W(""), [Ee, De] = W(""), [Oe, ke] = W(null), [Q, Ae] = W(null);
|
|
424
|
+
ue(() => {
|
|
425
425
|
if (!g) return;
|
|
426
|
-
|
|
426
|
+
ie(g.quotaBytes == null ? "" : String(g.quotaBytes)), oe(g.quotaCount == null ? "" : String(g.quotaCount)), ge(!!(g.versionsEnabled || g.versionsLocation || g.historyLocation)), _e(g.versionsLocation || g.historyLocation || "");
|
|
427
427
|
let e = g.metadata ?? {};
|
|
428
|
-
|
|
428
|
+
pe(e["web-index"] ?? ""), me(e["web-listings"] === "1" || e["web-listings"] === "true");
|
|
429
429
|
let t = g.metadata ?? {};
|
|
430
430
|
X(Object.entries(t).filter(([e]) => !ve.has(e)).map(([e, t]) => ({
|
|
431
431
|
key: e,
|
|
@@ -435,40 +435,40 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
435
435
|
originalKey: e,
|
|
436
436
|
originalValue: t
|
|
437
437
|
})));
|
|
438
|
-
}, [g]),
|
|
439
|
-
t ||
|
|
438
|
+
}, [g]), ue(() => {
|
|
439
|
+
t || je();
|
|
440
440
|
}, [t]);
|
|
441
|
-
let
|
|
442
|
-
|
|
443
|
-
},
|
|
441
|
+
let je = () => {
|
|
442
|
+
ie(""), B(null), oe(""), ce(null), pe(""), me(!1), ge(!1), _e(""), N(""), F(""), I.current && clearTimeout(I.current), X([]), Se({}), we(!1), Z(""), De(""), ke(null), Ae(null), Me.reset();
|
|
443
|
+
}, Me = M.storage.swift.updateContainerMetadata.useMutation({
|
|
444
444
|
onSuccess: () => {
|
|
445
|
-
|
|
445
|
+
re.storage.swift.getContainerMetadata.invalidate({ container: n.name }), re.storage.swift.listContainers.invalidate(), a?.(n.name), Ue();
|
|
446
446
|
},
|
|
447
447
|
onError: (e) => {
|
|
448
448
|
l?.(n.name, e.message);
|
|
449
449
|
}
|
|
450
|
-
}),
|
|
450
|
+
}), Ne = () => {
|
|
451
451
|
let e = !0;
|
|
452
|
-
return
|
|
453
|
-
},
|
|
454
|
-
let e =
|
|
452
|
+
return z !== "" && (isNaN(Number(z)) || Number(z) < 0) ? (B(p._({ id: "AuQtzx" })), e = !1) : B(null), V !== "" && (isNaN(Number(V)) || Number(V) < 0) ? (ce(p._({ id: "AuQtzx" })), e = !1) : ce(null), e;
|
|
453
|
+
}, Pe = (e, t) => e.trim() ? be.test(e) ? /[a-zA-Z0-9]/.test(e) ? ve.has(e.toLowerCase()) ? p._({ id: "JeRXll" }) : Y.some((n) => n.key.toLowerCase() === e.toLowerCase() && n.originalKey !== t) ? p._({ id: "i6/ygf" }) : null : p._({ id: "dTNzBI" }) : p._({ id: "XYZLy9" }) : p._({ id: "QV1ZPO" }), Fe = () => {
|
|
454
|
+
let e = Pe(Te);
|
|
455
455
|
if (e) {
|
|
456
|
-
|
|
456
|
+
ke(e);
|
|
457
457
|
return;
|
|
458
458
|
}
|
|
459
|
-
if (!
|
|
460
|
-
|
|
459
|
+
if (!Ee.trim()) {
|
|
460
|
+
Ae(p._({ id: "hXUWyd" }));
|
|
461
461
|
return;
|
|
462
462
|
}
|
|
463
463
|
X([...Y, {
|
|
464
464
|
key: Te.trim(),
|
|
465
|
-
value:
|
|
465
|
+
value: Ee.trim(),
|
|
466
466
|
isNew: !0,
|
|
467
467
|
isEditing: !1
|
|
468
|
-
}]),
|
|
469
|
-
},
|
|
470
|
-
|
|
471
|
-
},
|
|
468
|
+
}]), Z(""), De(""), we(!1), ke(null), Ae(null);
|
|
469
|
+
}, Ie = () => {
|
|
470
|
+
Z(""), De(""), we(!1), ke(null), Ae(null);
|
|
471
|
+
}, Le = (e) => {
|
|
472
472
|
X(Y.map((t, n) => n === e ? {
|
|
473
473
|
...t,
|
|
474
474
|
isEditing: !0
|
|
@@ -476,8 +476,8 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
476
476
|
...t,
|
|
477
477
|
isEditing: !1
|
|
478
478
|
})), we(!1);
|
|
479
|
-
},
|
|
480
|
-
let t = Y[e], n =
|
|
479
|
+
}, Re = (e) => {
|
|
480
|
+
let t = Y[e], n = Pe(t.key, t.originalKey);
|
|
481
481
|
if (n) {
|
|
482
482
|
Se({ [`edit-${e}`]: n });
|
|
483
483
|
return;
|
|
@@ -492,16 +492,16 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
492
492
|
key: t.key.trim(),
|
|
493
493
|
value: t.value.trim()
|
|
494
494
|
} : t)), Se({});
|
|
495
|
-
},
|
|
495
|
+
}, ze = (e) => {
|
|
496
496
|
X(Y.map((t, n) => n === e ? {
|
|
497
497
|
...t,
|
|
498
498
|
isEditing: !1,
|
|
499
499
|
key: t.originalKey ?? t.key,
|
|
500
500
|
value: t.originalValue ?? t.value
|
|
501
501
|
} : t)), Se({});
|
|
502
|
-
},
|
|
502
|
+
}, Be = (e) => {
|
|
503
503
|
X(Y.filter((t, n) => n !== e)), Se({});
|
|
504
|
-
},
|
|
504
|
+
}, $ = (e, t) => {
|
|
505
505
|
X(Y.map((n, r) => r === e ? {
|
|
506
506
|
...n,
|
|
507
507
|
key: t
|
|
@@ -509,7 +509,7 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
509
509
|
let n = { ...t };
|
|
510
510
|
return delete n[`edit-${e}`], n;
|
|
511
511
|
});
|
|
512
|
-
},
|
|
512
|
+
}, Ve = (e, t) => {
|
|
513
513
|
X(Y.map((n, r) => r === e ? {
|
|
514
514
|
...n,
|
|
515
515
|
value: t
|
|
@@ -517,8 +517,8 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
517
517
|
let n = { ...t };
|
|
518
518
|
return delete n[`edit-${e}`], n;
|
|
519
519
|
});
|
|
520
|
-
},
|
|
521
|
-
if (!n || !
|
|
520
|
+
}, He = () => {
|
|
521
|
+
if (!n || !Ne()) return;
|
|
522
522
|
let e = g?.metadata ?? {}, t = {}, r = [];
|
|
523
523
|
Y.forEach((e) => {
|
|
524
524
|
(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));
|
|
@@ -526,216 +526,216 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
526
526
|
let i = Object.keys(e).filter((e) => !ve.has(e)), a = Y.map((e) => e.originalKey).filter(Boolean);
|
|
527
527
|
i.forEach((e) => {
|
|
528
528
|
!a.includes(e) && !r.includes(e) && r.push(e);
|
|
529
|
-
}), T && (fe ? t["web-index"] = fe : g?.metadata?.["web-index"] && r.push("web-index"),
|
|
529
|
+
}), T && (fe ? t["web-index"] = fe : g?.metadata?.["web-index"] && r.push("web-index"), q ? t["web-listings"] = "1" : g?.metadata?.["web-listings"] && r.push("web-listings"));
|
|
530
530
|
let o = !!(g?.versionsEnabled || g?.versionsLocation || g?.historyLocation), s = g?.versionsLocation || g?.historyLocation || "";
|
|
531
|
-
|
|
531
|
+
Me.mutate({
|
|
532
532
|
project_id: h,
|
|
533
533
|
container: n.name,
|
|
534
534
|
metadata: t,
|
|
535
535
|
removeMetadata: r.length ? r : void 0,
|
|
536
|
-
quotaBytes:
|
|
537
|
-
quotaCount:
|
|
538
|
-
versionsLocation: he && (!o ||
|
|
536
|
+
quotaBytes: z === "" ? void 0 : Number(z),
|
|
537
|
+
quotaCount: V === "" ? void 0 : Number(V),
|
|
538
|
+
versionsLocation: he && (!o || J !== s) && J ? J : void 0,
|
|
539
539
|
removeVersionsLocation: !he && o ? !0 : void 0
|
|
540
540
|
});
|
|
541
|
-
},
|
|
542
|
-
|
|
541
|
+
}, Ue = () => {
|
|
542
|
+
je(), r();
|
|
543
543
|
};
|
|
544
544
|
if (!t || !n) return null;
|
|
545
|
-
let
|
|
546
|
-
return /*#__PURE__*/
|
|
547
|
-
title: /*#__PURE__*/
|
|
545
|
+
let We = v || Me.isPending, Ge = x && !v, Ke = Y.some((e) => e.isEditing), qe = g?.quotaBytes == null ? "" : String(g.quotaBytes), Je = g?.quotaCount == null ? "" : String(g.quotaCount), Ye = !!g?.versionsEnabled, Xe = g?.versionsLocation || g?.historyLocation || "", Ze = g?.metadata?.["web-index"] ?? "", Qe = g?.metadata?.["web-listings"] === "1" || g?.metadata?.["web-listings"] === "true", $e = Object.keys(g?.metadata ?? {}).filter((e) => !ve.has(e)), et = Y.length === $e.length && Y.every((e) => !e.isNew && e.key === e.originalKey && e.value === e.originalValue), tt = z === qe && V === Je && he === Ye && J === Xe && fe === Ze && q === Qe && et, nt = g?.quotaBytes == null ? null : `${g.quotaBytes} B`;
|
|
546
|
+
return /*#__PURE__*/ U(w, {
|
|
547
|
+
title: /*#__PURE__*/ U("span", {
|
|
548
548
|
className: "flex max-w-[500px] items-center gap-2",
|
|
549
|
-
children: [/*#__PURE__*/
|
|
549
|
+
children: [/*#__PURE__*/ H("span", {
|
|
550
550
|
className: "shrink-0",
|
|
551
|
-
children: /*#__PURE__*/
|
|
552
|
-
}), /*#__PURE__*/
|
|
551
|
+
children: /*#__PURE__*/ H(G, { id: "y02Bu1" })
|
|
552
|
+
}), /*#__PURE__*/ H("span", {
|
|
553
553
|
className: "truncate",
|
|
554
554
|
title: n.name,
|
|
555
555
|
children: n.name
|
|
556
556
|
})]
|
|
557
557
|
}),
|
|
558
558
|
open: t,
|
|
559
|
-
onCancel:
|
|
559
|
+
onCancel: Ue,
|
|
560
560
|
confirmButtonLabel: p._({ id: "tfDRzk" }),
|
|
561
|
-
onConfirm:
|
|
561
|
+
onConfirm: He,
|
|
562
562
|
cancelButtonLabel: p._({ id: "dEgA5A" }),
|
|
563
563
|
size: "large",
|
|
564
|
-
disableConfirmButton:
|
|
565
|
-
children: [
|
|
564
|
+
disableConfirmButton: We || Ce || Ke || tt || Ge,
|
|
565
|
+
children: [Me.isError && /*#__PURE__*/ H("p", {
|
|
566
566
|
className: "text-theme-error mb-4",
|
|
567
567
|
children: (() => {
|
|
568
|
-
let e =
|
|
569
|
-
return /*#__PURE__*/
|
|
568
|
+
let e = Me.error.message;
|
|
569
|
+
return /*#__PURE__*/ H(G, {
|
|
570
570
|
id: "nUuaq8",
|
|
571
571
|
values: { errorMessage: e }
|
|
572
572
|
});
|
|
573
573
|
})()
|
|
574
|
-
}), v ? /*#__PURE__*/
|
|
574
|
+
}), v ? /*#__PURE__*/ U(O, {
|
|
575
575
|
direction: "horizontal",
|
|
576
576
|
alignment: "center",
|
|
577
577
|
gap: "2",
|
|
578
578
|
className: "py-8",
|
|
579
|
-
children: [/*#__PURE__*/
|
|
580
|
-
}) : Ge ? /*#__PURE__*/
|
|
579
|
+
children: [/*#__PURE__*/ H(s, { size: "small" }), /*#__PURE__*/ H(G, { id: "WRZ3Mt" })]
|
|
580
|
+
}) : Ge ? /*#__PURE__*/ H("p", {
|
|
581
581
|
className: "text-theme-error py-8 text-center",
|
|
582
|
-
children: /*#__PURE__*/
|
|
582
|
+
children: /*#__PURE__*/ H(G, {
|
|
583
583
|
id: "BCXapL",
|
|
584
584
|
values: { errorMessage: C?.message ?? "Unknown error" }
|
|
585
585
|
})
|
|
586
|
-
}) : /*#__PURE__*/
|
|
586
|
+
}) : /*#__PURE__*/ H("div", {
|
|
587
587
|
className: "max-h-[65vh] overflow-y-auto pr-1 pl-1",
|
|
588
|
-
children: /*#__PURE__*/
|
|
588
|
+
children: /*#__PURE__*/ U(O, {
|
|
589
589
|
direction: "vertical",
|
|
590
590
|
gap: "6",
|
|
591
591
|
children: [
|
|
592
|
-
/*#__PURE__*/
|
|
592
|
+
/*#__PURE__*/ U("div", {
|
|
593
593
|
className: "grid grid-cols-2 gap-4",
|
|
594
|
-
children: [/*#__PURE__*/
|
|
594
|
+
children: [/*#__PURE__*/ H(f, {
|
|
595
595
|
label: p._({ id: "z45o5B" }),
|
|
596
596
|
value: String(n.count),
|
|
597
597
|
disabled: !0,
|
|
598
598
|
readOnly: !0
|
|
599
|
-
}), /*#__PURE__*/
|
|
599
|
+
}), /*#__PURE__*/ H(f, {
|
|
600
600
|
label: p._({ id: "/InK0O" }),
|
|
601
601
|
value: g?.bytesUsed == null ? `${n.bytes.toLocaleString()} B` : `${g.bytesUsed.toLocaleString()} B`,
|
|
602
602
|
disabled: !0,
|
|
603
603
|
readOnly: !0
|
|
604
604
|
})]
|
|
605
605
|
}),
|
|
606
|
-
/*#__PURE__*/
|
|
606
|
+
/*#__PURE__*/ U("div", {
|
|
607
607
|
className: "grid grid-cols-2 gap-4",
|
|
608
|
-
children: [/*#__PURE__*/
|
|
608
|
+
children: [/*#__PURE__*/ H("div", { children: /*#__PURE__*/ H(f, {
|
|
609
609
|
label: p._({ id: "k0vAWv" }),
|
|
610
|
-
value:
|
|
610
|
+
value: V,
|
|
611
611
|
onChange: (e) => {
|
|
612
|
-
|
|
612
|
+
oe(e.target.value), se && ce(null);
|
|
613
613
|
},
|
|
614
614
|
placeholder: p._({ id: "qtoOYG" }),
|
|
615
615
|
invalid: !!se,
|
|
616
616
|
errortext: se ?? void 0,
|
|
617
|
-
disabled:
|
|
618
|
-
}) }), /*#__PURE__*/
|
|
617
|
+
disabled: We
|
|
618
|
+
}) }), /*#__PURE__*/ H("div", { children: /*#__PURE__*/ H(f, {
|
|
619
619
|
label: p._({ id: "KOpPMt" }),
|
|
620
|
-
value:
|
|
620
|
+
value: z,
|
|
621
621
|
onChange: (e) => {
|
|
622
|
-
|
|
622
|
+
ie(e.target.value), ae && B(null);
|
|
623
623
|
},
|
|
624
624
|
placeholder: p._({ id: "qtoOYG" }),
|
|
625
|
-
invalid: !!
|
|
626
|
-
errortext:
|
|
627
|
-
disabled:
|
|
628
|
-
helptext:
|
|
625
|
+
invalid: !!ae,
|
|
626
|
+
errortext: ae ?? void 0,
|
|
627
|
+
disabled: We,
|
|
628
|
+
helptext: z && nt ? nt : void 0
|
|
629
629
|
}) })]
|
|
630
630
|
}),
|
|
631
|
-
T && D && /*#__PURE__*/
|
|
631
|
+
T && D && /*#__PURE__*/ U("div", { children: [/*#__PURE__*/ U("p", {
|
|
632
632
|
className: "text-theme-default mb-1 text-sm font-semibold",
|
|
633
633
|
children: [
|
|
634
|
-
/*#__PURE__*/
|
|
634
|
+
/*#__PURE__*/ H(G, { id: "mvz5Eo" }),
|
|
635
635
|
" ",
|
|
636
|
-
/*#__PURE__*/
|
|
636
|
+
/*#__PURE__*/ H("a", {
|
|
637
637
|
href: D,
|
|
638
638
|
target: "_blank",
|
|
639
639
|
rel: "noopener noreferrer",
|
|
640
640
|
className: "text-theme-info text-xs font-normal underline",
|
|
641
|
-
children: /*#__PURE__*/
|
|
641
|
+
children: /*#__PURE__*/ H(G, { id: "Alx2/L" })
|
|
642
642
|
})
|
|
643
643
|
]
|
|
644
|
-
}), /*#__PURE__*/
|
|
644
|
+
}), /*#__PURE__*/ H(f, {
|
|
645
645
|
value: D,
|
|
646
646
|
disabled: !0,
|
|
647
647
|
readOnly: !0
|
|
648
648
|
})] }),
|
|
649
|
-
/*#__PURE__*/
|
|
649
|
+
/*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H("p", {
|
|
650
650
|
className: "text-theme-default mb-3 text-sm font-semibold",
|
|
651
|
-
children: /*#__PURE__*/
|
|
652
|
-
}), T ? /*#__PURE__*/
|
|
651
|
+
children: /*#__PURE__*/ H(G, { id: "6CDYXS" })
|
|
652
|
+
}), T ? /*#__PURE__*/ U(O, {
|
|
653
653
|
direction: "vertical",
|
|
654
654
|
gap: "4",
|
|
655
|
-
children: [/*#__PURE__*/
|
|
655
|
+
children: [/*#__PURE__*/ U(O, {
|
|
656
656
|
direction: "vertical",
|
|
657
657
|
gap: "1",
|
|
658
|
-
children: [/*#__PURE__*/
|
|
658
|
+
children: [/*#__PURE__*/ H(b, {
|
|
659
659
|
label: p._({ id: "6+7EwD" }),
|
|
660
660
|
checked: !!fe,
|
|
661
661
|
onChange: (e) => {
|
|
662
|
-
e.target.checked ? fe ||
|
|
662
|
+
e.target.checked ? fe || pe("index.html") : pe("");
|
|
663
663
|
},
|
|
664
|
-
disabled:
|
|
665
|
-
}), /*#__PURE__*/
|
|
664
|
+
disabled: We
|
|
665
|
+
}), /*#__PURE__*/ H("div", {
|
|
666
666
|
className: "pl-6",
|
|
667
|
-
children: /*#__PURE__*/
|
|
667
|
+
children: /*#__PURE__*/ H(f, {
|
|
668
668
|
value: fe,
|
|
669
|
-
onChange: (e) =>
|
|
669
|
+
onChange: (e) => pe(e.target.value),
|
|
670
670
|
placeholder: "index.html",
|
|
671
|
-
disabled:
|
|
671
|
+
disabled: We || !fe,
|
|
672
672
|
className: "flex-1"
|
|
673
673
|
})
|
|
674
674
|
})]
|
|
675
|
-
}), /*#__PURE__*/
|
|
675
|
+
}), /*#__PURE__*/ U(O, {
|
|
676
676
|
direction: "horizontal",
|
|
677
677
|
alignment: "start",
|
|
678
678
|
gap: "2",
|
|
679
|
-
children: [/*#__PURE__*/
|
|
679
|
+
children: [/*#__PURE__*/ H(b, {
|
|
680
680
|
label: p._({ id: "NeUjqc" }),
|
|
681
|
-
checked:
|
|
681
|
+
checked: q,
|
|
682
682
|
onChange: (e) => me(e.target.checked),
|
|
683
|
-
disabled:
|
|
684
|
-
}), /*#__PURE__*/
|
|
683
|
+
disabled: We
|
|
684
|
+
}), /*#__PURE__*/ U(S, {
|
|
685
685
|
triggerEvent: "hover",
|
|
686
|
-
children: [/*#__PURE__*/
|
|
686
|
+
children: [/*#__PURE__*/ H(E, { children: /*#__PURE__*/ H(_, {
|
|
687
687
|
icon: "help",
|
|
688
688
|
size: "16",
|
|
689
689
|
className: "text-theme-light cursor-help"
|
|
690
|
-
}) }), /*#__PURE__*/
|
|
690
|
+
}) }), /*#__PURE__*/ H(y, {
|
|
691
691
|
className: "z-10 max-w-[220px]",
|
|
692
|
-
children: /*#__PURE__*/
|
|
692
|
+
children: /*#__PURE__*/ H(G, { id: "Oxl1UN" })
|
|
693
693
|
})]
|
|
694
694
|
})]
|
|
695
695
|
})]
|
|
696
|
-
}) : /*#__PURE__*/
|
|
696
|
+
}) : /*#__PURE__*/ H("p", {
|
|
697
697
|
className: "text-theme-default text-sm",
|
|
698
|
-
children: /*#__PURE__*/
|
|
698
|
+
children: /*#__PURE__*/ H(G, {
|
|
699
699
|
id: "aSsVD3",
|
|
700
|
-
components: { 0: /*#__PURE__*/
|
|
700
|
+
components: { 0: /*#__PURE__*/ H("strong", {}) }
|
|
701
701
|
})
|
|
702
702
|
})] }),
|
|
703
|
-
/*#__PURE__*/
|
|
703
|
+
/*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H("p", {
|
|
704
704
|
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
705
|
-
children: /*#__PURE__*/
|
|
706
|
-
}), Ye && !
|
|
705
|
+
children: /*#__PURE__*/ H(G, { id: "jNzyQo" })
|
|
706
|
+
}), Ye && !J ? /*#__PURE__*/ H(b, {
|
|
707
707
|
label: p._({ id: "Nvfd2b" }),
|
|
708
708
|
checked: !0,
|
|
709
709
|
onChange: (e) => {
|
|
710
|
-
e.target.checked || (ge(!1),
|
|
710
|
+
e.target.checked || (ge(!1), _e(""), N(""), F(""));
|
|
711
711
|
},
|
|
712
712
|
disabled: !0
|
|
713
|
-
}) : !he && !
|
|
713
|
+
}) : !he && !J ? /*#__PURE__*/ H(b, {
|
|
714
714
|
label: p._({ id: "WyKwnD" }),
|
|
715
715
|
checked: !1,
|
|
716
716
|
onChange: (e) => ge(e.target.checked),
|
|
717
|
-
disabled:
|
|
718
|
-
}) : /*#__PURE__*/
|
|
717
|
+
disabled: We
|
|
718
|
+
}) : /*#__PURE__*/ U(O, {
|
|
719
719
|
direction: "vertical",
|
|
720
720
|
gap: "1",
|
|
721
|
-
children: [/*#__PURE__*/
|
|
721
|
+
children: [/*#__PURE__*/ H(b, {
|
|
722
722
|
label: p._({ id: "b0uU1G" }),
|
|
723
723
|
checked: he,
|
|
724
724
|
onChange: (e) => {
|
|
725
|
-
ge(e.target.checked), e.target.checked || (
|
|
725
|
+
ge(e.target.checked), e.target.checked || (_e(""), N(""), F(""));
|
|
726
726
|
},
|
|
727
|
-
disabled:
|
|
728
|
-
}), he && /*#__PURE__*/
|
|
727
|
+
disabled: We
|
|
728
|
+
}), he && /*#__PURE__*/ H("div", {
|
|
729
729
|
className: "pl-6",
|
|
730
|
-
children: /*#__PURE__*/
|
|
731
|
-
value:
|
|
732
|
-
onChange: (e) =>
|
|
733
|
-
onInputChange:
|
|
730
|
+
children: /*#__PURE__*/ H(e, {
|
|
731
|
+
value: J,
|
|
732
|
+
onChange: (e) => _e(e),
|
|
733
|
+
onInputChange: ee,
|
|
734
734
|
placeholder: p._({ id: "a13wDR" }),
|
|
735
735
|
helptext: (() => {
|
|
736
736
|
if (A.trim().length === 0) return p._({ id: "c+fUtV" });
|
|
737
|
-
if (
|
|
738
|
-
let e = ye, t =
|
|
737
|
+
if (ne > 0) {
|
|
738
|
+
let e = ye, t = R.length;
|
|
739
739
|
return p._({
|
|
740
740
|
id: "qzhUb9",
|
|
741
741
|
values: {
|
|
@@ -745,149 +745,149 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
745
745
|
});
|
|
746
746
|
}
|
|
747
747
|
})(),
|
|
748
|
-
disabled:
|
|
749
|
-
children:
|
|
748
|
+
disabled: We,
|
|
749
|
+
children: te.map((e) => /*#__PURE__*/ H(c, {
|
|
750
750
|
value: e.name,
|
|
751
751
|
children: e.name
|
|
752
752
|
}, e.name))
|
|
753
753
|
})
|
|
754
754
|
})]
|
|
755
755
|
})] }),
|
|
756
|
-
/*#__PURE__*/
|
|
757
|
-
/*#__PURE__*/
|
|
756
|
+
/*#__PURE__*/ U("div", { children: [
|
|
757
|
+
/*#__PURE__*/ U(O, {
|
|
758
758
|
direction: "horizontal",
|
|
759
759
|
alignment: "center",
|
|
760
760
|
distribution: "between",
|
|
761
761
|
className: "mb-3",
|
|
762
|
-
children: [/*#__PURE__*/
|
|
762
|
+
children: [/*#__PURE__*/ H("p", {
|
|
763
763
|
className: "text-theme-default text-sm font-semibold",
|
|
764
|
-
children: /*#__PURE__*/
|
|
765
|
-
}), /*#__PURE__*/
|
|
764
|
+
children: /*#__PURE__*/ H(G, { id: "6GBt0m" })
|
|
765
|
+
}), /*#__PURE__*/ H("p", {
|
|
766
766
|
className: "text-theme-light text-xs",
|
|
767
|
-
children: /*#__PURE__*/
|
|
767
|
+
children: /*#__PURE__*/ H(G, { id: "kuYWaD" })
|
|
768
768
|
})]
|
|
769
769
|
}),
|
|
770
|
-
/*#__PURE__*/
|
|
770
|
+
/*#__PURE__*/ H(O, {
|
|
771
771
|
direction: "horizontal",
|
|
772
772
|
className: "jn:bg-theme-background-lvl-1 justify-end p-2",
|
|
773
|
-
children: /*#__PURE__*/
|
|
773
|
+
children: /*#__PURE__*/ H(j, {
|
|
774
774
|
label: p._({ id: "sWBLli" }),
|
|
775
775
|
onClick: () => we(!0),
|
|
776
776
|
variant: "primary",
|
|
777
777
|
icon: "addCircle",
|
|
778
778
|
size: "small",
|
|
779
|
-
disabled: Ce || Ke ||
|
|
779
|
+
disabled: Ce || Ke || We
|
|
780
780
|
})
|
|
781
781
|
}),
|
|
782
|
-
/*#__PURE__*/
|
|
782
|
+
/*#__PURE__*/ U(u, {
|
|
783
783
|
columns: 3,
|
|
784
784
|
children: [
|
|
785
|
-
/*#__PURE__*/
|
|
786
|
-
/*#__PURE__*/
|
|
787
|
-
/*#__PURE__*/
|
|
788
|
-
/*#__PURE__*/
|
|
785
|
+
/*#__PURE__*/ U(i, { children: [
|
|
786
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "7sMeHQ" }) }),
|
|
787
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "wMHvYH" }) }),
|
|
788
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "7L01XJ" }) })
|
|
789
789
|
] }),
|
|
790
|
-
Ce && /*#__PURE__*/
|
|
791
|
-
/*#__PURE__*/
|
|
790
|
+
Ce && /*#__PURE__*/ U(i, { children: [
|
|
791
|
+
/*#__PURE__*/ H(o, { children: /*#__PURE__*/ H(f, {
|
|
792
792
|
value: Te,
|
|
793
793
|
onChange: (e) => {
|
|
794
|
-
|
|
794
|
+
Z(e.target.value), Oe && ke(null);
|
|
795
795
|
},
|
|
796
796
|
placeholder: p._({ id: "x9AdZ8" }),
|
|
797
|
-
errortext:
|
|
798
|
-
invalid: !!
|
|
797
|
+
errortext: Oe ?? void 0,
|
|
798
|
+
invalid: !!Oe,
|
|
799
799
|
autoFocus: !0
|
|
800
800
|
}) }),
|
|
801
|
-
/*#__PURE__*/
|
|
802
|
-
value:
|
|
801
|
+
/*#__PURE__*/ H(o, { children: /*#__PURE__*/ H(f, {
|
|
802
|
+
value: Ee,
|
|
803
803
|
onChange: (e) => {
|
|
804
|
-
|
|
804
|
+
De(e.target.value), Q && Ae(null);
|
|
805
805
|
},
|
|
806
806
|
placeholder: p._({ id: "wMHvYH" }),
|
|
807
|
-
errortext:
|
|
808
|
-
invalid: !!
|
|
807
|
+
errortext: Q ?? void 0,
|
|
808
|
+
invalid: !!Q
|
|
809
809
|
}) }),
|
|
810
|
-
/*#__PURE__*/
|
|
810
|
+
/*#__PURE__*/ H(o, { children: /*#__PURE__*/ U(O, {
|
|
811
811
|
direction: "horizontal",
|
|
812
812
|
gap: "2",
|
|
813
|
-
children: [/*#__PURE__*/
|
|
813
|
+
children: [/*#__PURE__*/ H(j, {
|
|
814
814
|
size: "small",
|
|
815
815
|
variant: "primary",
|
|
816
|
-
onClick:
|
|
816
|
+
onClick: Fe,
|
|
817
817
|
icon: "check",
|
|
818
818
|
title: p._({ id: "tfDRzk" })
|
|
819
|
-
}), /*#__PURE__*/
|
|
819
|
+
}), /*#__PURE__*/ H(j, {
|
|
820
820
|
size: "small",
|
|
821
821
|
variant: "subdued",
|
|
822
|
-
onClick:
|
|
822
|
+
onClick: Ie,
|
|
823
823
|
icon: "close",
|
|
824
824
|
title: p._({ id: "bzSI52" })
|
|
825
825
|
})]
|
|
826
826
|
}) })
|
|
827
827
|
] }),
|
|
828
|
-
Y.map((e, t) => /*#__PURE__*/
|
|
829
|
-
/*#__PURE__*/
|
|
828
|
+
Y.map((e, t) => /*#__PURE__*/ U(i, { children: [
|
|
829
|
+
/*#__PURE__*/ H(o, { children: e.isEditing ? /*#__PURE__*/ H(f, {
|
|
830
830
|
value: e.key,
|
|
831
|
-
onChange: (e) =>
|
|
831
|
+
onChange: (e) => $(t, e.target.value),
|
|
832
832
|
errortext: xe[`edit-${t}`],
|
|
833
833
|
invalid: !!xe[`edit-${t}`]
|
|
834
|
-
}) : /*#__PURE__*/
|
|
834
|
+
}) : /*#__PURE__*/ H("span", {
|
|
835
835
|
className: "block max-w-xs truncate text-sm",
|
|
836
836
|
title: e.key,
|
|
837
837
|
children: e.key
|
|
838
838
|
}) }),
|
|
839
|
-
/*#__PURE__*/
|
|
839
|
+
/*#__PURE__*/ H(o, { children: e.isEditing ? /*#__PURE__*/ H(f, {
|
|
840
840
|
value: e.value,
|
|
841
|
-
onChange: (e) =>
|
|
842
|
-
}) : /*#__PURE__*/
|
|
841
|
+
onChange: (e) => Ve(t, e.target.value)
|
|
842
|
+
}) : /*#__PURE__*/ H("span", {
|
|
843
843
|
className: "block max-w-md truncate text-sm",
|
|
844
844
|
title: e.value,
|
|
845
845
|
children: e.value
|
|
846
846
|
}) }),
|
|
847
|
-
/*#__PURE__*/
|
|
847
|
+
/*#__PURE__*/ H(o, { children: e.isEditing ? /*#__PURE__*/ U(O, {
|
|
848
848
|
direction: "horizontal",
|
|
849
849
|
gap: "2",
|
|
850
|
-
children: [/*#__PURE__*/
|
|
850
|
+
children: [/*#__PURE__*/ H(j, {
|
|
851
851
|
size: "small",
|
|
852
852
|
variant: "primary",
|
|
853
|
-
onClick: () =>
|
|
853
|
+
onClick: () => Re(t),
|
|
854
854
|
icon: "check",
|
|
855
855
|
title: p._({ id: "tfDRzk" })
|
|
856
|
-
}), /*#__PURE__*/
|
|
856
|
+
}), /*#__PURE__*/ H(j, {
|
|
857
857
|
size: "small",
|
|
858
858
|
variant: "subdued",
|
|
859
|
-
onClick: () =>
|
|
859
|
+
onClick: () => ze(t),
|
|
860
860
|
icon: "close",
|
|
861
861
|
title: p._({ id: "bzSI52" })
|
|
862
862
|
})]
|
|
863
|
-
}) : /*#__PURE__*/
|
|
863
|
+
}) : /*#__PURE__*/ U(O, {
|
|
864
864
|
direction: "horizontal",
|
|
865
865
|
gap: "2",
|
|
866
|
-
children: [/*#__PURE__*/
|
|
866
|
+
children: [/*#__PURE__*/ H(j, {
|
|
867
867
|
size: "small",
|
|
868
868
|
variant: "subdued",
|
|
869
|
-
onClick: () =>
|
|
869
|
+
onClick: () => Le(t),
|
|
870
870
|
icon: "edit",
|
|
871
871
|
title: p._({ id: "ePK91l" }),
|
|
872
|
-
disabled: Ce || Ke ||
|
|
873
|
-
}), /*#__PURE__*/
|
|
872
|
+
disabled: Ce || Ke || We
|
|
873
|
+
}), /*#__PURE__*/ H(j, {
|
|
874
874
|
size: "small",
|
|
875
875
|
variant: "primary-danger",
|
|
876
|
-
onClick: () =>
|
|
876
|
+
onClick: () => Be(t),
|
|
877
877
|
icon: "deleteForever",
|
|
878
878
|
title: p._({ id: "cnGeoo" }),
|
|
879
|
-
disabled: Ce || Ke ||
|
|
879
|
+
disabled: Ce || Ke || We
|
|
880
880
|
})]
|
|
881
881
|
}) })
|
|
882
882
|
] }, t)),
|
|
883
|
-
Y.length === 0 && !Ce && /*#__PURE__*/
|
|
883
|
+
Y.length === 0 && !Ce && /*#__PURE__*/ H(i, { children: /*#__PURE__*/ H(o, {
|
|
884
884
|
colSpan: 3,
|
|
885
885
|
className: "py-6 text-center",
|
|
886
|
-
children: /*#__PURE__*/
|
|
886
|
+
children: /*#__PURE__*/ H(O, {
|
|
887
887
|
alignment: "center",
|
|
888
|
-
children: /*#__PURE__*/
|
|
888
|
+
children: /*#__PURE__*/ H("span", {
|
|
889
889
|
className: "text-theme-light text-sm",
|
|
890
|
-
children: /*#__PURE__*/
|
|
890
|
+
children: /*#__PURE__*/ H(G, { id: "F02e8I" })
|
|
891
891
|
})
|
|
892
892
|
})
|
|
893
893
|
}) })
|
|
@@ -901,7 +901,7 @@ var he = ({ isOpen: e, onClose: t, onSuccess: n, onError: r, maxContainerNameLen
|
|
|
901
901
|
};
|
|
902
902
|
//#endregion
|
|
903
903
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ManageContainerAccessModal.tsx
|
|
904
|
-
function
|
|
904
|
+
function X(e) {
|
|
905
905
|
let t = e.trim();
|
|
906
906
|
if (t === ".r:*") return {
|
|
907
907
|
raw: t,
|
|
@@ -960,22 +960,22 @@ function Y(e) {
|
|
|
960
960
|
requiresToken: !0
|
|
961
961
|
};
|
|
962
962
|
}
|
|
963
|
-
function
|
|
964
|
-
return e.trim() ? e.split(",").map((e) => e.trim()).filter(Boolean).map(
|
|
965
|
-
}
|
|
966
|
-
var xe = [".r:*", ".rlistings"];
|
|
967
|
-
function Se(e) {
|
|
968
|
-
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
969
|
-
return xe.every((e) => t.includes(e));
|
|
963
|
+
function xe(e) {
|
|
964
|
+
return e.trim() ? e.split(",").map((e) => e.trim()).filter(Boolean).map(X) : [];
|
|
970
965
|
}
|
|
966
|
+
var Se = [".r:*", ".rlistings"];
|
|
971
967
|
function Ce(e) {
|
|
972
968
|
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
973
|
-
return
|
|
969
|
+
return Se.every((e) => t.includes(e));
|
|
974
970
|
}
|
|
975
971
|
function we(e) {
|
|
976
|
-
|
|
972
|
+
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
973
|
+
return [...new Set([...Se, ...t])].join(",");
|
|
977
974
|
}
|
|
978
975
|
function Te(e) {
|
|
976
|
+
return e.split(",").map((e) => e.trim()).filter((e) => !Se.includes(e)).join(",");
|
|
977
|
+
}
|
|
978
|
+
function Z(e) {
|
|
979
979
|
switch (e.type) {
|
|
980
980
|
case "any-referrer": return q._({ id: "HVdrr1" });
|
|
981
981
|
case "denied-referrer": {
|
|
@@ -1021,18 +1021,18 @@ function Te(e) {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
1023
|
var Ee = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) => {
|
|
1024
|
-
let { i18n: l, _: u } = K(), d =
|
|
1025
|
-
|
|
1024
|
+
let { i18n: l, _: u } = K(), d = L(), [f, p] = W(""), [m, h] = W(""), [_, v] = W(!1), [y, x] = W(!1);
|
|
1025
|
+
ue(() => {
|
|
1026
1026
|
!f.trim() && !m.trim() && x(!1);
|
|
1027
1027
|
}, [f, m]);
|
|
1028
1028
|
let { data: S, isLoading: T, isError: E, error: D } = M.storage.swift.getContainerMetadata.useQuery({
|
|
1029
1029
|
project_id: d,
|
|
1030
1030
|
container: t?.name ?? ""
|
|
1031
1031
|
}, { enabled: e && t !== null });
|
|
1032
|
-
|
|
1032
|
+
ue(() => {
|
|
1033
1033
|
if (!S) return;
|
|
1034
1034
|
let e = S.read ?? "", t = S.write ?? "";
|
|
1035
|
-
p(e), h(t), v(
|
|
1035
|
+
p(e), h(t), v(Ce(e));
|
|
1036
1036
|
}, [S]);
|
|
1037
1037
|
let k = M.useUtils(), A = M.storage.swift.updateContainerMetadata.useMutation({
|
|
1038
1038
|
onSuccess: () => {
|
|
@@ -1044,21 +1044,21 @@ var Ee = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1044
1044
|
onError: (e) => {
|
|
1045
1045
|
c?.(t.name, e.message);
|
|
1046
1046
|
}
|
|
1047
|
-
}), N =
|
|
1047
|
+
}), N = de(A.reset);
|
|
1048
1048
|
N.current = A.reset;
|
|
1049
1049
|
let P = () => {
|
|
1050
1050
|
p(""), h(""), v(!1), x(!1), A.reset(), i();
|
|
1051
1051
|
};
|
|
1052
|
-
|
|
1052
|
+
ue(() => {
|
|
1053
1053
|
e || (p(""), h(""), v(!1), N.current());
|
|
1054
1054
|
}, [e]);
|
|
1055
|
-
let
|
|
1055
|
+
let F = (e) => {
|
|
1056
1056
|
let t = e.target.checked;
|
|
1057
|
-
v(t), p((e) => t ?
|
|
1058
|
-
},
|
|
1057
|
+
v(t), p((e) => t ? we(e) : Te(e));
|
|
1058
|
+
}, I = (e) => {
|
|
1059
1059
|
let t = e.target.value;
|
|
1060
|
-
p(t), v(
|
|
1061
|
-
},
|
|
1060
|
+
p(t), v(Ce(t));
|
|
1061
|
+
}, ee = () => {
|
|
1062
1062
|
t && A.mutate({
|
|
1063
1063
|
project_id: d,
|
|
1064
1064
|
container: t.name,
|
|
@@ -1067,11 +1067,11 @@ var Ee = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1067
1067
|
});
|
|
1068
1068
|
};
|
|
1069
1069
|
if (!e || !t) return null;
|
|
1070
|
-
let
|
|
1071
|
-
return /*#__PURE__*/
|
|
1072
|
-
title: /* @__PURE__ */
|
|
1070
|
+
let R = T || A.isPending, te = f.trim().length > 0 || m.trim().length > 0, ne = xe(f), re = xe(m);
|
|
1071
|
+
return /*#__PURE__*/ U(w, {
|
|
1072
|
+
title: /* @__PURE__ */ U("span", {
|
|
1073
1073
|
className: "flex items-center gap-2",
|
|
1074
|
-
children: [/*#__PURE__*/
|
|
1074
|
+
children: [/*#__PURE__*/ H(G, { id: "EdxcAN" }), /*#__PURE__*/ H("span", {
|
|
1075
1075
|
className: "max-w-[250px] truncate",
|
|
1076
1076
|
title: t.name,
|
|
1077
1077
|
children: t.name
|
|
@@ -1080,140 +1080,140 @@ var Ee = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1080
1080
|
open: e,
|
|
1081
1081
|
onCancel: P,
|
|
1082
1082
|
confirmButtonLabel: l._({ id: "tfDRzk" }),
|
|
1083
|
-
onConfirm:
|
|
1083
|
+
onConfirm: ee,
|
|
1084
1084
|
cancelButtonLabel: l._({ id: "dEgA5A" }),
|
|
1085
1085
|
size: "xl",
|
|
1086
|
-
disableConfirmButton:
|
|
1087
|
-
children: [A.isError && /*#__PURE__*/
|
|
1086
|
+
disableConfirmButton: R || E,
|
|
1087
|
+
children: [A.isError && /*#__PURE__*/ H("p", {
|
|
1088
1088
|
className: "text-theme-error mb-4",
|
|
1089
1089
|
children: (() => {
|
|
1090
1090
|
let e = A.error.message;
|
|
1091
|
-
return /*#__PURE__*/
|
|
1091
|
+
return /*#__PURE__*/ H(G, {
|
|
1092
1092
|
id: "u2xIeO",
|
|
1093
1093
|
values: { errorMessage: e }
|
|
1094
1094
|
});
|
|
1095
1095
|
})()
|
|
1096
|
-
}), /*#__PURE__*/
|
|
1096
|
+
}), /*#__PURE__*/ U("div", {
|
|
1097
1097
|
className: "max-h-[70vh] overflow-y-auto pr-1 pl-1",
|
|
1098
1098
|
children: [
|
|
1099
|
-
/*#__PURE__*/
|
|
1099
|
+
/*#__PURE__*/ H("div", {
|
|
1100
1100
|
className: "mb-4",
|
|
1101
|
-
children: /*#__PURE__*/
|
|
1101
|
+
children: /*#__PURE__*/ H(n, {
|
|
1102
1102
|
variant: "warning",
|
|
1103
1103
|
className: "mb-4",
|
|
1104
|
-
children: /*#__PURE__*/
|
|
1104
|
+
children: /*#__PURE__*/ H(G, { id: "wH0MtN" })
|
|
1105
1105
|
})
|
|
1106
1106
|
}),
|
|
1107
|
-
T ? /*#__PURE__*/
|
|
1107
|
+
T ? /*#__PURE__*/ U(O, {
|
|
1108
1108
|
direction: "horizontal",
|
|
1109
1109
|
alignment: "center",
|
|
1110
1110
|
gap: "2",
|
|
1111
1111
|
className: "py-6",
|
|
1112
|
-
children: [/*#__PURE__*/
|
|
1113
|
-
}) : E ? /*#__PURE__*/
|
|
1112
|
+
children: [/*#__PURE__*/ H(s, { size: "small" }), /*#__PURE__*/ H(G, { id: "poCbZw" })]
|
|
1113
|
+
}) : E ? /*#__PURE__*/ H("p", {
|
|
1114
1114
|
className: "text-theme-error py-2",
|
|
1115
|
-
children: /*#__PURE__*/
|
|
1115
|
+
children: /*#__PURE__*/ H(G, {
|
|
1116
1116
|
id: "QNHur0",
|
|
1117
1117
|
values: { errorMessage: D?.message ?? "" }
|
|
1118
1118
|
})
|
|
1119
|
-
}) : /*#__PURE__*/
|
|
1119
|
+
}) : /*#__PURE__*/ H(oe, { children: /*#__PURE__*/ U("div", {
|
|
1120
1120
|
className: "flex gap-6",
|
|
1121
|
-
children: [/*#__PURE__*/
|
|
1121
|
+
children: [/*#__PURE__*/ H("div", {
|
|
1122
1122
|
className: "min-w-0 flex-1",
|
|
1123
|
-
children: /*#__PURE__*/
|
|
1123
|
+
children: /*#__PURE__*/ U(O, {
|
|
1124
1124
|
direction: "vertical",
|
|
1125
1125
|
gap: "6",
|
|
1126
1126
|
children: [
|
|
1127
|
-
/*#__PURE__*/
|
|
1128
|
-
/*#__PURE__*/
|
|
1129
|
-
/*#__PURE__*/
|
|
1127
|
+
/*#__PURE__*/ U("div", { children: [
|
|
1128
|
+
/*#__PURE__*/ H(Oe, { label: l._({ id: "SBGiGm" }) }),
|
|
1129
|
+
/*#__PURE__*/ H(g, {
|
|
1130
1130
|
value: f,
|
|
1131
|
-
onChange:
|
|
1132
|
-
disabled:
|
|
1131
|
+
onChange: I,
|
|
1132
|
+
disabled: R || _,
|
|
1133
1133
|
placeholder: l._({ id: "FKL6Jv" }),
|
|
1134
1134
|
className: "text-sm",
|
|
1135
1135
|
rows: 3
|
|
1136
1136
|
}),
|
|
1137
|
-
/*#__PURE__*/
|
|
1137
|
+
/*#__PURE__*/ H(b, {
|
|
1138
1138
|
label: l._({ id: "23wBCX" }),
|
|
1139
1139
|
checked: _,
|
|
1140
|
-
onChange:
|
|
1141
|
-
disabled:
|
|
1140
|
+
onChange: F,
|
|
1141
|
+
disabled: R,
|
|
1142
1142
|
className: "mt-2"
|
|
1143
1143
|
})
|
|
1144
1144
|
] }),
|
|
1145
|
-
/*#__PURE__*/
|
|
1145
|
+
/*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H(Oe, { label: l._({ id: "6qzsuS" }) }), /*#__PURE__*/ H(g, {
|
|
1146
1146
|
value: m,
|
|
1147
1147
|
onChange: (e) => {
|
|
1148
1148
|
let t = e.target.value;
|
|
1149
1149
|
h(t);
|
|
1150
1150
|
},
|
|
1151
|
-
disabled:
|
|
1151
|
+
disabled: R,
|
|
1152
1152
|
placeholder: l._({ id: "UVFHGY" }),
|
|
1153
1153
|
className: "text-sm",
|
|
1154
1154
|
rows: 3
|
|
1155
1155
|
})] }),
|
|
1156
|
-
|
|
1156
|
+
te && /*#__PURE__*/ H(j, {
|
|
1157
1157
|
label: y ? l._({ id: "we28Pq" }) : l._({ id: "YiMCKk" }),
|
|
1158
1158
|
onClick: () => x((e) => !e),
|
|
1159
1159
|
variant: "subdued",
|
|
1160
|
-
disabled:
|
|
1160
|
+
disabled: R,
|
|
1161
1161
|
className: "self-start"
|
|
1162
1162
|
}),
|
|
1163
|
-
y && (
|
|
1163
|
+
y && (ne.length > 0 || re.length > 0) && /*#__PURE__*/ U(O, {
|
|
1164
1164
|
direction: "vertical",
|
|
1165
1165
|
gap: "4",
|
|
1166
|
-
children: [
|
|
1166
|
+
children: [ne.length > 0 && /*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H("p", {
|
|
1167
1167
|
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
1168
|
-
children: /*#__PURE__*/
|
|
1169
|
-
}), /*#__PURE__*/
|
|
1168
|
+
children: /*#__PURE__*/ H(G, { id: "x7SF89" })
|
|
1169
|
+
}), /*#__PURE__*/ H("div", {
|
|
1170
1170
|
className: "border-theme-background-lvl-3 rounded border p-3",
|
|
1171
|
-
children: /*#__PURE__*/
|
|
1171
|
+
children: /*#__PURE__*/ H(a, {
|
|
1172
1172
|
className: "grid-cols-2",
|
|
1173
1173
|
alignTerms: "left",
|
|
1174
|
-
children:
|
|
1174
|
+
children: ne.map((e, t) => /*#__PURE__*/ U(se, { children: [/*#__PURE__*/ H(C, {
|
|
1175
1175
|
className: "col-span-1",
|
|
1176
|
-
children: /*#__PURE__*/
|
|
1176
|
+
children: /*#__PURE__*/ H("span", {
|
|
1177
1177
|
className: "block truncate text-xs",
|
|
1178
1178
|
title: e.raw,
|
|
1179
1179
|
children: e.raw
|
|
1180
1180
|
})
|
|
1181
|
-
}), /*#__PURE__*/
|
|
1181
|
+
}), /*#__PURE__*/ U(r, {
|
|
1182
1182
|
className: "col-span-1",
|
|
1183
|
-
children: [/*#__PURE__*/
|
|
1183
|
+
children: [/*#__PURE__*/ H("span", {
|
|
1184
1184
|
className: "block truncate text-sm",
|
|
1185
|
-
title:
|
|
1186
|
-
children:
|
|
1187
|
-
}), /*#__PURE__*/
|
|
1185
|
+
title: Z(e),
|
|
1186
|
+
children: Z(e)
|
|
1187
|
+
}), /*#__PURE__*/ H("span", {
|
|
1188
1188
|
className: "text-theme-light block text-xs",
|
|
1189
|
-
children: e.requiresToken ? /*#__PURE__*/
|
|
1189
|
+
children: e.requiresToken ? /*#__PURE__*/ H(G, { id: "z+zpLP" }) : /*#__PURE__*/ H(G, { id: "t7ff15" })
|
|
1190
1190
|
})]
|
|
1191
1191
|
})] }, t))
|
|
1192
1192
|
})
|
|
1193
|
-
})] }),
|
|
1193
|
+
})] }), re.length > 0 && /*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H("p", {
|
|
1194
1194
|
className: "text-theme-default mb-2 text-sm font-semibold",
|
|
1195
|
-
children: /*#__PURE__*/
|
|
1196
|
-
}), /*#__PURE__*/
|
|
1195
|
+
children: /*#__PURE__*/ H(G, { id: "lRRkwQ" })
|
|
1196
|
+
}), /*#__PURE__*/ H("div", {
|
|
1197
1197
|
className: "border-theme-background-lvl-3 rounded border p-3",
|
|
1198
|
-
children: /*#__PURE__*/
|
|
1198
|
+
children: /*#__PURE__*/ H(a, {
|
|
1199
1199
|
className: "grid-cols-2",
|
|
1200
1200
|
alignTerms: "left",
|
|
1201
|
-
children:
|
|
1201
|
+
children: re.map((e, t) => /*#__PURE__*/ U(se, { children: [/*#__PURE__*/ H(C, {
|
|
1202
1202
|
className: "col-span-1",
|
|
1203
|
-
children: /*#__PURE__*/
|
|
1203
|
+
children: /*#__PURE__*/ H("span", {
|
|
1204
1204
|
className: "block truncate text-xs",
|
|
1205
1205
|
title: e.raw,
|
|
1206
1206
|
children: e.raw
|
|
1207
1207
|
})
|
|
1208
|
-
}), /*#__PURE__*/
|
|
1208
|
+
}), /*#__PURE__*/ U(r, {
|
|
1209
1209
|
className: "col-span-1",
|
|
1210
|
-
children: [/*#__PURE__*/
|
|
1210
|
+
children: [/*#__PURE__*/ H("span", {
|
|
1211
1211
|
className: "block truncate text-sm",
|
|
1212
|
-
title:
|
|
1213
|
-
children:
|
|
1214
|
-
}), /*#__PURE__*/
|
|
1212
|
+
title: Z(e),
|
|
1213
|
+
children: Z(e)
|
|
1214
|
+
}), /*#__PURE__*/ H("span", {
|
|
1215
1215
|
className: "text-theme-light block text-xs",
|
|
1216
|
-
children: e.requiresToken ? /*#__PURE__*/
|
|
1216
|
+
children: e.requiresToken ? /*#__PURE__*/ H(G, { id: "z+zpLP" }) : /*#__PURE__*/ H(G, { id: "t7ff15" })
|
|
1217
1217
|
})]
|
|
1218
1218
|
})] }, t))
|
|
1219
1219
|
})
|
|
@@ -1221,44 +1221,44 @@ var Ee = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1221
1221
|
})
|
|
1222
1222
|
]
|
|
1223
1223
|
})
|
|
1224
|
-
}), /*#__PURE__*/
|
|
1224
|
+
}), /*#__PURE__*/ U("div", {
|
|
1225
1225
|
className: "border-theme-background-lvl-3 w-72 shrink-0 border-l pl-6",
|
|
1226
1226
|
children: [
|
|
1227
|
-
/*#__PURE__*/
|
|
1227
|
+
/*#__PURE__*/ H("p", {
|
|
1228
1228
|
className: "text-theme-light mb-3 text-xs",
|
|
1229
|
-
children: /*#__PURE__*/
|
|
1229
|
+
children: /*#__PURE__*/ H(G, { id: "dd2ndz" })
|
|
1230
1230
|
}),
|
|
1231
|
-
/*#__PURE__*/
|
|
1231
|
+
/*#__PURE__*/ U(O, {
|
|
1232
1232
|
direction: "vertical",
|
|
1233
1233
|
gap: "4",
|
|
1234
1234
|
children: [
|
|
1235
|
-
/*#__PURE__*/
|
|
1235
|
+
/*#__PURE__*/ H(De, {
|
|
1236
1236
|
code: ".r:*",
|
|
1237
1237
|
description: l._({ id: "VV1fdg" })
|
|
1238
1238
|
}),
|
|
1239
|
-
/*#__PURE__*/
|
|
1239
|
+
/*#__PURE__*/ H(De, {
|
|
1240
1240
|
code: ".rlistings",
|
|
1241
1241
|
description: l._({ id: "s/s1lz" })
|
|
1242
1242
|
}),
|
|
1243
|
-
/*#__PURE__*/
|
|
1243
|
+
/*#__PURE__*/ H(De, {
|
|
1244
1244
|
code: "PROJECT_ID:USER_ID",
|
|
1245
1245
|
description: l._({ id: "zhM8FP" })
|
|
1246
1246
|
}),
|
|
1247
|
-
/*#__PURE__*/
|
|
1247
|
+
/*#__PURE__*/ H(De, {
|
|
1248
1248
|
code: "PROJECT_ID:*",
|
|
1249
1249
|
description: l._({ id: "BCJPTn" })
|
|
1250
1250
|
}),
|
|
1251
|
-
/*#__PURE__*/
|
|
1251
|
+
/*#__PURE__*/ H(De, {
|
|
1252
1252
|
code: "*:USER_ID",
|
|
1253
1253
|
description: l._({ id: "/xnbdQ" })
|
|
1254
1254
|
})
|
|
1255
1255
|
]
|
|
1256
1256
|
}),
|
|
1257
|
-
/*#__PURE__*/
|
|
1257
|
+
/*#__PURE__*/ H("p", {
|
|
1258
1258
|
className: "text-theme-light mt-4 text-xs",
|
|
1259
|
-
children: /*#__PURE__*/
|
|
1259
|
+
children: /*#__PURE__*/ H(G, {
|
|
1260
1260
|
id: "rrjuul",
|
|
1261
|
-
components: { 0: /*#__PURE__*/
|
|
1261
|
+
components: { 0: /*#__PURE__*/ H("a", {
|
|
1262
1262
|
href: "https://docs.openstack.org/swift/latest/overview_acl.html",
|
|
1263
1263
|
target: "_blank",
|
|
1264
1264
|
rel: "noopener noreferrer",
|
|
@@ -1269,39 +1269,39 @@ var Ee = ({ isOpen: e, container: t, onClose: i, onSuccess: o, onError: c }) =>
|
|
|
1269
1269
|
]
|
|
1270
1270
|
})]
|
|
1271
1271
|
}) }),
|
|
1272
|
-
!T && !E && /*#__PURE__*/
|
|
1272
|
+
!T && !E && /*#__PURE__*/ H("p", {
|
|
1273
1273
|
className: "text-theme-light mt-4 text-xs",
|
|
1274
|
-
children: /*#__PURE__*/
|
|
1274
|
+
children: /*#__PURE__*/ H(G, { id: "j9lCXl" })
|
|
1275
1275
|
})
|
|
1276
1276
|
]
|
|
1277
1277
|
})]
|
|
1278
1278
|
});
|
|
1279
1279
|
};
|
|
1280
1280
|
function De({ code: e, description: t }) {
|
|
1281
|
-
return /*#__PURE__*/
|
|
1281
|
+
return /*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H(A, {
|
|
1282
1282
|
variant: "info",
|
|
1283
1283
|
className: "mb-1 text-xs",
|
|
1284
1284
|
children: e
|
|
1285
|
-
}), /*#__PURE__*/
|
|
1285
|
+
}), /*#__PURE__*/ H("p", {
|
|
1286
1286
|
className: "text-theme-light text-xs leading-relaxed",
|
|
1287
1287
|
children: t
|
|
1288
1288
|
})] });
|
|
1289
1289
|
}
|
|
1290
1290
|
function Oe({ label: e }) {
|
|
1291
|
-
return /*#__PURE__*/
|
|
1291
|
+
return /*#__PURE__*/ U("div", {
|
|
1292
1292
|
className: "mb-1 flex items-center gap-1",
|
|
1293
|
-
children: [/*#__PURE__*/
|
|
1293
|
+
children: [/*#__PURE__*/ H("label", {
|
|
1294
1294
|
className: "text-theme-default text-sm font-semibold",
|
|
1295
1295
|
children: e
|
|
1296
|
-
}), /*#__PURE__*/
|
|
1296
|
+
}), /*#__PURE__*/ U(S, {
|
|
1297
1297
|
triggerEvent: "hover",
|
|
1298
|
-
children: [/*#__PURE__*/
|
|
1298
|
+
children: [/*#__PURE__*/ H(E, { children: /*#__PURE__*/ H(_, {
|
|
1299
1299
|
icon: "info",
|
|
1300
1300
|
size: "14",
|
|
1301
1301
|
className: "text-theme-light cursor-help"
|
|
1302
|
-
}) }), /*#__PURE__*/
|
|
1302
|
+
}) }), /*#__PURE__*/ H(y, {
|
|
1303
1303
|
className: "z-10 max-w-[350px]",
|
|
1304
|
-
children: /*#__PURE__*/
|
|
1304
|
+
children: /*#__PURE__*/ H(G, { id: "AdtLNV" })
|
|
1305
1305
|
})]
|
|
1306
1306
|
})]
|
|
1307
1307
|
});
|
|
@@ -1309,80 +1309,80 @@ function Oe({ label: e }) {
|
|
|
1309
1309
|
//#endregion
|
|
1310
1310
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ContainerTableView.tsx
|
|
1311
1311
|
var ke = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContainerNameLength: a, onCreateSuccess: s, onCreateError: c, onEmptySuccess: l, onEmptyError: f, onDeleteSuccess: p, onDeleteError: h, onPropertiesSuccess: g, onPropertiesError: _, onAclSuccess: v, onAclError: y, selectedContainers: x, setSelectedContainers: S, hasAnyBulkAction: C = !0 }) => {
|
|
1312
|
-
let { projectId: w, provider: E, storageType: D } =
|
|
1313
|
-
|
|
1312
|
+
let { projectId: w, provider: E, storageType: D } = pe({ from: "/_auth/projects/$projectId/storage/$provider/$storageType/" }), { i18n: O, _: k } = K(), A = fe(), j = de(null), [M, N] = W(0), [P, F] = W(null), [L, ee] = W(null), [R, te] = W(null), [ne, re] = W(null);
|
|
1313
|
+
ue(() => {
|
|
1314
1314
|
j.current && N(j.current.offsetWidth - j.current.clientWidth);
|
|
1315
1315
|
}, [e.length]);
|
|
1316
|
-
let
|
|
1316
|
+
let z = (e) => {
|
|
1317
1317
|
try {
|
|
1318
1318
|
return new Date(e).toLocaleString();
|
|
1319
1319
|
} catch {
|
|
1320
1320
|
return O._({ id: "fj5byd" });
|
|
1321
1321
|
}
|
|
1322
|
-
},
|
|
1322
|
+
}, ie = he({
|
|
1323
1323
|
count: e.length,
|
|
1324
1324
|
getScrollElement: () => j.current,
|
|
1325
1325
|
estimateSize: () => 48,
|
|
1326
1326
|
overscan: 10
|
|
1327
|
-
}),
|
|
1327
|
+
}), ae = (e) => {
|
|
1328
1328
|
x.includes(e) ? S(x.filter((t) => t !== e)) : S([...x, e]);
|
|
1329
1329
|
};
|
|
1330
|
-
if (!e || e.length === 0) return /*#__PURE__*/
|
|
1330
|
+
if (!e || e.length === 0) return /*#__PURE__*/ U(oe, { children: [/*#__PURE__*/ H(u, {
|
|
1331
1331
|
columns: 4,
|
|
1332
1332
|
className: "containers",
|
|
1333
1333
|
"data-testid": "no-containers",
|
|
1334
|
-
children: /*#__PURE__*/
|
|
1334
|
+
children: /*#__PURE__*/ H(i, { children: /*#__PURE__*/ H(o, {
|
|
1335
1335
|
colSpan: 4,
|
|
1336
|
-
children: /*#__PURE__*/
|
|
1336
|
+
children: /*#__PURE__*/ U("div", {
|
|
1337
1337
|
className: "py-8 text-center",
|
|
1338
|
-
children: [/*#__PURE__*/
|
|
1338
|
+
children: [/*#__PURE__*/ H("h3", {
|
|
1339
1339
|
className: "text-lg font-semibold",
|
|
1340
|
-
children: /*#__PURE__*/
|
|
1341
|
-
}), /*#__PURE__*/
|
|
1340
|
+
children: /*#__PURE__*/ H(G, { id: "Hiw1Ha" })
|
|
1341
|
+
}), /*#__PURE__*/ H("p", {
|
|
1342
1342
|
className: "text-theme-light mt-2",
|
|
1343
|
-
children: /*#__PURE__*/
|
|
1343
|
+
children: /*#__PURE__*/ H(G, { id: "x1bK0h" })
|
|
1344
1344
|
})]
|
|
1345
1345
|
})
|
|
1346
1346
|
}) })
|
|
1347
|
-
}), /*#__PURE__*/
|
|
1347
|
+
}), /*#__PURE__*/ H(ge, {
|
|
1348
1348
|
isOpen: n,
|
|
1349
1349
|
onClose: () => r(!1),
|
|
1350
1350
|
onSuccess: s,
|
|
1351
1351
|
onError: c,
|
|
1352
1352
|
maxContainerNameLength: a
|
|
1353
1353
|
})] });
|
|
1354
|
-
let
|
|
1355
|
-
return /*#__PURE__*/
|
|
1356
|
-
/*#__PURE__*/
|
|
1354
|
+
let B = C ? 6 : 5, V = C ? "40px minmax(200px, 2fr) minmax(100px, 1fr) minmax(180px, 2fr) minmax(100px, 1fr) 60px" : "minmax(200px, 2fr) minmax(100px, 1fr) minmax(180px, 2fr) minmax(100px, 1fr) 60px";
|
|
1355
|
+
return /*#__PURE__*/ U(oe, { children: [
|
|
1356
|
+
/*#__PURE__*/ U("div", {
|
|
1357
1357
|
className: "relative",
|
|
1358
|
-
children: [/*#__PURE__*/
|
|
1358
|
+
children: [/*#__PURE__*/ H("div", {
|
|
1359
1359
|
style: { paddingRight: `${M}px` },
|
|
1360
|
-
children: /*#__PURE__*/
|
|
1361
|
-
columns:
|
|
1362
|
-
gridColumnTemplate:
|
|
1360
|
+
children: /*#__PURE__*/ H(u, {
|
|
1361
|
+
columns: B,
|
|
1362
|
+
gridColumnTemplate: V,
|
|
1363
1363
|
className: "containers",
|
|
1364
1364
|
"data-testid": "containers-table-header",
|
|
1365
|
-
children: /*#__PURE__*/
|
|
1366
|
-
C && /*#__PURE__*/
|
|
1367
|
-
/*#__PURE__*/
|
|
1368
|
-
/*#__PURE__*/
|
|
1369
|
-
/*#__PURE__*/
|
|
1370
|
-
/*#__PURE__*/
|
|
1371
|
-
/*#__PURE__*/
|
|
1365
|
+
children: /*#__PURE__*/ U(i, { children: [
|
|
1366
|
+
C && /*#__PURE__*/ H(d, {}),
|
|
1367
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "t0X9+8" }) }),
|
|
1368
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "sxbP3b" }) }),
|
|
1369
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "sjMCOP" }) }),
|
|
1370
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "hgpMHD" }) }),
|
|
1371
|
+
/*#__PURE__*/ H(d, { style: { marginRight: `-${M}px` } })
|
|
1372
1372
|
] })
|
|
1373
1373
|
})
|
|
1374
|
-
}), /*#__PURE__*/
|
|
1374
|
+
}), /*#__PURE__*/ H("div", {
|
|
1375
1375
|
ref: j,
|
|
1376
1376
|
className: "overflow-auto",
|
|
1377
1377
|
style: { height: "calc(100vh - 490px)" },
|
|
1378
1378
|
"data-testid": "containers-table-body",
|
|
1379
|
-
children: /*#__PURE__*/
|
|
1379
|
+
children: /*#__PURE__*/ H("div", {
|
|
1380
1380
|
style: {
|
|
1381
|
-
height: `${
|
|
1381
|
+
height: `${ie.getTotalSize()}px`,
|
|
1382
1382
|
width: "100%",
|
|
1383
1383
|
position: "relative"
|
|
1384
1384
|
},
|
|
1385
|
-
children:
|
|
1385
|
+
children: ie.getVirtualItems().map((n) => {
|
|
1386
1386
|
let r = e[n.index], i = x.includes(r.name), a = () => A({
|
|
1387
1387
|
to: "/projects/$projectId/storage/$provider/$storageType/$containerName/objects",
|
|
1388
1388
|
params: {
|
|
@@ -1392,9 +1392,9 @@ var ke = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1392
1392
|
containerName: r.name
|
|
1393
1393
|
}
|
|
1394
1394
|
});
|
|
1395
|
-
return /*#__PURE__*/
|
|
1395
|
+
return /*#__PURE__*/ U("div", {
|
|
1396
1396
|
"data-index": n.index,
|
|
1397
|
-
ref:
|
|
1397
|
+
ref: ie.measureElement,
|
|
1398
1398
|
className: "juno-datagrid group hover:bg-theme-background-lvl-1 cursor-pointer",
|
|
1399
1399
|
style: {
|
|
1400
1400
|
position: "absolute",
|
|
@@ -1403,7 +1403,7 @@ var ke = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1403
1403
|
width: "100%",
|
|
1404
1404
|
transform: `translateY(${n.start}px)`,
|
|
1405
1405
|
display: "grid",
|
|
1406
|
-
gridTemplateColumns:
|
|
1406
|
+
gridTemplateColumns: V,
|
|
1407
1407
|
alignItems: "stretch"
|
|
1408
1408
|
},
|
|
1409
1409
|
"data-testid": `container-row-${r.name}`,
|
|
@@ -1414,49 +1414,49 @@ var ke = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1414
1414
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
1415
1415
|
},
|
|
1416
1416
|
children: [
|
|
1417
|
-
C && /*#__PURE__*/
|
|
1417
|
+
C && /*#__PURE__*/ H(o, {
|
|
1418
1418
|
onClick: (e) => e.stopPropagation(),
|
|
1419
1419
|
onKeyDown: (e) => {
|
|
1420
1420
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
1421
1421
|
},
|
|
1422
|
-
children: /*#__PURE__*/
|
|
1422
|
+
children: /*#__PURE__*/ H(b, {
|
|
1423
1423
|
checked: i,
|
|
1424
|
-
onChange: () =>
|
|
1424
|
+
onChange: () => ae(r.name),
|
|
1425
1425
|
"data-testid": `select-container-${r.name}`
|
|
1426
1426
|
})
|
|
1427
1427
|
}),
|
|
1428
|
-
/*#__PURE__*/
|
|
1428
|
+
/*#__PURE__*/ H(o, {
|
|
1429
1429
|
className: "min-w-0 overflow-hidden",
|
|
1430
|
-
children: /*#__PURE__*/
|
|
1430
|
+
children: /*#__PURE__*/ H("span", {
|
|
1431
1431
|
className: "block truncate",
|
|
1432
1432
|
title: r.name,
|
|
1433
1433
|
children: r.name
|
|
1434
1434
|
})
|
|
1435
1435
|
}),
|
|
1436
|
-
/*#__PURE__*/
|
|
1437
|
-
/*#__PURE__*/
|
|
1438
|
-
/*#__PURE__*/
|
|
1439
|
-
/*#__PURE__*/
|
|
1436
|
+
/*#__PURE__*/ H(o, { children: r.count.toLocaleString() }),
|
|
1437
|
+
/*#__PURE__*/ H(o, { children: r.last_modified ? z(r.last_modified) : O._({ id: "fj5byd" }) }),
|
|
1438
|
+
/*#__PURE__*/ H(o, { children: I(r.bytes) }),
|
|
1439
|
+
/*#__PURE__*/ H(o, {
|
|
1440
1440
|
onClick: (e) => e.stopPropagation(),
|
|
1441
|
-
children: /*#__PURE__*/
|
|
1442
|
-
/*#__PURE__*/
|
|
1441
|
+
children: /*#__PURE__*/ H(T, { children: /*#__PURE__*/ U(t, { children: [
|
|
1442
|
+
/*#__PURE__*/ H(m, {
|
|
1443
1443
|
label: O._({ id: "cWbW6w" }),
|
|
1444
|
-
onClick: () =>
|
|
1444
|
+
onClick: () => re(r),
|
|
1445
1445
|
"data-testid": `access-control-action-${r.name}`
|
|
1446
1446
|
}),
|
|
1447
|
-
/*#__PURE__*/
|
|
1447
|
+
/*#__PURE__*/ H(m, {
|
|
1448
1448
|
label: O._({ id: "Oc8Aqv" }),
|
|
1449
|
-
onClick: () =>
|
|
1449
|
+
onClick: () => te(r),
|
|
1450
1450
|
"data-testid": `properties-action-${r.name}`
|
|
1451
1451
|
}),
|
|
1452
|
-
/*#__PURE__*/
|
|
1452
|
+
/*#__PURE__*/ H(m, {
|
|
1453
1453
|
label: O._({ id: "N2S1rs" }),
|
|
1454
|
-
onClick: () =>
|
|
1454
|
+
onClick: () => F(r),
|
|
1455
1455
|
"data-testid": `empty-action-${r.name}`
|
|
1456
1456
|
}),
|
|
1457
|
-
/*#__PURE__*/
|
|
1457
|
+
/*#__PURE__*/ H(m, {
|
|
1458
1458
|
label: O._({ id: "cnGeoo" }),
|
|
1459
|
-
onClick: () =>
|
|
1459
|
+
onClick: () => ee(r),
|
|
1460
1460
|
"data-testid": `delete-action-${r.name}`
|
|
1461
1461
|
})
|
|
1462
1462
|
] }) })
|
|
@@ -1467,38 +1467,38 @@ var ke = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1467
1467
|
})
|
|
1468
1468
|
})]
|
|
1469
1469
|
}),
|
|
1470
|
-
/*#__PURE__*/
|
|
1470
|
+
/*#__PURE__*/ H(ge, {
|
|
1471
1471
|
isOpen: n,
|
|
1472
1472
|
onClose: () => r(!1),
|
|
1473
1473
|
onSuccess: s,
|
|
1474
1474
|
onError: c,
|
|
1475
1475
|
maxContainerNameLength: a
|
|
1476
1476
|
}),
|
|
1477
|
-
/*#__PURE__*/
|
|
1477
|
+
/*#__PURE__*/ H(J, {
|
|
1478
1478
|
isOpen: P !== null,
|
|
1479
1479
|
container: P,
|
|
1480
|
-
onClose: () =>
|
|
1480
|
+
onClose: () => F(null),
|
|
1481
1481
|
onSuccess: l,
|
|
1482
1482
|
onError: f
|
|
1483
1483
|
}),
|
|
1484
|
-
/*#__PURE__*/
|
|
1485
|
-
isOpen:
|
|
1486
|
-
container:
|
|
1487
|
-
onClose: () =>
|
|
1484
|
+
/*#__PURE__*/ H(_e, {
|
|
1485
|
+
isOpen: L !== null,
|
|
1486
|
+
container: L,
|
|
1487
|
+
onClose: () => ee(null),
|
|
1488
1488
|
onSuccess: p,
|
|
1489
1489
|
onError: h
|
|
1490
1490
|
}),
|
|
1491
|
-
/*#__PURE__*/
|
|
1492
|
-
isOpen:
|
|
1493
|
-
container:
|
|
1494
|
-
onClose: () =>
|
|
1491
|
+
/*#__PURE__*/ H(Y, {
|
|
1492
|
+
isOpen: R !== null,
|
|
1493
|
+
container: R,
|
|
1494
|
+
onClose: () => te(null),
|
|
1495
1495
|
onSuccess: g,
|
|
1496
1496
|
onError: _
|
|
1497
1497
|
}),
|
|
1498
|
-
/*#__PURE__*/
|
|
1499
|
-
isOpen:
|
|
1500
|
-
container:
|
|
1501
|
-
onClose: () =>
|
|
1498
|
+
/*#__PURE__*/ H(Ee, {
|
|
1499
|
+
isOpen: ne !== null,
|
|
1500
|
+
container: ne,
|
|
1501
|
+
onClose: () => re(null),
|
|
1502
1502
|
onSuccess: v,
|
|
1503
1503
|
onError: y
|
|
1504
1504
|
})
|
|
@@ -1506,11 +1506,11 @@ var ke = ({ containers: e, createModalOpen: n, setCreateModalOpen: r, maxContain
|
|
|
1506
1506
|
};
|
|
1507
1507
|
//#endregion
|
|
1508
1508
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Swift/Containers/ContainerToastNotifications.tsx
|
|
1509
|
-
function
|
|
1510
|
-
return /*#__PURE__*/
|
|
1509
|
+
function Q({ title: e, description: t }) {
|
|
1510
|
+
return /*#__PURE__*/ U(O, {
|
|
1511
1511
|
direction: "vertical",
|
|
1512
1512
|
gap: "1.5",
|
|
1513
|
-
children: [/*#__PURE__*/
|
|
1513
|
+
children: [/*#__PURE__*/ H("span", { children: e }), /*#__PURE__*/ H("span", {
|
|
1514
1514
|
className: "text-theme-light",
|
|
1515
1515
|
children: t
|
|
1516
1516
|
})]
|
|
@@ -1518,9 +1518,9 @@ function Z({ title: e, description: t }) {
|
|
|
1518
1518
|
}
|
|
1519
1519
|
var Ae = (e, t) => ({
|
|
1520
1520
|
variant: "success",
|
|
1521
|
-
children: /*#__PURE__*/
|
|
1522
|
-
title: /*#__PURE__*/
|
|
1523
|
-
description: /*#__PURE__*/
|
|
1521
|
+
children: /*#__PURE__*/ H(Q, {
|
|
1522
|
+
title: /*#__PURE__*/ H(G, { id: "6w+VnM" }),
|
|
1523
|
+
description: /*#__PURE__*/ H(G, {
|
|
1524
1524
|
id: "XwxJJB",
|
|
1525
1525
|
values: { containerName: e }
|
|
1526
1526
|
})
|
|
@@ -1528,9 +1528,9 @@ var Ae = (e, t) => ({
|
|
|
1528
1528
|
onDismiss: t.onDismiss
|
|
1529
1529
|
}), je = (e, t, n) => ({
|
|
1530
1530
|
variant: "error",
|
|
1531
|
-
children: /*#__PURE__*/
|
|
1532
|
-
title: /*#__PURE__*/
|
|
1533
|
-
description: /*#__PURE__*/
|
|
1531
|
+
children: /*#__PURE__*/ H(Q, {
|
|
1532
|
+
title: /*#__PURE__*/ H(G, { id: "Vj8XFg" }),
|
|
1533
|
+
description: /*#__PURE__*/ H(G, {
|
|
1534
1534
|
id: "Vz+7ZA",
|
|
1535
1535
|
values: {
|
|
1536
1536
|
containerName: e,
|
|
@@ -1541,18 +1541,18 @@ var Ae = (e, t) => ({
|
|
|
1541
1541
|
onDismiss: n.onDismiss
|
|
1542
1542
|
}), Me = (e, t, n) => ({
|
|
1543
1543
|
variant: "success",
|
|
1544
|
-
children: /*#__PURE__*/
|
|
1545
|
-
title: /*#__PURE__*/
|
|
1546
|
-
description: t === 0 ? /*#__PURE__*/
|
|
1544
|
+
children: /*#__PURE__*/ H(Q, {
|
|
1545
|
+
title: /*#__PURE__*/ H(G, { id: "6OopEX" }),
|
|
1546
|
+
description: t === 0 ? /*#__PURE__*/ H(G, {
|
|
1547
1547
|
id: "nkpZyk",
|
|
1548
1548
|
values: { containerName: e }
|
|
1549
|
-
}) : t === 1 ? /*#__PURE__*/
|
|
1549
|
+
}) : t === 1 ? /*#__PURE__*/ H(G, {
|
|
1550
1550
|
id: "TZJiVf",
|
|
1551
1551
|
values: {
|
|
1552
1552
|
containerName: e,
|
|
1553
1553
|
deletedCount: t
|
|
1554
1554
|
}
|
|
1555
|
-
}) : /*#__PURE__*/
|
|
1555
|
+
}) : /*#__PURE__*/ H(G, {
|
|
1556
1556
|
id: "Sb/VT5",
|
|
1557
1557
|
values: {
|
|
1558
1558
|
containerName: e,
|
|
@@ -1563,9 +1563,9 @@ var Ae = (e, t) => ({
|
|
|
1563
1563
|
onDismiss: n.onDismiss
|
|
1564
1564
|
}), Ne = (e, t, n) => ({
|
|
1565
1565
|
variant: "error",
|
|
1566
|
-
children: /*#__PURE__*/
|
|
1567
|
-
title: /*#__PURE__*/
|
|
1568
|
-
description: /*#__PURE__*/
|
|
1566
|
+
children: /*#__PURE__*/ H(Q, {
|
|
1567
|
+
title: /*#__PURE__*/ H(G, { id: "S8/j2h" }),
|
|
1568
|
+
description: /*#__PURE__*/ H(G, {
|
|
1569
1569
|
id: "1rLu3+",
|
|
1570
1570
|
values: {
|
|
1571
1571
|
containerName: e,
|
|
@@ -1576,9 +1576,9 @@ var Ae = (e, t) => ({
|
|
|
1576
1576
|
onDismiss: n.onDismiss
|
|
1577
1577
|
}), Pe = (e, t) => ({
|
|
1578
1578
|
variant: "success",
|
|
1579
|
-
children: /*#__PURE__*/
|
|
1580
|
-
title: /*#__PURE__*/
|
|
1581
|
-
description: /*#__PURE__*/
|
|
1579
|
+
children: /*#__PURE__*/ H(Q, {
|
|
1580
|
+
title: /*#__PURE__*/ H(G, { id: "odVI9Y" }),
|
|
1581
|
+
description: /*#__PURE__*/ H(G, {
|
|
1582
1582
|
id: "V1TzeS",
|
|
1583
1583
|
values: { containerName: e }
|
|
1584
1584
|
})
|
|
@@ -1586,9 +1586,9 @@ var Ae = (e, t) => ({
|
|
|
1586
1586
|
onDismiss: t.onDismiss
|
|
1587
1587
|
}), Fe = (e, t, n) => ({
|
|
1588
1588
|
variant: "error",
|
|
1589
|
-
children: /*#__PURE__*/
|
|
1590
|
-
title: /*#__PURE__*/
|
|
1591
|
-
description: /*#__PURE__*/
|
|
1589
|
+
children: /*#__PURE__*/ H(Q, {
|
|
1590
|
+
title: /*#__PURE__*/ H(G, { id: "BJt+PJ" }),
|
|
1591
|
+
description: /*#__PURE__*/ H(G, {
|
|
1592
1592
|
id: "RGrgxg",
|
|
1593
1593
|
values: {
|
|
1594
1594
|
containerName: e,
|
|
@@ -1599,9 +1599,9 @@ var Ae = (e, t) => ({
|
|
|
1599
1599
|
onDismiss: n.onDismiss
|
|
1600
1600
|
}), Ie = (e, t) => ({
|
|
1601
1601
|
variant: "success",
|
|
1602
|
-
children: /*#__PURE__*/
|
|
1603
|
-
title: /*#__PURE__*/
|
|
1604
|
-
description: /*#__PURE__*/
|
|
1602
|
+
children: /*#__PURE__*/ H(Q, {
|
|
1603
|
+
title: /*#__PURE__*/ H(G, { id: "a7C4YS" }),
|
|
1604
|
+
description: /*#__PURE__*/ H(G, {
|
|
1605
1605
|
id: "/NeNjH",
|
|
1606
1606
|
values: { containerName: e }
|
|
1607
1607
|
})
|
|
@@ -1609,9 +1609,9 @@ var Ae = (e, t) => ({
|
|
|
1609
1609
|
onDismiss: t.onDismiss
|
|
1610
1610
|
}), Le = (e, t, n) => ({
|
|
1611
1611
|
variant: "error",
|
|
1612
|
-
children: /*#__PURE__*/
|
|
1613
|
-
title: /*#__PURE__*/
|
|
1614
|
-
description: /*#__PURE__*/
|
|
1612
|
+
children: /*#__PURE__*/ H(Q, {
|
|
1613
|
+
title: /*#__PURE__*/ H(G, { id: "5MF8U2" }),
|
|
1614
|
+
description: /*#__PURE__*/ H(G, {
|
|
1615
1615
|
id: "uLtFAr",
|
|
1616
1616
|
values: {
|
|
1617
1617
|
containerName: e,
|
|
@@ -1622,9 +1622,9 @@ var Ae = (e, t) => ({
|
|
|
1622
1622
|
onDismiss: n.onDismiss
|
|
1623
1623
|
}), Re = (e, t) => ({
|
|
1624
1624
|
variant: "success",
|
|
1625
|
-
children: /*#__PURE__*/
|
|
1626
|
-
title: /*#__PURE__*/
|
|
1627
|
-
description: /*#__PURE__*/
|
|
1625
|
+
children: /*#__PURE__*/ H(Q, {
|
|
1626
|
+
title: /*#__PURE__*/ H(G, { id: "olfSYj" }),
|
|
1627
|
+
description: /*#__PURE__*/ H(G, {
|
|
1628
1628
|
id: "tM5SEI",
|
|
1629
1629
|
values: { containerName: e }
|
|
1630
1630
|
})
|
|
@@ -1632,9 +1632,9 @@ var Ae = (e, t) => ({
|
|
|
1632
1632
|
onDismiss: t.onDismiss
|
|
1633
1633
|
}), ze = (e, t, n) => ({
|
|
1634
1634
|
variant: "error",
|
|
1635
|
-
children: /*#__PURE__*/
|
|
1636
|
-
title: /*#__PURE__*/
|
|
1637
|
-
description: /*#__PURE__*/
|
|
1635
|
+
children: /*#__PURE__*/ H(Q, {
|
|
1636
|
+
title: /*#__PURE__*/ H(G, { id: "p7DzCB" }),
|
|
1637
|
+
description: /*#__PURE__*/ H(G, {
|
|
1638
1638
|
id: "DcMIiu",
|
|
1639
1639
|
values: {
|
|
1640
1640
|
containerName: e,
|
|
@@ -1647,20 +1647,20 @@ var Ae = (e, t) => ({
|
|
|
1647
1647
|
let i = n.length > 0, a = e > 0, o = i && a;
|
|
1648
1648
|
return {
|
|
1649
1649
|
variant: o ? "warning" : i ? "error" : "success",
|
|
1650
|
-
children: /*#__PURE__*/
|
|
1651
|
-
title: o ? /*#__PURE__*/
|
|
1652
|
-
description: /*#__PURE__*/
|
|
1650
|
+
children: /*#__PURE__*/ H(Q, {
|
|
1651
|
+
title: o ? /*#__PURE__*/ H(G, { id: "q44uUq" }) : i ? /*#__PURE__*/ H(G, { id: "wFaT8w" }) : /*#__PURE__*/ H(G, { id: "0WsqO0" }),
|
|
1652
|
+
description: /*#__PURE__*/ U(O, {
|
|
1653
1653
|
direction: "vertical",
|
|
1654
1654
|
gap: "1",
|
|
1655
|
-
children: [a && /*#__PURE__*/
|
|
1655
|
+
children: [a && /*#__PURE__*/ H("span", { children: /*#__PURE__*/ H(G, {
|
|
1656
1656
|
id: "1NS3nd",
|
|
1657
1657
|
values: {
|
|
1658
1658
|
emptiedCount: e,
|
|
1659
1659
|
totalDeleted: t
|
|
1660
1660
|
}
|
|
1661
|
-
}) }), i && /*#__PURE__*/
|
|
1661
|
+
}) }), i && /*#__PURE__*/ H("span", {
|
|
1662
1662
|
className: "whitespace-pre-line",
|
|
1663
|
-
children: /*#__PURE__*/
|
|
1663
|
+
children: /*#__PURE__*/ H(G, {
|
|
1664
1664
|
id: "JrmKyf",
|
|
1665
1665
|
values: { errorDetails: n.join("\n") }
|
|
1666
1666
|
})
|
|
@@ -1669,30 +1669,30 @@ var Ae = (e, t) => ({
|
|
|
1669
1669
|
}),
|
|
1670
1670
|
onDismiss: r.onDismiss
|
|
1671
1671
|
};
|
|
1672
|
-
},
|
|
1672
|
+
}, $ = ({ label: e, value: t }) => t == null ? null : /*#__PURE__*/ U("span", {
|
|
1673
1673
|
className: "flex items-start gap-1.5",
|
|
1674
|
-
children: [/*#__PURE__*/
|
|
1674
|
+
children: [/*#__PURE__*/ H(_, {
|
|
1675
1675
|
icon: "check",
|
|
1676
1676
|
size: "16px",
|
|
1677
1677
|
className: "text-theme-success mt-0.5 shrink-0"
|
|
1678
|
-
}), /*#__PURE__*/
|
|
1679
|
-
/*#__PURE__*/
|
|
1678
|
+
}), /*#__PURE__*/ U("span", { children: [
|
|
1679
|
+
/*#__PURE__*/ U("span", {
|
|
1680
1680
|
className: "font-medium",
|
|
1681
1681
|
children: [e, ":"]
|
|
1682
1682
|
}),
|
|
1683
1683
|
" ",
|
|
1684
1684
|
t
|
|
1685
1685
|
] })]
|
|
1686
|
-
}), Ve = ({ label: e }) => /*#__PURE__*/
|
|
1686
|
+
}), Ve = ({ label: e }) => /*#__PURE__*/ U("span", {
|
|
1687
1687
|
className: "flex items-start gap-1.5",
|
|
1688
|
-
children: [/*#__PURE__*/
|
|
1688
|
+
children: [/*#__PURE__*/ H(_, {
|
|
1689
1689
|
icon: "check",
|
|
1690
1690
|
size: "16px",
|
|
1691
1691
|
className: "text-theme-success mt-0.5 shrink-0"
|
|
1692
|
-
}), /*#__PURE__*/
|
|
1693
|
-
}), He = ({ title: e, children: t }) => /*#__PURE__*/
|
|
1692
|
+
}), /*#__PURE__*/ H("span", { children: e })]
|
|
1693
|
+
}), He = ({ title: e, children: t }) => /*#__PURE__*/ U("span", {
|
|
1694
1694
|
className: "flex flex-col gap-1.5",
|
|
1695
|
-
children: [/*#__PURE__*/
|
|
1695
|
+
children: [/*#__PURE__*/ H("span", {
|
|
1696
1696
|
className: "text-theme-default block font-semibold",
|
|
1697
1697
|
children: e
|
|
1698
1698
|
}), t]
|
|
@@ -1708,110 +1708,110 @@ var Ae = (e, t) => ({
|
|
|
1708
1708
|
symlink: r._({ id: "Q2xmVl" }),
|
|
1709
1709
|
versioned_writes: r._({ id: "8jLXs3" })
|
|
1710
1710
|
}, s = Object.entries(o).filter(([e]) => a?.[e]).map(([, e]) => e);
|
|
1711
|
-
return /*#__PURE__*/
|
|
1711
|
+
return /*#__PURE__*/ U(S, {
|
|
1712
1712
|
triggerEvent: "hover",
|
|
1713
1713
|
placement: "bottom-end",
|
|
1714
1714
|
open: n,
|
|
1715
|
-
children: [/*#__PURE__*/
|
|
1715
|
+
children: [/*#__PURE__*/ H(E, {
|
|
1716
1716
|
asChild: !0,
|
|
1717
|
-
children: /*#__PURE__*/
|
|
1717
|
+
children: /*#__PURE__*/ H(_, {
|
|
1718
1718
|
icon: "info",
|
|
1719
1719
|
size: "20px",
|
|
1720
1720
|
className: "text-theme-light hover:text-theme-default cursor-pointer"
|
|
1721
1721
|
})
|
|
1722
|
-
}), /*#__PURE__*/
|
|
1722
|
+
}), /*#__PURE__*/ H(y, {
|
|
1723
1723
|
className: "z-10 w-72 text-sm",
|
|
1724
|
-
children: /*#__PURE__*/
|
|
1724
|
+
children: /*#__PURE__*/ U("span", {
|
|
1725
1725
|
className: "flex flex-col gap-3 p-1",
|
|
1726
1726
|
children: [
|
|
1727
|
-
t && /*#__PURE__*/
|
|
1728
|
-
title: /*#__PURE__*/
|
|
1727
|
+
t && /*#__PURE__*/ U(He, {
|
|
1728
|
+
title: /*#__PURE__*/ H(G, { id: "AeXO77" }),
|
|
1729
1729
|
children: [
|
|
1730
|
-
/*#__PURE__*/
|
|
1730
|
+
/*#__PURE__*/ H($, {
|
|
1731
1731
|
label: r._({ id: "ClGcRq" }),
|
|
1732
1732
|
value: t.containerCount.toLocaleString()
|
|
1733
1733
|
}),
|
|
1734
|
-
/*#__PURE__*/
|
|
1734
|
+
/*#__PURE__*/ H($, {
|
|
1735
1735
|
label: r._({ id: "B3toQF" }),
|
|
1736
1736
|
value: t.objectCount.toLocaleString()
|
|
1737
1737
|
}),
|
|
1738
|
-
/*#__PURE__*/
|
|
1738
|
+
/*#__PURE__*/ H($, {
|
|
1739
1739
|
label: r._({ id: "aL1w5Z" }),
|
|
1740
|
-
value:
|
|
1740
|
+
value: I(t.bytesUsed)
|
|
1741
1741
|
}),
|
|
1742
|
-
t.quotaBytes !== void 0 && /*#__PURE__*/
|
|
1742
|
+
t.quotaBytes !== void 0 && /*#__PURE__*/ H($, {
|
|
1743
1743
|
label: r._({ id: "vEkTR9" }),
|
|
1744
|
-
value:
|
|
1744
|
+
value: I(t.quotaBytes)
|
|
1745
1745
|
})
|
|
1746
1746
|
]
|
|
1747
1747
|
}),
|
|
1748
|
-
a && /*#__PURE__*/
|
|
1749
|
-
title: /*#__PURE__*/
|
|
1748
|
+
a && /*#__PURE__*/ U(He, {
|
|
1749
|
+
title: /*#__PURE__*/ H(G, { id: "6BDqha" }),
|
|
1750
1750
|
children: [
|
|
1751
|
-
/*#__PURE__*/
|
|
1751
|
+
/*#__PURE__*/ H($, {
|
|
1752
1752
|
label: r._({ id: "wTg+FY" }),
|
|
1753
|
-
value: a.max_file_size === void 0 ? void 0 :
|
|
1753
|
+
value: a.max_file_size === void 0 ? void 0 : I(a.max_file_size)
|
|
1754
1754
|
}),
|
|
1755
|
-
/*#__PURE__*/
|
|
1755
|
+
/*#__PURE__*/ H($, {
|
|
1756
1756
|
label: r._({ id: "Rih53k" }),
|
|
1757
1757
|
value: a.max_container_name_length
|
|
1758
1758
|
}),
|
|
1759
|
-
/*#__PURE__*/
|
|
1759
|
+
/*#__PURE__*/ H($, {
|
|
1760
1760
|
label: r._({ id: "qAkkjP" }),
|
|
1761
1761
|
value: a.max_object_name_length
|
|
1762
1762
|
}),
|
|
1763
|
-
/*#__PURE__*/
|
|
1763
|
+
/*#__PURE__*/ H($, {
|
|
1764
1764
|
label: r._({ id: "OZImTR" }),
|
|
1765
1765
|
value: a.container_listing_limit?.toLocaleString()
|
|
1766
1766
|
}),
|
|
1767
|
-
/*#__PURE__*/
|
|
1767
|
+
/*#__PURE__*/ H($, {
|
|
1768
1768
|
label: r._({ id: "a4A2uB" }),
|
|
1769
1769
|
value: a.account_listing_limit?.toLocaleString()
|
|
1770
1770
|
}),
|
|
1771
|
-
/*#__PURE__*/
|
|
1771
|
+
/*#__PURE__*/ H($, {
|
|
1772
1772
|
label: r._({ id: "zWb/Nn" }),
|
|
1773
1773
|
value: a.max_header_size
|
|
1774
1774
|
}),
|
|
1775
|
-
/*#__PURE__*/
|
|
1775
|
+
/*#__PURE__*/ H($, {
|
|
1776
1776
|
label: r._({ id: "RGwfoL" }),
|
|
1777
1777
|
value: a.max_meta_count
|
|
1778
1778
|
}),
|
|
1779
|
-
/*#__PURE__*/
|
|
1779
|
+
/*#__PURE__*/ H($, {
|
|
1780
1780
|
label: r._({ id: "8c3/77" }),
|
|
1781
1781
|
value: a.max_meta_name_length
|
|
1782
1782
|
}),
|
|
1783
|
-
/*#__PURE__*/
|
|
1783
|
+
/*#__PURE__*/ H($, {
|
|
1784
1784
|
label: r._({ id: "5JDSvn" }),
|
|
1785
1785
|
value: a.max_meta_value_length
|
|
1786
1786
|
}),
|
|
1787
|
-
/*#__PURE__*/
|
|
1787
|
+
/*#__PURE__*/ H($, {
|
|
1788
1788
|
label: r._({ id: "ZAx+d1" }),
|
|
1789
1789
|
value: a.max_meta_overall_size
|
|
1790
1790
|
}),
|
|
1791
|
-
a.bulk_delete && /*#__PURE__*/
|
|
1791
|
+
a.bulk_delete && /*#__PURE__*/ H($, {
|
|
1792
1792
|
label: r._({ id: "lQ3EIe" }),
|
|
1793
1793
|
value: a.bulk_delete.max_deletes_per_request.toLocaleString()
|
|
1794
1794
|
}),
|
|
1795
|
-
a.bulk_upload && /*#__PURE__*/
|
|
1795
|
+
a.bulk_upload && /*#__PURE__*/ H($, {
|
|
1796
1796
|
label: r._({ id: "STc+7E" }),
|
|
1797
1797
|
value: a.bulk_upload.max_containers_per_extraction.toLocaleString()
|
|
1798
1798
|
}),
|
|
1799
|
-
a.slo && /*#__PURE__*/
|
|
1799
|
+
a.slo && /*#__PURE__*/ H($, {
|
|
1800
1800
|
label: r._({ id: "RNBvdl" }),
|
|
1801
1801
|
value: a.slo.max_manifest_segments.toLocaleString()
|
|
1802
1802
|
})
|
|
1803
1803
|
]
|
|
1804
1804
|
}),
|
|
1805
|
-
s.length > 0 && /*#__PURE__*/
|
|
1806
|
-
title: /*#__PURE__*/
|
|
1807
|
-
children: s.map((e) => /*#__PURE__*/
|
|
1805
|
+
s.length > 0 && /*#__PURE__*/ H(He, {
|
|
1806
|
+
title: /*#__PURE__*/ H(G, { id: "Qx7DM7" }),
|
|
1807
|
+
children: s.map((e) => /*#__PURE__*/ H(Ve, { label: e }, e))
|
|
1808
1808
|
})
|
|
1809
1809
|
]
|
|
1810
1810
|
})
|
|
1811
1811
|
})]
|
|
1812
1812
|
});
|
|
1813
|
-
}, We = 20,
|
|
1814
|
-
let { i18n: c, i18n: l, _: u } = K(), d =
|
|
1813
|
+
}, We = 20, Ge = "empty", Ke = ({ isOpen: e, containers: t, onClose: i, onComplete: o }) => {
|
|
1814
|
+
let { i18n: c, i18n: l, _: u } = K(), d = L(), [p, m] = W(null), [h, g] = W(""), _ = h.trim() === Ge, v = M.useUtils(), y = M.storage.swift.emptyContainer.useMutation(), b = () => {
|
|
1815
1815
|
y.reset(), m(null), g(""), i();
|
|
1816
1816
|
}, x = async () => {
|
|
1817
1817
|
let e = 0, n = 0, r = [], i = t.length;
|
|
@@ -1840,8 +1840,8 @@ var Ae = (e, t) => ({
|
|
|
1840
1840
|
};
|
|
1841
1841
|
if (!e || t.length === 0) return null;
|
|
1842
1842
|
let S = t.length, T = t.slice(0, We), E = S - T.length, D = y.isPending || p !== null, k = p?.current, A = p?.total;
|
|
1843
|
-
return /*#__PURE__*/
|
|
1844
|
-
title: /*#__PURE__*/
|
|
1843
|
+
return /*#__PURE__*/ H(w, {
|
|
1844
|
+
title: /*#__PURE__*/ H(G, {
|
|
1845
1845
|
id: "0efWir",
|
|
1846
1846
|
values: { totalCount: S }
|
|
1847
1847
|
}),
|
|
@@ -1855,15 +1855,15 @@ var Ae = (e, t) => ({
|
|
|
1855
1855
|
disableCancelButton: D,
|
|
1856
1856
|
disableCloseButton: D,
|
|
1857
1857
|
size: "small",
|
|
1858
|
-
children: D ? /*#__PURE__*/
|
|
1858
|
+
children: D ? /*#__PURE__*/ U(O, {
|
|
1859
1859
|
direction: "vertical",
|
|
1860
1860
|
distribution: "center",
|
|
1861
1861
|
alignment: "center",
|
|
1862
1862
|
gap: "2",
|
|
1863
1863
|
className: "py-4",
|
|
1864
|
-
children: [/*#__PURE__*/
|
|
1864
|
+
children: [/*#__PURE__*/ H(s, { variant: "primary" }), p && /*#__PURE__*/ H("p", {
|
|
1865
1865
|
className: "text-theme-light text-sm",
|
|
1866
|
-
children: /*#__PURE__*/
|
|
1866
|
+
children: /*#__PURE__*/ H(G, {
|
|
1867
1867
|
id: "7NSdfG",
|
|
1868
1868
|
values: {
|
|
1869
1869
|
progressCurrent: k,
|
|
@@ -1871,49 +1871,49 @@ var Ae = (e, t) => ({
|
|
|
1871
1871
|
}
|
|
1872
1872
|
})
|
|
1873
1873
|
})]
|
|
1874
|
-
}) : /*#__PURE__*/
|
|
1874
|
+
}) : /*#__PURE__*/ U("div", {
|
|
1875
1875
|
className: "my-6",
|
|
1876
1876
|
children: [
|
|
1877
|
-
/*#__PURE__*/
|
|
1877
|
+
/*#__PURE__*/ H(n, {
|
|
1878
1878
|
variant: "danger",
|
|
1879
1879
|
className: "mb-6",
|
|
1880
|
-
children: /*#__PURE__*/
|
|
1880
|
+
children: /*#__PURE__*/ H(G, { id: "JuOpPY" })
|
|
1881
1881
|
}),
|
|
1882
|
-
/*#__PURE__*/
|
|
1882
|
+
/*#__PURE__*/ H("p", {
|
|
1883
1883
|
className: "text-theme-default mb-6 text-sm",
|
|
1884
|
-
children: /*#__PURE__*/
|
|
1884
|
+
children: /*#__PURE__*/ H(G, {
|
|
1885
1885
|
id: "XXjbEV",
|
|
1886
1886
|
components: {
|
|
1887
|
-
0: /*#__PURE__*/
|
|
1888
|
-
1: /*#__PURE__*/
|
|
1887
|
+
0: /*#__PURE__*/ H("strong", {}),
|
|
1888
|
+
1: /*#__PURE__*/ H("strong", {})
|
|
1889
1889
|
}
|
|
1890
1890
|
})
|
|
1891
1891
|
}),
|
|
1892
|
-
/*#__PURE__*/
|
|
1892
|
+
/*#__PURE__*/ U("div", {
|
|
1893
1893
|
className: "mb-6",
|
|
1894
|
-
children: [/*#__PURE__*/
|
|
1894
|
+
children: [/*#__PURE__*/ H("h3", {
|
|
1895
1895
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
1896
|
-
children: /*#__PURE__*/
|
|
1896
|
+
children: /*#__PURE__*/ H(G, {
|
|
1897
1897
|
id: "VKmlZ+",
|
|
1898
1898
|
values: { totalCount: S }
|
|
1899
1899
|
})
|
|
1900
|
-
}), /*#__PURE__*/
|
|
1900
|
+
}), /*#__PURE__*/ U("div", {
|
|
1901
1901
|
className: "jn:bg-theme-background-lvl-1 max-h-48 overflow-y-auto rounded p-4",
|
|
1902
|
-
children: [/*#__PURE__*/
|
|
1902
|
+
children: [/*#__PURE__*/ H(a, {
|
|
1903
1903
|
className: "grid-cols-2",
|
|
1904
1904
|
alignTerms: "left",
|
|
1905
1905
|
children: T.map((e) => {
|
|
1906
1906
|
let t = e.count;
|
|
1907
|
-
return /*#__PURE__*/
|
|
1907
|
+
return /*#__PURE__*/ U(se, { children: [/*#__PURE__*/ H(C, {
|
|
1908
1908
|
className: "col-span-1",
|
|
1909
|
-
children: /*#__PURE__*/
|
|
1909
|
+
children: /*#__PURE__*/ H("span", {
|
|
1910
1910
|
className: "block truncate",
|
|
1911
1911
|
title: e.name,
|
|
1912
1912
|
children: e.name
|
|
1913
1913
|
})
|
|
1914
|
-
}), /*#__PURE__*/
|
|
1914
|
+
}), /*#__PURE__*/ H(r, {
|
|
1915
1915
|
className: "col-span-1",
|
|
1916
|
-
children: /*#__PURE__*/
|
|
1916
|
+
children: /*#__PURE__*/ H("span", {
|
|
1917
1917
|
className: "whitespace-nowrap",
|
|
1918
1918
|
children: t == null ? "" : l._(c._({
|
|
1919
1919
|
id: "7Ocn0b",
|
|
@@ -1922,57 +1922,57 @@ var Ae = (e, t) => ({
|
|
|
1922
1922
|
})
|
|
1923
1923
|
})] }, e.name);
|
|
1924
1924
|
})
|
|
1925
|
-
}), E > 0 && /*#__PURE__*/
|
|
1925
|
+
}), E > 0 && /*#__PURE__*/ H("p", {
|
|
1926
1926
|
className: "text-theme-light mt-2 text-xs",
|
|
1927
|
-
children: /*#__PURE__*/
|
|
1927
|
+
children: /*#__PURE__*/ H(G, {
|
|
1928
1928
|
id: "yqPflB",
|
|
1929
1929
|
values: { hiddenCount: E }
|
|
1930
1930
|
})
|
|
1931
1931
|
})]
|
|
1932
1932
|
})]
|
|
1933
1933
|
}),
|
|
1934
|
-
/*#__PURE__*/
|
|
1934
|
+
/*#__PURE__*/ H(f, {
|
|
1935
1935
|
label: c._({ id: "Ghp863" }),
|
|
1936
|
-
placeholder:
|
|
1936
|
+
placeholder: Ge,
|
|
1937
1937
|
value: h,
|
|
1938
1938
|
onChange: (e) => g(e.target.value)
|
|
1939
1939
|
})
|
|
1940
1940
|
]
|
|
1941
1941
|
})
|
|
1942
1942
|
});
|
|
1943
|
-
},
|
|
1944
|
-
let { i18n: e, i18n: n, _: r } = K(), i =
|
|
1945
|
-
|
|
1943
|
+
}, qe = () => {
|
|
1944
|
+
let { i18n: e, i18n: n, _: r } = K(), i = L(), a = fe({ from: N.fullPath }), { sortBy: o, sortDirection: c, search: l = "" } = N.useSearch(), [u, d] = W(!1), [f, g] = W(!1), [_, v] = W([]), [y, S] = W(null), [C, w] = W(l), E = de(void 0);
|
|
1945
|
+
ue(() => () => clearTimeout(E.current), []), ue(() => {
|
|
1946
1946
|
w(l);
|
|
1947
1947
|
}, [l]);
|
|
1948
1948
|
let k = () => S(null), A = (e) => {
|
|
1949
1949
|
S(Ae(e, { onDismiss: k }));
|
|
1950
1950
|
}, P = (e, t) => {
|
|
1951
1951
|
S(je(e, t, { onDismiss: k }));
|
|
1952
|
-
},
|
|
1952
|
+
}, ee = (e, t) => {
|
|
1953
1953
|
S(Me(e, t, { onDismiss: k }));
|
|
1954
|
-
},
|
|
1954
|
+
}, R = (e, t) => {
|
|
1955
1955
|
S(Ne(e, t, { onDismiss: k }));
|
|
1956
|
-
},
|
|
1956
|
+
}, te = (e) => {
|
|
1957
1957
|
S(Pe(e, { onDismiss: k }));
|
|
1958
|
-
},
|
|
1958
|
+
}, ne = (e, t) => {
|
|
1959
1959
|
S(Fe(e, t, { onDismiss: k }));
|
|
1960
|
-
},
|
|
1960
|
+
}, re = (e) => {
|
|
1961
1961
|
S(Ie(e, { onDismiss: k }));
|
|
1962
|
-
},
|
|
1962
|
+
}, z = (e, t) => {
|
|
1963
1963
|
S(Le(e, t, { onDismiss: k }));
|
|
1964
|
-
},
|
|
1964
|
+
}, ie = (e) => {
|
|
1965
1965
|
S(Re(e, { onDismiss: k }));
|
|
1966
|
-
},
|
|
1966
|
+
}, ae = (e, t) => {
|
|
1967
1967
|
S(ze(e, t, { onDismiss: k }));
|
|
1968
|
-
},
|
|
1968
|
+
}, B = ({ emptiedCount: e, totalDeleted: t, errors: n }) => {
|
|
1969
1969
|
if (n.length === 0) v([]);
|
|
1970
1970
|
else {
|
|
1971
1971
|
let e = new Set(n.map((e) => e.split(": ")[0]));
|
|
1972
1972
|
v((t) => t.filter((t) => e.has(t)));
|
|
1973
1973
|
}
|
|
1974
1974
|
S(Be(e, t, n, { onDismiss: k }));
|
|
1975
|
-
},
|
|
1975
|
+
}, V = {
|
|
1976
1976
|
options: [
|
|
1977
1977
|
{
|
|
1978
1978
|
label: e._({ id: "6YtxFj" }),
|
|
@@ -1993,10 +1993,10 @@ var Ae = (e, t) => ({
|
|
|
1993
1993
|
],
|
|
1994
1994
|
sortBy: o ?? "name",
|
|
1995
1995
|
sortDirection: c ?? "asc"
|
|
1996
|
-
}, { data:
|
|
1996
|
+
}, { data: se, isLoading: le, error: pe } = M.storage.swift.listContainers.useQuery({
|
|
1997
1997
|
project_id: i,
|
|
1998
1998
|
format: "json"
|
|
1999
|
-
}), { data:
|
|
1999
|
+
}), { data: q } = M.storage.swift.getAccountMetadata.useQuery({ project_id: i }), { data: me } = M.storage.swift.getServiceInfo.useQuery(), he = (e) => [...e].sort((e, t) => {
|
|
2000
2000
|
let n;
|
|
2001
2001
|
switch (o ?? "name") {
|
|
2002
2002
|
case "name":
|
|
@@ -2015,17 +2015,17 @@ var Ae = (e, t) => ({
|
|
|
2015
2015
|
default: n = e.name.localeCompare(t.name);
|
|
2016
2016
|
}
|
|
2017
2017
|
return (c ?? "asc") === "desc" ? -n : n;
|
|
2018
|
-
}), ge = (
|
|
2018
|
+
}), ge = (se || []).filter((e) => e.name.toLowerCase().includes(l.toLowerCase())), J = he(ge), _e = (e) => {
|
|
2019
2019
|
let t = typeof e == "string" ? e : "";
|
|
2020
|
-
|
|
2020
|
+
ce(() => {
|
|
2021
2021
|
a({ search: (e) => ({
|
|
2022
2022
|
...e,
|
|
2023
2023
|
search: t || void 0
|
|
2024
2024
|
}) });
|
|
2025
2025
|
});
|
|
2026
|
-
},
|
|
2026
|
+
}, ve = (e) => {
|
|
2027
2027
|
let t = e.sortBy?.toString() || "name", n = e.sortDirection || "asc";
|
|
2028
|
-
|
|
2028
|
+
ce(() => {
|
|
2029
2029
|
a({ search: (e) => ({
|
|
2030
2030
|
...e,
|
|
2031
2031
|
sortBy: t,
|
|
@@ -2033,114 +2033,114 @@ var Ae = (e, t) => ({
|
|
|
2033
2033
|
}) });
|
|
2034
2034
|
});
|
|
2035
2035
|
};
|
|
2036
|
-
if (
|
|
2036
|
+
if (le) return /*#__PURE__*/ U(O, {
|
|
2037
2037
|
className: "absolute inset-0",
|
|
2038
2038
|
distribution: "center",
|
|
2039
2039
|
alignment: "center",
|
|
2040
2040
|
direction: "vertical",
|
|
2041
|
-
children: [/*#__PURE__*/
|
|
2041
|
+
children: [/*#__PURE__*/ H(s, {
|
|
2042
2042
|
variant: "primary",
|
|
2043
2043
|
size: "large",
|
|
2044
2044
|
className: "mb-2"
|
|
2045
|
-
}), /*#__PURE__*/
|
|
2045
|
+
}), /*#__PURE__*/ H(G, { id: "WYiUDa" })]
|
|
2046
2046
|
});
|
|
2047
|
-
if (
|
|
2048
|
-
let e =
|
|
2049
|
-
return /*#__PURE__*/
|
|
2047
|
+
if (pe) {
|
|
2048
|
+
let e = pe.message;
|
|
2049
|
+
return /*#__PURE__*/ H(O, {
|
|
2050
2050
|
className: "absolute inset-0",
|
|
2051
2051
|
distribution: "center",
|
|
2052
2052
|
alignment: "center",
|
|
2053
2053
|
direction: "vertical",
|
|
2054
|
-
children: /*#__PURE__*/
|
|
2054
|
+
children: /*#__PURE__*/ H(G, {
|
|
2055
2055
|
id: "dLFiER",
|
|
2056
2056
|
values: { errorMessage: e }
|
|
2057
2057
|
})
|
|
2058
2058
|
});
|
|
2059
2059
|
}
|
|
2060
|
-
let
|
|
2061
|
-
return /*#__PURE__*/
|
|
2060
|
+
let ye = q?.bytesUsed || 0, be = q?.quotaBytes || 0, Y = be > 0 ? be - ye : 0, X = (se || []).filter((e) => _.includes(e.name)), xe = X.length > 0, Se = X.length, Ce = (se || []).length, we = ge.length, Te = we !== Ce, Z = J.map((e) => e.name), Ee = Z.length > 0 && Z.every((e) => _.includes(e)), De = Z.some((e) => _.includes(e));
|
|
2061
|
+
return /*#__PURE__*/ U("div", {
|
|
2062
2062
|
className: "relative",
|
|
2063
2063
|
children: [
|
|
2064
|
-
/*#__PURE__*/
|
|
2064
|
+
/*#__PURE__*/ U(O, {
|
|
2065
2065
|
direction: "vertical",
|
|
2066
2066
|
children: [
|
|
2067
|
-
/*#__PURE__*/
|
|
2067
|
+
/*#__PURE__*/ U(O, {
|
|
2068
2068
|
distribution: "end",
|
|
2069
2069
|
alignment: "center",
|
|
2070
2070
|
gap: "2",
|
|
2071
2071
|
className: "pb-2",
|
|
2072
|
-
children: [/*#__PURE__*/
|
|
2072
|
+
children: [/*#__PURE__*/ H(O, {
|
|
2073
2073
|
gap: "0.5",
|
|
2074
2074
|
alignment: "center",
|
|
2075
|
-
children: /*#__PURE__*/
|
|
2076
|
-
options:
|
|
2077
|
-
sortBy:
|
|
2078
|
-
sortDirection:
|
|
2079
|
-
onSortByChange: (e) =>
|
|
2080
|
-
...
|
|
2075
|
+
children: /*#__PURE__*/ H(F, {
|
|
2076
|
+
options: V.options,
|
|
2077
|
+
sortBy: V.sortBy,
|
|
2078
|
+
sortDirection: V.sortDirection ?? "asc",
|
|
2079
|
+
onSortByChange: (e) => ve({
|
|
2080
|
+
...V,
|
|
2081
2081
|
sortBy: e,
|
|
2082
|
-
sortDirection:
|
|
2082
|
+
sortDirection: V.sortDirection
|
|
2083
2083
|
}),
|
|
2084
|
-
onSortDirectionChange: (e) =>
|
|
2085
|
-
...
|
|
2084
|
+
onSortDirectionChange: (e) => ve({
|
|
2085
|
+
...V,
|
|
2086
2086
|
sortDirection: e
|
|
2087
2087
|
})
|
|
2088
2088
|
})
|
|
2089
|
-
}), /*#__PURE__*/
|
|
2089
|
+
}), /*#__PURE__*/ H(j, {
|
|
2090
2090
|
variant: "primary",
|
|
2091
2091
|
className: "whitespace-nowrap",
|
|
2092
2092
|
onClick: () => d(!0),
|
|
2093
|
-
children: /*#__PURE__*/
|
|
2093
|
+
children: /*#__PURE__*/ H(G, { id: "vTh35P" })
|
|
2094
2094
|
})]
|
|
2095
2095
|
}),
|
|
2096
|
-
/*#__PURE__*/
|
|
2096
|
+
/*#__PURE__*/ H(h, { children: /*#__PURE__*/ H(O, {
|
|
2097
2097
|
direction: "vertical",
|
|
2098
2098
|
gap: "2",
|
|
2099
|
-
children: /*#__PURE__*/
|
|
2099
|
+
children: /*#__PURE__*/ H(O, {
|
|
2100
2100
|
distribution: "end",
|
|
2101
2101
|
alignment: "center",
|
|
2102
|
-
children: /*#__PURE__*/
|
|
2102
|
+
children: /*#__PURE__*/ H(x, {
|
|
2103
2103
|
placeholder: e._({ id: "TipzDp" }),
|
|
2104
2104
|
"data-testid": "searchbar",
|
|
2105
2105
|
value: C,
|
|
2106
2106
|
onInput: (e) => {
|
|
2107
2107
|
let t = e.currentTarget.value;
|
|
2108
|
-
w(t), clearTimeout(E.current), E.current = window.setTimeout(() =>
|
|
2108
|
+
w(t), clearTimeout(E.current), E.current = window.setTimeout(() => _e(t), 500);
|
|
2109
2109
|
},
|
|
2110
2110
|
onSearch: (e) => {
|
|
2111
|
-
clearTimeout(E.current),
|
|
2111
|
+
clearTimeout(E.current), _e(typeof e == "string" ? e : "");
|
|
2112
2112
|
},
|
|
2113
2113
|
onClear: () => {
|
|
2114
|
-
clearTimeout(E.current), w(""),
|
|
2114
|
+
clearTimeout(E.current), w(""), _e("");
|
|
2115
2115
|
}
|
|
2116
2116
|
})
|
|
2117
2117
|
})
|
|
2118
2118
|
}) }),
|
|
2119
|
-
/*#__PURE__*/
|
|
2119
|
+
/*#__PURE__*/ H(h, { children: /*#__PURE__*/ U(O, {
|
|
2120
2120
|
distribution: "start",
|
|
2121
2121
|
gap: "2",
|
|
2122
2122
|
alignment: "center",
|
|
2123
2123
|
className: "text-sm",
|
|
2124
|
-
children: [/*#__PURE__*/
|
|
2124
|
+
children: [/*#__PURE__*/ U(O, {
|
|
2125
2125
|
gap: "2",
|
|
2126
2126
|
alignment: "center",
|
|
2127
|
-
children: [/*#__PURE__*/
|
|
2128
|
-
checked:
|
|
2129
|
-
indeterminate:
|
|
2127
|
+
children: [/*#__PURE__*/ H(b, {
|
|
2128
|
+
checked: Ee,
|
|
2129
|
+
indeterminate: De && !Ee,
|
|
2130
2130
|
onChange: () => {
|
|
2131
|
-
v(
|
|
2131
|
+
v(Ee ? (e) => e.filter((e) => !Z.includes(e)) : (e) => [...new Set([...e, ...Z])]);
|
|
2132
2132
|
}
|
|
2133
|
-
}), /*#__PURE__*/
|
|
2133
|
+
}), /*#__PURE__*/ U(T, {
|
|
2134
2134
|
className: "flex items-center",
|
|
2135
|
-
children: [/*#__PURE__*/
|
|
2135
|
+
children: [/*#__PURE__*/ H(D, {
|
|
2136
2136
|
as: "div",
|
|
2137
|
-
children: /*#__PURE__*/
|
|
2137
|
+
children: /*#__PURE__*/ H(j, {
|
|
2138
2138
|
disabled: !xe,
|
|
2139
2139
|
size: "small",
|
|
2140
2140
|
icon: "moreVert",
|
|
2141
2141
|
label: e._({ id: "7L01XJ" })
|
|
2142
2142
|
})
|
|
2143
|
-
}), xe && /*#__PURE__*/
|
|
2143
|
+
}), xe && /*#__PURE__*/ H(t, { children: /*#__PURE__*/ H(m, {
|
|
2144
2144
|
disabled: !xe,
|
|
2145
2145
|
label: n._(e._({
|
|
2146
2146
|
id: "0Th0CH",
|
|
@@ -2149,82 +2149,85 @@ var Ae = (e, t) => ({
|
|
|
2149
2149
|
onClick: () => g(!0)
|
|
2150
2150
|
}) })]
|
|
2151
2151
|
})]
|
|
2152
|
-
}), /*#__PURE__*/
|
|
2152
|
+
}), /*#__PURE__*/ U("div", {
|
|
2153
2153
|
className: "text-theme-light flex items-center gap-1",
|
|
2154
2154
|
"data-testid": "containers-info-block",
|
|
2155
2155
|
children: [
|
|
2156
|
-
Te ? /*#__PURE__*/
|
|
2156
|
+
Te ? /*#__PURE__*/ H(G, {
|
|
2157
2157
|
id: "8uPTwT",
|
|
2158
2158
|
values: {
|
|
2159
2159
|
filteredCount: we,
|
|
2160
2160
|
totalCount: Ce
|
|
2161
2161
|
}
|
|
2162
|
-
}) : /*#__PURE__*/
|
|
2162
|
+
}) : /*#__PURE__*/ H(G, {
|
|
2163
2163
|
id: "ywe1H/",
|
|
2164
2164
|
values: { totalCount: Ce }
|
|
2165
2165
|
}),
|
|
2166
|
-
|
|
2167
|
-
/*#__PURE__*/
|
|
2166
|
+
be > 0 && /*#__PURE__*/ U(oe, { children: [/*#__PURE__*/ H("span", { children: "," }), /*#__PURE__*/ U("span", { children: [
|
|
2167
|
+
/*#__PURE__*/ H(G, { id: "kKK8AH" }),
|
|
2168
2168
|
" ",
|
|
2169
|
-
/*#__PURE__*/
|
|
2169
|
+
/*#__PURE__*/ H("span", {
|
|
2170
2170
|
className: "text-theme-default font-semibold",
|
|
2171
|
-
children:
|
|
2171
|
+
children: I(Y)
|
|
2172
2172
|
})
|
|
2173
2173
|
] })] }),
|
|
2174
|
-
/*#__PURE__*/
|
|
2174
|
+
/*#__PURE__*/ H(Ue, {
|
|
2175
2175
|
serviceInfo: me,
|
|
2176
|
-
accountInfo:
|
|
2176
|
+
accountInfo: q
|
|
2177
2177
|
})
|
|
2178
2178
|
]
|
|
2179
2179
|
})]
|
|
2180
2180
|
}) })
|
|
2181
2181
|
]
|
|
2182
2182
|
}),
|
|
2183
|
-
/*#__PURE__*/
|
|
2184
|
-
containers:
|
|
2183
|
+
/*#__PURE__*/ H(ke, {
|
|
2184
|
+
containers: J,
|
|
2185
2185
|
createModalOpen: u,
|
|
2186
2186
|
setCreateModalOpen: d,
|
|
2187
2187
|
maxContainerNameLength: me?.swift?.max_container_name_length,
|
|
2188
2188
|
onCreateSuccess: A,
|
|
2189
2189
|
onCreateError: P,
|
|
2190
|
-
onEmptySuccess:
|
|
2191
|
-
onEmptyError:
|
|
2192
|
-
onDeleteSuccess:
|
|
2193
|
-
onDeleteError:
|
|
2194
|
-
onPropertiesSuccess:
|
|
2195
|
-
onPropertiesError:
|
|
2196
|
-
onAclSuccess:
|
|
2197
|
-
onAclError:
|
|
2190
|
+
onEmptySuccess: ee,
|
|
2191
|
+
onEmptyError: R,
|
|
2192
|
+
onDeleteSuccess: te,
|
|
2193
|
+
onDeleteError: ne,
|
|
2194
|
+
onPropertiesSuccess: re,
|
|
2195
|
+
onPropertiesError: z,
|
|
2196
|
+
onAclSuccess: ie,
|
|
2197
|
+
onAclError: ae,
|
|
2198
2198
|
selectedContainers: _,
|
|
2199
2199
|
setSelectedContainers: v,
|
|
2200
2200
|
hasAnyBulkAction: !0
|
|
2201
2201
|
}),
|
|
2202
|
-
/*#__PURE__*/
|
|
2202
|
+
/*#__PURE__*/ H(Ke, {
|
|
2203
2203
|
isOpen: f,
|
|
2204
2204
|
containers: X,
|
|
2205
2205
|
onClose: () => g(!1),
|
|
2206
|
-
onComplete:
|
|
2206
|
+
onComplete: B
|
|
2207
2207
|
}),
|
|
2208
|
-
y && /*#__PURE__*/
|
|
2208
|
+
y && /*#__PURE__*/ H(p, {
|
|
2209
2209
|
...y,
|
|
2210
2210
|
className: "border-theme-light fixed top-5 right-5 z-50 rounded-lg border shadow-lg"
|
|
2211
2211
|
})
|
|
2212
2212
|
]
|
|
2213
2213
|
});
|
|
2214
|
-
},
|
|
2214
|
+
}, Je = /^[a-z0-9][a-z0-9.-]*[a-z0-9]$/, Ye = /^(\d{1,3}\.){3}\d{1,3}$/, Xe = [
|
|
2215
2215
|
"xn--",
|
|
2216
2216
|
"sthree-",
|
|
2217
2217
|
"amzn-s3-demo-"
|
|
2218
|
-
],
|
|
2218
|
+
], Ze = [
|
|
2219
2219
|
"-s3alias",
|
|
2220
2220
|
"--ol-s3",
|
|
2221
2221
|
".mrap",
|
|
2222
2222
|
"--x-s3",
|
|
2223
2223
|
"--table-s3"
|
|
2224
|
-
],
|
|
2225
|
-
let { i18n: i, _: a } = K(), o =
|
|
2224
|
+
], Qe = ({ isOpen: e, onClose: t, onSuccess: n, onError: r }) => {
|
|
2225
|
+
let { i18n: i, _: a } = K(), o = L(), [s, c] = W(""), [l, u] = W(null), [d, p] = W(!1), { trackClose: m, markSubmitted: h, resetTracking: g } = V({
|
|
2226
|
+
isOpen: e,
|
|
2227
|
+
actionPrefix: "storage.ceph.bucket.create"
|
|
2228
|
+
}), _ = M.useUtils(), v = M.storage.ceph.containers.create.useMutation({
|
|
2226
2229
|
onSuccess: () => {
|
|
2227
|
-
|
|
2230
|
+
_.storage.ceph.containers.list.invalidate();
|
|
2228
2231
|
let e = s.trim();
|
|
2229
2232
|
n?.(e);
|
|
2230
2233
|
},
|
|
@@ -2232,82 +2235,84 @@ var Ae = (e, t) => ({
|
|
|
2232
2235
|
r?.(s.trim(), e.message);
|
|
2233
2236
|
},
|
|
2234
2237
|
onSettled: () => {
|
|
2235
|
-
|
|
2238
|
+
y();
|
|
2236
2239
|
}
|
|
2237
|
-
}),
|
|
2238
|
-
c(""), u(null), p(!1),
|
|
2239
|
-
},
|
|
2240
|
+
}), y = () => {
|
|
2241
|
+
c(""), u(null), p(!1), g(), v.reset(), t();
|
|
2242
|
+
}, x = (e) => {
|
|
2240
2243
|
let t = e.trim();
|
|
2241
2244
|
if (!t) return u(i._({ id: "48bMai" })), !1;
|
|
2242
2245
|
if (t.length < 3) return u(i._({ id: "gjop1H" })), !1;
|
|
2243
2246
|
if (t.length > 63) return u(i._({ id: "is0Bhk" })), !1;
|
|
2244
|
-
if (!
|
|
2247
|
+
if (!Je.test(t)) return u(i._({ id: "IQldU4" })), !1;
|
|
2245
2248
|
if (!/^[a-z0-9]/.test(t) || !/[a-z0-9]$/.test(t)) return u(i._({ id: "VG2a+x" })), !1;
|
|
2246
2249
|
if (t.includes("..")) return u(i._({ id: "V8/eES" })), !1;
|
|
2247
|
-
if (
|
|
2248
|
-
for (let e of
|
|
2250
|
+
if (Ye.test(t)) return u(i._({ id: "W8Rb/w" })), !1;
|
|
2251
|
+
for (let e of Xe) if (t.startsWith(e)) return u(i._({
|
|
2249
2252
|
id: "B2SpR8",
|
|
2250
2253
|
values: { prefix: e }
|
|
2251
2254
|
})), !1;
|
|
2252
|
-
for (let e of
|
|
2255
|
+
for (let e of Ze) if (t.endsWith(e)) return u(i._({
|
|
2253
2256
|
id: "QRlXaL",
|
|
2254
2257
|
values: { suffix: e }
|
|
2255
2258
|
})), !1;
|
|
2256
2259
|
return u(null), !0;
|
|
2257
|
-
},
|
|
2260
|
+
}, S = (e) => {
|
|
2258
2261
|
let t = e.target.value;
|
|
2259
|
-
c(t), l &&
|
|
2260
|
-
},
|
|
2261
|
-
|
|
2262
|
+
c(t), l && x(t);
|
|
2263
|
+
}, C = () => {
|
|
2264
|
+
x(s) && (h(), v.mutate({
|
|
2262
2265
|
project_id: o,
|
|
2263
2266
|
bucketName: s.trim(),
|
|
2264
2267
|
enableVersioning: d
|
|
2265
|
-
});
|
|
2268
|
+
}));
|
|
2266
2269
|
};
|
|
2267
|
-
return e ? /*#__PURE__*/
|
|
2270
|
+
return e ? /*#__PURE__*/ H(w, {
|
|
2268
2271
|
title: i._({ id: "HiDAFk" }),
|
|
2269
2272
|
open: e,
|
|
2270
|
-
onCancel:
|
|
2273
|
+
onCancel: () => {
|
|
2274
|
+
m(), y();
|
|
2275
|
+
},
|
|
2271
2276
|
confirmButtonLabel: i._({ id: "hYgDIe" }),
|
|
2272
|
-
onConfirm:
|
|
2277
|
+
onConfirm: C,
|
|
2273
2278
|
cancelButtonLabel: i._({ id: "dEgA5A" }),
|
|
2274
2279
|
size: "small",
|
|
2275
|
-
disableConfirmButton:
|
|
2276
|
-
children: /*#__PURE__*/
|
|
2280
|
+
disableConfirmButton: v.isPending || !s.trim(),
|
|
2281
|
+
children: /*#__PURE__*/ U(O, {
|
|
2277
2282
|
direction: "vertical",
|
|
2278
2283
|
gap: "6",
|
|
2279
2284
|
children: [
|
|
2280
|
-
/*#__PURE__*/
|
|
2285
|
+
/*#__PURE__*/ H("p", {
|
|
2281
2286
|
className: "text-theme-default",
|
|
2282
|
-
children: /*#__PURE__*/
|
|
2287
|
+
children: /*#__PURE__*/ H(G, { id: "ASJMIw" })
|
|
2283
2288
|
}),
|
|
2284
|
-
/*#__PURE__*/
|
|
2289
|
+
/*#__PURE__*/ H(f, {
|
|
2285
2290
|
label: i._({ id: "NNpgo3" }),
|
|
2286
2291
|
required: !0,
|
|
2287
2292
|
value: s,
|
|
2288
|
-
onChange:
|
|
2293
|
+
onChange: S,
|
|
2289
2294
|
onKeyDown: (e) => {
|
|
2290
|
-
e.key === "Enter" &&
|
|
2295
|
+
e.key === "Enter" && C();
|
|
2291
2296
|
},
|
|
2292
2297
|
invalid: !!l,
|
|
2293
2298
|
errortext: l || void 0,
|
|
2294
|
-
disabled:
|
|
2299
|
+
disabled: v.isPending,
|
|
2295
2300
|
autoFocus: !0,
|
|
2296
2301
|
placeholder: i._({ id: "yDHGP+" })
|
|
2297
2302
|
}),
|
|
2298
|
-
/*#__PURE__*/
|
|
2303
|
+
/*#__PURE__*/ H(b, {
|
|
2299
2304
|
label: i._({ id: "ifQSTI" }),
|
|
2300
2305
|
helptext: i._({ id: "WM+Nm7" }),
|
|
2301
2306
|
checked: d,
|
|
2302
2307
|
onChange: (e) => p(e.target.checked),
|
|
2303
|
-
disabled:
|
|
2308
|
+
disabled: v.isPending
|
|
2304
2309
|
})
|
|
2305
2310
|
]
|
|
2306
2311
|
})
|
|
2307
2312
|
}) : null;
|
|
2308
|
-
},
|
|
2309
|
-
let { projectId: v, provider: y, storageType: x } =
|
|
2310
|
-
|
|
2313
|
+
}, $e = ({ buckets: e, createModalOpen: n, setCreateModalOpen: r, onCreateSuccess: a, onCreateError: s, onEmptySuccess: c, onEmptyError: l, onDeleteSuccess: f, onDeleteError: p, selectedBuckets: h, setSelectedBuckets: g, hasAnyBulkAction: _ = !0 }) => {
|
|
2314
|
+
let { projectId: v, provider: y, storageType: x } = pe({ strict: !1 }), { i18n: S, _: C } = K(), w = fe(), E = de(null), [D, O] = W(0), [k, A] = W(null), [j, M] = W(null);
|
|
2315
|
+
ue(() => {
|
|
2311
2316
|
E.current && O(E.current.offsetWidth - E.current.clientWidth);
|
|
2312
2317
|
}, [e.length]);
|
|
2313
2318
|
let N = (e) => {
|
|
@@ -2316,58 +2321,58 @@ var Ae = (e, t) => ({
|
|
|
2316
2321
|
} catch {
|
|
2317
2322
|
return S._({ id: "fj5byd" });
|
|
2318
2323
|
}
|
|
2319
|
-
}, P =
|
|
2324
|
+
}, P = he({
|
|
2320
2325
|
count: e.length,
|
|
2321
2326
|
getScrollElement: () => E.current,
|
|
2322
2327
|
estimateSize: () => 48,
|
|
2323
2328
|
overscan: 10
|
|
2324
|
-
}),
|
|
2329
|
+
}), F = (e) => {
|
|
2325
2330
|
h.includes(e) ? g(h.filter((t) => t !== e)) : g([...h, e]);
|
|
2326
2331
|
};
|
|
2327
|
-
if (!e || e.length === 0) return /*#__PURE__*/
|
|
2332
|
+
if (!e || e.length === 0) return /*#__PURE__*/ H(u, {
|
|
2328
2333
|
columns: 4,
|
|
2329
2334
|
className: "buckets",
|
|
2330
2335
|
"data-testid": "no-buckets",
|
|
2331
|
-
children: /*#__PURE__*/
|
|
2336
|
+
children: /*#__PURE__*/ H(i, { children: /*#__PURE__*/ H(o, {
|
|
2332
2337
|
colSpan: 4,
|
|
2333
|
-
children: /*#__PURE__*/
|
|
2338
|
+
children: /*#__PURE__*/ U("div", {
|
|
2334
2339
|
className: "py-8 text-center",
|
|
2335
|
-
children: [/*#__PURE__*/
|
|
2340
|
+
children: [/*#__PURE__*/ H("h3", {
|
|
2336
2341
|
className: "text-lg font-semibold",
|
|
2337
|
-
children: /*#__PURE__*/
|
|
2338
|
-
}), /*#__PURE__*/
|
|
2342
|
+
children: /*#__PURE__*/ H(G, { id: "ih2lfP" })
|
|
2343
|
+
}), /*#__PURE__*/ H("p", {
|
|
2339
2344
|
className: "text-theme-light mt-2",
|
|
2340
|
-
children: /*#__PURE__*/
|
|
2345
|
+
children: /*#__PURE__*/ H(G, { id: "emkxJa" })
|
|
2341
2346
|
})]
|
|
2342
2347
|
})
|
|
2343
2348
|
}) })
|
|
2344
2349
|
});
|
|
2345
|
-
let
|
|
2346
|
-
return /*#__PURE__*/
|
|
2347
|
-
/*#__PURE__*/
|
|
2350
|
+
let L = _ ? 6 : 5, R = _ ? "40px minmax(200px, 2fr) minmax(100px, 1fr) minmax(180px, 2fr) minmax(100px, 1fr) 60px" : "minmax(200px, 2fr) minmax(100px, 1fr) minmax(180px, 2fr) minmax(100px, 1fr) 60px";
|
|
2351
|
+
return /*#__PURE__*/ U(oe, { children: [
|
|
2352
|
+
/*#__PURE__*/ U("div", {
|
|
2348
2353
|
className: "relative",
|
|
2349
|
-
children: [/*#__PURE__*/
|
|
2354
|
+
children: [/*#__PURE__*/ H("div", {
|
|
2350
2355
|
style: { paddingRight: `${D}px` },
|
|
2351
|
-
children: /*#__PURE__*/
|
|
2352
|
-
columns:
|
|
2353
|
-
gridColumnTemplate:
|
|
2356
|
+
children: /*#__PURE__*/ H(u, {
|
|
2357
|
+
columns: L,
|
|
2358
|
+
gridColumnTemplate: R,
|
|
2354
2359
|
className: "buckets",
|
|
2355
2360
|
"data-testid": "buckets-table-header",
|
|
2356
|
-
children: /*#__PURE__*/
|
|
2357
|
-
_ && /*#__PURE__*/
|
|
2358
|
-
/*#__PURE__*/
|
|
2359
|
-
/*#__PURE__*/
|
|
2360
|
-
/*#__PURE__*/
|
|
2361
|
-
/*#__PURE__*/
|
|
2362
|
-
/*#__PURE__*/
|
|
2361
|
+
children: /*#__PURE__*/ U(i, { children: [
|
|
2362
|
+
_ && /*#__PURE__*/ H(d, {}),
|
|
2363
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "BTsbBe" }) }),
|
|
2364
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "sxbP3b" }) }),
|
|
2365
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "sjMCOP" }) }),
|
|
2366
|
+
/*#__PURE__*/ H(d, { children: /*#__PURE__*/ H(G, { id: "hgpMHD" }) }),
|
|
2367
|
+
/*#__PURE__*/ H(d, { style: { marginRight: `-${D}px` } })
|
|
2363
2368
|
] })
|
|
2364
2369
|
})
|
|
2365
|
-
}), /*#__PURE__*/
|
|
2370
|
+
}), /*#__PURE__*/ H("div", {
|
|
2366
2371
|
ref: E,
|
|
2367
2372
|
className: "overflow-auto",
|
|
2368
2373
|
style: { height: "calc(100vh - 490px)" },
|
|
2369
2374
|
"data-testid": "buckets-table-body",
|
|
2370
|
-
children: /*#__PURE__*/
|
|
2375
|
+
children: /*#__PURE__*/ H("div", {
|
|
2371
2376
|
style: {
|
|
2372
2377
|
height: `${P.getTotalSize()}px`,
|
|
2373
2378
|
width: "100%",
|
|
@@ -2383,7 +2388,7 @@ var Ae = (e, t) => ({
|
|
|
2383
2388
|
containerName: r.name
|
|
2384
2389
|
}
|
|
2385
2390
|
});
|
|
2386
|
-
return /*#__PURE__*/
|
|
2391
|
+
return /*#__PURE__*/ U("div", {
|
|
2387
2392
|
"data-index": n.index,
|
|
2388
2393
|
ref: P.measureElement,
|
|
2389
2394
|
className: "juno-datagrid group hover:bg-theme-background-lvl-1 cursor-pointer",
|
|
@@ -2394,7 +2399,7 @@ var Ae = (e, t) => ({
|
|
|
2394
2399
|
width: "100%",
|
|
2395
2400
|
transform: `translateY(${n.start}px)`,
|
|
2396
2401
|
display: "grid",
|
|
2397
|
-
gridTemplateColumns:
|
|
2402
|
+
gridTemplateColumns: R,
|
|
2398
2403
|
alignItems: "stretch"
|
|
2399
2404
|
},
|
|
2400
2405
|
"data-testid": `bucket-row-${r.name}`,
|
|
@@ -2405,42 +2410,42 @@ var Ae = (e, t) => ({
|
|
|
2405
2410
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
2406
2411
|
},
|
|
2407
2412
|
children: [
|
|
2408
|
-
_ && /*#__PURE__*/
|
|
2413
|
+
_ && /*#__PURE__*/ H(o, {
|
|
2409
2414
|
onClick: (e) => e.stopPropagation(),
|
|
2410
2415
|
onKeyDown: (e) => {
|
|
2411
2416
|
(e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
2412
2417
|
},
|
|
2413
|
-
children: /*#__PURE__*/
|
|
2418
|
+
children: /*#__PURE__*/ H(b, {
|
|
2414
2419
|
checked: i,
|
|
2415
|
-
onChange: () =>
|
|
2420
|
+
onChange: () => F(r.name),
|
|
2416
2421
|
"data-testid": `select-bucket-${r.name}`
|
|
2417
2422
|
})
|
|
2418
2423
|
}),
|
|
2419
|
-
/*#__PURE__*/
|
|
2424
|
+
/*#__PURE__*/ H(o, {
|
|
2420
2425
|
className: "min-w-0 overflow-hidden",
|
|
2421
|
-
children: /*#__PURE__*/
|
|
2426
|
+
children: /*#__PURE__*/ H("span", {
|
|
2422
2427
|
className: "block truncate",
|
|
2423
2428
|
title: r.name,
|
|
2424
2429
|
children: r.name
|
|
2425
2430
|
})
|
|
2426
2431
|
}),
|
|
2427
|
-
/*#__PURE__*/
|
|
2428
|
-
/*#__PURE__*/
|
|
2429
|
-
/*#__PURE__*/
|
|
2430
|
-
/*#__PURE__*/
|
|
2432
|
+
/*#__PURE__*/ H(o, { children: r.count.toLocaleString() }),
|
|
2433
|
+
/*#__PURE__*/ H(o, { children: N(r.last_modified || r.creationDate || "") }),
|
|
2434
|
+
/*#__PURE__*/ H(o, { children: I(r.bytes) }),
|
|
2435
|
+
/*#__PURE__*/ H(o, {
|
|
2431
2436
|
onClick: (e) => e.stopPropagation(),
|
|
2432
|
-
children: /*#__PURE__*/
|
|
2433
|
-
/*#__PURE__*/
|
|
2437
|
+
children: /*#__PURE__*/ H(T, { children: /*#__PURE__*/ U(t, { children: [
|
|
2438
|
+
/*#__PURE__*/ H(m, {
|
|
2434
2439
|
label: S._({ id: "v0hPHE" }),
|
|
2435
2440
|
onClick: a,
|
|
2436
2441
|
"data-testid": `show-details-action-${r.name}`
|
|
2437
2442
|
}),
|
|
2438
|
-
/*#__PURE__*/
|
|
2443
|
+
/*#__PURE__*/ H(m, {
|
|
2439
2444
|
label: S._({ id: "N2S1rs" }),
|
|
2440
2445
|
onClick: () => A(r),
|
|
2441
2446
|
"data-testid": `empty-action-${r.name}`
|
|
2442
2447
|
}),
|
|
2443
|
-
/*#__PURE__*/
|
|
2448
|
+
/*#__PURE__*/ H(m, {
|
|
2444
2449
|
label: S._({ id: "cnGeoo" }),
|
|
2445
2450
|
onClick: () => M(r),
|
|
2446
2451
|
"data-testid": `delete-action-${r.name}`
|
|
@@ -2453,20 +2458,20 @@ var Ae = (e, t) => ({
|
|
|
2453
2458
|
})
|
|
2454
2459
|
})]
|
|
2455
2460
|
}),
|
|
2456
|
-
/*#__PURE__*/
|
|
2461
|
+
/*#__PURE__*/ H(Qe, {
|
|
2457
2462
|
isOpen: n,
|
|
2458
2463
|
onClose: () => r(!1),
|
|
2459
2464
|
onSuccess: a,
|
|
2460
2465
|
onError: s
|
|
2461
2466
|
}),
|
|
2462
|
-
/*#__PURE__*/
|
|
2467
|
+
/*#__PURE__*/ H(B, {
|
|
2463
2468
|
isOpen: k !== null,
|
|
2464
2469
|
bucket: k,
|
|
2465
2470
|
onClose: () => A(null),
|
|
2466
2471
|
onSuccess: c,
|
|
2467
2472
|
onError: l
|
|
2468
2473
|
}),
|
|
2469
|
-
/*#__PURE__*/
|
|
2474
|
+
/*#__PURE__*/ H(ee, {
|
|
2470
2475
|
isOpen: j !== null,
|
|
2471
2476
|
bucket: j,
|
|
2472
2477
|
onClose: () => M(null),
|
|
@@ -2474,10 +2479,14 @@ var Ae = (e, t) => ({
|
|
|
2474
2479
|
onError: p
|
|
2475
2480
|
})
|
|
2476
2481
|
] });
|
|
2477
|
-
},
|
|
2478
|
-
let { i18n: i, _: a } = K(), o =
|
|
2479
|
-
|
|
2480
|
-
|
|
2482
|
+
}, et = 20, tt = ({ isOpen: e, buckets: t, onClose: n, onComplete: r }) => {
|
|
2483
|
+
let { i18n: i, _: a } = K(), o = L(), [c, l] = W(null), [u, d] = W(""), { trackClose: p, markSubmitted: m, resetTracking: h } = V({
|
|
2484
|
+
isOpen: e,
|
|
2485
|
+
actionPrefix: "storage.ceph.buckets.empty"
|
|
2486
|
+
}), g = M.useUtils(), _ = M.storage.ceph.objects.deleteAll.useMutation(), v = () => {
|
|
2487
|
+
_.reset(), l(null), d(""), h(), n();
|
|
2488
|
+
}, y = async () => {
|
|
2489
|
+
m();
|
|
2481
2490
|
let e = 0, n = 0, i = [], a = t.length;
|
|
2482
2491
|
for (let r = 0; r < t.length; r++) {
|
|
2483
2492
|
l({
|
|
@@ -2486,7 +2495,7 @@ var Ae = (e, t) => ({
|
|
|
2486
2495
|
});
|
|
2487
2496
|
let s = t[r];
|
|
2488
2497
|
try {
|
|
2489
|
-
let t = await
|
|
2498
|
+
let t = await _.mutateAsync({
|
|
2490
2499
|
project_id: o,
|
|
2491
2500
|
containerName: s.name
|
|
2492
2501
|
});
|
|
@@ -2496,82 +2505,69 @@ var Ae = (e, t) => ({
|
|
|
2496
2505
|
i.push(`${s.name}: ${t}`);
|
|
2497
2506
|
}
|
|
2498
2507
|
}
|
|
2499
|
-
e > 0 && await
|
|
2508
|
+
e > 0 && (await g.storage.ceph.containers.list.invalidate(), await g.storage.ceph.objects.list.invalidate()), r?.({
|
|
2500
2509
|
emptiedCount: e,
|
|
2501
2510
|
totalDeleted: n,
|
|
2502
2511
|
errors: i
|
|
2503
|
-
}),
|
|
2512
|
+
}), v();
|
|
2504
2513
|
};
|
|
2505
2514
|
if (!e || t.length === 0) return null;
|
|
2506
|
-
let
|
|
2507
|
-
return /*#__PURE__*/
|
|
2508
|
-
title: /*#__PURE__*/
|
|
2515
|
+
let b = t.length, x = t.slice(0, et), S = b - x.length, C = _.isPending || c !== null, T = c?.current, E = c?.total, D = u === "empty";
|
|
2516
|
+
return /*#__PURE__*/ H(w, {
|
|
2517
|
+
title: /*#__PURE__*/ H(G, {
|
|
2509
2518
|
id: "DWBWmW",
|
|
2510
|
-
values: { totalCount:
|
|
2519
|
+
values: { totalCount: b }
|
|
2511
2520
|
}),
|
|
2512
2521
|
open: e,
|
|
2513
|
-
onCancel:
|
|
2514
|
-
|
|
2522
|
+
onCancel: () => {
|
|
2523
|
+
p(), v();
|
|
2524
|
+
},
|
|
2525
|
+
confirmButtonLabel: C ? i._({ id: "s4Vnq2" }) : i._({ id: "N2S1rs" }),
|
|
2515
2526
|
confirmButtonVariant: "primary-danger",
|
|
2516
2527
|
cancelButtonLabel: i._({ id: "dEgA5A" }),
|
|
2517
|
-
onConfirm:
|
|
2518
|
-
disableConfirmButton:
|
|
2519
|
-
disableCancelButton:
|
|
2520
|
-
disableCloseButton:
|
|
2528
|
+
onConfirm: y,
|
|
2529
|
+
disableConfirmButton: C || !D,
|
|
2530
|
+
disableCancelButton: C,
|
|
2531
|
+
disableCloseButton: C,
|
|
2521
2532
|
size: "small",
|
|
2522
|
-
children:
|
|
2533
|
+
children: C ? /*#__PURE__*/ U(O, {
|
|
2523
2534
|
direction: "vertical",
|
|
2524
2535
|
distribution: "center",
|
|
2525
2536
|
alignment: "center",
|
|
2526
2537
|
gap: "2",
|
|
2527
2538
|
className: "py-4",
|
|
2528
|
-
children: [/*#__PURE__*/
|
|
2539
|
+
children: [/*#__PURE__*/ H(s, { variant: "primary" }), c && /*#__PURE__*/ H("p", {
|
|
2529
2540
|
className: "text-theme-light text-sm",
|
|
2530
|
-
children: /*#__PURE__*/
|
|
2541
|
+
children: /*#__PURE__*/ H(G, {
|
|
2531
2542
|
id: "NW1XEL",
|
|
2532
2543
|
values: {
|
|
2533
|
-
progressCurrent:
|
|
2534
|
-
progressTotal:
|
|
2544
|
+
progressCurrent: T,
|
|
2545
|
+
progressTotal: E
|
|
2535
2546
|
}
|
|
2536
2547
|
})
|
|
2537
2548
|
})]
|
|
2538
|
-
}) : /*#__PURE__*/
|
|
2549
|
+
}) : /*#__PURE__*/ U(O, {
|
|
2539
2550
|
direction: "vertical",
|
|
2540
2551
|
gap: "4",
|
|
2541
2552
|
children: [
|
|
2542
|
-
/*#__PURE__*/
|
|
2553
|
+
/*#__PURE__*/ H(G, {
|
|
2543
2554
|
id: "CtiFDz",
|
|
2544
|
-
values: { totalCount:
|
|
2555
|
+
values: { totalCount: b }
|
|
2545
2556
|
}),
|
|
2546
|
-
/*#__PURE__*/
|
|
2557
|
+
/*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H("p", {
|
|
2547
2558
|
className: "text-theme-light mb-2 text-sm",
|
|
2548
|
-
children: /*#__PURE__*/
|
|
2549
|
-
}), /*#__PURE__*/
|
|
2559
|
+
children: /*#__PURE__*/ H(G, { id: "Zshv0H" })
|
|
2560
|
+
}), /*#__PURE__*/ U("ul", {
|
|
2550
2561
|
className: "list-inside list-disc space-y-1 text-sm",
|
|
2551
|
-
children: [
|
|
2552
|
-
let t = e.name, n = e.count;
|
|
2553
|
-
return /*#__PURE__*/ H("li", { children: [t, n > 0 && /*#__PURE__*/ H("span", {
|
|
2554
|
-
className: "text-theme-light ml-2",
|
|
2555
|
-
children: [
|
|
2556
|
-
"(",
|
|
2557
|
-
n,
|
|
2558
|
-
" ",
|
|
2559
|
-
/*#__PURE__*/ V(G, {
|
|
2560
|
-
id: "gFsjJK",
|
|
2561
|
-
values: { bucketCount: n }
|
|
2562
|
-
}),
|
|
2563
|
-
")"
|
|
2564
|
-
]
|
|
2565
|
-
})] }, t);
|
|
2566
|
-
}), y > 0 && /*#__PURE__*/ V("li", {
|
|
2562
|
+
children: [x.map((e) => /*#__PURE__*/ H("li", { children: e.name }, e.name)), S > 0 && /*#__PURE__*/ H("li", {
|
|
2567
2563
|
className: "text-theme-light",
|
|
2568
|
-
children: /*#__PURE__*/
|
|
2564
|
+
children: /*#__PURE__*/ H(G, {
|
|
2569
2565
|
id: "yqPflB",
|
|
2570
|
-
values: { hiddenCount:
|
|
2566
|
+
values: { hiddenCount: S }
|
|
2571
2567
|
})
|
|
2572
2568
|
})]
|
|
2573
2569
|
})] }),
|
|
2574
|
-
/*#__PURE__*/
|
|
2570
|
+
/*#__PURE__*/ H(f, {
|
|
2575
2571
|
label: i._({ id: "Ghp863" }),
|
|
2576
2572
|
value: u,
|
|
2577
2573
|
onChange: (e) => d(e.target.value),
|
|
@@ -2584,78 +2580,78 @@ var Ae = (e, t) => ({
|
|
|
2584
2580
|
};
|
|
2585
2581
|
//#endregion
|
|
2586
2582
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Buckets/CredentialPrompt.tsx
|
|
2587
|
-
function
|
|
2588
|
-
let t =
|
|
2583
|
+
function nt({ onSuccess: e }) {
|
|
2584
|
+
let t = L(), n = M.useUtils(), r = M.storage.ceph.ec2Credentials.create.useMutation({
|
|
2589
2585
|
onSuccess: () => {
|
|
2590
2586
|
n.storage.ceph.ec2Credentials.list.invalidate(), e();
|
|
2591
2587
|
},
|
|
2592
2588
|
onError: (e) => {
|
|
2593
2589
|
let t = e.message;
|
|
2594
|
-
l.error(/*#__PURE__*/
|
|
2590
|
+
l.error(/*#__PURE__*/ H(G, {
|
|
2595
2591
|
id: "rcBt6T",
|
|
2596
2592
|
values: { errorMessage: t }
|
|
2597
2593
|
}));
|
|
2598
2594
|
}
|
|
2599
2595
|
});
|
|
2600
|
-
return /*#__PURE__*/
|
|
2596
|
+
return /*#__PURE__*/ U(O, {
|
|
2601
2597
|
direction: "vertical",
|
|
2602
2598
|
gap: "4",
|
|
2603
2599
|
className: "mt-8 max-w-lg",
|
|
2604
2600
|
children: [
|
|
2605
|
-
/*#__PURE__*/
|
|
2601
|
+
/*#__PURE__*/ H("h2", {
|
|
2606
2602
|
className: "text-lg font-semibold",
|
|
2607
|
-
children: /*#__PURE__*/
|
|
2603
|
+
children: /*#__PURE__*/ H(G, { id: "jq5wGQ" })
|
|
2608
2604
|
}),
|
|
2609
|
-
/*#__PURE__*/
|
|
2605
|
+
/*#__PURE__*/ H("p", {
|
|
2610
2606
|
className: "text-theme-default",
|
|
2611
|
-
children: /*#__PURE__*/
|
|
2607
|
+
children: /*#__PURE__*/ H(G, { id: "+8m5QE" })
|
|
2612
2608
|
}),
|
|
2613
|
-
/*#__PURE__*/
|
|
2609
|
+
/*#__PURE__*/ H("p", {
|
|
2614
2610
|
className: "text-theme-default text-sm",
|
|
2615
|
-
children: /*#__PURE__*/
|
|
2611
|
+
children: /*#__PURE__*/ H(G, { id: "+1xG4p" })
|
|
2616
2612
|
}),
|
|
2617
|
-
/*#__PURE__*/
|
|
2613
|
+
/*#__PURE__*/ H("div", { children: /*#__PURE__*/ H(j, {
|
|
2618
2614
|
onClick: () => t && r.mutate({ project_id: t }),
|
|
2619
2615
|
disabled: r.isPending || !t,
|
|
2620
|
-
children: r.isPending ? /*#__PURE__*/
|
|
2616
|
+
children: r.isPending ? /*#__PURE__*/ H(G, { id: "k/zHK7" }) : /*#__PURE__*/ H(G, { id: "FJO48W" })
|
|
2621
2617
|
}) })
|
|
2622
2618
|
]
|
|
2623
2619
|
});
|
|
2624
2620
|
}
|
|
2625
2621
|
//#endregion
|
|
2626
2622
|
//#region src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Buckets/index.tsx
|
|
2627
|
-
var
|
|
2628
|
-
let { i18n: e, i18n: n, _: r } = K(), i =
|
|
2629
|
-
|
|
2623
|
+
var rt = () => {
|
|
2624
|
+
let { i18n: e, i18n: n, _: r } = K(), i = L(), a = fe({ from: N.fullPath }), { sortBy: o, sortDirection: c, search: u = "" } = N.useSearch(), [d, f] = W(!1), [p, g] = W(!1), [_, v] = W([]), [y, S] = W(u), C = de(void 0);
|
|
2625
|
+
ue(() => () => clearTimeout(C.current), []), ue(() => {
|
|
2630
2626
|
S(u);
|
|
2631
2627
|
}, [u]);
|
|
2632
2628
|
let w = (e) => {
|
|
2633
|
-
let { message: t, ...n } =
|
|
2629
|
+
let { message: t, ...n } = re(e);
|
|
2634
2630
|
l.success(t, n);
|
|
2635
2631
|
}, E = (e, t) => {
|
|
2636
|
-
let { message: n, ...r } =
|
|
2632
|
+
let { message: n, ...r } = ae(e, t);
|
|
2637
2633
|
l.error(n, r);
|
|
2638
2634
|
}, k = (e, t) => {
|
|
2639
|
-
let { message: n, ...r } =
|
|
2635
|
+
let { message: n, ...r } = R(e, t);
|
|
2640
2636
|
l.success(n, r);
|
|
2641
2637
|
}, A = (e, t) => {
|
|
2642
|
-
let { message: n, ...r } =
|
|
2638
|
+
let { message: n, ...r } = z(e, t);
|
|
2643
2639
|
l.error(n, r);
|
|
2644
2640
|
}, P = (e) => {
|
|
2645
|
-
let { message: t, ...n } =
|
|
2641
|
+
let { message: t, ...n } = te(e);
|
|
2646
2642
|
l.success(t, n);
|
|
2647
|
-
},
|
|
2648
|
-
let { message: n, ...r } =
|
|
2643
|
+
}, I = (e, t) => {
|
|
2644
|
+
let { message: n, ...r } = ie(e, t);
|
|
2649
2645
|
l.error(n, r);
|
|
2650
|
-
},
|
|
2646
|
+
}, ee = ({ emptiedCount: e, totalDeleted: t, errors: n }) => {
|
|
2651
2647
|
if (n.length === 0) v([]);
|
|
2652
2648
|
else {
|
|
2653
2649
|
let e = new Set(n.map((e) => e.split(": ")[0]));
|
|
2654
2650
|
v((t) => t.filter((t) => e.has(t)));
|
|
2655
2651
|
}
|
|
2656
|
-
let { message: r, ...i } =
|
|
2652
|
+
let { message: r, ...i } = ne(e, t, n);
|
|
2657
2653
|
n.length > 0 ? l.warning(r, i) : l.success(r, i);
|
|
2658
|
-
},
|
|
2654
|
+
}, B = {
|
|
2659
2655
|
options: [
|
|
2660
2656
|
{
|
|
2661
2657
|
label: e._({ id: "6YtxFj" }),
|
|
@@ -2676,13 +2672,13 @@ var nt = () => {
|
|
|
2676
2672
|
],
|
|
2677
2673
|
sortBy: o ?? "name",
|
|
2678
2674
|
sortDirection: c ?? "asc"
|
|
2679
|
-
}, { data:
|
|
2675
|
+
}, { data: V, isLoading: oe, error: se } = M.storage.ceph.containers.list.useQuery({
|
|
2680
2676
|
project_id: i,
|
|
2681
2677
|
includeMetadata: !0
|
|
2682
2678
|
}, {
|
|
2683
2679
|
enabled: !!i,
|
|
2684
2680
|
retry: !1
|
|
2685
|
-
}),
|
|
2681
|
+
}), le = (e) => [...e].sort((e, t) => {
|
|
2686
2682
|
let n;
|
|
2687
2683
|
switch (o ?? "name") {
|
|
2688
2684
|
case "name":
|
|
@@ -2703,9 +2699,9 @@ var nt = () => {
|
|
|
2703
2699
|
default: n = e.name.localeCompare(t.name);
|
|
2704
2700
|
}
|
|
2705
2701
|
return (c ?? "asc") === "desc" ? -n : n;
|
|
2706
|
-
}),
|
|
2702
|
+
}), pe = (V || []).filter((e) => e.name.toLowerCase().includes(u.toLowerCase())), q = le(pe), me = (e) => {
|
|
2707
2703
|
let t = typeof e == "string" ? e : "";
|
|
2708
|
-
|
|
2704
|
+
ce(() => {
|
|
2709
2705
|
a({ search: (e) => ({
|
|
2710
2706
|
...e,
|
|
2711
2707
|
search: t || void 0
|
|
@@ -2713,7 +2709,7 @@ var nt = () => {
|
|
|
2713
2709
|
});
|
|
2714
2710
|
}, he = (e) => {
|
|
2715
2711
|
let t = e.sortBy?.toString() || "name", n = e.sortDirection || "asc";
|
|
2716
|
-
|
|
2712
|
+
ce(() => {
|
|
2717
2713
|
a({ search: (e) => ({
|
|
2718
2714
|
...e,
|
|
2719
2715
|
sortBy: t,
|
|
@@ -2721,73 +2717,73 @@ var nt = () => {
|
|
|
2721
2717
|
}) });
|
|
2722
2718
|
});
|
|
2723
2719
|
};
|
|
2724
|
-
if (
|
|
2720
|
+
if (oe) return /*#__PURE__*/ U(O, {
|
|
2725
2721
|
className: "absolute inset-0",
|
|
2726
2722
|
distribution: "center",
|
|
2727
2723
|
alignment: "center",
|
|
2728
2724
|
direction: "vertical",
|
|
2729
|
-
children: [/*#__PURE__*/
|
|
2725
|
+
children: [/*#__PURE__*/ H(s, {
|
|
2730
2726
|
variant: "primary",
|
|
2731
2727
|
size: "large",
|
|
2732
2728
|
className: "mb-2"
|
|
2733
|
-
}), /*#__PURE__*/
|
|
2729
|
+
}), /*#__PURE__*/ H(G, { id: "c5i+X0" })]
|
|
2734
2730
|
});
|
|
2735
|
-
if (
|
|
2736
|
-
let e =
|
|
2737
|
-
if (e === "NO_CEPH_CREDENTIALS") return /*#__PURE__*/
|
|
2731
|
+
if (se) {
|
|
2732
|
+
let e = se.message;
|
|
2733
|
+
if (e === "NO_CEPH_CREDENTIALS") return /*#__PURE__*/ H(nt, { onSuccess: () => window.location.reload() });
|
|
2738
2734
|
let t = e.includes("Access denied") || e.includes("AccessDenied"), n = e.includes("Invalid access key") || e.includes("InvalidAccessKeyId");
|
|
2739
|
-
return /*#__PURE__*/
|
|
2735
|
+
return /*#__PURE__*/ H("div", { children: /*#__PURE__*/ H("p", {
|
|
2740
2736
|
className: "text-theme-default text-sm",
|
|
2741
|
-
children: t ? /*#__PURE__*/
|
|
2737
|
+
children: t ? /*#__PURE__*/ H(G, { id: "HAcOOW" }) : n ? /*#__PURE__*/ H(G, { id: "xIXYTK" }) : /*#__PURE__*/ H(G, {
|
|
2742
2738
|
id: "yDAMyU",
|
|
2743
2739
|
values: { errorMessage: e }
|
|
2744
2740
|
})
|
|
2745
2741
|
}) });
|
|
2746
2742
|
}
|
|
2747
|
-
let ge = (
|
|
2748
|
-
return /*#__PURE__*/
|
|
2743
|
+
let ge = (V || []).filter((e) => _.includes(e.name)), J = ge.length > 0, _e = ge.length, ve = (V || []).length, ye = pe.length, be = q.map((e) => e.name), Y = be.length > 0 && be.every((e) => _.includes(e)), X = be.some((e) => _.includes(e));
|
|
2744
|
+
return /*#__PURE__*/ U("div", {
|
|
2749
2745
|
className: "relative",
|
|
2750
2746
|
children: [
|
|
2751
|
-
/*#__PURE__*/
|
|
2747
|
+
/*#__PURE__*/ U(O, {
|
|
2752
2748
|
direction: "vertical",
|
|
2753
2749
|
children: [
|
|
2754
|
-
/*#__PURE__*/
|
|
2750
|
+
/*#__PURE__*/ U(O, {
|
|
2755
2751
|
distribution: "end",
|
|
2756
2752
|
alignment: "center",
|
|
2757
2753
|
gap: "2",
|
|
2758
2754
|
className: "pb-2",
|
|
2759
|
-
children: [/*#__PURE__*/
|
|
2755
|
+
children: [/*#__PURE__*/ H(O, {
|
|
2760
2756
|
gap: "0.5",
|
|
2761
2757
|
alignment: "center",
|
|
2762
|
-
children: /*#__PURE__*/
|
|
2763
|
-
options:
|
|
2764
|
-
sortBy:
|
|
2765
|
-
sortDirection:
|
|
2758
|
+
children: /*#__PURE__*/ H(F, {
|
|
2759
|
+
options: B.options,
|
|
2760
|
+
sortBy: B.sortBy,
|
|
2761
|
+
sortDirection: B.sortDirection ?? "asc",
|
|
2766
2762
|
selectClassName: "w-40",
|
|
2767
2763
|
onSortByChange: (e) => he({
|
|
2768
|
-
...
|
|
2764
|
+
...B,
|
|
2769
2765
|
sortBy: e,
|
|
2770
|
-
sortDirection:
|
|
2766
|
+
sortDirection: B.sortDirection
|
|
2771
2767
|
}),
|
|
2772
2768
|
onSortDirectionChange: (e) => he({
|
|
2773
|
-
...
|
|
2769
|
+
...B,
|
|
2774
2770
|
sortDirection: e
|
|
2775
2771
|
})
|
|
2776
2772
|
})
|
|
2777
|
-
}), /*#__PURE__*/
|
|
2773
|
+
}), /*#__PURE__*/ H(j, {
|
|
2778
2774
|
variant: "primary",
|
|
2779
2775
|
className: "whitespace-nowrap",
|
|
2780
2776
|
onClick: () => f(!0),
|
|
2781
|
-
children: /*#__PURE__*/
|
|
2777
|
+
children: /*#__PURE__*/ H(G, { id: "HiDAFk" })
|
|
2782
2778
|
})]
|
|
2783
2779
|
}),
|
|
2784
|
-
/*#__PURE__*/
|
|
2780
|
+
/*#__PURE__*/ H(h, { children: /*#__PURE__*/ H(O, {
|
|
2785
2781
|
direction: "vertical",
|
|
2786
2782
|
gap: "2",
|
|
2787
|
-
children: /*#__PURE__*/
|
|
2783
|
+
children: /*#__PURE__*/ H(O, {
|
|
2788
2784
|
distribution: "end",
|
|
2789
2785
|
alignment: "center",
|
|
2790
|
-
children: /*#__PURE__*/
|
|
2786
|
+
children: /*#__PURE__*/ H(x, {
|
|
2791
2787
|
placeholder: e._({ id: "VeDAv2" }),
|
|
2792
2788
|
"data-testid": "searchbar",
|
|
2793
2789
|
value: y,
|
|
@@ -2804,58 +2800,58 @@ var nt = () => {
|
|
|
2804
2800
|
})
|
|
2805
2801
|
})
|
|
2806
2802
|
}) }),
|
|
2807
|
-
/*#__PURE__*/
|
|
2803
|
+
/*#__PURE__*/ H(h, { children: /*#__PURE__*/ U(O, {
|
|
2808
2804
|
distribution: "start",
|
|
2809
2805
|
gap: "2",
|
|
2810
2806
|
alignment: "center",
|
|
2811
2807
|
className: "text-sm",
|
|
2812
|
-
children: [/*#__PURE__*/
|
|
2808
|
+
children: [/*#__PURE__*/ U(O, {
|
|
2813
2809
|
gap: "2",
|
|
2814
2810
|
alignment: "center",
|
|
2815
|
-
children: [/*#__PURE__*/
|
|
2811
|
+
children: [/*#__PURE__*/ H(b, {
|
|
2816
2812
|
checked: Y,
|
|
2817
2813
|
indeterminate: X && !Y,
|
|
2818
2814
|
onChange: () => {
|
|
2819
|
-
v(Y ? (e) => e.filter((e) => !
|
|
2815
|
+
v(Y ? (e) => e.filter((e) => !be.includes(e)) : (e) => [...new Set([...e, ...be])]);
|
|
2820
2816
|
}
|
|
2821
|
-
}), /*#__PURE__*/
|
|
2817
|
+
}), /*#__PURE__*/ U(T, {
|
|
2822
2818
|
className: "flex items-center",
|
|
2823
|
-
children: [/*#__PURE__*/
|
|
2819
|
+
children: [/*#__PURE__*/ H(D, {
|
|
2824
2820
|
as: "div",
|
|
2825
|
-
children: /*#__PURE__*/
|
|
2826
|
-
disabled: !
|
|
2821
|
+
children: /*#__PURE__*/ H(j, {
|
|
2822
|
+
disabled: !J,
|
|
2827
2823
|
size: "small",
|
|
2828
2824
|
icon: "moreVert",
|
|
2829
2825
|
label: e._({ id: "7L01XJ" })
|
|
2830
2826
|
})
|
|
2831
|
-
}),
|
|
2832
|
-
disabled: !
|
|
2827
|
+
}), J && /*#__PURE__*/ H(t, { children: /*#__PURE__*/ H(m, {
|
|
2828
|
+
disabled: !J,
|
|
2833
2829
|
label: n._(e._({
|
|
2834
2830
|
id: "P2tWBZ",
|
|
2835
|
-
values: { selectedCount:
|
|
2831
|
+
values: { selectedCount: _e }
|
|
2836
2832
|
})),
|
|
2837
2833
|
onClick: () => g(!0)
|
|
2838
2834
|
}) })]
|
|
2839
2835
|
})]
|
|
2840
|
-
}), /*#__PURE__*/
|
|
2836
|
+
}), /*#__PURE__*/ H("div", {
|
|
2841
2837
|
className: "text-theme-light flex items-center gap-1",
|
|
2842
2838
|
"data-testid": "buckets-info-block",
|
|
2843
|
-
children: u.trim() ? /*#__PURE__*/
|
|
2839
|
+
children: u.trim() ? /*#__PURE__*/ H(G, {
|
|
2844
2840
|
id: "xOvKAE",
|
|
2845
2841
|
values: {
|
|
2846
|
-
totalCount:
|
|
2847
|
-
filteredCount:
|
|
2842
|
+
totalCount: ve,
|
|
2843
|
+
filteredCount: ye
|
|
2848
2844
|
}
|
|
2849
|
-
}) : /*#__PURE__*/
|
|
2845
|
+
}) : /*#__PURE__*/ H(G, {
|
|
2850
2846
|
id: "Ux/pNd",
|
|
2851
|
-
values: { totalCount:
|
|
2847
|
+
values: { totalCount: ve }
|
|
2852
2848
|
})
|
|
2853
2849
|
})]
|
|
2854
2850
|
}) })
|
|
2855
2851
|
]
|
|
2856
2852
|
}),
|
|
2857
|
-
/*#__PURE__*/
|
|
2858
|
-
buckets:
|
|
2853
|
+
/*#__PURE__*/ H($e, {
|
|
2854
|
+
buckets: q,
|
|
2859
2855
|
createModalOpen: d,
|
|
2860
2856
|
setCreateModalOpen: f,
|
|
2861
2857
|
onCreateSuccess: w,
|
|
@@ -2863,24 +2859,24 @@ var nt = () => {
|
|
|
2863
2859
|
onEmptySuccess: k,
|
|
2864
2860
|
onEmptyError: A,
|
|
2865
2861
|
onDeleteSuccess: P,
|
|
2866
|
-
onDeleteError:
|
|
2862
|
+
onDeleteError: I,
|
|
2867
2863
|
selectedBuckets: _,
|
|
2868
2864
|
setSelectedBuckets: v,
|
|
2869
2865
|
hasAnyBulkAction: !0
|
|
2870
2866
|
}),
|
|
2871
|
-
/*#__PURE__*/
|
|
2867
|
+
/*#__PURE__*/ H(tt, {
|
|
2872
2868
|
isOpen: p,
|
|
2873
2869
|
buckets: ge,
|
|
2874
2870
|
onClose: () => g(!1),
|
|
2875
|
-
onComplete:
|
|
2871
|
+
onComplete: ee
|
|
2876
2872
|
})
|
|
2877
2873
|
]
|
|
2878
2874
|
});
|
|
2879
2875
|
};
|
|
2880
2876
|
//#endregion
|
|
2881
2877
|
//#region src/client/routes/_auth/projects/$projectId/storage/$provider/$storageType/index.tsx?tsr-split=component
|
|
2882
|
-
function
|
|
2883
|
-
let { project: e, provider: t } =
|
|
2878
|
+
function it() {
|
|
2879
|
+
let { project: e, provider: t } = pe({
|
|
2884
2880
|
from: "/_auth/projects/$projectId/storage/$provider/$storageType/",
|
|
2885
2881
|
select: (e) => ({
|
|
2886
2882
|
project: e.projectId,
|
|
@@ -2897,29 +2893,29 @@ function rt() {
|
|
|
2897
2893
|
break;
|
|
2898
2894
|
default: i = n._({ id: "IWF68U" });
|
|
2899
2895
|
}
|
|
2900
|
-
return /*#__PURE__*/
|
|
2896
|
+
return /*#__PURE__*/ U("div", { children: [/*#__PURE__*/ H(P, {
|
|
2901
2897
|
title: i,
|
|
2902
2898
|
projectId: e
|
|
2903
|
-
}), e ? /*#__PURE__*/
|
|
2899
|
+
}), e ? /*#__PURE__*/ H(me, {
|
|
2904
2900
|
resetKeys: [e, t],
|
|
2905
|
-
fallback: /*#__PURE__*/
|
|
2901
|
+
fallback: /*#__PURE__*/ H("div", {
|
|
2906
2902
|
className: "p-4 text-center",
|
|
2907
|
-
children: /*#__PURE__*/
|
|
2903
|
+
children: /*#__PURE__*/ H(G, { id: "diFNkW" })
|
|
2908
2904
|
}),
|
|
2909
2905
|
children: (() => {
|
|
2910
2906
|
switch (t) {
|
|
2911
|
-
case "swift": return /*#__PURE__*/
|
|
2912
|
-
case "ceph": return /*#__PURE__*/
|
|
2913
|
-
default: return /*#__PURE__*/
|
|
2907
|
+
case "swift": return /*#__PURE__*/ H(qe, {});
|
|
2908
|
+
case "ceph": return /*#__PURE__*/ H(rt, {});
|
|
2909
|
+
default: return /*#__PURE__*/ H("div", { children: "Storage Overview Page" });
|
|
2914
2910
|
}
|
|
2915
2911
|
})()
|
|
2916
|
-
}) : /*#__PURE__*/
|
|
2912
|
+
}) : /*#__PURE__*/ H("div", {
|
|
2917
2913
|
className: "p-4 text-center",
|
|
2918
|
-
children: /*#__PURE__*/
|
|
2914
|
+
children: /*#__PURE__*/ H(G, { id: "Z2fZGD" })
|
|
2919
2915
|
})] });
|
|
2920
2916
|
}
|
|
2921
|
-
var
|
|
2917
|
+
var at = () => /*#__PURE__*/ H(it, {});
|
|
2922
2918
|
//#endregion
|
|
2923
|
-
export {
|
|
2919
|
+
export { at as component };
|
|
2924
2920
|
|
|
2925
|
-
//# sourceMappingURL=_storageType-
|
|
2921
|
+
//# sourceMappingURL=_storageType-Dh6osG7k.mjs.map
|