@dovetail-v2/refine 0.0.19 → 0.0.20
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.
|
@@ -11,7 +11,7 @@ import { parse, stringify } from "qs";
|
|
|
11
11
|
import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink, Router } from "react-router-dom";
|
|
12
12
|
import { useUIKit, kitContext, Typo, Icon as Icon$1, popModal, pushModal, ModalStack, KitStoreProvider } from "@cloudtower/eagle";
|
|
13
13
|
import yaml from "js-yaml";
|
|
14
|
-
import { isObject, first, get, omit as omit$1, merge, keyBy } from "lodash-es";
|
|
14
|
+
import { isObject, first, get, omit as omit$1, flatten, merge, keyBy } from "lodash-es";
|
|
15
15
|
import { useForm } from "sunflower-antd";
|
|
16
16
|
import i18n from "i18next";
|
|
17
17
|
import { HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, Retry16GradientBlueIcon, EditPen16GradientGrayIcon, EditPen16GradientBlueIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, EditPen16PrimaryIcon, TrashBinDelete16Icon, Download16GradientBlueIcon, MoreEllipsis316BoldBlueIcon, CheckmarkDoneSuccessCorrect16BoldGreenIcon, XmarkFailed16BoldRedIcon, DynamicResourceSchedule16BlueIcon, VmResume16Icon, SuspendedPause16GradientGrayIcon, Resume24Icon, SuspendedPause24GradientOrangeIcon } from "@cloudtower/icons-react";
|
|
@@ -3810,7 +3810,7 @@ lodash.exports;
|
|
|
3810
3810
|
return result2;
|
|
3811
3811
|
}
|
|
3812
3812
|
function flatRest(func) {
|
|
3813
|
-
return setToString(overRest(func, undefined$1,
|
|
3813
|
+
return setToString(overRest(func, undefined$1, flatten2), func + "");
|
|
3814
3814
|
}
|
|
3815
3815
|
function getAllKeys(object2) {
|
|
3816
3816
|
return baseGetAllKeys(object2, keys, getSymbols);
|
|
@@ -4357,7 +4357,7 @@ lodash.exports;
|
|
|
4357
4357
|
}
|
|
4358
4358
|
return baseFindIndex(array, getIteratee(predicate, 3), index, true);
|
|
4359
4359
|
}
|
|
4360
|
-
function
|
|
4360
|
+
function flatten2(array) {
|
|
4361
4361
|
var length = array == null ? 0 : array.length;
|
|
4362
4362
|
return length ? baseFlatten(array, 1) : [];
|
|
4363
4363
|
}
|
|
@@ -6145,7 +6145,7 @@ lodash.exports;
|
|
|
6145
6145
|
lodash2.flatMap = flatMap;
|
|
6146
6146
|
lodash2.flatMapDeep = flatMapDeep;
|
|
6147
6147
|
lodash2.flatMapDepth = flatMapDepth;
|
|
6148
|
-
lodash2.flatten =
|
|
6148
|
+
lodash2.flatten = flatten2;
|
|
6149
6149
|
lodash2.flattenDeep = flattenDeep;
|
|
6150
6150
|
lodash2.flattenDepth = flattenDepth;
|
|
6151
6151
|
lodash2.flip = flip;
|
|
@@ -9856,7 +9856,7 @@ const ErrorMsgStyle = "eh2qjnl";
|
|
|
9856
9856
|
const ErrorWrapperStyle = "e19q2bnp";
|
|
9857
9857
|
const YamlEditorStyle = "y16u5v3w";
|
|
9858
9858
|
const MonacoYamlEditor$2 = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$1));
|
|
9859
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
9859
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-caec6da3.js"));
|
|
9860
9860
|
const YamlEditorComponent = forwardRef(
|
|
9861
9861
|
function YamlEditorComponent2(props, ref) {
|
|
9862
9862
|
const {
|
|
@@ -11762,7 +11762,7 @@ const ShowContent = (props) => {
|
|
|
11762
11762
|
});
|
|
11763
11763
|
}
|
|
11764
11764
|
}];
|
|
11765
|
-
const
|
|
11765
|
+
const stateDisplay = get(record, "stateDisplay");
|
|
11766
11766
|
const topBar = /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
|
|
11767
11767
|
className: TopBarStyle,
|
|
11768
11768
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
@@ -11772,9 +11772,9 @@ const ShowContent = (props) => {
|
|
|
11772
11772
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
11773
11773
|
className: Typo.Label.l1_regular,
|
|
11774
11774
|
children: (_c = record == null ? void 0 : record.metadata) == null ? void 0 : _c.name
|
|
11775
|
-
}),
|
|
11775
|
+
}), stateDisplay ? /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
|
|
11776
11776
|
className: StateTagStyle,
|
|
11777
|
-
state:
|
|
11777
|
+
state: stateDisplay
|
|
11778
11778
|
}) : void 0]
|
|
11779
11779
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
|
|
11780
11780
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs(kit.radioGroup, {
|
|
@@ -18286,6 +18286,84 @@ const PodLog = ({
|
|
|
18286
18286
|
})]
|
|
18287
18287
|
});
|
|
18288
18288
|
};
|
|
18289
|
+
const NetworkPolicyRulesTable = ({ ingressOrEgress }) => {
|
|
18290
|
+
const result = ingressOrEgress == null ? void 0 : ingressOrEgress.map((gress, i) => {
|
|
18291
|
+
const peers = get(gress, "from") || get(gress, "to");
|
|
18292
|
+
if (!peers)
|
|
18293
|
+
return null;
|
|
18294
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IngressRuleTable, { peers }, i);
|
|
18295
|
+
});
|
|
18296
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: result });
|
|
18297
|
+
};
|
|
18298
|
+
const IngressRuleTable = ({ peers }) => {
|
|
18299
|
+
const kit = useUIKit();
|
|
18300
|
+
const { t } = useTranslation();
|
|
18301
|
+
const rows = useMemo(() => {
|
|
18302
|
+
const rows2 = (peers == null ? void 0 : peers.map((p) => {
|
|
18303
|
+
return Object.keys(p).map((key) => {
|
|
18304
|
+
return {
|
|
18305
|
+
type: key,
|
|
18306
|
+
...p[key]
|
|
18307
|
+
};
|
|
18308
|
+
});
|
|
18309
|
+
})) || [];
|
|
18310
|
+
return addId(flatten(rows2), "type");
|
|
18311
|
+
}, [peers]);
|
|
18312
|
+
const columns = [
|
|
18313
|
+
{
|
|
18314
|
+
key: "type",
|
|
18315
|
+
display: true,
|
|
18316
|
+
dataIndex: "type",
|
|
18317
|
+
title: t("dovetail.type"),
|
|
18318
|
+
sortable: true
|
|
18319
|
+
},
|
|
18320
|
+
{
|
|
18321
|
+
key: "cidr",
|
|
18322
|
+
display: true,
|
|
18323
|
+
dataIndex: "cidr",
|
|
18324
|
+
title: "CIDR",
|
|
18325
|
+
sortable: true,
|
|
18326
|
+
render(v) {
|
|
18327
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: v || "-" });
|
|
18328
|
+
}
|
|
18329
|
+
},
|
|
18330
|
+
{
|
|
18331
|
+
key: "except",
|
|
18332
|
+
display: true,
|
|
18333
|
+
dataIndex: "except",
|
|
18334
|
+
title: "Except",
|
|
18335
|
+
sortable: true,
|
|
18336
|
+
render: (except) => {
|
|
18337
|
+
if (!except)
|
|
18338
|
+
return "-";
|
|
18339
|
+
return except == null ? void 0 : except.map((str) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: str }, str));
|
|
18340
|
+
}
|
|
18341
|
+
},
|
|
18342
|
+
{
|
|
18343
|
+
key: "matchLabels",
|
|
18344
|
+
display: true,
|
|
18345
|
+
dataIndex: "matchLabels",
|
|
18346
|
+
title: "Match Labels",
|
|
18347
|
+
sortable: true,
|
|
18348
|
+
render(matchLabels) {
|
|
18349
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tags, { value: matchLabels });
|
|
18350
|
+
}
|
|
18351
|
+
}
|
|
18352
|
+
];
|
|
18353
|
+
if (rows.length === 0) {
|
|
18354
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t("dovetail.empty"), style: { padding: "15px 0" } });
|
|
18355
|
+
}
|
|
18356
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18357
|
+
kit.table,
|
|
18358
|
+
{
|
|
18359
|
+
loading: false,
|
|
18360
|
+
dataSource: rows,
|
|
18361
|
+
columns,
|
|
18362
|
+
rowKey: "type",
|
|
18363
|
+
empty: t("dovetail.empty")
|
|
18364
|
+
}
|
|
18365
|
+
);
|
|
18366
|
+
};
|
|
18289
18367
|
const IngressRulesComponent = ({ ingress }) => {
|
|
18290
18368
|
const kit = useUIKit();
|
|
18291
18369
|
const result = ingress.flattenedRules.map((r) => {
|
|
@@ -19271,6 +19349,7 @@ export {
|
|
|
19271
19349
|
YamlEditorComponent as Z,
|
|
19272
19350
|
DeleteButton as _,
|
|
19273
19351
|
useDeleteModal as a,
|
|
19352
|
+
ProviderPlugins as a$,
|
|
19274
19353
|
ImageField as a0,
|
|
19275
19354
|
ReplicaField as a1,
|
|
19276
19355
|
ConditionsField as a2,
|
|
@@ -19281,33 +19360,33 @@ export {
|
|
|
19281
19360
|
StartTimeField as a7,
|
|
19282
19361
|
ServiceTypeField as a8,
|
|
19283
19362
|
ClusterIpField as a9,
|
|
19284
|
-
|
|
19285
|
-
|
|
19286
|
-
|
|
19287
|
-
|
|
19288
|
-
|
|
19289
|
-
|
|
19290
|
-
|
|
19291
|
-
|
|
19292
|
-
|
|
19293
|
-
|
|
19294
|
-
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19298
|
-
|
|
19299
|
-
|
|
19300
|
-
|
|
19301
|
-
|
|
19302
|
-
|
|
19303
|
-
|
|
19304
|
-
|
|
19305
|
-
|
|
19306
|
-
|
|
19307
|
-
|
|
19308
|
-
|
|
19309
|
-
|
|
19310
|
-
|
|
19363
|
+
JOB_INIT_VALUE as aA,
|
|
19364
|
+
STATEFULSET_INIT_VALUE as aB,
|
|
19365
|
+
POD_INIT_VALUE as aC,
|
|
19366
|
+
SERVICE_INIT_VALUE as aD,
|
|
19367
|
+
INGRESS_INIT_VALUE as aE,
|
|
19368
|
+
NETWORK_POLICY_INIT_VALUE as aF,
|
|
19369
|
+
TIMESTAMP_LABEL as aG,
|
|
19370
|
+
WorkloadState as aH,
|
|
19371
|
+
Dovetail as aI,
|
|
19372
|
+
RESOURCE_GROUP as aJ,
|
|
19373
|
+
FormType as aK,
|
|
19374
|
+
ComponentContext as aL,
|
|
19375
|
+
GlobalStoreContext as aM,
|
|
19376
|
+
ConfigsContext as aN,
|
|
19377
|
+
IngressModel as aO,
|
|
19378
|
+
NetworkPolicyModel as aP,
|
|
19379
|
+
JobModel as aQ,
|
|
19380
|
+
WorkloadModel as aR,
|
|
19381
|
+
WorkloadBaseModel as aS,
|
|
19382
|
+
PodModel as aT,
|
|
19383
|
+
PodMetricsModel as aU,
|
|
19384
|
+
ResourceModel as aV,
|
|
19385
|
+
CronJobModel as aW,
|
|
19386
|
+
EventModel as aX,
|
|
19387
|
+
DeploymentModel as aY,
|
|
19388
|
+
DaemonSetModel as aZ,
|
|
19389
|
+
StatefulSetModel as a_,
|
|
19311
19390
|
SessionAffinityField as aa,
|
|
19312
19391
|
ServicePodsField as ab,
|
|
19313
19392
|
IngressRulesTableTabField as ac,
|
|
@@ -19329,11 +19408,11 @@ export {
|
|
|
19329
19408
|
Tags as as,
|
|
19330
19409
|
PodLog as at,
|
|
19331
19410
|
FormModal as au,
|
|
19332
|
-
|
|
19333
|
-
|
|
19334
|
-
|
|
19335
|
-
|
|
19336
|
-
|
|
19411
|
+
NetworkPolicyRulesTable as av,
|
|
19412
|
+
BASE_INIT_VALUE as aw,
|
|
19413
|
+
DEPLOYMENT_INIT_VALUE as ax,
|
|
19414
|
+
CRONJOB_INIT_VALUE as ay,
|
|
19415
|
+
DAEMONSET_INIT_VALUE as az,
|
|
19337
19416
|
NameSpaceColumnRenderer as b,
|
|
19338
19417
|
WorkloadRestartsColumnRenderer as c,
|
|
19339
19418
|
NodeNameColumnRenderer as d,
|
package/dist/refine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ap, A,
|
|
1
|
+
import { ap, A, aw, B, ay, a9, i, C, f, aL, a2, x, aN, E, Q, aW, V, az, ax, aZ, a5, _, ag, aY, aI, aj, D, al, aX, ad, au, aK, aM, aE, a0, F, h, aO, I, ac, aA, aQ, a4, X, K, $, ah, ak, M, aF, ao, N, o, b, t, ar, aP, av, d, aC, w, y, at, aU, aT, P, a3, a$, aJ, am, a1, R, L, J, an, G, aV, H, T, e, aD, aB, af, a6, Y, ab, g, a8, aa, ae, a7, S, ai, a_, aG, as, aS, z, W, aR, O, U, c, aH, Z, p, v, s, q, r, a, l, k, m, n, aq, u } from "./index-dce89c8c.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "js-yaml";
|
|
@@ -17,46 +17,46 @@ import "k8s-api-provider";
|
|
|
17
17
|
export {
|
|
18
18
|
ap as ALL_NS,
|
|
19
19
|
A as AgeColumnRenderer,
|
|
20
|
-
|
|
20
|
+
aw as BASE_INIT_VALUE,
|
|
21
21
|
B as Breadcrumb,
|
|
22
|
-
|
|
22
|
+
ay as CRONJOB_INIT_VALUE,
|
|
23
23
|
a9 as ClusterIpField,
|
|
24
24
|
i as ColumnKeys,
|
|
25
25
|
C as CommonSorter,
|
|
26
26
|
f as CompletionsCountColumnRenderer,
|
|
27
|
-
|
|
27
|
+
aL as ComponentContext,
|
|
28
28
|
a2 as ConditionsField,
|
|
29
29
|
x as ConditionsTable,
|
|
30
|
-
|
|
30
|
+
aN as ConfigsContext,
|
|
31
31
|
E as CreateButton,
|
|
32
32
|
Q as CronJobDropdown,
|
|
33
|
-
|
|
33
|
+
aW as CronJobModel,
|
|
34
34
|
V as CronjobJobsTable,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
az as DAEMONSET_INIT_VALUE,
|
|
36
|
+
ax as DEPLOYMENT_INIT_VALUE,
|
|
37
|
+
aZ as DaemonSetModel,
|
|
38
38
|
a5 as DataField,
|
|
39
39
|
_ as DeleteButton,
|
|
40
40
|
ag as DeleteManyButton,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
aY as DeploymentModel,
|
|
42
|
+
aI as Dovetail,
|
|
43
43
|
aj as DrawerShow,
|
|
44
44
|
D as DurationColumnRenderer,
|
|
45
45
|
al as EditButton,
|
|
46
|
-
|
|
46
|
+
aX as EventModel,
|
|
47
47
|
ad as EventsTableTabField,
|
|
48
48
|
au as FormModal,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
aK as FormType,
|
|
50
|
+
aM as GlobalStoreContext,
|
|
51
|
+
aE as INGRESS_INIT_VALUE,
|
|
52
52
|
a0 as ImageField,
|
|
53
53
|
F as ImageNames,
|
|
54
54
|
h as IngressDefaultBackendColumnRenderer,
|
|
55
|
-
|
|
55
|
+
aO as IngressModel,
|
|
56
56
|
I as IngressRulesColumnRenderer,
|
|
57
57
|
ac as IngressRulesTableTabField,
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
aA as JOB_INIT_VALUE,
|
|
59
|
+
aQ as JobModel,
|
|
60
60
|
a4 as JobsField,
|
|
61
61
|
X as KeyValue,
|
|
62
62
|
K as KeyValueListWidget,
|
|
@@ -64,25 +64,26 @@ export {
|
|
|
64
64
|
ah as ListPage,
|
|
65
65
|
ak as Menu,
|
|
66
66
|
M as MetadataForm,
|
|
67
|
-
|
|
67
|
+
aF as NETWORK_POLICY_INIT_VALUE,
|
|
68
68
|
ao as NS_STORE_KEY,
|
|
69
69
|
N as NameColumnRenderer,
|
|
70
70
|
o as NameInputWidget,
|
|
71
71
|
b as NameSpaceColumnRenderer,
|
|
72
72
|
t as NamespaceSelectWidget,
|
|
73
73
|
ar as NamespacesFilter,
|
|
74
|
-
|
|
74
|
+
aP as NetworkPolicyModel,
|
|
75
|
+
av as NetworkPolicyRulesTable,
|
|
75
76
|
d as NodeNameColumnRenderer,
|
|
76
|
-
|
|
77
|
+
aC as POD_INIT_VALUE,
|
|
77
78
|
w as PageShow,
|
|
78
79
|
y as PodContainersTable,
|
|
79
80
|
at as PodLog,
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
aU as PodMetricsModel,
|
|
82
|
+
aT as PodModel,
|
|
82
83
|
P as PodWorkloadColumnRenderer,
|
|
83
84
|
a3 as PodsField,
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
a$ as ProviderPlugins,
|
|
86
|
+
aJ as RESOURCE_GROUP,
|
|
86
87
|
am as ReferenceLink,
|
|
87
88
|
a1 as ReplicaField,
|
|
88
89
|
R as ReplicasColumnRenderer,
|
|
@@ -90,12 +91,12 @@ export {
|
|
|
90
91
|
J as ResourceForm,
|
|
91
92
|
an as ResourceLink,
|
|
92
93
|
G as ResourceList,
|
|
93
|
-
|
|
94
|
+
aV as ResourceModel,
|
|
94
95
|
H as ResourceShow,
|
|
95
96
|
T as ResourceUsageBar,
|
|
96
97
|
e as RestartCountColumnRenderer,
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
aD as SERVICE_INIT_VALUE,
|
|
99
|
+
aB as STATEFULSET_INIT_VALUE,
|
|
99
100
|
af as SchemaStrategy,
|
|
100
101
|
a6 as SecretDataField,
|
|
101
102
|
Y as Separator,
|
|
@@ -107,17 +108,17 @@ export {
|
|
|
107
108
|
a7 as StartTimeField,
|
|
108
109
|
S as StateDisplayColumnRenderer,
|
|
109
110
|
ai as StateTag,
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
a_ as StatefulSetModel,
|
|
112
|
+
aG as TIMESTAMP_LABEL,
|
|
112
113
|
as as Tags,
|
|
113
|
-
|
|
114
|
+
aS as WorkloadBaseModel,
|
|
114
115
|
z as WorkloadDropdown,
|
|
115
116
|
W as WorkloadImageColumnRenderer,
|
|
116
|
-
|
|
117
|
+
aR as WorkloadModel,
|
|
117
118
|
O as WorkloadPodsTable,
|
|
118
119
|
U as WorkloadReplicas,
|
|
119
120
|
c as WorkloadRestartsColumnRenderer,
|
|
120
|
-
|
|
121
|
+
aH as WorkloadState,
|
|
121
122
|
Z as YamlEditorComponent,
|
|
122
123
|
p as dnsSubDomainRules,
|
|
123
124
|
v as namespaceRules,
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -11768,7 +11768,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11768
11768
|
});
|
|
11769
11769
|
}
|
|
11770
11770
|
}];
|
|
11771
|
-
const
|
|
11771
|
+
const stateDisplay = lodashEs.get(record, "stateDisplay");
|
|
11772
11772
|
const topBar = /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
|
|
11773
11773
|
className: TopBarStyle,
|
|
11774
11774
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
@@ -11778,9 +11778,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11778
11778
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
11779
11779
|
className: eagle.Typo.Label.l1_regular,
|
|
11780
11780
|
children: (_c = record == null ? void 0 : record.metadata) == null ? void 0 : _c.name
|
|
11781
|
-
}),
|
|
11781
|
+
}), stateDisplay ? /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
|
|
11782
11782
|
className: StateTagStyle,
|
|
11783
|
-
state:
|
|
11783
|
+
state: stateDisplay
|
|
11784
11784
|
}) : void 0]
|
|
11785
11785
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
|
|
11786
11786
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs(kit.radioGroup, {
|
|
@@ -18292,6 +18292,84 @@ var __publicField = (obj, key, value) => {
|
|
|
18292
18292
|
})]
|
|
18293
18293
|
});
|
|
18294
18294
|
};
|
|
18295
|
+
const NetworkPolicyRulesTable = ({ ingressOrEgress }) => {
|
|
18296
|
+
const result = ingressOrEgress == null ? void 0 : ingressOrEgress.map((gress, i) => {
|
|
18297
|
+
const peers = lodashEs.get(gress, "from") || lodashEs.get(gress, "to");
|
|
18298
|
+
if (!peers)
|
|
18299
|
+
return null;
|
|
18300
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(IngressRuleTable, { peers }, i);
|
|
18301
|
+
});
|
|
18302
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: result });
|
|
18303
|
+
};
|
|
18304
|
+
const IngressRuleTable = ({ peers }) => {
|
|
18305
|
+
const kit = eagle.useUIKit();
|
|
18306
|
+
const { t } = useTranslation();
|
|
18307
|
+
const rows = React.useMemo(() => {
|
|
18308
|
+
const rows2 = (peers == null ? void 0 : peers.map((p) => {
|
|
18309
|
+
return Object.keys(p).map((key) => {
|
|
18310
|
+
return {
|
|
18311
|
+
type: key,
|
|
18312
|
+
...p[key]
|
|
18313
|
+
};
|
|
18314
|
+
});
|
|
18315
|
+
})) || [];
|
|
18316
|
+
return addId(lodashEs.flatten(rows2), "type");
|
|
18317
|
+
}, [peers]);
|
|
18318
|
+
const columns = [
|
|
18319
|
+
{
|
|
18320
|
+
key: "type",
|
|
18321
|
+
display: true,
|
|
18322
|
+
dataIndex: "type",
|
|
18323
|
+
title: t("dovetail.type"),
|
|
18324
|
+
sortable: true
|
|
18325
|
+
},
|
|
18326
|
+
{
|
|
18327
|
+
key: "cidr",
|
|
18328
|
+
display: true,
|
|
18329
|
+
dataIndex: "cidr",
|
|
18330
|
+
title: "CIDR",
|
|
18331
|
+
sortable: true,
|
|
18332
|
+
render(v) {
|
|
18333
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: v || "-" });
|
|
18334
|
+
}
|
|
18335
|
+
},
|
|
18336
|
+
{
|
|
18337
|
+
key: "except",
|
|
18338
|
+
display: true,
|
|
18339
|
+
dataIndex: "except",
|
|
18340
|
+
title: "Except",
|
|
18341
|
+
sortable: true,
|
|
18342
|
+
render: (except) => {
|
|
18343
|
+
if (!except)
|
|
18344
|
+
return "-";
|
|
18345
|
+
return except == null ? void 0 : except.map((str) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: str }, str));
|
|
18346
|
+
}
|
|
18347
|
+
},
|
|
18348
|
+
{
|
|
18349
|
+
key: "matchLabels",
|
|
18350
|
+
display: true,
|
|
18351
|
+
dataIndex: "matchLabels",
|
|
18352
|
+
title: "Match Labels",
|
|
18353
|
+
sortable: true,
|
|
18354
|
+
render(matchLabels) {
|
|
18355
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tags, { value: matchLabels });
|
|
18356
|
+
}
|
|
18357
|
+
}
|
|
18358
|
+
];
|
|
18359
|
+
if (rows.length === 0) {
|
|
18360
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t("dovetail.empty"), style: { padding: "15px 0" } });
|
|
18361
|
+
}
|
|
18362
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18363
|
+
kit.table,
|
|
18364
|
+
{
|
|
18365
|
+
loading: false,
|
|
18366
|
+
dataSource: rows,
|
|
18367
|
+
columns,
|
|
18368
|
+
rowKey: "type",
|
|
18369
|
+
empty: t("dovetail.empty")
|
|
18370
|
+
}
|
|
18371
|
+
);
|
|
18372
|
+
};
|
|
18295
18373
|
const IngressRulesComponent = ({ ingress }) => {
|
|
18296
18374
|
const kit = eagle.useUIKit();
|
|
18297
18375
|
const result = ingress.flattenedRules.map((r) => {
|
|
@@ -19344,6 +19422,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19344
19422
|
exports2.NamespaceSelectWidget = NamespaceSelectWidget;
|
|
19345
19423
|
exports2.NamespacesFilter = NamespacesFilter;
|
|
19346
19424
|
exports2.NetworkPolicyModel = NetworkPolicyModel;
|
|
19425
|
+
exports2.NetworkPolicyRulesTable = NetworkPolicyRulesTable;
|
|
19347
19426
|
exports2.NodeNameColumnRenderer = NodeNameColumnRenderer;
|
|
19348
19427
|
exports2.POD_INIT_VALUE = POD_INIT_VALUE;
|
|
19349
19428
|
exports2.PageShow = PageShow;
|