@cobaltcore-dev/aurora 0.2.0 → 0.2.2
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/{ContentHeader-H8KGY3Wd.mjs → ContentHeader-DtBiIwRY.mjs} +15 -15
- package/dist/client/{ContentHeader-H8KGY3Wd.mjs.map → ContentHeader-DtBiIwRY.mjs.map} +1 -1
- package/dist/client/{DeleteFlavorModal-B98oiHWx.mjs → DeleteFlavorModal-rmuYIafD.mjs} +142 -142
- package/dist/client/{DeleteFlavorModal-B98oiHWx.mjs.map → DeleteFlavorModal-rmuYIafD.mjs.map} +1 -1
- package/dist/client/{EditSecurityGroupModal-wQVNIVg1.mjs → EditSecurityGroupModal-B7Sz9puM.mjs} +15 -15
- package/dist/client/{EditSecurityGroupModal-wQVNIVg1.mjs.map → EditSecurityGroupModal-B7Sz9puM.mjs.map} +1 -1
- package/dist/client/{FloatingIpActionModals-qu1NMI5a.mjs → FloatingIpActionModals-CfRJiZqD.mjs} +59 -59
- package/dist/client/{FloatingIpActionModals-qu1NMI5a.mjs.map → FloatingIpActionModals-CfRJiZqD.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications-wsQDNEh7.mjs → ImageToastNotifications-Cw30RXsw.mjs} +374 -374
- package/dist/client/{ImageToastNotifications-wsQDNEh7.mjs.map → ImageToastNotifications-Cw30RXsw.mjs.map} +1 -1
- package/dist/client/{ListToolbar-CHlkZrpl.mjs → ListToolbar-DuazvsAu.mjs} +61 -61
- package/dist/client/{ListToolbar-CHlkZrpl.mjs.map → ListToolbar-DuazvsAu.mjs.map} +1 -1
- package/dist/client/{RouteError-BwgDIwJE.mjs → RouteError-Cyto623-.mjs} +2 -2
- package/dist/client/{RouteError-BwgDIwJE.mjs.map → RouteError-Cyto623-.mjs.map} +1 -1
- package/dist/client/{_auth-CsliQdkJ.mjs → _auth-CJj1Cnbm.mjs} +1 -1
- package/dist/client/{_auth-CsliQdkJ.mjs.map → _auth-CJj1Cnbm.mjs.map} +1 -1
- package/dist/client/_flavorId-B-1fYadl.mjs +188 -0
- package/dist/client/_flavorId-B-1fYadl.mjs.map +1 -0
- package/dist/client/{_flavorId-D_A53VYa.mjs → _flavorId-BYfIHIV_.mjs} +20 -10
- package/dist/client/_flavorId-BYfIHIV_.mjs.map +1 -0
- package/dist/client/_floatingIpId-FQ5P2qMV.mjs +228 -0
- package/dist/client/_floatingIpId-FQ5P2qMV.mjs.map +1 -0
- package/dist/client/{_floatingIpId-BGgftRBQ.mjs → _floatingIpId-IrnN-ozB.mjs} +13 -3
- package/dist/client/_floatingIpId-IrnN-ozB.mjs.map +1 -0
- package/dist/client/_imageId-Tx_9bqEc.mjs +527 -0
- package/dist/client/_imageId-Tx_9bqEc.mjs.map +1 -0
- package/dist/client/{_pcaId-DBgz5V_9.mjs → _pcaId-Bck7S7gJ.mjs} +16 -3
- package/dist/client/_pcaId-Bck7S7gJ.mjs.map +1 -0
- package/dist/client/_pcaId-CFuKY82d.mjs +369 -0
- package/dist/client/_pcaId-CFuKY82d.mjs.map +1 -0
- package/dist/client/{_projectId-INhedXor.mjs → _projectId-B1VjDd0Z.mjs} +3 -3
- package/dist/client/{_projectId-INhedXor.mjs.map → _projectId-B1VjDd0Z.mjs.map} +1 -1
- package/dist/client/_projectId-Bs4W9hos.mjs +283 -0
- package/dist/client/_projectId-Bs4W9hos.mjs.map +1 -0
- package/dist/client/{_projectId-C-E4NNgo.mjs → _projectId-PSpuCKO7.mjs} +9 -9
- package/dist/client/{_projectId-C-E4NNgo.mjs.map → _projectId-PSpuCKO7.mjs.map} +1 -1
- package/dist/client/{_projectId-B9fln31N.mjs → _projectId-Pxp-RXK4.mjs} +2 -2
- package/dist/client/{_projectId-B9fln31N.mjs.map → _projectId-Pxp-RXK4.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-DQoRQ-yA.mjs → _securityGroupId-Dqi6ddw4.mjs} +499 -499
- package/dist/client/_securityGroupId-Dqi6ddw4.mjs.map +1 -0
- package/dist/client/{_securityGroupId-ihjy8Lcd.mjs → _securityGroupId-VV2lUcGQ.mjs} +16 -3
- package/dist/client/_securityGroupId-VV2lUcGQ.mjs.map +1 -0
- package/dist/client/{about-oT6ccz8T.mjs → about-B2AzqxFI.mjs} +8 -8
- package/dist/client/{about-oT6ccz8T.mjs.map → about-B2AzqxFI.mjs.map} +1 -1
- package/dist/client/{aurora-D_NPTbo-.mjs → aurora-CRcxVUCo.mjs} +1 -1
- package/dist/client/{aurora-D_NPTbo-.mjs.map → aurora-CRcxVUCo.mjs.map} +1 -1
- package/dist/client/{build-eu9eg0zF.mjs → build-Cf7iWbpH.mjs} +2727 -2646
- package/dist/client/build-Cf7iWbpH.mjs.map +1 -0
- package/dist/client/{buildFilterParams-BDOIRDeD.mjs → buildFilterParams-ngVK3ybs.mjs} +1 -1
- package/dist/client/{buildFilterParams-BDOIRDeD.mjs.map → buildFilterParams-ngVK3ybs.mjs.map} +1 -1
- package/dist/client/{constants-ByHCdNsI.mjs → constants-CCgR6fKI.mjs} +15 -15
- package/dist/client/{constants-ByHCdNsI.mjs.map → constants-CCgR6fKI.mjs.map} +1 -1
- package/dist/client/{containers-rn_ntCJu.mjs → containers-BWERuY0O.mjs} +978 -976
- package/dist/client/containers-BWERuY0O.mjs.map +1 -0
- package/dist/client/{containers-Dx7TYruP.mjs → containers-Cs5vOeR2.mjs} +1 -1
- package/dist/client/{containers-Dx7TYruP.mjs.map → containers-Cs5vOeR2.mjs.map} +1 -1
- package/dist/client/{containers-B_ozmVlx.mjs → containers-DovytjVP.mjs} +6 -3
- package/dist/client/containers-DovytjVP.mjs.map +1 -0
- package/dist/client/{flavors-DRZb9LJP.mjs → flavors-BXPYAFyQ.mjs} +1 -1
- package/dist/client/flavors-BXPYAFyQ.mjs.map +1 -0
- package/dist/client/{flavors-CT4auvLO.mjs → flavors-Bovz-I2U.mjs} +137 -137
- package/dist/client/flavors-Bovz-I2U.mjs.map +1 -0
- package/dist/client/flavors-CUiALHcB.mjs +16 -0
- package/dist/client/flavors-CUiALHcB.mjs.map +1 -0
- package/dist/client/floatingips-BrjDiY2t.mjs +435 -0
- package/dist/client/floatingips-BrjDiY2t.mjs.map +1 -0
- package/dist/client/{formatBytes-GYujK0dP.mjs → formatBytes-D6oa0wU9.mjs} +1 -1
- package/dist/client/{formatBytes-GYujK0dP.mjs.map → formatBytes-D6oa0wU9.mjs.map} +1 -1
- package/dist/client/{hooks-s-I8vWww.mjs → hooks-D0krAKvo.mjs} +1 -1
- package/dist/client/images-BZP3pBqj.mjs +16 -0
- package/dist/client/images-BZP3pBqj.mjs.map +1 -0
- package/dist/client/{images-DRTfx8k2.mjs → images-DM9I8G0p.mjs} +1 -1
- package/dist/client/images-DM9I8G0p.mjs.map +1 -0
- package/dist/client/{images-BTqRflJv2.mjs → images-DaaCUXMI.mjs} +413 -410
- package/dist/client/images-DaaCUXMI.mjs.map +1 -0
- package/dist/client/index.js +494 -414
- package/dist/client/index.js.map +1 -1
- package/dist/client/{md-CI9FmfYv.mjs → md-BivyCkGC.mjs} +1 -1
- package/dist/client/{md-CI9FmfYv.mjs.map → md-BivyCkGC.mjs.map} +1 -1
- package/dist/client/{network-DFVVVNS5.mjs → network-SCVadZsv.mjs} +1 -1
- package/dist/client/{network-DFVVVNS5.mjs.map → network-SCVadZsv.mjs.map} +1 -1
- package/dist/client/{objects-DkDKVSmQ.mjs → objects-B4yrYf_a.mjs} +1 -1
- package/dist/client/objects-B4yrYf_a.mjs.map +1 -0
- package/dist/client/objects-Cw4Vu01M.mjs +4760 -0
- package/dist/client/objects-Cw4Vu01M.mjs.map +1 -0
- package/dist/client/{objects-r_Vl31oj.mjs → objects-D4zBka5e.mjs} +9 -3
- package/dist/client/objects-D4zBka5e.mjs.map +1 -0
- package/dist/client/overview-2J54-loz.mjs +15 -0
- package/dist/client/overview-2J54-loz.mjs.map +1 -0
- package/dist/client/{overview-B7pXx6bt.mjs → overview-BnmukbFh.mjs} +5 -5
- package/dist/client/overview-BnmukbFh.mjs.map +1 -0
- package/dist/client/overview-BtIXpYBo.mjs +15 -0
- package/dist/client/overview-BtIXpYBo.mjs.map +1 -0
- package/dist/client/overview-D0AAvsmL.mjs +15 -0
- package/dist/client/overview-D0AAvsmL.mjs.map +1 -0
- package/dist/client/pca-BqZycwCu.mjs +16 -0
- package/dist/client/pca-BqZycwCu.mjs.map +1 -0
- package/dist/client/pca-V2aaOxZA.mjs +167 -0
- package/dist/client/pca-V2aaOxZA.mjs.map +1 -0
- package/dist/client/{projects-_Dfn6eQT.mjs → projects-0feOw_b6.mjs} +2 -2
- package/dist/client/{projects-_Dfn6eQT.mjs.map → projects-0feOw_b6.mjs.map} +1 -1
- package/dist/client/{projects-MbS1USl2.mjs → projects-BsN4bvU2.mjs} +1 -1
- package/dist/client/{projects-MbS1USl2.mjs.map → projects-BsN4bvU2.mjs.map} +1 -1
- package/dist/client/{projects-BuN69cxO.mjs → projects-C1IYOvFQ.mjs} +29 -29
- package/dist/client/{projects-BuN69cxO.mjs.map → projects-C1IYOvFQ.mjs.map} +1 -1
- package/dist/client/{projects-D1pP0XdA.mjs → projects-jyIHL6DE.mjs} +2 -2
- package/dist/client/{projects-D1pP0XdA.mjs.map → projects-jyIHL6DE.mjs.map} +1 -1
- package/dist/client/securitygroups-B4MkSBtI.mjs +441 -0
- package/dist/client/securitygroups-B4MkSBtI.mjs.map +1 -0
- package/dist/client/trpcClient-BxguzNYF.mjs.map +1 -1
- package/dist/client/{useListWithFiltering-mMX_EfyI.mjs → useListWithFiltering-CEDh1LO-.mjs} +1 -1
- package/dist/client/{useListWithFiltering-mMX_EfyI.mjs.map → useListWithFiltering-CEDh1LO-.mjs.map} +1 -1
- package/dist/client/{useModal-Dg4CBeqL.mjs → useModal-DxxlilRm.mjs} +1 -1
- package/dist/client/{useModal-Dg4CBeqL.mjs.map → useModal-DxxlilRm.mjs.map} +1 -1
- package/dist/client/{useProjectId-BWaeJZOy.mjs → useProjectId-CgOTejka.mjs} +1 -1
- package/dist/client/{useProjectId-BWaeJZOy.mjs.map → useProjectId-CgOTejka.mjs.map} +1 -1
- package/dist/server/index.js +624 -306
- package/package.json +8 -7
- package/permission_policies/compute.yaml +975 -0
- package/permission_policies/image.yaml +71 -0
- package/dist/client/_flavorId-D_A53VYa.mjs.map +0 -1
- package/dist/client/_flavorId-DbhYLFxY.mjs +0 -190
- package/dist/client/_flavorId-DbhYLFxY.mjs.map +0 -1
- package/dist/client/_floatingIpId-BGgftRBQ.mjs.map +0 -1
- package/dist/client/_floatingIpId-D5myuLFz.mjs +0 -228
- package/dist/client/_floatingIpId-D5myuLFz.mjs.map +0 -1
- package/dist/client/_imageId-BoHX155h.mjs +0 -27
- package/dist/client/_imageId-BoHX155h.mjs.map +0 -1
- package/dist/client/_imageId-CTa0c3Av.mjs +0 -530
- package/dist/client/_imageId-CTa0c3Av.mjs.map +0 -1
- package/dist/client/_pcaId-C7Lrv1H_.mjs +0 -242
- package/dist/client/_pcaId-C7Lrv1H_.mjs.map +0 -1
- package/dist/client/_pcaId-DBgz5V_9.mjs.map +0 -1
- package/dist/client/_projectId-Be1Erj68.mjs +0 -300
- package/dist/client/_projectId-Be1Erj68.mjs.map +0 -1
- package/dist/client/_securityGroupId-DQoRQ-yA.mjs.map +0 -1
- package/dist/client/_securityGroupId-ihjy8Lcd.mjs.map +0 -1
- package/dist/client/build-eu9eg0zF.mjs.map +0 -1
- package/dist/client/containers-B_ozmVlx.mjs.map +0 -1
- package/dist/client/containers-rn_ntCJu.mjs.map +0 -1
- package/dist/client/flavors-CT4auvLO.mjs.map +0 -1
- package/dist/client/flavors-DRZb9LJP.mjs.map +0 -1
- package/dist/client/flavors-DtgMd0Ii.mjs +0 -12
- package/dist/client/flavors-DtgMd0Ii.mjs.map +0 -1
- package/dist/client/floatingips-DG5cFJSZ.mjs +0 -12
- package/dist/client/floatingips-DG5cFJSZ.mjs.map +0 -1
- package/dist/client/floatingips-iCMR0ZiL.mjs +0 -436
- package/dist/client/floatingips-iCMR0ZiL.mjs.map +0 -1
- package/dist/client/images-BTqRflJv2.mjs.map +0 -1
- package/dist/client/images-DRTfx8k2.mjs.map +0 -1
- package/dist/client/images-xBfsjxkX.mjs +0 -12
- package/dist/client/images-xBfsjxkX.mjs.map +0 -1
- package/dist/client/objects-CKk6cST_.mjs +0 -4762
- package/dist/client/objects-CKk6cST_.mjs.map +0 -1
- package/dist/client/objects-DkDKVSmQ.mjs.map +0 -1
- package/dist/client/objects-r_Vl31oj.mjs.map +0 -1
- package/dist/client/overview-B7pXx6bt.mjs.map +0 -1
- package/dist/client/overview-CKGLIu6W.mjs +0 -12
- package/dist/client/overview-CKGLIu6W.mjs.map +0 -1
- package/dist/client/overview-Ca8r3SAz.mjs +0 -16
- package/dist/client/overview-Ca8r3SAz.mjs.map +0 -1
- package/dist/client/overview-DkPM0Od5.mjs +0 -12
- package/dist/client/overview-DkPM0Od5.mjs.map +0 -1
- package/dist/client/overview-Dxm7Ef3X.mjs +0 -12
- package/dist/client/overview-Dxm7Ef3X.mjs.map +0 -1
- package/dist/client/overview-ag4Envez.mjs +0 -16
- package/dist/client/overview-ag4Envez.mjs.map +0 -1
- package/dist/client/pca-BGv7Mprl.mjs +0 -12
- package/dist/client/pca-BGv7Mprl.mjs.map +0 -1
- package/dist/client/pca-DpULpMu5.mjs +0 -167
- package/dist/client/pca-DpULpMu5.mjs.map +0 -1
- package/dist/client/securitygroups-DURjFfYK.mjs +0 -12
- package/dist/client/securitygroups-DURjFfYK.mjs.map +0 -1
- package/dist/client/securitygroups-KC2qvmH8.mjs +0 -442
- package/dist/client/securitygroups-KC2qvmH8.mjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $ as e,
|
|
1
|
+
import { $ as e, A as t, C as n, F as r, K as i, L as a, N as o, O as s, T as c, U as l, V as u, W as d, X as f, Y as p, _ as m, f as h, h as g, i as _, it as v, l as y, nt as b, r as x, rt as ee, u as S, w as C, z as w } from "./build-Cf7iWbpH.mjs";
|
|
2
2
|
import { n as T, r as E } from "./trpcClient-BxguzNYF.mjs";
|
|
3
3
|
import { t as D } from "./cn-C3laVXMm.mjs";
|
|
4
|
-
import { t as O } from "./images-
|
|
5
|
-
import { t as k } from "./useModal-
|
|
6
|
-
import { t as A } from "./ContentHeader-
|
|
7
|
-
import { t as te } from "./ListToolbar-
|
|
8
|
-
import { A as j, C as ne, D as M, E as N, F as P, I as F, M as I, N as L, O as R, P as z, S as B, T as re, _ as ie, a as V, b as ae, c as oe, d as H, f as se, g as ce, h as le, i as ue, j as de, k as fe, l as pe, m as me, n as he, o as ge, p as _e, r as ve, s as ye, t as be, u as U, v as xe, w as Se, x as Ce, y as we } from "./ImageToastNotifications-
|
|
9
|
-
import { t as Te } from "./useProjectId-
|
|
10
|
-
import "./hooks-
|
|
4
|
+
import { t as O } from "./images-BZP3pBqj.mjs";
|
|
5
|
+
import { t as k } from "./useModal-DxxlilRm.mjs";
|
|
6
|
+
import { t as A } from "./ContentHeader-DtBiIwRY.mjs";
|
|
7
|
+
import { t as te } from "./ListToolbar-DuazvsAu.mjs";
|
|
8
|
+
import { A as j, C as ne, D as M, E as N, F as P, I as F, M as I, N as L, O as R, P as z, S as B, T as re, _ as ie, a as V, b as ae, c as oe, d as H, f as se, g as ce, h as le, i as ue, j as de, k as fe, l as pe, m as me, n as he, o as ge, p as _e, r as ve, s as ye, t as be, u as U, v as xe, w as Se, x as Ce, y as we } from "./ImageToastNotifications-Cw30RXsw.mjs";
|
|
9
|
+
import { t as Te } from "./useProjectId-CgOTejka.mjs";
|
|
10
|
+
import "./hooks-D0krAKvo.mjs";
|
|
11
11
|
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
12
12
|
import { Suspense as Ee, startTransition as De, use as Oe, useCallback as ke, useEffect as Ae, useMemo as je, useState as q } from "react";
|
|
13
13
|
import { useNavigate as Me, useParams as Ne, useSearch as Pe } from "@tanstack/react-router";
|
|
@@ -16,7 +16,7 @@ import { Trans as J, useLingui as Y } from "@lingui/react";
|
|
|
16
16
|
import { i18n as Ie } from "@lingui/core";
|
|
17
17
|
import "@trpc/server";
|
|
18
18
|
//#region src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/ImageTableRow.tsx
|
|
19
|
-
function Le({ image: e, isSelected:
|
|
19
|
+
function Le({ image: e, isSelected: r, isPending: a, isAccepted: s, permissions: l, onEditDetails: u, onEditMetadata: f, onDelete: m, onSelect: h, onActivationStatusChange: g, onManageAccess: _, onUpdateVisibility: y, setToastData: b, uploadId: x, uploadProgressPercent: ee, onMemberStatusChanged: S }) {
|
|
20
20
|
let { i18n: C, _: w } = Y(), { id: T, name: D, status: O, visibility: A, size: te, disk_format: j, created_at: ne, owner: M } = e, N = D || C._({ id: "MEIAzV" }), { projectId: I } = Ne({ from: "/_auth/projects/$projectId/compute/images/" }), R = Me(), B = E.useUtils(), re = E.compute.updateImageMember.useMutation({ onSuccess: () => {
|
|
21
21
|
B.compute.listImagesWithPagination.invalidate(), B.compute.listSharedImagesByMemberStatus.invalidate();
|
|
22
22
|
} }), ie = async (e) => {
|
|
@@ -26,13 +26,13 @@ function Le({ image: e, isSelected: t, isPending: n, isAccepted: s, permissions:
|
|
|
26
26
|
imageId: T,
|
|
27
27
|
memberId: I,
|
|
28
28
|
status: e
|
|
29
|
-
}),
|
|
29
|
+
}), b(H(e, { onDismiss: () => b(null) })), S?.();
|
|
30
30
|
} catch (e) {
|
|
31
31
|
let t = e?.message;
|
|
32
|
-
|
|
32
|
+
b(U(t, { onDismiss: () => b(null) }));
|
|
33
33
|
}
|
|
34
|
-
}, V = I === M, ae =
|
|
35
|
-
return /* @__PURE__ */ K(
|
|
34
|
+
}, V = I === M, ae = a || s, oe = re.isPending, [se, ce] = k(), [le, ue] = k();
|
|
35
|
+
return /* @__PURE__ */ K(o, {
|
|
36
36
|
"data-testid": `image-row-${T}`,
|
|
37
37
|
onClick: () => R({
|
|
38
38
|
to: "/projects/$projectId/compute/images/$imageId",
|
|
@@ -42,28 +42,28 @@ function Le({ image: e, isSelected: t, isPending: n, isAccepted: s, permissions:
|
|
|
42
42
|
}
|
|
43
43
|
}),
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */ G(
|
|
45
|
+
/* @__PURE__ */ G(t, {
|
|
46
46
|
onClick: (e) => e.stopPropagation(),
|
|
47
|
-
children: /* @__PURE__ */ G(
|
|
48
|
-
checked:
|
|
49
|
-
onChange: () =>
|
|
47
|
+
children: /* @__PURE__ */ G(n, {
|
|
48
|
+
checked: r,
|
|
49
|
+
onChange: () => h(e)
|
|
50
50
|
})
|
|
51
51
|
}),
|
|
52
|
-
/* @__PURE__ */ G(
|
|
53
|
-
/* @__PURE__ */ G(
|
|
54
|
-
/* @__PURE__ */ G(
|
|
55
|
-
/* @__PURE__ */ G(
|
|
56
|
-
/* @__PURE__ */ G(
|
|
57
|
-
/* @__PURE__ */ G(
|
|
58
|
-
/* @__PURE__ */ G(
|
|
59
|
-
/* @__PURE__ */ K(
|
|
52
|
+
/* @__PURE__ */ G(t, { children: O }),
|
|
53
|
+
/* @__PURE__ */ G(t, { children: N }),
|
|
54
|
+
/* @__PURE__ */ G(t, { children: A }),
|
|
55
|
+
/* @__PURE__ */ G(t, { children: e.protected ? C._({ id: "l75CjT" }) : C._({ id: "1UzENP" }) }),
|
|
56
|
+
/* @__PURE__ */ G(t, { children: x && x === T ? `${ee}%` : /* @__PURE__ */ G(F, { size: te }) }),
|
|
57
|
+
/* @__PURE__ */ G(t, { children: j || C._({ id: "fj5byd" }) }),
|
|
58
|
+
/* @__PURE__ */ G(t, { children: ne ? new Date(ne).toLocaleDateString() : C._({ id: "fj5byd" }) }),
|
|
59
|
+
/* @__PURE__ */ K(t, {
|
|
60
60
|
onClick: (e) => e.stopPropagation(),
|
|
61
61
|
children: [
|
|
62
|
-
oe ? /* @__PURE__ */ G(
|
|
62
|
+
oe ? /* @__PURE__ */ G(i, {
|
|
63
63
|
variant: "primary",
|
|
64
64
|
size: "small"
|
|
65
|
-
}) : /* @__PURE__ */ G(
|
|
66
|
-
/* @__PURE__ */ G(
|
|
65
|
+
}) : /* @__PURE__ */ G(p, { children: /* @__PURE__ */ K(c, { children: [
|
|
66
|
+
/* @__PURE__ */ G(d, {
|
|
67
67
|
label: C._({ id: "v0hPHE" }),
|
|
68
68
|
onClick: () => R({
|
|
69
69
|
to: "/projects/$projectId/compute/images/$imageId",
|
|
@@ -73,41 +73,41 @@ function Le({ image: e, isSelected: t, isPending: n, isAccepted: s, permissions:
|
|
|
73
73
|
}
|
|
74
74
|
})
|
|
75
75
|
}),
|
|
76
|
-
ae &&
|
|
76
|
+
ae && l.canUpdateMember && /* @__PURE__ */ K(W, { children: [a && /* @__PURE__ */ G(d, {
|
|
77
77
|
label: C._({ id: "g3UF2V" }),
|
|
78
78
|
onClick: ce
|
|
79
|
-
}), /* @__PURE__ */ G(
|
|
79
|
+
}), /* @__PURE__ */ G(d, {
|
|
80
80
|
label: C._({ id: "1t/NnN" }),
|
|
81
81
|
onClick: ue
|
|
82
82
|
})] }),
|
|
83
|
-
!ae &&
|
|
84
|
-
/* @__PURE__ */ G(
|
|
83
|
+
!ae && l.canUpdate && /* @__PURE__ */ K(W, { children: [
|
|
84
|
+
/* @__PURE__ */ G(d, {
|
|
85
85
|
label: C._({ id: "Y1YKad" }),
|
|
86
86
|
onClick: () => u(e)
|
|
87
87
|
}),
|
|
88
|
-
/* @__PURE__ */ G(
|
|
88
|
+
/* @__PURE__ */ G(d, {
|
|
89
89
|
label: C._({ id: "SIfYq6" }),
|
|
90
|
-
onClick: () =>
|
|
90
|
+
onClick: () => f(e)
|
|
91
91
|
}),
|
|
92
|
-
/* @__PURE__ */ G(
|
|
92
|
+
/* @__PURE__ */ G(d, {
|
|
93
93
|
label: e.status === L.DEACTIVATED ? C._({ id: "FQBaXG" }) : C._({ id: "5y3O+A" }),
|
|
94
|
-
onClick: () =>
|
|
94
|
+
onClick: () => g(e)
|
|
95
95
|
}),
|
|
96
|
-
e.visibility === z.SHARED && V && (
|
|
96
|
+
e.visibility === z.SHARED && V && (l.canCreateMember || l.canDeleteMember) && /* @__PURE__ */ G(d, {
|
|
97
97
|
label: C._({ id: "cWbW6w" }),
|
|
98
|
-
onClick: () =>
|
|
98
|
+
onClick: () => _(e)
|
|
99
99
|
}),
|
|
100
|
-
e.visibility === z.PRIVATE && /* @__PURE__ */ G(
|
|
100
|
+
e.visibility === z.PRIVATE && /* @__PURE__ */ G(d, {
|
|
101
101
|
label: C._({ id: "gMYsdZ" }),
|
|
102
|
-
onClick: () =>
|
|
102
|
+
onClick: () => y(e.id, z.SHARED, N)
|
|
103
103
|
})
|
|
104
104
|
] }),
|
|
105
|
-
!ae &&
|
|
105
|
+
!ae && l.canDelete && !e.protected && /* @__PURE__ */ G(d, {
|
|
106
106
|
label: C._({ id: "cnGeoo" }),
|
|
107
|
-
onClick: () =>
|
|
107
|
+
onClick: () => m(e)
|
|
108
108
|
})
|
|
109
109
|
] }) }),
|
|
110
|
-
se && /* @__PURE__ */ G(
|
|
110
|
+
se && /* @__PURE__ */ G(v, {
|
|
111
111
|
title: C._({ id: "psPHye" }),
|
|
112
112
|
open: se,
|
|
113
113
|
onCancel: ce,
|
|
@@ -123,7 +123,7 @@ function Le({ image: e, isSelected: t, isPending: n, isAccepted: s, permissions:
|
|
|
123
123
|
C._({ id: "D/8vkD" })
|
|
124
124
|
] })
|
|
125
125
|
}),
|
|
126
|
-
le && /* @__PURE__ */ G(
|
|
126
|
+
le && /* @__PURE__ */ G(v, {
|
|
127
127
|
title: C._({ id: "UVSFVV" }),
|
|
128
128
|
open: le,
|
|
129
129
|
onCancel: ue,
|
|
@@ -199,8 +199,8 @@ var Ve = {
|
|
|
199
199
|
protected: !1,
|
|
200
200
|
min_disk: 0,
|
|
201
201
|
min_ram: 0
|
|
202
|
-
}, He = ({ isOpen:
|
|
203
|
-
let { i18n:
|
|
202
|
+
}, He = ({ isOpen: t, onClose: r, onCreate: a, isLoading: o = !1, isUploadPending: s = !1, uploadProgressPercent: c }) => {
|
|
203
|
+
let { i18n: u, _: d } = Y(), [f, p] = q({ ...Ve }), [g, S] = q(""), [w, T] = q(null), [E, O] = q({}), [k, A] = q(!1), [te, j] = q(null), ne = f.name.trim() !== "" && w !== null && f.disk_format !== void 0 && f.disk_format.trim() !== "" && f.container_format !== void 0 && f.container_format.trim() !== "" && f.min_disk >= 0 && f.min_ram >= 0, M = je(() => f.disk_format ? X(f.disk_format) : [], [f.disk_format]), N = [
|
|
204
204
|
".qcow2",
|
|
205
205
|
".raw",
|
|
206
206
|
".vmdk",
|
|
@@ -215,7 +215,7 @@ var Ve = {
|
|
|
215
215
|
".img"
|
|
216
216
|
], P = N.join(", "), F = (e) => {
|
|
217
217
|
let { name: t, value: n, type: r, checked: i } = e.target;
|
|
218
|
-
|
|
218
|
+
p((e) => ({
|
|
219
219
|
...e,
|
|
220
220
|
[t]: r === "checkbox" ? i : n
|
|
221
221
|
})), E[t] && O((e) => {
|
|
@@ -226,17 +226,17 @@ var Ve = {
|
|
|
226
226
|
let { name: t, value: n } = e.target;
|
|
227
227
|
t === "name" && (!n || n.trim() === "") && O((e) => ({
|
|
228
228
|
...e,
|
|
229
|
-
name:
|
|
229
|
+
name: u._({ id: "wyIOMP" })
|
|
230
230
|
}));
|
|
231
231
|
}, R = (e, t) => {
|
|
232
232
|
if (e === "disk_format") {
|
|
233
233
|
let e = t, n = Z(e);
|
|
234
|
-
|
|
234
|
+
p((t) => ({
|
|
235
235
|
...t,
|
|
236
236
|
disk_format: e,
|
|
237
237
|
container_format: n
|
|
238
238
|
}));
|
|
239
|
-
} else
|
|
239
|
+
} else p((n) => ({
|
|
240
240
|
...n,
|
|
241
241
|
[e]: t
|
|
242
242
|
}));
|
|
@@ -246,7 +246,7 @@ var Ve = {
|
|
|
246
246
|
});
|
|
247
247
|
}, B = (e, t) => {
|
|
248
248
|
let n = t === "" ? 0 : parseInt(t, 10);
|
|
249
|
-
isNaN(n) || (
|
|
249
|
+
isNaN(n) || (p((t) => ({
|
|
250
250
|
...t,
|
|
251
251
|
[e]: n
|
|
252
252
|
})), E[e] && O((t) => {
|
|
@@ -256,10 +256,10 @@ var Ve = {
|
|
|
256
256
|
}, re = (e, t) => {
|
|
257
257
|
t < 0 && (e === "min_disk" ? O((e) => ({
|
|
258
258
|
...e,
|
|
259
|
-
min_disk:
|
|
259
|
+
min_disk: u._({ id: "K3bUTE" })
|
|
260
260
|
})) : e === "min_ram" && O((e) => ({
|
|
261
261
|
...e,
|
|
262
|
-
min_ram:
|
|
262
|
+
min_ram: u._({ id: "PEGvy+" })
|
|
263
263
|
})));
|
|
264
264
|
}, ie = (e) => {
|
|
265
265
|
let t = e.name.toLowerCase();
|
|
@@ -268,7 +268,7 @@ var Ve = {
|
|
|
268
268
|
return delete t.file, t;
|
|
269
269
|
})) : O((e) => ({
|
|
270
270
|
...e,
|
|
271
|
-
file:
|
|
271
|
+
file: u._({
|
|
272
272
|
id: "qzIZOL",
|
|
273
273
|
values: { supportedFileFormats: P }
|
|
274
274
|
})
|
|
@@ -285,98 +285,98 @@ var Ve = {
|
|
|
285
285
|
let t = e.dataTransfer.files;
|
|
286
286
|
t && t.length > 0 && ie(t[0]);
|
|
287
287
|
}, se = (e) => {
|
|
288
|
-
|
|
288
|
+
S(e.target.value);
|
|
289
289
|
}, ce = () => {
|
|
290
|
-
let e =
|
|
290
|
+
let e = g.trim();
|
|
291
291
|
if (e !== "") {
|
|
292
|
-
if (
|
|
293
|
-
|
|
292
|
+
if (f.tags.includes(e)) {
|
|
293
|
+
S("");
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
|
-
|
|
296
|
+
p((t) => ({
|
|
297
297
|
...t,
|
|
298
298
|
tags: [...t.tags, e]
|
|
299
|
-
})),
|
|
299
|
+
})), S("");
|
|
300
300
|
}
|
|
301
301
|
}, le = (e) => {
|
|
302
302
|
e.key === "Enter" && (e.preventDefault(), ce());
|
|
303
303
|
}, ue = (e) => {
|
|
304
|
-
|
|
304
|
+
p((t) => ({
|
|
305
305
|
...t,
|
|
306
306
|
tags: t.tags.filter((t) => t !== e)
|
|
307
307
|
}));
|
|
308
308
|
}, de = () => {
|
|
309
309
|
let e = {};
|
|
310
|
-
return (!
|
|
310
|
+
return (!f.name || f.name.trim() === "") && (e.name = u._({ id: "wyIOMP" })), w || (e.file = u._({ id: "aTqCTq" })), (!f.disk_format || f.disk_format.trim() === "") && (e.disk_format = u._({ id: "LK0pQN" })), (!f.container_format || f.container_format.trim() === "") && (e.container_format = u._({ id: "J4DKSM" })), f.disk_format && f.container_format && (Be(f.disk_format, f.container_format) || (e.container_format = u._({ id: "BgMp/T" }))), f.min_disk < 0 && (e.min_disk = u._({ id: "K3bUTE" })), f.min_ram < 0 && (e.min_ram = u._({ id: "PEGvy+" })), O(e), Object.keys(e).length === 0;
|
|
311
311
|
}, fe = async (e) => {
|
|
312
312
|
if (e.preventDefault(), j(null), !de()) {
|
|
313
|
-
j(
|
|
313
|
+
j(u._({ id: "CBFSfX" }));
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
316
|
try {
|
|
317
317
|
await a({
|
|
318
|
-
name:
|
|
319
|
-
tags:
|
|
320
|
-
visibility:
|
|
321
|
-
disk_format:
|
|
322
|
-
container_format:
|
|
323
|
-
protected:
|
|
324
|
-
min_disk:
|
|
325
|
-
min_ram:
|
|
318
|
+
name: f.name.trim(),
|
|
319
|
+
tags: f.tags,
|
|
320
|
+
visibility: f.visibility,
|
|
321
|
+
disk_format: f.disk_format,
|
|
322
|
+
container_format: f.container_format,
|
|
323
|
+
protected: f.protected,
|
|
324
|
+
min_disk: f.min_disk,
|
|
325
|
+
min_ram: f.min_ram
|
|
326
326
|
}, w), pe();
|
|
327
327
|
} catch (e) {
|
|
328
|
-
j(e instanceof Error ? e.message :
|
|
328
|
+
j(e instanceof Error ? e.message : u._({ id: "TQn3hH" }));
|
|
329
329
|
}
|
|
330
330
|
}, pe = () => {
|
|
331
|
-
|
|
331
|
+
p({ ...Ve }), S(""), T(null), O({}), j(null), r();
|
|
332
332
|
};
|
|
333
|
-
return /* @__PURE__ */ K(
|
|
334
|
-
open:
|
|
335
|
-
onCancel:
|
|
333
|
+
return /* @__PURE__ */ K(v, {
|
|
334
|
+
open: t,
|
|
335
|
+
onCancel: o ? void 0 : pe,
|
|
336
336
|
size: "large",
|
|
337
|
-
title:
|
|
337
|
+
title: u._({ id: "xw2UtT" }),
|
|
338
338
|
onConfirm: fe,
|
|
339
|
-
confirmButtonLabel:
|
|
340
|
-
cancelButtonLabel:
|
|
341
|
-
disableConfirmButton:
|
|
342
|
-
closeable: !
|
|
343
|
-
closeOnEsc: !
|
|
339
|
+
confirmButtonLabel: u._({ id: "a/nTb8" }),
|
|
340
|
+
cancelButtonLabel: u._({ id: "dEgA5A" }),
|
|
341
|
+
disableConfirmButton: o || !ne,
|
|
342
|
+
closeable: !o,
|
|
343
|
+
closeOnEsc: !o,
|
|
344
344
|
children: [
|
|
345
|
-
|
|
345
|
+
o && !c && /* @__PURE__ */ K(e, {
|
|
346
346
|
distribution: "center",
|
|
347
347
|
alignment: "center",
|
|
348
348
|
className: "mt-4",
|
|
349
349
|
children: [
|
|
350
|
-
/* @__PURE__ */ G(
|
|
351
|
-
!
|
|
352
|
-
|
|
350
|
+
/* @__PURE__ */ G(i, { variant: "primary" }),
|
|
351
|
+
!s && /* @__PURE__ */ G(J, { id: "98Fs4G" }),
|
|
352
|
+
s && /* @__PURE__ */ G(J, { id: "3q1GLx" })
|
|
353
353
|
]
|
|
354
354
|
}),
|
|
355
|
-
|
|
355
|
+
o && !!c && /* @__PURE__ */ G("div", {
|
|
356
356
|
className: "bg-neutral-quaternary mt-4 w-full rounded-full",
|
|
357
357
|
children: /* @__PURE__ */ K("div", {
|
|
358
358
|
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",
|
|
359
|
-
style: { width: `${
|
|
360
|
-
children: [
|
|
359
|
+
style: { width: `${c}%` },
|
|
360
|
+
children: [c, "%"]
|
|
361
361
|
})
|
|
362
362
|
}),
|
|
363
|
-
!
|
|
363
|
+
!o && /* @__PURE__ */ K(ee, {
|
|
364
364
|
className: "mb-6",
|
|
365
365
|
children: [
|
|
366
|
-
te && /* @__PURE__ */ G(
|
|
366
|
+
te && /* @__PURE__ */ G(l, {
|
|
367
367
|
variant: "error",
|
|
368
368
|
className: "mb-6",
|
|
369
369
|
children: te
|
|
370
370
|
}),
|
|
371
|
-
/* @__PURE__ */ G(
|
|
371
|
+
/* @__PURE__ */ G(x, {
|
|
372
372
|
className: "mb-6",
|
|
373
|
-
children: /* @__PURE__ */ G(
|
|
373
|
+
children: /* @__PURE__ */ G(b, { children: /* @__PURE__ */ K("div", {
|
|
374
374
|
className: "w-full",
|
|
375
375
|
children: [
|
|
376
376
|
/* @__PURE__ */ K("label", {
|
|
377
377
|
htmlFor: "image-file",
|
|
378
378
|
className: "mb-2 block text-sm font-medium text-gray-900",
|
|
379
|
-
children: [
|
|
379
|
+
children: [u._({ id: "UKwOYH" }), /* @__PURE__ */ G("span", {
|
|
380
380
|
className: "ml-1 text-red-500",
|
|
381
381
|
children: "*"
|
|
382
382
|
})]
|
|
@@ -408,18 +408,18 @@ var Ve = {
|
|
|
408
408
|
}),
|
|
409
409
|
/* @__PURE__ */ G("p", {
|
|
410
410
|
className: D("text-xs transition-colors", k ? "font-semibold text-blue-600" : "text-gray-500"),
|
|
411
|
-
children: k ? /* @__PURE__ */ G("span", { children:
|
|
411
|
+
children: k ? /* @__PURE__ */ G("span", { children: u._({ id: "vXmL4D" }) }) : /* @__PURE__ */ K(W, { children: [
|
|
412
412
|
/* @__PURE__ */ G("span", {
|
|
413
413
|
className: "font-semibold",
|
|
414
|
-
children:
|
|
414
|
+
children: u._({ id: "gYe+hC" })
|
|
415
415
|
}),
|
|
416
416
|
" ",
|
|
417
|
-
|
|
417
|
+
u._({ id: "Np28ib" })
|
|
418
418
|
] })
|
|
419
419
|
}),
|
|
420
420
|
/* @__PURE__ */ G("p", {
|
|
421
421
|
className: "text-xs text-gray-400",
|
|
422
|
-
children:
|
|
422
|
+
children: u._({ id: "jBIkmi" })
|
|
423
423
|
})
|
|
424
424
|
]
|
|
425
425
|
}), /* @__PURE__ */ G("input", {
|
|
@@ -428,7 +428,7 @@ var Ve = {
|
|
|
428
428
|
className: "hidden",
|
|
429
429
|
onChange: V,
|
|
430
430
|
accept: P,
|
|
431
|
-
disabled:
|
|
431
|
+
disabled: o
|
|
432
432
|
})]
|
|
433
433
|
})
|
|
434
434
|
}),
|
|
@@ -458,8 +458,8 @@ var Ve = {
|
|
|
458
458
|
});
|
|
459
459
|
},
|
|
460
460
|
className: "font-medium text-red-600 hover:text-red-800",
|
|
461
|
-
disabled:
|
|
462
|
-
children:
|
|
461
|
+
disabled: o,
|
|
462
|
+
children: u._({ id: "t/YqKh" })
|
|
463
463
|
})]
|
|
464
464
|
}),
|
|
465
465
|
E.file && /* @__PURE__ */ G("p", {
|
|
@@ -469,57 +469,57 @@ var Ve = {
|
|
|
469
469
|
]
|
|
470
470
|
}) })
|
|
471
471
|
}),
|
|
472
|
-
/* @__PURE__ */ K(
|
|
472
|
+
/* @__PURE__ */ K(x, {
|
|
473
473
|
className: "mb-6",
|
|
474
474
|
children: [
|
|
475
|
-
/* @__PURE__ */ G(
|
|
475
|
+
/* @__PURE__ */ G(b, {
|
|
476
476
|
className: "mb-6",
|
|
477
|
-
children: /* @__PURE__ */ G(
|
|
477
|
+
children: /* @__PURE__ */ G(C, {
|
|
478
478
|
id: "name",
|
|
479
479
|
name: "name",
|
|
480
|
-
label:
|
|
481
|
-
value:
|
|
480
|
+
label: u._({ id: "ExLULX" }),
|
|
481
|
+
value: f.name,
|
|
482
482
|
onChange: F,
|
|
483
483
|
onBlur: L,
|
|
484
484
|
required: !0,
|
|
485
485
|
errortext: E.name,
|
|
486
|
-
placeholder:
|
|
487
|
-
disabled:
|
|
486
|
+
placeholder: u._({ id: "PsEGri" }),
|
|
487
|
+
disabled: o
|
|
488
488
|
})
|
|
489
489
|
}),
|
|
490
|
-
/* @__PURE__ */ G(
|
|
490
|
+
/* @__PURE__ */ G(b, {
|
|
491
491
|
className: "mb-6",
|
|
492
492
|
children: /* @__PURE__ */ K("div", {
|
|
493
493
|
className: "w-full",
|
|
494
|
-
children: [/* @__PURE__ */ K(
|
|
494
|
+
children: [/* @__PURE__ */ K(e, {
|
|
495
495
|
gap: "1",
|
|
496
496
|
direction: "horizontal",
|
|
497
497
|
alignment: "start",
|
|
498
498
|
children: [/* @__PURE__ */ G("div", {
|
|
499
499
|
className: "flex-1",
|
|
500
|
-
children: /* @__PURE__ */ G(
|
|
500
|
+
children: /* @__PURE__ */ G(C, {
|
|
501
501
|
id: "tags",
|
|
502
502
|
name: "tags",
|
|
503
|
-
label:
|
|
504
|
-
value:
|
|
503
|
+
label: u._({ id: "OYHzN1" }),
|
|
504
|
+
value: g,
|
|
505
505
|
onChange: se,
|
|
506
506
|
onKeyDown: le,
|
|
507
|
-
helptext:
|
|
508
|
-
placeholder:
|
|
509
|
-
disabled:
|
|
507
|
+
helptext: u._({ id: "AN0DBJ" }),
|
|
508
|
+
placeholder: u._({ id: "tmpGvt" }),
|
|
509
|
+
disabled: o
|
|
510
510
|
})
|
|
511
|
-
}), /* @__PURE__ */ G(
|
|
511
|
+
}), /* @__PURE__ */ G(y, {
|
|
512
512
|
variant: "primary",
|
|
513
513
|
onClick: ce,
|
|
514
|
-
disabled:
|
|
514
|
+
disabled: o || g.trim() === "",
|
|
515
515
|
children: /* @__PURE__ */ G(J, { id: "m16xKo" })
|
|
516
516
|
})]
|
|
517
|
-
}),
|
|
517
|
+
}), f.tags.length > 0 && /* @__PURE__ */ G(e, {
|
|
518
518
|
gap: "1",
|
|
519
519
|
wrap: !0,
|
|
520
520
|
alignment: "center",
|
|
521
521
|
className: "mt-1",
|
|
522
|
-
children:
|
|
522
|
+
children: f.tags.map((e) => /* @__PURE__ */ G(m, {
|
|
523
523
|
closeable: !0,
|
|
524
524
|
pillKey: "",
|
|
525
525
|
pillValue: e,
|
|
@@ -528,97 +528,97 @@ var Ve = {
|
|
|
528
528
|
})]
|
|
529
529
|
})
|
|
530
530
|
}),
|
|
531
|
-
/* @__PURE__ */ G(
|
|
531
|
+
/* @__PURE__ */ G(b, {
|
|
532
532
|
className: "mb-6",
|
|
533
|
-
children: /* @__PURE__ */ K(
|
|
533
|
+
children: /* @__PURE__ */ K(_, {
|
|
534
534
|
id: "visibility",
|
|
535
535
|
name: "visibility",
|
|
536
|
-
label:
|
|
537
|
-
value:
|
|
536
|
+
label: u._({ id: "2q/Q7x" }),
|
|
537
|
+
value: f.visibility,
|
|
538
538
|
onChange: (e) => R("visibility", e),
|
|
539
|
-
disabled:
|
|
540
|
-
loading:
|
|
539
|
+
disabled: o,
|
|
540
|
+
loading: o,
|
|
541
541
|
children: [
|
|
542
|
-
/* @__PURE__ */ G(
|
|
542
|
+
/* @__PURE__ */ G(h, {
|
|
543
543
|
value: z.PUBLIC,
|
|
544
|
-
label:
|
|
544
|
+
label: u._({ id: "7d1a0d" })
|
|
545
545
|
}),
|
|
546
|
-
/* @__PURE__ */ G(
|
|
546
|
+
/* @__PURE__ */ G(h, {
|
|
547
547
|
value: z.PRIVATE,
|
|
548
|
-
label:
|
|
548
|
+
label: u._({ id: "zwBp5t" })
|
|
549
549
|
}),
|
|
550
|
-
/* @__PURE__ */ G(
|
|
550
|
+
/* @__PURE__ */ G(h, {
|
|
551
551
|
value: z.SHARED,
|
|
552
|
-
label:
|
|
552
|
+
label: u._({ id: "0Gd0NU" })
|
|
553
553
|
}),
|
|
554
|
-
/* @__PURE__ */ G(
|
|
554
|
+
/* @__PURE__ */ G(h, {
|
|
555
555
|
value: z.COMMUNITY,
|
|
556
|
-
label:
|
|
556
|
+
label: u._({ id: "chL5IG" })
|
|
557
557
|
})
|
|
558
558
|
]
|
|
559
559
|
})
|
|
560
560
|
}),
|
|
561
|
-
/* @__PURE__ */ G(
|
|
561
|
+
/* @__PURE__ */ G(b, {
|
|
562
562
|
className: "mb-6",
|
|
563
|
-
children: /* @__PURE__ */ K(
|
|
563
|
+
children: /* @__PURE__ */ K(e, {
|
|
564
564
|
direction: "horizontal",
|
|
565
565
|
gap: "3",
|
|
566
566
|
distribution: "evenly",
|
|
567
567
|
className: "w-full",
|
|
568
568
|
children: [/* @__PURE__ */ G("div", {
|
|
569
569
|
className: "flex-1",
|
|
570
|
-
children: /* @__PURE__ */ K(
|
|
570
|
+
children: /* @__PURE__ */ K(_, {
|
|
571
571
|
id: "disk_format",
|
|
572
572
|
name: "disk_format",
|
|
573
|
-
label:
|
|
574
|
-
value:
|
|
573
|
+
label: u._({ id: "NopYGU" }),
|
|
574
|
+
value: f.disk_format,
|
|
575
575
|
onChange: (e) => R("disk_format", e),
|
|
576
|
-
disabled:
|
|
577
|
-
loading:
|
|
576
|
+
disabled: o,
|
|
577
|
+
loading: o,
|
|
578
578
|
required: !0,
|
|
579
579
|
errortext: E.disk_format,
|
|
580
580
|
children: [
|
|
581
|
-
/* @__PURE__ */ G(
|
|
581
|
+
/* @__PURE__ */ G(h, {
|
|
582
582
|
value: I.QCOW2,
|
|
583
583
|
label: "QCOW2 - QEMU Emulator"
|
|
584
584
|
}),
|
|
585
|
-
/* @__PURE__ */ G(
|
|
585
|
+
/* @__PURE__ */ G(h, {
|
|
586
586
|
value: I.RAW,
|
|
587
587
|
label: "Raw"
|
|
588
588
|
}),
|
|
589
|
-
/* @__PURE__ */ G(
|
|
589
|
+
/* @__PURE__ */ G(h, {
|
|
590
590
|
value: I.VMDK,
|
|
591
591
|
label: "VMDK - Virtual Machine Disk"
|
|
592
592
|
}),
|
|
593
|
-
/* @__PURE__ */ G(
|
|
593
|
+
/* @__PURE__ */ G(h, {
|
|
594
594
|
value: I.VHD,
|
|
595
595
|
label: "VHD - Virtual Hard Disk"
|
|
596
596
|
}),
|
|
597
|
-
/* @__PURE__ */ G(
|
|
597
|
+
/* @__PURE__ */ G(h, {
|
|
598
598
|
value: I.VHDX,
|
|
599
599
|
label: "VHDX - Virtual Hard Disk Extended"
|
|
600
600
|
}),
|
|
601
|
-
/* @__PURE__ */ G(
|
|
601
|
+
/* @__PURE__ */ G(h, {
|
|
602
602
|
value: I.VDI,
|
|
603
603
|
label: "VDI - Virtual Disk Image"
|
|
604
604
|
}),
|
|
605
|
-
/* @__PURE__ */ G(
|
|
605
|
+
/* @__PURE__ */ G(h, {
|
|
606
606
|
value: I.AMI,
|
|
607
607
|
label: "AMI - Amazon Machine Image"
|
|
608
608
|
}),
|
|
609
|
-
/* @__PURE__ */ G(
|
|
609
|
+
/* @__PURE__ */ G(h, {
|
|
610
610
|
value: I.ARI,
|
|
611
611
|
label: "ARI - Amazon Ramdisk Image"
|
|
612
612
|
}),
|
|
613
|
-
/* @__PURE__ */ G(
|
|
613
|
+
/* @__PURE__ */ G(h, {
|
|
614
614
|
value: I.AKI,
|
|
615
615
|
label: "AKI - Amazon Kernel Image"
|
|
616
616
|
}),
|
|
617
|
-
/* @__PURE__ */ G(
|
|
617
|
+
/* @__PURE__ */ G(h, {
|
|
618
618
|
value: I.ISO,
|
|
619
619
|
label: "ISO - Optical Disk Image"
|
|
620
620
|
}),
|
|
621
|
-
/* @__PURE__ */ G(
|
|
621
|
+
/* @__PURE__ */ G(h, {
|
|
622
622
|
value: I.PLOOP,
|
|
623
623
|
label: "PLOOP - Virtuozzo/Parallels Loopback Disk"
|
|
624
624
|
})
|
|
@@ -626,17 +626,17 @@ var Ve = {
|
|
|
626
626
|
})
|
|
627
627
|
}), /* @__PURE__ */ G("div", {
|
|
628
628
|
className: "flex-1",
|
|
629
|
-
children: /* @__PURE__ */ G(
|
|
629
|
+
children: /* @__PURE__ */ G(_, {
|
|
630
630
|
id: "container_format",
|
|
631
631
|
name: "container_format",
|
|
632
|
-
label:
|
|
633
|
-
value:
|
|
632
|
+
label: u._({ id: "6/xipy" }),
|
|
633
|
+
value: f.container_format,
|
|
634
634
|
onChange: (e) => R("container_format", e),
|
|
635
|
-
disabled:
|
|
635
|
+
disabled: o || !f.disk_format || !M.length,
|
|
636
636
|
required: !0,
|
|
637
637
|
errortext: E.container_format,
|
|
638
|
-
helptext: !M.length &&
|
|
639
|
-
children: M.map((e) => /* @__PURE__ */ G(
|
|
638
|
+
helptext: !M.length && u._({ id: "A7CVME" }),
|
|
639
|
+
children: M.map((e) => /* @__PURE__ */ G(h, {
|
|
640
640
|
value: e,
|
|
641
641
|
label: e.toUpperCase()
|
|
642
642
|
}, e))
|
|
@@ -644,56 +644,56 @@ var Ve = {
|
|
|
644
644
|
})]
|
|
645
645
|
})
|
|
646
646
|
}),
|
|
647
|
-
/* @__PURE__ */ G(
|
|
647
|
+
/* @__PURE__ */ G(b, {
|
|
648
648
|
className: "mb-0",
|
|
649
|
-
children: /* @__PURE__ */ G(
|
|
649
|
+
children: /* @__PURE__ */ G(n, {
|
|
650
650
|
id: "protected",
|
|
651
651
|
name: "protected",
|
|
652
|
-
label:
|
|
653
|
-
checked:
|
|
652
|
+
label: u._({ id: "644xgx" }),
|
|
653
|
+
checked: f.protected,
|
|
654
654
|
onChange: F,
|
|
655
|
-
helptext:
|
|
656
|
-
disabled:
|
|
655
|
+
helptext: u._({ id: "aV6KPH" }),
|
|
656
|
+
disabled: o
|
|
657
657
|
})
|
|
658
658
|
})
|
|
659
659
|
]
|
|
660
660
|
}),
|
|
661
|
-
/* @__PURE__ */ G(
|
|
661
|
+
/* @__PURE__ */ G(x, {
|
|
662
662
|
className: "mb-6",
|
|
663
|
-
children: /* @__PURE__ */ G(
|
|
663
|
+
children: /* @__PURE__ */ G(b, {
|
|
664
664
|
className: "mb-0",
|
|
665
|
-
children: /* @__PURE__ */ K(
|
|
665
|
+
children: /* @__PURE__ */ K(e, {
|
|
666
666
|
direction: "horizontal",
|
|
667
667
|
gap: "3",
|
|
668
668
|
distribution: "evenly",
|
|
669
669
|
className: "w-full",
|
|
670
670
|
children: [/* @__PURE__ */ G("div", {
|
|
671
671
|
className: "flex-1",
|
|
672
|
-
children: /* @__PURE__ */ G(
|
|
672
|
+
children: /* @__PURE__ */ G(C, {
|
|
673
673
|
id: "min_disk",
|
|
674
674
|
name: "min_disk",
|
|
675
|
-
label:
|
|
675
|
+
label: u._({ id: "NixRmA" }),
|
|
676
676
|
type: "number",
|
|
677
|
-
value: String(
|
|
677
|
+
value: String(f.min_disk),
|
|
678
678
|
onChange: (e) => B("min_disk", e.target.value),
|
|
679
|
-
onBlur: () => re("min_disk",
|
|
680
|
-
helptext:
|
|
679
|
+
onBlur: () => re("min_disk", f.min_disk),
|
|
680
|
+
helptext: u._({ id: "4fh0Wj" }),
|
|
681
681
|
errortext: E.min_disk,
|
|
682
|
-
disabled:
|
|
682
|
+
disabled: o
|
|
683
683
|
})
|
|
684
684
|
}), /* @__PURE__ */ G("div", {
|
|
685
685
|
className: "flex-1",
|
|
686
|
-
children: /* @__PURE__ */ G(
|
|
686
|
+
children: /* @__PURE__ */ G(C, {
|
|
687
687
|
id: "min_ram",
|
|
688
688
|
name: "min_ram",
|
|
689
|
-
label:
|
|
689
|
+
label: u._({ id: "CgZxr7" }),
|
|
690
690
|
type: "number",
|
|
691
|
-
value: String(
|
|
691
|
+
value: String(f.min_ram),
|
|
692
692
|
onChange: (e) => B("min_ram", e.target.value),
|
|
693
|
-
onBlur: () => re("min_ram",
|
|
694
|
-
helptext:
|
|
693
|
+
onBlur: () => re("min_ram", f.min_ram),
|
|
694
|
+
helptext: u._({ id: "KsIM0b" }),
|
|
695
695
|
errortext: E.min_ram,
|
|
696
|
-
disabled:
|
|
696
|
+
disabled: o
|
|
697
697
|
})
|
|
698
698
|
})]
|
|
699
699
|
})
|
|
@@ -703,40 +703,40 @@ var Ve = {
|
|
|
703
703
|
})
|
|
704
704
|
]
|
|
705
705
|
});
|
|
706
|
-
}, Ue = ({ deletableImages:
|
|
707
|
-
let { i18n:
|
|
708
|
-
return /* @__PURE__ */ K(
|
|
709
|
-
onCancel:
|
|
706
|
+
}, Ue = ({ deletableImages: t, protectedImages: n, isOpen: r, isLoading: o, onClose: s, onDelete: c }) => {
|
|
707
|
+
let { i18n: u, _: d } = Y(), f = t.length, p = n.length;
|
|
708
|
+
return /* @__PURE__ */ K(v, {
|
|
709
|
+
onCancel: s,
|
|
710
710
|
size: "small",
|
|
711
|
-
title:
|
|
712
|
-
open:
|
|
713
|
-
modalFooter: /* @__PURE__ */ G(
|
|
711
|
+
title: u._({ id: "JtHgVz" }),
|
|
712
|
+
open: r,
|
|
713
|
+
modalFooter: /* @__PURE__ */ G(a, {
|
|
714
714
|
className: "flex justify-end",
|
|
715
|
-
children: /* @__PURE__ */ K(
|
|
715
|
+
children: /* @__PURE__ */ K(g, { children: [/* @__PURE__ */ G(y, {
|
|
716
716
|
variant: "default",
|
|
717
|
-
onClick:
|
|
717
|
+
onClick: s,
|
|
718
718
|
children: /* @__PURE__ */ G(J, { id: "dEgA5A" })
|
|
719
|
-
}), /* @__PURE__ */ G(
|
|
719
|
+
}), /* @__PURE__ */ G(y, {
|
|
720
720
|
variant: "primary-danger",
|
|
721
|
-
onClick: (
|
|
722
|
-
|
|
721
|
+
onClick: (e) => {
|
|
722
|
+
e.preventDefault(), c(t);
|
|
723
723
|
},
|
|
724
|
-
disabled:
|
|
724
|
+
disabled: o,
|
|
725
725
|
"data-testid": "delete-image-button",
|
|
726
726
|
children: /* @__PURE__ */ G(J, { id: "cnGeoo" })
|
|
727
727
|
})] })
|
|
728
728
|
}),
|
|
729
|
-
children: [
|
|
729
|
+
children: [o && /* @__PURE__ */ G(e, {
|
|
730
730
|
distribution: "center",
|
|
731
731
|
alignment: "center",
|
|
732
|
-
children: /* @__PURE__ */ G(
|
|
733
|
-
}), !
|
|
732
|
+
children: /* @__PURE__ */ G(i, { variant: "primary" })
|
|
733
|
+
}), !o && /* @__PURE__ */ K("div", {
|
|
734
734
|
className: "my-6",
|
|
735
735
|
children: [
|
|
736
|
-
|
|
737
|
-
text:
|
|
736
|
+
f > 0 && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(l, {
|
|
737
|
+
text: u._({
|
|
738
738
|
id: "Dh1qvV",
|
|
739
|
-
values: { deletableCount:
|
|
739
|
+
values: { deletableCount: f }
|
|
740
740
|
}),
|
|
741
741
|
variant: "danger",
|
|
742
742
|
className: "mb-6"
|
|
@@ -746,20 +746,20 @@ var Ve = {
|
|
|
746
746
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
747
747
|
children: /* @__PURE__ */ G(J, {
|
|
748
748
|
id: "rwBVXS",
|
|
749
|
-
values: { deletableCount:
|
|
749
|
+
values: { deletableCount: f }
|
|
750
750
|
})
|
|
751
751
|
}), /* @__PURE__ */ G("div", {
|
|
752
752
|
className: "jn:bg-theme-background-lvl-1 max-h-24 overflow-y-auto rounded p-4",
|
|
753
753
|
children: /* @__PURE__ */ G("ul", {
|
|
754
754
|
className: "space-y-2",
|
|
755
|
-
children:
|
|
755
|
+
children: t.map((e) => /* @__PURE__ */ G("li", {
|
|
756
756
|
className: "jn:text-theme-default font-mono",
|
|
757
757
|
children: e
|
|
758
758
|
}, e))
|
|
759
759
|
})
|
|
760
760
|
})]
|
|
761
761
|
})] }),
|
|
762
|
-
|
|
762
|
+
p > 0 && /* @__PURE__ */ K("div", {
|
|
763
763
|
className: "mb-6",
|
|
764
764
|
children: [/* @__PURE__ */ G("h3", {
|
|
765
765
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
@@ -768,7 +768,7 @@ var Ve = {
|
|
|
768
768
|
className: "jn:bg-theme-warning/10 max-h-24 overflow-y-auto rounded border border-yellow-500/20 p-4",
|
|
769
769
|
children: /* @__PURE__ */ G("ul", {
|
|
770
770
|
className: "space-y-2",
|
|
771
|
-
children:
|
|
771
|
+
children: n.map((e) => /* @__PURE__ */ G("li", {
|
|
772
772
|
className: "jn:text-theme-default font-mono",
|
|
773
773
|
children: e
|
|
774
774
|
}, e))
|
|
@@ -777,56 +777,56 @@ var Ve = {
|
|
|
777
777
|
}),
|
|
778
778
|
/* @__PURE__ */ K("div", {
|
|
779
779
|
className: "jn:bg-theme-background-lvl-2 mb-6 rounded p-4",
|
|
780
|
-
children: [
|
|
780
|
+
children: [f > 0 && /* @__PURE__ */ K("div", {
|
|
781
781
|
className: "mb-2 flex justify-between",
|
|
782
782
|
children: [/* @__PURE__ */ G("span", {
|
|
783
783
|
className: "jn:text-theme-default",
|
|
784
784
|
children: /* @__PURE__ */ G(J, { id: "MJtNLd" })
|
|
785
785
|
}), /* @__PURE__ */ G("span", {
|
|
786
786
|
className: "jn:text-theme-highest font-semibold",
|
|
787
|
-
children:
|
|
787
|
+
children: f
|
|
788
788
|
})]
|
|
789
|
-
}),
|
|
789
|
+
}), p > 0 && /* @__PURE__ */ K("div", {
|
|
790
790
|
className: "flex justify-between",
|
|
791
791
|
children: [/* @__PURE__ */ G("span", {
|
|
792
792
|
className: "jn:text-theme-default",
|
|
793
793
|
children: /* @__PURE__ */ G(J, { id: "QxBGbh" })
|
|
794
794
|
}), /* @__PURE__ */ G("span", {
|
|
795
795
|
className: "jn:text-theme-warning font-semibold",
|
|
796
|
-
children:
|
|
796
|
+
children: p
|
|
797
797
|
})]
|
|
798
798
|
})]
|
|
799
799
|
})
|
|
800
800
|
]
|
|
801
801
|
})]
|
|
802
802
|
});
|
|
803
|
-
}, We = ({ activeImages:
|
|
804
|
-
let { i18n:
|
|
805
|
-
|
|
803
|
+
}, We = ({ activeImages: t, deactivatedImages: n, isOpen: r, isLoading: a, onClose: o, onDeactivate: s }) => {
|
|
804
|
+
let { i18n: c, _: l } = Y(), u = t.length, d = n.length, f = (e) => {
|
|
805
|
+
e.preventDefault(), s(t);
|
|
806
806
|
};
|
|
807
|
-
return /* @__PURE__ */ K(
|
|
808
|
-
onCancel:
|
|
807
|
+
return /* @__PURE__ */ K(v, {
|
|
808
|
+
onCancel: o,
|
|
809
809
|
size: "small",
|
|
810
|
-
title:
|
|
811
|
-
open:
|
|
810
|
+
title: c._({ id: "+9CXS9" }),
|
|
811
|
+
open: r,
|
|
812
812
|
onConfirm: (e) => {
|
|
813
|
-
|
|
813
|
+
f(e), o();
|
|
814
814
|
},
|
|
815
|
-
confirmButtonLabel:
|
|
816
|
-
cancelButtonLabel:
|
|
817
|
-
disableConfirmButton:
|
|
818
|
-
children: [
|
|
815
|
+
confirmButtonLabel: c._({ id: "5y3O+A" }),
|
|
816
|
+
cancelButtonLabel: c._({ id: "dEgA5A" }),
|
|
817
|
+
disableConfirmButton: a,
|
|
818
|
+
children: [a && /* @__PURE__ */ G(e, {
|
|
819
819
|
distribution: "center",
|
|
820
820
|
alignment: "center",
|
|
821
|
-
children: /* @__PURE__ */ G(
|
|
822
|
-
}), !
|
|
821
|
+
children: /* @__PURE__ */ G(i, { variant: "primary" })
|
|
822
|
+
}), !a && /* @__PURE__ */ K("div", {
|
|
823
823
|
className: "my-6",
|
|
824
824
|
children: [
|
|
825
|
-
|
|
825
|
+
u > 0 && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("p", {
|
|
826
826
|
className: "mb-6",
|
|
827
827
|
children: /* @__PURE__ */ G(J, {
|
|
828
828
|
id: "zm7+/D",
|
|
829
|
-
values: { activeCount:
|
|
829
|
+
values: { activeCount: u },
|
|
830
830
|
components: { 0: /* @__PURE__ */ G("strong", {}) }
|
|
831
831
|
})
|
|
832
832
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -835,20 +835,20 @@ var Ve = {
|
|
|
835
835
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
836
836
|
children: /* @__PURE__ */ G(J, {
|
|
837
837
|
id: "ryxYVo",
|
|
838
|
-
values: { activeCount:
|
|
838
|
+
values: { activeCount: u }
|
|
839
839
|
})
|
|
840
840
|
}), /* @__PURE__ */ G("div", {
|
|
841
841
|
className: "jn:bg-theme-background-lvl-1 max-h-24 overflow-y-auto rounded p-4",
|
|
842
842
|
children: /* @__PURE__ */ G("ul", {
|
|
843
843
|
className: "space-y-2",
|
|
844
|
-
children:
|
|
844
|
+
children: t.map((e) => /* @__PURE__ */ G("li", {
|
|
845
845
|
className: "jn:text-theme-default font-mono",
|
|
846
846
|
children: e
|
|
847
847
|
}, e))
|
|
848
848
|
})
|
|
849
849
|
})]
|
|
850
850
|
})] }),
|
|
851
|
-
|
|
851
|
+
d > 0 && /* @__PURE__ */ K("div", {
|
|
852
852
|
className: "mb-6",
|
|
853
853
|
children: [/* @__PURE__ */ G("h3", {
|
|
854
854
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
@@ -857,7 +857,7 @@ var Ve = {
|
|
|
857
857
|
className: "jn:bg-theme-background-lvl-1 max-h-24 overflow-y-auto rounded p-4",
|
|
858
858
|
children: /* @__PURE__ */ G("ul", {
|
|
859
859
|
className: "space-y-2",
|
|
860
|
-
children:
|
|
860
|
+
children: n.map((e) => /* @__PURE__ */ G("li", {
|
|
861
861
|
className: "jn:text-theme-default font-mono",
|
|
862
862
|
children: e
|
|
863
863
|
}, e))
|
|
@@ -866,54 +866,54 @@ var Ve = {
|
|
|
866
866
|
}),
|
|
867
867
|
/* @__PURE__ */ K("div", {
|
|
868
868
|
className: "jn:bg-theme-background-lvl-2 mb-6 rounded p-4",
|
|
869
|
-
children: [
|
|
869
|
+
children: [u > 0 && /* @__PURE__ */ K("div", {
|
|
870
870
|
className: "mb-2 flex justify-between",
|
|
871
871
|
children: [/* @__PURE__ */ G("span", {
|
|
872
872
|
className: "jn:text-theme-default",
|
|
873
873
|
children: /* @__PURE__ */ G(J, { id: "rD9yV1" })
|
|
874
874
|
}), /* @__PURE__ */ G("span", {
|
|
875
875
|
className: "jn:text-theme-highest font-semibold",
|
|
876
|
-
children:
|
|
876
|
+
children: u
|
|
877
877
|
})]
|
|
878
|
-
}),
|
|
878
|
+
}), d > 0 && /* @__PURE__ */ K("div", {
|
|
879
879
|
className: "flex justify-between",
|
|
880
880
|
children: [/* @__PURE__ */ G("span", {
|
|
881
881
|
className: "jn:text-theme-default",
|
|
882
882
|
children: /* @__PURE__ */ G(J, { id: "NH2fsP" })
|
|
883
883
|
}), /* @__PURE__ */ G("span", {
|
|
884
884
|
className: "jn:text-theme-warning font-semibold",
|
|
885
|
-
children:
|
|
885
|
+
children: d
|
|
886
886
|
})]
|
|
887
887
|
})]
|
|
888
888
|
})
|
|
889
889
|
]
|
|
890
890
|
})]
|
|
891
891
|
});
|
|
892
|
-
}, Ge = ({ deactivatedImages:
|
|
893
|
-
let { i18n:
|
|
894
|
-
return /* @__PURE__ */ K(
|
|
895
|
-
onCancel:
|
|
892
|
+
}, Ge = ({ deactivatedImages: t, activeImages: n, isOpen: r, isLoading: a, onClose: o, onActivate: s }) => {
|
|
893
|
+
let { i18n: c, _: l } = Y(), u = t.length, d = n.length;
|
|
894
|
+
return /* @__PURE__ */ K(v, {
|
|
895
|
+
onCancel: o,
|
|
896
896
|
size: "small",
|
|
897
|
-
title:
|
|
898
|
-
open:
|
|
899
|
-
onConfirm: (
|
|
900
|
-
|
|
897
|
+
title: c._({ id: "UdcGJu" }),
|
|
898
|
+
open: r,
|
|
899
|
+
onConfirm: (e) => {
|
|
900
|
+
e.preventDefault(), s(t);
|
|
901
901
|
},
|
|
902
|
-
confirmButtonLabel:
|
|
903
|
-
cancelButtonLabel:
|
|
904
|
-
disableConfirmButton:
|
|
905
|
-
children: [
|
|
902
|
+
confirmButtonLabel: c._({ id: "FQBaXG" }),
|
|
903
|
+
cancelButtonLabel: c._({ id: "dEgA5A" }),
|
|
904
|
+
disableConfirmButton: a,
|
|
905
|
+
children: [a && /* @__PURE__ */ G(e, {
|
|
906
906
|
distribution: "center",
|
|
907
907
|
alignment: "center",
|
|
908
|
-
children: /* @__PURE__ */ G(
|
|
909
|
-
}), !
|
|
908
|
+
children: /* @__PURE__ */ G(i, { variant: "primary" })
|
|
909
|
+
}), !a && /* @__PURE__ */ K("div", {
|
|
910
910
|
className: "my-6",
|
|
911
911
|
children: [
|
|
912
|
-
|
|
912
|
+
u > 0 && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("p", {
|
|
913
913
|
className: "mb-6",
|
|
914
914
|
children: /* @__PURE__ */ G(J, {
|
|
915
915
|
id: "MgZyuJ",
|
|
916
|
-
values: { deactivatedCount:
|
|
916
|
+
values: { deactivatedCount: u },
|
|
917
917
|
components: { 0: /* @__PURE__ */ G("strong", {}) }
|
|
918
918
|
})
|
|
919
919
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -922,20 +922,20 @@ var Ve = {
|
|
|
922
922
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
923
923
|
children: /* @__PURE__ */ G(J, {
|
|
924
924
|
id: "shKIZu",
|
|
925
|
-
values: { deactivatedCount:
|
|
925
|
+
values: { deactivatedCount: u }
|
|
926
926
|
})
|
|
927
927
|
}), /* @__PURE__ */ G("div", {
|
|
928
928
|
className: "jn:bg-theme-background-lvl-1 max-h-24 overflow-y-auto rounded p-4",
|
|
929
929
|
children: /* @__PURE__ */ G("ul", {
|
|
930
930
|
className: "space-y-2",
|
|
931
|
-
children:
|
|
931
|
+
children: t.map((e) => /* @__PURE__ */ G("li", {
|
|
932
932
|
className: "jn:text-theme-default font-mono",
|
|
933
933
|
children: e
|
|
934
934
|
}, e))
|
|
935
935
|
})
|
|
936
936
|
})]
|
|
937
937
|
})] }),
|
|
938
|
-
|
|
938
|
+
d > 0 && /* @__PURE__ */ K("div", {
|
|
939
939
|
className: "mb-6",
|
|
940
940
|
children: [/* @__PURE__ */ G("h3", {
|
|
941
941
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
@@ -944,7 +944,7 @@ var Ve = {
|
|
|
944
944
|
className: "jn:bg-theme-warning/10 max-h-24 overflow-y-auto rounded border border-yellow-500/20 p-4",
|
|
945
945
|
children: /* @__PURE__ */ G("ul", {
|
|
946
946
|
className: "space-y-2",
|
|
947
|
-
children:
|
|
947
|
+
children: n.map((e) => /* @__PURE__ */ G("li", {
|
|
948
948
|
className: "jn:text-theme-default font-mono",
|
|
949
949
|
children: e
|
|
950
950
|
}, e))
|
|
@@ -953,23 +953,23 @@ var Ve = {
|
|
|
953
953
|
}),
|
|
954
954
|
/* @__PURE__ */ K("div", {
|
|
955
955
|
className: "jn:bg-theme-background-lvl-2 mb-6 rounded p-4",
|
|
956
|
-
children: [
|
|
956
|
+
children: [u > 0 && /* @__PURE__ */ K("div", {
|
|
957
957
|
className: "mb-2 flex justify-between",
|
|
958
958
|
children: [/* @__PURE__ */ G("span", {
|
|
959
959
|
className: "jn:text-theme-default",
|
|
960
960
|
children: /* @__PURE__ */ G(J, { id: "4fvDRe" })
|
|
961
961
|
}), /* @__PURE__ */ G("span", {
|
|
962
962
|
className: "jn:text-theme-highest font-semibold",
|
|
963
|
-
children:
|
|
963
|
+
children: u
|
|
964
964
|
})]
|
|
965
|
-
}),
|
|
965
|
+
}), d > 0 && /* @__PURE__ */ K("div", {
|
|
966
966
|
className: "flex justify-between",
|
|
967
967
|
children: [/* @__PURE__ */ G("span", {
|
|
968
968
|
className: "jn:text-theme-default",
|
|
969
969
|
children: /* @__PURE__ */ G(J, { id: "x5l/TK" })
|
|
970
970
|
}), /* @__PURE__ */ G("span", {
|
|
971
971
|
className: "jn:text-theme-warning font-semibold",
|
|
972
|
-
children:
|
|
972
|
+
children: d
|
|
973
973
|
})]
|
|
974
974
|
})]
|
|
975
975
|
})
|
|
@@ -977,15 +977,15 @@ var Ve = {
|
|
|
977
977
|
})]
|
|
978
978
|
});
|
|
979
979
|
}, Ke = ({ isOpen: e, onClose: t, image: n, permissions: { canCreateMember: r, canDeleteMember: i } }) => {
|
|
980
|
-
let { i18n: a, _: o } = Y(), s = Te(), [c,
|
|
980
|
+
let { i18n: a, _: o } = Y(), s = Te(), [c, u] = q(null), [d, f] = q(!1), { data: p, isLoading: m } = E.compute.listImageMembers.useQuery({
|
|
981
981
|
project_id: s,
|
|
982
982
|
imageId: n?.id || ""
|
|
983
983
|
}, { enabled: e && !!n?.id }), h = () => {
|
|
984
|
-
|
|
984
|
+
u(null), f(!1), t();
|
|
985
985
|
};
|
|
986
986
|
if (!e || !n) return null;
|
|
987
987
|
let g = n.name || n.id;
|
|
988
|
-
return /* @__PURE__ */ G(
|
|
988
|
+
return /* @__PURE__ */ G(v, {
|
|
989
989
|
onCancel: h,
|
|
990
990
|
title: a._({
|
|
991
991
|
id: "UQ7Wyv",
|
|
@@ -993,8 +993,8 @@ var Ve = {
|
|
|
993
993
|
}),
|
|
994
994
|
open: e,
|
|
995
995
|
size: "xl",
|
|
996
|
-
children: /* @__PURE__ */ K("div", { children: [c && /* @__PURE__ */ G(
|
|
997
|
-
onDismiss: () =>
|
|
996
|
+
children: /* @__PURE__ */ K("div", { children: [c && /* @__PURE__ */ G(l, {
|
|
997
|
+
onDismiss: () => u(null),
|
|
998
998
|
text: c.text,
|
|
999
999
|
variant: c.type,
|
|
1000
1000
|
className: "mb-4"
|
|
@@ -1005,15 +1005,15 @@ var Ve = {
|
|
|
1005
1005
|
isMembersLoading: m,
|
|
1006
1006
|
canAdd: r,
|
|
1007
1007
|
canRemove: i,
|
|
1008
|
-
isAddingMember:
|
|
1009
|
-
setIsAddingMember:
|
|
1010
|
-
setMessage:
|
|
1008
|
+
isAddingMember: d,
|
|
1009
|
+
setIsAddingMember: f,
|
|
1010
|
+
setMessage: u
|
|
1011
1011
|
})] })
|
|
1012
1012
|
});
|
|
1013
1013
|
};
|
|
1014
1014
|
//#endregion
|
|
1015
1015
|
//#region src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/ImageListView.tsx
|
|
1016
|
-
function qe({ images:
|
|
1016
|
+
function qe({ images: r, suggestedImages: a, acceptedImages: c, permissions: l, isFetching: d, currentPage: p = 1, totalPages: m = 1, onPageChange: h, children: g, selectedImages: _, setSelectedImages: v, deleteAllModalOpen: y, setDeleteAllModalOpen: b, deactivateAllModalOpen: x, setDeactivateAllModalOpen: ee, activateAllModalOpen: C, setActivateAllModalOpen: D, createModalOpen: O, setCreateModalOpen: k, deletableImages: A, protectedImages: te, activeImages: j, deactivatedImages: P, onImageUpdated: F, onImageDeleted: I, onMemberStatusChanged: z }) {
|
|
1017
1017
|
let H = Te(), [de, U] = q(null), [Ee, De] = q(!1), [Oe, ke] = q(!1), [Ae, je] = q(!1), [Me, Ne] = q(!1), [Pe, Y] = q(!1), [Re, ze] = q(!1), [X, Z] = q(null), [Be, Ve] = q(!1), [qe, Je] = q(null), [Ye, Xe] = q(!1), Q = E.useUtils(), Ze = E.compute.deleteImage.useMutation({ onSuccess: () => {
|
|
1018
1018
|
Q.compute.listImagesWithPagination.invalidate();
|
|
1019
1019
|
} }), Qe = E.compute.deactivateImage.useMutation({ onSuccess: () => {
|
|
@@ -1021,11 +1021,11 @@ function qe({ images: e, suggestedImages: t, acceptedImages: n, permissions: i,
|
|
|
1021
1021
|
} }), $e = E.compute.reactivateImage.useMutation({ onSuccess: () => {
|
|
1022
1022
|
Q.compute.listImagesWithPagination.invalidate(), Q.compute.getImageById.invalidate();
|
|
1023
1023
|
} }), et = E.compute.deleteImages.useMutation({ onSuccess: () => {
|
|
1024
|
-
Q.compute.listImagesWithPagination.invalidate(),
|
|
1024
|
+
Q.compute.listImagesWithPagination.invalidate(), v([]);
|
|
1025
1025
|
} }), tt = E.compute.activateImages.useMutation({ onSuccess: () => {
|
|
1026
|
-
Q.compute.listImagesWithPagination.invalidate(),
|
|
1026
|
+
Q.compute.listImagesWithPagination.invalidate(), v([]);
|
|
1027
1027
|
} }), nt = E.compute.deactivateImages.useMutation({ onSuccess: () => {
|
|
1028
|
-
Q.compute.listImagesWithPagination.invalidate(),
|
|
1028
|
+
Q.compute.listImagesWithPagination.invalidate(), v([]);
|
|
1029
1029
|
} }), rt = E.compute.updateImage.useMutation({ onSuccess: (e) => {
|
|
1030
1030
|
Q.compute.listImagesWithPagination.invalidate(), Q.compute.getImageById.setData({
|
|
1031
1031
|
project_id: H,
|
|
@@ -1152,26 +1152,26 @@ function qe({ images: e, suggestedImages: t, acceptedImages: n, permissions: i,
|
|
|
1152
1152
|
};
|
|
1153
1153
|
return st ? /* @__PURE__ */ G("div", {
|
|
1154
1154
|
"data-testid": "loading",
|
|
1155
|
-
children: /* @__PURE__ */ G(
|
|
1155
|
+
children: /* @__PURE__ */ G(o, { children: /* @__PURE__ */ G(t, {
|
|
1156
1156
|
colSpan: 3,
|
|
1157
|
-
children: /* @__PURE__ */ K(
|
|
1157
|
+
children: /* @__PURE__ */ K(e, {
|
|
1158
1158
|
distribution: "center",
|
|
1159
1159
|
alignment: "center",
|
|
1160
|
-
children: [/* @__PURE__ */ G(
|
|
1160
|
+
children: [/* @__PURE__ */ G(i, { variant: "primary" }), /* @__PURE__ */ G(J, { id: "Z3FXyt" })]
|
|
1161
1161
|
})
|
|
1162
1162
|
}) })
|
|
1163
1163
|
}) : /* @__PURE__ */ K(W, { children: [
|
|
1164
|
-
/* @__PURE__ */ G(W, { children:
|
|
1164
|
+
/* @__PURE__ */ G(W, { children: g }),
|
|
1165
1165
|
/* @__PURE__ */ K("div", {
|
|
1166
1166
|
className: "relative",
|
|
1167
1167
|
children: [
|
|
1168
|
-
|
|
1168
|
+
d && /* @__PURE__ */ G("div", {
|
|
1169
1169
|
className: "bg-theme-background-lvl-0/50 absolute inset-0 z-10 flex items-center justify-center backdrop-blur-sm",
|
|
1170
|
-
children: /* @__PURE__ */ K(
|
|
1170
|
+
children: /* @__PURE__ */ K(e, {
|
|
1171
1171
|
direction: "vertical",
|
|
1172
1172
|
alignment: "center",
|
|
1173
1173
|
gap: "2",
|
|
1174
|
-
children: [/* @__PURE__ */ G(
|
|
1174
|
+
children: [/* @__PURE__ */ G(i, {
|
|
1175
1175
|
variant: "primary",
|
|
1176
1176
|
size: "large"
|
|
1177
1177
|
}), /* @__PURE__ */ G("span", {
|
|
@@ -1180,43 +1180,43 @@ function qe({ images: e, suggestedImages: t, acceptedImages: n, permissions: i,
|
|
|
1180
1180
|
})]
|
|
1181
1181
|
})
|
|
1182
1182
|
}),
|
|
1183
|
-
|
|
1183
|
+
r.length > 0 ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K(w, {
|
|
1184
1184
|
columns: 9,
|
|
1185
1185
|
minContentColumns: [0, 8],
|
|
1186
1186
|
className: "images",
|
|
1187
1187
|
"data-testid": "images-table",
|
|
1188
|
-
children: [/* @__PURE__ */ K(
|
|
1189
|
-
/* @__PURE__ */ G(
|
|
1188
|
+
children: [/* @__PURE__ */ K(o, { children: [
|
|
1189
|
+
/* @__PURE__ */ G(u, { children: /* @__PURE__ */ G(n, {
|
|
1190
1190
|
checked: (() => {
|
|
1191
|
-
let
|
|
1192
|
-
return
|
|
1191
|
+
let e = r.map((e) => e.id);
|
|
1192
|
+
return e.length > 0 && e.every((e) => _.includes(e));
|
|
1193
1193
|
})(),
|
|
1194
1194
|
onChange: () => {
|
|
1195
|
-
let
|
|
1196
|
-
return
|
|
1195
|
+
let e = r.map((e) => e.id);
|
|
1196
|
+
return e.every((e) => _.includes(e)) ? v(_.filter((t) => !e.includes(t))) : v([...new Set([..._, ...e])]);
|
|
1197
1197
|
}
|
|
1198
1198
|
}) }),
|
|
1199
|
-
/* @__PURE__ */ G(
|
|
1200
|
-
/* @__PURE__ */ G(
|
|
1201
|
-
/* @__PURE__ */ G(
|
|
1202
|
-
/* @__PURE__ */ G(
|
|
1203
|
-
/* @__PURE__ */ G(
|
|
1204
|
-
/* @__PURE__ */ G(
|
|
1205
|
-
/* @__PURE__ */ G(
|
|
1206
|
-
/* @__PURE__ */ G(
|
|
1207
|
-
] }),
|
|
1199
|
+
/* @__PURE__ */ G(u, { children: /* @__PURE__ */ G(J, { id: "uAQUqI" }) }),
|
|
1200
|
+
/* @__PURE__ */ G(u, { children: /* @__PURE__ */ G(J, { id: "ExLULX" }) }),
|
|
1201
|
+
/* @__PURE__ */ G(u, { children: /* @__PURE__ */ G(J, { id: "2q/Q7x" }) }),
|
|
1202
|
+
/* @__PURE__ */ G(u, { children: /* @__PURE__ */ G(J, { id: "644xgx" }) }),
|
|
1203
|
+
/* @__PURE__ */ G(u, { children: /* @__PURE__ */ G(J, { id: "Cj2Gtd" }) }),
|
|
1204
|
+
/* @__PURE__ */ G(u, { children: /* @__PURE__ */ G(J, { id: "NopYGU" }) }),
|
|
1205
|
+
/* @__PURE__ */ G(u, { children: /* @__PURE__ */ G(J, { id: "d+F6q9" }) }),
|
|
1206
|
+
/* @__PURE__ */ G(u, {})
|
|
1207
|
+
] }), r.map((e) => /* @__PURE__ */ G(Le, {
|
|
1208
1208
|
image: e,
|
|
1209
|
-
isSelected:
|
|
1210
|
-
isPending: !!
|
|
1211
|
-
isAccepted: !!
|
|
1212
|
-
permissions:
|
|
1209
|
+
isSelected: _.includes(e.id),
|
|
1210
|
+
isPending: !!a.find(({ id: t }) => t === e.id),
|
|
1211
|
+
isAccepted: !!c.find(({ id: t }) => t === e.id),
|
|
1212
|
+
permissions: l,
|
|
1213
1213
|
onEditDetails: gt,
|
|
1214
1214
|
onEditMetadata: _t,
|
|
1215
1215
|
onDelete: vt,
|
|
1216
1216
|
onManageAccess: yt,
|
|
1217
1217
|
onSelect: (e) => {
|
|
1218
|
-
if (
|
|
1219
|
-
|
|
1218
|
+
if (_.includes(e.id)) return v(_.filter((t) => t !== e.id));
|
|
1219
|
+
v([..._, e.id]);
|
|
1220
1220
|
},
|
|
1221
1221
|
onActivationStatusChange: pt,
|
|
1222
1222
|
onUpdateVisibility: ct,
|
|
@@ -1225,24 +1225,24 @@ function qe({ images: e, suggestedImages: t, acceptedImages: n, permissions: i,
|
|
|
1225
1225
|
uploadProgressPercent: ot?.percent,
|
|
1226
1226
|
onMemberStatusChanged: z
|
|
1227
1227
|
}, e.id))]
|
|
1228
|
-
}),
|
|
1228
|
+
}), m > 1 && /* @__PURE__ */ G("div", {
|
|
1229
1229
|
className: "flex justify-center py-4",
|
|
1230
|
-
children: /* @__PURE__ */ G(
|
|
1230
|
+
children: /* @__PURE__ */ G(S, {
|
|
1231
1231
|
variant: "input",
|
|
1232
|
-
currentPage:
|
|
1233
|
-
pages:
|
|
1234
|
-
onPressPrevious: () =>
|
|
1235
|
-
onPressNext: () =>
|
|
1236
|
-
onSelectChange: (e) =>
|
|
1232
|
+
currentPage: p,
|
|
1233
|
+
pages: m,
|
|
1234
|
+
onPressPrevious: () => h?.(Math.max(p - 1, 1)),
|
|
1235
|
+
onPressNext: () => h?.(Math.min(p + 1, m)),
|
|
1236
|
+
onSelectChange: (e) => h?.(e)
|
|
1237
1237
|
})
|
|
1238
|
-
})] }) : /* @__PURE__ */ G(
|
|
1238
|
+
})] }) : /* @__PURE__ */ G(w, {
|
|
1239
1239
|
columns: 7,
|
|
1240
1240
|
minContentColumns: [0, 6],
|
|
1241
1241
|
className: "images",
|
|
1242
1242
|
"data-testid": "no-images",
|
|
1243
|
-
children: /* @__PURE__ */ G(
|
|
1243
|
+
children: /* @__PURE__ */ G(o, { children: /* @__PURE__ */ K(t, {
|
|
1244
1244
|
colSpan: 7,
|
|
1245
|
-
children: [/* @__PURE__ */ G(
|
|
1245
|
+
children: [/* @__PURE__ */ G(s, { children: /* @__PURE__ */ G(J, { id: "eYlnXt" }) }), /* @__PURE__ */ G("p", { children: /* @__PURE__ */ G(J, { id: "qvF2D8" }) })]
|
|
1246
1246
|
}) })
|
|
1247
1247
|
}),
|
|
1248
1248
|
X && /* @__PURE__ */ K(W, { children: [
|
|
@@ -1268,7 +1268,7 @@ function qe({ images: e, suggestedImages: t, acceptedImages: n, permissions: i,
|
|
|
1268
1268
|
image: X,
|
|
1269
1269
|
isOpen: Ae,
|
|
1270
1270
|
isLoading: st,
|
|
1271
|
-
isDisabled: X.protected || !
|
|
1271
|
+
isDisabled: X.protected || !l.canDelete,
|
|
1272
1272
|
onClose: () => {
|
|
1273
1273
|
Z(null), je(!1);
|
|
1274
1274
|
},
|
|
@@ -1298,17 +1298,17 @@ function qe({ images: e, suggestedImages: t, acceptedImages: n, permissions: i,
|
|
|
1298
1298
|
onClose: () => {
|
|
1299
1299
|
Z(null), ze(!1);
|
|
1300
1300
|
},
|
|
1301
|
-
permissions:
|
|
1301
|
+
permissions: l
|
|
1302
1302
|
})
|
|
1303
1303
|
] }),
|
|
1304
1304
|
/* @__PURE__ */ G(Ue, {
|
|
1305
|
-
isOpen:
|
|
1305
|
+
isOpen: y,
|
|
1306
1306
|
deletableImages: A,
|
|
1307
1307
|
protectedImages: te,
|
|
1308
1308
|
isLoading: st,
|
|
1309
|
-
onClose: () =>
|
|
1309
|
+
onClose: () => b(!1),
|
|
1310
1310
|
onDelete: async (e) => {
|
|
1311
|
-
|
|
1311
|
+
b(!1);
|
|
1312
1312
|
try {
|
|
1313
1313
|
let t = await et.mutateAsync({
|
|
1314
1314
|
project_id: H,
|
|
@@ -1322,13 +1322,13 @@ function qe({ images: e, suggestedImages: t, acceptedImages: n, permissions: i,
|
|
|
1322
1322
|
}
|
|
1323
1323
|
}),
|
|
1324
1324
|
/* @__PURE__ */ G(We, {
|
|
1325
|
-
isOpen:
|
|
1325
|
+
isOpen: x,
|
|
1326
1326
|
activeImages: j,
|
|
1327
1327
|
deactivatedImages: P,
|
|
1328
1328
|
isLoading: st,
|
|
1329
|
-
onClose: () =>
|
|
1329
|
+
onClose: () => ee(!1),
|
|
1330
1330
|
onDeactivate: async (e) => {
|
|
1331
|
-
|
|
1331
|
+
ee(!1);
|
|
1332
1332
|
try {
|
|
1333
1333
|
let t = await nt.mutateAsync({
|
|
1334
1334
|
project_id: H,
|
|
@@ -1373,7 +1373,7 @@ function qe({ images: e, suggestedImages: t, acceptedImages: n, permissions: i,
|
|
|
1373
1373
|
})
|
|
1374
1374
|
]
|
|
1375
1375
|
}),
|
|
1376
|
-
de && /* @__PURE__ */ G(
|
|
1376
|
+
de && /* @__PURE__ */ G(f, {
|
|
1377
1377
|
...de,
|
|
1378
1378
|
className: "border-theme-light fixed top-5 right-5 z-50 rounded-lg border shadow-lg"
|
|
1379
1379
|
})
|
|
@@ -1462,8 +1462,8 @@ var Je = (e) => {
|
|
|
1462
1462
|
canDeleteMember: i,
|
|
1463
1463
|
canUpdateMember: a ?? !1
|
|
1464
1464
|
})), Qe = 50;
|
|
1465
|
-
function $e({ imagesPromise:
|
|
1466
|
-
let { i18n: M, _: N } = Y(), P = Oe(
|
|
1465
|
+
function $e({ imagesPromise: t, imageOverrides: n, deletedImageIds: i, permissionsPromise: a, searchTerm: o, setSearchTerm: s, sortSettings: l, handleSortChange: u, filterSettings: f, handleFilterChange: m, selectedImages: h, setSelectedImages: g, createModalOpen: _, setCreateModalOpen: v, deleteAllModalOpen: b, setDeleteAllModalOpen: x, deactivateAllModalOpen: ee, setDeactivateAllModalOpen: S, activateAllModalOpen: C, setActivateAllModalOpen: w, memberStatusView: T, setMemberStatusView: E, isFetching: D, currentPage: O, onPageChange: k, onImageUpdated: A, onImageDeleted: j, onMemberStatusChanged: ne }) {
|
|
1466
|
+
let { i18n: M, _: N } = Y(), P = Oe(t), F = Oe(a), I = P.images.filter((e) => !i.has(e.id)).map((e) => n.get(e.id) ?? e), R = Math.max(1, Math.ceil(I.length / Qe)), z = Math.min(O, R), B = I.slice((z - 1) * Qe, z * Qe);
|
|
1467
1467
|
Ae(() => {
|
|
1468
1468
|
O !== 1 && O > R && k(1);
|
|
1469
1469
|
}, [
|
|
@@ -1472,10 +1472,10 @@ function $e({ imagesPromise: e, imageOverrides: t, deletedImageIds: n, permissio
|
|
|
1472
1472
|
k
|
|
1473
1473
|
]);
|
|
1474
1474
|
let re = T === "pending" || T === "accepted" ? {
|
|
1475
|
-
...
|
|
1476
|
-
filters:
|
|
1477
|
-
selectedFilters: (
|
|
1478
|
-
} :
|
|
1475
|
+
...f,
|
|
1476
|
+
filters: f.filters.filter((e) => e.filterName !== "visibility"),
|
|
1477
|
+
selectedFilters: (f.selectedFilters || []).filter((e) => e.name !== "visibility")
|
|
1478
|
+
} : f, ie = new Set(I.map((e) => e.id)), V = h.filter((e) => ie.has(e)), ae = V.filter((e) => {
|
|
1479
1479
|
let t = I.find((t) => t.id === e);
|
|
1480
1480
|
return t && !t.protected;
|
|
1481
1481
|
}), oe = V.filter((e) => {
|
|
@@ -1489,12 +1489,12 @@ function $e({ imagesPromise: e, imageOverrides: t, deletedImageIds: n, permissio
|
|
|
1489
1489
|
return t && t.status === L.DEACTIVATED;
|
|
1490
1490
|
}), ce = !F.canDelete || V.length === 0 || I.filter((e) => V.includes(e.id)).every((e) => e.protected), le = !F.canUpdate || V.length === 0 || I.filter((e) => V.includes(e.id)).every((e) => e.status === L.DEACTIVATED), ue = !F.canUpdate || V.length === 0 || I.filter((e) => V.includes(e.id)).every((e) => e.status === L.ACTIVE);
|
|
1491
1491
|
return /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(te, {
|
|
1492
|
-
sortSettings:
|
|
1492
|
+
sortSettings: l,
|
|
1493
1493
|
filterSettings: re,
|
|
1494
|
-
searchTerm:
|
|
1495
|
-
onSort:
|
|
1496
|
-
onFilter:
|
|
1497
|
-
onSearch:
|
|
1494
|
+
searchTerm: o,
|
|
1495
|
+
onSort: u,
|
|
1496
|
+
onFilter: m,
|
|
1497
|
+
onSearch: s,
|
|
1498
1498
|
tabs: {
|
|
1499
1499
|
items: [
|
|
1500
1500
|
{
|
|
@@ -1513,27 +1513,30 @@ function $e({ imagesPromise: e, imageOverrides: t, deletedImageIds: n, permissio
|
|
|
1513
1513
|
activeItem: T,
|
|
1514
1514
|
onActiveItemChange: (e) => E(e)
|
|
1515
1515
|
},
|
|
1516
|
-
actions: /* @__PURE__ */ G(W, { children: /* @__PURE__ */ K(
|
|
1516
|
+
actions: /* @__PURE__ */ G(W, { children: /* @__PURE__ */ K(e, {
|
|
1517
1517
|
gap: "2",
|
|
1518
|
-
children: [F.canCreate && /* @__PURE__ */ G(
|
|
1519
|
-
onClick: () =>
|
|
1518
|
+
children: [F.canCreate && /* @__PURE__ */ G(y, {
|
|
1519
|
+
onClick: () => v(!0),
|
|
1520
1520
|
variant: "primary",
|
|
1521
1521
|
children: "Create Image"
|
|
1522
|
-
}), /* @__PURE__ */ K(
|
|
1523
|
-
|
|
1524
|
-
children: /* @__PURE__ */ G(
|
|
1525
|
-
|
|
1526
|
-
|
|
1522
|
+
}), /* @__PURE__ */ K(p, { children: [/* @__PURE__ */ G(r, {
|
|
1523
|
+
as: "div",
|
|
1524
|
+
children: /* @__PURE__ */ G(y, {
|
|
1525
|
+
icon: "moreVert",
|
|
1526
|
+
children: /* @__PURE__ */ G(J, { id: "PgNNGl" })
|
|
1527
|
+
})
|
|
1528
|
+
}), /* @__PURE__ */ K(c, { children: [
|
|
1529
|
+
/* @__PURE__ */ G(d, {
|
|
1527
1530
|
disabled: ce,
|
|
1528
1531
|
label: M._({ id: "c6b6fz" }),
|
|
1529
|
-
onClick: () =>
|
|
1532
|
+
onClick: () => x(!0)
|
|
1530
1533
|
}),
|
|
1531
|
-
/* @__PURE__ */ G(
|
|
1534
|
+
/* @__PURE__ */ G(d, {
|
|
1532
1535
|
disabled: le,
|
|
1533
1536
|
label: M._({ id: "UmQ3/m" }),
|
|
1534
1537
|
onClick: () => S(!0)
|
|
1535
1538
|
}),
|
|
1536
|
-
/* @__PURE__ */ G(
|
|
1539
|
+
/* @__PURE__ */ G(d, {
|
|
1537
1540
|
disabled: ue,
|
|
1538
1541
|
label: M._({ id: "d/I0J3" }),
|
|
1539
1542
|
onClick: () => w(!0)
|
|
@@ -1549,16 +1552,16 @@ function $e({ imagesPromise: e, imageOverrides: t, deletedImageIds: n, permissio
|
|
|
1549
1552
|
currentPage: z,
|
|
1550
1553
|
totalPages: R,
|
|
1551
1554
|
onPageChange: k,
|
|
1552
|
-
selectedImages:
|
|
1553
|
-
setSelectedImages:
|
|
1554
|
-
deleteAllModalOpen:
|
|
1555
|
-
setDeleteAllModalOpen:
|
|
1556
|
-
deactivateAllModalOpen:
|
|
1555
|
+
selectedImages: h,
|
|
1556
|
+
setSelectedImages: g,
|
|
1557
|
+
deleteAllModalOpen: b,
|
|
1558
|
+
setDeleteAllModalOpen: x,
|
|
1559
|
+
deactivateAllModalOpen: ee,
|
|
1557
1560
|
setDeactivateAllModalOpen: S,
|
|
1558
1561
|
activateAllModalOpen: C,
|
|
1559
1562
|
setActivateAllModalOpen: w,
|
|
1560
|
-
createModalOpen:
|
|
1561
|
-
setCreateModalOpen:
|
|
1563
|
+
createModalOpen: _,
|
|
1564
|
+
setCreateModalOpen: v,
|
|
1562
1565
|
deletableImages: ae,
|
|
1563
1566
|
protectedImages: oe,
|
|
1564
1567
|
activeImages: H,
|
|
@@ -1568,67 +1571,67 @@ function $e({ imagesPromise: e, imageOverrides: t, deletedImageIds: n, permissio
|
|
|
1568
1571
|
onMemberStatusChanged: ne
|
|
1569
1572
|
})] });
|
|
1570
1573
|
}
|
|
1571
|
-
var et = ({ client:
|
|
1572
|
-
let { i18n:
|
|
1574
|
+
var et = ({ client: t, project: n }) => {
|
|
1575
|
+
let { i18n: r, _: a } = Y(), o = Me(), s = Pe({ strict: !1 }), [c, l] = q({
|
|
1573
1576
|
options: [
|
|
1574
1577
|
{
|
|
1575
|
-
label:
|
|
1578
|
+
label: r._({ id: "88kg0+" }),
|
|
1576
1579
|
value: "created_at"
|
|
1577
1580
|
},
|
|
1578
1581
|
{
|
|
1579
|
-
label:
|
|
1582
|
+
label: r._({ id: "Llcakz" }),
|
|
1580
1583
|
value: "updated_at"
|
|
1581
1584
|
},
|
|
1582
1585
|
{
|
|
1583
|
-
label:
|
|
1586
|
+
label: r._({ id: "6YtxFj" }),
|
|
1584
1587
|
value: "name"
|
|
1585
1588
|
},
|
|
1586
1589
|
{
|
|
1587
|
-
label:
|
|
1590
|
+
label: r._({ id: "Cj2Gtd" }),
|
|
1588
1591
|
value: "size"
|
|
1589
1592
|
},
|
|
1590
1593
|
{
|
|
1591
|
-
label:
|
|
1594
|
+
label: r._({ id: "uAQUqI" }),
|
|
1592
1595
|
value: "status"
|
|
1593
1596
|
}
|
|
1594
1597
|
],
|
|
1595
|
-
sortBy:
|
|
1596
|
-
sortDirection:
|
|
1597
|
-
}), [
|
|
1598
|
+
sortBy: s.sortBy || "created_at",
|
|
1599
|
+
sortDirection: s.sortDirection || "desc"
|
|
1600
|
+
}), [u, d] = q({
|
|
1598
1601
|
filters: [
|
|
1599
1602
|
{
|
|
1600
|
-
displayName:
|
|
1603
|
+
displayName: r._({ id: "uAQUqI" }),
|
|
1601
1604
|
filterName: "status",
|
|
1602
1605
|
values: Object.values(L),
|
|
1603
1606
|
supportsMultiValue: !0
|
|
1604
1607
|
},
|
|
1605
1608
|
{
|
|
1606
|
-
displayName:
|
|
1609
|
+
displayName: r._({ id: "2q/Q7x" }),
|
|
1607
1610
|
filterName: "visibility",
|
|
1608
1611
|
values: Object.values(z),
|
|
1609
1612
|
supportsMultiValue: !1
|
|
1610
1613
|
},
|
|
1611
1614
|
{
|
|
1612
|
-
displayName:
|
|
1615
|
+
displayName: r._({ id: "NopYGU" }),
|
|
1613
1616
|
filterName: "disk_format",
|
|
1614
1617
|
values: Object.values(I),
|
|
1615
1618
|
supportsMultiValue: !0
|
|
1616
1619
|
},
|
|
1617
1620
|
{
|
|
1618
|
-
displayName:
|
|
1621
|
+
displayName: r._({ id: "6/xipy" }),
|
|
1619
1622
|
filterName: "container_format",
|
|
1620
1623
|
values: Object.values(de),
|
|
1621
1624
|
supportsMultiValue: !0
|
|
1622
1625
|
},
|
|
1623
1626
|
{
|
|
1624
|
-
displayName:
|
|
1627
|
+
displayName: r._({ id: "644xgx" }),
|
|
1625
1628
|
filterName: "protected",
|
|
1626
1629
|
values: ["true", "false"],
|
|
1627
1630
|
supportsMultiValue: !1
|
|
1628
1631
|
}
|
|
1629
1632
|
],
|
|
1630
|
-
selectedFilters: Je(
|
|
1631
|
-
}), [
|
|
1633
|
+
selectedFilters: Je(s)
|
|
1634
|
+
}), [f, p] = q(s.search || ""), m = s.page ?? 1, [h, g] = q([]), [_, v] = q(!1), [y, b] = q(!1), [x, ee] = q(!1), [S, C] = q(!1), w = s.memberStatus ?? "all", [T, E] = q(!0), [D, O] = q(/* @__PURE__ */ new Map()), [k, A] = q(/* @__PURE__ */ new Set()), [te, j] = q(() => new Promise(() => {})), [ne] = q(() => Ze(t, n)), M = ke((e) => {
|
|
1632
1635
|
O((t) => new Map(t).set(e.id, e));
|
|
1633
1636
|
}, []), N = ke((e) => {
|
|
1634
1637
|
A((t) => {
|
|
@@ -1637,49 +1640,49 @@ var et = ({ client: e, project: t }) => {
|
|
|
1637
1640
|
});
|
|
1638
1641
|
}, []), P = ke(() => {
|
|
1639
1642
|
O(/* @__PURE__ */ new Map()), E(!0);
|
|
1640
|
-
let
|
|
1643
|
+
let e = s.memberStatus ?? "all", r = e === "all" ? void 0 : e;
|
|
1641
1644
|
De(() => {
|
|
1642
|
-
let i =
|
|
1643
|
-
...Ye(i,
|
|
1645
|
+
let i = e === "pending" || e === "accepted" ? (u.selectedFilters || []).filter((e) => e.name !== "visibility") : u.selectedFilters || [], a = Q(t, n, c.sortBy, c.sortDirection, f, {
|
|
1646
|
+
...Ye(i, u.filters),
|
|
1644
1647
|
member_status: r
|
|
1645
1648
|
});
|
|
1646
1649
|
a.catch(() => {}).finally(() => E(!1)), j(a);
|
|
1647
1650
|
});
|
|
1648
1651
|
}, [
|
|
1649
|
-
|
|
1650
|
-
o,
|
|
1651
|
-
d,
|
|
1652
|
+
t,
|
|
1652
1653
|
c,
|
|
1653
|
-
|
|
1654
|
+
f,
|
|
1655
|
+
u,
|
|
1656
|
+
s.memberStatus
|
|
1654
1657
|
]);
|
|
1655
1658
|
Ae(() => {
|
|
1656
|
-
let
|
|
1657
|
-
|
|
1658
|
-
...
|
|
1659
|
-
selectedFilters:
|
|
1660
|
-
})),
|
|
1659
|
+
let e = Je(s), r = s.sortBy || "created_at", i = s.sortDirection || "desc", a = s.search || "";
|
|
1660
|
+
d((t) => ({
|
|
1661
|
+
...t,
|
|
1662
|
+
selectedFilters: e
|
|
1663
|
+
})), l((e) => ({
|
|
1661
1664
|
...e,
|
|
1662
1665
|
sortBy: r,
|
|
1663
1666
|
sortDirection: i
|
|
1664
|
-
})),
|
|
1665
|
-
let
|
|
1667
|
+
})), p(a), g([]), O(/* @__PURE__ */ new Map()), E(!0);
|
|
1668
|
+
let o = s.memberStatus ?? "all", c = o === "all" ? void 0 : o;
|
|
1666
1669
|
De(() => {
|
|
1667
|
-
let
|
|
1668
|
-
...Ye(
|
|
1669
|
-
member_status:
|
|
1670
|
+
let s = Q(t, n, r, i, a, {
|
|
1671
|
+
...Ye(o === "pending" || o === "accepted" ? (e || []).filter((e) => e.name !== "visibility") : e || [], u.filters),
|
|
1672
|
+
member_status: c
|
|
1670
1673
|
});
|
|
1671
|
-
|
|
1674
|
+
s.catch(() => {}).finally(() => E(!1)), j(s);
|
|
1672
1675
|
});
|
|
1673
1676
|
}, [
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1677
|
+
s.status,
|
|
1678
|
+
s.visibility,
|
|
1679
|
+
s.disk_format,
|
|
1680
|
+
s.container_format,
|
|
1681
|
+
s.protected,
|
|
1682
|
+
s.sortBy,
|
|
1683
|
+
s.sortDirection,
|
|
1684
|
+
s.search,
|
|
1685
|
+
s.memberStatus
|
|
1683
1686
|
]);
|
|
1684
1687
|
let F = (e) => {
|
|
1685
1688
|
let t = {
|
|
@@ -1687,7 +1690,7 @@ var et = ({ client: e, project: t }) => {
|
|
|
1687
1690
|
sortBy: e.sortBy?.toString() || "created_at",
|
|
1688
1691
|
sortDirection: e.sortDirection || "desc"
|
|
1689
1692
|
};
|
|
1690
|
-
|
|
1693
|
+
l(t), o({
|
|
1691
1694
|
search: (e) => ({
|
|
1692
1695
|
...e,
|
|
1693
1696
|
sortBy: t.sortBy,
|
|
@@ -1697,7 +1700,7 @@ var et = ({ client: e, project: t }) => {
|
|
|
1697
1700
|
replace: !0
|
|
1698
1701
|
});
|
|
1699
1702
|
}, R = (e) => {
|
|
1700
|
-
|
|
1703
|
+
d(e), o({
|
|
1701
1704
|
search: (t) => Xe(e.selectedFilters || [], e.filters, {
|
|
1702
1705
|
search: t.search,
|
|
1703
1706
|
sortBy: t.sortBy,
|
|
@@ -1708,7 +1711,7 @@ var et = ({ client: e, project: t }) => {
|
|
|
1708
1711
|
});
|
|
1709
1712
|
}, B = (e) => {
|
|
1710
1713
|
let t = typeof e == "string" ? e : "";
|
|
1711
|
-
|
|
1714
|
+
p(t), o({
|
|
1712
1715
|
search: (e) => ({
|
|
1713
1716
|
...e,
|
|
1714
1717
|
search: t || void 0,
|
|
@@ -1717,27 +1720,27 @@ var et = ({ client: e, project: t }) => {
|
|
|
1717
1720
|
replace: !0
|
|
1718
1721
|
});
|
|
1719
1722
|
}, re = (e) => {
|
|
1720
|
-
|
|
1723
|
+
o({ search: (t) => ({
|
|
1721
1724
|
sortBy: t.sortBy,
|
|
1722
1725
|
sortDirection: t.sortDirection,
|
|
1723
1726
|
search: t.search,
|
|
1724
1727
|
memberStatus: e === "all" ? void 0 : e
|
|
1725
1728
|
}) });
|
|
1726
1729
|
}, ie = ke((e) => {
|
|
1727
|
-
|
|
1730
|
+
o({ search: (t) => ({
|
|
1728
1731
|
...t,
|
|
1729
1732
|
page: e === 1 ? void 0 : e
|
|
1730
1733
|
}) });
|
|
1731
|
-
}, [
|
|
1734
|
+
}, [o]);
|
|
1732
1735
|
return /* @__PURE__ */ G("div", {
|
|
1733
1736
|
className: "relative",
|
|
1734
1737
|
children: /* @__PURE__ */ G(Ee, {
|
|
1735
|
-
fallback: /* @__PURE__ */ K(
|
|
1738
|
+
fallback: /* @__PURE__ */ K(e, {
|
|
1736
1739
|
className: "fixed inset-0",
|
|
1737
1740
|
distribution: "center",
|
|
1738
1741
|
alignment: "center",
|
|
1739
1742
|
direction: "vertical",
|
|
1740
|
-
children: [/* @__PURE__ */ G(
|
|
1743
|
+
children: [/* @__PURE__ */ G(i, {
|
|
1741
1744
|
variant: "primary",
|
|
1742
1745
|
size: "large",
|
|
1743
1746
|
className: "mb-2"
|
|
@@ -1748,26 +1751,26 @@ var et = ({ client: e, project: t }) => {
|
|
|
1748
1751
|
imageOverrides: D,
|
|
1749
1752
|
deletedImageIds: k,
|
|
1750
1753
|
permissionsPromise: ne,
|
|
1751
|
-
searchTerm:
|
|
1754
|
+
searchTerm: f,
|
|
1752
1755
|
setSearchTerm: B,
|
|
1753
|
-
sortSettings:
|
|
1756
|
+
sortSettings: c,
|
|
1754
1757
|
handleSortChange: F,
|
|
1755
|
-
filterSettings:
|
|
1758
|
+
filterSettings: u,
|
|
1756
1759
|
handleFilterChange: R,
|
|
1757
|
-
selectedImages:
|
|
1758
|
-
setSelectedImages:
|
|
1759
|
-
createModalOpen:
|
|
1760
|
-
setCreateModalOpen:
|
|
1761
|
-
deleteAllModalOpen:
|
|
1762
|
-
setDeleteAllModalOpen:
|
|
1763
|
-
deactivateAllModalOpen:
|
|
1764
|
-
setDeactivateAllModalOpen:
|
|
1760
|
+
selectedImages: h,
|
|
1761
|
+
setSelectedImages: g,
|
|
1762
|
+
createModalOpen: _,
|
|
1763
|
+
setCreateModalOpen: v,
|
|
1764
|
+
deleteAllModalOpen: y,
|
|
1765
|
+
setDeleteAllModalOpen: b,
|
|
1766
|
+
deactivateAllModalOpen: x,
|
|
1767
|
+
setDeactivateAllModalOpen: ee,
|
|
1765
1768
|
activateAllModalOpen: S,
|
|
1766
1769
|
setActivateAllModalOpen: C,
|
|
1767
1770
|
memberStatusView: w,
|
|
1768
1771
|
setMemberStatusView: re,
|
|
1769
1772
|
isFetching: T,
|
|
1770
|
-
currentPage:
|
|
1773
|
+
currentPage: m,
|
|
1771
1774
|
onPageChange: ie,
|
|
1772
1775
|
onImageUpdated: M,
|
|
1773
1776
|
onImageDeleted: N,
|
|
@@ -1779,8 +1782,8 @@ var et = ({ client: e, project: t }) => {
|
|
|
1779
1782
|
//#endregion
|
|
1780
1783
|
//#region src/client/routes/_auth/projects/$projectId/compute/images/index.tsx?tsr-split=component
|
|
1781
1784
|
function tt() {
|
|
1782
|
-
let { i18n: e, _: t } = Y(), { projectId: n } = O.useParams(), { trpcClient: r
|
|
1783
|
-
return
|
|
1785
|
+
let { i18n: e, _: t } = Y(), { projectId: n } = O.useParams(), { trpcClient: r } = O.useRouteContext();
|
|
1786
|
+
return /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(A, {
|
|
1784
1787
|
title: e._({ id: "an5hVd" }),
|
|
1785
1788
|
projectId: n
|
|
1786
1789
|
}), /* @__PURE__ */ G(et, {
|
|
@@ -1791,4 +1794,4 @@ function tt() {
|
|
|
1791
1794
|
//#endregion
|
|
1792
1795
|
export { tt as component };
|
|
1793
1796
|
|
|
1794
|
-
//# sourceMappingURL=images-
|
|
1797
|
+
//# sourceMappingURL=images-DaaCUXMI.mjs.map
|