@cobaltcore-dev/aurora 0.22.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/{AuthProvider-p1e1DuKU.mjs → AuthProvider-CQ6Yppoh.mjs} +2 -2
- package/dist/client/{AuthProvider-p1e1DuKU.mjs.map → AuthProvider-CQ6Yppoh.mjs.map} +1 -1
- package/dist/client/{BucketToastNotifications-BGd2wVmh.mjs → BucketToastNotifications-Dq4dudkM.mjs} +224 -172
- package/dist/client/BucketToastNotifications-Dq4dudkM.mjs.map +1 -0
- package/dist/client/{ContentHeader-BIScbvb4.mjs → ContentHeader-9KZdhOoA.mjs} +2 -2
- package/dist/client/{ContentHeader-BIScbvb4.mjs.map → ContentHeader-9KZdhOoA.mjs.map} +1 -1
- package/dist/client/{DeleteFlavorModal-lFMExcq_.mjs → DeleteFlavorModal-Be2qZo4w.mjs} +2 -2
- package/dist/client/{DeleteFlavorModal-lFMExcq_.mjs.map → DeleteFlavorModal-Be2qZo4w.mjs.map} +1 -1
- package/dist/client/{DeletePcaModal-Dg9dej-H.mjs → DeletePcaModal-CIFsGWyj.mjs} +4 -4
- package/dist/client/{DeletePcaModal-Dg9dej-H.mjs.map → DeletePcaModal-CIFsGWyj.mjs.map} +1 -1
- package/dist/client/{DetailsInfo-DwCo9P1o.mjs → DetailsInfo-CHVD7d-W.mjs} +3 -3
- package/dist/client/{DetailsInfo-DwCo9P1o.mjs.map → DetailsInfo-CHVD7d-W.mjs.map} +1 -1
- package/dist/client/{FiltersInput-cOaaRpcQ.mjs → FiltersInput-DqT08Ib-.mjs} +2 -2
- package/dist/client/{FiltersInput-cOaaRpcQ.mjs.map → FiltersInput-DqT08Ib-.mjs.map} +1 -1
- package/dist/client/{FloatingIpActionModals-CDF8LVtX.mjs → FloatingIpActionModals-BcceUHcg.mjs} +4 -4
- package/dist/client/{FloatingIpActionModals-CDF8LVtX.mjs.map → FloatingIpActionModals-BcceUHcg.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications-Dzq6jNTm.mjs → ImageToastNotifications-BGyX2J6j.mjs} +5 -5
- package/dist/client/ImageToastNotifications-BGyX2J6j.mjs.map +1 -0
- package/dist/client/{RouteError-BmZRk_ss.mjs → RouteError-Rm08PcxN.mjs} +2 -2
- package/dist/client/{RouteError-BmZRk_ss.mjs.map → RouteError-Rm08PcxN.mjs.map} +1 -1
- package/dist/client/{SortInput-DjaEHvcO.mjs → SortInput-D_q_jDfe.mjs} +2 -2
- package/dist/client/{SortInput-DjaEHvcO.mjs.map → SortInput-D_q_jDfe.mjs.map} +1 -1
- package/dist/client/{StatusError-CLB026fg.mjs → StatusError-2ZU1gFpu.mjs} +2 -2
- package/dist/client/{StatusError-CLB026fg.mjs.map → StatusError-2ZU1gFpu.mjs.map} +1 -1
- package/dist/client/{_auth-Dut7CaMR.mjs → _auth-D5_QNUos.mjs} +2 -2
- package/dist/client/{_auth-Dut7CaMR.mjs.map → _auth-D5_QNUos.mjs.map} +1 -1
- package/dist/client/{_flavorId-DUWdFEMH.mjs → _flavorId-BsmqS9hP.mjs} +7 -7
- package/dist/client/{_flavorId-DUWdFEMH.mjs.map → _flavorId-BsmqS9hP.mjs.map} +1 -1
- package/dist/client/{_flavorId-BMJcnI7H.mjs → _flavorId-CFmkmg2Y.mjs} +2 -2
- package/dist/client/{_flavorId-BMJcnI7H.mjs.map → _flavorId-CFmkmg2Y.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-KcWWq9ZW2.mjs → _floatingIpId-Bb9ZEJ6b.mjs} +6 -6
- package/dist/client/_floatingIpId-Bb9ZEJ6b.mjs.map +1 -0
- package/dist/client/{_floatingIpId-CjQLzpC5.mjs → _floatingIpId-Dzh6_JCI.mjs} +2 -2
- package/dist/client/{_floatingIpId-CjQLzpC5.mjs.map → _floatingIpId-Dzh6_JCI.mjs.map} +1 -1
- package/dist/client/{_imageId-BkEpwbCr.mjs → _imageId-C3As7sHE.mjs} +5 -5
- package/dist/client/{_imageId-BkEpwbCr.mjs.map → _imageId-C3As7sHE.mjs.map} +1 -1
- package/dist/client/{_pcaId-BcwGho7g.mjs → _pcaId-n0q0aDb6.mjs} +6 -6
- package/dist/client/{_pcaId-BcwGho7g.mjs.map → _pcaId-n0q0aDb6.mjs.map} +1 -1
- package/dist/client/{_projectId-hMtrqW6m.mjs → _projectId-BuBIFdgG.mjs} +3 -3
- package/dist/client/{_projectId-hMtrqW6m.mjs.map → _projectId-BuBIFdgG.mjs.map} +1 -1
- package/dist/client/{_projectId-CoMD6nq6.mjs → _projectId-CAQkJHZ4.mjs} +3 -3
- package/dist/client/{_projectId-CoMD6nq6.mjs.map → _projectId-CAQkJHZ4.mjs.map} +1 -1
- package/dist/client/_projectId-D-b7paXE.mjs +29 -0
- package/dist/client/_projectId-D-b7paXE.mjs.map +1 -0
- package/dist/client/{_projectId-D8FHe0gr.mjs → _projectId-DNZsNxJw.mjs} +3 -3
- package/dist/client/{_projectId-D8FHe0gr.mjs.map → _projectId-DNZsNxJw.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-B5-gJe1u.mjs → _securityGroupId-DFdNKa2l.mjs} +641 -504
- package/dist/client/_securityGroupId-DFdNKa2l.mjs.map +1 -0
- package/dist/client/{_securityGroupId-fPJWtDPU.mjs → _securityGroupId-DRkY3Gt6.mjs} +2 -2
- package/dist/client/_securityGroupId-DRkY3Gt6.mjs.map +1 -0
- package/dist/client/{_storageType-CI5f4CsI.mjs → _storageType-Cn7TSOki.mjs} +2 -2
- package/dist/client/{_storageType-CI5f4CsI.mjs.map → _storageType-Cn7TSOki.mjs.map} +1 -1
- package/dist/client/{_storageType-DePX1Aah.mjs → _storageType-_8Ambhxc.mjs} +832 -843
- package/dist/client/_storageType-_8Ambhxc.mjs.map +1 -0
- package/dist/client/{about-B4sGnxeW.mjs → about-C8tTrQaW.mjs} +2 -2
- package/dist/client/{about-B4sGnxeW.mjs.map → about-C8tTrQaW.mjs.map} +1 -1
- package/dist/client/assets/objectDownload.worker-BAc5Au4B.js.map +1 -0
- package/dist/client/{aurora-Dp_NPGe8.mjs → aurora-jyvXcI4T.mjs} +2 -2
- package/dist/client/{aurora-Dp_NPGe8.mjs.map → aurora-jyvXcI4T.mjs.map} +1 -1
- package/dist/client/{build-DgeVmENN.mjs → build-CRLQyqu2.mjs} +2616 -3346
- package/dist/client/{build-DgeVmENN.mjs.map → build-CRLQyqu2.mjs.map} +1 -1
- package/dist/client/{flavors-DkGuWvge.mjs → flavors-BfTXqmoD.mjs} +6 -6
- package/dist/client/{flavors-DkGuWvge.mjs.map → flavors-BfTXqmoD.mjs.map} +1 -1
- package/dist/client/{flavors-DLxUiBhE.mjs → flavors-Dy-2mRGv.mjs} +2 -2
- package/dist/client/{flavors-DLxUiBhE.mjs.map → flavors-Dy-2mRGv.mjs.map} +1 -1
- package/dist/client/floatingips-zhNK6Xxn.mjs +562 -0
- package/dist/client/floatingips-zhNK6Xxn.mjs.map +1 -0
- package/dist/client/hooks/useAvailableViewportHeight.d.ts +30 -0
- package/dist/client/hooks/useVirtualizedTableBody.d.ts +39 -0
- package/dist/client/{hooks-D0wGUhRF.mjs → hooks-Bw3sHHOg.mjs} +2 -2
- package/dist/client/{hooks-D0wGUhRF.mjs.map → hooks-Bw3sHHOg.mjs.map} +1 -1
- package/dist/client/{images-h9i7S4LN.mjs → images-DPKUXryV.mjs} +2 -2
- package/dist/client/{images-h9i7S4LN.mjs.map → images-DPKUXryV.mjs.map} +1 -1
- package/dist/client/{images-D9nfOtSC.mjs → images-DhZnqUG_.mjs} +29 -29
- package/dist/client/images-DhZnqUG_.mjs.map +1 -0
- package/dist/client/images-NBf2bV43.mjs.map +1 -1
- package/dist/client/index.js +303 -312
- package/dist/client/index.js.map +1 -1
- package/dist/client/{objects-CGOfO00N.mjs → objects-B3mbk6V0.mjs} +1361 -1082
- package/dist/client/objects-B3mbk6V0.mjs.map +1 -0
- package/dist/client/{objects-B3Z8h4RU.mjs → objects-BQ8xvSW8.mjs} +2 -2
- package/dist/client/{objects-B3Z8h4RU.mjs.map → objects-BQ8xvSW8.mjs.map} +1 -1
- package/dist/client/{pca-Nppb8aVa.mjs → pca-B60iWWfG.mjs} +7 -7
- package/dist/client/{pca-Nppb8aVa.mjs.map → pca-B60iWWfG.mjs.map} +1 -1
- package/dist/client/{pca-C7cMT8fW.mjs → pca-D0kKxHp4.mjs} +2 -2
- package/dist/client/{pca-C7cMT8fW.mjs.map → pca-D0kKxHp4.mjs.map} +1 -1
- package/dist/client/projects-yiK0HGSA.mjs.map +1 -1
- package/dist/client/{routes-CaqfgBYu.mjs → routes-BOf-GDMM.mjs} +4 -4
- package/dist/client/{routes-CaqfgBYu.mjs.map → routes-BOf-GDMM.mjs.map} +1 -1
- package/dist/client/{routes-Bz4zb2H4.mjs → routes-CtfnI-aY.mjs} +2 -2
- package/dist/client/{routes-Bz4zb2H4.mjs.map → routes-CtfnI-aY.mjs.map} +1 -1
- package/dist/client/securitygroups-B8aLyFK7.mjs +17 -0
- package/dist/client/securitygroups-B8aLyFK7.mjs.map +1 -0
- package/dist/client/securitygroups-DRhFle2O.mjs +589 -0
- package/dist/client/securitygroups-DRhFle2O.mjs.map +1 -0
- package/dist/client/trpcClient-Di56hpVv.mjs +71 -0
- package/dist/client/trpcClient-Di56hpVv.mjs.map +1 -0
- package/dist/client/trpcClient.d.ts +40 -4
- package/dist/client/useListWithFiltering-aPTUNRaW.mjs +32 -0
- package/dist/client/useListWithFiltering-aPTUNRaW.mjs.map +1 -0
- package/dist/client/useSecurityGroupPermissions-BPS1ibWq.mjs +161 -0
- package/dist/client/useSecurityGroupPermissions-BPS1ibWq.mjs.map +1 -0
- package/dist/server/index.d.ts +56 -53
- package/dist/server/index.js +297 -20
- package/package.json +14 -14
- package/dist/client/BucketToastNotifications-BGd2wVmh.mjs.map +0 -1
- package/dist/client/EditSecurityGroupModal-BGPXglju.mjs +0 -137
- package/dist/client/EditSecurityGroupModal-BGPXglju.mjs.map +0 -1
- package/dist/client/ImageToastNotifications-Dzq6jNTm.mjs.map +0 -1
- package/dist/client/_floatingIpId-KcWWq9ZW2.mjs.map +0 -1
- package/dist/client/_projectId-MjFv839t.mjs +0 -25
- package/dist/client/_projectId-MjFv839t.mjs.map +0 -1
- package/dist/client/_securityGroupId-B5-gJe1u.mjs.map +0 -1
- package/dist/client/_securityGroupId-fPJWtDPU.mjs.map +0 -1
- package/dist/client/_storageType-DePX1Aah.mjs.map +0 -1
- package/dist/client/buildFilterParams-DoZzMKX9.mjs +0 -15
- package/dist/client/buildFilterParams-DoZzMKX9.mjs.map +0 -1
- package/dist/client/floatingips-DC5OrR8h.mjs +0 -434
- package/dist/client/floatingips-DC5OrR8h.mjs.map +0 -1
- package/dist/client/images-B5ktfqg6.mjs +0 -8
- package/dist/client/images-B5ktfqg6.mjs.map +0 -1
- package/dist/client/images-D9nfOtSC.mjs.map +0 -1
- package/dist/client/objects-CGOfO00N.mjs.map +0 -1
- package/dist/client/projects-DvSiI5Vg.mjs +0 -12
- package/dist/client/projects-DvSiI5Vg.mjs.map +0 -1
- package/dist/client/securitygroups-JMvcJLpb.mjs +0 -440
- package/dist/client/securitygroups-JMvcJLpb.mjs.map +0 -1
- package/dist/client/trpcClient-BxcNKnhv.mjs +0 -65
- package/dist/client/trpcClient-BxcNKnhv.mjs.map +0 -1
- package/dist/client/useListWithFiltering-BuhE81I6.mjs +0 -157
- package/dist/client/useListWithFiltering-BuhE81I6.mjs.map +0 -1
|
@@ -1,201 +1,203 @@
|
|
|
1
|
-
import { A as e, B as t, E as n, G as r, H as i, K as a, P as o, Q as s, R as c, U as l, Y as u, Z as d, at as f, c as p,
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import "./hooks-
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import { A as e, B as t, E as n, G as r, H as i, K as a, P as o, Q as s, R as c, U as l, Y as u, Z as d, at as f, c as p, ct as m, dt as h, et as g, g as _, h as v, m as y, n as b, nt as x, o as S, p as C, r as w, rt as T, tt as E, ut as D, y as O } from "./build-CRLQyqu2.mjs";
|
|
2
|
+
import { a as k } from "./trpcClient-Di56hpVv.mjs";
|
|
3
|
+
import { t as A } from "./_securityGroupId-DRkY3Gt6.mjs";
|
|
4
|
+
import { t as j } from "./useProjectId-DBc5lpoU.mjs";
|
|
5
|
+
import "./hooks-Bw3sHHOg.mjs";
|
|
6
|
+
import { t as M } from "./useModal-DCs1OJh7.mjs";
|
|
7
|
+
import { t as N } from "./SortInput-D_q_jDfe.mjs";
|
|
8
|
+
import { n as P, t as F } from "./FiltersInput-DqT08Ib-.mjs";
|
|
9
|
+
import { t as I } from "./useListWithFiltering-aPTUNRaW.mjs";
|
|
10
|
+
import { n as L, t as ee } from "./useSecurityGroupPermissions-BPS1ibWq.mjs";
|
|
11
|
+
import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
12
|
+
import { useEffect as V, useMemo as H, useRef as U, useState as W } from "react";
|
|
13
|
+
import { useNavigate as G } from "@tanstack/react-router";
|
|
14
|
+
import { Trans as K, useLingui as q } from "@lingui/react";
|
|
15
|
+
import { z as J } from "zod";
|
|
16
|
+
import { useForm as Y, useStore as X } from "@tanstack/react-form";
|
|
15
17
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupHeader.tsx
|
|
16
|
-
function
|
|
17
|
-
return /*#__PURE__*/
|
|
18
|
+
function te({ name: e, id: t }) {
|
|
19
|
+
return /*#__PURE__*/ B("div", {
|
|
18
20
|
className: "mb-2",
|
|
19
|
-
children: [/*#__PURE__*/
|
|
21
|
+
children: [/*#__PURE__*/ z(u, { children: `'${e || t}' Details` }), /*#__PURE__*/ z("p", {
|
|
20
22
|
className: "text-theme-secondary mt-2 text-sm",
|
|
21
|
-
children: /*#__PURE__*/
|
|
23
|
+
children: /*#__PURE__*/ z(K, { id: "kIuDMT" })
|
|
22
24
|
})]
|
|
23
25
|
});
|
|
24
26
|
}
|
|
25
27
|
//#endregion
|
|
26
28
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupBasicInfo.tsx
|
|
27
|
-
function
|
|
28
|
-
let { i18n: a, _: s } =
|
|
29
|
-
return /*#__PURE__*/
|
|
29
|
+
function Z({ securityGroup: e, onEdit: t, canUpdate: i }) {
|
|
30
|
+
let { i18n: a, _: s } = q(), l = ({ value: e }) => /*#__PURE__*/ z("span", { children: e ? a._({ id: "l75CjT" }) : a._({ id: "1UzENP" }) });
|
|
31
|
+
return /*#__PURE__*/ B("div", { children: [/*#__PURE__*/ z("div", {
|
|
30
32
|
className: "mb-4 flex flex-row-reverse",
|
|
31
|
-
children: t &&
|
|
33
|
+
children: t && i && /*#__PURE__*/ z(O, {
|
|
32
34
|
variant: "primary",
|
|
33
35
|
onClick: t,
|
|
34
|
-
disabled: i,
|
|
35
|
-
children: /*#__PURE__*/
|
|
36
|
+
disabled: !i,
|
|
37
|
+
children: /*#__PURE__*/ z(K, { id: "ePK91l" })
|
|
36
38
|
})
|
|
37
|
-
}), /*#__PURE__*/
|
|
39
|
+
}), /*#__PURE__*/ B(o, {
|
|
38
40
|
columns: 4,
|
|
39
41
|
gridColumnTemplate: "15% 35% 15% 35%",
|
|
40
42
|
children: [
|
|
41
|
-
/*#__PURE__*/
|
|
43
|
+
/*#__PURE__*/ B(n, { children: [/*#__PURE__*/ z(c, { children: a._({ id: "Nu4oKW" }) }), /*#__PURE__*/ z(r, {
|
|
42
44
|
colSpan: 3,
|
|
43
|
-
children: /*#__PURE__*/
|
|
45
|
+
children: /*#__PURE__*/ z("div", {
|
|
44
46
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
45
47
|
title: e.description || void 0,
|
|
46
48
|
children: e.description || a._({ id: "h47p9L" })
|
|
47
49
|
})
|
|
48
50
|
})] }),
|
|
49
|
-
/*#__PURE__*/
|
|
50
|
-
/*#__PURE__*/
|
|
51
|
-
/*#__PURE__*/
|
|
51
|
+
/*#__PURE__*/ B(n, { children: [
|
|
52
|
+
/*#__PURE__*/ z(c, { children: a._({ id: "S0kLOH" }) }),
|
|
53
|
+
/*#__PURE__*/ z(r, { children: /*#__PURE__*/ z("div", {
|
|
52
54
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
53
55
|
title: e.id,
|
|
54
56
|
children: e.id
|
|
55
57
|
}) }),
|
|
56
|
-
/*#__PURE__*/
|
|
57
|
-
/*#__PURE__*/
|
|
58
|
+
/*#__PURE__*/ z(c, { children: a._({ id: "OYHzN1" }) }),
|
|
59
|
+
/*#__PURE__*/ z(r, { children: /*#__PURE__*/ z("div", {
|
|
58
60
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
59
61
|
title: e.tags?.join(", ") || void 0,
|
|
60
62
|
children: e.tags?.join(", ") || a._({ id: "h47p9L" })
|
|
61
63
|
}) })
|
|
62
64
|
] }),
|
|
63
|
-
/*#__PURE__*/
|
|
64
|
-
/*#__PURE__*/
|
|
65
|
-
/*#__PURE__*/
|
|
65
|
+
/*#__PURE__*/ B(n, { children: [
|
|
66
|
+
/*#__PURE__*/ z(c, { children: a._({ id: "6YtxFj" }) }),
|
|
67
|
+
/*#__PURE__*/ z(r, { children: /*#__PURE__*/ z("div", {
|
|
66
68
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
67
69
|
title: e.name || void 0,
|
|
68
70
|
children: e.name
|
|
69
71
|
}) }),
|
|
70
|
-
/*#__PURE__*/
|
|
71
|
-
/*#__PURE__*/
|
|
72
|
+
/*#__PURE__*/ z(c, { children: a._({ id: "Jim5X9" }) }),
|
|
73
|
+
/*#__PURE__*/ z(r, { children: /*#__PURE__*/ z(l, { value: e.stateful }) })
|
|
72
74
|
] }),
|
|
73
|
-
/*#__PURE__*/
|
|
74
|
-
/*#__PURE__*/
|
|
75
|
-
/*#__PURE__*/
|
|
75
|
+
/*#__PURE__*/ B(n, { children: [
|
|
76
|
+
/*#__PURE__*/ z(c, { children: a._({ id: "aI8Tgp" }) }),
|
|
77
|
+
/*#__PURE__*/ z(r, { children: /*#__PURE__*/ z("div", {
|
|
76
78
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
77
79
|
title: e.project_id || void 0,
|
|
78
80
|
children: e.project_id || a._({ id: "h47p9L" })
|
|
79
81
|
}) }),
|
|
80
|
-
/*#__PURE__*/
|
|
81
|
-
/*#__PURE__*/
|
|
82
|
+
/*#__PURE__*/ z(c, { children: a._({ id: "0Gd0NU" }) }),
|
|
83
|
+
/*#__PURE__*/ z(r, { children: /*#__PURE__*/ z(l, { value: e.shared }) })
|
|
82
84
|
] })
|
|
83
85
|
]
|
|
84
86
|
})] });
|
|
85
87
|
}
|
|
86
88
|
//#endregion
|
|
87
89
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupTabs.tsx
|
|
88
|
-
function
|
|
90
|
+
function Q({ activeTab: e, onTabChange: t, showRBACTab: n = !0 }) {
|
|
89
91
|
let r = (t) => `px-6 py-3 font-semibold border-b-2 transition-colors ${e === t ? "border-theme-accent text-theme-highest" : "border-transparent text-theme-secondary hover:text-theme-high"}`;
|
|
90
|
-
return /*#__PURE__*/
|
|
92
|
+
return /*#__PURE__*/ z("div", {
|
|
91
93
|
className: "border-theme-background-lvl-3 mt-1 border-b",
|
|
92
|
-
children: /*#__PURE__*/
|
|
94
|
+
children: /*#__PURE__*/ B(E, {
|
|
93
95
|
direction: "horizontal",
|
|
94
96
|
gap: "0",
|
|
95
|
-
children: [/*#__PURE__*/
|
|
97
|
+
children: [/*#__PURE__*/ z("button", {
|
|
96
98
|
className: r("rules"),
|
|
97
99
|
onClick: () => t("rules"),
|
|
98
|
-
children: /*#__PURE__*/
|
|
99
|
-
}), n && /*#__PURE__*/
|
|
100
|
+
children: /*#__PURE__*/ z(K, { id: "4EZrJN" })
|
|
101
|
+
}), n && /*#__PURE__*/ z("button", {
|
|
100
102
|
className: r("rbac"),
|
|
101
103
|
onClick: () => t("rbac"),
|
|
102
|
-
children: /*#__PURE__*/
|
|
104
|
+
children: /*#__PURE__*/ z(K, { id: "/eFtWI" })
|
|
103
105
|
})]
|
|
104
106
|
})
|
|
105
107
|
});
|
|
106
108
|
}
|
|
107
109
|
//#endregion
|
|
108
110
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/DeleteRuleDialog.tsx
|
|
109
|
-
function
|
|
110
|
-
let { i18n: s, _: c } =
|
|
111
|
+
function ne({ rule: e, open: n, onClose: r, onConfirm: i, isLoading: a, error: o }) {
|
|
112
|
+
let { i18n: s, _: c } = q(), [u, d] = W(""), f = () => {
|
|
111
113
|
e && u === "delete" && i(e.id);
|
|
112
114
|
}, p = () => {
|
|
113
115
|
d(""), r();
|
|
114
116
|
}, m = u !== "delete" || a;
|
|
115
|
-
return e ? /*#__PURE__*/
|
|
117
|
+
return e ? /*#__PURE__*/ z(w, {
|
|
116
118
|
open: n,
|
|
117
119
|
onCancel: p,
|
|
118
120
|
size: "small",
|
|
119
121
|
title: s._({ id: "TM93nK" }),
|
|
120
|
-
modalFooter: /*#__PURE__*/
|
|
122
|
+
modalFooter: /*#__PURE__*/ z(_, {
|
|
121
123
|
className: "flex justify-end",
|
|
122
|
-
children: /*#__PURE__*/
|
|
124
|
+
children: /*#__PURE__*/ B(D, { children: [/*#__PURE__*/ z(O, {
|
|
123
125
|
variant: "default",
|
|
124
126
|
onClick: p,
|
|
125
127
|
disabled: a,
|
|
126
|
-
children: /*#__PURE__*/
|
|
127
|
-
}), /*#__PURE__*/
|
|
128
|
+
children: /*#__PURE__*/ z(K, { id: "dEgA5A" })
|
|
129
|
+
}), /*#__PURE__*/ z(O, {
|
|
128
130
|
variant: "primary-danger",
|
|
129
131
|
onClick: f,
|
|
130
132
|
disabled: m,
|
|
131
133
|
"data-testid": "confirm-delete-rule-button",
|
|
132
|
-
children: a ? /*#__PURE__*/
|
|
134
|
+
children: a ? /*#__PURE__*/ z(K, { id: "EF2EU9" }) : /*#__PURE__*/ z(K, { id: "lN3xvy" })
|
|
133
135
|
})] })
|
|
134
136
|
}),
|
|
135
|
-
children: /*#__PURE__*/
|
|
136
|
-
o && /*#__PURE__*/
|
|
137
|
+
children: /*#__PURE__*/ B("div", { children: [
|
|
138
|
+
o && /*#__PURE__*/ z(t, {
|
|
137
139
|
dismissible: !1,
|
|
138
140
|
variant: "error",
|
|
139
141
|
className: "mt-4",
|
|
140
142
|
children: o
|
|
141
143
|
}),
|
|
142
|
-
/*#__PURE__*/
|
|
143
|
-
/*#__PURE__*/
|
|
144
|
+
/*#__PURE__*/ z(K, { id: "CMVP7y" }),
|
|
145
|
+
/*#__PURE__*/ B("div", {
|
|
144
146
|
className: "bg-theme-background-lvl-1 mt-4 mb-4 rounded p-4",
|
|
145
|
-
children: [/*#__PURE__*/
|
|
147
|
+
children: [/*#__PURE__*/ z("p", {
|
|
146
148
|
className: "mb-2 font-semibold",
|
|
147
|
-
children: /*#__PURE__*/
|
|
148
|
-
}), /*#__PURE__*/
|
|
149
|
+
children: /*#__PURE__*/ z(K, { id: "uly9ET" })
|
|
150
|
+
}), /*#__PURE__*/ B("ul", {
|
|
149
151
|
className: "list-inside list-disc space-y-1 text-sm",
|
|
150
152
|
children: [
|
|
151
|
-
/*#__PURE__*/
|
|
152
|
-
/*#__PURE__*/
|
|
153
|
+
/*#__PURE__*/ B("li", { children: [
|
|
154
|
+
/*#__PURE__*/ z(K, { id: "MRB7nI" }),
|
|
153
155
|
": ",
|
|
154
156
|
e.direction
|
|
155
157
|
] }),
|
|
156
|
-
e.description && /*#__PURE__*/
|
|
157
|
-
/*#__PURE__*/
|
|
158
|
+
e.description && /*#__PURE__*/ B("li", { children: [
|
|
159
|
+
/*#__PURE__*/ z(K, { id: "Nu4oKW" }),
|
|
158
160
|
": ",
|
|
159
161
|
e.description
|
|
160
162
|
] }),
|
|
161
|
-
/*#__PURE__*/
|
|
162
|
-
/*#__PURE__*/
|
|
163
|
+
/*#__PURE__*/ B("li", { children: [
|
|
164
|
+
/*#__PURE__*/ z(K, { id: "yp0UjB" }),
|
|
163
165
|
": ",
|
|
164
166
|
e.ethertype
|
|
165
167
|
] }),
|
|
166
|
-
e.protocol && /*#__PURE__*/
|
|
167
|
-
/*#__PURE__*/
|
|
168
|
+
e.protocol && /*#__PURE__*/ B("li", { children: [
|
|
169
|
+
/*#__PURE__*/ z(K, { id: "6+OdGi" }),
|
|
168
170
|
": ",
|
|
169
171
|
e.protocol
|
|
170
172
|
] }),
|
|
171
|
-
e.port_range_min !== null && e.port_range_max !== null && /*#__PURE__*/
|
|
172
|
-
/*#__PURE__*/
|
|
173
|
+
e.port_range_min !== null && e.port_range_max !== null && /*#__PURE__*/ B("li", { children: [
|
|
174
|
+
/*#__PURE__*/ z(K, { id: "tV/Ozb" }),
|
|
173
175
|
":",
|
|
174
176
|
" ",
|
|
175
177
|
e.port_range_min === e.port_range_max ? e.port_range_min : `${e.port_range_min}-${e.port_range_max}`
|
|
176
178
|
] }),
|
|
177
|
-
e.remote_ip_prefix && /*#__PURE__*/
|
|
178
|
-
/*#__PURE__*/
|
|
179
|
+
e.remote_ip_prefix && /*#__PURE__*/ B("li", { children: [
|
|
180
|
+
/*#__PURE__*/ z(K, { id: "WoSkGY" }),
|
|
179
181
|
": ",
|
|
180
182
|
e.remote_ip_prefix
|
|
181
183
|
] }),
|
|
182
|
-
e.remote_group_id && /*#__PURE__*/
|
|
183
|
-
/*#__PURE__*/
|
|
184
|
+
e.remote_group_id && /*#__PURE__*/ B("li", { children: [
|
|
185
|
+
/*#__PURE__*/ z(K, { id: "i9TIyi" }),
|
|
184
186
|
": ",
|
|
185
187
|
e.remote_group_id
|
|
186
188
|
] })
|
|
187
189
|
]
|
|
188
190
|
})]
|
|
189
191
|
}),
|
|
190
|
-
/*#__PURE__*/
|
|
192
|
+
/*#__PURE__*/ B("div", {
|
|
191
193
|
className: "mt-4",
|
|
192
|
-
children: [/*#__PURE__*/
|
|
194
|
+
children: [/*#__PURE__*/ z("p", {
|
|
193
195
|
className: "mb-2 text-sm",
|
|
194
|
-
children: /*#__PURE__*/
|
|
196
|
+
children: /*#__PURE__*/ z(K, {
|
|
195
197
|
id: "PHt+EV",
|
|
196
|
-
components: { 0: /*#__PURE__*/
|
|
198
|
+
components: { 0: /*#__PURE__*/ z("strong", {}) }
|
|
197
199
|
})
|
|
198
|
-
}), /*#__PURE__*/
|
|
200
|
+
}), /*#__PURE__*/ z(l, {
|
|
199
201
|
value: u,
|
|
200
202
|
onChange: (e) => d(e.target.value),
|
|
201
203
|
placeholder: s._({ id: "HNlEFZ" }),
|
|
@@ -209,10 +211,10 @@ function Y({ rule: e, open: n, onClose: r, onConfirm: i, isLoading: a, error: o
|
|
|
209
211
|
}
|
|
210
212
|
//#endregion
|
|
211
213
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/validation/validationHelpers.ts
|
|
212
|
-
function
|
|
214
|
+
function $(e) {
|
|
213
215
|
return e.includes(".") ? "IPv4" : e.includes(":") ? "IPv6" : null;
|
|
214
216
|
}
|
|
215
|
-
function
|
|
217
|
+
function re(e, t, n) {
|
|
216
218
|
if (e != null && isNaN(e) || t != null && isNaN(t)) return {
|
|
217
219
|
valid: !1,
|
|
218
220
|
error: "Port must be a valid number"
|
|
@@ -231,7 +233,7 @@ function X(e, t, n) {
|
|
|
231
233
|
error: "port_range_min must be less than or equal to port_range_max"
|
|
232
234
|
} : { valid: !0 };
|
|
233
235
|
}
|
|
234
|
-
function
|
|
236
|
+
function ie(e, t) {
|
|
235
237
|
return e != null && isNaN(e) ? {
|
|
236
238
|
valid: !1,
|
|
237
239
|
error: "ICMP type must be a valid number"
|
|
@@ -246,7 +248,7 @@ function te(e, t) {
|
|
|
246
248
|
error: "ICMP code must be between 0 and 255"
|
|
247
249
|
} : { valid: !0 };
|
|
248
250
|
}
|
|
249
|
-
function
|
|
251
|
+
function ae(e) {
|
|
250
252
|
let t = e.split("/");
|
|
251
253
|
if (t.length !== 2) return !1;
|
|
252
254
|
let [n, r] = t;
|
|
@@ -275,61 +277,61 @@ function ne(e) {
|
|
|
275
277
|
}
|
|
276
278
|
//#endregion
|
|
277
279
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/constants.ts
|
|
278
|
-
var
|
|
279
|
-
ruleType:
|
|
280
|
-
direction:
|
|
281
|
-
ethertype:
|
|
282
|
-
description:
|
|
283
|
-
protocol:
|
|
284
|
-
portFrom:
|
|
285
|
-
portTo:
|
|
286
|
-
icmpType:
|
|
287
|
-
icmpCode:
|
|
288
|
-
remoteSourceType:
|
|
289
|
-
remoteCidr:
|
|
290
|
-
remoteSecurityGroupId:
|
|
280
|
+
var oe = "0.0.0.0/0", se = "::/0", ce = "other-protocol", le = J.object({
|
|
281
|
+
ruleType: J.string().min(1, "Rule type is required"),
|
|
282
|
+
direction: J.enum(["ingress", "egress"]),
|
|
283
|
+
ethertype: J.enum(["IPv4", "IPv6"]),
|
|
284
|
+
description: J.string(),
|
|
285
|
+
protocol: J.string().nullable(),
|
|
286
|
+
portFrom: J.string(),
|
|
287
|
+
portTo: J.string(),
|
|
288
|
+
icmpType: J.string(),
|
|
289
|
+
icmpCode: J.string(),
|
|
290
|
+
remoteSourceType: J.enum(["cidr", "security_group"]),
|
|
291
|
+
remoteCidr: J.string(),
|
|
292
|
+
remoteSecurityGroupId: J.string()
|
|
291
293
|
}).superRefine((e, t) => {
|
|
292
|
-
let n = e.protocol === "tcp" || e.protocol === "udp", r = e.protocol === "icmp" || e.protocol === "ipv6-icmp", i = e.ruleType ===
|
|
294
|
+
let n = e.protocol === "tcp" || e.protocol === "udp", r = e.protocol === "icmp" || e.protocol === "ipv6-icmp", i = e.ruleType === ce, a = n && ["custom-tcp", "custom-udp"].includes(e.ruleType);
|
|
293
295
|
if (i && !e.protocol && t.addIssue({
|
|
294
|
-
code:
|
|
296
|
+
code: J.ZodIssueCode.custom,
|
|
295
297
|
message: "Protocol is required",
|
|
296
298
|
path: ["protocol"]
|
|
297
299
|
}), a) if (!e.portFrom) t.addIssue({
|
|
298
|
-
code:
|
|
300
|
+
code: J.ZodIssueCode.custom,
|
|
299
301
|
message: "Port (from) is required",
|
|
300
302
|
path: ["portFrom"]
|
|
301
303
|
});
|
|
302
304
|
else {
|
|
303
305
|
let n = parseInt(e.portFrom, 10);
|
|
304
306
|
if (isNaN(n)) t.addIssue({
|
|
305
|
-
code:
|
|
307
|
+
code: J.ZodIssueCode.custom,
|
|
306
308
|
message: "Port must be a valid number",
|
|
307
309
|
path: ["portFrom"]
|
|
308
310
|
});
|
|
309
311
|
else if (e.portTo) {
|
|
310
312
|
let r = parseInt(e.portTo, 10);
|
|
311
313
|
if (isNaN(r)) t.addIssue({
|
|
312
|
-
code:
|
|
314
|
+
code: J.ZodIssueCode.custom,
|
|
313
315
|
message: "Port must be a valid number",
|
|
314
316
|
path: ["portTo"]
|
|
315
317
|
});
|
|
316
318
|
else if (n >= r) t.addIssue({
|
|
317
|
-
code:
|
|
319
|
+
code: J.ZodIssueCode.custom,
|
|
318
320
|
message: "\"Port (from)\" must be less than \"Port (to)\"",
|
|
319
321
|
path: ["portFrom"]
|
|
320
322
|
});
|
|
321
323
|
else {
|
|
322
|
-
let i =
|
|
324
|
+
let i = re(n, r, e.protocol);
|
|
323
325
|
i.valid || t.addIssue({
|
|
324
|
-
code:
|
|
326
|
+
code: J.ZodIssueCode.custom,
|
|
325
327
|
message: i.error || "Invalid port range",
|
|
326
328
|
path: ["portFrom"]
|
|
327
329
|
});
|
|
328
330
|
}
|
|
329
331
|
} else {
|
|
330
|
-
let r =
|
|
332
|
+
let r = re(n, n, e.protocol);
|
|
331
333
|
r.valid || t.addIssue({
|
|
332
|
-
code:
|
|
334
|
+
code: J.ZodIssueCode.custom,
|
|
333
335
|
message: r.error || "Invalid port",
|
|
334
336
|
path: ["portFrom"]
|
|
335
337
|
});
|
|
@@ -338,44 +340,44 @@ var Z = "0.0.0.0/0", re = "::/0", ie = "other-protocol", ae = U.object({
|
|
|
338
340
|
if (r) {
|
|
339
341
|
let n = e.icmpType ? parseInt(e.icmpType, 10) : null, r = e.icmpCode ? parseInt(e.icmpCode, 10) : null;
|
|
340
342
|
if (e.icmpType && isNaN(n) && t.addIssue({
|
|
341
|
-
code:
|
|
343
|
+
code: J.ZodIssueCode.custom,
|
|
342
344
|
message: "ICMP type must be a valid number",
|
|
343
345
|
path: ["icmpType"]
|
|
344
346
|
}), e.icmpCode && isNaN(r) && t.addIssue({
|
|
345
|
-
code:
|
|
347
|
+
code: J.ZodIssueCode.custom,
|
|
346
348
|
message: "ICMP code must be a valid number",
|
|
347
349
|
path: ["icmpCode"]
|
|
348
350
|
}), e.icmpCode && !e.icmpType && t.addIssue({
|
|
349
|
-
code:
|
|
351
|
+
code: J.ZodIssueCode.custom,
|
|
350
352
|
message: "ICMP type is required when ICMP code is specified",
|
|
351
353
|
path: ["icmpType"]
|
|
352
354
|
}), n !== null || r !== null) {
|
|
353
|
-
let e =
|
|
355
|
+
let e = ie(n, r);
|
|
354
356
|
e.valid || (e.error?.includes("type") && t.addIssue({
|
|
355
|
-
code:
|
|
357
|
+
code: J.ZodIssueCode.custom,
|
|
356
358
|
message: "ICMP type must be between 0 and 255",
|
|
357
359
|
path: ["icmpType"]
|
|
358
360
|
}), e.error?.includes("code") && t.addIssue({
|
|
359
|
-
code:
|
|
361
|
+
code: J.ZodIssueCode.custom,
|
|
360
362
|
message: "ICMP code must be between 0 and 255",
|
|
361
363
|
path: ["icmpCode"]
|
|
362
364
|
}));
|
|
363
365
|
}
|
|
364
366
|
}
|
|
365
|
-
if (e.remoteSourceType === "cidr" && e.remoteCidr) if (!
|
|
366
|
-
code:
|
|
367
|
+
if (e.remoteSourceType === "cidr" && e.remoteCidr) if (!ae(e.remoteCidr)) t.addIssue({
|
|
368
|
+
code: J.ZodIssueCode.custom,
|
|
367
369
|
message: "Invalid CIDR format. Examples: 0.0.0.0/0 (IPv4) or ::/0 (IPv6)",
|
|
368
370
|
path: ["remoteCidr"]
|
|
369
371
|
});
|
|
370
372
|
else {
|
|
371
|
-
let n =
|
|
373
|
+
let n = $(e.remoteCidr);
|
|
372
374
|
n && n !== e.ethertype && t.addIssue({
|
|
373
|
-
code:
|
|
375
|
+
code: J.ZodIssueCode.custom,
|
|
374
376
|
message: `CIDR family (${n}) must match Ethertype (${e.ethertype})`,
|
|
375
377
|
path: ["remoteCidr"]
|
|
376
378
|
});
|
|
377
379
|
}
|
|
378
|
-
}),
|
|
380
|
+
}), ue = {
|
|
379
381
|
ruleType: "",
|
|
380
382
|
direction: "ingress",
|
|
381
383
|
ethertype: "IPv4",
|
|
@@ -386,9 +388,9 @@ var Z = "0.0.0.0/0", re = "::/0", ie = "other-protocol", ae = U.object({
|
|
|
386
388
|
icmpType: "",
|
|
387
389
|
icmpCode: "",
|
|
388
390
|
remoteSourceType: "cidr",
|
|
389
|
-
remoteCidr:
|
|
391
|
+
remoteCidr: oe,
|
|
390
392
|
remoteSecurityGroupId: ""
|
|
391
|
-
},
|
|
393
|
+
}, de = [
|
|
392
394
|
{
|
|
393
395
|
value: "",
|
|
394
396
|
label: "",
|
|
@@ -546,14 +548,14 @@ var Z = "0.0.0.0/0", re = "::/0", ie = "other-protocol", ae = U.object({
|
|
|
546
548
|
];
|
|
547
549
|
//#endregion
|
|
548
550
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/RuleTypeSection.tsx
|
|
549
|
-
function
|
|
550
|
-
let { i18n: n, _: r } =
|
|
551
|
-
return /*#__PURE__*/
|
|
551
|
+
function fe({ form: e, disabled: t = !1 }) {
|
|
552
|
+
let { i18n: n, _: r } = q();
|
|
553
|
+
return /*#__PURE__*/ z(e.Field, {
|
|
552
554
|
name: "ruleType",
|
|
553
555
|
mode: "value",
|
|
554
|
-
children: (r) => /*#__PURE__*/
|
|
556
|
+
children: (r) => /*#__PURE__*/ z(p, {
|
|
555
557
|
className: "mb-6",
|
|
556
|
-
children: /*#__PURE__*/
|
|
558
|
+
children: /*#__PURE__*/ z(h, {
|
|
557
559
|
id: "ruleType",
|
|
558
560
|
label: n._({ id: "YuGQWb" }),
|
|
559
561
|
value: r.state.value,
|
|
@@ -563,14 +565,14 @@ function se({ form: e, disabled: t = !1 }) {
|
|
|
563
565
|
e.setFieldValue("protocol", null), e.setFieldValue("portFrom", ""), e.setFieldValue("portTo", ""), e.setFieldValue("icmpType", ""), e.setFieldValue("icmpCode", "");
|
|
564
566
|
return;
|
|
565
567
|
}
|
|
566
|
-
let i =
|
|
568
|
+
let i = de.find((e) => e.value === n);
|
|
567
569
|
i && (e.setFieldValue("protocol", i.protocol), (i.protocol === "tcp" || i.protocol === "udp") && i.portRangeMin !== null && i.portRangeMax !== null ? (e.setFieldValue("portFrom", String(i.portRangeMin)), e.setFieldValue("portTo", String(i.portRangeMax))) : (e.setFieldValue("portFrom", ""), e.setFieldValue("portTo", "")), i.protocol !== "icmp" && i.protocol !== "ipv6-icmp" && (e.setFieldValue("icmpType", ""), e.setFieldValue("icmpCode", "")));
|
|
568
570
|
},
|
|
569
571
|
disabled: t,
|
|
570
|
-
children:
|
|
572
|
+
children: de.map((e) => e.value === "" ? /*#__PURE__*/ z(y, {
|
|
571
573
|
value: e.value,
|
|
572
574
|
label: n._({ id: "eh/k36" })
|
|
573
|
-
}, e.value) : /*#__PURE__*/
|
|
575
|
+
}, e.value) : /*#__PURE__*/ z(y, {
|
|
574
576
|
value: e.value,
|
|
575
577
|
label: e.label
|
|
576
578
|
}, e.value))
|
|
@@ -580,23 +582,23 @@ function se({ form: e, disabled: t = !1 }) {
|
|
|
580
582
|
}
|
|
581
583
|
//#endregion
|
|
582
584
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/DirectionEthertypeSection.tsx
|
|
583
|
-
function
|
|
584
|
-
let { i18n: n, _: r } =
|
|
585
|
-
return /*#__PURE__*/
|
|
585
|
+
function pe({ form: e, disabled: t = !1 }) {
|
|
586
|
+
let { i18n: n, _: r } = q();
|
|
587
|
+
return /*#__PURE__*/ z(e.Field, {
|
|
586
588
|
name: "direction",
|
|
587
|
-
children: (e) => /*#__PURE__*/
|
|
589
|
+
children: (e) => /*#__PURE__*/ z(p, { children: /*#__PURE__*/ z(v, {
|
|
588
590
|
name: "direction",
|
|
589
591
|
label: n._({ id: "MRB7nI" }),
|
|
590
592
|
selected: e.state.value,
|
|
591
593
|
onChange: (t) => e.handleChange(String(t)),
|
|
592
594
|
required: !0,
|
|
593
595
|
disabled: t,
|
|
594
|
-
children: /*#__PURE__*/
|
|
596
|
+
children: /*#__PURE__*/ B("div", {
|
|
595
597
|
className: "flex gap-4",
|
|
596
|
-
children: [/*#__PURE__*/
|
|
598
|
+
children: [/*#__PURE__*/ z(C, {
|
|
597
599
|
value: "ingress",
|
|
598
600
|
label: n._({ id: "fzfAAa" })
|
|
599
|
-
}), /*#__PURE__*/
|
|
601
|
+
}), /*#__PURE__*/ z(C, {
|
|
600
602
|
value: "egress",
|
|
601
603
|
label: n._({ id: "nETBrc" })
|
|
602
604
|
})]
|
|
@@ -604,23 +606,23 @@ function ce({ form: e, disabled: t = !1 }) {
|
|
|
604
606
|
}) })
|
|
605
607
|
});
|
|
606
608
|
}
|
|
607
|
-
function
|
|
608
|
-
let { i18n: n, _: r } =
|
|
609
|
-
return /*#__PURE__*/
|
|
609
|
+
function me({ form: e, disabled: t = !1 }) {
|
|
610
|
+
let { i18n: n, _: r } = q();
|
|
611
|
+
return /*#__PURE__*/ z(e.Field, {
|
|
610
612
|
name: "ethertype",
|
|
611
|
-
children: (e) => /*#__PURE__*/
|
|
613
|
+
children: (e) => /*#__PURE__*/ z(p, { children: /*#__PURE__*/ z(v, {
|
|
612
614
|
name: "ethertype",
|
|
613
615
|
label: n._({ id: "16085O" }),
|
|
614
616
|
selected: e.state.value,
|
|
615
617
|
onChange: (t) => e.handleChange(String(t)),
|
|
616
618
|
required: !0,
|
|
617
619
|
disabled: t,
|
|
618
|
-
children: /*#__PURE__*/
|
|
620
|
+
children: /*#__PURE__*/ B("div", {
|
|
619
621
|
className: "flex gap-4",
|
|
620
|
-
children: [/*#__PURE__*/
|
|
622
|
+
children: [/*#__PURE__*/ z(C, {
|
|
621
623
|
value: "IPv4",
|
|
622
624
|
label: "IPv4"
|
|
623
|
-
}), /*#__PURE__*/
|
|
625
|
+
}), /*#__PURE__*/ z(C, {
|
|
624
626
|
value: "IPv6",
|
|
625
627
|
label: "IPv6"
|
|
626
628
|
})]
|
|
@@ -630,13 +632,13 @@ function le({ form: e, disabled: t = !1 }) {
|
|
|
630
632
|
}
|
|
631
633
|
//#endregion
|
|
632
634
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/ProtocolSection.tsx
|
|
633
|
-
function
|
|
634
|
-
let { i18n: n, _: r } =
|
|
635
|
-
return /*#__PURE__*/
|
|
635
|
+
function he({ form: e, disabled: t = !1 }) {
|
|
636
|
+
let { i18n: n, _: r } = q();
|
|
637
|
+
return /*#__PURE__*/ z(e.Field, {
|
|
636
638
|
name: "protocol",
|
|
637
|
-
children: (e) => /*#__PURE__*/
|
|
639
|
+
children: (e) => /*#__PURE__*/ z(p, {
|
|
638
640
|
className: "mb-6",
|
|
639
|
-
children: /*#__PURE__*/
|
|
641
|
+
children: /*#__PURE__*/ z(l, {
|
|
640
642
|
id: "protocol",
|
|
641
643
|
name: "protocol",
|
|
642
644
|
label: n._({ id: "6+OdGi" }),
|
|
@@ -651,19 +653,19 @@ function ue({ form: e, disabled: t = !1 }) {
|
|
|
651
653
|
}
|
|
652
654
|
//#endregion
|
|
653
655
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/PortRangeSection.tsx
|
|
654
|
-
function
|
|
655
|
-
let { i18n: n, _: r } =
|
|
656
|
-
return /*#__PURE__*/
|
|
656
|
+
function ge({ form: e, disabled: t = !1 }) {
|
|
657
|
+
let { i18n: n, _: r } = q(), i = X(e.store, (e) => e.values.portFrom), a = X(e.store, (e) => e.fieldMeta.portFrom?.errors[0]?.message), o = X(e.store, (e) => e.fieldMeta.portTo?.errors[0]?.message), s = t || !i || i.trim() === "";
|
|
658
|
+
return /*#__PURE__*/ B(p, {
|
|
657
659
|
className: "mb-6",
|
|
658
660
|
children: [
|
|
659
|
-
/*#__PURE__*/
|
|
661
|
+
/*#__PURE__*/ B("div", {
|
|
660
662
|
className: "flex items-center gap-4",
|
|
661
663
|
children: [
|
|
662
|
-
/*#__PURE__*/
|
|
664
|
+
/*#__PURE__*/ z(e.Field, {
|
|
663
665
|
name: "portFrom",
|
|
664
|
-
children: (r) => /*#__PURE__*/
|
|
666
|
+
children: (r) => /*#__PURE__*/ z("div", {
|
|
665
667
|
className: "flex-1",
|
|
666
|
-
children: /*#__PURE__*/
|
|
668
|
+
children: /*#__PURE__*/ z(l, {
|
|
667
669
|
id: "portFrom",
|
|
668
670
|
name: "portFrom",
|
|
669
671
|
label: n._({ id: "LMdsuJ" }),
|
|
@@ -678,15 +680,15 @@ function de({ form: e, disabled: t = !1 }) {
|
|
|
678
680
|
})
|
|
679
681
|
})
|
|
680
682
|
}),
|
|
681
|
-
/*#__PURE__*/
|
|
683
|
+
/*#__PURE__*/ z("div", {
|
|
682
684
|
className: "text-theme-secondary flex items-center justify-center",
|
|
683
685
|
children: "—"
|
|
684
686
|
}),
|
|
685
|
-
/*#__PURE__*/
|
|
687
|
+
/*#__PURE__*/ z(e.Field, {
|
|
686
688
|
name: "portTo",
|
|
687
|
-
children: (t) => /*#__PURE__*/
|
|
689
|
+
children: (t) => /*#__PURE__*/ z("div", {
|
|
688
690
|
className: "flex-1",
|
|
689
|
-
children: /*#__PURE__*/
|
|
691
|
+
children: /*#__PURE__*/ z(l, {
|
|
690
692
|
id: "portTo",
|
|
691
693
|
name: "portTo",
|
|
692
694
|
label: n._({ id: "a12lSo" }),
|
|
@@ -702,11 +704,11 @@ function de({ form: e, disabled: t = !1 }) {
|
|
|
702
704
|
})
|
|
703
705
|
]
|
|
704
706
|
}),
|
|
705
|
-
(a || o) && /*#__PURE__*/
|
|
707
|
+
(a || o) && /*#__PURE__*/ B("div", {
|
|
706
708
|
className: "text-theme-error mt-2 text-sm",
|
|
707
|
-
children: [a && /*#__PURE__*/
|
|
709
|
+
children: [a && /*#__PURE__*/ z("div", { children: a }), o && /*#__PURE__*/ z("div", { children: o })]
|
|
708
710
|
}),
|
|
709
|
-
/*#__PURE__*/
|
|
711
|
+
/*#__PURE__*/ z("p", {
|
|
710
712
|
className: "mt-2 text-sm",
|
|
711
713
|
children: n._({ id: "QAUa4B" })
|
|
712
714
|
})
|
|
@@ -715,17 +717,17 @@ function de({ form: e, disabled: t = !1 }) {
|
|
|
715
717
|
}
|
|
716
718
|
//#endregion
|
|
717
719
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/IcmpSection.tsx
|
|
718
|
-
function
|
|
719
|
-
let { i18n: n, _: r } =
|
|
720
|
-
return /*#__PURE__*/
|
|
720
|
+
function _e({ form: e, disabled: t = !1 }) {
|
|
721
|
+
let { i18n: n, _: r } = q();
|
|
722
|
+
return /*#__PURE__*/ z(p, {
|
|
721
723
|
className: "mb-6",
|
|
722
|
-
children: /*#__PURE__*/
|
|
724
|
+
children: /*#__PURE__*/ B("div", {
|
|
723
725
|
className: "flex w-full gap-4",
|
|
724
|
-
children: [/*#__PURE__*/
|
|
726
|
+
children: [/*#__PURE__*/ z(e.Field, {
|
|
725
727
|
name: "icmpType",
|
|
726
|
-
children: (e) => /*#__PURE__*/
|
|
728
|
+
children: (e) => /*#__PURE__*/ z("div", {
|
|
727
729
|
className: "flex-1",
|
|
728
|
-
children: /*#__PURE__*/
|
|
730
|
+
children: /*#__PURE__*/ z(l, {
|
|
729
731
|
id: "icmpType",
|
|
730
732
|
name: "icmpType",
|
|
731
733
|
label: n._({ id: "yPWFWy" }),
|
|
@@ -736,11 +738,11 @@ function fe({ form: e, disabled: t = !1 }) {
|
|
|
736
738
|
disabled: t
|
|
737
739
|
})
|
|
738
740
|
})
|
|
739
|
-
}), /*#__PURE__*/
|
|
741
|
+
}), /*#__PURE__*/ z(e.Field, {
|
|
740
742
|
name: "icmpCode",
|
|
741
|
-
children: (e) => /*#__PURE__*/
|
|
743
|
+
children: (e) => /*#__PURE__*/ z("div", {
|
|
742
744
|
className: "flex-1",
|
|
743
|
-
children: /*#__PURE__*/
|
|
745
|
+
children: /*#__PURE__*/ z(l, {
|
|
744
746
|
id: "icmpCode",
|
|
745
747
|
name: "icmpCode",
|
|
746
748
|
label: n._({ id: "76RKuS" }),
|
|
@@ -757,15 +759,15 @@ function fe({ form: e, disabled: t = !1 }) {
|
|
|
757
759
|
}
|
|
758
760
|
//#endregion
|
|
759
761
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/RemoteSourceSection.tsx
|
|
760
|
-
function
|
|
761
|
-
let { i18n: r, _: i } =
|
|
762
|
-
return /*#__PURE__*/
|
|
763
|
-
/*#__PURE__*/
|
|
762
|
+
function ve({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
763
|
+
let { i18n: r, _: i } = q();
|
|
764
|
+
return /*#__PURE__*/ B(R, { children: [
|
|
765
|
+
/*#__PURE__*/ z(e.Field, {
|
|
764
766
|
name: "remoteSourceType",
|
|
765
767
|
mode: "value",
|
|
766
|
-
children: (n) => /*#__PURE__*/
|
|
768
|
+
children: (n) => /*#__PURE__*/ z(p, {
|
|
767
769
|
className: "mb-1",
|
|
768
|
-
children: /*#__PURE__*/
|
|
770
|
+
children: /*#__PURE__*/ z(v, {
|
|
769
771
|
name: "remoteSourceType",
|
|
770
772
|
label: r._({ id: "I5kZVK" }),
|
|
771
773
|
selected: n.state.value,
|
|
@@ -774,12 +776,12 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
|
774
776
|
n.handleChange(r), r !== "security_group" && e.setFieldValue("ethertype", "IPv4");
|
|
775
777
|
},
|
|
776
778
|
disabled: t,
|
|
777
|
-
children: /*#__PURE__*/
|
|
779
|
+
children: /*#__PURE__*/ B("div", {
|
|
778
780
|
className: "flex gap-4",
|
|
779
|
-
children: [/*#__PURE__*/
|
|
781
|
+
children: [/*#__PURE__*/ z(C, {
|
|
780
782
|
value: "cidr",
|
|
781
783
|
label: r._({ id: "4uXhtt" })
|
|
782
|
-
}), /*#__PURE__*/
|
|
784
|
+
}), /*#__PURE__*/ z(C, {
|
|
783
785
|
value: "security_group",
|
|
784
786
|
label: r._({ id: "bwhBhT" })
|
|
785
787
|
})]
|
|
@@ -787,45 +789,45 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
|
787
789
|
})
|
|
788
790
|
})
|
|
789
791
|
}),
|
|
790
|
-
/*#__PURE__*/
|
|
792
|
+
/*#__PURE__*/ z(e.Field, {
|
|
791
793
|
name: "remoteSourceType",
|
|
792
|
-
children: (n) => n.state.value === "cidr" ? /*#__PURE__*/
|
|
794
|
+
children: (n) => n.state.value === "cidr" ? /*#__PURE__*/ z(e.Field, {
|
|
793
795
|
name: "remoteCidr",
|
|
794
|
-
children: (n) => /*#__PURE__*/
|
|
796
|
+
children: (n) => /*#__PURE__*/ z(e.Field, {
|
|
795
797
|
name: "ethertype",
|
|
796
|
-
children: (e) => /*#__PURE__*/
|
|
798
|
+
children: (e) => /*#__PURE__*/ z(p, {
|
|
797
799
|
className: "mb-6",
|
|
798
|
-
children: /*#__PURE__*/
|
|
800
|
+
children: /*#__PURE__*/ z(l, {
|
|
799
801
|
id: "remoteCidr",
|
|
800
802
|
name: "remoteCidr",
|
|
801
803
|
label: r._({ id: "vmYyLY" }),
|
|
802
804
|
value: n.state.value,
|
|
803
805
|
onChange: (e) => n.handleChange(e.target.value),
|
|
804
806
|
errortext: n.state.meta.errors[0]?.message,
|
|
805
|
-
placeholder: e.state.value === "IPv4" ?
|
|
807
|
+
placeholder: e.state.value === "IPv4" ? oe : se,
|
|
806
808
|
disabled: t
|
|
807
809
|
})
|
|
808
810
|
})
|
|
809
811
|
})
|
|
810
812
|
}) : null
|
|
811
813
|
}),
|
|
812
|
-
/*#__PURE__*/
|
|
814
|
+
/*#__PURE__*/ z(e.Field, {
|
|
813
815
|
name: "remoteSourceType",
|
|
814
|
-
children: (i) => i.state.value === "security_group" ? /*#__PURE__*/
|
|
816
|
+
children: (i) => i.state.value === "security_group" ? /*#__PURE__*/ z(e.Field, {
|
|
815
817
|
name: "remoteSecurityGroupId",
|
|
816
|
-
children: (e) => /*#__PURE__*/
|
|
818
|
+
children: (e) => /*#__PURE__*/ z(p, {
|
|
817
819
|
className: "mb-6",
|
|
818
|
-
children: /*#__PURE__*/
|
|
820
|
+
children: /*#__PURE__*/ B(h, {
|
|
819
821
|
id: "remoteSecurityGroupId",
|
|
820
822
|
label: r._({ id: "i9TIyi" }),
|
|
821
823
|
value: e.state.value,
|
|
822
824
|
onChange: (t) => e.handleChange(String(t)),
|
|
823
825
|
errortext: e.state.meta.errors[0]?.message,
|
|
824
826
|
disabled: t,
|
|
825
|
-
children: [/*#__PURE__*/
|
|
827
|
+
children: [/*#__PURE__*/ z(y, {
|
|
826
828
|
value: "",
|
|
827
829
|
label: r._({ id: "ZvIpwi" })
|
|
828
|
-
}), n.map((e) => /*#__PURE__*/
|
|
830
|
+
}), n.map((e) => /*#__PURE__*/ z(y, {
|
|
829
831
|
value: e.id,
|
|
830
832
|
label: e.name || e.id
|
|
831
833
|
}, e.id))]
|
|
@@ -837,13 +839,13 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
|
837
839
|
}
|
|
838
840
|
//#endregion
|
|
839
841
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/DescriptionSection.tsx
|
|
840
|
-
function
|
|
841
|
-
let { i18n: n, _: r } =
|
|
842
|
-
return /*#__PURE__*/
|
|
842
|
+
function ye({ form: e, disabled: t = !1 }) {
|
|
843
|
+
let { i18n: n, _: r } = q();
|
|
844
|
+
return /*#__PURE__*/ z(e.Field, {
|
|
843
845
|
name: "description",
|
|
844
|
-
children: (e) => /*#__PURE__*/
|
|
846
|
+
children: (e) => /*#__PURE__*/ z(p, {
|
|
845
847
|
className: "mb-0",
|
|
846
|
-
children: /*#__PURE__*/
|
|
848
|
+
children: /*#__PURE__*/ z(g, {
|
|
847
849
|
id: "description",
|
|
848
850
|
name: "description",
|
|
849
851
|
label: n._({ id: "Nu4oKW" }),
|
|
@@ -858,10 +860,10 @@ function me({ form: e, disabled: t = !1 }) {
|
|
|
858
860
|
}
|
|
859
861
|
//#endregion
|
|
860
862
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/AddRuleModal.tsx
|
|
861
|
-
var
|
|
862
|
-
let { i18n: u, _: d } =
|
|
863
|
-
defaultValues:
|
|
864
|
-
validators: { onSubmit:
|
|
863
|
+
var be = ({ securityGroupId: e, open: n, onClose: r, onCreate: o, isLoading: s = !1, error: c = null, availableSecurityGroups: l = [] }) => {
|
|
864
|
+
let { i18n: u, _: d } = q(), f = Y({
|
|
865
|
+
defaultValues: ue,
|
|
866
|
+
validators: { onSubmit: le },
|
|
865
867
|
onSubmit: async ({ value: t }) => {
|
|
866
868
|
if (s) return;
|
|
867
869
|
let n = {
|
|
@@ -883,84 +885,84 @@ var he = ({ securityGroupId: e, open: n, onClose: r, onCreate: o, isLoading: s =
|
|
|
883
885
|
}), p = () => {
|
|
884
886
|
f.reset(), r();
|
|
885
887
|
};
|
|
886
|
-
return /*#__PURE__*/
|
|
888
|
+
return /*#__PURE__*/ B(w, {
|
|
887
889
|
open: n,
|
|
888
890
|
onCancel: p,
|
|
889
891
|
size: "large",
|
|
890
892
|
title: u._({ id: "b2BLBa" }),
|
|
891
|
-
modalFooter: /*#__PURE__*/
|
|
893
|
+
modalFooter: /*#__PURE__*/ z(_, {
|
|
892
894
|
className: "flex justify-end",
|
|
893
|
-
children: /*#__PURE__*/
|
|
895
|
+
children: /*#__PURE__*/ z(f.Subscribe, { children: (e) => {
|
|
894
896
|
let t = !!e.values.ruleType;
|
|
895
|
-
return /*#__PURE__*/
|
|
897
|
+
return /*#__PURE__*/ B(D, { children: [/*#__PURE__*/ z(O, {
|
|
896
898
|
variant: "default",
|
|
897
899
|
onClick: p,
|
|
898
900
|
disabled: s || e.isSubmitting,
|
|
899
|
-
children: /*#__PURE__*/
|
|
900
|
-
}), /*#__PURE__*/
|
|
901
|
+
children: /*#__PURE__*/ z(K, { id: "dEgA5A" })
|
|
902
|
+
}), /*#__PURE__*/ z(O, {
|
|
901
903
|
variant: "primary",
|
|
902
904
|
type: "button",
|
|
903
905
|
onClick: () => f.handleSubmit(),
|
|
904
906
|
disabled: s || e.isSubmitting || !t,
|
|
905
907
|
"data-testid": "add-rule-button",
|
|
906
|
-
children: e.isSubmitting || s ? /*#__PURE__*/
|
|
908
|
+
children: e.isSubmitting || s ? /*#__PURE__*/ z(a, { size: "small" }) : /*#__PURE__*/ z(K, { id: "bmQLn5" })
|
|
907
909
|
})] });
|
|
908
910
|
} })
|
|
909
911
|
}),
|
|
910
912
|
children: [
|
|
911
|
-
c && /*#__PURE__*/
|
|
913
|
+
c && /*#__PURE__*/ z(t, {
|
|
912
914
|
dismissible: !1,
|
|
913
915
|
variant: "error",
|
|
914
916
|
className: "mb-4",
|
|
915
917
|
children: c
|
|
916
918
|
}),
|
|
917
|
-
s && /*#__PURE__*/
|
|
919
|
+
s && /*#__PURE__*/ B("div", {
|
|
918
920
|
className: "mb-4 flex items-center justify-center gap-2",
|
|
919
|
-
children: [/*#__PURE__*/
|
|
921
|
+
children: [/*#__PURE__*/ z(a, { variant: "primary" }), /*#__PURE__*/ z("span", {
|
|
920
922
|
className: "text-theme-secondary text-sm",
|
|
921
|
-
children: /*#__PURE__*/
|
|
923
|
+
children: /*#__PURE__*/ z(K, { id: "gU7JFm" })
|
|
922
924
|
})]
|
|
923
925
|
}),
|
|
924
|
-
/*#__PURE__*/
|
|
926
|
+
/*#__PURE__*/ z(S, {
|
|
925
927
|
className: "mb-6",
|
|
926
928
|
onSubmit: (e) => {
|
|
927
929
|
e.preventDefault(), f.handleSubmit();
|
|
928
930
|
},
|
|
929
|
-
children: /*#__PURE__*/
|
|
931
|
+
children: /*#__PURE__*/ B(i, {
|
|
930
932
|
className: "mb-6",
|
|
931
|
-
children: [/*#__PURE__*/
|
|
933
|
+
children: [/*#__PURE__*/ z(fe, {
|
|
932
934
|
form: f,
|
|
933
935
|
disabled: s
|
|
934
|
-
}), /*#__PURE__*/
|
|
936
|
+
}), /*#__PURE__*/ z(f.Subscribe, { children: (e) => {
|
|
935
937
|
if (!e.values.ruleType) return null;
|
|
936
938
|
let t = (e.values.protocol === "tcp" || e.values.protocol === "udp") && ["custom-tcp", "custom-udp"].includes(e.values.ruleType), n = e.values.protocol === "icmp" || e.values.protocol === "ipv6-icmp";
|
|
937
|
-
return /*#__PURE__*/
|
|
938
|
-
/*#__PURE__*/
|
|
939
|
+
return /*#__PURE__*/ B(R, { children: [
|
|
940
|
+
/*#__PURE__*/ z(pe, {
|
|
939
941
|
form: f,
|
|
940
942
|
disabled: s
|
|
941
943
|
}),
|
|
942
|
-
e.values.ruleType === "other-protocol" && /*#__PURE__*/
|
|
944
|
+
e.values.ruleType === "other-protocol" && /*#__PURE__*/ z(he, {
|
|
943
945
|
form: f,
|
|
944
946
|
disabled: s
|
|
945
947
|
}),
|
|
946
|
-
t && /*#__PURE__*/
|
|
948
|
+
t && /*#__PURE__*/ z(ge, {
|
|
947
949
|
form: f,
|
|
948
950
|
disabled: s
|
|
949
951
|
}),
|
|
950
|
-
n && /*#__PURE__*/
|
|
952
|
+
n && /*#__PURE__*/ z(_e, {
|
|
951
953
|
form: f,
|
|
952
954
|
disabled: s
|
|
953
955
|
}),
|
|
954
|
-
/*#__PURE__*/
|
|
956
|
+
/*#__PURE__*/ z(ve, {
|
|
955
957
|
form: f,
|
|
956
958
|
disabled: s,
|
|
957
959
|
availableSecurityGroups: l
|
|
958
960
|
}),
|
|
959
|
-
e.values.remoteSourceType === "security_group" && /*#__PURE__*/
|
|
961
|
+
e.values.remoteSourceType === "security_group" && /*#__PURE__*/ z(me, {
|
|
960
962
|
form: f,
|
|
961
963
|
disabled: s
|
|
962
964
|
}),
|
|
963
|
-
/*#__PURE__*/
|
|
965
|
+
/*#__PURE__*/ z(ye, {
|
|
964
966
|
form: f,
|
|
965
967
|
disabled: s
|
|
966
968
|
})
|
|
@@ -973,22 +975,24 @@ var he = ({ securityGroupId: e, open: n, onClose: r, onCreate: o, isLoading: s =
|
|
|
973
975
|
};
|
|
974
976
|
//#endregion
|
|
975
977
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupRulesTable.tsx
|
|
976
|
-
function
|
|
977
|
-
let { i18n:
|
|
978
|
-
|
|
979
|
-
|
|
978
|
+
function xe({ rules: t, totalRulesCount: i, onDeleteRule: a, isDeletingRule: s, deleteError: l, searchTerm: u = "", onSearchChange: d, sortSettings: p, onSortChange: h, filterSettings: g, onFilterChange: _, securityGroupId: v, onCreateRule: y, isCreatingRule: x = !1, createRuleError: S = null, availableSecurityGroups: C = [], canCreateRule: w, canDeleteRule: D }) {
|
|
979
|
+
let { i18n: k, _: A } = q(), [j, I] = W(null), [L, ee] = M(), [H, G] = W(u), J = U(void 0);
|
|
980
|
+
V(() => () => clearTimeout(J.current), []);
|
|
981
|
+
let Y = (e) => {
|
|
982
|
+
I(e);
|
|
983
|
+
}, X = (e) => {
|
|
980
984
|
a(e);
|
|
981
|
-
},
|
|
982
|
-
s ||
|
|
985
|
+
}, te = () => {
|
|
986
|
+
s || I(null);
|
|
983
987
|
};
|
|
984
|
-
|
|
985
|
-
!s && !l &&
|
|
988
|
+
V(() => {
|
|
989
|
+
!s && !l && I(null);
|
|
986
990
|
}, [s, l]);
|
|
987
|
-
let
|
|
991
|
+
let Z = (e) => {
|
|
988
992
|
if (e.protocol === "icmp" || e.protocol === "ipv6-icmp") {
|
|
989
993
|
if (e.port_range_min !== null && e.port_range_max !== null) {
|
|
990
994
|
let t = e.port_range_min, n = e.port_range_max;
|
|
991
|
-
return
|
|
995
|
+
return k._({
|
|
992
996
|
id: "0p+s6m",
|
|
993
997
|
values: {
|
|
994
998
|
typeValue: t,
|
|
@@ -996,91 +1000,161 @@ function ge({ rules: t, totalRulesCount: i, onDeleteRule: a, isDeletingRule: s,
|
|
|
996
1000
|
}
|
|
997
1001
|
});
|
|
998
1002
|
}
|
|
999
|
-
return
|
|
1003
|
+
return k._({ id: "eKC+EC" });
|
|
1000
1004
|
}
|
|
1001
|
-
return e.port_range_min === null || e.port_range_max === null ?
|
|
1002
|
-
};
|
|
1003
|
-
return /*#__PURE__*/
|
|
1004
|
-
/*#__PURE__*/
|
|
1005
|
+
return e.port_range_min === null || e.port_range_max === null ? k._({ id: "eKC+EC" }) : e.port_range_min === e.port_range_max ? String(e.port_range_min) : `${e.port_range_min}-${e.port_range_max}`;
|
|
1006
|
+
}, Q = t.length, $ = i;
|
|
1007
|
+
return /*#__PURE__*/ B(R, { children: [
|
|
1008
|
+
/*#__PURE__*/ B(E, {
|
|
1005
1009
|
direction: "vertical",
|
|
1006
1010
|
gap: "4",
|
|
1007
|
-
children: [
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
columns: S ? 5 : 6,
|
|
1025
|
-
className: "security-group-rules-table",
|
|
1026
|
-
children: [/*#__PURE__*/ I(n, { children: [
|
|
1027
|
-
/*#__PURE__*/ F(c, { children: T._({ id: "MRB7nI" }) }),
|
|
1028
|
-
/*#__PURE__*/ F(c, { children: T._({ id: "Nu4oKW" }) }),
|
|
1029
|
-
/*#__PURE__*/ F(c, { children: T._({ id: "yp0UjB" }) }),
|
|
1030
|
-
/*#__PURE__*/ F(c, { children: T._({ id: "6+OdGi" }) }),
|
|
1031
|
-
/*#__PURE__*/ F(c, { children: T._({ id: "6jAi8c" }) }),
|
|
1032
|
-
!S && /*#__PURE__*/ F(c, { children: T._({ id: "7L01XJ" }) })
|
|
1033
|
-
] }), t.map((t) => /*#__PURE__*/ I(n, {
|
|
1034
|
-
"data-testid": `rule-row-${t.id}`,
|
|
1035
|
-
children: [
|
|
1036
|
-
/*#__PURE__*/ F(r, { children: t.direction || T._({ id: "h47p9L" }) }),
|
|
1037
|
-
/*#__PURE__*/ F(r, { children: t.description || T._({ id: "h47p9L" }) }),
|
|
1038
|
-
/*#__PURE__*/ F(r, { children: t.ethertype }),
|
|
1039
|
-
/*#__PURE__*/ F(r, { children: t.protocol || T._({ id: "eKC+EC" }) }),
|
|
1040
|
-
/*#__PURE__*/ F(r, { children: W(t) }),
|
|
1041
|
-
!S && /*#__PURE__*/ F(r, {
|
|
1042
|
-
onClick: (e) => e.stopPropagation(),
|
|
1043
|
-
className: "items-end justify-end pr-0",
|
|
1044
|
-
children: /*#__PURE__*/ F(C, { children: /*#__PURE__*/ F(e, { children: /*#__PURE__*/ F(f, {
|
|
1045
|
-
label: T._({ id: "cnGeoo" }),
|
|
1046
|
-
onClick: () => R(t)
|
|
1047
|
-
}) }) })
|
|
1011
|
+
children: [
|
|
1012
|
+
/*#__PURE__*/ B(E, {
|
|
1013
|
+
distribution: "between",
|
|
1014
|
+
alignment: "center",
|
|
1015
|
+
gap: "2",
|
|
1016
|
+
className: "pb-2",
|
|
1017
|
+
children: [/*#__PURE__*/ z("span", {
|
|
1018
|
+
className: "theme-color-text-light text-sm",
|
|
1019
|
+
children: $ !== void 0 && Q !== $ ? /*#__PURE__*/ z(K, {
|
|
1020
|
+
id: "xuVMLX",
|
|
1021
|
+
values: {
|
|
1022
|
+
rulesLength: Q,
|
|
1023
|
+
totalCount: $
|
|
1024
|
+
}
|
|
1025
|
+
}) : /*#__PURE__*/ z(K, {
|
|
1026
|
+
id: "UHciG3",
|
|
1027
|
+
values: { rulesLength: Q }
|
|
1048
1028
|
})
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1029
|
+
}), /*#__PURE__*/ B(E, {
|
|
1030
|
+
gap: "2",
|
|
1031
|
+
children: [p && h && /*#__PURE__*/ z(N, {
|
|
1032
|
+
options: p.options,
|
|
1033
|
+
sortBy: p.sortBy,
|
|
1034
|
+
sortDirection: p.sortDirection ?? "asc",
|
|
1035
|
+
onSortByChange: (e) => h({
|
|
1036
|
+
...p,
|
|
1037
|
+
sortBy: e,
|
|
1038
|
+
sortDirection: p.sortDirection
|
|
1039
|
+
}),
|
|
1040
|
+
onSortDirectionChange: (e) => h({
|
|
1041
|
+
...p,
|
|
1042
|
+
sortDirection: e
|
|
1043
|
+
})
|
|
1044
|
+
}), w && y && /*#__PURE__*/ z(O, {
|
|
1045
|
+
variant: "primary",
|
|
1046
|
+
icon: "addCircle",
|
|
1047
|
+
onClick: ee,
|
|
1048
|
+
className: "whitespace-nowrap",
|
|
1049
|
+
children: /*#__PURE__*/ z(K, { id: "O8tK4v" })
|
|
1050
|
+
})]
|
|
1051
|
+
})]
|
|
1052
|
+
}),
|
|
1053
|
+
(g || d) && /*#__PURE__*/ z(m, { children: /*#__PURE__*/ B(E, {
|
|
1054
|
+
direction: "vertical",
|
|
1055
|
+
gap: "2",
|
|
1056
|
+
children: [/*#__PURE__*/ B(E, {
|
|
1057
|
+
distribution: "between",
|
|
1058
|
+
alignment: "center",
|
|
1059
|
+
children: [g && _ && /*#__PURE__*/ z(F, {
|
|
1060
|
+
filters: g.filters,
|
|
1061
|
+
onChange: (e) => {
|
|
1062
|
+
if ((g.selectedFilters || []).some((t) => t.name === e.name && t.value === e.value)) return;
|
|
1063
|
+
let t = g.filters.find((t) => t.filterName === e.name)?.supportsMultiValue ? [...g.selectedFilters || [], e] : [...(g.selectedFilters || []).filter((t) => t.name !== e.name), e];
|
|
1064
|
+
_({
|
|
1065
|
+
...g,
|
|
1066
|
+
selectedFilters: t
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1069
|
+
}), d && /*#__PURE__*/ z(b, {
|
|
1070
|
+
placeholder: k._({ id: "HMV+cw" }),
|
|
1071
|
+
"data-testid": "searchbar",
|
|
1072
|
+
value: H,
|
|
1073
|
+
onInput: (e) => {
|
|
1074
|
+
let t = e.currentTarget.value;
|
|
1075
|
+
G(t), clearTimeout(J.current), J.current = window.setTimeout(() => d(t), 500);
|
|
1076
|
+
},
|
|
1077
|
+
onSearch: (e) => {
|
|
1078
|
+
clearTimeout(J.current), d(typeof e == "string" ? e : "");
|
|
1079
|
+
},
|
|
1080
|
+
onClear: () => {
|
|
1081
|
+
clearTimeout(J.current), G(""), d("");
|
|
1082
|
+
}
|
|
1083
|
+
})]
|
|
1084
|
+
}), g?.selectedFilters && g.selectedFilters.length > 0 && /*#__PURE__*/ z(P, {
|
|
1085
|
+
selectedFilters: g.selectedFilters,
|
|
1086
|
+
onDelete: (e) => _?.({
|
|
1087
|
+
...g,
|
|
1088
|
+
selectedFilters: (g.selectedFilters || []).filter((t) => !(t.name === e.name && t.value === e.value))
|
|
1089
|
+
}),
|
|
1090
|
+
onClear: () => _?.({
|
|
1091
|
+
...g,
|
|
1092
|
+
selectedFilters: []
|
|
1093
|
+
})
|
|
1094
|
+
})]
|
|
1095
|
+
}) }),
|
|
1096
|
+
t.length === 0 ? /*#__PURE__*/ z(K, { id: "nnxwBn" }) : /*#__PURE__*/ B(o, {
|
|
1097
|
+
columns: D ? 6 : 5,
|
|
1098
|
+
className: "security-group-rules-table",
|
|
1099
|
+
children: [/*#__PURE__*/ B(n, { children: [
|
|
1100
|
+
/*#__PURE__*/ z(c, { children: k._({ id: "MRB7nI" }) }),
|
|
1101
|
+
/*#__PURE__*/ z(c, { children: k._({ id: "Nu4oKW" }) }),
|
|
1102
|
+
/*#__PURE__*/ z(c, { children: k._({ id: "yp0UjB" }) }),
|
|
1103
|
+
/*#__PURE__*/ z(c, { children: k._({ id: "6+OdGi" }) }),
|
|
1104
|
+
/*#__PURE__*/ z(c, { children: k._({ id: "6jAi8c" }) }),
|
|
1105
|
+
D && /*#__PURE__*/ z(c, { children: k._({ id: "7L01XJ" }) })
|
|
1106
|
+
] }), t.map((t) => /*#__PURE__*/ B(n, {
|
|
1107
|
+
"data-testid": `rule-row-${t.id}`,
|
|
1108
|
+
children: [
|
|
1109
|
+
/*#__PURE__*/ z(r, { children: t.direction || k._({ id: "h47p9L" }) }),
|
|
1110
|
+
/*#__PURE__*/ z(r, { children: t.description || k._({ id: "h47p9L" }) }),
|
|
1111
|
+
/*#__PURE__*/ z(r, { children: t.ethertype }),
|
|
1112
|
+
/*#__PURE__*/ z(r, { children: t.protocol || k._({ id: "eKC+EC" }) }),
|
|
1113
|
+
/*#__PURE__*/ z(r, { children: Z(t) }),
|
|
1114
|
+
D && /*#__PURE__*/ z(r, {
|
|
1115
|
+
onClick: (e) => e.stopPropagation(),
|
|
1116
|
+
className: "items-end justify-end pr-0",
|
|
1117
|
+
children: /*#__PURE__*/ z(T, { children: /*#__PURE__*/ z(e, { children: /*#__PURE__*/ z(f, {
|
|
1118
|
+
label: k._({ id: "cnGeoo" }),
|
|
1119
|
+
onClick: () => Y(t)
|
|
1120
|
+
}) }) })
|
|
1121
|
+
})
|
|
1122
|
+
]
|
|
1123
|
+
}, t.id))]
|
|
1124
|
+
})
|
|
1125
|
+
]
|
|
1052
1126
|
}),
|
|
1053
|
-
|
|
1054
|
-
rule:
|
|
1055
|
-
open: !!
|
|
1056
|
-
onClose:
|
|
1057
|
-
onConfirm:
|
|
1127
|
+
D && /*#__PURE__*/ z(ne, {
|
|
1128
|
+
rule: j,
|
|
1129
|
+
open: !!j,
|
|
1130
|
+
onClose: te,
|
|
1131
|
+
onConfirm: X,
|
|
1058
1132
|
isLoading: s,
|
|
1059
1133
|
error: l
|
|
1060
1134
|
}),
|
|
1061
|
-
|
|
1062
|
-
securityGroupId:
|
|
1063
|
-
open:
|
|
1064
|
-
onClose:
|
|
1065
|
-
onCreate:
|
|
1066
|
-
isLoading:
|
|
1067
|
-
error:
|
|
1068
|
-
availableSecurityGroups:
|
|
1135
|
+
w && v && y && L && /*#__PURE__*/ z(be, {
|
|
1136
|
+
securityGroupId: v,
|
|
1137
|
+
open: L,
|
|
1138
|
+
onClose: ee,
|
|
1139
|
+
onCreate: y,
|
|
1140
|
+
isLoading: x,
|
|
1141
|
+
error: S,
|
|
1142
|
+
availableSecurityGroups: C
|
|
1069
1143
|
})
|
|
1070
1144
|
] });
|
|
1071
1145
|
}
|
|
1072
1146
|
//#endregion
|
|
1073
1147
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/RBACPolicyRow.tsx
|
|
1074
|
-
function
|
|
1075
|
-
let { i18n:
|
|
1076
|
-
return /*#__PURE__*/
|
|
1077
|
-
/*#__PURE__*/
|
|
1078
|
-
/*#__PURE__*/
|
|
1079
|
-
/*#__PURE__*/
|
|
1148
|
+
function Se({ policy: t, onDelete: i, canDelete: a }) {
|
|
1149
|
+
let { i18n: o, _: s } = q();
|
|
1150
|
+
return /*#__PURE__*/ B(n, { children: [
|
|
1151
|
+
/*#__PURE__*/ z(r, { children: t.target_tenant }),
|
|
1152
|
+
/*#__PURE__*/ z(r, { children: t.action }),
|
|
1153
|
+
/*#__PURE__*/ z(r, {
|
|
1080
1154
|
onClick: (e) => e.stopPropagation(),
|
|
1081
1155
|
className: "items-end justify-end pr-0",
|
|
1082
|
-
children: /*#__PURE__*/
|
|
1083
|
-
label:
|
|
1156
|
+
children: a && /*#__PURE__*/ z(T, { children: /*#__PURE__*/ z(e, { children: /*#__PURE__*/ z(f, {
|
|
1157
|
+
label: o._({ id: "t/YqKh" }),
|
|
1084
1158
|
onClick: i
|
|
1085
1159
|
}) }) })
|
|
1086
1160
|
})
|
|
@@ -1088,12 +1162,12 @@ function _e({ policy: t, onDelete: i }) {
|
|
|
1088
1162
|
}
|
|
1089
1163
|
//#endregion
|
|
1090
1164
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRBACPolicyModal.tsx
|
|
1091
|
-
var
|
|
1092
|
-
function
|
|
1093
|
-
return
|
|
1165
|
+
var Ce = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, we = /^[0-9a-f]{32}$/i;
|
|
1166
|
+
function Te(e) {
|
|
1167
|
+
return Ce.test(e) || we.test(e);
|
|
1094
1168
|
}
|
|
1095
|
-
function
|
|
1096
|
-
let { i18n: a, _: o } =
|
|
1169
|
+
function Ee({ isOpen: e, onClose: n, securityGroupId: r }) {
|
|
1170
|
+
let { i18n: a, _: o } = q(), s = k.useUtils(), c = j(), [u, d] = W(!1), f = J.object({ targetTenant: J.string().min(1, a._({ id: "1RwosK" })).refine(Te, { message: a._({ id: "CunRry" }) }) }), p = k.network.rbacPolicy.create.useMutation({ onSuccess: () => {
|
|
1097
1171
|
s.network.rbacPolicy.list.invalidate({
|
|
1098
1172
|
project_id: c,
|
|
1099
1173
|
securityGroupId: r
|
|
@@ -1101,7 +1175,7 @@ function be({ isOpen: e, onClose: n, securityGroupId: r }) {
|
|
|
1101
1175
|
project_id: c,
|
|
1102
1176
|
securityGroupId: r
|
|
1103
1177
|
}), h();
|
|
1104
|
-
} }), m =
|
|
1178
|
+
} }), m = Y({
|
|
1105
1179
|
defaultValues: { targetTenant: "" },
|
|
1106
1180
|
validators: { onSubmit: f },
|
|
1107
1181
|
onSubmit: async ({ value: e }) => {
|
|
@@ -1116,7 +1190,7 @@ function be({ isOpen: e, onClose: n, securityGroupId: r }) {
|
|
|
1116
1190
|
}, g = async () => {
|
|
1117
1191
|
d(!0), await m.handleSubmit();
|
|
1118
1192
|
};
|
|
1119
|
-
return /*#__PURE__*/
|
|
1193
|
+
return /*#__PURE__*/ B(w, {
|
|
1120
1194
|
open: e,
|
|
1121
1195
|
onCancel: h,
|
|
1122
1196
|
title: a._({ id: "vmRPFm" }),
|
|
@@ -1126,7 +1200,7 @@ function be({ isOpen: e, onClose: n, securityGroupId: r }) {
|
|
|
1126
1200
|
confirmButtonLabel: a._({ id: "Z8lGw6" }),
|
|
1127
1201
|
disableConfirmButton: p.isPending,
|
|
1128
1202
|
children: [
|
|
1129
|
-
p.error && /*#__PURE__*/
|
|
1203
|
+
p.error && /*#__PURE__*/ z(t, {
|
|
1130
1204
|
variant: "error",
|
|
1131
1205
|
className: "mb-4",
|
|
1132
1206
|
children: (() => {
|
|
@@ -1134,33 +1208,33 @@ function be({ isOpen: e, onClose: n, securityGroupId: r }) {
|
|
|
1134
1208
|
return e.includes("conflict") || e.includes("409") ? a._({ id: "rbuO5A" }) : e.includes("not found") || e.includes("404") ? a._({ id: "FwSyEp" }) : e.includes("forbidden") || e.includes("403") ? a._({ id: "kqJVBO" }) : p.error.message;
|
|
1135
1209
|
})()
|
|
1136
1210
|
}),
|
|
1137
|
-
/*#__PURE__*/
|
|
1211
|
+
/*#__PURE__*/ z("p", {
|
|
1138
1212
|
className: "mb-4",
|
|
1139
|
-
children: /*#__PURE__*/
|
|
1213
|
+
children: /*#__PURE__*/ z(K, { id: "cjEOmc" })
|
|
1140
1214
|
}),
|
|
1141
|
-
/*#__PURE__*/
|
|
1215
|
+
/*#__PURE__*/ z(S, {
|
|
1142
1216
|
className: "mb-0",
|
|
1143
1217
|
onSubmit: (e) => {
|
|
1144
1218
|
e.preventDefault(), g();
|
|
1145
1219
|
},
|
|
1146
|
-
children: /*#__PURE__*/
|
|
1220
|
+
children: /*#__PURE__*/ z(i, { children: /*#__PURE__*/ z(m.Field, {
|
|
1147
1221
|
name: "targetTenant",
|
|
1148
1222
|
validators: {
|
|
1149
1223
|
onBlur: ({ value: e }) => {
|
|
1150
1224
|
let t = e.trim();
|
|
1151
1225
|
if (!t) return a._({ id: "1RwosK" });
|
|
1152
|
-
if (
|
|
1226
|
+
if (!Te(t)) return a._({ id: "CunRry" });
|
|
1153
1227
|
},
|
|
1154
1228
|
onChange: ({ value: e }) => {
|
|
1155
1229
|
if (!u) return;
|
|
1156
1230
|
let t = e.trim();
|
|
1157
1231
|
if (!t) return a._({ id: "1RwosK" });
|
|
1158
|
-
if (
|
|
1232
|
+
if (!Te(t)) return a._({ id: "CunRry" });
|
|
1159
1233
|
}
|
|
1160
1234
|
},
|
|
1161
1235
|
children: (e) => {
|
|
1162
1236
|
let t = (e.state.meta.isTouched || u) && e.state.meta.errors.length > 0, n = e.state.meta.errors[0], r = t ? typeof n == "string" ? n : n?.message : void 0;
|
|
1163
|
-
return /*#__PURE__*/
|
|
1237
|
+
return /*#__PURE__*/ z(l, {
|
|
1164
1238
|
id: e.name,
|
|
1165
1239
|
name: e.name,
|
|
1166
1240
|
label: a._({ id: "WzVwU0" }),
|
|
@@ -1182,17 +1256,17 @@ function be({ isOpen: e, onClose: n, securityGroupId: r }) {
|
|
|
1182
1256
|
}
|
|
1183
1257
|
//#endregion
|
|
1184
1258
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/DeleteRBACPolicyDialog.tsx
|
|
1185
|
-
function
|
|
1186
|
-
let { i18n: c, _: u } =
|
|
1259
|
+
function De({ policy: e, open: n, onClose: r, onConfirm: a, isLoading: o, error: s }) {
|
|
1260
|
+
let { i18n: c, _: u } = q(), d = Y({
|
|
1187
1261
|
defaultValues: { confirmText: "" },
|
|
1188
|
-
validators: { onSubmit:
|
|
1262
|
+
validators: { onSubmit: J.object({ confirmText: J.string().refine((e) => e === "remove", { message: c._({ id: "SVLToM" }) }) }) },
|
|
1189
1263
|
onSubmit: async () => {
|
|
1190
1264
|
o || (a(e.id), p());
|
|
1191
1265
|
}
|
|
1192
|
-
}), f =
|
|
1266
|
+
}), f = X(d.store, (e) => e.isSubmitting || e.values.confirmText !== "remove"), p = () => {
|
|
1193
1267
|
d.reset(), r();
|
|
1194
1268
|
};
|
|
1195
|
-
return /*#__PURE__*/
|
|
1269
|
+
return /*#__PURE__*/ z(w, {
|
|
1196
1270
|
open: n,
|
|
1197
1271
|
onCancel: p,
|
|
1198
1272
|
size: "small",
|
|
@@ -1201,54 +1275,54 @@ function xe({ policy: e, open: n, onClose: r, onConfirm: a, isLoading: o, error:
|
|
|
1201
1275
|
cancelButtonLabel: c._({ id: "dEgA5A" }),
|
|
1202
1276
|
confirmButtonLabel: o ? c._({ id: "M5RhXF" }) : c._({ id: "qh5W8q" }),
|
|
1203
1277
|
disableConfirmButton: o || f,
|
|
1204
|
-
children: /*#__PURE__*/
|
|
1205
|
-
s && /*#__PURE__*/
|
|
1278
|
+
children: /*#__PURE__*/ B("div", { children: [
|
|
1279
|
+
s && /*#__PURE__*/ z(t, {
|
|
1206
1280
|
dismissible: !1,
|
|
1207
1281
|
variant: "error",
|
|
1208
1282
|
className: "mt-4",
|
|
1209
1283
|
children: s
|
|
1210
1284
|
}),
|
|
1211
|
-
/*#__PURE__*/
|
|
1212
|
-
/*#__PURE__*/
|
|
1285
|
+
/*#__PURE__*/ z(K, { id: "BMTd81" }),
|
|
1286
|
+
/*#__PURE__*/ B("div", {
|
|
1213
1287
|
className: "bg-theme-background-lvl-1 mt-4 mb-4 rounded p-4",
|
|
1214
|
-
children: [/*#__PURE__*/
|
|
1288
|
+
children: [/*#__PURE__*/ z("p", {
|
|
1215
1289
|
className: "mb-2 font-semibold",
|
|
1216
|
-
children: /*#__PURE__*/
|
|
1217
|
-
}), /*#__PURE__*/
|
|
1290
|
+
children: /*#__PURE__*/ z(K, { id: "nLvo6K" })
|
|
1291
|
+
}), /*#__PURE__*/ B("ul", {
|
|
1218
1292
|
className: "list-inside list-disc space-y-1 text-sm",
|
|
1219
1293
|
children: [
|
|
1220
|
-
/*#__PURE__*/
|
|
1221
|
-
/*#__PURE__*/
|
|
1294
|
+
/*#__PURE__*/ B("li", { children: [
|
|
1295
|
+
/*#__PURE__*/ z(K, { id: "WzVwU0" }),
|
|
1222
1296
|
": ",
|
|
1223
1297
|
e.target_tenant
|
|
1224
1298
|
] }),
|
|
1225
|
-
/*#__PURE__*/
|
|
1226
|
-
/*#__PURE__*/
|
|
1299
|
+
/*#__PURE__*/ B("li", { children: [
|
|
1300
|
+
/*#__PURE__*/ z(K, { id: "bwRvnp" }),
|
|
1227
1301
|
": ",
|
|
1228
1302
|
e.action
|
|
1229
1303
|
] }),
|
|
1230
|
-
/*#__PURE__*/
|
|
1231
|
-
/*#__PURE__*/
|
|
1304
|
+
/*#__PURE__*/ B("li", { children: [
|
|
1305
|
+
/*#__PURE__*/ z(K, { id: "UGhVPl" }),
|
|
1232
1306
|
": ",
|
|
1233
1307
|
e.object_type
|
|
1234
1308
|
] })
|
|
1235
1309
|
]
|
|
1236
1310
|
})]
|
|
1237
1311
|
}),
|
|
1238
|
-
!o && /*#__PURE__*/
|
|
1312
|
+
!o && /*#__PURE__*/ z(S, {
|
|
1239
1313
|
className: "mt-4 mb-0",
|
|
1240
1314
|
onSubmit: (e) => {
|
|
1241
1315
|
e.preventDefault(), d.handleSubmit();
|
|
1242
1316
|
},
|
|
1243
|
-
children: /*#__PURE__*/
|
|
1317
|
+
children: /*#__PURE__*/ B(i, { children: [/*#__PURE__*/ z("p", {
|
|
1244
1318
|
className: "mb-2 text-sm",
|
|
1245
|
-
children: /*#__PURE__*/
|
|
1319
|
+
children: /*#__PURE__*/ z(K, {
|
|
1246
1320
|
id: "Enpdmy",
|
|
1247
|
-
components: { 0: /*#__PURE__*/
|
|
1321
|
+
components: { 0: /*#__PURE__*/ z("strong", {}) }
|
|
1248
1322
|
})
|
|
1249
|
-
}), /*#__PURE__*/
|
|
1323
|
+
}), /*#__PURE__*/ z(d.Field, {
|
|
1250
1324
|
name: "confirmText",
|
|
1251
|
-
children: (e) => /*#__PURE__*/
|
|
1325
|
+
children: (e) => /*#__PURE__*/ z(l, {
|
|
1252
1326
|
id: e.name,
|
|
1253
1327
|
name: e.name,
|
|
1254
1328
|
value: e.state.value,
|
|
@@ -1265,126 +1339,161 @@ function xe({ policy: e, open: n, onClose: r, onConfirm: a, isLoading: o, error:
|
|
|
1265
1339
|
}
|
|
1266
1340
|
//#endregion
|
|
1267
1341
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupRBACPolicies.tsx
|
|
1268
|
-
function
|
|
1269
|
-
let
|
|
1270
|
-
|
|
1342
|
+
function Oe({ securityGroupId: e, canManageAccess: r }) {
|
|
1343
|
+
let i = k.useUtils(), { i18n: s, _: l } = q(), u = j(), [d, f] = M(), [p, h] = W(null), [g, _] = W(""), [v, y] = W(""), x = U(void 0);
|
|
1344
|
+
V(() => () => clearTimeout(x.current), []);
|
|
1345
|
+
let { data: S, isPending: C, isError: w, error: T } = k.network.rbacPolicy.list.useQuery({
|
|
1346
|
+
project_id: u,
|
|
1271
1347
|
securityGroupId: e
|
|
1272
|
-
}, { refetchOnWindowFocus: !1 }),
|
|
1273
|
-
|
|
1274
|
-
project_id:
|
|
1348
|
+
}, { refetchOnWindowFocus: !1 }), D = k.network.rbacPolicy.delete.useMutation({ onSuccess: () => {
|
|
1349
|
+
i.network.rbacPolicy.list.invalidate({
|
|
1350
|
+
project_id: u,
|
|
1275
1351
|
securityGroupId: e
|
|
1276
|
-
}),
|
|
1277
|
-
project_id:
|
|
1352
|
+
}), i.network.securityGroup.getById.invalidate({
|
|
1353
|
+
project_id: u,
|
|
1278
1354
|
securityGroupId: e
|
|
1279
1355
|
});
|
|
1280
|
-
} }),
|
|
1281
|
-
|
|
1282
|
-
},
|
|
1283
|
-
|
|
1284
|
-
project_id:
|
|
1356
|
+
} }), A = (e) => {
|
|
1357
|
+
h(e);
|
|
1358
|
+
}, N = (e) => {
|
|
1359
|
+
D.mutate({
|
|
1360
|
+
project_id: u,
|
|
1285
1361
|
policyId: e
|
|
1286
1362
|
});
|
|
1287
|
-
},
|
|
1288
|
-
|
|
1363
|
+
}, P = () => {
|
|
1364
|
+
D.isPending || h(null);
|
|
1289
1365
|
};
|
|
1290
|
-
|
|
1291
|
-
!
|
|
1366
|
+
V(() => {
|
|
1367
|
+
!D.isPending && !D.error && D.isSuccess && h(null);
|
|
1292
1368
|
}, [
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1369
|
+
D.isPending,
|
|
1370
|
+
D.error,
|
|
1371
|
+
D.isSuccess
|
|
1296
1372
|
]);
|
|
1297
|
-
let
|
|
1298
|
-
if (!
|
|
1299
|
-
if (!
|
|
1300
|
-
let e =
|
|
1301
|
-
return
|
|
1302
|
-
}, [
|
|
1303
|
-
|
|
1304
|
-
};
|
|
1305
|
-
if (_) return /*#__PURE__*/ F(w, {
|
|
1373
|
+
let F = H(() => {
|
|
1374
|
+
if (!S) return [];
|
|
1375
|
+
if (!g) return S;
|
|
1376
|
+
let e = g.toLowerCase();
|
|
1377
|
+
return S.filter((t) => t.target_tenant?.toLowerCase().includes(e) || t.action?.toLowerCase().includes(e));
|
|
1378
|
+
}, [S, g]);
|
|
1379
|
+
if (C) return /*#__PURE__*/ z(E, {
|
|
1306
1380
|
distribution: "center",
|
|
1307
1381
|
alignment: "center",
|
|
1308
1382
|
className: "py-8",
|
|
1309
|
-
children: /*#__PURE__*/
|
|
1383
|
+
children: /*#__PURE__*/ z(a, { variant: "primary" })
|
|
1310
1384
|
});
|
|
1311
|
-
if (
|
|
1385
|
+
if (w) return /*#__PURE__*/ z(t, {
|
|
1312
1386
|
variant: "error",
|
|
1313
1387
|
className: "mb-4",
|
|
1314
|
-
children:
|
|
1388
|
+
children: T.message
|
|
1315
1389
|
});
|
|
1316
|
-
let
|
|
1317
|
-
return /*#__PURE__*/
|
|
1318
|
-
/*#__PURE__*/
|
|
1390
|
+
let I = S?.length || 0, L = F.length;
|
|
1391
|
+
return /*#__PURE__*/ B(R, { children: [
|
|
1392
|
+
/*#__PURE__*/ B(E, {
|
|
1319
1393
|
direction: "vertical",
|
|
1320
1394
|
gap: "4",
|
|
1321
|
-
children: [
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1395
|
+
children: [
|
|
1396
|
+
/*#__PURE__*/ B(E, {
|
|
1397
|
+
distribution: "between",
|
|
1398
|
+
alignment: "center",
|
|
1399
|
+
gap: "2",
|
|
1400
|
+
className: "pb-2",
|
|
1401
|
+
children: [/*#__PURE__*/ z("span", {
|
|
1402
|
+
className: "theme-color-text-light text-sm",
|
|
1403
|
+
children: I === L ? /*#__PURE__*/ z(K, {
|
|
1404
|
+
id: "xx2KP5",
|
|
1405
|
+
values: { totalCount: I }
|
|
1406
|
+
}) : /*#__PURE__*/ z(K, {
|
|
1407
|
+
id: "VcWhM0",
|
|
1408
|
+
values: {
|
|
1409
|
+
filteredCount: L,
|
|
1410
|
+
totalCount: I
|
|
1411
|
+
}
|
|
1412
|
+
})
|
|
1413
|
+
}), r && /*#__PURE__*/ z(O, {
|
|
1414
|
+
variant: "primary",
|
|
1415
|
+
icon: "addCircle",
|
|
1416
|
+
onClick: f,
|
|
1417
|
+
className: "whitespace-nowrap",
|
|
1418
|
+
children: /*#__PURE__*/ z(K, { id: "vmRPFm" })
|
|
1419
|
+
})]
|
|
1420
|
+
}),
|
|
1421
|
+
/*#__PURE__*/ z(m, { children: /*#__PURE__*/ z(E, {
|
|
1422
|
+
distribution: "between",
|
|
1423
|
+
alignment: "center",
|
|
1424
|
+
children: /*#__PURE__*/ z(b, {
|
|
1425
|
+
placeholder: s._({ id: "mlxk2U" }),
|
|
1426
|
+
"data-testid": "searchbar",
|
|
1427
|
+
value: v,
|
|
1428
|
+
onInput: (e) => {
|
|
1429
|
+
let t = e.currentTarget.value;
|
|
1430
|
+
y(t), clearTimeout(x.current), x.current = window.setTimeout(() => _(t), 500);
|
|
1431
|
+
},
|
|
1432
|
+
onSearch: (e) => {
|
|
1433
|
+
clearTimeout(x.current), _(typeof e == "string" ? e : "");
|
|
1434
|
+
},
|
|
1435
|
+
onClear: () => {
|
|
1436
|
+
clearTimeout(x.current), y(""), _("");
|
|
1437
|
+
}
|
|
1438
|
+
})
|
|
1439
|
+
}) }),
|
|
1440
|
+
L === 0 ? g ? /*#__PURE__*/ z(K, { id: "qxxo7y" }) : /*#__PURE__*/ z(K, { id: "Dia2Ue" }) : /*#__PURE__*/ B(o, {
|
|
1441
|
+
columns: 3,
|
|
1442
|
+
children: [/*#__PURE__*/ B(n, { children: [
|
|
1443
|
+
/*#__PURE__*/ z(c, { children: /*#__PURE__*/ z(K, { id: "WzVwU0" }) }),
|
|
1444
|
+
/*#__PURE__*/ z(c, { children: /*#__PURE__*/ z(K, { id: "bwRvnp" }) }),
|
|
1445
|
+
/*#__PURE__*/ z(c, { children: /*#__PURE__*/ z(K, { id: "7L01XJ" }) })
|
|
1446
|
+
] }), F.map((e) => /*#__PURE__*/ z(Se, {
|
|
1447
|
+
policy: e,
|
|
1448
|
+
onDelete: () => A(e),
|
|
1449
|
+
canDelete: r
|
|
1450
|
+
}, e.id))]
|
|
1332
1451
|
})
|
|
1333
|
-
|
|
1334
|
-
columns: 3,
|
|
1335
|
-
children: [/*#__PURE__*/ I(n, { children: [
|
|
1336
|
-
/*#__PURE__*/ F(c, { children: /*#__PURE__*/ F(V, { id: "WzVwU0" }) }),
|
|
1337
|
-
/*#__PURE__*/ F(c, { children: /*#__PURE__*/ F(V, { id: "bwRvnp" }) }),
|
|
1338
|
-
/*#__PURE__*/ F(c, { children: /*#__PURE__*/ F(V, { id: "7L01XJ" }) })
|
|
1339
|
-
] }), T.map((e) => /*#__PURE__*/ F(_e, {
|
|
1340
|
-
policy: e,
|
|
1341
|
-
onDelete: () => x(e)
|
|
1342
|
-
}, e.id))]
|
|
1343
|
-
})]
|
|
1452
|
+
]
|
|
1344
1453
|
}),
|
|
1345
|
-
!!
|
|
1346
|
-
policy:
|
|
1347
|
-
open: !!
|
|
1348
|
-
onClose:
|
|
1349
|
-
onConfirm:
|
|
1350
|
-
isLoading:
|
|
1351
|
-
error:
|
|
1454
|
+
!!p && /*#__PURE__*/ z(De, {
|
|
1455
|
+
policy: p,
|
|
1456
|
+
open: !!p,
|
|
1457
|
+
onClose: P,
|
|
1458
|
+
onConfirm: N,
|
|
1459
|
+
isLoading: D.isPending,
|
|
1460
|
+
error: D.error?.message || null
|
|
1352
1461
|
}),
|
|
1353
|
-
|
|
1354
|
-
isOpen:
|
|
1355
|
-
onClose:
|
|
1462
|
+
d && /*#__PURE__*/ z(Ee, {
|
|
1463
|
+
isOpen: d,
|
|
1464
|
+
onClose: f,
|
|
1356
1465
|
securityGroupId: e
|
|
1357
1466
|
})
|
|
1358
1467
|
] });
|
|
1359
1468
|
}
|
|
1360
1469
|
//#endregion
|
|
1361
1470
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/SecurityGroupDetailsView.tsx
|
|
1362
|
-
function
|
|
1363
|
-
let [
|
|
1364
|
-
return /*#__PURE__*/
|
|
1471
|
+
function ke({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRule: r, isDeletingRule: i = !1, deleteRuleError: a = null, filterControls: o, onCreateRule: s, isCreatingRule: c = !1, createRuleError: l = null, availableSecurityGroups: u = [], currentProjectId: f, permissions: p }) {
|
|
1472
|
+
let [m, h] = W("rules"), g = e.project_id === f && p.canViewRBAC;
|
|
1473
|
+
return /*#__PURE__*/ z(d, {
|
|
1365
1474
|
px: !1,
|
|
1366
1475
|
py: !0,
|
|
1367
|
-
children: /*#__PURE__*/
|
|
1476
|
+
children: /*#__PURE__*/ B(E, {
|
|
1368
1477
|
direction: "vertical",
|
|
1369
1478
|
gap: "4",
|
|
1370
1479
|
children: [
|
|
1371
|
-
/*#__PURE__*/
|
|
1480
|
+
/*#__PURE__*/ z(te, {
|
|
1372
1481
|
name: e.name,
|
|
1373
1482
|
id: e.id
|
|
1374
1483
|
}),
|
|
1375
|
-
/*#__PURE__*/
|
|
1484
|
+
/*#__PURE__*/ z(Z, {
|
|
1376
1485
|
securityGroup: e,
|
|
1377
1486
|
onEdit: n,
|
|
1378
|
-
|
|
1487
|
+
canUpdate: p.canUpdate
|
|
1379
1488
|
}),
|
|
1380
|
-
|
|
1381
|
-
activeTab:
|
|
1382
|
-
onTabChange:
|
|
1383
|
-
showRBACTab:
|
|
1489
|
+
/*#__PURE__*/ z(Q, {
|
|
1490
|
+
activeTab: m,
|
|
1491
|
+
onTabChange: h,
|
|
1492
|
+
showRBACTab: g
|
|
1384
1493
|
}),
|
|
1385
|
-
/*#__PURE__*/
|
|
1494
|
+
/*#__PURE__*/ B("div", {
|
|
1386
1495
|
className: "mt-6",
|
|
1387
|
-
children: [
|
|
1496
|
+
children: [m === "rules" && /*#__PURE__*/ z(xe, {
|
|
1388
1497
|
rules: t,
|
|
1389
1498
|
totalRulesCount: e.security_group_rules?.length,
|
|
1390
1499
|
onDeleteRule: r,
|
|
@@ -1397,12 +1506,16 @@ function Ce({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRu
|
|
|
1397
1506
|
filterSettings: o.filterSettings,
|
|
1398
1507
|
onFilterChange: o.onFilterChange,
|
|
1399
1508
|
securityGroupId: e.id,
|
|
1400
|
-
onCreateRule:
|
|
1509
|
+
onCreateRule: p.canCreateRule ? s : void 0,
|
|
1401
1510
|
isCreatingRule: c,
|
|
1402
1511
|
createRuleError: l,
|
|
1403
1512
|
availableSecurityGroups: u,
|
|
1404
|
-
|
|
1405
|
-
|
|
1513
|
+
canCreateRule: p.canCreateRule,
|
|
1514
|
+
canDeleteRule: p.canDeleteRule
|
|
1515
|
+
}), m === "rbac" && /*#__PURE__*/ z(Oe, {
|
|
1516
|
+
securityGroupId: e.id,
|
|
1517
|
+
canManageAccess: p.canManageAccess
|
|
1518
|
+
})]
|
|
1406
1519
|
})
|
|
1407
1520
|
]
|
|
1408
1521
|
})
|
|
@@ -1410,14 +1523,14 @@ function Ce({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRu
|
|
|
1410
1523
|
}
|
|
1411
1524
|
//#endregion
|
|
1412
1525
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-hooks/useSecurityGroupDetails.ts
|
|
1413
|
-
function
|
|
1414
|
-
let [n, r] =
|
|
1526
|
+
function Ae({ securityGroupId: e, filterControls: t }) {
|
|
1527
|
+
let [n, r] = W(!1), i = j(), a = k.useUtils(), o = k.network.securityGroup.getById.useQuery({
|
|
1415
1528
|
project_id: i,
|
|
1416
1529
|
securityGroupId: e
|
|
1417
1530
|
}, { placeholderData: () => a.network.securityGroup.getById.getData({
|
|
1418
1531
|
project_id: i,
|
|
1419
1532
|
securityGroupId: e
|
|
1420
|
-
}) }), s =
|
|
1533
|
+
}) }), s = H(() => {
|
|
1421
1534
|
let e = o.data?.security_group_rules || [], n = t.filterSettings.selectedFilters?.find((e) => e.name === "direction")?.value, r = t.filterSettings.selectedFilters?.find((e) => e.name === "ethertype")?.value, i = t.filterSettings.selectedFilters?.find((e) => e.name === "protocol")?.value;
|
|
1422
1535
|
if (n && n !== "all" && (e = e.filter((e) => e.direction === n)), r && r !== "all" && (e = e.filter((e) => e.ethertype === r)), i && i !== "all" && (e = e.filter((e) => e.protocol === null ? !1 : e.protocol === i)), t.searchTerm) {
|
|
1423
1536
|
let n = t.searchTerm.toLowerCase();
|
|
@@ -1431,17 +1544,17 @@ function we({ securityGroupId: e, filterControls: t }) {
|
|
|
1431
1544
|
});
|
|
1432
1545
|
}
|
|
1433
1546
|
return e;
|
|
1434
|
-
}, [o.data?.security_group_rules, t]), c =
|
|
1547
|
+
}, [o.data?.security_group_rules, t]), c = k.network.securityGroup.update.useMutation({ onSuccess: () => {
|
|
1435
1548
|
a.network.securityGroup.getById.invalidate({
|
|
1436
1549
|
project_id: i,
|
|
1437
1550
|
securityGroupId: e
|
|
1438
1551
|
}), a.network.securityGroup.list.invalidate(), r(!1);
|
|
1439
|
-
} }), l =
|
|
1552
|
+
} }), l = k.network.securityGroupRule.delete.useMutation({ onSuccess: () => {
|
|
1440
1553
|
a.network.securityGroup.getById.invalidate({
|
|
1441
1554
|
project_id: i,
|
|
1442
1555
|
securityGroupId: e
|
|
1443
1556
|
}), a.network.securityGroup.list.invalidate();
|
|
1444
|
-
} }), u =
|
|
1557
|
+
} }), u = k.network.securityGroupRule.create.useMutation({ onSuccess: () => {
|
|
1445
1558
|
a.network.securityGroup.getById.invalidate({
|
|
1446
1559
|
project_id: i,
|
|
1447
1560
|
securityGroupId: e
|
|
@@ -1489,39 +1602,41 @@ function we({ securityGroupId: e, filterControls: t }) {
|
|
|
1489
1602
|
}
|
|
1490
1603
|
//#endregion
|
|
1491
1604
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/index.tsx?tsr-split=component
|
|
1492
|
-
function
|
|
1493
|
-
let { securityGroupId: e } =
|
|
1605
|
+
function je() {
|
|
1606
|
+
let { securityGroupId: e } = A.useParams(), { trpcClient: t } = A.useRouteContext(), n = j(), r = G(), { i18n: i, _: o } = q();
|
|
1607
|
+
if (!t) throw Error("trpcClient is not available in route context");
|
|
1608
|
+
let { permissions: c, isLoading: l, isError: d } = ee(n), { searchTerm: f, sortSettings: p, filterSettings: m, handleSearchChange: h, handleSortChange: g, handleFilterChange: _ } = I({
|
|
1494
1609
|
defaultSortKey: "direction",
|
|
1495
1610
|
defaultSortDir: "asc",
|
|
1496
1611
|
sortOptions: [
|
|
1497
1612
|
{
|
|
1498
|
-
label:
|
|
1613
|
+
label: i._({ id: "MRB7nI" }),
|
|
1499
1614
|
value: "direction"
|
|
1500
1615
|
},
|
|
1501
1616
|
{
|
|
1502
|
-
label:
|
|
1617
|
+
label: i._({ id: "6+OdGi" }),
|
|
1503
1618
|
value: "protocol"
|
|
1504
1619
|
},
|
|
1505
1620
|
{
|
|
1506
|
-
label:
|
|
1621
|
+
label: i._({ id: "Nu4oKW" }),
|
|
1507
1622
|
value: "description"
|
|
1508
1623
|
}
|
|
1509
1624
|
],
|
|
1510
1625
|
filterSettings: { filters: [
|
|
1511
1626
|
{
|
|
1512
|
-
displayName:
|
|
1627
|
+
displayName: i._({ id: "MRB7nI" }),
|
|
1513
1628
|
filterName: "direction",
|
|
1514
1629
|
values: ["ingress", "egress"],
|
|
1515
1630
|
supportsMultiValue: !1
|
|
1516
1631
|
},
|
|
1517
1632
|
{
|
|
1518
|
-
displayName:
|
|
1633
|
+
displayName: i._({ id: "yp0UjB" }),
|
|
1519
1634
|
filterName: "ethertype",
|
|
1520
1635
|
values: ["IPv4", "IPv6"],
|
|
1521
1636
|
supportsMultiValue: !1
|
|
1522
1637
|
},
|
|
1523
1638
|
{
|
|
1524
|
-
displayName:
|
|
1639
|
+
displayName: i._({ id: "6+OdGi" }),
|
|
1525
1640
|
filterName: "protocol",
|
|
1526
1641
|
values: [
|
|
1527
1642
|
"tcp",
|
|
@@ -1532,115 +1647,137 @@ function Te() {
|
|
|
1532
1647
|
supportsMultiValue: !1
|
|
1533
1648
|
}
|
|
1534
1649
|
] }
|
|
1535
|
-
}),
|
|
1536
|
-
searchTerm:
|
|
1537
|
-
onSearchChange:
|
|
1538
|
-
sortSettings:
|
|
1539
|
-
onSortChange:
|
|
1540
|
-
filterSettings:
|
|
1541
|
-
onFilterChange:
|
|
1542
|
-
}, { securityGroup:
|
|
1650
|
+
}), v = {
|
|
1651
|
+
searchTerm: f,
|
|
1652
|
+
onSearchChange: h,
|
|
1653
|
+
sortSettings: p,
|
|
1654
|
+
onSortChange: g,
|
|
1655
|
+
filterSettings: m,
|
|
1656
|
+
onFilterChange: _
|
|
1657
|
+
}, { securityGroup: y, filteredAndSortedRules: b, isLoading: S, isError: C, error: w, isUpdating: T, updateError: D, isDeletingRule: M, deleteRuleError: N, isCreatingRule: P, createRuleError: F, editModalOpen: R, handleEdit: V, handleCloseEditModal: U, handleUpdate: W, handleDeleteRule: J, handleCreateRule: Y } = Ae({
|
|
1543
1658
|
securityGroupId: e,
|
|
1544
|
-
filterControls:
|
|
1545
|
-
}), { data:
|
|
1659
|
+
filterControls: v
|
|
1660
|
+
}), { data: X } = k.network.securityGroup.list.useQuery({ project_id: n }), te = H(() => (X || []).filter((t) => t.id !== e).map((e) => ({
|
|
1546
1661
|
id: e.id,
|
|
1547
1662
|
name: e.name || e.id
|
|
1548
|
-
})), [
|
|
1549
|
-
|
|
1663
|
+
})), [X, e]), Z = () => {
|
|
1664
|
+
r({
|
|
1550
1665
|
to: "/projects/$projectId/network/securitygroups",
|
|
1551
|
-
params: { projectId:
|
|
1666
|
+
params: { projectId: n }
|
|
1552
1667
|
});
|
|
1553
1668
|
};
|
|
1554
|
-
if (
|
|
1669
|
+
if (l) return /*#__PURE__*/ B(E, {
|
|
1670
|
+
className: "fixed inset-0",
|
|
1671
|
+
distribution: "center",
|
|
1672
|
+
alignment: "center",
|
|
1673
|
+
direction: "vertical",
|
|
1674
|
+
children: [/*#__PURE__*/ z(a, {
|
|
1675
|
+
variant: "primary",
|
|
1676
|
+
size: "large",
|
|
1677
|
+
className: "mb-2"
|
|
1678
|
+
}), /*#__PURE__*/ z(K, { id: "EpWoJ9" })]
|
|
1679
|
+
});
|
|
1680
|
+
let Q = d ? {
|
|
1681
|
+
canView: !1,
|
|
1682
|
+
canCreate: !1,
|
|
1683
|
+
canUpdate: !1,
|
|
1684
|
+
canDelete: !1,
|
|
1685
|
+
canCreateRule: !1,
|
|
1686
|
+
canDeleteRule: !1,
|
|
1687
|
+
canManageAccess: !1,
|
|
1688
|
+
canViewRBAC: !1
|
|
1689
|
+
} : c;
|
|
1690
|
+
if (S) return /*#__PURE__*/ B(E, {
|
|
1555
1691
|
className: "fixed inset-0",
|
|
1556
1692
|
distribution: "center",
|
|
1557
1693
|
alignment: "center",
|
|
1558
1694
|
direction: "vertical",
|
|
1559
|
-
children: [/*#__PURE__*/
|
|
1695
|
+
children: [/*#__PURE__*/ z(a, {
|
|
1560
1696
|
variant: "primary",
|
|
1561
1697
|
size: "large",
|
|
1562
1698
|
className: "mb-2"
|
|
1563
|
-
}), /*#__PURE__*/
|
|
1699
|
+
}), /*#__PURE__*/ z(K, { id: "3x7Sws" })]
|
|
1564
1700
|
});
|
|
1565
|
-
if (
|
|
1566
|
-
let e =
|
|
1567
|
-
return /*#__PURE__*/
|
|
1701
|
+
if (C) {
|
|
1702
|
+
let e = w?.message || "Unknown error";
|
|
1703
|
+
return /*#__PURE__*/ B(E, {
|
|
1568
1704
|
className: "fixed inset-0",
|
|
1569
1705
|
distribution: "center",
|
|
1570
1706
|
alignment: "center",
|
|
1571
1707
|
direction: "vertical",
|
|
1572
1708
|
gap: "5",
|
|
1573
1709
|
children: [
|
|
1574
|
-
/*#__PURE__*/
|
|
1710
|
+
/*#__PURE__*/ z("p", {
|
|
1575
1711
|
className: "text-theme-error font-semibold",
|
|
1576
|
-
children: /*#__PURE__*/
|
|
1712
|
+
children: /*#__PURE__*/ z(K, { id: "FjPnAE" })
|
|
1577
1713
|
}),
|
|
1578
|
-
/*#__PURE__*/
|
|
1714
|
+
/*#__PURE__*/ z("p", {
|
|
1579
1715
|
className: "text-theme-highest",
|
|
1580
1716
|
children: e
|
|
1581
1717
|
}),
|
|
1582
|
-
/*#__PURE__*/
|
|
1583
|
-
onClick:
|
|
1718
|
+
/*#__PURE__*/ z(O, {
|
|
1719
|
+
onClick: Z,
|
|
1584
1720
|
variant: "primary",
|
|
1585
|
-
children: /*#__PURE__*/
|
|
1721
|
+
children: /*#__PURE__*/ z(K, { id: "U9q4M7" })
|
|
1586
1722
|
})
|
|
1587
1723
|
]
|
|
1588
1724
|
});
|
|
1589
1725
|
}
|
|
1590
|
-
return
|
|
1726
|
+
return y ? /*#__PURE__*/ B(E, {
|
|
1591
1727
|
direction: "vertical",
|
|
1592
1728
|
children: [
|
|
1593
|
-
/*#__PURE__*/
|
|
1594
|
-
/*#__PURE__*/
|
|
1729
|
+
/*#__PURE__*/ z(u, { children: y.name || y.id }),
|
|
1730
|
+
/*#__PURE__*/ B(x, {
|
|
1595
1731
|
className: "my-6",
|
|
1596
|
-
children: [/*#__PURE__*/
|
|
1597
|
-
onClick:
|
|
1598
|
-
label:
|
|
1599
|
-
}), /*#__PURE__*/
|
|
1732
|
+
children: [/*#__PURE__*/ z(s, {
|
|
1733
|
+
onClick: Z,
|
|
1734
|
+
label: i._({ id: "4opp4r" })
|
|
1735
|
+
}), /*#__PURE__*/ z(s, {
|
|
1600
1736
|
active: !0,
|
|
1601
|
-
label:
|
|
1737
|
+
label: y.id
|
|
1602
1738
|
})]
|
|
1603
1739
|
}),
|
|
1604
|
-
/*#__PURE__*/
|
|
1605
|
-
securityGroup:
|
|
1606
|
-
filteredAndSortedRules:
|
|
1607
|
-
onEdit:
|
|
1608
|
-
onDeleteRule:
|
|
1609
|
-
isDeletingRule:
|
|
1610
|
-
deleteRuleError:
|
|
1611
|
-
filterControls:
|
|
1612
|
-
onCreateRule:
|
|
1613
|
-
isCreatingRule:
|
|
1614
|
-
createRuleError:
|
|
1615
|
-
availableSecurityGroups:
|
|
1616
|
-
currentProjectId:
|
|
1740
|
+
/*#__PURE__*/ z(ke, {
|
|
1741
|
+
securityGroup: y,
|
|
1742
|
+
filteredAndSortedRules: b,
|
|
1743
|
+
onEdit: V,
|
|
1744
|
+
onDeleteRule: J,
|
|
1745
|
+
isDeletingRule: M,
|
|
1746
|
+
deleteRuleError: N,
|
|
1747
|
+
filterControls: v,
|
|
1748
|
+
onCreateRule: Y,
|
|
1749
|
+
isCreatingRule: P,
|
|
1750
|
+
createRuleError: F,
|
|
1751
|
+
availableSecurityGroups: te,
|
|
1752
|
+
currentProjectId: n,
|
|
1753
|
+
permissions: Q
|
|
1617
1754
|
}),
|
|
1618
|
-
/*#__PURE__*/
|
|
1619
|
-
securityGroup:
|
|
1620
|
-
open:
|
|
1621
|
-
onClose:
|
|
1622
|
-
onUpdate:
|
|
1623
|
-
isLoading:
|
|
1624
|
-
error:
|
|
1755
|
+
/*#__PURE__*/ z(L, {
|
|
1756
|
+
securityGroup: y,
|
|
1757
|
+
open: R,
|
|
1758
|
+
onClose: U,
|
|
1759
|
+
onUpdate: W,
|
|
1760
|
+
isLoading: T,
|
|
1761
|
+
error: D
|
|
1625
1762
|
})
|
|
1626
1763
|
]
|
|
1627
|
-
}) : /*#__PURE__*/
|
|
1764
|
+
}) : /*#__PURE__*/ B(E, {
|
|
1628
1765
|
className: "fixed inset-0",
|
|
1629
1766
|
distribution: "center",
|
|
1630
1767
|
alignment: "center",
|
|
1631
1768
|
direction: "vertical",
|
|
1632
1769
|
gap: "5",
|
|
1633
|
-
children: [/*#__PURE__*/
|
|
1770
|
+
children: [/*#__PURE__*/ z("p", {
|
|
1634
1771
|
className: "text-theme-secondary",
|
|
1635
|
-
children: /*#__PURE__*/
|
|
1636
|
-
}), /*#__PURE__*/
|
|
1637
|
-
onClick:
|
|
1772
|
+
children: /*#__PURE__*/ z(K, { id: "Zw8Q49" })
|
|
1773
|
+
}), /*#__PURE__*/ z(O, {
|
|
1774
|
+
onClick: Z,
|
|
1638
1775
|
variant: "primary",
|
|
1639
|
-
children: /*#__PURE__*/
|
|
1776
|
+
children: /*#__PURE__*/ z(K, { id: "U9q4M7" })
|
|
1640
1777
|
})]
|
|
1641
1778
|
});
|
|
1642
1779
|
}
|
|
1643
1780
|
//#endregion
|
|
1644
|
-
export {
|
|
1781
|
+
export { je as component };
|
|
1645
1782
|
|
|
1646
|
-
//# sourceMappingURL=_securityGroupId-
|
|
1783
|
+
//# sourceMappingURL=_securityGroupId-DFdNKa2l.mjs.map
|