@cobaltcore-dev/aurora 1.3.0 → 2.0.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/DeleteFlavorModal-C2MqUgGR.mjs +801 -0
- package/dist/client/DeleteFlavorModal-C2MqUgGR.mjs.map +1 -0
- package/dist/client/{FiltersInput-CKI6zWnm.mjs → FiltersInput-Becwxo_J.mjs} +36 -33
- package/dist/client/FiltersInput-Becwxo_J.mjs.map +1 -0
- package/dist/client/{FloatingIpActionModals-Ch8uozH9.mjs → FloatingIpActionModals-Cq10WljB.mjs} +2 -2
- package/dist/client/{FloatingIpActionModals-Ch8uozH9.mjs.map → FloatingIpActionModals-Cq10WljB.mjs.map} +1 -1
- package/dist/client/ImageToastNotifications-BWfzOUMc.mjs +1135 -0
- package/dist/client/ImageToastNotifications-BWfzOUMc.mjs.map +1 -0
- package/dist/client/RouteIdLevelDefaultError-CSseJ1yG.mjs +26 -0
- package/dist/client/RouteIdLevelDefaultError-CSseJ1yG.mjs.map +1 -0
- package/dist/client/{_flavorId-Dg7MS0Af.mjs → _flavorId-CaA4-Pnf.mjs} +4 -3
- package/dist/client/_flavorId-CaA4-Pnf.mjs.map +1 -0
- package/dist/client/_flavorId-DYv_StX22.mjs +276 -0
- package/dist/client/_flavorId-DYv_StX22.mjs.map +1 -0
- package/dist/client/_flavorId-YV3jCS5g.mjs +22 -0
- package/dist/client/_flavorId-YV3jCS5g.mjs.map +1 -0
- package/dist/client/{_floatingIpId-C9xfRWot.mjs → _floatingIpId-BeYElanB.mjs} +2 -2
- package/dist/client/{_floatingIpId-C9xfRWot.mjs.map → _floatingIpId-BeYElanB.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-DNn6ABCB.mjs → _floatingIpId-Dpsc7GU4.mjs} +5 -5
- package/dist/client/{_floatingIpId-DNn6ABCB.mjs.map → _floatingIpId-Dpsc7GU4.mjs.map} +1 -1
- package/dist/client/_imageId-mfKp3JHn.mjs +558 -0
- package/dist/client/_imageId-mfKp3JHn.mjs.map +1 -0
- package/dist/client/_imageId-mpXUMCh_.mjs +22 -0
- package/dist/client/_imageId-mpXUMCh_.mjs.map +1 -0
- package/dist/client/{_imageId-8JIbFmGB.mjs → _imageId-pBSS0YcC.mjs} +4 -3
- package/dist/client/_imageId-pBSS0YcC.mjs.map +1 -0
- package/dist/client/{_projectId-B3wmSala.mjs → _projectId-AjgJX6Gl.mjs} +2 -2
- package/dist/client/_projectId-AjgJX6Gl.mjs.map +1 -0
- package/dist/client/{_projectId-DPzv0CCp.mjs → _projectId-BnTBxKfp.mjs} +4 -4
- package/dist/client/_projectId-BnTBxKfp.mjs.map +1 -0
- package/dist/client/{_projectId-DfeVJy0G.mjs → _projectId-CVrdJ52s.mjs} +2 -2
- package/dist/client/_projectId-CVrdJ52s.mjs.map +1 -0
- package/dist/client/_projectId-DgciZslU.mjs +92 -0
- package/dist/client/_projectId-DgciZslU.mjs.map +1 -0
- package/dist/client/{_securityGroupId-C6eHmrx_.mjs → _securityGroupId-AO3wnH8g.mjs} +2 -2
- package/dist/client/_securityGroupId-AO3wnH8g.mjs.map +1 -0
- package/dist/client/{_securityGroupId-DmplhDgt.mjs → _securityGroupId-Bq0ZyG6z.mjs} +750 -741
- package/dist/client/_securityGroupId-Bq0ZyG6z.mjs.map +1 -0
- package/dist/client/_storageType-c-DAu8qr.mjs +858 -0
- package/dist/client/_storageType-c-DAu8qr.mjs.map +1 -0
- package/dist/client/components/{Error → Errors}/RouteError.d.ts +5 -0
- package/dist/client/components/Errors/RouteIdLevelDefaultError.d.ts +17 -0
- package/dist/client/components/Errors/ServiceLevelDefaultError.d.ts +9 -0
- package/dist/client/components/ListToolbar/SelectedFilters.d.ts +7 -2
- package/dist/client/components/ListToolbar/types.d.ts +6 -0
- package/dist/client/components/ListToolbar/valueLabels.d.ts +11 -0
- package/dist/client/flavors-Bgq3KZmx.mjs +659 -0
- package/dist/client/flavors-Bgq3KZmx.mjs.map +1 -0
- package/dist/client/{flavors-B1SDOPDu.mjs → flavors-ZudiAiTU.mjs} +2 -2
- package/dist/client/{flavors-B1SDOPDu.mjs.map → flavors-ZudiAiTU.mjs.map} +1 -1
- package/dist/client/{floatingips-DrCvtXtT.mjs → floatingips-B1oLH8z6.mjs} +6 -6
- package/dist/client/{floatingips-DrCvtXtT.mjs.map → floatingips-B1oLH8z6.mjs.map} +1 -1
- package/dist/client/floatingips-BeQEkVH8.mjs +14 -0
- package/dist/client/floatingips-BeQEkVH8.mjs.map +1 -0
- package/dist/client/floatingips-BtLg3yEQ.mjs +22 -0
- package/dist/client/floatingips-BtLg3yEQ.mjs.map +1 -0
- package/dist/client/floatingips-Cz9k80cc.mjs.map +1 -1
- package/dist/client/{images-BGQv9kKT.mjs → images-CnTW3bpy.mjs} +810 -770
- package/dist/client/images-CnTW3bpy.mjs.map +1 -0
- package/dist/client/{images-CPmMa4SQ.mjs → images-DZHDYDQu.mjs} +2 -2
- package/dist/client/{images-CPmMa4SQ.mjs.map → images-DZHDYDQu.mjs.map} +1 -1
- package/dist/client/index.js +412 -409
- package/dist/client/index.js.map +1 -1
- package/dist/client/{objects-DVccbrL1.mjs → objects-25xsh4Ia.mjs} +2 -2
- package/dist/client/objects-25xsh4Ia.mjs.map +1 -0
- package/dist/client/objects-KXY6dgwq.mjs +82 -0
- package/dist/client/objects-KXY6dgwq.mjs.map +1 -0
- package/dist/client/objects-QryuClU3.mjs +82 -0
- package/dist/client/objects-QryuClU3.mjs.map +1 -0
- package/dist/client/{objects-BR3eeSNH.mjs → objects-jYQBFzwg.mjs} +4668 -4699
- package/dist/client/objects-jYQBFzwg.mjs.map +1 -0
- package/dist/client/projects-yiK0HGSA.mjs.map +1 -1
- package/dist/client/securitygroups--0PS2wbM.mjs +580 -0
- package/dist/client/securitygroups--0PS2wbM.mjs.map +1 -0
- package/dist/client/{securitygroups-DEJQBcxm.mjs → securitygroups-BRndk7wh.mjs} +2 -2
- package/dist/client/{securitygroups-DEJQBcxm.mjs.map → securitygroups-BRndk7wh.mjs.map} +1 -1
- package/dist/client/securitygroups-CdN4yAAw.mjs +14 -0
- package/dist/client/securitygroups-CdN4yAAw.mjs.map +1 -0
- package/dist/client/securitygroups-Cs2Op-tu.mjs +22 -0
- package/dist/client/securitygroups-Cs2Op-tu.mjs.map +1 -0
- package/dist/client/securitygroups-CtKne8UQ.mjs.map +1 -1
- package/dist/client/trpcClient.d.ts +6 -1
- package/dist/client/useModalTracking-BYd37pXm.mjs +37 -0
- package/dist/client/useModalTracking-BYd37pXm.mjs.map +1 -0
- package/dist/client/useSecurityGroupPermissions--hK4aR8Y.mjs +294 -0
- package/dist/client/useSecurityGroupPermissions--hK4aR8Y.mjs.map +1 -0
- package/dist/server/index.d.ts +6 -1
- package/dist/server/index.js +96 -30
- package/package.json +4 -4
- package/dist/client/DeleteFlavorModal-V44QCJBd.mjs +0 -773
- package/dist/client/DeleteFlavorModal-V44QCJBd.mjs.map +0 -1
- package/dist/client/FiltersInput-CKI6zWnm.mjs.map +0 -1
- package/dist/client/ImageToastNotifications-m6c3tVPb.mjs +0 -1152
- package/dist/client/ImageToastNotifications-m6c3tVPb.mjs.map +0 -1
- package/dist/client/_flavorId-Dg7MS0Af.mjs.map +0 -1
- package/dist/client/_flavorId-kHl-b8rI.mjs +0 -232
- package/dist/client/_flavorId-kHl-b8rI.mjs.map +0 -1
- package/dist/client/_imageId-8JIbFmGB.mjs.map +0 -1
- package/dist/client/_imageId-BBAlRioC.mjs +0 -574
- package/dist/client/_imageId-BBAlRioC.mjs.map +0 -1
- package/dist/client/_projectId-7Nl1MQTJ.mjs +0 -99
- package/dist/client/_projectId-7Nl1MQTJ.mjs.map +0 -1
- package/dist/client/_projectId-B3wmSala.mjs.map +0 -1
- package/dist/client/_projectId-DPzv0CCp.mjs.map +0 -1
- package/dist/client/_projectId-DfeVJy0G.mjs.map +0 -1
- package/dist/client/_securityGroupId-C6eHmrx_.mjs.map +0 -1
- package/dist/client/_securityGroupId-DmplhDgt.mjs.map +0 -1
- package/dist/client/_storageType-C5gS9eut.mjs +0 -845
- package/dist/client/_storageType-C5gS9eut.mjs.map +0 -1
- package/dist/client/flavors-D8_PzQUB.mjs +0 -628
- package/dist/client/flavors-D8_PzQUB.mjs.map +0 -1
- package/dist/client/images-BGQv9kKT.mjs.map +0 -1
- package/dist/client/objects-AERkhfiM.mjs +0 -66
- package/dist/client/objects-AERkhfiM.mjs.map +0 -1
- package/dist/client/objects-BR3eeSNH.mjs.map +0 -1
- package/dist/client/objects-DVccbrL1.mjs.map +0 -1
- package/dist/client/securitygroups-BjhgLBHm.mjs +0 -620
- package/dist/client/securitygroups-BjhgLBHm.mjs.map +0 -1
- package/dist/client/useModalTracking-BcOKTYRN.mjs +0 -33
- package/dist/client/useModalTracking-BcOKTYRN.mjs.map +0 -1
- package/dist/client/useSecurityGroupPermissions-BOyLQLdC.mjs +0 -227
- package/dist/client/useSecurityGroupPermissions-BOyLQLdC.mjs.map +0 -1
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
import { C as e, D as t, K as n, L as r, O as i, Q as a, R as o, S as s, T as c, U as l, V as u, X as d, a as f, c as p, ft as m, g as h, h as g, i as _, it as v, l as y, m as b, o as
|
|
2
|
-
import { a as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
1
|
+
import { C as e, D as t, K as n, L as r, O as i, Q as a, R as o, S as s, T as c, U as l, V as u, X as d, a as f, c as p, ft as m, g as h, h as g, i as _, it as v, l as y, m as b, o as x, ot as S, p as C, r as w, rt as T, st as E, t as D, x as O } from "./build-WuxXRAqf.mjs";
|
|
2
|
+
import { a as k, i as A } from "./trpcClient-D7gpR7YG.mjs";
|
|
3
|
+
import { t as j } from "./cn-DM4Cy3jv.mjs";
|
|
4
|
+
import { t as M } from "./images-DZHDYDQu.mjs";
|
|
5
|
+
import { t as N } from "./useProjectId-DBc5lpoU.mjs";
|
|
6
|
+
import { t as ee } from "./SortInput-4g7nSTHW.mjs";
|
|
7
|
+
import { t as P } from "./useModalTracking-BYd37pXm.mjs";
|
|
8
|
+
import { t as F } from "./ContentHeader-CPJbgYWn.mjs";
|
|
9
9
|
import "./hooks-D0yKIumu.mjs";
|
|
10
|
-
import { A as
|
|
11
|
-
import { n as
|
|
10
|
+
import { A as I, C as te, D as ne, E as L, F as re, I as R, M as z, N as B, O as ie, P as V, S as H, T as ae, _ as oe, a as se, b as ce, c as U, d as W, f as le, g as ue, h as G, i as de, j as fe, k as pe, l as me, m as he, n as ge, o as _e, p as ve, r as ye, s as be, t as xe, u as Se, v as Ce, w as we, x as Te, y as Ee } from "./ImageToastNotifications-BWfzOUMc.mjs";
|
|
11
|
+
import { n as De, t as Oe } from "./FiltersInput-Becwxo_J.mjs";
|
|
12
12
|
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
13
|
-
import { Suspense as
|
|
14
|
-
import { useNavigate as
|
|
15
|
-
import { TRPCClientError as
|
|
13
|
+
import { Suspense as ke, startTransition as Ae, use as je, useCallback as Y, useEffect as X, useMemo as Me, useRef as Ne, useState as Z } from "react";
|
|
14
|
+
import { useNavigate as Pe, useParams as Fe, useSearch as Ie } from "@tanstack/react-router";
|
|
15
|
+
import { TRPCClientError as Le } from "@trpc/client";
|
|
16
16
|
import { Trans as Q, useLingui as $ } from "@lingui/react";
|
|
17
|
-
import { z as
|
|
18
|
-
import { ErrorBoundary as
|
|
19
|
-
import { useForm as
|
|
17
|
+
import { z as Re } from "zod";
|
|
18
|
+
import { ErrorBoundary as ze } from "react-error-boundary";
|
|
19
|
+
import { useForm as Be, useStore as Ve } from "@tanstack/react-form";
|
|
20
20
|
import "@trpc/server";
|
|
21
21
|
//#region src/client/routes/_auth/projects/$projectId/compute/images/-components/ImageTableRow.tsx
|
|
22
|
-
function
|
|
23
|
-
let { i18n: b, _:
|
|
24
|
-
|
|
25
|
-
} }),
|
|
22
|
+
function He({ image: e, isSelected: r, isPending: i, isAccepted: a, permissions: o, onEditDetails: s, onEditMetadata: l, onDelete: u, onSelect: d, onActivationStatusChange: f, onManageAccess: p, onUpdateVisibility: m, uploadId: g, uploadProgressPercent: _, onMemberStatusChanged: v, showSelectColumn: y = !1 }) {
|
|
23
|
+
let { i18n: b, _: x } = $(), { id: C, name: T, status: A, visibility: j, size: M, disk_format: N, created_at: ee, owner: P } = e, F = T || b._({ id: "MEIAzV" }), { projectId: I } = Fe({ from: "/_auth/projects/$projectId/compute/images/" }), te = Pe(), ne = k.useUtils(), L = k.compute.updateImageMember.useMutation({ onSuccess: () => {
|
|
24
|
+
ne.compute.listImagesWithPagination.invalidate(), ne.compute.listSharedImagesByMemberStatus.invalidate();
|
|
25
|
+
} }), z = async (e) => {
|
|
26
26
|
try {
|
|
27
|
-
await
|
|
28
|
-
project_id:
|
|
29
|
-
imageId:
|
|
30
|
-
memberId:
|
|
27
|
+
await L.mutateAsync({
|
|
28
|
+
project_id: I,
|
|
29
|
+
imageId: C,
|
|
30
|
+
memberId: I,
|
|
31
31
|
status: e
|
|
32
32
|
});
|
|
33
|
-
let { message: t, ...n } =
|
|
34
|
-
|
|
33
|
+
let { message: t, ...n } = W(e);
|
|
34
|
+
S.info(t, n), v?.();
|
|
35
35
|
} catch (e) {
|
|
36
|
-
let t = e?.message, { message: n, ...r } =
|
|
37
|
-
|
|
36
|
+
let t = e?.message, { message: n, ...r } = Se(t);
|
|
37
|
+
S.error(n, r);
|
|
38
38
|
}
|
|
39
|
-
},
|
|
39
|
+
}, ie = I === P, H = i || a, ae = L.isPending;
|
|
40
40
|
return /*#__PURE__*/ J(c, {
|
|
41
|
-
"data-testid": `image-row-${
|
|
42
|
-
onClick: () =>
|
|
41
|
+
"data-testid": `image-row-${C}`,
|
|
42
|
+
onClick: () => te({
|
|
43
43
|
to: "/projects/$projectId/compute/images/$imageId",
|
|
44
44
|
params: {
|
|
45
|
-
projectId:
|
|
46
|
-
imageId:
|
|
45
|
+
projectId: I,
|
|
46
|
+
imageId: C
|
|
47
47
|
}
|
|
48
48
|
}),
|
|
49
49
|
children: [
|
|
50
|
-
y && /*#__PURE__*/ q(
|
|
50
|
+
y && /*#__PURE__*/ q(D, {
|
|
51
51
|
onClick: (e) => e.stopPropagation(),
|
|
52
|
-
children: /*#__PURE__*/ q(
|
|
52
|
+
children: /*#__PURE__*/ q(E, {
|
|
53
53
|
checked: r,
|
|
54
54
|
onChange: () => d(e)
|
|
55
55
|
})
|
|
56
56
|
}),
|
|
57
|
-
/*#__PURE__*/ q(
|
|
58
|
-
/*#__PURE__*/ q(
|
|
59
|
-
/*#__PURE__*/ q(
|
|
60
|
-
/*#__PURE__*/ q(
|
|
61
|
-
/*#__PURE__*/ q(
|
|
62
|
-
/*#__PURE__*/ q(
|
|
63
|
-
/*#__PURE__*/ q(
|
|
64
|
-
/*#__PURE__*/ q(
|
|
57
|
+
/*#__PURE__*/ q(D, { children: A }),
|
|
58
|
+
/*#__PURE__*/ q(D, { children: F }),
|
|
59
|
+
/*#__PURE__*/ q(D, { children: j }),
|
|
60
|
+
/*#__PURE__*/ q(D, { children: e.protected ? b._({ id: "l75CjT" }) : b._({ id: "1UzENP" }) }),
|
|
61
|
+
/*#__PURE__*/ q(D, { children: g && g === C ? `${_}%` : /*#__PURE__*/ q(R, { size: M }) }),
|
|
62
|
+
/*#__PURE__*/ q(D, { children: N || b._({ id: "fj5byd" }) }),
|
|
63
|
+
/*#__PURE__*/ q(D, { children: ee ? new Date(ee).toLocaleDateString() : b._({ id: "fj5byd" }) }),
|
|
64
|
+
/*#__PURE__*/ q(D, {
|
|
65
65
|
onClick: (e) => e.stopPropagation(),
|
|
66
|
-
children:
|
|
66
|
+
children: ae ? /*#__PURE__*/ q(n, {
|
|
67
67
|
variant: "primary",
|
|
68
68
|
size: "small"
|
|
69
69
|
}) : /*#__PURE__*/ q(t, { children: /*#__PURE__*/ J(h, { children: [
|
|
70
|
-
/*#__PURE__*/ q(
|
|
71
|
-
label: b._({ id: "v0hPHE" }),
|
|
72
|
-
onClick: () => re({
|
|
73
|
-
to: "/projects/$projectId/compute/images/$imageId",
|
|
74
|
-
params: {
|
|
75
|
-
projectId: N,
|
|
76
|
-
imageId: S
|
|
77
|
-
}
|
|
78
|
-
})
|
|
79
|
-
}),
|
|
80
|
-
z && o.canUpdateMember && /*#__PURE__*/ J(K, { children: [i && /*#__PURE__*/ q(T, {
|
|
70
|
+
H && o.canUpdateMember && /*#__PURE__*/ J(K, { children: [i && /*#__PURE__*/ q(O, {
|
|
81
71
|
label: b._({ id: "g3UF2V" }),
|
|
82
|
-
onClick: () =>
|
|
83
|
-
}), /*#__PURE__*/ q(
|
|
72
|
+
onClick: () => z(re.ACCEPTED)
|
|
73
|
+
}), /*#__PURE__*/ q(O, {
|
|
84
74
|
label: b._({ id: "1t/NnN" }),
|
|
85
|
-
onClick: () =>
|
|
75
|
+
onClick: () => z(re.REJECTED)
|
|
86
76
|
})] }),
|
|
87
|
-
!
|
|
88
|
-
/*#__PURE__*/ q(
|
|
77
|
+
!H && o.canUpdate && /*#__PURE__*/ J(K, { children: [
|
|
78
|
+
/*#__PURE__*/ q(O, {
|
|
79
|
+
label: e.status === B.DEACTIVATED ? b._({ id: "FQBaXG" }) : b._({ id: "5y3O+A" }),
|
|
80
|
+
onClick: () => f(e)
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ q(O, {
|
|
89
83
|
label: b._({ id: "Y1YKad" }),
|
|
90
84
|
onClick: () => s(e)
|
|
91
85
|
}),
|
|
92
|
-
/*#__PURE__*/ q(
|
|
86
|
+
/*#__PURE__*/ q(O, {
|
|
93
87
|
label: b._({ id: "SIfYq6" }),
|
|
94
88
|
onClick: () => l(e)
|
|
95
89
|
}),
|
|
96
|
-
/*#__PURE__*/ q(
|
|
97
|
-
label: e.status === I.DEACTIVATED ? b._({ id: "FQBaXG" }) : b._({ id: "5y3O+A" }),
|
|
98
|
-
onClick: () => f(e)
|
|
99
|
-
}),
|
|
100
|
-
e.visibility === R.SHARED && L && (o.canCreateMember || o.canDeleteMember) && /*#__PURE__*/ q(T, {
|
|
90
|
+
e.visibility === V.SHARED && ie && (o.canCreateMember || o.canDeleteMember) && /*#__PURE__*/ q(O, {
|
|
101
91
|
label: b._({ id: "cWbW6w" }),
|
|
102
92
|
onClick: () => p(e)
|
|
103
93
|
}),
|
|
104
|
-
e.visibility ===
|
|
94
|
+
e.visibility === V.PRIVATE && /*#__PURE__*/ q(O, {
|
|
105
95
|
label: b._({ id: "gMYsdZ" }),
|
|
106
|
-
onClick: () => m(e.id,
|
|
96
|
+
onClick: () => m(e.id, V.SHARED, F)
|
|
107
97
|
})
|
|
108
98
|
] }),
|
|
109
|
-
|
|
99
|
+
/*#__PURE__*/ q(O, {
|
|
100
|
+
label: b._({ id: "v0hPHE" }),
|
|
101
|
+
onClick: () => te({
|
|
102
|
+
to: "/projects/$projectId/compute/images/$imageId",
|
|
103
|
+
params: {
|
|
104
|
+
projectId: I,
|
|
105
|
+
imageId: C
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
}),
|
|
109
|
+
!H && o.canDelete && !e.protected && /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q(w, {}), /*#__PURE__*/ q(O, {
|
|
110
110
|
label: b._({ id: "cnGeoo" }),
|
|
111
111
|
onClick: () => u(e)
|
|
112
|
-
})
|
|
112
|
+
})] })
|
|
113
113
|
] }) })
|
|
114
114
|
})
|
|
115
115
|
]
|
|
116
|
-
},
|
|
116
|
+
}, C);
|
|
117
117
|
}
|
|
118
118
|
//#endregion
|
|
119
119
|
//#region src/server/Compute/helpers/imageHelpers.ts
|
|
120
|
-
var
|
|
120
|
+
var Ue = {
|
|
121
121
|
qcow2: [
|
|
122
122
|
"bare",
|
|
123
123
|
"ova",
|
|
@@ -137,7 +137,7 @@ var He = {
|
|
|
137
137
|
aki: ["aki"],
|
|
138
138
|
ari: ["ari"],
|
|
139
139
|
ploop: ["bare"]
|
|
140
|
-
},
|
|
140
|
+
}, We = {
|
|
141
141
|
qcow2: "bare",
|
|
142
142
|
raw: "bare",
|
|
143
143
|
vmdk: "bare",
|
|
@@ -150,28 +150,28 @@ var He = {
|
|
|
150
150
|
ari: "ari",
|
|
151
151
|
ploop: "bare"
|
|
152
152
|
};
|
|
153
|
-
function We(e) {
|
|
154
|
-
return He[e] || [];
|
|
155
|
-
}
|
|
156
153
|
function Ge(e) {
|
|
157
|
-
return Ue[e] ||
|
|
154
|
+
return Ue[e] || [];
|
|
158
155
|
}
|
|
159
|
-
function Ke(e
|
|
160
|
-
return We
|
|
156
|
+
function Ke(e) {
|
|
157
|
+
return We[e] || "";
|
|
158
|
+
}
|
|
159
|
+
function qe(e, t) {
|
|
160
|
+
return Ge(e).includes(t);
|
|
161
161
|
}
|
|
162
162
|
//#endregion
|
|
163
163
|
//#region src/client/routes/_auth/projects/$projectId/compute/images/-components/CreateImageModal.tsx
|
|
164
|
-
var
|
|
164
|
+
var Je = {
|
|
165
165
|
name: "",
|
|
166
166
|
tags: [],
|
|
167
|
-
visibility:
|
|
167
|
+
visibility: V.PRIVATE,
|
|
168
168
|
disk_format: void 0,
|
|
169
169
|
container_format: void 0,
|
|
170
170
|
protected: !1,
|
|
171
171
|
min_disk: 0,
|
|
172
172
|
min_ram: 0
|
|
173
|
-
},
|
|
174
|
-
let { i18n:
|
|
173
|
+
}, Ye = ({ isOpen: e, onClose: t, onCreate: n, isLoading: i = !1, isUploadPending: s = !1, uploadProgressPercent: c }) => {
|
|
174
|
+
let { i18n: u, _: f } = $(), [p, h] = Z({ ...Je }), [y, x] = Z(""), [S, w] = Z(null), [D, O] = Z({}), [k, A] = Z(!1), [M, N] = Z(null), ee = p.name.trim() !== "" && S !== null && p.disk_format !== void 0 && p.disk_format.trim() !== "" && p.container_format !== void 0 && p.container_format.trim() !== "" && p.min_disk >= 0 && p.min_ram >= 0, P = Me(() => p.disk_format ? Ge(p.disk_format) : [], [p.disk_format]), F = [
|
|
175
175
|
".qcow2",
|
|
176
176
|
".raw",
|
|
177
177
|
".vmdk",
|
|
@@ -184,163 +184,158 @@ var qe = {
|
|
|
184
184
|
".iso",
|
|
185
185
|
".ploop",
|
|
186
186
|
".img"
|
|
187
|
-
],
|
|
187
|
+
], I = F.join(", "), te = (e) => {
|
|
188
188
|
let { name: t, value: n, type: r, checked: i } = e.target;
|
|
189
|
-
|
|
189
|
+
h((e) => ({
|
|
190
190
|
...e,
|
|
191
191
|
[t]: r === "checkbox" ? i : n
|
|
192
|
-
})),
|
|
192
|
+
})), D[t] && O((e) => {
|
|
193
193
|
let n = { ...e };
|
|
194
194
|
return delete n[t], n;
|
|
195
195
|
});
|
|
196
|
-
},
|
|
196
|
+
}, ne = (e) => {
|
|
197
197
|
let { name: t, value: n } = e.target;
|
|
198
|
-
t === "name" && (!n || n.trim() === "") &&
|
|
198
|
+
t === "name" && (!n || n.trim() === "") && O((e) => ({
|
|
199
199
|
...e,
|
|
200
|
-
name:
|
|
200
|
+
name: u._({ id: "wyIOMP" })
|
|
201
201
|
}));
|
|
202
|
-
},
|
|
202
|
+
}, L = (e, t) => {
|
|
203
203
|
if (e === "disk_format") {
|
|
204
|
-
let e = t, n =
|
|
205
|
-
|
|
204
|
+
let e = t, n = Ke(e);
|
|
205
|
+
h((t) => ({
|
|
206
206
|
...t,
|
|
207
207
|
disk_format: e,
|
|
208
208
|
container_format: n
|
|
209
209
|
}));
|
|
210
|
-
} else
|
|
210
|
+
} else h((n) => ({
|
|
211
211
|
...n,
|
|
212
212
|
[e]: t
|
|
213
213
|
}));
|
|
214
|
-
|
|
214
|
+
D[e] && O((t) => {
|
|
215
215
|
let n = { ...t };
|
|
216
216
|
return delete n[e], n;
|
|
217
217
|
});
|
|
218
|
-
},
|
|
218
|
+
}, re = (e, t) => {
|
|
219
219
|
let n = t === "" ? 0 : parseInt(t, 10);
|
|
220
|
-
isNaN(n) || (
|
|
220
|
+
isNaN(n) || (h((t) => ({
|
|
221
221
|
...t,
|
|
222
222
|
[e]: n
|
|
223
|
-
})),
|
|
223
|
+
})), D[e] && O((t) => {
|
|
224
224
|
let n = { ...t };
|
|
225
225
|
return delete n[e], n;
|
|
226
226
|
}));
|
|
227
|
-
},
|
|
228
|
-
t < 0 && (e === "min_disk" ?
|
|
227
|
+
}, R = (e, t) => {
|
|
228
|
+
t < 0 && (e === "min_disk" ? O((e) => ({
|
|
229
229
|
...e,
|
|
230
|
-
min_disk:
|
|
231
|
-
})) : e === "min_ram" &&
|
|
230
|
+
min_disk: u._({ id: "K3bUTE" })
|
|
231
|
+
})) : e === "min_ram" && O((e) => ({
|
|
232
232
|
...e,
|
|
233
|
-
min_ram:
|
|
233
|
+
min_ram: u._({ id: "PEGvy+" })
|
|
234
234
|
})));
|
|
235
|
-
},
|
|
235
|
+
}, B = (e) => {
|
|
236
236
|
let t = e.name.toLowerCase();
|
|
237
|
-
|
|
237
|
+
F.some((e) => t.endsWith(e)) ? (w(e), D.file && O((e) => {
|
|
238
238
|
let t = { ...e };
|
|
239
239
|
return delete t.file, t;
|
|
240
|
-
})) :
|
|
240
|
+
})) : O((e) => ({
|
|
241
241
|
...e,
|
|
242
|
-
file:
|
|
242
|
+
file: u._({
|
|
243
243
|
id: "qzIZOL",
|
|
244
|
-
values: { supportedFileFormats:
|
|
244
|
+
values: { supportedFileFormats: I }
|
|
245
245
|
})
|
|
246
246
|
}));
|
|
247
|
-
},
|
|
247
|
+
}, ie = (e) => {
|
|
248
248
|
let t = e.target.files?.[0];
|
|
249
|
-
t &&
|
|
250
|
-
},
|
|
251
|
-
e.preventDefault(), e.stopPropagation(),
|
|
252
|
-
},
|
|
253
|
-
e.preventDefault(), e.stopPropagation(),
|
|
254
|
-
},
|
|
255
|
-
e.preventDefault(), e.stopPropagation(),
|
|
249
|
+
t && B(t);
|
|
250
|
+
}, H = (e) => {
|
|
251
|
+
e.preventDefault(), e.stopPropagation(), A(!0);
|
|
252
|
+
}, ae = (e) => {
|
|
253
|
+
e.preventDefault(), e.stopPropagation(), A(!1);
|
|
254
|
+
}, oe = (e) => {
|
|
255
|
+
e.preventDefault(), e.stopPropagation(), A(!1);
|
|
256
256
|
let t = e.dataTransfer.files;
|
|
257
|
-
t && t.length > 0 &&
|
|
258
|
-
},
|
|
257
|
+
t && t.length > 0 && B(t[0]);
|
|
258
|
+
}, se = (e) => {
|
|
259
259
|
x(e.target.value);
|
|
260
|
-
},
|
|
261
|
-
let e =
|
|
260
|
+
}, ce = () => {
|
|
261
|
+
let e = y.trim();
|
|
262
262
|
if (e !== "") {
|
|
263
|
-
if (
|
|
263
|
+
if (p.tags.includes(e)) {
|
|
264
264
|
x("");
|
|
265
265
|
return;
|
|
266
266
|
}
|
|
267
|
-
|
|
267
|
+
h((t) => ({
|
|
268
268
|
...t,
|
|
269
269
|
tags: [...t.tags, e]
|
|
270
270
|
})), x("");
|
|
271
271
|
}
|
|
272
|
-
},
|
|
273
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
274
|
-
},
|
|
275
|
-
|
|
272
|
+
}, U = (e) => {
|
|
273
|
+
e.key === "Enter" && (e.preventDefault(), ce());
|
|
274
|
+
}, W = (e) => {
|
|
275
|
+
h((t) => ({
|
|
276
276
|
...t,
|
|
277
277
|
tags: t.tags.filter((t) => t !== e)
|
|
278
278
|
}));
|
|
279
|
-
},
|
|
279
|
+
}, le = () => {
|
|
280
280
|
let e = {};
|
|
281
|
-
return (!
|
|
282
|
-
},
|
|
283
|
-
if (e.preventDefault(),
|
|
284
|
-
|
|
281
|
+
return (!p.name || p.name.trim() === "") && (e.name = u._({ id: "wyIOMP" })), S || (e.file = u._({ id: "aTqCTq" })), (!p.disk_format || p.disk_format.trim() === "") && (e.disk_format = u._({ id: "LK0pQN" })), (!p.container_format || p.container_format.trim() === "") && (e.container_format = u._({ id: "J4DKSM" })), p.disk_format && p.container_format && (qe(p.disk_format, p.container_format) || (e.container_format = u._({ id: "BgMp/T" }))), p.min_disk < 0 && (e.min_disk = u._({ id: "K3bUTE" })), p.min_ram < 0 && (e.min_ram = u._({ id: "PEGvy+" })), O(e), Object.keys(e).length === 0;
|
|
282
|
+
}, ue = async (e) => {
|
|
283
|
+
if (e.preventDefault(), N(null), !le()) {
|
|
284
|
+
N(u._({ id: "CBFSfX" }));
|
|
285
285
|
return;
|
|
286
286
|
}
|
|
287
287
|
try {
|
|
288
|
-
await
|
|
289
|
-
name:
|
|
290
|
-
tags:
|
|
291
|
-
visibility:
|
|
292
|
-
disk_format:
|
|
293
|
-
container_format:
|
|
294
|
-
protected:
|
|
295
|
-
min_disk:
|
|
296
|
-
min_ram:
|
|
297
|
-
},
|
|
288
|
+
await n({
|
|
289
|
+
name: p.name.trim(),
|
|
290
|
+
tags: p.tags,
|
|
291
|
+
visibility: p.visibility,
|
|
292
|
+
disk_format: p.disk_format,
|
|
293
|
+
container_format: p.container_format,
|
|
294
|
+
protected: p.protected,
|
|
295
|
+
min_disk: p.min_disk,
|
|
296
|
+
min_ram: p.min_ram
|
|
297
|
+
}, S), G();
|
|
298
298
|
} catch (e) {
|
|
299
|
-
let t = e instanceof Error ? e.message :
|
|
300
|
-
|
|
299
|
+
let t = e instanceof Error ? e.message : u._({ id: "TQn3hH" });
|
|
300
|
+
N(t);
|
|
301
301
|
}
|
|
302
|
-
},
|
|
303
|
-
|
|
302
|
+
}, G = () => {
|
|
303
|
+
h({ ...Je }), x(""), w(null), O({}), N(null), t();
|
|
304
304
|
};
|
|
305
305
|
return /*#__PURE__*/ J(d, {
|
|
306
306
|
open: e,
|
|
307
|
-
onCancel:
|
|
307
|
+
onCancel: i ? void 0 : G,
|
|
308
308
|
size: "large",
|
|
309
|
-
title:
|
|
310
|
-
onConfirm:
|
|
311
|
-
confirmButtonLabel:
|
|
312
|
-
cancelButtonLabel:
|
|
313
|
-
disableConfirmButton:
|
|
314
|
-
closeable: !
|
|
315
|
-
closeOnEsc: !
|
|
309
|
+
title: u._({ id: "xw2UtT" }),
|
|
310
|
+
onConfirm: ue,
|
|
311
|
+
confirmButtonLabel: u._({ id: "a/nTb8" }),
|
|
312
|
+
cancelButtonLabel: u._({ id: "dEgA5A" }),
|
|
313
|
+
disableConfirmButton: i || !ee,
|
|
314
|
+
closeable: !i,
|
|
315
|
+
closeOnEsc: !i,
|
|
316
316
|
children: [
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
className: "mt-4"
|
|
321
|
-
children: [
|
|
322
|
-
/*#__PURE__*/ q(n, { variant: "primary" }),
|
|
323
|
-
!c && /*#__PURE__*/ q(Q, { id: "98Fs4G" }),
|
|
324
|
-
c && /*#__PURE__*/ q(Q, { id: "3q1GLx" })
|
|
325
|
-
]
|
|
317
|
+
i && !c && /*#__PURE__*/ q(T, {
|
|
318
|
+
status: "progress",
|
|
319
|
+
title: s ? u._({ id: "JGNFec" }) : u._({ id: "T6jnH+" }),
|
|
320
|
+
className: "mt-4"
|
|
326
321
|
}),
|
|
327
|
-
|
|
322
|
+
i && !!c && /*#__PURE__*/ q("div", {
|
|
328
323
|
className: "bg-neutral-quaternary mt-4 w-full rounded-full",
|
|
329
324
|
children: /*#__PURE__*/ J("div", {
|
|
330
325
|
className: "bg-theme-info flex h-4 items-center justify-center rounded-full p-0.5 text-center text-xs leading-none font-medium text-white",
|
|
331
|
-
style: { width: `${
|
|
332
|
-
children: [
|
|
326
|
+
style: { width: `${c}%` },
|
|
327
|
+
children: [c, "%"]
|
|
333
328
|
})
|
|
334
329
|
}),
|
|
335
|
-
!
|
|
330
|
+
!i && /*#__PURE__*/ J(m, {
|
|
336
331
|
className: "mb-6",
|
|
337
332
|
children: [
|
|
338
|
-
|
|
333
|
+
M && /*#__PURE__*/ q(r, {
|
|
339
334
|
variant: "error",
|
|
340
335
|
className: "mb-6",
|
|
341
|
-
children:
|
|
336
|
+
children: M
|
|
342
337
|
}),
|
|
343
|
-
/*#__PURE__*/ q(
|
|
338
|
+
/*#__PURE__*/ q(C, {
|
|
344
339
|
className: "mb-6",
|
|
345
340
|
children: /*#__PURE__*/ q(g, { children: /*#__PURE__*/ J("div", {
|
|
346
341
|
className: "w-full",
|
|
@@ -348,7 +343,7 @@ var qe = {
|
|
|
348
343
|
/*#__PURE__*/ J("label", {
|
|
349
344
|
htmlFor: "image-file",
|
|
350
345
|
className: "mb-2 block text-sm font-medium text-gray-900",
|
|
351
|
-
children: [
|
|
346
|
+
children: [u._({ id: "UKwOYH" }), /*#__PURE__*/ q("span", {
|
|
352
347
|
className: "ml-1 text-red-500",
|
|
353
348
|
children: "*"
|
|
354
349
|
})]
|
|
@@ -357,15 +352,15 @@ var qe = {
|
|
|
357
352
|
className: "flex w-full items-center justify-center",
|
|
358
353
|
children: /*#__PURE__*/ J("label", {
|
|
359
354
|
htmlFor: "image-file",
|
|
360
|
-
onDragOver:
|
|
361
|
-
onDragLeave:
|
|
362
|
-
onDrop:
|
|
363
|
-
className:
|
|
355
|
+
onDragOver: H,
|
|
356
|
+
onDragLeave: ae,
|
|
357
|
+
onDrop: oe,
|
|
358
|
+
className: j("flex h-24 w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed transition-all", k ? "border-blue-500 bg-blue-50" : "border-gray-300 bg-gray-50 hover:bg-gray-100"),
|
|
364
359
|
children: [/*#__PURE__*/ J("div", {
|
|
365
360
|
className: "flex flex-col items-center justify-center pt-3 pb-3",
|
|
366
361
|
children: [
|
|
367
362
|
/*#__PURE__*/ q("svg", {
|
|
368
|
-
className:
|
|
363
|
+
className: j("mb-1 h-6 w-6 transition-colors", k ? "text-blue-500" : "text-gray-500"),
|
|
369
364
|
"aria-hidden": "true",
|
|
370
365
|
xmlns: "http://www.w3.org/2000/svg",
|
|
371
366
|
fill: "none",
|
|
@@ -379,32 +374,32 @@ var qe = {
|
|
|
379
374
|
})
|
|
380
375
|
}),
|
|
381
376
|
/*#__PURE__*/ q("p", {
|
|
382
|
-
className:
|
|
383
|
-
children:
|
|
377
|
+
className: j("text-xs transition-colors", k ? "font-semibold text-blue-600" : "text-gray-500"),
|
|
378
|
+
children: k ? /*#__PURE__*/ q("span", { children: u._({ id: "vXmL4D" }) }) : /*#__PURE__*/ J(K, { children: [
|
|
384
379
|
/*#__PURE__*/ q("span", {
|
|
385
380
|
className: "font-semibold",
|
|
386
|
-
children:
|
|
381
|
+
children: u._({ id: "gYe+hC" })
|
|
387
382
|
}),
|
|
388
383
|
" ",
|
|
389
|
-
|
|
384
|
+
u._({ id: "Np28ib" })
|
|
390
385
|
] })
|
|
391
386
|
}),
|
|
392
387
|
/*#__PURE__*/ q("p", {
|
|
393
388
|
className: "text-xs text-gray-400",
|
|
394
|
-
children:
|
|
389
|
+
children: u._({ id: "jBIkmi" })
|
|
395
390
|
})
|
|
396
391
|
]
|
|
397
392
|
}), /*#__PURE__*/ q("input", {
|
|
398
393
|
id: "image-file",
|
|
399
394
|
type: "file",
|
|
400
395
|
className: "hidden",
|
|
401
|
-
onChange:
|
|
402
|
-
accept:
|
|
403
|
-
disabled:
|
|
396
|
+
onChange: ie,
|
|
397
|
+
accept: I,
|
|
398
|
+
disabled: i
|
|
404
399
|
})]
|
|
405
400
|
})
|
|
406
401
|
}),
|
|
407
|
-
|
|
402
|
+
S && /*#__PURE__*/ J("div", {
|
|
408
403
|
className: "mt-2 flex items-center justify-between rounded-lg border border-green-200 bg-green-50 p-2 text-xs",
|
|
409
404
|
children: [/*#__PURE__*/ J("div", {
|
|
410
405
|
className: "flex items-center",
|
|
@@ -419,29 +414,29 @@ var qe = {
|
|
|
419
414
|
})
|
|
420
415
|
}), /*#__PURE__*/ q("span", {
|
|
421
416
|
className: "text-gray-700",
|
|
422
|
-
children:
|
|
417
|
+
children: S.name
|
|
423
418
|
})]
|
|
424
419
|
}), /*#__PURE__*/ q("button", {
|
|
425
420
|
type: "button",
|
|
426
421
|
onClick: () => {
|
|
427
|
-
w(null),
|
|
422
|
+
w(null), D.file && O((e) => {
|
|
428
423
|
let t = { ...e };
|
|
429
424
|
return delete t.file, t;
|
|
430
425
|
});
|
|
431
426
|
},
|
|
432
427
|
className: "font-medium text-red-600 hover:text-red-800",
|
|
433
|
-
disabled:
|
|
434
|
-
children:
|
|
428
|
+
disabled: i,
|
|
429
|
+
children: u._({ id: "t/YqKh" })
|
|
435
430
|
})]
|
|
436
431
|
}),
|
|
437
|
-
|
|
432
|
+
D.file && /*#__PURE__*/ q("p", {
|
|
438
433
|
className: "text-theme-error mt-1 text-xs text-red-600",
|
|
439
|
-
children:
|
|
434
|
+
children: D.file
|
|
440
435
|
})
|
|
441
436
|
]
|
|
442
437
|
}) })
|
|
443
438
|
}),
|
|
444
|
-
/*#__PURE__*/ J(
|
|
439
|
+
/*#__PURE__*/ J(C, {
|
|
445
440
|
className: "mb-6",
|
|
446
441
|
children: [
|
|
447
442
|
/*#__PURE__*/ q(g, {
|
|
@@ -449,14 +444,14 @@ var qe = {
|
|
|
449
444
|
children: /*#__PURE__*/ q(b, {
|
|
450
445
|
id: "name",
|
|
451
446
|
name: "name",
|
|
452
|
-
label:
|
|
453
|
-
value:
|
|
454
|
-
onChange:
|
|
455
|
-
onBlur:
|
|
447
|
+
label: u._({ id: "ExLULX" }),
|
|
448
|
+
value: p.name,
|
|
449
|
+
onChange: te,
|
|
450
|
+
onBlur: ne,
|
|
456
451
|
required: !0,
|
|
457
|
-
errortext:
|
|
458
|
-
placeholder:
|
|
459
|
-
disabled:
|
|
452
|
+
errortext: D.name,
|
|
453
|
+
placeholder: u._({ id: "ZgyEqj" }),
|
|
454
|
+
disabled: i
|
|
460
455
|
})
|
|
461
456
|
}),
|
|
462
457
|
/*#__PURE__*/ q(g, {
|
|
@@ -472,30 +467,30 @@ var qe = {
|
|
|
472
467
|
children: /*#__PURE__*/ q(b, {
|
|
473
468
|
id: "tags",
|
|
474
469
|
name: "tags",
|
|
475
|
-
label:
|
|
476
|
-
value:
|
|
477
|
-
onChange:
|
|
478
|
-
onKeyDown:
|
|
479
|
-
helptext:
|
|
480
|
-
placeholder:
|
|
481
|
-
disabled:
|
|
470
|
+
label: u._({ id: "OYHzN1" }),
|
|
471
|
+
value: y,
|
|
472
|
+
onChange: se,
|
|
473
|
+
onKeyDown: U,
|
|
474
|
+
helptext: u._({ id: "PpMrSG" }),
|
|
475
|
+
placeholder: u._({ id: "qzx7aY" }),
|
|
476
|
+
disabled: i
|
|
482
477
|
})
|
|
483
478
|
}), /*#__PURE__*/ q(_, {
|
|
484
479
|
variant: "primary",
|
|
485
|
-
onClick:
|
|
486
|
-
disabled:
|
|
480
|
+
onClick: ce,
|
|
481
|
+
disabled: i || y.trim() === "",
|
|
487
482
|
children: /*#__PURE__*/ q(Q, { id: "m16xKo" })
|
|
488
483
|
})]
|
|
489
|
-
}),
|
|
484
|
+
}), p.tags.length > 0 && /*#__PURE__*/ q(a, {
|
|
490
485
|
gap: "1",
|
|
491
486
|
wrap: !0,
|
|
492
487
|
alignment: "center",
|
|
493
488
|
className: "mt-1",
|
|
494
|
-
children:
|
|
489
|
+
children: p.tags.map((e) => /*#__PURE__*/ q(l, {
|
|
495
490
|
closeable: !0,
|
|
496
491
|
pillKey: "",
|
|
497
492
|
pillValue: e,
|
|
498
|
-
onClose: () =>
|
|
493
|
+
onClose: () => W(e)
|
|
499
494
|
}, e))
|
|
500
495
|
})]
|
|
501
496
|
})
|
|
@@ -505,27 +500,27 @@ var qe = {
|
|
|
505
500
|
children: /*#__PURE__*/ J(v, {
|
|
506
501
|
id: "visibility",
|
|
507
502
|
name: "visibility",
|
|
508
|
-
label:
|
|
509
|
-
value:
|
|
510
|
-
onChange: (e) =>
|
|
511
|
-
disabled:
|
|
512
|
-
loading:
|
|
503
|
+
label: u._({ id: "2q/Q7x" }),
|
|
504
|
+
value: p.visibility,
|
|
505
|
+
onChange: (e) => L("visibility", e),
|
|
506
|
+
disabled: i,
|
|
507
|
+
loading: i,
|
|
513
508
|
children: [
|
|
514
509
|
/*#__PURE__*/ q(o, {
|
|
515
|
-
value:
|
|
516
|
-
label:
|
|
510
|
+
value: V.PUBLIC,
|
|
511
|
+
label: u._({ id: "7d1a0d" })
|
|
517
512
|
}),
|
|
518
513
|
/*#__PURE__*/ q(o, {
|
|
519
|
-
value:
|
|
520
|
-
label:
|
|
514
|
+
value: V.PRIVATE,
|
|
515
|
+
label: u._({ id: "zwBp5t" })
|
|
521
516
|
}),
|
|
522
517
|
/*#__PURE__*/ q(o, {
|
|
523
|
-
value:
|
|
524
|
-
label:
|
|
518
|
+
value: V.SHARED,
|
|
519
|
+
label: u._({ id: "0Gd0NU" })
|
|
525
520
|
}),
|
|
526
521
|
/*#__PURE__*/ q(o, {
|
|
527
|
-
value:
|
|
528
|
-
label:
|
|
522
|
+
value: V.COMMUNITY,
|
|
523
|
+
label: u._({ id: "chL5IG" })
|
|
529
524
|
})
|
|
530
525
|
]
|
|
531
526
|
})
|
|
@@ -542,56 +537,56 @@ var qe = {
|
|
|
542
537
|
children: /*#__PURE__*/ J(v, {
|
|
543
538
|
id: "disk_format",
|
|
544
539
|
name: "disk_format",
|
|
545
|
-
label:
|
|
546
|
-
value:
|
|
547
|
-
onChange: (e) =>
|
|
548
|
-
disabled:
|
|
549
|
-
loading:
|
|
540
|
+
label: u._({ id: "NopYGU" }),
|
|
541
|
+
value: p.disk_format,
|
|
542
|
+
onChange: (e) => L("disk_format", e),
|
|
543
|
+
disabled: i,
|
|
544
|
+
loading: i,
|
|
550
545
|
required: !0,
|
|
551
|
-
errortext:
|
|
546
|
+
errortext: D.disk_format,
|
|
552
547
|
children: [
|
|
553
548
|
/*#__PURE__*/ q(o, {
|
|
554
|
-
value:
|
|
549
|
+
value: z.QCOW2,
|
|
555
550
|
label: "QCOW2 - QEMU Emulator"
|
|
556
551
|
}),
|
|
557
552
|
/*#__PURE__*/ q(o, {
|
|
558
|
-
value:
|
|
553
|
+
value: z.RAW,
|
|
559
554
|
label: "Raw"
|
|
560
555
|
}),
|
|
561
556
|
/*#__PURE__*/ q(o, {
|
|
562
|
-
value:
|
|
557
|
+
value: z.VMDK,
|
|
563
558
|
label: "VMDK - Virtual Machine Disk"
|
|
564
559
|
}),
|
|
565
560
|
/*#__PURE__*/ q(o, {
|
|
566
|
-
value:
|
|
561
|
+
value: z.VHD,
|
|
567
562
|
label: "VHD - Virtual Hard Disk"
|
|
568
563
|
}),
|
|
569
564
|
/*#__PURE__*/ q(o, {
|
|
570
|
-
value:
|
|
565
|
+
value: z.VHDX,
|
|
571
566
|
label: "VHDX - Virtual Hard Disk Extended"
|
|
572
567
|
}),
|
|
573
568
|
/*#__PURE__*/ q(o, {
|
|
574
|
-
value:
|
|
569
|
+
value: z.VDI,
|
|
575
570
|
label: "VDI - Virtual Disk Image"
|
|
576
571
|
}),
|
|
577
572
|
/*#__PURE__*/ q(o, {
|
|
578
|
-
value:
|
|
573
|
+
value: z.AMI,
|
|
579
574
|
label: "AMI - Amazon Machine Image"
|
|
580
575
|
}),
|
|
581
576
|
/*#__PURE__*/ q(o, {
|
|
582
|
-
value:
|
|
577
|
+
value: z.ARI,
|
|
583
578
|
label: "ARI - Amazon Ramdisk Image"
|
|
584
579
|
}),
|
|
585
580
|
/*#__PURE__*/ q(o, {
|
|
586
|
-
value:
|
|
581
|
+
value: z.AKI,
|
|
587
582
|
label: "AKI - Amazon Kernel Image"
|
|
588
583
|
}),
|
|
589
584
|
/*#__PURE__*/ q(o, {
|
|
590
|
-
value:
|
|
585
|
+
value: z.ISO,
|
|
591
586
|
label: "ISO - Optical Disk Image"
|
|
592
587
|
}),
|
|
593
588
|
/*#__PURE__*/ q(o, {
|
|
594
|
-
value:
|
|
589
|
+
value: z.PLOOP,
|
|
595
590
|
label: "PLOOP - Virtuozzo/Parallels Loopback Disk"
|
|
596
591
|
})
|
|
597
592
|
]
|
|
@@ -601,14 +596,14 @@ var qe = {
|
|
|
601
596
|
children: /*#__PURE__*/ q(v, {
|
|
602
597
|
id: "container_format",
|
|
603
598
|
name: "container_format",
|
|
604
|
-
label:
|
|
605
|
-
value:
|
|
606
|
-
onChange: (e) =>
|
|
607
|
-
disabled:
|
|
599
|
+
label: u._({ id: "6/xipy" }),
|
|
600
|
+
value: p.container_format,
|
|
601
|
+
onChange: (e) => L("container_format", e),
|
|
602
|
+
disabled: i || !p.disk_format || !P.length,
|
|
608
603
|
required: !0,
|
|
609
|
-
errortext:
|
|
610
|
-
helptext: !
|
|
611
|
-
children:
|
|
604
|
+
errortext: D.container_format,
|
|
605
|
+
helptext: !P.length && u._({ id: "A7CVME" }),
|
|
606
|
+
children: P.map((e) => /*#__PURE__*/ q(o, {
|
|
612
607
|
value: e,
|
|
613
608
|
label: e.toUpperCase()
|
|
614
609
|
}, e))
|
|
@@ -618,19 +613,19 @@ var qe = {
|
|
|
618
613
|
}),
|
|
619
614
|
/*#__PURE__*/ q(g, {
|
|
620
615
|
className: "mb-0",
|
|
621
|
-
children: /*#__PURE__*/ q(
|
|
616
|
+
children: /*#__PURE__*/ q(E, {
|
|
622
617
|
id: "protected",
|
|
623
618
|
name: "protected",
|
|
624
|
-
label:
|
|
625
|
-
checked:
|
|
626
|
-
onChange:
|
|
627
|
-
helptext:
|
|
628
|
-
disabled:
|
|
619
|
+
label: u._({ id: "644xgx" }),
|
|
620
|
+
checked: p.protected,
|
|
621
|
+
onChange: te,
|
|
622
|
+
helptext: u._({ id: "aV6KPH" }),
|
|
623
|
+
disabled: i
|
|
629
624
|
})
|
|
630
625
|
})
|
|
631
626
|
]
|
|
632
627
|
}),
|
|
633
|
-
/*#__PURE__*/ q(
|
|
628
|
+
/*#__PURE__*/ q(C, {
|
|
634
629
|
className: "mb-6",
|
|
635
630
|
children: /*#__PURE__*/ q(g, {
|
|
636
631
|
className: "mb-0",
|
|
@@ -644,28 +639,28 @@ var qe = {
|
|
|
644
639
|
children: /*#__PURE__*/ q(b, {
|
|
645
640
|
id: "min_disk",
|
|
646
641
|
name: "min_disk",
|
|
647
|
-
label:
|
|
642
|
+
label: u._({ id: "NixRmA" }),
|
|
648
643
|
type: "number",
|
|
649
|
-
value: String(
|
|
650
|
-
onChange: (e) =>
|
|
651
|
-
onBlur: () =>
|
|
652
|
-
helptext:
|
|
653
|
-
errortext:
|
|
654
|
-
disabled:
|
|
644
|
+
value: String(p.min_disk),
|
|
645
|
+
onChange: (e) => re("min_disk", e.target.value),
|
|
646
|
+
onBlur: () => R("min_disk", p.min_disk),
|
|
647
|
+
helptext: u._({ id: "4fh0Wj" }),
|
|
648
|
+
errortext: D.min_disk,
|
|
649
|
+
disabled: i
|
|
655
650
|
})
|
|
656
651
|
}), /*#__PURE__*/ q("div", {
|
|
657
652
|
className: "flex-1",
|
|
658
653
|
children: /*#__PURE__*/ q(b, {
|
|
659
654
|
id: "min_ram",
|
|
660
655
|
name: "min_ram",
|
|
661
|
-
label:
|
|
656
|
+
label: u._({ id: "CgZxr7" }),
|
|
662
657
|
type: "number",
|
|
663
|
-
value: String(
|
|
664
|
-
onChange: (e) =>
|
|
665
|
-
onBlur: () =>
|
|
666
|
-
helptext:
|
|
667
|
-
errortext:
|
|
668
|
-
disabled:
|
|
658
|
+
value: String(p.min_ram),
|
|
659
|
+
onChange: (e) => re("min_ram", e.target.value),
|
|
660
|
+
onBlur: () => R("min_ram", p.min_ram),
|
|
661
|
+
helptext: u._({ id: "KsIM0b" }),
|
|
662
|
+
errortext: D.min_ram,
|
|
663
|
+
disabled: i
|
|
669
664
|
})
|
|
670
665
|
})]
|
|
671
666
|
})
|
|
@@ -675,24 +670,24 @@ var qe = {
|
|
|
675
670
|
})
|
|
676
671
|
]
|
|
677
672
|
});
|
|
678
|
-
},
|
|
679
|
-
let { i18n: s, _: c } = $(), [l, u] = Z(null), { trackClose: f, markSubmitted: p, resetTracking: h } =
|
|
673
|
+
}, Xe = 20, Ze = 100, Qe = ({ deletableImages: e, protectedImages: t, isOpen: n, isLoading: r, onClose: i, onDelete: o }) => {
|
|
674
|
+
let { i18n: s, _: c } = $(), [l, u] = Z(null), { trackClose: f, markSubmitted: p, resetTracking: h } = P({
|
|
680
675
|
isOpen: n,
|
|
681
676
|
actionPrefix: "compute.images.delete"
|
|
682
|
-
}), g =
|
|
677
|
+
}), g = Re.object({ confirm: Re.string().refine((e) => e === "delete", { message: s._({ id: "QytzQr" }) }) }), _ = Be({
|
|
683
678
|
defaultValues: { confirm: "" },
|
|
684
679
|
validators: { onSubmit: g },
|
|
685
680
|
onSubmit: async () => {
|
|
686
|
-
l === null && !r ? (p(), o(e)) :
|
|
681
|
+
l === null && !r ? (p(), o(e.map((e) => e.id))) : S();
|
|
687
682
|
}
|
|
688
|
-
}), v =
|
|
683
|
+
}), v = Ve(_.store, (e) => e.isSubmitting || e.values.confirm !== "delete"), y = e.length, x = t.length, S = () => {
|
|
689
684
|
f(), u(null), _.reset(), h(), i();
|
|
690
685
|
};
|
|
691
686
|
if (l !== null) {
|
|
692
|
-
let e = l.errors.slice(0,
|
|
687
|
+
let e = l.errors.slice(0, Ze), t = l.errors.length - e.length;
|
|
693
688
|
return /*#__PURE__*/ q(d, {
|
|
694
689
|
open: n,
|
|
695
|
-
onCancel:
|
|
690
|
+
onCancel: S,
|
|
696
691
|
title: /*#__PURE__*/ q(Q, { id: "ExvQL2" }),
|
|
697
692
|
size: "large",
|
|
698
693
|
confirmButtonLabel: s._({ id: "DPfwMq" }),
|
|
@@ -742,16 +737,16 @@ var qe = {
|
|
|
742
737
|
})
|
|
743
738
|
});
|
|
744
739
|
}
|
|
745
|
-
let
|
|
740
|
+
let w = e.slice(0, Xe), T = e.length - w.length, E = t.slice(0, Xe), D = t.length - E.length, O = r ? s._({ id: "EF2EU9" }) : y === 1 ? s._({ id: "KWa0gi" }) : s._({ id: "JtHgVz" });
|
|
746
741
|
return /*#__PURE__*/ q(d, {
|
|
747
742
|
open: n,
|
|
748
|
-
onCancel:
|
|
743
|
+
onCancel: S,
|
|
749
744
|
title: /*#__PURE__*/ q(Q, {
|
|
750
745
|
id: "FZc7ea",
|
|
751
746
|
values: { deletableCount: y }
|
|
752
747
|
}),
|
|
753
748
|
size: "large",
|
|
754
|
-
confirmButtonLabel:
|
|
749
|
+
confirmButtonLabel: O,
|
|
755
750
|
confirmButtonVariant: "primary-danger",
|
|
756
751
|
onConfirm: _.handleSubmit,
|
|
757
752
|
cancelButtonLabel: s._({ id: "dEgA5A" }),
|
|
@@ -768,41 +763,67 @@ var qe = {
|
|
|
768
763
|
}),
|
|
769
764
|
/*#__PURE__*/ J("div", {
|
|
770
765
|
className: "space-y-3",
|
|
771
|
-
children: [
|
|
766
|
+
children: [x > 0 && /*#__PURE__*/ J("div", { children: [/*#__PURE__*/ q("p", {
|
|
772
767
|
className: "text-sm font-semibold",
|
|
773
|
-
children: /*#__PURE__*/ q(Q, {
|
|
768
|
+
children: /*#__PURE__*/ q(Q, {
|
|
769
|
+
id: "k1lWHA",
|
|
770
|
+
values: { protectedCount: x }
|
|
771
|
+
})
|
|
774
772
|
}), /*#__PURE__*/ q("div", {
|
|
775
773
|
className: "bg-theme-background-lvl-2 mt-2 max-h-48 overflow-y-auto rounded p-3",
|
|
776
774
|
children: /*#__PURE__*/ J(a, {
|
|
777
775
|
direction: "vertical",
|
|
778
776
|
gap: "1",
|
|
779
|
-
children: [
|
|
780
|
-
className: "text-theme-default
|
|
781
|
-
children:
|
|
782
|
-
|
|
777
|
+
children: [E.map((e) => /*#__PURE__*/ J("div", {
|
|
778
|
+
className: "text-theme-default text-sm",
|
|
779
|
+
children: [/*#__PURE__*/ q("span", {
|
|
780
|
+
className: "font-medium",
|
|
781
|
+
children: e.name || s._({ id: "MEIAzV" })
|
|
782
|
+
}), /*#__PURE__*/ J("span", {
|
|
783
|
+
className: "text-theme-light ml-2 text-xs",
|
|
784
|
+
children: [
|
|
785
|
+
"(",
|
|
786
|
+
e.id,
|
|
787
|
+
")"
|
|
788
|
+
]
|
|
789
|
+
})]
|
|
790
|
+
}, e.id)), D > 0 && /*#__PURE__*/ q("div", {
|
|
783
791
|
className: "text-theme-light pt-2 text-sm",
|
|
784
792
|
children: /*#__PURE__*/ q(Q, {
|
|
785
|
-
id: "
|
|
786
|
-
values: {
|
|
793
|
+
id: "yZrrKY",
|
|
794
|
+
values: { hiddenProtectedCount: D }
|
|
787
795
|
})
|
|
788
796
|
})]
|
|
789
797
|
})
|
|
790
|
-
})] }),
|
|
798
|
+
})] }), y > 0 && /*#__PURE__*/ J("div", { children: [/*#__PURE__*/ q("p", {
|
|
791
799
|
className: "text-sm font-semibold",
|
|
792
|
-
children: /*#__PURE__*/ q(Q, {
|
|
800
|
+
children: /*#__PURE__*/ q(Q, {
|
|
801
|
+
id: "A1M+ku",
|
|
802
|
+
values: { deletableCount: y }
|
|
803
|
+
})
|
|
793
804
|
}), /*#__PURE__*/ q("div", {
|
|
794
|
-
className: "bg-theme-
|
|
805
|
+
className: "bg-theme-background-lvl-2 mt-2 max-h-48 overflow-y-auto rounded p-3",
|
|
795
806
|
children: /*#__PURE__*/ J(a, {
|
|
796
807
|
direction: "vertical",
|
|
797
808
|
gap: "1",
|
|
798
|
-
children: [w.map((e) => /*#__PURE__*/
|
|
799
|
-
className: "text-theme-default
|
|
800
|
-
children:
|
|
801
|
-
|
|
809
|
+
children: [w.map((e) => /*#__PURE__*/ J("div", {
|
|
810
|
+
className: "text-theme-default text-sm",
|
|
811
|
+
children: [/*#__PURE__*/ q("span", {
|
|
812
|
+
className: "font-medium",
|
|
813
|
+
children: e.name || s._({ id: "MEIAzV" })
|
|
814
|
+
}), /*#__PURE__*/ J("span", {
|
|
815
|
+
className: "text-theme-light ml-2 text-xs",
|
|
816
|
+
children: [
|
|
817
|
+
"(",
|
|
818
|
+
e.id,
|
|
819
|
+
")"
|
|
820
|
+
]
|
|
821
|
+
})]
|
|
822
|
+
}, e.id)), T > 0 && /*#__PURE__*/ q("div", {
|
|
802
823
|
className: "text-theme-light pt-2 text-sm",
|
|
803
824
|
children: /*#__PURE__*/ q(Q, {
|
|
804
|
-
id: "
|
|
805
|
-
values: {
|
|
825
|
+
id: "0TREPo",
|
|
826
|
+
values: { hiddenDeletableCount: T }
|
|
806
827
|
})
|
|
807
828
|
})]
|
|
808
829
|
})
|
|
@@ -814,7 +835,7 @@ var qe = {
|
|
|
814
835
|
onSubmit: (e) => {
|
|
815
836
|
e.preventDefault(), _.handleSubmit();
|
|
816
837
|
},
|
|
817
|
-
children: /*#__PURE__*/ q(
|
|
838
|
+
children: /*#__PURE__*/ q(C, { children: /*#__PURE__*/ q(_.Field, {
|
|
818
839
|
name: "confirm",
|
|
819
840
|
children: (e) => /*#__PURE__*/ q(b, {
|
|
820
841
|
label: s._({ id: "QytzQr" }),
|
|
@@ -834,156 +855,190 @@ var qe = {
|
|
|
834
855
|
]
|
|
835
856
|
})
|
|
836
857
|
});
|
|
837
|
-
},
|
|
838
|
-
let { i18n:
|
|
839
|
-
t.preventDefault(),
|
|
858
|
+
}, $e = ({ activeImages: e, deactivatedImages: t, isOpen: n, isLoading: r, onClose: i, onDeactivate: a }) => {
|
|
859
|
+
let { i18n: o, _: s } = $(), c = e.length, l = t.length, u = (t) => {
|
|
860
|
+
t.preventDefault(), a(e.map((e) => e.id));
|
|
840
861
|
};
|
|
841
|
-
return /*#__PURE__*/
|
|
842
|
-
onCancel:
|
|
862
|
+
return /*#__PURE__*/ q(d, {
|
|
863
|
+
onCancel: i,
|
|
843
864
|
size: "small",
|
|
844
|
-
title:
|
|
845
|
-
|
|
865
|
+
title: /*#__PURE__*/ q(Q, {
|
|
866
|
+
id: "9SJ9QF",
|
|
867
|
+
values: { activeCount: c }
|
|
868
|
+
}),
|
|
869
|
+
open: n,
|
|
846
870
|
onConfirm: (e) => {
|
|
847
|
-
|
|
871
|
+
u(e), i();
|
|
848
872
|
},
|
|
849
|
-
confirmButtonLabel:
|
|
850
|
-
cancelButtonLabel:
|
|
851
|
-
disableConfirmButton:
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
873
|
+
confirmButtonLabel: o._({ id: "5y3O+A" }),
|
|
874
|
+
cancelButtonLabel: o._({ id: "dEgA5A" }),
|
|
875
|
+
disableConfirmButton: r,
|
|
876
|
+
disableCancelButton: r,
|
|
877
|
+
disableCloseButton: r,
|
|
878
|
+
children: r ? /*#__PURE__*/ q(T, {
|
|
879
|
+
status: "progress",
|
|
880
|
+
title: o._({ id: "ZVOPtb" }),
|
|
881
|
+
className: "mt-0"
|
|
882
|
+
}) : /*#__PURE__*/ q("div", {
|
|
857
883
|
className: "my-6",
|
|
858
|
-
children:
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
id: "
|
|
862
|
-
|
|
863
|
-
|
|
884
|
+
children: c > 0 && /*#__PURE__*/ J(K, { children: [
|
|
885
|
+
/*#__PURE__*/ q("p", {
|
|
886
|
+
className: "mb-6",
|
|
887
|
+
children: /*#__PURE__*/ q(Q, { id: "d3QRaL" })
|
|
888
|
+
}),
|
|
889
|
+
l > 0 && /*#__PURE__*/ J("div", {
|
|
890
|
+
className: "mb-6",
|
|
891
|
+
children: [/*#__PURE__*/ q("p", {
|
|
892
|
+
className: "text-sm font-semibold",
|
|
893
|
+
children: /*#__PURE__*/ q(Q, {
|
|
894
|
+
id: "6enkjl",
|
|
895
|
+
values: { deactivatedCount: l }
|
|
896
|
+
})
|
|
897
|
+
}), /*#__PURE__*/ q("div", {
|
|
898
|
+
className: "jn:bg-theme-background-lvl-1 mt-2 max-h-24 overflow-y-auto rounded p-4",
|
|
899
|
+
children: /*#__PURE__*/ q("div", {
|
|
900
|
+
className: "space-y-1",
|
|
901
|
+
children: t.map((e) => /*#__PURE__*/ J("div", {
|
|
902
|
+
className: "text-theme-default text-sm",
|
|
903
|
+
children: [/*#__PURE__*/ q("span", {
|
|
904
|
+
className: "font-medium",
|
|
905
|
+
children: e.name || o._({ id: "MEIAzV" })
|
|
906
|
+
}), /*#__PURE__*/ J("span", {
|
|
907
|
+
className: "text-theme-light ml-2 text-xs",
|
|
908
|
+
children: [
|
|
909
|
+
"(",
|
|
910
|
+
e.id,
|
|
911
|
+
")"
|
|
912
|
+
]
|
|
913
|
+
})]
|
|
914
|
+
}, e.id))
|
|
915
|
+
})
|
|
916
|
+
})]
|
|
917
|
+
}),
|
|
918
|
+
/*#__PURE__*/ J("div", {
|
|
919
|
+
className: "mb-6",
|
|
920
|
+
children: [/*#__PURE__*/ q("p", {
|
|
921
|
+
className: "text-sm font-semibold",
|
|
922
|
+
children: /*#__PURE__*/ q(Q, {
|
|
923
|
+
id: "v8OJPu",
|
|
924
|
+
values: { activeCount: c }
|
|
925
|
+
})
|
|
926
|
+
}), /*#__PURE__*/ q("div", {
|
|
927
|
+
className: "jn:bg-theme-background-lvl-1 mt-2 max-h-24 overflow-y-auto rounded p-4",
|
|
928
|
+
children: /*#__PURE__*/ q("div", {
|
|
929
|
+
className: "space-y-1",
|
|
930
|
+
children: e.map((e) => /*#__PURE__*/ J("div", {
|
|
931
|
+
className: "text-theme-default text-sm",
|
|
932
|
+
children: [/*#__PURE__*/ q("span", {
|
|
933
|
+
className: "font-medium",
|
|
934
|
+
children: e.name || o._({ id: "MEIAzV" })
|
|
935
|
+
}), /*#__PURE__*/ J("span", {
|
|
936
|
+
className: "text-theme-light ml-2 text-xs",
|
|
937
|
+
children: [
|
|
938
|
+
"(",
|
|
939
|
+
e.id,
|
|
940
|
+
")"
|
|
941
|
+
]
|
|
942
|
+
})]
|
|
943
|
+
}, e.id))
|
|
944
|
+
})
|
|
945
|
+
})]
|
|
864
946
|
})
|
|
865
|
-
})
|
|
866
|
-
|
|
867
|
-
children: [/*#__PURE__*/ q("p", {
|
|
868
|
-
className: "text-sm font-semibold",
|
|
869
|
-
children: /*#__PURE__*/ q(Q, { id: "rD9yV1" })
|
|
870
|
-
}), /*#__PURE__*/ q("div", {
|
|
871
|
-
className: "jn:bg-theme-background-lvl-1 mt-2 max-h-24 overflow-y-auto rounded p-4",
|
|
872
|
-
children: /*#__PURE__*/ q("ul", {
|
|
873
|
-
className: "space-y-2",
|
|
874
|
-
children: e.map((e) => /*#__PURE__*/ q("li", {
|
|
875
|
-
className: "jn:text-theme-default",
|
|
876
|
-
children: e
|
|
877
|
-
}, e))
|
|
878
|
-
})
|
|
879
|
-
})]
|
|
880
|
-
})] }), f > 0 && /*#__PURE__*/ J("div", {
|
|
881
|
-
className: "mb-6",
|
|
882
|
-
children: [/*#__PURE__*/ q("p", {
|
|
883
|
-
className: "text-sm font-semibold",
|
|
884
|
-
children: /*#__PURE__*/ q(Q, { id: "NH2fsP" })
|
|
885
|
-
}), /*#__PURE__*/ q("div", {
|
|
886
|
-
className: "jn:bg-theme-background-lvl-1 mt-2 max-h-24 overflow-y-auto rounded p-4",
|
|
887
|
-
children: /*#__PURE__*/ q("ul", {
|
|
888
|
-
className: "space-y-2",
|
|
889
|
-
children: t.map((e) => /*#__PURE__*/ q("li", {
|
|
890
|
-
className: "jn:text-theme-default",
|
|
891
|
-
children: e
|
|
892
|
-
}, e))
|
|
893
|
-
})
|
|
894
|
-
})]
|
|
895
|
-
})]
|
|
896
|
-
})]
|
|
947
|
+
] })
|
|
948
|
+
})
|
|
897
949
|
});
|
|
898
|
-
},
|
|
899
|
-
let { i18n:
|
|
900
|
-
return /*#__PURE__*/
|
|
901
|
-
onCancel:
|
|
950
|
+
}, et = ({ deactivatedImages: e, activeImages: t, isOpen: n, isLoading: r, onClose: i, onActivate: a }) => {
|
|
951
|
+
let { i18n: o, _: s } = $(), c = e.length, l = t.length;
|
|
952
|
+
return /*#__PURE__*/ q(d, {
|
|
953
|
+
onCancel: i,
|
|
902
954
|
size: "small",
|
|
903
|
-
title:
|
|
904
|
-
|
|
955
|
+
title: /*#__PURE__*/ q(Q, {
|
|
956
|
+
id: "yETT/b",
|
|
957
|
+
values: { deactivatedCount: c }
|
|
958
|
+
}),
|
|
959
|
+
open: n,
|
|
905
960
|
onConfirm: (t) => {
|
|
906
|
-
t.preventDefault(),
|
|
961
|
+
t.preventDefault(), a(e.map((e) => e.id));
|
|
907
962
|
},
|
|
908
|
-
confirmButtonLabel:
|
|
909
|
-
cancelButtonLabel:
|
|
910
|
-
disableConfirmButton:
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
963
|
+
confirmButtonLabel: o._({ id: "FQBaXG" }),
|
|
964
|
+
cancelButtonLabel: o._({ id: "dEgA5A" }),
|
|
965
|
+
disableConfirmButton: r,
|
|
966
|
+
disableCancelButton: r,
|
|
967
|
+
disableCloseButton: r,
|
|
968
|
+
children: r ? /*#__PURE__*/ q(T, {
|
|
969
|
+
status: "progress",
|
|
970
|
+
title: o._({ id: "nuetDT" }),
|
|
971
|
+
className: "mt-0"
|
|
972
|
+
}) : /*#__PURE__*/ q("div", {
|
|
916
973
|
className: "my-6",
|
|
917
|
-
children: [
|
|
918
|
-
|
|
974
|
+
children: c > 0 && /*#__PURE__*/ J(K, { children: [
|
|
975
|
+
/*#__PURE__*/ q("p", {
|
|
919
976
|
className: "mb-6",
|
|
920
|
-
children: /*#__PURE__*/ q(Q, {
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
components: { 0: /*#__PURE__*/ q("strong", {}) }
|
|
924
|
-
})
|
|
925
|
-
}), /*#__PURE__*/ J("div", {
|
|
977
|
+
children: /*#__PURE__*/ q(Q, { id: "5UiM8J" })
|
|
978
|
+
}),
|
|
979
|
+
l > 0 && /*#__PURE__*/ J("div", {
|
|
926
980
|
className: "mb-6",
|
|
927
|
-
children: [/*#__PURE__*/ q("
|
|
928
|
-
className: "
|
|
981
|
+
children: [/*#__PURE__*/ q("p", {
|
|
982
|
+
className: "text-sm font-semibold",
|
|
929
983
|
children: /*#__PURE__*/ q(Q, {
|
|
930
|
-
id: "
|
|
931
|
-
values: {
|
|
984
|
+
id: "QoVs5e",
|
|
985
|
+
values: { activeCount: l }
|
|
932
986
|
})
|
|
933
987
|
}), /*#__PURE__*/ q("div", {
|
|
934
|
-
className: "jn:bg-theme-background-lvl-1 max-h-24 overflow-y-auto rounded p-4",
|
|
935
|
-
children: /*#__PURE__*/ q("
|
|
936
|
-
className: "space-y-
|
|
937
|
-
children:
|
|
938
|
-
className: "
|
|
939
|
-
children:
|
|
940
|
-
|
|
988
|
+
className: "jn:bg-theme-background-lvl-1 mt-2 max-h-24 overflow-y-auto rounded p-4",
|
|
989
|
+
children: /*#__PURE__*/ q("div", {
|
|
990
|
+
className: "space-y-1",
|
|
991
|
+
children: t.map((e) => /*#__PURE__*/ J("div", {
|
|
992
|
+
className: "text-theme-default text-sm",
|
|
993
|
+
children: [/*#__PURE__*/ q("span", {
|
|
994
|
+
className: "font-medium",
|
|
995
|
+
children: e.name || o._({ id: "MEIAzV" })
|
|
996
|
+
}), /*#__PURE__*/ J("span", {
|
|
997
|
+
className: "text-theme-light ml-2 text-xs",
|
|
998
|
+
children: [
|
|
999
|
+
"(",
|
|
1000
|
+
e.id,
|
|
1001
|
+
")"
|
|
1002
|
+
]
|
|
1003
|
+
})]
|
|
1004
|
+
}, e.id))
|
|
941
1005
|
})
|
|
942
1006
|
})]
|
|
943
|
-
})
|
|
944
|
-
|
|
1007
|
+
}),
|
|
1008
|
+
/*#__PURE__*/ J("div", {
|
|
945
1009
|
className: "mb-6",
|
|
946
|
-
children: [/*#__PURE__*/ q("
|
|
947
|
-
className: "
|
|
948
|
-
children: /*#__PURE__*/ q(Q, {
|
|
1010
|
+
children: [/*#__PURE__*/ q("p", {
|
|
1011
|
+
className: "text-sm font-semibold",
|
|
1012
|
+
children: /*#__PURE__*/ q(Q, {
|
|
1013
|
+
id: "ezGecL",
|
|
1014
|
+
values: { deactivatedCount: c }
|
|
1015
|
+
})
|
|
949
1016
|
}), /*#__PURE__*/ q("div", {
|
|
950
|
-
className: "jn:bg-theme-
|
|
951
|
-
children: /*#__PURE__*/ q("
|
|
952
|
-
className: "space-y-
|
|
953
|
-
children:
|
|
954
|
-
className: "
|
|
955
|
-
children:
|
|
956
|
-
|
|
1017
|
+
className: "jn:bg-theme-background-lvl-1 mt-2 max-h-24 overflow-y-auto rounded p-4",
|
|
1018
|
+
children: /*#__PURE__*/ q("div", {
|
|
1019
|
+
className: "space-y-1",
|
|
1020
|
+
children: e.map((e) => /*#__PURE__*/ J("div", {
|
|
1021
|
+
className: "text-theme-default text-sm",
|
|
1022
|
+
children: [/*#__PURE__*/ q("span", {
|
|
1023
|
+
className: "font-medium",
|
|
1024
|
+
children: e.name || o._({ id: "MEIAzV" })
|
|
1025
|
+
}), /*#__PURE__*/ J("span", {
|
|
1026
|
+
className: "text-theme-light ml-2 text-xs",
|
|
1027
|
+
children: [
|
|
1028
|
+
"(",
|
|
1029
|
+
e.id,
|
|
1030
|
+
")"
|
|
1031
|
+
]
|
|
1032
|
+
})]
|
|
1033
|
+
}, e.id))
|
|
957
1034
|
})
|
|
958
1035
|
})]
|
|
959
|
-
}),
|
|
960
|
-
/*#__PURE__*/ J("div", {
|
|
961
|
-
className: "jn:bg-theme-background-lvl-2 mb-6 rounded p-4",
|
|
962
|
-
children: [u > 0 && /*#__PURE__*/ J("div", {
|
|
963
|
-
className: "mb-2 flex justify-between",
|
|
964
|
-
children: [/*#__PURE__*/ q("span", {
|
|
965
|
-
className: "jn:text-theme-default",
|
|
966
|
-
children: /*#__PURE__*/ q(Q, { id: "4fvDRe" })
|
|
967
|
-
}), /*#__PURE__*/ q("span", {
|
|
968
|
-
className: "jn:text-theme-highest font-semibold",
|
|
969
|
-
children: u
|
|
970
|
-
})]
|
|
971
|
-
}), f > 0 && /*#__PURE__*/ J("div", {
|
|
972
|
-
className: "flex justify-between",
|
|
973
|
-
children: [/*#__PURE__*/ q("span", {
|
|
974
|
-
className: "jn:text-theme-default",
|
|
975
|
-
children: /*#__PURE__*/ q(Q, { id: "x5l/TK" })
|
|
976
|
-
}), /*#__PURE__*/ q("span", {
|
|
977
|
-
className: "jn:text-theme-warning font-semibold",
|
|
978
|
-
children: f
|
|
979
|
-
})]
|
|
980
|
-
})]
|
|
981
1036
|
})
|
|
982
|
-
]
|
|
983
|
-
})
|
|
1037
|
+
] })
|
|
1038
|
+
})
|
|
984
1039
|
});
|
|
985
|
-
},
|
|
986
|
-
let { i18n: o, _: s } = $(), c =
|
|
1040
|
+
}, tt = ({ isOpen: e, onClose: t, image: n, permissions: { canCreateMember: i, canDeleteMember: a } }) => {
|
|
1041
|
+
let { i18n: o, _: s } = $(), c = N(), [l, u] = Z(null), [f, p] = Z(!1), { data: m, isLoading: h } = k.compute.listImageMembers.useQuery({
|
|
987
1042
|
project_id: c,
|
|
988
1043
|
imageId: n?.id || ""
|
|
989
1044
|
}, { enabled: e && !!n?.id }), g = () => {
|
|
@@ -1004,7 +1059,7 @@ var qe = {
|
|
|
1004
1059
|
text: l.text,
|
|
1005
1060
|
variant: l.type,
|
|
1006
1061
|
className: "mb-4"
|
|
1007
|
-
}), /*#__PURE__*/ q(
|
|
1062
|
+
}), /*#__PURE__*/ q(I, {
|
|
1008
1063
|
projectId: c,
|
|
1009
1064
|
image: n,
|
|
1010
1065
|
imageMembers: m,
|
|
@@ -1019,40 +1074,40 @@ var qe = {
|
|
|
1019
1074
|
};
|
|
1020
1075
|
//#endregion
|
|
1021
1076
|
//#region src/client/routes/_auth/projects/$projectId/compute/images/-components/ImageListView.tsx
|
|
1022
|
-
function
|
|
1023
|
-
let
|
|
1024
|
-
|
|
1025
|
-
} }), Ge =
|
|
1026
|
-
|
|
1027
|
-
} }), Ke =
|
|
1077
|
+
function nt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r, isFetching: i, currentPage: a = 1, totalPages: o = 1, onPageChange: l, children: d, selectedImages: f, setSelectedImages: p, deleteAllModalOpen: m, setDeleteAllModalOpen: h, deactivateAllModalOpen: g, setDeactivateAllModalOpen: _, activateAllModalOpen: v, setActivateAllModalOpen: y, createModalOpen: b, setCreateModalOpen: C, deletableImages: w, protectedImages: E, activeImages: O, deactivatedImages: j, onImageUpdated: M, onImageDeleted: ee, onMemberStatusChanged: P, hasAnyBulkAction: F }) {
|
|
1078
|
+
let I = N(), [re, R] = Z(!1), [z, V] = Z(!1), [W, fe] = Z(!1), [Se, De] = Z(!1), [Oe, ke] = Z(!1), [Ae, je] = Z(!1), [Y, X] = Z(null), [Me, Ne] = Z(!1), [Pe, Fe] = Z(null), [Ie, Re] = Z(!1), { i18n: ze, _: Be } = $(), Ve = k.useUtils(), Ue = k.compute.deleteImage.useMutation(), We = k.compute.deactivateImage.useMutation({ onSuccess: () => {
|
|
1079
|
+
Ve.compute.getImageById.invalidate();
|
|
1080
|
+
} }), Ge = k.compute.reactivateImage.useMutation({ onSuccess: () => {
|
|
1081
|
+
Ve.compute.getImageById.invalidate();
|
|
1082
|
+
} }), Ke = k.compute.deleteImages.useMutation({ onSuccess: () => {
|
|
1028
1083
|
p([]);
|
|
1029
|
-
} }), qe =
|
|
1084
|
+
} }), qe = k.compute.activateImages.useMutation({ onSuccess: () => {
|
|
1030
1085
|
p([]);
|
|
1031
|
-
} }),
|
|
1086
|
+
} }), Je = k.compute.deactivateImages.useMutation({ onSuccess: () => {
|
|
1032
1087
|
p([]);
|
|
1033
|
-
} }), Xe =
|
|
1034
|
-
|
|
1035
|
-
project_id:
|
|
1088
|
+
} }), Xe = k.compute.updateImage.useMutation({ onSuccess: (e) => {
|
|
1089
|
+
Ve.compute.getImageById.setData({
|
|
1090
|
+
project_id: I,
|
|
1036
1091
|
imageId: e.id
|
|
1037
1092
|
}, e);
|
|
1038
|
-
} }),
|
|
1039
|
-
project_id:
|
|
1093
|
+
} }), Ze = k.compute.createImage.useMutation(), nt = k.compute.updateImageVisibility.useMutation(), { data: rt } = k.compute.watchUploadProgress.useSubscription({
|
|
1094
|
+
project_id: I,
|
|
1040
1095
|
uploadId: Pe || ""
|
|
1041
|
-
}, { enabled: !!Pe &&
|
|
1096
|
+
}, { enabled: !!Pe && Ie }), it = Ue.isPending || We.isPending || Ge.isPending || Ke.isPending || qe.isPending || Je.isPending || Xe.isPending, at = async (e, t, n) => {
|
|
1042
1097
|
try {
|
|
1043
|
-
|
|
1044
|
-
project_id:
|
|
1098
|
+
M(await nt.mutateAsync({
|
|
1099
|
+
project_id: I,
|
|
1045
1100
|
imageId: e,
|
|
1046
1101
|
visibility: t
|
|
1047
1102
|
}));
|
|
1048
|
-
let { message: r, ...i } =
|
|
1049
|
-
|
|
1103
|
+
let { message: r, ...i } = we(n, t);
|
|
1104
|
+
S.success(r, i);
|
|
1050
1105
|
} catch (e) {
|
|
1051
1106
|
let r = e?.message || ze._({
|
|
1052
1107
|
id: "J9cmxx",
|
|
1053
1108
|
values: { newVisibility: t }
|
|
1054
|
-
}), { message: i, ...a } =
|
|
1055
|
-
|
|
1109
|
+
}), { message: i, ...a } = te(n, r);
|
|
1110
|
+
S.error(i, a);
|
|
1056
1111
|
}
|
|
1057
1112
|
}, ot = (e, t) => {
|
|
1058
1113
|
let n = [];
|
|
@@ -1076,106 +1131,106 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
|
|
|
1076
1131
|
let t = Y.id, n = e.name || Y.name || t;
|
|
1077
1132
|
try {
|
|
1078
1133
|
let r = ot(e, Y), i = await Xe.mutateAsync({
|
|
1079
|
-
project_id:
|
|
1134
|
+
project_id: I,
|
|
1080
1135
|
imageId: t,
|
|
1081
1136
|
operations: r
|
|
1082
1137
|
});
|
|
1083
|
-
|
|
1084
|
-
let { message: a, ...o } =
|
|
1085
|
-
return
|
|
1138
|
+
R(!1);
|
|
1139
|
+
let { message: a, ...o } = H(n);
|
|
1140
|
+
return S.success(a, o), X(i), M(i), !0;
|
|
1086
1141
|
} catch (e) {
|
|
1087
|
-
let t = e?.message ?? "", { message: r, ...i } =
|
|
1088
|
-
return
|
|
1142
|
+
let t = e?.message ?? "", { message: r, ...i } = Te(n, t);
|
|
1143
|
+
return S.error(r, i), X(null), !1;
|
|
1089
1144
|
}
|
|
1090
1145
|
}, ct = async (e, t) => {
|
|
1091
1146
|
let n = e.name || "Unnamed";
|
|
1092
1147
|
try {
|
|
1093
1148
|
Ne(!0);
|
|
1094
|
-
let r = await
|
|
1095
|
-
project_id:
|
|
1149
|
+
let r = await Ze.mutateAsync({
|
|
1150
|
+
project_id: I,
|
|
1096
1151
|
...e
|
|
1097
1152
|
});
|
|
1098
|
-
Fe(r.id), Re(!0), await
|
|
1099
|
-
"x-project-id":
|
|
1153
|
+
Fe(r.id), Re(!0), await A.compute.uploadImage.mutate(t, { context: { headers: {
|
|
1154
|
+
"x-project-id": I,
|
|
1100
1155
|
"x-upload-id": r.id,
|
|
1101
1156
|
"x-upload-size": String(t.size)
|
|
1102
1157
|
} } });
|
|
1103
|
-
let { message: i, ...a } =
|
|
1104
|
-
|
|
1158
|
+
let { message: i, ...a } = G(n);
|
|
1159
|
+
S.success(i, a), M(r), P();
|
|
1105
1160
|
} catch (e) {
|
|
1106
|
-
if (e instanceof
|
|
1107
|
-
let { message: t, ...r } =
|
|
1108
|
-
|
|
1161
|
+
if (e instanceof Le && e.data?.path === "compute.createImage") {
|
|
1162
|
+
let { message: t, ...r } = he(n, e.message);
|
|
1163
|
+
S.error(t, r);
|
|
1109
1164
|
} else {
|
|
1110
|
-
let n = e?.message ?? "", { message: r, ...i } =
|
|
1111
|
-
|
|
1165
|
+
let n = e?.message ?? "", { message: r, ...i } = ce(t.name, n);
|
|
1166
|
+
S.error(r, i);
|
|
1112
1167
|
}
|
|
1113
1168
|
} finally {
|
|
1114
|
-
Ne(!1),
|
|
1169
|
+
Ne(!1), C(!1), Re(!1), Fe(null);
|
|
1115
1170
|
}
|
|
1116
1171
|
}, lt = async (e) => {
|
|
1117
|
-
|
|
1172
|
+
R(!1), V(!1);
|
|
1118
1173
|
let t = e.name || e.id, n = e.id;
|
|
1119
1174
|
try {
|
|
1120
1175
|
await Ue.mutateAsync({
|
|
1121
|
-
project_id:
|
|
1176
|
+
project_id: I,
|
|
1122
1177
|
imageId: n
|
|
1123
1178
|
});
|
|
1124
|
-
let { message: e, ...r } =
|
|
1125
|
-
|
|
1179
|
+
let { message: e, ...r } = Ee(t);
|
|
1180
|
+
S.success(e, r), ee(n);
|
|
1126
1181
|
} catch (e) {
|
|
1127
|
-
let t = e?.message ?? "", { message: r, ...i } =
|
|
1128
|
-
|
|
1182
|
+
let t = e?.message ?? "", { message: r, ...i } = Ce(n, t);
|
|
1183
|
+
S.error(r, i);
|
|
1129
1184
|
}
|
|
1130
1185
|
X(null);
|
|
1131
1186
|
}, ut = async (e) => {
|
|
1132
|
-
e.status ===
|
|
1187
|
+
e.status === B.DEACTIVATED ? (X(e), ke(!0)) : (X(e), De(!0));
|
|
1133
1188
|
}, dt = async (e) => {
|
|
1134
1189
|
let t = e.name || e.id, n = e.id;
|
|
1135
1190
|
try {
|
|
1136
1191
|
await Ge.mutateAsync({
|
|
1137
|
-
project_id:
|
|
1192
|
+
project_id: I,
|
|
1138
1193
|
imageId: n
|
|
1139
|
-
}),
|
|
1194
|
+
}), M({
|
|
1140
1195
|
...e,
|
|
1141
|
-
status:
|
|
1196
|
+
status: B.ACTIVE
|
|
1142
1197
|
}), ke(!1), X(null);
|
|
1143
|
-
let { message: r, ...i } =
|
|
1144
|
-
|
|
1198
|
+
let { message: r, ...i } = le(t);
|
|
1199
|
+
S.success(r, i);
|
|
1145
1200
|
} catch (e) {
|
|
1146
|
-
let t = e?.message ?? "", { message: r, ...i } =
|
|
1147
|
-
|
|
1201
|
+
let t = e?.message ?? "", { message: r, ...i } = ve(n, t);
|
|
1202
|
+
S.error(r, i);
|
|
1148
1203
|
}
|
|
1149
1204
|
}, ft = async (e) => {
|
|
1150
1205
|
let t = e.name || e.id, n = e.id;
|
|
1151
1206
|
try {
|
|
1152
1207
|
await We.mutateAsync({
|
|
1153
|
-
project_id:
|
|
1208
|
+
project_id: I,
|
|
1154
1209
|
imageId: n
|
|
1155
|
-
}),
|
|
1210
|
+
}), M({
|
|
1156
1211
|
...e,
|
|
1157
|
-
status:
|
|
1212
|
+
status: B.DEACTIVATED
|
|
1158
1213
|
}), De(!1), X(null);
|
|
1159
|
-
let { message: r, ...i } =
|
|
1160
|
-
|
|
1214
|
+
let { message: r, ...i } = ue(t);
|
|
1215
|
+
S.success(r, i);
|
|
1161
1216
|
} catch (e) {
|
|
1162
|
-
let t = e?.message ?? "", { message: r, ...i } =
|
|
1163
|
-
|
|
1217
|
+
let t = e?.message ?? "", { message: r, ...i } = oe(n, t);
|
|
1218
|
+
S.error(r, i);
|
|
1164
1219
|
}
|
|
1165
1220
|
}, pt = (e) => {
|
|
1166
|
-
X(e),
|
|
1221
|
+
X(e), R(!0);
|
|
1167
1222
|
}, mt = (e) => {
|
|
1168
1223
|
X(e), V(!0);
|
|
1169
1224
|
}, ht = (e) => {
|
|
1170
|
-
X(e),
|
|
1225
|
+
X(e), fe(!0);
|
|
1171
1226
|
}, gt = (e) => {
|
|
1172
1227
|
X(e), je(!0);
|
|
1173
1228
|
}, _t = () => {
|
|
1174
|
-
X(null),
|
|
1229
|
+
X(null), R(!1);
|
|
1175
1230
|
}, vt = () => {
|
|
1176
1231
|
X(null), V(!1);
|
|
1177
1232
|
}, yt = () => {
|
|
1178
|
-
X(null),
|
|
1233
|
+
X(null), fe(!1);
|
|
1179
1234
|
}, bt = () => {
|
|
1180
1235
|
X(null), De(!1);
|
|
1181
1236
|
}, xt = () => {
|
|
@@ -1186,92 +1241,92 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
|
|
|
1186
1241
|
h(!1);
|
|
1187
1242
|
try {
|
|
1188
1243
|
let t = await Ke.mutateAsync({
|
|
1189
|
-
project_id:
|
|
1244
|
+
project_id: I,
|
|
1190
1245
|
imageIds: e
|
|
1191
1246
|
}), n = t.successful.length, r = t.failed.length, i = e.length;
|
|
1192
1247
|
if (r === 0) {
|
|
1193
|
-
let { message: e, ...t } =
|
|
1194
|
-
|
|
1248
|
+
let { message: e, ...t } = me(n, i);
|
|
1249
|
+
S.success(e, t);
|
|
1195
1250
|
} else if (n === 0) {
|
|
1196
|
-
let { message: e, ...t } =
|
|
1197
|
-
|
|
1251
|
+
let { message: e, ...t } = be(r, i);
|
|
1252
|
+
S.error(e, t);
|
|
1198
1253
|
} else {
|
|
1199
|
-
let { message: e, ...t } =
|
|
1200
|
-
|
|
1254
|
+
let { message: e, ...t } = U(n, r);
|
|
1255
|
+
S.warning(e, t);
|
|
1201
1256
|
}
|
|
1202
|
-
t.successful.length > 0 &&
|
|
1257
|
+
t.successful.length > 0 && ee(t.successful);
|
|
1203
1258
|
} catch (t) {
|
|
1204
1259
|
let n = t?.message ?? "";
|
|
1205
1260
|
console.log("Bulk delete error: ", n);
|
|
1206
|
-
let { message: r, ...i } =
|
|
1207
|
-
|
|
1261
|
+
let { message: r, ...i } = be(e.length, e.length);
|
|
1262
|
+
S.error(r, i);
|
|
1208
1263
|
}
|
|
1209
1264
|
}, wt = async (t) => {
|
|
1210
1265
|
y(!1);
|
|
1211
1266
|
try {
|
|
1212
1267
|
let n = await qe.mutateAsync({
|
|
1213
|
-
project_id:
|
|
1268
|
+
project_id: I,
|
|
1214
1269
|
imageIds: t
|
|
1215
1270
|
}), r = n.successful.length, i = n.failed.length, a = t.length;
|
|
1216
1271
|
if (n.successful.forEach((t) => {
|
|
1217
1272
|
let n = e.find((e) => e.id === t);
|
|
1218
|
-
n &&
|
|
1273
|
+
n && M({
|
|
1219
1274
|
...n,
|
|
1220
|
-
status:
|
|
1275
|
+
status: B.ACTIVE
|
|
1221
1276
|
});
|
|
1222
1277
|
}), i === 0) {
|
|
1223
|
-
let { message: e, ...t } =
|
|
1224
|
-
|
|
1278
|
+
let { message: e, ...t } = ye(r, a);
|
|
1279
|
+
S.success(e, t);
|
|
1225
1280
|
} else if (r === 0) {
|
|
1226
|
-
let { message: e, ...t } =
|
|
1227
|
-
|
|
1281
|
+
let { message: e, ...t } = xe(i, a);
|
|
1282
|
+
S.error(e, t);
|
|
1228
1283
|
} else {
|
|
1229
|
-
let { message: e, ...t } =
|
|
1230
|
-
|
|
1284
|
+
let { message: e, ...t } = ge(r, i);
|
|
1285
|
+
S.warning(e, t);
|
|
1231
1286
|
}
|
|
1232
1287
|
} catch (e) {
|
|
1233
1288
|
let n = e?.message ?? "";
|
|
1234
1289
|
console.log("Bulk activate error: ", n);
|
|
1235
|
-
let { message: r, ...i } =
|
|
1236
|
-
|
|
1290
|
+
let { message: r, ...i } = xe(t.length, t.length);
|
|
1291
|
+
S.error(r, i);
|
|
1237
1292
|
}
|
|
1238
1293
|
}, Tt = async (t) => {
|
|
1239
1294
|
_(!1);
|
|
1240
1295
|
try {
|
|
1241
|
-
let n = await
|
|
1242
|
-
project_id:
|
|
1296
|
+
let n = await Je.mutateAsync({
|
|
1297
|
+
project_id: I,
|
|
1243
1298
|
imageIds: t
|
|
1244
1299
|
}), r = n.successful.length, i = n.failed.length, a = t.length;
|
|
1245
1300
|
if (n.successful.forEach((t) => {
|
|
1246
1301
|
let n = e.find((e) => e.id === t);
|
|
1247
|
-
n &&
|
|
1302
|
+
n && M({
|
|
1248
1303
|
...n,
|
|
1249
|
-
status:
|
|
1304
|
+
status: B.DEACTIVATED
|
|
1250
1305
|
});
|
|
1251
1306
|
}), i === 0) {
|
|
1252
|
-
let { message: e, ...t } =
|
|
1253
|
-
|
|
1307
|
+
let { message: e, ...t } = _e(r, a);
|
|
1308
|
+
S.success(e, t);
|
|
1254
1309
|
} else if (r === 0) {
|
|
1255
|
-
let { message: e, ...t } =
|
|
1256
|
-
|
|
1310
|
+
let { message: e, ...t } = de(i, a);
|
|
1311
|
+
S.error(e, t);
|
|
1257
1312
|
} else {
|
|
1258
|
-
let { message: e, ...t } =
|
|
1259
|
-
|
|
1313
|
+
let { message: e, ...t } = se(r, i);
|
|
1314
|
+
S.warning(e, t);
|
|
1260
1315
|
}
|
|
1261
1316
|
} catch (e) {
|
|
1262
1317
|
let n = e?.message ?? "";
|
|
1263
1318
|
console.log("Bulk deactivate error: ", n);
|
|
1264
|
-
let { message: r, ...i } =
|
|
1265
|
-
|
|
1319
|
+
let { message: r, ...i } = de(t.length, t.length);
|
|
1320
|
+
S.error(r, i);
|
|
1266
1321
|
}
|
|
1267
1322
|
}, Et = (e) => {
|
|
1268
1323
|
e >= 1 && e <= o && l?.(e);
|
|
1269
1324
|
};
|
|
1270
1325
|
return it ? /*#__PURE__*/ q("div", {
|
|
1271
1326
|
"data-testid": "loading",
|
|
1272
|
-
children: /*#__PURE__*/ q(c, { children: /*#__PURE__*/ q(
|
|
1327
|
+
children: /*#__PURE__*/ q(c, { children: /*#__PURE__*/ q(D, {
|
|
1273
1328
|
colSpan: 3,
|
|
1274
|
-
children: /*#__PURE__*/ q(
|
|
1329
|
+
children: /*#__PURE__*/ q(T, {
|
|
1275
1330
|
status: "progress",
|
|
1276
1331
|
title: ze._({ id: "Z3FXyt" })
|
|
1277
1332
|
})
|
|
@@ -1281,18 +1336,18 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
|
|
|
1281
1336
|
children: [
|
|
1282
1337
|
i && /*#__PURE__*/ q("div", {
|
|
1283
1338
|
className: "bg-theme-background-lvl-0/50 absolute inset-0 z-10 flex items-center justify-center backdrop-blur-sm",
|
|
1284
|
-
children: /*#__PURE__*/ q(
|
|
1339
|
+
children: /*#__PURE__*/ q(T, {
|
|
1285
1340
|
status: "progress",
|
|
1286
1341
|
title: ze._({ id: "HBpi4q" })
|
|
1287
1342
|
})
|
|
1288
1343
|
}),
|
|
1289
|
-
/*#__PURE__*/ J(K, { children: [/*#__PURE__*/ J(
|
|
1290
|
-
columns:
|
|
1291
|
-
minContentColumns:
|
|
1344
|
+
/*#__PURE__*/ J(K, { children: [/*#__PURE__*/ J(x, {
|
|
1345
|
+
columns: F ? 9 : 8,
|
|
1346
|
+
minContentColumns: F ? [0, 8] : [7],
|
|
1292
1347
|
className: "images",
|
|
1293
1348
|
"data-testid": "images-table",
|
|
1294
1349
|
children: [/*#__PURE__*/ J(c, { children: [
|
|
1295
|
-
|
|
1350
|
+
F && /*#__PURE__*/ q(s, {}),
|
|
1296
1351
|
/*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "uAQUqI" }) }),
|
|
1297
1352
|
/*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "ExLULX" }) }),
|
|
1298
1353
|
/*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "2q/Q7x" }) }),
|
|
@@ -1301,7 +1356,7 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
|
|
|
1301
1356
|
/*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "NopYGU" }) }),
|
|
1302
1357
|
/*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "d+F6q9" }) }),
|
|
1303
1358
|
/*#__PURE__*/ q(s, {})
|
|
1304
|
-
] }), e.length > 0 ? e.map((e) => /*#__PURE__*/ q(
|
|
1359
|
+
] }), e.length > 0 ? e.map((e) => /*#__PURE__*/ q(He, {
|
|
1305
1360
|
image: e,
|
|
1306
1361
|
isSelected: f.includes(e.id),
|
|
1307
1362
|
isPending: !!t.find(({ id: t }) => t === e.id),
|
|
@@ -1311,7 +1366,7 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
|
|
|
1311
1366
|
onEditMetadata: mt,
|
|
1312
1367
|
onDelete: ht,
|
|
1313
1368
|
onManageAccess: gt,
|
|
1314
|
-
showSelectColumn:
|
|
1369
|
+
showSelectColumn: F,
|
|
1315
1370
|
onSelect: (e) => {
|
|
1316
1371
|
if (f.includes(e.id)) return p(f.filter((t) => t !== e.id));
|
|
1317
1372
|
p([...f, e.id]);
|
|
@@ -1320,10 +1375,10 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
|
|
|
1320
1375
|
onUpdateVisibility: at,
|
|
1321
1376
|
uploadId: Pe,
|
|
1322
1377
|
uploadProgressPercent: rt?.percent,
|
|
1323
|
-
onMemberStatusChanged:
|
|
1324
|
-
}, e.id)) : /*#__PURE__*/ q(c, { children: /*#__PURE__*/ q(
|
|
1325
|
-
colSpan:
|
|
1326
|
-
children: /*#__PURE__*/ q(
|
|
1378
|
+
onMemberStatusChanged: P
|
|
1379
|
+
}, e.id)) : /*#__PURE__*/ q(c, { children: /*#__PURE__*/ q(D, {
|
|
1380
|
+
colSpan: F ? 9 : 8,
|
|
1381
|
+
children: /*#__PURE__*/ q(T, {
|
|
1327
1382
|
status: "empty",
|
|
1328
1383
|
title: ze._({ id: "eYlnXt" }),
|
|
1329
1384
|
body: ze._({ id: "qvF2D8" })
|
|
@@ -1353,79 +1408,79 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
|
|
|
1353
1408
|
})
|
|
1354
1409
|
})] }),
|
|
1355
1410
|
Y && /*#__PURE__*/ J(K, { children: [
|
|
1356
|
-
/*#__PURE__*/ q(
|
|
1357
|
-
isOpen:
|
|
1411
|
+
/*#__PURE__*/ q(pe, {
|
|
1412
|
+
isOpen: re,
|
|
1358
1413
|
onClose: _t,
|
|
1359
1414
|
image: Y,
|
|
1360
1415
|
onSave: st,
|
|
1361
1416
|
isLoading: Xe.isPending
|
|
1362
1417
|
}),
|
|
1363
|
-
/*#__PURE__*/ q(
|
|
1364
|
-
isOpen:
|
|
1418
|
+
/*#__PURE__*/ q(ie, {
|
|
1419
|
+
isOpen: z,
|
|
1365
1420
|
onClose: vt,
|
|
1366
1421
|
image: Y,
|
|
1367
1422
|
onSave: st,
|
|
1368
1423
|
isLoading: Xe.isPending
|
|
1369
1424
|
}),
|
|
1370
|
-
/*#__PURE__*/ q(
|
|
1425
|
+
/*#__PURE__*/ q(ne, {
|
|
1371
1426
|
image: Y,
|
|
1372
|
-
isOpen:
|
|
1427
|
+
isOpen: W,
|
|
1373
1428
|
isLoading: it,
|
|
1374
1429
|
isDisabled: Y.protected || !r.canDelete,
|
|
1375
1430
|
onClose: yt,
|
|
1376
1431
|
onDelete: lt
|
|
1377
1432
|
}),
|
|
1378
|
-
/*#__PURE__*/ q(
|
|
1433
|
+
/*#__PURE__*/ q(ae, {
|
|
1379
1434
|
image: Y,
|
|
1380
|
-
isOpen:
|
|
1435
|
+
isOpen: Se,
|
|
1381
1436
|
isLoading: We.isPending,
|
|
1382
1437
|
onClose: bt,
|
|
1383
1438
|
onDeactivate: ft
|
|
1384
1439
|
}),
|
|
1385
|
-
/*#__PURE__*/ q(
|
|
1440
|
+
/*#__PURE__*/ q(L, {
|
|
1386
1441
|
image: Y,
|
|
1387
1442
|
isOpen: Oe,
|
|
1388
1443
|
isLoading: Ge.isPending,
|
|
1389
1444
|
onClose: xt,
|
|
1390
1445
|
onActivate: dt
|
|
1391
1446
|
}),
|
|
1392
|
-
/*#__PURE__*/ q(
|
|
1447
|
+
/*#__PURE__*/ q(tt, {
|
|
1393
1448
|
image: Y,
|
|
1394
1449
|
isOpen: Ae,
|
|
1395
1450
|
onClose: St,
|
|
1396
1451
|
permissions: r
|
|
1397
1452
|
})
|
|
1398
1453
|
] }),
|
|
1399
|
-
/*#__PURE__*/ q(
|
|
1454
|
+
/*#__PURE__*/ q(Qe, {
|
|
1400
1455
|
isOpen: m,
|
|
1401
|
-
deletableImages:
|
|
1402
|
-
protectedImages:
|
|
1456
|
+
deletableImages: w,
|
|
1457
|
+
protectedImages: E,
|
|
1403
1458
|
isLoading: it,
|
|
1404
1459
|
onClose: () => h(!1),
|
|
1405
1460
|
onDelete: Ct
|
|
1406
1461
|
}),
|
|
1407
|
-
/*#__PURE__*/ q(
|
|
1462
|
+
/*#__PURE__*/ q($e, {
|
|
1408
1463
|
isOpen: g,
|
|
1409
1464
|
activeImages: O,
|
|
1410
|
-
deactivatedImages:
|
|
1465
|
+
deactivatedImages: j,
|
|
1411
1466
|
isLoading: it,
|
|
1412
1467
|
onClose: () => _(!1),
|
|
1413
1468
|
onDeactivate: Tt
|
|
1414
1469
|
}),
|
|
1415
|
-
/*#__PURE__*/ q(
|
|
1470
|
+
/*#__PURE__*/ q(et, {
|
|
1416
1471
|
isOpen: v,
|
|
1417
|
-
deactivatedImages:
|
|
1472
|
+
deactivatedImages: j,
|
|
1418
1473
|
activeImages: O,
|
|
1419
1474
|
isLoading: it,
|
|
1420
1475
|
onClose: () => y(!1),
|
|
1421
1476
|
onActivate: wt
|
|
1422
1477
|
}),
|
|
1423
|
-
/*#__PURE__*/ q(
|
|
1478
|
+
/*#__PURE__*/ q(Ye, {
|
|
1424
1479
|
isOpen: b,
|
|
1425
|
-
onClose: () =>
|
|
1480
|
+
onClose: () => C(!1),
|
|
1426
1481
|
onCreate: ct,
|
|
1427
|
-
isLoading:
|
|
1428
|
-
isUploadPending:
|
|
1482
|
+
isLoading: Ze.isPending || Ie || Me,
|
|
1483
|
+
isUploadPending: Ie && !!Pe,
|
|
1429
1484
|
uploadProgressPercent: rt?.percent
|
|
1430
1485
|
})
|
|
1431
1486
|
]
|
|
@@ -1433,7 +1488,7 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
|
|
|
1433
1488
|
}
|
|
1434
1489
|
//#endregion
|
|
1435
1490
|
//#region src/client/routes/_auth/projects/$projectId/compute/images/urlHelpers.ts
|
|
1436
|
-
var
|
|
1491
|
+
var rt = (e) => {
|
|
1437
1492
|
let t = [];
|
|
1438
1493
|
return e.status && (e.status.startsWith("in:") ? e.status.replace("in:", "").split(",") : [e.status]).forEach((e) => {
|
|
1439
1494
|
t.push({
|
|
@@ -1457,14 +1512,14 @@ var nt = (e) => {
|
|
|
1457
1512
|
name: "protected",
|
|
1458
1513
|
value: e.protected
|
|
1459
1514
|
}), t;
|
|
1460
|
-
},
|
|
1515
|
+
}, it = (e, t) => {
|
|
1461
1516
|
let n = {};
|
|
1462
1517
|
if (!e?.length) return n;
|
|
1463
1518
|
let r = e.filter((e) => !e.inactive).reduce((e, t) => (e[t.name] || (e[t.name] = []), e[t.name].push(t.value), e), {});
|
|
1464
1519
|
return Object.entries(r).forEach(([e, r]) => {
|
|
1465
1520
|
t.find((t) => t.filterName === e)?.supportsMultiValue && r.length > 1 ? n[e] = `in:${r.join(",")}` : n[e] = r[0];
|
|
1466
1521
|
}), n;
|
|
1467
|
-
},
|
|
1522
|
+
}, at = (e, t, n) => e.some((e) => e.name === t.name && e.value === t.value) ? e : n.find((e) => e.filterName === t.name)?.supportsMultiValue ? [...e, t] : [...e.filter((e) => e.name !== t.name), t], ot = (e, t, n) => {
|
|
1468
1523
|
let r = {
|
|
1469
1524
|
search: n.search,
|
|
1470
1525
|
sortBy: n.sortBy,
|
|
@@ -1476,13 +1531,13 @@ var nt = (e) => {
|
|
|
1476
1531
|
return Object.entries(i).forEach(([e, n]) => {
|
|
1477
1532
|
t.find((t) => t.filterName === e)?.supportsMultiValue && n.length > 1 ? r[e] = `in:${n.join(",")}` : r[e] = n[0];
|
|
1478
1533
|
}), r;
|
|
1479
|
-
},
|
|
1534
|
+
}, st = {
|
|
1480
1535
|
images: [],
|
|
1481
1536
|
first: void 0,
|
|
1482
1537
|
next: void 0,
|
|
1483
1538
|
schema: "/v2/schemas/images",
|
|
1484
1539
|
listError: void 0
|
|
1485
|
-
},
|
|
1540
|
+
}, ct = (e, t, n, r, i, a, o) => a.member_status && a.member_status !== "all" ? e.compute.listSharedImagesByMemberStatus.query({
|
|
1486
1541
|
project_id: t,
|
|
1487
1542
|
memberStatus: a.member_status,
|
|
1488
1543
|
name: i || void 0,
|
|
@@ -1492,11 +1547,11 @@ var nt = (e) => {
|
|
|
1492
1547
|
protected: a.protected,
|
|
1493
1548
|
sort: `${n}:${r}`
|
|
1494
1549
|
}).then((e) => ({
|
|
1495
|
-
...
|
|
1550
|
+
...st,
|
|
1496
1551
|
images: e
|
|
1497
1552
|
})).catch((e) => {
|
|
1498
|
-
if (e instanceof
|
|
1499
|
-
...
|
|
1553
|
+
if (e instanceof Le && e.data?.code === "FORBIDDEN") return {
|
|
1554
|
+
...st,
|
|
1500
1555
|
listError: e.message
|
|
1501
1556
|
};
|
|
1502
1557
|
throw e;
|
|
@@ -1511,12 +1566,12 @@ var nt = (e) => {
|
|
|
1511
1566
|
...e,
|
|
1512
1567
|
listError: void 0
|
|
1513
1568
|
})).catch((e) => {
|
|
1514
|
-
if (e instanceof
|
|
1515
|
-
...
|
|
1569
|
+
if (e instanceof Le && e.data?.code === "FORBIDDEN") return {
|
|
1570
|
+
...st,
|
|
1516
1571
|
listError: e.message
|
|
1517
1572
|
};
|
|
1518
1573
|
throw e;
|
|
1519
|
-
}),
|
|
1574
|
+
}), lt = (e, t) => e.compute.canUser.query({
|
|
1520
1575
|
project_id: t,
|
|
1521
1576
|
permission: [
|
|
1522
1577
|
"images:create",
|
|
@@ -1536,53 +1591,41 @@ var nt = (e) => {
|
|
|
1536
1591
|
}));
|
|
1537
1592
|
//#endregion
|
|
1538
1593
|
//#region src/client/routes/_auth/projects/$projectId/compute/images/-components/List.tsx
|
|
1539
|
-
function
|
|
1594
|
+
function ut(e) {
|
|
1540
1595
|
if (e) return e.includes("?") ? new URL(e, "http://dummy.com").searchParams.get("marker") || void 0 : e;
|
|
1541
1596
|
}
|
|
1542
|
-
function
|
|
1543
|
-
let { i18n:
|
|
1544
|
-
if (
|
|
1545
|
-
let
|
|
1546
|
-
|
|
1547
|
-
|
|
1597
|
+
function dt({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissionsPromise: s, searchTerm: c, setSearchTerm: l, sortSettings: u, handleSortChange: d, filterSettings: m, handleFilterChange: g, selectedImages: v, setSelectedImages: b, createModalOpen: x, setCreateModalOpen: S, deleteAllModalOpen: C, setDeleteAllModalOpen: w, deactivateAllModalOpen: T, setDeactivateAllModalOpen: D, activateAllModalOpen: k, setActivateAllModalOpen: A, memberStatusView: j, setMemberStatusView: M, isFetching: N, currentPage: P, onPageChange: F, onImageUpdated: I, onImageDeleted: te, onMemberStatusChanged: ne }) {
|
|
1598
|
+
let { i18n: L, _: re } = $(), R = je(n), z = je(s), [ie, V] = Z(c), H = Ne(void 0);
|
|
1599
|
+
if (X(() => () => clearTimeout(H.current), []), R.listError) return /*#__PURE__*/ q("p", { children: R.listError });
|
|
1600
|
+
let ae = R.images.filter((e) => !o.has(e.id)).map((e) => r.get(e.id) ?? e), oe = !!R.next, se = R.totalCount ?? (oe ? 50 * (P + 1) : ae.length), ce = Math.max(1, Math.ceil(se / 50)), U = Math.min(P, ce);
|
|
1601
|
+
X(() => {
|
|
1602
|
+
P !== U && F(U);
|
|
1548
1603
|
}, [
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1604
|
+
P,
|
|
1605
|
+
U,
|
|
1606
|
+
F
|
|
1552
1607
|
]);
|
|
1553
|
-
let
|
|
1608
|
+
let W = j === "pending" || j === "accepted" ? {
|
|
1554
1609
|
...m,
|
|
1555
1610
|
filters: m.filters.filter((e) => e.filterName !== "visibility"),
|
|
1556
1611
|
selectedFilters: (m.selectedFilters || []).filter((e) => e.name !== "visibility")
|
|
1557
|
-
} : m,
|
|
1558
|
-
let t = U.find((t) => t.id === e);
|
|
1559
|
-
return t && !t.protected;
|
|
1560
|
-
}), pe = W.filter((e) => {
|
|
1561
|
-
let t = U.find((t) => t.id === e);
|
|
1562
|
-
return t && t.protected;
|
|
1563
|
-
}), me = W.filter((e) => {
|
|
1564
|
-
let t = U.find((t) => t.id === e);
|
|
1565
|
-
return t && t.status === I.ACTIVE;
|
|
1566
|
-
}), he = W.filter((e) => {
|
|
1567
|
-
let t = U.find((t) => t.id === e);
|
|
1568
|
-
return t && t.status === I.DEACTIVATED;
|
|
1569
|
-
}), ge = !L.canDelete || W.length === 0 || U.filter((e) => W.includes(e.id)).every((e) => e.protected), _e = !L.canUpdate || W.length === 0 || U.filter((e) => W.includes(e.id)).every((e) => e.status === I.DEACTIVATED), ve = !L.canUpdate || W.length === 0 || U.filter((e) => W.includes(e.id)).every((e) => e.status === I.ACTIVE), ye = {
|
|
1612
|
+
} : m, le = R.totalCount === void 0 ? ae.slice((U - 1) * 50, U * 50) : ae, ue = new Set(le.map((e) => e.id)), G = v.filter((e) => ue.has(e)), de = le, fe = new Map(le.map((e) => [e.id, e])), pe = G.map((e) => fe.get(e)).filter(Boolean), me = pe.filter((e) => e.protected !== !0), he = pe.filter((e) => e.protected === !0), ge = pe.filter((e) => e.status === B.ACTIVE), _e = pe.filter((e) => e.status === B.DEACTIVATED), ve = !z.canDelete || G.length === 0 || le.filter((e) => G.includes(e.id)).every((e) => e.protected), ye = !z.canUpdate || G.length === 0 || le.filter((e) => G.includes(e.id)).every((e) => e.status === B.DEACTIVATED), be = !z.canUpdate || G.length === 0 || le.filter((e) => G.includes(e.id)).every((e) => e.status === B.ACTIVE), xe = {
|
|
1570
1613
|
items: [
|
|
1571
1614
|
{
|
|
1572
|
-
label:
|
|
1615
|
+
label: L._({ id: "SFo0kK" }),
|
|
1573
1616
|
value: "all"
|
|
1574
1617
|
},
|
|
1575
1618
|
{
|
|
1576
|
-
label:
|
|
1619
|
+
label: L._({ id: "thHAVL" }),
|
|
1577
1620
|
value: "accepted"
|
|
1578
1621
|
},
|
|
1579
1622
|
{
|
|
1580
|
-
label:
|
|
1623
|
+
label: L._({ id: "E4QYe7" }),
|
|
1581
1624
|
value: "pending"
|
|
1582
1625
|
}
|
|
1583
1626
|
],
|
|
1584
|
-
activeItem:
|
|
1585
|
-
onActiveItemChange: (e) =>
|
|
1627
|
+
activeItem: j,
|
|
1628
|
+
onActiveItemChange: (e) => M(e)
|
|
1586
1629
|
};
|
|
1587
1630
|
return /*#__PURE__*/ J(K, { children: [
|
|
1588
1631
|
/*#__PURE__*/ J(a, {
|
|
@@ -1591,16 +1634,16 @@ function ut({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
|
|
|
1591
1634
|
gap: "2",
|
|
1592
1635
|
className: "pb-2",
|
|
1593
1636
|
children: [/*#__PURE__*/ q(i, {
|
|
1594
|
-
activeItem:
|
|
1595
|
-
onActiveItemChange:
|
|
1596
|
-
children:
|
|
1637
|
+
activeItem: j,
|
|
1638
|
+
onActiveItemChange: xe.onActiveItemChange,
|
|
1639
|
+
children: xe.items.map((e) => /*#__PURE__*/ q(f, {
|
|
1597
1640
|
label: e.label,
|
|
1598
1641
|
value: e.value
|
|
1599
1642
|
}, e.value))
|
|
1600
1643
|
}), /*#__PURE__*/ J(a, {
|
|
1601
1644
|
gap: "2",
|
|
1602
1645
|
alignment: "center",
|
|
1603
|
-
children: [/*#__PURE__*/ q(
|
|
1646
|
+
children: [/*#__PURE__*/ q(ee, {
|
|
1604
1647
|
options: u.options,
|
|
1605
1648
|
sortBy: u.sortBy,
|
|
1606
1649
|
sortDirection: u.sortDirection ?? "desc",
|
|
@@ -1614,8 +1657,8 @@ function ut({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
|
|
|
1614
1657
|
...u,
|
|
1615
1658
|
sortDirection: e
|
|
1616
1659
|
})
|
|
1617
|
-
}),
|
|
1618
|
-
onClick: () =>
|
|
1660
|
+
}), z.canCreate && /*#__PURE__*/ q(_, {
|
|
1661
|
+
onClick: () => S(!0),
|
|
1619
1662
|
variant: "primary",
|
|
1620
1663
|
children: /*#__PURE__*/ q(Q, { id: "a/nTb8" })
|
|
1621
1664
|
})]
|
|
@@ -1627,34 +1670,34 @@ function ut({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
|
|
|
1627
1670
|
children: [/*#__PURE__*/ J(a, {
|
|
1628
1671
|
distribution: "between",
|
|
1629
1672
|
alignment: "center",
|
|
1630
|
-
children: [/*#__PURE__*/ q(
|
|
1631
|
-
filters:
|
|
1673
|
+
children: [/*#__PURE__*/ q(Oe, {
|
|
1674
|
+
filters: W.filters,
|
|
1632
1675
|
selectClassName: "sm:min-w-40",
|
|
1633
1676
|
comboboxClassName: "sm:min-w-40",
|
|
1634
1677
|
onChange: (e) => {
|
|
1635
|
-
let t =
|
|
1636
|
-
t !== (
|
|
1678
|
+
let t = at(W.selectedFilters || [], e, W.filters);
|
|
1679
|
+
t !== (W.selectedFilters || []) && g({
|
|
1637
1680
|
...m,
|
|
1638
1681
|
selectedFilters: t
|
|
1639
1682
|
});
|
|
1640
1683
|
}
|
|
1641
1684
|
}), /*#__PURE__*/ q(e, {
|
|
1642
|
-
placeholder:
|
|
1685
|
+
placeholder: L._({ id: "0cl0a5" }),
|
|
1643
1686
|
"data-testid": "searchbar",
|
|
1644
|
-
value:
|
|
1687
|
+
value: ie,
|
|
1645
1688
|
onInput: (e) => {
|
|
1646
1689
|
let t = e.currentTarget.value;
|
|
1647
|
-
|
|
1690
|
+
V(t), clearTimeout(H.current), H.current = window.setTimeout(() => l(t), 500);
|
|
1648
1691
|
},
|
|
1649
1692
|
onSearch: (e) => {
|
|
1650
|
-
clearTimeout(
|
|
1693
|
+
clearTimeout(H.current), l(typeof e == "string" ? e : "");
|
|
1651
1694
|
},
|
|
1652
1695
|
onClear: () => {
|
|
1653
|
-
clearTimeout(
|
|
1696
|
+
clearTimeout(H.current), V(""), l("");
|
|
1654
1697
|
}
|
|
1655
1698
|
})]
|
|
1656
|
-
}),
|
|
1657
|
-
selectedFilters:
|
|
1699
|
+
}), W.selectedFilters && W.selectedFilters.length > 0 && /*#__PURE__*/ q(De, {
|
|
1700
|
+
selectedFilters: W.selectedFilters,
|
|
1658
1701
|
onDelete: (e) => g({
|
|
1659
1702
|
...m,
|
|
1660
1703
|
selectedFilters: (m.selectedFilters || []).filter((t) => t.name !== e.name || t.value !== e.value)
|
|
@@ -1665,88 +1708,84 @@ function ut({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
|
|
|
1665
1708
|
})
|
|
1666
1709
|
})]
|
|
1667
1710
|
}) }),
|
|
1668
|
-
(
|
|
1711
|
+
(z.canDelete || z.canUpdate) && /*#__PURE__*/ q(y, { children: /*#__PURE__*/ q(a, {
|
|
1669
1712
|
distribution: "between",
|
|
1670
1713
|
alignment: "center",
|
|
1671
1714
|
children: /*#__PURE__*/ J(a, {
|
|
1672
1715
|
gap: "2",
|
|
1673
1716
|
alignment: "center",
|
|
1674
|
-
children: [/*#__PURE__*/ q(
|
|
1675
|
-
checked:
|
|
1676
|
-
indeterminate:
|
|
1717
|
+
children: [/*#__PURE__*/ q(E, {
|
|
1718
|
+
checked: G.length > 0 && de.every((e) => G.includes(e.id)),
|
|
1719
|
+
indeterminate: G.length > 0 && !de.every((e) => G.includes(e.id)),
|
|
1677
1720
|
onChange: () => {
|
|
1678
|
-
let e =
|
|
1679
|
-
e.every((e) =>
|
|
1721
|
+
let e = de.map((e) => e.id);
|
|
1722
|
+
e.every((e) => G.includes(e)) ? b(G.filter((t) => !e.includes(t))) : b([.../* @__PURE__ */ new Set([...G, ...e])]);
|
|
1680
1723
|
}
|
|
1681
1724
|
}), /*#__PURE__*/ J(t, { children: [/*#__PURE__*/ q(p, {
|
|
1682
1725
|
as: "div",
|
|
1683
1726
|
children: /*#__PURE__*/ q(_, {
|
|
1684
1727
|
size: "small",
|
|
1685
1728
|
icon: "moreVert",
|
|
1686
|
-
label:
|
|
1729
|
+
label: L._({ id: "7L01XJ" })
|
|
1687
1730
|
})
|
|
1688
1731
|
}), /*#__PURE__*/ J(h, { children: [
|
|
1689
|
-
|
|
1690
|
-
disabled:
|
|
1691
|
-
label:
|
|
1692
|
-
onClick: () =>
|
|
1732
|
+
z.canDelete && /*#__PURE__*/ q(O, {
|
|
1733
|
+
disabled: ve,
|
|
1734
|
+
label: L._({ id: "c6b6fz" }),
|
|
1735
|
+
onClick: () => w(!0)
|
|
1693
1736
|
}),
|
|
1694
|
-
|
|
1695
|
-
disabled:
|
|
1696
|
-
label:
|
|
1697
|
-
onClick: () =>
|
|
1737
|
+
z.canUpdate && /*#__PURE__*/ q(O, {
|
|
1738
|
+
disabled: ye,
|
|
1739
|
+
label: L._({ id: "UmQ3/m" }),
|
|
1740
|
+
onClick: () => D(!0)
|
|
1698
1741
|
}),
|
|
1699
|
-
|
|
1700
|
-
disabled:
|
|
1701
|
-
label:
|
|
1702
|
-
onClick: () =>
|
|
1742
|
+
z.canUpdate && /*#__PURE__*/ q(O, {
|
|
1743
|
+
disabled: be,
|
|
1744
|
+
label: L._({ id: "d/I0J3" }),
|
|
1745
|
+
onClick: () => A(!0)
|
|
1703
1746
|
})
|
|
1704
1747
|
] })] })]
|
|
1705
1748
|
})
|
|
1706
1749
|
}) }),
|
|
1707
|
-
/*#__PURE__*/ q(
|
|
1708
|
-
images:
|
|
1709
|
-
suggestedImages:
|
|
1710
|
-
acceptedImages:
|
|
1711
|
-
permissions:
|
|
1712
|
-
isFetching:
|
|
1713
|
-
currentPage:
|
|
1714
|
-
totalPages:
|
|
1715
|
-
onPageChange:
|
|
1750
|
+
/*#__PURE__*/ q(nt, {
|
|
1751
|
+
images: de,
|
|
1752
|
+
suggestedImages: j === "pending" ? de : [],
|
|
1753
|
+
acceptedImages: j === "accepted" ? de : [],
|
|
1754
|
+
permissions: z,
|
|
1755
|
+
isFetching: N,
|
|
1756
|
+
currentPage: U,
|
|
1757
|
+
totalPages: ce,
|
|
1758
|
+
onPageChange: F,
|
|
1716
1759
|
selectedImages: v,
|
|
1717
1760
|
setSelectedImages: b,
|
|
1718
|
-
deleteAllModalOpen:
|
|
1719
|
-
setDeleteAllModalOpen:
|
|
1720
|
-
deactivateAllModalOpen:
|
|
1721
|
-
setDeactivateAllModalOpen:
|
|
1722
|
-
activateAllModalOpen:
|
|
1723
|
-
setActivateAllModalOpen:
|
|
1724
|
-
createModalOpen:
|
|
1725
|
-
setCreateModalOpen:
|
|
1726
|
-
deletableImages:
|
|
1727
|
-
protectedImages:
|
|
1728
|
-
activeImages:
|
|
1729
|
-
deactivatedImages:
|
|
1730
|
-
onImageUpdated:
|
|
1731
|
-
onImageDeleted:
|
|
1732
|
-
onMemberStatusChanged:
|
|
1733
|
-
hasAnyBulkAction:
|
|
1761
|
+
deleteAllModalOpen: C,
|
|
1762
|
+
setDeleteAllModalOpen: w,
|
|
1763
|
+
deactivateAllModalOpen: T,
|
|
1764
|
+
setDeactivateAllModalOpen: D,
|
|
1765
|
+
activateAllModalOpen: k,
|
|
1766
|
+
setActivateAllModalOpen: A,
|
|
1767
|
+
createModalOpen: x,
|
|
1768
|
+
setCreateModalOpen: S,
|
|
1769
|
+
deletableImages: me,
|
|
1770
|
+
protectedImages: he,
|
|
1771
|
+
activeImages: ge,
|
|
1772
|
+
deactivatedImages: _e,
|
|
1773
|
+
onImageUpdated: I,
|
|
1774
|
+
onImageDeleted: te,
|
|
1775
|
+
onMemberStatusChanged: ne,
|
|
1776
|
+
hasAnyBulkAction: z.canDelete || z.canUpdate
|
|
1734
1777
|
})
|
|
1735
1778
|
] });
|
|
1736
1779
|
}
|
|
1737
|
-
var
|
|
1738
|
-
let { i18n: n, _:
|
|
1780
|
+
var ft = ({ client: e, project: t }) => {
|
|
1781
|
+
let { i18n: n, _: r } = $(), i = Pe(), a = Ie({ strict: !1 }), [o, s] = Z({
|
|
1739
1782
|
options: [
|
|
1740
1783
|
{
|
|
1741
1784
|
label: n._({ id: "88kg0+" }),
|
|
1742
1785
|
value: "created_at"
|
|
1743
1786
|
},
|
|
1744
1787
|
{
|
|
1745
|
-
label: n._({ id: "
|
|
1746
|
-
value: "updated_at"
|
|
1747
|
-
},
|
|
1748
|
-
{
|
|
1749
|
-
label: n._({ id: "6YtxFj" }),
|
|
1788
|
+
label: n._({ id: "ExLULX" }),
|
|
1750
1789
|
value: "name"
|
|
1751
1790
|
},
|
|
1752
1791
|
{
|
|
@@ -1758,32 +1797,32 @@ var dt = ({ client: e, project: t }) => {
|
|
|
1758
1797
|
value: "status"
|
|
1759
1798
|
}
|
|
1760
1799
|
],
|
|
1761
|
-
sortBy:
|
|
1762
|
-
sortDirection:
|
|
1763
|
-
}), [
|
|
1800
|
+
sortBy: a.sortBy || "created_at",
|
|
1801
|
+
sortDirection: a.sortDirection || "desc"
|
|
1802
|
+
}), [c, l] = Z({
|
|
1764
1803
|
filters: [
|
|
1765
1804
|
{
|
|
1766
1805
|
displayName: n._({ id: "uAQUqI" }),
|
|
1767
1806
|
filterName: "status",
|
|
1768
|
-
values: Object.values(
|
|
1807
|
+
values: Object.values(B),
|
|
1769
1808
|
supportsMultiValue: !0
|
|
1770
1809
|
},
|
|
1771
1810
|
{
|
|
1772
1811
|
displayName: n._({ id: "2q/Q7x" }),
|
|
1773
1812
|
filterName: "visibility",
|
|
1774
|
-
values: Object.values(
|
|
1813
|
+
values: Object.values(V),
|
|
1775
1814
|
supportsMultiValue: !1
|
|
1776
1815
|
},
|
|
1777
1816
|
{
|
|
1778
1817
|
displayName: n._({ id: "NopYGU" }),
|
|
1779
1818
|
filterName: "disk_format",
|
|
1780
|
-
values: Object.values(
|
|
1819
|
+
values: Object.values(z),
|
|
1781
1820
|
supportsMultiValue: !0
|
|
1782
1821
|
},
|
|
1783
1822
|
{
|
|
1784
1823
|
displayName: n._({ id: "6/xipy" }),
|
|
1785
1824
|
filterName: "container_format",
|
|
1786
|
-
values: Object.values(
|
|
1825
|
+
values: Object.values(fe),
|
|
1787
1826
|
supportsMultiValue: !0
|
|
1788
1827
|
},
|
|
1789
1828
|
{
|
|
@@ -1793,90 +1832,90 @@ var dt = ({ client: e, project: t }) => {
|
|
|
1793
1832
|
supportsMultiValue: !1
|
|
1794
1833
|
}
|
|
1795
1834
|
],
|
|
1796
|
-
selectedFilters:
|
|
1797
|
-
}), [
|
|
1798
|
-
|
|
1799
|
-
}, []),
|
|
1800
|
-
|
|
1835
|
+
selectedFilters: rt(a)
|
|
1836
|
+
}), [u, d] = Z(a.search || ""), f = a.page ?? 1, [p, m] = Z([]), [h, g] = Z(!1), [_, v] = Z(!1), [y, b] = Z(!1), [x, S] = Z(!1), C = a.memberStatus ?? "all", [w, E] = Z(!0), [D, O] = Z(/* @__PURE__ */ new Map()), [k, A] = Z(/* @__PURE__ */ new Set()), [j, M] = Z(/* @__PURE__ */ new Map([[1, void 0]])), [N, ee] = Z(() => new Promise(() => {})), [P] = Z(() => lt(e, t)), F = Y((e) => {
|
|
1837
|
+
O((t) => new Map(t).set(e.id, e));
|
|
1838
|
+
}, []), I = Y((e) => {
|
|
1839
|
+
A((t) => {
|
|
1801
1840
|
let n = new Set(t);
|
|
1802
1841
|
return Array.isArray(e) ? e.forEach((e) => n.add(e)) : n.add(e), n;
|
|
1803
1842
|
});
|
|
1804
|
-
}, []),
|
|
1805
|
-
|
|
1806
|
-
let n =
|
|
1807
|
-
|
|
1808
|
-
let i = n === "pending" || n === "accepted" ? (
|
|
1809
|
-
...
|
|
1843
|
+
}, []), te = Y(() => {
|
|
1844
|
+
O(/* @__PURE__ */ new Map()), E(!0);
|
|
1845
|
+
let n = a.memberStatus ?? "all", r = n === "all" ? void 0 : n;
|
|
1846
|
+
Ae(() => {
|
|
1847
|
+
let i = n === "pending" || n === "accepted" ? (c.selectedFilters || []).filter((e) => e.name !== "visibility") : c.selectedFilters || [], a = j.get(f), s = ct(e, t, o.sortBy, o.sortDirection, u, {
|
|
1848
|
+
...it(i, c.filters),
|
|
1810
1849
|
member_status: r
|
|
1811
1850
|
}, a);
|
|
1812
|
-
|
|
1813
|
-
|
|
1851
|
+
s.then((e) => {
|
|
1852
|
+
M((t) => {
|
|
1814
1853
|
if (!e.next) return t;
|
|
1815
|
-
let n =
|
|
1816
|
-
return t.has(n) ? t : new Map(t).set(n,
|
|
1854
|
+
let n = f + 1;
|
|
1855
|
+
return t.has(n) ? t : new Map(t).set(n, ut(e.next));
|
|
1817
1856
|
});
|
|
1818
|
-
}).catch(() => {}).finally(() =>
|
|
1857
|
+
}).catch(() => {}).finally(() => E(!1)), ee(s);
|
|
1819
1858
|
});
|
|
1820
1859
|
}, [
|
|
1821
1860
|
e,
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1861
|
+
o,
|
|
1862
|
+
u,
|
|
1863
|
+
c,
|
|
1864
|
+
a.memberStatus,
|
|
1865
|
+
f,
|
|
1866
|
+
j
|
|
1828
1867
|
]);
|
|
1829
|
-
|
|
1830
|
-
let n =
|
|
1831
|
-
|
|
1868
|
+
X(() => {
|
|
1869
|
+
let n = rt(a), r = a.sortBy || "created_at", o = a.sortDirection || "desc", u = a.search || "", f = a.page ?? 1;
|
|
1870
|
+
l((e) => ({
|
|
1832
1871
|
...e,
|
|
1833
1872
|
selectedFilters: n
|
|
1834
|
-
})),
|
|
1873
|
+
})), s((e) => ({
|
|
1835
1874
|
...e,
|
|
1836
1875
|
sortBy: r,
|
|
1837
|
-
sortDirection:
|
|
1838
|
-
})),
|
|
1839
|
-
let p =
|
|
1840
|
-
|
|
1841
|
-
let
|
|
1842
|
-
if (!
|
|
1843
|
-
|
|
1876
|
+
sortDirection: o
|
|
1877
|
+
})), d(u), m([]), O(/* @__PURE__ */ new Map()), E(!0);
|
|
1878
|
+
let p = a.memberStatus ?? "all", h = p === "all" ? void 0 : p;
|
|
1879
|
+
Ae(() => {
|
|
1880
|
+
let a = p === "pending" || p === "accepted" ? (n || []).filter((e) => e.name !== "visibility") : n || [], s = j.get(f);
|
|
1881
|
+
if (!s && f > 1) {
|
|
1882
|
+
i({ search: (e) => ({
|
|
1844
1883
|
...e,
|
|
1845
1884
|
page: void 0
|
|
1846
|
-
}) }),
|
|
1885
|
+
}) }), E(!1);
|
|
1847
1886
|
return;
|
|
1848
1887
|
}
|
|
1849
|
-
let
|
|
1850
|
-
...
|
|
1851
|
-
member_status:
|
|
1852
|
-
},
|
|
1853
|
-
|
|
1854
|
-
|
|
1888
|
+
let l = ct(e, t, r, o, u, {
|
|
1889
|
+
...it(a, c.filters),
|
|
1890
|
+
member_status: h
|
|
1891
|
+
}, s);
|
|
1892
|
+
l.then((e) => {
|
|
1893
|
+
M((t) => {
|
|
1855
1894
|
if (!e.next) return t;
|
|
1856
|
-
let n =
|
|
1857
|
-
return t.has(n) ? t : new Map(t).set(n,
|
|
1895
|
+
let n = f + 1;
|
|
1896
|
+
return t.has(n) ? t : new Map(t).set(n, ut(e.next));
|
|
1858
1897
|
});
|
|
1859
|
-
}).catch(() => {}).finally(() =>
|
|
1898
|
+
}).catch(() => {}).finally(() => E(!1)), ee(l);
|
|
1860
1899
|
});
|
|
1861
1900
|
}, [
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1901
|
+
a.status,
|
|
1902
|
+
a.visibility,
|
|
1903
|
+
a.disk_format,
|
|
1904
|
+
a.container_format,
|
|
1905
|
+
a.protected,
|
|
1906
|
+
a.sortBy,
|
|
1907
|
+
a.sortDirection,
|
|
1908
|
+
a.search,
|
|
1909
|
+
a.memberStatus,
|
|
1910
|
+
a.page
|
|
1872
1911
|
]);
|
|
1873
|
-
let
|
|
1912
|
+
let ne = (e) => {
|
|
1874
1913
|
let t = {
|
|
1875
1914
|
options: e.options,
|
|
1876
1915
|
sortBy: e.sortBy?.toString() || "created_at",
|
|
1877
1916
|
sortDirection: e.sortDirection || "desc"
|
|
1878
1917
|
};
|
|
1879
|
-
|
|
1918
|
+
s(t), M(/* @__PURE__ */ new Map([[1, void 0]])), i({
|
|
1880
1919
|
search: (e) => ({
|
|
1881
1920
|
...e,
|
|
1882
1921
|
sortBy: t.sortBy,
|
|
@@ -1885,9 +1924,9 @@ var dt = ({ client: e, project: t }) => {
|
|
|
1885
1924
|
}),
|
|
1886
1925
|
replace: !0
|
|
1887
1926
|
});
|
|
1888
|
-
},
|
|
1889
|
-
|
|
1890
|
-
search: (t) =>
|
|
1927
|
+
}, L = (e) => {
|
|
1928
|
+
l(e), M(/* @__PURE__ */ new Map([[1, void 0]])), i({
|
|
1929
|
+
search: (t) => ot(e.selectedFilters || [], e.filters, {
|
|
1891
1930
|
search: t.search,
|
|
1892
1931
|
sortBy: t.sortBy,
|
|
1893
1932
|
sortDirection: t.sortDirection,
|
|
@@ -1895,9 +1934,9 @@ var dt = ({ client: e, project: t }) => {
|
|
|
1895
1934
|
}),
|
|
1896
1935
|
replace: !0
|
|
1897
1936
|
});
|
|
1898
|
-
},
|
|
1937
|
+
}, re = (e) => {
|
|
1899
1938
|
let t = typeof e == "string" ? e : "";
|
|
1900
|
-
|
|
1939
|
+
d(t), M(/* @__PURE__ */ new Map([[1, void 0]])), i({
|
|
1901
1940
|
search: (e) => ({
|
|
1902
1941
|
...e,
|
|
1903
1942
|
search: t || void 0,
|
|
@@ -1905,60 +1944,61 @@ var dt = ({ client: e, project: t }) => {
|
|
|
1905
1944
|
}),
|
|
1906
1945
|
replace: !0
|
|
1907
1946
|
});
|
|
1908
|
-
},
|
|
1909
|
-
|
|
1947
|
+
}, R = (e) => {
|
|
1948
|
+
M(/* @__PURE__ */ new Map([[1, void 0]])), i({ search: (t) => ({
|
|
1910
1949
|
sortBy: t.sortBy,
|
|
1911
1950
|
sortDirection: t.sortDirection,
|
|
1912
1951
|
search: t.search,
|
|
1913
1952
|
memberStatus: e === "all" ? void 0 : e
|
|
1914
1953
|
}) });
|
|
1915
|
-
},
|
|
1916
|
-
|
|
1954
|
+
}, ie = Y((e) => {
|
|
1955
|
+
i({ search: (t) => ({
|
|
1917
1956
|
...t,
|
|
1918
1957
|
page: e === 1 ? void 0 : e
|
|
1919
1958
|
}) });
|
|
1920
|
-
}, [
|
|
1959
|
+
}, [i]);
|
|
1921
1960
|
return /*#__PURE__*/ q("div", {
|
|
1922
1961
|
className: "relative",
|
|
1923
|
-
children: /*#__PURE__*/ q(
|
|
1924
|
-
fallbackRender: ({ error: e }) => /*#__PURE__*/ q(
|
|
1925
|
-
|
|
1926
|
-
|
|
1962
|
+
children: /*#__PURE__*/ q(ze, {
|
|
1963
|
+
fallbackRender: ({ error: e }) => /*#__PURE__*/ q(T, {
|
|
1964
|
+
status: "error",
|
|
1965
|
+
title: n._({ id: "v2JOoQ" }),
|
|
1966
|
+
body: e instanceof Error ? e.message : n._({ id: "6YfMI7" })
|
|
1927
1967
|
}),
|
|
1928
|
-
children: /*#__PURE__*/ q(
|
|
1929
|
-
fallback: /*#__PURE__*/ q(
|
|
1968
|
+
children: /*#__PURE__*/ q(ke, {
|
|
1969
|
+
fallback: /*#__PURE__*/ q(T, {
|
|
1930
1970
|
status: "progress",
|
|
1931
1971
|
title: n._({ id: "HBpi4q" })
|
|
1932
1972
|
}),
|
|
1933
|
-
children: /*#__PURE__*/ q(
|
|
1934
|
-
imagesPromise:
|
|
1935
|
-
imageOverrides:
|
|
1936
|
-
deletedImageIds:
|
|
1937
|
-
permissionsPromise:
|
|
1938
|
-
searchTerm:
|
|
1939
|
-
setSearchTerm:
|
|
1940
|
-
sortSettings:
|
|
1941
|
-
handleSortChange:
|
|
1942
|
-
filterSettings:
|
|
1943
|
-
handleFilterChange:
|
|
1944
|
-
selectedImages:
|
|
1945
|
-
setSelectedImages:
|
|
1946
|
-
createModalOpen:
|
|
1947
|
-
setCreateModalOpen:
|
|
1948
|
-
deleteAllModalOpen:
|
|
1949
|
-
setDeleteAllModalOpen:
|
|
1950
|
-
deactivateAllModalOpen:
|
|
1951
|
-
setDeactivateAllModalOpen:
|
|
1973
|
+
children: /*#__PURE__*/ q(dt, {
|
|
1974
|
+
imagesPromise: N,
|
|
1975
|
+
imageOverrides: D,
|
|
1976
|
+
deletedImageIds: k,
|
|
1977
|
+
permissionsPromise: P,
|
|
1978
|
+
searchTerm: u,
|
|
1979
|
+
setSearchTerm: re,
|
|
1980
|
+
sortSettings: o,
|
|
1981
|
+
handleSortChange: ne,
|
|
1982
|
+
filterSettings: c,
|
|
1983
|
+
handleFilterChange: L,
|
|
1984
|
+
selectedImages: p,
|
|
1985
|
+
setSelectedImages: m,
|
|
1986
|
+
createModalOpen: h,
|
|
1987
|
+
setCreateModalOpen: g,
|
|
1988
|
+
deleteAllModalOpen: _,
|
|
1989
|
+
setDeleteAllModalOpen: v,
|
|
1990
|
+
deactivateAllModalOpen: y,
|
|
1991
|
+
setDeactivateAllModalOpen: b,
|
|
1952
1992
|
activateAllModalOpen: x,
|
|
1953
1993
|
setActivateAllModalOpen: S,
|
|
1954
|
-
memberStatusView:
|
|
1955
|
-
setMemberStatusView:
|
|
1994
|
+
memberStatusView: C,
|
|
1995
|
+
setMemberStatusView: R,
|
|
1956
1996
|
isFetching: w,
|
|
1957
|
-
currentPage:
|
|
1958
|
-
onPageChange:
|
|
1959
|
-
onImageUpdated:
|
|
1960
|
-
onImageDeleted:
|
|
1961
|
-
onMemberStatusChanged:
|
|
1997
|
+
currentPage: f,
|
|
1998
|
+
onPageChange: ie,
|
|
1999
|
+
onImageUpdated: F,
|
|
2000
|
+
onImageDeleted: I,
|
|
2001
|
+
onMemberStatusChanged: te
|
|
1962
2002
|
})
|
|
1963
2003
|
})
|
|
1964
2004
|
})
|
|
@@ -1966,18 +2006,18 @@ var dt = ({ client: e, project: t }) => {
|
|
|
1966
2006
|
};
|
|
1967
2007
|
//#endregion
|
|
1968
2008
|
//#region src/client/routes/_auth/projects/$projectId/compute/images/index.tsx?tsr-split=component
|
|
1969
|
-
function
|
|
1970
|
-
let { i18n: e, _: t } = $(), { projectId: n } =
|
|
2009
|
+
function pt() {
|
|
2010
|
+
let { i18n: e, _: t } = $(), { projectId: n } = M.useParams(), { trpcClient: r } = M.useRouteContext();
|
|
1971
2011
|
if (!r) throw Error("trpcClient is not available in route context");
|
|
1972
|
-
return /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q(
|
|
2012
|
+
return /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q(F, {
|
|
1973
2013
|
title: e._({ id: "an5hVd" }),
|
|
1974
2014
|
projectId: n
|
|
1975
|
-
}), /*#__PURE__*/ q(
|
|
2015
|
+
}), /*#__PURE__*/ q(ft, {
|
|
1976
2016
|
client: r,
|
|
1977
2017
|
project: n
|
|
1978
2018
|
})] });
|
|
1979
2019
|
}
|
|
1980
2020
|
//#endregion
|
|
1981
|
-
export {
|
|
2021
|
+
export { pt as component };
|
|
1982
2022
|
|
|
1983
|
-
//# sourceMappingURL=images-
|
|
2023
|
+
//# sourceMappingURL=images-CnTW3bpy.mjs.map
|