@cobaltcore-dev/aurora 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -13
- package/dist/client/{ContentHeader-xQVhO2yT.mjs → ContentHeader-kx1Th5Sq.mjs} +18 -18
- package/dist/client/{ContentHeader-xQVhO2yT.mjs.map → ContentHeader-kx1Th5Sq.mjs.map} +1 -1
- package/dist/client/{DeleteFlavorModal-CHTUZ3YV.mjs → DeleteFlavorModal-C3cb7YiJ.mjs} +155 -155
- package/dist/client/{DeleteFlavorModal-CHTUZ3YV.mjs.map → DeleteFlavorModal-C3cb7YiJ.mjs.map} +1 -1
- package/dist/client/{EditSecurityGroupModal-CWHHx2Xk.mjs → EditSecurityGroupModal-CpP54WIK.mjs} +18 -18
- package/dist/client/{EditSecurityGroupModal-CWHHx2Xk.mjs.map → EditSecurityGroupModal-CpP54WIK.mjs.map} +1 -1
- package/dist/client/{FiltersInput-UKJpNFdr.mjs → FiltersInput-DxcyR6Bp.mjs} +18 -18
- package/dist/client/{FiltersInput-UKJpNFdr.mjs.map → FiltersInput-DxcyR6Bp.mjs.map} +1 -1
- package/dist/client/{FloatingIpActionModals-caXn6bYo.mjs → FloatingIpActionModals-BP8RWHbu.mjs} +55 -55
- package/dist/client/{FloatingIpActionModals-caXn6bYo.mjs.map → FloatingIpActionModals-BP8RWHbu.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications-BWimIzu_.mjs → ImageToastNotifications-TZ3EfQg-.mjs} +323 -371
- package/dist/client/ImageToastNotifications-TZ3EfQg-.mjs.map +1 -0
- package/dist/client/{RouteError-CUj_m3gu.mjs → RouteError-QSV7qOoJ.mjs} +2 -2
- package/dist/client/{RouteError-CUj_m3gu.mjs.map → RouteError-QSV7qOoJ.mjs.map} +1 -1
- package/dist/client/{SortInput-GQlQBlAj.mjs → SortInput-CYv2_Pur.mjs} +5 -5
- package/dist/client/{SortInput-GQlQBlAj.mjs.map → SortInput-CYv2_Pur.mjs.map} +1 -1
- package/dist/client/_auth-DXJkv9QO.mjs.map +1 -1
- package/dist/client/{_flavorId-sUWG0xuy.mjs → _flavorId-C2x43-6S.mjs} +9 -9
- package/dist/client/{_flavorId-sUWG0xuy.mjs.map → _flavorId-C2x43-6S.mjs.map} +1 -1
- package/dist/client/{_flavorId-C5dc1N_j.mjs → _flavorId-CR8ZUI-P.mjs} +46 -46
- package/dist/client/{_flavorId-C5dc1N_j.mjs.map → _flavorId-CR8ZUI-P.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-CT4y-60o.mjs → _floatingIpId-BCk41_Lb.mjs} +2 -2
- package/dist/client/{_floatingIpId-CT4y-60o.mjs.map → _floatingIpId-BCk41_Lb.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-COK_TBrz2.mjs → _floatingIpId-BGrOAmPT.mjs} +33 -33
- package/dist/client/_floatingIpId-BGrOAmPT.mjs.map +1 -0
- package/dist/client/_imageId-CvfD832b.mjs +534 -0
- package/dist/client/{_imageId-n3RcnhAR.mjs.map → _imageId-CvfD832b.mjs.map} +1 -1
- package/dist/client/_pcaId-BxBt5DXi.mjs +459 -0
- package/dist/client/_pcaId-BxBt5DXi.mjs.map +1 -0
- package/dist/client/{_pcaId-ChnM_t-9.mjs → _pcaId-DOHycvCf.mjs} +2 -2
- package/dist/client/{_pcaId-ChnM_t-9.mjs.map → _pcaId-DOHycvCf.mjs.map} +1 -1
- package/dist/client/{_projectId-26bw-_rm.mjs → _projectId-BDSWnMGj.mjs} +3 -3
- package/dist/client/{_projectId-26bw-_rm.mjs.map → _projectId-BDSWnMGj.mjs.map} +1 -1
- package/dist/client/{_projectId-Dhb4AyBD.mjs → _projectId-DOgwFiqD.mjs} +2 -2
- package/dist/client/{_projectId-Dhb4AyBD.mjs.map → _projectId-DOgwFiqD.mjs.map} +1 -1
- package/dist/client/_projectId-DS4nR59B.mjs +299 -0
- package/dist/client/_projectId-DS4nR59B.mjs.map +1 -0
- package/dist/client/{_projectId-BK9UqeYw.mjs → _projectId-MxcHrXW4.mjs} +12 -12
- package/dist/client/_projectId-MxcHrXW4.mjs.map +1 -0
- package/dist/client/{_securityGroupId-CR1mKICQ.mjs → _securityGroupId-CJJanWiY.mjs} +2 -2
- package/dist/client/{_securityGroupId-CR1mKICQ.mjs.map → _securityGroupId-CJJanWiY.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-DroYG6cA.mjs → _securityGroupId-KKw4RPdH.mjs} +328 -328
- package/dist/client/{_securityGroupId-DroYG6cA.mjs.map → _securityGroupId-KKw4RPdH.mjs.map} +1 -1
- package/dist/client/{containers-DGY2hoWw.mjs → _storageType-4wSxI__0.mjs} +18 -15
- package/dist/client/_storageType-4wSxI__0.mjs.map +1 -0
- package/dist/client/{containers-ZMFTRaQL.mjs → _storageType-DYjo-6ej.mjs} +1054 -1088
- package/dist/client/_storageType-DYjo-6ej.mjs.map +1 -0
- package/dist/client/{containers-xfsYgRyf.mjs → _storageType-zeSZe--V.mjs} +2 -2
- package/dist/client/_storageType-zeSZe--V.mjs.map +1 -0
- package/dist/client/{about-969pIiZ9.mjs → about-Bo9vxGHy.mjs} +8 -8
- package/dist/client/{about-969pIiZ9.mjs.map → about-Bo9vxGHy.mjs.map} +1 -1
- package/dist/client/{build-DracvfrJ.mjs → build-DeJcDjPi.mjs} +3798 -3372
- package/dist/client/build-DeJcDjPi.mjs.map +1 -0
- package/dist/client/constants-BmcGYeR-.mjs +153 -0
- package/dist/client/constants-BmcGYeR-.mjs.map +1 -0
- package/dist/client/{flavors-C4GtoybP.mjs → flavors-BxFVqgnb.mjs} +2 -2
- package/dist/client/{flavors-C4GtoybP.mjs.map → flavors-BxFVqgnb.mjs.map} +1 -1
- package/dist/client/{flavors-CpirO_nr.mjs → flavors-CfdgjsZY.mjs} +192 -192
- package/dist/client/{flavors-CpirO_nr.mjs.map → flavors-CfdgjsZY.mjs.map} +1 -1
- package/dist/client/{floatingips-BUf_oLRl.mjs → floatingips-ByRb82wS.mjs} +123 -123
- package/dist/client/{floatingips-BUf_oLRl.mjs.map → floatingips-ByRb82wS.mjs.map} +1 -1
- package/dist/client/{images-Da1t5KPh.mjs → images-CKqIXUq52.mjs} +613 -613
- package/dist/client/images-CKqIXUq52.mjs.map +1 -0
- package/dist/client/{images-CsonlmFx.mjs → images-C_dX7nY6.mjs} +2 -2
- package/dist/client/{images-CsonlmFx.mjs.map → images-C_dX7nY6.mjs.map} +1 -1
- package/dist/client/{images-QnWf63uj.mjs → images-CenluYV8.mjs} +2 -2
- package/dist/client/{images-QnWf63uj.mjs.map → images-CenluYV8.mjs.map} +1 -1
- package/dist/client/index.js +391 -431
- package/dist/client/index.js.map +1 -1
- package/dist/client/{md-sBiSNVSQ.mjs → md-CYTrL5dq.mjs} +52 -16
- package/dist/client/{md-sBiSNVSQ.mjs.map → md-CYTrL5dq.mjs.map} +1 -1
- package/dist/client/{objects-H0NN_Sja.mjs → objects-BJM6YeuF.mjs} +2131 -1883
- package/dist/client/objects-BJM6YeuF.mjs.map +1 -0
- package/dist/client/{objects-B89dYCBq.mjs → objects-gxSjvbvF.mjs} +36 -21
- package/dist/client/objects-gxSjvbvF.mjs.map +1 -0
- package/dist/client/{objects-CuFLUOe1.mjs → objects-o2Cj_ndZ.mjs} +2 -2
- package/dist/client/objects-o2Cj_ndZ.mjs.map +1 -0
- package/dist/client/{pca-CtU6REww.mjs → pca-Bl8NmoVZ.mjs} +2 -2
- package/dist/client/{pca-CtU6REww.mjs.map → pca-Bl8NmoVZ.mjs.map} +1 -1
- package/dist/client/pca-RSiWpJs9.mjs +182 -0
- package/dist/client/pca-RSiWpJs9.mjs.map +1 -0
- package/dist/client/{projects-DNXsDnJM.mjs → projects-CgclWI16.mjs} +33 -27
- package/dist/client/{projects-DNXsDnJM.mjs.map → projects-CgclWI16.mjs.map} +1 -1
- package/dist/client/{projects-dhnQkuvV.mjs → projects-D2iewAzu.mjs} +2 -2
- package/dist/client/{projects-dhnQkuvV.mjs.map → projects-D2iewAzu.mjs.map} +1 -1
- package/dist/client/{projects-C-sjd9T5.mjs → projects-pe2_dCnV.mjs} +2 -2
- package/dist/client/{projects-C-sjd9T5.mjs.map → projects-pe2_dCnV.mjs.map} +1 -1
- package/dist/client/projects-yiK0HGSA.mjs.map +1 -1
- package/dist/client/{securitygroups-wHdrxZXd.mjs → securitygroups-DahZkVYQ.mjs} +111 -111
- package/dist/client/{securitygroups-wHdrxZXd.mjs.map → securitygroups-DahZkVYQ.mjs.map} +1 -1
- package/dist/client/{useListWithFiltering-DrgUwXef.mjs → useListWithFiltering-DaYcu5AB.mjs} +12 -12
- package/dist/client/{useListWithFiltering-DrgUwXef.mjs.map → useListWithFiltering-DaYcu5AB.mjs.map} +1 -1
- package/dist/server/index.d.ts +571 -2
- package/dist/server/index.js +29 -211
- package/package.json +4 -5
- package/dist/client/ImageToastNotifications-BWimIzu_.mjs.map +0 -1
- package/dist/client/_floatingIpId-COK_TBrz2.mjs.map +0 -1
- package/dist/client/_imageId-n3RcnhAR.mjs +0 -534
- package/dist/client/_pcaId-B-f_6kqs.mjs +0 -466
- package/dist/client/_pcaId-B-f_6kqs.mjs.map +0 -1
- package/dist/client/_projectId-BK9UqeYw.mjs.map +0 -1
- package/dist/client/_projectId-CCtpAQ8m.mjs +0 -299
- package/dist/client/_projectId-CCtpAQ8m.mjs.map +0 -1
- package/dist/client/build-DracvfrJ.mjs.map +0 -1
- package/dist/client/constants-4lVQXort.mjs +0 -128
- package/dist/client/constants-4lVQXort.mjs.map +0 -1
- package/dist/client/containers-DGY2hoWw.mjs.map +0 -1
- package/dist/client/containers-ZMFTRaQL.mjs.map +0 -1
- package/dist/client/containers-xfsYgRyf.mjs.map +0 -1
- package/dist/client/images-Da1t5KPh.mjs.map +0 -1
- package/dist/client/objects-B89dYCBq.mjs.map +0 -1
- package/dist/client/objects-CuFLUOe1.mjs.map +0 -1
- package/dist/client/objects-H0NN_Sja.mjs.map +0 -1
- package/dist/client/pca-C-UFjicP.mjs +0 -167
- package/dist/client/pca-C-UFjicP.mjs.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as e, B as t, F as n, G as r, H as i, O as a, P as o, Q as s, R as c, U as l, Y as u, a as d, ct as f, et as p, f as m, i as h, it as g, k as _, lt as v, q as y, r as b, s as x, t as S, tt as C, u as w, v as T, w as E } from "./build-DeJcDjPi.mjs";
|
|
2
2
|
import { r as D } from "./trpcClient-BzPUgiM2.mjs";
|
|
3
|
-
import { t as O } from "./_securityGroupId-
|
|
3
|
+
import { t as O } from "./_securityGroupId-CJJanWiY.mjs";
|
|
4
4
|
import { t as k } from "./useModal-DCs1OJh7.mjs";
|
|
5
5
|
import { t as A } from "./useProjectId-DBc5lpoU.mjs";
|
|
6
6
|
import "./hooks-dSArr2Ca.mjs";
|
|
7
|
-
import { n as j, t as M } from "./useListWithFiltering-
|
|
8
|
-
import { t as N } from "./EditSecurityGroupModal-
|
|
7
|
+
import { n as j, t as M } from "./useListWithFiltering-DaYcu5AB.mjs";
|
|
8
|
+
import { t as N } from "./EditSecurityGroupModal-CpP54WIK.mjs";
|
|
9
9
|
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
10
10
|
import { useEffect as L, useMemo as R, useState as z } from "react";
|
|
11
11
|
import { useNavigate as B } from "@tanstack/react-router";
|
|
@@ -16,7 +16,7 @@ import { useForm as W, useStore as G } from "@tanstack/react-form";
|
|
|
16
16
|
function K({ name: e, id: t }) {
|
|
17
17
|
return /*#__PURE__*/ I("div", {
|
|
18
18
|
className: "mb-2",
|
|
19
|
-
children: [/*#__PURE__*/ F(
|
|
19
|
+
children: [/*#__PURE__*/ F(y, { children: `'${e || t}' Details` }), /*#__PURE__*/ F("p", {
|
|
20
20
|
className: "text-theme-secondary mt-2 text-sm",
|
|
21
21
|
children: /*#__PURE__*/ F(V, { id: "kIuDMT" })
|
|
22
22
|
})]
|
|
@@ -24,61 +24,61 @@ function K({ name: e, id: t }) {
|
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupBasicInfo.tsx
|
|
27
|
-
function q({ securityGroup: e, onEdit: t, isReadOnly:
|
|
28
|
-
let { i18n:
|
|
27
|
+
function q({ securityGroup: e, onEdit: t, isReadOnly: i = !1 }) {
|
|
28
|
+
let { i18n: a, _: o } = H(), s = ({ value: e }) => /*#__PURE__*/ F("span", { children: e ? a._({ id: "l75CjT" }) : a._({ id: "1UzENP" }) });
|
|
29
29
|
return /*#__PURE__*/ I("div", { children: [/*#__PURE__*/ F("div", {
|
|
30
30
|
className: "mb-4 flex flex-row-reverse",
|
|
31
|
-
children: t && !
|
|
31
|
+
children: t && !i && /*#__PURE__*/ F(f, {
|
|
32
32
|
variant: "primary",
|
|
33
33
|
onClick: t,
|
|
34
|
-
disabled:
|
|
34
|
+
disabled: i,
|
|
35
35
|
children: /*#__PURE__*/ F(V, { id: "ePK91l" })
|
|
36
36
|
})
|
|
37
|
-
}), /*#__PURE__*/ I(
|
|
37
|
+
}), /*#__PURE__*/ I(_, {
|
|
38
38
|
columns: 4,
|
|
39
39
|
gridColumnTemplate: "15% 35% 15% 35%",
|
|
40
40
|
children: [
|
|
41
|
-
/*#__PURE__*/ I(
|
|
41
|
+
/*#__PURE__*/ I(E, { children: [/*#__PURE__*/ F(n, { children: a._({ id: "Nu4oKW" }) }), /*#__PURE__*/ F(r, {
|
|
42
42
|
colSpan: 3,
|
|
43
43
|
children: /*#__PURE__*/ F("div", {
|
|
44
44
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
45
45
|
title: e.description || void 0,
|
|
46
|
-
children: e.description ||
|
|
46
|
+
children: e.description || a._({ id: "h47p9L" })
|
|
47
47
|
})
|
|
48
48
|
})] }),
|
|
49
|
-
/*#__PURE__*/ I(
|
|
50
|
-
/*#__PURE__*/ F(
|
|
51
|
-
/*#__PURE__*/ F(
|
|
49
|
+
/*#__PURE__*/ I(E, { children: [
|
|
50
|
+
/*#__PURE__*/ F(n, { children: a._({ id: "S0kLOH" }) }),
|
|
51
|
+
/*#__PURE__*/ F(r, { children: /*#__PURE__*/ F("div", {
|
|
52
52
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
53
53
|
title: e.id,
|
|
54
54
|
children: e.id
|
|
55
55
|
}) }),
|
|
56
|
-
/*#__PURE__*/ F(
|
|
57
|
-
/*#__PURE__*/ F(
|
|
56
|
+
/*#__PURE__*/ F(n, { children: a._({ id: "OYHzN1" }) }),
|
|
57
|
+
/*#__PURE__*/ F(r, { children: /*#__PURE__*/ F("div", {
|
|
58
58
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
59
59
|
title: e.tags?.join(", ") || void 0,
|
|
60
|
-
children: e.tags?.join(", ") ||
|
|
60
|
+
children: e.tags?.join(", ") || a._({ id: "h47p9L" })
|
|
61
61
|
}) })
|
|
62
62
|
] }),
|
|
63
|
-
/*#__PURE__*/ I(
|
|
64
|
-
/*#__PURE__*/ F(
|
|
65
|
-
/*#__PURE__*/ F(
|
|
63
|
+
/*#__PURE__*/ I(E, { children: [
|
|
64
|
+
/*#__PURE__*/ F(n, { children: a._({ id: "6YtxFj" }) }),
|
|
65
|
+
/*#__PURE__*/ F(r, { children: /*#__PURE__*/ F("div", {
|
|
66
66
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
67
67
|
title: e.name || void 0,
|
|
68
68
|
children: e.name
|
|
69
69
|
}) }),
|
|
70
|
-
/*#__PURE__*/ F(
|
|
71
|
-
/*#__PURE__*/ F(
|
|
70
|
+
/*#__PURE__*/ F(n, { children: a._({ id: "Jim5X9" }) }),
|
|
71
|
+
/*#__PURE__*/ F(r, { children: /*#__PURE__*/ F(s, { value: e.stateful }) })
|
|
72
72
|
] }),
|
|
73
|
-
/*#__PURE__*/ I(
|
|
74
|
-
/*#__PURE__*/ F(
|
|
75
|
-
/*#__PURE__*/ F(
|
|
73
|
+
/*#__PURE__*/ I(E, { children: [
|
|
74
|
+
/*#__PURE__*/ F(n, { children: a._({ id: "aI8Tgp" }) }),
|
|
75
|
+
/*#__PURE__*/ F(r, { children: /*#__PURE__*/ F("div", {
|
|
76
76
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
77
77
|
title: e.project_id || void 0,
|
|
78
|
-
children: e.project_id ||
|
|
78
|
+
children: e.project_id || a._({ id: "h47p9L" })
|
|
79
79
|
}) }),
|
|
80
|
-
/*#__PURE__*/ F(
|
|
81
|
-
/*#__PURE__*/ F(
|
|
80
|
+
/*#__PURE__*/ F(n, { children: a._({ id: "0Gd0NU" }) }),
|
|
81
|
+
/*#__PURE__*/ F(r, { children: /*#__PURE__*/ F(s, { value: e.shared }) })
|
|
82
82
|
] })
|
|
83
83
|
]
|
|
84
84
|
})] });
|
|
@@ -89,7 +89,7 @@ function J({ activeTab: e, onTabChange: t, showRBACTab: n = !0 }) {
|
|
|
89
89
|
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
90
|
return /*#__PURE__*/ F("div", {
|
|
91
91
|
className: "border-theme-background-lvl-3 mt-1 border-b",
|
|
92
|
-
children: /*#__PURE__*/ I(
|
|
92
|
+
children: /*#__PURE__*/ I(s, {
|
|
93
93
|
direction: "horizontal",
|
|
94
94
|
gap: "0",
|
|
95
95
|
children: [/*#__PURE__*/ F("button", {
|
|
@@ -106,34 +106,34 @@ function J({ activeTab: e, onTabChange: t, showRBACTab: n = !0 }) {
|
|
|
106
106
|
}
|
|
107
107
|
//#endregion
|
|
108
108
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/DeleteRuleDialog.tsx
|
|
109
|
-
function Y({ rule:
|
|
110
|
-
let { i18n: s, _:
|
|
111
|
-
|
|
112
|
-
},
|
|
109
|
+
function Y({ rule: e, open: n, onClose: r, onConfirm: i, isLoading: a, error: o }) {
|
|
110
|
+
let { i18n: s, _: c } = H(), [u, d] = z(""), p = () => {
|
|
111
|
+
e && u === "delete" && i(e.id);
|
|
112
|
+
}, g = () => {
|
|
113
113
|
d(""), r();
|
|
114
|
-
},
|
|
115
|
-
return
|
|
114
|
+
}, _ = u !== "delete" || a;
|
|
115
|
+
return e ? /*#__PURE__*/ F(b, {
|
|
116
116
|
open: n,
|
|
117
|
-
onCancel:
|
|
117
|
+
onCancel: g,
|
|
118
118
|
size: "small",
|
|
119
119
|
title: s._({ id: "TM93nK" }),
|
|
120
|
-
modalFooter: /*#__PURE__*/ F(
|
|
120
|
+
modalFooter: /*#__PURE__*/ F(m, {
|
|
121
121
|
className: "flex justify-end",
|
|
122
|
-
children: /*#__PURE__*/ I(
|
|
122
|
+
children: /*#__PURE__*/ I(h, { children: [/*#__PURE__*/ F(f, {
|
|
123
123
|
variant: "default",
|
|
124
|
-
onClick:
|
|
124
|
+
onClick: g,
|
|
125
125
|
disabled: a,
|
|
126
126
|
children: /*#__PURE__*/ F(V, { id: "dEgA5A" })
|
|
127
|
-
}), /*#__PURE__*/ F(
|
|
127
|
+
}), /*#__PURE__*/ F(f, {
|
|
128
128
|
variant: "primary-danger",
|
|
129
|
-
onClick:
|
|
130
|
-
disabled:
|
|
129
|
+
onClick: p,
|
|
130
|
+
disabled: _,
|
|
131
131
|
"data-testid": "confirm-delete-rule-button",
|
|
132
132
|
children: a ? /*#__PURE__*/ F(V, { id: "EF2EU9" }) : /*#__PURE__*/ F(V, { id: "lN3xvy" })
|
|
133
133
|
})] })
|
|
134
134
|
}),
|
|
135
135
|
children: /*#__PURE__*/ I("div", { children: [
|
|
136
|
-
o && /*#__PURE__*/ F(
|
|
136
|
+
o && /*#__PURE__*/ F(t, {
|
|
137
137
|
dismissible: !1,
|
|
138
138
|
variant: "error",
|
|
139
139
|
className: "mt-4",
|
|
@@ -151,38 +151,38 @@ function Y({ rule: t, open: n, onClose: r, onConfirm: i, isLoading: a, error: o
|
|
|
151
151
|
/*#__PURE__*/ I("li", { children: [
|
|
152
152
|
/*#__PURE__*/ F(V, { id: "MRB7nI" }),
|
|
153
153
|
": ",
|
|
154
|
-
|
|
154
|
+
e.direction
|
|
155
155
|
] }),
|
|
156
|
-
|
|
156
|
+
e.description && /*#__PURE__*/ I("li", { children: [
|
|
157
157
|
/*#__PURE__*/ F(V, { id: "Nu4oKW" }),
|
|
158
158
|
": ",
|
|
159
|
-
|
|
159
|
+
e.description
|
|
160
160
|
] }),
|
|
161
161
|
/*#__PURE__*/ I("li", { children: [
|
|
162
162
|
/*#__PURE__*/ F(V, { id: "yp0UjB" }),
|
|
163
163
|
": ",
|
|
164
|
-
|
|
164
|
+
e.ethertype
|
|
165
165
|
] }),
|
|
166
|
-
|
|
166
|
+
e.protocol && /*#__PURE__*/ I("li", { children: [
|
|
167
167
|
/*#__PURE__*/ F(V, { id: "6+OdGi" }),
|
|
168
168
|
": ",
|
|
169
|
-
|
|
169
|
+
e.protocol
|
|
170
170
|
] }),
|
|
171
|
-
|
|
171
|
+
e.port_range_min !== null && e.port_range_max !== null && /*#__PURE__*/ I("li", { children: [
|
|
172
172
|
/*#__PURE__*/ F(V, { id: "tV/Ozb" }),
|
|
173
173
|
":",
|
|
174
174
|
" ",
|
|
175
|
-
|
|
175
|
+
e.port_range_min === e.port_range_max ? e.port_range_min : `${e.port_range_min}-${e.port_range_max}`
|
|
176
176
|
] }),
|
|
177
|
-
|
|
177
|
+
e.remote_ip_prefix && /*#__PURE__*/ I("li", { children: [
|
|
178
178
|
/*#__PURE__*/ F(V, { id: "WoSkGY" }),
|
|
179
179
|
": ",
|
|
180
|
-
|
|
180
|
+
e.remote_ip_prefix
|
|
181
181
|
] }),
|
|
182
|
-
|
|
182
|
+
e.remote_group_id && /*#__PURE__*/ I("li", { children: [
|
|
183
183
|
/*#__PURE__*/ F(V, { id: "i9TIyi" }),
|
|
184
184
|
": ",
|
|
185
|
-
|
|
185
|
+
e.remote_group_id
|
|
186
186
|
] })
|
|
187
187
|
]
|
|
188
188
|
})]
|
|
@@ -195,7 +195,7 @@ function Y({ rule: t, open: n, onClose: r, onConfirm: i, isLoading: a, error: o
|
|
|
195
195
|
id: "PHt+EV",
|
|
196
196
|
components: { 0: /*#__PURE__*/ F("strong", {}) }
|
|
197
197
|
})
|
|
198
|
-
}), /*#__PURE__*/ F(
|
|
198
|
+
}), /*#__PURE__*/ F(l, {
|
|
199
199
|
value: u,
|
|
200
200
|
onChange: (e) => d(e.target.value),
|
|
201
201
|
placeholder: s._({ id: "HNlEFZ" }),
|
|
@@ -551,9 +551,9 @@ function se({ form: e, disabled: t = !1 }) {
|
|
|
551
551
|
return /*#__PURE__*/ F(e.Field, {
|
|
552
552
|
name: "ruleType",
|
|
553
553
|
mode: "value",
|
|
554
|
-
children: (r) => /*#__PURE__*/ F(
|
|
554
|
+
children: (r) => /*#__PURE__*/ F(x, {
|
|
555
555
|
className: "mb-6",
|
|
556
|
-
children: /*#__PURE__*/ F(
|
|
556
|
+
children: /*#__PURE__*/ F(v, {
|
|
557
557
|
id: "ruleType",
|
|
558
558
|
label: n._({ id: "YuGQWb" }),
|
|
559
559
|
value: r.state.value,
|
|
@@ -567,10 +567,10 @@ function se({ form: e, disabled: t = !1 }) {
|
|
|
567
567
|
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
568
|
},
|
|
569
569
|
disabled: t,
|
|
570
|
-
children: Q.map((e) => e.value === "" ? /*#__PURE__*/ F(
|
|
570
|
+
children: Q.map((e) => e.value === "" ? /*#__PURE__*/ F(w, {
|
|
571
571
|
value: e.value,
|
|
572
572
|
label: n._({ id: "eh/k36" })
|
|
573
|
-
}, e.value) : /*#__PURE__*/ F(
|
|
573
|
+
}, e.value) : /*#__PURE__*/ F(w, {
|
|
574
574
|
value: e.value,
|
|
575
575
|
label: e.label
|
|
576
576
|
}, e.value))
|
|
@@ -584,7 +584,7 @@ function ce({ form: e, disabled: t = !1 }) {
|
|
|
584
584
|
let { i18n: n, _: r } = H();
|
|
585
585
|
return /*#__PURE__*/ F(e.Field, {
|
|
586
586
|
name: "direction",
|
|
587
|
-
children: (e) => /*#__PURE__*/ F(
|
|
587
|
+
children: (e) => /*#__PURE__*/ F(x, { children: /*#__PURE__*/ F(S, {
|
|
588
588
|
name: "direction",
|
|
589
589
|
label: n._({ id: "MRB7nI" }),
|
|
590
590
|
selected: e.state.value,
|
|
@@ -608,7 +608,7 @@ function le({ form: e, disabled: t = !1 }) {
|
|
|
608
608
|
let { i18n: n, _: r } = H();
|
|
609
609
|
return /*#__PURE__*/ F(e.Field, {
|
|
610
610
|
name: "ethertype",
|
|
611
|
-
children: (e) => /*#__PURE__*/ F(
|
|
611
|
+
children: (e) => /*#__PURE__*/ F(x, { children: /*#__PURE__*/ F(S, {
|
|
612
612
|
name: "ethertype",
|
|
613
613
|
label: n._({ id: "16085O" }),
|
|
614
614
|
selected: e.state.value,
|
|
@@ -634,9 +634,9 @@ function ue({ form: e, disabled: t = !1 }) {
|
|
|
634
634
|
let { i18n: n, _: r } = H();
|
|
635
635
|
return /*#__PURE__*/ F(e.Field, {
|
|
636
636
|
name: "protocol",
|
|
637
|
-
children: (e) => /*#__PURE__*/ F(
|
|
637
|
+
children: (e) => /*#__PURE__*/ F(x, {
|
|
638
638
|
className: "mb-6",
|
|
639
|
-
children: /*#__PURE__*/ F(
|
|
639
|
+
children: /*#__PURE__*/ F(l, {
|
|
640
640
|
id: "protocol",
|
|
641
641
|
name: "protocol",
|
|
642
642
|
label: n._({ id: "6+OdGi" }),
|
|
@@ -653,7 +653,7 @@ function ue({ form: e, disabled: t = !1 }) {
|
|
|
653
653
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/PortRangeSection.tsx
|
|
654
654
|
function de({ form: e, disabled: t = !1 }) {
|
|
655
655
|
let { i18n: n, _: r } = H(), i = G(e.store, (e) => e.values.portFrom), a = G(e.store, (e) => e.fieldMeta.portFrom?.errors[0]?.message), o = G(e.store, (e) => e.fieldMeta.portTo?.errors[0]?.message), s = t || !i || i.trim() === "";
|
|
656
|
-
return /*#__PURE__*/ I(
|
|
656
|
+
return /*#__PURE__*/ I(x, {
|
|
657
657
|
className: "mb-6",
|
|
658
658
|
children: [
|
|
659
659
|
/*#__PURE__*/ I("div", {
|
|
@@ -663,7 +663,7 @@ function de({ form: e, disabled: t = !1 }) {
|
|
|
663
663
|
name: "portFrom",
|
|
664
664
|
children: (r) => /*#__PURE__*/ F("div", {
|
|
665
665
|
className: "flex-1",
|
|
666
|
-
children: /*#__PURE__*/ F(
|
|
666
|
+
children: /*#__PURE__*/ F(l, {
|
|
667
667
|
id: "portFrom",
|
|
668
668
|
name: "portFrom",
|
|
669
669
|
label: n._({ id: "LMdsuJ" }),
|
|
@@ -686,7 +686,7 @@ function de({ form: e, disabled: t = !1 }) {
|
|
|
686
686
|
name: "portTo",
|
|
687
687
|
children: (t) => /*#__PURE__*/ F("div", {
|
|
688
688
|
className: "flex-1",
|
|
689
|
-
children: /*#__PURE__*/ F(
|
|
689
|
+
children: /*#__PURE__*/ F(l, {
|
|
690
690
|
id: "portTo",
|
|
691
691
|
name: "portTo",
|
|
692
692
|
label: n._({ id: "a12lSo" }),
|
|
@@ -717,7 +717,7 @@ function de({ form: e, disabled: t = !1 }) {
|
|
|
717
717
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/IcmpSection.tsx
|
|
718
718
|
function fe({ form: e, disabled: t = !1 }) {
|
|
719
719
|
let { i18n: n, _: r } = H();
|
|
720
|
-
return /*#__PURE__*/ F(
|
|
720
|
+
return /*#__PURE__*/ F(x, {
|
|
721
721
|
className: "mb-6",
|
|
722
722
|
children: /*#__PURE__*/ I("div", {
|
|
723
723
|
className: "flex w-full gap-4",
|
|
@@ -725,7 +725,7 @@ function fe({ form: e, disabled: t = !1 }) {
|
|
|
725
725
|
name: "icmpType",
|
|
726
726
|
children: (e) => /*#__PURE__*/ F("div", {
|
|
727
727
|
className: "flex-1",
|
|
728
|
-
children: /*#__PURE__*/ F(
|
|
728
|
+
children: /*#__PURE__*/ F(l, {
|
|
729
729
|
id: "icmpType",
|
|
730
730
|
name: "icmpType",
|
|
731
731
|
label: n._({ id: "yPWFWy" }),
|
|
@@ -740,7 +740,7 @@ function fe({ form: e, disabled: t = !1 }) {
|
|
|
740
740
|
name: "icmpCode",
|
|
741
741
|
children: (e) => /*#__PURE__*/ F("div", {
|
|
742
742
|
className: "flex-1",
|
|
743
|
-
children: /*#__PURE__*/ F(
|
|
743
|
+
children: /*#__PURE__*/ F(l, {
|
|
744
744
|
id: "icmpCode",
|
|
745
745
|
name: "icmpCode",
|
|
746
746
|
label: n._({ id: "76RKuS" }),
|
|
@@ -763,9 +763,9 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
|
763
763
|
/*#__PURE__*/ F(e.Field, {
|
|
764
764
|
name: "remoteSourceType",
|
|
765
765
|
mode: "value",
|
|
766
|
-
children: (n) => /*#__PURE__*/ F(
|
|
766
|
+
children: (n) => /*#__PURE__*/ F(x, {
|
|
767
767
|
className: "mb-1",
|
|
768
|
-
children: /*#__PURE__*/ F(
|
|
768
|
+
children: /*#__PURE__*/ F(S, {
|
|
769
769
|
name: "remoteSourceType",
|
|
770
770
|
label: r._({ id: "I5kZVK" }),
|
|
771
771
|
selected: n.state.value,
|
|
@@ -793,9 +793,9 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
|
793
793
|
name: "remoteCidr",
|
|
794
794
|
children: (n) => /*#__PURE__*/ F(e.Field, {
|
|
795
795
|
name: "ethertype",
|
|
796
|
-
children: (e) => /*#__PURE__*/ F(
|
|
796
|
+
children: (e) => /*#__PURE__*/ F(x, {
|
|
797
797
|
className: "mb-6",
|
|
798
|
-
children: /*#__PURE__*/ F(
|
|
798
|
+
children: /*#__PURE__*/ F(l, {
|
|
799
799
|
id: "remoteCidr",
|
|
800
800
|
name: "remoteCidr",
|
|
801
801
|
label: r._({ id: "vmYyLY" }),
|
|
@@ -813,19 +813,19 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
|
813
813
|
name: "remoteSourceType",
|
|
814
814
|
children: (i) => i.state.value === "security_group" ? /*#__PURE__*/ F(e.Field, {
|
|
815
815
|
name: "remoteSecurityGroupId",
|
|
816
|
-
children: (e) => /*#__PURE__*/ F(
|
|
816
|
+
children: (e) => /*#__PURE__*/ F(x, {
|
|
817
817
|
className: "mb-6",
|
|
818
|
-
children: /*#__PURE__*/ I(
|
|
818
|
+
children: /*#__PURE__*/ I(v, {
|
|
819
819
|
id: "remoteSecurityGroupId",
|
|
820
820
|
label: r._({ id: "i9TIyi" }),
|
|
821
821
|
value: e.state.value,
|
|
822
822
|
onChange: (t) => e.handleChange(String(t)),
|
|
823
823
|
errortext: e.state.meta.errors[0]?.message,
|
|
824
824
|
disabled: t,
|
|
825
|
-
children: [/*#__PURE__*/ F(
|
|
825
|
+
children: [/*#__PURE__*/ F(w, {
|
|
826
826
|
value: "",
|
|
827
827
|
label: r._({ id: "ZvIpwi" })
|
|
828
|
-
}), n.map((e) => /*#__PURE__*/ F(
|
|
828
|
+
}), n.map((e) => /*#__PURE__*/ F(w, {
|
|
829
829
|
value: e.id,
|
|
830
830
|
label: e.name || e.id
|
|
831
831
|
}, e.id))]
|
|
@@ -841,9 +841,9 @@ function me({ form: e, disabled: t = !1 }) {
|
|
|
841
841
|
let { i18n: n, _: r } = H();
|
|
842
842
|
return /*#__PURE__*/ F(e.Field, {
|
|
843
843
|
name: "description",
|
|
844
|
-
children: (e) => /*#__PURE__*/ F(
|
|
844
|
+
children: (e) => /*#__PURE__*/ F(x, {
|
|
845
845
|
className: "mb-0",
|
|
846
|
-
children: /*#__PURE__*/ F(
|
|
846
|
+
children: /*#__PURE__*/ F(p, {
|
|
847
847
|
id: "description",
|
|
848
848
|
name: "description",
|
|
849
849
|
label: n._({ id: "Nu4oKW" }),
|
|
@@ -858,111 +858,111 @@ function me({ form: e, disabled: t = !1 }) {
|
|
|
858
858
|
}
|
|
859
859
|
//#endregion
|
|
860
860
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/AddRuleModal.tsx
|
|
861
|
-
var he = ({ securityGroupId:
|
|
862
|
-
let { i18n:
|
|
861
|
+
var he = ({ securityGroupId: e, open: n, onClose: r, onCreate: a, isLoading: o = !1, error: s = null, availableSecurityGroups: l = [] }) => {
|
|
862
|
+
let { i18n: u, _: p } = H(), g = W({
|
|
863
863
|
defaultValues: oe,
|
|
864
864
|
validators: { onSubmit: ae },
|
|
865
|
-
onSubmit: async ({ value:
|
|
866
|
-
if (
|
|
865
|
+
onSubmit: async ({ value: t }) => {
|
|
866
|
+
if (o) return;
|
|
867
867
|
let n = {
|
|
868
|
-
security_group_id:
|
|
869
|
-
direction:
|
|
870
|
-
ethertype:
|
|
871
|
-
description:
|
|
872
|
-
protocol:
|
|
868
|
+
security_group_id: e,
|
|
869
|
+
direction: t.direction,
|
|
870
|
+
ethertype: t.ethertype,
|
|
871
|
+
description: t.description || void 0,
|
|
872
|
+
protocol: t.protocol || null,
|
|
873
873
|
remote_ip_prefix: void 0,
|
|
874
874
|
remote_group_id: void 0,
|
|
875
875
|
remote_address_group_id: void 0
|
|
876
876
|
};
|
|
877
|
-
if ((
|
|
878
|
-
let
|
|
879
|
-
n.port_range_min =
|
|
877
|
+
if ((t.protocol === "tcp" || t.protocol === "udp") && t.portFrom) {
|
|
878
|
+
let e = parseInt(t.portFrom, 10);
|
|
879
|
+
n.port_range_min = e, t.portTo ? n.port_range_max = parseInt(t.portTo, 10) : n.port_range_max = e;
|
|
880
880
|
}
|
|
881
|
-
(
|
|
881
|
+
(t.protocol === "icmp" || t.protocol === "ipv6-icmp") && (t.icmpType && (n.port_range_min = parseInt(t.icmpType, 10)), t.icmpCode && (n.port_range_max = parseInt(t.icmpCode, 10))), t.remoteSourceType === "cidr" && t.remoteCidr ? n.remote_ip_prefix = t.remoteCidr : t.remoteSourceType === "security_group" && t.remoteSecurityGroupId && (n.remote_group_id = t.remoteSecurityGroupId), await a(n), _();
|
|
882
882
|
}
|
|
883
|
-
}),
|
|
884
|
-
|
|
883
|
+
}), _ = () => {
|
|
884
|
+
g.reset(), r();
|
|
885
885
|
};
|
|
886
|
-
return /*#__PURE__*/ I(
|
|
886
|
+
return /*#__PURE__*/ I(b, {
|
|
887
887
|
open: n,
|
|
888
|
-
onCancel:
|
|
888
|
+
onCancel: _,
|
|
889
889
|
size: "large",
|
|
890
|
-
title:
|
|
891
|
-
modalFooter: /*#__PURE__*/ F(
|
|
890
|
+
title: u._({ id: "b2BLBa" }),
|
|
891
|
+
modalFooter: /*#__PURE__*/ F(m, {
|
|
892
892
|
className: "flex justify-end",
|
|
893
|
-
children: /*#__PURE__*/ F(
|
|
893
|
+
children: /*#__PURE__*/ F(g.Subscribe, { children: (e) => {
|
|
894
894
|
let t = !!e.values.ruleType;
|
|
895
|
-
return /*#__PURE__*/ I(
|
|
895
|
+
return /*#__PURE__*/ I(h, { children: [/*#__PURE__*/ F(f, {
|
|
896
896
|
variant: "default",
|
|
897
|
-
onClick:
|
|
898
|
-
disabled:
|
|
897
|
+
onClick: _,
|
|
898
|
+
disabled: o || e.isSubmitting,
|
|
899
899
|
children: /*#__PURE__*/ F(V, { id: "dEgA5A" })
|
|
900
|
-
}), /*#__PURE__*/ F(
|
|
900
|
+
}), /*#__PURE__*/ F(f, {
|
|
901
901
|
variant: "primary",
|
|
902
902
|
type: "button",
|
|
903
|
-
onClick: () =>
|
|
904
|
-
disabled:
|
|
903
|
+
onClick: () => g.handleSubmit(),
|
|
904
|
+
disabled: o || e.isSubmitting || !t,
|
|
905
905
|
"data-testid": "add-rule-button",
|
|
906
|
-
children: e.isSubmitting ||
|
|
906
|
+
children: e.isSubmitting || o ? /*#__PURE__*/ F(c, { size: "small" }) : /*#__PURE__*/ F(V, { id: "bmQLn5" })
|
|
907
907
|
})] });
|
|
908
908
|
} })
|
|
909
909
|
}),
|
|
910
910
|
children: [
|
|
911
|
-
s && /*#__PURE__*/ F(
|
|
911
|
+
s && /*#__PURE__*/ F(t, {
|
|
912
912
|
dismissible: !1,
|
|
913
913
|
variant: "error",
|
|
914
914
|
className: "mb-4",
|
|
915
915
|
children: s
|
|
916
916
|
}),
|
|
917
|
-
|
|
917
|
+
o && /*#__PURE__*/ I("div", {
|
|
918
918
|
className: "mb-4 flex items-center justify-center gap-2",
|
|
919
|
-
children: [/*#__PURE__*/ F(
|
|
919
|
+
children: [/*#__PURE__*/ F(c, { variant: "primary" }), /*#__PURE__*/ F("span", {
|
|
920
920
|
className: "text-theme-secondary text-sm",
|
|
921
921
|
children: /*#__PURE__*/ F(V, { id: "gU7JFm" })
|
|
922
922
|
})]
|
|
923
923
|
}),
|
|
924
|
-
/*#__PURE__*/ F(
|
|
924
|
+
/*#__PURE__*/ F(d, {
|
|
925
925
|
className: "mb-6",
|
|
926
926
|
onSubmit: (e) => {
|
|
927
|
-
e.preventDefault(),
|
|
927
|
+
e.preventDefault(), g.handleSubmit();
|
|
928
928
|
},
|
|
929
|
-
children: /*#__PURE__*/ I(
|
|
929
|
+
children: /*#__PURE__*/ I(i, {
|
|
930
930
|
className: "mb-6",
|
|
931
931
|
children: [/*#__PURE__*/ F(se, {
|
|
932
|
-
form:
|
|
933
|
-
disabled:
|
|
934
|
-
}), /*#__PURE__*/ F(
|
|
932
|
+
form: g,
|
|
933
|
+
disabled: o
|
|
934
|
+
}), /*#__PURE__*/ F(g.Subscribe, { children: (e) => {
|
|
935
935
|
if (!e.values.ruleType) return null;
|
|
936
936
|
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
937
|
return /*#__PURE__*/ I(P, { children: [
|
|
938
938
|
/*#__PURE__*/ F(ce, {
|
|
939
|
-
form:
|
|
940
|
-
disabled:
|
|
939
|
+
form: g,
|
|
940
|
+
disabled: o
|
|
941
941
|
}),
|
|
942
942
|
e.values.ruleType === "other-protocol" && /*#__PURE__*/ F(ue, {
|
|
943
|
-
form:
|
|
944
|
-
disabled:
|
|
943
|
+
form: g,
|
|
944
|
+
disabled: o
|
|
945
945
|
}),
|
|
946
946
|
t && /*#__PURE__*/ F(de, {
|
|
947
|
-
form:
|
|
948
|
-
disabled:
|
|
947
|
+
form: g,
|
|
948
|
+
disabled: o
|
|
949
949
|
}),
|
|
950
950
|
n && /*#__PURE__*/ F(fe, {
|
|
951
|
-
form:
|
|
952
|
-
disabled:
|
|
951
|
+
form: g,
|
|
952
|
+
disabled: o
|
|
953
953
|
}),
|
|
954
954
|
/*#__PURE__*/ F(pe, {
|
|
955
|
-
form:
|
|
956
|
-
disabled:
|
|
957
|
-
availableSecurityGroups:
|
|
955
|
+
form: g,
|
|
956
|
+
disabled: o,
|
|
957
|
+
availableSecurityGroups: l
|
|
958
958
|
}),
|
|
959
959
|
e.values.remoteSourceType === "security_group" && /*#__PURE__*/ F(le, {
|
|
960
|
-
form:
|
|
961
|
-
disabled:
|
|
960
|
+
form: g,
|
|
961
|
+
disabled: o
|
|
962
962
|
}),
|
|
963
963
|
/*#__PURE__*/ F(me, {
|
|
964
|
-
form:
|
|
965
|
-
disabled:
|
|
964
|
+
form: g,
|
|
965
|
+
disabled: o
|
|
966
966
|
})
|
|
967
967
|
] });
|
|
968
968
|
} })]
|
|
@@ -973,22 +973,22 @@ var he = ({ securityGroupId: t, open: n, onClose: r, onCreate: i, isLoading: a =
|
|
|
973
973
|
};
|
|
974
974
|
//#endregion
|
|
975
975
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupRulesTable.tsx
|
|
976
|
-
function ge({ rules: e, totalRulesCount: t, onDeleteRule:
|
|
977
|
-
let { i18n:
|
|
976
|
+
function ge({ rules: e, totalRulesCount: t, onDeleteRule: i, isDeletingRule: a, deleteError: c, searchTerm: l = "", onSearchChange: u, sortSettings: d, onSortChange: p, filterSettings: m, onFilterChange: h, securityGroupId: v, onCreateRule: y, isCreatingRule: b = !1, createRuleError: x = null, availableSecurityGroups: S = [], readOnly: w = !1 }) {
|
|
977
|
+
let { i18n: T, _: D } = H(), [O, A] = z(null), [M, N] = k(), R = (e) => {
|
|
978
978
|
A(e);
|
|
979
979
|
}, B = (e) => {
|
|
980
|
-
|
|
980
|
+
i(e);
|
|
981
981
|
}, U = () => {
|
|
982
|
-
|
|
982
|
+
a || A(null);
|
|
983
983
|
};
|
|
984
984
|
L(() => {
|
|
985
|
-
!
|
|
986
|
-
}, [
|
|
985
|
+
!a && !c && A(null);
|
|
986
|
+
}, [a, c]);
|
|
987
987
|
let W = (e) => {
|
|
988
988
|
if (e.protocol === "icmp" || e.protocol === "ipv6-icmp") {
|
|
989
989
|
if (e.port_range_min !== null && e.port_range_max !== null) {
|
|
990
990
|
let t = e.port_range_min, n = e.port_range_max;
|
|
991
|
-
return
|
|
991
|
+
return T._({
|
|
992
992
|
id: "0p+s6m",
|
|
993
993
|
values: {
|
|
994
994
|
typeValue: t,
|
|
@@ -996,53 +996,53 @@ function ge({ rules: e, totalRulesCount: t, onDeleteRule: o, isDeletingRule: s,
|
|
|
996
996
|
}
|
|
997
997
|
});
|
|
998
998
|
}
|
|
999
|
-
return
|
|
999
|
+
return T._({ id: "eKC+EC" });
|
|
1000
1000
|
}
|
|
1001
|
-
return e.port_range_min === null || e.port_range_max === null ?
|
|
1001
|
+
return e.port_range_min === null || e.port_range_max === null ? T._({ id: "eKC+EC" }) : e.port_range_min === e.port_range_max ? String(e.port_range_min) : `${e.port_range_min}-${e.port_range_max}`;
|
|
1002
1002
|
};
|
|
1003
1003
|
return /*#__PURE__*/ I(P, { children: [
|
|
1004
|
-
/*#__PURE__*/ I(
|
|
1004
|
+
/*#__PURE__*/ I(s, {
|
|
1005
1005
|
direction: "vertical",
|
|
1006
1006
|
gap: "4",
|
|
1007
1007
|
children: [/*#__PURE__*/ F(j, {
|
|
1008
1008
|
totalCount: t ?? e.length,
|
|
1009
1009
|
filteredCount: e.length,
|
|
1010
|
-
itemName:
|
|
1011
|
-
filterSettings:
|
|
1012
|
-
onFilter:
|
|
1013
|
-
sortSettings:
|
|
1014
|
-
onSort:
|
|
1015
|
-
searchTerm:
|
|
1016
|
-
onSearch:
|
|
1017
|
-
actions: !
|
|
1010
|
+
itemName: T._({ id: "j9hkgJ" }),
|
|
1011
|
+
filterSettings: m,
|
|
1012
|
+
onFilter: h,
|
|
1013
|
+
sortSettings: d,
|
|
1014
|
+
onSort: p,
|
|
1015
|
+
searchTerm: l,
|
|
1016
|
+
onSearch: u,
|
|
1017
|
+
actions: !w && y && /*#__PURE__*/ F(f, {
|
|
1018
1018
|
variant: "primary",
|
|
1019
1019
|
icon: "addCircle",
|
|
1020
1020
|
onClick: N,
|
|
1021
1021
|
children: /*#__PURE__*/ F(V, { id: "O8tK4v" })
|
|
1022
1022
|
})
|
|
1023
|
-
}), e.length === 0 ? /*#__PURE__*/ F(V, { id: "nnxwBn" }) : /*#__PURE__*/ I(
|
|
1024
|
-
columns:
|
|
1023
|
+
}), e.length === 0 ? /*#__PURE__*/ F(V, { id: "nnxwBn" }) : /*#__PURE__*/ I(_, {
|
|
1024
|
+
columns: w ? 5 : 6,
|
|
1025
1025
|
className: "security-group-rules-table",
|
|
1026
|
-
children: [/*#__PURE__*/ I(
|
|
1027
|
-
/*#__PURE__*/ F(
|
|
1028
|
-
/*#__PURE__*/ F(
|
|
1029
|
-
/*#__PURE__*/ F(
|
|
1030
|
-
/*#__PURE__*/ F(
|
|
1031
|
-
/*#__PURE__*/ F(
|
|
1032
|
-
!
|
|
1033
|
-
] }), e.map((e) => /*#__PURE__*/ I(
|
|
1026
|
+
children: [/*#__PURE__*/ I(E, { children: [
|
|
1027
|
+
/*#__PURE__*/ F(n, { children: T._({ id: "MRB7nI" }) }),
|
|
1028
|
+
/*#__PURE__*/ F(n, { children: T._({ id: "Nu4oKW" }) }),
|
|
1029
|
+
/*#__PURE__*/ F(n, { children: T._({ id: "yp0UjB" }) }),
|
|
1030
|
+
/*#__PURE__*/ F(n, { children: T._({ id: "6+OdGi" }) }),
|
|
1031
|
+
/*#__PURE__*/ F(n, { children: T._({ id: "6jAi8c" }) }),
|
|
1032
|
+
!w && /*#__PURE__*/ F(n, { children: T._({ id: "7L01XJ" }) })
|
|
1033
|
+
] }), e.map((e) => /*#__PURE__*/ I(E, {
|
|
1034
1034
|
"data-testid": `rule-row-${e.id}`,
|
|
1035
1035
|
children: [
|
|
1036
|
-
/*#__PURE__*/ F(
|
|
1037
|
-
/*#__PURE__*/ F(
|
|
1038
|
-
/*#__PURE__*/ F(
|
|
1039
|
-
/*#__PURE__*/ F(
|
|
1040
|
-
/*#__PURE__*/ F(
|
|
1041
|
-
!
|
|
1036
|
+
/*#__PURE__*/ F(r, { children: e.direction || T._({ id: "h47p9L" }) }),
|
|
1037
|
+
/*#__PURE__*/ F(r, { children: e.description || T._({ id: "h47p9L" }) }),
|
|
1038
|
+
/*#__PURE__*/ F(r, { children: e.ethertype }),
|
|
1039
|
+
/*#__PURE__*/ F(r, { children: e.protocol || T._({ id: "eKC+EC" }) }),
|
|
1040
|
+
/*#__PURE__*/ F(r, { children: W(e) }),
|
|
1041
|
+
!w && /*#__PURE__*/ F(r, {
|
|
1042
1042
|
onClick: (e) => e.stopPropagation(),
|
|
1043
1043
|
className: "items-end justify-end pr-0",
|
|
1044
|
-
children: /*#__PURE__*/ F(
|
|
1045
|
-
label:
|
|
1044
|
+
children: /*#__PURE__*/ F(o, { children: /*#__PURE__*/ F(C, { children: /*#__PURE__*/ F(g, {
|
|
1045
|
+
label: T._({ id: "cnGeoo" }),
|
|
1046
1046
|
onClick: () => R(e)
|
|
1047
1047
|
}) }) })
|
|
1048
1048
|
})
|
|
@@ -1050,37 +1050,37 @@ function ge({ rules: e, totalRulesCount: t, onDeleteRule: o, isDeletingRule: s,
|
|
|
1050
1050
|
}, e.id))]
|
|
1051
1051
|
})]
|
|
1052
1052
|
}),
|
|
1053
|
-
!
|
|
1053
|
+
!w && /*#__PURE__*/ F(Y, {
|
|
1054
1054
|
rule: O,
|
|
1055
1055
|
open: !!O,
|
|
1056
1056
|
onClose: U,
|
|
1057
1057
|
onConfirm: B,
|
|
1058
|
-
isLoading:
|
|
1058
|
+
isLoading: a,
|
|
1059
1059
|
error: c
|
|
1060
1060
|
}),
|
|
1061
|
-
!
|
|
1062
|
-
securityGroupId:
|
|
1061
|
+
!w && v && y && M && /*#__PURE__*/ F(he, {
|
|
1062
|
+
securityGroupId: v,
|
|
1063
1063
|
open: M,
|
|
1064
1064
|
onClose: N,
|
|
1065
|
-
onCreate:
|
|
1066
|
-
isLoading:
|
|
1067
|
-
error:
|
|
1068
|
-
availableSecurityGroups:
|
|
1065
|
+
onCreate: y,
|
|
1066
|
+
isLoading: b,
|
|
1067
|
+
error: x,
|
|
1068
|
+
availableSecurityGroups: S
|
|
1069
1069
|
})
|
|
1070
1070
|
] });
|
|
1071
1071
|
}
|
|
1072
1072
|
//#endregion
|
|
1073
1073
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/RBACPolicyRow.tsx
|
|
1074
1074
|
function _e({ policy: e, onDelete: t }) {
|
|
1075
|
-
let { i18n:
|
|
1076
|
-
return /*#__PURE__*/ I(
|
|
1077
|
-
/*#__PURE__*/ F(
|
|
1078
|
-
/*#__PURE__*/ F(
|
|
1079
|
-
/*#__PURE__*/ F(
|
|
1075
|
+
let { i18n: n, _: i } = H();
|
|
1076
|
+
return /*#__PURE__*/ I(E, { children: [
|
|
1077
|
+
/*#__PURE__*/ F(r, { children: e.target_tenant }),
|
|
1078
|
+
/*#__PURE__*/ F(r, { children: e.action }),
|
|
1079
|
+
/*#__PURE__*/ F(r, {
|
|
1080
1080
|
onClick: (e) => e.stopPropagation(),
|
|
1081
1081
|
className: "items-end justify-end pr-0",
|
|
1082
|
-
children: /*#__PURE__*/ F(
|
|
1083
|
-
label:
|
|
1082
|
+
children: /*#__PURE__*/ F(o, { children: /*#__PURE__*/ F(C, { children: /*#__PURE__*/ F(g, {
|
|
1083
|
+
label: n._({ id: "t/YqKh" }),
|
|
1084
1084
|
onClick: t
|
|
1085
1085
|
}) }) })
|
|
1086
1086
|
})
|
|
@@ -1092,86 +1092,86 @@ var ve = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, ye =
|
|
|
1092
1092
|
function $(e) {
|
|
1093
1093
|
return ve.test(e) || ye.test(e);
|
|
1094
1094
|
}
|
|
1095
|
-
function be({ isOpen: e, onClose:
|
|
1096
|
-
let { i18n:
|
|
1097
|
-
|
|
1098
|
-
project_id:
|
|
1099
|
-
securityGroupId:
|
|
1100
|
-
}),
|
|
1101
|
-
project_id:
|
|
1102
|
-
securityGroupId:
|
|
1103
|
-
}),
|
|
1104
|
-
} }),
|
|
1095
|
+
function be({ isOpen: e, onClose: n, securityGroupId: r }) {
|
|
1096
|
+
let { i18n: a, _: o } = H(), s = D.useUtils(), c = A(), [u, f] = z(!1), p = U.object({ targetTenant: U.string().min(1, a._({ id: "1RwosK" })).refine($, { message: a._({ id: "CunRry" }) }) }), m = D.network.rbacPolicy.create.useMutation({ onSuccess: () => {
|
|
1097
|
+
s.network.rbacPolicy.list.invalidate({
|
|
1098
|
+
project_id: c,
|
|
1099
|
+
securityGroupId: r
|
|
1100
|
+
}), s.network.securityGroup.getById.invalidate({
|
|
1101
|
+
project_id: c,
|
|
1102
|
+
securityGroupId: r
|
|
1103
|
+
}), g();
|
|
1104
|
+
} }), h = W({
|
|
1105
1105
|
defaultValues: { targetTenant: "" },
|
|
1106
|
-
validators: { onSubmit:
|
|
1106
|
+
validators: { onSubmit: p },
|
|
1107
1107
|
onSubmit: async ({ value: e }) => {
|
|
1108
|
-
|
|
1109
|
-
project_id:
|
|
1110
|
-
securityGroupId:
|
|
1108
|
+
m.isPending || m.mutate({
|
|
1109
|
+
project_id: c,
|
|
1110
|
+
securityGroupId: r,
|
|
1111
1111
|
targetTenant: e.targetTenant.trim()
|
|
1112
1112
|
});
|
|
1113
1113
|
}
|
|
1114
|
-
}),
|
|
1115
|
-
|
|
1116
|
-
},
|
|
1117
|
-
|
|
1114
|
+
}), g = () => {
|
|
1115
|
+
h.reset(), m.reset(), f(!1), n();
|
|
1116
|
+
}, _ = async () => {
|
|
1117
|
+
f(!0), await h.handleSubmit();
|
|
1118
1118
|
};
|
|
1119
|
-
return /*#__PURE__*/ I(
|
|
1119
|
+
return /*#__PURE__*/ I(b, {
|
|
1120
1120
|
open: e,
|
|
1121
|
-
onCancel:
|
|
1122
|
-
title:
|
|
1121
|
+
onCancel: g,
|
|
1122
|
+
title: a._({ id: "vmRPFm" }),
|
|
1123
1123
|
size: "large",
|
|
1124
|
-
onConfirm:
|
|
1125
|
-
cancelButtonLabel:
|
|
1126
|
-
confirmButtonLabel:
|
|
1127
|
-
disableConfirmButton:
|
|
1124
|
+
onConfirm: _,
|
|
1125
|
+
cancelButtonLabel: a._({ id: "dEgA5A" }),
|
|
1126
|
+
confirmButtonLabel: a._({ id: "Z8lGw6" }),
|
|
1127
|
+
disableConfirmButton: m.isPending,
|
|
1128
1128
|
children: [
|
|
1129
|
-
|
|
1129
|
+
m.error && /*#__PURE__*/ F(t, {
|
|
1130
1130
|
variant: "error",
|
|
1131
1131
|
className: "mb-4",
|
|
1132
1132
|
children: (() => {
|
|
1133
|
-
let e =
|
|
1134
|
-
return e.includes("conflict") || e.includes("409") ?
|
|
1133
|
+
let e = m.error.message.toLowerCase();
|
|
1134
|
+
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" }) : m.error.message;
|
|
1135
1135
|
})()
|
|
1136
1136
|
}),
|
|
1137
1137
|
/*#__PURE__*/ F("p", {
|
|
1138
1138
|
className: "mb-4",
|
|
1139
1139
|
children: /*#__PURE__*/ F(V, { id: "cjEOmc" })
|
|
1140
1140
|
}),
|
|
1141
|
-
/*#__PURE__*/ F(
|
|
1141
|
+
/*#__PURE__*/ F(d, {
|
|
1142
1142
|
className: "mb-0",
|
|
1143
1143
|
onSubmit: (e) => {
|
|
1144
|
-
e.preventDefault(),
|
|
1144
|
+
e.preventDefault(), _();
|
|
1145
1145
|
},
|
|
1146
|
-
children: /*#__PURE__*/ F(
|
|
1146
|
+
children: /*#__PURE__*/ F(i, { children: /*#__PURE__*/ F(h.Field, {
|
|
1147
1147
|
name: "targetTenant",
|
|
1148
1148
|
validators: {
|
|
1149
1149
|
onBlur: ({ value: e }) => {
|
|
1150
1150
|
let t = e.trim();
|
|
1151
|
-
if (!t) return
|
|
1152
|
-
if (!$(t)) return
|
|
1151
|
+
if (!t) return a._({ id: "1RwosK" });
|
|
1152
|
+
if (!$(t)) return a._({ id: "CunRry" });
|
|
1153
1153
|
},
|
|
1154
1154
|
onChange: ({ value: e }) => {
|
|
1155
|
-
if (!
|
|
1155
|
+
if (!u) return;
|
|
1156
1156
|
let t = e.trim();
|
|
1157
|
-
if (!t) return
|
|
1158
|
-
if (!$(t)) return
|
|
1157
|
+
if (!t) return a._({ id: "1RwosK" });
|
|
1158
|
+
if (!$(t)) return a._({ id: "CunRry" });
|
|
1159
1159
|
}
|
|
1160
1160
|
},
|
|
1161
1161
|
children: (e) => {
|
|
1162
|
-
let t = (e.state.meta.isTouched ||
|
|
1163
|
-
return /*#__PURE__*/ F(
|
|
1162
|
+
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__*/ F(l, {
|
|
1164
1164
|
id: e.name,
|
|
1165
1165
|
name: e.name,
|
|
1166
|
-
label:
|
|
1166
|
+
label: a._({ id: "WzVwU0" }),
|
|
1167
1167
|
value: e.state.value,
|
|
1168
1168
|
onChange: (t) => e.handleChange(t.target.value),
|
|
1169
1169
|
onBlur: e.handleBlur,
|
|
1170
|
-
placeholder:
|
|
1170
|
+
placeholder: a._({ id: "he4q+i" }),
|
|
1171
1171
|
required: !0,
|
|
1172
|
-
helptext:
|
|
1173
|
-
disabled:
|
|
1174
|
-
errortext:
|
|
1172
|
+
helptext: a._({ id: "PkfPsB" }),
|
|
1173
|
+
disabled: m.isPending,
|
|
1174
|
+
errortext: r,
|
|
1175
1175
|
invalid: t
|
|
1176
1176
|
});
|
|
1177
1177
|
}
|
|
@@ -1182,31 +1182,31 @@ function be({ isOpen: e, onClose: t, securityGroupId: n }) {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
//#endregion
|
|
1184
1184
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/DeleteRBACPolicyDialog.tsx
|
|
1185
|
-
function xe({ policy: e, open:
|
|
1186
|
-
let { i18n:
|
|
1185
|
+
function xe({ policy: e, open: n, onClose: r, onConfirm: a, isLoading: o, error: s }) {
|
|
1186
|
+
let { i18n: c, _: u } = H(), f = W({
|
|
1187
1187
|
defaultValues: { confirmText: "" },
|
|
1188
|
-
validators: { onSubmit: U.object({ confirmText: U.string().refine((e) => e === "remove", { message:
|
|
1188
|
+
validators: { onSubmit: U.object({ confirmText: U.string().refine((e) => e === "remove", { message: c._({ id: "SVLToM" }) }) }) },
|
|
1189
1189
|
onSubmit: async () => {
|
|
1190
|
-
|
|
1190
|
+
o || (a(e.id), m());
|
|
1191
1191
|
}
|
|
1192
|
-
}),
|
|
1193
|
-
|
|
1192
|
+
}), p = G(f.store, (e) => e.isSubmitting || e.values.confirmText !== "remove"), m = () => {
|
|
1193
|
+
f.reset(), r();
|
|
1194
1194
|
};
|
|
1195
|
-
return /*#__PURE__*/ F(
|
|
1196
|
-
open:
|
|
1197
|
-
onCancel:
|
|
1195
|
+
return /*#__PURE__*/ F(b, {
|
|
1196
|
+
open: n,
|
|
1197
|
+
onCancel: m,
|
|
1198
1198
|
size: "small",
|
|
1199
|
-
title:
|
|
1200
|
-
onConfirm:
|
|
1201
|
-
cancelButtonLabel:
|
|
1202
|
-
confirmButtonLabel:
|
|
1203
|
-
disableConfirmButton:
|
|
1199
|
+
title: c._({ id: "Dt5W9T" }),
|
|
1200
|
+
onConfirm: f.handleSubmit,
|
|
1201
|
+
cancelButtonLabel: c._({ id: "dEgA5A" }),
|
|
1202
|
+
confirmButtonLabel: o ? c._({ id: "M5RhXF" }) : c._({ id: "qh5W8q" }),
|
|
1203
|
+
disableConfirmButton: o || p,
|
|
1204
1204
|
children: /*#__PURE__*/ I("div", { children: [
|
|
1205
|
-
|
|
1205
|
+
s && /*#__PURE__*/ F(t, {
|
|
1206
1206
|
dismissible: !1,
|
|
1207
1207
|
variant: "error",
|
|
1208
1208
|
className: "mt-4",
|
|
1209
|
-
children:
|
|
1209
|
+
children: s
|
|
1210
1210
|
}),
|
|
1211
1211
|
/*#__PURE__*/ F(V, { id: "BMTd81" }),
|
|
1212
1212
|
/*#__PURE__*/ I("div", {
|
|
@@ -1235,27 +1235,27 @@ function xe({ policy: e, open: t, onClose: n, onConfirm: r, isLoading: i, error:
|
|
|
1235
1235
|
]
|
|
1236
1236
|
})]
|
|
1237
1237
|
}),
|
|
1238
|
-
!
|
|
1238
|
+
!o && /*#__PURE__*/ F(d, {
|
|
1239
1239
|
className: "mt-4 mb-0",
|
|
1240
1240
|
onSubmit: (e) => {
|
|
1241
|
-
e.preventDefault(),
|
|
1241
|
+
e.preventDefault(), f.handleSubmit();
|
|
1242
1242
|
},
|
|
1243
|
-
children: /*#__PURE__*/ I(
|
|
1243
|
+
children: /*#__PURE__*/ I(i, { children: [/*#__PURE__*/ F("p", {
|
|
1244
1244
|
className: "mb-2 text-sm",
|
|
1245
1245
|
children: /*#__PURE__*/ F(V, {
|
|
1246
1246
|
id: "Enpdmy",
|
|
1247
1247
|
components: { 0: /*#__PURE__*/ F("strong", {}) }
|
|
1248
1248
|
})
|
|
1249
|
-
}), /*#__PURE__*/ F(
|
|
1249
|
+
}), /*#__PURE__*/ F(f.Field, {
|
|
1250
1250
|
name: "confirmText",
|
|
1251
|
-
children: (e) => /*#__PURE__*/ F(
|
|
1251
|
+
children: (e) => /*#__PURE__*/ F(l, {
|
|
1252
1252
|
id: e.name,
|
|
1253
1253
|
name: e.name,
|
|
1254
1254
|
value: e.state.value,
|
|
1255
1255
|
onChange: (t) => e.handleChange(t.target.value),
|
|
1256
|
-
placeholder:
|
|
1256
|
+
placeholder: c._({ id: "tasfos" }),
|
|
1257
1257
|
autoComplete: "off",
|
|
1258
|
-
disabled:
|
|
1258
|
+
disabled: o,
|
|
1259
1259
|
"data-testid": "remove-policy-confirmation-input"
|
|
1260
1260
|
})
|
|
1261
1261
|
})] })
|
|
@@ -1266,35 +1266,35 @@ function xe({ policy: e, open: t, onClose: n, onConfirm: r, isLoading: i, error:
|
|
|
1266
1266
|
//#endregion
|
|
1267
1267
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupRBACPolicies.tsx
|
|
1268
1268
|
function Se({ securityGroupId: e }) {
|
|
1269
|
-
let
|
|
1270
|
-
project_id:
|
|
1269
|
+
let r = D.useUtils(), { i18n: i, _: a } = H(), o = A(), [l, u] = k(), [d, p] = z(null), [m, h] = z(""), { data: g, isPending: v, isError: y, error: b } = D.network.rbacPolicy.list.useQuery({
|
|
1270
|
+
project_id: o,
|
|
1271
1271
|
securityGroupId: e
|
|
1272
1272
|
}, { refetchOnWindowFocus: !1 }), x = D.network.rbacPolicy.delete.useMutation({ onSuccess: () => {
|
|
1273
|
-
|
|
1274
|
-
project_id:
|
|
1273
|
+
r.network.rbacPolicy.list.invalidate({
|
|
1274
|
+
project_id: o,
|
|
1275
1275
|
securityGroupId: e
|
|
1276
|
-
}),
|
|
1277
|
-
project_id:
|
|
1276
|
+
}), r.network.securityGroup.getById.invalidate({
|
|
1277
|
+
project_id: o,
|
|
1278
1278
|
securityGroupId: e
|
|
1279
1279
|
});
|
|
1280
|
-
} }),
|
|
1281
|
-
|
|
1282
|
-
},
|
|
1280
|
+
} }), S = (e) => {
|
|
1281
|
+
p(e);
|
|
1282
|
+
}, C = (e) => {
|
|
1283
1283
|
x.mutate({
|
|
1284
|
-
project_id:
|
|
1284
|
+
project_id: o,
|
|
1285
1285
|
policyId: e
|
|
1286
1286
|
});
|
|
1287
|
-
},
|
|
1288
|
-
x.isPending ||
|
|
1287
|
+
}, w = () => {
|
|
1288
|
+
x.isPending || p(null);
|
|
1289
1289
|
};
|
|
1290
1290
|
L(() => {
|
|
1291
|
-
!x.isPending && !x.error && x.isSuccess &&
|
|
1291
|
+
!x.isPending && !x.error && x.isSuccess && p(null);
|
|
1292
1292
|
}, [
|
|
1293
1293
|
x.isPending,
|
|
1294
1294
|
x.error,
|
|
1295
1295
|
x.isSuccess
|
|
1296
1296
|
]);
|
|
1297
|
-
let
|
|
1297
|
+
let T = R(() => {
|
|
1298
1298
|
if (!g) return [];
|
|
1299
1299
|
if (!m) return g;
|
|
1300
1300
|
let e = m.toLowerCase();
|
|
@@ -1302,56 +1302,56 @@ function Se({ securityGroupId: e }) {
|
|
|
1302
1302
|
}, [g, m]), O = (e) => {
|
|
1303
1303
|
h(typeof e == "string" ? e : "");
|
|
1304
1304
|
};
|
|
1305
|
-
if (
|
|
1305
|
+
if (v) return /*#__PURE__*/ F(s, {
|
|
1306
1306
|
distribution: "center",
|
|
1307
1307
|
alignment: "center",
|
|
1308
1308
|
className: "py-8",
|
|
1309
|
-
children: /*#__PURE__*/ F(
|
|
1309
|
+
children: /*#__PURE__*/ F(c, { variant: "primary" })
|
|
1310
1310
|
});
|
|
1311
|
-
if (
|
|
1311
|
+
if (y) return /*#__PURE__*/ F(t, {
|
|
1312
1312
|
variant: "error",
|
|
1313
1313
|
className: "mb-4",
|
|
1314
|
-
children:
|
|
1314
|
+
children: b.message
|
|
1315
1315
|
});
|
|
1316
|
-
let M = g?.length || 0, N =
|
|
1316
|
+
let M = g?.length || 0, N = T.length;
|
|
1317
1317
|
return /*#__PURE__*/ I(P, { children: [
|
|
1318
|
-
/*#__PURE__*/ I(
|
|
1318
|
+
/*#__PURE__*/ I(s, {
|
|
1319
1319
|
direction: "vertical",
|
|
1320
1320
|
gap: "4",
|
|
1321
1321
|
children: [/*#__PURE__*/ F(j, {
|
|
1322
1322
|
totalCount: M,
|
|
1323
1323
|
filteredCount: N,
|
|
1324
|
-
itemName:
|
|
1324
|
+
itemName: i._({ id: "M9H+/G" }),
|
|
1325
1325
|
searchTerm: m,
|
|
1326
1326
|
onSearch: O,
|
|
1327
|
-
actions: /*#__PURE__*/ F(
|
|
1327
|
+
actions: /*#__PURE__*/ F(f, {
|
|
1328
1328
|
variant: "primary",
|
|
1329
1329
|
icon: "addCircle",
|
|
1330
1330
|
onClick: u,
|
|
1331
1331
|
children: /*#__PURE__*/ F(V, { id: "vmRPFm" })
|
|
1332
1332
|
})
|
|
1333
|
-
}), N === 0 ? m ? /*#__PURE__*/ F(V, { id: "qxxo7y" }) : /*#__PURE__*/ F(V, { id: "Dia2Ue" }) : /*#__PURE__*/ I(
|
|
1333
|
+
}), N === 0 ? m ? /*#__PURE__*/ F(V, { id: "qxxo7y" }) : /*#__PURE__*/ F(V, { id: "Dia2Ue" }) : /*#__PURE__*/ I(_, {
|
|
1334
1334
|
columns: 3,
|
|
1335
|
-
children: [/*#__PURE__*/ I(
|
|
1336
|
-
/*#__PURE__*/ F(
|
|
1337
|
-
/*#__PURE__*/ F(
|
|
1338
|
-
/*#__PURE__*/ F(
|
|
1339
|
-
] }),
|
|
1335
|
+
children: [/*#__PURE__*/ I(E, { children: [
|
|
1336
|
+
/*#__PURE__*/ F(n, { children: /*#__PURE__*/ F(V, { id: "WzVwU0" }) }),
|
|
1337
|
+
/*#__PURE__*/ F(n, { children: /*#__PURE__*/ F(V, { id: "bwRvnp" }) }),
|
|
1338
|
+
/*#__PURE__*/ F(n, { children: /*#__PURE__*/ F(V, { id: "7L01XJ" }) })
|
|
1339
|
+
] }), T.map((e) => /*#__PURE__*/ F(_e, {
|
|
1340
1340
|
policy: e,
|
|
1341
|
-
onDelete: () =>
|
|
1341
|
+
onDelete: () => S(e)
|
|
1342
1342
|
}, e.id))]
|
|
1343
1343
|
})]
|
|
1344
1344
|
}),
|
|
1345
1345
|
!!d && /*#__PURE__*/ F(xe, {
|
|
1346
1346
|
policy: d,
|
|
1347
1347
|
open: !!d,
|
|
1348
|
-
onClose:
|
|
1349
|
-
onConfirm:
|
|
1348
|
+
onClose: w,
|
|
1349
|
+
onConfirm: C,
|
|
1350
1350
|
isLoading: x.isPending,
|
|
1351
1351
|
error: x.error?.message || null
|
|
1352
1352
|
}),
|
|
1353
|
-
|
|
1354
|
-
isOpen:
|
|
1353
|
+
l && /*#__PURE__*/ F(be, {
|
|
1354
|
+
isOpen: l,
|
|
1355
1355
|
onClose: u,
|
|
1356
1356
|
securityGroupId: e
|
|
1357
1357
|
})
|
|
@@ -1359,12 +1359,12 @@ function Se({ securityGroupId: e }) {
|
|
|
1359
1359
|
}
|
|
1360
1360
|
//#endregion
|
|
1361
1361
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/SecurityGroupDetailsView.tsx
|
|
1362
|
-
function Ce({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRule: r, isDeletingRule: i = !1, deleteRuleError: a = null, filterControls: o, onCreateRule:
|
|
1363
|
-
let [
|
|
1364
|
-
return /*#__PURE__*/ F(
|
|
1362
|
+
function Ce({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRule: r, isDeletingRule: i = !1, deleteRuleError: a = null, filterControls: o, onCreateRule: c, isCreatingRule: l = !1, createRuleError: d = null, availableSecurityGroups: f = [], currentProjectId: p }) {
|
|
1363
|
+
let [m, h] = z("rules"), g = e.project_id === p, _ = !g, v = g;
|
|
1364
|
+
return /*#__PURE__*/ F(u, {
|
|
1365
1365
|
px: !1,
|
|
1366
1366
|
py: !0,
|
|
1367
|
-
children: /*#__PURE__*/ I(
|
|
1367
|
+
children: /*#__PURE__*/ I(s, {
|
|
1368
1368
|
direction: "vertical",
|
|
1369
1369
|
gap: "4",
|
|
1370
1370
|
children: [
|
|
@@ -1375,16 +1375,16 @@ function Ce({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRu
|
|
|
1375
1375
|
/*#__PURE__*/ F(q, {
|
|
1376
1376
|
securityGroup: e,
|
|
1377
1377
|
onEdit: n,
|
|
1378
|
-
isReadOnly:
|
|
1378
|
+
isReadOnly: _
|
|
1379
1379
|
}),
|
|
1380
|
-
!
|
|
1381
|
-
activeTab:
|
|
1382
|
-
onTabChange:
|
|
1383
|
-
showRBACTab:
|
|
1380
|
+
!_ && /*#__PURE__*/ F(J, {
|
|
1381
|
+
activeTab: m,
|
|
1382
|
+
onTabChange: h,
|
|
1383
|
+
showRBACTab: v
|
|
1384
1384
|
}),
|
|
1385
1385
|
/*#__PURE__*/ I("div", {
|
|
1386
1386
|
className: "mt-6",
|
|
1387
|
-
children: [
|
|
1387
|
+
children: [m === "rules" && /*#__PURE__*/ F(ge, {
|
|
1388
1388
|
rules: t,
|
|
1389
1389
|
totalRulesCount: e.security_group_rules?.length,
|
|
1390
1390
|
onDeleteRule: r,
|
|
@@ -1397,12 +1397,12 @@ function Ce({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRu
|
|
|
1397
1397
|
filterSettings: o.filterSettings,
|
|
1398
1398
|
onFilterChange: o.onFilterChange,
|
|
1399
1399
|
securityGroupId: e.id,
|
|
1400
|
-
onCreateRule:
|
|
1401
|
-
isCreatingRule:
|
|
1402
|
-
createRuleError:
|
|
1403
|
-
availableSecurityGroups:
|
|
1404
|
-
readOnly:
|
|
1405
|
-
}),
|
|
1400
|
+
onCreateRule: _ ? void 0 : c,
|
|
1401
|
+
isCreatingRule: l,
|
|
1402
|
+
createRuleError: d,
|
|
1403
|
+
availableSecurityGroups: f,
|
|
1404
|
+
readOnly: _
|
|
1405
|
+
}), m === "rbac" && /*#__PURE__*/ F(Se, { securityGroupId: e.id })]
|
|
1406
1406
|
})
|
|
1407
1407
|
]
|
|
1408
1408
|
})
|
|
@@ -1490,7 +1490,7 @@ function we({ securityGroupId: e, filterControls: t }) {
|
|
|
1490
1490
|
//#endregion
|
|
1491
1491
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/index.tsx?tsr-split=component
|
|
1492
1492
|
function Te() {
|
|
1493
|
-
let { securityGroupId:
|
|
1493
|
+
let { securityGroupId: t } = O.useParams(), n = A(), r = B(), { i18n: i, _: o } = H(), { searchTerm: l, sortSettings: u, filterSettings: d, handleSearchChange: p, handleSortChange: m, handleFilterChange: h } = M({
|
|
1494
1494
|
defaultSortKey: "direction",
|
|
1495
1495
|
defaultSortDir: "asc",
|
|
1496
1496
|
sortOptions: [
|
|
@@ -1532,31 +1532,31 @@ function Te() {
|
|
|
1532
1532
|
supportsMultiValue: !1
|
|
1533
1533
|
}
|
|
1534
1534
|
] }
|
|
1535
|
-
}),
|
|
1536
|
-
searchTerm:
|
|
1537
|
-
onSearchChange:
|
|
1538
|
-
sortSettings:
|
|
1539
|
-
onSortChange:
|
|
1540
|
-
filterSettings:
|
|
1541
|
-
onFilterChange:
|
|
1542
|
-
}, { securityGroup:
|
|
1543
|
-
securityGroupId:
|
|
1544
|
-
filterControls:
|
|
1545
|
-
}), { data: K } = D.network.securityGroup.list.useQuery({ project_id: n }), q = R(() => (K || []).filter((
|
|
1535
|
+
}), g = {
|
|
1536
|
+
searchTerm: l,
|
|
1537
|
+
onSearchChange: p,
|
|
1538
|
+
sortSettings: u,
|
|
1539
|
+
onSortChange: m,
|
|
1540
|
+
filterSettings: d,
|
|
1541
|
+
onFilterChange: h
|
|
1542
|
+
}, { securityGroup: _, filteredAndSortedRules: v, isLoading: b, isError: x, error: S, isUpdating: C, updateError: w, isDeletingRule: T, deleteRuleError: E, isCreatingRule: k, createRuleError: j, editModalOpen: P, handleEdit: L, handleCloseEditModal: z, handleUpdate: U, handleDeleteRule: W, handleCreateRule: G } = we({
|
|
1543
|
+
securityGroupId: t,
|
|
1544
|
+
filterControls: g
|
|
1545
|
+
}), { data: K } = D.network.securityGroup.list.useQuery({ project_id: n }), q = R(() => (K || []).filter((e) => e.id !== t).map((e) => ({
|
|
1546
1546
|
id: e.id,
|
|
1547
1547
|
name: e.name || e.id
|
|
1548
|
-
})), [K,
|
|
1548
|
+
})), [K, t]), J = () => {
|
|
1549
1549
|
r({
|
|
1550
1550
|
to: "/projects/$projectId/network/securitygroups",
|
|
1551
1551
|
params: { projectId: n }
|
|
1552
1552
|
});
|
|
1553
1553
|
};
|
|
1554
|
-
if (
|
|
1554
|
+
if (b) return /*#__PURE__*/ I(s, {
|
|
1555
1555
|
className: "fixed inset-0",
|
|
1556
1556
|
distribution: "center",
|
|
1557
1557
|
alignment: "center",
|
|
1558
1558
|
direction: "vertical",
|
|
1559
|
-
children: [/*#__PURE__*/ F(
|
|
1559
|
+
children: [/*#__PURE__*/ F(c, {
|
|
1560
1560
|
variant: "primary",
|
|
1561
1561
|
size: "large",
|
|
1562
1562
|
className: "mb-2"
|
|
@@ -1564,7 +1564,7 @@ function Te() {
|
|
|
1564
1564
|
});
|
|
1565
1565
|
if (x) {
|
|
1566
1566
|
let e = S?.message || "Unknown error";
|
|
1567
|
-
return /*#__PURE__*/ I(
|
|
1567
|
+
return /*#__PURE__*/ I(s, {
|
|
1568
1568
|
className: "fixed inset-0",
|
|
1569
1569
|
distribution: "center",
|
|
1570
1570
|
alignment: "center",
|
|
@@ -1579,7 +1579,7 @@ function Te() {
|
|
|
1579
1579
|
className: "text-theme-highest",
|
|
1580
1580
|
children: e
|
|
1581
1581
|
}),
|
|
1582
|
-
/*#__PURE__*/ F(
|
|
1582
|
+
/*#__PURE__*/ F(f, {
|
|
1583
1583
|
onClick: J,
|
|
1584
1584
|
variant: "primary",
|
|
1585
1585
|
children: /*#__PURE__*/ F(V, { id: "U9q4M7" })
|
|
@@ -1587,28 +1587,28 @@ function Te() {
|
|
|
1587
1587
|
]
|
|
1588
1588
|
});
|
|
1589
1589
|
}
|
|
1590
|
-
return
|
|
1590
|
+
return _ ? /*#__PURE__*/ I(s, {
|
|
1591
1591
|
direction: "vertical",
|
|
1592
1592
|
children: [
|
|
1593
|
-
/*#__PURE__*/ F(
|
|
1594
|
-
/*#__PURE__*/ I(
|
|
1593
|
+
/*#__PURE__*/ F(y, { children: _.name || _.id }),
|
|
1594
|
+
/*#__PURE__*/ I(a, {
|
|
1595
1595
|
className: "my-6",
|
|
1596
|
-
children: [/*#__PURE__*/ F(
|
|
1596
|
+
children: [/*#__PURE__*/ F(e, {
|
|
1597
1597
|
onClick: J,
|
|
1598
1598
|
label: i._({ id: "4opp4r" })
|
|
1599
|
-
}), /*#__PURE__*/ F(
|
|
1599
|
+
}), /*#__PURE__*/ F(e, {
|
|
1600
1600
|
active: !0,
|
|
1601
|
-
label:
|
|
1601
|
+
label: _.id
|
|
1602
1602
|
})]
|
|
1603
1603
|
}),
|
|
1604
1604
|
/*#__PURE__*/ F(Ce, {
|
|
1605
|
-
securityGroup:
|
|
1606
|
-
filteredAndSortedRules:
|
|
1605
|
+
securityGroup: _,
|
|
1606
|
+
filteredAndSortedRules: v,
|
|
1607
1607
|
onEdit: L,
|
|
1608
1608
|
onDeleteRule: W,
|
|
1609
1609
|
isDeletingRule: T,
|
|
1610
1610
|
deleteRuleError: E,
|
|
1611
|
-
filterControls:
|
|
1611
|
+
filterControls: g,
|
|
1612
1612
|
onCreateRule: G,
|
|
1613
1613
|
isCreatingRule: k,
|
|
1614
1614
|
createRuleError: j,
|
|
@@ -1616,7 +1616,7 @@ function Te() {
|
|
|
1616
1616
|
currentProjectId: n
|
|
1617
1617
|
}),
|
|
1618
1618
|
/*#__PURE__*/ F(N, {
|
|
1619
|
-
securityGroup:
|
|
1619
|
+
securityGroup: _,
|
|
1620
1620
|
open: P,
|
|
1621
1621
|
onClose: z,
|
|
1622
1622
|
onUpdate: U,
|
|
@@ -1624,7 +1624,7 @@ function Te() {
|
|
|
1624
1624
|
error: w
|
|
1625
1625
|
})
|
|
1626
1626
|
]
|
|
1627
|
-
}) : /*#__PURE__*/ I(
|
|
1627
|
+
}) : /*#__PURE__*/ I(s, {
|
|
1628
1628
|
className: "fixed inset-0",
|
|
1629
1629
|
distribution: "center",
|
|
1630
1630
|
alignment: "center",
|
|
@@ -1633,7 +1633,7 @@ function Te() {
|
|
|
1633
1633
|
children: [/*#__PURE__*/ F("p", {
|
|
1634
1634
|
className: "text-theme-secondary",
|
|
1635
1635
|
children: /*#__PURE__*/ F(V, { id: "Zw8Q49" })
|
|
1636
|
-
}), /*#__PURE__*/ F(
|
|
1636
|
+
}), /*#__PURE__*/ F(f, {
|
|
1637
1637
|
onClick: J,
|
|
1638
1638
|
variant: "primary",
|
|
1639
1639
|
children: /*#__PURE__*/ F(V, { id: "U9q4M7" })
|
|
@@ -1643,4 +1643,4 @@ function Te() {
|
|
|
1643
1643
|
//#endregion
|
|
1644
1644
|
export { Te as component };
|
|
1645
1645
|
|
|
1646
|
-
//# sourceMappingURL=_securityGroupId-
|
|
1646
|
+
//# sourceMappingURL=_securityGroupId-KKw4RPdH.mjs.map
|