@dovetail-v2/refine 0.4.3 → 0.4.5
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/{PodShell-43c7028e.cjs → PodShell-a335b2b2.cjs} +4 -2
- package/dist/{PodShell-76331418.js → PodShell-a6ed3498.js} +4 -2
- package/dist/components/CopyButton/index.d.ts +7 -0
- package/dist/components/ErrorContent/index.d.ts +3 -4
- package/dist/components/FormWidgets/NameInputWidget.d.ts +0 -48
- package/dist/components/IngressRulesComponent/PathWithCopy.d.ts +7 -0
- package/dist/components/ServiceComponents/index.d.ts +10 -0
- package/dist/components/Shell/ShellToolbar.d.ts +1 -1
- package/dist/components/ShowContent/fields.d.ts +4 -0
- package/dist/components/Table/index.d.ts +2 -2
- package/dist/components/index.d.ts +1 -3
- package/dist/contexts/component.d.ts +14 -5
- package/dist/contexts/index.d.ts +1 -0
- package/dist/hooks/useDeleteModal/index.d.ts +1 -0
- package/dist/hooks/useEagleTable/columns.d.ts +5 -4
- package/dist/hooks/useSubmitForm.d.ts +1 -1
- package/dist/hooks/useTableData.d.ts +1 -1
- package/dist/i18n.d.ts +25 -0
- package/dist/{index-31874f77.cjs → index-053ee180.cjs} +1 -1
- package/dist/{index-ab97826a.js → index-d7bc2ee6.js} +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/locales/en-US/index.d.ts +12 -0
- package/dist/locales/zh-CN/index.d.ts +13 -0
- package/dist/models/daemonset-model.d.ts +0 -3
- package/dist/models/statefulset-model.d.ts +0 -3
- package/dist/models/workload-base-model.d.ts +3 -0
- package/dist/models/workload-model.d.ts +3 -0
- package/dist/pages/deployments/form/index.d.ts +2 -1
- package/dist/plugins/model-plugin.d.ts +1 -1
- package/dist/refine.cjs +1175 -1031
- package/dist/refine.js +1178 -1034
- package/dist/shell.cjs +1 -1
- package/dist/shell.js +1 -1
- package/dist/style.css +148 -4
- package/dist/types/resource.d.ts +9 -9
- package/package.json +17 -6
package/dist/refine.js
CHANGED
|
@@ -7,17 +7,18 @@ var __publicField = (obj, key2, value2) => {
|
|
|
7
7
|
import dayjs from "dayjs";
|
|
8
8
|
import i18n from "i18next";
|
|
9
9
|
import { w as warnOnce, g as getDefaults, a as warn, b as getI18n, s as setDefaults, d as setI18n, I as I18nContext, j as jsxRuntimeExports, u as useTranslation, c as cx_default, S as SocketStatus } from "./common-241b21f8.js";
|
|
10
|
-
import { ResourceContext, matchResourceFromRoute, useResource, useDelete, useNavigation, useBreadcrumb, useList, CanAccess, useUpdate, useForm as useForm$2, pickNotDeprecated, useWarnAboutChange, useParsed, useGo, useCan, useTable,
|
|
10
|
+
import { ResourceContext, matchResourceFromRoute, useResource, useDeleteMany, useDelete, useNavigation, useBreadcrumb, useList, CanAccess, useUpdate, useForm as useForm$2, pickNotDeprecated, useWarnAboutChange, useParsed, useGo, useCan, useTable, useShow, useRefineContext, useTranslate, flattenObjectKeys, useMenu, Refine } from "@refinedev/core";
|
|
11
11
|
import { parse, stringify } from "qs";
|
|
12
12
|
import React, { createElement, isValidElement, cloneElement, Children, useContext, useCallback, createContext, useState, useEffect, useMemo, useRef, useImperativeHandle, forwardRef, Suspense, lazy, memo } 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, OverflowTooltip, Typo, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$2, Pagination, Alert, ImmersiveDialog, SmallDialog, Fields, Units, Link as Link$1,
|
|
15
|
-
import {
|
|
14
|
+
import { usePushModal, usePopModal, DeleteDialog, Tag, RejectDialog, RejectDialogType, OverflowTooltip, Typo, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$2, Pagination, Alert, ImmersiveDialog, SmallDialog, Fields, Units, Tooltip, Icon, Link as Link$1, Divider, Dropdown, Menu as Menu$1, LegacyModal, StatusCapsule, Popover, AntdTable, Upload, TableForm, ValidateTriggerType, 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
|
+
import { ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, Retry16GradientGrayIcon, Retry16GradientBlueIcon, EditPen16GradientGrayIcon, EditPen16GradientBlueIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, InfoICircleFill16GrayIcon, InfoICircleFill16Gray70Icon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, OpenTerminal16GradientBlueIcon, ArrowChevronLeft16BoldBlueIcon, ExclamationErrorCircleFill16RedIcon, ArrowChevronDown16BlueIcon, ArrowChevronUp16BlueIcon, Pause16GradientBlueIcon, EditPen16BlueIcon } from "@cloudtower/icons-react";
|
|
16
16
|
import { first, get as get$2, cloneDeep, set, setWith, clone, debounce, isEqual as isEqual$1, omit as omit$1, isObject as isObject$4, uniq, merge, last, keyBy } from "lodash-es";
|
|
17
17
|
import yaml$2 from "js-yaml";
|
|
18
18
|
import { useForm as useForm$1 } from "sunflower-antd";
|
|
19
19
|
import { useLocalStorage } from "usehooks-ts";
|
|
20
20
|
import { paginateData, sortData, dataProvider, liveProvider } from "k8s-api-provider";
|
|
21
|
+
import copyToClipboard$1 from "copy-to-clipboard";
|
|
21
22
|
import { LogViewer } from "@patternfly/react-log-viewer";
|
|
22
23
|
import { Controller, useForm as useForm$3 } from "react-hook-form";
|
|
23
24
|
import * as monaco from "monaco-editor";
|
|
@@ -437,6 +438,18 @@ function Trans(_ref) {
|
|
|
437
438
|
...additionalProps
|
|
438
439
|
});
|
|
439
440
|
}
|
|
441
|
+
const add_container$1 = "Add container";
|
|
442
|
+
const container_index$1 = "Container {{index}}";
|
|
443
|
+
const container_name$1 = "Container name";
|
|
444
|
+
const container_image$1 = "Container image";
|
|
445
|
+
const advanced_settings$1 = "Advanced settings";
|
|
446
|
+
const app$1 = {
|
|
447
|
+
add_container: add_container$1,
|
|
448
|
+
container_index: container_index$1,
|
|
449
|
+
container_name: container_name$1,
|
|
450
|
+
container_image: container_image$1,
|
|
451
|
+
advanced_settings: advanced_settings$1
|
|
452
|
+
};
|
|
440
453
|
const copy$1 = "Copy";
|
|
441
454
|
const reset_arguments$1 = "Reset";
|
|
442
455
|
const view_changes$1 = "Show diff";
|
|
@@ -604,7 +617,7 @@ const available_state$1 = "Available";
|
|
|
604
617
|
const bound_state$1 = "Bound";
|
|
605
618
|
const released_state$1 = "Released";
|
|
606
619
|
const failed_state$1 = "Failed";
|
|
607
|
-
const exec_pod = "Execute shell";
|
|
620
|
+
const exec_pod$1 = "Execute shell";
|
|
608
621
|
const search$1 = "Search";
|
|
609
622
|
const edit_label$1 = "Edit label";
|
|
610
623
|
const csi$1 = "CSI driver";
|
|
@@ -717,6 +730,11 @@ const pause_scheduling$1 = "Suspend scheduling";
|
|
|
717
730
|
const port_name$1 = "Port name";
|
|
718
731
|
const target_port_range_limit$1 = "Only integers between 1 and 65535, or strings, are supported.";
|
|
719
732
|
const service_port_name_tip$1 = "When the port count is 1, this field is optional; when it is greater than 1, this field is mandatory.";
|
|
733
|
+
const network_error$1 = "Network error";
|
|
734
|
+
const retry_when_access_data_failed$1 = "Failed to load data. Click to retry.";
|
|
735
|
+
const service$1 = "Service";
|
|
736
|
+
const ingress$1 = "Ingress";
|
|
737
|
+
const fstype$1 = "Filesystem type";
|
|
720
738
|
const dovetail$1 = {
|
|
721
739
|
copy: copy$1,
|
|
722
740
|
reset_arguments: reset_arguments$1,
|
|
@@ -888,7 +906,7 @@ const dovetail$1 = {
|
|
|
888
906
|
bound_state: bound_state$1,
|
|
889
907
|
released_state: released_state$1,
|
|
890
908
|
failed_state: failed_state$1,
|
|
891
|
-
exec_pod,
|
|
909
|
+
exec_pod: exec_pod$1,
|
|
892
910
|
search: search$1,
|
|
893
911
|
edit_label: edit_label$1,
|
|
894
912
|
csi: csi$1,
|
|
@@ -1000,11 +1018,29 @@ const dovetail$1 = {
|
|
|
1000
1018
|
pause_scheduling: pause_scheduling$1,
|
|
1001
1019
|
port_name: port_name$1,
|
|
1002
1020
|
target_port_range_limit: target_port_range_limit$1,
|
|
1003
|
-
service_port_name_tip: service_port_name_tip$1
|
|
1021
|
+
service_port_name_tip: service_port_name_tip$1,
|
|
1022
|
+
network_error: network_error$1,
|
|
1023
|
+
retry_when_access_data_failed: retry_when_access_data_failed$1,
|
|
1024
|
+
service: service$1,
|
|
1025
|
+
ingress: ingress$1,
|
|
1026
|
+
fstype: fstype$1
|
|
1004
1027
|
};
|
|
1005
1028
|
const EN = {
|
|
1029
|
+
app: app$1,
|
|
1006
1030
|
dovetail: dovetail$1
|
|
1007
1031
|
};
|
|
1032
|
+
const add_container = "添加容器";
|
|
1033
|
+
const container_index = "容器 {{index}}";
|
|
1034
|
+
const container_name = "容器名称";
|
|
1035
|
+
const container_image = "容器镜像";
|
|
1036
|
+
const advanced_settings = "高级设置";
|
|
1037
|
+
const app = {
|
|
1038
|
+
add_container,
|
|
1039
|
+
container_index,
|
|
1040
|
+
container_name,
|
|
1041
|
+
container_image,
|
|
1042
|
+
advanced_settings
|
|
1043
|
+
};
|
|
1008
1044
|
const copy = "复制";
|
|
1009
1045
|
const reset_arguments = "重置";
|
|
1010
1046
|
const view_changes = "查看改动";
|
|
@@ -1284,6 +1320,12 @@ const no_labels = "无标签";
|
|
|
1284
1320
|
const no_annotations = "无注解";
|
|
1285
1321
|
const pause_scheduling = "暂停调度";
|
|
1286
1322
|
const service_port_name_tip = "端口数量为 1 时,名称为选填项;大于 1 时,名称为必填项。";
|
|
1323
|
+
const exec_pod = "执行 Shell";
|
|
1324
|
+
const network_error = "网络错误";
|
|
1325
|
+
const retry_when_access_data_failed = "数据加载失败,点击重试。";
|
|
1326
|
+
const service = "服务";
|
|
1327
|
+
const ingress = "Ingress";
|
|
1328
|
+
const fstype = "文件系统类型";
|
|
1287
1329
|
const dovetail = {
|
|
1288
1330
|
copy,
|
|
1289
1331
|
reset_arguments,
|
|
@@ -1566,9 +1608,16 @@ const dovetail = {
|
|
|
1566
1608
|
no_labels,
|
|
1567
1609
|
no_annotations,
|
|
1568
1610
|
pause_scheduling,
|
|
1569
|
-
service_port_name_tip
|
|
1611
|
+
service_port_name_tip,
|
|
1612
|
+
exec_pod,
|
|
1613
|
+
network_error,
|
|
1614
|
+
retry_when_access_data_failed,
|
|
1615
|
+
service,
|
|
1616
|
+
ingress,
|
|
1617
|
+
fstype
|
|
1570
1618
|
};
|
|
1571
1619
|
const ZH = {
|
|
1620
|
+
app,
|
|
1572
1621
|
dovetail
|
|
1573
1622
|
};
|
|
1574
1623
|
const resources = {
|
|
@@ -7300,9 +7349,7 @@ class K8sOpenAPI {
|
|
|
7300
7349
|
return this.schemas;
|
|
7301
7350
|
}
|
|
7302
7351
|
try {
|
|
7303
|
-
const response = await fetch(
|
|
7304
|
-
`${this.pathPrefix}${this.resourceBasePath}`
|
|
7305
|
-
);
|
|
7352
|
+
const response = await fetch(`${this.pathPrefix}${this.resourceBasePath}`);
|
|
7306
7353
|
const result = await response.json();
|
|
7307
7354
|
this.schemas = Object.values(result.components.schemas);
|
|
7308
7355
|
if (this.schemas) {
|
|
@@ -7374,33 +7421,42 @@ function useApiGroupSchema() {
|
|
|
7374
7421
|
loading: false,
|
|
7375
7422
|
error: null
|
|
7376
7423
|
});
|
|
7377
|
-
const fetchSchema = useCallback(
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7424
|
+
const fetchSchema = useCallback(
|
|
7425
|
+
async (apiGroups, schemaUrlPrefix) => {
|
|
7426
|
+
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
7427
|
+
try {
|
|
7428
|
+
const results = await Promise.all(
|
|
7429
|
+
apiGroups.map(async (apiGroup) => {
|
|
7430
|
+
if (state2.schemasMap[apiGroup]) {
|
|
7431
|
+
return { apiGroup, schemas: state2.schemasMap[apiGroup] };
|
|
7432
|
+
}
|
|
7433
|
+
const groupSchemas = await schemaStore.fetchSchemas(
|
|
7434
|
+
apiGroup,
|
|
7435
|
+
schemaUrlPrefix
|
|
7436
|
+
);
|
|
7437
|
+
return { apiGroup, schemas: groupSchemas || [] };
|
|
7438
|
+
})
|
|
7439
|
+
);
|
|
7440
|
+
const newSchemasMap = results.reduce(
|
|
7441
|
+
(acc, { apiGroup, schemas }) => {
|
|
7442
|
+
acc[apiGroup] = schemas;
|
|
7443
|
+
return acc;
|
|
7444
|
+
},
|
|
7445
|
+
{}
|
|
7446
|
+
);
|
|
7447
|
+
const allSchemas = results.flatMap(({ schemas }) => schemas);
|
|
7448
|
+
setState({
|
|
7449
|
+
schemas: allSchemas,
|
|
7450
|
+
schemasMap: newSchemasMap,
|
|
7451
|
+
loading: false,
|
|
7452
|
+
error: null
|
|
7453
|
+
});
|
|
7454
|
+
} catch (e2) {
|
|
7455
|
+
setState((prev) => ({ ...prev, loading: false, error: e2 }));
|
|
7456
|
+
}
|
|
7457
|
+
},
|
|
7458
|
+
[state2.schemasMap]
|
|
7459
|
+
);
|
|
7404
7460
|
return { ...state2, fetchSchema };
|
|
7405
7461
|
}
|
|
7406
7462
|
function useSchema(options) {
|
|
@@ -7416,7 +7472,11 @@ function useSchema(options) {
|
|
|
7416
7472
|
setLoading(true);
|
|
7417
7473
|
setError(null);
|
|
7418
7474
|
try {
|
|
7419
|
-
const schema2 = await schemaStore.fetchSchema(
|
|
7475
|
+
const schema2 = await schemaStore.fetchSchema(
|
|
7476
|
+
(_a2 = resource == null ? void 0 : resource.meta) == null ? void 0 : _a2.resourceBasePath,
|
|
7477
|
+
schemaUrlPrefix,
|
|
7478
|
+
(_b2 = resource == null ? void 0 : resource.meta) == null ? void 0 : _b2.kind
|
|
7479
|
+
);
|
|
7420
7480
|
setSchema(schema2 || null);
|
|
7421
7481
|
setError(null);
|
|
7422
7482
|
} catch (e2) {
|
|
@@ -7437,6 +7497,34 @@ function useSchema(options) {
|
|
|
7437
7497
|
fetchSchema
|
|
7438
7498
|
};
|
|
7439
7499
|
}
|
|
7500
|
+
const useDeleteManyModal = (resource, ids) => {
|
|
7501
|
+
const { mutate } = useDeleteMany();
|
|
7502
|
+
const [visible, setVisible] = useState(false);
|
|
7503
|
+
const { t: t2 } = useTranslation();
|
|
7504
|
+
const modalProps = {
|
|
7505
|
+
title: t2("dovetail.delete"),
|
|
7506
|
+
okText: t2("dovetail.delete"),
|
|
7507
|
+
okButtonProps: {
|
|
7508
|
+
danger: true
|
|
7509
|
+
},
|
|
7510
|
+
cancelText: t2("dovetail.cancel"),
|
|
7511
|
+
children: t2("dovetail.confirm_delete_text", {
|
|
7512
|
+
target: ids,
|
|
7513
|
+
interpolation: { escapeValue: false }
|
|
7514
|
+
}),
|
|
7515
|
+
onOk() {
|
|
7516
|
+
mutate({
|
|
7517
|
+
resource,
|
|
7518
|
+
ids
|
|
7519
|
+
});
|
|
7520
|
+
setVisible(false);
|
|
7521
|
+
},
|
|
7522
|
+
onCancel() {
|
|
7523
|
+
setVisible(false);
|
|
7524
|
+
}
|
|
7525
|
+
};
|
|
7526
|
+
return { modalProps, visible, setVisible };
|
|
7527
|
+
};
|
|
7440
7528
|
const ConfigsContext = createContext({});
|
|
7441
7529
|
function getCommonErrors(responseBody, i18n2) {
|
|
7442
7530
|
var _a;
|
|
@@ -7480,12 +7568,16 @@ function getCommonErrors(responseBody, i18n2) {
|
|
|
7480
7568
|
}
|
|
7481
7569
|
return [
|
|
7482
7570
|
i18n2.t(
|
|
7483
|
-
[
|
|
7571
|
+
[
|
|
7572
|
+
`error.${responseBody.code}`,
|
|
7573
|
+
`error.${responseBody.reason}`,
|
|
7574
|
+
responseBody.message || ""
|
|
7575
|
+
],
|
|
7484
7576
|
{ fallbackLng: "" }
|
|
7485
7577
|
)
|
|
7486
7578
|
];
|
|
7487
7579
|
}
|
|
7488
|
-
const
|
|
7580
|
+
const tag_19ts6m8 = "";
|
|
7489
7581
|
const StateTagStyle = "s82411";
|
|
7490
7582
|
const NameTagStyle = "n9ja9cs";
|
|
7491
7583
|
function shortenedImage(image2) {
|
|
@@ -7885,48 +7977,6 @@ function NameInputWidget(props) {
|
|
|
7885
7977
|
const { action } = useResource();
|
|
7886
7978
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { ...props, disabled: action === "edit" });
|
|
7887
7979
|
}
|
|
7888
|
-
const dnsSubDomainRules = [
|
|
7889
|
-
{
|
|
7890
|
-
required: true,
|
|
7891
|
-
message: "名称不能为空"
|
|
7892
|
-
},
|
|
7893
|
-
{
|
|
7894
|
-
pattern: /^[a-z0-9]([-.a-z0-9]*[a-z0-9])?$/,
|
|
7895
|
-
message: "名称只能包含小写字母、数字,以及 '-' 和 '.',且必须以字母或数字开头和结束"
|
|
7896
|
-
},
|
|
7897
|
-
{
|
|
7898
|
-
max: 253,
|
|
7899
|
-
message: "名称长度不能超过253个字符"
|
|
7900
|
-
}
|
|
7901
|
-
];
|
|
7902
|
-
const rfc1123LabelRules = [
|
|
7903
|
-
{
|
|
7904
|
-
required: true,
|
|
7905
|
-
message: "名称不能为空"
|
|
7906
|
-
},
|
|
7907
|
-
{
|
|
7908
|
-
pattern: /^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/,
|
|
7909
|
-
message: "名称只能包含小写字母、数字,以及 '-',且以字母或数字开头和结束"
|
|
7910
|
-
},
|
|
7911
|
-
{
|
|
7912
|
-
max: 63,
|
|
7913
|
-
message: "名称长度不能超过63个字符"
|
|
7914
|
-
}
|
|
7915
|
-
];
|
|
7916
|
-
const rfc1035LabelRules = [
|
|
7917
|
-
{
|
|
7918
|
-
required: true,
|
|
7919
|
-
message: "名称不能为空"
|
|
7920
|
-
},
|
|
7921
|
-
{
|
|
7922
|
-
pattern: /^[a-z]([-a-z0-9]*[a-z0-9])?$/,
|
|
7923
|
-
message: "名称只能包含小写字母、数字,以及 '-',且以字母开头,字母或数字结束"
|
|
7924
|
-
},
|
|
7925
|
-
{
|
|
7926
|
-
max: 63,
|
|
7927
|
-
message: "名称长度不能超过63个字符"
|
|
7928
|
-
}
|
|
7929
|
-
];
|
|
7930
7980
|
function NamespaceSelectWidget(props) {
|
|
7931
7981
|
const { action } = useResource();
|
|
7932
7982
|
const { data: data2 } = useList({
|
|
@@ -7988,10 +8038,13 @@ function KeyValueListWidget(props) {
|
|
|
7988
8038
|
const onChange = useCallback(
|
|
7989
8039
|
(newItems) => {
|
|
7990
8040
|
var _a;
|
|
7991
|
-
const newValue = newItems.reduce(
|
|
7992
|
-
result
|
|
7993
|
-
|
|
7994
|
-
|
|
8041
|
+
const newValue = newItems.reduce(
|
|
8042
|
+
(result, item) => {
|
|
8043
|
+
result[item.key] = item.value;
|
|
8044
|
+
return result;
|
|
8045
|
+
},
|
|
8046
|
+
{}
|
|
8047
|
+
);
|
|
7995
8048
|
(_a = props.onChange) == null ? void 0 : _a.call(props, newValue);
|
|
7996
8049
|
},
|
|
7997
8050
|
[props]
|
|
@@ -8037,7 +8090,7 @@ function KeyValueListWidget(props) {
|
|
|
8037
8090
|
}
|
|
8038
8091
|
function MetadataForm() {
|
|
8039
8092
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8040
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { label: "Name", name: ["metadata", "name"],
|
|
8093
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { label: "Name", name: ["metadata", "name"], children: /* @__PURE__ */ jsxRuntimeExports.jsx(NameInputWidget, {}) }),
|
|
8041
8094
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8042
8095
|
Form.Item,
|
|
8043
8096
|
{
|
|
@@ -8052,6 +8105,12 @@ function MetadataForm() {
|
|
|
8052
8105
|
] });
|
|
8053
8106
|
}
|
|
8054
8107
|
const ComponentContext = createContext({});
|
|
8108
|
+
function ComponentContextProvider({
|
|
8109
|
+
value: value2,
|
|
8110
|
+
children
|
|
8111
|
+
}) {
|
|
8112
|
+
return React.createElement(ComponentContext.Provider, { value: value2 }, children);
|
|
8113
|
+
}
|
|
8055
8114
|
const GlobalStoreContext = createContext({});
|
|
8056
8115
|
const index_1s9fcl3 = "";
|
|
8057
8116
|
const ErrorWrapper = /* @__PURE__ */ styled_default("div")({
|
|
@@ -8059,8 +8118,8 @@ const ErrorWrapper = /* @__PURE__ */ styled_default("div")({
|
|
|
8059
8118
|
class: "egn3dbn",
|
|
8060
8119
|
propsAsIs: false
|
|
8061
8120
|
});
|
|
8062
|
-
const
|
|
8063
|
-
name: "
|
|
8121
|
+
const ErrorContentBody = /* @__PURE__ */ styled_default("div")({
|
|
8122
|
+
name: "ErrorContentBody",
|
|
8064
8123
|
class: "e136jgy8",
|
|
8065
8124
|
propsAsIs: false
|
|
8066
8125
|
});
|
|
@@ -8071,7 +8130,7 @@ var ErrorContentType = /* @__PURE__ */ ((ErrorContentType2) => {
|
|
|
8071
8130
|
ErrorContentType2["Item"] = "item";
|
|
8072
8131
|
return ErrorContentType2;
|
|
8073
8132
|
})(ErrorContentType || {});
|
|
8074
|
-
const
|
|
8133
|
+
const ErrorContent = (props) => {
|
|
8075
8134
|
const {
|
|
8076
8135
|
refetch,
|
|
8077
8136
|
errorText,
|
|
@@ -8107,7 +8166,7 @@ const WidgetErrorContent = (props) => {
|
|
|
8107
8166
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorWrapper, {
|
|
8108
8167
|
className: cx_default(props.className, type2),
|
|
8109
8168
|
style: props.style,
|
|
8110
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
8169
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorContentBody, {
|
|
8111
8170
|
className: "error-content",
|
|
8112
8171
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
|
|
8113
8172
|
className: cx_default(fontMap[type2], "title", `${type2}-title`),
|
|
@@ -8177,7 +8236,7 @@ function Table$1(props) {
|
|
|
8177
8236
|
if (loading) {
|
|
8178
8237
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, {});
|
|
8179
8238
|
} else if (error) {
|
|
8180
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8239
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContent, {
|
|
8181
8240
|
errorText: t2("dovetail.retry_when_access_data_failed"),
|
|
8182
8241
|
refetch,
|
|
8183
8242
|
style: {
|
|
@@ -8185,7 +8244,7 @@ function Table$1(props) {
|
|
|
8185
8244
|
}
|
|
8186
8245
|
});
|
|
8187
8246
|
} else if (dataSource.length === 0) {
|
|
8188
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8247
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContent, {
|
|
8189
8248
|
errorText: empty2 || t2("dovetail.empty"),
|
|
8190
8249
|
style: {
|
|
8191
8250
|
padding: "15px 0"
|
|
@@ -8215,21 +8274,31 @@ function Table$1(props) {
|
|
|
8215
8274
|
})]
|
|
8216
8275
|
});
|
|
8217
8276
|
}
|
|
8218
|
-
function useTableData({
|
|
8277
|
+
function useTableData({
|
|
8278
|
+
data: data2,
|
|
8279
|
+
columns,
|
|
8280
|
+
pageSize = 10,
|
|
8281
|
+
defaultSorters
|
|
8282
|
+
}) {
|
|
8219
8283
|
const [currentPage, setCurrentPage] = useState(1);
|
|
8220
8284
|
const [sorters, setSorters] = useState(defaultSorters || []);
|
|
8221
|
-
const onSorterChange = useCallback(
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8285
|
+
const onSorterChange = useCallback(
|
|
8286
|
+
(order, key2) => {
|
|
8287
|
+
var _a;
|
|
8288
|
+
const ORDER_MAP = {
|
|
8289
|
+
descend: "desc",
|
|
8290
|
+
ascend: "asc"
|
|
8291
|
+
};
|
|
8292
|
+
const sorters2 = [
|
|
8293
|
+
{
|
|
8294
|
+
field: (_a = columns.find((col) => col.key === key2)) == null ? void 0 : _a.dataIndex,
|
|
8295
|
+
order: order ? ORDER_MAP[order] : order
|
|
8296
|
+
}
|
|
8297
|
+
];
|
|
8298
|
+
setSorters(sorters2);
|
|
8299
|
+
},
|
|
8300
|
+
[columns]
|
|
8301
|
+
);
|
|
8233
8302
|
return {
|
|
8234
8303
|
data: paginateData(
|
|
8235
8304
|
{
|
|
@@ -8284,7 +8353,7 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
|
|
|
8284
8353
|
});
|
|
8285
8354
|
if (datas.length === 0) {
|
|
8286
8355
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8287
|
-
|
|
8356
|
+
ErrorContent,
|
|
8288
8357
|
{
|
|
8289
8358
|
errorText: t2("dovetail.no_resource", { kind: ` ${t2("dovetail.pod_selector")}` }),
|
|
8290
8359
|
type: ErrorContentType.Card
|
|
@@ -8309,7 +8378,7 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
|
|
|
8309
8378
|
}
|
|
8310
8379
|
);
|
|
8311
8380
|
};
|
|
8312
|
-
const PortsTable = ({ service }) => {
|
|
8381
|
+
const PortsTable = ({ service: service2 }) => {
|
|
8313
8382
|
const { t: t2 } = useTranslation();
|
|
8314
8383
|
const component = useContext(ComponentContext);
|
|
8315
8384
|
const Table2 = component.Table || Table$1;
|
|
@@ -8356,7 +8425,7 @@ const PortsTable = ({ service }) => {
|
|
|
8356
8425
|
width: 199
|
|
8357
8426
|
}
|
|
8358
8427
|
];
|
|
8359
|
-
const ports = (
|
|
8428
|
+
const ports = (service2._rawYaml.spec.ports || []).map((port2) => ({
|
|
8360
8429
|
...port2,
|
|
8361
8430
|
id: port2.name || ""
|
|
8362
8431
|
}));
|
|
@@ -8371,7 +8440,7 @@ const PortsTable = ({ service }) => {
|
|
|
8371
8440
|
});
|
|
8372
8441
|
if ((ports == null ? void 0 : ports.length) === 0) {
|
|
8373
8442
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8374
|
-
|
|
8443
|
+
ErrorContent,
|
|
8375
8444
|
{
|
|
8376
8445
|
errorText: t2("dovetail.no_resource", { kind: t2("dovetail.port") }),
|
|
8377
8446
|
type: ErrorContentType.Card
|
|
@@ -8493,20 +8562,22 @@ function EditFieldModal(props) {
|
|
|
8493
8562
|
popModal();
|
|
8494
8563
|
reset();
|
|
8495
8564
|
}, [popModal, reset]);
|
|
8496
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
8565
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ModalComponent, {
|
|
8497
8566
|
title: title || i18n2.t("dovetail.edit"),
|
|
8498
8567
|
confirmLoading: submitting,
|
|
8499
8568
|
onOk: onSubmit,
|
|
8500
8569
|
onCancel: close2,
|
|
8501
8570
|
okText: i18n2.t("dovetail.save"),
|
|
8502
8571
|
destroyOnClose: true,
|
|
8503
|
-
children:
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8572
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
8573
|
+
children: [renderContent(), /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
|
|
8574
|
+
style: {
|
|
8575
|
+
marginTop: 16
|
|
8576
|
+
},
|
|
8577
|
+
errorMsgs,
|
|
8578
|
+
isEdit: true
|
|
8579
|
+
})]
|
|
8580
|
+
})
|
|
8510
8581
|
});
|
|
8511
8582
|
}
|
|
8512
8583
|
function EditField(props) {
|
|
@@ -8771,6 +8842,38 @@ function PVCDistributeStorage({
|
|
|
8771
8842
|
)
|
|
8772
8843
|
] });
|
|
8773
8844
|
}
|
|
8845
|
+
const index_1oorxg6 = "";
|
|
8846
|
+
const CopyIconStyle = "c1oll6q9";
|
|
8847
|
+
const CopyButton = ({
|
|
8848
|
+
value: value2,
|
|
8849
|
+
className
|
|
8850
|
+
}) => {
|
|
8851
|
+
const {
|
|
8852
|
+
i18n: i18n2
|
|
8853
|
+
} = useTranslation();
|
|
8854
|
+
const [tooltip, setTooltip] = useState(i18n2.t("dovetail.copy"));
|
|
8855
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, {
|
|
8856
|
+
title: tooltip,
|
|
8857
|
+
onVisibleChange: (visible) => {
|
|
8858
|
+
if (!visible) {
|
|
8859
|
+
setTimeout(() => {
|
|
8860
|
+
setTooltip(i18n2.t("dovetail.copy"));
|
|
8861
|
+
}, 80);
|
|
8862
|
+
}
|
|
8863
|
+
},
|
|
8864
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
|
|
8865
|
+
src: ClipboardCopy16GradientGrayIcon,
|
|
8866
|
+
hoverSrc: ClipboardCopy16GradientBlueIcon,
|
|
8867
|
+
className: cx_default(CopyIconStyle, className),
|
|
8868
|
+
iconWidth: 16,
|
|
8869
|
+
iconHeight: 16,
|
|
8870
|
+
onClick: () => {
|
|
8871
|
+
copyToClipboard$1(value2);
|
|
8872
|
+
setTooltip(i18n2.t("dovetail.copied"));
|
|
8873
|
+
}
|
|
8874
|
+
})
|
|
8875
|
+
});
|
|
8876
|
+
};
|
|
8774
8877
|
class ResourceModel {
|
|
8775
8878
|
constructor(_rawYaml, _globalStore) {
|
|
8776
8879
|
__publicField(this, "id");
|
|
@@ -8888,74 +8991,70 @@ const BASE_INIT_VALUE = {
|
|
|
8888
8991
|
}
|
|
8889
8992
|
};
|
|
8890
8993
|
const DEPLOYMENT_INIT_VALUE = {
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
8994
|
+
apiVersion: "apps/v1",
|
|
8995
|
+
kind: "Deployment",
|
|
8996
|
+
metadata: {
|
|
8997
|
+
name: "example",
|
|
8998
|
+
namespace: "default"
|
|
8896
8999
|
},
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
9000
|
+
spec: {
|
|
9001
|
+
selector: {
|
|
9002
|
+
matchLabels: {
|
|
9003
|
+
app: "deployment-example"
|
|
8901
9004
|
}
|
|
8902
9005
|
},
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
9006
|
+
replicas: 3,
|
|
9007
|
+
template: {
|
|
9008
|
+
metadata: {
|
|
9009
|
+
labels: {
|
|
9010
|
+
app: "deployment-example"
|
|
8908
9011
|
}
|
|
8909
9012
|
},
|
|
8910
|
-
|
|
8911
|
-
|
|
9013
|
+
spec: {
|
|
9014
|
+
containers: [
|
|
8912
9015
|
{
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
9016
|
+
name: "deployment-example",
|
|
9017
|
+
image: "registry.smtx.io/kubesmart/bitnami/nginx:1.25.2-debian-11-r2",
|
|
9018
|
+
ports: [
|
|
8916
9019
|
{
|
|
8917
|
-
|
|
8918
|
-
|
|
9020
|
+
containerPort: 8080,
|
|
9021
|
+
protocol: "TCP"
|
|
8919
9022
|
}
|
|
8920
9023
|
]
|
|
8921
9024
|
}
|
|
8922
9025
|
]
|
|
8923
9026
|
}
|
|
8924
9027
|
},
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
9028
|
+
strategy: {
|
|
9029
|
+
type: "RollingUpdate",
|
|
9030
|
+
rollingUpdate: {
|
|
9031
|
+
maxSurge: "25%",
|
|
9032
|
+
maxUnavailable: "25%"
|
|
8930
9033
|
}
|
|
8931
9034
|
}
|
|
8932
9035
|
}
|
|
8933
9036
|
};
|
|
8934
9037
|
const CRONJOB_INIT_VALUE = {
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
9038
|
+
apiVersion: "batch/v1",
|
|
9039
|
+
kind: "CronJob",
|
|
9040
|
+
metadata: {
|
|
9041
|
+
name: "example",
|
|
9042
|
+
namespace: "default"
|
|
8940
9043
|
},
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
9044
|
+
spec: {
|
|
9045
|
+
schedule: "@daily",
|
|
9046
|
+
jobTemplate: {
|
|
9047
|
+
spec: {
|
|
9048
|
+
template: {
|
|
9049
|
+
spec: {
|
|
9050
|
+
containers: [
|
|
8948
9051
|
{
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
"/bin/sh",
|
|
8953
|
-
"-c",
|
|
8954
|
-
"date; echo Hello from the Kubernetes cluster"
|
|
8955
|
-
]
|
|
9052
|
+
name: "example",
|
|
9053
|
+
image: "registry.smtx.io/kubesmart/alpine:3",
|
|
9054
|
+
args: ["/bin/sh", "-c", "date; echo Hello from the Kubernetes cluster"]
|
|
8956
9055
|
}
|
|
8957
9056
|
],
|
|
8958
|
-
|
|
9057
|
+
restartPolicy: "OnFailure"
|
|
8959
9058
|
}
|
|
8960
9059
|
}
|
|
8961
9060
|
}
|
|
@@ -8963,32 +9062,32 @@ const CRONJOB_INIT_VALUE = {
|
|
|
8963
9062
|
}
|
|
8964
9063
|
};
|
|
8965
9064
|
const DAEMONSET_INIT_VALUE = {
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
9065
|
+
apiVersion: "apps/v1",
|
|
9066
|
+
kind: "DaemonSet",
|
|
9067
|
+
metadata: {
|
|
9068
|
+
name: "example",
|
|
9069
|
+
namespace: "default"
|
|
8971
9070
|
},
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
9071
|
+
spec: {
|
|
9072
|
+
selector: {
|
|
9073
|
+
matchLabels: {
|
|
9074
|
+
app: "daemonset-example"
|
|
8976
9075
|
}
|
|
8977
9076
|
},
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
9077
|
+
template: {
|
|
9078
|
+
metadata: {
|
|
9079
|
+
labels: {
|
|
9080
|
+
app: "daemonset-example"
|
|
8982
9081
|
}
|
|
8983
9082
|
},
|
|
8984
|
-
|
|
8985
|
-
|
|
9083
|
+
spec: {
|
|
9084
|
+
containers: [
|
|
8986
9085
|
{
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
9086
|
+
name: "daemonset-example",
|
|
9087
|
+
image: "registry.smtx.io/kubesmart/bitnami/nginx:1.25.2-debian-11-r2",
|
|
9088
|
+
ports: [
|
|
8990
9089
|
{
|
|
8991
|
-
|
|
9090
|
+
containerPort: 8080
|
|
8992
9091
|
}
|
|
8993
9092
|
]
|
|
8994
9093
|
}
|
|
@@ -8998,98 +9097,86 @@ const DAEMONSET_INIT_VALUE = {
|
|
|
8998
9097
|
}
|
|
8999
9098
|
};
|
|
9000
9099
|
const JOB_INIT_VALUE = {
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9100
|
+
apiVersion: "batch/v1",
|
|
9101
|
+
kind: "Job",
|
|
9102
|
+
metadata: {
|
|
9103
|
+
name: "example",
|
|
9104
|
+
namespace: "default"
|
|
9006
9105
|
},
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9106
|
+
spec: {
|
|
9107
|
+
selector: {},
|
|
9108
|
+
template: {
|
|
9109
|
+
metadata: {
|
|
9110
|
+
name: "job-example"
|
|
9012
9111
|
},
|
|
9013
|
-
|
|
9014
|
-
|
|
9112
|
+
spec: {
|
|
9113
|
+
containers: [
|
|
9015
9114
|
{
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
"/bin/sh",
|
|
9020
|
-
"-c",
|
|
9021
|
-
"date; echo Hello from the Kubernetes cluster"
|
|
9022
|
-
]
|
|
9115
|
+
name: "job-example",
|
|
9116
|
+
image: "registry.smtx.io/kubesmart/alpine:3",
|
|
9117
|
+
command: ["/bin/sh", "-c", "date; echo Hello from the Kubernetes cluster"]
|
|
9023
9118
|
}
|
|
9024
9119
|
],
|
|
9025
|
-
|
|
9120
|
+
restartPolicy: "Never"
|
|
9026
9121
|
}
|
|
9027
9122
|
}
|
|
9028
9123
|
}
|
|
9029
9124
|
};
|
|
9030
9125
|
const STATEFULSET_INIT_VALUE = {
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9126
|
+
apiVersion: "apps/v1",
|
|
9127
|
+
kind: "StatefulSet",
|
|
9128
|
+
metadata: {
|
|
9129
|
+
name: "example",
|
|
9130
|
+
namespace: "default"
|
|
9036
9131
|
},
|
|
9037
|
-
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
-
|
|
9132
|
+
spec: {
|
|
9133
|
+
serviceName: "statefulset-example",
|
|
9134
|
+
replicas: 3,
|
|
9135
|
+
selector: {
|
|
9136
|
+
matchLabels: {
|
|
9137
|
+
app: "statefulset-example"
|
|
9043
9138
|
}
|
|
9044
9139
|
},
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9140
|
+
template: {
|
|
9141
|
+
metadata: {
|
|
9142
|
+
labels: {
|
|
9143
|
+
app: "statefulset-example"
|
|
9049
9144
|
}
|
|
9050
9145
|
},
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9146
|
+
spec: {
|
|
9147
|
+
terminationGracePeriodSeconds: 10,
|
|
9148
|
+
containers: [
|
|
9054
9149
|
{
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
"args": [
|
|
9061
|
-
"-A",
|
|
9062
|
-
"--render-try-index",
|
|
9063
|
-
"/data"
|
|
9064
|
-
],
|
|
9065
|
-
"ports": [
|
|
9150
|
+
name: "statefulset-example",
|
|
9151
|
+
image: "registry.smtx.io/kubesmart/fileserver:v1.0.0",
|
|
9152
|
+
command: ["dufs"],
|
|
9153
|
+
args: ["-A", "--render-try-index", "/data"],
|
|
9154
|
+
ports: [
|
|
9066
9155
|
{
|
|
9067
|
-
|
|
9068
|
-
|
|
9156
|
+
containerPort: 5e3,
|
|
9157
|
+
name: "http"
|
|
9069
9158
|
}
|
|
9070
9159
|
],
|
|
9071
|
-
|
|
9160
|
+
volumeMounts: [
|
|
9072
9161
|
{
|
|
9073
|
-
|
|
9074
|
-
|
|
9162
|
+
name: "file",
|
|
9163
|
+
mountPath: "/data"
|
|
9075
9164
|
}
|
|
9076
9165
|
]
|
|
9077
9166
|
}
|
|
9078
9167
|
]
|
|
9079
9168
|
}
|
|
9080
9169
|
},
|
|
9081
|
-
|
|
9170
|
+
volumeClaimTemplates: [
|
|
9082
9171
|
{
|
|
9083
|
-
|
|
9084
|
-
|
|
9172
|
+
metadata: {
|
|
9173
|
+
name: "file"
|
|
9085
9174
|
},
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
"requests": {
|
|
9092
|
-
"storage": "1Gi"
|
|
9175
|
+
spec: {
|
|
9176
|
+
accessModes: ["ReadWriteOnce"],
|
|
9177
|
+
resources: {
|
|
9178
|
+
requests: {
|
|
9179
|
+
storage: "1Gi"
|
|
9093
9180
|
}
|
|
9094
9181
|
}
|
|
9095
9182
|
}
|
|
@@ -9098,37 +9185,35 @@ const STATEFULSET_INIT_VALUE = {
|
|
|
9098
9185
|
}
|
|
9099
9186
|
};
|
|
9100
9187
|
const POD_INIT_VALUE = {
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9188
|
+
apiVersion: "v1",
|
|
9189
|
+
kind: "Pod",
|
|
9190
|
+
metadata: {
|
|
9191
|
+
name: "example",
|
|
9192
|
+
namespace: "default",
|
|
9193
|
+
labels: {
|
|
9194
|
+
app: "example"
|
|
9108
9195
|
}
|
|
9109
9196
|
},
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9197
|
+
spec: {
|
|
9198
|
+
securityContext: {
|
|
9199
|
+
runAsNonRoot: true,
|
|
9200
|
+
seccompProfile: {
|
|
9201
|
+
type: "RuntimeDefault"
|
|
9115
9202
|
}
|
|
9116
9203
|
},
|
|
9117
|
-
|
|
9204
|
+
containers: [
|
|
9118
9205
|
{
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9206
|
+
name: "example",
|
|
9207
|
+
image: "registry.smtx.io/kubesmart/bitnami/nginx:1.25.2-debian-11-r2",
|
|
9208
|
+
ports: [
|
|
9122
9209
|
{
|
|
9123
|
-
|
|
9210
|
+
containerPort: 8080
|
|
9124
9211
|
}
|
|
9125
9212
|
],
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
"ALL"
|
|
9131
|
-
]
|
|
9213
|
+
securityContext: {
|
|
9214
|
+
allowPrivilegeEscalation: false,
|
|
9215
|
+
capabilities: {
|
|
9216
|
+
drop: ["ALL"]
|
|
9132
9217
|
}
|
|
9133
9218
|
}
|
|
9134
9219
|
}
|
|
@@ -9136,143 +9221,143 @@ const POD_INIT_VALUE = {
|
|
|
9136
9221
|
}
|
|
9137
9222
|
};
|
|
9138
9223
|
const SERVICE_CLUSTER_IP_INIT_VALUE = {
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9224
|
+
apiVersion: "v1",
|
|
9225
|
+
kind: "Service",
|
|
9226
|
+
metadata: {
|
|
9227
|
+
name: "example",
|
|
9228
|
+
namespace: "default"
|
|
9144
9229
|
},
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9230
|
+
spec: {
|
|
9231
|
+
selector: {
|
|
9232
|
+
app: "example"
|
|
9148
9233
|
},
|
|
9149
|
-
|
|
9234
|
+
ports: [
|
|
9150
9235
|
{
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9236
|
+
name: "example",
|
|
9237
|
+
port: 8080,
|
|
9238
|
+
protocol: "TCP",
|
|
9239
|
+
targetPort: 8080
|
|
9155
9240
|
}
|
|
9156
9241
|
],
|
|
9157
|
-
|
|
9158
|
-
|
|
9242
|
+
sessionAffinity: "None",
|
|
9243
|
+
type: "ClusterIP"
|
|
9159
9244
|
}
|
|
9160
9245
|
};
|
|
9161
9246
|
const SERVICE_NODE_PORT_INIT_VALUE = {
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9247
|
+
apiVersion: "v1",
|
|
9248
|
+
kind: "Service",
|
|
9249
|
+
metadata: {
|
|
9250
|
+
name: "example",
|
|
9251
|
+
namespace: "default"
|
|
9167
9252
|
},
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9253
|
+
spec: {
|
|
9254
|
+
selector: {
|
|
9255
|
+
app: "example"
|
|
9171
9256
|
},
|
|
9172
|
-
|
|
9257
|
+
ports: [
|
|
9173
9258
|
{
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9259
|
+
name: "example",
|
|
9260
|
+
port: 8080,
|
|
9261
|
+
protocol: "TCP",
|
|
9262
|
+
targetPort: 8080
|
|
9178
9263
|
}
|
|
9179
9264
|
],
|
|
9180
|
-
|
|
9181
|
-
|
|
9265
|
+
sessionAffinity: "None",
|
|
9266
|
+
type: "NodePort"
|
|
9182
9267
|
}
|
|
9183
9268
|
};
|
|
9184
9269
|
const SERVICE_LOAD_BALANCER_INIT_VALUE = {
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
|
|
9270
|
+
apiVersion: "v1",
|
|
9271
|
+
kind: "Service",
|
|
9272
|
+
metadata: {
|
|
9273
|
+
name: "example",
|
|
9274
|
+
namespace: "default"
|
|
9190
9275
|
},
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9276
|
+
spec: {
|
|
9277
|
+
selector: {
|
|
9278
|
+
app: "example"
|
|
9194
9279
|
},
|
|
9195
|
-
|
|
9280
|
+
ports: [
|
|
9196
9281
|
{
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9282
|
+
name: "example",
|
|
9283
|
+
port: 80,
|
|
9284
|
+
protocol: "TCP",
|
|
9285
|
+
targetPort: 8080
|
|
9201
9286
|
}
|
|
9202
9287
|
],
|
|
9203
|
-
|
|
9204
|
-
|
|
9288
|
+
sessionAffinity: "None",
|
|
9289
|
+
type: "LoadBalancer"
|
|
9205
9290
|
}
|
|
9206
9291
|
};
|
|
9207
9292
|
const SERVICE_EXTERNAL_NAME_INIT_VALUE = {
|
|
9208
|
-
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
|
|
9293
|
+
apiVersion: "v1",
|
|
9294
|
+
kind: "Service",
|
|
9295
|
+
metadata: {
|
|
9296
|
+
name: "example",
|
|
9297
|
+
namespace: "default"
|
|
9213
9298
|
},
|
|
9214
|
-
|
|
9215
|
-
|
|
9216
|
-
|
|
9299
|
+
spec: {
|
|
9300
|
+
selector: {
|
|
9301
|
+
app: "example"
|
|
9217
9302
|
},
|
|
9218
|
-
|
|
9303
|
+
ports: [
|
|
9219
9304
|
{
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9305
|
+
name: "example",
|
|
9306
|
+
port: 8080,
|
|
9307
|
+
protocol: "TCP",
|
|
9308
|
+
targetPort: 8080
|
|
9224
9309
|
}
|
|
9225
9310
|
],
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9311
|
+
sessionAffinity: "None",
|
|
9312
|
+
type: "ExternalName",
|
|
9313
|
+
externalName: "app.example.com"
|
|
9229
9314
|
}
|
|
9230
9315
|
};
|
|
9231
9316
|
const SERVICE_HEADLESS_INIT_VALUE = {
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9317
|
+
apiVersion: "v1",
|
|
9318
|
+
kind: "Service",
|
|
9319
|
+
metadata: {
|
|
9320
|
+
name: "example",
|
|
9321
|
+
namespace: "default"
|
|
9237
9322
|
},
|
|
9238
|
-
|
|
9239
|
-
|
|
9240
|
-
|
|
9323
|
+
spec: {
|
|
9324
|
+
selector: {
|
|
9325
|
+
app: "example"
|
|
9241
9326
|
},
|
|
9242
|
-
|
|
9243
|
-
|
|
9327
|
+
clusterIP: "None",
|
|
9328
|
+
ports: [
|
|
9244
9329
|
{
|
|
9245
|
-
|
|
9246
|
-
|
|
9247
|
-
|
|
9248
|
-
|
|
9330
|
+
name: "example",
|
|
9331
|
+
port: null,
|
|
9332
|
+
protocol: "TCP",
|
|
9333
|
+
targetPort: null
|
|
9249
9334
|
}
|
|
9250
9335
|
],
|
|
9251
|
-
|
|
9252
|
-
|
|
9336
|
+
sessionAffinity: "None",
|
|
9337
|
+
type: "ClusterIP"
|
|
9253
9338
|
}
|
|
9254
9339
|
};
|
|
9255
9340
|
const INGRESS_INIT_VALUE = {
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9341
|
+
apiVersion: "networking.k8s.io/v1",
|
|
9342
|
+
kind: "Ingress",
|
|
9343
|
+
metadata: {
|
|
9344
|
+
name: "example",
|
|
9345
|
+
namespace: "default"
|
|
9261
9346
|
},
|
|
9262
|
-
|
|
9263
|
-
|
|
9347
|
+
spec: {
|
|
9348
|
+
rules: [
|
|
9264
9349
|
{
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9350
|
+
host: "example.com",
|
|
9351
|
+
http: {
|
|
9352
|
+
paths: [
|
|
9268
9353
|
{
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9354
|
+
path: "/testpath",
|
|
9355
|
+
pathType: "Prefix",
|
|
9356
|
+
backend: {
|
|
9357
|
+
service: {
|
|
9358
|
+
name: "test",
|
|
9359
|
+
port: {
|
|
9360
|
+
number: 80
|
|
9276
9361
|
}
|
|
9277
9362
|
}
|
|
9278
9363
|
}
|
|
@@ -9284,28 +9369,28 @@ const INGRESS_INIT_VALUE = {
|
|
|
9284
9369
|
}
|
|
9285
9370
|
};
|
|
9286
9371
|
const NETWORK_POLICY_INIT_VALUE = {
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9372
|
+
apiVersion: "networking.k8s.io/v1",
|
|
9373
|
+
kind: "NetworkPolicy",
|
|
9374
|
+
metadata: {
|
|
9375
|
+
name: "example",
|
|
9376
|
+
namespace: "default"
|
|
9292
9377
|
},
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9378
|
+
spec: {
|
|
9379
|
+
podSelector: {},
|
|
9380
|
+
policyTypes: []
|
|
9296
9381
|
}
|
|
9297
9382
|
};
|
|
9298
9383
|
const CONFIG_MAP_INIT_VALUE = {
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9384
|
+
apiVersion: "v1",
|
|
9385
|
+
kind: "ConfigMap",
|
|
9386
|
+
metadata: {
|
|
9387
|
+
name: "example",
|
|
9388
|
+
namespace: "default"
|
|
9304
9389
|
},
|
|
9305
|
-
|
|
9306
|
-
|
|
9390
|
+
data: {
|
|
9391
|
+
key: "value"
|
|
9307
9392
|
},
|
|
9308
|
-
|
|
9393
|
+
immutable: false
|
|
9309
9394
|
};
|
|
9310
9395
|
const SERVER_INSTANCE_INIT_VALUE = {
|
|
9311
9396
|
apiVersion: "kubesmart.smtx.io/v1alpha1",
|
|
@@ -9327,138 +9412,136 @@ const SERVER_INSTANCE_INIT_VALUE = {
|
|
|
9327
9412
|
};
|
|
9328
9413
|
const REDEPLOY_TIMESTAMP_KEY = "kubectl.kubernetes.io/restartedAt";
|
|
9329
9414
|
const SECRET_OPAQUE_INIT_VALUE = {
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9415
|
+
apiVersion: "v1",
|
|
9416
|
+
kind: "Secret",
|
|
9417
|
+
metadata: {
|
|
9418
|
+
name: "example",
|
|
9419
|
+
namespace: "default"
|
|
9335
9420
|
},
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
|
|
9421
|
+
type: "Opaque",
|
|
9422
|
+
data: {
|
|
9423
|
+
key: "value"
|
|
9339
9424
|
}
|
|
9340
9425
|
};
|
|
9341
9426
|
const SECRET_IMAGE_REPO_INIT_VALUE = {
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9427
|
+
apiVersion: "v1",
|
|
9428
|
+
kind: "Secret",
|
|
9429
|
+
metadata: {
|
|
9430
|
+
name: "example",
|
|
9431
|
+
namespace: "default"
|
|
9347
9432
|
},
|
|
9348
|
-
|
|
9349
|
-
|
|
9433
|
+
type: "kubernetes.io/dockerconfigjson",
|
|
9434
|
+
data: {
|
|
9350
9435
|
".dockerconfigjson": ""
|
|
9351
9436
|
}
|
|
9352
9437
|
};
|
|
9353
9438
|
const SECRET_BASIC_AUTH_INIT_VALUE = {
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9439
|
+
apiVersion: "v1",
|
|
9440
|
+
kind: "Secret",
|
|
9441
|
+
metadata: {
|
|
9442
|
+
name: "example",
|
|
9443
|
+
namespace: "default"
|
|
9359
9444
|
},
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9445
|
+
type: "kubernetes.io/basic-auth",
|
|
9446
|
+
data: {
|
|
9447
|
+
username: "example",
|
|
9448
|
+
password: "example"
|
|
9364
9449
|
}
|
|
9365
9450
|
};
|
|
9366
9451
|
const SECRET_SSH_AUTH_INIT_VALUE = {
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9452
|
+
apiVersion: "v1",
|
|
9453
|
+
kind: "Secret",
|
|
9454
|
+
metadata: {
|
|
9455
|
+
name: "example",
|
|
9456
|
+
namespace: "default"
|
|
9372
9457
|
},
|
|
9373
|
-
|
|
9374
|
-
|
|
9458
|
+
type: "kubernetes.io/ssh-auth",
|
|
9459
|
+
data: {
|
|
9375
9460
|
"ssh-publickey": "",
|
|
9376
9461
|
"ssh-privatekey": ""
|
|
9377
9462
|
}
|
|
9378
9463
|
};
|
|
9379
9464
|
const SECRET_TLS_INIT_VALUE = {
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9465
|
+
apiVersion: "v1",
|
|
9466
|
+
kind: "Secret",
|
|
9467
|
+
metadata: {
|
|
9468
|
+
name: "example",
|
|
9469
|
+
namespace: "default"
|
|
9385
9470
|
},
|
|
9386
|
-
|
|
9387
|
-
|
|
9471
|
+
type: "kubernetes.io/tls",
|
|
9472
|
+
data: {
|
|
9388
9473
|
"tls.crt": "",
|
|
9389
9474
|
"tls.key": ""
|
|
9390
9475
|
}
|
|
9391
9476
|
};
|
|
9392
9477
|
const SECRET_CUSTOM_INIT_VALUE = {
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9478
|
+
apiVersion: "v1",
|
|
9479
|
+
kind: "Secret",
|
|
9480
|
+
metadata: {
|
|
9481
|
+
name: "example",
|
|
9482
|
+
namespace: "default"
|
|
9398
9483
|
},
|
|
9399
|
-
|
|
9400
|
-
|
|
9484
|
+
type: "",
|
|
9485
|
+
data: {}
|
|
9401
9486
|
};
|
|
9402
9487
|
const NODE_INIT_VALUE = {
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9488
|
+
apiVersion: "v1",
|
|
9489
|
+
kind: "Node",
|
|
9490
|
+
metadata: {
|
|
9491
|
+
name: "example",
|
|
9492
|
+
namespace: "default"
|
|
9408
9493
|
},
|
|
9409
|
-
|
|
9494
|
+
spec: {}
|
|
9410
9495
|
};
|
|
9411
9496
|
const STORAGE_CLASS_INIT_VALUE = {
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9497
|
+
apiVersion: "storage.k8s.io/v1",
|
|
9498
|
+
kind: "StorageClass",
|
|
9499
|
+
metadata: {
|
|
9500
|
+
name: ""
|
|
9416
9501
|
},
|
|
9417
|
-
|
|
9502
|
+
parameters: {
|
|
9418
9503
|
"csi.storage.k8s.io/fstype": "ext4"
|
|
9419
9504
|
},
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9505
|
+
provisioner: "",
|
|
9506
|
+
reclaimPolicy: "Delete",
|
|
9507
|
+
allowVolumeExpansion: true,
|
|
9508
|
+
volumeBindingMode: "Immediate"
|
|
9424
9509
|
};
|
|
9425
9510
|
const PV_INIT_VALUE = {
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9511
|
+
apiVersion: "v1",
|
|
9512
|
+
kind: "PersistentVolume",
|
|
9513
|
+
metadata: {
|
|
9514
|
+
name: "pvc-hostpath"
|
|
9430
9515
|
},
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
"capacity": {
|
|
9436
|
-
"storage": "10Gi"
|
|
9516
|
+
spec: {
|
|
9517
|
+
accessModes: ["ReadWriteOnce"],
|
|
9518
|
+
capacity: {
|
|
9519
|
+
storage: "10Gi"
|
|
9437
9520
|
},
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9521
|
+
hostPath: {
|
|
9522
|
+
type: "DirectoryOrCreate",
|
|
9523
|
+
path: "/root/test"
|
|
9441
9524
|
},
|
|
9442
|
-
|
|
9443
|
-
|
|
9525
|
+
persistentVolumeReclaimPolicy: "Delete",
|
|
9526
|
+
volumeMode: "Filesystem"
|
|
9444
9527
|
}
|
|
9445
9528
|
};
|
|
9446
9529
|
const PVC_INIT_VALUE = {
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9530
|
+
apiVersion: "v1",
|
|
9531
|
+
kind: "PersistentVolumeClaim",
|
|
9532
|
+
metadata: {
|
|
9533
|
+
name: "",
|
|
9534
|
+
namespace: "default"
|
|
9452
9535
|
},
|
|
9453
|
-
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
|
|
9457
|
-
|
|
9536
|
+
spec: {
|
|
9537
|
+
accessModes: [],
|
|
9538
|
+
resources: {
|
|
9539
|
+
requests: {
|
|
9540
|
+
storage: "10Gi"
|
|
9458
9541
|
}
|
|
9459
9542
|
},
|
|
9460
|
-
|
|
9461
|
-
|
|
9543
|
+
storageClassName: "",
|
|
9544
|
+
volumeMode: "Filesystem"
|
|
9462
9545
|
}
|
|
9463
9546
|
};
|
|
9464
9547
|
var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
|
|
@@ -9565,6 +9648,16 @@ class WorkloadBaseModel extends ResourceModel {
|
|
|
9565
9648
|
);
|
|
9566
9649
|
return (containers == null ? void 0 : containers.map((container2) => shortenedImage(container2.image || ""))) || [];
|
|
9567
9650
|
}
|
|
9651
|
+
async fetchRestarts(selector, namespace2) {
|
|
9652
|
+
const pods = await this._globalStore.get("pods", {
|
|
9653
|
+
resourceBasePath: "/api/v1",
|
|
9654
|
+
kind: "Pod"
|
|
9655
|
+
});
|
|
9656
|
+
const myPods = pods.items.filter(
|
|
9657
|
+
(p) => matchSelector(p, selector, namespace2)
|
|
9658
|
+
);
|
|
9659
|
+
return lodashExports.sumBy(myPods, "restarts");
|
|
9660
|
+
}
|
|
9568
9661
|
}
|
|
9569
9662
|
class JobModel extends WorkloadBaseModel {
|
|
9570
9663
|
constructor(_rawYaml, _globalStore) {
|
|
@@ -9576,18 +9669,11 @@ class JobModel extends WorkloadBaseModel {
|
|
|
9576
9669
|
await this.getRestarts();
|
|
9577
9670
|
}
|
|
9578
9671
|
async getRestarts() {
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
const myPods = pods.items.filter(
|
|
9584
|
-
(p) => {
|
|
9585
|
-
var _a;
|
|
9586
|
-
return matchSelector(p, (_a = this.spec) == null ? void 0 : _a.selector, this.metadata.namespace);
|
|
9587
|
-
}
|
|
9672
|
+
var _a;
|
|
9673
|
+
this.restarts = await this.fetchRestarts(
|
|
9674
|
+
(_a = this.spec) == null ? void 0 : _a.selector,
|
|
9675
|
+
this.metadata.namespace
|
|
9588
9676
|
);
|
|
9589
|
-
const result = lodashExports.sumBy(myPods, "restarts");
|
|
9590
|
-
this.restarts = result;
|
|
9591
9677
|
}
|
|
9592
9678
|
get duration() {
|
|
9593
9679
|
var _a, _b;
|
|
@@ -9652,18 +9738,11 @@ class WorkloadModel extends WorkloadBaseModel {
|
|
|
9652
9738
|
await this.getIngresses();
|
|
9653
9739
|
}
|
|
9654
9740
|
async getRestarts() {
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
const myPods = pods.items.filter(
|
|
9660
|
-
(p) => {
|
|
9661
|
-
var _a;
|
|
9662
|
-
return matchSelector(p, (_a = this.spec) == null ? void 0 : _a.selector, this.metadata.namespace);
|
|
9663
|
-
}
|
|
9741
|
+
var _a;
|
|
9742
|
+
this.restarts = await this.fetchRestarts(
|
|
9743
|
+
(_a = this.spec) == null ? void 0 : _a.selector,
|
|
9744
|
+
this.metadata.namespace
|
|
9664
9745
|
);
|
|
9665
|
-
const result = lodashExports.sumBy(myPods, "restarts");
|
|
9666
|
-
this.restarts = result;
|
|
9667
9746
|
}
|
|
9668
9747
|
async getServices() {
|
|
9669
9748
|
const services = await this._globalStore.get("services", {
|
|
@@ -9680,10 +9759,10 @@ class WorkloadModel extends WorkloadBaseModel {
|
|
|
9680
9759
|
}
|
|
9681
9760
|
async getIngresses() {
|
|
9682
9761
|
const allIngresses = /* @__PURE__ */ new Map();
|
|
9683
|
-
for (const
|
|
9684
|
-
for (const
|
|
9685
|
-
const key2 = `${
|
|
9686
|
-
allIngresses.set(key2,
|
|
9762
|
+
for (const service2 of this.services) {
|
|
9763
|
+
for (const ingress2 of service2.ingresses) {
|
|
9764
|
+
const key2 = `${ingress2.namespace}-${ingress2.name}`;
|
|
9765
|
+
allIngresses.set(key2, ingress2);
|
|
9687
9766
|
}
|
|
9688
9767
|
}
|
|
9689
9768
|
this.ingresses = Array.from(allIngresses.values());
|
|
@@ -9716,6 +9795,23 @@ class WorkloadModel extends WorkloadBaseModel {
|
|
|
9716
9795
|
}
|
|
9717
9796
|
return newOne;
|
|
9718
9797
|
}
|
|
9798
|
+
getControllerRevisions(controllerRevisions) {
|
|
9799
|
+
return controllerRevisions.filter(
|
|
9800
|
+
(cr) => {
|
|
9801
|
+
var _a, _b;
|
|
9802
|
+
return (_b = (_a = cr.metadata) == null ? void 0 : _a.ownerReferences) == null ? void 0 : _b.some(
|
|
9803
|
+
(ref) => ref.kind === this.kind && ref.uid === this.metadata.uid
|
|
9804
|
+
);
|
|
9805
|
+
}
|
|
9806
|
+
);
|
|
9807
|
+
}
|
|
9808
|
+
getRevision(controllerRevisions) {
|
|
9809
|
+
const myRevisions = this.getControllerRevisions(controllerRevisions);
|
|
9810
|
+
return myRevisions.reduce(
|
|
9811
|
+
(result, cr) => Math.max(result, Number(cr.revision || 0)),
|
|
9812
|
+
0
|
|
9813
|
+
);
|
|
9814
|
+
}
|
|
9719
9815
|
}
|
|
9720
9816
|
class PodModel extends WorkloadBaseModel {
|
|
9721
9817
|
constructor(_rawYaml, _globalStore) {
|
|
@@ -9992,22 +10088,6 @@ class DaemonSetModel extends WorkloadModel {
|
|
|
9992
10088
|
super(_rawYaml, _globalStore);
|
|
9993
10089
|
this._rawYaml = _rawYaml;
|
|
9994
10090
|
}
|
|
9995
|
-
getControllerRevisions(controllerVisions) {
|
|
9996
|
-
return controllerVisions.filter(
|
|
9997
|
-
(controllerRevision) => {
|
|
9998
|
-
var _a, _b;
|
|
9999
|
-
return (_b = (_a = controllerRevision.metadata) == null ? void 0 : _a.ownerReferences) == null ? void 0 : _b.some(
|
|
10000
|
-
(ownerReference) => ownerReference.kind === "DaemonSet" && ownerReference.uid === this.metadata.uid
|
|
10001
|
-
);
|
|
10002
|
-
}
|
|
10003
|
-
);
|
|
10004
|
-
}
|
|
10005
|
-
getRevision(controllerVisions) {
|
|
10006
|
-
const myControllerVisions = this.getControllerRevisions(controllerVisions);
|
|
10007
|
-
return myControllerVisions.reduce((result, controllerRevision) => {
|
|
10008
|
-
return Math.max(result, Number(controllerRevision.revision || 0));
|
|
10009
|
-
}, 0);
|
|
10010
|
-
}
|
|
10011
10091
|
get stateDisplay() {
|
|
10012
10092
|
var _a, _b;
|
|
10013
10093
|
if (((_a = this.status) == null ? void 0 : _a.desiredNumberScheduled) !== ((_b = this.status) == null ? void 0 : _b.numberReady)) {
|
|
@@ -10027,22 +10107,6 @@ class StatefulSetModel extends WorkloadModel {
|
|
|
10027
10107
|
super(_rawYaml, _globalStore);
|
|
10028
10108
|
this._rawYaml = _rawYaml;
|
|
10029
10109
|
}
|
|
10030
|
-
getControllerRevisions(controllerVisions) {
|
|
10031
|
-
return controllerVisions.filter(
|
|
10032
|
-
(controllerRevision) => {
|
|
10033
|
-
var _a, _b;
|
|
10034
|
-
return (_b = (_a = controllerRevision.metadata) == null ? void 0 : _a.ownerReferences) == null ? void 0 : _b.some(
|
|
10035
|
-
(ownerReference) => ownerReference.kind === "StatefulSet" && ownerReference.uid === this.metadata.uid
|
|
10036
|
-
);
|
|
10037
|
-
}
|
|
10038
|
-
);
|
|
10039
|
-
}
|
|
10040
|
-
getRevision(controllerVisions) {
|
|
10041
|
-
const myControllerVisions = this.getControllerRevisions(controllerVisions);
|
|
10042
|
-
return myControllerVisions.reduce((result, controllerRevision) => {
|
|
10043
|
-
return Math.max(result, Number(controllerRevision.revision || 0));
|
|
10044
|
-
}, 0);
|
|
10045
|
-
}
|
|
10046
10110
|
get stateDisplay() {
|
|
10047
10111
|
var _a, _b, _c;
|
|
10048
10112
|
if (((_a = this.spec) == null ? void 0 : _a.replicas) === 0) {
|
|
@@ -10075,11 +10139,9 @@ class ServiceModel extends ResourceModel {
|
|
|
10075
10139
|
resourceBasePath: "/apis/networking.k8s.io/v1",
|
|
10076
10140
|
kind: "Ingress"
|
|
10077
10141
|
});
|
|
10078
|
-
const myIngresses = ingresses.items.filter((
|
|
10079
|
-
const rules =
|
|
10080
|
-
return rules.some(
|
|
10081
|
-
(rule2) => rule2.serviceName === this.name
|
|
10082
|
-
);
|
|
10142
|
+
const myIngresses = ingresses.items.filter((ingress2) => {
|
|
10143
|
+
const rules = ingress2.getFlattenedRules([]);
|
|
10144
|
+
return rules.some((rule2) => rule2.serviceName === this.name);
|
|
10083
10145
|
});
|
|
10084
10146
|
this.ingresses = myIngresses;
|
|
10085
10147
|
}
|
|
@@ -10271,15 +10333,15 @@ class IngressClassModel extends ResourceModel {
|
|
|
10271
10333
|
return (_a = this.spec) == null ? void 0 : _a.controller;
|
|
10272
10334
|
}
|
|
10273
10335
|
}
|
|
10274
|
-
const
|
|
10336
|
+
const index_1tz3o5 = "";
|
|
10275
10337
|
const ServiceInClusterAccessComponent = ({
|
|
10276
|
-
service
|
|
10338
|
+
service: service2
|
|
10277
10339
|
}) => {
|
|
10278
|
-
const spec =
|
|
10279
|
-
switch (
|
|
10340
|
+
const spec = service2._rawYaml.spec;
|
|
10341
|
+
switch (service2.displayType) {
|
|
10280
10342
|
case ServiceTypeEnum.ExternalName:
|
|
10281
10343
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
10282
|
-
value:
|
|
10344
|
+
value: service2.dnsRecord
|
|
10283
10345
|
});
|
|
10284
10346
|
case ServiceTypeEnum.Headless:
|
|
10285
10347
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
@@ -10295,26 +10357,59 @@ const BreakLineStyle = "b1vtjd4k";
|
|
|
10295
10357
|
const LinkStyle$2 = "luro4rx";
|
|
10296
10358
|
const ShowLinkStyle = "s1gydjqf";
|
|
10297
10359
|
const DashedUnderlineSpanStyle = "dvp1i89";
|
|
10360
|
+
const AccessAddressStyle = "azmggeh";
|
|
10361
|
+
const BreakLineListStyle = "bct30qn";
|
|
10362
|
+
const BreakLineItemStyle = "b1m9bqu";
|
|
10363
|
+
const ServiceAccessAddress = ({
|
|
10364
|
+
children,
|
|
10365
|
+
copyValue
|
|
10366
|
+
}) => {
|
|
10367
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
10368
|
+
className: AccessAddressStyle,
|
|
10369
|
+
children: [children, /* @__PURE__ */ jsxRuntimeExports.jsx(CopyButton, {
|
|
10370
|
+
value: copyValue
|
|
10371
|
+
})]
|
|
10372
|
+
});
|
|
10373
|
+
};
|
|
10374
|
+
function renderAccessItems(items, separator) {
|
|
10375
|
+
if (!items.length) {
|
|
10376
|
+
return void 0;
|
|
10377
|
+
}
|
|
10378
|
+
const result = [];
|
|
10379
|
+
for (let i2 = 0; i2 < items.length; i2++) {
|
|
10380
|
+
result.push(/* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, {
|
|
10381
|
+
children: items[i2]
|
|
10382
|
+
}, `item-${i2}`));
|
|
10383
|
+
if (i2 < items.length - 1) {
|
|
10384
|
+
result.push(/* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, {
|
|
10385
|
+
children: separator
|
|
10386
|
+
}, `separator-${i2}`));
|
|
10387
|
+
}
|
|
10388
|
+
}
|
|
10389
|
+
return result;
|
|
10390
|
+
}
|
|
10298
10391
|
const ServiceOutClusterAccessComponent = ({
|
|
10299
|
-
service,
|
|
10392
|
+
service: service2,
|
|
10300
10393
|
breakLine = true,
|
|
10301
10394
|
clusterVip,
|
|
10302
|
-
showDashedUnderline = true
|
|
10395
|
+
showDashedUnderline = true,
|
|
10396
|
+
showCopyButton = false
|
|
10303
10397
|
}) => {
|
|
10304
|
-
var _a, _b, _c, _d, _e;
|
|
10398
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
10305
10399
|
const {
|
|
10306
10400
|
i18n: i18n2
|
|
10307
10401
|
} = useTranslation();
|
|
10308
|
-
const spec =
|
|
10309
|
-
const status =
|
|
10402
|
+
const spec = service2._rawYaml.spec;
|
|
10403
|
+
const status = service2._rawYaml.status;
|
|
10310
10404
|
let content = "-";
|
|
10311
10405
|
switch (spec.type) {
|
|
10312
10406
|
case ServiceTypeEnum.NodePort:
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10407
|
+
content = (_a = spec.ports) == null ? void 0 : _a.filter((v) => !!v && v.nodePort).map((p) => {
|
|
10408
|
+
const address = `${clusterVip}:${p.nodePort}`;
|
|
10409
|
+
const link = /* @__PURE__ */ jsxRuntimeExports.jsx(Link$1, {
|
|
10410
|
+
href: `http://${address}`,
|
|
10316
10411
|
target: "_blank",
|
|
10317
|
-
className: cx_default(ShowLinkStyle, Typo.Label.l4_regular_title),
|
|
10412
|
+
className: breakLine ? cx_default(Typo.Label.l4_regular_title, BreakLineStyle, LinkStyle$2) : cx_default(ShowLinkStyle, Typo.Label.l4_regular_title),
|
|
10318
10413
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, {
|
|
10319
10414
|
title: i18n2.t("dovetail.default_http_protocol_tooltip"),
|
|
10320
10415
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
@@ -10322,50 +10417,60 @@ const ServiceOutClusterAccessComponent = ({
|
|
|
10322
10417
|
style: showDashedUnderline ? void 0 : {
|
|
10323
10418
|
borderBottom: "none"
|
|
10324
10419
|
},
|
|
10325
|
-
children:
|
|
10420
|
+
children: address
|
|
10326
10421
|
})
|
|
10327
10422
|
})
|
|
10328
|
-
}, p.name)
|
|
10423
|
+
}, p.name || p.nodePort);
|
|
10424
|
+
if (!showCopyButton) {
|
|
10425
|
+
return link;
|
|
10426
|
+
}
|
|
10427
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceAccessAddress, {
|
|
10428
|
+
copyValue: address,
|
|
10429
|
+
children: link
|
|
10430
|
+
}, p.name || p.nodePort);
|
|
10431
|
+
});
|
|
10432
|
+
if (!breakLine) {
|
|
10329
10433
|
if (content && content instanceof Array) {
|
|
10330
|
-
|
|
10331
|
-
for (let i2 = 0; i2 < content.length; i2++) {
|
|
10332
|
-
result.push(content[i2]);
|
|
10333
|
-
if (i2 < content.length - 1) {
|
|
10334
|
-
result.push(", ");
|
|
10335
|
-
}
|
|
10336
|
-
}
|
|
10337
|
-
content = result;
|
|
10434
|
+
content = renderAccessItems(content, ", ");
|
|
10338
10435
|
}
|
|
10339
10436
|
break;
|
|
10340
10437
|
}
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
},
|
|
10352
|
-
children: [clusterVip, ":", p.nodePort]
|
|
10353
|
-
})
|
|
10354
|
-
})
|
|
10355
|
-
}, p.nodePort));
|
|
10356
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("ul", {
|
|
10357
|
-
children: content
|
|
10358
|
-
});
|
|
10438
|
+
if (content && content instanceof Array) {
|
|
10439
|
+
content = /* @__PURE__ */ jsxRuntimeExports.jsx("ul", {
|
|
10440
|
+
className: BreakLineListStyle,
|
|
10441
|
+
children: content.map((item, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", {
|
|
10442
|
+
className: BreakLineItemStyle,
|
|
10443
|
+
children: item
|
|
10444
|
+
}, `nodeport-${index2}`))
|
|
10445
|
+
});
|
|
10446
|
+
}
|
|
10447
|
+
break;
|
|
10359
10448
|
case ServiceTypeEnum.ExternalName:
|
|
10449
|
+
if (showCopyButton) {
|
|
10450
|
+
content = renderAccessItems(((_b = spec.externalIPs) == null ? void 0 : _b.map((ip) => /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceAccessAddress, {
|
|
10451
|
+
copyValue: ip,
|
|
10452
|
+
children: ip
|
|
10453
|
+
}, ip))) || [], breakLine ? "\n" : ", ");
|
|
10454
|
+
break;
|
|
10455
|
+
}
|
|
10360
10456
|
content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
10361
10457
|
useOverflow: false,
|
|
10362
10458
|
value: (_c = spec.externalIPs) == null ? void 0 : _c.join(breakLine ? "\n" : ", ")
|
|
10363
10459
|
});
|
|
10364
10460
|
break;
|
|
10365
10461
|
case ServiceTypeEnum.LoadBalancer:
|
|
10462
|
+
if (showCopyButton) {
|
|
10463
|
+
content = renderAccessItems(((_e = (_d = status.loadBalancer) == null ? void 0 : _d.ingress) == null ? void 0 : _e.map(({
|
|
10464
|
+
ip
|
|
10465
|
+
}) => ip).filter((ip) => !!ip).map((ip) => /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceAccessAddress, {
|
|
10466
|
+
copyValue: ip,
|
|
10467
|
+
children: ip
|
|
10468
|
+
}, ip))) || [], breakLine ? "\n" : ", ");
|
|
10469
|
+
break;
|
|
10470
|
+
}
|
|
10366
10471
|
content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
10367
10472
|
useOverflow: false,
|
|
10368
|
-
value: (
|
|
10473
|
+
value: (_g = (_f = status.loadBalancer) == null ? void 0 : _f.ingress) == null ? void 0 : _g.map(({
|
|
10369
10474
|
ip
|
|
10370
10475
|
}) => ip).join(breakLine ? "\n" : ", ")
|
|
10371
10476
|
});
|
|
@@ -10392,7 +10497,7 @@ const ServiceOutClusterAccessComponent = ({
|
|
|
10392
10497
|
children: content || "-"
|
|
10393
10498
|
});
|
|
10394
10499
|
};
|
|
10395
|
-
const
|
|
10500
|
+
const index_1l1kti4 = "";
|
|
10396
10501
|
const TagWrapper = "t13a6vox";
|
|
10397
10502
|
const TagStyle = "t12ikbmp";
|
|
10398
10503
|
const Tags = (props) => {
|
|
@@ -10610,7 +10715,7 @@ const ConditionsTable = ({ conditions = [] }) => {
|
|
|
10610
10715
|
const currentSize = 10;
|
|
10611
10716
|
if (conditionsWithId.length === 0) {
|
|
10612
10717
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10613
|
-
|
|
10718
|
+
ErrorContent,
|
|
10614
10719
|
{
|
|
10615
10720
|
errorText: t2("dovetail.no_resource", { kind: t2("dovetail.condition") }),
|
|
10616
10721
|
type: ErrorContentType.List
|
|
@@ -10658,42 +10763,48 @@ function immutableSet(obj, path2, value2) {
|
|
|
10658
10763
|
return setWith(clone(obj), path2, value2, clone);
|
|
10659
10764
|
}
|
|
10660
10765
|
function usePathMap(options) {
|
|
10661
|
-
const {
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
const
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
let result = values;
|
|
10680
|
-
for (const { from, to } of pathMap || []) {
|
|
10681
|
-
result = immutableSet(
|
|
10682
|
-
values,
|
|
10683
|
-
from,
|
|
10684
|
-
get$2(result, to)
|
|
10685
|
-
);
|
|
10686
|
-
const toPath = [...to];
|
|
10687
|
-
const lastKey = toPath.pop();
|
|
10688
|
-
if (lastKey) {
|
|
10689
|
-
const obj = get$2(result, toPath);
|
|
10690
|
-
if (obj && typeof obj === "object") {
|
|
10691
|
-
delete obj[lastKey];
|
|
10766
|
+
const {
|
|
10767
|
+
pathMap,
|
|
10768
|
+
transformInitValues: transformInitValuesFromOptions,
|
|
10769
|
+
transformApplyValues: transformApplyValuesFromOptions
|
|
10770
|
+
} = options;
|
|
10771
|
+
const transformInitValues = useCallback(
|
|
10772
|
+
(values) => {
|
|
10773
|
+
const initValues = values._rawYaml || values;
|
|
10774
|
+
let result = initValues;
|
|
10775
|
+
for (const { from, to } of pathMap || []) {
|
|
10776
|
+
result = immutableSet(initValues, to, get$2(initValues, from));
|
|
10777
|
+
const fromPath = [...from];
|
|
10778
|
+
const lastKey = fromPath.pop();
|
|
10779
|
+
if (lastKey) {
|
|
10780
|
+
const obj = get$2(result, fromPath);
|
|
10781
|
+
if (obj && typeof obj === "object") {
|
|
10782
|
+
delete obj[lastKey];
|
|
10783
|
+
}
|
|
10692
10784
|
}
|
|
10693
10785
|
}
|
|
10694
|
-
|
|
10695
|
-
|
|
10696
|
-
|
|
10786
|
+
return (transformInitValuesFromOptions == null ? void 0 : transformInitValuesFromOptions(result)) || result;
|
|
10787
|
+
},
|
|
10788
|
+
[transformInitValuesFromOptions, pathMap]
|
|
10789
|
+
);
|
|
10790
|
+
const transformApplyValues = useCallback(
|
|
10791
|
+
(values) => {
|
|
10792
|
+
let result = values;
|
|
10793
|
+
for (const { from, to } of pathMap || []) {
|
|
10794
|
+
result = immutableSet(values, from, get$2(result, to));
|
|
10795
|
+
const toPath = [...to];
|
|
10796
|
+
const lastKey = toPath.pop();
|
|
10797
|
+
if (lastKey) {
|
|
10798
|
+
const obj = get$2(result, toPath);
|
|
10799
|
+
if (obj && typeof obj === "object") {
|
|
10800
|
+
delete obj[lastKey];
|
|
10801
|
+
}
|
|
10802
|
+
}
|
|
10803
|
+
}
|
|
10804
|
+
return (transformApplyValuesFromOptions == null ? void 0 : transformApplyValuesFromOptions(result)) || result;
|
|
10805
|
+
},
|
|
10806
|
+
[transformApplyValuesFromOptions, pathMap]
|
|
10807
|
+
);
|
|
10697
10808
|
return {
|
|
10698
10809
|
transformInitValues,
|
|
10699
10810
|
transformApplyValues
|
|
@@ -10756,278 +10867,276 @@ const ErrorWrapperStyle = "e19q2bnp";
|
|
|
10756
10867
|
const YamlEditorStyle = "y16u5v3w";
|
|
10757
10868
|
const MonacoYamlEditor$3 = React.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$1));
|
|
10758
10869
|
const MonacoYamlDiffEditor$2 = React.lazy(() => Promise.resolve().then(() => MonacoYamlDiffEditor$1));
|
|
10759
|
-
const YamlEditorComponent = forwardRef(
|
|
10760
|
-
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
(newVal) => {
|
|
10800
|
-
var _a;
|
|
10801
|
-
_setValue(newVal);
|
|
10802
|
-
(_a = props.onChange) == null ? void 0 : _a.call(props, newVal);
|
|
10803
|
-
},
|
|
10804
|
-
[props.onChange]
|
|
10805
|
-
);
|
|
10806
|
-
const finalOnChange = useMemo(() => {
|
|
10807
|
-
return debounceTime ? debounce(onChange, debounceTime) : onChange;
|
|
10808
|
-
}, [onChange, debounceTime]);
|
|
10809
|
-
const onValidate = useCallback(
|
|
10810
|
-
(valid, schemaValid) => {
|
|
10811
|
-
var _a;
|
|
10812
|
-
(_a = props.onValidate) == null ? void 0 : _a.call(props, valid, schemaValid);
|
|
10813
|
-
},
|
|
10814
|
-
[props.onValidate]
|
|
10815
|
-
);
|
|
10816
|
-
const onEditorCreate = useCallback(
|
|
10817
|
-
(editor) => {
|
|
10818
|
-
var _a, _b, _c;
|
|
10819
|
-
if (editor.getValue() !== _value) {
|
|
10820
|
-
(_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(_valueString);
|
|
10821
|
-
}
|
|
10822
|
-
(_c = props.onEditorCreate) == null ? void 0 : _c.call(props, editor);
|
|
10823
|
-
},
|
|
10824
|
-
[_value, props.onEditorCreate]
|
|
10825
|
-
);
|
|
10826
|
-
const getInstance = useCallback((ins) => {
|
|
10827
|
-
editorInstance.current = ins;
|
|
10828
|
-
}, []);
|
|
10829
|
-
const getEditorValue = useCallback(() => {
|
|
10870
|
+
const YamlEditorComponent = forwardRef(function YamlEditorComponent2(props, ref) {
|
|
10871
|
+
const {
|
|
10872
|
+
title,
|
|
10873
|
+
collapsable = true,
|
|
10874
|
+
isDefaultCollapsed,
|
|
10875
|
+
value: value2,
|
|
10876
|
+
defaultValue = "",
|
|
10877
|
+
height,
|
|
10878
|
+
readOnly,
|
|
10879
|
+
errorMsgs = [],
|
|
10880
|
+
schemas,
|
|
10881
|
+
eleRef,
|
|
10882
|
+
className,
|
|
10883
|
+
debounceTime,
|
|
10884
|
+
isScrollOnFocus = true,
|
|
10885
|
+
isHideActions = false
|
|
10886
|
+
} = props;
|
|
10887
|
+
const { t: t2 } = useTranslation();
|
|
10888
|
+
const [isCollapsed, setIsCollapsed] = useState(
|
|
10889
|
+
collapsable ? isDefaultCollapsed : false
|
|
10890
|
+
);
|
|
10891
|
+
const [isDiff, setIsDiff] = useState(false);
|
|
10892
|
+
const [_value, _setValue] = useState(value2 || defaultValue);
|
|
10893
|
+
const editorInstance = useRef();
|
|
10894
|
+
const [copyTooltip, setCopyTooltip] = useState(t2("dovetail.copy"));
|
|
10895
|
+
const [resetTooltip, setResetTooltip] = useState(t2("dovetail.reset_arguments"));
|
|
10896
|
+
const defaultValueString = useMemo(() => {
|
|
10897
|
+
if (typeof defaultValue === "string") {
|
|
10898
|
+
return defaultValue;
|
|
10899
|
+
}
|
|
10900
|
+
return yaml$2.dump(defaultValue);
|
|
10901
|
+
}, [defaultValue]);
|
|
10902
|
+
const _valueString = useMemo(() => {
|
|
10903
|
+
if (typeof _value === "string") {
|
|
10904
|
+
return _value;
|
|
10905
|
+
}
|
|
10906
|
+
return yaml$2.dump(_value);
|
|
10907
|
+
}, [_value]);
|
|
10908
|
+
const onChange = useCallback(
|
|
10909
|
+
(newVal) => {
|
|
10830
10910
|
var _a;
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10911
|
+
_setValue(newVal);
|
|
10912
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, newVal);
|
|
10913
|
+
},
|
|
10914
|
+
[props.onChange]
|
|
10915
|
+
);
|
|
10916
|
+
const finalOnChange = useMemo(() => {
|
|
10917
|
+
return debounceTime ? debounce(onChange, debounceTime) : onChange;
|
|
10918
|
+
}, [onChange, debounceTime]);
|
|
10919
|
+
const onValidate = useCallback(
|
|
10920
|
+
(valid, schemaValid) => {
|
|
10921
|
+
var _a;
|
|
10922
|
+
(_a = props.onValidate) == null ? void 0 : _a.call(props, valid, schemaValid);
|
|
10923
|
+
},
|
|
10924
|
+
[props.onValidate]
|
|
10925
|
+
);
|
|
10926
|
+
const onEditorCreate = useCallback(
|
|
10927
|
+
(editor) => {
|
|
10928
|
+
var _a, _b, _c;
|
|
10929
|
+
if (editor.getValue() !== _value) {
|
|
10930
|
+
(_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(_valueString);
|
|
10839
10931
|
}
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
iconWidth: 16,
|
|
10902
|
-
iconHeight: 16,
|
|
10903
|
-
onClick: () => {
|
|
10904
|
-
if (!isCollapsed) {
|
|
10905
|
-
copyToClipboard(getEditorValue());
|
|
10906
|
-
setCopyTooltip(t2("dovetail.copied"));
|
|
10907
|
-
}
|
|
10908
|
-
}
|
|
10909
|
-
}
|
|
10910
|
-
)
|
|
10911
|
-
}
|
|
10912
|
-
),
|
|
10913
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, {}),
|
|
10914
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10915
|
-
Tooltip,
|
|
10916
|
-
{
|
|
10917
|
-
title: isCollapsed ? "" : resetTooltip,
|
|
10918
|
-
onVisibleChange: (visible) => {
|
|
10919
|
-
if (!visible) {
|
|
10920
|
-
setTimeout(() => {
|
|
10921
|
-
setResetTooltip(t2("dovetail.reset_arguments"));
|
|
10922
|
-
}, 80);
|
|
10923
|
-
}
|
|
10924
|
-
},
|
|
10925
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10926
|
-
Icon,
|
|
10927
|
-
{
|
|
10928
|
-
"data-disabled": isCollapsed,
|
|
10929
|
-
src: Retry16GradientGrayIcon,
|
|
10930
|
-
hoverSrc: isCollapsed ? void 0 : Retry16GradientBlueIcon,
|
|
10931
|
-
className: IconStyle,
|
|
10932
|
-
iconWidth: 16,
|
|
10933
|
-
iconHeight: 16,
|
|
10934
|
-
onClick: () => {
|
|
10935
|
-
var _a;
|
|
10936
|
-
if (!isCollapsed) {
|
|
10937
|
-
(_a = editorInstance.current) == null ? void 0 : _a.setValue(defaultValueString);
|
|
10938
|
-
setResetTooltip(t2("dovetail.already_reset"));
|
|
10939
|
-
}
|
|
10940
|
-
}
|
|
10941
|
-
}
|
|
10942
|
-
)
|
|
10943
|
-
}
|
|
10944
|
-
),
|
|
10945
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, {})
|
|
10946
|
-
] }),
|
|
10932
|
+
(_c = props.onEditorCreate) == null ? void 0 : _c.call(props, editor);
|
|
10933
|
+
},
|
|
10934
|
+
[_value, props.onEditorCreate]
|
|
10935
|
+
);
|
|
10936
|
+
const getInstance = useCallback((ins) => {
|
|
10937
|
+
editorInstance.current = ins;
|
|
10938
|
+
}, []);
|
|
10939
|
+
const getEditorValue = useCallback(() => {
|
|
10940
|
+
var _a;
|
|
10941
|
+
return ((_a = editorInstance.current) == null ? void 0 : _a.getValue()) ?? "";
|
|
10942
|
+
}, []);
|
|
10943
|
+
useEffect(() => {
|
|
10944
|
+
var _a, _b;
|
|
10945
|
+
if (value2 !== void 0 && !isEqual$1(value2, _value)) {
|
|
10946
|
+
const valueString = typeof value2 === "string" ? value2 : yaml$2.dump(value2);
|
|
10947
|
+
_setValue(value2);
|
|
10948
|
+
(_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(valueString);
|
|
10949
|
+
}
|
|
10950
|
+
}, [value2]);
|
|
10951
|
+
useImperativeHandle(ref, () => {
|
|
10952
|
+
return {
|
|
10953
|
+
setValue: _setValue,
|
|
10954
|
+
setEditorValue: (value22) => {
|
|
10955
|
+
var _a, _b;
|
|
10956
|
+
(_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(value22);
|
|
10957
|
+
},
|
|
10958
|
+
getEditorValue,
|
|
10959
|
+
getEditorInstance: () => editorInstance.current || null
|
|
10960
|
+
};
|
|
10961
|
+
});
|
|
10962
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10963
|
+
"div",
|
|
10964
|
+
{
|
|
10965
|
+
className: cx_default(WrapperStyle$4, className),
|
|
10966
|
+
"data-is-error": !!errorMsgs.length,
|
|
10967
|
+
ref: eleRef,
|
|
10968
|
+
children: [
|
|
10969
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10970
|
+
Space,
|
|
10971
|
+
{
|
|
10972
|
+
className: cx_default(ToolBarStyle, isCollapsed ? "collapsed" : ""),
|
|
10973
|
+
direction: "vertical",
|
|
10974
|
+
size: 0,
|
|
10975
|
+
children: [
|
|
10976
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { className: ToolBarHeaderStyle, children: [
|
|
10977
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { size: 8, children: [
|
|
10978
|
+
collapsable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10979
|
+
Icon,
|
|
10980
|
+
{
|
|
10981
|
+
src: HierarchyTriangleRight16GrayIcon,
|
|
10982
|
+
hoverSrc: HierarchyTriangleRight16BlueIcon,
|
|
10983
|
+
className: cx_default(IconStyle, isCollapsed ? "" : "arrow-down"),
|
|
10984
|
+
iconWidth: 16,
|
|
10985
|
+
iconHeight: 16,
|
|
10986
|
+
onClick: () => setIsCollapsed(!isCollapsed)
|
|
10987
|
+
}
|
|
10988
|
+
),
|
|
10989
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cx_default(TitleStyle$1, "yaml-editor-title"), children: title || t2("dovetail.configure_file") })
|
|
10990
|
+
] }),
|
|
10991
|
+
isHideActions ? null : /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { size: 14, children: [
|
|
10992
|
+
isDiff ? void 0 : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
10947
10993
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10948
10994
|
Tooltip,
|
|
10949
10995
|
{
|
|
10950
|
-
title: isCollapsed ? "" :
|
|
10951
|
-
|
|
10996
|
+
title: isCollapsed ? "" : copyTooltip,
|
|
10997
|
+
onVisibleChange: (visible) => {
|
|
10998
|
+
if (!visible) {
|
|
10999
|
+
setTimeout(() => {
|
|
11000
|
+
setCopyTooltip(t2("dovetail.copy"));
|
|
11001
|
+
}, 80);
|
|
11002
|
+
}
|
|
11003
|
+
},
|
|
11004
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10952
11005
|
Icon,
|
|
10953
11006
|
{
|
|
10954
11007
|
"data-disabled": isCollapsed,
|
|
10955
|
-
src:
|
|
10956
|
-
hoverSrc: isCollapsed ? void 0 :
|
|
11008
|
+
src: ClipboardCopy16GradientGrayIcon,
|
|
11009
|
+
hoverSrc: isCollapsed ? void 0 : ClipboardCopy16GradientBlueIcon,
|
|
10957
11010
|
className: IconStyle,
|
|
10958
11011
|
iconWidth: 16,
|
|
10959
11012
|
iconHeight: 16,
|
|
10960
|
-
onClick: () =>
|
|
11013
|
+
onClick: () => {
|
|
11014
|
+
if (!isCollapsed) {
|
|
11015
|
+
copyToClipboard(getEditorValue());
|
|
11016
|
+
setCopyTooltip(t2("dovetail.copied"));
|
|
11017
|
+
}
|
|
11018
|
+
}
|
|
10961
11019
|
}
|
|
10962
|
-
)
|
|
11020
|
+
)
|
|
11021
|
+
}
|
|
11022
|
+
),
|
|
11023
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, {}),
|
|
11024
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11025
|
+
Tooltip,
|
|
11026
|
+
{
|
|
11027
|
+
title: isCollapsed ? "" : resetTooltip,
|
|
11028
|
+
onVisibleChange: (visible) => {
|
|
11029
|
+
if (!visible) {
|
|
11030
|
+
setTimeout(() => {
|
|
11031
|
+
setResetTooltip(t2("dovetail.reset_arguments"));
|
|
11032
|
+
}, 80);
|
|
11033
|
+
}
|
|
11034
|
+
},
|
|
11035
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10963
11036
|
Icon,
|
|
10964
11037
|
{
|
|
10965
11038
|
"data-disabled": isCollapsed,
|
|
10966
|
-
src:
|
|
10967
|
-
hoverSrc: isCollapsed ? void 0 :
|
|
11039
|
+
src: Retry16GradientGrayIcon,
|
|
11040
|
+
hoverSrc: isCollapsed ? void 0 : Retry16GradientBlueIcon,
|
|
10968
11041
|
className: IconStyle,
|
|
10969
11042
|
iconWidth: 16,
|
|
10970
11043
|
iconHeight: 16,
|
|
10971
|
-
onClick: () =>
|
|
11044
|
+
onClick: () => {
|
|
11045
|
+
var _a;
|
|
11046
|
+
if (!isCollapsed) {
|
|
11047
|
+
(_a = editorInstance.current) == null ? void 0 : _a.setValue(defaultValueString);
|
|
11048
|
+
setResetTooltip(t2("dovetail.already_reset"));
|
|
11049
|
+
}
|
|
11050
|
+
}
|
|
10972
11051
|
}
|
|
10973
11052
|
)
|
|
10974
11053
|
}
|
|
10975
|
-
)
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
}
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
|
|
11030
|
-
|
|
11054
|
+
),
|
|
11055
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, {})
|
|
11056
|
+
] }),
|
|
11057
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11058
|
+
Tooltip,
|
|
11059
|
+
{
|
|
11060
|
+
title: isCollapsed ? "" : isDiff ? t2("dovetail.back_to_edit") : t2("dovetail.view_changes"),
|
|
11061
|
+
children: isDiff ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11062
|
+
Icon,
|
|
11063
|
+
{
|
|
11064
|
+
"data-disabled": isCollapsed,
|
|
11065
|
+
src: EditPen16GradientGrayIcon,
|
|
11066
|
+
hoverSrc: isCollapsed ? void 0 : EditPen16GradientBlueIcon,
|
|
11067
|
+
className: IconStyle,
|
|
11068
|
+
iconWidth: 16,
|
|
11069
|
+
iconHeight: 16,
|
|
11070
|
+
onClick: () => isCollapsed ? void 0 : setIsDiff(false)
|
|
11071
|
+
}
|
|
11072
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11073
|
+
Icon,
|
|
11074
|
+
{
|
|
11075
|
+
"data-disabled": isCollapsed,
|
|
11076
|
+
src: Showdiff16GradientGrayIcon,
|
|
11077
|
+
hoverSrc: isCollapsed ? void 0 : Showdiff16GradientBlueIcon,
|
|
11078
|
+
className: IconStyle,
|
|
11079
|
+
iconWidth: 16,
|
|
11080
|
+
iconHeight: 16,
|
|
11081
|
+
onClick: () => isCollapsed ? void 0 : setIsDiff(true)
|
|
11082
|
+
}
|
|
11083
|
+
)
|
|
11084
|
+
}
|
|
11085
|
+
)
|
|
11086
|
+
] })
|
|
11087
|
+
] }),
|
|
11088
|
+
errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { className: ErrorWrapperStyle, size: 8, align: "start", children: [
|
|
11089
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(XmarkFailedSeriousWarningFill16RedIcon, { className: ErrorIconStyle$1 }),
|
|
11090
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("pre", { className: ErrorMsgStyle, children: [
|
|
11091
|
+
errorMsgs.length > 1 ? `${index2 + 1}. ` : "",
|
|
11092
|
+
errorMsg
|
|
11093
|
+
] }, errorMsg)) })
|
|
11094
|
+
] }) : void 0
|
|
11095
|
+
]
|
|
11096
|
+
}
|
|
11097
|
+
),
|
|
11098
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11099
|
+
"div",
|
|
11100
|
+
{
|
|
11101
|
+
style: {
|
|
11102
|
+
display: isCollapsed ? "none" : "block",
|
|
11103
|
+
width: "100%",
|
|
11104
|
+
height: height || "500px",
|
|
11105
|
+
zIndex: 1
|
|
11106
|
+
},
|
|
11107
|
+
children: [
|
|
11108
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: _valueString }), children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: isDiff ? "none" : "block" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11109
|
+
MonacoYamlEditor$3,
|
|
11110
|
+
{
|
|
11111
|
+
id: props.id,
|
|
11112
|
+
getInstance,
|
|
11113
|
+
defaultValue: _value,
|
|
11114
|
+
height,
|
|
11115
|
+
onChange: finalOnChange,
|
|
11116
|
+
onValidate,
|
|
11117
|
+
onEditorCreate,
|
|
11118
|
+
onBlur: props.onBlur,
|
|
11119
|
+
schemas,
|
|
11120
|
+
readOnly,
|
|
11121
|
+
isScrollOnFocus
|
|
11122
|
+
}
|
|
11123
|
+
) }) }),
|
|
11124
|
+
isDiff ? /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: _valueString }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11125
|
+
MonacoYamlDiffEditor$2,
|
|
11126
|
+
{
|
|
11127
|
+
id: props.id,
|
|
11128
|
+
origin: defaultValueString,
|
|
11129
|
+
modified: _valueString,
|
|
11130
|
+
height
|
|
11131
|
+
}
|
|
11132
|
+
) }) : null
|
|
11133
|
+
]
|
|
11134
|
+
}
|
|
11135
|
+
)
|
|
11136
|
+
]
|
|
11137
|
+
}
|
|
11138
|
+
);
|
|
11139
|
+
});
|
|
11031
11140
|
function copyToClipboard(text) {
|
|
11032
11141
|
const input = document.createElement("textarea");
|
|
11033
11142
|
input.value = text;
|
|
@@ -11100,14 +11209,7 @@ function use409Retry({
|
|
|
11100
11209
|
function useK8sYamlEditor() {
|
|
11101
11210
|
const foldSymbol = useCallback(function(editor, symbol) {
|
|
11102
11211
|
const model = editor.getModel();
|
|
11103
|
-
const matchs = (model == null ? void 0 : model.findMatches(
|
|
11104
|
-
symbol,
|
|
11105
|
-
false,
|
|
11106
|
-
false,
|
|
11107
|
-
false,
|
|
11108
|
-
"",
|
|
11109
|
-
false
|
|
11110
|
-
).filter((match) => match.range.startColumn === 1)) || [];
|
|
11212
|
+
const matchs = (model == null ? void 0 : model.findMatches(symbol, false, false, false, "", false).filter((match) => match.range.startColumn === 1)) || [];
|
|
11111
11213
|
return new Promise(async (resolve, reject) => {
|
|
11112
11214
|
try {
|
|
11113
11215
|
for (const match of matchs) {
|
|
@@ -11121,19 +11223,22 @@ function useK8sYamlEditor() {
|
|
|
11121
11223
|
}
|
|
11122
11224
|
});
|
|
11123
11225
|
}, []);
|
|
11124
|
-
const fold2 = useCallback(
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11226
|
+
const fold2 = useCallback(
|
|
11227
|
+
async function(editor) {
|
|
11228
|
+
await editor.getAction("editor.unfoldAll").run();
|
|
11229
|
+
const symbols = [
|
|
11230
|
+
" annotations:",
|
|
11231
|
+
" managedFields:",
|
|
11232
|
+
"status:",
|
|
11233
|
+
" kubectl.kubernetes.io/last-applied-configuration:"
|
|
11234
|
+
];
|
|
11235
|
+
for (const symbol of symbols) {
|
|
11236
|
+
await foldSymbol(editor, symbol);
|
|
11237
|
+
}
|
|
11238
|
+
editor.setScrollPosition({ scrollTop: 0 });
|
|
11239
|
+
},
|
|
11240
|
+
[foldSymbol]
|
|
11241
|
+
);
|
|
11137
11242
|
return {
|
|
11138
11243
|
fold: fold2
|
|
11139
11244
|
};
|
|
@@ -11330,7 +11435,14 @@ const useYamlForm = ({
|
|
|
11330
11435
|
pruneBeforeEdit(initialValues2);
|
|
11331
11436
|
}
|
|
11332
11437
|
return (transformInitValues == null ? void 0 : transformInitValues(initialValues2)) || initialValues2;
|
|
11333
|
-
}, [
|
|
11438
|
+
}, [
|
|
11439
|
+
queryResult,
|
|
11440
|
+
globalStore,
|
|
11441
|
+
initialValuesForCreate,
|
|
11442
|
+
action,
|
|
11443
|
+
initialValuesForEdit,
|
|
11444
|
+
transformInitValues
|
|
11445
|
+
]);
|
|
11334
11446
|
const finalErrors = useMemo(() => {
|
|
11335
11447
|
return uniq([...editorErrors, ...rulesErrors]);
|
|
11336
11448
|
}, [editorErrors, rulesErrors]);
|
|
@@ -11447,13 +11559,16 @@ const useYamlForm = ({
|
|
|
11447
11559
|
try {
|
|
11448
11560
|
let hasErrors = false;
|
|
11449
11561
|
setIsBeforeSubmitLoading(true);
|
|
11450
|
-
const result = await beforeSubmit(
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
|
|
11562
|
+
const result = await beforeSubmit(
|
|
11563
|
+
finalValues,
|
|
11564
|
+
(errors2) => {
|
|
11565
|
+
if (errors2 && errors2.length > 0) {
|
|
11566
|
+
setBeforeSubmitErrors(errors2);
|
|
11567
|
+
onBeforeSubmitError == null ? void 0 : onBeforeSubmitError(errors2);
|
|
11568
|
+
hasErrors = true;
|
|
11569
|
+
}
|
|
11455
11570
|
}
|
|
11456
|
-
|
|
11571
|
+
);
|
|
11457
11572
|
if (hasErrors) {
|
|
11458
11573
|
onSubmitAbort == null ? void 0 : onSubmitAbort();
|
|
11459
11574
|
return;
|
|
@@ -11648,7 +11763,7 @@ function YamlForm(props) {
|
|
|
11648
11763
|
isEdit: action === "edit"
|
|
11649
11764
|
})
|
|
11650
11765
|
})]
|
|
11651
|
-
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11766
|
+
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContent, {
|
|
11652
11767
|
errorText: t2("dovetail.fetch_schema_fail"),
|
|
11653
11768
|
refetch: fetchSchema
|
|
11654
11769
|
});
|
|
@@ -11793,6 +11908,7 @@ function RawYamlFormModal(props) {
|
|
|
11793
11908
|
},
|
|
11794
11909
|
okText: ((_c = resourceConfig.formConfig) == null ? void 0 : _c.saveButtonText) || okText,
|
|
11795
11910
|
destroyOnClose: true,
|
|
11911
|
+
isContentFull: true,
|
|
11796
11912
|
children: [desc ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
11797
11913
|
className: FormDescStyle$1,
|
|
11798
11914
|
children: desc
|
|
@@ -11835,8 +11951,9 @@ function useOpenForm() {
|
|
|
11835
11951
|
if (formType === void 0 || formType === FormContainerType.MODAL) {
|
|
11836
11952
|
pushModal({
|
|
11837
11953
|
component: () => {
|
|
11838
|
-
var _a2;
|
|
11839
|
-
|
|
11954
|
+
var _a2, _b2, _c;
|
|
11955
|
+
const isYamlOnlyForm = ((_a2 = resourceConfig.formConfig) == null ? void 0 : _a2.formType) !== FormType.FORM && !((_b2 = resourceConfig.formConfig) == null ? void 0 : _b2.CustomFormModal);
|
|
11956
|
+
if ((options == null ? void 0 : options.useYamlEditor) || isYamlOnlyForm) {
|
|
11840
11957
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11841
11958
|
RawYamlFormModal,
|
|
11842
11959
|
{
|
|
@@ -11849,7 +11966,7 @@ function useOpenForm() {
|
|
|
11849
11966
|
}
|
|
11850
11967
|
);
|
|
11851
11968
|
}
|
|
11852
|
-
const ModalComponent = ((
|
|
11969
|
+
const ModalComponent = ((_c = resourceConfig.formConfig) == null ? void 0 : _c.CustomFormModal) || FormModal;
|
|
11853
11970
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11854
11971
|
ModalComponent,
|
|
11855
11972
|
{
|
|
@@ -12369,34 +12486,6 @@ function CreateButton(props) {
|
|
|
12369
12486
|
}
|
|
12370
12487
|
);
|
|
12371
12488
|
}
|
|
12372
|
-
const useDeleteManyModal = (resource, ids) => {
|
|
12373
|
-
const { mutate } = useDeleteMany();
|
|
12374
|
-
const [visible, setVisible] = useState(false);
|
|
12375
|
-
const { t: t2 } = useTranslation();
|
|
12376
|
-
const modalProps = {
|
|
12377
|
-
title: t2("dovetail.delete"),
|
|
12378
|
-
okText: t2("dovetail.delete"),
|
|
12379
|
-
okButtonProps: {
|
|
12380
|
-
danger: true
|
|
12381
|
-
},
|
|
12382
|
-
cancelText: t2("dovetail.cancel"),
|
|
12383
|
-
children: t2("dovetail.confirm_delete_text", {
|
|
12384
|
-
target: ids,
|
|
12385
|
-
interpolation: { escapeValue: false }
|
|
12386
|
-
}),
|
|
12387
|
-
onOk() {
|
|
12388
|
-
mutate({
|
|
12389
|
-
resource,
|
|
12390
|
-
ids
|
|
12391
|
-
});
|
|
12392
|
-
setVisible(false);
|
|
12393
|
-
},
|
|
12394
|
-
onCancel() {
|
|
12395
|
-
setVisible(false);
|
|
12396
|
-
}
|
|
12397
|
-
};
|
|
12398
|
-
return { modalProps, visible, setVisible };
|
|
12399
|
-
};
|
|
12400
12489
|
const DeleteManyButton = (props) => {
|
|
12401
12490
|
const { resource } = useResource();
|
|
12402
12491
|
const { t: t2 } = useTranslation();
|
|
@@ -12504,7 +12593,7 @@ const CronjobJobsTable = ({
|
|
|
12504
12593
|
tableProps
|
|
12505
12594
|
} = useEagleTable(params);
|
|
12506
12595
|
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
12507
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12596
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContent, {
|
|
12508
12597
|
errorText: i18n2.t("dovetail.no_resource", {
|
|
12509
12598
|
kind: " Job"
|
|
12510
12599
|
}),
|
|
@@ -12610,7 +12699,7 @@ const EventsTable = ({ uid }) => {
|
|
|
12610
12699
|
const Table2 = component.Table || Table$1;
|
|
12611
12700
|
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
12612
12701
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12613
|
-
|
|
12702
|
+
ErrorContent,
|
|
12614
12703
|
{
|
|
12615
12704
|
errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.event") }),
|
|
12616
12705
|
type: ErrorContentType.List
|
|
@@ -12650,6 +12739,25 @@ function LinkFallback({
|
|
|
12650
12739
|
children: fullPath
|
|
12651
12740
|
});
|
|
12652
12741
|
}
|
|
12742
|
+
const PathWithCopy_mkk1t8 = "";
|
|
12743
|
+
const PathCellStyle = "prjtqnv";
|
|
12744
|
+
const PathTextStyle = "pci82dd";
|
|
12745
|
+
const PathCopyStyle = "pmf8toc";
|
|
12746
|
+
const PathWithCopy = ({
|
|
12747
|
+
value: value2,
|
|
12748
|
+
children
|
|
12749
|
+
}) => {
|
|
12750
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
12751
|
+
className: PathCellStyle,
|
|
12752
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
12753
|
+
className: PathTextStyle,
|
|
12754
|
+
children
|
|
12755
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(CopyButton, {
|
|
12756
|
+
value: value2,
|
|
12757
|
+
className: PathCopyStyle
|
|
12758
|
+
})]
|
|
12759
|
+
});
|
|
12760
|
+
};
|
|
12653
12761
|
const index_x36tts = "";
|
|
12654
12762
|
const LinkStyle = "l1vnw9x0";
|
|
12655
12763
|
const ResourceLink = (props) => {
|
|
@@ -12700,7 +12808,7 @@ const ResourceLink = (props) => {
|
|
|
12700
12808
|
value: ""
|
|
12701
12809
|
});
|
|
12702
12810
|
};
|
|
12703
|
-
const IngressRulesTable = ({ ingress }) => {
|
|
12811
|
+
const IngressRulesTable = ({ ingress: ingress2 }) => {
|
|
12704
12812
|
const { t: t2 } = useTranslation();
|
|
12705
12813
|
const { data: serviceData } = useList({
|
|
12706
12814
|
resource: "services",
|
|
@@ -12710,8 +12818,8 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
12710
12818
|
}
|
|
12711
12819
|
});
|
|
12712
12820
|
const flattenedRules = useMemo(
|
|
12713
|
-
() => (serviceData == null ? void 0 : serviceData.data) ?
|
|
12714
|
-
[serviceData == null ? void 0 : serviceData.data,
|
|
12821
|
+
() => (serviceData == null ? void 0 : serviceData.data) ? ingress2.getFlattenedRules(serviceData == null ? void 0 : serviceData.data) : [],
|
|
12822
|
+
[serviceData == null ? void 0 : serviceData.data, ingress2]
|
|
12715
12823
|
);
|
|
12716
12824
|
const rows = useMemo(() => {
|
|
12717
12825
|
return addId(flattenedRules || [], "fullPath");
|
|
@@ -12736,7 +12844,10 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
12736
12844
|
width: 478,
|
|
12737
12845
|
sortable: true,
|
|
12738
12846
|
render(value2) {
|
|
12739
|
-
|
|
12847
|
+
if (!value2) {
|
|
12848
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" });
|
|
12849
|
+
}
|
|
12850
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(PathWithCopy, { value: value2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LinkFallback, { fullPath: value2 }) });
|
|
12740
12851
|
}
|
|
12741
12852
|
},
|
|
12742
12853
|
{
|
|
@@ -12751,7 +12862,7 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
12751
12862
|
ResourceLink,
|
|
12752
12863
|
{
|
|
12753
12864
|
resourceName: "services",
|
|
12754
|
-
namespace:
|
|
12865
|
+
namespace: ingress2.metadata.namespace || "default",
|
|
12755
12866
|
name: serviceName
|
|
12756
12867
|
}
|
|
12757
12868
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" });
|
|
@@ -12773,14 +12884,14 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
12773
12884
|
width: 160,
|
|
12774
12885
|
render(host2) {
|
|
12775
12886
|
var _a, _b;
|
|
12776
|
-
const secretName = (_b = (_a =
|
|
12887
|
+
const secretName = (_b = (_a = ingress2._rawYaml.spec.tls) == null ? void 0 : _a.find(
|
|
12777
12888
|
({ hosts }) => hosts == null ? void 0 : hosts.includes(host2)
|
|
12778
12889
|
)) == null ? void 0 : _b.secretName;
|
|
12779
12890
|
return secretName ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12780
12891
|
ResourceLink,
|
|
12781
12892
|
{
|
|
12782
12893
|
resourceName: "secrets",
|
|
12783
|
-
namespace:
|
|
12894
|
+
namespace: ingress2.metadata.namespace || "default",
|
|
12784
12895
|
name: secretName
|
|
12785
12896
|
}
|
|
12786
12897
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" });
|
|
@@ -12799,7 +12910,7 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
12799
12910
|
});
|
|
12800
12911
|
if ((rows == null ? void 0 : rows.length) === 0) {
|
|
12801
12912
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12802
|
-
|
|
12913
|
+
ErrorContent,
|
|
12803
12914
|
{
|
|
12804
12915
|
errorText: t2("dovetail.no_resource", { kind: t2("dovetail.rule") }),
|
|
12805
12916
|
type: ErrorContentType.List
|
|
@@ -12854,7 +12965,7 @@ const KeyValue = (props) => {
|
|
|
12854
12965
|
}, key2);
|
|
12855
12966
|
});
|
|
12856
12967
|
if (!result.length) {
|
|
12857
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12968
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContent, {
|
|
12858
12969
|
errorText: empty2 || t2("dovetail.empty"),
|
|
12859
12970
|
type: errorContent
|
|
12860
12971
|
});
|
|
@@ -12951,9 +13062,7 @@ function readFileAsBase64(file) {
|
|
|
12951
13062
|
if (isUtf8(arrayBuffer)) {
|
|
12952
13063
|
resolve(await file.text());
|
|
12953
13064
|
} else {
|
|
12954
|
-
const base64String = btoa(
|
|
12955
|
-
String.fromCharCode(...new Uint8Array(arrayBuffer))
|
|
12956
|
-
);
|
|
13065
|
+
const base64String = btoa(String.fromCharCode(...new Uint8Array(arrayBuffer)));
|
|
12957
13066
|
resolve(base64String);
|
|
12958
13067
|
}
|
|
12959
13068
|
return;
|
|
@@ -13519,7 +13628,7 @@ const NodeTaintsTable = ({
|
|
|
13519
13628
|
});
|
|
13520
13629
|
const currentSize = 10;
|
|
13521
13630
|
if (taintsWithId.length === 0) {
|
|
13522
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13631
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContent, {
|
|
13523
13632
|
errorText: t2("dovetail.no_resource", {
|
|
13524
13633
|
kind: t2("dovetail.taint")
|
|
13525
13634
|
}),
|
|
@@ -13615,10 +13724,10 @@ function Table(props) {
|
|
|
13615
13724
|
var _a2;
|
|
13616
13725
|
(_a2 = tableProps.onClearSearchKeyword) == null ? void 0 : _a2.call(tableProps);
|
|
13617
13726
|
};
|
|
13618
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13727
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContent, { errorText: i18n2.t("dovetail.no_search_result"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: onClear, type: "ordinary", children: i18n2.t("dovetail.clear_search_condition") }) });
|
|
13619
13728
|
}
|
|
13620
13729
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13621
|
-
|
|
13730
|
+
ErrorContent,
|
|
13622
13731
|
{
|
|
13623
13732
|
errorText: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: resourceType }),
|
|
13624
13733
|
...errorContentProps
|
|
@@ -13710,7 +13819,7 @@ const StateTag = (props) => {
|
|
|
13710
13819
|
}
|
|
13711
13820
|
);
|
|
13712
13821
|
};
|
|
13713
|
-
const
|
|
13822
|
+
const WorkloadPodsTable_a750q3 = "";
|
|
13714
13823
|
const WorkloadPodsTable = ({
|
|
13715
13824
|
namespace: namespace2,
|
|
13716
13825
|
selector,
|
|
@@ -13746,14 +13855,16 @@ const WorkloadPodsTable = ({
|
|
|
13746
13855
|
kind: "Pod"
|
|
13747
13856
|
},
|
|
13748
13857
|
filters: {
|
|
13749
|
-
permanent: [
|
|
13750
|
-
|
|
13751
|
-
|
|
13752
|
-
|
|
13753
|
-
|
|
13858
|
+
permanent: [
|
|
13859
|
+
{
|
|
13860
|
+
field: "",
|
|
13861
|
+
value: "",
|
|
13862
|
+
fn(item) {
|
|
13863
|
+
return filter ? filter(item) : matchSelector(item, selector, namespace2);
|
|
13864
|
+
}
|
|
13754
13865
|
}
|
|
13755
13866
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13756
|
-
|
|
13867
|
+
]
|
|
13757
13868
|
}
|
|
13758
13869
|
}
|
|
13759
13870
|
});
|
|
@@ -13761,7 +13872,7 @@ const WorkloadPodsTable = ({
|
|
|
13761
13872
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, {});
|
|
13762
13873
|
}
|
|
13763
13874
|
if (((_a = tableProps.data) == null ? void 0 : _a.length) === 0) {
|
|
13764
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13875
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContent, {
|
|
13765
13876
|
errorText: i18n2.t("dovetail.no_resource", {
|
|
13766
13877
|
kind: ` ${i18n2.t("dovetail.pod")}`
|
|
13767
13878
|
}),
|
|
@@ -14229,7 +14340,8 @@ const ServiceOutClusterAccessField = (clusterVip) => ({
|
|
|
14229
14340
|
service: record,
|
|
14230
14341
|
breakLine: false,
|
|
14231
14342
|
clusterVip,
|
|
14232
|
-
showDashedUnderline: false
|
|
14343
|
+
showDashedUnderline: false,
|
|
14344
|
+
showCopyButton: true
|
|
14233
14345
|
});
|
|
14234
14346
|
}
|
|
14235
14347
|
});
|
|
@@ -14247,14 +14359,14 @@ const PodSelectorField = () => ({
|
|
|
14247
14359
|
const PortsTableField = () => ({
|
|
14248
14360
|
key: "ports",
|
|
14249
14361
|
path: [],
|
|
14250
|
-
renderContent: (_,
|
|
14362
|
+
renderContent: (_, service2) => {
|
|
14251
14363
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
14252
14364
|
style: {
|
|
14253
14365
|
padding: "0 24px",
|
|
14254
14366
|
height: "100%"
|
|
14255
14367
|
},
|
|
14256
14368
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(PortsTable, {
|
|
14257
|
-
service
|
|
14369
|
+
service: service2
|
|
14258
14370
|
})
|
|
14259
14371
|
});
|
|
14260
14372
|
}
|
|
@@ -14562,7 +14674,7 @@ const LabelsAndAnnotationsShow = ({
|
|
|
14562
14674
|
children: sksI18n.t("dovetail.label")
|
|
14563
14675
|
}), Object.keys(labels || {}).length ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tags, {
|
|
14564
14676
|
value: labels
|
|
14565
|
-
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14677
|
+
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContent, {
|
|
14566
14678
|
errorText: sksI18n.t("dovetail.no_labels"),
|
|
14567
14679
|
type: ErrorContentType.Item
|
|
14568
14680
|
})]
|
|
@@ -14590,7 +14702,7 @@ const NetworkPolicyRulesViewer = ({
|
|
|
14590
14702
|
t: t2
|
|
14591
14703
|
} = useTranslation();
|
|
14592
14704
|
if (!ingressOrEgress) {
|
|
14593
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14705
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContent, {
|
|
14594
14706
|
errorText: t2("dovetail.no_resource", {
|
|
14595
14707
|
kind: kind || t2("dovetail.rule")
|
|
14596
14708
|
}),
|
|
@@ -14785,7 +14897,7 @@ const PodLog = ({
|
|
|
14785
14897
|
})]
|
|
14786
14898
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
14787
14899
|
className: ContentStyle$1,
|
|
14788
|
-
children: logType === "previous" && !logs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14900
|
+
children: logType === "previous" && !logs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContent, {
|
|
14789
14901
|
style: {
|
|
14790
14902
|
height: "100%"
|
|
14791
14903
|
},
|
|
@@ -14951,11 +15063,11 @@ const NetworkPolicyIngressRulesTab = ({
|
|
|
14951
15063
|
fields: [{
|
|
14952
15064
|
key: "Ingress",
|
|
14953
15065
|
path: ["spec", "ingress"],
|
|
14954
|
-
render: (
|
|
15066
|
+
render: (ingress2) => {
|
|
14955
15067
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
14956
15068
|
className: NetworkPolicyRulesViewerStyle,
|
|
14957
15069
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(NetworkPolicyRulesViewer, {
|
|
14958
|
-
ingressOrEgress:
|
|
15070
|
+
ingressOrEgress: ingress2
|
|
14959
15071
|
})
|
|
14960
15072
|
});
|
|
14961
15073
|
}
|
|
@@ -15030,7 +15142,9 @@ const PodContainersTable = ({
|
|
|
15030
15142
|
const isInit = initContainerStatuses.some(
|
|
15031
15143
|
(c2) => c2.containerID === record.containerID
|
|
15032
15144
|
);
|
|
15033
|
-
return i18n2.t(
|
|
15145
|
+
return i18n2.t(
|
|
15146
|
+
isInit ? "dovetail.init_container" : "dovetail.regular_container"
|
|
15147
|
+
);
|
|
15034
15148
|
}
|
|
15035
15149
|
},
|
|
15036
15150
|
{
|
|
@@ -15060,10 +15174,12 @@ const PodContainersTable = ({
|
|
|
15060
15174
|
[i18n2, initContainerStatuses]
|
|
15061
15175
|
);
|
|
15062
15176
|
const dataSource = useMemo(
|
|
15063
|
-
() => addId(containerStatuses.concat(initContainerStatuses), "containerID").map(
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15177
|
+
() => addId(containerStatuses.concat(initContainerStatuses), "containerID").map(
|
|
15178
|
+
(container2) => ({
|
|
15179
|
+
...container2,
|
|
15180
|
+
startedAt: get$2(container2, ["state", "running", "startedAt"]) || get$2(container2, ["state", "terminated", "startedAt"])
|
|
15181
|
+
})
|
|
15182
|
+
),
|
|
15067
15183
|
[containerStatuses, initContainerStatuses]
|
|
15068
15184
|
);
|
|
15069
15185
|
const {
|
|
@@ -15074,14 +15190,16 @@ const PodContainersTable = ({
|
|
|
15074
15190
|
} = useTableData({
|
|
15075
15191
|
data: dataSource,
|
|
15076
15192
|
columns,
|
|
15077
|
-
defaultSorters: [
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15193
|
+
defaultSorters: [
|
|
15194
|
+
{
|
|
15195
|
+
field: "startedAt",
|
|
15196
|
+
order: "desc"
|
|
15197
|
+
}
|
|
15198
|
+
]
|
|
15081
15199
|
});
|
|
15082
15200
|
if (dataSource.length === 0) {
|
|
15083
15201
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
15084
|
-
|
|
15202
|
+
ErrorContent,
|
|
15085
15203
|
{
|
|
15086
15204
|
errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.container") }),
|
|
15087
15205
|
type: ErrorContentType.Card
|
|
@@ -15095,7 +15213,9 @@ const PodContainersTable = ({
|
|
|
15095
15213
|
loading: false,
|
|
15096
15214
|
data: finalData,
|
|
15097
15215
|
total: dataSource.length,
|
|
15098
|
-
columns: addDefaultRenderToColumns(
|
|
15216
|
+
columns: addDefaultRenderToColumns(
|
|
15217
|
+
columns
|
|
15218
|
+
),
|
|
15099
15219
|
rowKey: "containerID",
|
|
15100
15220
|
error: false,
|
|
15101
15221
|
defaultSize: currentSize,
|
|
@@ -15218,11 +15338,11 @@ const NetworkPolicyIngressRulesGroup = (i18n2) => ({
|
|
|
15218
15338
|
{
|
|
15219
15339
|
key: "Ingress",
|
|
15220
15340
|
path: ["spec", "ingress"],
|
|
15221
|
-
renderContent: (
|
|
15341
|
+
renderContent: (ingress2) => {
|
|
15222
15342
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
15223
15343
|
NetworkPolicyRulesViewer,
|
|
15224
15344
|
{
|
|
15225
|
-
ingressOrEgress:
|
|
15345
|
+
ingressOrEgress: ingress2,
|
|
15226
15346
|
kind: ` ${i18n2.t("dovetail.ingress_rule")}`
|
|
15227
15347
|
}
|
|
15228
15348
|
);
|
|
@@ -15276,7 +15396,7 @@ function Tabs(props) {
|
|
|
15276
15396
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
|
|
15277
15397
|
}) });
|
|
15278
15398
|
}
|
|
15279
|
-
const
|
|
15399
|
+
const ShowContentView_szlndu = "";
|
|
15280
15400
|
const ShowContentWrapperStyle = "soapvs9";
|
|
15281
15401
|
const BackButton = "b13d603q";
|
|
15282
15402
|
const ToolBarWrapper = "tm8eaia";
|
|
@@ -15720,7 +15840,7 @@ function ReplicasDropdown(props) {
|
|
|
15720
15840
|
] });
|
|
15721
15841
|
}
|
|
15722
15842
|
const PodShell = lazy(
|
|
15723
|
-
() => import("./PodShell-
|
|
15843
|
+
() => import("./PodShell-a6ed3498.js").then((module2) => ({ default: module2.PodShell }))
|
|
15724
15844
|
);
|
|
15725
15845
|
function PodShellModal(props) {
|
|
15726
15846
|
const { pod: pod2 } = props;
|
|
@@ -16067,9 +16187,9 @@ function ResourceShow(props) {
|
|
|
16067
16187
|
}
|
|
16068
16188
|
);
|
|
16069
16189
|
}
|
|
16070
|
-
const
|
|
16190
|
+
const button_a1727f = "";
|
|
16071
16191
|
const WarningButtonStyle = "wwyz7ti";
|
|
16072
|
-
const
|
|
16192
|
+
const modal_1muog24 = "";
|
|
16073
16193
|
const SmallModalStyle = "s1nc293e";
|
|
16074
16194
|
const ExtraSubmitFooter_15u4r8u = "";
|
|
16075
16195
|
const FooterStyle = "f16wn4bu";
|
|
@@ -17034,6 +17154,7 @@ const useForm = ({
|
|
|
17034
17154
|
const [transformedInitValues, setTransformedInitValues] = useState(useHookFormResult.getValues());
|
|
17035
17155
|
const [beforeSubmitErrors, setBeforeSubmitErrors] = useState([]);
|
|
17036
17156
|
const [isBeforeSubmitLoading, setIsBeforeSubmitLoading] = useState(false);
|
|
17157
|
+
const hasAppliedInitialDataRef = useRef(false);
|
|
17037
17158
|
const {
|
|
17038
17159
|
watch,
|
|
17039
17160
|
setValue,
|
|
@@ -17086,7 +17207,7 @@ const useForm = ({
|
|
|
17086
17207
|
}, [captureInitialResource, (_a = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a.data]);
|
|
17087
17208
|
useEffect(() => {
|
|
17088
17209
|
var _a2;
|
|
17089
|
-
if (formState.isDirty)
|
|
17210
|
+
if (hasAppliedInitialDataRef.current || formState.isDirty)
|
|
17090
17211
|
return;
|
|
17091
17212
|
const data2 = (_a2 = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a2.data;
|
|
17092
17213
|
if (!data2)
|
|
@@ -17104,6 +17225,7 @@ const useForm = ({
|
|
|
17104
17225
|
});
|
|
17105
17226
|
}
|
|
17106
17227
|
});
|
|
17228
|
+
hasAppliedInitialDataRef.current = true;
|
|
17107
17229
|
setTransformedInitValues(getValues());
|
|
17108
17230
|
}, [queryResult == null ? void 0 : queryResult.data, setValue, transformInitValues, formState.isDirty, getValues]);
|
|
17109
17231
|
useEffect(() => {
|
|
@@ -17762,31 +17884,43 @@ function CronJobDropdown(props) {
|
|
|
17762
17884
|
values: v,
|
|
17763
17885
|
successNotification() {
|
|
17764
17886
|
return {
|
|
17765
|
-
message: t2(
|
|
17766
|
-
|
|
17767
|
-
|
|
17768
|
-
|
|
17769
|
-
|
|
17887
|
+
message: t2(
|
|
17888
|
+
suspended ? "dovetail.resume_success_toast" : "dovetail.pause_success_toast",
|
|
17889
|
+
{
|
|
17890
|
+
kind: record.kind,
|
|
17891
|
+
name: id,
|
|
17892
|
+
interpolation: {
|
|
17893
|
+
escapeValue: false
|
|
17894
|
+
}
|
|
17770
17895
|
}
|
|
17771
|
-
|
|
17896
|
+
),
|
|
17772
17897
|
type: "success"
|
|
17773
17898
|
};
|
|
17774
17899
|
},
|
|
17775
17900
|
errorNotification() {
|
|
17776
17901
|
return {
|
|
17777
|
-
message: t2(
|
|
17778
|
-
|
|
17779
|
-
|
|
17780
|
-
|
|
17781
|
-
|
|
17902
|
+
message: t2(
|
|
17903
|
+
suspended ? "dovetail.resume_failed_toast" : "dovetail.pause_failed_toast",
|
|
17904
|
+
{
|
|
17905
|
+
kind: record.kind,
|
|
17906
|
+
name: id,
|
|
17907
|
+
interpolation: {
|
|
17908
|
+
escapeValue: false
|
|
17909
|
+
}
|
|
17782
17910
|
}
|
|
17783
|
-
|
|
17911
|
+
),
|
|
17784
17912
|
type: "error"
|
|
17785
17913
|
};
|
|
17786
17914
|
}
|
|
17787
17915
|
});
|
|
17788
17916
|
},
|
|
17789
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17917
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17918
|
+
Icon,
|
|
17919
|
+
{
|
|
17920
|
+
src: suspended ? RecoverContinue16GradientBlueIcon : Pause16GradientBlueIcon,
|
|
17921
|
+
children: t2(suspended ? "dovetail.resume" : "dovetail.suspend")
|
|
17922
|
+
}
|
|
17923
|
+
)
|
|
17790
17924
|
}
|
|
17791
17925
|
) : null });
|
|
17792
17926
|
}
|
|
@@ -18303,7 +18437,9 @@ const DeleteButton = () => {
|
|
|
18303
18437
|
const { resource } = useResource();
|
|
18304
18438
|
const { id } = useParsed();
|
|
18305
18439
|
const { t: t2 } = useTranslation();
|
|
18306
|
-
const { openDeleteConfirmModal } = useDeleteModal({
|
|
18440
|
+
const { openDeleteConfirmModal } = useDeleteModal({
|
|
18441
|
+
resourceName: (resource == null ? void 0 : resource.name) || ""
|
|
18442
|
+
});
|
|
18307
18443
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18308
18444
|
Button,
|
|
18309
18445
|
{
|
|
@@ -18314,7 +18450,7 @@ const DeleteButton = () => {
|
|
|
18314
18450
|
}
|
|
18315
18451
|
) });
|
|
18316
18452
|
};
|
|
18317
|
-
const
|
|
18453
|
+
const index_e6cgji = "";
|
|
18318
18454
|
const MenuStyle = "mdppgn0";
|
|
18319
18455
|
const Menu = () => {
|
|
18320
18456
|
const {
|
|
@@ -19451,9 +19587,9 @@ const PortsConfigForm = React.forwardRef(function PortsConfigForm2({ value: valu
|
|
|
19451
19587
|
});
|
|
19452
19588
|
const nodePortsFromOtherServices = useMemo(() => {
|
|
19453
19589
|
var _a;
|
|
19454
|
-
return ((_a = services == null ? void 0 : services.data) == null ? void 0 : _a.filter((
|
|
19590
|
+
return ((_a = services == null ? void 0 : services.data) == null ? void 0 : _a.filter((service2) => service2.id !== serviceId).map((service2) => {
|
|
19455
19591
|
var _a2, _b;
|
|
19456
|
-
return (_b = (_a2 =
|
|
19592
|
+
return (_b = (_a2 = service2 == null ? void 0 : service2.spec) == null ? void 0 : _a2.ports) == null ? void 0 : _b.map((port2) => port2.nodePort);
|
|
19457
19593
|
}).flat().filter((port2) => port2 !== void 0)) || [];
|
|
19458
19594
|
}, [services, serviceId]);
|
|
19459
19595
|
const columns = useMemo(() => {
|
|
@@ -19646,7 +19782,7 @@ const PortsConfigForm = React.forwardRef(function PortsConfigForm2({ value: valu
|
|
|
19646
19782
|
}
|
|
19647
19783
|
);
|
|
19648
19784
|
});
|
|
19649
|
-
const IngressRulesComponent = ({ ingress, noLink }) => {
|
|
19785
|
+
const IngressRulesComponent = ({ ingress: ingress2, noLink }) => {
|
|
19650
19786
|
const { data: serviceData } = useList({
|
|
19651
19787
|
resource: "services",
|
|
19652
19788
|
meta: {
|
|
@@ -19654,12 +19790,12 @@ const IngressRulesComponent = ({ ingress, noLink }) => {
|
|
|
19654
19790
|
apiVersion: "v1"
|
|
19655
19791
|
}
|
|
19656
19792
|
});
|
|
19657
|
-
const flattenedRules = (serviceData == null ? void 0 : serviceData.data) ?
|
|
19793
|
+
const flattenedRules = (serviceData == null ? void 0 : serviceData.data) ? ingress2.getFlattenedRules(serviceData == null ? void 0 : serviceData.data) : [];
|
|
19658
19794
|
const result = flattenedRules.map((r2) => {
|
|
19659
19795
|
var _a, _b;
|
|
19660
19796
|
const arrow = " → ";
|
|
19661
19797
|
const divider = " | ";
|
|
19662
|
-
const secretName = (_b = (_a =
|
|
19798
|
+
const secretName = (_b = (_a = ingress2.spec.tls) == null ? void 0 : _a.find(
|
|
19663
19799
|
({ hosts }) => hosts == null ? void 0 : hosts.includes(r2.host || "")
|
|
19664
19800
|
)) == null ? void 0 : _b.secretName;
|
|
19665
19801
|
let tooltip = r2.fullPath;
|
|
@@ -19680,7 +19816,7 @@ const IngressRulesComponent = ({ ingress, noLink }) => {
|
|
|
19680
19816
|
ResourceLink,
|
|
19681
19817
|
{
|
|
19682
19818
|
resourceName: "services",
|
|
19683
|
-
namespace:
|
|
19819
|
+
namespace: ingress2.metadata.namespace || "default",
|
|
19684
19820
|
name: r2.serviceName
|
|
19685
19821
|
}
|
|
19686
19822
|
),
|
|
@@ -19695,7 +19831,7 @@ const IngressRulesComponent = ({ ingress, noLink }) => {
|
|
|
19695
19831
|
ResourceLink,
|
|
19696
19832
|
{
|
|
19697
19833
|
resourceName: "secrets",
|
|
19698
|
-
namespace:
|
|
19834
|
+
namespace: ingress2.metadata.namespace || "default",
|
|
19699
19835
|
name: secretName
|
|
19700
19836
|
}
|
|
19701
19837
|
)
|
|
@@ -20064,7 +20200,10 @@ function ServiceOutClusterAccessTitle() {
|
|
|
20064
20200
|
})
|
|
20065
20201
|
});
|
|
20066
20202
|
}
|
|
20067
|
-
const ServiceOutClusterAccessColumnRenderer = (
|
|
20203
|
+
const ServiceOutClusterAccessColumnRenderer = (_i18n, options) => {
|
|
20204
|
+
const {
|
|
20205
|
+
clusterVip
|
|
20206
|
+
} = options;
|
|
20068
20207
|
return {
|
|
20069
20208
|
key: "outClusterAccess",
|
|
20070
20209
|
title: /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceOutClusterAccessTitle, {}),
|
|
@@ -20104,10 +20243,8 @@ const PodWorkloadColumnRenderer = (i18n2) => {
|
|
|
20104
20243
|
}
|
|
20105
20244
|
};
|
|
20106
20245
|
};
|
|
20107
|
-
const IngressRulesColumnRenderer = ({
|
|
20108
|
-
|
|
20109
|
-
noLink
|
|
20110
|
-
}) => {
|
|
20246
|
+
const IngressRulesColumnRenderer = (i18n2, options) => {
|
|
20247
|
+
const noLink = options == null ? void 0 : options.noLink;
|
|
20111
20248
|
const dataIndex = ["spec", "rules"];
|
|
20112
20249
|
return {
|
|
20113
20250
|
key: "type",
|
|
@@ -20568,39 +20705,45 @@ const Dovetail = (props) => {
|
|
|
20568
20705
|
antd4Configs: {
|
|
20569
20706
|
getPopupContainer: antdGetPopupContainer || (() => document.body)
|
|
20570
20707
|
},
|
|
20571
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20572
|
-
|
|
20708
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20709
|
+
GlobalStoreContext.Provider,
|
|
20573
20710
|
{
|
|
20574
|
-
|
|
20575
|
-
|
|
20576
|
-
|
|
20577
|
-
|
|
20578
|
-
|
|
20579
|
-
|
|
20580
|
-
|
|
20581
|
-
|
|
20582
|
-
|
|
20583
|
-
|
|
20584
|
-
|
|
20585
|
-
|
|
20586
|
-
name: c2.name,
|
|
20587
|
-
meta: {
|
|
20588
|
-
dataProviderName: c2.dataProviderName,
|
|
20589
|
-
resourceBasePath: c2.basePath,
|
|
20590
|
-
kind: c2.kind,
|
|
20591
|
-
parent: c2.parent,
|
|
20592
|
-
label: `${c2.kind}s`
|
|
20711
|
+
value: globalStoreMap,
|
|
20712
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20713
|
+
Refine,
|
|
20714
|
+
{
|
|
20715
|
+
dataProvider: dataProvider(globalStoreMap.default),
|
|
20716
|
+
liveProvider: liveProvider(globalStoreMap.default),
|
|
20717
|
+
routerProvider,
|
|
20718
|
+
notificationProvider,
|
|
20719
|
+
options: {
|
|
20720
|
+
warnWhenUnsavedChanges: true,
|
|
20721
|
+
liveMode: "auto",
|
|
20722
|
+
disableTelemetry: true
|
|
20593
20723
|
},
|
|
20594
|
-
|
|
20595
|
-
|
|
20596
|
-
|
|
20597
|
-
|
|
20598
|
-
|
|
20599
|
-
|
|
20600
|
-
|
|
20601
|
-
|
|
20724
|
+
accessControlProvider,
|
|
20725
|
+
resources: resourcesConfig.map((c2) => {
|
|
20726
|
+
return {
|
|
20727
|
+
name: c2.name,
|
|
20728
|
+
meta: {
|
|
20729
|
+
dataProviderName: c2.dataProviderName,
|
|
20730
|
+
resourceBasePath: c2.basePath,
|
|
20731
|
+
kind: c2.kind,
|
|
20732
|
+
parent: c2.parent,
|
|
20733
|
+
label: `${c2.kind}s`
|
|
20734
|
+
},
|
|
20735
|
+
list: `${urlPrefix}/${c2.name}`,
|
|
20736
|
+
show: `${urlPrefix}/${c2.name}/show`,
|
|
20737
|
+
create: `${urlPrefix}/${c2.name}/create`,
|
|
20738
|
+
edit: `${urlPrefix}/${c2.name}/edit`
|
|
20739
|
+
};
|
|
20740
|
+
}),
|
|
20741
|
+
...props,
|
|
20742
|
+
children: content
|
|
20743
|
+
}
|
|
20744
|
+
)
|
|
20602
20745
|
}
|
|
20603
|
-
)
|
|
20746
|
+
)
|
|
20604
20747
|
}
|
|
20605
20748
|
) }) }) }) });
|
|
20606
20749
|
};
|
|
@@ -20661,8 +20804,8 @@ class ModelPlugin {
|
|
|
20661
20804
|
restoreItem(item) {
|
|
20662
20805
|
return item._rawYaml;
|
|
20663
20806
|
}
|
|
20664
|
-
setModelMap(key2,
|
|
20665
|
-
this.ModelMap.set(key2,
|
|
20807
|
+
setModelMap(key2, ModelClass) {
|
|
20808
|
+
this.ModelMap.set(key2, ModelClass);
|
|
20666
20809
|
}
|
|
20667
20810
|
}
|
|
20668
20811
|
const modelPlugin = new ModelPlugin();
|
|
@@ -20768,12 +20911,14 @@ export {
|
|
|
20768
20911
|
ColumnKeys,
|
|
20769
20912
|
CommonSorter,
|
|
20770
20913
|
ComponentContext,
|
|
20914
|
+
ComponentContextProvider,
|
|
20771
20915
|
ConditionsField,
|
|
20772
20916
|
ConditionsGroup,
|
|
20773
20917
|
ConditionsTab,
|
|
20774
20918
|
ConditionsTable,
|
|
20775
20919
|
ConfigsContext,
|
|
20776
20920
|
ControllerRevisionModel,
|
|
20921
|
+
CopyButton,
|
|
20777
20922
|
CreateButton,
|
|
20778
20923
|
CronJobDropdown,
|
|
20779
20924
|
CronJobModel,
|
|
@@ -20801,7 +20946,8 @@ export {
|
|
|
20801
20946
|
EditLabelForm,
|
|
20802
20947
|
EditNodeTaintDropdownMenuItem,
|
|
20803
20948
|
EditNodeTaintForm,
|
|
20804
|
-
|
|
20949
|
+
ErrorContent,
|
|
20950
|
+
ErrorContentBody,
|
|
20805
20951
|
ErrorContentType,
|
|
20806
20952
|
ErrorWrapper,
|
|
20807
20953
|
EventModel,
|
|
@@ -21020,7 +21166,6 @@ export {
|
|
|
21020
21166
|
YamlEditorComponent,
|
|
21021
21167
|
YamlForm,
|
|
21022
21168
|
addDefaultRenderToColumns,
|
|
21023
|
-
dnsSubDomainRules,
|
|
21024
21169
|
dovetailRefineI18n,
|
|
21025
21170
|
generateSchemaTypeValue,
|
|
21026
21171
|
generateValueFromSchema,
|
|
@@ -21034,12 +21179,11 @@ export {
|
|
|
21034
21179
|
relationPlugin,
|
|
21035
21180
|
renderCommonFormFiled,
|
|
21036
21181
|
resolveRef,
|
|
21037
|
-
rfc1035LabelRules,
|
|
21038
|
-
rfc1123LabelRules,
|
|
21039
21182
|
routerProvider,
|
|
21040
21183
|
shortenedImage,
|
|
21041
21184
|
transformResourceKindInSentence,
|
|
21042
21185
|
useApiGroupSchema,
|
|
21186
|
+
useDeleteManyModal,
|
|
21043
21187
|
useDeleteModal,
|
|
21044
21188
|
useDeleteModalOnly,
|
|
21045
21189
|
useDownloadYAML,
|