@cobaltcore-dev/aurora 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/{ContentHeader-DsuZD8fa.mjs → ContentHeader-D2nIdJKJ.mjs} +22 -22
- package/dist/client/{ContentHeader-DsuZD8fa.mjs.map → ContentHeader-D2nIdJKJ.mjs.map} +1 -1
- package/dist/client/{DeleteFlavorModal-RnbspW_2.mjs → DeleteFlavorModal-Dwm0Hh84.mjs} +174 -174
- package/dist/client/{DeleteFlavorModal-RnbspW_2.mjs.map → DeleteFlavorModal-Dwm0Hh84.mjs.map} +1 -1
- package/dist/client/{DeleteVersionsModal-CsBJzXoW.mjs → DeleteVersionsModal-DQO8lGmS.mjs} +69 -69
- package/dist/client/{DeleteVersionsModal-CsBJzXoW.mjs.map → DeleteVersionsModal-DQO8lGmS.mjs.map} +1 -1
- package/dist/client/{EditSecurityGroupModal-BPv3d7am.mjs → EditSecurityGroupModal-BGPXglju.mjs} +17 -17
- package/dist/client/{EditSecurityGroupModal-BPv3d7am.mjs.map → EditSecurityGroupModal-BGPXglju.mjs.map} +1 -1
- package/dist/client/{FiltersInput-CViamP59.mjs → FiltersInput-cOaaRpcQ.mjs} +20 -20
- package/dist/client/{FiltersInput-CViamP59.mjs.map → FiltersInput-cOaaRpcQ.mjs.map} +1 -1
- package/dist/client/{FloatingIpActionModals-DTn3HFei.mjs → FloatingIpActionModals-RCvaamOg.mjs} +55 -55
- package/dist/client/{FloatingIpActionModals-DTn3HFei.mjs.map → FloatingIpActionModals-RCvaamOg.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications-CFKQZTgf.mjs → ImageToastNotifications-ClO-1yOH.mjs} +310 -310
- package/dist/client/{ImageToastNotifications-CFKQZTgf.mjs.map → ImageToastNotifications-ClO-1yOH.mjs.map} +1 -1
- package/dist/client/{RouteError-BebIhFpQ.mjs → RouteError-BmZRk_ss.mjs} +2 -2
- package/dist/client/{RouteError-BebIhFpQ.mjs.map → RouteError-BmZRk_ss.mjs.map} +1 -1
- package/dist/client/{SortInput-D0Vb864D.mjs → SortInput-DjaEHvcO.mjs} +6 -6
- package/dist/client/{SortInput-D0Vb864D.mjs.map → SortInput-DjaEHvcO.mjs.map} +1 -1
- package/dist/client/{_flavorId-C9SZd1jL.mjs → _flavorId-CtQEd28h.mjs} +8 -8
- package/dist/client/{_flavorId-C9SZd1jL.mjs.map → _flavorId-CtQEd28h.mjs.map} +1 -1
- package/dist/client/{_flavorId-DINgWoeV.mjs → _flavorId-DVsGdXUf.mjs} +46 -46
- package/dist/client/{_flavorId-DINgWoeV.mjs.map → _flavorId-DVsGdXUf.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-BACLbMzi2.mjs → _floatingIpId-CKMq7-4p2.mjs} +36 -36
- package/dist/client/{_floatingIpId-BACLbMzi2.mjs.map → _floatingIpId-CKMq7-4p2.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-BzVMOv97.mjs → _floatingIpId-DvTh6vdB.mjs} +2 -2
- package/dist/client/{_floatingIpId-BzVMOv97.mjs.map → _floatingIpId-DvTh6vdB.mjs.map} +1 -1
- package/dist/client/_imageId-xG8hC49j.mjs +534 -0
- package/dist/client/{_imageId-DCvaU7-S.mjs.map → _imageId-xG8hC49j.mjs.map} +1 -1
- package/dist/client/{_pcaId-B3PqECyO.mjs → _pcaId-Db_t0x6O.mjs} +147 -147
- package/dist/client/{_pcaId-B3PqECyO.mjs.map → _pcaId-Db_t0x6O.mjs.map} +1 -1
- package/dist/client/{_pcaId-DAJEt3ZI.mjs → _pcaId-WCJoukIk.mjs} +2 -2
- package/dist/client/{_pcaId-DAJEt3ZI.mjs.map → _pcaId-WCJoukIk.mjs.map} +1 -1
- package/dist/client/{_projectId-DU8qRiZk.mjs → _projectId-B2cvskLV.mjs} +2 -2
- package/dist/client/{_projectId-DU8qRiZk.mjs.map → _projectId-B2cvskLV.mjs.map} +1 -1
- package/dist/client/{_projectId-DRr9rLST.mjs → _projectId-BCMkaH_h.mjs} +35 -35
- package/dist/client/_projectId-BCMkaH_h.mjs.map +1 -0
- package/dist/client/{_projectId-B2hG5peP.mjs → _projectId-BdqRntcN.mjs} +15 -14
- package/dist/client/{_projectId-B2hG5peP.mjs.map → _projectId-BdqRntcN.mjs.map} +1 -1
- package/dist/client/{_projectId-BnWXWTBR.mjs → _projectId-C8RGOqZb.mjs} +3 -3
- package/dist/client/{_projectId-BnWXWTBR.mjs.map → _projectId-C8RGOqZb.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-Cj9IotMJ.mjs → _securityGroupId-CyQ3XmpB.mjs} +2 -2
- package/dist/client/{_securityGroupId-Cj9IotMJ.mjs.map → _securityGroupId-CyQ3XmpB.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-ClJiFh4R.mjs → _securityGroupId-DMi7YRux.mjs} +397 -397
- package/dist/client/{_securityGroupId-ClJiFh4R.mjs.map → _securityGroupId-DMi7YRux.mjs.map} +1 -1
- package/dist/client/{_storageType-BrHDa2bD.mjs → _storageType-Bb6YZgXf.mjs} +657 -660
- package/dist/client/{_storageType-BrHDa2bD.mjs.map → _storageType-Bb6YZgXf.mjs.map} +1 -1
- package/dist/client/{_storageType-CSLH93js.mjs → _storageType-g1zkFFRh.mjs} +2 -2
- package/dist/client/{_storageType-CSLH93js.mjs.map → _storageType-g1zkFFRh.mjs.map} +1 -1
- package/dist/client/{about-BnU297yB.mjs → about-B4sGnxeW.mjs} +8 -8
- package/dist/client/{about-BnU297yB.mjs.map → about-B4sGnxeW.mjs.map} +1 -1
- package/dist/client/{build-DF7MTyXG.mjs → build-DgeVmENN.mjs} +2395 -2390
- package/dist/client/{build-DF7MTyXG.mjs.map → build-DgeVmENN.mjs.map} +1 -1
- package/dist/client/{constants-BskfpGYY.mjs → constants-D6IO9bPs.mjs} +16 -16
- package/dist/client/{constants-BskfpGYY.mjs.map → constants-D6IO9bPs.mjs.map} +1 -1
- package/dist/client/{flavors-DAbtRoep.mjs → flavors-CO5l_6d0.mjs} +178 -178
- package/dist/client/{flavors-DAbtRoep.mjs.map → flavors-CO5l_6d0.mjs.map} +1 -1
- package/dist/client/{flavors-DODudzrA.mjs → flavors-D4nGSs0r.mjs} +2 -2
- package/dist/client/{flavors-DODudzrA.mjs.map → flavors-D4nGSs0r.mjs.map} +1 -1
- package/dist/client/{floatingips-DJW9ftN_.mjs → floatingips-ClkRV7a7.mjs} +108 -108
- package/dist/client/{floatingips-DJW9ftN_.mjs.map → floatingips-ClkRV7a7.mjs.map} +1 -1
- package/dist/client/{images-C3JyPwer.mjs → images-B5ktfqg6.mjs} +2 -2
- package/dist/client/{images-C3JyPwer.mjs.map → images-B5ktfqg6.mjs.map} +1 -1
- package/dist/client/{images-Cp6V1nF5.mjs → images-C_OYLPqv.mjs} +440 -440
- package/dist/client/{images-Cp6V1nF5.mjs.map → images-C_OYLPqv.mjs.map} +1 -1
- package/dist/client/{images-BbLnuYrL.mjs → images-CvPxoPC0.mjs} +2 -2
- package/dist/client/{images-BbLnuYrL.mjs.map → images-CvPxoPC0.mjs.map} +1 -1
- package/dist/client/index.js +275 -275
- package/dist/client/index.js.map +1 -1
- package/dist/client/{objects-DUmK3WgA.mjs → objects-D0grS6pk.mjs} +1361 -1361
- package/dist/client/{objects-DUmK3WgA.mjs.map → objects-D0grS6pk.mjs.map} +1 -1
- package/dist/client/{objects-Bw96WXOs.mjs → objects-UQyUQxBj.mjs} +2 -2
- package/dist/client/{objects-Bw96WXOs.mjs.map → objects-UQyUQxBj.mjs.map} +1 -1
- package/dist/client/{pca-Dc_tdh4-.mjs → pca-BJPxOIgq.mjs} +69 -69
- package/dist/client/{pca-Dc_tdh4-.mjs.map → pca-BJPxOIgq.mjs.map} +1 -1
- package/dist/client/{pca-DKeGzbww.mjs → pca-C9MKOi3Z.mjs} +2 -2
- package/dist/client/{pca-DKeGzbww.mjs.map → pca-C9MKOi3Z.mjs.map} +1 -1
- package/dist/client/{projects-CRL37ftA.mjs → projects-C3wR-lvM.mjs} +16 -19
- package/dist/client/projects-C3wR-lvM.mjs.map +1 -0
- package/dist/client/{projects-DUWOgB3m.mjs → projects-CGjBlG2w.mjs} +2 -2
- package/dist/client/{projects-DUWOgB3m.mjs.map → projects-CGjBlG2w.mjs.map} +1 -1
- package/dist/client/{projects-DpXQYfKc.mjs → projects-DvSiI5Vg.mjs} +2 -2
- package/dist/client/{projects-DpXQYfKc.mjs.map → projects-DvSiI5Vg.mjs.map} +1 -1
- package/dist/client/{securitygroups-CWWFSjjj.mjs → securitygroups-n8ujBpJP.mjs} +118 -118
- package/dist/client/{securitygroups-CWWFSjjj.mjs.map → securitygroups-n8ujBpJP.mjs.map} +1 -1
- package/dist/client/{useListWithFiltering-C9k7xWqz.mjs → useListWithFiltering-BuhE81I6.mjs} +10 -10
- package/dist/client/{useListWithFiltering-C9k7xWqz.mjs.map → useListWithFiltering-BuhE81I6.mjs.map} +1 -1
- package/dist/server/index.d.ts +6 -2
- package/dist/server/index.js +4 -17
- package/package.json +4 -4
- package/dist/client/_imageId-DCvaU7-S.mjs +0 -534
- package/dist/client/_projectId-DRr9rLST.mjs.map +0 -1
- package/dist/client/projects-CRL37ftA.mjs.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as e, B as t, E as n, G as r, H as i, K as a, P as o, Q as s, R as c, U as l, Y as u, Z as d, at as f, c as p, dt as m, et as h, g, h as _, m as v, nt as y, o as b, p as x, r as S, rt as C, tt as w, ut as T, y as E } from "./build-DgeVmENN.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-CyQ3XmpB.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-CMgoYcDG.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-BuhE81I6.mjs";
|
|
8
|
+
import { t as N } from "./EditSecurityGroupModal-BGPXglju.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(u, { 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, _: s } = H(), l = ({ 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(E, {
|
|
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(o, {
|
|
38
38
|
columns: 4,
|
|
39
39
|
gridColumnTemplate: "15% 35% 15% 35%",
|
|
40
40
|
children: [
|
|
41
|
-
/*#__PURE__*/ I(
|
|
41
|
+
/*#__PURE__*/ I(n, { children: [/*#__PURE__*/ F(c, { 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(
|
|
49
|
+
/*#__PURE__*/ I(n, { children: [
|
|
50
|
+
/*#__PURE__*/ F(c, { children: a._({ id: "S0kLOH" }) }),
|
|
51
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(
|
|
56
|
+
/*#__PURE__*/ F(c, { children: a._({ id: "OYHzN1" }) }),
|
|
57
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(
|
|
63
|
+
/*#__PURE__*/ I(n, { children: [
|
|
64
|
+
/*#__PURE__*/ F(c, { children: a._({ id: "6YtxFj" }) }),
|
|
65
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(r, { children: /*#__PURE__*/ F(
|
|
70
|
+
/*#__PURE__*/ F(c, { children: a._({ id: "Jim5X9" }) }),
|
|
71
|
+
/*#__PURE__*/ F(r, { children: /*#__PURE__*/ F(l, { value: e.stateful }) })
|
|
72
72
|
] }),
|
|
73
|
-
/*#__PURE__*/ I(
|
|
74
|
-
/*#__PURE__*/ F(
|
|
73
|
+
/*#__PURE__*/ I(n, { children: [
|
|
74
|
+
/*#__PURE__*/ F(c, { children: a._({ id: "aI8Tgp" }) }),
|
|
75
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(r, { children: /*#__PURE__*/ F(
|
|
80
|
+
/*#__PURE__*/ F(c, { children: a._({ id: "0Gd0NU" }) }),
|
|
81
|
+
/*#__PURE__*/ F(r, { children: /*#__PURE__*/ F(l, { 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(w, {
|
|
93
93
|
direction: "horizontal",
|
|
94
94
|
gap: "0",
|
|
95
95
|
children: [/*#__PURE__*/ F("button", {
|
|
@@ -106,38 +106,38 @@ 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: e, open:
|
|
110
|
-
let { i18n:
|
|
111
|
-
e &&
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
}, m =
|
|
115
|
-
return e ? /*#__PURE__*/ F(
|
|
116
|
-
open:
|
|
117
|
-
onCancel:
|
|
109
|
+
function Y({ rule: e, open: n, onClose: r, onConfirm: i, isLoading: a, error: o }) {
|
|
110
|
+
let { i18n: s, _: c } = H(), [u, d] = z(""), f = () => {
|
|
111
|
+
e && u === "delete" && i(e.id);
|
|
112
|
+
}, p = () => {
|
|
113
|
+
d(""), r();
|
|
114
|
+
}, m = u !== "delete" || a;
|
|
115
|
+
return e ? /*#__PURE__*/ F(S, {
|
|
116
|
+
open: n,
|
|
117
|
+
onCancel: p,
|
|
118
118
|
size: "small",
|
|
119
|
-
title:
|
|
120
|
-
modalFooter: /*#__PURE__*/ F(
|
|
119
|
+
title: s._({ id: "TM93nK" }),
|
|
120
|
+
modalFooter: /*#__PURE__*/ F(g, {
|
|
121
121
|
className: "flex justify-end",
|
|
122
|
-
children: /*#__PURE__*/ I(
|
|
122
|
+
children: /*#__PURE__*/ I(T, { children: [/*#__PURE__*/ F(E, {
|
|
123
123
|
variant: "default",
|
|
124
|
-
onClick:
|
|
125
|
-
disabled:
|
|
124
|
+
onClick: p,
|
|
125
|
+
disabled: a,
|
|
126
126
|
children: /*#__PURE__*/ F(V, { id: "dEgA5A" })
|
|
127
|
-
}), /*#__PURE__*/ F(
|
|
127
|
+
}), /*#__PURE__*/ F(E, {
|
|
128
128
|
variant: "primary-danger",
|
|
129
|
-
onClick:
|
|
129
|
+
onClick: f,
|
|
130
130
|
disabled: m,
|
|
131
131
|
"data-testid": "confirm-delete-rule-button",
|
|
132
|
-
children:
|
|
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
|
-
|
|
136
|
+
o && /*#__PURE__*/ F(t, {
|
|
137
137
|
dismissible: !1,
|
|
138
138
|
variant: "error",
|
|
139
139
|
className: "mt-4",
|
|
140
|
-
children:
|
|
140
|
+
children: o
|
|
141
141
|
}),
|
|
142
142
|
/*#__PURE__*/ F(V, { id: "CMVP7y" }),
|
|
143
143
|
/*#__PURE__*/ I("div", {
|
|
@@ -195,12 +195,12 @@ function Y({ rule: e, open: t, onClose: n, onConfirm: r, isLoading: i, error: a
|
|
|
195
195
|
id: "PHt+EV",
|
|
196
196
|
components: { 0: /*#__PURE__*/ F("strong", {}) }
|
|
197
197
|
})
|
|
198
|
-
}), /*#__PURE__*/ F(
|
|
199
|
-
value:
|
|
200
|
-
onChange: (e) =>
|
|
201
|
-
placeholder:
|
|
198
|
+
}), /*#__PURE__*/ F(l, {
|
|
199
|
+
value: u,
|
|
200
|
+
onChange: (e) => d(e.target.value),
|
|
201
|
+
placeholder: s._({ id: "HNlEFZ" }),
|
|
202
202
|
autoComplete: "off",
|
|
203
|
-
disabled:
|
|
203
|
+
disabled: a,
|
|
204
204
|
"data-testid": "delete-rule-confirmation-input"
|
|
205
205
|
})]
|
|
206
206
|
})
|
|
@@ -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(p, {
|
|
555
555
|
className: "mb-6",
|
|
556
|
-
children: /*#__PURE__*/ F(
|
|
556
|
+
children: /*#__PURE__*/ F(m, {
|
|
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(v, {
|
|
571
571
|
value: e.value,
|
|
572
572
|
label: n._({ id: "eh/k36" })
|
|
573
|
-
}, e.value) : /*#__PURE__*/ F(
|
|
573
|
+
}, e.value) : /*#__PURE__*/ F(v, {
|
|
574
574
|
value: e.value,
|
|
575
575
|
label: e.label
|
|
576
576
|
}, e.value))
|
|
@@ -580,47 +580,47 @@ function se({ form: e, disabled: t = !1 }) {
|
|
|
580
580
|
}
|
|
581
581
|
//#endregion
|
|
582
582
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/DirectionEthertypeSection.tsx
|
|
583
|
-
function ce({ form:
|
|
584
|
-
let { i18n:
|
|
585
|
-
return /*#__PURE__*/ F(
|
|
583
|
+
function ce({ form: e, disabled: t = !1 }) {
|
|
584
|
+
let { i18n: n, _: r } = H();
|
|
585
|
+
return /*#__PURE__*/ F(e.Field, {
|
|
586
586
|
name: "direction",
|
|
587
|
-
children: (
|
|
587
|
+
children: (e) => /*#__PURE__*/ F(p, { children: /*#__PURE__*/ F(_, {
|
|
588
588
|
name: "direction",
|
|
589
|
-
label:
|
|
590
|
-
selected:
|
|
591
|
-
onChange: (
|
|
589
|
+
label: n._({ id: "MRB7nI" }),
|
|
590
|
+
selected: e.state.value,
|
|
591
|
+
onChange: (t) => e.handleChange(String(t)),
|
|
592
592
|
required: !0,
|
|
593
|
-
disabled:
|
|
593
|
+
disabled: t,
|
|
594
594
|
children: /*#__PURE__*/ I("div", {
|
|
595
595
|
className: "flex gap-4",
|
|
596
|
-
children: [/*#__PURE__*/ F(
|
|
596
|
+
children: [/*#__PURE__*/ F(x, {
|
|
597
597
|
value: "ingress",
|
|
598
|
-
label:
|
|
599
|
-
}), /*#__PURE__*/ F(
|
|
598
|
+
label: n._({ id: "fzfAAa" })
|
|
599
|
+
}), /*#__PURE__*/ F(x, {
|
|
600
600
|
value: "egress",
|
|
601
|
-
label:
|
|
601
|
+
label: n._({ id: "nETBrc" })
|
|
602
602
|
})]
|
|
603
603
|
})
|
|
604
604
|
}) })
|
|
605
605
|
});
|
|
606
606
|
}
|
|
607
|
-
function le({ form:
|
|
608
|
-
let { i18n:
|
|
609
|
-
return /*#__PURE__*/ F(
|
|
607
|
+
function le({ form: e, disabled: t = !1 }) {
|
|
608
|
+
let { i18n: n, _: r } = H();
|
|
609
|
+
return /*#__PURE__*/ F(e.Field, {
|
|
610
610
|
name: "ethertype",
|
|
611
|
-
children: (
|
|
611
|
+
children: (e) => /*#__PURE__*/ F(p, { children: /*#__PURE__*/ F(_, {
|
|
612
612
|
name: "ethertype",
|
|
613
|
-
label:
|
|
614
|
-
selected:
|
|
615
|
-
onChange: (
|
|
613
|
+
label: n._({ id: "16085O" }),
|
|
614
|
+
selected: e.state.value,
|
|
615
|
+
onChange: (t) => e.handleChange(String(t)),
|
|
616
616
|
required: !0,
|
|
617
|
-
disabled:
|
|
617
|
+
disabled: t,
|
|
618
618
|
children: /*#__PURE__*/ I("div", {
|
|
619
619
|
className: "flex gap-4",
|
|
620
|
-
children: [/*#__PURE__*/ F(
|
|
620
|
+
children: [/*#__PURE__*/ F(x, {
|
|
621
621
|
value: "IPv4",
|
|
622
622
|
label: "IPv4"
|
|
623
|
-
}), /*#__PURE__*/ F(
|
|
623
|
+
}), /*#__PURE__*/ F(x, {
|
|
624
624
|
value: "IPv6",
|
|
625
625
|
label: "IPv6"
|
|
626
626
|
})]
|
|
@@ -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(p, {
|
|
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" }),
|
|
@@ -652,8 +652,8 @@ function ue({ form: e, disabled: t = !1 }) {
|
|
|
652
652
|
//#endregion
|
|
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
|
-
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),
|
|
656
|
-
return /*#__PURE__*/ I(
|
|
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(p, {
|
|
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" }),
|
|
@@ -696,7 +696,7 @@ function de({ form: e, disabled: t = !1 }) {
|
|
|
696
696
|
},
|
|
697
697
|
invalid: t.state.meta.errors.length > 0,
|
|
698
698
|
placeholder: "",
|
|
699
|
-
disabled:
|
|
699
|
+
disabled: s
|
|
700
700
|
})
|
|
701
701
|
})
|
|
702
702
|
})
|
|
@@ -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(p, {
|
|
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" }),
|
|
@@ -757,75 +757,75 @@ function fe({ form: e, disabled: t = !1 }) {
|
|
|
757
757
|
}
|
|
758
758
|
//#endregion
|
|
759
759
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/RemoteSourceSection.tsx
|
|
760
|
-
function pe({ form:
|
|
761
|
-
let { i18n:
|
|
760
|
+
function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
761
|
+
let { i18n: r, _: i } = H();
|
|
762
762
|
return /*#__PURE__*/ I(P, { children: [
|
|
763
|
-
/*#__PURE__*/ F(
|
|
763
|
+
/*#__PURE__*/ F(e.Field, {
|
|
764
764
|
name: "remoteSourceType",
|
|
765
765
|
mode: "value",
|
|
766
|
-
children: (
|
|
766
|
+
children: (n) => /*#__PURE__*/ F(p, {
|
|
767
767
|
className: "mb-1",
|
|
768
|
-
children: /*#__PURE__*/ F(
|
|
768
|
+
children: /*#__PURE__*/ F(_, {
|
|
769
769
|
name: "remoteSourceType",
|
|
770
|
-
label:
|
|
771
|
-
selected:
|
|
772
|
-
onChange: (
|
|
773
|
-
let
|
|
774
|
-
|
|
770
|
+
label: r._({ id: "I5kZVK" }),
|
|
771
|
+
selected: n.state.value,
|
|
772
|
+
onChange: (t) => {
|
|
773
|
+
let r = String(t);
|
|
774
|
+
n.handleChange(r), r !== "security_group" && e.setFieldValue("ethertype", "IPv4");
|
|
775
775
|
},
|
|
776
|
-
disabled:
|
|
776
|
+
disabled: t,
|
|
777
777
|
children: /*#__PURE__*/ I("div", {
|
|
778
778
|
className: "flex gap-4",
|
|
779
|
-
children: [/*#__PURE__*/ F(
|
|
779
|
+
children: [/*#__PURE__*/ F(x, {
|
|
780
780
|
value: "cidr",
|
|
781
|
-
label:
|
|
782
|
-
}), /*#__PURE__*/ F(
|
|
781
|
+
label: r._({ id: "4uXhtt" })
|
|
782
|
+
}), /*#__PURE__*/ F(x, {
|
|
783
783
|
value: "security_group",
|
|
784
|
-
label:
|
|
784
|
+
label: r._({ id: "bwhBhT" })
|
|
785
785
|
})]
|
|
786
786
|
})
|
|
787
787
|
})
|
|
788
788
|
})
|
|
789
789
|
}),
|
|
790
|
-
/*#__PURE__*/ F(
|
|
790
|
+
/*#__PURE__*/ F(e.Field, {
|
|
791
791
|
name: "remoteSourceType",
|
|
792
|
-
children: (
|
|
792
|
+
children: (n) => n.state.value === "cidr" ? /*#__PURE__*/ F(e.Field, {
|
|
793
793
|
name: "remoteCidr",
|
|
794
|
-
children: (
|
|
794
|
+
children: (n) => /*#__PURE__*/ F(e.Field, {
|
|
795
795
|
name: "ethertype",
|
|
796
|
-
children: (
|
|
796
|
+
children: (e) => /*#__PURE__*/ F(p, {
|
|
797
797
|
className: "mb-6",
|
|
798
|
-
children: /*#__PURE__*/ F(
|
|
798
|
+
children: /*#__PURE__*/ F(l, {
|
|
799
799
|
id: "remoteCidr",
|
|
800
800
|
name: "remoteCidr",
|
|
801
|
-
label:
|
|
802
|
-
value:
|
|
803
|
-
onChange: (
|
|
804
|
-
errortext:
|
|
805
|
-
placeholder:
|
|
806
|
-
disabled:
|
|
801
|
+
label: r._({ id: "vmYyLY" }),
|
|
802
|
+
value: n.state.value,
|
|
803
|
+
onChange: (e) => n.handleChange(e.target.value),
|
|
804
|
+
errortext: n.state.meta.errors[0]?.message,
|
|
805
|
+
placeholder: e.state.value === "IPv4" ? Z : re,
|
|
806
|
+
disabled: t
|
|
807
807
|
})
|
|
808
808
|
})
|
|
809
809
|
})
|
|
810
810
|
}) : null
|
|
811
811
|
}),
|
|
812
|
-
/*#__PURE__*/ F(
|
|
812
|
+
/*#__PURE__*/ F(e.Field, {
|
|
813
813
|
name: "remoteSourceType",
|
|
814
|
-
children: (
|
|
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(p, {
|
|
817
817
|
className: "mb-6",
|
|
818
|
-
children: /*#__PURE__*/ I(
|
|
818
|
+
children: /*#__PURE__*/ I(m, {
|
|
819
819
|
id: "remoteSecurityGroupId",
|
|
820
|
-
label:
|
|
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
|
-
disabled:
|
|
825
|
-
children: [/*#__PURE__*/ F(
|
|
824
|
+
disabled: t,
|
|
825
|
+
children: [/*#__PURE__*/ F(v, {
|
|
826
826
|
value: "",
|
|
827
|
-
label:
|
|
828
|
-
}),
|
|
827
|
+
label: r._({ id: "ZvIpwi" })
|
|
828
|
+
}), n.map((e) => /*#__PURE__*/ F(v, {
|
|
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(p, {
|
|
845
845
|
className: "mb-0",
|
|
846
|
-
children: /*#__PURE__*/ F(
|
|
846
|
+
children: /*#__PURE__*/ F(h, {
|
|
847
847
|
id: "description",
|
|
848
848
|
name: "description",
|
|
849
849
|
label: n._({ id: "Nu4oKW" }),
|
|
@@ -858,12 +858,12 @@ 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: e, open:
|
|
862
|
-
let { i18n:
|
|
861
|
+
var he = ({ securityGroupId: e, open: n, onClose: r, onCreate: o, isLoading: s = !1, error: c = null, availableSecurityGroups: l = [] }) => {
|
|
862
|
+
let { i18n: u, _: d } = H(), f = W({
|
|
863
863
|
defaultValues: oe,
|
|
864
864
|
validators: { onSubmit: ae },
|
|
865
865
|
onSubmit: async ({ value: t }) => {
|
|
866
|
-
if (
|
|
866
|
+
if (s) return;
|
|
867
867
|
let n = {
|
|
868
868
|
security_group_id: e,
|
|
869
869
|
direction: t.direction,
|
|
@@ -878,91 +878,91 @@ var he = ({ securityGroupId: e, open: t, onClose: n, onCreate: r, isLoading: i =
|
|
|
878
878
|
let e = parseInt(t.portFrom, 10);
|
|
879
879
|
n.port_range_min = e, t.portTo ? n.port_range_max = parseInt(t.portTo, 10) : n.port_range_max = e;
|
|
880
880
|
}
|
|
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
|
|
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 o(n), p();
|
|
882
882
|
}
|
|
883
|
-
}),
|
|
884
|
-
|
|
883
|
+
}), p = () => {
|
|
884
|
+
f.reset(), r();
|
|
885
885
|
};
|
|
886
|
-
return /*#__PURE__*/ I(
|
|
887
|
-
open:
|
|
888
|
-
onCancel:
|
|
886
|
+
return /*#__PURE__*/ I(S, {
|
|
887
|
+
open: n,
|
|
888
|
+
onCancel: p,
|
|
889
889
|
size: "large",
|
|
890
|
-
title:
|
|
891
|
-
modalFooter: /*#__PURE__*/ F(
|
|
890
|
+
title: u._({ id: "b2BLBa" }),
|
|
891
|
+
modalFooter: /*#__PURE__*/ F(g, {
|
|
892
892
|
className: "flex justify-end",
|
|
893
|
-
children: /*#__PURE__*/ F(
|
|
893
|
+
children: /*#__PURE__*/ F(f.Subscribe, { children: (e) => {
|
|
894
894
|
let t = !!e.values.ruleType;
|
|
895
|
-
return /*#__PURE__*/ I(
|
|
895
|
+
return /*#__PURE__*/ I(T, { children: [/*#__PURE__*/ F(E, {
|
|
896
896
|
variant: "default",
|
|
897
|
-
onClick:
|
|
898
|
-
disabled:
|
|
897
|
+
onClick: p,
|
|
898
|
+
disabled: s || e.isSubmitting,
|
|
899
899
|
children: /*#__PURE__*/ F(V, { id: "dEgA5A" })
|
|
900
|
-
}), /*#__PURE__*/ F(
|
|
900
|
+
}), /*#__PURE__*/ F(E, {
|
|
901
901
|
variant: "primary",
|
|
902
902
|
type: "button",
|
|
903
|
-
onClick: () =>
|
|
904
|
-
disabled:
|
|
903
|
+
onClick: () => f.handleSubmit(),
|
|
904
|
+
disabled: s || e.isSubmitting || !t,
|
|
905
905
|
"data-testid": "add-rule-button",
|
|
906
|
-
children: e.isSubmitting ||
|
|
906
|
+
children: e.isSubmitting || s ? /*#__PURE__*/ F(a, { size: "small" }) : /*#__PURE__*/ F(V, { id: "bmQLn5" })
|
|
907
907
|
})] });
|
|
908
908
|
} })
|
|
909
909
|
}),
|
|
910
910
|
children: [
|
|
911
|
-
|
|
911
|
+
c && /*#__PURE__*/ F(t, {
|
|
912
912
|
dismissible: !1,
|
|
913
913
|
variant: "error",
|
|
914
914
|
className: "mb-4",
|
|
915
|
-
children:
|
|
915
|
+
children: c
|
|
916
916
|
}),
|
|
917
|
-
|
|
917
|
+
s && /*#__PURE__*/ I("div", {
|
|
918
918
|
className: "mb-4 flex items-center justify-center gap-2",
|
|
919
|
-
children: [/*#__PURE__*/ F(
|
|
919
|
+
children: [/*#__PURE__*/ F(a, { 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(b, {
|
|
925
925
|
className: "mb-6",
|
|
926
926
|
onSubmit: (e) => {
|
|
927
|
-
e.preventDefault(),
|
|
927
|
+
e.preventDefault(), f.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: f,
|
|
933
|
+
disabled: s
|
|
934
|
+
}), /*#__PURE__*/ F(f.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: f,
|
|
940
|
+
disabled: s
|
|
941
941
|
}),
|
|
942
942
|
e.values.ruleType === "other-protocol" && /*#__PURE__*/ F(ue, {
|
|
943
|
-
form:
|
|
944
|
-
disabled:
|
|
943
|
+
form: f,
|
|
944
|
+
disabled: s
|
|
945
945
|
}),
|
|
946
946
|
t && /*#__PURE__*/ F(de, {
|
|
947
|
-
form:
|
|
948
|
-
disabled:
|
|
947
|
+
form: f,
|
|
948
|
+
disabled: s
|
|
949
949
|
}),
|
|
950
950
|
n && /*#__PURE__*/ F(fe, {
|
|
951
|
-
form:
|
|
952
|
-
disabled:
|
|
951
|
+
form: f,
|
|
952
|
+
disabled: s
|
|
953
953
|
}),
|
|
954
954
|
/*#__PURE__*/ F(pe, {
|
|
955
|
-
form:
|
|
956
|
-
disabled:
|
|
957
|
-
availableSecurityGroups:
|
|
955
|
+
form: f,
|
|
956
|
+
disabled: s,
|
|
957
|
+
availableSecurityGroups: l
|
|
958
958
|
}),
|
|
959
959
|
e.values.remoteSourceType === "security_group" && /*#__PURE__*/ F(le, {
|
|
960
|
-
form:
|
|
961
|
-
disabled:
|
|
960
|
+
form: f,
|
|
961
|
+
disabled: s
|
|
962
962
|
}),
|
|
963
963
|
/*#__PURE__*/ F(me, {
|
|
964
|
-
form:
|
|
965
|
-
disabled:
|
|
964
|
+
form: f,
|
|
965
|
+
disabled: s
|
|
966
966
|
})
|
|
967
967
|
] });
|
|
968
968
|
} })]
|
|
@@ -973,22 +973,22 @@ var he = ({ securityGroupId: e, open: t, onClose: n, onCreate: r, isLoading: i =
|
|
|
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:
|
|
977
|
-
let { i18n:
|
|
976
|
+
function ge({ rules: t, totalRulesCount: i, onDeleteRule: a, isDeletingRule: s, deleteError: l, searchTerm: u = "", onSearchChange: d, sortSettings: p, onSortChange: m, filterSettings: h, onFilterChange: g, securityGroupId: _, onCreateRule: v, isCreatingRule: y = !1, createRuleError: b = null, availableSecurityGroups: x = [], readOnly: S = !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
|
+
a(e);
|
|
981
981
|
}, U = () => {
|
|
982
982
|
s || A(null);
|
|
983
983
|
};
|
|
984
984
|
L(() => {
|
|
985
|
-
!s && !
|
|
986
|
-
}, [s,
|
|
985
|
+
!s && !l && A(null);
|
|
986
|
+
}, [s, l]);
|
|
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,92 +996,92 @@ function ge({ rules: e, totalRulesCount: n, 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(w, {
|
|
1005
1005
|
direction: "vertical",
|
|
1006
1006
|
gap: "4",
|
|
1007
1007
|
children: [/*#__PURE__*/ F(j, {
|
|
1008
|
-
totalCount:
|
|
1009
|
-
filteredCount:
|
|
1010
|
-
itemName:
|
|
1011
|
-
filterSettings:
|
|
1012
|
-
onFilter:
|
|
1013
|
-
sortSettings:
|
|
1014
|
-
onSort:
|
|
1015
|
-
searchTerm:
|
|
1008
|
+
totalCount: i ?? t.length,
|
|
1009
|
+
filteredCount: t.length,
|
|
1010
|
+
itemName: T._({ id: "j9hkgJ" }),
|
|
1011
|
+
filterSettings: h,
|
|
1012
|
+
onFilter: g,
|
|
1013
|
+
sortSettings: p,
|
|
1014
|
+
onSort: m,
|
|
1015
|
+
searchTerm: u,
|
|
1016
1016
|
onSearch: d,
|
|
1017
|
-
actions: !
|
|
1017
|
+
actions: !S && v && /*#__PURE__*/ F(E, {
|
|
1018
1018
|
variant: "primary",
|
|
1019
1019
|
icon: "addCircle",
|
|
1020
1020
|
onClick: N,
|
|
1021
1021
|
children: /*#__PURE__*/ F(V, { id: "O8tK4v" })
|
|
1022
1022
|
})
|
|
1023
|
-
}),
|
|
1024
|
-
columns:
|
|
1023
|
+
}), t.length === 0 ? /*#__PURE__*/ F(V, { id: "nnxwBn" }) : /*#__PURE__*/ I(o, {
|
|
1024
|
+
columns: S ? 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
|
-
] }),
|
|
1034
|
-
"data-testid": `rule-row-${
|
|
1026
|
+
children: [/*#__PURE__*/ I(n, { children: [
|
|
1027
|
+
/*#__PURE__*/ F(c, { children: T._({ id: "MRB7nI" }) }),
|
|
1028
|
+
/*#__PURE__*/ F(c, { children: T._({ id: "Nu4oKW" }) }),
|
|
1029
|
+
/*#__PURE__*/ F(c, { children: T._({ id: "yp0UjB" }) }),
|
|
1030
|
+
/*#__PURE__*/ F(c, { children: T._({ id: "6+OdGi" }) }),
|
|
1031
|
+
/*#__PURE__*/ F(c, { children: T._({ id: "6jAi8c" }) }),
|
|
1032
|
+
!S && /*#__PURE__*/ F(c, { children: T._({ id: "7L01XJ" }) })
|
|
1033
|
+
] }), t.map((t) => /*#__PURE__*/ I(n, {
|
|
1034
|
+
"data-testid": `rule-row-${t.id}`,
|
|
1035
1035
|
children: [
|
|
1036
|
-
/*#__PURE__*/ F(r, { children:
|
|
1037
|
-
/*#__PURE__*/ F(r, { children:
|
|
1038
|
-
/*#__PURE__*/ F(r, { children:
|
|
1039
|
-
/*#__PURE__*/ F(r, { children:
|
|
1040
|
-
/*#__PURE__*/ F(r, { children: W(
|
|
1041
|
-
!
|
|
1036
|
+
/*#__PURE__*/ F(r, { children: t.direction || T._({ id: "h47p9L" }) }),
|
|
1037
|
+
/*#__PURE__*/ F(r, { children: t.description || T._({ id: "h47p9L" }) }),
|
|
1038
|
+
/*#__PURE__*/ F(r, { children: t.ethertype }),
|
|
1039
|
+
/*#__PURE__*/ F(r, { children: t.protocol || T._({ id: "eKC+EC" }) }),
|
|
1040
|
+
/*#__PURE__*/ F(r, { children: W(t) }),
|
|
1041
|
+
!S && /*#__PURE__*/ F(r, {
|
|
1042
1042
|
onClick: (e) => e.stopPropagation(),
|
|
1043
1043
|
className: "items-end justify-end pr-0",
|
|
1044
|
-
children: /*#__PURE__*/ F(
|
|
1045
|
-
label:
|
|
1046
|
-
onClick: () => R(
|
|
1044
|
+
children: /*#__PURE__*/ F(C, { children: /*#__PURE__*/ F(e, { children: /*#__PURE__*/ F(f, {
|
|
1045
|
+
label: T._({ id: "cnGeoo" }),
|
|
1046
|
+
onClick: () => R(t)
|
|
1047
1047
|
}) }) })
|
|
1048
1048
|
})
|
|
1049
1049
|
]
|
|
1050
|
-
},
|
|
1050
|
+
}, t.id))]
|
|
1051
1051
|
})]
|
|
1052
1052
|
}),
|
|
1053
|
-
!
|
|
1053
|
+
!S && /*#__PURE__*/ F(Y, {
|
|
1054
1054
|
rule: O,
|
|
1055
1055
|
open: !!O,
|
|
1056
1056
|
onClose: U,
|
|
1057
1057
|
onConfirm: B,
|
|
1058
1058
|
isLoading: s,
|
|
1059
|
-
error:
|
|
1059
|
+
error: l
|
|
1060
1060
|
}),
|
|
1061
|
-
!
|
|
1062
|
-
securityGroupId:
|
|
1061
|
+
!S && _ && v && M && /*#__PURE__*/ F(he, {
|
|
1062
|
+
securityGroupId: _,
|
|
1063
1063
|
open: M,
|
|
1064
1064
|
onClose: N,
|
|
1065
|
-
onCreate:
|
|
1066
|
-
isLoading:
|
|
1067
|
-
error:
|
|
1068
|
-
availableSecurityGroups:
|
|
1065
|
+
onCreate: v,
|
|
1066
|
+
isLoading: y,
|
|
1067
|
+
error: b,
|
|
1068
|
+
availableSecurityGroups: x
|
|
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
|
-
function _e({ policy:
|
|
1075
|
-
let { i18n:
|
|
1076
|
-
return /*#__PURE__*/ I(
|
|
1077
|
-
/*#__PURE__*/ F(r, { children:
|
|
1078
|
-
/*#__PURE__*/ F(r, { children:
|
|
1074
|
+
function _e({ policy: t, onDelete: i }) {
|
|
1075
|
+
let { i18n: a, _: o } = H();
|
|
1076
|
+
return /*#__PURE__*/ I(n, { children: [
|
|
1077
|
+
/*#__PURE__*/ F(r, { children: t.target_tenant }),
|
|
1078
|
+
/*#__PURE__*/ F(r, { children: t.action }),
|
|
1079
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:
|
|
1084
|
-
onClick:
|
|
1082
|
+
children: /*#__PURE__*/ F(C, { children: /*#__PURE__*/ F(e, { children: /*#__PURE__*/ F(f, {
|
|
1083
|
+
label: a._({ id: "t/YqKh" }),
|
|
1084
|
+
onClick: i
|
|
1085
1085
|
}) }) })
|
|
1086
1086
|
})
|
|
1087
1087
|
] });
|
|
@@ -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, d] = z(!1), f = U.object({ targetTenant: U.string().min(1, a._({ id: "1RwosK" })).refine($, { message: a._({ id: "CunRry" }) }) }), p = 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
|
+
}), h();
|
|
1104
|
+
} }), m = W({
|
|
1105
1105
|
defaultValues: { targetTenant: "" },
|
|
1106
|
-
validators: { onSubmit:
|
|
1106
|
+
validators: { onSubmit: f },
|
|
1107
1107
|
onSubmit: async ({ value: e }) => {
|
|
1108
|
-
|
|
1109
|
-
project_id:
|
|
1110
|
-
securityGroupId:
|
|
1108
|
+
p.isPending || p.mutate({
|
|
1109
|
+
project_id: c,
|
|
1110
|
+
securityGroupId: r,
|
|
1111
1111
|
targetTenant: e.targetTenant.trim()
|
|
1112
1112
|
});
|
|
1113
1113
|
}
|
|
1114
|
-
}),
|
|
1115
|
-
|
|
1116
|
-
},
|
|
1117
|
-
|
|
1114
|
+
}), h = () => {
|
|
1115
|
+
m.reset(), p.reset(), d(!1), n();
|
|
1116
|
+
}, g = async () => {
|
|
1117
|
+
d(!0), await m.handleSubmit();
|
|
1118
1118
|
};
|
|
1119
|
-
return /*#__PURE__*/ I(
|
|
1119
|
+
return /*#__PURE__*/ I(S, {
|
|
1120
1120
|
open: e,
|
|
1121
|
-
onCancel:
|
|
1122
|
-
title:
|
|
1121
|
+
onCancel: h,
|
|
1122
|
+
title: a._({ id: "vmRPFm" }),
|
|
1123
1123
|
size: "large",
|
|
1124
|
-
onConfirm:
|
|
1125
|
-
cancelButtonLabel:
|
|
1126
|
-
confirmButtonLabel:
|
|
1127
|
-
disableConfirmButton:
|
|
1124
|
+
onConfirm: g,
|
|
1125
|
+
cancelButtonLabel: a._({ id: "dEgA5A" }),
|
|
1126
|
+
confirmButtonLabel: a._({ id: "Z8lGw6" }),
|
|
1127
|
+
disableConfirmButton: p.isPending,
|
|
1128
1128
|
children: [
|
|
1129
|
-
|
|
1129
|
+
p.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 = p.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" }) : p.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(b, {
|
|
1142
1142
|
className: "mb-0",
|
|
1143
1143
|
onSubmit: (e) => {
|
|
1144
|
-
e.preventDefault(),
|
|
1144
|
+
e.preventDefault(), g();
|
|
1145
1145
|
},
|
|
1146
|
-
children: /*#__PURE__*/ F(
|
|
1146
|
+
children: /*#__PURE__*/ F(i, { children: /*#__PURE__*/ F(m.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: p.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(), d = 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), p());
|
|
1191
1191
|
}
|
|
1192
|
-
}),
|
|
1193
|
-
|
|
1192
|
+
}), f = G(d.store, (e) => e.isSubmitting || e.values.confirmText !== "remove"), p = () => {
|
|
1193
|
+
d.reset(), r();
|
|
1194
1194
|
};
|
|
1195
|
-
return /*#__PURE__*/ F(
|
|
1196
|
-
open:
|
|
1197
|
-
onCancel:
|
|
1195
|
+
return /*#__PURE__*/ F(S, {
|
|
1196
|
+
open: n,
|
|
1197
|
+
onCancel: p,
|
|
1198
1198
|
size: "small",
|
|
1199
|
-
title:
|
|
1200
|
-
onConfirm:
|
|
1201
|
-
cancelButtonLabel:
|
|
1202
|
-
confirmButtonLabel:
|
|
1203
|
-
disableConfirmButton:
|
|
1199
|
+
title: c._({ id: "Dt5W9T" }),
|
|
1200
|
+
onConfirm: d.handleSubmit,
|
|
1201
|
+
cancelButtonLabel: c._({ id: "dEgA5A" }),
|
|
1202
|
+
confirmButtonLabel: o ? c._({ id: "M5RhXF" }) : c._({ id: "qh5W8q" }),
|
|
1203
|
+
disableConfirmButton: o || f,
|
|
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(b, {
|
|
1239
1239
|
className: "mt-4 mb-0",
|
|
1240
1240
|
onSubmit: (e) => {
|
|
1241
|
-
e.preventDefault(),
|
|
1241
|
+
e.preventDefault(), d.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(d.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,105 +1266,105 @@ 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, _: s } = H(), l = A(), [u, d] = k(), [f, p] = z(null), [m, h] = z(""), { data: g, isPending: _, isError: v, error: y } = D.network.rbacPolicy.list.useQuery({
|
|
1270
|
+
project_id: l,
|
|
1271
1271
|
securityGroupId: e
|
|
1272
|
-
}, { refetchOnWindowFocus: !1 }),
|
|
1273
|
-
|
|
1274
|
-
project_id:
|
|
1272
|
+
}, { refetchOnWindowFocus: !1 }), b = D.network.rbacPolicy.delete.useMutation({ onSuccess: () => {
|
|
1273
|
+
r.network.rbacPolicy.list.invalidate({
|
|
1274
|
+
project_id: l,
|
|
1275
1275
|
securityGroupId: e
|
|
1276
|
-
}),
|
|
1277
|
-
project_id:
|
|
1276
|
+
}), r.network.securityGroup.getById.invalidate({
|
|
1277
|
+
project_id: l,
|
|
1278
1278
|
securityGroupId: e
|
|
1279
1279
|
});
|
|
1280
|
-
} }),
|
|
1281
|
-
|
|
1282
|
-
},
|
|
1283
|
-
|
|
1284
|
-
project_id:
|
|
1280
|
+
} }), x = (e) => {
|
|
1281
|
+
p(e);
|
|
1282
|
+
}, S = (e) => {
|
|
1283
|
+
b.mutate({
|
|
1284
|
+
project_id: l,
|
|
1285
1285
|
policyId: e
|
|
1286
1286
|
});
|
|
1287
|
-
},
|
|
1288
|
-
|
|
1287
|
+
}, C = () => {
|
|
1288
|
+
b.isPending || p(null);
|
|
1289
1289
|
};
|
|
1290
1290
|
L(() => {
|
|
1291
|
-
!
|
|
1291
|
+
!b.isPending && !b.error && b.isSuccess && p(null);
|
|
1292
1292
|
}, [
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1293
|
+
b.isPending,
|
|
1294
|
+
b.error,
|
|
1295
|
+
b.isSuccess
|
|
1296
1296
|
]);
|
|
1297
|
-
let
|
|
1298
|
-
if (!
|
|
1299
|
-
if (!
|
|
1300
|
-
let e =
|
|
1301
|
-
return
|
|
1302
|
-
}, [
|
|
1303
|
-
|
|
1297
|
+
let T = R(() => {
|
|
1298
|
+
if (!g) return [];
|
|
1299
|
+
if (!m) return g;
|
|
1300
|
+
let e = m.toLowerCase();
|
|
1301
|
+
return g.filter((t) => t.target_tenant?.toLowerCase().includes(e) || t.action?.toLowerCase().includes(e));
|
|
1302
|
+
}, [g, m]), O = (e) => {
|
|
1303
|
+
h(typeof e == "string" ? e : "");
|
|
1304
1304
|
};
|
|
1305
|
-
if (
|
|
1305
|
+
if (_) return /*#__PURE__*/ F(w, {
|
|
1306
1306
|
distribution: "center",
|
|
1307
1307
|
alignment: "center",
|
|
1308
1308
|
className: "py-8",
|
|
1309
|
-
children: /*#__PURE__*/ F(
|
|
1309
|
+
children: /*#__PURE__*/ F(a, { variant: "primary" })
|
|
1310
1310
|
});
|
|
1311
|
-
if (
|
|
1311
|
+
if (v) return /*#__PURE__*/ F(t, {
|
|
1312
1312
|
variant: "error",
|
|
1313
1313
|
className: "mb-4",
|
|
1314
|
-
children:
|
|
1314
|
+
children: y.message
|
|
1315
1315
|
});
|
|
1316
|
-
let M =
|
|
1316
|
+
let M = g?.length || 0, N = T.length;
|
|
1317
1317
|
return /*#__PURE__*/ I(P, { children: [
|
|
1318
|
-
/*#__PURE__*/ I(
|
|
1318
|
+
/*#__PURE__*/ I(w, {
|
|
1319
1319
|
direction: "vertical",
|
|
1320
1320
|
gap: "4",
|
|
1321
1321
|
children: [/*#__PURE__*/ F(j, {
|
|
1322
1322
|
totalCount: M,
|
|
1323
1323
|
filteredCount: N,
|
|
1324
|
-
itemName:
|
|
1325
|
-
searchTerm:
|
|
1324
|
+
itemName: i._({ id: "M9H+/G" }),
|
|
1325
|
+
searchTerm: m,
|
|
1326
1326
|
onSearch: O,
|
|
1327
|
-
actions: /*#__PURE__*/ F(
|
|
1327
|
+
actions: /*#__PURE__*/ F(E, {
|
|
1328
1328
|
variant: "primary",
|
|
1329
1329
|
icon: "addCircle",
|
|
1330
|
-
onClick:
|
|
1330
|
+
onClick: d,
|
|
1331
1331
|
children: /*#__PURE__*/ F(V, { id: "vmRPFm" })
|
|
1332
1332
|
})
|
|
1333
|
-
}), N === 0 ?
|
|
1333
|
+
}), N === 0 ? m ? /*#__PURE__*/ F(V, { id: "qxxo7y" }) : /*#__PURE__*/ F(V, { id: "Dia2Ue" }) : /*#__PURE__*/ I(o, {
|
|
1334
1334
|
columns: 3,
|
|
1335
|
-
children: [/*#__PURE__*/ I(
|
|
1336
|
-
/*#__PURE__*/ F(
|
|
1337
|
-
/*#__PURE__*/ F(
|
|
1338
|
-
/*#__PURE__*/ F(
|
|
1339
|
-
] }),
|
|
1335
|
+
children: [/*#__PURE__*/ I(n, { children: [
|
|
1336
|
+
/*#__PURE__*/ F(c, { children: /*#__PURE__*/ F(V, { id: "WzVwU0" }) }),
|
|
1337
|
+
/*#__PURE__*/ F(c, { children: /*#__PURE__*/ F(V, { id: "bwRvnp" }) }),
|
|
1338
|
+
/*#__PURE__*/ F(c, { children: /*#__PURE__*/ F(V, { id: "7L01XJ" }) })
|
|
1339
|
+
] }), T.map((e) => /*#__PURE__*/ F(_e, {
|
|
1340
1340
|
policy: e,
|
|
1341
|
-
onDelete: () =>
|
|
1341
|
+
onDelete: () => x(e)
|
|
1342
1342
|
}, e.id))]
|
|
1343
1343
|
})]
|
|
1344
1344
|
}),
|
|
1345
1345
|
!!f && /*#__PURE__*/ F(xe, {
|
|
1346
1346
|
policy: f,
|
|
1347
1347
|
open: !!f,
|
|
1348
|
-
onClose:
|
|
1349
|
-
onConfirm:
|
|
1350
|
-
isLoading:
|
|
1351
|
-
error:
|
|
1348
|
+
onClose: C,
|
|
1349
|
+
onConfirm: S,
|
|
1350
|
+
isLoading: b.isPending,
|
|
1351
|
+
error: b.error?.message || null
|
|
1352
1352
|
}),
|
|
1353
|
-
|
|
1354
|
-
isOpen:
|
|
1355
|
-
onClose:
|
|
1353
|
+
u && /*#__PURE__*/ F(be, {
|
|
1354
|
+
isOpen: u,
|
|
1355
|
+
onClose: d,
|
|
1356
1356
|
securityGroupId: e
|
|
1357
1357
|
})
|
|
1358
1358
|
] });
|
|
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:
|
|
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: s, isCreatingRule: c = !1, createRuleError: l = null, availableSecurityGroups: u = [], currentProjectId: f }) {
|
|
1363
|
+
let [p, m] = z("rules"), h = e.project_id === f, g = !h, _ = h;
|
|
1364
|
+
return /*#__PURE__*/ F(d, {
|
|
1365
1365
|
px: !1,
|
|
1366
1366
|
py: !0,
|
|
1367
|
-
children: /*#__PURE__*/ I(
|
|
1367
|
+
children: /*#__PURE__*/ I(w, {
|
|
1368
1368
|
direction: "vertical",
|
|
1369
1369
|
gap: "4",
|
|
1370
1370
|
children: [
|
|
@@ -1375,34 +1375,34 @@ 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: g
|
|
1379
1379
|
}),
|
|
1380
|
-
!
|
|
1381
|
-
activeTab:
|
|
1382
|
-
onTabChange:
|
|
1383
|
-
showRBACTab:
|
|
1380
|
+
!g && /*#__PURE__*/ F(J, {
|
|
1381
|
+
activeTab: p,
|
|
1382
|
+
onTabChange: m,
|
|
1383
|
+
showRBACTab: _
|
|
1384
1384
|
}),
|
|
1385
1385
|
/*#__PURE__*/ I("div", {
|
|
1386
1386
|
className: "mt-6",
|
|
1387
|
-
children: [
|
|
1387
|
+
children: [p === "rules" && /*#__PURE__*/ F(ge, {
|
|
1388
1388
|
rules: t,
|
|
1389
1389
|
totalRulesCount: e.security_group_rules?.length,
|
|
1390
1390
|
onDeleteRule: r,
|
|
1391
1391
|
isDeletingRule: i,
|
|
1392
1392
|
deleteError: a,
|
|
1393
|
-
searchTerm:
|
|
1394
|
-
onSearchChange:
|
|
1395
|
-
sortSettings:
|
|
1396
|
-
onSortChange:
|
|
1397
|
-
filterSettings:
|
|
1398
|
-
onFilterChange:
|
|
1393
|
+
searchTerm: o.searchTerm,
|
|
1394
|
+
onSearchChange: o.onSearchChange,
|
|
1395
|
+
sortSettings: o.sortSettings,
|
|
1396
|
+
onSortChange: o.onSortChange,
|
|
1397
|
+
filterSettings: o.filterSettings,
|
|
1398
|
+
onFilterChange: o.onFilterChange,
|
|
1399
1399
|
securityGroupId: e.id,
|
|
1400
|
-
onCreateRule:
|
|
1401
|
-
isCreatingRule:
|
|
1402
|
-
createRuleError:
|
|
1403
|
-
availableSecurityGroups:
|
|
1404
|
-
readOnly:
|
|
1405
|
-
}),
|
|
1400
|
+
onCreateRule: g ? void 0 : s,
|
|
1401
|
+
isCreatingRule: c,
|
|
1402
|
+
createRuleError: l,
|
|
1403
|
+
availableSecurityGroups: u,
|
|
1404
|
+
readOnly: g
|
|
1405
|
+
}), p === "rbac" && /*#__PURE__*/ F(Se, { securityGroupId: e.id })]
|
|
1406
1406
|
})
|
|
1407
1407
|
]
|
|
1408
1408
|
})
|
|
@@ -1490,38 +1490,38 @@ 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: e } = O.useParams(), t = A(),
|
|
1493
|
+
let { securityGroupId: e } = O.useParams(), t = A(), n = B(), { i18n: r, _: i } = H(), { searchTerm: o, sortSettings: c, filterSettings: l, handleSearchChange: d, handleSortChange: f, handleFilterChange: p } = M({
|
|
1494
1494
|
defaultSortKey: "direction",
|
|
1495
1495
|
defaultSortDir: "asc",
|
|
1496
1496
|
sortOptions: [
|
|
1497
1497
|
{
|
|
1498
|
-
label:
|
|
1498
|
+
label: r._({ id: "MRB7nI" }),
|
|
1499
1499
|
value: "direction"
|
|
1500
1500
|
},
|
|
1501
1501
|
{
|
|
1502
|
-
label:
|
|
1502
|
+
label: r._({ id: "6+OdGi" }),
|
|
1503
1503
|
value: "protocol"
|
|
1504
1504
|
},
|
|
1505
1505
|
{
|
|
1506
|
-
label:
|
|
1506
|
+
label: r._({ id: "Nu4oKW" }),
|
|
1507
1507
|
value: "description"
|
|
1508
1508
|
}
|
|
1509
1509
|
],
|
|
1510
1510
|
filterSettings: { filters: [
|
|
1511
1511
|
{
|
|
1512
|
-
displayName:
|
|
1512
|
+
displayName: r._({ id: "MRB7nI" }),
|
|
1513
1513
|
filterName: "direction",
|
|
1514
1514
|
values: ["ingress", "egress"],
|
|
1515
1515
|
supportsMultiValue: !1
|
|
1516
1516
|
},
|
|
1517
1517
|
{
|
|
1518
|
-
displayName:
|
|
1518
|
+
displayName: r._({ id: "yp0UjB" }),
|
|
1519
1519
|
filterName: "ethertype",
|
|
1520
1520
|
values: ["IPv4", "IPv6"],
|
|
1521
1521
|
supportsMultiValue: !1
|
|
1522
1522
|
},
|
|
1523
1523
|
{
|
|
1524
|
-
displayName:
|
|
1524
|
+
displayName: r._({ id: "6+OdGi" }),
|
|
1525
1525
|
filterName: "protocol",
|
|
1526
1526
|
values: [
|
|
1527
1527
|
"tcp",
|
|
@@ -1532,39 +1532,39 @@ function Te() {
|
|
|
1532
1532
|
supportsMultiValue: !1
|
|
1533
1533
|
}
|
|
1534
1534
|
] }
|
|
1535
|
-
}),
|
|
1535
|
+
}), m = {
|
|
1536
1536
|
searchTerm: o,
|
|
1537
1537
|
onSearchChange: d,
|
|
1538
|
-
sortSettings:
|
|
1539
|
-
onSortChange:
|
|
1538
|
+
sortSettings: c,
|
|
1539
|
+
onSortChange: f,
|
|
1540
1540
|
filterSettings: l,
|
|
1541
|
-
onFilterChange:
|
|
1542
|
-
}, { securityGroup:
|
|
1541
|
+
onFilterChange: p
|
|
1542
|
+
}, { securityGroup: h, filteredAndSortedRules: g, isLoading: _, isError: v, error: b, isUpdating: x, updateError: S, isDeletingRule: C, deleteRuleError: T, isCreatingRule: k, createRuleError: j, editModalOpen: P, handleEdit: L, handleCloseEditModal: z, handleUpdate: U, handleDeleteRule: W, handleCreateRule: G } = we({
|
|
1543
1543
|
securityGroupId: e,
|
|
1544
|
-
filterControls:
|
|
1544
|
+
filterControls: m
|
|
1545
1545
|
}), { data: K } = D.network.securityGroup.list.useQuery({ project_id: t }), q = R(() => (K || []).filter((t) => t.id !== e).map((e) => ({
|
|
1546
1546
|
id: e.id,
|
|
1547
1547
|
name: e.name || e.id
|
|
1548
1548
|
})), [K, e]), J = () => {
|
|
1549
|
-
|
|
1549
|
+
n({
|
|
1550
1550
|
to: "/projects/$projectId/network/securitygroups",
|
|
1551
1551
|
params: { projectId: t }
|
|
1552
1552
|
});
|
|
1553
1553
|
};
|
|
1554
|
-
if (
|
|
1554
|
+
if (_) return /*#__PURE__*/ I(w, {
|
|
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(a, {
|
|
1560
1560
|
variant: "primary",
|
|
1561
1561
|
size: "large",
|
|
1562
1562
|
className: "mb-2"
|
|
1563
1563
|
}), /*#__PURE__*/ F(V, { id: "3x7Sws" })]
|
|
1564
1564
|
});
|
|
1565
|
-
if (
|
|
1566
|
-
let e =
|
|
1567
|
-
return /*#__PURE__*/ I(
|
|
1565
|
+
if (v) {
|
|
1566
|
+
let e = b?.message || "Unknown error";
|
|
1567
|
+
return /*#__PURE__*/ I(w, {
|
|
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(E, {
|
|
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 h ? /*#__PURE__*/ I(w, {
|
|
1591
1591
|
direction: "vertical",
|
|
1592
1592
|
children: [
|
|
1593
|
-
/*#__PURE__*/ F(
|
|
1594
|
-
/*#__PURE__*/ I(
|
|
1593
|
+
/*#__PURE__*/ F(u, { children: h.name || h.id }),
|
|
1594
|
+
/*#__PURE__*/ I(y, {
|
|
1595
1595
|
className: "my-6",
|
|
1596
|
-
children: [/*#__PURE__*/ F(
|
|
1596
|
+
children: [/*#__PURE__*/ F(s, {
|
|
1597
1597
|
onClick: J,
|
|
1598
|
-
label:
|
|
1599
|
-
}), /*#__PURE__*/ F(
|
|
1598
|
+
label: r._({ id: "4opp4r" })
|
|
1599
|
+
}), /*#__PURE__*/ F(s, {
|
|
1600
1600
|
active: !0,
|
|
1601
|
-
label:
|
|
1601
|
+
label: h.id
|
|
1602
1602
|
})]
|
|
1603
1603
|
}),
|
|
1604
1604
|
/*#__PURE__*/ F(Ce, {
|
|
1605
|
-
securityGroup:
|
|
1606
|
-
filteredAndSortedRules:
|
|
1605
|
+
securityGroup: h,
|
|
1606
|
+
filteredAndSortedRules: g,
|
|
1607
1607
|
onEdit: L,
|
|
1608
1608
|
onDeleteRule: W,
|
|
1609
|
-
isDeletingRule:
|
|
1610
|
-
deleteRuleError:
|
|
1611
|
-
filterControls:
|
|
1609
|
+
isDeletingRule: C,
|
|
1610
|
+
deleteRuleError: T,
|
|
1611
|
+
filterControls: m,
|
|
1612
1612
|
onCreateRule: G,
|
|
1613
1613
|
isCreatingRule: k,
|
|
1614
1614
|
createRuleError: j,
|
|
@@ -1616,15 +1616,15 @@ function Te() {
|
|
|
1616
1616
|
currentProjectId: t
|
|
1617
1617
|
}),
|
|
1618
1618
|
/*#__PURE__*/ F(N, {
|
|
1619
|
-
securityGroup:
|
|
1619
|
+
securityGroup: h,
|
|
1620
1620
|
open: P,
|
|
1621
1621
|
onClose: z,
|
|
1622
1622
|
onUpdate: U,
|
|
1623
|
-
isLoading:
|
|
1624
|
-
error:
|
|
1623
|
+
isLoading: x,
|
|
1624
|
+
error: S
|
|
1625
1625
|
})
|
|
1626
1626
|
]
|
|
1627
|
-
}) : /*#__PURE__*/ I(
|
|
1627
|
+
}) : /*#__PURE__*/ I(w, {
|
|
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(E, {
|
|
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-DMi7YRux.mjs.map
|