@cobaltcore-dev/aurora 0.2.0 → 0.2.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/{ContentHeader-H8KGY3Wd.mjs → ContentHeader-DtBiIwRY.mjs} +15 -15
- package/dist/client/{ContentHeader-H8KGY3Wd.mjs.map → ContentHeader-DtBiIwRY.mjs.map} +1 -1
- package/dist/client/{DeleteFlavorModal-B98oiHWx.mjs → DeleteFlavorModal-rmuYIafD.mjs} +142 -142
- package/dist/client/{DeleteFlavorModal-B98oiHWx.mjs.map → DeleteFlavorModal-rmuYIafD.mjs.map} +1 -1
- package/dist/client/{EditSecurityGroupModal-wQVNIVg1.mjs → EditSecurityGroupModal-B7Sz9puM.mjs} +15 -15
- package/dist/client/{EditSecurityGroupModal-wQVNIVg1.mjs.map → EditSecurityGroupModal-B7Sz9puM.mjs.map} +1 -1
- package/dist/client/{FloatingIpActionModals-qu1NMI5a.mjs → FloatingIpActionModals-CfRJiZqD.mjs} +59 -59
- package/dist/client/{FloatingIpActionModals-qu1NMI5a.mjs.map → FloatingIpActionModals-CfRJiZqD.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications-wsQDNEh7.mjs → ImageToastNotifications-Cw30RXsw.mjs} +374 -374
- package/dist/client/{ImageToastNotifications-wsQDNEh7.mjs.map → ImageToastNotifications-Cw30RXsw.mjs.map} +1 -1
- package/dist/client/{ListToolbar-CHlkZrpl.mjs → ListToolbar-DuazvsAu.mjs} +61 -61
- package/dist/client/{ListToolbar-CHlkZrpl.mjs.map → ListToolbar-DuazvsAu.mjs.map} +1 -1
- package/dist/client/{RouteError-BwgDIwJE.mjs → RouteError-Cyto623-.mjs} +2 -2
- package/dist/client/{RouteError-BwgDIwJE.mjs.map → RouteError-Cyto623-.mjs.map} +1 -1
- package/dist/client/{_auth-CsliQdkJ.mjs → _auth-CJj1Cnbm.mjs} +1 -1
- package/dist/client/{_auth-CsliQdkJ.mjs.map → _auth-CJj1Cnbm.mjs.map} +1 -1
- package/dist/client/_flavorId-B-1fYadl.mjs +188 -0
- package/dist/client/_flavorId-B-1fYadl.mjs.map +1 -0
- package/dist/client/{_flavorId-D_A53VYa.mjs → _flavorId-BYfIHIV_.mjs} +20 -10
- package/dist/client/_flavorId-BYfIHIV_.mjs.map +1 -0
- package/dist/client/_floatingIpId-FQ5P2qMV.mjs +228 -0
- package/dist/client/_floatingIpId-FQ5P2qMV.mjs.map +1 -0
- package/dist/client/{_floatingIpId-BGgftRBQ.mjs → _floatingIpId-IrnN-ozB.mjs} +13 -3
- package/dist/client/_floatingIpId-IrnN-ozB.mjs.map +1 -0
- package/dist/client/_imageId-Tx_9bqEc.mjs +527 -0
- package/dist/client/_imageId-Tx_9bqEc.mjs.map +1 -0
- package/dist/client/{_pcaId-DBgz5V_9.mjs → _pcaId-DWHfvMhT.mjs} +16 -3
- package/dist/client/_pcaId-DWHfvMhT.mjs.map +1 -0
- package/dist/client/{_pcaId-C7Lrv1H_.mjs → _pcaId-r2BTjN9y.mjs} +81 -81
- package/dist/client/_pcaId-r2BTjN9y.mjs.map +1 -0
- package/dist/client/{_projectId-INhedXor.mjs → _projectId-B1VjDd0Z.mjs} +3 -3
- package/dist/client/{_projectId-INhedXor.mjs.map → _projectId-B1VjDd0Z.mjs.map} +1 -1
- package/dist/client/_projectId-Bs4W9hos.mjs +283 -0
- package/dist/client/_projectId-Bs4W9hos.mjs.map +1 -0
- package/dist/client/{_projectId-C-E4NNgo.mjs → _projectId-PSpuCKO7.mjs} +9 -9
- package/dist/client/{_projectId-C-E4NNgo.mjs.map → _projectId-PSpuCKO7.mjs.map} +1 -1
- package/dist/client/{_projectId-B9fln31N.mjs → _projectId-Pxp-RXK4.mjs} +2 -2
- package/dist/client/{_projectId-B9fln31N.mjs.map → _projectId-Pxp-RXK4.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-DQoRQ-yA.mjs → _securityGroupId-Dqi6ddw4.mjs} +499 -499
- package/dist/client/_securityGroupId-Dqi6ddw4.mjs.map +1 -0
- package/dist/client/{_securityGroupId-ihjy8Lcd.mjs → _securityGroupId-VV2lUcGQ.mjs} +16 -3
- package/dist/client/_securityGroupId-VV2lUcGQ.mjs.map +1 -0
- package/dist/client/{about-oT6ccz8T.mjs → about-B2AzqxFI.mjs} +8 -8
- package/dist/client/{about-oT6ccz8T.mjs.map → about-B2AzqxFI.mjs.map} +1 -1
- package/dist/client/{aurora-D_NPTbo-.mjs → aurora-CRcxVUCo.mjs} +1 -1
- package/dist/client/{aurora-D_NPTbo-.mjs.map → aurora-CRcxVUCo.mjs.map} +1 -1
- package/dist/client/{build-eu9eg0zF.mjs → build-Cf7iWbpH.mjs} +2727 -2646
- package/dist/client/build-Cf7iWbpH.mjs.map +1 -0
- package/dist/client/{buildFilterParams-BDOIRDeD.mjs → buildFilterParams-ngVK3ybs.mjs} +1 -1
- package/dist/client/{buildFilterParams-BDOIRDeD.mjs.map → buildFilterParams-ngVK3ybs.mjs.map} +1 -1
- package/dist/client/{constants-ByHCdNsI.mjs → constants-CCgR6fKI.mjs} +15 -15
- package/dist/client/{constants-ByHCdNsI.mjs.map → constants-CCgR6fKI.mjs.map} +1 -1
- package/dist/client/{containers-rn_ntCJu.mjs → containers-BWERuY0O.mjs} +978 -976
- package/dist/client/containers-BWERuY0O.mjs.map +1 -0
- package/dist/client/{containers-Dx7TYruP.mjs → containers-Cs5vOeR2.mjs} +1 -1
- package/dist/client/{containers-Dx7TYruP.mjs.map → containers-Cs5vOeR2.mjs.map} +1 -1
- package/dist/client/{containers-B_ozmVlx.mjs → containers-DovytjVP.mjs} +6 -3
- package/dist/client/containers-DovytjVP.mjs.map +1 -0
- package/dist/client/{flavors-DRZb9LJP.mjs → flavors-BXPYAFyQ.mjs} +1 -1
- package/dist/client/flavors-BXPYAFyQ.mjs.map +1 -0
- package/dist/client/{flavors-CT4auvLO.mjs → flavors-Bovz-I2U.mjs} +137 -137
- package/dist/client/flavors-Bovz-I2U.mjs.map +1 -0
- package/dist/client/flavors-CUiALHcB.mjs +16 -0
- package/dist/client/flavors-CUiALHcB.mjs.map +1 -0
- package/dist/client/floatingips-BrjDiY2t.mjs +435 -0
- package/dist/client/floatingips-BrjDiY2t.mjs.map +1 -0
- package/dist/client/{formatBytes-GYujK0dP.mjs → formatBytes-D6oa0wU9.mjs} +1 -1
- package/dist/client/{formatBytes-GYujK0dP.mjs.map → formatBytes-D6oa0wU9.mjs.map} +1 -1
- package/dist/client/{hooks-s-I8vWww.mjs → hooks-D0krAKvo.mjs} +1 -1
- package/dist/client/images-BZP3pBqj.mjs +16 -0
- package/dist/client/images-BZP3pBqj.mjs.map +1 -0
- package/dist/client/{images-DRTfx8k2.mjs → images-DM9I8G0p.mjs} +1 -1
- package/dist/client/images-DM9I8G0p.mjs.map +1 -0
- package/dist/client/{images-BTqRflJv2.mjs → images-DaaCUXMI.mjs} +413 -410
- package/dist/client/images-DaaCUXMI.mjs.map +1 -0
- package/dist/client/index.js +494 -414
- package/dist/client/index.js.map +1 -1
- package/dist/client/{md-CI9FmfYv.mjs → md-BivyCkGC.mjs} +1 -1
- package/dist/client/{md-CI9FmfYv.mjs.map → md-BivyCkGC.mjs.map} +1 -1
- package/dist/client/{network-DFVVVNS5.mjs → network-SCVadZsv.mjs} +1 -1
- package/dist/client/{network-DFVVVNS5.mjs.map → network-SCVadZsv.mjs.map} +1 -1
- package/dist/client/{objects-DkDKVSmQ.mjs → objects-B4yrYf_a.mjs} +1 -1
- package/dist/client/objects-B4yrYf_a.mjs.map +1 -0
- package/dist/client/objects-Cw4Vu01M.mjs +4760 -0
- package/dist/client/objects-Cw4Vu01M.mjs.map +1 -0
- package/dist/client/{objects-r_Vl31oj.mjs → objects-D4zBka5e.mjs} +9 -3
- package/dist/client/objects-D4zBka5e.mjs.map +1 -0
- package/dist/client/overview-2J54-loz.mjs +15 -0
- package/dist/client/overview-2J54-loz.mjs.map +1 -0
- package/dist/client/{overview-B7pXx6bt.mjs → overview-BnmukbFh.mjs} +5 -5
- package/dist/client/overview-BnmukbFh.mjs.map +1 -0
- package/dist/client/overview-BtIXpYBo.mjs +15 -0
- package/dist/client/overview-BtIXpYBo.mjs.map +1 -0
- package/dist/client/overview-D0AAvsmL.mjs +15 -0
- package/dist/client/overview-D0AAvsmL.mjs.map +1 -0
- package/dist/client/pca-BqZycwCu.mjs +16 -0
- package/dist/client/pca-BqZycwCu.mjs.map +1 -0
- package/dist/client/pca-V2aaOxZA.mjs +167 -0
- package/dist/client/pca-V2aaOxZA.mjs.map +1 -0
- package/dist/client/{projects-_Dfn6eQT.mjs → projects-0feOw_b6.mjs} +2 -2
- package/dist/client/{projects-_Dfn6eQT.mjs.map → projects-0feOw_b6.mjs.map} +1 -1
- package/dist/client/{projects-MbS1USl2.mjs → projects-BsN4bvU2.mjs} +1 -1
- package/dist/client/{projects-MbS1USl2.mjs.map → projects-BsN4bvU2.mjs.map} +1 -1
- package/dist/client/{projects-BuN69cxO.mjs → projects-C1IYOvFQ.mjs} +29 -29
- package/dist/client/{projects-BuN69cxO.mjs.map → projects-C1IYOvFQ.mjs.map} +1 -1
- package/dist/client/{projects-D1pP0XdA.mjs → projects-jyIHL6DE.mjs} +2 -2
- package/dist/client/{projects-D1pP0XdA.mjs.map → projects-jyIHL6DE.mjs.map} +1 -1
- package/dist/client/securitygroups-B4MkSBtI.mjs +441 -0
- package/dist/client/securitygroups-B4MkSBtI.mjs.map +1 -0
- package/dist/client/{useListWithFiltering-mMX_EfyI.mjs → useListWithFiltering-CEDh1LO-.mjs} +1 -1
- package/dist/client/{useListWithFiltering-mMX_EfyI.mjs.map → useListWithFiltering-CEDh1LO-.mjs.map} +1 -1
- package/dist/client/{useModal-Dg4CBeqL.mjs → useModal-DxxlilRm.mjs} +1 -1
- package/dist/client/{useModal-Dg4CBeqL.mjs.map → useModal-DxxlilRm.mjs.map} +1 -1
- package/dist/client/{useProjectId-BWaeJZOy.mjs → useProjectId-CgOTejka.mjs} +1 -1
- package/dist/client/{useProjectId-BWaeJZOy.mjs.map → useProjectId-CgOTejka.mjs.map} +1 -1
- package/package.json +8 -7
- package/permission_policies/compute.yaml +975 -0
- package/permission_policies/image.yaml +71 -0
- package/dist/client/_flavorId-D_A53VYa.mjs.map +0 -1
- package/dist/client/_flavorId-DbhYLFxY.mjs +0 -190
- package/dist/client/_flavorId-DbhYLFxY.mjs.map +0 -1
- package/dist/client/_floatingIpId-BGgftRBQ.mjs.map +0 -1
- package/dist/client/_floatingIpId-D5myuLFz.mjs +0 -228
- package/dist/client/_floatingIpId-D5myuLFz.mjs.map +0 -1
- package/dist/client/_imageId-BoHX155h.mjs +0 -27
- package/dist/client/_imageId-BoHX155h.mjs.map +0 -1
- package/dist/client/_imageId-CTa0c3Av.mjs +0 -530
- package/dist/client/_imageId-CTa0c3Av.mjs.map +0 -1
- package/dist/client/_pcaId-C7Lrv1H_.mjs.map +0 -1
- package/dist/client/_pcaId-DBgz5V_9.mjs.map +0 -1
- package/dist/client/_projectId-Be1Erj68.mjs +0 -300
- package/dist/client/_projectId-Be1Erj68.mjs.map +0 -1
- package/dist/client/_securityGroupId-DQoRQ-yA.mjs.map +0 -1
- package/dist/client/_securityGroupId-ihjy8Lcd.mjs.map +0 -1
- package/dist/client/build-eu9eg0zF.mjs.map +0 -1
- package/dist/client/containers-B_ozmVlx.mjs.map +0 -1
- package/dist/client/containers-rn_ntCJu.mjs.map +0 -1
- package/dist/client/flavors-CT4auvLO.mjs.map +0 -1
- package/dist/client/flavors-DRZb9LJP.mjs.map +0 -1
- package/dist/client/flavors-DtgMd0Ii.mjs +0 -12
- package/dist/client/flavors-DtgMd0Ii.mjs.map +0 -1
- package/dist/client/floatingips-DG5cFJSZ.mjs +0 -12
- package/dist/client/floatingips-DG5cFJSZ.mjs.map +0 -1
- package/dist/client/floatingips-iCMR0ZiL.mjs +0 -436
- package/dist/client/floatingips-iCMR0ZiL.mjs.map +0 -1
- package/dist/client/images-BTqRflJv2.mjs.map +0 -1
- package/dist/client/images-DRTfx8k2.mjs.map +0 -1
- package/dist/client/images-xBfsjxkX.mjs +0 -12
- package/dist/client/images-xBfsjxkX.mjs.map +0 -1
- package/dist/client/objects-CKk6cST_.mjs +0 -4762
- package/dist/client/objects-CKk6cST_.mjs.map +0 -1
- package/dist/client/objects-DkDKVSmQ.mjs.map +0 -1
- package/dist/client/objects-r_Vl31oj.mjs.map +0 -1
- package/dist/client/overview-B7pXx6bt.mjs.map +0 -1
- package/dist/client/overview-CKGLIu6W.mjs +0 -12
- package/dist/client/overview-CKGLIu6W.mjs.map +0 -1
- package/dist/client/overview-Ca8r3SAz.mjs +0 -16
- package/dist/client/overview-Ca8r3SAz.mjs.map +0 -1
- package/dist/client/overview-DkPM0Od5.mjs +0 -12
- package/dist/client/overview-DkPM0Od5.mjs.map +0 -1
- package/dist/client/overview-Dxm7Ef3X.mjs +0 -12
- package/dist/client/overview-Dxm7Ef3X.mjs.map +0 -1
- package/dist/client/overview-ag4Envez.mjs +0 -16
- package/dist/client/overview-ag4Envez.mjs.map +0 -1
- package/dist/client/pca-BGv7Mprl.mjs +0 -12
- package/dist/client/pca-BGv7Mprl.mjs.map +0 -1
- package/dist/client/pca-DpULpMu5.mjs +0 -167
- package/dist/client/pca-DpULpMu5.mjs.map +0 -1
- package/dist/client/securitygroups-DURjFfYK.mjs +0 -12
- package/dist/client/securitygroups-DURjFfYK.mjs.map +0 -1
- package/dist/client/securitygroups-KC2qvmH8.mjs +0 -442
- package/dist/client/securitygroups-KC2qvmH8.mjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { $ as e,
|
|
1
|
+
import { $ as e, A as t, E as n, G as r, I as i, K as a, L as o, N as s, O as c, S as l, T as u, U as d, V as f, W as p, Y as m, c as h, f as g, h as _, i as v, it as y, l as b, n as x, nt as S, r as C, rt as w, w as T, z as E } from "./build-Cf7iWbpH.mjs";
|
|
2
2
|
import { r as D } from "./trpcClient-BxguzNYF.mjs";
|
|
3
|
-
import { t as O } from "./_securityGroupId-
|
|
4
|
-
import { t as k } from "./useModal-
|
|
5
|
-
import { t as A } from "./ListToolbar-
|
|
6
|
-
import { t as j } from "./useProjectId-
|
|
7
|
-
import "./hooks-
|
|
8
|
-
import { t as M } from "./useListWithFiltering-
|
|
9
|
-
import { t as N } from "./EditSecurityGroupModal-
|
|
3
|
+
import { t as O } from "./_securityGroupId-VV2lUcGQ.mjs";
|
|
4
|
+
import { t as k } from "./useModal-DxxlilRm.mjs";
|
|
5
|
+
import { t as A } from "./ListToolbar-DuazvsAu.mjs";
|
|
6
|
+
import { t as j } from "./useProjectId-CgOTejka.mjs";
|
|
7
|
+
import "./hooks-D0krAKvo.mjs";
|
|
8
|
+
import { t as M } from "./useListWithFiltering-CEDh1LO-.mjs";
|
|
9
|
+
import { t as N } from "./EditSecurityGroupModal-B7Sz9puM.mjs";
|
|
10
10
|
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
11
11
|
import { useEffect as L, useMemo as R, useState as z } from "react";
|
|
12
12
|
import { useNavigate as B } from "@tanstack/react-router";
|
|
@@ -17,7 +17,7 @@ import { useForm as W, useStore as G } from "@tanstack/react-form";
|
|
|
17
17
|
function K({ name: e, id: t }) {
|
|
18
18
|
return /* @__PURE__ */ I("div", {
|
|
19
19
|
className: "mb-2",
|
|
20
|
-
children: [/* @__PURE__ */ F(
|
|
20
|
+
children: [/* @__PURE__ */ F(c, { children: `'${e || t}' Details` }), /* @__PURE__ */ F("p", {
|
|
21
21
|
className: "text-theme-secondary mt-2 text-sm",
|
|
22
22
|
children: /* @__PURE__ */ F(V, { id: "kIuDMT" })
|
|
23
23
|
})]
|
|
@@ -25,21 +25,21 @@ function K({ name: e, id: t }) {
|
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupBasicInfo.tsx
|
|
28
|
-
function q({ securityGroup: e, onEdit:
|
|
29
|
-
let { i18n: i, _:
|
|
28
|
+
function q({ securityGroup: e, onEdit: n, isReadOnly: r = !1 }) {
|
|
29
|
+
let { i18n: i, _: a } = H(), o = ({ value: e }) => /* @__PURE__ */ F("span", { children: e ? i._({ id: "l75CjT" }) : i._({ id: "1UzENP" }) });
|
|
30
30
|
return /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("div", {
|
|
31
31
|
className: "mb-4 flex flex-row-reverse",
|
|
32
|
-
children:
|
|
32
|
+
children: n && !r && /* @__PURE__ */ F(b, {
|
|
33
33
|
variant: "primary",
|
|
34
|
-
onClick:
|
|
35
|
-
disabled:
|
|
34
|
+
onClick: n,
|
|
35
|
+
disabled: r,
|
|
36
36
|
children: /* @__PURE__ */ F(V, { id: "ePK91l" })
|
|
37
37
|
})
|
|
38
|
-
}), /* @__PURE__ */ I(
|
|
38
|
+
}), /* @__PURE__ */ I(E, {
|
|
39
39
|
columns: 4,
|
|
40
40
|
gridColumnTemplate: "15% 35% 15% 35%",
|
|
41
41
|
children: [
|
|
42
|
-
/* @__PURE__ */ I(
|
|
42
|
+
/* @__PURE__ */ I(s, { children: [/* @__PURE__ */ F(f, { children: i._({ id: "Nu4oKW" }) }), /* @__PURE__ */ F(t, {
|
|
43
43
|
colSpan: 3,
|
|
44
44
|
children: /* @__PURE__ */ F("div", {
|
|
45
45
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
@@ -47,59 +47,59 @@ function q({ securityGroup: e, onEdit: t, isReadOnly: n = !1 }) {
|
|
|
47
47
|
children: e.description || i._({ id: "h47p9L" })
|
|
48
48
|
})
|
|
49
49
|
})] }),
|
|
50
|
-
/* @__PURE__ */ I(
|
|
51
|
-
/* @__PURE__ */ F(
|
|
52
|
-
/* @__PURE__ */ F(
|
|
50
|
+
/* @__PURE__ */ I(s, { children: [
|
|
51
|
+
/* @__PURE__ */ F(f, { children: i._({ id: "S0kLOH" }) }),
|
|
52
|
+
/* @__PURE__ */ F(t, { children: /* @__PURE__ */ F("div", {
|
|
53
53
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
54
54
|
title: e.id,
|
|
55
55
|
children: e.id
|
|
56
56
|
}) }),
|
|
57
|
-
/* @__PURE__ */ F(
|
|
58
|
-
/* @__PURE__ */ F(
|
|
57
|
+
/* @__PURE__ */ F(f, { children: i._({ id: "OYHzN1" }) }),
|
|
58
|
+
/* @__PURE__ */ F(t, { children: /* @__PURE__ */ F("div", {
|
|
59
59
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
60
60
|
title: e.tags?.join(", ") || void 0,
|
|
61
61
|
children: e.tags?.join(", ") || i._({ id: "h47p9L" })
|
|
62
62
|
}) })
|
|
63
63
|
] }),
|
|
64
|
-
/* @__PURE__ */ I(
|
|
65
|
-
/* @__PURE__ */ F(
|
|
66
|
-
/* @__PURE__ */ F(
|
|
64
|
+
/* @__PURE__ */ I(s, { children: [
|
|
65
|
+
/* @__PURE__ */ F(f, { children: i._({ id: "6YtxFj" }) }),
|
|
66
|
+
/* @__PURE__ */ F(t, { children: /* @__PURE__ */ F("div", {
|
|
67
67
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
68
68
|
title: e.name || void 0,
|
|
69
69
|
children: e.name
|
|
70
70
|
}) }),
|
|
71
|
-
/* @__PURE__ */ F(
|
|
72
|
-
/* @__PURE__ */ F(
|
|
71
|
+
/* @__PURE__ */ F(f, { children: i._({ id: "Jim5X9" }) }),
|
|
72
|
+
/* @__PURE__ */ F(t, { children: /* @__PURE__ */ F(o, { value: e.stateful }) })
|
|
73
73
|
] }),
|
|
74
|
-
/* @__PURE__ */ I(
|
|
75
|
-
/* @__PURE__ */ F(
|
|
76
|
-
/* @__PURE__ */ F(
|
|
74
|
+
/* @__PURE__ */ I(s, { children: [
|
|
75
|
+
/* @__PURE__ */ F(f, { children: i._({ id: "aI8Tgp" }) }),
|
|
76
|
+
/* @__PURE__ */ F(t, { children: /* @__PURE__ */ F("div", {
|
|
77
77
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
78
78
|
title: e.project_id || void 0,
|
|
79
79
|
children: e.project_id || i._({ id: "h47p9L" })
|
|
80
80
|
}) }),
|
|
81
|
-
/* @__PURE__ */ F(
|
|
82
|
-
/* @__PURE__ */ F(
|
|
81
|
+
/* @__PURE__ */ F(f, { children: i._({ id: "0Gd0NU" }) }),
|
|
82
|
+
/* @__PURE__ */ F(t, { children: /* @__PURE__ */ F(o, { value: e.shared }) })
|
|
83
83
|
] })
|
|
84
84
|
]
|
|
85
85
|
})] });
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupTabs.tsx
|
|
89
|
-
function J({ activeTab:
|
|
90
|
-
let
|
|
89
|
+
function J({ activeTab: t, onTabChange: n, showRBACTab: r = !0 }) {
|
|
90
|
+
let i = (e) => `px-6 py-3 font-semibold border-b-2 transition-colors ${t === e ? "border-theme-accent text-theme-highest" : "border-transparent text-theme-secondary hover:text-theme-high"}`;
|
|
91
91
|
return /* @__PURE__ */ F("div", {
|
|
92
92
|
className: "border-theme-background-lvl-3 mt-1 border-b",
|
|
93
|
-
children: /* @__PURE__ */ I(
|
|
93
|
+
children: /* @__PURE__ */ I(e, {
|
|
94
94
|
direction: "horizontal",
|
|
95
95
|
gap: "0",
|
|
96
96
|
children: [/* @__PURE__ */ F("button", {
|
|
97
|
-
className:
|
|
98
|
-
onClick: () =>
|
|
97
|
+
className: i("rules"),
|
|
98
|
+
onClick: () => n("rules"),
|
|
99
99
|
children: /* @__PURE__ */ F(V, { id: "4EZrJN" })
|
|
100
|
-
}),
|
|
101
|
-
className:
|
|
102
|
-
onClick: () =>
|
|
100
|
+
}), r && /* @__PURE__ */ F("button", {
|
|
101
|
+
className: i("rbac"),
|
|
102
|
+
onClick: () => n("rbac"),
|
|
103
103
|
children: /* @__PURE__ */ F(V, { id: "/eFtWI" })
|
|
104
104
|
})]
|
|
105
105
|
})
|
|
@@ -107,38 +107,38 @@ function J({ activeTab: e, onTabChange: t, showRBACTab: n = !0 }) {
|
|
|
107
107
|
}
|
|
108
108
|
//#endregion
|
|
109
109
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/DeleteRuleDialog.tsx
|
|
110
|
-
function Y({ rule:
|
|
111
|
-
let { i18n: s, _: c } = H(), [l,
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
return
|
|
117
|
-
open:
|
|
118
|
-
onCancel:
|
|
110
|
+
function Y({ rule: e, open: t, onClose: n, onConfirm: r, isLoading: i, error: a }) {
|
|
111
|
+
let { i18n: s, _: c } = H(), [l, u] = z(""), f = () => {
|
|
112
|
+
e && l === "delete" && r(e.id);
|
|
113
|
+
}, p = () => {
|
|
114
|
+
u(""), n();
|
|
115
|
+
}, m = l !== "delete" || i;
|
|
116
|
+
return e ? /* @__PURE__ */ F(y, {
|
|
117
|
+
open: t,
|
|
118
|
+
onCancel: p,
|
|
119
119
|
size: "small",
|
|
120
120
|
title: s._({ id: "TM93nK" }),
|
|
121
|
-
modalFooter: /* @__PURE__ */ F(
|
|
121
|
+
modalFooter: /* @__PURE__ */ F(o, {
|
|
122
122
|
className: "flex justify-end",
|
|
123
|
-
children: /* @__PURE__ */ I(
|
|
123
|
+
children: /* @__PURE__ */ I(_, { children: [/* @__PURE__ */ F(b, {
|
|
124
124
|
variant: "default",
|
|
125
|
-
onClick:
|
|
126
|
-
disabled:
|
|
125
|
+
onClick: p,
|
|
126
|
+
disabled: i,
|
|
127
127
|
children: /* @__PURE__ */ F(V, { id: "dEgA5A" })
|
|
128
|
-
}), /* @__PURE__ */ F(
|
|
128
|
+
}), /* @__PURE__ */ F(b, {
|
|
129
129
|
variant: "primary-danger",
|
|
130
|
-
onClick:
|
|
131
|
-
disabled:
|
|
130
|
+
onClick: f,
|
|
131
|
+
disabled: m,
|
|
132
132
|
"data-testid": "confirm-delete-rule-button",
|
|
133
|
-
children:
|
|
133
|
+
children: i ? /* @__PURE__ */ F(V, { id: "EF2EU9" }) : /* @__PURE__ */ F(V, { id: "lN3xvy" })
|
|
134
134
|
})] })
|
|
135
135
|
}),
|
|
136
136
|
children: /* @__PURE__ */ I("div", { children: [
|
|
137
|
-
|
|
137
|
+
a && /* @__PURE__ */ F(d, {
|
|
138
138
|
dismissible: !1,
|
|
139
139
|
variant: "error",
|
|
140
140
|
className: "mt-4",
|
|
141
|
-
children:
|
|
141
|
+
children: a
|
|
142
142
|
}),
|
|
143
143
|
/* @__PURE__ */ F(V, { id: "CMVP7y" }),
|
|
144
144
|
/* @__PURE__ */ I("div", {
|
|
@@ -152,38 +152,38 @@ function Y({ rule: t, open: n, onClose: r, onConfirm: i, isLoading: a, error: o
|
|
|
152
152
|
/* @__PURE__ */ I("li", { children: [
|
|
153
153
|
/* @__PURE__ */ F(V, { id: "MRB7nI" }),
|
|
154
154
|
": ",
|
|
155
|
-
|
|
155
|
+
e.direction
|
|
156
156
|
] }),
|
|
157
|
-
|
|
157
|
+
e.description && /* @__PURE__ */ I("li", { children: [
|
|
158
158
|
/* @__PURE__ */ F(V, { id: "Nu4oKW" }),
|
|
159
159
|
": ",
|
|
160
|
-
|
|
160
|
+
e.description
|
|
161
161
|
] }),
|
|
162
162
|
/* @__PURE__ */ I("li", { children: [
|
|
163
163
|
/* @__PURE__ */ F(V, { id: "yp0UjB" }),
|
|
164
164
|
": ",
|
|
165
|
-
|
|
165
|
+
e.ethertype
|
|
166
166
|
] }),
|
|
167
|
-
|
|
167
|
+
e.protocol && /* @__PURE__ */ I("li", { children: [
|
|
168
168
|
/* @__PURE__ */ F(V, { id: "6+OdGi" }),
|
|
169
169
|
": ",
|
|
170
|
-
|
|
170
|
+
e.protocol
|
|
171
171
|
] }),
|
|
172
|
-
|
|
172
|
+
e.port_range_min !== null && e.port_range_max !== null && /* @__PURE__ */ I("li", { children: [
|
|
173
173
|
/* @__PURE__ */ F(V, { id: "tV/Ozb" }),
|
|
174
174
|
":",
|
|
175
175
|
" ",
|
|
176
|
-
|
|
176
|
+
e.port_range_min === e.port_range_max ? e.port_range_min : `${e.port_range_min}-${e.port_range_max}`
|
|
177
177
|
] }),
|
|
178
|
-
|
|
178
|
+
e.remote_ip_prefix && /* @__PURE__ */ I("li", { children: [
|
|
179
179
|
/* @__PURE__ */ F(V, { id: "WoSkGY" }),
|
|
180
180
|
": ",
|
|
181
|
-
|
|
181
|
+
e.remote_ip_prefix
|
|
182
182
|
] }),
|
|
183
|
-
|
|
183
|
+
e.remote_group_id && /* @__PURE__ */ I("li", { children: [
|
|
184
184
|
/* @__PURE__ */ F(V, { id: "i9TIyi" }),
|
|
185
185
|
": ",
|
|
186
|
-
|
|
186
|
+
e.remote_group_id
|
|
187
187
|
] })
|
|
188
188
|
]
|
|
189
189
|
})]
|
|
@@ -196,12 +196,12 @@ function Y({ rule: t, open: n, onClose: r, onConfirm: i, isLoading: a, error: o
|
|
|
196
196
|
id: "PHt+EV",
|
|
197
197
|
components: { 0: /* @__PURE__ */ F("strong", {}) }
|
|
198
198
|
})
|
|
199
|
-
}), /* @__PURE__ */ F(
|
|
199
|
+
}), /* @__PURE__ */ F(T, {
|
|
200
200
|
value: l,
|
|
201
|
-
onChange: (e) =>
|
|
201
|
+
onChange: (e) => u(e.target.value),
|
|
202
202
|
placeholder: s._({ id: "HNlEFZ" }),
|
|
203
203
|
autoComplete: "off",
|
|
204
|
-
disabled:
|
|
204
|
+
disabled: i,
|
|
205
205
|
"data-testid": "delete-rule-confirmation-input"
|
|
206
206
|
})]
|
|
207
207
|
})
|
|
@@ -548,30 +548,30 @@ var Z = "0.0.0.0/0", re = "::/0", ie = "other-protocol", ae = U.object({
|
|
|
548
548
|
//#endregion
|
|
549
549
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/RuleTypeSection.tsx
|
|
550
550
|
function se({ form: e, disabled: t = !1 }) {
|
|
551
|
-
let { i18n:
|
|
551
|
+
let { i18n: n, _: r } = H();
|
|
552
552
|
return /* @__PURE__ */ F(e.Field, {
|
|
553
553
|
name: "ruleType",
|
|
554
554
|
mode: "value",
|
|
555
|
-
children: (
|
|
555
|
+
children: (r) => /* @__PURE__ */ F(S, {
|
|
556
556
|
className: "mb-6",
|
|
557
|
-
children: /* @__PURE__ */ F(
|
|
557
|
+
children: /* @__PURE__ */ F(v, {
|
|
558
558
|
id: "ruleType",
|
|
559
|
-
label:
|
|
560
|
-
value:
|
|
559
|
+
label: n._({ id: "YuGQWb" }),
|
|
560
|
+
value: r.state.value,
|
|
561
561
|
onChange: (t) => {
|
|
562
562
|
let n = String(t || "");
|
|
563
|
-
if (
|
|
563
|
+
if (r.handleChange(n), !n) {
|
|
564
564
|
e.setFieldValue("protocol", null), e.setFieldValue("portFrom", ""), e.setFieldValue("portTo", ""), e.setFieldValue("icmpType", ""), e.setFieldValue("icmpCode", "");
|
|
565
565
|
return;
|
|
566
566
|
}
|
|
567
|
-
let
|
|
568
|
-
|
|
567
|
+
let i = Q.find((e) => e.value === n);
|
|
568
|
+
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", "")));
|
|
569
569
|
},
|
|
570
570
|
disabled: t,
|
|
571
|
-
children: Q.map((e) => e.value === "" ? /* @__PURE__ */ F(
|
|
571
|
+
children: Q.map((e) => e.value === "" ? /* @__PURE__ */ F(g, {
|
|
572
572
|
value: e.value,
|
|
573
|
-
label:
|
|
574
|
-
}, e.value) : /* @__PURE__ */ F(
|
|
573
|
+
label: n._({ id: "eh/k36" })
|
|
574
|
+
}, e.value) : /* @__PURE__ */ F(g, {
|
|
575
575
|
value: e.value,
|
|
576
576
|
label: e.label
|
|
577
577
|
}, e.value))
|
|
@@ -585,7 +585,7 @@ function ce({ form: e, disabled: t = !1 }) {
|
|
|
585
585
|
let { i18n: n, _: r } = H();
|
|
586
586
|
return /* @__PURE__ */ F(e.Field, {
|
|
587
587
|
name: "direction",
|
|
588
|
-
children: (e) => /* @__PURE__ */ F(
|
|
588
|
+
children: (e) => /* @__PURE__ */ F(S, { children: /* @__PURE__ */ F(l, {
|
|
589
589
|
name: "direction",
|
|
590
590
|
label: n._({ id: "MRB7nI" }),
|
|
591
591
|
selected: e.state.value,
|
|
@@ -594,10 +594,10 @@ function ce({ form: e, disabled: t = !1 }) {
|
|
|
594
594
|
disabled: t,
|
|
595
595
|
children: /* @__PURE__ */ I("div", {
|
|
596
596
|
className: "flex gap-4",
|
|
597
|
-
children: [/* @__PURE__ */ F(
|
|
597
|
+
children: [/* @__PURE__ */ F(x, {
|
|
598
598
|
value: "ingress",
|
|
599
599
|
label: n._({ id: "fzfAAa" })
|
|
600
|
-
}), /* @__PURE__ */ F(
|
|
600
|
+
}), /* @__PURE__ */ F(x, {
|
|
601
601
|
value: "egress",
|
|
602
602
|
label: n._({ id: "nETBrc" })
|
|
603
603
|
})]
|
|
@@ -609,7 +609,7 @@ function le({ form: e, disabled: t = !1 }) {
|
|
|
609
609
|
let { i18n: n, _: r } = H();
|
|
610
610
|
return /* @__PURE__ */ F(e.Field, {
|
|
611
611
|
name: "ethertype",
|
|
612
|
-
children: (e) => /* @__PURE__ */ F(
|
|
612
|
+
children: (e) => /* @__PURE__ */ F(S, { children: /* @__PURE__ */ F(l, {
|
|
613
613
|
name: "ethertype",
|
|
614
614
|
label: n._({ id: "16085O" }),
|
|
615
615
|
selected: e.state.value,
|
|
@@ -618,10 +618,10 @@ function le({ form: e, disabled: t = !1 }) {
|
|
|
618
618
|
disabled: t,
|
|
619
619
|
children: /* @__PURE__ */ I("div", {
|
|
620
620
|
className: "flex gap-4",
|
|
621
|
-
children: [/* @__PURE__ */ F(
|
|
621
|
+
children: [/* @__PURE__ */ F(x, {
|
|
622
622
|
value: "IPv4",
|
|
623
623
|
label: "IPv4"
|
|
624
|
-
}), /* @__PURE__ */ F(
|
|
624
|
+
}), /* @__PURE__ */ F(x, {
|
|
625
625
|
value: "IPv6",
|
|
626
626
|
label: "IPv6"
|
|
627
627
|
})]
|
|
@@ -631,50 +631,50 @@ function le({ form: e, disabled: t = !1 }) {
|
|
|
631
631
|
}
|
|
632
632
|
//#endregion
|
|
633
633
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/ProtocolSection.tsx
|
|
634
|
-
function ue({ form:
|
|
635
|
-
let { i18n:
|
|
636
|
-
return /* @__PURE__ */ F(
|
|
634
|
+
function ue({ form: e, disabled: t = !1 }) {
|
|
635
|
+
let { i18n: n, _: r } = H();
|
|
636
|
+
return /* @__PURE__ */ F(e.Field, {
|
|
637
637
|
name: "protocol",
|
|
638
|
-
children: (
|
|
638
|
+
children: (e) => /* @__PURE__ */ F(S, {
|
|
639
639
|
className: "mb-6",
|
|
640
|
-
children: /* @__PURE__ */ F(
|
|
640
|
+
children: /* @__PURE__ */ F(T, {
|
|
641
641
|
id: "protocol",
|
|
642
642
|
name: "protocol",
|
|
643
|
-
label:
|
|
644
|
-
value:
|
|
645
|
-
onChange: (
|
|
646
|
-
errortext:
|
|
647
|
-
placeholder:
|
|
648
|
-
disabled:
|
|
643
|
+
label: n._({ id: "6+OdGi" }),
|
|
644
|
+
value: e.state.value || "",
|
|
645
|
+
onChange: (t) => e.handleChange(t.target.value || null),
|
|
646
|
+
errortext: e.state.meta.errors[0]?.message,
|
|
647
|
+
placeholder: n._({ id: "8wdCNd" }),
|
|
648
|
+
disabled: t
|
|
649
649
|
})
|
|
650
650
|
})
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
653
|
//#endregion
|
|
654
654
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/PortRangeSection.tsx
|
|
655
|
-
function de({ form:
|
|
656
|
-
let { i18n:
|
|
657
|
-
return /* @__PURE__ */ I(
|
|
655
|
+
function de({ form: e, disabled: t = !1 }) {
|
|
656
|
+
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() === "";
|
|
657
|
+
return /* @__PURE__ */ I(S, {
|
|
658
658
|
className: "mb-6",
|
|
659
659
|
children: [
|
|
660
660
|
/* @__PURE__ */ I("div", {
|
|
661
661
|
className: "flex items-center gap-4",
|
|
662
662
|
children: [
|
|
663
|
-
/* @__PURE__ */ F(
|
|
663
|
+
/* @__PURE__ */ F(e.Field, {
|
|
664
664
|
name: "portFrom",
|
|
665
|
-
children: (
|
|
665
|
+
children: (r) => /* @__PURE__ */ F("div", {
|
|
666
666
|
className: "flex-1",
|
|
667
|
-
children: /* @__PURE__ */ F(
|
|
667
|
+
children: /* @__PURE__ */ F(T, {
|
|
668
668
|
id: "portFrom",
|
|
669
669
|
name: "portFrom",
|
|
670
|
-
label:
|
|
671
|
-
value:
|
|
672
|
-
onChange: (
|
|
673
|
-
let n =
|
|
674
|
-
|
|
670
|
+
label: n._({ id: "LMdsuJ" }),
|
|
671
|
+
value: r.state.value || "",
|
|
672
|
+
onChange: (t) => {
|
|
673
|
+
let n = t.target.value;
|
|
674
|
+
r.handleChange(n), (!n || n.trim() === "") && e.setFieldValue("portTo", ""), e.validateField("portTo", "change");
|
|
675
675
|
},
|
|
676
|
-
invalid:
|
|
677
|
-
disabled:
|
|
676
|
+
invalid: r.state.meta.errors.length > 0,
|
|
677
|
+
disabled: t,
|
|
678
678
|
required: !0
|
|
679
679
|
})
|
|
680
680
|
})
|
|
@@ -683,73 +683,73 @@ function de({ form: t, disabled: n = !1 }) {
|
|
|
683
683
|
className: "text-theme-secondary flex items-center justify-center",
|
|
684
684
|
children: "—"
|
|
685
685
|
}),
|
|
686
|
-
/* @__PURE__ */ F(
|
|
686
|
+
/* @__PURE__ */ F(e.Field, {
|
|
687
687
|
name: "portTo",
|
|
688
|
-
children: (
|
|
688
|
+
children: (t) => /* @__PURE__ */ F("div", {
|
|
689
689
|
className: "flex-1",
|
|
690
|
-
children: /* @__PURE__ */ F(
|
|
690
|
+
children: /* @__PURE__ */ F(T, {
|
|
691
691
|
id: "portTo",
|
|
692
692
|
name: "portTo",
|
|
693
|
-
label:
|
|
694
|
-
value:
|
|
695
|
-
onChange: (
|
|
696
|
-
|
|
693
|
+
label: n._({ id: "a12lSo" }),
|
|
694
|
+
value: t.state.value || "",
|
|
695
|
+
onChange: (n) => {
|
|
696
|
+
t.handleChange(n.target.value), e.validateField("portFrom", "change");
|
|
697
697
|
},
|
|
698
|
-
invalid:
|
|
698
|
+
invalid: t.state.meta.errors.length > 0,
|
|
699
699
|
placeholder: "",
|
|
700
|
-
disabled:
|
|
700
|
+
disabled: s
|
|
701
701
|
})
|
|
702
702
|
})
|
|
703
703
|
})
|
|
704
704
|
]
|
|
705
705
|
}),
|
|
706
|
-
(
|
|
706
|
+
(a || o) && /* @__PURE__ */ I("div", {
|
|
707
707
|
className: "text-theme-error mt-2 text-sm",
|
|
708
|
-
children: [
|
|
708
|
+
children: [a && /* @__PURE__ */ F("div", { children: a }), o && /* @__PURE__ */ F("div", { children: o })]
|
|
709
709
|
}),
|
|
710
710
|
/* @__PURE__ */ F("p", {
|
|
711
711
|
className: "mt-2 text-sm",
|
|
712
|
-
children:
|
|
712
|
+
children: n._({ id: "QAUa4B" })
|
|
713
713
|
})
|
|
714
714
|
]
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
717
|
//#endregion
|
|
718
718
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/IcmpSection.tsx
|
|
719
|
-
function fe({ form:
|
|
720
|
-
let { i18n:
|
|
721
|
-
return /* @__PURE__ */ F(
|
|
719
|
+
function fe({ form: e, disabled: t = !1 }) {
|
|
720
|
+
let { i18n: n, _: r } = H();
|
|
721
|
+
return /* @__PURE__ */ F(S, {
|
|
722
722
|
className: "mb-6",
|
|
723
723
|
children: /* @__PURE__ */ I("div", {
|
|
724
724
|
className: "flex w-full gap-4",
|
|
725
|
-
children: [/* @__PURE__ */ F(
|
|
725
|
+
children: [/* @__PURE__ */ F(e.Field, {
|
|
726
726
|
name: "icmpType",
|
|
727
|
-
children: (
|
|
727
|
+
children: (e) => /* @__PURE__ */ F("div", {
|
|
728
728
|
className: "flex-1",
|
|
729
|
-
children: /* @__PURE__ */ F(
|
|
729
|
+
children: /* @__PURE__ */ F(T, {
|
|
730
730
|
id: "icmpType",
|
|
731
731
|
name: "icmpType",
|
|
732
|
-
label:
|
|
733
|
-
value:
|
|
734
|
-
onChange: (
|
|
735
|
-
errortext:
|
|
736
|
-
placeholder:
|
|
737
|
-
disabled:
|
|
732
|
+
label: n._({ id: "yPWFWy" }),
|
|
733
|
+
value: e.state.value,
|
|
734
|
+
onChange: (t) => e.handleChange(t.target.value),
|
|
735
|
+
errortext: e.state.meta.errors[0]?.message,
|
|
736
|
+
placeholder: n._({ id: "GPuCEo" }),
|
|
737
|
+
disabled: t
|
|
738
738
|
})
|
|
739
739
|
})
|
|
740
|
-
}), /* @__PURE__ */ F(
|
|
740
|
+
}), /* @__PURE__ */ F(e.Field, {
|
|
741
741
|
name: "icmpCode",
|
|
742
|
-
children: (
|
|
742
|
+
children: (e) => /* @__PURE__ */ F("div", {
|
|
743
743
|
className: "flex-1",
|
|
744
|
-
children: /* @__PURE__ */ F(
|
|
744
|
+
children: /* @__PURE__ */ F(T, {
|
|
745
745
|
id: "icmpCode",
|
|
746
746
|
name: "icmpCode",
|
|
747
|
-
label:
|
|
748
|
-
value:
|
|
749
|
-
onChange: (
|
|
750
|
-
errortext:
|
|
751
|
-
placeholder:
|
|
752
|
-
disabled:
|
|
747
|
+
label: n._({ id: "76RKuS" }),
|
|
748
|
+
value: e.state.value,
|
|
749
|
+
onChange: (t) => e.handleChange(t.target.value),
|
|
750
|
+
errortext: e.state.meta.errors[0]?.message,
|
|
751
|
+
placeholder: n._({ id: "UkVkoq" }),
|
|
752
|
+
disabled: t
|
|
753
753
|
})
|
|
754
754
|
})
|
|
755
755
|
})]
|
|
@@ -758,75 +758,75 @@ function fe({ form: t, disabled: n = !1 }) {
|
|
|
758
758
|
}
|
|
759
759
|
//#endregion
|
|
760
760
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/RemoteSourceSection.tsx
|
|
761
|
-
function pe({ form:
|
|
762
|
-
let { i18n:
|
|
761
|
+
function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
762
|
+
let { i18n: r, _: i } = H();
|
|
763
763
|
return /* @__PURE__ */ I(P, { children: [
|
|
764
|
-
/* @__PURE__ */ F(
|
|
764
|
+
/* @__PURE__ */ F(e.Field, {
|
|
765
765
|
name: "remoteSourceType",
|
|
766
766
|
mode: "value",
|
|
767
|
-
children: (
|
|
767
|
+
children: (n) => /* @__PURE__ */ F(S, {
|
|
768
768
|
className: "mb-1",
|
|
769
769
|
children: /* @__PURE__ */ F(l, {
|
|
770
770
|
name: "remoteSourceType",
|
|
771
|
-
label:
|
|
772
|
-
selected:
|
|
773
|
-
onChange: (
|
|
774
|
-
let r = String(
|
|
775
|
-
|
|
771
|
+
label: r._({ id: "I5kZVK" }),
|
|
772
|
+
selected: n.state.value,
|
|
773
|
+
onChange: (t) => {
|
|
774
|
+
let r = String(t);
|
|
775
|
+
n.handleChange(r), r !== "security_group" && e.setFieldValue("ethertype", "IPv4");
|
|
776
776
|
},
|
|
777
|
-
disabled:
|
|
777
|
+
disabled: t,
|
|
778
778
|
children: /* @__PURE__ */ I("div", {
|
|
779
779
|
className: "flex gap-4",
|
|
780
|
-
children: [/* @__PURE__ */ F(
|
|
780
|
+
children: [/* @__PURE__ */ F(x, {
|
|
781
781
|
value: "cidr",
|
|
782
|
-
label:
|
|
783
|
-
}), /* @__PURE__ */ F(
|
|
782
|
+
label: r._({ id: "4uXhtt" })
|
|
783
|
+
}), /* @__PURE__ */ F(x, {
|
|
784
784
|
value: "security_group",
|
|
785
|
-
label:
|
|
785
|
+
label: r._({ id: "bwhBhT" })
|
|
786
786
|
})]
|
|
787
787
|
})
|
|
788
788
|
})
|
|
789
789
|
})
|
|
790
790
|
}),
|
|
791
|
-
/* @__PURE__ */ F(
|
|
791
|
+
/* @__PURE__ */ F(e.Field, {
|
|
792
792
|
name: "remoteSourceType",
|
|
793
|
-
children: (n) => n.state.value === "cidr" ? /* @__PURE__ */ F(
|
|
793
|
+
children: (n) => n.state.value === "cidr" ? /* @__PURE__ */ F(e.Field, {
|
|
794
794
|
name: "remoteCidr",
|
|
795
|
-
children: (n) => /* @__PURE__ */ F(
|
|
795
|
+
children: (n) => /* @__PURE__ */ F(e.Field, {
|
|
796
796
|
name: "ethertype",
|
|
797
|
-
children: (
|
|
797
|
+
children: (e) => /* @__PURE__ */ F(S, {
|
|
798
798
|
className: "mb-6",
|
|
799
|
-
children: /* @__PURE__ */ F(
|
|
799
|
+
children: /* @__PURE__ */ F(T, {
|
|
800
800
|
id: "remoteCidr",
|
|
801
801
|
name: "remoteCidr",
|
|
802
|
-
label:
|
|
802
|
+
label: r._({ id: "vmYyLY" }),
|
|
803
803
|
value: n.state.value,
|
|
804
804
|
onChange: (e) => n.handleChange(e.target.value),
|
|
805
805
|
errortext: n.state.meta.errors[0]?.message,
|
|
806
|
-
placeholder:
|
|
807
|
-
disabled:
|
|
806
|
+
placeholder: e.state.value === "IPv4" ? Z : re,
|
|
807
|
+
disabled: t
|
|
808
808
|
})
|
|
809
809
|
})
|
|
810
810
|
})
|
|
811
811
|
}) : null
|
|
812
812
|
}),
|
|
813
|
-
/* @__PURE__ */ F(
|
|
813
|
+
/* @__PURE__ */ F(e.Field, {
|
|
814
814
|
name: "remoteSourceType",
|
|
815
|
-
children: (
|
|
815
|
+
children: (i) => i.state.value === "security_group" ? /* @__PURE__ */ F(e.Field, {
|
|
816
816
|
name: "remoteSecurityGroupId",
|
|
817
|
-
children: (e) => /* @__PURE__ */ F(
|
|
817
|
+
children: (e) => /* @__PURE__ */ F(S, {
|
|
818
818
|
className: "mb-6",
|
|
819
|
-
children: /* @__PURE__ */ I(
|
|
819
|
+
children: /* @__PURE__ */ I(v, {
|
|
820
820
|
id: "remoteSecurityGroupId",
|
|
821
|
-
label:
|
|
821
|
+
label: r._({ id: "i9TIyi" }),
|
|
822
822
|
value: e.state.value,
|
|
823
823
|
onChange: (t) => e.handleChange(String(t)),
|
|
824
824
|
errortext: e.state.meta.errors[0]?.message,
|
|
825
|
-
disabled:
|
|
826
|
-
children: [/* @__PURE__ */ F(
|
|
825
|
+
disabled: t,
|
|
826
|
+
children: [/* @__PURE__ */ F(g, {
|
|
827
827
|
value: "",
|
|
828
|
-
label:
|
|
829
|
-
}),
|
|
828
|
+
label: r._({ id: "ZvIpwi" })
|
|
829
|
+
}), n.map((e) => /* @__PURE__ */ F(g, {
|
|
830
830
|
value: e.id,
|
|
831
831
|
label: e.name || e.id
|
|
832
832
|
}, e.id))]
|
|
@@ -842,9 +842,9 @@ function me({ form: e, disabled: t = !1 }) {
|
|
|
842
842
|
let { i18n: n, _: r } = H();
|
|
843
843
|
return /* @__PURE__ */ F(e.Field, {
|
|
844
844
|
name: "description",
|
|
845
|
-
children: (e) => /* @__PURE__ */ F(
|
|
845
|
+
children: (e) => /* @__PURE__ */ F(S, {
|
|
846
846
|
className: "mb-0",
|
|
847
|
-
children: /* @__PURE__ */ F(
|
|
847
|
+
children: /* @__PURE__ */ F(h, {
|
|
848
848
|
id: "description",
|
|
849
849
|
name: "description",
|
|
850
850
|
label: n._({ id: "Nu4oKW" }),
|
|
@@ -859,12 +859,12 @@ function me({ form: e, disabled: t = !1 }) {
|
|
|
859
859
|
}
|
|
860
860
|
//#endregion
|
|
861
861
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/AddRuleModal.tsx
|
|
862
|
-
var he = ({ securityGroupId: e, open:
|
|
863
|
-
let { i18n: l, _:
|
|
862
|
+
var he = ({ securityGroupId: e, open: t, onClose: n, onCreate: r, isLoading: i = !1, error: s = null, availableSecurityGroups: c = [] }) => {
|
|
863
|
+
let { i18n: l, _: u } = H(), f = W({
|
|
864
864
|
defaultValues: oe,
|
|
865
865
|
validators: { onSubmit: ae },
|
|
866
866
|
onSubmit: async ({ value: t }) => {
|
|
867
|
-
if (
|
|
867
|
+
if (i) return;
|
|
868
868
|
let n = {
|
|
869
869
|
security_group_id: e,
|
|
870
870
|
direction: t.direction,
|
|
@@ -879,91 +879,91 @@ var he = ({ securityGroupId: e, open: n, onClose: r, onCreate: i, isLoading: a =
|
|
|
879
879
|
let e = parseInt(t.portFrom, 10);
|
|
880
880
|
n.port_range_min = e, t.portTo ? n.port_range_max = parseInt(t.portTo, 10) : n.port_range_max = e;
|
|
881
881
|
}
|
|
882
|
-
(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
|
|
882
|
+
(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 r(n), p();
|
|
883
883
|
}
|
|
884
|
-
}),
|
|
885
|
-
|
|
884
|
+
}), p = () => {
|
|
885
|
+
f.reset(), n();
|
|
886
886
|
};
|
|
887
|
-
return /* @__PURE__ */ I(
|
|
888
|
-
open:
|
|
889
|
-
onCancel:
|
|
887
|
+
return /* @__PURE__ */ I(y, {
|
|
888
|
+
open: t,
|
|
889
|
+
onCancel: p,
|
|
890
890
|
size: "large",
|
|
891
891
|
title: l._({ id: "b2BLBa" }),
|
|
892
|
-
modalFooter: /* @__PURE__ */ F(
|
|
892
|
+
modalFooter: /* @__PURE__ */ F(o, {
|
|
893
893
|
className: "flex justify-end",
|
|
894
|
-
children: /* @__PURE__ */ F(
|
|
894
|
+
children: /* @__PURE__ */ F(f.Subscribe, { children: (e) => {
|
|
895
895
|
let t = !!e.values.ruleType;
|
|
896
|
-
return /* @__PURE__ */ I(
|
|
896
|
+
return /* @__PURE__ */ I(_, { children: [/* @__PURE__ */ F(b, {
|
|
897
897
|
variant: "default",
|
|
898
|
-
onClick:
|
|
899
|
-
disabled:
|
|
898
|
+
onClick: p,
|
|
899
|
+
disabled: i || e.isSubmitting,
|
|
900
900
|
children: /* @__PURE__ */ F(V, { id: "dEgA5A" })
|
|
901
|
-
}), /* @__PURE__ */ F(
|
|
901
|
+
}), /* @__PURE__ */ F(b, {
|
|
902
902
|
variant: "primary",
|
|
903
903
|
type: "button",
|
|
904
|
-
onClick: () =>
|
|
905
|
-
disabled:
|
|
904
|
+
onClick: () => f.handleSubmit(),
|
|
905
|
+
disabled: i || e.isSubmitting || !t,
|
|
906
906
|
"data-testid": "add-rule-button",
|
|
907
|
-
children: e.isSubmitting ||
|
|
907
|
+
children: e.isSubmitting || i ? /* @__PURE__ */ F(a, { size: "small" }) : /* @__PURE__ */ F(V, { id: "bmQLn5" })
|
|
908
908
|
})] });
|
|
909
909
|
} })
|
|
910
910
|
}),
|
|
911
911
|
children: [
|
|
912
|
-
|
|
912
|
+
s && /* @__PURE__ */ F(d, {
|
|
913
913
|
dismissible: !1,
|
|
914
914
|
variant: "error",
|
|
915
915
|
className: "mb-4",
|
|
916
|
-
children:
|
|
916
|
+
children: s
|
|
917
917
|
}),
|
|
918
|
-
|
|
918
|
+
i && /* @__PURE__ */ I("div", {
|
|
919
919
|
className: "mb-4 flex items-center justify-center gap-2",
|
|
920
|
-
children: [/* @__PURE__ */ F(
|
|
920
|
+
children: [/* @__PURE__ */ F(a, { variant: "primary" }), /* @__PURE__ */ F("span", {
|
|
921
921
|
className: "text-theme-secondary text-sm",
|
|
922
922
|
children: /* @__PURE__ */ F(V, { id: "gU7JFm" })
|
|
923
923
|
})]
|
|
924
924
|
}),
|
|
925
|
-
/* @__PURE__ */ F(
|
|
925
|
+
/* @__PURE__ */ F(w, {
|
|
926
926
|
className: "mb-6",
|
|
927
927
|
onSubmit: (e) => {
|
|
928
|
-
e.preventDefault(),
|
|
928
|
+
e.preventDefault(), f.handleSubmit();
|
|
929
929
|
},
|
|
930
|
-
children: /* @__PURE__ */ I(
|
|
930
|
+
children: /* @__PURE__ */ I(C, {
|
|
931
931
|
className: "mb-6",
|
|
932
932
|
children: [/* @__PURE__ */ F(se, {
|
|
933
|
-
form:
|
|
934
|
-
disabled:
|
|
935
|
-
}), /* @__PURE__ */ F(
|
|
933
|
+
form: f,
|
|
934
|
+
disabled: i
|
|
935
|
+
}), /* @__PURE__ */ F(f.Subscribe, { children: (e) => {
|
|
936
936
|
if (!e.values.ruleType) return null;
|
|
937
937
|
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";
|
|
938
938
|
return /* @__PURE__ */ I(P, { children: [
|
|
939
939
|
/* @__PURE__ */ F(ce, {
|
|
940
|
-
form:
|
|
941
|
-
disabled:
|
|
940
|
+
form: f,
|
|
941
|
+
disabled: i
|
|
942
942
|
}),
|
|
943
943
|
e.values.ruleType === "other-protocol" && /* @__PURE__ */ F(ue, {
|
|
944
|
-
form:
|
|
945
|
-
disabled:
|
|
944
|
+
form: f,
|
|
945
|
+
disabled: i
|
|
946
946
|
}),
|
|
947
947
|
t && /* @__PURE__ */ F(de, {
|
|
948
|
-
form:
|
|
949
|
-
disabled:
|
|
948
|
+
form: f,
|
|
949
|
+
disabled: i
|
|
950
950
|
}),
|
|
951
951
|
n && /* @__PURE__ */ F(fe, {
|
|
952
|
-
form:
|
|
953
|
-
disabled:
|
|
952
|
+
form: f,
|
|
953
|
+
disabled: i
|
|
954
954
|
}),
|
|
955
955
|
/* @__PURE__ */ F(pe, {
|
|
956
|
-
form:
|
|
957
|
-
disabled:
|
|
956
|
+
form: f,
|
|
957
|
+
disabled: i,
|
|
958
958
|
availableSecurityGroups: c
|
|
959
959
|
}),
|
|
960
960
|
e.values.remoteSourceType === "security_group" && /* @__PURE__ */ F(le, {
|
|
961
|
-
form:
|
|
962
|
-
disabled:
|
|
961
|
+
form: f,
|
|
962
|
+
disabled: i
|
|
963
963
|
}),
|
|
964
964
|
/* @__PURE__ */ F(me, {
|
|
965
|
-
form:
|
|
966
|
-
disabled:
|
|
965
|
+
form: f,
|
|
966
|
+
disabled: i
|
|
967
967
|
})
|
|
968
968
|
] });
|
|
969
969
|
} })]
|
|
@@ -974,22 +974,22 @@ var he = ({ securityGroupId: e, open: n, onClose: r, onCreate: i, isLoading: a =
|
|
|
974
974
|
};
|
|
975
975
|
//#endregion
|
|
976
976
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupRulesTable.tsx
|
|
977
|
-
function ge({ rules:
|
|
978
|
-
let { i18n:
|
|
977
|
+
function ge({ rules: n, totalRulesCount: r, onDeleteRule: i, isDeletingRule: a, deleteError: o, searchTerm: c = "", onSearchChange: l, sortSettings: d, onSortChange: h, filterSettings: g, onFilterChange: _, securityGroupId: v, onCreateRule: y, isCreatingRule: x = !1, createRuleError: S = null, availableSecurityGroups: C = [], readOnly: w = !1 }) {
|
|
978
|
+
let { i18n: T, _: D } = H(), [O, j] = z(null), [M, N] = k(), R = (e) => {
|
|
979
979
|
j(e);
|
|
980
980
|
}, B = (e) => {
|
|
981
|
-
|
|
981
|
+
i(e);
|
|
982
982
|
}, U = () => {
|
|
983
|
-
|
|
983
|
+
a || j(null);
|
|
984
984
|
};
|
|
985
985
|
L(() => {
|
|
986
|
-
!
|
|
987
|
-
}, [
|
|
986
|
+
!a && !o && j(null);
|
|
987
|
+
}, [a, o]);
|
|
988
988
|
let W = (e) => {
|
|
989
989
|
if (e.protocol === "icmp" || e.protocol === "ipv6-icmp") {
|
|
990
990
|
if (e.port_range_min !== null && e.port_range_max !== null) {
|
|
991
991
|
let t = e.port_range_min, n = e.port_range_max;
|
|
992
|
-
return
|
|
992
|
+
return T._({
|
|
993
993
|
id: "0p+s6m",
|
|
994
994
|
values: {
|
|
995
995
|
typeValue: t,
|
|
@@ -997,53 +997,53 @@ function ge({ rules: e, totalRulesCount: t, onDeleteRule: n, isDeletingRule: o,
|
|
|
997
997
|
}
|
|
998
998
|
});
|
|
999
999
|
}
|
|
1000
|
-
return
|
|
1000
|
+
return T._({ id: "eKC+EC" });
|
|
1001
1001
|
}
|
|
1002
|
-
return e.port_range_min === null || e.port_range_max === null ?
|
|
1002
|
+
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}`;
|
|
1003
1003
|
};
|
|
1004
1004
|
return /* @__PURE__ */ I(P, { children: [
|
|
1005
|
-
/* @__PURE__ */ I(
|
|
1005
|
+
/* @__PURE__ */ I(e, {
|
|
1006
1006
|
direction: "vertical",
|
|
1007
1007
|
gap: "4",
|
|
1008
1008
|
children: [/* @__PURE__ */ F(A, {
|
|
1009
|
-
totalCount:
|
|
1010
|
-
filteredCount:
|
|
1011
|
-
itemName:
|
|
1012
|
-
filterSettings:
|
|
1013
|
-
onFilter:
|
|
1014
|
-
sortSettings:
|
|
1015
|
-
onSort:
|
|
1009
|
+
totalCount: r ?? n.length,
|
|
1010
|
+
filteredCount: n.length,
|
|
1011
|
+
itemName: T._({ id: "j9hkgJ" }),
|
|
1012
|
+
filterSettings: g,
|
|
1013
|
+
onFilter: _,
|
|
1014
|
+
sortSettings: d,
|
|
1015
|
+
onSort: h,
|
|
1016
1016
|
searchTerm: c,
|
|
1017
1017
|
onSearch: l,
|
|
1018
|
-
actions: !
|
|
1018
|
+
actions: !w && y && /* @__PURE__ */ F(b, {
|
|
1019
1019
|
variant: "primary",
|
|
1020
1020
|
icon: "addCircle",
|
|
1021
1021
|
onClick: N,
|
|
1022
1022
|
children: /* @__PURE__ */ F(V, { id: "O8tK4v" })
|
|
1023
1023
|
})
|
|
1024
|
-
}),
|
|
1025
|
-
columns:
|
|
1024
|
+
}), n.length === 0 ? /* @__PURE__ */ F(V, { id: "nnxwBn" }) : /* @__PURE__ */ I(E, {
|
|
1025
|
+
columns: w ? 5 : 6,
|
|
1026
1026
|
className: "security-group-rules-table",
|
|
1027
|
-
children: [/* @__PURE__ */ I(
|
|
1028
|
-
/* @__PURE__ */ F(
|
|
1029
|
-
/* @__PURE__ */ F(
|
|
1030
|
-
/* @__PURE__ */ F(
|
|
1031
|
-
/* @__PURE__ */ F(
|
|
1032
|
-
/* @__PURE__ */ F(
|
|
1033
|
-
!
|
|
1034
|
-
] }),
|
|
1027
|
+
children: [/* @__PURE__ */ I(s, { children: [
|
|
1028
|
+
/* @__PURE__ */ F(f, { children: T._({ id: "MRB7nI" }) }),
|
|
1029
|
+
/* @__PURE__ */ F(f, { children: T._({ id: "Nu4oKW" }) }),
|
|
1030
|
+
/* @__PURE__ */ F(f, { children: T._({ id: "yp0UjB" }) }),
|
|
1031
|
+
/* @__PURE__ */ F(f, { children: T._({ id: "6+OdGi" }) }),
|
|
1032
|
+
/* @__PURE__ */ F(f, { children: T._({ id: "6jAi8c" }) }),
|
|
1033
|
+
!w && /* @__PURE__ */ F(f, { children: T._({ id: "7L01XJ" }) })
|
|
1034
|
+
] }), n.map((e) => /* @__PURE__ */ I(s, {
|
|
1035
1035
|
"data-testid": `rule-row-${e.id}`,
|
|
1036
1036
|
children: [
|
|
1037
|
-
/* @__PURE__ */ F(
|
|
1038
|
-
/* @__PURE__ */ F(
|
|
1039
|
-
/* @__PURE__ */ F(
|
|
1040
|
-
/* @__PURE__ */ F(
|
|
1041
|
-
/* @__PURE__ */ F(
|
|
1042
|
-
!
|
|
1037
|
+
/* @__PURE__ */ F(t, { children: e.direction || T._({ id: "h47p9L" }) }),
|
|
1038
|
+
/* @__PURE__ */ F(t, { children: e.description || T._({ id: "h47p9L" }) }),
|
|
1039
|
+
/* @__PURE__ */ F(t, { children: e.ethertype }),
|
|
1040
|
+
/* @__PURE__ */ F(t, { children: e.protocol || T._({ id: "eKC+EC" }) }),
|
|
1041
|
+
/* @__PURE__ */ F(t, { children: W(e) }),
|
|
1042
|
+
!w && /* @__PURE__ */ F(t, {
|
|
1043
1043
|
onClick: (e) => e.stopPropagation(),
|
|
1044
1044
|
className: "items-end justify-end pr-0",
|
|
1045
|
-
children: /* @__PURE__ */ F(
|
|
1046
|
-
label:
|
|
1045
|
+
children: /* @__PURE__ */ F(m, { children: /* @__PURE__ */ F(u, { children: /* @__PURE__ */ F(p, {
|
|
1046
|
+
label: T._({ id: "cnGeoo" }),
|
|
1047
1047
|
onClick: () => R(e)
|
|
1048
1048
|
}) }) })
|
|
1049
1049
|
})
|
|
@@ -1051,38 +1051,38 @@ function ge({ rules: e, totalRulesCount: t, onDeleteRule: n, isDeletingRule: o,
|
|
|
1051
1051
|
}, e.id))]
|
|
1052
1052
|
})]
|
|
1053
1053
|
}),
|
|
1054
|
-
!
|
|
1054
|
+
!w && /* @__PURE__ */ F(Y, {
|
|
1055
1055
|
rule: O,
|
|
1056
1056
|
open: !!O,
|
|
1057
1057
|
onClose: U,
|
|
1058
1058
|
onConfirm: B,
|
|
1059
|
-
isLoading:
|
|
1060
|
-
error:
|
|
1059
|
+
isLoading: a,
|
|
1060
|
+
error: o
|
|
1061
1061
|
}),
|
|
1062
|
-
!
|
|
1062
|
+
!w && v && y && M && /* @__PURE__ */ F(he, {
|
|
1063
1063
|
securityGroupId: v,
|
|
1064
1064
|
open: M,
|
|
1065
1065
|
onClose: N,
|
|
1066
1066
|
onCreate: y,
|
|
1067
|
-
isLoading:
|
|
1068
|
-
error:
|
|
1069
|
-
availableSecurityGroups:
|
|
1067
|
+
isLoading: x,
|
|
1068
|
+
error: S,
|
|
1069
|
+
availableSecurityGroups: C
|
|
1070
1070
|
})
|
|
1071
1071
|
] });
|
|
1072
1072
|
}
|
|
1073
1073
|
//#endregion
|
|
1074
1074
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/RBACPolicyRow.tsx
|
|
1075
|
-
function _e({ policy: e, onDelete:
|
|
1076
|
-
let { i18n:
|
|
1077
|
-
return /* @__PURE__ */ I(
|
|
1078
|
-
/* @__PURE__ */ F(
|
|
1079
|
-
/* @__PURE__ */ F(
|
|
1080
|
-
/* @__PURE__ */ F(
|
|
1075
|
+
function _e({ policy: e, onDelete: n }) {
|
|
1076
|
+
let { i18n: r, _: i } = H();
|
|
1077
|
+
return /* @__PURE__ */ I(s, { children: [
|
|
1078
|
+
/* @__PURE__ */ F(t, { children: e.target_tenant }),
|
|
1079
|
+
/* @__PURE__ */ F(t, { children: e.action }),
|
|
1080
|
+
/* @__PURE__ */ F(t, {
|
|
1081
1081
|
onClick: (e) => e.stopPropagation(),
|
|
1082
1082
|
className: "items-end justify-end pr-0",
|
|
1083
|
-
children: /* @__PURE__ */ F(
|
|
1084
|
-
label:
|
|
1085
|
-
onClick:
|
|
1083
|
+
children: /* @__PURE__ */ F(m, { children: /* @__PURE__ */ F(u, { children: /* @__PURE__ */ F(p, {
|
|
1084
|
+
label: r._({ id: "t/YqKh" }),
|
|
1085
|
+
onClick: n
|
|
1086
1086
|
}) }) })
|
|
1087
1087
|
})
|
|
1088
1088
|
] });
|
|
@@ -1093,87 +1093,87 @@ var ve = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, ye =
|
|
|
1093
1093
|
function $(e) {
|
|
1094
1094
|
return ve.test(e) || ye.test(e);
|
|
1095
1095
|
}
|
|
1096
|
-
function be({ isOpen:
|
|
1097
|
-
let { i18n:
|
|
1098
|
-
|
|
1099
|
-
project_id:
|
|
1100
|
-
securityGroupId:
|
|
1101
|
-
}),
|
|
1102
|
-
project_id:
|
|
1103
|
-
securityGroupId:
|
|
1104
|
-
}),
|
|
1105
|
-
} }),
|
|
1096
|
+
function be({ isOpen: e, onClose: t, securityGroupId: n }) {
|
|
1097
|
+
let { i18n: r, _: i } = H(), a = D.useUtils(), o = j(), [s, c] = z(!1), l = U.object({ targetTenant: U.string().min(1, r._({ id: "1RwosK" })).refine($, { message: r._({ id: "CunRry" }) }) }), u = D.network.rbacPolicy.create.useMutation({ onSuccess: () => {
|
|
1098
|
+
a.network.rbacPolicy.list.invalidate({
|
|
1099
|
+
project_id: o,
|
|
1100
|
+
securityGroupId: n
|
|
1101
|
+
}), a.network.securityGroup.getById.invalidate({
|
|
1102
|
+
project_id: o,
|
|
1103
|
+
securityGroupId: n
|
|
1104
|
+
}), p();
|
|
1105
|
+
} }), f = W({
|
|
1106
1106
|
defaultValues: { targetTenant: "" },
|
|
1107
|
-
validators: { onSubmit:
|
|
1107
|
+
validators: { onSubmit: l },
|
|
1108
1108
|
onSubmit: async ({ value: e }) => {
|
|
1109
|
-
|
|
1110
|
-
project_id:
|
|
1111
|
-
securityGroupId:
|
|
1109
|
+
u.isPending || u.mutate({
|
|
1110
|
+
project_id: o,
|
|
1111
|
+
securityGroupId: n,
|
|
1112
1112
|
targetTenant: e.targetTenant.trim()
|
|
1113
1113
|
});
|
|
1114
1114
|
}
|
|
1115
|
-
}),
|
|
1116
|
-
|
|
1117
|
-
},
|
|
1118
|
-
|
|
1115
|
+
}), p = () => {
|
|
1116
|
+
f.reset(), u.reset(), c(!1), t();
|
|
1117
|
+
}, m = async () => {
|
|
1118
|
+
c(!0), await f.handleSubmit();
|
|
1119
1119
|
};
|
|
1120
|
-
return /* @__PURE__ */ I(
|
|
1121
|
-
open:
|
|
1122
|
-
onCancel:
|
|
1123
|
-
title:
|
|
1120
|
+
return /* @__PURE__ */ I(y, {
|
|
1121
|
+
open: e,
|
|
1122
|
+
onCancel: p,
|
|
1123
|
+
title: r._({ id: "vmRPFm" }),
|
|
1124
1124
|
size: "large",
|
|
1125
|
-
onConfirm:
|
|
1126
|
-
cancelButtonLabel:
|
|
1127
|
-
confirmButtonLabel:
|
|
1128
|
-
disableConfirmButton:
|
|
1125
|
+
onConfirm: m,
|
|
1126
|
+
cancelButtonLabel: r._({ id: "dEgA5A" }),
|
|
1127
|
+
confirmButtonLabel: r._({ id: "Z8lGw6" }),
|
|
1128
|
+
disableConfirmButton: u.isPending,
|
|
1129
1129
|
children: [
|
|
1130
|
-
|
|
1130
|
+
u.error && /* @__PURE__ */ F(d, {
|
|
1131
1131
|
variant: "error",
|
|
1132
1132
|
className: "mb-4",
|
|
1133
1133
|
children: (() => {
|
|
1134
|
-
let e =
|
|
1135
|
-
return e.includes("conflict") || e.includes("409") ?
|
|
1134
|
+
let e = u.error.message.toLowerCase();
|
|
1135
|
+
return e.includes("conflict") || e.includes("409") ? r._({ id: "rbuO5A" }) : e.includes("not found") || e.includes("404") ? r._({ id: "FwSyEp" }) : e.includes("forbidden") || e.includes("403") ? r._({ id: "kqJVBO" }) : u.error.message;
|
|
1136
1136
|
})()
|
|
1137
1137
|
}),
|
|
1138
1138
|
/* @__PURE__ */ F("p", {
|
|
1139
1139
|
className: "mb-4",
|
|
1140
1140
|
children: /* @__PURE__ */ F(V, { id: "cjEOmc" })
|
|
1141
1141
|
}),
|
|
1142
|
-
/* @__PURE__ */ F(
|
|
1142
|
+
/* @__PURE__ */ F(w, {
|
|
1143
1143
|
className: "mb-0",
|
|
1144
1144
|
onSubmit: (e) => {
|
|
1145
|
-
e.preventDefault(),
|
|
1145
|
+
e.preventDefault(), m();
|
|
1146
1146
|
},
|
|
1147
|
-
children: /* @__PURE__ */ F(
|
|
1147
|
+
children: /* @__PURE__ */ F(C, { children: /* @__PURE__ */ F(f.Field, {
|
|
1148
1148
|
name: "targetTenant",
|
|
1149
1149
|
validators: {
|
|
1150
1150
|
onBlur: ({ value: e }) => {
|
|
1151
1151
|
let t = e.trim();
|
|
1152
|
-
if (!t) return
|
|
1153
|
-
if (!$(t)) return
|
|
1152
|
+
if (!t) return r._({ id: "1RwosK" });
|
|
1153
|
+
if (!$(t)) return r._({ id: "CunRry" });
|
|
1154
1154
|
},
|
|
1155
1155
|
onChange: ({ value: e }) => {
|
|
1156
|
-
if (!
|
|
1156
|
+
if (!s) return;
|
|
1157
1157
|
let t = e.trim();
|
|
1158
|
-
if (!t) return
|
|
1159
|
-
if (!$(t)) return
|
|
1158
|
+
if (!t) return r._({ id: "1RwosK" });
|
|
1159
|
+
if (!$(t)) return r._({ id: "CunRry" });
|
|
1160
1160
|
}
|
|
1161
1161
|
},
|
|
1162
|
-
children: (
|
|
1163
|
-
let
|
|
1164
|
-
return /* @__PURE__ */ F(
|
|
1165
|
-
id:
|
|
1166
|
-
name:
|
|
1167
|
-
label:
|
|
1168
|
-
value:
|
|
1169
|
-
onChange: (
|
|
1170
|
-
onBlur:
|
|
1171
|
-
placeholder:
|
|
1162
|
+
children: (e) => {
|
|
1163
|
+
let t = (e.state.meta.isTouched || s) && e.state.meta.errors.length > 0, n = e.state.meta.errors[0], i = t ? typeof n == "string" ? n : n?.message : void 0;
|
|
1164
|
+
return /* @__PURE__ */ F(T, {
|
|
1165
|
+
id: e.name,
|
|
1166
|
+
name: e.name,
|
|
1167
|
+
label: r._({ id: "WzVwU0" }),
|
|
1168
|
+
value: e.state.value,
|
|
1169
|
+
onChange: (t) => e.handleChange(t.target.value),
|
|
1170
|
+
onBlur: e.handleBlur,
|
|
1171
|
+
placeholder: r._({ id: "he4q+i" }),
|
|
1172
1172
|
required: !0,
|
|
1173
|
-
helptext:
|
|
1174
|
-
disabled:
|
|
1173
|
+
helptext: r._({ id: "PkfPsB" }),
|
|
1174
|
+
disabled: u.isPending,
|
|
1175
1175
|
errortext: i,
|
|
1176
|
-
invalid:
|
|
1176
|
+
invalid: t
|
|
1177
1177
|
});
|
|
1178
1178
|
}
|
|
1179
1179
|
}) })
|
|
@@ -1183,31 +1183,31 @@ function be({ isOpen: n, onClose: r, securityGroupId: i }) {
|
|
|
1183
1183
|
}
|
|
1184
1184
|
//#endregion
|
|
1185
1185
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/DeleteRBACPolicyDialog.tsx
|
|
1186
|
-
function xe({ policy:
|
|
1187
|
-
let { i18n:
|
|
1186
|
+
function xe({ policy: e, open: t, onClose: n, onConfirm: r, isLoading: i, error: a }) {
|
|
1187
|
+
let { i18n: o, _: s } = H(), c = W({
|
|
1188
1188
|
defaultValues: { confirmText: "" },
|
|
1189
|
-
validators: { onSubmit: U.object({ confirmText: U.string().refine((e) => e === "remove", { message:
|
|
1189
|
+
validators: { onSubmit: U.object({ confirmText: U.string().refine((e) => e === "remove", { message: o._({ id: "SVLToM" }) }) }) },
|
|
1190
1190
|
onSubmit: async () => {
|
|
1191
|
-
|
|
1191
|
+
i || (r(e.id), u());
|
|
1192
1192
|
}
|
|
1193
|
-
}),
|
|
1194
|
-
|
|
1193
|
+
}), l = G(c.store, (e) => e.isSubmitting || e.values.confirmText !== "remove"), u = () => {
|
|
1194
|
+
c.reset(), n();
|
|
1195
1195
|
};
|
|
1196
|
-
return /* @__PURE__ */ F(
|
|
1197
|
-
open:
|
|
1198
|
-
onCancel:
|
|
1196
|
+
return /* @__PURE__ */ F(y, {
|
|
1197
|
+
open: t,
|
|
1198
|
+
onCancel: u,
|
|
1199
1199
|
size: "small",
|
|
1200
|
-
title:
|
|
1201
|
-
onConfirm:
|
|
1202
|
-
cancelButtonLabel:
|
|
1203
|
-
confirmButtonLabel:
|
|
1204
|
-
disableConfirmButton:
|
|
1200
|
+
title: o._({ id: "Dt5W9T" }),
|
|
1201
|
+
onConfirm: c.handleSubmit,
|
|
1202
|
+
cancelButtonLabel: o._({ id: "dEgA5A" }),
|
|
1203
|
+
confirmButtonLabel: i ? o._({ id: "M5RhXF" }) : o._({ id: "qh5W8q" }),
|
|
1204
|
+
disableConfirmButton: i || l,
|
|
1205
1205
|
children: /* @__PURE__ */ I("div", { children: [
|
|
1206
|
-
|
|
1206
|
+
a && /* @__PURE__ */ F(d, {
|
|
1207
1207
|
dismissible: !1,
|
|
1208
1208
|
variant: "error",
|
|
1209
1209
|
className: "mt-4",
|
|
1210
|
-
children:
|
|
1210
|
+
children: a
|
|
1211
1211
|
}),
|
|
1212
1212
|
/* @__PURE__ */ F(V, { id: "BMTd81" }),
|
|
1213
1213
|
/* @__PURE__ */ I("div", {
|
|
@@ -1221,42 +1221,42 @@ function xe({ policy: n, open: r, onClose: i, onConfirm: a, isLoading: o, error:
|
|
|
1221
1221
|
/* @__PURE__ */ I("li", { children: [
|
|
1222
1222
|
/* @__PURE__ */ F(V, { id: "WzVwU0" }),
|
|
1223
1223
|
": ",
|
|
1224
|
-
|
|
1224
|
+
e.target_tenant
|
|
1225
1225
|
] }),
|
|
1226
1226
|
/* @__PURE__ */ I("li", { children: [
|
|
1227
1227
|
/* @__PURE__ */ F(V, { id: "bwRvnp" }),
|
|
1228
1228
|
": ",
|
|
1229
|
-
|
|
1229
|
+
e.action
|
|
1230
1230
|
] }),
|
|
1231
1231
|
/* @__PURE__ */ I("li", { children: [
|
|
1232
1232
|
/* @__PURE__ */ F(V, { id: "UGhVPl" }),
|
|
1233
1233
|
": ",
|
|
1234
|
-
|
|
1234
|
+
e.object_type
|
|
1235
1235
|
] })
|
|
1236
1236
|
]
|
|
1237
1237
|
})]
|
|
1238
1238
|
}),
|
|
1239
|
-
!
|
|
1239
|
+
!i && /* @__PURE__ */ F(w, {
|
|
1240
1240
|
className: "mt-4 mb-0",
|
|
1241
1241
|
onSubmit: (e) => {
|
|
1242
|
-
e.preventDefault(),
|
|
1242
|
+
e.preventDefault(), c.handleSubmit();
|
|
1243
1243
|
},
|
|
1244
|
-
children: /* @__PURE__ */ I(
|
|
1244
|
+
children: /* @__PURE__ */ I(C, { children: [/* @__PURE__ */ F("p", {
|
|
1245
1245
|
className: "mb-2 text-sm",
|
|
1246
1246
|
children: /* @__PURE__ */ F(V, {
|
|
1247
1247
|
id: "Enpdmy",
|
|
1248
1248
|
components: { 0: /* @__PURE__ */ F("strong", {}) }
|
|
1249
1249
|
})
|
|
1250
|
-
}), /* @__PURE__ */ F(
|
|
1250
|
+
}), /* @__PURE__ */ F(c.Field, {
|
|
1251
1251
|
name: "confirmText",
|
|
1252
|
-
children: (
|
|
1253
|
-
id:
|
|
1254
|
-
name:
|
|
1255
|
-
value:
|
|
1256
|
-
onChange: (
|
|
1257
|
-
placeholder:
|
|
1252
|
+
children: (e) => /* @__PURE__ */ F(T, {
|
|
1253
|
+
id: e.name,
|
|
1254
|
+
name: e.name,
|
|
1255
|
+
value: e.state.value,
|
|
1256
|
+
onChange: (t) => e.handleChange(t.target.value),
|
|
1257
|
+
placeholder: o._({ id: "tasfos" }),
|
|
1258
1258
|
autoComplete: "off",
|
|
1259
|
-
disabled:
|
|
1259
|
+
disabled: i,
|
|
1260
1260
|
"data-testid": "remove-policy-confirmation-input"
|
|
1261
1261
|
})
|
|
1262
1262
|
})] })
|
|
@@ -1266,144 +1266,144 @@ function xe({ policy: n, open: r, onClose: i, onConfirm: a, isLoading: o, error:
|
|
|
1266
1266
|
}
|
|
1267
1267
|
//#endregion
|
|
1268
1268
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupRBACPolicies.tsx
|
|
1269
|
-
function Se({ securityGroupId:
|
|
1270
|
-
let
|
|
1271
|
-
project_id:
|
|
1272
|
-
securityGroupId:
|
|
1273
|
-
}, { refetchOnWindowFocus: !1 }),
|
|
1274
|
-
|
|
1275
|
-
project_id:
|
|
1276
|
-
securityGroupId:
|
|
1277
|
-
}),
|
|
1278
|
-
project_id:
|
|
1279
|
-
securityGroupId:
|
|
1269
|
+
function Se({ securityGroupId: t }) {
|
|
1270
|
+
let n = D.useUtils(), { i18n: r, _: i } = H(), o = j(), [c, l] = k(), [u, p] = z(null), [m, h] = z(""), { data: g, isPending: _, isError: v, error: y } = D.network.rbacPolicy.list.useQuery({
|
|
1271
|
+
project_id: o,
|
|
1272
|
+
securityGroupId: t
|
|
1273
|
+
}, { refetchOnWindowFocus: !1 }), x = D.network.rbacPolicy.delete.useMutation({ onSuccess: () => {
|
|
1274
|
+
n.network.rbacPolicy.list.invalidate({
|
|
1275
|
+
project_id: o,
|
|
1276
|
+
securityGroupId: t
|
|
1277
|
+
}), n.network.securityGroup.getById.invalidate({
|
|
1278
|
+
project_id: o,
|
|
1279
|
+
securityGroupId: t
|
|
1280
1280
|
});
|
|
1281
|
-
} }),
|
|
1282
|
-
|
|
1283
|
-
},
|
|
1284
|
-
|
|
1285
|
-
project_id:
|
|
1281
|
+
} }), S = (e) => {
|
|
1282
|
+
p(e);
|
|
1283
|
+
}, C = (e) => {
|
|
1284
|
+
x.mutate({
|
|
1285
|
+
project_id: o,
|
|
1286
1286
|
policyId: e
|
|
1287
1287
|
});
|
|
1288
|
-
},
|
|
1289
|
-
|
|
1288
|
+
}, w = () => {
|
|
1289
|
+
x.isPending || p(null);
|
|
1290
1290
|
};
|
|
1291
1291
|
L(() => {
|
|
1292
|
-
!
|
|
1292
|
+
!x.isPending && !x.error && x.isSuccess && p(null);
|
|
1293
1293
|
}, [
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1294
|
+
x.isPending,
|
|
1295
|
+
x.error,
|
|
1296
|
+
x.isSuccess
|
|
1297
1297
|
]);
|
|
1298
|
-
let
|
|
1299
|
-
if (!
|
|
1300
|
-
if (!
|
|
1301
|
-
let e =
|
|
1302
|
-
return
|
|
1303
|
-
}, [
|
|
1298
|
+
let T = R(() => {
|
|
1299
|
+
if (!g) return [];
|
|
1300
|
+
if (!m) return g;
|
|
1301
|
+
let e = m.toLowerCase();
|
|
1302
|
+
return g.filter((t) => t.target_tenant?.toLowerCase().includes(e) || t.action?.toLowerCase().includes(e));
|
|
1303
|
+
}, [g, m]), O = (e) => {
|
|
1304
1304
|
h(typeof e == "string" ? e : "");
|
|
1305
1305
|
};
|
|
1306
|
-
if (
|
|
1306
|
+
if (_) return /* @__PURE__ */ F(e, {
|
|
1307
1307
|
distribution: "center",
|
|
1308
1308
|
alignment: "center",
|
|
1309
1309
|
className: "py-8",
|
|
1310
|
-
children: /* @__PURE__ */ F(
|
|
1310
|
+
children: /* @__PURE__ */ F(a, { variant: "primary" })
|
|
1311
1311
|
});
|
|
1312
|
-
if (
|
|
1312
|
+
if (v) return /* @__PURE__ */ F(d, {
|
|
1313
1313
|
variant: "error",
|
|
1314
1314
|
className: "mb-4",
|
|
1315
|
-
children:
|
|
1315
|
+
children: y.message
|
|
1316
1316
|
});
|
|
1317
|
-
let M =
|
|
1317
|
+
let M = g?.length || 0, N = T.length;
|
|
1318
1318
|
return /* @__PURE__ */ I(P, { children: [
|
|
1319
|
-
/* @__PURE__ */ I(
|
|
1319
|
+
/* @__PURE__ */ I(e, {
|
|
1320
1320
|
direction: "vertical",
|
|
1321
1321
|
gap: "4",
|
|
1322
1322
|
children: [/* @__PURE__ */ F(A, {
|
|
1323
1323
|
totalCount: M,
|
|
1324
1324
|
filteredCount: N,
|
|
1325
|
-
itemName:
|
|
1326
|
-
searchTerm:
|
|
1325
|
+
itemName: r._({ id: "M9H+/G" }),
|
|
1326
|
+
searchTerm: m,
|
|
1327
1327
|
onSearch: O,
|
|
1328
|
-
actions: /* @__PURE__ */ F(
|
|
1328
|
+
actions: /* @__PURE__ */ F(b, {
|
|
1329
1329
|
variant: "primary",
|
|
1330
1330
|
icon: "addCircle",
|
|
1331
|
-
onClick:
|
|
1331
|
+
onClick: l,
|
|
1332
1332
|
children: /* @__PURE__ */ F(V, { id: "vmRPFm" })
|
|
1333
1333
|
})
|
|
1334
|
-
}), N === 0 ?
|
|
1334
|
+
}), N === 0 ? m ? /* @__PURE__ */ F(V, { id: "qxxo7y" }) : /* @__PURE__ */ F(V, { id: "Dia2Ue" }) : /* @__PURE__ */ I(E, {
|
|
1335
1335
|
columns: 3,
|
|
1336
|
-
children: [/* @__PURE__ */ I(
|
|
1337
|
-
/* @__PURE__ */ F(
|
|
1338
|
-
/* @__PURE__ */ F(
|
|
1339
|
-
/* @__PURE__ */ F(
|
|
1340
|
-
] }),
|
|
1336
|
+
children: [/* @__PURE__ */ I(s, { children: [
|
|
1337
|
+
/* @__PURE__ */ F(f, { children: /* @__PURE__ */ F(V, { id: "WzVwU0" }) }),
|
|
1338
|
+
/* @__PURE__ */ F(f, { children: /* @__PURE__ */ F(V, { id: "bwRvnp" }) }),
|
|
1339
|
+
/* @__PURE__ */ F(f, { children: /* @__PURE__ */ F(V, { id: "7L01XJ" }) })
|
|
1340
|
+
] }), T.map((e) => /* @__PURE__ */ F(_e, {
|
|
1341
1341
|
policy: e,
|
|
1342
|
-
onDelete: () =>
|
|
1342
|
+
onDelete: () => S(e)
|
|
1343
1343
|
}, e.id))]
|
|
1344
1344
|
})]
|
|
1345
1345
|
}),
|
|
1346
|
-
!!
|
|
1347
|
-
policy:
|
|
1348
|
-
open: !!
|
|
1349
|
-
onClose:
|
|
1350
|
-
onConfirm:
|
|
1351
|
-
isLoading:
|
|
1352
|
-
error:
|
|
1346
|
+
!!u && /* @__PURE__ */ F(xe, {
|
|
1347
|
+
policy: u,
|
|
1348
|
+
open: !!u,
|
|
1349
|
+
onClose: w,
|
|
1350
|
+
onConfirm: C,
|
|
1351
|
+
isLoading: x.isPending,
|
|
1352
|
+
error: x.error?.message || null
|
|
1353
1353
|
}),
|
|
1354
|
-
|
|
1355
|
-
isOpen:
|
|
1356
|
-
onClose:
|
|
1357
|
-
securityGroupId:
|
|
1354
|
+
c && /* @__PURE__ */ F(be, {
|
|
1355
|
+
isOpen: c,
|
|
1356
|
+
onClose: l,
|
|
1357
|
+
securityGroupId: t
|
|
1358
1358
|
})
|
|
1359
1359
|
] });
|
|
1360
1360
|
}
|
|
1361
1361
|
//#endregion
|
|
1362
1362
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/SecurityGroupDetailsView.tsx
|
|
1363
|
-
function Ce({ securityGroup:
|
|
1364
|
-
let [
|
|
1365
|
-
return /* @__PURE__ */ F(
|
|
1363
|
+
function Ce({ securityGroup: t, filteredAndSortedRules: n, onEdit: r, onDeleteRule: a, isDeletingRule: o = !1, deleteRuleError: s = null, filterControls: c, onCreateRule: l, isCreatingRule: u = !1, createRuleError: d = null, availableSecurityGroups: f = [], currentProjectId: p }) {
|
|
1364
|
+
let [m, h] = z("rules"), g = t.project_id === p, _ = !g, v = g;
|
|
1365
|
+
return /* @__PURE__ */ F(i, {
|
|
1366
1366
|
px: !1,
|
|
1367
1367
|
py: !0,
|
|
1368
|
-
children: /* @__PURE__ */ I(
|
|
1368
|
+
children: /* @__PURE__ */ I(e, {
|
|
1369
1369
|
direction: "vertical",
|
|
1370
1370
|
gap: "4",
|
|
1371
1371
|
children: [
|
|
1372
1372
|
/* @__PURE__ */ F(K, {
|
|
1373
|
-
name:
|
|
1374
|
-
id:
|
|
1373
|
+
name: t.name,
|
|
1374
|
+
id: t.id
|
|
1375
1375
|
}),
|
|
1376
1376
|
/* @__PURE__ */ F(q, {
|
|
1377
|
-
securityGroup:
|
|
1378
|
-
onEdit:
|
|
1379
|
-
isReadOnly:
|
|
1377
|
+
securityGroup: t,
|
|
1378
|
+
onEdit: r,
|
|
1379
|
+
isReadOnly: _
|
|
1380
1380
|
}),
|
|
1381
|
-
!
|
|
1382
|
-
activeTab:
|
|
1383
|
-
onTabChange:
|
|
1384
|
-
showRBACTab:
|
|
1381
|
+
!_ && /* @__PURE__ */ F(J, {
|
|
1382
|
+
activeTab: m,
|
|
1383
|
+
onTabChange: h,
|
|
1384
|
+
showRBACTab: v
|
|
1385
1385
|
}),
|
|
1386
1386
|
/* @__PURE__ */ I("div", {
|
|
1387
1387
|
className: "mt-6",
|
|
1388
|
-
children: [
|
|
1389
|
-
rules:
|
|
1390
|
-
totalRulesCount:
|
|
1391
|
-
onDeleteRule:
|
|
1392
|
-
isDeletingRule:
|
|
1393
|
-
deleteError:
|
|
1394
|
-
searchTerm:
|
|
1395
|
-
onSearchChange:
|
|
1396
|
-
sortSettings:
|
|
1397
|
-
onSortChange:
|
|
1398
|
-
filterSettings:
|
|
1399
|
-
onFilterChange:
|
|
1400
|
-
securityGroupId:
|
|
1401
|
-
onCreateRule:
|
|
1402
|
-
isCreatingRule:
|
|
1403
|
-
createRuleError:
|
|
1404
|
-
availableSecurityGroups:
|
|
1405
|
-
readOnly:
|
|
1406
|
-
}),
|
|
1388
|
+
children: [m === "rules" && /* @__PURE__ */ F(ge, {
|
|
1389
|
+
rules: n,
|
|
1390
|
+
totalRulesCount: t.security_group_rules?.length,
|
|
1391
|
+
onDeleteRule: a,
|
|
1392
|
+
isDeletingRule: o,
|
|
1393
|
+
deleteError: s,
|
|
1394
|
+
searchTerm: c.searchTerm,
|
|
1395
|
+
onSearchChange: c.onSearchChange,
|
|
1396
|
+
sortSettings: c.sortSettings,
|
|
1397
|
+
onSortChange: c.onSortChange,
|
|
1398
|
+
filterSettings: c.filterSettings,
|
|
1399
|
+
onFilterChange: c.onFilterChange,
|
|
1400
|
+
securityGroupId: t.id,
|
|
1401
|
+
onCreateRule: _ ? void 0 : l,
|
|
1402
|
+
isCreatingRule: u,
|
|
1403
|
+
createRuleError: d,
|
|
1404
|
+
availableSecurityGroups: f,
|
|
1405
|
+
readOnly: _
|
|
1406
|
+
}), m === "rbac" && /* @__PURE__ */ F(Se, { securityGroupId: t.id })]
|
|
1407
1407
|
})
|
|
1408
1408
|
]
|
|
1409
1409
|
})
|
|
@@ -1491,38 +1491,38 @@ function we({ securityGroupId: e, filterControls: t }) {
|
|
|
1491
1491
|
//#endregion
|
|
1492
1492
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/index.tsx?tsr-split=component
|
|
1493
1493
|
function Te() {
|
|
1494
|
-
let { securityGroupId:
|
|
1494
|
+
let { securityGroupId: t } = O.useParams(), i = j(), o = B(), { i18n: s, _: l } = H(), { searchTerm: u, sortSettings: d, filterSettings: f, handleSearchChange: p, handleSortChange: m, handleFilterChange: h } = M({
|
|
1495
1495
|
defaultSortKey: "direction",
|
|
1496
1496
|
defaultSortDir: "asc",
|
|
1497
1497
|
sortOptions: [
|
|
1498
1498
|
{
|
|
1499
|
-
label:
|
|
1499
|
+
label: s._({ id: "MRB7nI" }),
|
|
1500
1500
|
value: "direction"
|
|
1501
1501
|
},
|
|
1502
1502
|
{
|
|
1503
|
-
label:
|
|
1503
|
+
label: s._({ id: "6+OdGi" }),
|
|
1504
1504
|
value: "protocol"
|
|
1505
1505
|
},
|
|
1506
1506
|
{
|
|
1507
|
-
label:
|
|
1507
|
+
label: s._({ id: "Nu4oKW" }),
|
|
1508
1508
|
value: "description"
|
|
1509
1509
|
}
|
|
1510
1510
|
],
|
|
1511
1511
|
filterSettings: { filters: [
|
|
1512
1512
|
{
|
|
1513
|
-
displayName:
|
|
1513
|
+
displayName: s._({ id: "MRB7nI" }),
|
|
1514
1514
|
filterName: "direction",
|
|
1515
1515
|
values: ["ingress", "egress"],
|
|
1516
1516
|
supportsMultiValue: !1
|
|
1517
1517
|
},
|
|
1518
1518
|
{
|
|
1519
|
-
displayName:
|
|
1519
|
+
displayName: s._({ id: "yp0UjB" }),
|
|
1520
1520
|
filterName: "ethertype",
|
|
1521
1521
|
values: ["IPv4", "IPv6"],
|
|
1522
1522
|
supportsMultiValue: !1
|
|
1523
1523
|
},
|
|
1524
1524
|
{
|
|
1525
|
-
displayName:
|
|
1525
|
+
displayName: s._({ id: "6+OdGi" }),
|
|
1526
1526
|
filterName: "protocol",
|
|
1527
1527
|
values: [
|
|
1528
1528
|
"tcp",
|
|
@@ -1533,39 +1533,39 @@ function Te() {
|
|
|
1533
1533
|
supportsMultiValue: !1
|
|
1534
1534
|
}
|
|
1535
1535
|
] }
|
|
1536
|
-
}),
|
|
1537
|
-
searchTerm:
|
|
1538
|
-
onSearchChange:
|
|
1539
|
-
sortSettings:
|
|
1540
|
-
onSortChange:
|
|
1541
|
-
filterSettings:
|
|
1542
|
-
onFilterChange:
|
|
1543
|
-
}, { securityGroup:
|
|
1544
|
-
securityGroupId:
|
|
1545
|
-
filterControls:
|
|
1546
|
-
}), { data:
|
|
1536
|
+
}), g = {
|
|
1537
|
+
searchTerm: u,
|
|
1538
|
+
onSearchChange: p,
|
|
1539
|
+
sortSettings: d,
|
|
1540
|
+
onSortChange: m,
|
|
1541
|
+
filterSettings: f,
|
|
1542
|
+
onFilterChange: h
|
|
1543
|
+
}, { securityGroup: _, filteredAndSortedRules: v, isLoading: y, isError: x, error: S, isUpdating: C, updateError: w, isDeletingRule: T, deleteRuleError: E, isCreatingRule: k, createRuleError: A, editModalOpen: P, handleEdit: L, handleCloseEditModal: z, handleUpdate: U, handleDeleteRule: W, handleCreateRule: G } = we({
|
|
1544
|
+
securityGroupId: t,
|
|
1545
|
+
filterControls: g
|
|
1546
|
+
}), { data: K } = D.network.securityGroup.list.useQuery({ project_id: i }), q = R(() => (K || []).filter((e) => e.id !== t).map((e) => ({
|
|
1547
1547
|
id: e.id,
|
|
1548
1548
|
name: e.name || e.id
|
|
1549
|
-
})), [
|
|
1550
|
-
|
|
1549
|
+
})), [K, t]), J = () => {
|
|
1550
|
+
o({
|
|
1551
1551
|
to: "/projects/$projectId/network/securitygroups",
|
|
1552
|
-
params: { projectId:
|
|
1552
|
+
params: { projectId: i }
|
|
1553
1553
|
});
|
|
1554
1554
|
};
|
|
1555
|
-
if (y) return
|
|
1555
|
+
if (y) return /* @__PURE__ */ I(e, {
|
|
1556
1556
|
className: "fixed inset-0",
|
|
1557
1557
|
distribution: "center",
|
|
1558
1558
|
alignment: "center",
|
|
1559
1559
|
direction: "vertical",
|
|
1560
|
-
children: [/* @__PURE__ */ F(
|
|
1560
|
+
children: [/* @__PURE__ */ F(a, {
|
|
1561
1561
|
variant: "primary",
|
|
1562
1562
|
size: "large",
|
|
1563
1563
|
className: "mb-2"
|
|
1564
1564
|
}), /* @__PURE__ */ F(V, { id: "3x7Sws" })]
|
|
1565
1565
|
});
|
|
1566
1566
|
if (x) {
|
|
1567
|
-
let
|
|
1568
|
-
return /* @__PURE__ */ I(
|
|
1567
|
+
let t = S?.message || "Unknown error";
|
|
1568
|
+
return /* @__PURE__ */ I(e, {
|
|
1569
1569
|
className: "fixed inset-0",
|
|
1570
1570
|
distribution: "center",
|
|
1571
1571
|
alignment: "center",
|
|
@@ -1578,54 +1578,54 @@ function Te() {
|
|
|
1578
1578
|
}),
|
|
1579
1579
|
/* @__PURE__ */ F("p", {
|
|
1580
1580
|
className: "text-theme-highest",
|
|
1581
|
-
children:
|
|
1581
|
+
children: t
|
|
1582
1582
|
}),
|
|
1583
|
-
/* @__PURE__ */ F(
|
|
1584
|
-
onClick:
|
|
1583
|
+
/* @__PURE__ */ F(b, {
|
|
1584
|
+
onClick: J,
|
|
1585
1585
|
variant: "primary",
|
|
1586
1586
|
children: /* @__PURE__ */ F(V, { id: "U9q4M7" })
|
|
1587
1587
|
})
|
|
1588
1588
|
]
|
|
1589
1589
|
});
|
|
1590
1590
|
}
|
|
1591
|
-
return
|
|
1591
|
+
return _ ? /* @__PURE__ */ I(e, {
|
|
1592
1592
|
direction: "vertical",
|
|
1593
1593
|
children: [
|
|
1594
|
-
/* @__PURE__ */ F(
|
|
1595
|
-
/* @__PURE__ */ I(
|
|
1594
|
+
/* @__PURE__ */ F(c, { children: _.name || _.id }),
|
|
1595
|
+
/* @__PURE__ */ I(r, {
|
|
1596
1596
|
className: "my-6",
|
|
1597
|
-
children: [/* @__PURE__ */ F(
|
|
1598
|
-
onClick:
|
|
1599
|
-
label:
|
|
1600
|
-
}), /* @__PURE__ */ F(
|
|
1597
|
+
children: [/* @__PURE__ */ F(n, {
|
|
1598
|
+
onClick: J,
|
|
1599
|
+
label: s._({ id: "4opp4r" })
|
|
1600
|
+
}), /* @__PURE__ */ F(n, {
|
|
1601
1601
|
active: !0,
|
|
1602
|
-
label:
|
|
1602
|
+
label: _.id
|
|
1603
1603
|
})]
|
|
1604
1604
|
}),
|
|
1605
1605
|
/* @__PURE__ */ F(Ce, {
|
|
1606
|
-
securityGroup:
|
|
1607
|
-
filteredAndSortedRules:
|
|
1608
|
-
onEdit:
|
|
1609
|
-
onDeleteRule:
|
|
1610
|
-
isDeletingRule:
|
|
1611
|
-
deleteRuleError:
|
|
1612
|
-
filterControls:
|
|
1613
|
-
onCreateRule:
|
|
1614
|
-
isCreatingRule:
|
|
1615
|
-
createRuleError:
|
|
1616
|
-
availableSecurityGroups:
|
|
1617
|
-
currentProjectId:
|
|
1606
|
+
securityGroup: _,
|
|
1607
|
+
filteredAndSortedRules: v,
|
|
1608
|
+
onEdit: L,
|
|
1609
|
+
onDeleteRule: W,
|
|
1610
|
+
isDeletingRule: T,
|
|
1611
|
+
deleteRuleError: E,
|
|
1612
|
+
filterControls: g,
|
|
1613
|
+
onCreateRule: G,
|
|
1614
|
+
isCreatingRule: k,
|
|
1615
|
+
createRuleError: A,
|
|
1616
|
+
availableSecurityGroups: q,
|
|
1617
|
+
currentProjectId: i
|
|
1618
1618
|
}),
|
|
1619
1619
|
/* @__PURE__ */ F(N, {
|
|
1620
|
-
securityGroup:
|
|
1621
|
-
open:
|
|
1622
|
-
onClose:
|
|
1623
|
-
onUpdate:
|
|
1620
|
+
securityGroup: _,
|
|
1621
|
+
open: P,
|
|
1622
|
+
onClose: z,
|
|
1623
|
+
onUpdate: U,
|
|
1624
1624
|
isLoading: C,
|
|
1625
|
-
error:
|
|
1625
|
+
error: w
|
|
1626
1626
|
})
|
|
1627
1627
|
]
|
|
1628
|
-
})
|
|
1628
|
+
}) : /* @__PURE__ */ I(e, {
|
|
1629
1629
|
className: "fixed inset-0",
|
|
1630
1630
|
distribution: "center",
|
|
1631
1631
|
alignment: "center",
|
|
@@ -1634,8 +1634,8 @@ function Te() {
|
|
|
1634
1634
|
children: [/* @__PURE__ */ F("p", {
|
|
1635
1635
|
className: "text-theme-secondary",
|
|
1636
1636
|
children: /* @__PURE__ */ F(V, { id: "Zw8Q49" })
|
|
1637
|
-
}), /* @__PURE__ */ F(
|
|
1638
|
-
onClick:
|
|
1637
|
+
}), /* @__PURE__ */ F(b, {
|
|
1638
|
+
onClick: J,
|
|
1639
1639
|
variant: "primary",
|
|
1640
1640
|
children: /* @__PURE__ */ F(V, { id: "U9q4M7" })
|
|
1641
1641
|
})]
|
|
@@ -1644,4 +1644,4 @@ function Te() {
|
|
|
1644
1644
|
//#endregion
|
|
1645
1645
|
export { Te as component };
|
|
1646
1646
|
|
|
1647
|
-
//# sourceMappingURL=_securityGroupId-
|
|
1647
|
+
//# sourceMappingURL=_securityGroupId-Dqi6ddw4.mjs.map
|