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