@dovetail-v2/refine 0.1.9 → 0.1.11-alpha.0

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.
Files changed (263) hide show
  1. package/dist/{MonacoYamlDiffEditor-0f76e977.js → MonacoYamlDiffEditor-adaa32ac.js} +1 -1
  2. package/dist/{index-aacb414b.js → index-906cb61f.js} +1161 -874
  3. package/dist/refine.js +208 -203
  4. package/dist/refine.umd.cjs +954 -667
  5. package/dist/style.css +44 -44
  6. package/lib/components/CreateButton/index.d.ts +5 -1
  7. package/lib/components/DropdownMenuItems/EditNodeTaintDropdownMenuItem.d.ts +12 -0
  8. package/lib/components/Dropdowns/CronJobDropdown/index.d.ts +9 -0
  9. package/lib/components/Dropdowns/K8sDropdown/index.d.ts +9 -0
  10. package/lib/components/Dropdowns/PodDropdown/index.d.ts +9 -0
  11. package/lib/components/Dropdowns/ReplicasDropdown/index.d.ts +9 -0
  12. package/lib/components/Dropdowns/WorkloadDropdown/index.d.ts +9 -0
  13. package/lib/components/EditField/index.d.ts +1 -1
  14. package/lib/components/EditMetadataForm/EditNodeTaintForm.d.ts +12 -0
  15. package/lib/components/InternalBaseTable/TableWidgets.d.ts +6 -0
  16. package/lib/components/InternalBaseTable/index.d.ts +43 -0
  17. package/lib/components/ListPage/index.d.ts +2 -2
  18. package/lib/components/NodeTaintsTable/NodeTaintsTable.d.ts +7 -0
  19. package/lib/components/NodeTaintsTable/index.d.ts +1 -0
  20. package/lib/components/PVCDistributeStorage/index.d.ts +1 -1
  21. package/lib/components/ResourceFiledDisplays.d.ts +2 -3
  22. package/lib/components/ResourceLink/index.d.ts +2 -2
  23. package/lib/components/ResourceSelect/index.d.ts +2 -2
  24. package/lib/components/ShowContent/fields.d.ts +2 -0
  25. package/lib/components/ShowContent/groups.d.ts +4 -2
  26. package/lib/components/StateTag/StateTag.d.ts +3 -3
  27. package/lib/components/Table/TableToolBar.d.ts +1 -0
  28. package/lib/components/Table/index.d.ts +11 -43
  29. package/lib/components/TableToolbar/index.d.ts +9 -0
  30. package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +2 -0
  31. package/lib/components/index.d.ts +7 -5
  32. package/lib/constants/state.d.ts +8 -3
  33. package/lib/contexts/component.d.ts +1 -1
  34. package/lib/hooks/useEagleTable/columns.d.ts +2 -1
  35. package/lib/hooks/useEagleTable/useEagleTable.d.ts +3 -4
  36. package/lib/hooks/useSubmitForm.d.ts +1 -1
  37. package/lib/hooks/useTableData.d.ts +1 -1
  38. package/lib/i18n.d.ts +29 -18
  39. package/lib/locales/zh-CN/index.d.ts +29 -18
  40. package/lib/models/cronjob-model.d.ts +2 -2
  41. package/lib/models/daemonset-model.d.ts +2 -2
  42. package/lib/models/deployment-model.d.ts +2 -2
  43. package/lib/models/job-model.d.ts +2 -2
  44. package/lib/models/node-model.d.ts +2 -2
  45. package/lib/models/persistent-volume-claim.d.ts +2 -0
  46. package/lib/models/persistent-volume.d.ts +3 -0
  47. package/lib/models/statefulset-model.d.ts +2 -2
  48. package/lib/src/App.d.ts +3 -0
  49. package/lib/src/Dovetail.d.ts +18 -0
  50. package/lib/src/components/Breadcrumb/index.d.ts +6 -0
  51. package/lib/src/components/ConditionsTable/ConditionsTable.d.ts +7 -0
  52. package/lib/src/components/ConditionsTable/index.d.ts +1 -0
  53. package/lib/src/components/CreateButton/index.d.ts +2 -0
  54. package/lib/src/components/CronJobDropdown/index.d.ts +9 -0
  55. package/lib/src/components/CronjobJobsTable/index.d.ts +8 -0
  56. package/lib/src/components/DeleteButton/index.d.ts +2 -0
  57. package/lib/src/components/DeleteManyButton/index.d.ts +4 -0
  58. package/lib/src/components/DrawerShow/DrawerShow.d.ts +9 -0
  59. package/lib/src/components/DrawerShow/index.d.ts +1 -0
  60. package/lib/src/components/DurationTime/index.d.ts +6 -0
  61. package/lib/src/components/EditButton/index.d.ts +2 -0
  62. package/lib/src/components/EditField/index.d.ts +15 -0
  63. package/lib/src/components/ErrorContent/index.d.ts +17 -0
  64. package/lib/src/components/EventsTable/EventsTable.d.ts +6 -0
  65. package/lib/src/components/EventsTable/index.d.ts +1 -0
  66. package/lib/src/components/Form/FormModal.d.ts +9 -0
  67. package/lib/src/components/Form/RefineFormContent.d.ts +12 -0
  68. package/lib/src/components/Form/RefineFormPage.d.ts +7 -0
  69. package/lib/src/components/Form/YamlForm.d.ts +29 -0
  70. package/lib/src/components/Form/index.d.ts +7 -0
  71. package/lib/src/components/Form/type.d.ts +17 -0
  72. package/lib/src/components/Form/useFieldsConfig.d.ts +4 -0
  73. package/lib/src/components/Form/useReactHookForm.d.ts +30 -0
  74. package/lib/src/components/Form/useRefineForm.d.ts +13 -0
  75. package/lib/src/components/Form/useYamlForm.d.ts +50 -0
  76. package/lib/src/components/FormErrorAlert/index.d.ts +9 -0
  77. package/lib/src/components/FormLayout/index.d.ts +7 -0
  78. package/lib/src/components/FormWidgets/KeyValueListWidget.d.ts +6 -0
  79. package/lib/src/components/FormWidgets/MetadataForm.d.ts +2 -0
  80. package/lib/src/components/FormWidgets/NameInputWidget.d.ts +51 -0
  81. package/lib/src/components/FormWidgets/NamespaceSelectWidget.d.ts +9 -0
  82. package/lib/src/components/FormWidgets/index.d.ts +4 -0
  83. package/lib/src/components/FormWidgets/widget.d.ts +5 -0
  84. package/lib/src/components/ImageNames/index.d.ts +5 -0
  85. package/lib/src/components/IngressRulesComponent/index.d.ts +5 -0
  86. package/lib/src/components/IngressRulesTable/IngressRulesTable.d.ts +7 -0
  87. package/lib/src/components/IngressRulesTable/index.d.ts +1 -0
  88. package/lib/src/components/K8sDropdown/index.d.ts +9 -0
  89. package/lib/src/components/KeyValue/KeyValue.d.ts +7 -0
  90. package/lib/src/components/KeyValue/KeyValueAnnotation.d.ts +6 -0
  91. package/lib/src/components/KeyValue/KeyValueSecret.d.ts +5 -0
  92. package/lib/src/components/KeyValue/index.d.ts +3 -0
  93. package/lib/src/components/Layout/index.d.ts +3 -0
  94. package/lib/src/components/LinkFallback/index.d.ts +4 -0
  95. package/lib/src/components/ListPage/index.d.ts +10 -0
  96. package/lib/src/components/Menu/index.d.ts +2 -0
  97. package/lib/src/components/NamespacesFilter/index.d.ts +11 -0
  98. package/lib/src/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +8 -0
  99. package/lib/src/components/NetworkPolicyRulesViewer/index.d.ts +1 -0
  100. package/lib/src/components/PVCDistributeStorage/index.d.ts +16 -0
  101. package/lib/src/components/PageShow/PageShow.d.ts +12 -0
  102. package/lib/src/components/PageShow/index.d.ts +1 -0
  103. package/lib/src/components/PodContainersTable/PodContainersTable.d.ts +8 -0
  104. package/lib/src/components/PodContainersTable/index.d.ts +1 -0
  105. package/lib/src/components/PodDropdown/index.d.ts +9 -0
  106. package/lib/src/components/PodLog/index.d.ts +6 -0
  107. package/lib/src/components/PodSelectorTable/index.d.ts +6 -0
  108. package/lib/src/components/PodShellModal/PodShell.d.ts +18 -0
  109. package/lib/src/components/PodShellModal/index.d.ts +10 -0
  110. package/lib/src/components/PortsTable/index.d.ts +7 -0
  111. package/lib/src/components/ReferenceLink/index.d.ts +8 -0
  112. package/lib/src/components/ReplicasDropdown/index.d.ts +9 -0
  113. package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +8 -0
  114. package/lib/src/components/ResourceCRUD/create/index.d.ts +8 -0
  115. package/lib/src/components/ResourceCRUD/index.d.ts +4 -0
  116. package/lib/src/components/ResourceCRUD/list/index.d.ts +9 -0
  117. package/lib/src/components/ResourceCRUD/show/index.d.ts +9 -0
  118. package/lib/src/components/ResourceFiledDisplays.d.ts +7 -0
  119. package/lib/src/components/ResourceLink/index.d.ts +8 -0
  120. package/lib/src/components/ResourceSelect/index.d.ts +12 -0
  121. package/lib/src/components/ResourceTable/index.d.ts +9 -0
  122. package/lib/src/components/ResourceUsageBar/index.d.ts +8 -0
  123. package/lib/src/components/Separator/index.d.ts +2 -0
  124. package/lib/src/components/ServiceComponents/index.d.ts +10 -0
  125. package/lib/src/components/Shell/ShellToolbar.d.ts +16 -0
  126. package/lib/src/components/Shell/index.d.ts +74 -0
  127. package/lib/src/components/ShowContent/ShowContent.d.ts +18 -0
  128. package/lib/src/components/ShowContent/fields.d.ts +76 -0
  129. package/lib/src/components/ShowContent/groups.d.ts +24 -0
  130. package/lib/src/components/ShowContent/index.d.ts +4 -0
  131. package/lib/src/components/ShowContent/tabs.d.ts +5 -0
  132. package/lib/src/components/StateTag/StateTag.d.ts +10 -0
  133. package/lib/src/components/StateTag/index.d.ts +1 -0
  134. package/lib/src/components/Table/TableToolBar.d.ts +8 -0
  135. package/lib/src/components/Table/TableWidgets.d.ts +6 -0
  136. package/lib/src/components/Table/index.d.ts +43 -0
  137. package/lib/src/components/Tabs/index.d.ts +10 -0
  138. package/lib/src/components/Tags/index.d.ts +6 -0
  139. package/lib/src/components/TextTags/index.d.ts +6 -0
  140. package/lib/src/components/Time/index.d.ts +8 -0
  141. package/lib/src/components/ValueDisplay/index.d.ts +9 -0
  142. package/lib/src/components/WorkloadDropdown/index.d.ts +9 -0
  143. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +9 -0
  144. package/lib/src/components/WorkloadPodsTable/index.d.ts +1 -0
  145. package/lib/src/components/WorkloadReplicas/index.d.ts +17 -0
  146. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
  147. package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
  148. package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +27 -0
  149. package/lib/src/components/YamlEditor/index.d.ts +1 -0
  150. package/lib/src/components/YamlEditor/style.d.ts +11 -0
  151. package/lib/src/components/YamlEditor/yaml.worker.d.ts +1 -0
  152. package/lib/src/components/index.d.ts +49 -0
  153. package/lib/src/constants/auth.d.ts +5 -0
  154. package/lib/src/constants/index.d.ts +3 -0
  155. package/lib/src/constants/k8s.d.ts +522 -0
  156. package/lib/src/constants/state.d.ts +15 -0
  157. package/lib/src/contexts/component.d.ts +8 -0
  158. package/lib/src/contexts/configs.d.ts +4 -0
  159. package/lib/src/contexts/global-store.d.ts +6 -0
  160. package/lib/src/contexts/index.d.ts +3 -0
  161. package/lib/src/hooks/index.d.ts +8 -0
  162. package/lib/src/hooks/useDeleteModal/index.d.ts +1 -0
  163. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.d.ts +8 -0
  164. package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
  165. package/lib/src/hooks/useDownloadYAML.d.ts +7 -0
  166. package/lib/src/hooks/useEagleTable/columns.d.ts +47 -0
  167. package/lib/src/hooks/useEagleTable/index.d.ts +2 -0
  168. package/lib/src/hooks/useEagleTable/useEagleTable.d.ts +56 -0
  169. package/lib/src/hooks/useEdit.d.ts +4 -0
  170. package/lib/src/hooks/useGlobalStore.d.ts +3 -0
  171. package/lib/src/hooks/useK8sYamlEditor.d.ts +5 -0
  172. package/lib/src/hooks/useNamespaceRefineFilter.d.ts +5 -0
  173. package/lib/src/hooks/useOpenForm.d.ts +8 -0
  174. package/lib/src/hooks/useSchema.d.ts +21 -0
  175. package/lib/src/hooks/useSubmitForm.d.ts +14 -0
  176. package/lib/src/hooks/useTableData.d.ts +20 -0
  177. package/lib/src/i18n.d.ts +371 -0
  178. package/lib/src/index.d.ts +12 -0
  179. package/lib/src/locales/en-US/index.d.ts +175 -0
  180. package/lib/src/locales/index.d.ts +2 -0
  181. package/lib/src/locales/zh-CN/index.d.ts +193 -0
  182. package/lib/src/main.d.ts +3 -0
  183. package/lib/src/models/cronjob-model.d.ts +15 -0
  184. package/lib/src/models/daemonset-model.d.ts +15 -0
  185. package/lib/src/models/deployment-model.d.ts +13 -0
  186. package/lib/src/models/event-model.d.ts +7 -0
  187. package/lib/src/models/index.d.ts +19 -0
  188. package/lib/src/models/ingress-model.d.ts +20 -0
  189. package/lib/src/models/job-model.d.ts +20 -0
  190. package/lib/src/models/network-policy-model.d.ts +9 -0
  191. package/lib/src/models/node-model.d.ts +17 -0
  192. package/lib/src/models/persistent-volume-claim.d.ts +13 -0
  193. package/lib/src/models/persistent-volume.d.ts +13 -0
  194. package/lib/src/models/pod-metrics-model.d.ts +8 -0
  195. package/lib/src/models/pod-model.d.ts +20 -0
  196. package/lib/src/models/resource-model.d.ts +21 -0
  197. package/lib/src/models/service-model.d.ts +24 -0
  198. package/lib/src/models/statefulset-model.d.ts +13 -0
  199. package/lib/src/models/storage-class.d.ts +16 -0
  200. package/lib/src/models/types/index.d.ts +1 -0
  201. package/lib/src/models/types/metric.d.ts +25 -0
  202. package/lib/src/models/workload-base-model.d.ts +12 -0
  203. package/lib/src/models/workload-model.d.ts +18 -0
  204. package/lib/src/pages/configmaps/index.d.ts +4 -0
  205. package/lib/src/pages/cronjobs/create/index.d.ts +3 -0
  206. package/lib/src/pages/cronjobs/index.d.ts +3 -0
  207. package/lib/src/pages/cronjobs/list/index.d.ts +3 -0
  208. package/lib/src/pages/cronjobs/show/index.d.ts +3 -0
  209. package/lib/src/pages/daemonsets/create/index.d.ts +3 -0
  210. package/lib/src/pages/daemonsets/index.d.ts +3 -0
  211. package/lib/src/pages/daemonsets/list/index.d.ts +3 -0
  212. package/lib/src/pages/daemonsets/show/index.d.ts +3 -0
  213. package/lib/src/pages/deployments/index.d.ts +2 -0
  214. package/lib/src/pages/deployments/list/index.d.ts +3 -0
  215. package/lib/src/pages/deployments/show/index.d.ts +3 -0
  216. package/lib/src/pages/ingresses/index.d.ts +4 -0
  217. package/lib/src/pages/jobs/index.d.ts +4 -0
  218. package/lib/src/pages/networkPolicies/index.d.ts +4 -0
  219. package/lib/src/pages/nodes/index.d.ts +2 -0
  220. package/lib/src/pages/nodes/list/index.d.ts +3 -0
  221. package/lib/src/pages/nodes/show/index.d.ts +3 -0
  222. package/lib/src/pages/persistentvolumeclaims/index.d.ts +4 -0
  223. package/lib/src/pages/persistentvolumes/index.d.ts +4 -0
  224. package/lib/src/pages/pods/create/index.d.ts +3 -0
  225. package/lib/src/pages/pods/index.d.ts +3 -0
  226. package/lib/src/pages/pods/list/index.d.ts +3 -0
  227. package/lib/src/pages/pods/show/index.d.ts +3 -0
  228. package/lib/src/pages/secrets/index.d.ts +4 -0
  229. package/lib/src/pages/services/index.d.ts +4 -0
  230. package/lib/src/pages/statefulsets/index.d.ts +4 -0
  231. package/lib/src/pages/storageclasses/form/index.d.ts +9 -0
  232. package/lib/src/pages/storageclasses/index.d.ts +48 -0
  233. package/lib/src/plugins/index.d.ts +4 -0
  234. package/lib/src/plugins/model-plugin.d.ts +13 -0
  235. package/lib/src/plugins/relation-plugin.d.ts +26 -0
  236. package/lib/src/plugins/type.d.ts +8 -0
  237. package/lib/src/providers/index.d.ts +1 -0
  238. package/lib/src/providers/router-provider/index.d.ts +21 -0
  239. package/lib/src/styles/button.d.ts +1 -0
  240. package/lib/src/styles/modal.d.ts +1 -0
  241. package/lib/src/types/index.d.ts +1 -0
  242. package/lib/src/types/resource.d.ts +62 -0
  243. package/lib/src/utils/addId.d.ts +3 -0
  244. package/lib/src/utils/download.d.ts +1 -0
  245. package/lib/src/utils/error.d.ts +20 -0
  246. package/lib/src/utils/form.d.ts +3 -0
  247. package/lib/src/utils/index.d.ts +1 -0
  248. package/lib/src/utils/k8s.d.ts +3 -0
  249. package/lib/src/utils/labels.d.ts +9 -0
  250. package/lib/src/utils/match-selector.d.ts +3 -0
  251. package/lib/src/utils/openapi.d.ts +40 -0
  252. package/lib/src/utils/schema.d.ts +18 -0
  253. package/lib/src/utils/selector.d.ts +3 -0
  254. package/lib/src/utils/shell.d.ts +16 -0
  255. package/lib/src/utils/storage.d.ts +13 -0
  256. package/lib/src/utils/string.d.ts +1 -0
  257. package/lib/src/utils/time.d.ts +13 -0
  258. package/lib/src/utils/unit.d.ts +12 -0
  259. package/lib/src/utils/yaml.d.ts +2 -0
  260. package/lib/styles/tag.d.ts +1 -0
  261. package/lib/types/resource.d.ts +3 -3
  262. package/lib/vite.config.d.ts +2 -0
  263. package/package.json +5 -5
@@ -7,12 +7,12 @@ var __publicField = (obj, key2, value2) => {
7
7
  import i18n from "i18next";
8
8
  import * as React from "react";
9
9
  import React__default, { createElement, isValidElement, cloneElement, Children, createContext, useContext, useState, useRef, useEffect, useCallback, useMemo, useImperativeHandle, memo, PureComponent, useLayoutEffect, forwardRef, Suspense } from "react";
10
- import { ResourceContext, matchResourceFromRoute, useResource, useDelete, useNavigation, useBreadcrumb, useList, useParsed, useGo, CanAccess, useUpdate, useCan, useTable, useDeleteMany, useShow, useDataProvider, useRefineContext, useTranslate, useWarnAboutChange, useForm as useForm$2, flattenObjectKeys, pickNotDeprecated, useMenu, Refine } from "@refinedev/core";
10
+ import { ResourceContext, matchResourceFromRoute, useResource, useDelete, useNavigation, useBreadcrumb, useList, CanAccess, useUpdate, useParsed, useGo, useCan, useTable, useDeleteMany, useShow, useDataProvider, useRefineContext, useTranslate, useWarnAboutChange, useForm as useForm$2, flattenObjectKeys, pickNotDeprecated, useMenu, Refine } from "@refinedev/core";
11
11
  import { parse, stringify } from "qs";
12
12
  import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink, Router } from "react-router-dom";
13
- import { Typo, Tag, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$1, Pagination, OverflowTooltip, StatusCapsule, Tooltip, usePushModal, Alert, usePopModal, Modal, TableForm, Menu as Menu$1, Icon as Icon$1, Dropdown, Divider, Link as Link$1, Tabs as Tabs$1, TabsTabPane, Row, Col, Fields, DonutChart, Units, SegmentControl, Checkbox, DropdownMenu, SearchInput, Token, AntdSelectOptGroup, MenuItemGroup, Layout as Layout$1, Time as Time$1, useMessage, ModalStack, KitStoreProvider, ConfigProvider } from "@cloudtower/eagle";
14
- import { EditPen16BlueIcon, EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, EditPen16GradientBlueIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, Retry16GradientBlueIcon, FontSize16GrayIcon, FontSize16BlueIcon, LogCollection16GrayIcon, LogCollection16GradientBlueIcon, TrashBinDeletePermanently16GrayIcon, TrashBinDeletePermanently16BlueIcon, Loading24GradientBlueIcon, OpenTerminal16GradientBlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, ExclamationErrorCircleFill16RedIcon, Pause16GradientBlueIcon } from "@cloudtower/icons-react";
15
- import { cloneDeep, set as set$1, first, omit as omit$1, merge, get as get$3, debounce, last, isObject as isObject$4, uniq, keyBy } from "lodash-es";
13
+ import { Typo, Tag, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$2, Pagination, Alert, usePopModal, Modal, usePushModal, Fields, Units, OverflowTooltip, Tooltip, StatusCapsule, TableForm, Menu as Menu$1, Icon as Icon$1, Dropdown, Divider, Link as Link$1, Tabs as Tabs$1, TabsTabPane, Row, Col, DonutChart, SegmentControl, Checkbox, DropdownMenu, SearchInput, Token, AntdSelectOptGroup, MenuItemGroup, Layout as Layout$1, Time as Time$1, useMessage, ModalStack, KitStoreProvider, ConfigProvider } from "@cloudtower/eagle";
14
+ import { EditPen16BlueIcon, EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, Retry16GradientBlueIcon, FontSize16GrayIcon, FontSize16BlueIcon, LogCollection16GrayIcon, LogCollection16GradientBlueIcon, TrashBinDeletePermanently16GrayIcon, TrashBinDeletePermanently16BlueIcon, Loading24GradientBlueIcon, OpenTerminal16GradientBlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, EditPen16GradientBlueIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, ExclamationErrorCircleFill16RedIcon, Pause16GradientBlueIcon } from "@cloudtower/icons-react";
15
+ import { first, isNil, cloneDeep, set as set$1, omit as omit$1, merge, get as get$3, debounce, last, isObject as isObject$4, uniq, keyBy } from "lodash-es";
16
16
  import yaml$1 from "js-yaml";
17
17
  import { paginateData, sortData, dataProvider, liveProvider } from "k8s-api-provider";
18
18
  import * as monaco from "monaco-editor";
@@ -1021,8 +1021,8 @@ const already_reset$1 = "Already reset";
1021
1021
  const fetch_schema_fail$1 = "获取 schema 失败。";
1022
1022
  const obtain_data_error$1 = "Having trouble getting data.";
1023
1023
  const retry$1 = "Retry";
1024
- const create_resource$1 = "Create {{resource}}";
1025
- const edit_resource$1 = "Edit {{resource}}";
1024
+ const create_resource$1 = "Create{{resource}}";
1025
+ const edit_resource$1 = "Edit{{resource}}";
1026
1026
  const state$1 = "Status";
1027
1027
  const name$1 = "Name";
1028
1028
  const pod$1 = "Pod";
@@ -1056,18 +1056,18 @@ const data$1 = "Data";
1056
1056
  const resume$1 = "Resume";
1057
1057
  const sessionAffinity$1 = "Session Affinity";
1058
1058
  const log$1 = "Log";
1059
- const ready$1 = "Ready";
1060
- const updating$1 = "Updating";
1061
- const completed$1 = "Completed";
1062
- const failed$1 = "Failed";
1063
- const suspended$1 = "Suspended";
1064
- const running$1 = "Running";
1065
- const terminating$1 = "Terminating";
1066
- const terminated$1 = "Terminated";
1067
- const succeeded$1 = "Succeeded";
1068
- const unknown$1 = "Unknown";
1069
- const pending$1 = "Pending";
1070
- const waiting$1 = "Waiting";
1059
+ const ready = "Ready";
1060
+ const updating = "Updating";
1061
+ const completed = "Completed";
1062
+ const failed = "Failed";
1063
+ const suspended = "Suspended";
1064
+ const running = "Running";
1065
+ const terminating = "Terminating";
1066
+ const terminated = "Terminated";
1067
+ const succeeded = "Succeeded";
1068
+ const unknown = "Unknown";
1069
+ const pending = "Pending";
1070
+ const waiting = "Waiting";
1071
1071
  const expand$1 = "Expand";
1072
1072
  const fold$1 = "Collapse";
1073
1073
  const rule$1 = "Rule";
@@ -1158,7 +1158,7 @@ const pod_port$1 = "Pod port";
1158
1158
  const path_type$1 = "Path type";
1159
1159
  const only_support_one_yaml$1 = "Only one YAML configuration is supported at a time.";
1160
1160
  const not_support$1 = "Not supported";
1161
- const stopped$1 = "Stopped";
1161
+ const stopped = "Stopped";
1162
1162
  const any_node_ip$1 = "Any node IP";
1163
1163
  const storage_class$1 = "Storage class";
1164
1164
  const persistent_volume$1 = "Persistent volume";
@@ -1168,11 +1168,11 @@ const capacity$1 = "Capacity";
1168
1168
  const volume_mode$1 = "Volume mode";
1169
1169
  const access_mode$1 = "Access mode";
1170
1170
  const block$1 = "Block";
1171
- const pv_phase_available$1 = "Available";
1172
- const pv_phase_bound$1 = "Bound";
1173
- const pv_phase_released$1 = "Released";
1174
- const pv_phase_failed$1 = "Failed";
1175
- const pv_phase_pending$1 = "Pending";
1171
+ const pv_phase_available = "Available";
1172
+ const pv_phase_bound = "Bound";
1173
+ const pv_phase_released = "Released";
1174
+ const pv_phase_failed = "Failed";
1175
+ const pv_phase_pending = "Pending";
1176
1176
  const exec_pod = "Execute shell";
1177
1177
  const search$1 = "Search";
1178
1178
  const edit_label$1 = "Edit label";
@@ -1226,18 +1226,18 @@ const dovetail$1 = {
1226
1226
  resume: resume$1,
1227
1227
  sessionAffinity: sessionAffinity$1,
1228
1228
  log: log$1,
1229
- ready: ready$1,
1230
- updating: updating$1,
1231
- completed: completed$1,
1232
- failed: failed$1,
1233
- suspended: suspended$1,
1234
- running: running$1,
1235
- terminating: terminating$1,
1236
- terminated: terminated$1,
1237
- succeeded: succeeded$1,
1238
- unknown: unknown$1,
1239
- pending: pending$1,
1240
- waiting: waiting$1,
1229
+ ready,
1230
+ updating,
1231
+ completed,
1232
+ failed,
1233
+ suspended,
1234
+ running,
1235
+ terminating,
1236
+ terminated,
1237
+ succeeded,
1238
+ unknown,
1239
+ pending,
1240
+ waiting,
1241
1241
  expand: expand$1,
1242
1242
  fold: fold$1,
1243
1243
  rule: rule$1,
@@ -1330,7 +1330,7 @@ const dovetail$1 = {
1330
1330
  path_type: path_type$1,
1331
1331
  only_support_one_yaml: only_support_one_yaml$1,
1332
1332
  not_support: not_support$1,
1333
- stopped: stopped$1,
1333
+ stopped,
1334
1334
  any_node_ip: any_node_ip$1,
1335
1335
  storage_class: storage_class$1,
1336
1336
  persistent_volume: persistent_volume$1,
@@ -1340,11 +1340,11 @@ const dovetail$1 = {
1340
1340
  volume_mode: volume_mode$1,
1341
1341
  access_mode: access_mode$1,
1342
1342
  block: block$1,
1343
- pv_phase_available: pv_phase_available$1,
1344
- pv_phase_bound: pv_phase_bound$1,
1345
- pv_phase_released: pv_phase_released$1,
1346
- pv_phase_failed: pv_phase_failed$1,
1347
- pv_phase_pending: pv_phase_pending$1,
1343
+ pv_phase_available,
1344
+ pv_phase_bound,
1345
+ pv_phase_released,
1346
+ pv_phase_failed,
1347
+ pv_phase_pending,
1348
1348
  exec_pod,
1349
1349
  search: search$1,
1350
1350
  edit_label: edit_label$1
@@ -1408,20 +1408,20 @@ const select_container = "选择容器";
1408
1408
  const fetch_schema_fail = "获取 schema 失败。";
1409
1409
  const obtain_data_error = "获取数据时遇到问题。";
1410
1410
  const retry = "重试";
1411
- const ready = "已就绪";
1412
- const updating = "更新中";
1413
- const completed = "已完成";
1414
- const failed = "异常";
1415
- const suspended = "已挂起";
1416
- const running = "运行中";
1417
- const terminating = "终止中";
1418
- const succeeded = "已成功终止";
1419
- const terminated = "已终止";
1420
- const unknown = "未知";
1421
- const pending = "待处理";
1422
- const waiting = "等待中";
1423
- const create_resource = "创建 {{resource}}";
1424
- const edit_resource = "编辑 {{resource}}";
1411
+ const ready_state = "已就绪";
1412
+ const updating_state = "更新中";
1413
+ const completed_state = "已完成";
1414
+ const abnormal_state = "异常";
1415
+ const suspended_state = "已挂起";
1416
+ const running_state = "运行中";
1417
+ const terminating_state = "终止中";
1418
+ const succeeded_state = "已成功终止";
1419
+ const terminated_state = "已终止";
1420
+ const unknown_state = "未知";
1421
+ const pending_state = "待处理";
1422
+ const waiting_state = "等待中";
1423
+ const create_resource = "创建{{resource}}";
1424
+ const edit_resource = "编辑{{resource}}";
1425
1425
  const sec = "秒";
1426
1426
  const min = "分";
1427
1427
  const hr = "小时";
@@ -1456,6 +1456,7 @@ const node_port = "NodePort";
1456
1456
  const protocol = "协议";
1457
1457
  const key = "键";
1458
1458
  const value = "值";
1459
+ const effect = "效果";
1459
1460
  const show_data_value = "显示数值";
1460
1461
  const hide_data_value = "隐藏数值";
1461
1462
  const path_type = "路径类型";
@@ -1504,7 +1505,7 @@ const out_external_name_desc = "ExternalName 展示 <strong>external-ip</strong>
1504
1505
  const only_support_one_yaml = "一次仅支持输入一个 YAML 配置。";
1505
1506
  const support = "支持";
1506
1507
  const not_support = "不支持";
1507
- const stopped = "已停止";
1508
+ const stopped_state = "已停止";
1508
1509
  const any_node_ip = "任意节点 IP";
1509
1510
  const storage_class = "存储类";
1510
1511
  const persistent_volume = "持久卷";
@@ -1515,11 +1516,11 @@ const distributed = "分配量";
1515
1516
  const volume_mode = "卷模式";
1516
1517
  const access_mode = "访问模式";
1517
1518
  const block = "块";
1518
- const pv_phase_available = "可用";
1519
- const pv_phase_bound = "已绑定";
1520
- const pv_phase_released = "已释放";
1521
- const pv_phase_failed = "失败";
1522
- const pv_phase_pending = "等待中";
1519
+ const available_state = "可用";
1520
+ const bound_state = "已绑定";
1521
+ const released_state = "已释放";
1522
+ const failed_state = "失败";
1523
+ const lost_state = "卷不可用";
1523
1524
  const font_size = "字体大小";
1524
1525
  const download_shell_content = "下载控制台日志";
1525
1526
  const clear_shell = "清空命令行";
@@ -1545,6 +1546,16 @@ const allow_expand = "卷扩容";
1545
1546
  const edit_distribute_storage = "编辑分配量";
1546
1547
  const edit_distribute_storage_success_toast = "编辑分配量成功";
1547
1548
  const edit_distribute_storage_failed_toast = "编辑分配量失败";
1549
+ const edit_node_taint = "编辑节点污点";
1550
+ const edit_node_taint_success_toast = "编辑节点 {{name}} 的污点成功";
1551
+ const node_taint_NoSchedule = "仅阻止调度";
1552
+ const node_taint_PreferNoSchedule = "尽可能阻止调度";
1553
+ const node_taint_NoExecute = "阻止调度并驱逐 Pod";
1554
+ const taint = "污点";
1555
+ const change_form_mode_alert = "从编辑 YAML 切回表单编辑,将无法保留对 YAML 文件做出的所有更改。";
1556
+ const pvc_storage_required = "请填写分配量。";
1557
+ const pvc_storage_min = "请输入正整数。";
1558
+ const pvc_storage_reduce_limit = "输入值不得小于当前数值。";
1548
1559
  const dovetail = {
1549
1560
  copy: copy$1,
1550
1561
  reset_arguments,
@@ -1603,18 +1614,18 @@ const dovetail = {
1603
1614
  fetch_schema_fail,
1604
1615
  obtain_data_error,
1605
1616
  retry,
1606
- ready,
1607
- updating,
1608
- completed,
1609
- failed,
1610
- suspended,
1611
- running,
1612
- terminating,
1613
- succeeded,
1614
- terminated,
1615
- unknown,
1616
- pending,
1617
- waiting,
1617
+ ready_state,
1618
+ updating_state,
1619
+ completed_state,
1620
+ abnormal_state,
1621
+ suspended_state,
1622
+ running_state,
1623
+ terminating_state,
1624
+ succeeded_state,
1625
+ terminated_state,
1626
+ unknown_state,
1627
+ pending_state,
1628
+ waiting_state,
1618
1629
  create_resource,
1619
1630
  edit_resource,
1620
1631
  sec,
@@ -1651,6 +1662,7 @@ const dovetail = {
1651
1662
  protocol,
1652
1663
  key,
1653
1664
  value,
1665
+ effect,
1654
1666
  show_data_value,
1655
1667
  hide_data_value,
1656
1668
  path_type,
@@ -1701,7 +1713,7 @@ const dovetail = {
1701
1713
  only_support_one_yaml,
1702
1714
  support,
1703
1715
  not_support,
1704
- stopped,
1716
+ stopped_state,
1705
1717
  any_node_ip,
1706
1718
  storage_class,
1707
1719
  persistent_volume,
@@ -1712,11 +1724,11 @@ const dovetail = {
1712
1724
  volume_mode,
1713
1725
  access_mode,
1714
1726
  block,
1715
- pv_phase_available,
1716
- pv_phase_bound,
1717
- pv_phase_released,
1718
- pv_phase_failed,
1719
- pv_phase_pending,
1727
+ available_state,
1728
+ bound_state,
1729
+ released_state,
1730
+ failed_state,
1731
+ lost_state,
1720
1732
  font_size,
1721
1733
  download_shell_content,
1722
1734
  clear_shell,
@@ -1741,7 +1753,17 @@ const dovetail = {
1741
1753
  allow_expand,
1742
1754
  edit_distribute_storage,
1743
1755
  edit_distribute_storage_success_toast,
1744
- edit_distribute_storage_failed_toast
1756
+ edit_distribute_storage_failed_toast,
1757
+ edit_node_taint,
1758
+ edit_node_taint_success_toast,
1759
+ node_taint_NoSchedule,
1760
+ node_taint_PreferNoSchedule,
1761
+ node_taint_NoExecute,
1762
+ taint,
1763
+ change_form_mode_alert,
1764
+ pvc_storage_required,
1765
+ pvc_storage_min,
1766
+ pvc_storage_reduce_limit
1745
1767
  };
1746
1768
  const ZH = {
1747
1769
  dovetail
@@ -6676,7 +6698,7 @@ lodash.exports;
6676
6698
  function isNull(value2) {
6677
6699
  return value2 === null;
6678
6700
  }
6679
- function isNil(value2) {
6701
+ function isNil2(value2) {
6680
6702
  return value2 == null;
6681
6703
  }
6682
6704
  function isNumber(value2) {
@@ -7743,7 +7765,7 @@ lodash.exports;
7743
7765
  lodash2.isMatchWith = isMatchWith;
7744
7766
  lodash2.isNaN = isNaN2;
7745
7767
  lodash2.isNative = isNative;
7746
- lodash2.isNil = isNil;
7768
+ lodash2.isNil = isNil2;
7747
7769
  lodash2.isNull = isNull;
7748
7770
  lodash2.isNumber = isNumber;
7749
7771
  lodash2.isObject = isObject2;
@@ -8844,15 +8866,15 @@ const WidgetErrorContent = (props) => {
8844
8866
  })
8845
8867
  });
8846
8868
  };
8847
- const TableWidgets_sc2nyo = "";
8869
+ const TableWidgets_zbqkvj = "";
8848
8870
  const AuxiliaryLine = /* @__PURE__ */ styled_default("div")({
8849
8871
  name: "AuxiliaryLine",
8850
- class: "ax1qopv",
8872
+ class: "a60f3dj",
8851
8873
  propsAsIs: false
8852
8874
  });
8853
- const index_dp43sd = "";
8854
- const TableContainerStyle = "t1upn1sz";
8855
- function Table(props) {
8875
+ const index_17chkj7 = "";
8876
+ const TableContainerStyle = "t47xc8k";
8877
+ function Table$1(props) {
8856
8878
  const {
8857
8879
  t: t2
8858
8880
  } = useTranslation();
@@ -8917,7 +8939,7 @@ function Table(props) {
8917
8939
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
8918
8940
  ref: wrapperRef,
8919
8941
  className: cx_default(TableContainerStyle, props.className, "table-wrapper"),
8920
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Table$1, {
8942
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Table$2, {
8921
8943
  tableLayout: "fixed",
8922
8944
  columns: finalColumns,
8923
8945
  dataSource,
@@ -8969,7 +8991,7 @@ function useTableData({ data: data2, columns, pageSize = 10, defaultSorters }) {
8969
8991
  const PodSelectorTable = ({ podSelectors = {} }) => {
8970
8992
  const { t: t2 } = useTranslation();
8971
8993
  const component = useContext(ComponentContext);
8972
- const Table$12 = component.Table || Table;
8994
+ const Table2 = component.Table || Table$1;
8973
8995
  const currentSize = 10;
8974
8996
  const datas = Object.keys(podSelectors).map((key2) => ({
8975
8997
  id: key2,
@@ -9014,7 +9036,7 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
9014
9036
  );
9015
9037
  }
9016
9038
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9017
- Table$12,
9039
+ Table2,
9018
9040
  {
9019
9041
  tableKey: "podSelector",
9020
9042
  loading: false,
@@ -9034,7 +9056,7 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
9034
9056
  const PortsTable = ({ service }) => {
9035
9057
  const { t: t2 } = useTranslation();
9036
9058
  const component = useContext(ComponentContext);
9037
- const Table$12 = component.Table || Table;
9059
+ const Table2 = component.Table || Table$1;
9038
9060
  const currentSize = 10;
9039
9061
  const columns = [
9040
9062
  {
@@ -9102,7 +9124,7 @@ const PortsTable = ({ service }) => {
9102
9124
  );
9103
9125
  }
9104
9126
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9105
- Table$12,
9127
+ Table2,
9106
9128
  {
9107
9129
  tableKey: "ports",
9108
9130
  loading: false,
@@ -9119,6 +9141,409 @@ const PortsTable = ({ service }) => {
9119
9141
  }
9120
9142
  );
9121
9143
  };
9144
+ function FormErrorAlert(props) {
9145
+ const { title, errorMsgs, style, className, isEdit } = props;
9146
+ const { i18n: i18n2 } = useTranslation();
9147
+ return errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
9148
+ Alert,
9149
+ {
9150
+ message: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
9151
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title || i18n2.t(isEdit ? "dovetail.save_failed_tip" : "dovetail.create_failed_tip") }),
9152
+ errorMsgs.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
9153
+ index2 + 1 + ". ",
9154
+ " ",
9155
+ errorMsg
9156
+ ] }, errorMsg)) }) : first(errorMsgs)
9157
+ ] }),
9158
+ type: "error",
9159
+ style,
9160
+ className
9161
+ }
9162
+ ) : null;
9163
+ }
9164
+ var AccessControlAuth = /* @__PURE__ */ ((AccessControlAuth2) => {
9165
+ AccessControlAuth2["Edit"] = "Edit";
9166
+ AccessControlAuth2["Delete"] = "Delete";
9167
+ AccessControlAuth2["Create"] = "Create";
9168
+ return AccessControlAuth2;
9169
+ })(AccessControlAuth || {});
9170
+ function getCommonErrors(responseBody, i18n2) {
9171
+ var _a;
9172
+ if (!((responseBody == null ? void 0 : responseBody.message) || (responseBody == null ? void 0 : responseBody.code) || (responseBody == null ? void 0 : responseBody.reason) || (responseBody == null ? void 0 : responseBody.details) || (responseBody == null ? void 0 : responseBody.graphQLErrors))) {
9173
+ return [];
9174
+ }
9175
+ const causes = ((_a = responseBody.details) == null ? void 0 : _a.causes) || responseBody.graphQLErrors || [];
9176
+ if (causes.length) {
9177
+ return causes.map((cause) => {
9178
+ let params = {};
9179
+ let message2 = cause.message;
9180
+ try {
9181
+ const info = JSON.parse(cause.message);
9182
+ params = info.params;
9183
+ message2 = info.message;
9184
+ } catch {
9185
+ return i18n2.t(
9186
+ [
9187
+ `error.${cause.reason}`,
9188
+ `error.${cause.code}`,
9189
+ `${cause.field ? `${cause.field}: ` : ""}${message2}`
9190
+ ],
9191
+ {
9192
+ ...params,
9193
+ fallbackLng: ""
9194
+ }
9195
+ );
9196
+ }
9197
+ return i18n2.t(
9198
+ [
9199
+ `error.${cause.reason}`,
9200
+ `error.${cause.code}`,
9201
+ `${cause.field ? `${cause.field}: ` : ""}${message2}`
9202
+ ],
9203
+ {
9204
+ ...params,
9205
+ fallbackLng: ""
9206
+ }
9207
+ );
9208
+ });
9209
+ }
9210
+ return [
9211
+ i18n2.t(
9212
+ [`error.${responseBody.code}`, `error.${responseBody.reason}`, responseBody.message || ""],
9213
+ { fallbackLng: "" }
9214
+ )
9215
+ ];
9216
+ }
9217
+ function useSubmitForm(options) {
9218
+ const { formRef, onSubmitSuccess } = options;
9219
+ const { i18n: i18n2 } = useTranslation();
9220
+ const [submitting, setSubmitting] = useState(false);
9221
+ const [errorMsgs, setErrorMsgs] = useState([]);
9222
+ const reset = useCallback(() => {
9223
+ setSubmitting(false);
9224
+ setErrorMsgs([]);
9225
+ }, []);
9226
+ const onSubmit = useCallback(async () => {
9227
+ var _a;
9228
+ try {
9229
+ setSubmitting(true);
9230
+ const isFalsy = await ((_a = formRef.current) == null ? void 0 : _a.submit()) === false;
9231
+ if (isFalsy) {
9232
+ return;
9233
+ }
9234
+ onSubmitSuccess == null ? void 0 : onSubmitSuccess();
9235
+ reset();
9236
+ } catch (error) {
9237
+ if (error instanceof Object) {
9238
+ if ("response" in error && error.response instanceof Response) {
9239
+ const response = error.response;
9240
+ const body = await response.json();
9241
+ setErrorMsgs(getCommonErrors(body, i18n2));
9242
+ } else if ("message" in error && typeof error.message === "string") {
9243
+ setErrorMsgs([error.message]);
9244
+ }
9245
+ }
9246
+ } finally {
9247
+ setSubmitting(false);
9248
+ }
9249
+ }, [formRef, i18n2, reset, onSubmitSuccess]);
9250
+ return {
9251
+ submitting,
9252
+ errorMsgs,
9253
+ reset,
9254
+ onSubmit
9255
+ };
9256
+ }
9257
+ const index_10dq51k = "";
9258
+ const EditButtonStyle = "esoz3jw";
9259
+ function EditFieldModal(props) {
9260
+ const {
9261
+ title,
9262
+ formRef: form2,
9263
+ renderContent,
9264
+ fullscreen
9265
+ } = props;
9266
+ const {
9267
+ i18n: i18n2
9268
+ } = useTranslation();
9269
+ const popModal = usePopModal();
9270
+ const {
9271
+ submitting,
9272
+ errorMsgs,
9273
+ reset,
9274
+ onSubmit
9275
+ } = useSubmitForm({
9276
+ formRef: form2,
9277
+ onSubmitSuccess: () => {
9278
+ popModal();
9279
+ }
9280
+ });
9281
+ const close = useCallback(() => {
9282
+ popModal();
9283
+ reset();
9284
+ }, [reset]);
9285
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Modal, {
9286
+ className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
9287
+ title: title || i18n2.t("dovetail.edit"),
9288
+ confirmLoading: submitting,
9289
+ onOk: onSubmit,
9290
+ onCancel: close,
9291
+ okText: i18n2.t("dovetail.save"),
9292
+ normal: true,
9293
+ destroyOnClose: true,
9294
+ fullscreen,
9295
+ children: [renderContent(), /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
9296
+ style: {
9297
+ marginTop: 16
9298
+ },
9299
+ errorMsgs,
9300
+ isEdit: true
9301
+ })]
9302
+ });
9303
+ }
9304
+ function EditField(props) {
9305
+ const {
9306
+ modalProps
9307
+ } = props;
9308
+ const {
9309
+ i18n: i18n2
9310
+ } = useTranslation();
9311
+ const {
9312
+ resource
9313
+ } = useResource();
9314
+ const pushModal = usePushModal();
9315
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
9316
+ resource: resource == null ? void 0 : resource.name,
9317
+ action: AccessControlAuth.Edit,
9318
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
9319
+ className: cx_default(EditButtonStyle, Typo.Label.l4_regular_title),
9320
+ type: "link",
9321
+ onClick: () => {
9322
+ pushModal({
9323
+ component: EditFieldModal,
9324
+ props: modalProps
9325
+ });
9326
+ },
9327
+ children: i18n2.t("dovetail.edit")
9328
+ })
9329
+ });
9330
+ }
9331
+ var StorageUnit = /* @__PURE__ */ ((StorageUnit2) => {
9332
+ StorageUnit2["Pi"] = "Pi";
9333
+ StorageUnit2["PiB"] = "PiB";
9334
+ StorageUnit2["Ti"] = "Ti";
9335
+ StorageUnit2["TiB"] = "TiB";
9336
+ StorageUnit2["Gi"] = "Gi";
9337
+ StorageUnit2["GiB"] = "GiB";
9338
+ StorageUnit2["Mi"] = "Mi";
9339
+ StorageUnit2["MiB"] = "MiB";
9340
+ StorageUnit2["Ki"] = "Ki";
9341
+ StorageUnit2["KiB"] = "KiB";
9342
+ return StorageUnit2;
9343
+ })(StorageUnit || {});
9344
+ const UNIT_FACTORS = {
9345
+ Pi: 1024 ** 5,
9346
+ PiB: 1024 ** 5,
9347
+ Ti: 1024 ** 4,
9348
+ TiB: 1024 ** 4,
9349
+ Gi: 1024 ** 3,
9350
+ GiB: 1024 ** 3,
9351
+ Mi: 1024 ** 2,
9352
+ MiB: 1024 ** 2,
9353
+ Ki: 1024,
9354
+ KiB: 1024,
9355
+ B: 1
9356
+ };
9357
+ function transformStorageUnit(value2, toUnit = "Gi") {
9358
+ const num = parseFloat(value2);
9359
+ const unit = Object.values(StorageUnit).find((u) => value2.includes(u)) || "Ki";
9360
+ return num / UNIT_FACTORS[unit] * UNIT_FACTORS[toUnit];
9361
+ }
9362
+ const UNITS = ["", "K", "M", "G", "T", "P"];
9363
+ const FRACTIONAL = ["", "m", "u", "n", "p", "f"];
9364
+ function formatSi(inValue, options) {
9365
+ const {
9366
+ increment = 1e3,
9367
+ suffix = null,
9368
+ firstSuffix = null,
9369
+ startingExponent = 0,
9370
+ minExponent = 0,
9371
+ maxPrecision = 2,
9372
+ atLeastOne = true
9373
+ } = options || {};
9374
+ let val = inValue;
9375
+ let exp = startingExponent;
9376
+ while (val >= increment && exp + 1 < UNITS.length || exp < minExponent) {
9377
+ val = val / increment;
9378
+ exp++;
9379
+ }
9380
+ let out = 0;
9381
+ if (val < 10 && maxPrecision >= 2) {
9382
+ out = Math.round(val * 100) / 100;
9383
+ } else if (val < 100 && maxPrecision >= 1) {
9384
+ out = Math.round(val * 10) / 10;
9385
+ } else {
9386
+ out = Math.round(val);
9387
+ }
9388
+ if (atLeastOne && out === 0) {
9389
+ out = 1;
9390
+ }
9391
+ let outStr = String(out);
9392
+ if (exp === 0 && firstSuffix !== null) {
9393
+ outStr += `${firstSuffix}`;
9394
+ } else {
9395
+ outStr += `${UNITS[exp]}${suffix}` || "";
9396
+ }
9397
+ return outStr;
9398
+ }
9399
+ function parseSi(inValue, increment = null, allowFractional = true) {
9400
+ if (!inValue || typeof inValue !== "string" || !inValue.length) {
9401
+ return NaN;
9402
+ }
9403
+ inValue = inValue.replace(/,/g, "");
9404
+ let [, valStr, unit, incStr] = inValue.match(/^([0-9.-]+)\s*([^0-9.-]?)([^0-9.-]?)/) || [];
9405
+ const val = parseFloat(valStr);
9406
+ if (!unit) {
9407
+ return val;
9408
+ }
9409
+ if (unit.charCodeAt(0) === 181) {
9410
+ unit = "u";
9411
+ }
9412
+ const divide = FRACTIONAL.includes(unit);
9413
+ const multiply = UNITS.includes(unit.toUpperCase());
9414
+ if (increment === null) {
9415
+ if ((multiply || divide) && incStr === "i") {
9416
+ increment = 1024;
9417
+ } else {
9418
+ increment = 1e3;
9419
+ }
9420
+ }
9421
+ if (divide && allowFractional) {
9422
+ const exp = FRACTIONAL.indexOf(unit);
9423
+ return val / Math.pow(increment, exp);
9424
+ }
9425
+ if (multiply) {
9426
+ const exp = UNITS.indexOf(unit.toUpperCase());
9427
+ return val * Math.pow(increment, exp);
9428
+ }
9429
+ return val;
9430
+ }
9431
+ const DistributeStorageForm = React__default.forwardRef(function DistributeStorageForm2(props, ref) {
9432
+ const { defaultValue, pvc: pvc2 } = props;
9433
+ const { resource } = useResource();
9434
+ const { mutateAsync } = useUpdate();
9435
+ const { t: t2 } = useTranslation();
9436
+ const [distributeStorage, setDistributeStorage] = useState(defaultValue);
9437
+ const [validateResult, setValidateResult] = useState({
9438
+ distributeStorage: ""
9439
+ });
9440
+ const validators = useMemo(() => {
9441
+ return {
9442
+ distributeStorage(value2) {
9443
+ if (isNil(value2)) {
9444
+ return t2("dovetail.pvc_storage_required");
9445
+ } else if (value2 < 1) {
9446
+ return t2("dovetail.pvc_storage_min");
9447
+ } else if (value2 < defaultValue) {
9448
+ return t2("dovetail.pvc_storage_reduce_limit");
9449
+ }
9450
+ return "";
9451
+ }
9452
+ };
9453
+ }, [t2, defaultValue]);
9454
+ const submit = useCallback(() => {
9455
+ const isInvalid = !!validators.distributeStorage(distributeStorage);
9456
+ if (isInvalid) {
9457
+ return false;
9458
+ }
9459
+ const v = pvc2.updateDistributeStorage(distributeStorage);
9460
+ const id = pvc2.id;
9461
+ pruneBeforeEdit(v);
9462
+ return mutateAsync({
9463
+ id,
9464
+ resource: (resource == null ? void 0 : resource.name) || "",
9465
+ values: v,
9466
+ successNotification() {
9467
+ return {
9468
+ message: t2("dovetail.edit_distribute_storage_success_toast", {
9469
+ kind: pvc2.kind,
9470
+ name: pvc2.id,
9471
+ interpolation: {
9472
+ escapeValue: false
9473
+ }
9474
+ }),
9475
+ type: "success"
9476
+ };
9477
+ },
9478
+ errorNotification: false
9479
+ });
9480
+ }, [pvc2, distributeStorage, resource == null ? void 0 : resource.name, validators, mutateAsync, t2]);
9481
+ useImperativeHandle(ref, () => ({
9482
+ submit
9483
+ }), [submit]);
9484
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
9485
+ Form.Item,
9486
+ {
9487
+ label: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { width: "134px" }, children: t2("dovetail.distributed") }),
9488
+ colon: false,
9489
+ help: validateResult.distributeStorage,
9490
+ validateStatus: validateResult.distributeStorage ? "error" : "",
9491
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
9492
+ Fields.Integer,
9493
+ {
9494
+ style: { width: "142px" },
9495
+ input: {
9496
+ name: "distributeStorage",
9497
+ value: distributeStorage,
9498
+ onChange: (value2) => {
9499
+ const v = Number(value2);
9500
+ setDistributeStorage(v);
9501
+ setValidateResult({
9502
+ distributeStorage: validators.distributeStorage(v)
9503
+ });
9504
+ },
9505
+ onBlur: () => {
9506
+ },
9507
+ onFocus: () => {
9508
+ }
9509
+ },
9510
+ min: 1,
9511
+ meta: {},
9512
+ suffix: "GiB",
9513
+ controls: true
9514
+ }
9515
+ )
9516
+ }
9517
+ );
9518
+ });
9519
+ function PVCDistributeStorage({ pvc: pvc2, editable }) {
9520
+ var _a, _b;
9521
+ const { t: t2 } = useTranslation();
9522
+ const formRef = useRef(null);
9523
+ const value2 = (_b = (_a = pvc2.spec.resources) == null ? void 0 : _a.requests) == null ? void 0 : _b.storage;
9524
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
9525
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Units.Byte, { rawValue: parseSi(value2), decimals: 1 }),
9526
+ editable && /* @__PURE__ */ jsxRuntimeExports.jsx(
9527
+ EditField,
9528
+ {
9529
+ modalProps: {
9530
+ formRef,
9531
+ title: t2("dovetail.edit_replicas"),
9532
+ renderContent() {
9533
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
9534
+ DistributeStorageForm,
9535
+ {
9536
+ ref: formRef,
9537
+ defaultValue: value2 ? transformStorageUnit(value2, StorageUnit.Gi) : 0,
9538
+ pvc: pvc2
9539
+ }
9540
+ );
9541
+ }
9542
+ }
9543
+ }
9544
+ )
9545
+ ] });
9546
+ }
9122
9547
  class ResourceModel {
9123
9548
  constructor(_rawYaml, _globalStore) {
9124
9549
  __publicField(this, "id");
@@ -9800,28 +10225,27 @@ const PVC_INIT_VALUE = {
9800
10225
  "storageClassName": "example"
9801
10226
  }
9802
10227
  };
9803
- var WorkloadState = /* @__PURE__ */ ((WorkloadState2) => {
9804
- WorkloadState2["Terminated"] = "terminated";
9805
- WorkloadState2["UPDATING"] = "updating";
9806
- WorkloadState2["READY"] = "ready";
9807
- WorkloadState2["COMPLETED"] = "completed";
9808
- WorkloadState2["FAILED"] = "failed";
9809
- WorkloadState2["SUSPENDED"] = "suspended";
9810
- WorkloadState2["RUNNING"] = "running";
9811
- WorkloadState2["SUCCEEDED"] = "succeeded";
9812
- WorkloadState2["UNKNOWN"] = "unknown";
9813
- WorkloadState2["TERMINATING"] = "terminating";
9814
- WorkloadState2["PENDING"] = "pending";
9815
- WorkloadState2["WAITING"] = "waiting";
9816
- WorkloadState2["STOPPED"] = "stopped";
9817
- return WorkloadState2;
9818
- })(WorkloadState || {});
9819
- var AccessControlAuth = /* @__PURE__ */ ((AccessControlAuth2) => {
9820
- AccessControlAuth2["Edit"] = "Edit";
9821
- AccessControlAuth2["Delete"] = "Delete";
9822
- AccessControlAuth2["Create"] = "Create";
9823
- return AccessControlAuth2;
9824
- })(AccessControlAuth || {});
10228
+ var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
10229
+ ResourceState2["TERMINATED"] = "terminated";
10230
+ ResourceState2["UPDATING"] = "updating";
10231
+ ResourceState2["READY"] = "ready";
10232
+ ResourceState2["COMPLETED"] = "completed";
10233
+ ResourceState2["ABNORMAL"] = "abnormal";
10234
+ ResourceState2["FAILED"] = "failed";
10235
+ ResourceState2["SUSPENDED"] = "suspended";
10236
+ ResourceState2["RUNNING"] = "running";
10237
+ ResourceState2["SUCCEEDED"] = "succeeded";
10238
+ ResourceState2["UNKNOWN"] = "unknown";
10239
+ ResourceState2["TERMINATING"] = "terminating";
10240
+ ResourceState2["PENDING"] = "pending";
10241
+ ResourceState2["WAITING"] = "waiting";
10242
+ ResourceState2["STOPPED"] = "stopped";
10243
+ ResourceState2["AVAILABLE"] = "available";
10244
+ ResourceState2["BOUND"] = "bound";
10245
+ ResourceState2["RELEASED"] = "released";
10246
+ ResourceState2["LOST"] = "lost";
10247
+ return ResourceState2;
10248
+ })(ResourceState || {});
9825
10249
  function matchSelector(pod2, selector, namespace2 = "default") {
9826
10250
  var _a, _b, _c;
9827
10251
  let match = true;
@@ -9907,18 +10331,18 @@ class JobModel extends WorkloadBaseModel {
9907
10331
  get stateDisplay() {
9908
10332
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
9909
10333
  if (!((_a = this.spec) == null ? void 0 : _a.completions) && !((_b = this.status) == null ? void 0 : _b.succeeded)) {
9910
- return WorkloadState.RUNNING;
10334
+ return ResourceState.RUNNING;
9911
10335
  }
9912
10336
  if (((_c = this.spec) == null ? void 0 : _c.completions) === ((_d = this.status) == null ? void 0 : _d.succeeded) || ((_f = (_e = this.status) == null ? void 0 : _e.conditions) == null ? void 0 : _f.some((c2) => c2.type === "Complete" && c2.status === "True"))) {
9913
- return WorkloadState.COMPLETED;
10337
+ return ResourceState.COMPLETED;
9914
10338
  }
9915
10339
  if ((_h = (_g = this.status) == null ? void 0 : _g.conditions) == null ? void 0 : _h.some((c2) => c2.type === "Failed" && c2.status === "True")) {
9916
- return WorkloadState.FAILED;
10340
+ return ResourceState.ABNORMAL;
9917
10341
  }
9918
10342
  if ((_j = (_i = this.status) == null ? void 0 : _i.conditions) == null ? void 0 : _j.some((c2) => c2.type === "Suspended" && c2.status === "True")) {
9919
- return WorkloadState.SUSPENDED;
10343
+ return ResourceState.SUSPENDED;
9920
10344
  }
9921
- return WorkloadState.RUNNING;
10345
+ return ResourceState.RUNNING;
9922
10346
  }
9923
10347
  }
9924
10348
  class WorkloadModel extends WorkloadBaseModel {
@@ -9970,75 +10394,6 @@ class WorkloadModel extends WorkloadBaseModel {
9970
10394
  return newOne;
9971
10395
  }
9972
10396
  }
9973
- const UNITS = ["", "K", "M", "G", "T", "P"];
9974
- const FRACTIONAL = ["", "m", "u", "n", "p", "f"];
9975
- function formatSi(inValue, options) {
9976
- const {
9977
- increment = 1e3,
9978
- suffix = null,
9979
- firstSuffix = null,
9980
- startingExponent = 0,
9981
- minExponent = 0,
9982
- maxPrecision = 2,
9983
- atLeastOne = true
9984
- } = options || {};
9985
- let val = inValue;
9986
- let exp = startingExponent;
9987
- while (val >= increment && exp + 1 < UNITS.length || exp < minExponent) {
9988
- val = val / increment;
9989
- exp++;
9990
- }
9991
- let out = 0;
9992
- if (val < 10 && maxPrecision >= 2) {
9993
- out = Math.round(val * 100) / 100;
9994
- } else if (val < 100 && maxPrecision >= 1) {
9995
- out = Math.round(val * 10) / 10;
9996
- } else {
9997
- out = Math.round(val);
9998
- }
9999
- if (atLeastOne && out === 0) {
10000
- out = 1;
10001
- }
10002
- let outStr = String(out);
10003
- if (exp === 0 && firstSuffix !== null) {
10004
- outStr += `${firstSuffix}`;
10005
- } else {
10006
- outStr += `${UNITS[exp]}${suffix}` || "";
10007
- }
10008
- return outStr;
10009
- }
10010
- function parseSi(inValue, increment = null, allowFractional = true) {
10011
- if (!inValue || typeof inValue !== "string" || !inValue.length) {
10012
- return NaN;
10013
- }
10014
- inValue = inValue.replace(/,/g, "");
10015
- let [, valStr, unit, incStr] = inValue.match(/^([0-9.-]+)\s*([^0-9.-]?)([^0-9.-]?)/) || [];
10016
- const val = parseFloat(valStr);
10017
- if (!unit) {
10018
- return val;
10019
- }
10020
- if (unit.charCodeAt(0) === 181) {
10021
- unit = "u";
10022
- }
10023
- const divide = FRACTIONAL.includes(unit);
10024
- const multiply = UNITS.includes(unit.toUpperCase());
10025
- if (increment === null) {
10026
- if ((multiply || divide) && incStr === "i") {
10027
- increment = 1024;
10028
- } else {
10029
- increment = 1e3;
10030
- }
10031
- }
10032
- if (divide && allowFractional) {
10033
- const exp = FRACTIONAL.indexOf(unit);
10034
- return val / Math.pow(increment, exp);
10035
- }
10036
- if (multiply) {
10037
- const exp = UNITS.indexOf(unit.toUpperCase());
10038
- return val * Math.pow(increment, exp);
10039
- }
10040
- return val;
10041
- }
10042
10397
  class PodModel extends WorkloadBaseModel {
10043
10398
  constructor(_rawYaml, _globalStore) {
10044
10399
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
@@ -10116,9 +10471,9 @@ class PodModel extends WorkloadBaseModel {
10116
10471
  get stateDisplay() {
10117
10472
  var _a, _b;
10118
10473
  if (this.metadata.deletionTimestamp) {
10119
- return WorkloadState.TERMINATING;
10474
+ return ResourceState.TERMINATING;
10120
10475
  }
10121
- return ((_b = (_a = this.status) == null ? void 0 : _a.phase) == null ? void 0 : _b.toLowerCase()) || WorkloadState.UNKNOWN;
10476
+ return ((_b = (_a = this.status) == null ? void 0 : _a.phase) == null ? void 0 : _b.toLowerCase()) || ResourceState.UNKNOWN;
10122
10477
  }
10123
10478
  }
10124
10479
  class PodMetricsModel extends ResourceModel {
@@ -10158,9 +10513,9 @@ class CronJobModel extends WorkloadBaseModel {
10158
10513
  get stateDisplay() {
10159
10514
  var _a;
10160
10515
  if ((_a = this.spec) == null ? void 0 : _a.suspend) {
10161
- return WorkloadState.SUSPENDED;
10516
+ return ResourceState.SUSPENDED;
10162
10517
  }
10163
- return WorkloadState.RUNNING;
10518
+ return ResourceState.RUNNING;
10164
10519
  }
10165
10520
  suspend() {
10166
10521
  const newOne = lodashExports.cloneDeep(this._rawYaml);
@@ -10181,7 +10536,12 @@ class EventModel extends ResourceModel {
10181
10536
  constructor(_rawYaml, _globalStore) {
10182
10537
  super(_rawYaml, _globalStore);
10183
10538
  this._rawYaml = _rawYaml;
10184
- this.id = _rawYaml.metadata.uid || _rawYaml.id;
10539
+ Object.defineProperty(this, "id", {
10540
+ get() {
10541
+ return _rawYaml.metadata.uid || _rawYaml.id;
10542
+ },
10543
+ enumerable: true
10544
+ });
10185
10545
  }
10186
10546
  }
10187
10547
  class DeploymentModel extends WorkloadModel {
@@ -10192,11 +10552,11 @@ class DeploymentModel extends WorkloadModel {
10192
10552
  get stateDisplay() {
10193
10553
  var _a, _b, _c;
10194
10554
  if (((_a = this.spec) == null ? void 0 : _a.replicas) === 0) {
10195
- return WorkloadState.STOPPED;
10555
+ return ResourceState.STOPPED;
10196
10556
  } else if (((_b = this.spec) == null ? void 0 : _b.replicas) !== ((_c = this.status) == null ? void 0 : _c.readyReplicas)) {
10197
- return WorkloadState.UPDATING;
10557
+ return ResourceState.UPDATING;
10198
10558
  }
10199
- return WorkloadState.READY;
10559
+ return ResourceState.READY;
10200
10560
  }
10201
10561
  }
10202
10562
  class DaemonSetModel extends WorkloadModel {
@@ -10207,9 +10567,9 @@ class DaemonSetModel extends WorkloadModel {
10207
10567
  get stateDisplay() {
10208
10568
  var _a, _b;
10209
10569
  if (((_a = this.status) == null ? void 0 : _a.desiredNumberScheduled) !== ((_b = this.status) == null ? void 0 : _b.numberReady)) {
10210
- return WorkloadState.UPDATING;
10570
+ return ResourceState.UPDATING;
10211
10571
  }
10212
- return WorkloadState.READY;
10572
+ return ResourceState.READY;
10213
10573
  }
10214
10574
  get replicas() {
10215
10575
  return this.status && "desiredNumberScheduled" in this.status ? this.status.desiredNumberScheduled : 0;
@@ -10226,11 +10586,11 @@ class StatefulSetModel extends WorkloadModel {
10226
10586
  get stateDisplay() {
10227
10587
  var _a, _b, _c;
10228
10588
  if (((_a = this.spec) == null ? void 0 : _a.replicas) === 0) {
10229
- return WorkloadState.STOPPED;
10589
+ return ResourceState.STOPPED;
10230
10590
  } else if (((_b = this.spec) == null ? void 0 : _b.replicas) !== ((_c = this.status) == null ? void 0 : _c.readyReplicas)) {
10231
- return WorkloadState.UPDATING;
10591
+ return ResourceState.UPDATING;
10232
10592
  }
10233
- return WorkloadState.READY;
10593
+ return ResourceState.READY;
10234
10594
  }
10235
10595
  }
10236
10596
  var ServiceTypeEnum = /* @__PURE__ */ ((ServiceTypeEnum2) => {
@@ -10279,7 +10639,7 @@ var NodeRole = /* @__PURE__ */ ((NodeRole2) => {
10279
10639
  NodeRole2["Worker"] = "Worker";
10280
10640
  return NodeRole2;
10281
10641
  })(NodeRole || {});
10282
- class NodeModel extends WorkloadBaseModel {
10642
+ class NodeModel extends ResourceModel {
10283
10643
  constructor(_rawYaml, _globalStore) {
10284
10644
  super(_rawYaml, _globalStore);
10285
10645
  this._rawYaml = _rawYaml;
@@ -10337,6 +10697,22 @@ class PersistentVolumeModel extends ResourceModel {
10337
10697
  get phase() {
10338
10698
  return this._rawYaml.status.phase;
10339
10699
  }
10700
+ get stateDisplay() {
10701
+ switch (this.phase) {
10702
+ case "Pending":
10703
+ return ResourceState.PENDING;
10704
+ case "Bound":
10705
+ return ResourceState.BOUND;
10706
+ case "Failed":
10707
+ return ResourceState.FAILED;
10708
+ case "Available":
10709
+ return ResourceState.AVAILABLE;
10710
+ case "Released":
10711
+ return ResourceState.RELEASED;
10712
+ default:
10713
+ return ResourceState.UNKNOWN;
10714
+ }
10715
+ }
10340
10716
  get csi() {
10341
10717
  var _a;
10342
10718
  return (_a = this._rawYaml.spec.csi) == null ? void 0 : _a.driver;
@@ -10345,6 +10721,10 @@ class PersistentVolumeModel extends ResourceModel {
10345
10721
  var _a;
10346
10722
  return (_a = this._rawYaml.spec.claimRef) == null ? void 0 : _a.name;
10347
10723
  }
10724
+ get pvcNamespace() {
10725
+ var _a;
10726
+ return (_a = this._rawYaml.spec.claimRef) == null ? void 0 : _a.namespace;
10727
+ }
10348
10728
  }
10349
10729
  class PersistentVolumeClaimModel extends ResourceModel {
10350
10730
  constructor(_rawYaml, _globalStore) {
@@ -10357,6 +10737,18 @@ class PersistentVolumeClaimModel extends ResourceModel {
10357
10737
  get pv() {
10358
10738
  return this._rawYaml.spec.volumeName;
10359
10739
  }
10740
+ get stateDisplay() {
10741
+ switch (this.phase) {
10742
+ case "Pending":
10743
+ return ResourceState.PENDING;
10744
+ case "Bound":
10745
+ return ResourceState.BOUND;
10746
+ case "Lost":
10747
+ return ResourceState.LOST;
10748
+ case "Failed":
10749
+ return ResourceState.FAILED;
10750
+ }
10751
+ }
10360
10752
  updateDistributeStorage(distributeStorage) {
10361
10753
  const yaml2 = cloneDeep(this._globalStore.restoreItem(this));
10362
10754
  return set$1(yaml2, "spec.resources.requests.storage", `${distributeStorage}Gi`);
@@ -10468,38 +10860,8 @@ const Tags = (props) => {
10468
10860
  children: tags
10469
10861
  });
10470
10862
  };
10471
- const StateTag_1o2atxo = "";
10472
- const StateTagStyle = "s8qkbck";
10473
- const StateTag = ({
10474
- state: state2 = WorkloadState.UPDATING,
10475
- hideBackground,
10476
- className
10477
- }) => {
10478
- const {
10479
- t: t2
10480
- } = useTranslation();
10481
- const statusMap = {
10482
- updating: "loading",
10483
- ready: "green",
10484
- completed: "gray",
10485
- failed: "red",
10486
- suspended: "warning",
10487
- running: "green",
10488
- succeeded: "blue",
10489
- unknown: "gray",
10490
- terminating: "loading",
10491
- pending: "warning",
10492
- waiting: "warning",
10493
- terminated: "red",
10494
- stopped: "gray"
10495
- };
10496
- return /* @__PURE__ */ jsxRuntimeExports.jsx(StatusCapsule, {
10497
- className: cx_default(className, StateTagStyle, hideBackground && "no-background"),
10498
- color: statusMap[state2] !== "loading" ? statusMap[state2] : void 0,
10499
- loading: statusMap[state2] === "loading",
10500
- children: t2(`dovetail.${state2 || "updating"}`)
10501
- });
10502
- };
10863
+ const tag_how7no = "";
10864
+ const StateTagStyle = "s82411";
10503
10865
  function addId(arr, idKey) {
10504
10866
  return arr.map((e2) => {
10505
10867
  return {
@@ -10617,7 +10979,7 @@ const Time = (props) => {
10617
10979
  const ConditionsTable = ({ conditions = [] }) => {
10618
10980
  const { t: t2 } = useTranslation();
10619
10981
  const component = useContext(ComponentContext);
10620
- const Table$12 = component.Table || Table;
10982
+ const Table2 = component.Table || Table$1;
10621
10983
  const conditionsWithId = addId(conditions, "type");
10622
10984
  const columns = [
10623
10985
  {
@@ -10693,7 +11055,7 @@ const ConditionsTable = ({ conditions = [] }) => {
10693
11055
  );
10694
11056
  }
10695
11057
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
10696
- Table$12,
11058
+ Table2,
10697
11059
  {
10698
11060
  tableKey: "condition",
10699
11061
  loading: false,
@@ -10810,184 +11172,6 @@ function useOpenForm(options) {
10810
11172
  }
10811
11173
  };
10812
11174
  }
10813
- function FormErrorAlert(props) {
10814
- const { title, errorMsgs, style, className, isEdit } = props;
10815
- const { i18n: i18n2 } = useTranslation();
10816
- return errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10817
- Alert,
10818
- {
10819
- message: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
10820
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title || i18n2.t(isEdit ? "dovetail.save_failed_tip" : "dovetail.create_failed_tip") }),
10821
- errorMsgs.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
10822
- index2 + 1 + ". ",
10823
- " ",
10824
- errorMsg
10825
- ] }, errorMsg)) }) : first(errorMsgs)
10826
- ] }),
10827
- type: "error",
10828
- style,
10829
- className
10830
- }
10831
- ) : null;
10832
- }
10833
- function getCommonErrors(responseBody, i18n2) {
10834
- var _a;
10835
- if (!((responseBody == null ? void 0 : responseBody.message) || (responseBody == null ? void 0 : responseBody.code) || (responseBody == null ? void 0 : responseBody.reason) || (responseBody == null ? void 0 : responseBody.details) || (responseBody == null ? void 0 : responseBody.graphQLErrors))) {
10836
- return [];
10837
- }
10838
- const causes = ((_a = responseBody.details) == null ? void 0 : _a.causes) || responseBody.graphQLErrors || [];
10839
- if (causes.length) {
10840
- return causes.map((cause) => {
10841
- let params = {};
10842
- let message2 = cause.message;
10843
- try {
10844
- const info = JSON.parse(cause.message);
10845
- params = info.params;
10846
- message2 = info.message;
10847
- } catch {
10848
- return i18n2.t(
10849
- [
10850
- `error.${cause.reason}`,
10851
- `error.${cause.code}`,
10852
- `${cause.field ? `${cause.field}: ` : ""}${message2}`
10853
- ],
10854
- {
10855
- ...params,
10856
- fallbackLng: ""
10857
- }
10858
- );
10859
- }
10860
- return i18n2.t(
10861
- [
10862
- `error.${cause.reason}`,
10863
- `error.${cause.code}`,
10864
- `${cause.field ? `${cause.field}: ` : ""}${message2}`
10865
- ],
10866
- {
10867
- ...params,
10868
- fallbackLng: ""
10869
- }
10870
- );
10871
- });
10872
- }
10873
- return [
10874
- i18n2.t(
10875
- [`error.${responseBody.code}`, `error.${responseBody.reason}`, responseBody.message || ""],
10876
- { fallbackLng: "" }
10877
- )
10878
- ];
10879
- }
10880
- function useSubmitForm(options) {
10881
- const { formRef, onSubmitSuccess } = options;
10882
- const { i18n: i18n2 } = useTranslation();
10883
- const [submitting, setSubmitting] = useState(false);
10884
- const [errorMsgs, setErrorMsgs] = useState([]);
10885
- const reset = useCallback(() => {
10886
- setSubmitting(false);
10887
- setErrorMsgs([]);
10888
- }, []);
10889
- const onSubmit = useCallback(async () => {
10890
- var _a;
10891
- try {
10892
- setSubmitting(true);
10893
- await ((_a = formRef.current) == null ? void 0 : _a.submit());
10894
- onSubmitSuccess == null ? void 0 : onSubmitSuccess();
10895
- reset();
10896
- } catch (error) {
10897
- if (error instanceof Object) {
10898
- if ("response" in error && error.response instanceof Response) {
10899
- const response = error.response;
10900
- const body = await response.json();
10901
- setErrorMsgs(getCommonErrors(body, i18n2));
10902
- } else if ("message" in error && typeof error.message === "string") {
10903
- setErrorMsgs([error.message]);
10904
- }
10905
- }
10906
- } finally {
10907
- setSubmitting(false);
10908
- }
10909
- }, [formRef, i18n2, reset, onSubmitSuccess]);
10910
- return {
10911
- submitting,
10912
- errorMsgs,
10913
- reset,
10914
- onSubmit
10915
- };
10916
- }
10917
- const index_130sdg8 = "";
10918
- const EditButtonStyle = "esoz3jw";
10919
- function EditFieldModal(props) {
10920
- const {
10921
- title,
10922
- formRef: form2,
10923
- renderContent,
10924
- fullscreen
10925
- } = props;
10926
- const {
10927
- i18n: i18n2
10928
- } = useTranslation();
10929
- const popModal = usePopModal();
10930
- const {
10931
- submitting,
10932
- errorMsgs,
10933
- reset,
10934
- onSubmit
10935
- } = useSubmitForm({
10936
- formRef: form2,
10937
- onSubmitSuccess: () => {
10938
- popModal();
10939
- }
10940
- });
10941
- const close = useCallback(() => {
10942
- popModal();
10943
- reset();
10944
- }, [reset]);
10945
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Modal, {
10946
- className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
10947
- title: title || i18n2.t("dovetail.edit"),
10948
- confirmLoading: submitting,
10949
- onOk: onSubmit,
10950
- onCancel: close,
10951
- okText: i18n2.t("dovetail.save"),
10952
- normal: true,
10953
- destroyOnClose: true,
10954
- fullscreen,
10955
- children: [renderContent(), /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
10956
- style: {
10957
- marginTop: 16
10958
- },
10959
- errorMsgs,
10960
- isEdit: true
10961
- })]
10962
- });
10963
- }
10964
- function EditField(props) {
10965
- const {
10966
- modalProps
10967
- } = props;
10968
- const {
10969
- i18n: i18n2
10970
- } = useTranslation();
10971
- const {
10972
- resource
10973
- } = useResource();
10974
- const pushModal = usePushModal();
10975
- return /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
10976
- resource: resource == null ? void 0 : resource.name,
10977
- action: AccessControlAuth.Edit,
10978
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
10979
- className: EditButtonStyle,
10980
- type: "link",
10981
- onClick: () => {
10982
- pushModal({
10983
- component: EditFieldModal,
10984
- props: modalProps
10985
- });
10986
- },
10987
- children: i18n2.t("dovetail.edit")
10988
- })
10989
- });
10990
- }
10991
11175
  const EditLabelForm = React__default.forwardRef(
10992
11176
  function EditLabelForm2(props, ref) {
10993
11177
  var _a;
@@ -11048,12 +11232,12 @@ const EditLabelForm = React__default.forwardRef(
11048
11232
  columns: [
11049
11233
  {
11050
11234
  key: "key",
11051
- title: "Key",
11235
+ title: t2("dovetail.key"),
11052
11236
  type: "input"
11053
11237
  },
11054
11238
  {
11055
11239
  key: "value",
11056
- title: "Value",
11240
+ title: t2("dovetail.value"),
11057
11241
  type: "input"
11058
11242
  }
11059
11243
  ],
@@ -11120,7 +11304,7 @@ const EditAnnotationForm = React__default.forwardRef(
11120
11304
  value2.forEach(({ key: key2, value: value22 }) => {
11121
11305
  newAnnotations[key2] = value22;
11122
11306
  });
11123
- const newYaml = resourceModel.updateLabel(newAnnotations);
11307
+ const newYaml = resourceModel.updateAnnotation(newAnnotations);
11124
11308
  pruneBeforeEdit(newYaml);
11125
11309
  return mutateAsync({
11126
11310
  id: resourceModel.id,
@@ -11161,12 +11345,12 @@ const EditAnnotationForm = React__default.forwardRef(
11161
11345
  columns: [
11162
11346
  {
11163
11347
  key: "key",
11164
- title: "Key",
11348
+ title: t2("dovetail.key"),
11165
11349
  type: "input"
11166
11350
  },
11167
11351
  {
11168
11352
  key: "value",
11169
- title: "Value",
11353
+ title: t2("dovetail.value"),
11170
11354
  type: "input"
11171
11355
  }
11172
11356
  ],
@@ -11215,6 +11399,7 @@ function EditAnnotationDropdownMenuItem(props) {
11215
11399
  );
11216
11400
  }
11217
11401
  function K8sDropdown(props) {
11402
+ var _a;
11218
11403
  const { record, size = "normal" } = props;
11219
11404
  const { globalStore } = useGlobalStore();
11220
11405
  const useResourceResult = useResource();
@@ -11234,6 +11419,8 @@ function K8sDropdown(props) {
11234
11419
  resource: resource == null ? void 0 : resource.name,
11235
11420
  action: AccessControlAuth.Delete
11236
11421
  });
11422
+ const configs = useContext(ConfigsContext);
11423
+ const config = configs[(resource == null ? void 0 : resource.name) || ""];
11237
11424
  const formRef = useRef(null);
11238
11425
  const editLabelMenuItem = (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(EditLabelDropdownMenuItem, { formRef, resourceModel: record }) : null;
11239
11426
  const editAnnotationMenuItem = (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(EditAnnotationDropdownMenuItem, { formRef, resourceModel: record }) : null;
@@ -11242,15 +11429,15 @@ function K8sDropdown(props) {
11242
11429
  Dropdown,
11243
11430
  {
11244
11431
  overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu$1, { children: [
11245
- isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1.Item, { onClick: openForm, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: EditPen16PrimaryIcon, children: t2("dovetail.edit_yaml") }) }),
11432
+ isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1.Item, { onClick: openForm, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: EditPen16PrimaryIcon, children: ((_a = config.formConfig) == null ? void 0 : _a.fields) ? t2("dovetail.edit") : t2("dovetail.edit_yaml") }) }),
11246
11433
  /* @__PURE__ */ jsxRuntimeExports.jsx(
11247
11434
  Menu$1.Item,
11248
11435
  {
11249
11436
  onClick: () => {
11250
- var _a;
11437
+ var _a2;
11251
11438
  if (record.id) {
11252
11439
  download2({
11253
- name: ((_a = record.metadata) == null ? void 0 : _a.name) || record.kind || "",
11440
+ name: ((_a2 = record.metadata) == null ? void 0 : _a2.name) || record.kind || "",
11254
11441
  item: omit$1((globalStore == null ? void 0 : globalStore.restoreItem(record)) || record, "id")
11255
11442
  });
11256
11443
  }
@@ -11319,22 +11506,23 @@ function addDefaultRenderToColumns(columns) {
11319
11506
  }));
11320
11507
  }
11321
11508
  const useEagleTable = (params) => {
11322
- var _a, _b;
11323
- const { columns, tableProps, formatter, Dropdown: Dropdown2 = K8sDropdown, resource: resourceFromParams } = params;
11509
+ var _a, _b, _c;
11510
+ const { columns, tableProps, formatter, Dropdown: Dropdown2 = K8sDropdown } = params;
11324
11511
  const [selectedKeys, setSelectedKeys] = useState([]);
11325
11512
  const [currentPage, setCurrentPage] = useState((tableProps == null ? void 0 : tableProps.currentPage) || 1);
11326
11513
  const { resource } = useResource();
11327
11514
  const currentSize = (tableProps == null ? void 0 : tableProps.defaultSize) || 10;
11328
11515
  const useTableParams = useMemo(() => {
11516
+ var _a2;
11329
11517
  const mergedParams = merge(params.useTableParams, {
11330
11518
  pagination: {
11331
11519
  pageSize: currentSize,
11332
11520
  mode: "server"
11333
11521
  },
11334
- resource: resourceFromParams || (resource == null ? void 0 : resource.name)
11522
+ resource: ((_a2 = params.useTableParams) == null ? void 0 : _a2.resource) || (resource == null ? void 0 : resource.name)
11335
11523
  });
11336
11524
  return mergedParams;
11337
- }, [params.useTableParams, currentSize, resourceFromParams, resource]);
11525
+ }, [params.useTableParams, currentSize, resource]);
11338
11526
  const finalColumns = useMemo(
11339
11527
  () => addDefaultRenderToColumns(columns),
11340
11528
  [columns]
@@ -11364,7 +11552,7 @@ const useEagleTable = (params) => {
11364
11552
  const total = ((_b = table.tableQueryResult.data) == null ? void 0 : _b.total) || 0;
11365
11553
  const finalDataSource = formatter ? data2 == null ? void 0 : data2.map(formatter) : data2;
11366
11554
  const finalProps = {
11367
- tableKey: resourceFromParams || (resource == null ? void 0 : resource.name) || "table",
11555
+ tableKey: ((_c = params.useTableParams) == null ? void 0 : _c.resource) || (resource == null ? void 0 : resource.name) || "table",
11368
11556
  loading: table.tableQueryResult.isLoading,
11369
11557
  data: finalDataSource || [],
11370
11558
  columns: finalColumns,
@@ -11389,18 +11577,19 @@ const useEagleTable = (params) => {
11389
11577
  }, []);
11390
11578
  return { tableProps: finalProps, selectedKeys, ...table };
11391
11579
  };
11392
- function CreateButton() {
11580
+ function CreateButton(props) {
11393
11581
  var _a;
11394
11582
  const { t: t2 } = useTranslation();
11395
11583
  const openForm = useOpenForm();
11396
11584
  const { resource } = useResource();
11585
+ const label2 = props.label || ((_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind);
11397
11586
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
11398
11587
  Button,
11399
11588
  {
11400
11589
  prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(PlusAddCreateNew16BoldOntintIcon, {}),
11401
11590
  type: "primary",
11402
11591
  onClick: openForm,
11403
- children: t2("dovetail.create_resource", { resource: (_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind })
11592
+ children: t2("dovetail.create_resource", { resource: /^[a-zA-Z]/.test(label2) ? ` ${label2}` : label2 })
11404
11593
  }
11405
11594
  );
11406
11595
  }
@@ -11447,12 +11636,13 @@ const DeleteManyButton = (props) => {
11447
11636
  visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ...modalProps }) : null
11448
11637
  ] });
11449
11638
  };
11450
- const TableToolBar_nvjftd = "";
11451
- const ToolbarWrapperStyle = "t1v3ienx";
11452
- const ToolbarStyle$3 = "tgejfwe";
11453
- const TitleStyle$2 = "tq6dc79";
11454
- const DescriptionStyle = "d1wqyhgc";
11639
+ const index_1wo1wv1 = "";
11640
+ const ToolbarWrapperStyle = "t1908hhn";
11641
+ const ToolbarStyle$3 = "t1ym1gqo";
11642
+ const TitleStyle$2 = "t38ugwl";
11643
+ const DescriptionStyle = "d13nfex0";
11455
11644
  const TableToolBar = ({
11645
+ title,
11456
11646
  description,
11457
11647
  selectedKeys,
11458
11648
  hideCreate
@@ -11467,14 +11657,16 @@ const TableToolBar = ({
11467
11657
  className: ToolbarStyle$3,
11468
11658
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
11469
11659
  className: cx_default(Typo.Display.d2_regular_title, TitleStyle$2),
11470
- children: (_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind
11660
+ children: title || ((_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind)
11471
11661
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
11472
11662
  children: [selectedKeys.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteManyButton, {
11473
11663
  ids: selectedKeys
11474
11664
  }) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
11475
11665
  resource: resource == null ? void 0 : resource.name,
11476
11666
  action: AccessControlAuth.Create,
11477
- children: !hideCreate ? /* @__PURE__ */ jsxRuntimeExports.jsx(CreateButton, {}) : null
11667
+ children: !hideCreate ? /* @__PURE__ */ jsxRuntimeExports.jsx(CreateButton, {
11668
+ label: title
11669
+ }) : null
11478
11670
  })]
11479
11671
  })]
11480
11672
  }), description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
@@ -11505,7 +11697,7 @@ const CronjobJobsTable = ({
11505
11697
  } = useTranslation();
11506
11698
  const [selectedKeys] = useState([]);
11507
11699
  const component = useContext(ComponentContext);
11508
- const Table$12 = component.Table || Table;
11700
+ const Table2 = component.Table || Table$1;
11509
11701
  const columns = useMemo(() => [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), {
11510
11702
  ...WorkloadImageColumnRenderer(i18n2),
11511
11703
  width: 238
@@ -11546,7 +11738,7 @@ const CronjobJobsTable = ({
11546
11738
  children: [hideToolBar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
11547
11739
  selectedKeys,
11548
11740
  hideCreate: true
11549
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(Table$12, {
11741
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(Table2, {
11550
11742
  ...tableProps,
11551
11743
  tableKey: "cronjobs",
11552
11744
  showMenuColumn: false
@@ -11620,7 +11812,7 @@ const EventsTable = ({ uid }) => {
11620
11812
  }), [columns, uid]);
11621
11813
  const { tableProps } = useEagleTable(params);
11622
11814
  const component = useContext(ComponentContext);
11623
- const Table$12 = component.Table || Table;
11815
+ const Table2 = component.Table || Table$1;
11624
11816
  if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
11625
11817
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
11626
11818
  WidgetErrorContent,
@@ -11630,7 +11822,7 @@ const EventsTable = ({ uid }) => {
11630
11822
  );
11631
11823
  }
11632
11824
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
11633
- Table$12,
11825
+ Table2,
11634
11826
  {
11635
11827
  ...tableProps,
11636
11828
  tableKey: "events",
@@ -11673,9 +11865,9 @@ const index_x36tts = "";
11673
11865
  const LinkStyle = "l1vnw9x0";
11674
11866
  const ResourceLink = (props) => {
11675
11867
  const {
11676
- resourceName,
11868
+ resourceKind: resourceName,
11677
11869
  namespace: namespace2,
11678
- resourceId
11870
+ name: resourceId
11679
11871
  } = props;
11680
11872
  const navigation = useNavigation();
11681
11873
  const go = useGo();
@@ -11702,7 +11894,7 @@ const IngressRulesTable = ({ ingress }) => {
11702
11894
  return addId(ingress.flattenedRules || [], "fullPath");
11703
11895
  }, [ingress.flattenedRules]);
11704
11896
  const component = useContext(ComponentContext);
11705
- const Table$12 = component.Table || Table;
11897
+ const Table2 = component.Table || Table$1;
11706
11898
  const currentSize = 10;
11707
11899
  const columns = [
11708
11900
  {
@@ -11735,9 +11927,9 @@ const IngressRulesTable = ({ ingress }) => {
11735
11927
  return record.serviceName ? /* @__PURE__ */ jsxRuntimeExports.jsx(
11736
11928
  ResourceLink,
11737
11929
  {
11738
- resourceName: "services",
11930
+ resourceKind: "services",
11739
11931
  namespace: ingress.metadata.namespace || "default",
11740
- resourceId: serviceName
11932
+ name: serviceName
11741
11933
  }
11742
11934
  ) : record.resourceName;
11743
11935
  }
@@ -11762,9 +11954,9 @@ const IngressRulesTable = ({ ingress }) => {
11762
11954
  return secretName ? /* @__PURE__ */ jsxRuntimeExports.jsx(
11763
11955
  ResourceLink,
11764
11956
  {
11765
- resourceName: "secrets",
11957
+ resourceKind: "secrets",
11766
11958
  namespace: ingress.metadata.namespace || "default",
11767
- resourceId: secretName
11959
+ name: secretName
11768
11960
  }
11769
11961
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" });
11770
11962
  },
@@ -11791,7 +11983,7 @@ const IngressRulesTable = ({ ingress }) => {
11791
11983
  );
11792
11984
  }
11793
11985
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
11794
- Table$12,
11986
+ Table2,
11795
11987
  {
11796
11988
  tableKey: "ingressRules",
11797
11989
  loading: false,
@@ -11808,7 +12000,7 @@ const IngressRulesTable = ({ ingress }) => {
11808
12000
  }
11809
12001
  );
11810
12002
  };
11811
- const KeyValue_18l1y97 = "";
12003
+ const KeyValue_1cqk7i8 = "";
11812
12004
  const ContentBlockStyle = "c8jy7dc";
11813
12005
  const KeyStyle = "k2sddxl";
11814
12006
  const ValueStyle$2 = "v16vicsr";
@@ -11888,6 +12080,40 @@ function Tabs(props) {
11888
12080
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
11889
12081
  }) });
11890
12082
  }
12083
+ const StateTag = (props) => {
12084
+ const { state: state2 = ResourceState.UPDATING, hideBackground, className, resourceKind } = props;
12085
+ const { t: t2 } = useTranslation();
12086
+ const defaultStateMap = {
12087
+ [ResourceState.UPDATING]: "loading",
12088
+ [ResourceState.READY]: "green",
12089
+ [ResourceState.COMPLETED]: "gray",
12090
+ [ResourceState.FAILED]: "red",
12091
+ [ResourceState.SUSPENDED]: "warning",
12092
+ [ResourceState.RUNNING]: "green",
12093
+ [ResourceState.SUCCEEDED]: "blue",
12094
+ [ResourceState.UNKNOWN]: "gray",
12095
+ [ResourceState.TERMINATING]: "loading",
12096
+ [ResourceState.PENDING]: "warning",
12097
+ [ResourceState.WAITING]: "warning",
12098
+ [ResourceState.TERMINATED]: "red",
12099
+ [ResourceState.STOPPED]: "gray",
12100
+ [ResourceState.AVAILABLE]: "blue",
12101
+ [ResourceState.BOUND]: "green",
12102
+ [ResourceState.RELEASED]: "gray",
12103
+ [ResourceState.LOST]: "red"
12104
+ };
12105
+ const resourceStateMap = {};
12106
+ const finalStateMap = resourceStateMap[resourceKind || ""] || defaultStateMap;
12107
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12108
+ StatusCapsule,
12109
+ {
12110
+ className: cx_default(className, StateTagStyle, hideBackground && "no-background"),
12111
+ color: finalStateMap[state2] !== "loading" ? finalStateMap[state2] : void 0,
12112
+ loading: finalStateMap[state2] === "loading",
12113
+ children: t2(`dovetail.${state2 || "updating"}_state`)
12114
+ }
12115
+ );
12116
+ };
11891
12117
  const ShowContent_11g4jr2 = "";
11892
12118
  const ShowContentWrapperStyle = "s9agep2";
11893
12119
  const BackButton = "bo89gfi";
@@ -11920,7 +12146,7 @@ function ShowGroupComponent(props) {
11920
12146
  });
11921
12147
  }
11922
12148
  const ShowContent = (props) => {
11923
- var _a, _b, _c, _d;
12149
+ var _a, _b, _c, _d, _e, _f;
11924
12150
  const {
11925
12151
  showConfig,
11926
12152
  formatter,
@@ -11949,6 +12175,8 @@ const ShowContent = (props) => {
11949
12175
  id
11950
12176
  });
11951
12177
  const Component = useContext(ComponentContext);
12178
+ const configs = useContext(ConfigsContext);
12179
+ const config = configs[(resource == null ? void 0 : resource.name) || ""];
11952
12180
  const Tabs$12 = Component.Tabs || Tabs;
11953
12181
  if (!(data2 == null ? void 0 : data2.data)) {
11954
12182
  return null;
@@ -12020,7 +12248,7 @@ const ShowContent = (props) => {
12020
12248
  },
12021
12249
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
12022
12250
  className: "button-text",
12023
- children: (_b = resource == null ? void 0 : resource.meta) == null ? void 0 : _b.kind
12251
+ children: (config == null ? void 0 : config.displayName) || ((_b = resource == null ? void 0 : resource.meta) == null ? void 0 : _b.kind)
12024
12252
  })
12025
12253
  })
12026
12254
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
@@ -12033,10 +12261,11 @@ const ShowContent = (props) => {
12033
12261
  className: cx_default(Typo.Display.d2_regular_title, NameStyle),
12034
12262
  children: (_c = record == null ? void 0 : record.metadata) == null ? void 0 : _c.name
12035
12263
  }), stateDisplay ? /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
12036
- state: stateDisplay
12264
+ state: stateDisplay,
12265
+ resourceKind: (_d = resource == null ? void 0 : resource.meta) == null ? void 0 : _d.kind
12037
12266
  }) : void 0]
12038
12267
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
12039
- children: [(_d = showConfig.renderExtraButton) == null ? void 0 : _d.call(showConfig, record), !showConfig.hideEditYamlButton ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
12268
+ children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !showConfig.hideEditYamlButton ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
12040
12269
  resource: resource == null ? void 0 : resource.name,
12041
12270
  action: AccessControlAuth.Edit,
12042
12271
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
@@ -12044,8 +12273,7 @@ const ShowContent = (props) => {
12044
12273
  marginRight: 8
12045
12274
  },
12046
12275
  onClick: openForm,
12047
- prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditPen16GradientBlueIcon, {}),
12048
- children: t2("dovetail.edit_yaml")
12276
+ children: ((_f = config.formConfig) == null ? void 0 : _f.fields) ? t2("dovetail.edit") : t2("dovetail.edit_yaml")
12049
12277
  })
12050
12278
  }) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown2, {
12051
12279
  record,
@@ -12133,18 +12361,84 @@ function KeyValueSecret(props) {
12133
12361
  })
12134
12362
  });
12135
12363
  }
12136
- function PVPhaseDisplay(props) {
12137
- const { value: value2 } = props;
12138
- const i18n2 = useTranslation();
12139
- const map = {
12140
- Available: i18n2.t("dovetail.pv_phase_available"),
12141
- Bound: i18n2.t("dovetail.pv_phase_bound"),
12142
- Failed: i18n2.t("dovetail.pv_phase_released"),
12143
- Pending: i18n2.t("dovetail.pv_phase_failed"),
12144
- Released: i18n2.t("dovetail.pv_phase_pending")
12145
- };
12146
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: map[value2] || value2 });
12147
- }
12364
+ const NodeTaintsTable = ({ taints = [] }) => {
12365
+ const { t: t2 } = useTranslation();
12366
+ const component = useContext(ComponentContext);
12367
+ const Table2 = component.Table || Table$1;
12368
+ const taintsWithId = addId(taints, "key");
12369
+ const columns = [
12370
+ {
12371
+ key: "key",
12372
+ display: true,
12373
+ dataIndex: "key",
12374
+ title: t2("dovetail.key"),
12375
+ width: 120,
12376
+ sortable: true
12377
+ },
12378
+ {
12379
+ key: "value",
12380
+ display: true,
12381
+ dataIndex: "value",
12382
+ title: t2("dovetail.value"),
12383
+ width: 120,
12384
+ sortable: true
12385
+ },
12386
+ {
12387
+ key: "effect",
12388
+ display: true,
12389
+ dataIndex: "effect",
12390
+ title: t2("dovetail.effect"),
12391
+ width: 120,
12392
+ sortable: true,
12393
+ render: (value2) => {
12394
+ return t2(`dovetail.node_taint_${value2}`);
12395
+ }
12396
+ }
12397
+ ];
12398
+ const {
12399
+ data: finalData,
12400
+ currentPage,
12401
+ onPageChange,
12402
+ onSorterChange
12403
+ } = useTableData({
12404
+ data: taintsWithId,
12405
+ columns,
12406
+ defaultSorters: [
12407
+ {
12408
+ field: "lastUpdateTime",
12409
+ order: "desc"
12410
+ }
12411
+ ]
12412
+ });
12413
+ const currentSize = 10;
12414
+ if (taintsWithId.length === 0) {
12415
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12416
+ WidgetErrorContent,
12417
+ {
12418
+ errorText: t2("dovetail.no_resource", { kind: t2("dovetail.taint") }),
12419
+ style: { padding: "15px 0" },
12420
+ type: ErrorContentType.Card
12421
+ }
12422
+ );
12423
+ }
12424
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12425
+ Table2,
12426
+ {
12427
+ tableKey: "condition",
12428
+ loading: false,
12429
+ data: finalData,
12430
+ total: taintsWithId.length,
12431
+ columns: addDefaultRenderToColumns(columns),
12432
+ rowKey: "key",
12433
+ empty: t2("dovetail.empty"),
12434
+ defaultSize: currentSize,
12435
+ currentPage,
12436
+ onPageChange,
12437
+ onSorterChange,
12438
+ showMenuColumn: false
12439
+ }
12440
+ );
12441
+ };
12148
12442
  function PVVolumeModeDisplay(props) {
12149
12443
  const { value: value2 } = props;
12150
12444
  const i18n2 = useTranslation();
@@ -12154,18 +12448,42 @@ function PVVolumeModeDisplay(props) {
12154
12448
  };
12155
12449
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: map[value2] || value2 });
12156
12450
  }
12157
- function ResourceTable(props) {
12451
+ const GlobalStoreContext = createContext({});
12452
+ function Table(props) {
12158
12453
  var _a;
12454
+ const { tableProps, displayName, errorContentProps } = props;
12455
+ const { Table: TableComponent } = useContext(ComponentContext);
12456
+ const Table2 = TableComponent || Table$1;
12457
+ const { i18n: i18n2 } = useTranslation();
12458
+ const resourceType = /^[a-zA-Z]/.test(displayName) ? ` ${displayName}` : displayName;
12459
+ if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
12460
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12461
+ WidgetErrorContent,
12462
+ {
12463
+ errorText: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: resourceType }),
12464
+ ...errorContentProps
12465
+ }
12466
+ );
12467
+ }
12468
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12469
+ Table2,
12470
+ {
12471
+ ...tableProps,
12472
+ empty: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: resourceType }),
12473
+ className: cx_default(tableProps.className)
12474
+ }
12475
+ );
12476
+ }
12477
+ function ResourceTable(props) {
12159
12478
  const { resource, useTableParams } = props;
12160
12479
  const configs = useContext(ConfigsContext);
12161
12480
  const config = configs[resource];
12162
12481
  const { formatter, columns, Dropdown: Dropdown2, noShow } = config;
12163
12482
  const { i18n: i18n2 } = useTranslation();
12164
- const { Table: TableComponent } = useContext(ComponentContext);
12165
- const Table$12 = TableComponent || Table;
12166
12483
  const nameRenderer = noShow ? PlainTextNameColumnRenderer(i18n2) : NameColumnRenderer(i18n2);
12167
12484
  const { tableProps } = useEagleTable({
12168
12485
  useTableParams: {
12486
+ resource,
12169
12487
  ...useTableParams
12170
12488
  },
12171
12489
  columns: [nameRenderer, ...(columns == null ? void 0 : columns()) || []],
@@ -12173,28 +12491,20 @@ function ResourceTable(props) {
12173
12491
  defaultSize: 10,
12174
12492
  ...config.tableProps
12175
12493
  },
12176
- resource,
12177
12494
  formatter,
12178
12495
  Dropdown: Dropdown2
12179
12496
  });
12180
12497
  useEffect(() => {
12181
12498
  tableProps.onPageChange(1);
12182
12499
  }, []);
12183
- if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
12184
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
12185
- WidgetErrorContent,
12186
- {
12187
- errorText: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: ` ${config.kind}` }),
12188
- type: ErrorContentType.Card
12189
- }
12190
- );
12191
- }
12192
12500
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
12193
- Table$12,
12501
+ Table,
12194
12502
  {
12195
- ...tableProps,
12196
- empty: tableProps.empty || i18n2.t("dovetail.no_resource", { kind: ` ${config.kind}` }),
12197
- className: cx_default(tableProps.className)
12503
+ tableProps,
12504
+ displayName: config.displayName || config.kind,
12505
+ errorContentProps: {
12506
+ type: ErrorContentType.Card
12507
+ }
12198
12508
  }
12199
12509
  );
12200
12510
  }
@@ -12202,7 +12512,8 @@ const WorkloadPodsTable_975j2t = "";
12202
12512
  const WorkloadPodsTable = ({
12203
12513
  namespace: namespace2,
12204
12514
  selector,
12205
- hideToolbar
12515
+ hideToolbar,
12516
+ filter
12206
12517
  }) => {
12207
12518
  var _a;
12208
12519
  const {
@@ -12210,7 +12521,7 @@ const WorkloadPodsTable = ({
12210
12521
  } = useTranslation();
12211
12522
  const [selectedKeys, setSelectedKeys] = useState([]);
12212
12523
  const component = useContext(ComponentContext);
12213
- const Table$12 = component.Table || Table;
12524
+ const Table2 = component.Table || Table$1;
12214
12525
  const currentSize = 10;
12215
12526
  const columns = [NameColumnRenderer(i18n2, "pods"), StateDisplayColumnRenderer(i18n2), {
12216
12527
  key: "ip",
@@ -12235,7 +12546,7 @@ const WorkloadPodsTable = ({
12235
12546
  field: "",
12236
12547
  value: "",
12237
12548
  fn(item) {
12238
- return matchSelector(item, selector, namespace2);
12549
+ return filter ? filter(item) : matchSelector(item, selector, namespace2);
12239
12550
  }
12240
12551
  }]
12241
12552
  }
@@ -12258,7 +12569,7 @@ const WorkloadPodsTable = ({
12258
12569
  children: [hideToolbar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
12259
12570
  selectedKeys,
12260
12571
  hideCreate: true
12261
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(Table$12, {
12572
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(Table2, {
12262
12573
  ...tableProps,
12263
12574
  tableKey: "pods",
12264
12575
  onSelect: (keys) => setSelectedKeys(keys),
@@ -12436,126 +12747,6 @@ function WorkloadReplicas({
12436
12747
  })]
12437
12748
  });
12438
12749
  }
12439
- var StorageUnit = /* @__PURE__ */ ((StorageUnit2) => {
12440
- StorageUnit2["Pi"] = "Pi";
12441
- StorageUnit2["PiB"] = "PiB";
12442
- StorageUnit2["Ti"] = "Ti";
12443
- StorageUnit2["TiB"] = "TiB";
12444
- StorageUnit2["Gi"] = "Gi";
12445
- StorageUnit2["GiB"] = "GiB";
12446
- StorageUnit2["Mi"] = "Mi";
12447
- StorageUnit2["MiB"] = "MiB";
12448
- StorageUnit2["Ki"] = "Ki";
12449
- StorageUnit2["KiB"] = "KiB";
12450
- return StorageUnit2;
12451
- })(StorageUnit || {});
12452
- const UNIT_FACTORS = {
12453
- Pi: 1024 ** 5,
12454
- PiB: 1024 ** 5,
12455
- Ti: 1024 ** 4,
12456
- TiB: 1024 ** 4,
12457
- Gi: 1024 ** 3,
12458
- GiB: 1024 ** 3,
12459
- Mi: 1024 ** 2,
12460
- MiB: 1024 ** 2,
12461
- Ki: 1024,
12462
- KiB: 1024,
12463
- B: 1
12464
- };
12465
- function transformStorageUnit(value2, toUnit = "Gi") {
12466
- const num = parseFloat(value2);
12467
- const unit = Object.values(StorageUnit).find((u) => value2.includes(u)) || "Ki";
12468
- return num / UNIT_FACTORS[unit] * UNIT_FACTORS[toUnit];
12469
- }
12470
- const DistributeStorageForm = React__default.forwardRef(function DistributeStorageForm2(props, ref) {
12471
- const { defaultValue, pvc: pvc2 } = props;
12472
- const { resource } = useResource();
12473
- const { mutateAsync } = useUpdate();
12474
- const { t: t2 } = useTranslation();
12475
- const [distributeStorage, setDistributeStorage] = useState(defaultValue);
12476
- const submit = useCallback(() => {
12477
- const v = pvc2.updateDistributeStorage(distributeStorage);
12478
- const id = pvc2.id;
12479
- pruneBeforeEdit(v);
12480
- return mutateAsync({
12481
- id,
12482
- resource: (resource == null ? void 0 : resource.name) || "",
12483
- values: v,
12484
- successNotification() {
12485
- return {
12486
- message: t2("dovetail.edit_distribute_storage_success_toast", {
12487
- kind: pvc2.kind,
12488
- name: pvc2.id,
12489
- interpolation: {
12490
- escapeValue: false
12491
- }
12492
- }),
12493
- type: "success"
12494
- };
12495
- },
12496
- errorNotification: false
12497
- });
12498
- }, [pvc2, distributeStorage, resource == null ? void 0 : resource.name, mutateAsync, t2]);
12499
- useImperativeHandle(ref, () => ({
12500
- submit
12501
- }), [submit]);
12502
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
12503
- Form.Item,
12504
- {
12505
- label: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { width: "134px" }, children: t2("dovetail.distributed") }),
12506
- colon: false,
12507
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
12508
- Fields.Integer,
12509
- {
12510
- style: { width: "142px" },
12511
- input: {
12512
- name: "distributeStorage",
12513
- value: distributeStorage,
12514
- onChange: (value2) => {
12515
- setDistributeStorage(Number(value2));
12516
- },
12517
- onBlur: () => {
12518
- },
12519
- onFocus: () => {
12520
- }
12521
- },
12522
- min: 0,
12523
- meta: {},
12524
- suffix: "GiB",
12525
- controls: true
12526
- }
12527
- )
12528
- }
12529
- );
12530
- });
12531
- function PVCDistributeStorage({ pvc: pvc2, editable }) {
12532
- var _a, _b;
12533
- const { t: t2 } = useTranslation();
12534
- const formRef = useRef(null);
12535
- const value2 = (_b = (_a = pvc2.spec.resources) == null ? void 0 : _a.requests) == null ? void 0 : _b.storage;
12536
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
12537
- /* @__PURE__ */ jsxRuntimeExports.jsx(Units.Byte, { rawValue: parseSi(value2), decimals: 1 }),
12538
- editable && /* @__PURE__ */ jsxRuntimeExports.jsx(
12539
- EditField,
12540
- {
12541
- modalProps: {
12542
- formRef,
12543
- title: t2("dovetail.edit_replicas"),
12544
- renderContent() {
12545
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
12546
- DistributeStorageForm,
12547
- {
12548
- ref: formRef,
12549
- defaultValue: value2 ? transformStorageUnit(value2, StorageUnit.Gi) : 0,
12550
- pvc: pvc2
12551
- }
12552
- );
12553
- }
12554
- }
12555
- }
12556
- )
12557
- ] });
12558
- }
12559
12750
  var AreaType = /* @__PURE__ */ ((AreaType2) => {
12560
12751
  AreaType2["Inline"] = "Inline";
12561
12752
  AreaType2["Grid"] = "Grid";
@@ -12589,6 +12780,15 @@ const ConditionsField = () => {
12589
12780
  }
12590
12781
  };
12591
12782
  };
12783
+ const NodeTaintsField = () => {
12784
+ return {
12785
+ key: "NodeTaints",
12786
+ path: ["spec", "taints"],
12787
+ renderContent: (value2) => {
12788
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(NodeTaintsTable, { taints: value2 });
12789
+ }
12790
+ };
12791
+ };
12592
12792
  const PodsField = () => {
12593
12793
  return {
12594
12794
  key: "pods",
@@ -12818,13 +13018,15 @@ const StorageClassPvField = () => {
12818
13018
  resource: "persistentvolumes",
12819
13019
  useTableParams: {
12820
13020
  filters: {
12821
- permanent: [{
12822
- field: "",
12823
- value: "",
12824
- fn(pv2) {
12825
- return sc.filterPV(pv2, sc.metadata.name);
13021
+ permanent: [
13022
+ {
13023
+ field: "",
13024
+ value: "",
13025
+ fn(pv2) {
13026
+ return sc.filterPV(pv2, sc.metadata.name);
13027
+ }
12826
13028
  }
12827
- }]
13029
+ ]
12828
13030
  }
12829
13031
  }
12830
13032
  }
@@ -12865,17 +13067,24 @@ const PVStorageClassField = (i18n2) => {
12865
13067
  path: ["spec", "storageClassName"],
12866
13068
  title: i18n2.t("dovetail.storage_class"),
12867
13069
  renderContent(value2) {
12868
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, { resourceName: "storageclasses", namespace: "", resourceId: value2 });
13070
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
13071
+ ResourceLink,
13072
+ {
13073
+ resourceKind: "storageclasses",
13074
+ namespace: "",
13075
+ name: value2
13076
+ }
13077
+ );
12869
13078
  }
12870
13079
  };
12871
13080
  };
12872
13081
  const PVPhaseField = (i18n2) => {
12873
13082
  return {
12874
13083
  key: "phase",
12875
- path: ["phase"],
13084
+ path: ["stateDisplay"],
12876
13085
  title: i18n2.t("dovetail.state"),
12877
13086
  renderContent(value2) {
12878
- return /* @__PURE__ */ jsxRuntimeExports.jsx(PVPhaseDisplay, { value: value2 });
13087
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, { state: value2, resourceKind: "PersistentVolume", hideBackground: true });
12879
13088
  }
12880
13089
  };
12881
13090
  };
@@ -12893,14 +13102,49 @@ const PVAccessModeField = (i18n2) => {
12893
13102
  return {
12894
13103
  key: "accessMode",
12895
13104
  path: ["spec", "accessModes"],
12896
- title: i18n2.t("dovetail.access_mode")
13105
+ title: i18n2.t("dovetail.access_mode"),
13106
+ renderContent(value2) {
13107
+ return value2.join(", ");
13108
+ }
13109
+ };
13110
+ };
13111
+ const PVCPodsField = () => {
13112
+ return {
13113
+ key: "pods",
13114
+ path: [],
13115
+ renderContent: (_, record) => {
13116
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
13117
+ WorkloadPodsTable,
13118
+ {
13119
+ filter: (item) => {
13120
+ var _a, _b;
13121
+ return !!((_b = (_a = item.spec) == null ? void 0 : _a.volumes) == null ? void 0 : _b.some((v) => {
13122
+ var _a2;
13123
+ return ((_a2 = v.persistentVolumeClaim) == null ? void 0 : _a2.claimName) === record.metadata.name;
13124
+ }));
13125
+ },
13126
+ namespace: record.metadata.namespace,
13127
+ hideToolbar: true
13128
+ }
13129
+ );
13130
+ }
12897
13131
  };
12898
13132
  };
12899
13133
  const PVCRefField = (i18n2) => {
12900
13134
  return {
12901
13135
  key: "pvc",
12902
13136
  path: ["pvc"],
12903
- title: i18n2.t("dovetail.pvc")
13137
+ title: i18n2.t("dovetail.pvc"),
13138
+ renderContent(value2, pvc2) {
13139
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
13140
+ ResourceLink,
13141
+ {
13142
+ resourceKind: "persistentvolumeclaims",
13143
+ namespace: pvc2.pvcNamespace || "default",
13144
+ name: value2
13145
+ }
13146
+ );
13147
+ }
12904
13148
  };
12905
13149
  };
12906
13150
  const PVCSIRefField = (i18n2) => {
@@ -12949,13 +13193,7 @@ const ResourceTableField = (resource, useTableParams) => {
12949
13193
  key: resource,
12950
13194
  path: [],
12951
13195
  renderContent() {
12952
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
12953
- ResourceTable,
12954
- {
12955
- resource,
12956
- useTableParams
12957
- }
12958
- );
13196
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceTable, { resource, useTableParams });
12959
13197
  }
12960
13198
  };
12961
13199
  };
@@ -18994,7 +19232,7 @@ const PodContainersTable = ({
18994
19232
  }) => {
18995
19233
  const { i18n: i18n2 } = useTranslation();
18996
19234
  const component = useContext(ComponentContext);
18997
- const Table$12 = component.Table || Table;
19235
+ const Table2 = component.Table || Table$1;
18998
19236
  const currentSize = 10;
18999
19237
  const columns = useMemo(
19000
19238
  () => [
@@ -19089,7 +19327,7 @@ const PodContainersTable = ({
19089
19327
  );
19090
19328
  }
19091
19329
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
19092
- Table$12,
19330
+ Table2,
19093
19331
  {
19094
19332
  tableKey: "podContainers",
19095
19333
  loading: false,
@@ -19110,18 +19348,17 @@ const BasicGroup = (i18n2, {
19110
19348
  upAreas = [],
19111
19349
  downAreas = [],
19112
19350
  basicFields = []
19113
- } = {}) => ({
19351
+ } = {}, isShowNamespace = true) => ({
19114
19352
  title: i18n2.t("dovetail.basic_info"),
19115
19353
  areas: [
19116
19354
  ...upAreas,
19117
19355
  {
19118
- fields: [
19119
- NamespaceField(i18n2),
19356
+ fields: (isShowNamespace ? [NamespaceField(i18n2)] : []).concat([
19120
19357
  ...basicFields,
19121
19358
  LabelsField(i18n2),
19122
19359
  AnnotationsField(i18n2),
19123
19360
  AgeField(i18n2)
19124
- ]
19361
+ ])
19125
19362
  },
19126
19363
  ...downAreas
19127
19364
  ]
@@ -19165,6 +19402,14 @@ const ServicePodsGroup = () => ({
19165
19402
  }
19166
19403
  ]
19167
19404
  });
19405
+ const PVCPodsGroup = () => ({
19406
+ title: "Pod",
19407
+ areas: [
19408
+ {
19409
+ fields: [PVCPodsField()]
19410
+ }
19411
+ ]
19412
+ });
19168
19413
  const ConditionsGroup = (i18n2) => ({
19169
19414
  title: i18n2.t("dovetail.condition"),
19170
19415
  areas: [
@@ -19173,6 +19418,14 @@ const ConditionsGroup = (i18n2) => ({
19173
19418
  }
19174
19419
  ]
19175
19420
  });
19421
+ const NodeTaintsGroup = (i18n2) => ({
19422
+ title: i18n2.t("dovetail.taint"),
19423
+ areas: [
19424
+ {
19425
+ fields: [NodeTaintsField()]
19426
+ }
19427
+ ]
19428
+ });
19176
19429
  const SecretDataGroup = () => ({
19177
19430
  areas: [
19178
19431
  {
@@ -33010,7 +33263,6 @@ const Shell = React__default.forwardRef(function Shell2(props, ref) {
33010
33263
  })]
33011
33264
  });
33012
33265
  });
33013
- const GlobalStoreContext = createContext({});
33014
33266
  var buffer = {};
33015
33267
  var base64Js = {};
33016
33268
  base64Js.byteLength = byteLength;
@@ -35467,13 +35719,7 @@ function ListPage(props) {
35467
35719
  tableProps,
35468
35720
  contentClassName
35469
35721
  } = props;
35470
- const {
35471
- Table: TableComponent
35472
- } = useContext(ComponentContext);
35473
- const {
35474
- t: t2
35475
- } = useTranslation();
35476
- const Table$12 = TableComponent || Table;
35722
+ useTranslation();
35477
35723
  const {
35478
35724
  resource
35479
35725
  } = useResource();
@@ -35484,6 +35730,7 @@ function ListPage(props) {
35484
35730
  children: [!config.hideListToolBar ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
35485
35731
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
35486
35732
  selectedKeys,
35733
+ title: config == null ? void 0 : config.displayName,
35487
35734
  description: config == null ? void 0 : config.description
35488
35735
  }), /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {
35489
35736
  style: {
@@ -35495,23 +35742,21 @@ function ListPage(props) {
35495
35742
  })]
35496
35743
  }) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
35497
35744
  className: cx_default(ListContentStyle, contentClassName),
35745
+ style: config.hideNamespacesFilter ? {
35746
+ paddingTop: 0
35747
+ } : {},
35498
35748
  children: [!config.hideNamespacesFilter ? /* @__PURE__ */ jsxRuntimeExports.jsx(NamespacesFilter, {
35499
35749
  className: NamespaceFilterStyle
35500
35750
  }) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
35501
35751
  className: TableStyle,
35502
- children: !(tableProps.data.length || tableProps.loading) ? /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
35503
- errorText: tableProps.empty || t2("dovetail.no_resource", {
35504
- kind: ` ${config.kind}`
35505
- })
35506
- }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Table$12, {
35507
- ...tableProps,
35508
- empty: tableProps.empty || t2("dovetail.no_resource", {
35509
- kind: ` ${config.kind}`
35510
- }),
35511
- className: cx_default(tableProps.className),
35512
- scroll: {
35513
- y: "calc(100% - 48px)"
35514
- }
35752
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Table, {
35753
+ tableProps: {
35754
+ ...tableProps,
35755
+ scroll: {
35756
+ y: "calc(100% - 48px)"
35757
+ }
35758
+ },
35759
+ displayName: (config == null ? void 0 : config.displayName) || config.kind
35515
35760
  })
35516
35761
  })]
35517
35762
  })]
@@ -37954,7 +38199,7 @@ const Separator = () => {
37954
38199
  });
37955
38200
  };
37956
38201
  const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
37957
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-0f76e977.js"));
38202
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-adaa32ac.js"));
37958
38203
  const YamlEditorComponent = forwardRef(
37959
38204
  function YamlEditorComponent2(props, ref) {
37960
38205
  const {
@@ -38823,10 +39068,11 @@ function FormModal(props) {
38823
39068
  if (typeof ((_c2 = config.formConfig) == null ? void 0 : _c2.formTitle) === "function") {
38824
39069
  return (_d2 = config.formConfig) == null ? void 0 : _d2.formTitle(action);
38825
39070
  }
39071
+ const label2 = config.displayName || (config == null ? void 0 : config.kind);
38826
39072
  return i18n2.t(id ? "dovetail.edit_resource" : "dovetail.create_resource", {
38827
- resource: config == null ? void 0 : config.kind
39073
+ resource: /^[a-zA-Z]/.test(label2) ? ` ${label2}` : label2
38828
39074
  });
38829
- }, [action, config.formConfig, config == null ? void 0 : config.kind, i18n2, id]);
39075
+ }, [action, config.formConfig, config.displayName, config == null ? void 0 : config.kind, i18n2, id]);
38830
39076
  const desc = useMemo(() => {
38831
39077
  var _a2, _b2, _c2, _d2;
38832
39078
  if (typeof ((_a2 = config.formConfig) == null ? void 0 : _a2.formDesc) === "string")
@@ -38877,6 +39123,12 @@ function FormModal(props) {
38877
39123
  children: [desc ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
38878
39124
  className: FormDescStyle,
38879
39125
  children: desc
39126
+ }) : void 0, !isYamlForm && mode === "form" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, {
39127
+ type: "warning",
39128
+ message: i18n2.t("dovetail.change_form_mode_alert"),
39129
+ style: {
39130
+ marginBottom: "16px"
39131
+ }
38880
39132
  }) : void 0, formEle]
38881
39133
  });
38882
39134
  }
@@ -39189,8 +39441,8 @@ const ReferenceLink = (props) => {
39189
39441
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
39190
39442
  ResourceLink,
39191
39443
  {
39192
- resourceId: ownerReference.name,
39193
- resourceName: resource.name || "",
39444
+ name: ownerReference.name,
39445
+ resourceKind: resource.name || "",
39194
39446
  namespace: namespace2
39195
39447
  }
39196
39448
  );
@@ -39244,9 +39496,9 @@ const IngressRulesComponent = ({ ingress }) => {
39244
39496
  /* @__PURE__ */ jsxRuntimeExports.jsx(
39245
39497
  ResourceLink,
39246
39498
  {
39247
- resourceName: "services",
39499
+ resourceKind: "services",
39248
39500
  namespace: ingress.metadata.namespace || "default",
39249
- resourceId: r2.serviceName
39501
+ name: r2.serviceName
39250
39502
  }
39251
39503
  ),
39252
39504
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
@@ -39837,7 +40089,7 @@ const PVRefColumnRenderer = (i18n2) => {
39837
40089
  display: true,
39838
40090
  dataIndex: ["pv"],
39839
40091
  title: i18n2.t("dovetail.pv"),
39840
- width: 120,
40092
+ width: 160,
39841
40093
  sortable: true
39842
40094
  };
39843
40095
  };
@@ -39847,13 +40099,13 @@ const PVStorageClassColumnRenderer = (i18n2) => {
39847
40099
  display: true,
39848
40100
  dataIndex: ["spec", "storageClassName"],
39849
40101
  title: i18n2.t("dovetail.storage_class"),
39850
- width: 120,
40102
+ width: 160,
39851
40103
  sortable: true,
39852
40104
  render(value2) {
39853
40105
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
39854
- resourceName: "storageclasses",
40106
+ resourceKind: "storageclasses",
39855
40107
  namespace: "",
39856
- resourceId: value2
40108
+ name: value2
39857
40109
  });
39858
40110
  }
39859
40111
  };
@@ -39862,13 +40114,15 @@ const PVPhaseColumnRenderer = (i18n2) => {
39862
40114
  return {
39863
40115
  key: "phase",
39864
40116
  display: true,
39865
- dataIndex: ["phase"],
40117
+ dataIndex: ["stateDisplay"],
39866
40118
  title: i18n2.t("dovetail.state"),
39867
40119
  width: 120,
39868
40120
  sortable: true,
39869
40121
  render(value2) {
39870
- return /* @__PURE__ */ jsxRuntimeExports.jsx(PVPhaseDisplay, {
39871
- value: value2
40122
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
40123
+ state: value2,
40124
+ resourceKind: "PersistentVolume",
40125
+ hideBackground: true
39872
40126
  });
39873
40127
  }
39874
40128
  };
@@ -39879,8 +40133,15 @@ const PVCRefColumnRenderer = (i18n2) => {
39879
40133
  display: true,
39880
40134
  dataIndex: ["pvc"],
39881
40135
  title: i18n2.t("dovetail.pvc"),
39882
- width: 120,
39883
- sortable: true
40136
+ width: 160,
40137
+ sortable: true,
40138
+ render(value2, pv2) {
40139
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
40140
+ resourceKind: "persistentvolumeclaims",
40141
+ namespace: pv2.pvcNamespace || "default",
40142
+ name: value2
40143
+ });
40144
+ }
39884
40145
  };
39885
40146
  };
39886
40147
  const PVCSIRefColumnRenderer = (i18n2) => {
@@ -39889,7 +40150,7 @@ const PVCSIRefColumnRenderer = (i18n2) => {
39889
40150
  display: true,
39890
40151
  dataIndex: ["csi"],
39891
40152
  title: i18n2.t("dovetail.csi"),
39892
- width: 120,
40153
+ width: 160,
39893
40154
  sortable: true
39894
40155
  };
39895
40156
  };
@@ -39915,7 +40176,15 @@ const PVAccessModeColumnRenderer = (i18n2) => {
39915
40176
  dataIndex: ["spec", "accessModes"],
39916
40177
  title: i18n2.t("dovetail.access_mode"),
39917
40178
  width: 120,
39918
- sortable: true
40179
+ sortable: true,
40180
+ render(value2) {
40181
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
40182
+ style: {
40183
+ whiteSpace: "pre-wrap"
40184
+ },
40185
+ children: value2.join("\n")
40186
+ });
40187
+ }
39919
40188
  };
39920
40189
  };
39921
40190
  const IsDefaultSCColumnRenderer = (i18n2) => {
@@ -39948,6 +40217,19 @@ const SCReclaimPolicyColumnRenderer = (i18n2) => {
39948
40217
  }
39949
40218
  };
39950
40219
  };
40220
+ const SCAllowExpandColumnRenderer = (i18n2) => {
40221
+ return {
40222
+ key: "​​allowVolumeExpansion",
40223
+ display: true,
40224
+ dataIndex: ["​​allowVolumeExpansion"],
40225
+ title: i18n2.t("dovetail.allow_expand"),
40226
+ width: 120,
40227
+ sortable: true,
40228
+ render(val) {
40229
+ return val ? i18n2.t("dovetail.support") : i18n2.t("dovetail.not_support");
40230
+ }
40231
+ };
40232
+ };
39951
40233
  const styles = "";
39952
40234
  const Dovetail = (props) => {
39953
40235
  const {
@@ -40186,7 +40468,7 @@ const relationPlugin = new RelationPlugin();
40186
40468
  const ProviderPlugins = [relationPlugin, modelPlugin];
40187
40469
  const dovetailRefineI18n = i18n;
40188
40470
  export {
40189
- Breadcrumb as $,
40471
+ index as $,
40190
40472
  AgeColumnRenderer as A,
40191
40473
  PVCStorageColumnRenderer as B,
40192
40474
  CommonSorter as C,
@@ -40203,214 +40485,219 @@ export {
40203
40485
  NameColumnRenderer as N,
40204
40486
  SCReclaimPolicyColumnRenderer as O,
40205
40487
  PlainTextNameColumnRenderer as P,
40206
- ColumnKeys as Q,
40488
+ SCAllowExpandColumnRenderer as Q,
40207
40489
  ReplicasColumnRenderer as R,
40208
40490
  StateDisplayColumnRenderer as S,
40209
- addDefaultRenderToColumns as T,
40210
- useEagleTable as U,
40211
- useDownloadYAML as V,
40491
+ ColumnKeys as T,
40492
+ addDefaultRenderToColumns as U,
40493
+ useEagleTable as V,
40212
40494
  WorkloadImageColumnRenderer as W,
40213
- useEdit as X,
40214
- useGlobalStore as Y,
40215
- useOpenForm as Z,
40216
- index as _,
40495
+ useDownloadYAML as X,
40496
+ useEdit as Y,
40497
+ useGlobalStore as Z,
40498
+ useOpenForm as _,
40217
40499
  useApiGroupSchema as a,
40218
- StorageClassPvField as a$,
40219
- NameInputWidget as a0,
40220
- dnsSubDomainRules as a1,
40221
- rfc1123LabelRules as a2,
40222
- rfc1035LabelRules as a3,
40223
- NamespaceSelectWidget as a4,
40224
- namespaceRules as a5,
40225
- KeyValueListWidget as a6,
40226
- MetadataForm as a7,
40227
- PageShow as a8,
40228
- Time as a9,
40229
- DeleteButton as aA,
40230
- Layout as aB,
40231
- AreaType as aC,
40232
- ImageField as aD,
40233
- ReplicaField as aE,
40234
- ConditionsField as aF,
40235
- PodsField as aG,
40236
- JobsField as aH,
40237
- DataField as aI,
40238
- SecretDataField as aJ,
40239
- StartTimeField as aK,
40240
- ServiceTypeField as aL,
40241
- ClusterIpField as aM,
40242
- SessionAffinityField as aN,
40243
- ServicePodsField as aO,
40244
- IngressRulesTableTabField as aP,
40245
- EventsTableTabField as aQ,
40246
- NamespaceField as aR,
40247
- AgeField as aS,
40248
- LabelsField as aT,
40249
- AnnotationsField as aU,
40250
- ServiceInnerClusterAccessField as aV,
40251
- ServiceOutClusterAccessField as aW,
40252
- PodSelectorField as aX,
40253
- PortsTableField as aY,
40254
- DurationField as aZ,
40255
- StorageClassProvisionerField as a_,
40256
- ConditionsTable as aa,
40257
- FormErrorAlert as ab,
40258
- PodContainersTable as ac,
40259
- WorkloadDropdown as ad,
40260
- ReplicasDropdown as ae,
40261
- PodDropdown as af,
40262
- CreateButton as ag,
40263
- ImageNames as ah,
40264
- ResourceList as ai,
40265
- ResourceShow as aj,
40266
- ResourceForm as ak,
40267
- ResourceCRUD as al,
40268
- WorkloadPodsTable as am,
40269
- CronJobDropdown as an,
40270
- K8sDropdown as ao,
40271
- EditLabelDropdownMenuItem as ap,
40272
- EditAnnotationDropdownMenuItem as aq,
40273
- ResourceUsageBar as ar,
40274
- WorkloadReplicasForm as as,
40275
- WorkloadReplicas as at,
40276
- CronjobJobsTable as au,
40277
- KeyValue as av,
40278
- KeyValueAnnotation as aw,
40279
- KeyValueSecret as ax,
40280
- Separator as ay,
40281
- YamlEditorComponent as az,
40500
+ PortsTableField as a$,
40501
+ WidgetErrorContent as a0,
40502
+ Breadcrumb as a1,
40503
+ NameInputWidget as a2,
40504
+ dnsSubDomainRules as a3,
40505
+ rfc1123LabelRules as a4,
40506
+ rfc1035LabelRules as a5,
40507
+ NamespaceSelectWidget as a6,
40508
+ namespaceRules as a7,
40509
+ KeyValueListWidget as a8,
40510
+ MetadataForm as a9,
40511
+ Separator as aA,
40512
+ YamlEditorComponent as aB,
40513
+ DeleteButton as aC,
40514
+ Layout as aD,
40515
+ AreaType as aE,
40516
+ ImageField as aF,
40517
+ ReplicaField as aG,
40518
+ ConditionsField as aH,
40519
+ NodeTaintsField as aI,
40520
+ PodsField as aJ,
40521
+ JobsField as aK,
40522
+ DataField as aL,
40523
+ SecretDataField as aM,
40524
+ StartTimeField as aN,
40525
+ ServiceTypeField as aO,
40526
+ ClusterIpField as aP,
40527
+ SessionAffinityField as aQ,
40528
+ ServicePodsField as aR,
40529
+ IngressRulesTableTabField as aS,
40530
+ EventsTableTabField as aT,
40531
+ NamespaceField as aU,
40532
+ AgeField as aV,
40533
+ LabelsField as aW,
40534
+ AnnotationsField as aX,
40535
+ ServiceInnerClusterAccessField as aY,
40536
+ ServiceOutClusterAccessField as aZ,
40537
+ PodSelectorField as a_,
40538
+ PageShow as aa,
40539
+ Time as ab,
40540
+ ConditionsTable as ac,
40541
+ FormErrorAlert as ad,
40542
+ PodContainersTable as ae,
40543
+ WorkloadDropdown as af,
40544
+ ReplicasDropdown as ag,
40545
+ PodDropdown as ah,
40546
+ CreateButton as ai,
40547
+ ImageNames as aj,
40548
+ ResourceList as ak,
40549
+ ResourceShow as al,
40550
+ ResourceForm as am,
40551
+ ResourceCRUD as an,
40552
+ WorkloadPodsTable as ao,
40553
+ CronJobDropdown as ap,
40554
+ K8sDropdown as aq,
40555
+ EditLabelDropdownMenuItem as ar,
40556
+ EditAnnotationDropdownMenuItem as as,
40557
+ ResourceUsageBar as at,
40558
+ WorkloadReplicasForm as au,
40559
+ WorkloadReplicas as av,
40560
+ CronjobJobsTable as aw,
40561
+ KeyValue as ax,
40562
+ KeyValueAnnotation as ay,
40563
+ KeyValueSecret as az,
40282
40564
  useSchema as b,
40283
- PodShellModal as b$,
40284
- PVCapacityField as b0,
40285
- PVCStorageField as b1,
40286
- PVRefField as b2,
40287
- PVStorageClassField as b3,
40288
- PVPhaseField as b4,
40289
- PVVolumeModeField as b5,
40290
- PVAccessModeField as b6,
40291
- PVCRefField as b7,
40292
- PVCSIRefField as b8,
40293
- IsDefaultSCField as b9,
40294
- DrawerShow as bA,
40295
- Menu as bB,
40296
- EditButton as bC,
40297
- ReferenceLink as bD,
40298
- ResourceLink as bE,
40299
- NS_STORE_KEY as bF,
40300
- ALL_NS as bG,
40301
- useNamespacesFilter as bH,
40302
- NamespacesFilter as bI,
40303
- FormModal as bJ,
40304
- RefineFormContent as bK,
40305
- RefineFormPage as bL,
40306
- SchemaStrategy as bM,
40307
- YamlForm as bN,
40308
- useRefineForm as bO,
40309
- ServiceInClusterAccessComponent as bP,
40310
- ServiceOutClusterAccessComponent as bQ,
40311
- Tags as bR,
40312
- TextTags as bS,
40313
- PodLog as bT,
40314
- NetworkPolicyRulesViewer as bU,
40315
- PVPhaseDisplay as bV,
40316
- PVVolumeModeDisplay as bW,
40317
- Tabs as bX,
40318
- ResourceSelect as bY,
40319
- SocketStatus as bZ,
40320
- Shell as b_,
40321
- SCReclaimPolicyField as ba,
40322
- IsSCAllowVolumeExpansionField as bb,
40323
- ResourceTableField as bc,
40324
- EventsTab as bd,
40325
- PodLogTab as be,
40326
- BasicGroup as bf,
40327
- PodsGroup as bg,
40328
- PodContainersGroup as bh,
40329
- ServicePodsGroup as bi,
40330
- ConditionsGroup as bj,
40331
- SecretDataGroup as bk,
40332
- JobsGroup as bl,
40333
- IngressRulesGroup as bm,
40334
- PodSelectorGroup as bn,
40335
- PortsGroup as bo,
40336
- DataGroup as bp,
40337
- NetworkPolicyIngressRulesGroup as bq,
40338
- NetworkPolicyEgressRulesGroup as br,
40339
- StorageClassPvGroup as bs,
40340
- ResourceTableGroup as bt,
40341
- ShowGroupComponent as bu,
40342
- ShowContent as bv,
40343
- DeleteManyButton as bw,
40344
- ListPage as bx,
40345
- StateTagStyle as by,
40346
- StateTag as bz,
40565
+ PVVolumeModeDisplay as b$,
40566
+ DurationField as b0,
40567
+ StorageClassProvisionerField as b1,
40568
+ StorageClassPvField as b2,
40569
+ PVCapacityField as b3,
40570
+ PVCStorageField as b4,
40571
+ PVRefField as b5,
40572
+ PVStorageClassField as b6,
40573
+ PVPhaseField as b7,
40574
+ PVVolumeModeField as b8,
40575
+ PVAccessModeField as b9,
40576
+ ShowGroupComponent as bA,
40577
+ ShowContent as bB,
40578
+ DeleteManyButton as bC,
40579
+ ListPage as bD,
40580
+ StateTag as bE,
40581
+ DrawerShow as bF,
40582
+ Menu as bG,
40583
+ Table as bH,
40584
+ EditButton as bI,
40585
+ ReferenceLink as bJ,
40586
+ ResourceLink as bK,
40587
+ NS_STORE_KEY as bL,
40588
+ ALL_NS as bM,
40589
+ useNamespacesFilter as bN,
40590
+ NamespacesFilter as bO,
40591
+ FormModal as bP,
40592
+ RefineFormContent as bQ,
40593
+ RefineFormPage as bR,
40594
+ SchemaStrategy as bS,
40595
+ YamlForm as bT,
40596
+ useRefineForm as bU,
40597
+ ServiceInClusterAccessComponent as bV,
40598
+ ServiceOutClusterAccessComponent as bW,
40599
+ Tags as bX,
40600
+ TextTags as bY,
40601
+ PodLog as bZ,
40602
+ NetworkPolicyRulesViewer as b_,
40603
+ PVCPodsField as ba,
40604
+ PVCRefField as bb,
40605
+ PVCSIRefField as bc,
40606
+ IsDefaultSCField as bd,
40607
+ SCReclaimPolicyField as be,
40608
+ IsSCAllowVolumeExpansionField as bf,
40609
+ ResourceTableField as bg,
40610
+ EventsTab as bh,
40611
+ PodLogTab as bi,
40612
+ BasicGroup as bj,
40613
+ PodsGroup as bk,
40614
+ PodContainersGroup as bl,
40615
+ ServicePodsGroup as bm,
40616
+ PVCPodsGroup as bn,
40617
+ ConditionsGroup as bo,
40618
+ NodeTaintsGroup as bp,
40619
+ SecretDataGroup as bq,
40620
+ JobsGroup as br,
40621
+ IngressRulesGroup as bs,
40622
+ PodSelectorGroup as bt,
40623
+ PortsGroup as bu,
40624
+ DataGroup as bv,
40625
+ NetworkPolicyIngressRulesGroup as bw,
40626
+ NetworkPolicyEgressRulesGroup as bx,
40627
+ StorageClassPvGroup as by,
40628
+ ResourceTableGroup as bz,
40347
40629
  useDeleteModal as c,
40348
- generateSchemaTypeValue as c$,
40349
- PodShell as c0,
40350
- ResourceTable as c1,
40351
- BASE_INIT_VALUE as c2,
40352
- DEPLOYMENT_INIT_VALUE as c3,
40353
- CRONJOB_INIT_VALUE as c4,
40354
- DAEMONSET_INIT_VALUE as c5,
40355
- JOB_INIT_VALUE as c6,
40356
- STATEFULSET_INIT_VALUE as c7,
40357
- POD_INIT_VALUE as c8,
40358
- SERVICE_CLUSTER_IP_INIT_VALUE as c9,
40359
- ConfigsContext as cA,
40360
- IngressModel as cB,
40361
- NetworkPolicyModel as cC,
40362
- JobModel as cD,
40363
- WorkloadModel as cE,
40364
- WorkloadBaseModel as cF,
40365
- PodModel as cG,
40366
- PodMetricsModel as cH,
40367
- ResourceModel as cI,
40368
- CronJobModel as cJ,
40369
- EventModel as cK,
40370
- DeploymentModel as cL,
40371
- DaemonSetModel as cM,
40372
- StatefulSetModel as cN,
40373
- ServiceTypeEnum as cO,
40374
- ServiceModel as cP,
40375
- NodeRole as cQ,
40376
- NodeModel as cR,
40377
- StorageClassModel as cS,
40378
- PersistentVolumeModel as cT,
40379
- PersistentVolumeClaimModel as cU,
40380
- ProviderPlugins as cV,
40381
- ModelPlugin as cW,
40382
- modelPlugin as cX,
40383
- RelationPlugin as cY,
40384
- relationPlugin as cZ,
40385
- generateValueFromSchema as c_,
40386
- SERVICE_NODE_PORT_INIT_VALUE as ca,
40387
- SERVICE_LOAD_BALANCER_INIT_VALUE as cb,
40388
- SERVICE_EXTERNAL_NAME_INIT_VALUE as cc,
40389
- SERVICE_HEADLESS_INIT_VALUE as cd,
40390
- INGRESS_INIT_VALUE as ce,
40391
- NETWORK_POLICY_INIT_VALUE as cf,
40392
- CONFIG_MAP_INIT_VALUE as cg,
40393
- SERVER_INSTANCE_INIT_VALUE as ch,
40394
- REDEPLOY_TIMESTAMP_KEY as ci,
40395
- SECRET_OPAQUE_INIT_VALUE as cj,
40396
- SECRET_IMAGE_REPO_INIT_VALUE as ck,
40397
- SECRET_BASIC_AUTH_INIT_VALUE as cl,
40398
- SECRET_SSH_AUTH_INIT_VALUE as cm,
40399
- SECRET_TLS_INIT_VALUE as cn,
40400
- SECRET_CUSTOM_INIT_VALUE as co,
40401
- NODE_INIT_VALUE as cp,
40402
- STORAGE_CLASS_INIT_VALUE as cq,
40403
- PV_INIT_VALUE as cr,
40404
- PVC_INIT_VALUE as cs,
40405
- WorkloadState as ct,
40406
- AccessControlAuth as cu,
40407
- Dovetail as cv,
40408
- RESOURCE_GROUP as cw,
40409
- FormType as cx,
40410
- ComponentContext as cy,
40411
- GlobalStoreContext as cz,
40630
+ ModelPlugin as c$,
40631
+ Tabs as c0,
40632
+ ResourceSelect as c1,
40633
+ SocketStatus as c2,
40634
+ Shell as c3,
40635
+ PodShellModal as c4,
40636
+ PodShell as c5,
40637
+ ResourceTable as c6,
40638
+ BASE_INIT_VALUE as c7,
40639
+ DEPLOYMENT_INIT_VALUE as c8,
40640
+ CRONJOB_INIT_VALUE as c9,
40641
+ Dovetail as cA,
40642
+ RESOURCE_GROUP as cB,
40643
+ FormType as cC,
40644
+ ComponentContext as cD,
40645
+ GlobalStoreContext as cE,
40646
+ ConfigsContext as cF,
40647
+ IngressModel as cG,
40648
+ NetworkPolicyModel as cH,
40649
+ JobModel as cI,
40650
+ WorkloadModel as cJ,
40651
+ WorkloadBaseModel as cK,
40652
+ PodModel as cL,
40653
+ PodMetricsModel as cM,
40654
+ ResourceModel as cN,
40655
+ CronJobModel as cO,
40656
+ EventModel as cP,
40657
+ DeploymentModel as cQ,
40658
+ DaemonSetModel as cR,
40659
+ StatefulSetModel as cS,
40660
+ ServiceTypeEnum as cT,
40661
+ ServiceModel as cU,
40662
+ NodeRole as cV,
40663
+ NodeModel as cW,
40664
+ StorageClassModel as cX,
40665
+ PersistentVolumeModel as cY,
40666
+ PersistentVolumeClaimModel as cZ,
40667
+ ProviderPlugins as c_,
40668
+ DAEMONSET_INIT_VALUE as ca,
40669
+ JOB_INIT_VALUE as cb,
40670
+ STATEFULSET_INIT_VALUE as cc,
40671
+ POD_INIT_VALUE as cd,
40672
+ SERVICE_CLUSTER_IP_INIT_VALUE as ce,
40673
+ SERVICE_NODE_PORT_INIT_VALUE as cf,
40674
+ SERVICE_LOAD_BALANCER_INIT_VALUE as cg,
40675
+ SERVICE_EXTERNAL_NAME_INIT_VALUE as ch,
40676
+ SERVICE_HEADLESS_INIT_VALUE as ci,
40677
+ INGRESS_INIT_VALUE as cj,
40678
+ NETWORK_POLICY_INIT_VALUE as ck,
40679
+ CONFIG_MAP_INIT_VALUE as cl,
40680
+ SERVER_INSTANCE_INIT_VALUE as cm,
40681
+ REDEPLOY_TIMESTAMP_KEY as cn,
40682
+ SECRET_OPAQUE_INIT_VALUE as co,
40683
+ SECRET_IMAGE_REPO_INIT_VALUE as cp,
40684
+ SECRET_BASIC_AUTH_INIT_VALUE as cq,
40685
+ SECRET_SSH_AUTH_INIT_VALUE as cr,
40686
+ SECRET_TLS_INIT_VALUE as cs,
40687
+ SECRET_CUSTOM_INIT_VALUE as ct,
40688
+ NODE_INIT_VALUE as cu,
40689
+ STORAGE_CLASS_INIT_VALUE as cv,
40690
+ PV_INIT_VALUE as cw,
40691
+ PVC_INIT_VALUE as cx,
40692
+ ResourceState as cy,
40693
+ AccessControlAuth as cz,
40412
40694
  dovetailRefineI18n as d,
40413
- resolveRef as d0,
40695
+ modelPlugin as d0,
40696
+ RelationPlugin as d1,
40697
+ relationPlugin as d2,
40698
+ generateValueFromSchema as d3,
40699
+ generateSchemaTypeValue as d4,
40700
+ resolveRef as d5,
40414
40701
  NameSpaceColumnRenderer as e,
40415
40702
  WorkloadRestartsColumnRenderer as f,
40416
40703
  NodeNameColumnRenderer as g,