@dovetail-v2/refine 0.3.12-alpha.2 → 0.3.13-alpha.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/components/InternalBaseTable/index.d.ts +1 -0
- package/dist/components/KeyValue/KeyValue.d.ts +2 -0
- package/dist/components/ResourceSelect/index.d.ts +1 -0
- package/dist/components/ShowContent/fields.d.ts +1 -1
- package/dist/components/ShowContent/groups.d.ts +1 -4
- package/dist/components/ShowContent/tabs.d.ts +13 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useRefineFilters.d.ts +9 -0
- package/dist/i18n.d.ts +5 -0
- package/dist/locales/zh-CN/index.d.ts +5 -0
- package/dist/models/ingress-model.d.ts +1 -1
- package/dist/refine.cjs +536 -283
- package/dist/refine.js +537 -284
- package/dist/style.css +72 -8
- package/dist/types/resource.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/match-selector.d.ts +1 -1
- package/package.json +1 -1
- package/dist/utils/selector.d.ts +0 -3
package/dist/refine.js
CHANGED
|
@@ -11,7 +11,7 @@ import { ResourceContext, matchResourceFromRoute, useResource, useDelete, useNav
|
|
|
11
11
|
import { parse, stringify } from "qs";
|
|
12
12
|
import React, { createElement, isValidElement, cloneElement, Children, useContext, useCallback, createContext, useState, useEffect, useMemo, useRef, useImperativeHandle, lazy, Suspense, memo, forwardRef } from "react";
|
|
13
13
|
import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink, Router } from "react-router-dom";
|
|
14
|
-
import { usePushModal, usePopModal, DeleteDialog, Tag, RejectDialog, RejectDialogType, Typo, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$2, Pagination, Alert, ImmersiveDialog, SmallDialog, Fields, Units, Link as Link$1, OverflowTooltip, Tooltip, Dropdown, Menu as Menu$1, Icon, Divider, Modal, StatusCapsule, Popover, AntdTable,
|
|
14
|
+
import { usePushModal, usePopModal, DeleteDialog, Tag, RejectDialog, RejectDialogType, Typo, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$2, Pagination, Alert, ImmersiveDialog, SmallDialog, Fields, Units, Link as Link$1, OverflowTooltip, Tooltip, Dropdown, Menu as Menu$1, Icon, Divider, Modal, StatusCapsule, Popover, AntdTable, Upload, TableForm, AutoComplete, getOptions, DonutChart, SegmentControl, Checkbox, Tabs as Tabs$1, TabsTabPane, Col, Row, useMessage, SearchInput, Token, AntdSelectOptGroup, WizardDialog, MenuItemGroup, Layout as Layout$1, InputGroup, InputInteger, Time as Time$1, ModalStack, KitStoreProvider, ConfigProvider } from "@cloudtower/eagle";
|
|
15
15
|
import { EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, InfoICircleFill16GrayIcon, InfoICircleFill16Gray70Icon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, ArrowChevronDownSmall16BlueIcon, ArrowChevronUpSmall16BlueIcon, Retry16GradientBlueIcon, OpenTerminal16GradientBlueIcon, ArrowChevronDown16BlueIcon, ArrowChevronUp16BlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, EditPen16GradientBlueIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, Pause16GradientBlueIcon, EditPen16BlueIcon } from "@cloudtower/icons-react";
|
|
16
16
|
import { first, get as get$2, cloneDeep, set, omit as omit$1, merge, isEqual as isEqual$1, debounce, last, setWith, clone, isObject as isObject$4, uniq, keyBy } from "lodash-es";
|
|
17
17
|
import yaml$2 from "js-yaml";
|
|
@@ -549,7 +549,7 @@ const realtime_log$1 = "Real-time logs";
|
|
|
549
549
|
const previous_log$1 = "Last startup logs";
|
|
550
550
|
const auto_wrap$1 = "Auto wrap";
|
|
551
551
|
const container_num$1 = "Containers";
|
|
552
|
-
const edit_resource_success$1 = "{{
|
|
552
|
+
const edit_resource_success$1 = "{{kind}} {{name}} was edited successfully";
|
|
553
553
|
const redeploy_success_toast$1 = "{{kind}} {{name}} was redeployed successfully";
|
|
554
554
|
const redeploy_failed_toast$1 = "Failed to redeploy {{kind}} {{name}}";
|
|
555
555
|
const pause_success_toast$1 = "Successfully suspended";
|
|
@@ -1021,7 +1021,7 @@ const expand = "展开";
|
|
|
1021
1021
|
const fold = "收起";
|
|
1022
1022
|
const rule = "规则";
|
|
1023
1023
|
const default_backend = "默认后端";
|
|
1024
|
-
const ingress_class = "
|
|
1024
|
+
const ingress_class = "IngressClass";
|
|
1025
1025
|
const port = "端口";
|
|
1026
1026
|
const pod_ready_num = "Pod 就绪数量";
|
|
1027
1027
|
const pod_complete_num = "Pod 完成数量";
|
|
@@ -1203,6 +1203,11 @@ const node_port_duplicated = "端口已被占用。";
|
|
|
1203
1203
|
const all = "全部";
|
|
1204
1204
|
const optional_with_bracket = "(选填)";
|
|
1205
1205
|
const label_annotations = "标签与注解";
|
|
1206
|
+
const target_service = "目标服务";
|
|
1207
|
+
const target_service_port = "目标服务端口";
|
|
1208
|
+
const select_workload = "选择工作负载";
|
|
1209
|
+
const no_search_result = "无搜索结果";
|
|
1210
|
+
const clear_search_condition = "清空搜索条件";
|
|
1206
1211
|
const dovetail = {
|
|
1207
1212
|
copy,
|
|
1208
1213
|
reset_arguments,
|
|
@@ -1468,7 +1473,12 @@ const dovetail = {
|
|
|
1468
1473
|
node_port_duplicated,
|
|
1469
1474
|
all,
|
|
1470
1475
|
optional_with_bracket,
|
|
1471
|
-
label_annotations
|
|
1476
|
+
label_annotations,
|
|
1477
|
+
target_service,
|
|
1478
|
+
target_service_port,
|
|
1479
|
+
select_workload,
|
|
1480
|
+
no_search_result,
|
|
1481
|
+
clear_search_condition
|
|
1472
1482
|
};
|
|
1473
1483
|
const ZH = {
|
|
1474
1484
|
dovetail
|
|
@@ -7970,7 +7980,7 @@ const WidgetErrorContent = (props) => {
|
|
|
7970
7980
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
|
|
7971
7981
|
className: cx_default(fontMap[type2], "title", `${type2}-title`),
|
|
7972
7982
|
children: errorText || t2("dovetail.obtain_data_error")
|
|
7973
|
-
}), !refetch ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
|
|
7983
|
+
}), props.children, !refetch ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
|
|
7974
7984
|
size: type2 === "list" ? "middle" : "small",
|
|
7975
7985
|
type: "ordinary",
|
|
7976
7986
|
onClick: (e2) => {
|
|
@@ -8684,7 +8694,7 @@ class IngressModel extends ResourceModel {
|
|
|
8684
8694
|
getFlattenedRules(services) {
|
|
8685
8695
|
var _a, _b, _c, _d;
|
|
8686
8696
|
const protocal = !!this._rawYaml.spec.tls ? "https" : "http";
|
|
8687
|
-
const servicePort = (_c = (_b = (_a = services.find((s2) => {
|
|
8697
|
+
const servicePort = (_c = (_b = (_a = services == null ? void 0 : services.find((s2) => {
|
|
8688
8698
|
var _a2, _b2;
|
|
8689
8699
|
return ((_a2 = s2.metadata) == null ? void 0 : _a2.name) === "contour-envoy" && ((_b2 = s2.spec) == null ? void 0 : _b2.type) === "NodePort";
|
|
8690
8700
|
})) == null ? void 0 : _a.spec) == null ? void 0 : _b.ports) == null ? void 0 : _c.find((p) => p.name === protocal);
|
|
@@ -9316,17 +9326,70 @@ var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
|
|
|
9316
9326
|
ResourceState2["DELETING"] = "deleting";
|
|
9317
9327
|
return ResourceState2;
|
|
9318
9328
|
})(ResourceState || {});
|
|
9329
|
+
function isLabelSelector(selector) {
|
|
9330
|
+
if (!selector || typeof selector !== "object") {
|
|
9331
|
+
return false;
|
|
9332
|
+
}
|
|
9333
|
+
const s2 = selector;
|
|
9334
|
+
if ("matchExpressions" in s2) {
|
|
9335
|
+
return true;
|
|
9336
|
+
}
|
|
9337
|
+
if ("matchLabels" in s2) {
|
|
9338
|
+
const ml = s2.matchLabels;
|
|
9339
|
+
return typeof ml === "object" && ml !== null;
|
|
9340
|
+
}
|
|
9341
|
+
return false;
|
|
9342
|
+
}
|
|
9319
9343
|
function matchSelector(pod2, selector, namespace2 = "default") {
|
|
9320
|
-
var _a, _b
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9344
|
+
var _a, _b;
|
|
9345
|
+
if (((_a = pod2.metadata) == null ? void 0 : _a.namespace) !== namespace2) {
|
|
9346
|
+
return false;
|
|
9347
|
+
}
|
|
9348
|
+
if (!selector || Object.keys(selector).length === 0) {
|
|
9349
|
+
return true;
|
|
9350
|
+
}
|
|
9351
|
+
const podLabels = ((_b = pod2.metadata) == null ? void 0 : _b.labels) || {};
|
|
9352
|
+
let matchLabels;
|
|
9353
|
+
let matchExpressions;
|
|
9354
|
+
if (isLabelSelector(selector)) {
|
|
9355
|
+
matchLabels = selector.matchLabels;
|
|
9356
|
+
matchExpressions = selector.matchExpressions;
|
|
9357
|
+
} else {
|
|
9358
|
+
matchLabels = selector;
|
|
9359
|
+
}
|
|
9360
|
+
if (matchLabels) {
|
|
9361
|
+
for (const key2 in matchLabels) {
|
|
9362
|
+
if (podLabels[key2] !== matchLabels[key2]) {
|
|
9363
|
+
return false;
|
|
9364
|
+
}
|
|
9365
|
+
}
|
|
9366
|
+
}
|
|
9367
|
+
if (matchExpressions) {
|
|
9368
|
+
for (const req of matchExpressions) {
|
|
9369
|
+
const { key: key2, operator, values } = req;
|
|
9370
|
+
const labelValue = podLabels[key2];
|
|
9371
|
+
const hasLabel = Object.prototype.hasOwnProperty.call(podLabels, key2);
|
|
9372
|
+
switch (operator) {
|
|
9373
|
+
case "In":
|
|
9374
|
+
if (!hasLabel || !(values == null ? void 0 : values.includes(labelValue)))
|
|
9375
|
+
return false;
|
|
9376
|
+
break;
|
|
9377
|
+
case "NotIn":
|
|
9378
|
+
if (hasLabel && (values == null ? void 0 : values.includes(labelValue)))
|
|
9379
|
+
return false;
|
|
9380
|
+
break;
|
|
9381
|
+
case "Exists":
|
|
9382
|
+
if (!hasLabel)
|
|
9383
|
+
return false;
|
|
9384
|
+
break;
|
|
9385
|
+
case "DoesNotExist":
|
|
9386
|
+
if (hasLabel)
|
|
9387
|
+
return false;
|
|
9388
|
+
break;
|
|
9326
9389
|
}
|
|
9327
9390
|
}
|
|
9328
9391
|
}
|
|
9329
|
-
return
|
|
9392
|
+
return true;
|
|
9330
9393
|
}
|
|
9331
9394
|
class WorkloadBaseModel extends ResourceModel {
|
|
9332
9395
|
constructor(_rawYaml, _globalStore) {
|
|
@@ -10287,13 +10350,20 @@ const ConditionsTable = ({ conditions = [] }) => {
|
|
|
10287
10350
|
width: 403
|
|
10288
10351
|
}
|
|
10289
10352
|
];
|
|
10290
|
-
const {
|
|
10353
|
+
const {
|
|
10354
|
+
data: finalData,
|
|
10355
|
+
currentPage,
|
|
10356
|
+
onPageChange,
|
|
10357
|
+
onSorterChange
|
|
10358
|
+
} = useTableData({
|
|
10291
10359
|
data: conditionsWithId,
|
|
10292
10360
|
columns,
|
|
10293
|
-
defaultSorters: [
|
|
10294
|
-
|
|
10295
|
-
|
|
10296
|
-
|
|
10361
|
+
defaultSorters: [
|
|
10362
|
+
{
|
|
10363
|
+
field: "lastUpdateTime",
|
|
10364
|
+
order: "desc"
|
|
10365
|
+
}
|
|
10366
|
+
]
|
|
10297
10367
|
});
|
|
10298
10368
|
const currentSize = 10;
|
|
10299
10369
|
if (conditionsWithId.length === 0) {
|
|
@@ -10301,7 +10371,7 @@ const ConditionsTable = ({ conditions = [] }) => {
|
|
|
10301
10371
|
WidgetErrorContent,
|
|
10302
10372
|
{
|
|
10303
10373
|
errorText: t2("dovetail.no_resource", { kind: t2("dovetail.condition") }),
|
|
10304
|
-
type: ErrorContentType.
|
|
10374
|
+
type: ErrorContentType.List
|
|
10305
10375
|
}
|
|
10306
10376
|
);
|
|
10307
10377
|
}
|
|
@@ -10574,6 +10644,9 @@ function validateLabelKey(key2) {
|
|
|
10574
10644
|
if (prefix2 && prefix2.length > 253) {
|
|
10575
10645
|
return { isValid: false };
|
|
10576
10646
|
}
|
|
10647
|
+
if (!labelRegex.test(name2)) {
|
|
10648
|
+
return { isValid: false };
|
|
10649
|
+
}
|
|
10577
10650
|
if (name2 && name2.length > 63) {
|
|
10578
10651
|
return { isValid: false };
|
|
10579
10652
|
}
|
|
@@ -10646,7 +10719,7 @@ function K8sDropdown(props) {
|
|
|
10646
10719
|
const configs = useContext(ConfigsContext);
|
|
10647
10720
|
const resourceName = getResourceNameByKind(record.kind || "", configs);
|
|
10648
10721
|
const config = configs[resourceName || ""];
|
|
10649
|
-
const { t: t2 } = useTranslation();
|
|
10722
|
+
const { t: t2, i18n: i18n2 } = useTranslation();
|
|
10650
10723
|
const { openDeleteConfirmModal } = useDeleteModal({ resourceName: resourceName || "" });
|
|
10651
10724
|
const download2 = useDownloadYAML();
|
|
10652
10725
|
const openForm = useOpenForm();
|
|
@@ -10670,7 +10743,10 @@ function K8sDropdown(props) {
|
|
|
10670
10743
|
Dropdown,
|
|
10671
10744
|
{
|
|
10672
10745
|
overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu$1, { children: [
|
|
10673
|
-
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || config.hideEdit ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1.Item, { onClick: () => openForm({ id: record.id, resourceName }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { src: EditPen16PrimaryIcon, children: formType === FormType.FORM ? t2("dovetail.edit")
|
|
10746
|
+
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || config.hideEdit ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1.Item, { onClick: () => openForm({ id: record.id, resourceName }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { src: EditPen16PrimaryIcon, children: formType === FormType.FORM ? `${t2("dovetail.edit")}${transformResourceKindInSentence(
|
|
10747
|
+
(config == null ? void 0 : config.displayName) || record.kind || "",
|
|
10748
|
+
i18n2.language
|
|
10749
|
+
)}` : t2("dovetail.edit_yaml") }) }),
|
|
10674
10750
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10675
10751
|
Menu$1.Item,
|
|
10676
10752
|
{
|
|
@@ -10889,7 +10965,6 @@ const TableToolBar = ({
|
|
|
10889
10965
|
selectedKeys,
|
|
10890
10966
|
hideCreate
|
|
10891
10967
|
}) => {
|
|
10892
|
-
var _a;
|
|
10893
10968
|
const {
|
|
10894
10969
|
resource
|
|
10895
10970
|
} = useResource();
|
|
@@ -10899,7 +10974,7 @@ const TableToolBar = ({
|
|
|
10899
10974
|
className: ToolbarStyle$1,
|
|
10900
10975
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
10901
10976
|
className: cx_default(Typo.Display.d2_regular_title, TitleStyle$2),
|
|
10902
|
-
children: title
|
|
10977
|
+
children: title
|
|
10903
10978
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
|
|
10904
10979
|
children: [selectedKeys.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteManyButton, {
|
|
10905
10980
|
ids: selectedKeys
|
|
@@ -11001,10 +11076,17 @@ const EventsTable = ({ uid }) => {
|
|
|
11001
11076
|
width: 120,
|
|
11002
11077
|
render(value2) {
|
|
11003
11078
|
const colorMap = {
|
|
11004
|
-
|
|
11005
|
-
|
|
11079
|
+
Warning: "warning",
|
|
11080
|
+
Normal: "green"
|
|
11006
11081
|
};
|
|
11007
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11082
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11083
|
+
StatusCapsule,
|
|
11084
|
+
{
|
|
11085
|
+
color: colorMap[value2],
|
|
11086
|
+
className: cx_default(StateTagStyle, "no-background"),
|
|
11087
|
+
children: i18n2.t(`dovetail.${value2.toLowerCase()}`)
|
|
11088
|
+
}
|
|
11089
|
+
);
|
|
11008
11090
|
},
|
|
11009
11091
|
sorter: CommonSorter(["type"])
|
|
11010
11092
|
},
|
|
@@ -11026,32 +11108,41 @@ const EventsTable = ({ uid }) => {
|
|
|
11026
11108
|
width: 723,
|
|
11027
11109
|
sorter: CommonSorter(["note"])
|
|
11028
11110
|
},
|
|
11029
|
-
AgeColumnRenderer(
|
|
11111
|
+
AgeColumnRenderer(
|
|
11112
|
+
i18n2,
|
|
11113
|
+
{ title: i18n2.t("dovetail.last_seen"), width: 160 },
|
|
11114
|
+
{ isRelativeTime: false }
|
|
11115
|
+
)
|
|
11030
11116
|
],
|
|
11031
11117
|
[i18n2]
|
|
11032
11118
|
);
|
|
11033
|
-
const params = useMemo(
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
|
|
11044
|
-
value: [
|
|
11119
|
+
const params = useMemo(
|
|
11120
|
+
() => ({
|
|
11121
|
+
columns,
|
|
11122
|
+
tableProps: {
|
|
11123
|
+
defaultSize: 50
|
|
11124
|
+
},
|
|
11125
|
+
useTableParams: {
|
|
11126
|
+
resource: "events",
|
|
11127
|
+
meta: { resourceBasePath: "/apis/events.k8s.io/v1", kind: "Event" },
|
|
11128
|
+
filters: {
|
|
11129
|
+
permanent: [
|
|
11045
11130
|
{
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11131
|
+
operator: "and",
|
|
11132
|
+
value: [
|
|
11133
|
+
{
|
|
11134
|
+
field: "regarding.uid",
|
|
11135
|
+
operator: "eq",
|
|
11136
|
+
value: uid
|
|
11137
|
+
}
|
|
11138
|
+
]
|
|
11049
11139
|
}
|
|
11050
11140
|
]
|
|
11051
|
-
}
|
|
11141
|
+
}
|
|
11052
11142
|
}
|
|
11053
|
-
}
|
|
11054
|
-
|
|
11143
|
+
}),
|
|
11144
|
+
[columns, uid]
|
|
11145
|
+
);
|
|
11055
11146
|
const { tableProps } = useEagleTable(params);
|
|
11056
11147
|
const component = useContext(ComponentContext);
|
|
11057
11148
|
const Table2 = component.Table || Table$1;
|
|
@@ -11059,18 +11150,12 @@ const EventsTable = ({ uid }) => {
|
|
|
11059
11150
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11060
11151
|
WidgetErrorContent,
|
|
11061
11152
|
{
|
|
11062
|
-
errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.event") })
|
|
11153
|
+
errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.event") }),
|
|
11154
|
+
type: ErrorContentType.List
|
|
11063
11155
|
}
|
|
11064
11156
|
);
|
|
11065
11157
|
}
|
|
11066
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11067
|
-
Table2,
|
|
11068
|
-
{
|
|
11069
|
-
...tableProps,
|
|
11070
|
-
tableKey: "events",
|
|
11071
|
-
showMenuColumn: false
|
|
11072
|
-
}
|
|
11073
|
-
);
|
|
11158
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Table2, { ...tableProps, tableKey: "events", showMenuColumn: false });
|
|
11074
11159
|
};
|
|
11075
11160
|
const index_mvy4dx = "";
|
|
11076
11161
|
const ImageWrapperStyle = "i1u1f5zp";
|
|
@@ -11162,7 +11247,10 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
11162
11247
|
apiVersion: "v1"
|
|
11163
11248
|
}
|
|
11164
11249
|
});
|
|
11165
|
-
const flattenedRules = useMemo(
|
|
11250
|
+
const flattenedRules = useMemo(
|
|
11251
|
+
() => (serviceData == null ? void 0 : serviceData.data) ? ingress.getFlattenedRules(serviceData == null ? void 0 : serviceData.data) : [],
|
|
11252
|
+
[serviceData == null ? void 0 : serviceData.data, ingress]
|
|
11253
|
+
);
|
|
11166
11254
|
const rows = useMemo(() => {
|
|
11167
11255
|
return addId(flattenedRules || [], "fullPath");
|
|
11168
11256
|
}, [flattenedRules]);
|
|
@@ -11193,7 +11281,7 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
11193
11281
|
key: "serviceName",
|
|
11194
11282
|
display: true,
|
|
11195
11283
|
dataIndex: "serviceName",
|
|
11196
|
-
title: t2("dovetail.
|
|
11284
|
+
title: t2("dovetail.target_service"),
|
|
11197
11285
|
sortable: true,
|
|
11198
11286
|
width: 160,
|
|
11199
11287
|
render: (serviceName, record) => {
|
|
@@ -11204,14 +11292,14 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
11204
11292
|
namespace: ingress.metadata.namespace || "default",
|
|
11205
11293
|
name: serviceName
|
|
11206
11294
|
}
|
|
11207
|
-
) :
|
|
11295
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" });
|
|
11208
11296
|
}
|
|
11209
11297
|
},
|
|
11210
11298
|
{
|
|
11211
11299
|
key: "servicePort",
|
|
11212
11300
|
display: true,
|
|
11213
11301
|
dataIndex: "servicePort",
|
|
11214
|
-
title: t2("dovetail.
|
|
11302
|
+
title: t2("dovetail.target_service_port"),
|
|
11215
11303
|
width: 120,
|
|
11216
11304
|
sortable: true
|
|
11217
11305
|
},
|
|
@@ -11219,11 +11307,13 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
11219
11307
|
key: "secret",
|
|
11220
11308
|
display: true,
|
|
11221
11309
|
dataIndex: "host",
|
|
11222
|
-
title: "
|
|
11310
|
+
title: t2("dovetail.cert"),
|
|
11223
11311
|
width: 160,
|
|
11224
11312
|
render(host2) {
|
|
11225
11313
|
var _a, _b;
|
|
11226
|
-
const secretName = (_b = (_a = ingress._rawYaml.spec.tls) == null ? void 0 : _a.find(
|
|
11314
|
+
const secretName = (_b = (_a = ingress._rawYaml.spec.tls) == null ? void 0 : _a.find(
|
|
11315
|
+
({ hosts }) => hosts == null ? void 0 : hosts.includes(host2)
|
|
11316
|
+
)) == null ? void 0 : _b.secretName;
|
|
11227
11317
|
return secretName ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11228
11318
|
ResourceLink,
|
|
11229
11319
|
{
|
|
@@ -11250,7 +11340,7 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
11250
11340
|
WidgetErrorContent,
|
|
11251
11341
|
{
|
|
11252
11342
|
errorText: t2("dovetail.no_resource", { kind: t2("dovetail.rule") }),
|
|
11253
|
-
type: ErrorContentType.
|
|
11343
|
+
type: ErrorContentType.List
|
|
11254
11344
|
}
|
|
11255
11345
|
);
|
|
11256
11346
|
}
|
|
@@ -11280,7 +11370,8 @@ const KeyValue = (props) => {
|
|
|
11280
11370
|
const {
|
|
11281
11371
|
data: data2 = {},
|
|
11282
11372
|
hideSecret,
|
|
11283
|
-
empty: empty2
|
|
11373
|
+
empty: empty2,
|
|
11374
|
+
errorContent = ErrorContentType.List
|
|
11284
11375
|
} = props;
|
|
11285
11376
|
const {
|
|
11286
11377
|
t: t2
|
|
@@ -11298,7 +11389,7 @@ const KeyValue = (props) => {
|
|
|
11298
11389
|
if (!result.length) {
|
|
11299
11390
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
|
|
11300
11391
|
errorText: empty2 || t2("dovetail.empty"),
|
|
11301
|
-
type:
|
|
11392
|
+
type: errorContent
|
|
11302
11393
|
});
|
|
11303
11394
|
}
|
|
11304
11395
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
|
|
@@ -11346,9 +11437,7 @@ function KeyValueAnnotation(props) {
|
|
|
11346
11437
|
}) : null]
|
|
11347
11438
|
});
|
|
11348
11439
|
}
|
|
11349
|
-
const
|
|
11350
|
-
const ButtonStyle$1 = "b11tbgf7";
|
|
11351
|
-
const GroupStyle$1 = "gtbyh5g";
|
|
11440
|
+
const KeyValueSecret_ltbqs = "";
|
|
11352
11441
|
function KeyValueSecret(props) {
|
|
11353
11442
|
const {
|
|
11354
11443
|
data: data2 = {}
|
|
@@ -11358,26 +11447,23 @@ function KeyValueSecret(props) {
|
|
|
11358
11447
|
} = useTranslation();
|
|
11359
11448
|
const [hideSecret, setHideSecret] = useState(true);
|
|
11360
11449
|
const toggleButton = Object.keys(data2).length ? /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
11361
|
-
type: "quiet",
|
|
11362
11450
|
prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
|
|
11363
11451
|
src: hideSecret ? ViewEye16GradientGrayIcon : EntityFilterIgnoreGradient16GrayIcon
|
|
11364
11452
|
}),
|
|
11365
11453
|
onClick: () => setHideSecret((v) => !v),
|
|
11366
|
-
className: ButtonStyle$1,
|
|
11367
11454
|
size: "small",
|
|
11455
|
+
className: "c11tbgf7",
|
|
11368
11456
|
children: hideSecret ? i18n2.t("dovetail.show_data_value") : i18n2.t("dovetail.hide_data_value")
|
|
11369
11457
|
}) : null;
|
|
11370
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
className: GroupStyle$1,
|
|
11374
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, {
|
|
11458
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
11459
|
+
className: "ctbyh5g",
|
|
11460
|
+
children: [toggleButton, /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, {
|
|
11375
11461
|
data: data2,
|
|
11376
11462
|
hideSecret,
|
|
11377
11463
|
empty: i18n2.t("dovetail.no_resource", {
|
|
11378
11464
|
kind: i18n2.t("dovetail.data")
|
|
11379
11465
|
})
|
|
11380
|
-
})
|
|
11466
|
+
})]
|
|
11381
11467
|
});
|
|
11382
11468
|
}
|
|
11383
11469
|
function isUtf8(buffer) {
|
|
@@ -11524,6 +11610,37 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11524
11610
|
const tableFormRef = useRef(null);
|
|
11525
11611
|
const [_value, _setValue] = useState(value2 || defaultValue);
|
|
11526
11612
|
const [forceUpdateCount, setForceUpdateCount] = useState(0);
|
|
11613
|
+
const finalExtraAction = useMemo(() => {
|
|
11614
|
+
if (extraAction) {
|
|
11615
|
+
return extraAction;
|
|
11616
|
+
}
|
|
11617
|
+
if (canImportFromFile) {
|
|
11618
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Upload, {
|
|
11619
|
+
multiple: true,
|
|
11620
|
+
showUploadList: false,
|
|
11621
|
+
onChange: async (e2) => {
|
|
11622
|
+
var _a;
|
|
11623
|
+
const fileValue = {
|
|
11624
|
+
key: e2.file.name,
|
|
11625
|
+
value: await readFileAsBase64(e2.file.originFileObj)
|
|
11626
|
+
};
|
|
11627
|
+
let newValue = [..._value, fileValue];
|
|
11628
|
+
if (_value.some((v) => v.key === fileValue.key)) {
|
|
11629
|
+
newValue = _value.map((v) => v.key === fileValue.key ? fileValue : v);
|
|
11630
|
+
}
|
|
11631
|
+
_setValue(newValue);
|
|
11632
|
+
(_a = tableFormRef.current) == null ? void 0 : _a.setData(newValue);
|
|
11633
|
+
onChange == null ? void 0 : onChange(newValue);
|
|
11634
|
+
},
|
|
11635
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
11636
|
+
type: "link",
|
|
11637
|
+
size: "small",
|
|
11638
|
+
children: t2("dovetail.import_from_file")
|
|
11639
|
+
})
|
|
11640
|
+
});
|
|
11641
|
+
}
|
|
11642
|
+
return null;
|
|
11643
|
+
}, [canImportFromFile, t2, _value, onChange, extraAction]);
|
|
11527
11644
|
const validate = useCallback(() => {
|
|
11528
11645
|
return new Promise((resolve) => {
|
|
11529
11646
|
var _a;
|
|
@@ -11644,7 +11761,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11644
11761
|
rowAddConfig: {
|
|
11645
11762
|
addible: true,
|
|
11646
11763
|
text: () => addButtonText,
|
|
11647
|
-
extraAction
|
|
11764
|
+
extraAction: finalExtraAction
|
|
11648
11765
|
},
|
|
11649
11766
|
defaultData: _value,
|
|
11650
11767
|
row: {
|
|
@@ -11659,29 +11776,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11659
11776
|
hideEmptyTable: true
|
|
11660
11777
|
}), isHideLabelFormatPopover ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {
|
|
11661
11778
|
noValueValidation
|
|
11662
|
-
})
|
|
11663
|
-
multiple: false,
|
|
11664
|
-
showUploadList: false,
|
|
11665
|
-
onChange: async (e2) => {
|
|
11666
|
-
var _a;
|
|
11667
|
-
const fileValue = {
|
|
11668
|
-
key: e2.file.name,
|
|
11669
|
-
value: await readFileAsBase64(e2.file.originFileObj)
|
|
11670
|
-
};
|
|
11671
|
-
let newValue = [..._value, fileValue];
|
|
11672
|
-
if (_value.some((v) => v.key === fileValue.key)) {
|
|
11673
|
-
newValue = _value.map((v) => v.key === fileValue.key ? fileValue : v);
|
|
11674
|
-
}
|
|
11675
|
-
_setValue(newValue);
|
|
11676
|
-
(_a = tableFormRef.current) == null ? void 0 : _a.setData(newValue);
|
|
11677
|
-
onChange == null ? void 0 : onChange(newValue);
|
|
11678
|
-
},
|
|
11679
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
11680
|
-
type: "link",
|
|
11681
|
-
size: "small",
|
|
11682
|
-
children: t2("dovetail.import_from_file")
|
|
11683
|
-
})
|
|
11684
|
-
}) : null]
|
|
11779
|
+
})]
|
|
11685
11780
|
});
|
|
11686
11781
|
}
|
|
11687
11782
|
const KeyValueTableForm = React.forwardRef(_KeyValueTableForm);
|
|
@@ -11963,9 +12058,18 @@ function Table(props) {
|
|
|
11963
12058
|
const { tableProps, displayName, errorContentProps } = props;
|
|
11964
12059
|
const { Table: TableComponent } = useContext(ComponentContext);
|
|
11965
12060
|
const Table2 = TableComponent || Table$1;
|
|
12061
|
+
const { params } = useParsed();
|
|
11966
12062
|
const { i18n: i18n2 } = useTranslation();
|
|
11967
12063
|
const resourceType = transformResourceKindInSentence(displayName, i18n2.language);
|
|
11968
12064
|
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
12065
|
+
const nameKeyword = (params == null ? void 0 : params[NAME_KEYWORD_PARAM]) || "";
|
|
12066
|
+
if (nameKeyword) {
|
|
12067
|
+
const onClear = () => {
|
|
12068
|
+
var _a2;
|
|
12069
|
+
(_a2 = tableProps.onClearSearchKeyword) == null ? void 0 : _a2.call(tableProps);
|
|
12070
|
+
};
|
|
12071
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, { errorText: i18n2.t("dovetail.no_search_result"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: onClear, type: "ordinary", children: i18n2.t("dovetail.clear_search_condition") }) });
|
|
12072
|
+
}
|
|
11969
12073
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11970
12074
|
WidgetErrorContent,
|
|
11971
12075
|
{
|
|
@@ -12301,6 +12405,7 @@ function WorkloadReplicas({
|
|
|
12301
12405
|
})]
|
|
12302
12406
|
});
|
|
12303
12407
|
}
|
|
12408
|
+
const fields_1lap7d5 = "";
|
|
12304
12409
|
var AreaType = /* @__PURE__ */ ((AreaType2) => {
|
|
12305
12410
|
AreaType2["Inline"] = "Inline";
|
|
12306
12411
|
AreaType2["Grid"] = "Grid";
|
|
@@ -12313,7 +12418,10 @@ const ImageField = (i18n2) => {
|
|
|
12313
12418
|
title: i18n2.t("dovetail.image"),
|
|
12314
12419
|
path: ["imageNames"],
|
|
12315
12420
|
renderContent(value2) {
|
|
12316
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(ImageNames, {
|
|
12421
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ImageNames, {
|
|
12422
|
+
value: value2,
|
|
12423
|
+
breakLine: false
|
|
12424
|
+
});
|
|
12317
12425
|
}
|
|
12318
12426
|
};
|
|
12319
12427
|
};
|
|
@@ -12322,7 +12430,10 @@ const ReplicaField = () => {
|
|
|
12322
12430
|
key: "Replicas",
|
|
12323
12431
|
path: [],
|
|
12324
12432
|
renderContent: (_, record) => {
|
|
12325
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadReplicas, {
|
|
12433
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadReplicas, {
|
|
12434
|
+
record,
|
|
12435
|
+
editable: true
|
|
12436
|
+
});
|
|
12326
12437
|
}
|
|
12327
12438
|
};
|
|
12328
12439
|
};
|
|
@@ -12331,7 +12442,9 @@ const ConditionsField = () => {
|
|
|
12331
12442
|
key: "Conditions",
|
|
12332
12443
|
path: ["status", "conditions"],
|
|
12333
12444
|
renderContent: (value2) => {
|
|
12334
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(ConditionsTable, {
|
|
12445
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ConditionsTable, {
|
|
12446
|
+
conditions: value2
|
|
12447
|
+
});
|
|
12335
12448
|
}
|
|
12336
12449
|
};
|
|
12337
12450
|
};
|
|
@@ -12340,7 +12453,9 @@ const NodeTaintsField = () => {
|
|
|
12340
12453
|
key: "NodeTaints",
|
|
12341
12454
|
path: ["spec", "taints"],
|
|
12342
12455
|
renderContent: (value2) => {
|
|
12343
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(NodeTaintsTable, {
|
|
12456
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(NodeTaintsTable, {
|
|
12457
|
+
taints: value2
|
|
12458
|
+
});
|
|
12344
12459
|
}
|
|
12345
12460
|
};
|
|
12346
12461
|
};
|
|
@@ -12350,16 +12465,13 @@ const PodsField = () => {
|
|
|
12350
12465
|
path: [],
|
|
12351
12466
|
renderContent: (_, record) => {
|
|
12352
12467
|
var _a, _b;
|
|
12353
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12354
|
-
|
|
12355
|
-
|
|
12356
|
-
|
|
12357
|
-
|
|
12358
|
-
|
|
12359
|
-
|
|
12360
|
-
hideToolbar: true
|
|
12361
|
-
}
|
|
12362
|
-
);
|
|
12468
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadPodsTable, {
|
|
12469
|
+
selector: (_b = (_a = record.metadata.relations) == null ? void 0 : _a.find((r2) => {
|
|
12470
|
+
return r2.kind === "Pod" && r2.type === "creates";
|
|
12471
|
+
})) == null ? void 0 : _b.selector,
|
|
12472
|
+
namespace: record.metadata.namespace,
|
|
12473
|
+
hideToolbar: true
|
|
12474
|
+
});
|
|
12363
12475
|
}
|
|
12364
12476
|
};
|
|
12365
12477
|
};
|
|
@@ -12369,19 +12481,16 @@ const JobsField = () => {
|
|
|
12369
12481
|
path: [],
|
|
12370
12482
|
renderContent: (_, record) => {
|
|
12371
12483
|
var _a, _b, _c;
|
|
12372
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
|
-
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
hideToolBar: true
|
|
12383
|
-
}
|
|
12384
|
-
);
|
|
12484
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(CronjobJobsTable, {
|
|
12485
|
+
owner: {
|
|
12486
|
+
apiVersion: record.apiVersion || "",
|
|
12487
|
+
kind: record.kind || "",
|
|
12488
|
+
name: ((_a = record.metadata) == null ? void 0 : _a.name) || "",
|
|
12489
|
+
namespace: ((_b = record.metadata) == null ? void 0 : _b.namespace) || "",
|
|
12490
|
+
uid: ((_c = record.metadata) == null ? void 0 : _c.uid) || ""
|
|
12491
|
+
},
|
|
12492
|
+
hideToolBar: true
|
|
12493
|
+
});
|
|
12385
12494
|
}
|
|
12386
12495
|
};
|
|
12387
12496
|
};
|
|
@@ -12390,13 +12499,15 @@ const DataField = (i18n2) => {
|
|
|
12390
12499
|
key: "data",
|
|
12391
12500
|
path: ["data"],
|
|
12392
12501
|
renderContent: (val) => {
|
|
12393
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12394
|
-
|
|
12395
|
-
{
|
|
12502
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
12503
|
+
className: "c91cpym",
|
|
12504
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, {
|
|
12396
12505
|
data: val,
|
|
12397
|
-
empty: i18n2.t("dovetail.no_resource", {
|
|
12398
|
-
|
|
12399
|
-
|
|
12506
|
+
empty: i18n2.t("dovetail.no_resource", {
|
|
12507
|
+
kind: i18n2.t("dovetail.data")
|
|
12508
|
+
})
|
|
12509
|
+
})
|
|
12510
|
+
});
|
|
12400
12511
|
}
|
|
12401
12512
|
};
|
|
12402
12513
|
};
|
|
@@ -12409,7 +12520,12 @@ const SecretDataField = () => {
|
|
|
12409
12520
|
for (const key2 in val) {
|
|
12410
12521
|
decodeVal[key2] = atob(val[key2]);
|
|
12411
12522
|
}
|
|
12412
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12523
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
12524
|
+
className: "ca9k82k",
|
|
12525
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueSecret, {
|
|
12526
|
+
data: decodeVal
|
|
12527
|
+
})
|
|
12528
|
+
});
|
|
12413
12529
|
}
|
|
12414
12530
|
};
|
|
12415
12531
|
};
|
|
@@ -12420,7 +12536,9 @@ const StartTimeField = (i18n2) => {
|
|
|
12420
12536
|
title: i18n2.t("dovetail.started"),
|
|
12421
12537
|
path: ["status", "startTime"],
|
|
12422
12538
|
renderContent(value2) {
|
|
12423
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
|
|
12539
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
|
|
12540
|
+
date: value2
|
|
12541
|
+
});
|
|
12424
12542
|
}
|
|
12425
12543
|
};
|
|
12426
12544
|
};
|
|
@@ -12454,16 +12572,13 @@ const ServicePodsField = () => {
|
|
|
12454
12572
|
path: [],
|
|
12455
12573
|
renderContent: (_, record) => {
|
|
12456
12574
|
var _a, _b, _c;
|
|
12457
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
hideToolbar: true
|
|
12465
|
-
}
|
|
12466
|
-
);
|
|
12575
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadPodsTable, {
|
|
12576
|
+
selector: (_b = (_a = record.metadata.relations) == null ? void 0 : _a.find((r2) => {
|
|
12577
|
+
return r2.kind === "Pod" && r2.type === "selects";
|
|
12578
|
+
})) == null ? void 0 : _b.selector,
|
|
12579
|
+
namespace: (_c = record.metadata) == null ? void 0 : _c.namespace,
|
|
12580
|
+
hideToolbar: true
|
|
12581
|
+
});
|
|
12467
12582
|
}
|
|
12468
12583
|
};
|
|
12469
12584
|
};
|
|
@@ -12472,7 +12587,12 @@ const IngressRulesTableTabField = () => {
|
|
|
12472
12587
|
key: "rules",
|
|
12473
12588
|
path: ["spec", "rules"],
|
|
12474
12589
|
renderContent: (_, record) => {
|
|
12475
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12590
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
12591
|
+
className: "c1k4htrr",
|
|
12592
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(IngressRulesTable, {
|
|
12593
|
+
ingress: record
|
|
12594
|
+
})
|
|
12595
|
+
});
|
|
12476
12596
|
}
|
|
12477
12597
|
};
|
|
12478
12598
|
};
|
|
@@ -12484,7 +12604,15 @@ const EventsTableTabField = ({
|
|
|
12484
12604
|
path: [],
|
|
12485
12605
|
renderContent: (_, record) => {
|
|
12486
12606
|
var _a;
|
|
12487
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
12607
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
12608
|
+
style: {
|
|
12609
|
+
padding: size === "small" ? "0 12px" : "0 24px",
|
|
12610
|
+
height: "100%"
|
|
12611
|
+
},
|
|
12612
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {
|
|
12613
|
+
uid: (_a = record.metadata) == null ? void 0 : _a.uid
|
|
12614
|
+
})
|
|
12615
|
+
});
|
|
12488
12616
|
}
|
|
12489
12617
|
};
|
|
12490
12618
|
};
|
|
@@ -12500,7 +12628,9 @@ const AgeField = (i18n2) => ({
|
|
|
12500
12628
|
title: i18n2.t("dovetail.created_time"),
|
|
12501
12629
|
path: ["metadata", "creationTimestamp"],
|
|
12502
12630
|
renderContent(value2) {
|
|
12503
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
|
|
12631
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
|
|
12632
|
+
date: new Date(value2)
|
|
12633
|
+
});
|
|
12504
12634
|
}
|
|
12505
12635
|
});
|
|
12506
12636
|
const LabelsField = (i18n2) => ({
|
|
@@ -12511,7 +12641,9 @@ const LabelsField = (i18n2) => ({
|
|
|
12511
12641
|
if (!value2) {
|
|
12512
12642
|
return "-";
|
|
12513
12643
|
}
|
|
12514
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tags, {
|
|
12644
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tags, {
|
|
12645
|
+
value: value2
|
|
12646
|
+
});
|
|
12515
12647
|
}
|
|
12516
12648
|
});
|
|
12517
12649
|
const AnnotationsField = (i18n2) => ({
|
|
@@ -12519,7 +12651,10 @@ const AnnotationsField = (i18n2) => ({
|
|
|
12519
12651
|
title: i18n2.t("dovetail.annotation"),
|
|
12520
12652
|
path: ["metadata", "annotations"],
|
|
12521
12653
|
renderContent: (value2) => {
|
|
12522
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueAnnotation, {
|
|
12654
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueAnnotation, {
|
|
12655
|
+
data: value2,
|
|
12656
|
+
expandable: true
|
|
12657
|
+
});
|
|
12523
12658
|
}
|
|
12524
12659
|
});
|
|
12525
12660
|
const ServiceInnerClusterAccessField = () => ({
|
|
@@ -12528,23 +12663,22 @@ const ServiceInnerClusterAccessField = () => ({
|
|
|
12528
12663
|
title: /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceInClusterAccessTitle, {}),
|
|
12529
12664
|
path: [],
|
|
12530
12665
|
renderContent: (_, record) => {
|
|
12531
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceInClusterAccessComponent, {
|
|
12666
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceInClusterAccessComponent, {
|
|
12667
|
+
service: record
|
|
12668
|
+
});
|
|
12532
12669
|
}
|
|
12533
12670
|
});
|
|
12534
12671
|
const ServiceOutClusterAccessField = (clusterVip) => ({
|
|
12535
|
-
key: "
|
|
12672
|
+
key: "outClusterAccess",
|
|
12536
12673
|
col: 12,
|
|
12537
12674
|
title: /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceOutClusterAccessTitle, {}),
|
|
12538
12675
|
path: [],
|
|
12539
12676
|
renderContent: (_, record) => {
|
|
12540
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12541
|
-
|
|
12542
|
-
|
|
12543
|
-
|
|
12544
|
-
|
|
12545
|
-
clusterVip
|
|
12546
|
-
}
|
|
12547
|
-
);
|
|
12677
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceOutClusterAccessComponent, {
|
|
12678
|
+
service: record,
|
|
12679
|
+
breakLine: false,
|
|
12680
|
+
clusterVip
|
|
12681
|
+
});
|
|
12548
12682
|
}
|
|
12549
12683
|
});
|
|
12550
12684
|
const PodSelectorField = () => ({
|
|
@@ -12553,14 +12687,24 @@ const PodSelectorField = () => ({
|
|
|
12553
12687
|
renderContent: (_, resource) => {
|
|
12554
12688
|
const spec = resource._rawYaml.spec;
|
|
12555
12689
|
const selector = spec && ("selector" in spec && spec.selector || "podSelector" in spec && spec.podSelector.matchLabels);
|
|
12556
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(PodSelectorTable, {
|
|
12690
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(PodSelectorTable, {
|
|
12691
|
+
podSelectors: selector || {}
|
|
12692
|
+
});
|
|
12557
12693
|
}
|
|
12558
12694
|
});
|
|
12559
12695
|
const PortsTableField = () => ({
|
|
12560
12696
|
key: "ports",
|
|
12561
12697
|
path: [],
|
|
12562
12698
|
renderContent: (_, service) => {
|
|
12563
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12699
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
12700
|
+
style: {
|
|
12701
|
+
padding: "0 24px",
|
|
12702
|
+
height: "100%"
|
|
12703
|
+
},
|
|
12704
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(PortsTable, {
|
|
12705
|
+
service
|
|
12706
|
+
})
|
|
12707
|
+
});
|
|
12564
12708
|
}
|
|
12565
12709
|
});
|
|
12566
12710
|
const DurationField = (i18n2) => {
|
|
@@ -12570,7 +12714,9 @@ const DurationField = (i18n2) => {
|
|
|
12570
12714
|
path: ["duration"],
|
|
12571
12715
|
title: i18n2.t("dovetail.duration"),
|
|
12572
12716
|
renderContent: (v) => {
|
|
12573
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(DurationTime, {
|
|
12717
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(DurationTime, {
|
|
12718
|
+
value: v
|
|
12719
|
+
});
|
|
12574
12720
|
}
|
|
12575
12721
|
};
|
|
12576
12722
|
};
|
|
@@ -12587,26 +12733,21 @@ const StorageClassPvField = () => {
|
|
|
12587
12733
|
key: "pvs",
|
|
12588
12734
|
path: ["pvs"],
|
|
12589
12735
|
renderContent: (_, sc) => {
|
|
12590
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12591
|
-
|
|
12592
|
-
{
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
return sc.filterPV(pv2, (_a = sc.metadata) == null ? void 0 : _a.name);
|
|
12603
|
-
}
|
|
12604
|
-
}
|
|
12605
|
-
]
|
|
12606
|
-
}
|
|
12736
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceTable, {
|
|
12737
|
+
resource: "persistentvolumes",
|
|
12738
|
+
useTableParams: {
|
|
12739
|
+
filters: {
|
|
12740
|
+
permanent: [{
|
|
12741
|
+
field: "",
|
|
12742
|
+
value: "",
|
|
12743
|
+
fn(pv2) {
|
|
12744
|
+
var _a;
|
|
12745
|
+
return sc.filterPV(pv2, (_a = sc.metadata) == null ? void 0 : _a.name);
|
|
12746
|
+
}
|
|
12747
|
+
}]
|
|
12607
12748
|
}
|
|
12608
12749
|
}
|
|
12609
|
-
);
|
|
12750
|
+
});
|
|
12610
12751
|
}
|
|
12611
12752
|
};
|
|
12612
12753
|
};
|
|
@@ -12617,7 +12758,10 @@ const PVCapacityField = (i18n2) => {
|
|
|
12617
12758
|
path: ["spec", "capacity", "storage"],
|
|
12618
12759
|
title: i18n2.t("dovetail.capacity"),
|
|
12619
12760
|
renderContent(value2) {
|
|
12620
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Units.Byte, {
|
|
12761
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Units.Byte, {
|
|
12762
|
+
rawValue: parseSi(value2),
|
|
12763
|
+
decimals: 2
|
|
12764
|
+
});
|
|
12621
12765
|
}
|
|
12622
12766
|
};
|
|
12623
12767
|
};
|
|
@@ -12628,7 +12772,10 @@ const PVCStorageField = (i18n2) => {
|
|
|
12628
12772
|
path: ["spec", "resources", "requests", "storage"],
|
|
12629
12773
|
title: i18n2.t("dovetail.distributed"),
|
|
12630
12774
|
renderContent(value2, pvc2) {
|
|
12631
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(PVCDistributeStorage, {
|
|
12775
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(PVCDistributeStorage, {
|
|
12776
|
+
pvc: pvc2,
|
|
12777
|
+
editable: true
|
|
12778
|
+
});
|
|
12632
12779
|
}
|
|
12633
12780
|
};
|
|
12634
12781
|
};
|
|
@@ -12639,14 +12786,11 @@ const PVRefField = (i18n2) => {
|
|
|
12639
12786
|
path: ["pv"],
|
|
12640
12787
|
title: i18n2.t("dovetail.pv"),
|
|
12641
12788
|
renderContent(value2) {
|
|
12642
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
name: value2
|
|
12648
|
-
}
|
|
12649
|
-
);
|
|
12789
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
|
|
12790
|
+
resourceName: "persistentvolumes",
|
|
12791
|
+
namespace: "",
|
|
12792
|
+
name: value2
|
|
12793
|
+
});
|
|
12650
12794
|
}
|
|
12651
12795
|
};
|
|
12652
12796
|
};
|
|
@@ -12657,7 +12801,11 @@ const PVStorageClassField = (i18n2) => {
|
|
|
12657
12801
|
path: ["spec", "storageClassName"],
|
|
12658
12802
|
title: i18n2.t("dovetail.storage_class"),
|
|
12659
12803
|
renderContent(value2) {
|
|
12660
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
|
|
12804
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
|
|
12805
|
+
resourceName: "storageclasses",
|
|
12806
|
+
namespace: "",
|
|
12807
|
+
name: value2
|
|
12808
|
+
});
|
|
12661
12809
|
}
|
|
12662
12810
|
};
|
|
12663
12811
|
};
|
|
@@ -12668,7 +12816,10 @@ const PVPhaseField = (i18n2) => {
|
|
|
12668
12816
|
path: ["stateDisplay"],
|
|
12669
12817
|
title: i18n2.t("dovetail.state"),
|
|
12670
12818
|
renderContent(value2) {
|
|
12671
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
|
|
12819
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
|
|
12820
|
+
state: value2,
|
|
12821
|
+
hideBackground: true
|
|
12822
|
+
});
|
|
12672
12823
|
}
|
|
12673
12824
|
};
|
|
12674
12825
|
};
|
|
@@ -12679,7 +12830,9 @@ const PVVolumeModeField = (i18n2) => {
|
|
|
12679
12830
|
path: ["spec", "volumeMode"],
|
|
12680
12831
|
title: i18n2.t("dovetail.volume_mode"),
|
|
12681
12832
|
renderContent(value2) {
|
|
12682
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(PVVolumeModeDisplay, {
|
|
12833
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(PVVolumeModeDisplay, {
|
|
12834
|
+
value: value2
|
|
12835
|
+
});
|
|
12683
12836
|
}
|
|
12684
12837
|
};
|
|
12685
12838
|
};
|
|
@@ -12700,22 +12853,17 @@ const PVCPodsField = () => {
|
|
|
12700
12853
|
path: [],
|
|
12701
12854
|
renderContent: (_, record) => {
|
|
12702
12855
|
var _a;
|
|
12703
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12704
|
-
|
|
12705
|
-
|
|
12706
|
-
|
|
12707
|
-
var
|
|
12708
|
-
return
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
},
|
|
12715
|
-
namespace: (_a = record.metadata) == null ? void 0 : _a.namespace,
|
|
12716
|
-
hideToolbar: true
|
|
12717
|
-
}
|
|
12718
|
-
);
|
|
12856
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadPodsTable, {
|
|
12857
|
+
filter: (item) => {
|
|
12858
|
+
var _a2, _b;
|
|
12859
|
+
return !!((_b = (_a2 = item.spec) == null ? void 0 : _a2.volumes) == null ? void 0 : _b.some((v) => {
|
|
12860
|
+
var _a3, _b2;
|
|
12861
|
+
return ((_a3 = v.persistentVolumeClaim) == null ? void 0 : _a3.claimName) === ((_b2 = record.metadata) == null ? void 0 : _b2.name);
|
|
12862
|
+
}));
|
|
12863
|
+
},
|
|
12864
|
+
namespace: (_a = record.metadata) == null ? void 0 : _a.namespace,
|
|
12865
|
+
hideToolbar: true
|
|
12866
|
+
});
|
|
12719
12867
|
}
|
|
12720
12868
|
};
|
|
12721
12869
|
};
|
|
@@ -12726,15 +12874,14 @@ const PVCRefField = (i18n2) => {
|
|
|
12726
12874
|
path: ["pvc"],
|
|
12727
12875
|
title: i18n2.t("dovetail.pvc"),
|
|
12728
12876
|
renderContent(value2, pv2) {
|
|
12729
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
query: { uid: pv2.pvcUid }
|
|
12877
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
|
|
12878
|
+
resourceName: "persistentvolumeclaims",
|
|
12879
|
+
namespace: pv2.pvcNamespace || "default",
|
|
12880
|
+
name: value2,
|
|
12881
|
+
query: {
|
|
12882
|
+
uid: pv2.pvcUid
|
|
12736
12883
|
}
|
|
12737
|
-
);
|
|
12884
|
+
});
|
|
12738
12885
|
}
|
|
12739
12886
|
};
|
|
12740
12887
|
};
|
|
@@ -12788,7 +12935,10 @@ const ResourceTableField = (resource, useTableParams) => {
|
|
|
12788
12935
|
key: resource,
|
|
12789
12936
|
path: [],
|
|
12790
12937
|
renderContent() {
|
|
12791
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceTable, {
|
|
12938
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceTable, {
|
|
12939
|
+
resource,
|
|
12940
|
+
useTableParams
|
|
12941
|
+
});
|
|
12792
12942
|
}
|
|
12793
12943
|
};
|
|
12794
12944
|
};
|
|
@@ -12797,9 +12947,17 @@ const PodCountOfJobField = (i18n2) => {
|
|
|
12797
12947
|
key: "podCount",
|
|
12798
12948
|
path: [],
|
|
12799
12949
|
col: 12,
|
|
12800
|
-
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, {
|
|
12950
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, {
|
|
12951
|
+
title: i18n2.t("dovetail.job_pod_count_tooltip"),
|
|
12952
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
12953
|
+
className: DashedTitleStyle,
|
|
12954
|
+
children: i18n2.t("dovetail.pod_num")
|
|
12955
|
+
})
|
|
12956
|
+
}),
|
|
12801
12957
|
renderContent: (_, record) => {
|
|
12802
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
12958
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
12959
|
+
children: record.podCountDisplay
|
|
12960
|
+
});
|
|
12803
12961
|
}
|
|
12804
12962
|
};
|
|
12805
12963
|
};
|
|
@@ -12824,8 +12982,11 @@ const LabelsAndAnnotationsShow = ({
|
|
|
12824
12982
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
12825
12983
|
className: SmallSectionTitleStyle,
|
|
12826
12984
|
children: sksI18n.t("dovetail.label")
|
|
12827
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Tags, {
|
|
12985
|
+
}), Object.keys(labels || {}).length ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tags, {
|
|
12828
12986
|
value: labels
|
|
12987
|
+
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
|
|
12988
|
+
errorText: sksI18n.t("dovetail.empty"),
|
|
12989
|
+
type: ErrorContentType.Card
|
|
12829
12990
|
})]
|
|
12830
12991
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
12831
12992
|
className: ItemWrapperStyle,
|
|
@@ -12833,7 +12994,8 @@ const LabelsAndAnnotationsShow = ({
|
|
|
12833
12994
|
className: SmallSectionTitleStyle,
|
|
12834
12995
|
children: sksI18n.t("dovetail.annotation")
|
|
12835
12996
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, {
|
|
12836
|
-
data: annotations
|
|
12997
|
+
data: annotations,
|
|
12998
|
+
errorContent: ErrorContentType.Card
|
|
12837
12999
|
})]
|
|
12838
13000
|
})]
|
|
12839
13001
|
});
|
|
@@ -13139,6 +13301,58 @@ const PodLogTab = (i18n2, apiUrl) => ({
|
|
|
13139
13301
|
}
|
|
13140
13302
|
]
|
|
13141
13303
|
});
|
|
13304
|
+
const PortsTab = ({
|
|
13305
|
+
i18n: i18n2
|
|
13306
|
+
}) => ({
|
|
13307
|
+
title: i18n2.t("dovetail.port"),
|
|
13308
|
+
key: "ports",
|
|
13309
|
+
background: "white",
|
|
13310
|
+
groups: [
|
|
13311
|
+
{
|
|
13312
|
+
areas: [
|
|
13313
|
+
{
|
|
13314
|
+
fields: [PortsTableField()]
|
|
13315
|
+
}
|
|
13316
|
+
]
|
|
13317
|
+
}
|
|
13318
|
+
]
|
|
13319
|
+
});
|
|
13320
|
+
const IngressRulesTab = ({
|
|
13321
|
+
i18n: i18n2
|
|
13322
|
+
}) => ({
|
|
13323
|
+
title: i18n2.t("dovetail.rule"),
|
|
13324
|
+
key: "ingress-rules",
|
|
13325
|
+
background: "white",
|
|
13326
|
+
groups: [
|
|
13327
|
+
{
|
|
13328
|
+
areas: [{ fields: [IngressRulesTableTabField()] }]
|
|
13329
|
+
}
|
|
13330
|
+
]
|
|
13331
|
+
});
|
|
13332
|
+
const DataTab = ({
|
|
13333
|
+
i18n: i18n2
|
|
13334
|
+
}) => ({
|
|
13335
|
+
title: i18n2.t("dovetail.data"),
|
|
13336
|
+
key: "data",
|
|
13337
|
+
background: "white",
|
|
13338
|
+
groups: [
|
|
13339
|
+
{
|
|
13340
|
+
areas: [{ fields: [DataField(i18n2)] }]
|
|
13341
|
+
}
|
|
13342
|
+
]
|
|
13343
|
+
});
|
|
13344
|
+
const SecretDataTab = ({
|
|
13345
|
+
i18n: i18n2
|
|
13346
|
+
}) => ({
|
|
13347
|
+
title: i18n2.t("dovetail.data"),
|
|
13348
|
+
key: "secret-data",
|
|
13349
|
+
background: "white",
|
|
13350
|
+
groups: [
|
|
13351
|
+
{
|
|
13352
|
+
areas: [{ fields: [SecretDataField()] }]
|
|
13353
|
+
}
|
|
13354
|
+
]
|
|
13355
|
+
});
|
|
13142
13356
|
const NetworkPolicyRulesViewer_r6jity = "";
|
|
13143
13357
|
const MonacoYamlEditor$3 = lazy(() => Promise.resolve().then(() => MonacoYamlEditor$1));
|
|
13144
13358
|
const EditorStyle$1 = "e1cjl2b8";
|
|
@@ -13369,13 +13583,6 @@ const NodeTaintsGroup = (i18n2) => ({
|
|
|
13369
13583
|
}
|
|
13370
13584
|
]
|
|
13371
13585
|
});
|
|
13372
|
-
const SecretDataGroup = () => ({
|
|
13373
|
-
areas: [
|
|
13374
|
-
{
|
|
13375
|
-
fields: [SecretDataField()]
|
|
13376
|
-
}
|
|
13377
|
-
]
|
|
13378
|
-
});
|
|
13379
13586
|
const JobsGroup = () => ({
|
|
13380
13587
|
title: "Job",
|
|
13381
13588
|
areas: [
|
|
@@ -13384,14 +13591,6 @@ const JobsGroup = () => ({
|
|
|
13384
13591
|
}
|
|
13385
13592
|
]
|
|
13386
13593
|
});
|
|
13387
|
-
const IngressRulesGroup = (i18n2) => ({
|
|
13388
|
-
title: i18n2.t("dovetail.rule"),
|
|
13389
|
-
areas: [
|
|
13390
|
-
{
|
|
13391
|
-
fields: [IngressRulesTableTabField()]
|
|
13392
|
-
}
|
|
13393
|
-
]
|
|
13394
|
-
});
|
|
13395
13594
|
const PodSelectorGroup = (i18n2) => ({
|
|
13396
13595
|
title: i18n2.t("dovetail.pod_selector"),
|
|
13397
13596
|
areas: [
|
|
@@ -13408,14 +13607,6 @@ const PortsGroup = (i18n2) => ({
|
|
|
13408
13607
|
}
|
|
13409
13608
|
]
|
|
13410
13609
|
});
|
|
13411
|
-
const DataGroup = (i18n2) => ({
|
|
13412
|
-
title: i18n2.t("dovetail.data"),
|
|
13413
|
-
areas: [
|
|
13414
|
-
{
|
|
13415
|
-
fields: [DataField(i18n2)]
|
|
13416
|
-
}
|
|
13417
|
-
]
|
|
13418
|
-
});
|
|
13419
13610
|
const NetworkPolicyIngressRulesGroup = (i18n2) => ({
|
|
13420
13611
|
title: i18n2.t("dovetail.ingress_rule"),
|
|
13421
13612
|
areas: [
|
|
@@ -13574,7 +13765,8 @@ const ShowContentView = (props) => {
|
|
|
13574
13765
|
if (!record)
|
|
13575
13766
|
return null;
|
|
13576
13767
|
return fields.map((field) => {
|
|
13577
|
-
|
|
13768
|
+
const shouldHide = typeof field.hidden === "function" ? field.hidden(record) : field.hidden;
|
|
13769
|
+
if (shouldHide)
|
|
13578
13770
|
return null;
|
|
13579
13771
|
let content;
|
|
13580
13772
|
const value2 = get$2(record, field.path);
|
|
@@ -14231,30 +14423,6 @@ const NamespacesFilter = ({
|
|
|
14231
14423
|
})
|
|
14232
14424
|
});
|
|
14233
14425
|
};
|
|
14234
|
-
function useNamespaceRefineFilter() {
|
|
14235
|
-
const { value: nsFilters = [] } = useNamespacesFilter();
|
|
14236
|
-
const filters = useMemo(() => {
|
|
14237
|
-
const filters2 = nsFilters.filter((filter) => filter !== ALL_NS);
|
|
14238
|
-
if (filters2.length === 0) {
|
|
14239
|
-
return {
|
|
14240
|
-
permanent: []
|
|
14241
|
-
};
|
|
14242
|
-
}
|
|
14243
|
-
return {
|
|
14244
|
-
permanent: [
|
|
14245
|
-
{
|
|
14246
|
-
operator: "or",
|
|
14247
|
-
value: filters2.map((filter) => ({
|
|
14248
|
-
field: "metadata.namespace",
|
|
14249
|
-
operator: "eq",
|
|
14250
|
-
value: filter
|
|
14251
|
-
}))
|
|
14252
|
-
}
|
|
14253
|
-
]
|
|
14254
|
-
};
|
|
14255
|
-
}, [nsFilters]);
|
|
14256
|
-
return filters;
|
|
14257
|
-
}
|
|
14258
14426
|
const index_1l2xllo = "";
|
|
14259
14427
|
const ListPageStyle = "laykzsq";
|
|
14260
14428
|
const ListContentStyle = "l1ng0psc";
|
|
@@ -14277,7 +14445,7 @@ function ListPage(props) {
|
|
|
14277
14445
|
children: [!config.hideListToolBar ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
14278
14446
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
|
|
14279
14447
|
selectedKeys,
|
|
14280
|
-
title: config == null ? void 0 : config.displayName,
|
|
14448
|
+
title: (config == null ? void 0 : config.customListTitle) || (config == null ? void 0 : config.displayName) || config.kind,
|
|
14281
14449
|
description: config == null ? void 0 : config.description,
|
|
14282
14450
|
hideCreate: config == null ? void 0 : config.hideCreate
|
|
14283
14451
|
}), belowToolBarContent, /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {
|
|
@@ -14314,7 +14482,7 @@ function ResourceList(props) {
|
|
|
14314
14482
|
const { formatter, columns, Dropdown: Dropdown2, noShow } = props.config;
|
|
14315
14483
|
const { i18n: i18n2 } = useTranslation();
|
|
14316
14484
|
const nameRenderer = noShow ? PlainTextNameColumnRenderer(i18n2) : NameColumnRenderer(i18n2);
|
|
14317
|
-
const filters =
|
|
14485
|
+
const filters = useRefineFilters();
|
|
14318
14486
|
const { tableProps, selectedKeys } = useEagleTable({
|
|
14319
14487
|
useTableParams: {
|
|
14320
14488
|
filters
|
|
@@ -14560,10 +14728,9 @@ const MemoizedFormField = memo(function FormField({
|
|
|
14560
14728
|
control,
|
|
14561
14729
|
name: fieldConfig.path.join("."),
|
|
14562
14730
|
rules: {
|
|
14563
|
-
async validate(value2) {
|
|
14731
|
+
async validate(value2, formValue) {
|
|
14564
14732
|
if (fieldConfig.disabledWhenEdit && action === "edit")
|
|
14565
14733
|
return true;
|
|
14566
|
-
const formValue = watchedFormValues || getValues();
|
|
14567
14734
|
if (!fieldConfig.validators || fieldConfig.validators.length === 0)
|
|
14568
14735
|
return true;
|
|
14569
14736
|
for (const func of fieldConfig.validators) {
|
|
@@ -14575,7 +14742,7 @@ const MemoizedFormField = memo(function FormField({
|
|
|
14575
14742
|
}
|
|
14576
14743
|
},
|
|
14577
14744
|
render: ({ field, fieldState }) => {
|
|
14578
|
-
var _a;
|
|
14745
|
+
var _a, _b;
|
|
14579
14746
|
const currentFormValue = watchedFormValues || getValues();
|
|
14580
14747
|
const renderProps = {
|
|
14581
14748
|
field,
|
|
@@ -14598,7 +14765,7 @@ const MemoizedFormField = memo(function FormField({
|
|
|
14598
14765
|
colon: false,
|
|
14599
14766
|
labelCol: fieldConfig.layout === FormItemLayout.VERTICAL ? {} : { flex: `0 0 ${(formConfig == null ? void 0 : formConfig.labelWidth) || "216px"}` },
|
|
14600
14767
|
help: fieldConfig.isHideErrorStatus ? "" : (_a = fieldState.error) == null ? void 0 : _a.message,
|
|
14601
|
-
extra: fieldConfig.helperText,
|
|
14768
|
+
extra: ((_b = fieldState.error) == null ? void 0 : _b.message) === fieldConfig.helperText ? "" : fieldConfig.helperText,
|
|
14602
14769
|
validateStatus: fieldState.invalid && !fieldConfig.isHideErrorStatus ? "error" : void 0,
|
|
14603
14770
|
"data-test-id": fieldConfig.key,
|
|
14604
14771
|
className: fieldConfig.layout === FormItemLayout.VERTICAL ? VerticalFormItemStyle : "",
|
|
@@ -17363,7 +17530,8 @@ function ResourceSelect(props) {
|
|
|
17363
17530
|
namespace: namespace2,
|
|
17364
17531
|
selectProps,
|
|
17365
17532
|
value: value2,
|
|
17366
|
-
onChange
|
|
17533
|
+
onChange,
|
|
17534
|
+
placeholder
|
|
17367
17535
|
} = props;
|
|
17368
17536
|
const { data: data2, isLoading, isError } = useList({
|
|
17369
17537
|
resource,
|
|
@@ -17379,6 +17547,7 @@ function ResourceSelect(props) {
|
|
|
17379
17547
|
Select,
|
|
17380
17548
|
{
|
|
17381
17549
|
className,
|
|
17550
|
+
placeholder,
|
|
17382
17551
|
input: {
|
|
17383
17552
|
value: value2,
|
|
17384
17553
|
onChange
|
|
@@ -17390,7 +17559,7 @@ function ResourceSelect(props) {
|
|
|
17390
17559
|
}
|
|
17391
17560
|
);
|
|
17392
17561
|
}
|
|
17393
|
-
const
|
|
17562
|
+
const SelectMatchLabelButton_1uc76rw = "";
|
|
17394
17563
|
const PopoverOverlayStyle = "p19yct45";
|
|
17395
17564
|
const PopoverContentStyle = "p2255z4";
|
|
17396
17565
|
const PopoverTitleStyle = "p16qejqa";
|
|
@@ -17406,12 +17575,16 @@ function ResourceMatchLabelSelector({
|
|
|
17406
17575
|
value: value2,
|
|
17407
17576
|
onChange
|
|
17408
17577
|
}) {
|
|
17578
|
+
const {
|
|
17579
|
+
t: t2
|
|
17580
|
+
} = useTranslation();
|
|
17409
17581
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceSelect, {
|
|
17410
17582
|
namespace: namespace2,
|
|
17411
17583
|
resource,
|
|
17412
17584
|
resourceBasePath,
|
|
17413
17585
|
kind,
|
|
17414
17586
|
value: value2,
|
|
17587
|
+
placeholder: t2("dovetail.select_workload"),
|
|
17415
17588
|
onChange: (newValue, object2) => {
|
|
17416
17589
|
var _a, _b;
|
|
17417
17590
|
const resourceItem = object2.object;
|
|
@@ -17459,7 +17632,7 @@ function SelectMatchLabelButton(props) {
|
|
|
17459
17632
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
17460
17633
|
className: PopoverContentBodyStyle,
|
|
17461
17634
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
17462
|
-
className: cx_default(Typo.
|
|
17635
|
+
className: cx_default(Typo.Heading.h2_bold_title, PopoverTitleStyle),
|
|
17463
17636
|
children: t2("dovetail.specify_workload")
|
|
17464
17637
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
17465
17638
|
className: FormWrapperStyle,
|
|
@@ -17516,9 +17689,12 @@ function SelectMatchLabelButton(props) {
|
|
|
17516
17689
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
17517
17690
|
onClick: () => setPopoverVisible(false),
|
|
17518
17691
|
type: "quiet",
|
|
17692
|
+
size: "small",
|
|
17519
17693
|
children: t2("dovetail.cancel")
|
|
17520
17694
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
17521
17695
|
type: "primary",
|
|
17696
|
+
size: "small",
|
|
17697
|
+
disabled: !selectedResource,
|
|
17522
17698
|
onClick: () => {
|
|
17523
17699
|
onChange == null ? void 0 : onChange(selector);
|
|
17524
17700
|
setPopoverVisible(false);
|
|
@@ -17576,8 +17752,7 @@ const MatchLabelSelector = React.forwardRef(function MatchLabelSelector2(props,
|
|
|
17576
17752
|
onChange,
|
|
17577
17753
|
isValueOptional: false,
|
|
17578
17754
|
minSize: 1,
|
|
17579
|
-
disabledChagneDefaultValues
|
|
17580
|
-
isHideLabelFormatPopover: true
|
|
17755
|
+
disabledChagneDefaultValues
|
|
17581
17756
|
}
|
|
17582
17757
|
);
|
|
17583
17758
|
});
|
|
@@ -18414,7 +18589,7 @@ const PortsConfigForm = React.forwardRef(function PortsConfigForm2({ value: valu
|
|
|
18414
18589
|
},
|
|
18415
18590
|
{
|
|
18416
18591
|
key: "name",
|
|
18417
|
-
title:
|
|
18592
|
+
title: i18n2.t("dovetail.port_name"),
|
|
18418
18593
|
type: "input",
|
|
18419
18594
|
validator: ({ value: portName, rowIndex }) => {
|
|
18420
18595
|
const { errorMessage } = validateRfc1123Name({
|
|
@@ -19334,6 +19509,78 @@ const SCAllowExpandColumnRenderer = (i18n2) => {
|
|
|
19334
19509
|
}
|
|
19335
19510
|
};
|
|
19336
19511
|
};
|
|
19512
|
+
function useNamespaceRefineFilter() {
|
|
19513
|
+
const { value: nsFilters = [] } = useNamespacesFilter();
|
|
19514
|
+
const filters = useMemo(() => {
|
|
19515
|
+
const filters2 = nsFilters.filter((filter) => filter !== ALL_NS);
|
|
19516
|
+
if (filters2.length === 0) {
|
|
19517
|
+
return {
|
|
19518
|
+
permanent: []
|
|
19519
|
+
};
|
|
19520
|
+
}
|
|
19521
|
+
return {
|
|
19522
|
+
permanent: [
|
|
19523
|
+
{
|
|
19524
|
+
operator: "or",
|
|
19525
|
+
value: filters2.map((filter) => ({
|
|
19526
|
+
field: "metadata.namespace",
|
|
19527
|
+
operator: "eq",
|
|
19528
|
+
value: filter
|
|
19529
|
+
}))
|
|
19530
|
+
}
|
|
19531
|
+
]
|
|
19532
|
+
};
|
|
19533
|
+
}, [nsFilters]);
|
|
19534
|
+
return filters;
|
|
19535
|
+
}
|
|
19536
|
+
const NAME_KEYWORD_PARAM = "name_keyword";
|
|
19537
|
+
function useRefineFilters(options = {}) {
|
|
19538
|
+
const {
|
|
19539
|
+
disableNamespaceFilter = false,
|
|
19540
|
+
disableNameKeywordFilter = false
|
|
19541
|
+
} = options;
|
|
19542
|
+
const { value: nsFilters = [] } = useNamespacesFilter();
|
|
19543
|
+
const namespaceFilters = useMemo(() => {
|
|
19544
|
+
if (disableNamespaceFilter) {
|
|
19545
|
+
return [];
|
|
19546
|
+
}
|
|
19547
|
+
const filters2 = nsFilters.filter((filter) => filter !== ALL_NS);
|
|
19548
|
+
if (filters2.length === 0) {
|
|
19549
|
+
return [];
|
|
19550
|
+
}
|
|
19551
|
+
return [
|
|
19552
|
+
{
|
|
19553
|
+
operator: "or",
|
|
19554
|
+
value: filters2.map((filter) => ({
|
|
19555
|
+
field: "metadata.namespace",
|
|
19556
|
+
operator: "eq",
|
|
19557
|
+
value: filter
|
|
19558
|
+
}))
|
|
19559
|
+
}
|
|
19560
|
+
];
|
|
19561
|
+
}, [nsFilters, disableNamespaceFilter]);
|
|
19562
|
+
const { params } = useParsed();
|
|
19563
|
+
const nameKeyword = params == null ? void 0 : params[NAME_KEYWORD_PARAM];
|
|
19564
|
+
const nameKeywordFilters = useMemo(() => {
|
|
19565
|
+
if (disableNameKeywordFilter || !nameKeyword || nameKeyword.trim() === "") {
|
|
19566
|
+
return [];
|
|
19567
|
+
}
|
|
19568
|
+
return [
|
|
19569
|
+
{
|
|
19570
|
+
field: "metadata.name",
|
|
19571
|
+
operator: "contains",
|
|
19572
|
+
value: nameKeyword.trim()
|
|
19573
|
+
}
|
|
19574
|
+
];
|
|
19575
|
+
}, [nameKeyword, disableNameKeywordFilter]);
|
|
19576
|
+
const filters = useMemo(
|
|
19577
|
+
() => ({
|
|
19578
|
+
permanent: [...namespaceFilters, ...nameKeywordFilters]
|
|
19579
|
+
}),
|
|
19580
|
+
[namespaceFilters, nameKeywordFilters]
|
|
19581
|
+
);
|
|
19582
|
+
return filters;
|
|
19583
|
+
}
|
|
19337
19584
|
const styles = "";
|
|
19338
19585
|
const Dovetail = (props) => {
|
|
19339
19586
|
const {
|
|
@@ -19601,8 +19848,8 @@ export {
|
|
|
19601
19848
|
DEPLOYMENT_INIT_VALUE,
|
|
19602
19849
|
DaemonSetModel,
|
|
19603
19850
|
DataField,
|
|
19604
|
-
DataGroup,
|
|
19605
19851
|
DataKeysColumnRenderer,
|
|
19852
|
+
DataTab,
|
|
19606
19853
|
DeleteButton,
|
|
19607
19854
|
DeleteManyButton,
|
|
19608
19855
|
DeploymentModel,
|
|
@@ -19639,7 +19886,7 @@ export {
|
|
|
19639
19886
|
IngressDefaultBackendColumnRenderer,
|
|
19640
19887
|
IngressModel,
|
|
19641
19888
|
IngressRulesColumnRenderer,
|
|
19642
|
-
|
|
19889
|
+
IngressRulesTab,
|
|
19643
19890
|
IngressRulesTableTabField,
|
|
19644
19891
|
IngressTlsColumnRenderer,
|
|
19645
19892
|
IsDefaultSCColumnRenderer,
|
|
@@ -19666,6 +19913,7 @@ export {
|
|
|
19666
19913
|
ModelPlugin,
|
|
19667
19914
|
MonacoYamlDiffEditor,
|
|
19668
19915
|
MonacoYamlEditor,
|
|
19916
|
+
NAME_KEYWORD_PARAM,
|
|
19669
19917
|
NETWORK_POLICY_INIT_VALUE,
|
|
19670
19918
|
NODE_INIT_VALUE,
|
|
19671
19919
|
NS_STORE_KEY,
|
|
@@ -19735,6 +19983,7 @@ export {
|
|
|
19735
19983
|
PortMappingColumnRenderer,
|
|
19736
19984
|
PortsConfigForm,
|
|
19737
19985
|
PortsGroup,
|
|
19986
|
+
PortsTab,
|
|
19738
19987
|
PortsTableField,
|
|
19739
19988
|
ProviderPlugins,
|
|
19740
19989
|
ProvisionerColumnRenderer,
|
|
@@ -19780,7 +20029,7 @@ export {
|
|
|
19780
20029
|
STORAGE_CLASS_INIT_VALUE,
|
|
19781
20030
|
SchemaStrategy,
|
|
19782
20031
|
SecretDataField,
|
|
19783
|
-
|
|
20032
|
+
SecretDataTab,
|
|
19784
20033
|
SectionTitle,
|
|
19785
20034
|
Separator,
|
|
19786
20035
|
ServiceInClusterAccessColumnRenderer,
|
|
@@ -19832,6 +20081,7 @@ export {
|
|
|
19832
20081
|
generateValueFromSchema,
|
|
19833
20082
|
getApiVersion,
|
|
19834
20083
|
getResourceNameByKind,
|
|
20084
|
+
isFirstLetterEnglish,
|
|
19835
20085
|
matchSelector,
|
|
19836
20086
|
modelPlugin,
|
|
19837
20087
|
namespaceRules,
|
|
@@ -19842,6 +20092,8 @@ export {
|
|
|
19842
20092
|
rfc1035LabelRules,
|
|
19843
20093
|
rfc1123LabelRules,
|
|
19844
20094
|
routerProvider,
|
|
20095
|
+
shortenedImage,
|
|
20096
|
+
transformResourceKindInSentence,
|
|
19845
20097
|
useApiGroupSchema,
|
|
19846
20098
|
useDeleteModal,
|
|
19847
20099
|
useDeleteModalOnly,
|
|
@@ -19853,6 +20105,7 @@ export {
|
|
|
19853
20105
|
useNamespaceRefineFilter,
|
|
19854
20106
|
useNamespacesFilter,
|
|
19855
20107
|
useOpenForm,
|
|
20108
|
+
useRefineFilters,
|
|
19856
20109
|
useRefineForm,
|
|
19857
20110
|
useSchema,
|
|
19858
20111
|
validateDataKey,
|