@cobaltcore-dev/aurora 0.3.0 → 0.3.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-B_PWrxbw.mjs → ContentHeader-BXZoN3B9.mjs} +16 -16
- package/dist/client/{ContentHeader-B_PWrxbw.mjs.map → ContentHeader-BXZoN3B9.mjs.map} +1 -1
- package/dist/client/{DeleteFlavorModal-BkPrQKyE.mjs → DeleteFlavorModal-BusYn32r.mjs} +152 -152
- package/dist/client/{DeleteFlavorModal-BkPrQKyE.mjs.map → DeleteFlavorModal-BusYn32r.mjs.map} +1 -1
- package/dist/client/{EditSecurityGroupModal-ad4uzlt0.mjs → EditSecurityGroupModal-Dl6m7wUe.mjs} +15 -15
- package/dist/client/{EditSecurityGroupModal-ad4uzlt0.mjs.map → EditSecurityGroupModal-Dl6m7wUe.mjs.map} +1 -1
- package/dist/client/FiltersInput-BgNaHFBt.mjs +81 -0
- package/dist/client/FiltersInput-BgNaHFBt.mjs.map +1 -0
- package/dist/client/{FloatingIpActionModals-lKMwLuL8.mjs → FloatingIpActionModals-By2hXR9m.mjs} +50 -50
- package/dist/client/{FloatingIpActionModals-lKMwLuL8.mjs.map → FloatingIpActionModals-By2hXR9m.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications--U13YiQ_.mjs → ImageToastNotifications-fHI8jB2j.mjs} +321 -321
- package/dist/client/{ImageToastNotifications--U13YiQ_.mjs.map → ImageToastNotifications-fHI8jB2j.mjs.map} +1 -1
- package/dist/client/ListToolbar-BvtCo8dk.mjs +129 -0
- package/dist/client/ListToolbar-BvtCo8dk.mjs.map +1 -0
- package/dist/client/{RouteError-iP1Vd6bY.mjs → RouteError-pDEWC_k7.mjs} +2 -2
- package/dist/client/{RouteError-iP1Vd6bY.mjs.map → RouteError-pDEWC_k7.mjs.map} +1 -1
- package/dist/client/SortInput-DXWSqSny.mjs +34 -0
- package/dist/client/SortInput-DXWSqSny.mjs.map +1 -0
- package/dist/client/{_flavorId-BaNXUJhA.mjs → _flavorId-BRonXvCo.mjs} +40 -40
- package/dist/client/{_flavorId-BaNXUJhA.mjs.map → _flavorId-BRonXvCo.mjs.map} +1 -1
- package/dist/client/{_flavorId-CnO76tuy.mjs → _flavorId-BoNcxYmF.mjs} +9 -9
- package/dist/client/{_flavorId-CnO76tuy.mjs.map → _flavorId-BoNcxYmF.mjs.map} +1 -1
- package/dist/client/_floatingIpId-BpUfL8Im2.mjs +228 -0
- package/dist/client/_floatingIpId-BpUfL8Im2.mjs.map +1 -0
- package/dist/client/{_floatingIpId-C8G20nNt.mjs → _floatingIpId-CwHiXazi.mjs} +2 -2
- package/dist/client/{_floatingIpId-C8G20nNt.mjs.map → _floatingIpId-CwHiXazi.mjs.map} +1 -1
- package/dist/client/{_imageId-DdSbxFqG.mjs → _imageId-CdOOJjw0.mjs} +127 -127
- package/dist/client/{_imageId-DdSbxFqG.mjs.map → _imageId-CdOOJjw0.mjs.map} +1 -1
- package/dist/client/{_pcaId-DFkYJEb5.mjs → _pcaId-CwlH1Kvl.mjs} +82 -82
- package/dist/client/{_pcaId-DFkYJEb5.mjs.map → _pcaId-CwlH1Kvl.mjs.map} +1 -1
- package/dist/client/{_pcaId-DX_S-3hE.mjs → _pcaId-D1ZEaCdp.mjs} +2 -2
- package/dist/client/{_pcaId-DX_S-3hE.mjs.map → _pcaId-D1ZEaCdp.mjs.map} +1 -1
- package/dist/client/{_projectId-DsSVV2EA.mjs → _projectId-D1gGribM.mjs} +69 -69
- package/dist/client/{_projectId-DsSVV2EA.mjs.map → _projectId-D1gGribM.mjs.map} +1 -1
- package/dist/client/{_projectId-DYrcZ3E3.mjs → _projectId-DhLpIalx.mjs} +3 -3
- package/dist/client/{_projectId-DYrcZ3E3.mjs.map → _projectId-DhLpIalx.mjs.map} +1 -1
- package/dist/client/{_projectId-Dha4XqX4.mjs → _projectId-Dj_InfSc.mjs} +3 -3
- package/dist/client/{_projectId-Dha4XqX4.mjs.map → _projectId-Dj_InfSc.mjs.map} +1 -1
- package/dist/client/{_projectId-KH5si25Q.mjs → _projectId-OW2xkK43.mjs} +2 -2
- package/dist/client/{_projectId-KH5si25Q.mjs.map → _projectId-OW2xkK43.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-DgaSqYex.mjs → _securityGroupId-B0llWH9A.mjs} +2 -2
- package/dist/client/{_securityGroupId-DgaSqYex.mjs.map → _securityGroupId-B0llWH9A.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-O7FXfx0M.mjs → _securityGroupId-gbUnd5Wv.mjs} +306 -306
- package/dist/client/{_securityGroupId-O7FXfx0M.mjs.map → _securityGroupId-gbUnd5Wv.mjs.map} +1 -1
- package/dist/client/{about-DN8n8sN8.mjs → about-DCe6LsKz.mjs} +2 -2
- package/dist/client/{about-DN8n8sN8.mjs.map → about-DCe6LsKz.mjs.map} +1 -1
- package/dist/client/{build-CZRvXrAL.mjs → build-BJDfnAyi.mjs} +541 -537
- package/dist/client/{build-CZRvXrAL.mjs.map → build-BJDfnAyi.mjs.map} +1 -1
- package/dist/client/{buildFilterParams-ngVK3ybs.mjs → buildFilterParams-By33pG59.mjs} +1 -1
- package/dist/client/{buildFilterParams-ngVK3ybs.mjs.map → buildFilterParams-By33pG59.mjs.map} +1 -1
- package/dist/client/{constants-akdIBeTX.mjs → constants-CAjjRTo_.mjs} +9 -9
- package/dist/client/{constants-akdIBeTX.mjs.map → constants-CAjjRTo_.mjs.map} +1 -1
- package/dist/client/{containers-BE2QiLBs.mjs → containers-BuXUVb1N.mjs} +702 -702
- package/dist/client/{containers-BE2QiLBs.mjs.map → containers-BuXUVb1N.mjs.map} +1 -1
- package/dist/client/{containers-Cs5vOeR2.mjs → containers-Ca5V1EBS.mjs} +1 -1
- package/dist/client/{containers-Cs5vOeR2.mjs.map → containers-Ca5V1EBS.mjs.map} +1 -1
- package/dist/client/{containers-DmwhE9Uz.mjs → containers-NW7RnHTI.mjs} +2 -2
- package/dist/client/{containers-DmwhE9Uz.mjs.map → containers-NW7RnHTI.mjs.map} +1 -1
- package/dist/client/{flavors-CY7A6--v.mjs → flavors-D8oElC2K.mjs} +2 -2
- package/dist/client/{flavors-CY7A6--v.mjs.map → flavors-D8oElC2K.mjs.map} +1 -1
- package/dist/client/flavors-qvgPSI7J.mjs +613 -0
- package/dist/client/flavors-qvgPSI7J.mjs.map +1 -0
- package/dist/client/{floatingips-BtL4d4m-.mjs → floatingips-Be3zLoaD.mjs} +85 -85
- package/dist/client/{floatingips-BtL4d4m-.mjs.map → floatingips-Be3zLoaD.mjs.map} +1 -1
- package/dist/client/{images-I9gQfRa7.mjs → images-BiEBENaj.mjs} +2 -2
- package/dist/client/{images-I9gQfRa7.mjs.map → images-BiEBENaj.mjs.map} +1 -1
- package/dist/client/images-CCYBAphP2.mjs +1900 -0
- package/dist/client/images-CCYBAphP2.mjs.map +1 -0
- package/dist/client/index.js +109 -109
- package/dist/client/index.js.map +1 -1
- package/dist/client/{network-SCVadZsv.mjs → network-nbSbl0X0.mjs} +1 -1
- package/dist/client/{network-SCVadZsv.mjs.map → network-nbSbl0X0.mjs.map} +1 -1
- package/dist/client/{objects-BrYe_RaJ.mjs → objects-CU5ws07o.mjs} +2 -2
- package/dist/client/{objects-BrYe_RaJ.mjs.map → objects-CU5ws07o.mjs.map} +1 -1
- package/dist/client/{objects-DOYFFn3Y.mjs → objects-FXN0VWLI.mjs} +1791 -1791
- package/dist/client/{objects-DOYFFn3Y.mjs.map → objects-FXN0VWLI.mjs.map} +1 -1
- package/dist/client/{objects-B4yrYf_a.mjs → objects-GmuIOaHd.mjs} +1 -1
- package/dist/client/{objects-B4yrYf_a.mjs.map → objects-GmuIOaHd.mjs.map} +1 -1
- package/dist/client/{overview-DTLIAKkJ.mjs → overview-B3gdnWTG.mjs} +2 -2
- package/dist/client/{overview-DTLIAKkJ.mjs.map → overview-B3gdnWTG.mjs.map} +1 -1
- package/dist/client/{overview-BjRSFSBh.mjs → overview-DzYBiNfD.mjs} +2 -2
- package/dist/client/{overview-BjRSFSBh.mjs.map → overview-DzYBiNfD.mjs.map} +1 -1
- package/dist/client/{overview-CmQkJ4Hh.mjs → overview-EhfPY8Je.mjs} +2 -2
- package/dist/client/{overview-CmQkJ4Hh.mjs.map → overview-EhfPY8Je.mjs.map} +1 -1
- package/dist/client/{overview-C4gjtc2q.mjs → overview-XueZI4LQ.mjs} +3 -3
- package/dist/client/{overview-C4gjtc2q.mjs.map → overview-XueZI4LQ.mjs.map} +1 -1
- package/dist/client/{pca-DzixU9Dl.mjs → pca-DSM71LhW.mjs} +2 -2
- package/dist/client/{pca-DzixU9Dl.mjs.map → pca-DSM71LhW.mjs.map} +1 -1
- package/dist/client/{pca-CYFJxSZ2.mjs → pca-x9if8xU-.mjs} +51 -51
- package/dist/client/{pca-CYFJxSZ2.mjs.map → pca-x9if8xU-.mjs.map} +1 -1
- package/dist/client/{projects-DwVawmll.mjs → projects-B6BPo2Ar.mjs} +2 -2
- package/dist/client/{projects-DwVawmll.mjs.map → projects-B6BPo2Ar.mjs.map} +1 -1
- package/dist/client/{projects-BsN4bvU2.mjs → projects-BilrmHLu.mjs} +1 -1
- package/dist/client/{projects-BsN4bvU2.mjs.map → projects-BilrmHLu.mjs.map} +1 -1
- package/dist/client/{projects-BtyjXGq2.mjs → projects-Bt0XptpG.mjs} +2 -2
- package/dist/client/{projects-BtyjXGq2.mjs.map → projects-Bt0XptpG.mjs.map} +1 -1
- package/dist/client/{projects-D3hOC1cy.mjs → projects-CnmZIB2Q.mjs} +25 -25
- package/dist/client/{projects-D3hOC1cy.mjs.map → projects-CnmZIB2Q.mjs.map} +1 -1
- package/dist/client/{securitygroups-DMCIDHQS.mjs → securitygroups-BdzieS7Z.mjs} +101 -101
- package/dist/client/{securitygroups-DMCIDHQS.mjs.map → securitygroups-BdzieS7Z.mjs.map} +1 -1
- package/dist/client/{useListWithFiltering-CEDh1LO-.mjs → useListWithFiltering-CqQbAjEe.mjs} +1 -1
- package/dist/client/{useListWithFiltering-CEDh1LO-.mjs.map → useListWithFiltering-CqQbAjEe.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/client/ListToolbar-C5lzTrit.mjs +0 -223
- package/dist/client/ListToolbar-C5lzTrit.mjs.map +0 -1
- package/dist/client/_floatingIpId-DdKnjdIV.mjs +0 -228
- package/dist/client/_floatingIpId-DdKnjdIV.mjs.map +0 -1
- package/dist/client/flavors-pEcGkCut.mjs +0 -565
- package/dist/client/flavors-pEcGkCut.mjs.map +0 -1
- package/dist/client/images-C19gCFSy.mjs +0 -1797
- package/dist/client/images-C19gCFSy.mjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as e, D as t, E as n, G as r, I as i, M as a, Q as o, S as s, T as c, U as l, X as u, Y as d, at as f, c as p, d as m, et as h, h as g, it as _, j as v, n as y, nt as b, ot as x, q as S, r as C, s as w, t as T, z as E } from "./build-BJDfnAyi.mjs";
|
|
2
2
|
import { r as D } from "./trpcClient-BxguzNYF.mjs";
|
|
3
|
-
import { t as O } from "./_securityGroupId-
|
|
3
|
+
import { t as O } from "./_securityGroupId-B0llWH9A.mjs";
|
|
4
4
|
import { t as k } from "./useModal-DxxlilRm.mjs";
|
|
5
|
-
import { t as A } from "./
|
|
6
|
-
import { t as j } from "./useProjectId-CgOTejka.mjs";
|
|
5
|
+
import { t as A } from "./useProjectId-CgOTejka.mjs";
|
|
7
6
|
import "./hooks-D0krAKvo.mjs";
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
7
|
+
import { t as j } from "./ListToolbar-BvtCo8dk.mjs";
|
|
8
|
+
import { t as M } from "./useListWithFiltering-CqQbAjEe.mjs";
|
|
9
|
+
import { t as N } from "./EditSecurityGroupModal-Dl6m7wUe.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";
|
|
@@ -14,10 +14,10 @@ import { Trans as V, useLingui as H } from "@lingui/react";
|
|
|
14
14
|
import { z as U } from "zod";
|
|
15
15
|
import { useForm as W, useStore as G } from "@tanstack/react-form";
|
|
16
16
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupHeader.tsx
|
|
17
|
-
function K({ name: e, id:
|
|
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(v, { 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
|
})]
|
|
@@ -26,60 +26,60 @@ function K({ name: e, id: n }) {
|
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupBasicInfo.tsx
|
|
28
28
|
function q({ securityGroup: e, onEdit: t, isReadOnly: n = !1 }) {
|
|
29
|
-
let { i18n:
|
|
29
|
+
let { i18n: o, _: s } = H(), c = ({ value: e }) => /* @__PURE__ */ F("span", { children: e ? o._({ id: "l75CjT" }) : o._({ id: "1UzENP" }) });
|
|
30
30
|
return /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("div", {
|
|
31
31
|
className: "mb-4 flex flex-row-reverse",
|
|
32
|
-
children: t && !n && /* @__PURE__ */ F(
|
|
32
|
+
children: t && !n && /* @__PURE__ */ F(p, {
|
|
33
33
|
variant: "primary",
|
|
34
34
|
onClick: t,
|
|
35
35
|
disabled: n,
|
|
36
36
|
children: /* @__PURE__ */ F(V, { id: "ePK91l" })
|
|
37
37
|
})
|
|
38
|
-
}), /* @__PURE__ */ I(
|
|
38
|
+
}), /* @__PURE__ */ I(l, {
|
|
39
39
|
columns: 4,
|
|
40
40
|
gridColumnTemplate: "15% 35% 15% 35%",
|
|
41
41
|
children: [
|
|
42
|
-
/* @__PURE__ */ I(
|
|
42
|
+
/* @__PURE__ */ I(i, { children: [/* @__PURE__ */ F(r, { children: o._({ id: "Nu4oKW" }) }), /* @__PURE__ */ F(a, {
|
|
43
43
|
colSpan: 3,
|
|
44
44
|
children: /* @__PURE__ */ F("div", {
|
|
45
45
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
46
46
|
title: e.description || void 0,
|
|
47
|
-
children: e.description ||
|
|
47
|
+
children: e.description || o._({ id: "h47p9L" })
|
|
48
48
|
})
|
|
49
49
|
})] }),
|
|
50
|
-
/* @__PURE__ */ I(
|
|
51
|
-
/* @__PURE__ */ F(
|
|
52
|
-
/* @__PURE__ */ F(
|
|
50
|
+
/* @__PURE__ */ I(i, { children: [
|
|
51
|
+
/* @__PURE__ */ F(r, { children: o._({ id: "S0kLOH" }) }),
|
|
52
|
+
/* @__PURE__ */ F(a, { 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(r, { children: o._({ id: "OYHzN1" }) }),
|
|
58
|
+
/* @__PURE__ */ F(a, { children: /* @__PURE__ */ F("div", {
|
|
59
59
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
60
60
|
title: e.tags?.join(", ") || void 0,
|
|
61
|
-
children: e.tags?.join(", ") ||
|
|
61
|
+
children: e.tags?.join(", ") || o._({ id: "h47p9L" })
|
|
62
62
|
}) })
|
|
63
63
|
] }),
|
|
64
|
-
/* @__PURE__ */ I(
|
|
65
|
-
/* @__PURE__ */ F(
|
|
66
|
-
/* @__PURE__ */ F(
|
|
64
|
+
/* @__PURE__ */ I(i, { children: [
|
|
65
|
+
/* @__PURE__ */ F(r, { children: o._({ id: "6YtxFj" }) }),
|
|
66
|
+
/* @__PURE__ */ F(a, { 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(r, { children: o._({ id: "Jim5X9" }) }),
|
|
72
|
+
/* @__PURE__ */ F(a, { children: /* @__PURE__ */ F(c, { value: e.stateful }) })
|
|
73
73
|
] }),
|
|
74
|
-
/* @__PURE__ */ I(
|
|
75
|
-
/* @__PURE__ */ F(
|
|
76
|
-
/* @__PURE__ */ F(
|
|
74
|
+
/* @__PURE__ */ I(i, { children: [
|
|
75
|
+
/* @__PURE__ */ F(r, { children: o._({ id: "aI8Tgp" }) }),
|
|
76
|
+
/* @__PURE__ */ F(a, { children: /* @__PURE__ */ F("div", {
|
|
77
77
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
78
78
|
title: e.project_id || void 0,
|
|
79
|
-
children: e.project_id ||
|
|
79
|
+
children: e.project_id || o._({ id: "h47p9L" })
|
|
80
80
|
}) }),
|
|
81
|
-
/* @__PURE__ */ F(
|
|
82
|
-
/* @__PURE__ */ F(
|
|
81
|
+
/* @__PURE__ */ F(r, { children: o._({ id: "0Gd0NU" }) }),
|
|
82
|
+
/* @__PURE__ */ F(a, { children: /* @__PURE__ */ F(c, { value: e.shared }) })
|
|
83
83
|
] })
|
|
84
84
|
]
|
|
85
85
|
})] });
|
|
@@ -90,7 +90,7 @@ function J({ activeTab: e, onTabChange: t, showRBACTab: n = !0 }) {
|
|
|
90
90
|
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"}`;
|
|
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(b, {
|
|
94
94
|
direction: "horizontal",
|
|
95
95
|
gap: "0",
|
|
96
96
|
children: [/* @__PURE__ */ F("button", {
|
|
@@ -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, _:
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
}, h =
|
|
116
|
-
return
|
|
117
|
-
open:
|
|
118
|
-
onCancel:
|
|
110
|
+
function Y({ rule: t, open: n, onClose: r, onConfirm: i, isLoading: a, error: o }) {
|
|
111
|
+
let { i18n: s, _: l } = H(), [u, d] = z(""), f = () => {
|
|
112
|
+
t && u === "delete" && i(t.id);
|
|
113
|
+
}, m = () => {
|
|
114
|
+
d(""), r();
|
|
115
|
+
}, h = u !== "delete" || a;
|
|
116
|
+
return t ? /* @__PURE__ */ F(x, {
|
|
117
|
+
open: n,
|
|
118
|
+
onCancel: m,
|
|
119
119
|
size: "small",
|
|
120
120
|
title: s._({ id: "TM93nK" }),
|
|
121
|
-
modalFooter: /* @__PURE__ */ F(
|
|
121
|
+
modalFooter: /* @__PURE__ */ F(e, {
|
|
122
122
|
className: "flex justify-end",
|
|
123
|
-
children: /* @__PURE__ */ I(g, { children: [/* @__PURE__ */ F(
|
|
123
|
+
children: /* @__PURE__ */ I(g, { children: [/* @__PURE__ */ F(p, {
|
|
124
124
|
variant: "default",
|
|
125
|
-
onClick:
|
|
126
|
-
disabled:
|
|
125
|
+
onClick: m,
|
|
126
|
+
disabled: a,
|
|
127
127
|
children: /* @__PURE__ */ F(V, { id: "dEgA5A" })
|
|
128
|
-
}), /* @__PURE__ */ F(
|
|
128
|
+
}), /* @__PURE__ */ F(p, {
|
|
129
129
|
variant: "primary-danger",
|
|
130
|
-
onClick:
|
|
130
|
+
onClick: f,
|
|
131
131
|
disabled: h,
|
|
132
132
|
"data-testid": "confirm-delete-rule-button",
|
|
133
|
-
children:
|
|
133
|
+
children: a ? /* @__PURE__ */ F(V, { id: "EF2EU9" }) : /* @__PURE__ */ F(V, { id: "lN3xvy" })
|
|
134
134
|
})] })
|
|
135
135
|
}),
|
|
136
136
|
children: /* @__PURE__ */ I("div", { children: [
|
|
137
|
-
|
|
137
|
+
o && /* @__PURE__ */ F(S, {
|
|
138
138
|
dismissible: !1,
|
|
139
139
|
variant: "error",
|
|
140
140
|
className: "mt-4",
|
|
141
|
-
children:
|
|
141
|
+
children: o
|
|
142
142
|
}),
|
|
143
143
|
/* @__PURE__ */ F(V, { id: "CMVP7y" }),
|
|
144
144
|
/* @__PURE__ */ I("div", {
|
|
@@ -152,38 +152,38 @@ function Y({ rule: e, open: t, onClose: n, onConfirm: r, isLoading: i, error: a
|
|
|
152
152
|
/* @__PURE__ */ I("li", { children: [
|
|
153
153
|
/* @__PURE__ */ F(V, { id: "MRB7nI" }),
|
|
154
154
|
": ",
|
|
155
|
-
|
|
155
|
+
t.direction
|
|
156
156
|
] }),
|
|
157
|
-
|
|
157
|
+
t.description && /* @__PURE__ */ I("li", { children: [
|
|
158
158
|
/* @__PURE__ */ F(V, { id: "Nu4oKW" }),
|
|
159
159
|
": ",
|
|
160
|
-
|
|
160
|
+
t.description
|
|
161
161
|
] }),
|
|
162
162
|
/* @__PURE__ */ I("li", { children: [
|
|
163
163
|
/* @__PURE__ */ F(V, { id: "yp0UjB" }),
|
|
164
164
|
": ",
|
|
165
|
-
|
|
165
|
+
t.ethertype
|
|
166
166
|
] }),
|
|
167
|
-
|
|
167
|
+
t.protocol && /* @__PURE__ */ I("li", { children: [
|
|
168
168
|
/* @__PURE__ */ F(V, { id: "6+OdGi" }),
|
|
169
169
|
": ",
|
|
170
|
-
|
|
170
|
+
t.protocol
|
|
171
171
|
] }),
|
|
172
|
-
|
|
172
|
+
t.port_range_min !== null && t.port_range_max !== null && /* @__PURE__ */ I("li", { children: [
|
|
173
173
|
/* @__PURE__ */ F(V, { id: "tV/Ozb" }),
|
|
174
174
|
":",
|
|
175
175
|
" ",
|
|
176
|
-
|
|
176
|
+
t.port_range_min === t.port_range_max ? t.port_range_min : `${t.port_range_min}-${t.port_range_max}`
|
|
177
177
|
] }),
|
|
178
|
-
|
|
178
|
+
t.remote_ip_prefix && /* @__PURE__ */ I("li", { children: [
|
|
179
179
|
/* @__PURE__ */ F(V, { id: "WoSkGY" }),
|
|
180
180
|
": ",
|
|
181
|
-
|
|
181
|
+
t.remote_ip_prefix
|
|
182
182
|
] }),
|
|
183
|
-
|
|
183
|
+
t.remote_group_id && /* @__PURE__ */ I("li", { children: [
|
|
184
184
|
/* @__PURE__ */ F(V, { id: "i9TIyi" }),
|
|
185
185
|
": ",
|
|
186
|
-
|
|
186
|
+
t.remote_group_id
|
|
187
187
|
] })
|
|
188
188
|
]
|
|
189
189
|
})]
|
|
@@ -196,12 +196,12 @@ function Y({ rule: e, open: t, onClose: n, onConfirm: r, isLoading: i, error: a
|
|
|
196
196
|
id: "PHt+EV",
|
|
197
197
|
components: { 0: /* @__PURE__ */ F("strong", {}) }
|
|
198
198
|
})
|
|
199
|
-
}), /* @__PURE__ */ F(
|
|
200
|
-
value:
|
|
201
|
-
onChange: (e) =>
|
|
199
|
+
}), /* @__PURE__ */ F(c, {
|
|
200
|
+
value: u,
|
|
201
|
+
onChange: (e) => d(e.target.value),
|
|
202
202
|
placeholder: s._({ id: "HNlEFZ" }),
|
|
203
203
|
autoComplete: "off",
|
|
204
|
-
disabled:
|
|
204
|
+
disabled: a,
|
|
205
205
|
"data-testid": "delete-rule-confirmation-input"
|
|
206
206
|
})]
|
|
207
207
|
})
|
|
@@ -552,9 +552,9 @@ function se({ form: e, disabled: t = !1 }) {
|
|
|
552
552
|
return /* @__PURE__ */ F(e.Field, {
|
|
553
553
|
name: "ruleType",
|
|
554
554
|
mode: "value",
|
|
555
|
-
children: (r) => /* @__PURE__ */ F(
|
|
555
|
+
children: (r) => /* @__PURE__ */ F(_, {
|
|
556
556
|
className: "mb-6",
|
|
557
|
-
children: /* @__PURE__ */ F(
|
|
557
|
+
children: /* @__PURE__ */ F(C, {
|
|
558
558
|
id: "ruleType",
|
|
559
559
|
label: n._({ id: "YuGQWb" }),
|
|
560
560
|
value: r.state.value,
|
|
@@ -568,10 +568,10 @@ function se({ form: e, disabled: t = !1 }) {
|
|
|
568
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(m, {
|
|
572
572
|
value: e.value,
|
|
573
573
|
label: n._({ id: "eh/k36" })
|
|
574
|
-
}, e.value) : /* @__PURE__ */ F(
|
|
574
|
+
}, e.value) : /* @__PURE__ */ F(m, {
|
|
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(_, { children: /* @__PURE__ */ F(s, {
|
|
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(T, {
|
|
598
598
|
value: "ingress",
|
|
599
599
|
label: n._({ id: "fzfAAa" })
|
|
600
|
-
}), /* @__PURE__ */ F(
|
|
600
|
+
}), /* @__PURE__ */ F(T, {
|
|
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(_, { children: /* @__PURE__ */ F(s, {
|
|
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(T, {
|
|
622
622
|
value: "IPv4",
|
|
623
623
|
label: "IPv4"
|
|
624
|
-
}), /* @__PURE__ */ F(
|
|
624
|
+
}), /* @__PURE__ */ F(T, {
|
|
625
625
|
value: "IPv6",
|
|
626
626
|
label: "IPv6"
|
|
627
627
|
})]
|
|
@@ -635,9 +635,9 @@ function ue({ form: e, disabled: t = !1 }) {
|
|
|
635
635
|
let { i18n: n, _: r } = H();
|
|
636
636
|
return /* @__PURE__ */ F(e.Field, {
|
|
637
637
|
name: "protocol",
|
|
638
|
-
children: (e) => /* @__PURE__ */ F(
|
|
638
|
+
children: (e) => /* @__PURE__ */ F(_, {
|
|
639
639
|
className: "mb-6",
|
|
640
|
-
children: /* @__PURE__ */ F(
|
|
640
|
+
children: /* @__PURE__ */ F(c, {
|
|
641
641
|
id: "protocol",
|
|
642
642
|
name: "protocol",
|
|
643
643
|
label: n._({ id: "6+OdGi" }),
|
|
@@ -654,7 +654,7 @@ function ue({ form: e, disabled: t = !1 }) {
|
|
|
654
654
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/PortRangeSection.tsx
|
|
655
655
|
function de({ form: e, disabled: t = !1 }) {
|
|
656
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(
|
|
657
|
+
return /* @__PURE__ */ I(_, {
|
|
658
658
|
className: "mb-6",
|
|
659
659
|
children: [
|
|
660
660
|
/* @__PURE__ */ I("div", {
|
|
@@ -664,7 +664,7 @@ function de({ form: e, disabled: t = !1 }) {
|
|
|
664
664
|
name: "portFrom",
|
|
665
665
|
children: (r) => /* @__PURE__ */ F("div", {
|
|
666
666
|
className: "flex-1",
|
|
667
|
-
children: /* @__PURE__ */ F(
|
|
667
|
+
children: /* @__PURE__ */ F(c, {
|
|
668
668
|
id: "portFrom",
|
|
669
669
|
name: "portFrom",
|
|
670
670
|
label: n._({ id: "LMdsuJ" }),
|
|
@@ -687,7 +687,7 @@ function de({ form: e, disabled: t = !1 }) {
|
|
|
687
687
|
name: "portTo",
|
|
688
688
|
children: (t) => /* @__PURE__ */ F("div", {
|
|
689
689
|
className: "flex-1",
|
|
690
|
-
children: /* @__PURE__ */ F(
|
|
690
|
+
children: /* @__PURE__ */ F(c, {
|
|
691
691
|
id: "portTo",
|
|
692
692
|
name: "portTo",
|
|
693
693
|
label: n._({ id: "a12lSo" }),
|
|
@@ -718,7 +718,7 @@ function de({ form: e, disabled: t = !1 }) {
|
|
|
718
718
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/IcmpSection.tsx
|
|
719
719
|
function fe({ form: e, disabled: t = !1 }) {
|
|
720
720
|
let { i18n: n, _: r } = H();
|
|
721
|
-
return /* @__PURE__ */ F(
|
|
721
|
+
return /* @__PURE__ */ F(_, {
|
|
722
722
|
className: "mb-6",
|
|
723
723
|
children: /* @__PURE__ */ I("div", {
|
|
724
724
|
className: "flex w-full gap-4",
|
|
@@ -726,7 +726,7 @@ function fe({ form: e, disabled: t = !1 }) {
|
|
|
726
726
|
name: "icmpType",
|
|
727
727
|
children: (e) => /* @__PURE__ */ F("div", {
|
|
728
728
|
className: "flex-1",
|
|
729
|
-
children: /* @__PURE__ */ F(
|
|
729
|
+
children: /* @__PURE__ */ F(c, {
|
|
730
730
|
id: "icmpType",
|
|
731
731
|
name: "icmpType",
|
|
732
732
|
label: n._({ id: "yPWFWy" }),
|
|
@@ -741,7 +741,7 @@ function fe({ form: e, disabled: t = !1 }) {
|
|
|
741
741
|
name: "icmpCode",
|
|
742
742
|
children: (e) => /* @__PURE__ */ F("div", {
|
|
743
743
|
className: "flex-1",
|
|
744
|
-
children: /* @__PURE__ */ F(
|
|
744
|
+
children: /* @__PURE__ */ F(c, {
|
|
745
745
|
id: "icmpCode",
|
|
746
746
|
name: "icmpCode",
|
|
747
747
|
label: n._({ id: "76RKuS" }),
|
|
@@ -764,9 +764,9 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
|
764
764
|
/* @__PURE__ */ F(e.Field, {
|
|
765
765
|
name: "remoteSourceType",
|
|
766
766
|
mode: "value",
|
|
767
|
-
children: (n) => /* @__PURE__ */ F(
|
|
767
|
+
children: (n) => /* @__PURE__ */ F(_, {
|
|
768
768
|
className: "mb-1",
|
|
769
|
-
children: /* @__PURE__ */ F(
|
|
769
|
+
children: /* @__PURE__ */ F(s, {
|
|
770
770
|
name: "remoteSourceType",
|
|
771
771
|
label: r._({ id: "I5kZVK" }),
|
|
772
772
|
selected: n.state.value,
|
|
@@ -777,10 +777,10 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
|
777
777
|
disabled: t,
|
|
778
778
|
children: /* @__PURE__ */ I("div", {
|
|
779
779
|
className: "flex gap-4",
|
|
780
|
-
children: [/* @__PURE__ */ F(
|
|
780
|
+
children: [/* @__PURE__ */ F(T, {
|
|
781
781
|
value: "cidr",
|
|
782
782
|
label: r._({ id: "4uXhtt" })
|
|
783
|
-
}), /* @__PURE__ */ F(
|
|
783
|
+
}), /* @__PURE__ */ F(T, {
|
|
784
784
|
value: "security_group",
|
|
785
785
|
label: r._({ id: "bwhBhT" })
|
|
786
786
|
})]
|
|
@@ -794,9 +794,9 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
|
794
794
|
name: "remoteCidr",
|
|
795
795
|
children: (n) => /* @__PURE__ */ F(e.Field, {
|
|
796
796
|
name: "ethertype",
|
|
797
|
-
children: (e) => /* @__PURE__ */ F(
|
|
797
|
+
children: (e) => /* @__PURE__ */ F(_, {
|
|
798
798
|
className: "mb-6",
|
|
799
|
-
children: /* @__PURE__ */ F(
|
|
799
|
+
children: /* @__PURE__ */ F(c, {
|
|
800
800
|
id: "remoteCidr",
|
|
801
801
|
name: "remoteCidr",
|
|
802
802
|
label: r._({ id: "vmYyLY" }),
|
|
@@ -814,19 +814,19 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
|
|
|
814
814
|
name: "remoteSourceType",
|
|
815
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(_, {
|
|
818
818
|
className: "mb-6",
|
|
819
|
-
children: /* @__PURE__ */ I(
|
|
819
|
+
children: /* @__PURE__ */ I(C, {
|
|
820
820
|
id: "remoteSecurityGroupId",
|
|
821
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
825
|
disabled: t,
|
|
826
|
-
children: [/* @__PURE__ */ F(
|
|
826
|
+
children: [/* @__PURE__ */ F(m, {
|
|
827
827
|
value: "",
|
|
828
828
|
label: r._({ id: "ZvIpwi" })
|
|
829
|
-
}), n.map((e) => /* @__PURE__ */ F(
|
|
829
|
+
}), n.map((e) => /* @__PURE__ */ F(m, {
|
|
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(_, {
|
|
846
846
|
className: "mb-0",
|
|
847
|
-
children: /* @__PURE__ */ F(
|
|
847
|
+
children: /* @__PURE__ */ F(w, {
|
|
848
848
|
id: "description",
|
|
849
849
|
name: "description",
|
|
850
850
|
label: n._({ id: "Nu4oKW" }),
|
|
@@ -859,111 +859,111 @@ 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:
|
|
863
|
-
let { i18n:
|
|
862
|
+
var he = ({ securityGroupId: t, open: n, onClose: r, onCreate: i, isLoading: a = !1, error: s = null, availableSecurityGroups: c = [] }) => {
|
|
863
|
+
let { i18n: l, _: u } = H(), d = W({
|
|
864
864
|
defaultValues: oe,
|
|
865
865
|
validators: { onSubmit: ae },
|
|
866
|
-
onSubmit: async ({ value:
|
|
867
|
-
if (
|
|
866
|
+
onSubmit: async ({ value: e }) => {
|
|
867
|
+
if (a) return;
|
|
868
868
|
let n = {
|
|
869
|
-
security_group_id:
|
|
870
|
-
direction:
|
|
871
|
-
ethertype:
|
|
872
|
-
description:
|
|
873
|
-
protocol:
|
|
869
|
+
security_group_id: t,
|
|
870
|
+
direction: e.direction,
|
|
871
|
+
ethertype: e.ethertype,
|
|
872
|
+
description: e.description || void 0,
|
|
873
|
+
protocol: e.protocol || null,
|
|
874
874
|
remote_ip_prefix: void 0,
|
|
875
875
|
remote_group_id: void 0,
|
|
876
876
|
remote_address_group_id: void 0
|
|
877
877
|
};
|
|
878
|
-
if ((
|
|
879
|
-
let
|
|
880
|
-
n.port_range_min =
|
|
878
|
+
if ((e.protocol === "tcp" || e.protocol === "udp") && e.portFrom) {
|
|
879
|
+
let t = parseInt(e.portFrom, 10);
|
|
880
|
+
n.port_range_min = t, e.portTo ? n.port_range_max = parseInt(e.portTo, 10) : n.port_range_max = t;
|
|
881
881
|
}
|
|
882
|
-
(
|
|
882
|
+
(e.protocol === "icmp" || e.protocol === "ipv6-icmp") && (e.icmpType && (n.port_range_min = parseInt(e.icmpType, 10)), e.icmpCode && (n.port_range_max = parseInt(e.icmpCode, 10))), e.remoteSourceType === "cidr" && e.remoteCidr ? n.remote_ip_prefix = e.remoteCidr : e.remoteSourceType === "security_group" && e.remoteSecurityGroupId && (n.remote_group_id = e.remoteSecurityGroupId), await i(n), m();
|
|
883
883
|
}
|
|
884
|
-
}),
|
|
885
|
-
|
|
884
|
+
}), m = () => {
|
|
885
|
+
d.reset(), r();
|
|
886
886
|
};
|
|
887
|
-
return /* @__PURE__ */ I(
|
|
888
|
-
open:
|
|
889
|
-
onCancel:
|
|
887
|
+
return /* @__PURE__ */ I(x, {
|
|
888
|
+
open: n,
|
|
889
|
+
onCancel: m,
|
|
890
890
|
size: "large",
|
|
891
|
-
title:
|
|
892
|
-
modalFooter: /* @__PURE__ */ F(
|
|
891
|
+
title: l._({ id: "b2BLBa" }),
|
|
892
|
+
modalFooter: /* @__PURE__ */ F(e, {
|
|
893
893
|
className: "flex justify-end",
|
|
894
|
-
children: /* @__PURE__ */ F(
|
|
894
|
+
children: /* @__PURE__ */ F(d.Subscribe, { children: (e) => {
|
|
895
895
|
let t = !!e.values.ruleType;
|
|
896
|
-
return /* @__PURE__ */ I(g, { children: [/* @__PURE__ */ F(
|
|
896
|
+
return /* @__PURE__ */ I(g, { children: [/* @__PURE__ */ F(p, {
|
|
897
897
|
variant: "default",
|
|
898
|
-
onClick:
|
|
899
|
-
disabled:
|
|
898
|
+
onClick: m,
|
|
899
|
+
disabled: a || e.isSubmitting,
|
|
900
900
|
children: /* @__PURE__ */ F(V, { id: "dEgA5A" })
|
|
901
|
-
}), /* @__PURE__ */ F(
|
|
901
|
+
}), /* @__PURE__ */ F(p, {
|
|
902
902
|
variant: "primary",
|
|
903
903
|
type: "button",
|
|
904
|
-
onClick: () =>
|
|
905
|
-
disabled:
|
|
904
|
+
onClick: () => d.handleSubmit(),
|
|
905
|
+
disabled: a || e.isSubmitting || !t,
|
|
906
906
|
"data-testid": "add-rule-button",
|
|
907
|
-
children: e.isSubmitting ||
|
|
907
|
+
children: e.isSubmitting || a ? /* @__PURE__ */ F(o, { size: "small" }) : /* @__PURE__ */ F(V, { id: "bmQLn5" })
|
|
908
908
|
})] });
|
|
909
909
|
} })
|
|
910
910
|
}),
|
|
911
911
|
children: [
|
|
912
|
-
|
|
912
|
+
s && /* @__PURE__ */ F(S, {
|
|
913
913
|
dismissible: !1,
|
|
914
914
|
variant: "error",
|
|
915
915
|
className: "mb-4",
|
|
916
|
-
children:
|
|
916
|
+
children: s
|
|
917
917
|
}),
|
|
918
|
-
|
|
918
|
+
a && /* @__PURE__ */ I("div", {
|
|
919
919
|
className: "mb-4 flex items-center justify-center gap-2",
|
|
920
|
-
children: [/* @__PURE__ */ F(
|
|
920
|
+
children: [/* @__PURE__ */ F(o, { 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(f, {
|
|
926
926
|
className: "mb-6",
|
|
927
927
|
onSubmit: (e) => {
|
|
928
|
-
e.preventDefault(),
|
|
928
|
+
e.preventDefault(), d.handleSubmit();
|
|
929
929
|
},
|
|
930
930
|
children: /* @__PURE__ */ I(y, {
|
|
931
931
|
className: "mb-6",
|
|
932
932
|
children: [/* @__PURE__ */ F(se, {
|
|
933
|
-
form:
|
|
934
|
-
disabled:
|
|
935
|
-
}), /* @__PURE__ */ F(
|
|
933
|
+
form: d,
|
|
934
|
+
disabled: a
|
|
935
|
+
}), /* @__PURE__ */ F(d.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: d,
|
|
941
|
+
disabled: a
|
|
942
942
|
}),
|
|
943
943
|
e.values.ruleType === "other-protocol" && /* @__PURE__ */ F(ue, {
|
|
944
|
-
form:
|
|
945
|
-
disabled:
|
|
944
|
+
form: d,
|
|
945
|
+
disabled: a
|
|
946
946
|
}),
|
|
947
947
|
t && /* @__PURE__ */ F(de, {
|
|
948
|
-
form:
|
|
949
|
-
disabled:
|
|
948
|
+
form: d,
|
|
949
|
+
disabled: a
|
|
950
950
|
}),
|
|
951
951
|
n && /* @__PURE__ */ F(fe, {
|
|
952
|
-
form:
|
|
953
|
-
disabled:
|
|
952
|
+
form: d,
|
|
953
|
+
disabled: a
|
|
954
954
|
}),
|
|
955
955
|
/* @__PURE__ */ F(pe, {
|
|
956
|
-
form:
|
|
957
|
-
disabled:
|
|
958
|
-
availableSecurityGroups:
|
|
956
|
+
form: d,
|
|
957
|
+
disabled: a,
|
|
958
|
+
availableSecurityGroups: c
|
|
959
959
|
}),
|
|
960
960
|
e.values.remoteSourceType === "security_group" && /* @__PURE__ */ F(le, {
|
|
961
|
-
form:
|
|
962
|
-
disabled:
|
|
961
|
+
form: d,
|
|
962
|
+
disabled: a
|
|
963
963
|
}),
|
|
964
964
|
/* @__PURE__ */ F(me, {
|
|
965
|
-
form:
|
|
966
|
-
disabled:
|
|
965
|
+
form: d,
|
|
966
|
+
disabled: a
|
|
967
967
|
})
|
|
968
968
|
] });
|
|
969
969
|
} })]
|
|
@@ -974,16 +974,16 @@ var he = ({ securityGroupId: e, open: t, onClose: n, onCreate: r, isLoading: i =
|
|
|
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: E, _: D } = H(), [O,
|
|
979
|
-
|
|
977
|
+
function ge({ rules: e, totalRulesCount: t, onDeleteRule: o, isDeletingRule: s, deleteError: c, searchTerm: u = "", onSearchChange: f, sortSettings: m, onSortChange: g, filterSettings: _, onFilterChange: v, securityGroupId: y, onCreateRule: x, isCreatingRule: S = !1, createRuleError: C = null, availableSecurityGroups: w = [], readOnly: T = !1 }) {
|
|
978
|
+
let { i18n: E, _: D } = H(), [O, A] = z(null), [M, N] = k(), R = (e) => {
|
|
979
|
+
A(e);
|
|
980
980
|
}, B = (e) => {
|
|
981
981
|
o(e);
|
|
982
982
|
}, U = () => {
|
|
983
|
-
s ||
|
|
983
|
+
s || A(null);
|
|
984
984
|
};
|
|
985
985
|
L(() => {
|
|
986
|
-
!s && !c &&
|
|
986
|
+
!s && !c && A(null);
|
|
987
987
|
}, [s, c]);
|
|
988
988
|
let W = (e) => {
|
|
989
989
|
if (e.protocol === "icmp" || e.protocol === "ipv6-icmp") {
|
|
@@ -1002,53 +1002,53 @@ function ge({ rules: t, totalRulesCount: n, onDeleteRule: o, isDeletingRule: s,
|
|
|
1002
1002
|
return e.port_range_min === null || e.port_range_max === null ? E._({ 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(b, {
|
|
1006
1006
|
direction: "vertical",
|
|
1007
1007
|
gap: "4",
|
|
1008
|
-
children: [/* @__PURE__ */ F(
|
|
1009
|
-
totalCount:
|
|
1010
|
-
filteredCount:
|
|
1008
|
+
children: [/* @__PURE__ */ F(j, {
|
|
1009
|
+
totalCount: t ?? e.length,
|
|
1010
|
+
filteredCount: e.length,
|
|
1011
1011
|
itemName: E._({ id: "j9hkgJ" }),
|
|
1012
|
-
filterSettings:
|
|
1013
|
-
onFilter:
|
|
1014
|
-
sortSettings:
|
|
1015
|
-
onSort:
|
|
1016
|
-
searchTerm:
|
|
1012
|
+
filterSettings: _,
|
|
1013
|
+
onFilter: v,
|
|
1014
|
+
sortSettings: m,
|
|
1015
|
+
onSort: g,
|
|
1016
|
+
searchTerm: u,
|
|
1017
1017
|
onSearch: f,
|
|
1018
|
-
actions: !T &&
|
|
1018
|
+
actions: !T && x && /* @__PURE__ */ F(p, {
|
|
1019
1019
|
variant: "primary",
|
|
1020
1020
|
icon: "addCircle",
|
|
1021
1021
|
onClick: N,
|
|
1022
1022
|
children: /* @__PURE__ */ F(V, { id: "O8tK4v" })
|
|
1023
1023
|
})
|
|
1024
|
-
}),
|
|
1024
|
+
}), e.length === 0 ? /* @__PURE__ */ F(V, { id: "nnxwBn" }) : /* @__PURE__ */ I(l, {
|
|
1025
1025
|
columns: T ? 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
|
-
!T && /* @__PURE__ */ F(
|
|
1034
|
-
] }),
|
|
1035
|
-
"data-testid": `rule-row-${
|
|
1027
|
+
children: [/* @__PURE__ */ I(i, { children: [
|
|
1028
|
+
/* @__PURE__ */ F(r, { children: E._({ id: "MRB7nI" }) }),
|
|
1029
|
+
/* @__PURE__ */ F(r, { children: E._({ id: "Nu4oKW" }) }),
|
|
1030
|
+
/* @__PURE__ */ F(r, { children: E._({ id: "yp0UjB" }) }),
|
|
1031
|
+
/* @__PURE__ */ F(r, { children: E._({ id: "6+OdGi" }) }),
|
|
1032
|
+
/* @__PURE__ */ F(r, { children: E._({ id: "6jAi8c" }) }),
|
|
1033
|
+
!T && /* @__PURE__ */ F(r, { children: E._({ id: "7L01XJ" }) })
|
|
1034
|
+
] }), e.map((e) => /* @__PURE__ */ I(i, {
|
|
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
|
-
!T && /* @__PURE__ */ F(
|
|
1037
|
+
/* @__PURE__ */ F(a, { children: e.direction || E._({ id: "h47p9L" }) }),
|
|
1038
|
+
/* @__PURE__ */ F(a, { children: e.description || E._({ id: "h47p9L" }) }),
|
|
1039
|
+
/* @__PURE__ */ F(a, { children: e.ethertype }),
|
|
1040
|
+
/* @__PURE__ */ F(a, { children: e.protocol || E._({ id: "eKC+EC" }) }),
|
|
1041
|
+
/* @__PURE__ */ F(a, { children: W(e) }),
|
|
1042
|
+
!T && /* @__PURE__ */ F(a, {
|
|
1043
1043
|
onClick: (e) => e.stopPropagation(),
|
|
1044
1044
|
className: "items-end justify-end pr-0",
|
|
1045
|
-
children: /* @__PURE__ */ F(
|
|
1045
|
+
children: /* @__PURE__ */ F(h, { children: /* @__PURE__ */ F(n, { children: /* @__PURE__ */ F(d, {
|
|
1046
1046
|
label: E._({ id: "cnGeoo" }),
|
|
1047
|
-
onClick: () => R(
|
|
1047
|
+
onClick: () => R(e)
|
|
1048
1048
|
}) }) })
|
|
1049
1049
|
})
|
|
1050
1050
|
]
|
|
1051
|
-
},
|
|
1051
|
+
}, e.id))]
|
|
1052
1052
|
})]
|
|
1053
1053
|
}),
|
|
1054
1054
|
!T && /* @__PURE__ */ F(Y, {
|
|
@@ -1059,30 +1059,30 @@ function ge({ rules: t, totalRulesCount: n, onDeleteRule: o, isDeletingRule: s,
|
|
|
1059
1059
|
isLoading: s,
|
|
1060
1060
|
error: c
|
|
1061
1061
|
}),
|
|
1062
|
-
!T && y &&
|
|
1062
|
+
!T && y && x && M && /* @__PURE__ */ F(he, {
|
|
1063
1063
|
securityGroupId: y,
|
|
1064
1064
|
open: M,
|
|
1065
1065
|
onClose: N,
|
|
1066
|
-
onCreate:
|
|
1067
|
-
isLoading:
|
|
1068
|
-
error:
|
|
1069
|
-
availableSecurityGroups:
|
|
1066
|
+
onCreate: x,
|
|
1067
|
+
isLoading: S,
|
|
1068
|
+
error: C,
|
|
1069
|
+
availableSecurityGroups: w
|
|
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:
|
|
1076
|
-
let { i18n:
|
|
1077
|
-
return /* @__PURE__ */ I(
|
|
1078
|
-
/* @__PURE__ */ F(
|
|
1079
|
-
/* @__PURE__ */ F(
|
|
1080
|
-
/* @__PURE__ */ F(
|
|
1075
|
+
function _e({ policy: e, onDelete: t }) {
|
|
1076
|
+
let { i18n: r, _: o } = H();
|
|
1077
|
+
return /* @__PURE__ */ I(i, { children: [
|
|
1078
|
+
/* @__PURE__ */ F(a, { children: e.target_tenant }),
|
|
1079
|
+
/* @__PURE__ */ F(a, { children: e.action }),
|
|
1080
|
+
/* @__PURE__ */ F(a, {
|
|
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(h, { children: /* @__PURE__ */ F(n, { children: /* @__PURE__ */ F(d, {
|
|
1084
|
+
label: r._({ id: "t/YqKh" }),
|
|
1085
|
+
onClick: t
|
|
1086
1086
|
}) }) })
|
|
1087
1087
|
})
|
|
1088
1088
|
] });
|
|
@@ -1094,30 +1094,30 @@ function $(e) {
|
|
|
1094
1094
|
return ve.test(e) || ye.test(e);
|
|
1095
1095
|
}
|
|
1096
1096
|
function be({ isOpen: e, onClose: t, securityGroupId: n }) {
|
|
1097
|
-
let { i18n: r, _: i } = H(), a = D.useUtils(),
|
|
1097
|
+
let { i18n: r, _: i } = H(), a = D.useUtils(), o = A(), [s, l] = z(!1), u = U.object({ targetTenant: U.string().min(1, r._({ id: "1RwosK" })).refine($, { message: r._({ id: "CunRry" }) }) }), d = D.network.rbacPolicy.create.useMutation({ onSuccess: () => {
|
|
1098
1098
|
a.network.rbacPolicy.list.invalidate({
|
|
1099
|
-
project_id:
|
|
1099
|
+
project_id: o,
|
|
1100
1100
|
securityGroupId: n
|
|
1101
1101
|
}), a.network.securityGroup.getById.invalidate({
|
|
1102
|
-
project_id:
|
|
1102
|
+
project_id: o,
|
|
1103
1103
|
securityGroupId: n
|
|
1104
1104
|
}), m();
|
|
1105
|
-
} }),
|
|
1105
|
+
} }), p = W({
|
|
1106
1106
|
defaultValues: { targetTenant: "" },
|
|
1107
1107
|
validators: { onSubmit: u },
|
|
1108
1108
|
onSubmit: async ({ value: e }) => {
|
|
1109
1109
|
d.isPending || d.mutate({
|
|
1110
|
-
project_id:
|
|
1110
|
+
project_id: o,
|
|
1111
1111
|
securityGroupId: n,
|
|
1112
1112
|
targetTenant: e.targetTenant.trim()
|
|
1113
1113
|
});
|
|
1114
1114
|
}
|
|
1115
1115
|
}), m = () => {
|
|
1116
|
-
|
|
1116
|
+
p.reset(), d.reset(), l(!1), t();
|
|
1117
1117
|
}, h = async () => {
|
|
1118
|
-
l(!0), await
|
|
1118
|
+
l(!0), await p.handleSubmit();
|
|
1119
1119
|
};
|
|
1120
|
-
return /* @__PURE__ */ I(
|
|
1120
|
+
return /* @__PURE__ */ I(x, {
|
|
1121
1121
|
open: e,
|
|
1122
1122
|
onCancel: m,
|
|
1123
1123
|
title: r._({ id: "vmRPFm" }),
|
|
@@ -1127,7 +1127,7 @@ function be({ isOpen: e, onClose: t, securityGroupId: n }) {
|
|
|
1127
1127
|
confirmButtonLabel: r._({ id: "Z8lGw6" }),
|
|
1128
1128
|
disableConfirmButton: d.isPending,
|
|
1129
1129
|
children: [
|
|
1130
|
-
d.error && /* @__PURE__ */ F(
|
|
1130
|
+
d.error && /* @__PURE__ */ F(S, {
|
|
1131
1131
|
variant: "error",
|
|
1132
1132
|
className: "mb-4",
|
|
1133
1133
|
children: (() => {
|
|
@@ -1139,12 +1139,12 @@ function be({ isOpen: e, onClose: t, securityGroupId: n }) {
|
|
|
1139
1139
|
className: "mb-4",
|
|
1140
1140
|
children: /* @__PURE__ */ F(V, { id: "cjEOmc" })
|
|
1141
1141
|
}),
|
|
1142
|
-
/* @__PURE__ */ F(
|
|
1142
|
+
/* @__PURE__ */ F(f, {
|
|
1143
1143
|
className: "mb-0",
|
|
1144
1144
|
onSubmit: (e) => {
|
|
1145
1145
|
e.preventDefault(), h();
|
|
1146
1146
|
},
|
|
1147
|
-
children: /* @__PURE__ */ F(y, { children: /* @__PURE__ */ F(
|
|
1147
|
+
children: /* @__PURE__ */ F(y, { children: /* @__PURE__ */ F(p.Field, {
|
|
1148
1148
|
name: "targetTenant",
|
|
1149
1149
|
validators: {
|
|
1150
1150
|
onBlur: ({ value: e }) => {
|
|
@@ -1153,15 +1153,15 @@ function be({ isOpen: e, onClose: t, securityGroupId: n }) {
|
|
|
1153
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
1158
|
if (!t) return r._({ id: "1RwosK" });
|
|
1159
1159
|
if (!$(t)) return r._({ id: "CunRry" });
|
|
1160
1160
|
}
|
|
1161
1161
|
},
|
|
1162
1162
|
children: (e) => {
|
|
1163
|
-
let t = (e.state.meta.isTouched ||
|
|
1164
|
-
return /* @__PURE__ */ F(
|
|
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(c, {
|
|
1165
1165
|
id: e.name,
|
|
1166
1166
|
name: e.name,
|
|
1167
1167
|
label: r._({ id: "WzVwU0" }),
|
|
@@ -1184,26 +1184,26 @@ function be({ isOpen: e, onClose: t, securityGroupId: n }) {
|
|
|
1184
1184
|
//#endregion
|
|
1185
1185
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/DeleteRBACPolicyDialog.tsx
|
|
1186
1186
|
function xe({ policy: e, open: t, onClose: n, onConfirm: r, isLoading: i, error: a }) {
|
|
1187
|
-
let { i18n:
|
|
1187
|
+
let { i18n: o, _: s } = H(), l = 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), d());
|
|
1192
1192
|
}
|
|
1193
1193
|
}), u = G(l.store, (e) => e.isSubmitting || e.values.confirmText !== "remove"), d = () => {
|
|
1194
1194
|
l.reset(), n();
|
|
1195
1195
|
};
|
|
1196
|
-
return /* @__PURE__ */ F(
|
|
1196
|
+
return /* @__PURE__ */ F(x, {
|
|
1197
1197
|
open: t,
|
|
1198
1198
|
onCancel: d,
|
|
1199
1199
|
size: "small",
|
|
1200
|
-
title:
|
|
1200
|
+
title: o._({ id: "Dt5W9T" }),
|
|
1201
1201
|
onConfirm: l.handleSubmit,
|
|
1202
|
-
cancelButtonLabel:
|
|
1203
|
-
confirmButtonLabel: i ?
|
|
1202
|
+
cancelButtonLabel: o._({ id: "dEgA5A" }),
|
|
1203
|
+
confirmButtonLabel: i ? o._({ id: "M5RhXF" }) : o._({ id: "qh5W8q" }),
|
|
1204
1204
|
disableConfirmButton: i || u,
|
|
1205
1205
|
children: /* @__PURE__ */ I("div", { children: [
|
|
1206
|
-
a && /* @__PURE__ */ F(
|
|
1206
|
+
a && /* @__PURE__ */ F(S, {
|
|
1207
1207
|
dismissible: !1,
|
|
1208
1208
|
variant: "error",
|
|
1209
1209
|
className: "mt-4",
|
|
@@ -1236,7 +1236,7 @@ function xe({ policy: e, open: t, onClose: n, onConfirm: r, isLoading: i, error:
|
|
|
1236
1236
|
]
|
|
1237
1237
|
})]
|
|
1238
1238
|
}),
|
|
1239
|
-
!i && /* @__PURE__ */ F(
|
|
1239
|
+
!i && /* @__PURE__ */ F(f, {
|
|
1240
1240
|
className: "mt-4 mb-0",
|
|
1241
1241
|
onSubmit: (e) => {
|
|
1242
1242
|
e.preventDefault(), l.handleSubmit();
|
|
@@ -1249,12 +1249,12 @@ function xe({ policy: e, open: t, onClose: n, onConfirm: r, isLoading: i, error:
|
|
|
1249
1249
|
})
|
|
1250
1250
|
}), /* @__PURE__ */ F(l.Field, {
|
|
1251
1251
|
name: "confirmText",
|
|
1252
|
-
children: (e) => /* @__PURE__ */ F(
|
|
1252
|
+
children: (e) => /* @__PURE__ */ F(c, {
|
|
1253
1253
|
id: e.name,
|
|
1254
1254
|
name: e.name,
|
|
1255
1255
|
value: e.state.value,
|
|
1256
1256
|
onChange: (t) => e.handleChange(t.target.value),
|
|
1257
|
-
placeholder:
|
|
1257
|
+
placeholder: o._({ id: "tasfos" }),
|
|
1258
1258
|
autoComplete: "off",
|
|
1259
1259
|
disabled: i,
|
|
1260
1260
|
"data-testid": "remove-policy-confirmation-input"
|
|
@@ -1267,7 +1267,7 @@ function xe({ policy: e, open: t, onClose: n, onConfirm: r, isLoading: i, error:
|
|
|
1267
1267
|
//#endregion
|
|
1268
1268
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupRBACPolicies.tsx
|
|
1269
1269
|
function Se({ securityGroupId: e }) {
|
|
1270
|
-
let t = D.useUtils(), { i18n: n, _: a } = H(), s =
|
|
1270
|
+
let t = D.useUtils(), { i18n: n, _: a } = H(), s = A(), [c, u] = k(), [d, f] = z(null), [m, h] = z(""), { data: g, isPending: _, isError: v, error: y } = D.network.rbacPolicy.list.useQuery({
|
|
1271
1271
|
project_id: s,
|
|
1272
1272
|
securityGroupId: e
|
|
1273
1273
|
}, { refetchOnWindowFocus: !1 }), x = D.network.rbacPolicy.delete.useMutation({ onSuccess: () => {
|
|
@@ -1278,68 +1278,68 @@ function Se({ securityGroupId: e }) {
|
|
|
1278
1278
|
project_id: s,
|
|
1279
1279
|
securityGroupId: e
|
|
1280
1280
|
});
|
|
1281
|
-
} }),
|
|
1282
|
-
|
|
1283
|
-
},
|
|
1281
|
+
} }), C = (e) => {
|
|
1282
|
+
f(e);
|
|
1283
|
+
}, w = (e) => {
|
|
1284
1284
|
x.mutate({
|
|
1285
1285
|
project_id: s,
|
|
1286
1286
|
policyId: e
|
|
1287
1287
|
});
|
|
1288
1288
|
}, T = () => {
|
|
1289
|
-
x.isPending ||
|
|
1289
|
+
x.isPending || f(null);
|
|
1290
1290
|
};
|
|
1291
1291
|
L(() => {
|
|
1292
|
-
!x.isPending && !x.error && x.isSuccess &&
|
|
1292
|
+
!x.isPending && !x.error && x.isSuccess && f(null);
|
|
1293
1293
|
}, [
|
|
1294
1294
|
x.isPending,
|
|
1295
1295
|
x.error,
|
|
1296
1296
|
x.isSuccess
|
|
1297
1297
|
]);
|
|
1298
1298
|
let E = R(() => {
|
|
1299
|
-
if (!
|
|
1300
|
-
if (!
|
|
1301
|
-
let e =
|
|
1302
|
-
return
|
|
1303
|
-
}, [
|
|
1304
|
-
|
|
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
|
+
h(typeof e == "string" ? e : "");
|
|
1305
1305
|
};
|
|
1306
|
-
if (
|
|
1306
|
+
if (_) return /* @__PURE__ */ F(b, {
|
|
1307
1307
|
distribution: "center",
|
|
1308
1308
|
alignment: "center",
|
|
1309
1309
|
className: "py-8",
|
|
1310
|
-
children: /* @__PURE__ */ F(
|
|
1310
|
+
children: /* @__PURE__ */ F(o, { variant: "primary" })
|
|
1311
1311
|
});
|
|
1312
|
-
if (
|
|
1312
|
+
if (v) return /* @__PURE__ */ F(S, {
|
|
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 = E.length;
|
|
1318
1318
|
return /* @__PURE__ */ I(P, { children: [
|
|
1319
|
-
/* @__PURE__ */ I(
|
|
1319
|
+
/* @__PURE__ */ I(b, {
|
|
1320
1320
|
direction: "vertical",
|
|
1321
1321
|
gap: "4",
|
|
1322
|
-
children: [/* @__PURE__ */ F(
|
|
1322
|
+
children: [/* @__PURE__ */ F(j, {
|
|
1323
1323
|
totalCount: M,
|
|
1324
1324
|
filteredCount: N,
|
|
1325
1325
|
itemName: n._({ id: "M9H+/G" }),
|
|
1326
|
-
searchTerm:
|
|
1326
|
+
searchTerm: m,
|
|
1327
1327
|
onSearch: O,
|
|
1328
|
-
actions: /* @__PURE__ */ F(
|
|
1328
|
+
actions: /* @__PURE__ */ F(p, {
|
|
1329
1329
|
variant: "primary",
|
|
1330
1330
|
icon: "addCircle",
|
|
1331
|
-
onClick:
|
|
1331
|
+
onClick: u,
|
|
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(l, {
|
|
1335
1335
|
columns: 3,
|
|
1336
|
-
children: [/* @__PURE__ */ I(
|
|
1337
|
-
/* @__PURE__ */ F(
|
|
1338
|
-
/* @__PURE__ */ F(
|
|
1339
|
-
/* @__PURE__ */ F(
|
|
1336
|
+
children: [/* @__PURE__ */ I(i, { children: [
|
|
1337
|
+
/* @__PURE__ */ F(r, { children: /* @__PURE__ */ F(V, { id: "WzVwU0" }) }),
|
|
1338
|
+
/* @__PURE__ */ F(r, { children: /* @__PURE__ */ F(V, { id: "bwRvnp" }) }),
|
|
1339
|
+
/* @__PURE__ */ F(r, { children: /* @__PURE__ */ F(V, { id: "7L01XJ" }) })
|
|
1340
1340
|
] }), E.map((e) => /* @__PURE__ */ F(_e, {
|
|
1341
1341
|
policy: e,
|
|
1342
|
-
onDelete: () =>
|
|
1342
|
+
onDelete: () => C(e)
|
|
1343
1343
|
}, e.id))]
|
|
1344
1344
|
})]
|
|
1345
1345
|
}),
|
|
@@ -1347,25 +1347,25 @@ function Se({ securityGroupId: e }) {
|
|
|
1347
1347
|
policy: d,
|
|
1348
1348
|
open: !!d,
|
|
1349
1349
|
onClose: T,
|
|
1350
|
-
onConfirm:
|
|
1350
|
+
onConfirm: w,
|
|
1351
1351
|
isLoading: x.isPending,
|
|
1352
1352
|
error: x.error?.message || null
|
|
1353
1353
|
}),
|
|
1354
1354
|
c && /* @__PURE__ */ F(be, {
|
|
1355
1355
|
isOpen: c,
|
|
1356
|
-
onClose:
|
|
1356
|
+
onClose: u,
|
|
1357
1357
|
securityGroupId: e
|
|
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: e, filteredAndSortedRules: t, onEdit: n, onDeleteRule: r, isDeletingRule: i = !1, deleteRuleError: a = null, filterControls: o, onCreateRule:
|
|
1364
|
-
let [
|
|
1365
|
-
return /* @__PURE__ */ F(
|
|
1363
|
+
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: d }) {
|
|
1364
|
+
let [f, p] = z("rules"), m = e.project_id === d, h = !m, g = m;
|
|
1365
|
+
return /* @__PURE__ */ F(E, {
|
|
1366
1366
|
px: !1,
|
|
1367
1367
|
py: !0,
|
|
1368
|
-
children: /* @__PURE__ */ I(
|
|
1368
|
+
children: /* @__PURE__ */ I(b, {
|
|
1369
1369
|
direction: "vertical",
|
|
1370
1370
|
gap: "4",
|
|
1371
1371
|
children: [
|
|
@@ -1376,16 +1376,16 @@ function Ce({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRu
|
|
|
1376
1376
|
/* @__PURE__ */ F(q, {
|
|
1377
1377
|
securityGroup: e,
|
|
1378
1378
|
onEdit: n,
|
|
1379
|
-
isReadOnly:
|
|
1379
|
+
isReadOnly: h
|
|
1380
1380
|
}),
|
|
1381
|
-
!
|
|
1382
|
-
activeTab:
|
|
1383
|
-
onTabChange:
|
|
1384
|
-
showRBACTab:
|
|
1381
|
+
!h && /* @__PURE__ */ F(J, {
|
|
1382
|
+
activeTab: f,
|
|
1383
|
+
onTabChange: p,
|
|
1384
|
+
showRBACTab: g
|
|
1385
1385
|
}),
|
|
1386
1386
|
/* @__PURE__ */ I("div", {
|
|
1387
1387
|
className: "mt-6",
|
|
1388
|
-
children: [
|
|
1388
|
+
children: [f === "rules" && /* @__PURE__ */ F(ge, {
|
|
1389
1389
|
rules: t,
|
|
1390
1390
|
totalRulesCount: e.security_group_rules?.length,
|
|
1391
1391
|
onDeleteRule: r,
|
|
@@ -1398,12 +1398,12 @@ function Ce({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRu
|
|
|
1398
1398
|
filterSettings: o.filterSettings,
|
|
1399
1399
|
onFilterChange: o.onFilterChange,
|
|
1400
1400
|
securityGroupId: e.id,
|
|
1401
|
-
onCreateRule:
|
|
1402
|
-
isCreatingRule:
|
|
1403
|
-
createRuleError:
|
|
1404
|
-
availableSecurityGroups:
|
|
1405
|
-
readOnly:
|
|
1406
|
-
}),
|
|
1401
|
+
onCreateRule: h ? void 0 : s,
|
|
1402
|
+
isCreatingRule: c,
|
|
1403
|
+
createRuleError: l,
|
|
1404
|
+
availableSecurityGroups: u,
|
|
1405
|
+
readOnly: h
|
|
1406
|
+
}), f === "rbac" && /* @__PURE__ */ F(Se, { securityGroupId: e.id })]
|
|
1407
1407
|
})
|
|
1408
1408
|
]
|
|
1409
1409
|
})
|
|
@@ -1412,7 +1412,7 @@ function Ce({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRu
|
|
|
1412
1412
|
//#endregion
|
|
1413
1413
|
//#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-hooks/useSecurityGroupDetails.ts
|
|
1414
1414
|
function we({ securityGroupId: e, filterControls: t }) {
|
|
1415
|
-
let [n, r] = z(!1), i =
|
|
1415
|
+
let [n, r] = z(!1), i = A(), a = D.useUtils(), o = D.network.securityGroup.getById.useQuery({
|
|
1416
1416
|
project_id: i,
|
|
1417
1417
|
securityGroupId: e
|
|
1418
1418
|
}, { placeholderData: () => a.network.securityGroup.getById.getData({
|
|
@@ -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: e } = O.useParams(),
|
|
1494
|
+
let { securityGroupId: e } = O.useParams(), n = A(), r = B(), { i18n: i, _: a } = H(), { searchTerm: s, sortSettings: c, filterSettings: l, handleSearchChange: d, handleSortChange: f, handleFilterChange: m } = M({
|
|
1495
1495
|
defaultSortKey: "direction",
|
|
1496
1496
|
defaultSortDir: "asc",
|
|
1497
1497
|
sortOptions: [
|
|
1498
1498
|
{
|
|
1499
|
-
label:
|
|
1499
|
+
label: i._({ id: "MRB7nI" }),
|
|
1500
1500
|
value: "direction"
|
|
1501
1501
|
},
|
|
1502
1502
|
{
|
|
1503
|
-
label:
|
|
1503
|
+
label: i._({ id: "6+OdGi" }),
|
|
1504
1504
|
value: "protocol"
|
|
1505
1505
|
},
|
|
1506
1506
|
{
|
|
1507
|
-
label:
|
|
1507
|
+
label: i._({ id: "Nu4oKW" }),
|
|
1508
1508
|
value: "description"
|
|
1509
1509
|
}
|
|
1510
1510
|
],
|
|
1511
1511
|
filterSettings: { filters: [
|
|
1512
1512
|
{
|
|
1513
|
-
displayName:
|
|
1513
|
+
displayName: i._({ id: "MRB7nI" }),
|
|
1514
1514
|
filterName: "direction",
|
|
1515
1515
|
values: ["ingress", "egress"],
|
|
1516
1516
|
supportsMultiValue: !1
|
|
1517
1517
|
},
|
|
1518
1518
|
{
|
|
1519
|
-
displayName:
|
|
1519
|
+
displayName: i._({ id: "yp0UjB" }),
|
|
1520
1520
|
filterName: "ethertype",
|
|
1521
1521
|
values: ["IPv4", "IPv6"],
|
|
1522
1522
|
supportsMultiValue: !1
|
|
1523
1523
|
},
|
|
1524
1524
|
{
|
|
1525
|
-
displayName:
|
|
1525
|
+
displayName: i._({ 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
|
-
}),
|
|
1536
|
+
}), h = {
|
|
1537
1537
|
searchTerm: s,
|
|
1538
|
-
onSearchChange:
|
|
1538
|
+
onSearchChange: d,
|
|
1539
1539
|
sortSettings: c,
|
|
1540
|
-
onSortChange:
|
|
1540
|
+
onSortChange: f,
|
|
1541
1541
|
filterSettings: l,
|
|
1542
|
-
onFilterChange:
|
|
1543
|
-
}, { securityGroup:
|
|
1542
|
+
onFilterChange: m
|
|
1543
|
+
}, { securityGroup: g, filteredAndSortedRules: _, isLoading: y, isError: x, error: S, isUpdating: C, updateError: w, isDeletingRule: T, deleteRuleError: E, isCreatingRule: k, createRuleError: j, editModalOpen: P, handleEdit: L, handleCloseEditModal: z, handleUpdate: U, handleDeleteRule: W, handleCreateRule: G } = we({
|
|
1544
1544
|
securityGroupId: e,
|
|
1545
|
-
filterControls:
|
|
1546
|
-
}), { data: K } = D.network.securityGroup.list.useQuery({ project_id:
|
|
1545
|
+
filterControls: h
|
|
1546
|
+
}), { data: K } = D.network.securityGroup.list.useQuery({ project_id: n }), q = R(() => (K || []).filter((t) => t.id !== e).map((e) => ({
|
|
1547
1547
|
id: e.id,
|
|
1548
1548
|
name: e.name || e.id
|
|
1549
1549
|
})), [K, e]), J = () => {
|
|
1550
|
-
|
|
1550
|
+
r({
|
|
1551
1551
|
to: "/projects/$projectId/network/securitygroups",
|
|
1552
|
-
params: { projectId:
|
|
1552
|
+
params: { projectId: n }
|
|
1553
1553
|
});
|
|
1554
1554
|
};
|
|
1555
|
-
if (y) return /* @__PURE__ */ I(
|
|
1555
|
+
if (y) return /* @__PURE__ */ I(b, {
|
|
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(o, {
|
|
1561
1561
|
variant: "primary",
|
|
1562
1562
|
size: "large",
|
|
1563
1563
|
className: "mb-2"
|
|
1564
1564
|
}), /* @__PURE__ */ F(V, { id: "3x7Sws" })]
|
|
1565
1565
|
});
|
|
1566
|
-
if (
|
|
1567
|
-
let e =
|
|
1568
|
-
return /* @__PURE__ */ I(
|
|
1566
|
+
if (x) {
|
|
1567
|
+
let e = S?.message || "Unknown error";
|
|
1568
|
+
return /* @__PURE__ */ I(b, {
|
|
1569
1569
|
className: "fixed inset-0",
|
|
1570
1570
|
distribution: "center",
|
|
1571
1571
|
alignment: "center",
|
|
@@ -1580,7 +1580,7 @@ function Te() {
|
|
|
1580
1580
|
className: "text-theme-highest",
|
|
1581
1581
|
children: e
|
|
1582
1582
|
}),
|
|
1583
|
-
/* @__PURE__ */ F(
|
|
1583
|
+
/* @__PURE__ */ F(p, {
|
|
1584
1584
|
onClick: J,
|
|
1585
1585
|
variant: "primary",
|
|
1586
1586
|
children: /* @__PURE__ */ F(V, { id: "U9q4M7" })
|
|
@@ -1588,44 +1588,44 @@ function Te() {
|
|
|
1588
1588
|
]
|
|
1589
1589
|
});
|
|
1590
1590
|
}
|
|
1591
|
-
return
|
|
1591
|
+
return g ? /* @__PURE__ */ I(b, {
|
|
1592
1592
|
direction: "vertical",
|
|
1593
1593
|
children: [
|
|
1594
|
-
/* @__PURE__ */ F(
|
|
1595
|
-
/* @__PURE__ */ I(
|
|
1594
|
+
/* @__PURE__ */ F(v, { children: g.name || g.id }),
|
|
1595
|
+
/* @__PURE__ */ I(u, {
|
|
1596
1596
|
className: "my-6",
|
|
1597
|
-
children: [/* @__PURE__ */ F(
|
|
1597
|
+
children: [/* @__PURE__ */ F(t, {
|
|
1598
1598
|
onClick: J,
|
|
1599
|
-
label:
|
|
1600
|
-
}), /* @__PURE__ */ F(
|
|
1599
|
+
label: i._({ id: "4opp4r" })
|
|
1600
|
+
}), /* @__PURE__ */ F(t, {
|
|
1601
1601
|
active: !0,
|
|
1602
|
-
label:
|
|
1602
|
+
label: g.id
|
|
1603
1603
|
})]
|
|
1604
1604
|
}),
|
|
1605
1605
|
/* @__PURE__ */ F(Ce, {
|
|
1606
|
-
securityGroup:
|
|
1607
|
-
filteredAndSortedRules:
|
|
1606
|
+
securityGroup: g,
|
|
1607
|
+
filteredAndSortedRules: _,
|
|
1608
1608
|
onEdit: L,
|
|
1609
1609
|
onDeleteRule: W,
|
|
1610
1610
|
isDeletingRule: T,
|
|
1611
1611
|
deleteRuleError: E,
|
|
1612
|
-
filterControls:
|
|
1612
|
+
filterControls: h,
|
|
1613
1613
|
onCreateRule: G,
|
|
1614
1614
|
isCreatingRule: k,
|
|
1615
|
-
createRuleError:
|
|
1615
|
+
createRuleError: j,
|
|
1616
1616
|
availableSecurityGroups: q,
|
|
1617
|
-
currentProjectId:
|
|
1617
|
+
currentProjectId: n
|
|
1618
1618
|
}),
|
|
1619
1619
|
/* @__PURE__ */ F(N, {
|
|
1620
|
-
securityGroup:
|
|
1620
|
+
securityGroup: g,
|
|
1621
1621
|
open: P,
|
|
1622
1622
|
onClose: z,
|
|
1623
1623
|
onUpdate: U,
|
|
1624
|
-
isLoading:
|
|
1625
|
-
error:
|
|
1624
|
+
isLoading: C,
|
|
1625
|
+
error: w
|
|
1626
1626
|
})
|
|
1627
1627
|
]
|
|
1628
|
-
}) : /* @__PURE__ */ I(
|
|
1628
|
+
}) : /* @__PURE__ */ I(b, {
|
|
1629
1629
|
className: "fixed inset-0",
|
|
1630
1630
|
distribution: "center",
|
|
1631
1631
|
alignment: "center",
|
|
@@ -1634,7 +1634,7 @@ 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(
|
|
1637
|
+
}), /* @__PURE__ */ F(p, {
|
|
1638
1638
|
onClick: J,
|
|
1639
1639
|
variant: "primary",
|
|
1640
1640
|
children: /* @__PURE__ */ F(V, { id: "U9q4M7" })
|
|
@@ -1644,4 +1644,4 @@ function Te() {
|
|
|
1644
1644
|
//#endregion
|
|
1645
1645
|
export { Te as component };
|
|
1646
1646
|
|
|
1647
|
-
//# sourceMappingURL=_securityGroupId-
|
|
1647
|
+
//# sourceMappingURL=_securityGroupId-gbUnd5Wv.mjs.map
|