@dovetail-v2/refine 0.4.2-beta.0 → 0.4.4
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/EditMetadataForm/LabelFormatPopover.d.ts +0 -1
- package/dist/components/Form/ExtraSubmitFooter.d.ts +23 -0
- package/dist/components/Form/FormModal.d.ts +1 -1
- package/dist/components/Form/RawYamlFormModal.d.ts +1 -1
- package/dist/components/Form/RefineFormContainer.d.ts +1 -1
- package/dist/components/Form/useReactHookForm.d.ts +1 -2
- package/dist/components/Form/useRefineForm.d.ts +1 -1
- package/dist/components/FormWidgets/NameInputWidget.d.ts +0 -48
- package/dist/components/KeyValueTableForm/FormatRulePopover.d.ts +7 -0
- package/dist/components/KeyValueTableForm/index.d.ts +3 -1
- 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/index.d.ts +2 -3
- package/dist/contexts/component.d.ts +14 -5
- package/dist/contexts/index.d.ts +1 -0
- package/dist/hooks/use409Retry.d.ts +68 -0
- package/dist/hooks/useDeleteModal/index.d.ts +1 -0
- package/dist/hooks/useEagleTable/columns.d.ts +5 -4
- package/dist/hooks/useOpenForm.d.ts +1 -1
- package/dist/hooks/useSubmitForm.d.ts +1 -1
- package/dist/hooks/useTableData.d.ts +1 -1
- package/dist/i18n.d.ts +31 -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 +15 -0
- package/dist/locales/zh-CN/index.d.ts +16 -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 +1607 -1333
- package/dist/refine.js +1611 -1337
- package/dist/shell.cjs +1 -1
- package/dist/shell.js +1 -1
- package/dist/style.css +268 -121
- package/dist/types/resource.d.ts +33 -9
- package/package.json +18 -7
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,
|
|
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 {
|
|
16
|
-
import { first, get as get$2, cloneDeep, set, setWith, clone, debounce, isEqual as isEqual$1, isObject as isObject$4, uniq,
|
|
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
|
+
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";
|
|
@@ -456,6 +469,8 @@ const state$1 = "Status";
|
|
|
456
469
|
const name$1 = "Name";
|
|
457
470
|
const pod$1 = "Pod";
|
|
458
471
|
const cancel$1 = "Cancel";
|
|
472
|
+
const prev_step$1 = "Previous";
|
|
473
|
+
const next_step$1 = "Next";
|
|
459
474
|
const create$1 = "Create";
|
|
460
475
|
const confirm_delete_text$1 = "Are you sure you want to delete the {{kind}} <0>{{target}}</0>?";
|
|
461
476
|
const edit$1 = "Edit";
|
|
@@ -602,7 +617,7 @@ const available_state$1 = "Available";
|
|
|
602
617
|
const bound_state$1 = "Bound";
|
|
603
618
|
const released_state$1 = "Released";
|
|
604
619
|
const failed_state$1 = "Failed";
|
|
605
|
-
const exec_pod = "Execute shell";
|
|
620
|
+
const exec_pod$1 = "Execute shell";
|
|
606
621
|
const search$1 = "Search";
|
|
607
622
|
const edit_label$1 = "Edit label";
|
|
608
623
|
const csi$1 = "CSI driver";
|
|
@@ -618,6 +633,7 @@ const edit_form$1 = "Edit form";
|
|
|
618
633
|
const data_expired$1 = "Data expired";
|
|
619
634
|
const data_expired_body$1 = "The data in this form is no longer the latest version. To avoid saving errors, please discard this edit and reopen the form to edit again.";
|
|
620
635
|
const data_expired_note$1 = "Your current entries will not be saved.";
|
|
636
|
+
const resource_version_conflict$1 = "The data in this form is no longer the latest version. Please discard this edit and reopen the form to edit again.";
|
|
621
637
|
const abandon_edit$1 = "Discard edit";
|
|
622
638
|
const exit_yaml_tip$1 = "If you go back to the form, any changes made to the YAML file will be lost.";
|
|
623
639
|
const value_optional$1 = "Value (optional)";
|
|
@@ -714,6 +730,11 @@ const pause_scheduling$1 = "Suspend scheduling";
|
|
|
714
730
|
const port_name$1 = "Port name";
|
|
715
731
|
const target_port_range_limit$1 = "Only integers between 1 and 65535, or strings, are supported.";
|
|
716
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";
|
|
717
738
|
const dovetail$1 = {
|
|
718
739
|
copy: copy$1,
|
|
719
740
|
reset_arguments: reset_arguments$1,
|
|
@@ -734,6 +755,8 @@ const dovetail$1 = {
|
|
|
734
755
|
name: name$1,
|
|
735
756
|
pod: pod$1,
|
|
736
757
|
cancel: cancel$1,
|
|
758
|
+
prev_step: prev_step$1,
|
|
759
|
+
next_step: next_step$1,
|
|
737
760
|
"delete": "Delete",
|
|
738
761
|
create: create$1,
|
|
739
762
|
confirm_delete_text: confirm_delete_text$1,
|
|
@@ -883,7 +906,7 @@ const dovetail$1 = {
|
|
|
883
906
|
bound_state: bound_state$1,
|
|
884
907
|
released_state: released_state$1,
|
|
885
908
|
failed_state: failed_state$1,
|
|
886
|
-
exec_pod,
|
|
909
|
+
exec_pod: exec_pod$1,
|
|
887
910
|
search: search$1,
|
|
888
911
|
edit_label: edit_label$1,
|
|
889
912
|
csi: csi$1,
|
|
@@ -899,6 +922,7 @@ const dovetail$1 = {
|
|
|
899
922
|
data_expired: data_expired$1,
|
|
900
923
|
data_expired_body: data_expired_body$1,
|
|
901
924
|
data_expired_note: data_expired_note$1,
|
|
925
|
+
resource_version_conflict: resource_version_conflict$1,
|
|
902
926
|
abandon_edit: abandon_edit$1,
|
|
903
927
|
exit_yaml_tip: exit_yaml_tip$1,
|
|
904
928
|
value_optional: value_optional$1,
|
|
@@ -994,11 +1018,29 @@ const dovetail$1 = {
|
|
|
994
1018
|
pause_scheduling: pause_scheduling$1,
|
|
995
1019
|
port_name: port_name$1,
|
|
996
1020
|
target_port_range_limit: target_port_range_limit$1,
|
|
997
|
-
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
|
|
998
1027
|
};
|
|
999
1028
|
const EN = {
|
|
1029
|
+
app: app$1,
|
|
1000
1030
|
dovetail: dovetail$1
|
|
1001
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
|
+
};
|
|
1002
1044
|
const copy = "复制";
|
|
1003
1045
|
const reset_arguments = "重置";
|
|
1004
1046
|
const view_changes = "查看改动";
|
|
@@ -1010,6 +1052,8 @@ const edit_yaml = "编辑 YAML";
|
|
|
1010
1052
|
const copied = "已复制";
|
|
1011
1053
|
const already_reset = "已重置";
|
|
1012
1054
|
const cancel = "取消";
|
|
1055
|
+
const prev_step = "上一步";
|
|
1056
|
+
const next_step = "下一步";
|
|
1013
1057
|
const create = "创建";
|
|
1014
1058
|
const delete_resource = "删除{{resource}}";
|
|
1015
1059
|
const confirm_delete_text = "确认删除{{kind}} <0>{{target}}</0> 吗?";
|
|
@@ -1182,6 +1226,7 @@ const edit_form = "编辑表单";
|
|
|
1182
1226
|
const data_expired = "数据已过期";
|
|
1183
1227
|
const data_expired_body = "当前表单中的数据已不是最新版。为避免保存失败,请放弃本次编辑,并重新打开表单进行编辑。";
|
|
1184
1228
|
const data_expired_note = "当前已填写内容将不会保留。";
|
|
1229
|
+
const resource_version_conflict = "当前表单中的数据已不是最新版,请放弃本次编辑,并重新打开表单进行编辑。";
|
|
1185
1230
|
const abandon_edit = "放弃编辑";
|
|
1186
1231
|
const exit_yaml_tip = "返回编辑表单,不会保留对 YAML 文件做出的所有更改。";
|
|
1187
1232
|
const form = "表单";
|
|
@@ -1275,6 +1320,12 @@ const no_labels = "无标签";
|
|
|
1275
1320
|
const no_annotations = "无注解";
|
|
1276
1321
|
const pause_scheduling = "暂停调度";
|
|
1277
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 = "文件系统类型";
|
|
1278
1329
|
const dovetail = {
|
|
1279
1330
|
copy,
|
|
1280
1331
|
reset_arguments,
|
|
@@ -1287,6 +1338,8 @@ const dovetail = {
|
|
|
1287
1338
|
copied,
|
|
1288
1339
|
already_reset,
|
|
1289
1340
|
cancel,
|
|
1341
|
+
prev_step,
|
|
1342
|
+
next_step,
|
|
1290
1343
|
"delete": "删除",
|
|
1291
1344
|
create,
|
|
1292
1345
|
delete_resource,
|
|
@@ -1462,6 +1515,7 @@ const dovetail = {
|
|
|
1462
1515
|
data_expired,
|
|
1463
1516
|
data_expired_body,
|
|
1464
1517
|
data_expired_note,
|
|
1518
|
+
resource_version_conflict,
|
|
1465
1519
|
abandon_edit,
|
|
1466
1520
|
exit_yaml_tip,
|
|
1467
1521
|
form,
|
|
@@ -1554,9 +1608,16 @@ const dovetail = {
|
|
|
1554
1608
|
no_labels,
|
|
1555
1609
|
no_annotations,
|
|
1556
1610
|
pause_scheduling,
|
|
1557
|
-
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
|
|
1558
1618
|
};
|
|
1559
1619
|
const ZH = {
|
|
1620
|
+
app,
|
|
1560
1621
|
dovetail
|
|
1561
1622
|
};
|
|
1562
1623
|
const resources = {
|
|
@@ -7288,9 +7349,7 @@ class K8sOpenAPI {
|
|
|
7288
7349
|
return this.schemas;
|
|
7289
7350
|
}
|
|
7290
7351
|
try {
|
|
7291
|
-
const response = await fetch(
|
|
7292
|
-
`${this.pathPrefix}${this.resourceBasePath}`
|
|
7293
|
-
);
|
|
7352
|
+
const response = await fetch(`${this.pathPrefix}${this.resourceBasePath}`);
|
|
7294
7353
|
const result = await response.json();
|
|
7295
7354
|
this.schemas = Object.values(result.components.schemas);
|
|
7296
7355
|
if (this.schemas) {
|
|
@@ -7362,33 +7421,42 @@ function useApiGroupSchema() {
|
|
|
7362
7421
|
loading: false,
|
|
7363
7422
|
error: null
|
|
7364
7423
|
});
|
|
7365
|
-
const fetchSchema = useCallback(
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
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
|
+
);
|
|
7392
7460
|
return { ...state2, fetchSchema };
|
|
7393
7461
|
}
|
|
7394
7462
|
function useSchema(options) {
|
|
@@ -7404,7 +7472,11 @@ function useSchema(options) {
|
|
|
7404
7472
|
setLoading(true);
|
|
7405
7473
|
setError(null);
|
|
7406
7474
|
try {
|
|
7407
|
-
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
|
+
);
|
|
7408
7480
|
setSchema(schema2 || null);
|
|
7409
7481
|
setError(null);
|
|
7410
7482
|
} catch (e2) {
|
|
@@ -7425,6 +7497,34 @@ function useSchema(options) {
|
|
|
7425
7497
|
fetchSchema
|
|
7426
7498
|
};
|
|
7427
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
|
+
};
|
|
7428
7528
|
const ConfigsContext = createContext({});
|
|
7429
7529
|
function getCommonErrors(responseBody, i18n2) {
|
|
7430
7530
|
var _a;
|
|
@@ -7468,12 +7568,16 @@ function getCommonErrors(responseBody, i18n2) {
|
|
|
7468
7568
|
}
|
|
7469
7569
|
return [
|
|
7470
7570
|
i18n2.t(
|
|
7471
|
-
[
|
|
7571
|
+
[
|
|
7572
|
+
`error.${responseBody.code}`,
|
|
7573
|
+
`error.${responseBody.reason}`,
|
|
7574
|
+
responseBody.message || ""
|
|
7575
|
+
],
|
|
7472
7576
|
{ fallbackLng: "" }
|
|
7473
7577
|
)
|
|
7474
7578
|
];
|
|
7475
7579
|
}
|
|
7476
|
-
const
|
|
7580
|
+
const tag_19ts6m8 = "";
|
|
7477
7581
|
const StateTagStyle = "s82411";
|
|
7478
7582
|
const NameTagStyle = "n9ja9cs";
|
|
7479
7583
|
function shortenedImage(image2) {
|
|
@@ -7873,48 +7977,6 @@ function NameInputWidget(props) {
|
|
|
7873
7977
|
const { action } = useResource();
|
|
7874
7978
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { ...props, disabled: action === "edit" });
|
|
7875
7979
|
}
|
|
7876
|
-
const dnsSubDomainRules = [
|
|
7877
|
-
{
|
|
7878
|
-
required: true,
|
|
7879
|
-
message: "名称不能为空"
|
|
7880
|
-
},
|
|
7881
|
-
{
|
|
7882
|
-
pattern: /^[a-z0-9]([-.a-z0-9]*[a-z0-9])?$/,
|
|
7883
|
-
message: "名称只能包含小写字母、数字,以及 '-' 和 '.',且必须以字母或数字开头和结束"
|
|
7884
|
-
},
|
|
7885
|
-
{
|
|
7886
|
-
max: 253,
|
|
7887
|
-
message: "名称长度不能超过253个字符"
|
|
7888
|
-
}
|
|
7889
|
-
];
|
|
7890
|
-
const rfc1123LabelRules = [
|
|
7891
|
-
{
|
|
7892
|
-
required: true,
|
|
7893
|
-
message: "名称不能为空"
|
|
7894
|
-
},
|
|
7895
|
-
{
|
|
7896
|
-
pattern: /^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/,
|
|
7897
|
-
message: "名称只能包含小写字母、数字,以及 '-',且以字母或数字开头和结束"
|
|
7898
|
-
},
|
|
7899
|
-
{
|
|
7900
|
-
max: 63,
|
|
7901
|
-
message: "名称长度不能超过63个字符"
|
|
7902
|
-
}
|
|
7903
|
-
];
|
|
7904
|
-
const rfc1035LabelRules = [
|
|
7905
|
-
{
|
|
7906
|
-
required: true,
|
|
7907
|
-
message: "名称不能为空"
|
|
7908
|
-
},
|
|
7909
|
-
{
|
|
7910
|
-
pattern: /^[a-z]([-a-z0-9]*[a-z0-9])?$/,
|
|
7911
|
-
message: "名称只能包含小写字母、数字,以及 '-',且以字母开头,字母或数字结束"
|
|
7912
|
-
},
|
|
7913
|
-
{
|
|
7914
|
-
max: 63,
|
|
7915
|
-
message: "名称长度不能超过63个字符"
|
|
7916
|
-
}
|
|
7917
|
-
];
|
|
7918
7980
|
function NamespaceSelectWidget(props) {
|
|
7919
7981
|
const { action } = useResource();
|
|
7920
7982
|
const { data: data2 } = useList({
|
|
@@ -7976,10 +8038,13 @@ function KeyValueListWidget(props) {
|
|
|
7976
8038
|
const onChange = useCallback(
|
|
7977
8039
|
(newItems) => {
|
|
7978
8040
|
var _a;
|
|
7979
|
-
const newValue = newItems.reduce(
|
|
7980
|
-
result
|
|
7981
|
-
|
|
7982
|
-
|
|
8041
|
+
const newValue = newItems.reduce(
|
|
8042
|
+
(result, item) => {
|
|
8043
|
+
result[item.key] = item.value;
|
|
8044
|
+
return result;
|
|
8045
|
+
},
|
|
8046
|
+
{}
|
|
8047
|
+
);
|
|
7983
8048
|
(_a = props.onChange) == null ? void 0 : _a.call(props, newValue);
|
|
7984
8049
|
},
|
|
7985
8050
|
[props]
|
|
@@ -8025,7 +8090,7 @@ function KeyValueListWidget(props) {
|
|
|
8025
8090
|
}
|
|
8026
8091
|
function MetadataForm() {
|
|
8027
8092
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8028
|
-
/* @__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, {}) }),
|
|
8029
8094
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8030
8095
|
Form.Item,
|
|
8031
8096
|
{
|
|
@@ -8040,6 +8105,12 @@ function MetadataForm() {
|
|
|
8040
8105
|
] });
|
|
8041
8106
|
}
|
|
8042
8107
|
const ComponentContext = createContext({});
|
|
8108
|
+
function ComponentContextProvider({
|
|
8109
|
+
value: value2,
|
|
8110
|
+
children
|
|
8111
|
+
}) {
|
|
8112
|
+
return React.createElement(ComponentContext.Provider, { value: value2 }, children);
|
|
8113
|
+
}
|
|
8043
8114
|
const GlobalStoreContext = createContext({});
|
|
8044
8115
|
const index_1s9fcl3 = "";
|
|
8045
8116
|
const ErrorWrapper = /* @__PURE__ */ styled_default("div")({
|
|
@@ -8203,21 +8274,31 @@ function Table$1(props) {
|
|
|
8203
8274
|
})]
|
|
8204
8275
|
});
|
|
8205
8276
|
}
|
|
8206
|
-
function useTableData({
|
|
8277
|
+
function useTableData({
|
|
8278
|
+
data: data2,
|
|
8279
|
+
columns,
|
|
8280
|
+
pageSize = 10,
|
|
8281
|
+
defaultSorters
|
|
8282
|
+
}) {
|
|
8207
8283
|
const [currentPage, setCurrentPage] = useState(1);
|
|
8208
8284
|
const [sorters, setSorters] = useState(defaultSorters || []);
|
|
8209
|
-
const onSorterChange = useCallback(
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
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
|
+
);
|
|
8221
8302
|
return {
|
|
8222
8303
|
data: paginateData(
|
|
8223
8304
|
{
|
|
@@ -8297,7 +8378,7 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
|
|
|
8297
8378
|
}
|
|
8298
8379
|
);
|
|
8299
8380
|
};
|
|
8300
|
-
const PortsTable = ({ service }) => {
|
|
8381
|
+
const PortsTable = ({ service: service2 }) => {
|
|
8301
8382
|
const { t: t2 } = useTranslation();
|
|
8302
8383
|
const component = useContext(ComponentContext);
|
|
8303
8384
|
const Table2 = component.Table || Table$1;
|
|
@@ -8344,7 +8425,7 @@ const PortsTable = ({ service }) => {
|
|
|
8344
8425
|
width: 199
|
|
8345
8426
|
}
|
|
8346
8427
|
];
|
|
8347
|
-
const ports = (
|
|
8428
|
+
const ports = (service2._rawYaml.spec.ports || []).map((port2) => ({
|
|
8348
8429
|
...port2,
|
|
8349
8430
|
id: port2.name || ""
|
|
8350
8431
|
}));
|
|
@@ -8759,6 +8840,38 @@ function PVCDistributeStorage({
|
|
|
8759
8840
|
)
|
|
8760
8841
|
] });
|
|
8761
8842
|
}
|
|
8843
|
+
const index_1oorxg6 = "";
|
|
8844
|
+
const CopyIconStyle = "c1oll6q9";
|
|
8845
|
+
const CopyButton = ({
|
|
8846
|
+
value: value2,
|
|
8847
|
+
className
|
|
8848
|
+
}) => {
|
|
8849
|
+
const {
|
|
8850
|
+
i18n: i18n2
|
|
8851
|
+
} = useTranslation();
|
|
8852
|
+
const [tooltip, setTooltip] = useState(i18n2.t("dovetail.copy"));
|
|
8853
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, {
|
|
8854
|
+
title: tooltip,
|
|
8855
|
+
onVisibleChange: (visible) => {
|
|
8856
|
+
if (!visible) {
|
|
8857
|
+
setTimeout(() => {
|
|
8858
|
+
setTooltip(i18n2.t("dovetail.copy"));
|
|
8859
|
+
}, 80);
|
|
8860
|
+
}
|
|
8861
|
+
},
|
|
8862
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
|
|
8863
|
+
src: ClipboardCopy16GradientGrayIcon,
|
|
8864
|
+
hoverSrc: ClipboardCopy16GradientBlueIcon,
|
|
8865
|
+
className: cx_default(CopyIconStyle, className),
|
|
8866
|
+
iconWidth: 16,
|
|
8867
|
+
iconHeight: 16,
|
|
8868
|
+
onClick: () => {
|
|
8869
|
+
copyToClipboard$1(value2);
|
|
8870
|
+
setTooltip(i18n2.t("dovetail.copied"));
|
|
8871
|
+
}
|
|
8872
|
+
})
|
|
8873
|
+
});
|
|
8874
|
+
};
|
|
8762
8875
|
class ResourceModel {
|
|
8763
8876
|
constructor(_rawYaml, _globalStore) {
|
|
8764
8877
|
__publicField(this, "id");
|
|
@@ -8876,74 +8989,70 @@ const BASE_INIT_VALUE = {
|
|
|
8876
8989
|
}
|
|
8877
8990
|
};
|
|
8878
8991
|
const DEPLOYMENT_INIT_VALUE = {
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8992
|
+
apiVersion: "apps/v1",
|
|
8993
|
+
kind: "Deployment",
|
|
8994
|
+
metadata: {
|
|
8995
|
+
name: "example",
|
|
8996
|
+
namespace: "default"
|
|
8884
8997
|
},
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8998
|
+
spec: {
|
|
8999
|
+
selector: {
|
|
9000
|
+
matchLabels: {
|
|
9001
|
+
app: "deployment-example"
|
|
8889
9002
|
}
|
|
8890
9003
|
},
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
9004
|
+
replicas: 3,
|
|
9005
|
+
template: {
|
|
9006
|
+
metadata: {
|
|
9007
|
+
labels: {
|
|
9008
|
+
app: "deployment-example"
|
|
8896
9009
|
}
|
|
8897
9010
|
},
|
|
8898
|
-
|
|
8899
|
-
|
|
9011
|
+
spec: {
|
|
9012
|
+
containers: [
|
|
8900
9013
|
{
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
9014
|
+
name: "deployment-example",
|
|
9015
|
+
image: "registry.smtx.io/kubesmart/bitnami/nginx:1.25.2-debian-11-r2",
|
|
9016
|
+
ports: [
|
|
8904
9017
|
{
|
|
8905
|
-
|
|
8906
|
-
|
|
9018
|
+
containerPort: 8080,
|
|
9019
|
+
protocol: "TCP"
|
|
8907
9020
|
}
|
|
8908
9021
|
]
|
|
8909
9022
|
}
|
|
8910
9023
|
]
|
|
8911
9024
|
}
|
|
8912
9025
|
},
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
9026
|
+
strategy: {
|
|
9027
|
+
type: "RollingUpdate",
|
|
9028
|
+
rollingUpdate: {
|
|
9029
|
+
maxSurge: "25%",
|
|
9030
|
+
maxUnavailable: "25%"
|
|
8918
9031
|
}
|
|
8919
9032
|
}
|
|
8920
9033
|
}
|
|
8921
9034
|
};
|
|
8922
9035
|
const CRONJOB_INIT_VALUE = {
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
9036
|
+
apiVersion: "batch/v1",
|
|
9037
|
+
kind: "CronJob",
|
|
9038
|
+
metadata: {
|
|
9039
|
+
name: "example",
|
|
9040
|
+
namespace: "default"
|
|
8928
9041
|
},
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
|
|
9042
|
+
spec: {
|
|
9043
|
+
schedule: "@daily",
|
|
9044
|
+
jobTemplate: {
|
|
9045
|
+
spec: {
|
|
9046
|
+
template: {
|
|
9047
|
+
spec: {
|
|
9048
|
+
containers: [
|
|
8936
9049
|
{
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
"/bin/sh",
|
|
8941
|
-
"-c",
|
|
8942
|
-
"date; echo Hello from the Kubernetes cluster"
|
|
8943
|
-
]
|
|
9050
|
+
name: "example",
|
|
9051
|
+
image: "registry.smtx.io/kubesmart/alpine:3",
|
|
9052
|
+
args: ["/bin/sh", "-c", "date; echo Hello from the Kubernetes cluster"]
|
|
8944
9053
|
}
|
|
8945
9054
|
],
|
|
8946
|
-
|
|
9055
|
+
restartPolicy: "OnFailure"
|
|
8947
9056
|
}
|
|
8948
9057
|
}
|
|
8949
9058
|
}
|
|
@@ -8951,32 +9060,32 @@ const CRONJOB_INIT_VALUE = {
|
|
|
8951
9060
|
}
|
|
8952
9061
|
};
|
|
8953
9062
|
const DAEMONSET_INIT_VALUE = {
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
9063
|
+
apiVersion: "apps/v1",
|
|
9064
|
+
kind: "DaemonSet",
|
|
9065
|
+
metadata: {
|
|
9066
|
+
name: "example",
|
|
9067
|
+
namespace: "default"
|
|
8959
9068
|
},
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
9069
|
+
spec: {
|
|
9070
|
+
selector: {
|
|
9071
|
+
matchLabels: {
|
|
9072
|
+
app: "daemonset-example"
|
|
8964
9073
|
}
|
|
8965
9074
|
},
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
9075
|
+
template: {
|
|
9076
|
+
metadata: {
|
|
9077
|
+
labels: {
|
|
9078
|
+
app: "daemonset-example"
|
|
8970
9079
|
}
|
|
8971
9080
|
},
|
|
8972
|
-
|
|
8973
|
-
|
|
9081
|
+
spec: {
|
|
9082
|
+
containers: [
|
|
8974
9083
|
{
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
9084
|
+
name: "daemonset-example",
|
|
9085
|
+
image: "registry.smtx.io/kubesmart/bitnami/nginx:1.25.2-debian-11-r2",
|
|
9086
|
+
ports: [
|
|
8978
9087
|
{
|
|
8979
|
-
|
|
9088
|
+
containerPort: 8080
|
|
8980
9089
|
}
|
|
8981
9090
|
]
|
|
8982
9091
|
}
|
|
@@ -8986,98 +9095,86 @@ const DAEMONSET_INIT_VALUE = {
|
|
|
8986
9095
|
}
|
|
8987
9096
|
};
|
|
8988
9097
|
const JOB_INIT_VALUE = {
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
9098
|
+
apiVersion: "batch/v1",
|
|
9099
|
+
kind: "Job",
|
|
9100
|
+
metadata: {
|
|
9101
|
+
name: "example",
|
|
9102
|
+
namespace: "default"
|
|
8994
9103
|
},
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9104
|
+
spec: {
|
|
9105
|
+
selector: {},
|
|
9106
|
+
template: {
|
|
9107
|
+
metadata: {
|
|
9108
|
+
name: "job-example"
|
|
9000
9109
|
},
|
|
9001
|
-
|
|
9002
|
-
|
|
9110
|
+
spec: {
|
|
9111
|
+
containers: [
|
|
9003
9112
|
{
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
"/bin/sh",
|
|
9008
|
-
"-c",
|
|
9009
|
-
"date; echo Hello from the Kubernetes cluster"
|
|
9010
|
-
]
|
|
9113
|
+
name: "job-example",
|
|
9114
|
+
image: "registry.smtx.io/kubesmart/alpine:3",
|
|
9115
|
+
command: ["/bin/sh", "-c", "date; echo Hello from the Kubernetes cluster"]
|
|
9011
9116
|
}
|
|
9012
9117
|
],
|
|
9013
|
-
|
|
9118
|
+
restartPolicy: "Never"
|
|
9014
9119
|
}
|
|
9015
9120
|
}
|
|
9016
9121
|
}
|
|
9017
9122
|
};
|
|
9018
9123
|
const STATEFULSET_INIT_VALUE = {
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9124
|
+
apiVersion: "apps/v1",
|
|
9125
|
+
kind: "StatefulSet",
|
|
9126
|
+
metadata: {
|
|
9127
|
+
name: "example",
|
|
9128
|
+
namespace: "default"
|
|
9024
9129
|
},
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9130
|
+
spec: {
|
|
9131
|
+
serviceName: "statefulset-example",
|
|
9132
|
+
replicas: 3,
|
|
9133
|
+
selector: {
|
|
9134
|
+
matchLabels: {
|
|
9135
|
+
app: "statefulset-example"
|
|
9031
9136
|
}
|
|
9032
9137
|
},
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9138
|
+
template: {
|
|
9139
|
+
metadata: {
|
|
9140
|
+
labels: {
|
|
9141
|
+
app: "statefulset-example"
|
|
9037
9142
|
}
|
|
9038
9143
|
},
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
|
|
9144
|
+
spec: {
|
|
9145
|
+
terminationGracePeriodSeconds: 10,
|
|
9146
|
+
containers: [
|
|
9042
9147
|
{
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
"args": [
|
|
9049
|
-
"-A",
|
|
9050
|
-
"--render-try-index",
|
|
9051
|
-
"/data"
|
|
9052
|
-
],
|
|
9053
|
-
"ports": [
|
|
9148
|
+
name: "statefulset-example",
|
|
9149
|
+
image: "registry.smtx.io/kubesmart/fileserver:v1.0.0",
|
|
9150
|
+
command: ["dufs"],
|
|
9151
|
+
args: ["-A", "--render-try-index", "/data"],
|
|
9152
|
+
ports: [
|
|
9054
9153
|
{
|
|
9055
|
-
|
|
9056
|
-
|
|
9154
|
+
containerPort: 5e3,
|
|
9155
|
+
name: "http"
|
|
9057
9156
|
}
|
|
9058
9157
|
],
|
|
9059
|
-
|
|
9158
|
+
volumeMounts: [
|
|
9060
9159
|
{
|
|
9061
|
-
|
|
9062
|
-
|
|
9160
|
+
name: "file",
|
|
9161
|
+
mountPath: "/data"
|
|
9063
9162
|
}
|
|
9064
9163
|
]
|
|
9065
9164
|
}
|
|
9066
9165
|
]
|
|
9067
9166
|
}
|
|
9068
9167
|
},
|
|
9069
|
-
|
|
9168
|
+
volumeClaimTemplates: [
|
|
9070
9169
|
{
|
|
9071
|
-
|
|
9072
|
-
|
|
9170
|
+
metadata: {
|
|
9171
|
+
name: "file"
|
|
9073
9172
|
},
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
"requests": {
|
|
9080
|
-
"storage": "1Gi"
|
|
9173
|
+
spec: {
|
|
9174
|
+
accessModes: ["ReadWriteOnce"],
|
|
9175
|
+
resources: {
|
|
9176
|
+
requests: {
|
|
9177
|
+
storage: "1Gi"
|
|
9081
9178
|
}
|
|
9082
9179
|
}
|
|
9083
9180
|
}
|
|
@@ -9086,37 +9183,35 @@ const STATEFULSET_INIT_VALUE = {
|
|
|
9086
9183
|
}
|
|
9087
9184
|
};
|
|
9088
9185
|
const POD_INIT_VALUE = {
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9186
|
+
apiVersion: "v1",
|
|
9187
|
+
kind: "Pod",
|
|
9188
|
+
metadata: {
|
|
9189
|
+
name: "example",
|
|
9190
|
+
namespace: "default",
|
|
9191
|
+
labels: {
|
|
9192
|
+
app: "example"
|
|
9096
9193
|
}
|
|
9097
9194
|
},
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9195
|
+
spec: {
|
|
9196
|
+
securityContext: {
|
|
9197
|
+
runAsNonRoot: true,
|
|
9198
|
+
seccompProfile: {
|
|
9199
|
+
type: "RuntimeDefault"
|
|
9103
9200
|
}
|
|
9104
9201
|
},
|
|
9105
|
-
|
|
9202
|
+
containers: [
|
|
9106
9203
|
{
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9204
|
+
name: "example",
|
|
9205
|
+
image: "registry.smtx.io/kubesmart/bitnami/nginx:1.25.2-debian-11-r2",
|
|
9206
|
+
ports: [
|
|
9110
9207
|
{
|
|
9111
|
-
|
|
9208
|
+
containerPort: 8080
|
|
9112
9209
|
}
|
|
9113
9210
|
],
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
"ALL"
|
|
9119
|
-
]
|
|
9211
|
+
securityContext: {
|
|
9212
|
+
allowPrivilegeEscalation: false,
|
|
9213
|
+
capabilities: {
|
|
9214
|
+
drop: ["ALL"]
|
|
9120
9215
|
}
|
|
9121
9216
|
}
|
|
9122
9217
|
}
|
|
@@ -9124,143 +9219,143 @@ const POD_INIT_VALUE = {
|
|
|
9124
9219
|
}
|
|
9125
9220
|
};
|
|
9126
9221
|
const SERVICE_CLUSTER_IP_INIT_VALUE = {
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9222
|
+
apiVersion: "v1",
|
|
9223
|
+
kind: "Service",
|
|
9224
|
+
metadata: {
|
|
9225
|
+
name: "example",
|
|
9226
|
+
namespace: "default"
|
|
9132
9227
|
},
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9228
|
+
spec: {
|
|
9229
|
+
selector: {
|
|
9230
|
+
app: "example"
|
|
9136
9231
|
},
|
|
9137
|
-
|
|
9232
|
+
ports: [
|
|
9138
9233
|
{
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9234
|
+
name: "example",
|
|
9235
|
+
port: 8080,
|
|
9236
|
+
protocol: "TCP",
|
|
9237
|
+
targetPort: 8080
|
|
9143
9238
|
}
|
|
9144
9239
|
],
|
|
9145
|
-
|
|
9146
|
-
|
|
9240
|
+
sessionAffinity: "None",
|
|
9241
|
+
type: "ClusterIP"
|
|
9147
9242
|
}
|
|
9148
9243
|
};
|
|
9149
9244
|
const SERVICE_NODE_PORT_INIT_VALUE = {
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9245
|
+
apiVersion: "v1",
|
|
9246
|
+
kind: "Service",
|
|
9247
|
+
metadata: {
|
|
9248
|
+
name: "example",
|
|
9249
|
+
namespace: "default"
|
|
9155
9250
|
},
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9251
|
+
spec: {
|
|
9252
|
+
selector: {
|
|
9253
|
+
app: "example"
|
|
9159
9254
|
},
|
|
9160
|
-
|
|
9255
|
+
ports: [
|
|
9161
9256
|
{
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9257
|
+
name: "example",
|
|
9258
|
+
port: 8080,
|
|
9259
|
+
protocol: "TCP",
|
|
9260
|
+
targetPort: 8080
|
|
9166
9261
|
}
|
|
9167
9262
|
],
|
|
9168
|
-
|
|
9169
|
-
|
|
9263
|
+
sessionAffinity: "None",
|
|
9264
|
+
type: "NodePort"
|
|
9170
9265
|
}
|
|
9171
9266
|
};
|
|
9172
9267
|
const SERVICE_LOAD_BALANCER_INIT_VALUE = {
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9268
|
+
apiVersion: "v1",
|
|
9269
|
+
kind: "Service",
|
|
9270
|
+
metadata: {
|
|
9271
|
+
name: "example",
|
|
9272
|
+
namespace: "default"
|
|
9178
9273
|
},
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9274
|
+
spec: {
|
|
9275
|
+
selector: {
|
|
9276
|
+
app: "example"
|
|
9182
9277
|
},
|
|
9183
|
-
|
|
9278
|
+
ports: [
|
|
9184
9279
|
{
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9280
|
+
name: "example",
|
|
9281
|
+
port: 80,
|
|
9282
|
+
protocol: "TCP",
|
|
9283
|
+
targetPort: 8080
|
|
9189
9284
|
}
|
|
9190
9285
|
],
|
|
9191
|
-
|
|
9192
|
-
|
|
9286
|
+
sessionAffinity: "None",
|
|
9287
|
+
type: "LoadBalancer"
|
|
9193
9288
|
}
|
|
9194
9289
|
};
|
|
9195
9290
|
const SERVICE_EXTERNAL_NAME_INIT_VALUE = {
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9291
|
+
apiVersion: "v1",
|
|
9292
|
+
kind: "Service",
|
|
9293
|
+
metadata: {
|
|
9294
|
+
name: "example",
|
|
9295
|
+
namespace: "default"
|
|
9201
9296
|
},
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9297
|
+
spec: {
|
|
9298
|
+
selector: {
|
|
9299
|
+
app: "example"
|
|
9205
9300
|
},
|
|
9206
|
-
|
|
9301
|
+
ports: [
|
|
9207
9302
|
{
|
|
9208
|
-
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9303
|
+
name: "example",
|
|
9304
|
+
port: 8080,
|
|
9305
|
+
protocol: "TCP",
|
|
9306
|
+
targetPort: 8080
|
|
9212
9307
|
}
|
|
9213
9308
|
],
|
|
9214
|
-
|
|
9215
|
-
|
|
9216
|
-
|
|
9309
|
+
sessionAffinity: "None",
|
|
9310
|
+
type: "ExternalName",
|
|
9311
|
+
externalName: "app.example.com"
|
|
9217
9312
|
}
|
|
9218
9313
|
};
|
|
9219
9314
|
const SERVICE_HEADLESS_INIT_VALUE = {
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9315
|
+
apiVersion: "v1",
|
|
9316
|
+
kind: "Service",
|
|
9317
|
+
metadata: {
|
|
9318
|
+
name: "example",
|
|
9319
|
+
namespace: "default"
|
|
9225
9320
|
},
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9321
|
+
spec: {
|
|
9322
|
+
selector: {
|
|
9323
|
+
app: "example"
|
|
9229
9324
|
},
|
|
9230
|
-
|
|
9231
|
-
|
|
9325
|
+
clusterIP: "None",
|
|
9326
|
+
ports: [
|
|
9232
9327
|
{
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9328
|
+
name: "example",
|
|
9329
|
+
port: null,
|
|
9330
|
+
protocol: "TCP",
|
|
9331
|
+
targetPort: null
|
|
9237
9332
|
}
|
|
9238
9333
|
],
|
|
9239
|
-
|
|
9240
|
-
|
|
9334
|
+
sessionAffinity: "None",
|
|
9335
|
+
type: "ClusterIP"
|
|
9241
9336
|
}
|
|
9242
9337
|
};
|
|
9243
9338
|
const INGRESS_INIT_VALUE = {
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
|
|
9247
|
-
|
|
9248
|
-
|
|
9339
|
+
apiVersion: "networking.k8s.io/v1",
|
|
9340
|
+
kind: "Ingress",
|
|
9341
|
+
metadata: {
|
|
9342
|
+
name: "example",
|
|
9343
|
+
namespace: "default"
|
|
9249
9344
|
},
|
|
9250
|
-
|
|
9251
|
-
|
|
9345
|
+
spec: {
|
|
9346
|
+
rules: [
|
|
9252
9347
|
{
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9348
|
+
host: "example.com",
|
|
9349
|
+
http: {
|
|
9350
|
+
paths: [
|
|
9256
9351
|
{
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9352
|
+
path: "/testpath",
|
|
9353
|
+
pathType: "Prefix",
|
|
9354
|
+
backend: {
|
|
9355
|
+
service: {
|
|
9356
|
+
name: "test",
|
|
9357
|
+
port: {
|
|
9358
|
+
number: 80
|
|
9264
9359
|
}
|
|
9265
9360
|
}
|
|
9266
9361
|
}
|
|
@@ -9272,28 +9367,28 @@ const INGRESS_INIT_VALUE = {
|
|
|
9272
9367
|
}
|
|
9273
9368
|
};
|
|
9274
9369
|
const NETWORK_POLICY_INIT_VALUE = {
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9370
|
+
apiVersion: "networking.k8s.io/v1",
|
|
9371
|
+
kind: "NetworkPolicy",
|
|
9372
|
+
metadata: {
|
|
9373
|
+
name: "example",
|
|
9374
|
+
namespace: "default"
|
|
9280
9375
|
},
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9376
|
+
spec: {
|
|
9377
|
+
podSelector: {},
|
|
9378
|
+
policyTypes: []
|
|
9284
9379
|
}
|
|
9285
9380
|
};
|
|
9286
9381
|
const CONFIG_MAP_INIT_VALUE = {
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9382
|
+
apiVersion: "v1",
|
|
9383
|
+
kind: "ConfigMap",
|
|
9384
|
+
metadata: {
|
|
9385
|
+
name: "example",
|
|
9386
|
+
namespace: "default"
|
|
9292
9387
|
},
|
|
9293
|
-
|
|
9294
|
-
|
|
9388
|
+
data: {
|
|
9389
|
+
key: "value"
|
|
9295
9390
|
},
|
|
9296
|
-
|
|
9391
|
+
immutable: false
|
|
9297
9392
|
};
|
|
9298
9393
|
const SERVER_INSTANCE_INIT_VALUE = {
|
|
9299
9394
|
apiVersion: "kubesmart.smtx.io/v1alpha1",
|
|
@@ -9315,138 +9410,136 @@ const SERVER_INSTANCE_INIT_VALUE = {
|
|
|
9315
9410
|
};
|
|
9316
9411
|
const REDEPLOY_TIMESTAMP_KEY = "kubectl.kubernetes.io/restartedAt";
|
|
9317
9412
|
const SECRET_OPAQUE_INIT_VALUE = {
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
|
|
9413
|
+
apiVersion: "v1",
|
|
9414
|
+
kind: "Secret",
|
|
9415
|
+
metadata: {
|
|
9416
|
+
name: "example",
|
|
9417
|
+
namespace: "default"
|
|
9323
9418
|
},
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9419
|
+
type: "Opaque",
|
|
9420
|
+
data: {
|
|
9421
|
+
key: "value"
|
|
9327
9422
|
}
|
|
9328
9423
|
};
|
|
9329
9424
|
const SECRET_IMAGE_REPO_INIT_VALUE = {
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9425
|
+
apiVersion: "v1",
|
|
9426
|
+
kind: "Secret",
|
|
9427
|
+
metadata: {
|
|
9428
|
+
name: "example",
|
|
9429
|
+
namespace: "default"
|
|
9335
9430
|
},
|
|
9336
|
-
|
|
9337
|
-
|
|
9431
|
+
type: "kubernetes.io/dockerconfigjson",
|
|
9432
|
+
data: {
|
|
9338
9433
|
".dockerconfigjson": ""
|
|
9339
9434
|
}
|
|
9340
9435
|
};
|
|
9341
9436
|
const SECRET_BASIC_AUTH_INIT_VALUE = {
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9437
|
+
apiVersion: "v1",
|
|
9438
|
+
kind: "Secret",
|
|
9439
|
+
metadata: {
|
|
9440
|
+
name: "example",
|
|
9441
|
+
namespace: "default"
|
|
9347
9442
|
},
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9443
|
+
type: "kubernetes.io/basic-auth",
|
|
9444
|
+
data: {
|
|
9445
|
+
username: "example",
|
|
9446
|
+
password: "example"
|
|
9352
9447
|
}
|
|
9353
9448
|
};
|
|
9354
9449
|
const SECRET_SSH_AUTH_INIT_VALUE = {
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9450
|
+
apiVersion: "v1",
|
|
9451
|
+
kind: "Secret",
|
|
9452
|
+
metadata: {
|
|
9453
|
+
name: "example",
|
|
9454
|
+
namespace: "default"
|
|
9360
9455
|
},
|
|
9361
|
-
|
|
9362
|
-
|
|
9456
|
+
type: "kubernetes.io/ssh-auth",
|
|
9457
|
+
data: {
|
|
9363
9458
|
"ssh-publickey": "",
|
|
9364
9459
|
"ssh-privatekey": ""
|
|
9365
9460
|
}
|
|
9366
9461
|
};
|
|
9367
9462
|
const SECRET_TLS_INIT_VALUE = {
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9463
|
+
apiVersion: "v1",
|
|
9464
|
+
kind: "Secret",
|
|
9465
|
+
metadata: {
|
|
9466
|
+
name: "example",
|
|
9467
|
+
namespace: "default"
|
|
9373
9468
|
},
|
|
9374
|
-
|
|
9375
|
-
|
|
9469
|
+
type: "kubernetes.io/tls",
|
|
9470
|
+
data: {
|
|
9376
9471
|
"tls.crt": "",
|
|
9377
9472
|
"tls.key": ""
|
|
9378
9473
|
}
|
|
9379
9474
|
};
|
|
9380
9475
|
const SECRET_CUSTOM_INIT_VALUE = {
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9476
|
+
apiVersion: "v1",
|
|
9477
|
+
kind: "Secret",
|
|
9478
|
+
metadata: {
|
|
9479
|
+
name: "example",
|
|
9480
|
+
namespace: "default"
|
|
9386
9481
|
},
|
|
9387
|
-
|
|
9388
|
-
|
|
9482
|
+
type: "",
|
|
9483
|
+
data: {}
|
|
9389
9484
|
};
|
|
9390
9485
|
const NODE_INIT_VALUE = {
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9486
|
+
apiVersion: "v1",
|
|
9487
|
+
kind: "Node",
|
|
9488
|
+
metadata: {
|
|
9489
|
+
name: "example",
|
|
9490
|
+
namespace: "default"
|
|
9396
9491
|
},
|
|
9397
|
-
|
|
9492
|
+
spec: {}
|
|
9398
9493
|
};
|
|
9399
9494
|
const STORAGE_CLASS_INIT_VALUE = {
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9495
|
+
apiVersion: "storage.k8s.io/v1",
|
|
9496
|
+
kind: "StorageClass",
|
|
9497
|
+
metadata: {
|
|
9498
|
+
name: ""
|
|
9404
9499
|
},
|
|
9405
|
-
|
|
9500
|
+
parameters: {
|
|
9406
9501
|
"csi.storage.k8s.io/fstype": "ext4"
|
|
9407
9502
|
},
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9503
|
+
provisioner: "",
|
|
9504
|
+
reclaimPolicy: "Delete",
|
|
9505
|
+
allowVolumeExpansion: true,
|
|
9506
|
+
volumeBindingMode: "Immediate"
|
|
9412
9507
|
};
|
|
9413
9508
|
const PV_INIT_VALUE = {
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9509
|
+
apiVersion: "v1",
|
|
9510
|
+
kind: "PersistentVolume",
|
|
9511
|
+
metadata: {
|
|
9512
|
+
name: "pvc-hostpath"
|
|
9418
9513
|
},
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
"capacity": {
|
|
9424
|
-
"storage": "10Gi"
|
|
9514
|
+
spec: {
|
|
9515
|
+
accessModes: ["ReadWriteOnce"],
|
|
9516
|
+
capacity: {
|
|
9517
|
+
storage: "10Gi"
|
|
9425
9518
|
},
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9519
|
+
hostPath: {
|
|
9520
|
+
type: "DirectoryOrCreate",
|
|
9521
|
+
path: "/root/test"
|
|
9429
9522
|
},
|
|
9430
|
-
|
|
9431
|
-
|
|
9523
|
+
persistentVolumeReclaimPolicy: "Delete",
|
|
9524
|
+
volumeMode: "Filesystem"
|
|
9432
9525
|
}
|
|
9433
9526
|
};
|
|
9434
9527
|
const PVC_INIT_VALUE = {
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9528
|
+
apiVersion: "v1",
|
|
9529
|
+
kind: "PersistentVolumeClaim",
|
|
9530
|
+
metadata: {
|
|
9531
|
+
name: "",
|
|
9532
|
+
namespace: "default"
|
|
9440
9533
|
},
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9534
|
+
spec: {
|
|
9535
|
+
accessModes: [],
|
|
9536
|
+
resources: {
|
|
9537
|
+
requests: {
|
|
9538
|
+
storage: "10Gi"
|
|
9446
9539
|
}
|
|
9447
9540
|
},
|
|
9448
|
-
|
|
9449
|
-
|
|
9541
|
+
storageClassName: "",
|
|
9542
|
+
volumeMode: "Filesystem"
|
|
9450
9543
|
}
|
|
9451
9544
|
};
|
|
9452
9545
|
var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
|
|
@@ -9553,6 +9646,16 @@ class WorkloadBaseModel extends ResourceModel {
|
|
|
9553
9646
|
);
|
|
9554
9647
|
return (containers == null ? void 0 : containers.map((container2) => shortenedImage(container2.image || ""))) || [];
|
|
9555
9648
|
}
|
|
9649
|
+
async fetchRestarts(selector, namespace2) {
|
|
9650
|
+
const pods = await this._globalStore.get("pods", {
|
|
9651
|
+
resourceBasePath: "/api/v1",
|
|
9652
|
+
kind: "Pod"
|
|
9653
|
+
});
|
|
9654
|
+
const myPods = pods.items.filter(
|
|
9655
|
+
(p) => matchSelector(p, selector, namespace2)
|
|
9656
|
+
);
|
|
9657
|
+
return lodashExports.sumBy(myPods, "restarts");
|
|
9658
|
+
}
|
|
9556
9659
|
}
|
|
9557
9660
|
class JobModel extends WorkloadBaseModel {
|
|
9558
9661
|
constructor(_rawYaml, _globalStore) {
|
|
@@ -9564,18 +9667,11 @@ class JobModel extends WorkloadBaseModel {
|
|
|
9564
9667
|
await this.getRestarts();
|
|
9565
9668
|
}
|
|
9566
9669
|
async getRestarts() {
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
const myPods = pods.items.filter(
|
|
9572
|
-
(p) => {
|
|
9573
|
-
var _a;
|
|
9574
|
-
return matchSelector(p, (_a = this.spec) == null ? void 0 : _a.selector, this.metadata.namespace);
|
|
9575
|
-
}
|
|
9670
|
+
var _a;
|
|
9671
|
+
this.restarts = await this.fetchRestarts(
|
|
9672
|
+
(_a = this.spec) == null ? void 0 : _a.selector,
|
|
9673
|
+
this.metadata.namespace
|
|
9576
9674
|
);
|
|
9577
|
-
const result = lodashExports.sumBy(myPods, "restarts");
|
|
9578
|
-
this.restarts = result;
|
|
9579
9675
|
}
|
|
9580
9676
|
get duration() {
|
|
9581
9677
|
var _a, _b;
|
|
@@ -9640,18 +9736,11 @@ class WorkloadModel extends WorkloadBaseModel {
|
|
|
9640
9736
|
await this.getIngresses();
|
|
9641
9737
|
}
|
|
9642
9738
|
async getRestarts() {
|
|
9643
|
-
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
const myPods = pods.items.filter(
|
|
9648
|
-
(p) => {
|
|
9649
|
-
var _a;
|
|
9650
|
-
return matchSelector(p, (_a = this.spec) == null ? void 0 : _a.selector, this.metadata.namespace);
|
|
9651
|
-
}
|
|
9739
|
+
var _a;
|
|
9740
|
+
this.restarts = await this.fetchRestarts(
|
|
9741
|
+
(_a = this.spec) == null ? void 0 : _a.selector,
|
|
9742
|
+
this.metadata.namespace
|
|
9652
9743
|
);
|
|
9653
|
-
const result = lodashExports.sumBy(myPods, "restarts");
|
|
9654
|
-
this.restarts = result;
|
|
9655
9744
|
}
|
|
9656
9745
|
async getServices() {
|
|
9657
9746
|
const services = await this._globalStore.get("services", {
|
|
@@ -9668,10 +9757,10 @@ class WorkloadModel extends WorkloadBaseModel {
|
|
|
9668
9757
|
}
|
|
9669
9758
|
async getIngresses() {
|
|
9670
9759
|
const allIngresses = /* @__PURE__ */ new Map();
|
|
9671
|
-
for (const
|
|
9672
|
-
for (const
|
|
9673
|
-
const key2 = `${
|
|
9674
|
-
allIngresses.set(key2,
|
|
9760
|
+
for (const service2 of this.services) {
|
|
9761
|
+
for (const ingress2 of service2.ingresses) {
|
|
9762
|
+
const key2 = `${ingress2.namespace}-${ingress2.name}`;
|
|
9763
|
+
allIngresses.set(key2, ingress2);
|
|
9675
9764
|
}
|
|
9676
9765
|
}
|
|
9677
9766
|
this.ingresses = Array.from(allIngresses.values());
|
|
@@ -9704,6 +9793,23 @@ class WorkloadModel extends WorkloadBaseModel {
|
|
|
9704
9793
|
}
|
|
9705
9794
|
return newOne;
|
|
9706
9795
|
}
|
|
9796
|
+
getControllerRevisions(controllerRevisions) {
|
|
9797
|
+
return controllerRevisions.filter(
|
|
9798
|
+
(cr) => {
|
|
9799
|
+
var _a, _b;
|
|
9800
|
+
return (_b = (_a = cr.metadata) == null ? void 0 : _a.ownerReferences) == null ? void 0 : _b.some(
|
|
9801
|
+
(ref) => ref.kind === this.kind && ref.uid === this.metadata.uid
|
|
9802
|
+
);
|
|
9803
|
+
}
|
|
9804
|
+
);
|
|
9805
|
+
}
|
|
9806
|
+
getRevision(controllerRevisions) {
|
|
9807
|
+
const myRevisions = this.getControllerRevisions(controllerRevisions);
|
|
9808
|
+
return myRevisions.reduce(
|
|
9809
|
+
(result, cr) => Math.max(result, Number(cr.revision || 0)),
|
|
9810
|
+
0
|
|
9811
|
+
);
|
|
9812
|
+
}
|
|
9707
9813
|
}
|
|
9708
9814
|
class PodModel extends WorkloadBaseModel {
|
|
9709
9815
|
constructor(_rawYaml, _globalStore) {
|
|
@@ -9980,22 +10086,6 @@ class DaemonSetModel extends WorkloadModel {
|
|
|
9980
10086
|
super(_rawYaml, _globalStore);
|
|
9981
10087
|
this._rawYaml = _rawYaml;
|
|
9982
10088
|
}
|
|
9983
|
-
getControllerRevisions(controllerVisions) {
|
|
9984
|
-
return controllerVisions.filter(
|
|
9985
|
-
(controllerRevision) => {
|
|
9986
|
-
var _a, _b;
|
|
9987
|
-
return (_b = (_a = controllerRevision.metadata) == null ? void 0 : _a.ownerReferences) == null ? void 0 : _b.some(
|
|
9988
|
-
(ownerReference) => ownerReference.kind === "DaemonSet" && ownerReference.uid === this.metadata.uid
|
|
9989
|
-
);
|
|
9990
|
-
}
|
|
9991
|
-
);
|
|
9992
|
-
}
|
|
9993
|
-
getRevision(controllerVisions) {
|
|
9994
|
-
const myControllerVisions = this.getControllerRevisions(controllerVisions);
|
|
9995
|
-
return myControllerVisions.reduce((result, controllerRevision) => {
|
|
9996
|
-
return Math.max(result, Number(controllerRevision.revision || 0));
|
|
9997
|
-
}, 0);
|
|
9998
|
-
}
|
|
9999
10089
|
get stateDisplay() {
|
|
10000
10090
|
var _a, _b;
|
|
10001
10091
|
if (((_a = this.status) == null ? void 0 : _a.desiredNumberScheduled) !== ((_b = this.status) == null ? void 0 : _b.numberReady)) {
|
|
@@ -10015,22 +10105,6 @@ class StatefulSetModel extends WorkloadModel {
|
|
|
10015
10105
|
super(_rawYaml, _globalStore);
|
|
10016
10106
|
this._rawYaml = _rawYaml;
|
|
10017
10107
|
}
|
|
10018
|
-
getControllerRevisions(controllerVisions) {
|
|
10019
|
-
return controllerVisions.filter(
|
|
10020
|
-
(controllerRevision) => {
|
|
10021
|
-
var _a, _b;
|
|
10022
|
-
return (_b = (_a = controllerRevision.metadata) == null ? void 0 : _a.ownerReferences) == null ? void 0 : _b.some(
|
|
10023
|
-
(ownerReference) => ownerReference.kind === "StatefulSet" && ownerReference.uid === this.metadata.uid
|
|
10024
|
-
);
|
|
10025
|
-
}
|
|
10026
|
-
);
|
|
10027
|
-
}
|
|
10028
|
-
getRevision(controllerVisions) {
|
|
10029
|
-
const myControllerVisions = this.getControllerRevisions(controllerVisions);
|
|
10030
|
-
return myControllerVisions.reduce((result, controllerRevision) => {
|
|
10031
|
-
return Math.max(result, Number(controllerRevision.revision || 0));
|
|
10032
|
-
}, 0);
|
|
10033
|
-
}
|
|
10034
10108
|
get stateDisplay() {
|
|
10035
10109
|
var _a, _b, _c;
|
|
10036
10110
|
if (((_a = this.spec) == null ? void 0 : _a.replicas) === 0) {
|
|
@@ -10063,11 +10137,9 @@ class ServiceModel extends ResourceModel {
|
|
|
10063
10137
|
resourceBasePath: "/apis/networking.k8s.io/v1",
|
|
10064
10138
|
kind: "Ingress"
|
|
10065
10139
|
});
|
|
10066
|
-
const myIngresses = ingresses.items.filter((
|
|
10067
|
-
const rules =
|
|
10068
|
-
return rules.some(
|
|
10069
|
-
(rule2) => rule2.serviceName === this.name
|
|
10070
|
-
);
|
|
10140
|
+
const myIngresses = ingresses.items.filter((ingress2) => {
|
|
10141
|
+
const rules = ingress2.getFlattenedRules([]);
|
|
10142
|
+
return rules.some((rule2) => rule2.serviceName === this.name);
|
|
10071
10143
|
});
|
|
10072
10144
|
this.ingresses = myIngresses;
|
|
10073
10145
|
}
|
|
@@ -10259,15 +10331,15 @@ class IngressClassModel extends ResourceModel {
|
|
|
10259
10331
|
return (_a = this.spec) == null ? void 0 : _a.controller;
|
|
10260
10332
|
}
|
|
10261
10333
|
}
|
|
10262
|
-
const
|
|
10334
|
+
const index_1ndmolf = "";
|
|
10263
10335
|
const ServiceInClusterAccessComponent = ({
|
|
10264
|
-
service
|
|
10336
|
+
service: service2
|
|
10265
10337
|
}) => {
|
|
10266
|
-
const spec =
|
|
10267
|
-
switch (
|
|
10338
|
+
const spec = service2._rawYaml.spec;
|
|
10339
|
+
switch (service2.displayType) {
|
|
10268
10340
|
case ServiceTypeEnum.ExternalName:
|
|
10269
10341
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
10270
|
-
value:
|
|
10342
|
+
value: service2.dnsRecord
|
|
10271
10343
|
});
|
|
10272
10344
|
case ServiceTypeEnum.Headless:
|
|
10273
10345
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
@@ -10283,46 +10355,79 @@ const BreakLineStyle = "b1vtjd4k";
|
|
|
10283
10355
|
const LinkStyle$2 = "luro4rx";
|
|
10284
10356
|
const ShowLinkStyle = "s1gydjqf";
|
|
10285
10357
|
const DashedUnderlineSpanStyle = "dvp1i89";
|
|
10358
|
+
const AccessAddressStyle = "azmggeh";
|
|
10359
|
+
const ServiceAccessAddress = ({
|
|
10360
|
+
children,
|
|
10361
|
+
copyValue
|
|
10362
|
+
}) => {
|
|
10363
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
10364
|
+
className: AccessAddressStyle,
|
|
10365
|
+
children: [children, /* @__PURE__ */ jsxRuntimeExports.jsx(CopyButton, {
|
|
10366
|
+
value: copyValue
|
|
10367
|
+
})]
|
|
10368
|
+
});
|
|
10369
|
+
};
|
|
10370
|
+
function renderAccessItems(items, separator) {
|
|
10371
|
+
if (!items.length) {
|
|
10372
|
+
return void 0;
|
|
10373
|
+
}
|
|
10374
|
+
const result = [];
|
|
10375
|
+
for (let i2 = 0; i2 < items.length; i2++) {
|
|
10376
|
+
result.push(/* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, {
|
|
10377
|
+
children: items[i2]
|
|
10378
|
+
}, `item-${i2}`));
|
|
10379
|
+
if (i2 < items.length - 1) {
|
|
10380
|
+
result.push(/* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, {
|
|
10381
|
+
children: separator
|
|
10382
|
+
}, `separator-${i2}`));
|
|
10383
|
+
}
|
|
10384
|
+
}
|
|
10385
|
+
return result;
|
|
10386
|
+
}
|
|
10286
10387
|
const ServiceOutClusterAccessComponent = ({
|
|
10287
|
-
service,
|
|
10388
|
+
service: service2,
|
|
10288
10389
|
breakLine = true,
|
|
10289
10390
|
clusterVip,
|
|
10290
|
-
showDashedUnderline = true
|
|
10391
|
+
showDashedUnderline = true,
|
|
10392
|
+
showCopyButton = false
|
|
10291
10393
|
}) => {
|
|
10292
|
-
var _a, _b, _c, _d, _e;
|
|
10394
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
10293
10395
|
const {
|
|
10294
10396
|
i18n: i18n2
|
|
10295
10397
|
} = useTranslation();
|
|
10296
|
-
const spec =
|
|
10297
|
-
const status =
|
|
10398
|
+
const spec = service2._rawYaml.spec;
|
|
10399
|
+
const status = service2._rawYaml.status;
|
|
10298
10400
|
let content = "-";
|
|
10299
10401
|
switch (spec.type) {
|
|
10300
10402
|
case ServiceTypeEnum.NodePort:
|
|
10301
10403
|
if (!breakLine) {
|
|
10302
|
-
content = (_a = spec.ports) == null ? void 0 : _a.filter((v) => !!v).map((p) =>
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10404
|
+
content = (_a = spec.ports) == null ? void 0 : _a.filter((v) => !!v && v.nodePort).map((p) => {
|
|
10405
|
+
const address = `${clusterVip}:${p.nodePort}`;
|
|
10406
|
+
const link = /* @__PURE__ */ jsxRuntimeExports.jsx(Link$1, {
|
|
10407
|
+
href: `http://${address}`,
|
|
10408
|
+
target: "_blank",
|
|
10409
|
+
className: cx_default(ShowLinkStyle, Typo.Label.l4_regular_title),
|
|
10410
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, {
|
|
10411
|
+
title: i18n2.t("dovetail.default_http_protocol_tooltip"),
|
|
10412
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
10413
|
+
className: DashedUnderlineSpanStyle,
|
|
10414
|
+
style: showDashedUnderline ? void 0 : {
|
|
10415
|
+
borderBottom: "none"
|
|
10416
|
+
},
|
|
10417
|
+
children: address
|
|
10418
|
+
})
|
|
10314
10419
|
})
|
|
10315
|
-
})
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
const result = [];
|
|
10319
|
-
for (let i2 = 0; i2 < content.length; i2++) {
|
|
10320
|
-
result.push(content[i2]);
|
|
10321
|
-
if (i2 < content.length - 1) {
|
|
10322
|
-
result.push(", ");
|
|
10323
|
-
}
|
|
10420
|
+
}, p.name || p.nodePort);
|
|
10421
|
+
if (!showCopyButton) {
|
|
10422
|
+
return link;
|
|
10324
10423
|
}
|
|
10325
|
-
|
|
10424
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceAccessAddress, {
|
|
10425
|
+
copyValue: address,
|
|
10426
|
+
children: link
|
|
10427
|
+
}, p.name || p.nodePort);
|
|
10428
|
+
});
|
|
10429
|
+
if (content && content instanceof Array) {
|
|
10430
|
+
content = renderAccessItems(content, ", ");
|
|
10326
10431
|
}
|
|
10327
10432
|
break;
|
|
10328
10433
|
}
|
|
@@ -10345,15 +10450,31 @@ const ServiceOutClusterAccessComponent = ({
|
|
|
10345
10450
|
children: content
|
|
10346
10451
|
});
|
|
10347
10452
|
case ServiceTypeEnum.ExternalName:
|
|
10453
|
+
if (showCopyButton) {
|
|
10454
|
+
content = renderAccessItems(((_c = spec.externalIPs) == null ? void 0 : _c.map((ip) => /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceAccessAddress, {
|
|
10455
|
+
copyValue: ip,
|
|
10456
|
+
children: ip
|
|
10457
|
+
}, ip))) || [], breakLine ? "\n" : ", ");
|
|
10458
|
+
break;
|
|
10459
|
+
}
|
|
10348
10460
|
content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
10349
10461
|
useOverflow: false,
|
|
10350
|
-
value: (
|
|
10462
|
+
value: (_d = spec.externalIPs) == null ? void 0 : _d.join(breakLine ? "\n" : ", ")
|
|
10351
10463
|
});
|
|
10352
10464
|
break;
|
|
10353
10465
|
case ServiceTypeEnum.LoadBalancer:
|
|
10466
|
+
if (showCopyButton) {
|
|
10467
|
+
content = renderAccessItems(((_f = (_e = status.loadBalancer) == null ? void 0 : _e.ingress) == null ? void 0 : _f.map(({
|
|
10468
|
+
ip
|
|
10469
|
+
}) => ip).filter((ip) => !!ip).map((ip) => /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceAccessAddress, {
|
|
10470
|
+
copyValue: ip,
|
|
10471
|
+
children: ip
|
|
10472
|
+
}, ip))) || [], breakLine ? "\n" : ", ");
|
|
10473
|
+
break;
|
|
10474
|
+
}
|
|
10354
10475
|
content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
10355
10476
|
useOverflow: false,
|
|
10356
|
-
value: (
|
|
10477
|
+
value: (_h = (_g = status.loadBalancer) == null ? void 0 : _g.ingress) == null ? void 0 : _h.map(({
|
|
10357
10478
|
ip
|
|
10358
10479
|
}) => ip).join(breakLine ? "\n" : ", ")
|
|
10359
10480
|
});
|
|
@@ -10380,7 +10501,7 @@ const ServiceOutClusterAccessComponent = ({
|
|
|
10380
10501
|
children: content || "-"
|
|
10381
10502
|
});
|
|
10382
10503
|
};
|
|
10383
|
-
const
|
|
10504
|
+
const index_1l1kti4 = "";
|
|
10384
10505
|
const TagWrapper = "t13a6vox";
|
|
10385
10506
|
const TagStyle = "t12ikbmp";
|
|
10386
10507
|
const Tags = (props) => {
|
|
@@ -10646,67 +10767,53 @@ function immutableSet(obj, path2, value2) {
|
|
|
10646
10767
|
return setWith(clone(obj), path2, value2, clone);
|
|
10647
10768
|
}
|
|
10648
10769
|
function usePathMap(options) {
|
|
10649
|
-
const {
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
const
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
let result = values;
|
|
10668
|
-
for (const { from, to } of pathMap || []) {
|
|
10669
|
-
result = immutableSet(
|
|
10670
|
-
values,
|
|
10671
|
-
from,
|
|
10672
|
-
get$2(result, to)
|
|
10673
|
-
);
|
|
10674
|
-
const toPath = [...to];
|
|
10675
|
-
const lastKey = toPath.pop();
|
|
10676
|
-
if (lastKey) {
|
|
10677
|
-
const obj = get$2(result, toPath);
|
|
10678
|
-
if (obj && typeof obj === "object") {
|
|
10679
|
-
delete obj[lastKey];
|
|
10770
|
+
const {
|
|
10771
|
+
pathMap,
|
|
10772
|
+
transformInitValues: transformInitValuesFromOptions,
|
|
10773
|
+
transformApplyValues: transformApplyValuesFromOptions
|
|
10774
|
+
} = options;
|
|
10775
|
+
const transformInitValues = useCallback(
|
|
10776
|
+
(values) => {
|
|
10777
|
+
const initValues = values._rawYaml || values;
|
|
10778
|
+
let result = initValues;
|
|
10779
|
+
for (const { from, to } of pathMap || []) {
|
|
10780
|
+
result = immutableSet(initValues, to, get$2(initValues, from));
|
|
10781
|
+
const fromPath = [...from];
|
|
10782
|
+
const lastKey = fromPath.pop();
|
|
10783
|
+
if (lastKey) {
|
|
10784
|
+
const obj = get$2(result, fromPath);
|
|
10785
|
+
if (obj && typeof obj === "object") {
|
|
10786
|
+
delete obj[lastKey];
|
|
10787
|
+
}
|
|
10680
10788
|
}
|
|
10681
10789
|
}
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10790
|
+
return (transformInitValuesFromOptions == null ? void 0 : transformInitValuesFromOptions(result)) || result;
|
|
10791
|
+
},
|
|
10792
|
+
[transformInitValuesFromOptions, pathMap]
|
|
10793
|
+
);
|
|
10794
|
+
const transformApplyValues = useCallback(
|
|
10795
|
+
(values) => {
|
|
10796
|
+
let result = values;
|
|
10797
|
+
for (const { from, to } of pathMap || []) {
|
|
10798
|
+
result = immutableSet(values, from, get$2(result, to));
|
|
10799
|
+
const toPath = [...to];
|
|
10800
|
+
const lastKey = toPath.pop();
|
|
10801
|
+
if (lastKey) {
|
|
10802
|
+
const obj = get$2(result, toPath);
|
|
10803
|
+
if (obj && typeof obj === "object") {
|
|
10804
|
+
delete obj[lastKey];
|
|
10805
|
+
}
|
|
10806
|
+
}
|
|
10807
|
+
}
|
|
10808
|
+
return (transformApplyValuesFromOptions == null ? void 0 : transformApplyValuesFromOptions(result)) || result;
|
|
10809
|
+
},
|
|
10810
|
+
[transformApplyValuesFromOptions, pathMap]
|
|
10811
|
+
);
|
|
10685
10812
|
return {
|
|
10686
10813
|
transformInitValues,
|
|
10687
10814
|
transformApplyValues
|
|
10688
10815
|
};
|
|
10689
10816
|
}
|
|
10690
|
-
const useResourceVersionCheck = ({
|
|
10691
|
-
queryResult
|
|
10692
|
-
}) => {
|
|
10693
|
-
var _a, _b, _c;
|
|
10694
|
-
const initialResourceVersionRef = useRef();
|
|
10695
|
-
const [isExpired, setIsExpired] = useState(false);
|
|
10696
|
-
const currentResourceVersion = (_c = (_b = (_a = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a.data) == null ? void 0 : _b.metadata) == null ? void 0 : _c.resourceVersion;
|
|
10697
|
-
useEffect(() => {
|
|
10698
|
-
if (!currentResourceVersion)
|
|
10699
|
-
return;
|
|
10700
|
-
if (!initialResourceVersionRef.current) {
|
|
10701
|
-
initialResourceVersionRef.current = currentResourceVersion;
|
|
10702
|
-
return;
|
|
10703
|
-
}
|
|
10704
|
-
if (currentResourceVersion !== initialResourceVersionRef.current) {
|
|
10705
|
-
setIsExpired(true);
|
|
10706
|
-
}
|
|
10707
|
-
}, [currentResourceVersion]);
|
|
10708
|
-
return isExpired;
|
|
10709
|
-
};
|
|
10710
10817
|
function getInitialValues(resourceConfig) {
|
|
10711
10818
|
return resourceConfig.initValue || {
|
|
10712
10819
|
apiVersion: resourceConfig.apiVersion,
|
|
@@ -10715,42 +10822,6 @@ function getInitialValues(resourceConfig) {
|
|
|
10715
10822
|
spec: {}
|
|
10716
10823
|
};
|
|
10717
10824
|
}
|
|
10718
|
-
const button_1v659kh = "";
|
|
10719
|
-
const WarningButtonStyle = "wwyz7ti";
|
|
10720
|
-
const DataExpiredModal_eazxh6 = "";
|
|
10721
|
-
const NoteStyle = "n609wlp";
|
|
10722
|
-
function DataExpiredModal({
|
|
10723
|
-
onAbandon
|
|
10724
|
-
}) {
|
|
10725
|
-
const {
|
|
10726
|
-
t: t2
|
|
10727
|
-
} = useTranslation();
|
|
10728
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(SmallDialog, {
|
|
10729
|
-
title: t2("dovetail.data_expired"),
|
|
10730
|
-
closable: false,
|
|
10731
|
-
maskClosable: false,
|
|
10732
|
-
cancelButtonProps: {
|
|
10733
|
-
style: {
|
|
10734
|
-
display: "none"
|
|
10735
|
-
}
|
|
10736
|
-
},
|
|
10737
|
-
okText: t2("dovetail.abandon_edit"),
|
|
10738
|
-
okButtonProps: {
|
|
10739
|
-
className: WarningButtonStyle
|
|
10740
|
-
},
|
|
10741
|
-
onOk: (popModal) => {
|
|
10742
|
-
popModal();
|
|
10743
|
-
onAbandon();
|
|
10744
|
-
},
|
|
10745
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
10746
|
-
className: Typo.Label.l2_regular,
|
|
10747
|
-
children: t2("dovetail.data_expired_body")
|
|
10748
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
10749
|
-
className: `${Typo.Label.l2_regular} ${NoteStyle}`,
|
|
10750
|
-
children: t2("dovetail.data_expired_note")
|
|
10751
|
-
})]
|
|
10752
|
-
});
|
|
10753
|
-
}
|
|
10754
10825
|
const index_az4wrx = "";
|
|
10755
10826
|
const WrapperStyle$5 = "w1akirqw";
|
|
10756
10827
|
const TitleStyle$2 = "t30srnq";
|
|
@@ -10790,7 +10861,7 @@ const Separator = () => {
|
|
|
10790
10861
|
const style_1o641u6 = "";
|
|
10791
10862
|
const ToolBarStyle = "t1joof7s";
|
|
10792
10863
|
const ToolBarHeaderStyle = "tti58uh";
|
|
10793
|
-
const ErrorIconStyle = "e15yt16p";
|
|
10864
|
+
const ErrorIconStyle$1 = "e15yt16p";
|
|
10794
10865
|
const WrapperStyle$4 = "w3ccqks";
|
|
10795
10866
|
const TitleStyle$1 = "t7zbd78";
|
|
10796
10867
|
const IconStyle = "i1e4ouxy";
|
|
@@ -10800,278 +10871,276 @@ const ErrorWrapperStyle = "e19q2bnp";
|
|
|
10800
10871
|
const YamlEditorStyle = "y16u5v3w";
|
|
10801
10872
|
const MonacoYamlEditor$3 = React.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$1));
|
|
10802
10873
|
const MonacoYamlDiffEditor$2 = React.lazy(() => Promise.resolve().then(() => MonacoYamlDiffEditor$1));
|
|
10803
|
-
const YamlEditorComponent = forwardRef(
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
(newVal) => {
|
|
10844
|
-
var _a;
|
|
10845
|
-
_setValue(newVal);
|
|
10846
|
-
(_a = props.onChange) == null ? void 0 : _a.call(props, newVal);
|
|
10847
|
-
},
|
|
10848
|
-
[props.onChange]
|
|
10849
|
-
);
|
|
10850
|
-
const finalOnChange = useMemo(() => {
|
|
10851
|
-
return debounceTime ? debounce(onChange, debounceTime) : onChange;
|
|
10852
|
-
}, [onChange, debounceTime]);
|
|
10853
|
-
const onValidate = useCallback(
|
|
10854
|
-
(valid, schemaValid) => {
|
|
10855
|
-
var _a;
|
|
10856
|
-
(_a = props.onValidate) == null ? void 0 : _a.call(props, valid, schemaValid);
|
|
10857
|
-
},
|
|
10858
|
-
[props.onValidate]
|
|
10859
|
-
);
|
|
10860
|
-
const onEditorCreate = useCallback(
|
|
10861
|
-
(editor) => {
|
|
10862
|
-
var _a, _b, _c;
|
|
10863
|
-
if (editor.getValue() !== _value) {
|
|
10864
|
-
(_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(_valueString);
|
|
10865
|
-
}
|
|
10866
|
-
(_c = props.onEditorCreate) == null ? void 0 : _c.call(props, editor);
|
|
10867
|
-
},
|
|
10868
|
-
[_value, props.onEditorCreate]
|
|
10869
|
-
);
|
|
10870
|
-
const getInstance = useCallback((ins) => {
|
|
10871
|
-
editorInstance.current = ins;
|
|
10872
|
-
}, []);
|
|
10873
|
-
const getEditorValue = useCallback(() => {
|
|
10874
|
+
const YamlEditorComponent = forwardRef(function YamlEditorComponent2(props, ref) {
|
|
10875
|
+
const {
|
|
10876
|
+
title,
|
|
10877
|
+
collapsable = true,
|
|
10878
|
+
isDefaultCollapsed,
|
|
10879
|
+
value: value2,
|
|
10880
|
+
defaultValue = "",
|
|
10881
|
+
height,
|
|
10882
|
+
readOnly,
|
|
10883
|
+
errorMsgs = [],
|
|
10884
|
+
schemas,
|
|
10885
|
+
eleRef,
|
|
10886
|
+
className,
|
|
10887
|
+
debounceTime,
|
|
10888
|
+
isScrollOnFocus = true,
|
|
10889
|
+
isHideActions = false
|
|
10890
|
+
} = props;
|
|
10891
|
+
const { t: t2 } = useTranslation();
|
|
10892
|
+
const [isCollapsed, setIsCollapsed] = useState(
|
|
10893
|
+
collapsable ? isDefaultCollapsed : false
|
|
10894
|
+
);
|
|
10895
|
+
const [isDiff, setIsDiff] = useState(false);
|
|
10896
|
+
const [_value, _setValue] = useState(value2 || defaultValue);
|
|
10897
|
+
const editorInstance = useRef();
|
|
10898
|
+
const [copyTooltip, setCopyTooltip] = useState(t2("dovetail.copy"));
|
|
10899
|
+
const [resetTooltip, setResetTooltip] = useState(t2("dovetail.reset_arguments"));
|
|
10900
|
+
const defaultValueString = useMemo(() => {
|
|
10901
|
+
if (typeof defaultValue === "string") {
|
|
10902
|
+
return defaultValue;
|
|
10903
|
+
}
|
|
10904
|
+
return yaml$2.dump(defaultValue);
|
|
10905
|
+
}, [defaultValue]);
|
|
10906
|
+
const _valueString = useMemo(() => {
|
|
10907
|
+
if (typeof _value === "string") {
|
|
10908
|
+
return _value;
|
|
10909
|
+
}
|
|
10910
|
+
return yaml$2.dump(_value);
|
|
10911
|
+
}, [_value]);
|
|
10912
|
+
const onChange = useCallback(
|
|
10913
|
+
(newVal) => {
|
|
10874
10914
|
var _a;
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10915
|
+
_setValue(newVal);
|
|
10916
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, newVal);
|
|
10917
|
+
},
|
|
10918
|
+
[props.onChange]
|
|
10919
|
+
);
|
|
10920
|
+
const finalOnChange = useMemo(() => {
|
|
10921
|
+
return debounceTime ? debounce(onChange, debounceTime) : onChange;
|
|
10922
|
+
}, [onChange, debounceTime]);
|
|
10923
|
+
const onValidate = useCallback(
|
|
10924
|
+
(valid, schemaValid) => {
|
|
10925
|
+
var _a;
|
|
10926
|
+
(_a = props.onValidate) == null ? void 0 : _a.call(props, valid, schemaValid);
|
|
10927
|
+
},
|
|
10928
|
+
[props.onValidate]
|
|
10929
|
+
);
|
|
10930
|
+
const onEditorCreate = useCallback(
|
|
10931
|
+
(editor) => {
|
|
10932
|
+
var _a, _b, _c;
|
|
10933
|
+
if (editor.getValue() !== _value) {
|
|
10934
|
+
(_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(_valueString);
|
|
10883
10935
|
}
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
10930
|
-
|
|
10931
|
-
|
|
10932
|
-
|
|
10933
|
-
|
|
10934
|
-
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
iconWidth: 16,
|
|
10946
|
-
iconHeight: 16,
|
|
10947
|
-
onClick: () => {
|
|
10948
|
-
if (!isCollapsed) {
|
|
10949
|
-
copyToClipboard(getEditorValue());
|
|
10950
|
-
setCopyTooltip(t2("dovetail.copied"));
|
|
10951
|
-
}
|
|
10952
|
-
}
|
|
10953
|
-
}
|
|
10954
|
-
)
|
|
10955
|
-
}
|
|
10956
|
-
),
|
|
10957
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, {}),
|
|
10958
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10959
|
-
Tooltip,
|
|
10960
|
-
{
|
|
10961
|
-
title: isCollapsed ? "" : resetTooltip,
|
|
10962
|
-
onVisibleChange: (visible) => {
|
|
10963
|
-
if (!visible) {
|
|
10964
|
-
setTimeout(() => {
|
|
10965
|
-
setResetTooltip(t2("dovetail.reset_arguments"));
|
|
10966
|
-
}, 80);
|
|
10967
|
-
}
|
|
10968
|
-
},
|
|
10969
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10970
|
-
Icon,
|
|
10971
|
-
{
|
|
10972
|
-
"data-disabled": isCollapsed,
|
|
10973
|
-
src: Retry16GradientGrayIcon,
|
|
10974
|
-
hoverSrc: isCollapsed ? void 0 : Retry16GradientBlueIcon,
|
|
10975
|
-
className: IconStyle,
|
|
10976
|
-
iconWidth: 16,
|
|
10977
|
-
iconHeight: 16,
|
|
10978
|
-
onClick: () => {
|
|
10979
|
-
var _a;
|
|
10980
|
-
if (!isCollapsed) {
|
|
10981
|
-
(_a = editorInstance.current) == null ? void 0 : _a.setValue(defaultValueString);
|
|
10982
|
-
setResetTooltip(t2("dovetail.already_reset"));
|
|
10983
|
-
}
|
|
10984
|
-
}
|
|
10985
|
-
}
|
|
10986
|
-
)
|
|
10987
|
-
}
|
|
10988
|
-
),
|
|
10989
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, {})
|
|
10990
|
-
] }),
|
|
10936
|
+
(_c = props.onEditorCreate) == null ? void 0 : _c.call(props, editor);
|
|
10937
|
+
},
|
|
10938
|
+
[_value, props.onEditorCreate]
|
|
10939
|
+
);
|
|
10940
|
+
const getInstance = useCallback((ins) => {
|
|
10941
|
+
editorInstance.current = ins;
|
|
10942
|
+
}, []);
|
|
10943
|
+
const getEditorValue = useCallback(() => {
|
|
10944
|
+
var _a;
|
|
10945
|
+
return ((_a = editorInstance.current) == null ? void 0 : _a.getValue()) ?? "";
|
|
10946
|
+
}, []);
|
|
10947
|
+
useEffect(() => {
|
|
10948
|
+
var _a, _b;
|
|
10949
|
+
if (value2 !== void 0 && !isEqual$1(value2, _value)) {
|
|
10950
|
+
const valueString = typeof value2 === "string" ? value2 : yaml$2.dump(value2);
|
|
10951
|
+
_setValue(value2);
|
|
10952
|
+
(_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(valueString);
|
|
10953
|
+
}
|
|
10954
|
+
}, [value2]);
|
|
10955
|
+
useImperativeHandle(ref, () => {
|
|
10956
|
+
return {
|
|
10957
|
+
setValue: _setValue,
|
|
10958
|
+
setEditorValue: (value22) => {
|
|
10959
|
+
var _a, _b;
|
|
10960
|
+
(_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(value22);
|
|
10961
|
+
},
|
|
10962
|
+
getEditorValue,
|
|
10963
|
+
getEditorInstance: () => editorInstance.current || null
|
|
10964
|
+
};
|
|
10965
|
+
});
|
|
10966
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10967
|
+
"div",
|
|
10968
|
+
{
|
|
10969
|
+
className: cx_default(WrapperStyle$4, className),
|
|
10970
|
+
"data-is-error": !!errorMsgs.length,
|
|
10971
|
+
ref: eleRef,
|
|
10972
|
+
children: [
|
|
10973
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10974
|
+
Space,
|
|
10975
|
+
{
|
|
10976
|
+
className: cx_default(ToolBarStyle, isCollapsed ? "collapsed" : ""),
|
|
10977
|
+
direction: "vertical",
|
|
10978
|
+
size: 0,
|
|
10979
|
+
children: [
|
|
10980
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { className: ToolBarHeaderStyle, children: [
|
|
10981
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { size: 8, children: [
|
|
10982
|
+
collapsable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10983
|
+
Icon,
|
|
10984
|
+
{
|
|
10985
|
+
src: HierarchyTriangleRight16GrayIcon,
|
|
10986
|
+
hoverSrc: HierarchyTriangleRight16BlueIcon,
|
|
10987
|
+
className: cx_default(IconStyle, isCollapsed ? "" : "arrow-down"),
|
|
10988
|
+
iconWidth: 16,
|
|
10989
|
+
iconHeight: 16,
|
|
10990
|
+
onClick: () => setIsCollapsed(!isCollapsed)
|
|
10991
|
+
}
|
|
10992
|
+
),
|
|
10993
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cx_default(TitleStyle$1, "yaml-editor-title"), children: title || t2("dovetail.configure_file") })
|
|
10994
|
+
] }),
|
|
10995
|
+
isHideActions ? null : /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { size: 14, children: [
|
|
10996
|
+
isDiff ? void 0 : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
10991
10997
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10992
10998
|
Tooltip,
|
|
10993
10999
|
{
|
|
10994
|
-
title: isCollapsed ? "" :
|
|
10995
|
-
|
|
11000
|
+
title: isCollapsed ? "" : copyTooltip,
|
|
11001
|
+
onVisibleChange: (visible) => {
|
|
11002
|
+
if (!visible) {
|
|
11003
|
+
setTimeout(() => {
|
|
11004
|
+
setCopyTooltip(t2("dovetail.copy"));
|
|
11005
|
+
}, 80);
|
|
11006
|
+
}
|
|
11007
|
+
},
|
|
11008
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10996
11009
|
Icon,
|
|
10997
11010
|
{
|
|
10998
11011
|
"data-disabled": isCollapsed,
|
|
10999
|
-
src:
|
|
11000
|
-
hoverSrc: isCollapsed ? void 0 :
|
|
11012
|
+
src: ClipboardCopy16GradientGrayIcon,
|
|
11013
|
+
hoverSrc: isCollapsed ? void 0 : ClipboardCopy16GradientBlueIcon,
|
|
11001
11014
|
className: IconStyle,
|
|
11002
11015
|
iconWidth: 16,
|
|
11003
11016
|
iconHeight: 16,
|
|
11004
|
-
onClick: () =>
|
|
11017
|
+
onClick: () => {
|
|
11018
|
+
if (!isCollapsed) {
|
|
11019
|
+
copyToClipboard(getEditorValue());
|
|
11020
|
+
setCopyTooltip(t2("dovetail.copied"));
|
|
11021
|
+
}
|
|
11022
|
+
}
|
|
11023
|
+
}
|
|
11024
|
+
)
|
|
11025
|
+
}
|
|
11026
|
+
),
|
|
11027
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, {}),
|
|
11028
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11029
|
+
Tooltip,
|
|
11030
|
+
{
|
|
11031
|
+
title: isCollapsed ? "" : resetTooltip,
|
|
11032
|
+
onVisibleChange: (visible) => {
|
|
11033
|
+
if (!visible) {
|
|
11034
|
+
setTimeout(() => {
|
|
11035
|
+
setResetTooltip(t2("dovetail.reset_arguments"));
|
|
11036
|
+
}, 80);
|
|
11005
11037
|
}
|
|
11006
|
-
|
|
11038
|
+
},
|
|
11039
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11007
11040
|
Icon,
|
|
11008
11041
|
{
|
|
11009
11042
|
"data-disabled": isCollapsed,
|
|
11010
|
-
src:
|
|
11011
|
-
hoverSrc: isCollapsed ? void 0 :
|
|
11043
|
+
src: Retry16GradientGrayIcon,
|
|
11044
|
+
hoverSrc: isCollapsed ? void 0 : Retry16GradientBlueIcon,
|
|
11012
11045
|
className: IconStyle,
|
|
11013
11046
|
iconWidth: 16,
|
|
11014
11047
|
iconHeight: 16,
|
|
11015
|
-
onClick: () =>
|
|
11048
|
+
onClick: () => {
|
|
11049
|
+
var _a;
|
|
11050
|
+
if (!isCollapsed) {
|
|
11051
|
+
(_a = editorInstance.current) == null ? void 0 : _a.setValue(defaultValueString);
|
|
11052
|
+
setResetTooltip(t2("dovetail.already_reset"));
|
|
11053
|
+
}
|
|
11054
|
+
}
|
|
11016
11055
|
}
|
|
11017
11056
|
)
|
|
11018
11057
|
}
|
|
11019
|
-
)
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
|
|
11030
|
-
|
|
11031
|
-
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
}
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11058
|
+
),
|
|
11059
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, {})
|
|
11060
|
+
] }),
|
|
11061
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11062
|
+
Tooltip,
|
|
11063
|
+
{
|
|
11064
|
+
title: isCollapsed ? "" : isDiff ? t2("dovetail.back_to_edit") : t2("dovetail.view_changes"),
|
|
11065
|
+
children: isDiff ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11066
|
+
Icon,
|
|
11067
|
+
{
|
|
11068
|
+
"data-disabled": isCollapsed,
|
|
11069
|
+
src: EditPen16GradientGrayIcon,
|
|
11070
|
+
hoverSrc: isCollapsed ? void 0 : EditPen16GradientBlueIcon,
|
|
11071
|
+
className: IconStyle,
|
|
11072
|
+
iconWidth: 16,
|
|
11073
|
+
iconHeight: 16,
|
|
11074
|
+
onClick: () => isCollapsed ? void 0 : setIsDiff(false)
|
|
11075
|
+
}
|
|
11076
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11077
|
+
Icon,
|
|
11078
|
+
{
|
|
11079
|
+
"data-disabled": isCollapsed,
|
|
11080
|
+
src: Showdiff16GradientGrayIcon,
|
|
11081
|
+
hoverSrc: isCollapsed ? void 0 : Showdiff16GradientBlueIcon,
|
|
11082
|
+
className: IconStyle,
|
|
11083
|
+
iconWidth: 16,
|
|
11084
|
+
iconHeight: 16,
|
|
11085
|
+
onClick: () => isCollapsed ? void 0 : setIsDiff(true)
|
|
11086
|
+
}
|
|
11087
|
+
)
|
|
11088
|
+
}
|
|
11089
|
+
)
|
|
11090
|
+
] })
|
|
11091
|
+
] }),
|
|
11092
|
+
errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { className: ErrorWrapperStyle, size: 8, align: "start", children: [
|
|
11093
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(XmarkFailedSeriousWarningFill16RedIcon, { className: ErrorIconStyle$1 }),
|
|
11094
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("pre", { className: ErrorMsgStyle, children: [
|
|
11095
|
+
errorMsgs.length > 1 ? `${index2 + 1}. ` : "",
|
|
11096
|
+
errorMsg
|
|
11097
|
+
] }, errorMsg)) })
|
|
11098
|
+
] }) : void 0
|
|
11099
|
+
]
|
|
11100
|
+
}
|
|
11101
|
+
),
|
|
11102
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11103
|
+
"div",
|
|
11104
|
+
{
|
|
11105
|
+
style: {
|
|
11106
|
+
display: isCollapsed ? "none" : "block",
|
|
11107
|
+
width: "100%",
|
|
11108
|
+
height: height || "500px",
|
|
11109
|
+
zIndex: 1
|
|
11110
|
+
},
|
|
11111
|
+
children: [
|
|
11112
|
+
/* @__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(
|
|
11113
|
+
MonacoYamlEditor$3,
|
|
11114
|
+
{
|
|
11115
|
+
id: props.id,
|
|
11116
|
+
getInstance,
|
|
11117
|
+
defaultValue: _value,
|
|
11118
|
+
height,
|
|
11119
|
+
onChange: finalOnChange,
|
|
11120
|
+
onValidate,
|
|
11121
|
+
onEditorCreate,
|
|
11122
|
+
onBlur: props.onBlur,
|
|
11123
|
+
schemas,
|
|
11124
|
+
readOnly,
|
|
11125
|
+
isScrollOnFocus
|
|
11126
|
+
}
|
|
11127
|
+
) }) }),
|
|
11128
|
+
isDiff ? /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: _valueString }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11129
|
+
MonacoYamlDiffEditor$2,
|
|
11130
|
+
{
|
|
11131
|
+
id: props.id,
|
|
11132
|
+
origin: defaultValueString,
|
|
11133
|
+
modified: _valueString,
|
|
11134
|
+
height
|
|
11135
|
+
}
|
|
11136
|
+
) }) : null
|
|
11137
|
+
]
|
|
11138
|
+
}
|
|
11139
|
+
)
|
|
11140
|
+
]
|
|
11141
|
+
}
|
|
11142
|
+
);
|
|
11143
|
+
});
|
|
11075
11144
|
function copyToClipboard(text) {
|
|
11076
11145
|
const input = document.createElement("textarea");
|
|
11077
11146
|
input.value = text;
|
|
@@ -11080,17 +11149,71 @@ function copyToClipboard(text) {
|
|
|
11080
11149
|
document.execCommand("copy");
|
|
11081
11150
|
document.body.removeChild(input);
|
|
11082
11151
|
}
|
|
11152
|
+
const useGlobalStore = (name2 = "default") => {
|
|
11153
|
+
const globalStores = useContext(GlobalStoreContext);
|
|
11154
|
+
return globalStores[name2];
|
|
11155
|
+
};
|
|
11156
|
+
const ResourceVersionConflictRetryContext = createContext(null);
|
|
11157
|
+
function Retry409Provider({
|
|
11158
|
+
children
|
|
11159
|
+
}) {
|
|
11160
|
+
const initialResourceRef = useRef();
|
|
11161
|
+
return createElement(
|
|
11162
|
+
ResourceVersionConflictRetryContext.Provider,
|
|
11163
|
+
{
|
|
11164
|
+
value: initialResourceRef
|
|
11165
|
+
},
|
|
11166
|
+
children
|
|
11167
|
+
);
|
|
11168
|
+
}
|
|
11169
|
+
function use409Retry({
|
|
11170
|
+
action,
|
|
11171
|
+
dataProviderName,
|
|
11172
|
+
id,
|
|
11173
|
+
mutationMeta
|
|
11174
|
+
}) {
|
|
11175
|
+
const { t: t2 } = useTranslation();
|
|
11176
|
+
const globalStore = useGlobalStore(dataProviderName);
|
|
11177
|
+
const sharedInitialResourceRef = useContext(ResourceVersionConflictRetryContext);
|
|
11178
|
+
const localInitialResourceRef = useRef();
|
|
11179
|
+
const initialResourceRef = sharedInitialResourceRef || localInitialResourceRef;
|
|
11180
|
+
const isEditAction = action === "edit" || !!id;
|
|
11181
|
+
const captureInitialResource = useCallback((resource) => {
|
|
11182
|
+
var _a;
|
|
11183
|
+
if (!isEditAction || initialResourceRef.current || !resource) {
|
|
11184
|
+
return;
|
|
11185
|
+
}
|
|
11186
|
+
const rawResource = (_a = globalStore == null ? void 0 : globalStore.restoreItem) == null ? void 0 : _a.call(globalStore, resource);
|
|
11187
|
+
if (!rawResource) {
|
|
11188
|
+
return;
|
|
11189
|
+
}
|
|
11190
|
+
initialResourceRef.current = cloneDeep(rawResource);
|
|
11191
|
+
}, [globalStore, initialResourceRef, isEditAction]);
|
|
11192
|
+
const retryMutationMeta = useMemo(() => {
|
|
11193
|
+
const restMutationMeta = omit$1(mutationMeta, "resourceVersionConflictRetry");
|
|
11194
|
+
if (!isEditAction) {
|
|
11195
|
+
return restMutationMeta;
|
|
11196
|
+
}
|
|
11197
|
+
return {
|
|
11198
|
+
...restMutationMeta,
|
|
11199
|
+
resourceVersionConflictRetry: {
|
|
11200
|
+
// refine 的 mutationMeta 在 hook 创建时就会固定;用 getter 让 provider 在保存瞬间读取最新的初始版本。
|
|
11201
|
+
get initialResource() {
|
|
11202
|
+
return initialResourceRef.current;
|
|
11203
|
+
},
|
|
11204
|
+
conflictMessage: t2("dovetail.resource_version_conflict")
|
|
11205
|
+
}
|
|
11206
|
+
};
|
|
11207
|
+
}, [initialResourceRef, isEditAction, mutationMeta, t2]);
|
|
11208
|
+
return {
|
|
11209
|
+
captureInitialResource,
|
|
11210
|
+
mutationMeta: retryMutationMeta
|
|
11211
|
+
};
|
|
11212
|
+
}
|
|
11083
11213
|
function useK8sYamlEditor() {
|
|
11084
11214
|
const foldSymbol = useCallback(function(editor, symbol) {
|
|
11085
11215
|
const model = editor.getModel();
|
|
11086
|
-
const matchs = (model == null ? void 0 : model.findMatches(
|
|
11087
|
-
symbol,
|
|
11088
|
-
false,
|
|
11089
|
-
false,
|
|
11090
|
-
false,
|
|
11091
|
-
"",
|
|
11092
|
-
false
|
|
11093
|
-
).filter((match) => match.range.startColumn === 1)) || [];
|
|
11216
|
+
const matchs = (model == null ? void 0 : model.findMatches(symbol, false, false, false, "", false).filter((match) => match.range.startColumn === 1)) || [];
|
|
11094
11217
|
return new Promise(async (resolve, reject) => {
|
|
11095
11218
|
try {
|
|
11096
11219
|
for (const match of matchs) {
|
|
@@ -11104,19 +11227,22 @@ function useK8sYamlEditor() {
|
|
|
11104
11227
|
}
|
|
11105
11228
|
});
|
|
11106
11229
|
}, []);
|
|
11107
|
-
const fold2 = useCallback(
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11230
|
+
const fold2 = useCallback(
|
|
11231
|
+
async function(editor) {
|
|
11232
|
+
await editor.getAction("editor.unfoldAll").run();
|
|
11233
|
+
const symbols = [
|
|
11234
|
+
" annotations:",
|
|
11235
|
+
" managedFields:",
|
|
11236
|
+
"status:",
|
|
11237
|
+
" kubectl.kubernetes.io/last-applied-configuration:"
|
|
11238
|
+
];
|
|
11239
|
+
for (const symbol of symbols) {
|
|
11240
|
+
await foldSymbol(editor, symbol);
|
|
11241
|
+
}
|
|
11242
|
+
editor.setScrollPosition({ scrollTop: 0 });
|
|
11243
|
+
},
|
|
11244
|
+
[foldSymbol]
|
|
11245
|
+
);
|
|
11120
11246
|
return {
|
|
11121
11247
|
fold: fold2
|
|
11122
11248
|
};
|
|
@@ -11190,10 +11316,6 @@ function generateYamlBySchema(defaultValue, schema) {
|
|
|
11190
11316
|
const content = yaml$2.dump(merged);
|
|
11191
11317
|
return content.replace(/(')(#.+?)(')/g, "$2").replace(/( +)(#)/g, "$2$1");
|
|
11192
11318
|
}
|
|
11193
|
-
const useGlobalStore = (name2 = "default") => {
|
|
11194
|
-
const globalStores = useContext(GlobalStoreContext);
|
|
11195
|
-
return globalStores[name2];
|
|
11196
|
-
};
|
|
11197
11319
|
const useYamlForm = ({
|
|
11198
11320
|
action: actionFromProps,
|
|
11199
11321
|
resource,
|
|
@@ -11231,7 +11353,7 @@ const useYamlForm = ({
|
|
|
11231
11353
|
onSubmitAbort,
|
|
11232
11354
|
rules
|
|
11233
11355
|
} = {}) => {
|
|
11234
|
-
var _a;
|
|
11356
|
+
var _a, _b;
|
|
11235
11357
|
const editor = useRef(null);
|
|
11236
11358
|
const { t: t2 } = useTranslation();
|
|
11237
11359
|
const [isYamlValid, setIsYamlValid] = useState(true);
|
|
@@ -11242,7 +11364,17 @@ const useYamlForm = ({
|
|
|
11242
11364
|
const [beforeSubmitErrors, setBeforeSubmitErrors] = useState([]);
|
|
11243
11365
|
const [errorResponseBody, setErrorResponseBody] = useState(null);
|
|
11244
11366
|
const useResourceResult = useResource();
|
|
11245
|
-
const globalStore = useGlobalStore();
|
|
11367
|
+
const globalStore = useGlobalStore(dataProviderName);
|
|
11368
|
+
const action = useMemo(
|
|
11369
|
+
() => actionFromProps || useResourceResult.action,
|
|
11370
|
+
[actionFromProps, useResourceResult.action]
|
|
11371
|
+
);
|
|
11372
|
+
const { captureInitialResource, mutationMeta: finalMutationMeta } = use409Retry({
|
|
11373
|
+
action,
|
|
11374
|
+
dataProviderName,
|
|
11375
|
+
id: idFromProps,
|
|
11376
|
+
mutationMeta
|
|
11377
|
+
});
|
|
11246
11378
|
const {
|
|
11247
11379
|
schema,
|
|
11248
11380
|
loading: isLoadingSchema,
|
|
@@ -11279,7 +11411,7 @@ const useYamlForm = ({
|
|
|
11279
11411
|
meta: pickNotDeprecated(meta, metaData),
|
|
11280
11412
|
metaData: pickNotDeprecated(meta, metaData),
|
|
11281
11413
|
queryMeta,
|
|
11282
|
-
mutationMeta,
|
|
11414
|
+
mutationMeta: finalMutationMeta,
|
|
11283
11415
|
liveMode,
|
|
11284
11416
|
liveParams,
|
|
11285
11417
|
mutationMode,
|
|
@@ -11294,12 +11426,12 @@ const useYamlForm = ({
|
|
|
11294
11426
|
overtimeOptions
|
|
11295
11427
|
});
|
|
11296
11428
|
const { formLoading, onFinish, queryResult } = useFormCoreResult;
|
|
11429
|
+
useEffect(() => {
|
|
11430
|
+
var _a2;
|
|
11431
|
+
captureInitialResource((_a2 = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a2.data);
|
|
11432
|
+
}, [captureInitialResource, (_a = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a.data]);
|
|
11297
11433
|
const { warnWhenUnsavedChanges: warnWhenUnsavedChangesRefine, setWarnWhen } = useWarnAboutChange();
|
|
11298
11434
|
const warnWhenUnsavedChanges = warnWhenUnsavedChangesProp ?? warnWhenUnsavedChangesRefine;
|
|
11299
|
-
const action = useMemo(
|
|
11300
|
-
() => actionFromProps || useResourceResult.action,
|
|
11301
|
-
[actionFromProps, useResourceResult.action]
|
|
11302
|
-
);
|
|
11303
11435
|
const initialValues = useMemo(() => {
|
|
11304
11436
|
var _a2;
|
|
11305
11437
|
const initialValues2 = (action === "edit" && ((_a2 = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a2.data) ? initialValuesForEdit || (globalStore == null ? void 0 : globalStore.restoreItem(queryResult.data.data)) : initialValuesForCreate) || {};
|
|
@@ -11307,7 +11439,14 @@ const useYamlForm = ({
|
|
|
11307
11439
|
pruneBeforeEdit(initialValues2);
|
|
11308
11440
|
}
|
|
11309
11441
|
return (transformInitValues == null ? void 0 : transformInitValues(initialValues2)) || initialValues2;
|
|
11310
|
-
}, [
|
|
11442
|
+
}, [
|
|
11443
|
+
queryResult,
|
|
11444
|
+
globalStore,
|
|
11445
|
+
initialValuesForCreate,
|
|
11446
|
+
action,
|
|
11447
|
+
initialValuesForEdit,
|
|
11448
|
+
transformInitValues
|
|
11449
|
+
]);
|
|
11311
11450
|
const finalErrors = useMemo(() => {
|
|
11312
11451
|
return uniq([...editorErrors, ...rulesErrors]);
|
|
11313
11452
|
}, [editorErrors, rulesErrors]);
|
|
@@ -11342,10 +11481,10 @@ const useYamlForm = ({
|
|
|
11342
11481
|
}
|
|
11343
11482
|
},
|
|
11344
11483
|
onEditorCreate(editorInstance) {
|
|
11345
|
-
var _a3,
|
|
11484
|
+
var _a3, _b2;
|
|
11346
11485
|
const editorValue = yaml$2.dump(initialValues);
|
|
11347
11486
|
(_a3 = editor.current) == null ? void 0 : _a3.setEditorValue(editorValue);
|
|
11348
|
-
(
|
|
11487
|
+
(_b2 = editor.current) == null ? void 0 : _b2.setValue(editorValue);
|
|
11349
11488
|
if (action === "edit") {
|
|
11350
11489
|
fold2(editorInstance);
|
|
11351
11490
|
}
|
|
@@ -11358,7 +11497,7 @@ const useYamlForm = ({
|
|
|
11358
11497
|
initialValues,
|
|
11359
11498
|
schemas,
|
|
11360
11499
|
resource,
|
|
11361
|
-
(
|
|
11500
|
+
(_b = useResourceResult.resource) == null ? void 0 : _b.name,
|
|
11362
11501
|
action,
|
|
11363
11502
|
finalErrors,
|
|
11364
11503
|
fold2
|
|
@@ -11398,7 +11537,7 @@ const useYamlForm = ({
|
|
|
11398
11537
|
formProps: {
|
|
11399
11538
|
...formSF.formProps,
|
|
11400
11539
|
onFinish: async (values) => {
|
|
11401
|
-
var _a2,
|
|
11540
|
+
var _a2, _b2;
|
|
11402
11541
|
setBeforeSubmitErrors([]);
|
|
11403
11542
|
onSubmitStart == null ? void 0 : onSubmitStart();
|
|
11404
11543
|
const errors = [
|
|
@@ -11418,19 +11557,22 @@ const useYamlForm = ({
|
|
|
11418
11557
|
return;
|
|
11419
11558
|
}
|
|
11420
11559
|
try {
|
|
11421
|
-
const objectValues = editor.current ? yaml$2.load(((
|
|
11560
|
+
const objectValues = editor.current ? yaml$2.load(((_b2 = editor.current) == null ? void 0 : _b2.getEditorValue()) || "") : values;
|
|
11422
11561
|
let finalValues = (transformApplyValues == null ? void 0 : transformApplyValues(objectValues)) || objectValues;
|
|
11423
11562
|
if (beforeSubmit) {
|
|
11424
11563
|
try {
|
|
11425
11564
|
let hasErrors = false;
|
|
11426
11565
|
setIsBeforeSubmitLoading(true);
|
|
11427
|
-
const result = await beforeSubmit(
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11566
|
+
const result = await beforeSubmit(
|
|
11567
|
+
finalValues,
|
|
11568
|
+
(errors2) => {
|
|
11569
|
+
if (errors2 && errors2.length > 0) {
|
|
11570
|
+
setBeforeSubmitErrors(errors2);
|
|
11571
|
+
onBeforeSubmitError == null ? void 0 : onBeforeSubmitError(errors2);
|
|
11572
|
+
hasErrors = true;
|
|
11573
|
+
}
|
|
11432
11574
|
}
|
|
11433
|
-
|
|
11575
|
+
);
|
|
11434
11576
|
if (hasErrors) {
|
|
11435
11577
|
onSubmitAbort == null ? void 0 : onSubmitAbort();
|
|
11436
11578
|
return;
|
|
@@ -11520,6 +11662,7 @@ function YamlForm(props) {
|
|
|
11520
11662
|
id,
|
|
11521
11663
|
action: actionFromProps,
|
|
11522
11664
|
resource: resource == null ? void 0 : resource.name,
|
|
11665
|
+
dataProviderName: resourceConfig.dataProviderName,
|
|
11523
11666
|
editorOptions: {
|
|
11524
11667
|
isSkipSchema: schemaStrategy === "None"
|
|
11525
11668
|
/* None */
|
|
@@ -11642,31 +11785,6 @@ function YamlFormContainer({
|
|
|
11642
11785
|
onSaveButtonPropsChange
|
|
11643
11786
|
}) {
|
|
11644
11787
|
const action = id ? "edit" : "create";
|
|
11645
|
-
const pushModal = usePushModal();
|
|
11646
|
-
const popModal = usePopModal();
|
|
11647
|
-
const hasShownExpiredRef = useRef(false);
|
|
11648
|
-
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
11649
|
-
const queryResult = useOne({
|
|
11650
|
-
resource: resourceConfig.name,
|
|
11651
|
-
id,
|
|
11652
|
-
liveMode: id ? "auto" : "off",
|
|
11653
|
-
queryOptions: { enabled: !!id }
|
|
11654
|
-
});
|
|
11655
|
-
const isExpired = useResourceVersionCheck({ queryResult });
|
|
11656
|
-
useEffect(() => {
|
|
11657
|
-
if (!isExpired || isSubmitting || hasShownExpiredRef.current) {
|
|
11658
|
-
return;
|
|
11659
|
-
}
|
|
11660
|
-
hasShownExpiredRef.current = true;
|
|
11661
|
-
pushModal({
|
|
11662
|
-
component: DataExpiredModal,
|
|
11663
|
-
props: {
|
|
11664
|
-
onAbandon: () => {
|
|
11665
|
-
popModal();
|
|
11666
|
-
}
|
|
11667
|
-
}
|
|
11668
|
-
});
|
|
11669
|
-
}, [isExpired, isSubmitting, pushModal, popModal]);
|
|
11670
11788
|
const { transformInitValues, transformApplyValues } = usePathMap({
|
|
11671
11789
|
pathMap: formConfig == null ? void 0 : formConfig.pathMap,
|
|
11672
11790
|
transformInitValues: formConfig == null ? void 0 : formConfig.transformInitValues,
|
|
@@ -11686,13 +11804,7 @@ function YamlFormContainer({
|
|
|
11686
11804
|
action,
|
|
11687
11805
|
isShowLayout: false,
|
|
11688
11806
|
useFormProps: {
|
|
11689
|
-
redirect: false
|
|
11690
|
-
onSubmitStart: () => {
|
|
11691
|
-
setIsSubmitting(true);
|
|
11692
|
-
},
|
|
11693
|
-
onSubmitAbort: () => {
|
|
11694
|
-
setIsSubmitting(false);
|
|
11695
|
-
}
|
|
11807
|
+
redirect: false
|
|
11696
11808
|
},
|
|
11697
11809
|
rules: void 0,
|
|
11698
11810
|
onSaveButtonPropsChange,
|
|
@@ -11800,6 +11912,7 @@ function RawYamlFormModal(props) {
|
|
|
11800
11912
|
},
|
|
11801
11913
|
okText: ((_c = resourceConfig.formConfig) == null ? void 0 : _c.saveButtonText) || okText,
|
|
11802
11914
|
destroyOnClose: true,
|
|
11915
|
+
isContentFull: true,
|
|
11803
11916
|
children: [desc ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
11804
11917
|
className: FormDescStyle$1,
|
|
11805
11918
|
children: desc
|
|
@@ -11842,8 +11955,9 @@ function useOpenForm() {
|
|
|
11842
11955
|
if (formType === void 0 || formType === FormContainerType.MODAL) {
|
|
11843
11956
|
pushModal({
|
|
11844
11957
|
component: () => {
|
|
11845
|
-
var _a2;
|
|
11846
|
-
|
|
11958
|
+
var _a2, _b2, _c;
|
|
11959
|
+
const isYamlOnlyForm = ((_a2 = resourceConfig.formConfig) == null ? void 0 : _a2.formType) !== FormType.FORM && !((_b2 = resourceConfig.formConfig) == null ? void 0 : _b2.CustomFormModal);
|
|
11960
|
+
if ((options == null ? void 0 : options.useYamlEditor) || isYamlOnlyForm) {
|
|
11847
11961
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11848
11962
|
RawYamlFormModal,
|
|
11849
11963
|
{
|
|
@@ -11856,7 +11970,7 @@ function useOpenForm() {
|
|
|
11856
11970
|
}
|
|
11857
11971
|
);
|
|
11858
11972
|
}
|
|
11859
|
-
const ModalComponent = ((
|
|
11973
|
+
const ModalComponent = ((_c = resourceConfig.formConfig) == null ? void 0 : _c.CustomFormModal) || FormModal;
|
|
11860
11974
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11861
11975
|
ModalComponent,
|
|
11862
11976
|
{
|
|
@@ -12376,34 +12490,6 @@ function CreateButton(props) {
|
|
|
12376
12490
|
}
|
|
12377
12491
|
);
|
|
12378
12492
|
}
|
|
12379
|
-
const useDeleteManyModal = (resource, ids) => {
|
|
12380
|
-
const { mutate } = useDeleteMany();
|
|
12381
|
-
const [visible, setVisible] = useState(false);
|
|
12382
|
-
const { t: t2 } = useTranslation();
|
|
12383
|
-
const modalProps = {
|
|
12384
|
-
title: t2("dovetail.delete"),
|
|
12385
|
-
okText: t2("dovetail.delete"),
|
|
12386
|
-
okButtonProps: {
|
|
12387
|
-
danger: true
|
|
12388
|
-
},
|
|
12389
|
-
cancelText: t2("dovetail.cancel"),
|
|
12390
|
-
children: t2("dovetail.confirm_delete_text", {
|
|
12391
|
-
target: ids,
|
|
12392
|
-
interpolation: { escapeValue: false }
|
|
12393
|
-
}),
|
|
12394
|
-
onOk() {
|
|
12395
|
-
mutate({
|
|
12396
|
-
resource,
|
|
12397
|
-
ids
|
|
12398
|
-
});
|
|
12399
|
-
setVisible(false);
|
|
12400
|
-
},
|
|
12401
|
-
onCancel() {
|
|
12402
|
-
setVisible(false);
|
|
12403
|
-
}
|
|
12404
|
-
};
|
|
12405
|
-
return { modalProps, visible, setVisible };
|
|
12406
|
-
};
|
|
12407
12493
|
const DeleteManyButton = (props) => {
|
|
12408
12494
|
const { resource } = useResource();
|
|
12409
12495
|
const { t: t2 } = useTranslation();
|
|
@@ -12707,94 +12793,109 @@ const ResourceLink = (props) => {
|
|
|
12707
12793
|
value: ""
|
|
12708
12794
|
});
|
|
12709
12795
|
};
|
|
12710
|
-
const
|
|
12711
|
-
|
|
12712
|
-
|
|
12796
|
+
const IngressRulesTable_1nylejt = "";
|
|
12797
|
+
const PathCellStyle = "pmi0ggi";
|
|
12798
|
+
const PathTextStyle = "p1gmjxeo";
|
|
12799
|
+
const PathCopyStyle = "p1379cb5";
|
|
12800
|
+
const IngressRulesTable = ({
|
|
12801
|
+
ingress: ingress2
|
|
12802
|
+
}) => {
|
|
12803
|
+
const {
|
|
12804
|
+
t: t2
|
|
12805
|
+
} = useTranslation();
|
|
12806
|
+
const {
|
|
12807
|
+
data: serviceData
|
|
12808
|
+
} = useList({
|
|
12713
12809
|
resource: "services",
|
|
12714
12810
|
meta: {
|
|
12715
12811
|
kind: "Service",
|
|
12716
12812
|
apiVersion: "v1"
|
|
12717
12813
|
}
|
|
12718
12814
|
});
|
|
12719
|
-
const flattenedRules = useMemo(
|
|
12720
|
-
() => (serviceData == null ? void 0 : serviceData.data) ? ingress.getFlattenedRules(serviceData == null ? void 0 : serviceData.data) : [],
|
|
12721
|
-
[serviceData == null ? void 0 : serviceData.data, ingress]
|
|
12722
|
-
);
|
|
12815
|
+
const flattenedRules = useMemo(() => (serviceData == null ? void 0 : serviceData.data) ? ingress2.getFlattenedRules(serviceData == null ? void 0 : serviceData.data) : [], [serviceData == null ? void 0 : serviceData.data, ingress2]);
|
|
12723
12816
|
const rows = useMemo(() => {
|
|
12724
12817
|
return addId(flattenedRules || [], "fullPath");
|
|
12725
12818
|
}, [flattenedRules]);
|
|
12726
12819
|
const component = useContext(ComponentContext);
|
|
12727
12820
|
const Table2 = component.Table || Table$1;
|
|
12728
12821
|
const currentSize = 10;
|
|
12729
|
-
const columns = [
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
},
|
|
12749
|
-
{
|
|
12750
|
-
key: "serviceName",
|
|
12751
|
-
display: true,
|
|
12752
|
-
dataIndex: "serviceName",
|
|
12753
|
-
title: t2("dovetail.target_service"),
|
|
12754
|
-
sortable: true,
|
|
12755
|
-
width: 160,
|
|
12756
|
-
render: (serviceName, record) => {
|
|
12757
|
-
return record.serviceName ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12758
|
-
ResourceLink,
|
|
12759
|
-
{
|
|
12760
|
-
resourceName: "services",
|
|
12761
|
-
namespace: ingress.metadata.namespace || "default",
|
|
12762
|
-
name: serviceName
|
|
12763
|
-
}
|
|
12764
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" });
|
|
12822
|
+
const columns = [{
|
|
12823
|
+
key: "pathType",
|
|
12824
|
+
display: true,
|
|
12825
|
+
dataIndex: "pathType",
|
|
12826
|
+
title: t2("dovetail.path_type"),
|
|
12827
|
+
width: 160,
|
|
12828
|
+
sortable: true
|
|
12829
|
+
}, {
|
|
12830
|
+
key: "fullPath",
|
|
12831
|
+
display: true,
|
|
12832
|
+
dataIndex: "fullPath",
|
|
12833
|
+
title: t2("dovetail.path"),
|
|
12834
|
+
width: 478,
|
|
12835
|
+
sortable: true,
|
|
12836
|
+
render(value2) {
|
|
12837
|
+
if (!value2) {
|
|
12838
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
12839
|
+
value: ""
|
|
12840
|
+
});
|
|
12765
12841
|
}
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
|
|
12776
|
-
|
|
12777
|
-
|
|
12778
|
-
|
|
12779
|
-
|
|
12780
|
-
|
|
12781
|
-
|
|
12782
|
-
|
|
12783
|
-
|
|
12784
|
-
|
|
12785
|
-
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
|
|
12789
|
-
|
|
12790
|
-
|
|
12791
|
-
|
|
12792
|
-
|
|
12793
|
-
|
|
12794
|
-
},
|
|
12795
|
-
sortable: true
|
|
12842
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
12843
|
+
className: PathCellStyle,
|
|
12844
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
12845
|
+
className: PathTextStyle,
|
|
12846
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(LinkFallback, {
|
|
12847
|
+
fullPath: value2
|
|
12848
|
+
})
|
|
12849
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(CopyButton, {
|
|
12850
|
+
value: value2,
|
|
12851
|
+
className: PathCopyStyle
|
|
12852
|
+
})]
|
|
12853
|
+
});
|
|
12854
|
+
}
|
|
12855
|
+
}, {
|
|
12856
|
+
key: "serviceName",
|
|
12857
|
+
display: true,
|
|
12858
|
+
dataIndex: "serviceName",
|
|
12859
|
+
title: t2("dovetail.target_service"),
|
|
12860
|
+
sortable: true,
|
|
12861
|
+
width: 160,
|
|
12862
|
+
render: (serviceName, record) => {
|
|
12863
|
+
return record.serviceName ? /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
|
|
12864
|
+
resourceName: "services",
|
|
12865
|
+
namespace: ingress2.metadata.namespace || "default",
|
|
12866
|
+
name: serviceName
|
|
12867
|
+
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
12868
|
+
value: ""
|
|
12869
|
+
});
|
|
12796
12870
|
}
|
|
12797
|
-
|
|
12871
|
+
}, {
|
|
12872
|
+
key: "servicePort",
|
|
12873
|
+
display: true,
|
|
12874
|
+
dataIndex: "servicePort",
|
|
12875
|
+
title: t2("dovetail.target_service_port"),
|
|
12876
|
+
width: 120,
|
|
12877
|
+
sortable: true
|
|
12878
|
+
}, {
|
|
12879
|
+
key: "secret",
|
|
12880
|
+
display: true,
|
|
12881
|
+
dataIndex: "host",
|
|
12882
|
+
title: t2("dovetail.cert"),
|
|
12883
|
+
width: 160,
|
|
12884
|
+
render(host2) {
|
|
12885
|
+
var _a, _b;
|
|
12886
|
+
const secretName = (_b = (_a = ingress2._rawYaml.spec.tls) == null ? void 0 : _a.find(({
|
|
12887
|
+
hosts
|
|
12888
|
+
}) => hosts == null ? void 0 : hosts.includes(host2))) == null ? void 0 : _b.secretName;
|
|
12889
|
+
return secretName ? /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
|
|
12890
|
+
resourceName: "secrets",
|
|
12891
|
+
namespace: ingress2.metadata.namespace || "default",
|
|
12892
|
+
name: secretName
|
|
12893
|
+
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
12894
|
+
value: ""
|
|
12895
|
+
});
|
|
12896
|
+
},
|
|
12897
|
+
sortable: true
|
|
12898
|
+
}];
|
|
12798
12899
|
const {
|
|
12799
12900
|
data: finalData,
|
|
12800
12901
|
currentPage,
|
|
@@ -12805,31 +12906,27 @@ const IngressRulesTable = ({ ingress }) => {
|
|
|
12805
12906
|
data: rows
|
|
12806
12907
|
});
|
|
12807
12908
|
if ((rows == null ? void 0 : rows.length) === 0) {
|
|
12808
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12809
|
-
|
|
12810
|
-
|
|
12811
|
-
|
|
12812
|
-
|
|
12813
|
-
|
|
12814
|
-
);
|
|
12909
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
|
|
12910
|
+
errorText: t2("dovetail.no_resource", {
|
|
12911
|
+
kind: t2("dovetail.rule")
|
|
12912
|
+
}),
|
|
12913
|
+
type: ErrorContentType.List
|
|
12914
|
+
});
|
|
12815
12915
|
}
|
|
12816
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
|
-
showMenuColumn: false
|
|
12831
|
-
}
|
|
12832
|
-
);
|
|
12916
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Table2, {
|
|
12917
|
+
tableKey: "ingressRules",
|
|
12918
|
+
loading: false,
|
|
12919
|
+
data: finalData,
|
|
12920
|
+
total: rows.length,
|
|
12921
|
+
columns: addDefaultRenderToColumns(columns),
|
|
12922
|
+
rowKey: "pathType",
|
|
12923
|
+
empty: t2("dovetail.empty"),
|
|
12924
|
+
defaultSize: currentSize,
|
|
12925
|
+
currentPage,
|
|
12926
|
+
onPageChange,
|
|
12927
|
+
onSorterChange,
|
|
12928
|
+
showMenuColumn: false
|
|
12929
|
+
});
|
|
12833
12930
|
};
|
|
12834
12931
|
const KeyValue_1qasuz9 = "";
|
|
12835
12932
|
const ContentBlockStyle = "c8jy7dc";
|
|
@@ -12958,9 +13055,7 @@ function readFileAsBase64(file) {
|
|
|
12958
13055
|
if (isUtf8(arrayBuffer)) {
|
|
12959
13056
|
resolve(await file.text());
|
|
12960
13057
|
} else {
|
|
12961
|
-
const base64String = btoa(
|
|
12962
|
-
String.fromCharCode(...new Uint8Array(arrayBuffer))
|
|
12963
|
-
);
|
|
13058
|
+
const base64String = btoa(String.fromCharCode(...new Uint8Array(arrayBuffer)));
|
|
12964
13059
|
resolve(base64String);
|
|
12965
13060
|
}
|
|
12966
13061
|
return;
|
|
@@ -12971,31 +13066,63 @@ function readFileAsBase64(file) {
|
|
|
12971
13066
|
reader.readAsArrayBuffer(file);
|
|
12972
13067
|
});
|
|
12973
13068
|
}
|
|
12974
|
-
const
|
|
12975
|
-
const
|
|
12976
|
-
const
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
13069
|
+
const FormatRulePopover_1b8vyke = "";
|
|
13070
|
+
const FormatRulePopoverStyle = "f1eyh8ow";
|
|
13071
|
+
const FormatRulePopover = ({
|
|
13072
|
+
buttonText,
|
|
13073
|
+
columns,
|
|
13074
|
+
dataSource
|
|
13075
|
+
}) => /* @__PURE__ */ jsxRuntimeExports.jsx(Popover, {
|
|
13076
|
+
trigger: "click",
|
|
13077
|
+
overlayClassName: FormatRulePopoverStyle,
|
|
13078
|
+
placement: "bottomRight",
|
|
13079
|
+
content: /* @__PURE__ */ jsxRuntimeExports.jsx(AntdTable, {
|
|
13080
|
+
bordered: true,
|
|
13081
|
+
dataSource,
|
|
13082
|
+
columns,
|
|
13083
|
+
pagination: false,
|
|
13084
|
+
rowKey: (_, index2) => String(index2)
|
|
13085
|
+
}),
|
|
13086
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
13087
|
+
size: "small",
|
|
13088
|
+
type: "link",
|
|
13089
|
+
children: buttonText
|
|
13090
|
+
})
|
|
13091
|
+
});
|
|
13092
|
+
const LabelFormatPopover = ({ noValueValidation }) => {
|
|
13093
|
+
const { t: t2 } = useTranslation();
|
|
13094
|
+
const data2 = [
|
|
13095
|
+
{
|
|
13096
|
+
object: t2("dovetail.key"),
|
|
13097
|
+
contains: t2("dovetail.prefix"),
|
|
13098
|
+
optional: t2("dovetail.no"),
|
|
13099
|
+
rule: [
|
|
13100
|
+
t2("dovetail.prefix_format_rule_1"),
|
|
13101
|
+
t2("dovetail.prefix_format_rule_2"),
|
|
13102
|
+
t2("dovetail.prefix_format_rule_3")
|
|
13103
|
+
]
|
|
13104
|
+
},
|
|
13105
|
+
{
|
|
13106
|
+
object: t2("dovetail.key"),
|
|
13107
|
+
contains: t2("dovetail.name"),
|
|
13108
|
+
optional: t2("dovetail.yes"),
|
|
13109
|
+
rule: [
|
|
13110
|
+
t2("dovetail.name_format_rule_1"),
|
|
13111
|
+
t2("dovetail.name_format_rule_2"),
|
|
13112
|
+
t2("dovetail.name_format_rule_3")
|
|
13113
|
+
]
|
|
13114
|
+
}
|
|
13115
|
+
];
|
|
12993
13116
|
if (!noValueValidation) {
|
|
12994
13117
|
data2.push({
|
|
12995
13118
|
object: t2("dovetail.value"),
|
|
12996
13119
|
contains: t2("dovetail.name"),
|
|
12997
13120
|
optional: t2("dovetail.no"),
|
|
12998
|
-
rule: [
|
|
13121
|
+
rule: [
|
|
13122
|
+
t2("dovetail.name_format_rule_1"),
|
|
13123
|
+
t2("dovetail.name_format_rule_2"),
|
|
13124
|
+
t2("dovetail.name_format_rule_3")
|
|
13125
|
+
]
|
|
12999
13126
|
});
|
|
13000
13127
|
} else {
|
|
13001
13128
|
data2.push({
|
|
@@ -13005,57 +13132,42 @@ const LabelFormatPopover = ({
|
|
|
13005
13132
|
rule: [t2("dovetail.no_limitation_rule")]
|
|
13006
13133
|
});
|
|
13007
13134
|
}
|
|
13008
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13009
|
-
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
content: /* @__PURE__ */ jsxRuntimeExports.jsx(AntdTable, {
|
|
13013
|
-
bordered: true,
|
|
13135
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
13136
|
+
FormatRulePopover,
|
|
13137
|
+
{
|
|
13138
|
+
buttonText: t2("dovetail.look_format_requirement"),
|
|
13014
13139
|
dataSource: data2,
|
|
13015
|
-
columns: [
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
|
|
13019
|
-
|
|
13020
|
-
|
|
13021
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
13022
|
-
className: Typo.Label.l4_bold,
|
|
13023
|
-
children: cell
|
|
13024
|
-
}),
|
|
13140
|
+
columns: [
|
|
13141
|
+
{
|
|
13142
|
+
key: "object",
|
|
13143
|
+
title: t2("dovetail.object"),
|
|
13144
|
+
dataIndex: "object",
|
|
13145
|
+
render: (cell, _record, index2) => ({
|
|
13146
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: Typo.Label.l4_bold, children: cell }),
|
|
13025
13147
|
props: {
|
|
13026
13148
|
rowSpan: index2 === 0 ? 2 : index2 === 1 ? 0 : 1
|
|
13027
13149
|
}
|
|
13028
|
-
}
|
|
13029
|
-
}
|
|
13030
|
-
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
|
|
13035
|
-
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
children: cell.map((rule2, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", {
|
|
13046
|
-
children: rule2
|
|
13047
|
-
}, index2))
|
|
13048
|
-
});
|
|
13150
|
+
})
|
|
13151
|
+
},
|
|
13152
|
+
{
|
|
13153
|
+
key: "contains",
|
|
13154
|
+
title: t2("dovetail.contains"),
|
|
13155
|
+
dataIndex: "contains"
|
|
13156
|
+
},
|
|
13157
|
+
{
|
|
13158
|
+
key: "optional",
|
|
13159
|
+
title: t2("dovetail.optional"),
|
|
13160
|
+
dataIndex: "optional"
|
|
13161
|
+
},
|
|
13162
|
+
{
|
|
13163
|
+
key: "rule",
|
|
13164
|
+
title: t2("dovetail.format_requirements"),
|
|
13165
|
+
dataIndex: "rule",
|
|
13166
|
+
render: (cell) => /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { style: { listStyle: "disc", listStylePosition: "inside" }, children: cell.map((rule2, i2) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", { style: { textIndent: 8 }, children: rule2 }, i2)) })
|
|
13049
13167
|
}
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
13054
|
-
size: "small",
|
|
13055
|
-
type: "link",
|
|
13056
|
-
children: t2("dovetail.look_format_requirement")
|
|
13057
|
-
})
|
|
13058
|
-
});
|
|
13168
|
+
]
|
|
13169
|
+
}
|
|
13170
|
+
);
|
|
13059
13171
|
};
|
|
13060
13172
|
const index_t3zi07 = "";
|
|
13061
13173
|
function _KeyValueTableForm(props, ref) {
|
|
@@ -13076,7 +13188,8 @@ function _KeyValueTableForm(props, ref) {
|
|
|
13076
13188
|
validateKey,
|
|
13077
13189
|
validateValue,
|
|
13078
13190
|
onSubmit,
|
|
13079
|
-
keyTitle
|
|
13191
|
+
keyTitle,
|
|
13192
|
+
formatPopover
|
|
13080
13193
|
} = props;
|
|
13081
13194
|
const {
|
|
13082
13195
|
t: t2,
|
|
@@ -13260,7 +13373,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
13260
13373
|
validateTriggerType: ValidateTriggerType.Aggressive,
|
|
13261
13374
|
disableBatchFilling: true,
|
|
13262
13375
|
hideEmptyTable: true
|
|
13263
|
-
}), isHideLabelFormatPopover || _value.length === 0 ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {
|
|
13376
|
+
}), isHideLabelFormatPopover || _value.length === 0 ? null : formatPopover ?? /* @__PURE__ */ jsxRuntimeExports.jsx(LabelFormatPopover, {
|
|
13264
13377
|
noValueValidation
|
|
13265
13378
|
})]
|
|
13266
13379
|
});
|
|
@@ -13699,7 +13812,7 @@ const StateTag = (props) => {
|
|
|
13699
13812
|
}
|
|
13700
13813
|
);
|
|
13701
13814
|
};
|
|
13702
|
-
const
|
|
13815
|
+
const WorkloadPodsTable_a750q3 = "";
|
|
13703
13816
|
const WorkloadPodsTable = ({
|
|
13704
13817
|
namespace: namespace2,
|
|
13705
13818
|
selector,
|
|
@@ -13735,14 +13848,16 @@ const WorkloadPodsTable = ({
|
|
|
13735
13848
|
kind: "Pod"
|
|
13736
13849
|
},
|
|
13737
13850
|
filters: {
|
|
13738
|
-
permanent: [
|
|
13739
|
-
|
|
13740
|
-
|
|
13741
|
-
|
|
13742
|
-
|
|
13851
|
+
permanent: [
|
|
13852
|
+
{
|
|
13853
|
+
field: "",
|
|
13854
|
+
value: "",
|
|
13855
|
+
fn(item) {
|
|
13856
|
+
return filter ? filter(item) : matchSelector(item, selector, namespace2);
|
|
13857
|
+
}
|
|
13743
13858
|
}
|
|
13744
13859
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13745
|
-
|
|
13860
|
+
]
|
|
13746
13861
|
}
|
|
13747
13862
|
}
|
|
13748
13863
|
});
|
|
@@ -14218,7 +14333,8 @@ const ServiceOutClusterAccessField = (clusterVip) => ({
|
|
|
14218
14333
|
service: record,
|
|
14219
14334
|
breakLine: false,
|
|
14220
14335
|
clusterVip,
|
|
14221
|
-
showDashedUnderline: false
|
|
14336
|
+
showDashedUnderline: false,
|
|
14337
|
+
showCopyButton: true
|
|
14222
14338
|
});
|
|
14223
14339
|
}
|
|
14224
14340
|
});
|
|
@@ -14236,14 +14352,14 @@ const PodSelectorField = () => ({
|
|
|
14236
14352
|
const PortsTableField = () => ({
|
|
14237
14353
|
key: "ports",
|
|
14238
14354
|
path: [],
|
|
14239
|
-
renderContent: (_,
|
|
14355
|
+
renderContent: (_, service2) => {
|
|
14240
14356
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
14241
14357
|
style: {
|
|
14242
14358
|
padding: "0 24px",
|
|
14243
14359
|
height: "100%"
|
|
14244
14360
|
},
|
|
14245
14361
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(PortsTable, {
|
|
14246
|
-
service
|
|
14362
|
+
service: service2
|
|
14247
14363
|
})
|
|
14248
14364
|
});
|
|
14249
14365
|
}
|
|
@@ -14940,11 +15056,11 @@ const NetworkPolicyIngressRulesTab = ({
|
|
|
14940
15056
|
fields: [{
|
|
14941
15057
|
key: "Ingress",
|
|
14942
15058
|
path: ["spec", "ingress"],
|
|
14943
|
-
render: (
|
|
15059
|
+
render: (ingress2) => {
|
|
14944
15060
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
14945
15061
|
className: NetworkPolicyRulesViewerStyle,
|
|
14946
15062
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(NetworkPolicyRulesViewer, {
|
|
14947
|
-
ingressOrEgress:
|
|
15063
|
+
ingressOrEgress: ingress2
|
|
14948
15064
|
})
|
|
14949
15065
|
});
|
|
14950
15066
|
}
|
|
@@ -15019,7 +15135,9 @@ const PodContainersTable = ({
|
|
|
15019
15135
|
const isInit = initContainerStatuses.some(
|
|
15020
15136
|
(c2) => c2.containerID === record.containerID
|
|
15021
15137
|
);
|
|
15022
|
-
return i18n2.t(
|
|
15138
|
+
return i18n2.t(
|
|
15139
|
+
isInit ? "dovetail.init_container" : "dovetail.regular_container"
|
|
15140
|
+
);
|
|
15023
15141
|
}
|
|
15024
15142
|
},
|
|
15025
15143
|
{
|
|
@@ -15049,10 +15167,12 @@ const PodContainersTable = ({
|
|
|
15049
15167
|
[i18n2, initContainerStatuses]
|
|
15050
15168
|
);
|
|
15051
15169
|
const dataSource = useMemo(
|
|
15052
|
-
() => addId(containerStatuses.concat(initContainerStatuses), "containerID").map(
|
|
15053
|
-
|
|
15054
|
-
|
|
15055
|
-
|
|
15170
|
+
() => addId(containerStatuses.concat(initContainerStatuses), "containerID").map(
|
|
15171
|
+
(container2) => ({
|
|
15172
|
+
...container2,
|
|
15173
|
+
startedAt: get$2(container2, ["state", "running", "startedAt"]) || get$2(container2, ["state", "terminated", "startedAt"])
|
|
15174
|
+
})
|
|
15175
|
+
),
|
|
15056
15176
|
[containerStatuses, initContainerStatuses]
|
|
15057
15177
|
);
|
|
15058
15178
|
const {
|
|
@@ -15063,10 +15183,12 @@ const PodContainersTable = ({
|
|
|
15063
15183
|
} = useTableData({
|
|
15064
15184
|
data: dataSource,
|
|
15065
15185
|
columns,
|
|
15066
|
-
defaultSorters: [
|
|
15067
|
-
|
|
15068
|
-
|
|
15069
|
-
|
|
15186
|
+
defaultSorters: [
|
|
15187
|
+
{
|
|
15188
|
+
field: "startedAt",
|
|
15189
|
+
order: "desc"
|
|
15190
|
+
}
|
|
15191
|
+
]
|
|
15070
15192
|
});
|
|
15071
15193
|
if (dataSource.length === 0) {
|
|
15072
15194
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -15084,7 +15206,9 @@ const PodContainersTable = ({
|
|
|
15084
15206
|
loading: false,
|
|
15085
15207
|
data: finalData,
|
|
15086
15208
|
total: dataSource.length,
|
|
15087
|
-
columns: addDefaultRenderToColumns(
|
|
15209
|
+
columns: addDefaultRenderToColumns(
|
|
15210
|
+
columns
|
|
15211
|
+
),
|
|
15088
15212
|
rowKey: "containerID",
|
|
15089
15213
|
error: false,
|
|
15090
15214
|
defaultSize: currentSize,
|
|
@@ -15207,11 +15331,11 @@ const NetworkPolicyIngressRulesGroup = (i18n2) => ({
|
|
|
15207
15331
|
{
|
|
15208
15332
|
key: "Ingress",
|
|
15209
15333
|
path: ["spec", "ingress"],
|
|
15210
|
-
renderContent: (
|
|
15334
|
+
renderContent: (ingress2) => {
|
|
15211
15335
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
15212
15336
|
NetworkPolicyRulesViewer,
|
|
15213
15337
|
{
|
|
15214
|
-
ingressOrEgress:
|
|
15338
|
+
ingressOrEgress: ingress2,
|
|
15215
15339
|
kind: ` ${i18n2.t("dovetail.ingress_rule")}`
|
|
15216
15340
|
}
|
|
15217
15341
|
);
|
|
@@ -15265,7 +15389,7 @@ function Tabs(props) {
|
|
|
15265
15389
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
|
|
15266
15390
|
}) });
|
|
15267
15391
|
}
|
|
15268
|
-
const
|
|
15392
|
+
const ShowContentView_szlndu = "";
|
|
15269
15393
|
const ShowContentWrapperStyle = "soapvs9";
|
|
15270
15394
|
const BackButton = "b13d603q";
|
|
15271
15395
|
const ToolBarWrapper = "tm8eaia";
|
|
@@ -15709,7 +15833,7 @@ function ReplicasDropdown(props) {
|
|
|
15709
15833
|
] });
|
|
15710
15834
|
}
|
|
15711
15835
|
const PodShell = lazy(
|
|
15712
|
-
() => import("./PodShell-
|
|
15836
|
+
() => import("./PodShell-a6ed3498.js").then((module2) => ({ default: module2.PodShell }))
|
|
15713
15837
|
);
|
|
15714
15838
|
function PodShellModal(props) {
|
|
15715
15839
|
const { pod: pod2 } = props;
|
|
@@ -16056,8 +16180,121 @@ function ResourceShow(props) {
|
|
|
16056
16180
|
}
|
|
16057
16181
|
);
|
|
16058
16182
|
}
|
|
16059
|
-
const
|
|
16183
|
+
const button_a1727f = "";
|
|
16184
|
+
const WarningButtonStyle = "wwyz7ti";
|
|
16185
|
+
const modal_1muog24 = "";
|
|
16060
16186
|
const SmallModalStyle = "s1nc293e";
|
|
16187
|
+
const ExtraSubmitFooter_15u4r8u = "";
|
|
16188
|
+
const FooterStyle = "f16wn4bu";
|
|
16189
|
+
const FooterLeftStyle = "fk5l2b4";
|
|
16190
|
+
const FooterRightStyle = "f1r3vl4u";
|
|
16191
|
+
const ErrorStyle = "e1y8i1r4";
|
|
16192
|
+
const ErrorIconStyle = "e16fn5cj";
|
|
16193
|
+
const PrevIconStyle = "prji3wx";
|
|
16194
|
+
function useExtraSubmitFooter({
|
|
16195
|
+
action,
|
|
16196
|
+
cancelText,
|
|
16197
|
+
defaultSubmitText,
|
|
16198
|
+
errorText,
|
|
16199
|
+
extraSubmitButton,
|
|
16200
|
+
fallbackFooter,
|
|
16201
|
+
isYamlMode,
|
|
16202
|
+
nextStepText,
|
|
16203
|
+
prevStepText,
|
|
16204
|
+
saveButtonProps,
|
|
16205
|
+
step,
|
|
16206
|
+
stepCount,
|
|
16207
|
+
onCancel,
|
|
16208
|
+
onNextStep,
|
|
16209
|
+
onPrevStep,
|
|
16210
|
+
onSubmit
|
|
16211
|
+
}) {
|
|
16212
|
+
const shouldShowExtraSubmitButton = useMemo(() => {
|
|
16213
|
+
if (!extraSubmitButton || isYamlMode) {
|
|
16214
|
+
return false;
|
|
16215
|
+
}
|
|
16216
|
+
if (extraSubmitButton.action && extraSubmitButton.action !== action) {
|
|
16217
|
+
return false;
|
|
16218
|
+
}
|
|
16219
|
+
if (extraSubmitButton.step !== step) {
|
|
16220
|
+
return false;
|
|
16221
|
+
}
|
|
16222
|
+
return step < stepCount - 1;
|
|
16223
|
+
}, [action, extraSubmitButton, isYamlMode, step, stepCount]);
|
|
16224
|
+
return useMemo(() => {
|
|
16225
|
+
if (!shouldShowExtraSubmitButton) {
|
|
16226
|
+
return fallbackFooter;
|
|
16227
|
+
}
|
|
16228
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ExtraSubmitFooter, {
|
|
16229
|
+
cancelText,
|
|
16230
|
+
errorText,
|
|
16231
|
+
extraSubmitText: (extraSubmitButton == null ? void 0 : extraSubmitButton.text) || defaultSubmitText,
|
|
16232
|
+
nextStepText,
|
|
16233
|
+
prevText: prevStepText,
|
|
16234
|
+
saveButtonProps,
|
|
16235
|
+
showPrevButton: step > 0,
|
|
16236
|
+
onCancel,
|
|
16237
|
+
onNextStep,
|
|
16238
|
+
onPrevStep,
|
|
16239
|
+
onSubmit
|
|
16240
|
+
});
|
|
16241
|
+
}, [cancelText, defaultSubmitText, errorText, extraSubmitButton == null ? void 0 : extraSubmitButton.text, fallbackFooter, onCancel, onNextStep, onPrevStep, onSubmit, nextStepText, prevStepText, saveButtonProps, shouldShowExtraSubmitButton, step]);
|
|
16242
|
+
}
|
|
16243
|
+
const ExtraSubmitFooter = ({
|
|
16244
|
+
cancelText,
|
|
16245
|
+
errorText,
|
|
16246
|
+
extraSubmitText,
|
|
16247
|
+
nextStepText,
|
|
16248
|
+
prevText,
|
|
16249
|
+
saveButtonProps,
|
|
16250
|
+
showPrevButton,
|
|
16251
|
+
onCancel,
|
|
16252
|
+
onNextStep,
|
|
16253
|
+
onPrevStep,
|
|
16254
|
+
onSubmit
|
|
16255
|
+
}) => {
|
|
16256
|
+
const finalSaveButtonProps = omit$1(saveButtonProps, "onClick");
|
|
16257
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
16258
|
+
className: FooterStyle,
|
|
16259
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
16260
|
+
className: FooterLeftStyle,
|
|
16261
|
+
children: [showPrevButton ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, {
|
|
16262
|
+
type: "link",
|
|
16263
|
+
onClick: onPrevStep,
|
|
16264
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(ArrowChevronLeft16BoldBlueIcon, {
|
|
16265
|
+
className: PrevIconStyle
|
|
16266
|
+
}), prevText]
|
|
16267
|
+
}) : null, errorText ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
16268
|
+
className: cx_default(ErrorStyle, Typo.Label.l2_regular),
|
|
16269
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(ExclamationErrorCircleFill16RedIcon, {
|
|
16270
|
+
className: ErrorIconStyle
|
|
16271
|
+
}), errorText]
|
|
16272
|
+
}) : null]
|
|
16273
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
16274
|
+
className: FooterRightStyle,
|
|
16275
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
16276
|
+
type: "quiet",
|
|
16277
|
+
size: "large",
|
|
16278
|
+
onClick: onCancel,
|
|
16279
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
16280
|
+
className: Typo.Label.l1_bold_title,
|
|
16281
|
+
children: cancelText
|
|
16282
|
+
})
|
|
16283
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
16284
|
+
size: "large",
|
|
16285
|
+
type: "secondary",
|
|
16286
|
+
onClick: onNextStep,
|
|
16287
|
+
children: nextStepText
|
|
16288
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
16289
|
+
...finalSaveButtonProps,
|
|
16290
|
+
size: "large",
|
|
16291
|
+
type: "primary",
|
|
16292
|
+
onClick: onSubmit,
|
|
16293
|
+
children: extraSubmitText
|
|
16294
|
+
})]
|
|
16295
|
+
})]
|
|
16296
|
+
});
|
|
16297
|
+
};
|
|
16061
16298
|
function FormModeSegmentControl({
|
|
16062
16299
|
formConfig,
|
|
16063
16300
|
mode,
|
|
@@ -16891,9 +17128,16 @@ const useForm = ({
|
|
|
16891
17128
|
onSubmitAbort,
|
|
16892
17129
|
...rest
|
|
16893
17130
|
} = {}) => {
|
|
17131
|
+
var _a;
|
|
16894
17132
|
const { options } = useRefineContext();
|
|
16895
17133
|
const disableServerSideValidation = (options == null ? void 0 : options.disableServerSideValidation) || disableServerSideValidationProp;
|
|
16896
17134
|
const translate = useTranslate();
|
|
17135
|
+
const { captureInitialResource, mutationMeta } = use409Retry({
|
|
17136
|
+
action: refineCoreProps == null ? void 0 : refineCoreProps.action,
|
|
17137
|
+
dataProviderName: refineCoreProps == null ? void 0 : refineCoreProps.dataProviderName,
|
|
17138
|
+
id: refineCoreProps == null ? void 0 : refineCoreProps.id,
|
|
17139
|
+
mutationMeta: refineCoreProps == null ? void 0 : refineCoreProps.mutationMeta
|
|
17140
|
+
});
|
|
16897
17141
|
const { warnWhenUnsavedChanges: warnWhenUnsavedChangesRefine, setWarnWhen } = useWarnAboutChange();
|
|
16898
17142
|
const warnWhenUnsavedChanges = warnWhenUnsavedChangesProp ?? warnWhenUnsavedChangesRefine;
|
|
16899
17143
|
const useHookFormResult = useForm$3({
|
|
@@ -16903,6 +17147,7 @@ const useForm = ({
|
|
|
16903
17147
|
const [transformedInitValues, setTransformedInitValues] = useState(useHookFormResult.getValues());
|
|
16904
17148
|
const [beforeSubmitErrors, setBeforeSubmitErrors] = useState([]);
|
|
16905
17149
|
const [isBeforeSubmitLoading, setIsBeforeSubmitLoading] = useState(false);
|
|
17150
|
+
const hasAppliedInitialDataRef = useRef(false);
|
|
16906
17151
|
const {
|
|
16907
17152
|
watch,
|
|
16908
17153
|
setValue,
|
|
@@ -16913,10 +17158,11 @@ const useForm = ({
|
|
|
16913
17158
|
} = useHookFormResult;
|
|
16914
17159
|
const useFormCoreResult = useForm$2({
|
|
16915
17160
|
...refineCoreProps,
|
|
17161
|
+
mutationMeta,
|
|
16916
17162
|
onMutationError: (error, _variables, _context) => {
|
|
16917
|
-
var
|
|
17163
|
+
var _a2, _b;
|
|
16918
17164
|
if (disableServerSideValidation) {
|
|
16919
|
-
(
|
|
17165
|
+
(_a2 = refineCoreProps == null ? void 0 : refineCoreProps.onMutationError) == null ? void 0 : _a2.call(refineCoreProps, error, _variables, _context);
|
|
16920
17166
|
return;
|
|
16921
17167
|
}
|
|
16922
17168
|
const errors = error == null ? void 0 : error.errors;
|
|
@@ -16949,10 +17195,14 @@ const useForm = ({
|
|
|
16949
17195
|
});
|
|
16950
17196
|
const { queryResult, onFinish, formLoading, onFinishAutoSave } = useFormCoreResult;
|
|
16951
17197
|
useEffect(() => {
|
|
16952
|
-
var
|
|
16953
|
-
|
|
17198
|
+
var _a2;
|
|
17199
|
+
captureInitialResource((_a2 = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a2.data);
|
|
17200
|
+
}, [captureInitialResource, (_a = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a.data]);
|
|
17201
|
+
useEffect(() => {
|
|
17202
|
+
var _a2;
|
|
17203
|
+
if (hasAppliedInitialDataRef.current || formState.isDirty)
|
|
16954
17204
|
return;
|
|
16955
|
-
const data2 = (
|
|
17205
|
+
const data2 = (_a2 = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a2.data;
|
|
16956
17206
|
if (!data2)
|
|
16957
17207
|
return;
|
|
16958
17208
|
const transformedData = transformInitValues ? transformInitValues(data2) : data2;
|
|
@@ -16968,6 +17218,7 @@ const useForm = ({
|
|
|
16968
17218
|
});
|
|
16969
17219
|
}
|
|
16970
17220
|
});
|
|
17221
|
+
hasAppliedInitialDataRef.current = true;
|
|
16971
17222
|
setTransformedInitValues(getValues());
|
|
16972
17223
|
}, [queryResult == null ? void 0 : queryResult.data, setValue, transformInitValues, formState.isDirty, getValues]);
|
|
16973
17224
|
useEffect(() => {
|
|
@@ -16980,13 +17231,13 @@ const useForm = ({
|
|
|
16980
17231
|
}, [watch]);
|
|
16981
17232
|
const onValuesChange = useCallback(
|
|
16982
17233
|
(changeValues) => {
|
|
16983
|
-
var
|
|
17234
|
+
var _a2;
|
|
16984
17235
|
if (warnWhenUnsavedChanges) {
|
|
16985
17236
|
setWarnWhen(true);
|
|
16986
17237
|
}
|
|
16987
17238
|
if (refineCoreProps == null ? void 0 : refineCoreProps.autoSave) {
|
|
16988
17239
|
setWarnWhen(false);
|
|
16989
|
-
const onFinishProps = (
|
|
17240
|
+
const onFinishProps = (_a2 = refineCoreProps.autoSave) == null ? void 0 : _a2.onFinish;
|
|
16990
17241
|
if (onFinishProps) {
|
|
16991
17242
|
return onFinishAutoSave(onFinishProps(changeValues));
|
|
16992
17243
|
}
|
|
@@ -17083,6 +17334,10 @@ const useRefineForm = (props) => {
|
|
|
17083
17334
|
errorNotification: false,
|
|
17084
17335
|
successNotification: () => {
|
|
17085
17336
|
var _a;
|
|
17337
|
+
if (formConfig == null ? void 0 : formConfig.successMessage) {
|
|
17338
|
+
const msg = typeof formConfig.successMessage === "function" ? formConfig.successMessage(id ? "edit" : "create") : formConfig.successMessage;
|
|
17339
|
+
return { message: msg, description: "Success", type: "success" };
|
|
17340
|
+
}
|
|
17086
17341
|
const formValue = result.getValues();
|
|
17087
17342
|
return {
|
|
17088
17343
|
message: i18n2.t(id ? "dovetail.edit_resource_success" : "dovetail.create_success_toast", {
|
|
@@ -17100,6 +17355,7 @@ const useRefineForm = (props) => {
|
|
|
17100
17355
|
resource: resourceConfig.name,
|
|
17101
17356
|
action: id ? "edit" : "create",
|
|
17102
17357
|
id,
|
|
17358
|
+
dataProviderName: resourceConfig.dataProviderName,
|
|
17103
17359
|
liveMode: id ? "auto" : "off",
|
|
17104
17360
|
...refineProps
|
|
17105
17361
|
},
|
|
@@ -17113,10 +17369,11 @@ const useRefineForm = (props) => {
|
|
|
17113
17369
|
...formConfig == null ? void 0 : formConfig.useFormProps
|
|
17114
17370
|
});
|
|
17115
17371
|
useEffect(() => {
|
|
17116
|
-
var _a, _b;
|
|
17372
|
+
var _a, _b, _c;
|
|
17117
17373
|
const response = (_a = result.refineCore.mutationResult.error) == null ? void 0 : _a.response;
|
|
17374
|
+
const message2 = (_b = result.refineCore.mutationResult.error) == null ? void 0 : _b.message;
|
|
17118
17375
|
if (response && !(response == null ? void 0 : response.bodyUsed)) {
|
|
17119
|
-
(
|
|
17376
|
+
(_c = response.json) == null ? void 0 : _c.call(response).then((body) => {
|
|
17120
17377
|
var _a2;
|
|
17121
17378
|
setResponseErrorMsgs(
|
|
17122
17379
|
[].concat(
|
|
@@ -17124,8 +17381,10 @@ const useRefineForm = (props) => {
|
|
|
17124
17381
|
)
|
|
17125
17382
|
);
|
|
17126
17383
|
});
|
|
17384
|
+
} else if (message2 && responseErrorMsgs[0] !== message2) {
|
|
17385
|
+
setResponseErrorMsgs([message2]);
|
|
17127
17386
|
}
|
|
17128
|
-
}, [formConfig, result, i18n2]);
|
|
17387
|
+
}, [formConfig, result, i18n2, responseErrorMsgs]);
|
|
17129
17388
|
return {
|
|
17130
17389
|
formResult: result,
|
|
17131
17390
|
responseErrorMsgs,
|
|
@@ -17146,10 +17405,6 @@ const RefineFormContainer = React.forwardRef(function RefineFormContainer2({
|
|
|
17146
17405
|
}, ref) {
|
|
17147
17406
|
var _a, _b;
|
|
17148
17407
|
const action = id ? "edit" : "create";
|
|
17149
|
-
const pushModal = usePushModal();
|
|
17150
|
-
const popModal = usePopModal();
|
|
17151
|
-
const hasShownExpiredRef = useRef(false);
|
|
17152
|
-
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
17153
17408
|
const refineFormResult = useRefineForm({
|
|
17154
17409
|
resourceConfig,
|
|
17155
17410
|
id,
|
|
@@ -17158,7 +17413,6 @@ const RefineFormContainer = React.forwardRef(function RefineFormContainer2({
|
|
|
17158
17413
|
onSuccess == null ? void 0 : onSuccess(data2);
|
|
17159
17414
|
},
|
|
17160
17415
|
onMutationError() {
|
|
17161
|
-
setIsSubmitting(false);
|
|
17162
17416
|
onError == null ? void 0 : onError();
|
|
17163
17417
|
},
|
|
17164
17418
|
redirect: false,
|
|
@@ -17172,35 +17426,11 @@ const RefineFormContainer = React.forwardRef(function RefineFormContainer2({
|
|
|
17172
17426
|
...options,
|
|
17173
17427
|
onBeforeSubmitError: (errors) => {
|
|
17174
17428
|
if (errors.length) {
|
|
17175
|
-
setIsSubmitting(false);
|
|
17176
17429
|
onError == null ? void 0 : onError();
|
|
17177
17430
|
}
|
|
17178
|
-
},
|
|
17179
|
-
onSubmitStart: () => {
|
|
17180
|
-
setIsSubmitting(true);
|
|
17181
|
-
},
|
|
17182
|
-
onSubmitAbort: () => {
|
|
17183
|
-
setIsSubmitting(false);
|
|
17184
17431
|
}
|
|
17185
17432
|
}
|
|
17186
17433
|
});
|
|
17187
|
-
const isExpired = useResourceVersionCheck({
|
|
17188
|
-
queryResult: refineFormResult.formResult.refineCore.queryResult
|
|
17189
|
-
});
|
|
17190
|
-
useEffect(() => {
|
|
17191
|
-
if (!isExpired || isSubmitting || hasShownExpiredRef.current) {
|
|
17192
|
-
return;
|
|
17193
|
-
}
|
|
17194
|
-
hasShownExpiredRef.current = true;
|
|
17195
|
-
pushModal({
|
|
17196
|
-
component: DataExpiredModal,
|
|
17197
|
-
props: {
|
|
17198
|
-
onAbandon: () => {
|
|
17199
|
-
popModal();
|
|
17200
|
-
}
|
|
17201
|
-
}
|
|
17202
|
-
});
|
|
17203
|
-
}, [isExpired, isSubmitting, pushModal, popModal]);
|
|
17204
17434
|
const fieldsConfig = useFieldsConfig(
|
|
17205
17435
|
resourceConfig,
|
|
17206
17436
|
{ fields: formConfig == null ? void 0 : formConfig.fields },
|
|
@@ -17215,6 +17445,7 @@ const RefineFormContainer = React.forwardRef(function RefineFormContainer2({
|
|
|
17215
17445
|
transformApplyValues: (formConfig == null ? void 0 : formConfig.transformApplyValues) || ((v) => v)
|
|
17216
17446
|
});
|
|
17217
17447
|
const yamlFormProps = useMemo(() => {
|
|
17448
|
+
var _a2;
|
|
17218
17449
|
if (isYamlMode) {
|
|
17219
17450
|
return {
|
|
17220
17451
|
...customYamlFormProps,
|
|
@@ -17233,12 +17464,7 @@ const RefineFormContainer = React.forwardRef(function RefineFormContainer2({
|
|
|
17233
17464
|
isShowLayout: false,
|
|
17234
17465
|
useFormProps: {
|
|
17235
17466
|
redirect: false,
|
|
17236
|
-
|
|
17237
|
-
setIsSubmitting(true);
|
|
17238
|
-
},
|
|
17239
|
-
onSubmitAbort: () => {
|
|
17240
|
-
setIsSubmitting(false);
|
|
17241
|
-
}
|
|
17467
|
+
mutationMeta: (_a2 = formConfig == null ? void 0 : formConfig.refineCoreProps) == null ? void 0 : _a2.mutationMeta
|
|
17242
17468
|
},
|
|
17243
17469
|
rules: fieldsConfig == null ? void 0 : fieldsConfig.filter(
|
|
17244
17470
|
(config) => "isSkipValidationInYaml" in config && !config.isSkipValidationInYaml
|
|
@@ -17268,6 +17494,7 @@ const RefineFormContainer = React.forwardRef(function RefineFormContainer2({
|
|
|
17268
17494
|
id,
|
|
17269
17495
|
refineFormResult,
|
|
17270
17496
|
formConfig == null ? void 0 : formConfig.beforeSubmit,
|
|
17497
|
+
(_a = formConfig == null ? void 0 : formConfig.refineCoreProps) == null ? void 0 : _a.mutationMeta,
|
|
17271
17498
|
transformApplyValues,
|
|
17272
17499
|
onSaveButtonPropsChange,
|
|
17273
17500
|
onSuccess,
|
|
@@ -17287,18 +17514,20 @@ const RefineFormContainer = React.forwardRef(function RefineFormContainer2({
|
|
|
17287
17514
|
}),
|
|
17288
17515
|
[refineFormResult.formResult]
|
|
17289
17516
|
);
|
|
17290
|
-
|
|
17517
|
+
const currentFormValues = refineFormResult.formResult.getValues();
|
|
17518
|
+
const isReady = (formConfig == null ? void 0 : formConfig.isDataReady) ? formConfig.isDataReady(currentFormValues) : !!((_b = currentFormValues == null ? void 0 : currentFormValues.metadata) == null ? void 0 : _b.name);
|
|
17519
|
+
if (action === "edit" && !isReady) {
|
|
17291
17520
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, {});
|
|
17292
17521
|
}
|
|
17293
17522
|
if (isYamlMode) {
|
|
17294
17523
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(YamlForm, { ...yamlFormProps });
|
|
17295
17524
|
}
|
|
17296
17525
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
17297
|
-
!(formConfig == null ? void 0 : formConfig.isDisabledChangeMode) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17526
|
+
!(formConfig == null ? void 0 : formConfig.isDisabledChangeMode) && (formConfig == null ? void 0 : formConfig.changeModeAlert) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17298
17527
|
Alert,
|
|
17299
17528
|
{
|
|
17300
17529
|
type: "warning",
|
|
17301
|
-
message: i18n.t("dovetail.change_form_mode_alert"),
|
|
17530
|
+
message: (formConfig == null ? void 0 : formConfig.changeModeAlert) ?? i18n.t("dovetail.change_form_mode_alert"),
|
|
17302
17531
|
style: { marginBottom: "16px" }
|
|
17303
17532
|
}
|
|
17304
17533
|
) : void 0,
|
|
@@ -17352,7 +17581,7 @@ function ConfirmModal({
|
|
|
17352
17581
|
});
|
|
17353
17582
|
}
|
|
17354
17583
|
function FormModal(props) {
|
|
17355
|
-
var _a, _b, _c, _d, _e;
|
|
17584
|
+
var _a, _b, _c, _d, _e, _f;
|
|
17356
17585
|
const {
|
|
17357
17586
|
id,
|
|
17358
17587
|
yamlFormProps: customYamlFormProps,
|
|
@@ -17490,37 +17719,59 @@ function FormModal(props) {
|
|
|
17490
17719
|
setStep(nextStep);
|
|
17491
17720
|
}
|
|
17492
17721
|
}, [step]);
|
|
17493
|
-
|
|
17494
|
-
|
|
17495
|
-
|
|
17496
|
-
|
|
17497
|
-
|
|
17498
|
-
|
|
17499
|
-
|
|
17500
|
-
|
|
17501
|
-
|
|
17502
|
-
|
|
17503
|
-
|
|
17504
|
-
|
|
17505
|
-
}) : null]
|
|
17506
|
-
}),
|
|
17507
|
-
error: errorText,
|
|
17508
|
-
steps,
|
|
17722
|
+
const extraSubmitButton = ((_c = resourceConfig.formConfig) == null ? void 0 : _c.formType) === FormType.FORM ? resourceConfig.formConfig.extraSubmitButton : void 0;
|
|
17723
|
+
const footer = useExtraSubmitFooter({
|
|
17724
|
+
action,
|
|
17725
|
+
cancelText: (modalProps == null ? void 0 : modalProps.cancelText) || i18n2.t("dovetail.cancel"),
|
|
17726
|
+
defaultSubmitText: okText,
|
|
17727
|
+
errorText,
|
|
17728
|
+
extraSubmitButton,
|
|
17729
|
+
fallbackFooter: modalProps == null ? void 0 : modalProps.footer,
|
|
17730
|
+
isYamlMode,
|
|
17731
|
+
nextStepText: (modalProps == null ? void 0 : modalProps.nextText) || i18n2.t("dovetail.next_step"),
|
|
17732
|
+
prevStepText: (modalProps == null ? void 0 : modalProps.prevText) || i18n2.t("dovetail.prev_step"),
|
|
17733
|
+
saveButtonProps,
|
|
17509
17734
|
step,
|
|
17510
|
-
|
|
17511
|
-
|
|
17512
|
-
|
|
17513
|
-
|
|
17514
|
-
|
|
17515
|
-
|
|
17516
|
-
|
|
17517
|
-
|
|
17518
|
-
|
|
17519
|
-
|
|
17520
|
-
|
|
17521
|
-
|
|
17522
|
-
|
|
17523
|
-
|
|
17735
|
+
stepCount: (steps == null ? void 0 : steps.length) || 0,
|
|
17736
|
+
onCancel: popModal,
|
|
17737
|
+
onNextStep: () => handleStepChange(step + 1),
|
|
17738
|
+
onPrevStep: () => handleStepChange(step - 1),
|
|
17739
|
+
onSubmit: onOk
|
|
17740
|
+
});
|
|
17741
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Retry409Provider, {
|
|
17742
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(WizardDialog, {
|
|
17743
|
+
style: {
|
|
17744
|
+
"--max-modal-width": isYamlForm || !isDisabledChangeMode ? "1024px" : "648px"
|
|
17745
|
+
},
|
|
17746
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
17747
|
+
className: TitleWrapperStyle,
|
|
17748
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
17749
|
+
children: title
|
|
17750
|
+
}), ((_d = resourceConfig.formConfig) == null ? void 0 : _d.formType) === FormType.FORM ? /* @__PURE__ */ jsxRuntimeExports.jsx(FormModeSegmentControl, {
|
|
17751
|
+
formConfig: resourceConfig.formConfig,
|
|
17752
|
+
mode,
|
|
17753
|
+
onChangeMode
|
|
17754
|
+
}) : null]
|
|
17755
|
+
}),
|
|
17756
|
+
error: errorText,
|
|
17757
|
+
steps,
|
|
17758
|
+
step,
|
|
17759
|
+
onStepChange: handleStepChange,
|
|
17760
|
+
onOk,
|
|
17761
|
+
okButtonProps: {
|
|
17762
|
+
...omit$1(saveButtonProps, "onClick"),
|
|
17763
|
+
children: (_e = resourceConfig.formConfig) == null ? void 0 : _e.saveButtonText
|
|
17764
|
+
},
|
|
17765
|
+
okText: ((_f = resourceConfig.formConfig) == null ? void 0 : _f.saveButtonText) || okText,
|
|
17766
|
+
footer,
|
|
17767
|
+
destroyOnClose: true,
|
|
17768
|
+
destroyOtherStep: true,
|
|
17769
|
+
...modalProps,
|
|
17770
|
+
children: [desc ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
17771
|
+
className: FormDescStyle,
|
|
17772
|
+
children: desc
|
|
17773
|
+
}) : void 0, formEle]
|
|
17774
|
+
})
|
|
17524
17775
|
});
|
|
17525
17776
|
}
|
|
17526
17777
|
const RefineFormPage_1v0fhor = "";
|
|
@@ -17626,31 +17877,43 @@ function CronJobDropdown(props) {
|
|
|
17626
17877
|
values: v,
|
|
17627
17878
|
successNotification() {
|
|
17628
17879
|
return {
|
|
17629
|
-
message: t2(
|
|
17630
|
-
|
|
17631
|
-
|
|
17632
|
-
|
|
17633
|
-
|
|
17880
|
+
message: t2(
|
|
17881
|
+
suspended ? "dovetail.resume_success_toast" : "dovetail.pause_success_toast",
|
|
17882
|
+
{
|
|
17883
|
+
kind: record.kind,
|
|
17884
|
+
name: id,
|
|
17885
|
+
interpolation: {
|
|
17886
|
+
escapeValue: false
|
|
17887
|
+
}
|
|
17634
17888
|
}
|
|
17635
|
-
|
|
17889
|
+
),
|
|
17636
17890
|
type: "success"
|
|
17637
17891
|
};
|
|
17638
17892
|
},
|
|
17639
17893
|
errorNotification() {
|
|
17640
17894
|
return {
|
|
17641
|
-
message: t2(
|
|
17642
|
-
|
|
17643
|
-
|
|
17644
|
-
|
|
17645
|
-
|
|
17895
|
+
message: t2(
|
|
17896
|
+
suspended ? "dovetail.resume_failed_toast" : "dovetail.pause_failed_toast",
|
|
17897
|
+
{
|
|
17898
|
+
kind: record.kind,
|
|
17899
|
+
name: id,
|
|
17900
|
+
interpolation: {
|
|
17901
|
+
escapeValue: false
|
|
17902
|
+
}
|
|
17646
17903
|
}
|
|
17647
|
-
|
|
17904
|
+
),
|
|
17648
17905
|
type: "error"
|
|
17649
17906
|
};
|
|
17650
17907
|
}
|
|
17651
17908
|
});
|
|
17652
17909
|
},
|
|
17653
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17910
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17911
|
+
Icon,
|
|
17912
|
+
{
|
|
17913
|
+
src: suspended ? RecoverContinue16GradientBlueIcon : Pause16GradientBlueIcon,
|
|
17914
|
+
children: t2(suspended ? "dovetail.resume" : "dovetail.suspend")
|
|
17915
|
+
}
|
|
17916
|
+
)
|
|
17654
17917
|
}
|
|
17655
17918
|
) : null });
|
|
17656
17919
|
}
|
|
@@ -18167,7 +18430,9 @@ const DeleteButton = () => {
|
|
|
18167
18430
|
const { resource } = useResource();
|
|
18168
18431
|
const { id } = useParsed();
|
|
18169
18432
|
const { t: t2 } = useTranslation();
|
|
18170
|
-
const { openDeleteConfirmModal } = useDeleteModal({
|
|
18433
|
+
const { openDeleteConfirmModal } = useDeleteModal({
|
|
18434
|
+
resourceName: (resource == null ? void 0 : resource.name) || ""
|
|
18435
|
+
});
|
|
18171
18436
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18172
18437
|
Button,
|
|
18173
18438
|
{
|
|
@@ -18178,7 +18443,7 @@ const DeleteButton = () => {
|
|
|
18178
18443
|
}
|
|
18179
18444
|
) });
|
|
18180
18445
|
};
|
|
18181
|
-
const
|
|
18446
|
+
const index_e6cgji = "";
|
|
18182
18447
|
const MenuStyle = "mdppgn0";
|
|
18183
18448
|
const Menu = () => {
|
|
18184
18449
|
const {
|
|
@@ -19315,9 +19580,9 @@ const PortsConfigForm = React.forwardRef(function PortsConfigForm2({ value: valu
|
|
|
19315
19580
|
});
|
|
19316
19581
|
const nodePortsFromOtherServices = useMemo(() => {
|
|
19317
19582
|
var _a;
|
|
19318
|
-
return ((_a = services == null ? void 0 : services.data) == null ? void 0 : _a.filter((
|
|
19583
|
+
return ((_a = services == null ? void 0 : services.data) == null ? void 0 : _a.filter((service2) => service2.id !== serviceId).map((service2) => {
|
|
19319
19584
|
var _a2, _b;
|
|
19320
|
-
return (_b = (_a2 =
|
|
19585
|
+
return (_b = (_a2 = service2 == null ? void 0 : service2.spec) == null ? void 0 : _a2.ports) == null ? void 0 : _b.map((port2) => port2.nodePort);
|
|
19321
19586
|
}).flat().filter((port2) => port2 !== void 0)) || [];
|
|
19322
19587
|
}, [services, serviceId]);
|
|
19323
19588
|
const columns = useMemo(() => {
|
|
@@ -19510,7 +19775,7 @@ const PortsConfigForm = React.forwardRef(function PortsConfigForm2({ value: valu
|
|
|
19510
19775
|
}
|
|
19511
19776
|
);
|
|
19512
19777
|
});
|
|
19513
|
-
const IngressRulesComponent = ({ ingress, noLink }) => {
|
|
19778
|
+
const IngressRulesComponent = ({ ingress: ingress2, noLink }) => {
|
|
19514
19779
|
const { data: serviceData } = useList({
|
|
19515
19780
|
resource: "services",
|
|
19516
19781
|
meta: {
|
|
@@ -19518,12 +19783,12 @@ const IngressRulesComponent = ({ ingress, noLink }) => {
|
|
|
19518
19783
|
apiVersion: "v1"
|
|
19519
19784
|
}
|
|
19520
19785
|
});
|
|
19521
|
-
const flattenedRules = (serviceData == null ? void 0 : serviceData.data) ?
|
|
19786
|
+
const flattenedRules = (serviceData == null ? void 0 : serviceData.data) ? ingress2.getFlattenedRules(serviceData == null ? void 0 : serviceData.data) : [];
|
|
19522
19787
|
const result = flattenedRules.map((r2) => {
|
|
19523
19788
|
var _a, _b;
|
|
19524
19789
|
const arrow = " → ";
|
|
19525
19790
|
const divider = " | ";
|
|
19526
|
-
const secretName = (_b = (_a =
|
|
19791
|
+
const secretName = (_b = (_a = ingress2.spec.tls) == null ? void 0 : _a.find(
|
|
19527
19792
|
({ hosts }) => hosts == null ? void 0 : hosts.includes(r2.host || "")
|
|
19528
19793
|
)) == null ? void 0 : _b.secretName;
|
|
19529
19794
|
let tooltip = r2.fullPath;
|
|
@@ -19544,7 +19809,7 @@ const IngressRulesComponent = ({ ingress, noLink }) => {
|
|
|
19544
19809
|
ResourceLink,
|
|
19545
19810
|
{
|
|
19546
19811
|
resourceName: "services",
|
|
19547
|
-
namespace:
|
|
19812
|
+
namespace: ingress2.metadata.namespace || "default",
|
|
19548
19813
|
name: r2.serviceName
|
|
19549
19814
|
}
|
|
19550
19815
|
),
|
|
@@ -19559,7 +19824,7 @@ const IngressRulesComponent = ({ ingress, noLink }) => {
|
|
|
19559
19824
|
ResourceLink,
|
|
19560
19825
|
{
|
|
19561
19826
|
resourceName: "secrets",
|
|
19562
|
-
namespace:
|
|
19827
|
+
namespace: ingress2.metadata.namespace || "default",
|
|
19563
19828
|
name: secretName
|
|
19564
19829
|
}
|
|
19565
19830
|
)
|
|
@@ -19928,7 +20193,10 @@ function ServiceOutClusterAccessTitle() {
|
|
|
19928
20193
|
})
|
|
19929
20194
|
});
|
|
19930
20195
|
}
|
|
19931
|
-
const ServiceOutClusterAccessColumnRenderer = (
|
|
20196
|
+
const ServiceOutClusterAccessColumnRenderer = (_i18n, options) => {
|
|
20197
|
+
const {
|
|
20198
|
+
clusterVip
|
|
20199
|
+
} = options;
|
|
19932
20200
|
return {
|
|
19933
20201
|
key: "outClusterAccess",
|
|
19934
20202
|
title: /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceOutClusterAccessTitle, {}),
|
|
@@ -19968,10 +20236,8 @@ const PodWorkloadColumnRenderer = (i18n2) => {
|
|
|
19968
20236
|
}
|
|
19969
20237
|
};
|
|
19970
20238
|
};
|
|
19971
|
-
const IngressRulesColumnRenderer = ({
|
|
19972
|
-
|
|
19973
|
-
noLink
|
|
19974
|
-
}) => {
|
|
20239
|
+
const IngressRulesColumnRenderer = (i18n2, options) => {
|
|
20240
|
+
const noLink = options == null ? void 0 : options.noLink;
|
|
19975
20241
|
const dataIndex = ["spec", "rules"];
|
|
19976
20242
|
return {
|
|
19977
20243
|
key: "type",
|
|
@@ -20432,39 +20698,45 @@ const Dovetail = (props) => {
|
|
|
20432
20698
|
antd4Configs: {
|
|
20433
20699
|
getPopupContainer: antdGetPopupContainer || (() => document.body)
|
|
20434
20700
|
},
|
|
20435
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20436
|
-
|
|
20701
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20702
|
+
GlobalStoreContext.Provider,
|
|
20437
20703
|
{
|
|
20438
|
-
|
|
20439
|
-
|
|
20440
|
-
|
|
20441
|
-
|
|
20442
|
-
|
|
20443
|
-
|
|
20444
|
-
|
|
20445
|
-
|
|
20446
|
-
|
|
20447
|
-
|
|
20448
|
-
|
|
20449
|
-
|
|
20450
|
-
name: c2.name,
|
|
20451
|
-
meta: {
|
|
20452
|
-
dataProviderName: c2.dataProviderName,
|
|
20453
|
-
resourceBasePath: c2.basePath,
|
|
20454
|
-
kind: c2.kind,
|
|
20455
|
-
parent: c2.parent,
|
|
20456
|
-
label: `${c2.kind}s`
|
|
20704
|
+
value: globalStoreMap,
|
|
20705
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20706
|
+
Refine,
|
|
20707
|
+
{
|
|
20708
|
+
dataProvider: dataProvider(globalStoreMap.default),
|
|
20709
|
+
liveProvider: liveProvider(globalStoreMap.default),
|
|
20710
|
+
routerProvider,
|
|
20711
|
+
notificationProvider,
|
|
20712
|
+
options: {
|
|
20713
|
+
warnWhenUnsavedChanges: true,
|
|
20714
|
+
liveMode: "auto",
|
|
20715
|
+
disableTelemetry: true
|
|
20457
20716
|
},
|
|
20458
|
-
|
|
20459
|
-
|
|
20460
|
-
|
|
20461
|
-
|
|
20462
|
-
|
|
20463
|
-
|
|
20464
|
-
|
|
20465
|
-
|
|
20717
|
+
accessControlProvider,
|
|
20718
|
+
resources: resourcesConfig.map((c2) => {
|
|
20719
|
+
return {
|
|
20720
|
+
name: c2.name,
|
|
20721
|
+
meta: {
|
|
20722
|
+
dataProviderName: c2.dataProviderName,
|
|
20723
|
+
resourceBasePath: c2.basePath,
|
|
20724
|
+
kind: c2.kind,
|
|
20725
|
+
parent: c2.parent,
|
|
20726
|
+
label: `${c2.kind}s`
|
|
20727
|
+
},
|
|
20728
|
+
list: `${urlPrefix}/${c2.name}`,
|
|
20729
|
+
show: `${urlPrefix}/${c2.name}/show`,
|
|
20730
|
+
create: `${urlPrefix}/${c2.name}/create`,
|
|
20731
|
+
edit: `${urlPrefix}/${c2.name}/edit`
|
|
20732
|
+
};
|
|
20733
|
+
}),
|
|
20734
|
+
...props,
|
|
20735
|
+
children: content
|
|
20736
|
+
}
|
|
20737
|
+
)
|
|
20466
20738
|
}
|
|
20467
|
-
)
|
|
20739
|
+
)
|
|
20468
20740
|
}
|
|
20469
20741
|
) }) }) }) });
|
|
20470
20742
|
};
|
|
@@ -20525,8 +20797,8 @@ class ModelPlugin {
|
|
|
20525
20797
|
restoreItem(item) {
|
|
20526
20798
|
return item._rawYaml;
|
|
20527
20799
|
}
|
|
20528
|
-
setModelMap(key2,
|
|
20529
|
-
this.ModelMap.set(key2,
|
|
20800
|
+
setModelMap(key2, ModelClass) {
|
|
20801
|
+
this.ModelMap.set(key2, ModelClass);
|
|
20530
20802
|
}
|
|
20531
20803
|
}
|
|
20532
20804
|
const modelPlugin = new ModelPlugin();
|
|
@@ -20632,12 +20904,14 @@ export {
|
|
|
20632
20904
|
ColumnKeys,
|
|
20633
20905
|
CommonSorter,
|
|
20634
20906
|
ComponentContext,
|
|
20907
|
+
ComponentContextProvider,
|
|
20635
20908
|
ConditionsField,
|
|
20636
20909
|
ConditionsGroup,
|
|
20637
20910
|
ConditionsTab,
|
|
20638
20911
|
ConditionsTable,
|
|
20639
20912
|
ConfigsContext,
|
|
20640
20913
|
ControllerRevisionModel,
|
|
20914
|
+
CopyButton,
|
|
20641
20915
|
CreateButton,
|
|
20642
20916
|
CronJobDropdown,
|
|
20643
20917
|
CronJobModel,
|
|
@@ -20665,7 +20939,7 @@ export {
|
|
|
20665
20939
|
EditLabelForm,
|
|
20666
20940
|
EditNodeTaintDropdownMenuItem,
|
|
20667
20941
|
EditNodeTaintForm,
|
|
20668
|
-
|
|
20942
|
+
ErrorContent,
|
|
20669
20943
|
ErrorContentType,
|
|
20670
20944
|
ErrorWrapper,
|
|
20671
20945
|
EventModel,
|
|
@@ -20678,6 +20952,7 @@ export {
|
|
|
20678
20952
|
FormModal,
|
|
20679
20953
|
FormMode,
|
|
20680
20954
|
FormType,
|
|
20955
|
+
FormatRulePopover,
|
|
20681
20956
|
GlobalStoreContext,
|
|
20682
20957
|
INGRESS_INIT_VALUE,
|
|
20683
20958
|
ImageField,
|
|
@@ -20873,6 +21148,7 @@ export {
|
|
|
20873
21148
|
Time,
|
|
20874
21149
|
ValidateRfc1035Name,
|
|
20875
21150
|
index as ValueDisplay,
|
|
21151
|
+
WidgetErrorContent,
|
|
20876
21152
|
WorkloadBaseModel,
|
|
20877
21153
|
WorkloadDropdown,
|
|
20878
21154
|
WorkloadImageColumnRenderer,
|
|
@@ -20883,7 +21159,6 @@ export {
|
|
|
20883
21159
|
YamlEditorComponent,
|
|
20884
21160
|
YamlForm,
|
|
20885
21161
|
addDefaultRenderToColumns,
|
|
20886
|
-
dnsSubDomainRules,
|
|
20887
21162
|
dovetailRefineI18n,
|
|
20888
21163
|
generateSchemaTypeValue,
|
|
20889
21164
|
generateValueFromSchema,
|
|
@@ -20897,12 +21172,11 @@ export {
|
|
|
20897
21172
|
relationPlugin,
|
|
20898
21173
|
renderCommonFormFiled,
|
|
20899
21174
|
resolveRef,
|
|
20900
|
-
rfc1035LabelRules,
|
|
20901
|
-
rfc1123LabelRules,
|
|
20902
21175
|
routerProvider,
|
|
20903
21176
|
shortenedImage,
|
|
20904
21177
|
transformResourceKindInSentence,
|
|
20905
21178
|
useApiGroupSchema,
|
|
21179
|
+
useDeleteManyModal,
|
|
20906
21180
|
useDeleteModal,
|
|
20907
21181
|
useDeleteModalOnly,
|
|
20908
21182
|
useDownloadYAML,
|