@dovetail-v2/refine 0.1.6 → 0.1.7

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 (223) hide show
  1. package/dist/{MonacoYamlDiffEditor-2612b8d0.js → MonacoYamlDiffEditor-1593cfad.js} +1 -1
  2. package/dist/{index-69d5e3e9.js → index-45031697.js} +1218 -838
  3. package/dist/refine.js +189 -188
  4. package/dist/refine.umd.cjs +1027 -647
  5. package/dist/style.css +2795 -124
  6. package/lib/{src/Dovetail.d.ts → Dovetail.d.ts} +2 -0
  7. package/lib/components/DropdownMenuItems/EditAnnotationDropdownMenuItem.d.ts +10 -0
  8. package/lib/components/DropdownMenuItems/EditLabelDropdownMenuItem.d.ts +10 -0
  9. package/lib/components/DropdownMenuItems/index.d.ts +2 -0
  10. package/lib/{src/components → components}/EditField/index.d.ts +2 -1
  11. package/lib/components/EditMetadataForm/EditAnnotationForm.d.ts +10 -0
  12. package/lib/components/EditMetadataForm/EditLabelForm.d.ts +10 -0
  13. package/lib/components/EditMetadataForm/index.d.ts +2 -0
  14. package/lib/{src/components → components}/Form/FormModal.d.ts +3 -0
  15. package/lib/{src/components → components}/Form/RefineFormContent.d.ts +2 -2
  16. package/lib/{src/components → components}/Form/YamlForm.d.ts +4 -1
  17. package/lib/components/Form/useFieldsConfig.d.ts +4 -0
  18. package/lib/{src/components → components}/Form/useYamlForm.d.ts +8 -1
  19. package/lib/{src/components → components}/index.d.ts +1 -0
  20. package/lib/{src/constants → constants}/k8s.d.ts +1 -1
  21. package/lib/contexts/constants.d.ts +6 -0
  22. package/lib/{src/hooks → hooks}/useDeleteModal/useDeleteModal.d.ts +0 -1
  23. package/lib/{src/hooks → hooks}/useSchema.d.ts +1 -1
  24. package/lib/{src/i18n.d.ts → i18n.d.ts} +9 -0
  25. package/lib/{src/locales → locales}/en-US/index.d.ts +1 -0
  26. package/lib/{src/locales → locales}/zh-CN/index.d.ts +8 -0
  27. package/lib/{src/models → models}/resource-model.d.ts +2 -0
  28. package/lib/{src/pages → pages}/storageclasses/index.d.ts +2 -1
  29. package/lib/styles/button.d.ts +1 -0
  30. package/lib/{src/styles → styles}/modal.d.ts +1 -0
  31. package/lib/{src/types → types}/resource.d.ts +2 -1
  32. package/lib/{src/utils → utils}/openapi.d.ts +2 -1
  33. package/package.json +6 -1
  34. package/lib/vite.config.d.ts +0 -2
  35. /package/lib/{src/App.d.ts → App.d.ts} +0 -0
  36. /package/lib/{src/components → components}/Breadcrumb/index.d.ts +0 -0
  37. /package/lib/{src/components → components}/ConditionsTable/ConditionsTable.d.ts +0 -0
  38. /package/lib/{src/components → components}/ConditionsTable/index.d.ts +0 -0
  39. /package/lib/{src/components → components}/CreateButton/index.d.ts +0 -0
  40. /package/lib/{src/components → components}/CronJobDropdown/index.d.ts +0 -0
  41. /package/lib/{src/components → components}/CronjobJobsTable/index.d.ts +0 -0
  42. /package/lib/{src/components → components}/DeleteButton/index.d.ts +0 -0
  43. /package/lib/{src/components → components}/DeleteManyButton/index.d.ts +0 -0
  44. /package/lib/{src/components → components}/DrawerShow/DrawerShow.d.ts +0 -0
  45. /package/lib/{src/components → components}/DrawerShow/index.d.ts +0 -0
  46. /package/lib/{src/components → components}/DurationTime/index.d.ts +0 -0
  47. /package/lib/{src/components → components}/EditButton/index.d.ts +0 -0
  48. /package/lib/{src/components → components}/ErrorContent/index.d.ts +0 -0
  49. /package/lib/{src/components → components}/EventsTable/EventsTable.d.ts +0 -0
  50. /package/lib/{src/components → components}/EventsTable/index.d.ts +0 -0
  51. /package/lib/{src/components → components}/Form/RefineFormPage.d.ts +0 -0
  52. /package/lib/{src/components → components}/Form/index.d.ts +0 -0
  53. /package/lib/{src/components → components}/Form/type.d.ts +0 -0
  54. /package/lib/{src/components → components}/Form/useReactHookForm.d.ts +0 -0
  55. /package/lib/{src/components → components}/Form/useRefineForm.d.ts +0 -0
  56. /package/lib/{src/components → components}/FormErrorAlert/index.d.ts +0 -0
  57. /package/lib/{src/components → components}/FormLayout/index.d.ts +0 -0
  58. /package/lib/{src/components → components}/FormWidgets/KeyValueListWidget.d.ts +0 -0
  59. /package/lib/{src/components → components}/FormWidgets/MetadataForm.d.ts +0 -0
  60. /package/lib/{src/components → components}/FormWidgets/NameInputWidget.d.ts +0 -0
  61. /package/lib/{src/components → components}/FormWidgets/NamespaceSelectWidget.d.ts +0 -0
  62. /package/lib/{src/components → components}/FormWidgets/index.d.ts +0 -0
  63. /package/lib/{src/components → components}/FormWidgets/widget.d.ts +0 -0
  64. /package/lib/{src/components → components}/ImageNames/index.d.ts +0 -0
  65. /package/lib/{src/components → components}/IngressRulesComponent/index.d.ts +0 -0
  66. /package/lib/{src/components → components}/IngressRulesTable/IngressRulesTable.d.ts +0 -0
  67. /package/lib/{src/components → components}/IngressRulesTable/index.d.ts +0 -0
  68. /package/lib/{src/components → components}/K8sDropdown/index.d.ts +0 -0
  69. /package/lib/{src/components → components}/KeyValue/KeyValue.d.ts +0 -0
  70. /package/lib/{src/components → components}/KeyValue/KeyValueAnnotation.d.ts +0 -0
  71. /package/lib/{src/components → components}/KeyValue/KeyValueSecret.d.ts +0 -0
  72. /package/lib/{src/components → components}/KeyValue/index.d.ts +0 -0
  73. /package/lib/{src/components → components}/Layout/index.d.ts +0 -0
  74. /package/lib/{src/components → components}/LinkFallback/index.d.ts +0 -0
  75. /package/lib/{src/components → components}/ListPage/index.d.ts +0 -0
  76. /package/lib/{src/components → components}/Menu/index.d.ts +0 -0
  77. /package/lib/{src/components → components}/NamespacesFilter/index.d.ts +0 -0
  78. /package/lib/{src/components → components}/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +0 -0
  79. /package/lib/{src/components → components}/NetworkPolicyRulesViewer/index.d.ts +0 -0
  80. /package/lib/{src/components → components}/PageShow/PageShow.d.ts +0 -0
  81. /package/lib/{src/components → components}/PageShow/index.d.ts +0 -0
  82. /package/lib/{src/components → components}/PodContainersTable/PodContainersTable.d.ts +0 -0
  83. /package/lib/{src/components → components}/PodContainersTable/index.d.ts +0 -0
  84. /package/lib/{src/components → components}/PodDropdown/index.d.ts +0 -0
  85. /package/lib/{src/components → components}/PodLog/index.d.ts +0 -0
  86. /package/lib/{src/components → components}/PodSelectorTable/index.d.ts +0 -0
  87. /package/lib/{src/components → components}/PodShellModal/PodShell.d.ts +0 -0
  88. /package/lib/{src/components → components}/PodShellModal/index.d.ts +0 -0
  89. /package/lib/{src/components → components}/PortsTable/index.d.ts +0 -0
  90. /package/lib/{src/components → components}/ReferenceLink/index.d.ts +0 -0
  91. /package/lib/{src/components → components}/ReplicasDropdown/index.d.ts +0 -0
  92. /package/lib/{src/components → components}/ResourceCRUD/ResourceCRUD.d.ts +0 -0
  93. /package/lib/{src/components → components}/ResourceCRUD/create/index.d.ts +0 -0
  94. /package/lib/{src/components → components}/ResourceCRUD/index.d.ts +0 -0
  95. /package/lib/{src/components → components}/ResourceCRUD/list/index.d.ts +0 -0
  96. /package/lib/{src/components → components}/ResourceCRUD/show/index.d.ts +0 -0
  97. /package/lib/{src/components → components}/ResourceFiledDisplays.d.ts +0 -0
  98. /package/lib/{src/components → components}/ResourceLink/index.d.ts +0 -0
  99. /package/lib/{src/components → components}/ResourceSelect/index.d.ts +0 -0
  100. /package/lib/{src/components → components}/ResourceUsageBar/index.d.ts +0 -0
  101. /package/lib/{src/components → components}/Separator/index.d.ts +0 -0
  102. /package/lib/{src/components → components}/ServiceComponents/index.d.ts +0 -0
  103. /package/lib/{src/components → components}/Shell/ShellToolbar.d.ts +0 -0
  104. /package/lib/{src/components → components}/Shell/index.d.ts +0 -0
  105. /package/lib/{src/components → components}/ShowContent/ShowContent.d.ts +0 -0
  106. /package/lib/{src/components → components}/ShowContent/fields.d.ts +0 -0
  107. /package/lib/{src/components → components}/ShowContent/groups.d.ts +0 -0
  108. /package/lib/{src/components → components}/ShowContent/index.d.ts +0 -0
  109. /package/lib/{src/components → components}/ShowContent/tabs.d.ts +0 -0
  110. /package/lib/{src/components → components}/StateTag/StateTag.d.ts +0 -0
  111. /package/lib/{src/components → components}/StateTag/index.d.ts +0 -0
  112. /package/lib/{src/components → components}/Table/TableToolBar.d.ts +0 -0
  113. /package/lib/{src/components → components}/Table/TableWidgets.d.ts +0 -0
  114. /package/lib/{src/components → components}/Table/index.d.ts +0 -0
  115. /package/lib/{src/components → components}/Tabs/index.d.ts +0 -0
  116. /package/lib/{src/components → components}/Tags/index.d.ts +0 -0
  117. /package/lib/{src/components → components}/TextTags/index.d.ts +0 -0
  118. /package/lib/{src/components → components}/Time/index.d.ts +0 -0
  119. /package/lib/{src/components → components}/ValueDisplay/index.d.ts +0 -0
  120. /package/lib/{src/components → components}/WorkloadDropdown/index.d.ts +0 -0
  121. /package/lib/{src/components → components}/WorkloadPodsTable/WorkloadPodsTable.d.ts +0 -0
  122. /package/lib/{src/components → components}/WorkloadPodsTable/index.d.ts +0 -0
  123. /package/lib/{src/components → components}/WorkloadReplicas/index.d.ts +0 -0
  124. /package/lib/{src/components → components}/YamlEditor/MonacoYamlDiffEditor.d.ts +0 -0
  125. /package/lib/{src/components → components}/YamlEditor/MonacoYamlEditor.d.ts +0 -0
  126. /package/lib/{src/components → components}/YamlEditor/YamlEditorComponent.d.ts +0 -0
  127. /package/lib/{src/components → components}/YamlEditor/index.d.ts +0 -0
  128. /package/lib/{src/components → components}/YamlEditor/style.d.ts +0 -0
  129. /package/lib/{src/components → components}/YamlEditor/yaml.worker.d.ts +0 -0
  130. /package/lib/{src/constants → constants}/auth.d.ts +0 -0
  131. /package/lib/{src/constants → constants}/index.d.ts +0 -0
  132. /package/lib/{src/constants → constants}/state.d.ts +0 -0
  133. /package/lib/{src/contexts → contexts}/component.d.ts +0 -0
  134. /package/lib/{src/contexts → contexts}/configs.d.ts +0 -0
  135. /package/lib/{src/contexts → contexts}/global-store.d.ts +0 -0
  136. /package/lib/{src/contexts → contexts}/index.d.ts +0 -0
  137. /package/lib/{src/hooks → hooks}/index.d.ts +0 -0
  138. /package/lib/{src/hooks → hooks}/useDeleteModal/index.d.ts +0 -0
  139. /package/lib/{src/hooks → hooks}/useDeleteModal/useDeleteManyModal.d.ts +0 -0
  140. /package/lib/{src/hooks → hooks}/useDownloadYAML.d.ts +0 -0
  141. /package/lib/{src/hooks → hooks}/useEagleTable/columns.d.ts +0 -0
  142. /package/lib/{src/hooks → hooks}/useEagleTable/index.d.ts +0 -0
  143. /package/lib/{src/hooks → hooks}/useEagleTable/useEagleTable.d.ts +0 -0
  144. /package/lib/{src/hooks → hooks}/useEdit.d.ts +0 -0
  145. /package/lib/{src/hooks → hooks}/useGlobalStore.d.ts +0 -0
  146. /package/lib/{src/hooks → hooks}/useK8sYamlEditor.d.ts +0 -0
  147. /package/lib/{src/hooks → hooks}/useNamespaceRefineFilter.d.ts +0 -0
  148. /package/lib/{src/hooks → hooks}/useOpenForm.d.ts +0 -0
  149. /package/lib/{src/hooks → hooks}/useSubmitForm.d.ts +0 -0
  150. /package/lib/{src/hooks → hooks}/useTableData.d.ts +0 -0
  151. /package/lib/{src/index.d.ts → index.d.ts} +0 -0
  152. /package/lib/{src/locales → locales}/index.d.ts +0 -0
  153. /package/lib/{src/main.d.ts → main.d.ts} +0 -0
  154. /package/lib/{src/models → models}/cronjob-model.d.ts +0 -0
  155. /package/lib/{src/models → models}/daemonset-model.d.ts +0 -0
  156. /package/lib/{src/models → models}/deployment-model.d.ts +0 -0
  157. /package/lib/{src/models → models}/event-model.d.ts +0 -0
  158. /package/lib/{src/models → models}/index.d.ts +0 -0
  159. /package/lib/{src/models → models}/ingress-model.d.ts +0 -0
  160. /package/lib/{src/models → models}/job-model.d.ts +0 -0
  161. /package/lib/{src/models → models}/network-policy-model.d.ts +0 -0
  162. /package/lib/{src/models → models}/node-model.d.ts +0 -0
  163. /package/lib/{src/models → models}/persistent-volume-claim.d.ts +0 -0
  164. /package/lib/{src/models → models}/persistent-volume.d.ts +0 -0
  165. /package/lib/{src/models → models}/pod-metrics-model.d.ts +0 -0
  166. /package/lib/{src/models → models}/pod-model.d.ts +0 -0
  167. /package/lib/{src/models → models}/service-model.d.ts +0 -0
  168. /package/lib/{src/models → models}/statefulset-model.d.ts +0 -0
  169. /package/lib/{src/models → models}/storage-class.d.ts +0 -0
  170. /package/lib/{src/models → models}/types/index.d.ts +0 -0
  171. /package/lib/{src/models → models}/types/metric.d.ts +0 -0
  172. /package/lib/{src/models → models}/workload-base-model.d.ts +0 -0
  173. /package/lib/{src/models → models}/workload-model.d.ts +0 -0
  174. /package/lib/{src/pages → pages}/configmaps/index.d.ts +0 -0
  175. /package/lib/{src/pages → pages}/cronjobs/create/index.d.ts +0 -0
  176. /package/lib/{src/pages → pages}/cronjobs/index.d.ts +0 -0
  177. /package/lib/{src/pages → pages}/cronjobs/list/index.d.ts +0 -0
  178. /package/lib/{src/pages → pages}/cronjobs/show/index.d.ts +0 -0
  179. /package/lib/{src/pages → pages}/daemonsets/create/index.d.ts +0 -0
  180. /package/lib/{src/pages → pages}/daemonsets/index.d.ts +0 -0
  181. /package/lib/{src/pages → pages}/daemonsets/list/index.d.ts +0 -0
  182. /package/lib/{src/pages → pages}/daemonsets/show/index.d.ts +0 -0
  183. /package/lib/{src/pages → pages}/deployments/index.d.ts +0 -0
  184. /package/lib/{src/pages → pages}/deployments/list/index.d.ts +0 -0
  185. /package/lib/{src/pages → pages}/deployments/show/index.d.ts +0 -0
  186. /package/lib/{src/pages → pages}/ingresses/index.d.ts +0 -0
  187. /package/lib/{src/pages → pages}/jobs/index.d.ts +0 -0
  188. /package/lib/{src/pages → pages}/networkPolicies/index.d.ts +0 -0
  189. /package/lib/{src/pages → pages}/nodes/index.d.ts +0 -0
  190. /package/lib/{src/pages → pages}/nodes/list/index.d.ts +0 -0
  191. /package/lib/{src/pages → pages}/nodes/show/index.d.ts +0 -0
  192. /package/lib/{src/pages → pages}/persistentvolumeclaims/index.d.ts +0 -0
  193. /package/lib/{src/pages → pages}/persistentvolumes/index.d.ts +0 -0
  194. /package/lib/{src/pages → pages}/pods/create/index.d.ts +0 -0
  195. /package/lib/{src/pages → pages}/pods/index.d.ts +0 -0
  196. /package/lib/{src/pages → pages}/pods/list/index.d.ts +0 -0
  197. /package/lib/{src/pages → pages}/pods/show/index.d.ts +0 -0
  198. /package/lib/{src/pages → pages}/secrets/index.d.ts +0 -0
  199. /package/lib/{src/pages → pages}/services/index.d.ts +0 -0
  200. /package/lib/{src/pages → pages}/statefulsets/index.d.ts +0 -0
  201. /package/lib/{src/pages → pages}/storageclasses/form/index.d.ts +0 -0
  202. /package/lib/{src/plugins → plugins}/index.d.ts +0 -0
  203. /package/lib/{src/plugins → plugins}/model-plugin.d.ts +0 -0
  204. /package/lib/{src/plugins → plugins}/relation-plugin.d.ts +0 -0
  205. /package/lib/{src/plugins → plugins}/type.d.ts +0 -0
  206. /package/lib/{src/providers → providers}/index.d.ts +0 -0
  207. /package/lib/{src/providers → providers}/router-provider/index.d.ts +0 -0
  208. /package/lib/{src/types → types}/index.d.ts +0 -0
  209. /package/lib/{src/utils → utils}/addId.d.ts +0 -0
  210. /package/lib/{src/utils → utils}/download.d.ts +0 -0
  211. /package/lib/{src/utils → utils}/error.d.ts +0 -0
  212. /package/lib/{src/utils → utils}/form.d.ts +0 -0
  213. /package/lib/{src/utils → utils}/index.d.ts +0 -0
  214. /package/lib/{src/utils → utils}/k8s.d.ts +0 -0
  215. /package/lib/{src/utils → utils}/labels.d.ts +0 -0
  216. /package/lib/{src/utils → utils}/match-selector.d.ts +0 -0
  217. /package/lib/{src/utils → utils}/schema.d.ts +0 -0
  218. /package/lib/{src/utils → utils}/selector.d.ts +0 -0
  219. /package/lib/{src/utils → utils}/shell.d.ts +0 -0
  220. /package/lib/{src/utils → utils}/string.d.ts +0 -0
  221. /package/lib/{src/utils → utils}/time.d.ts +0 -0
  222. /package/lib/{src/utils → utils}/unit.d.ts +0 -0
  223. /package/lib/{src/utils → utils}/yaml.d.ts +0 -0
@@ -7,13 +7,13 @@ 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, useCan, useTable, useDeleteMany, CanAccess, useShow, useUpdate, useDataProvider, useRefineContext, useTranslate, useWarnAboutChange, useForm as useForm$2, flattenObjectKeys, pickNotDeprecated, useMenu, Refine } from "@refinedev/core";
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";
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, Dropdown, Menu as Menu$1, Icon as Icon$1, Divider, Modal, Link as Link$1, Tabs as Tabs$1, TabsTabPane, Row, Col, Alert, usePopModal, Fields, DonutChart, Units, SegmentControl, Checkbox, DropdownMenu, SearchInput, Token, AntdSelectOptGroup, MenuItemGroup, Layout as Layout$1, Time as Time$1, useMessage, ModalStack, KitStoreProvider } from "@cloudtower/eagle";
14
- import { 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 { omit as omit$1, merge, get as get$3, first, debounce, last, isObject as isObject$4, keyBy } from "lodash-es";
16
- import yaml from "js-yaml";
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 { first, omit as omit$1, merge, get as get$3, debounce, last, isObject as isObject$4, uniq, keyBy } from "lodash-es";
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";
19
19
  import { setDiagnosticsOptions } from "monaco-yaml";
@@ -25,308 +25,301 @@ function getDefaultExportFromCjs(x) {
25
25
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
26
26
  }
27
27
  var dayjs_min = { exports: {} };
28
- var hasRequiredDayjs_min;
29
- function requireDayjs_min() {
30
- if (hasRequiredDayjs_min)
31
- return dayjs_min.exports;
32
- hasRequiredDayjs_min = 1;
33
- (function(module, exports) {
34
- !function(t2, e2) {
35
- module.exports = e2();
36
- }(commonjsGlobal, function() {
37
- var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i = "second", s2 = "minute", u = "hour", a2 = "day", o = "week", c2 = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
38
- var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
39
- return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
40
- } }, m = function(t3, e3, n3) {
41
- var r3 = String(t3);
42
- return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
43
- }, v = { s: m, z: function(t3) {
44
- var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i2 = n3 % 60;
45
- return (e3 <= 0 ? "+" : "-") + m(r3, 2, "0") + ":" + m(i2, 2, "0");
46
- }, m: function t3(e3, n3) {
47
- if (e3.date() < n3.date())
48
- return -t3(n3, e3);
49
- var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i2 = e3.clone().add(r3, c2), s3 = n3 - i2 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
50
- return +(-(r3 + (n3 - i2) / (s3 ? i2 - u2 : u2 - i2)) || 0);
51
- }, a: function(t3) {
52
- return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
53
- }, p: function(t3) {
54
- return { M: c2, y: h, w: o, d: a2, D: d, h: u, m: s2, s: i, ms: r2, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
55
- }, u: function(t3) {
56
- return void 0 === t3;
57
- } }, g = "en", D = {};
58
- D[g] = M;
59
- var p = "$isDayjsObject", S = function(t3) {
60
- return t3 instanceof _ || !(!t3 || !t3[p]);
61
- }, w = function t3(e3, n3, r3) {
62
- var i2;
63
- if (!e3)
64
- return g;
65
- if ("string" == typeof e3) {
66
- var s3 = e3.toLowerCase();
67
- D[s3] && (i2 = s3), n3 && (D[s3] = n3, i2 = s3);
68
- var u2 = e3.split("-");
69
- if (!i2 && u2.length > 1)
70
- return t3(u2[0]);
71
- } else {
72
- var a3 = e3.name;
73
- D[a3] = e3, i2 = a3;
74
- }
75
- return !r3 && i2 && (g = i2), i2 || !r3 && g;
76
- }, O = function(t3, e3) {
77
- if (S(t3))
78
- return t3.clone();
79
- var n3 = "object" == typeof e3 ? e3 : {};
80
- return n3.date = t3, n3.args = arguments, new _(n3);
81
- }, b = v;
82
- b.l = w, b.i = S, b.w = function(t3, e3) {
83
- return O(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
84
- };
85
- var _ = function() {
86
- function M2(t3) {
87
- this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
88
- }
89
- var m2 = M2.prototype;
90
- return m2.parse = function(t3) {
91
- this.$d = function(t4) {
92
- var e3 = t4.date, n3 = t4.utc;
93
- if (null === e3)
94
- return /* @__PURE__ */ new Date(NaN);
95
- if (b.u(e3))
96
- return /* @__PURE__ */ new Date();
97
- if (e3 instanceof Date)
98
- return new Date(e3);
99
- if ("string" == typeof e3 && !/Z$/i.test(e3)) {
100
- var r3 = e3.match($);
101
- if (r3) {
102
- var i2 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
103
- return n3 ? new Date(Date.UTC(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
104
- }
105
- }
28
+ (function(module, exports) {
29
+ !function(t2, e2) {
30
+ module.exports = e2();
31
+ }(commonjsGlobal, function() {
32
+ var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i = "second", s2 = "minute", u = "hour", a2 = "day", o = "week", c2 = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
33
+ var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
34
+ return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
35
+ } }, m = function(t3, e3, n3) {
36
+ var r3 = String(t3);
37
+ return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
38
+ }, v = { s: m, z: function(t3) {
39
+ var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i2 = n3 % 60;
40
+ return (e3 <= 0 ? "+" : "-") + m(r3, 2, "0") + ":" + m(i2, 2, "0");
41
+ }, m: function t3(e3, n3) {
42
+ if (e3.date() < n3.date())
43
+ return -t3(n3, e3);
44
+ var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i2 = e3.clone().add(r3, c2), s3 = n3 - i2 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
45
+ return +(-(r3 + (n3 - i2) / (s3 ? i2 - u2 : u2 - i2)) || 0);
46
+ }, a: function(t3) {
47
+ return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
48
+ }, p: function(t3) {
49
+ return { M: c2, y: h, w: o, d: a2, D: d, h: u, m: s2, s: i, ms: r2, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
50
+ }, u: function(t3) {
51
+ return void 0 === t3;
52
+ } }, g = "en", D = {};
53
+ D[g] = M;
54
+ var p = "$isDayjsObject", S = function(t3) {
55
+ return t3 instanceof _ || !(!t3 || !t3[p]);
56
+ }, w = function t3(e3, n3, r3) {
57
+ var i2;
58
+ if (!e3)
59
+ return g;
60
+ if ("string" == typeof e3) {
61
+ var s3 = e3.toLowerCase();
62
+ D[s3] && (i2 = s3), n3 && (D[s3] = n3, i2 = s3);
63
+ var u2 = e3.split("-");
64
+ if (!i2 && u2.length > 1)
65
+ return t3(u2[0]);
66
+ } else {
67
+ var a3 = e3.name;
68
+ D[a3] = e3, i2 = a3;
69
+ }
70
+ return !r3 && i2 && (g = i2), i2 || !r3 && g;
71
+ }, O = function(t3, e3) {
72
+ if (S(t3))
73
+ return t3.clone();
74
+ var n3 = "object" == typeof e3 ? e3 : {};
75
+ return n3.date = t3, n3.args = arguments, new _(n3);
76
+ }, b = v;
77
+ b.l = w, b.i = S, b.w = function(t3, e3) {
78
+ return O(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
79
+ };
80
+ var _ = function() {
81
+ function M2(t3) {
82
+ this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
83
+ }
84
+ var m2 = M2.prototype;
85
+ return m2.parse = function(t3) {
86
+ this.$d = function(t4) {
87
+ var e3 = t4.date, n3 = t4.utc;
88
+ if (null === e3)
89
+ return /* @__PURE__ */ new Date(NaN);
90
+ if (b.u(e3))
91
+ return /* @__PURE__ */ new Date();
92
+ if (e3 instanceof Date)
106
93
  return new Date(e3);
107
- }(t3), this.init();
108
- }, m2.init = function() {
109
- var t3 = this.$d;
110
- this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
111
- }, m2.$utils = function() {
112
- return b;
113
- }, m2.isValid = function() {
114
- return !(this.$d.toString() === l);
115
- }, m2.isSame = function(t3, e3) {
116
- var n3 = O(t3);
117
- return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
118
- }, m2.isAfter = function(t3, e3) {
119
- return O(t3) < this.startOf(e3);
120
- }, m2.isBefore = function(t3, e3) {
121
- return this.endOf(e3) < O(t3);
122
- }, m2.$g = function(t3, e3, n3) {
123
- return b.u(t3) ? this[e3] : this.set(n3, t3);
124
- }, m2.unix = function() {
125
- return Math.floor(this.valueOf() / 1e3);
126
- }, m2.valueOf = function() {
127
- return this.$d.getTime();
128
- }, m2.startOf = function(t3, e3) {
129
- var n3 = this, r3 = !!b.u(e3) || e3, f2 = b.p(t3), l2 = function(t4, e4) {
130
- var i2 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
131
- return r3 ? i2 : i2.endOf(a2);
132
- }, $2 = function(t4, e4) {
133
- return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
134
- }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
135
- switch (f2) {
136
- case h:
137
- return r3 ? l2(1, 0) : l2(31, 11);
138
- case c2:
139
- return r3 ? l2(1, M3) : l2(0, M3 + 1);
140
- case o:
141
- var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
142
- return l2(r3 ? m3 - D2 : m3 + (6 - D2), M3);
143
- case a2:
144
- case d:
145
- return $2(v2 + "Hours", 0);
146
- case u:
147
- return $2(v2 + "Minutes", 1);
148
- case s2:
149
- return $2(v2 + "Seconds", 2);
150
- case i:
151
- return $2(v2 + "Milliseconds", 3);
152
- default:
153
- return this.clone();
154
- }
155
- }, m2.endOf = function(t3) {
156
- return this.startOf(t3, false);
157
- }, m2.$set = function(t3, e3) {
158
- var n3, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a2] = f2 + "Date", n3[d] = f2 + "Date", n3[c2] = f2 + "Month", n3[h] = f2 + "FullYear", n3[u] = f2 + "Hours", n3[s2] = f2 + "Minutes", n3[i] = f2 + "Seconds", n3[r2] = f2 + "Milliseconds", n3)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
159
- if (o2 === c2 || o2 === h) {
160
- var y2 = this.clone().set(d, 1);
161
- y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
162
- } else
163
- l2 && this.$d[l2]($2);
164
- return this.init(), this;
165
- }, m2.set = function(t3, e3) {
166
- return this.clone().$set(t3, e3);
167
- }, m2.get = function(t3) {
168
- return this[b.p(t3)]();
169
- }, m2.add = function(r3, f2) {
170
- var d2, l2 = this;
171
- r3 = Number(r3);
172
- var $2 = b.p(f2), y2 = function(t3) {
173
- var e3 = O(l2);
174
- return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
175
- };
176
- if ($2 === c2)
177
- return this.set(c2, this.$M + r3);
178
- if ($2 === h)
179
- return this.set(h, this.$y + r3);
180
- if ($2 === a2)
181
- return y2(1);
182
- if ($2 === o)
183
- return y2(7);
184
- var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i] = t2, d2)[$2] || 1, m3 = this.$d.getTime() + r3 * M3;
185
- return b.w(m3, this);
186
- }, m2.subtract = function(t3, e3) {
187
- return this.add(-1 * t3, e3);
188
- }, m2.format = function(t3) {
189
- var e3 = this, n3 = this.$locale();
190
- if (!this.isValid())
191
- return n3.invalidDate || l;
192
- var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s3 = this.$H, u2 = this.$m, a3 = this.$M, o2 = n3.weekdays, c3 = n3.months, f2 = n3.meridiem, h2 = function(t4, n4, i3, s4) {
193
- return t4 && (t4[n4] || t4(e3, r3)) || i3[n4].slice(0, s4);
194
- }, d2 = function(t4) {
195
- return b.s(s3 % 12 || 12, t4, "0");
196
- }, $2 = f2 || function(t4, e4, n4) {
197
- var r4 = t4 < 12 ? "AM" : "PM";
198
- return n4 ? r4.toLowerCase() : r4;
199
- };
200
- return r3.replace(y, function(t4, r4) {
201
- return r4 || function(t5) {
202
- switch (t5) {
203
- case "YY":
204
- return String(e3.$y).slice(-2);
205
- case "YYYY":
206
- return b.s(e3.$y, 4, "0");
207
- case "M":
208
- return a3 + 1;
209
- case "MM":
210
- return b.s(a3 + 1, 2, "0");
211
- case "MMM":
212
- return h2(n3.monthsShort, a3, c3, 3);
213
- case "MMMM":
214
- return h2(c3, a3);
215
- case "D":
216
- return e3.$D;
217
- case "DD":
218
- return b.s(e3.$D, 2, "0");
219
- case "d":
220
- return String(e3.$W);
221
- case "dd":
222
- return h2(n3.weekdaysMin, e3.$W, o2, 2);
223
- case "ddd":
224
- return h2(n3.weekdaysShort, e3.$W, o2, 3);
225
- case "dddd":
226
- return o2[e3.$W];
227
- case "H":
228
- return String(s3);
229
- case "HH":
230
- return b.s(s3, 2, "0");
231
- case "h":
232
- return d2(1);
233
- case "hh":
234
- return d2(2);
235
- case "a":
236
- return $2(s3, u2, true);
237
- case "A":
238
- return $2(s3, u2, false);
239
- case "m":
240
- return String(u2);
241
- case "mm":
242
- return b.s(u2, 2, "0");
243
- case "s":
244
- return String(e3.$s);
245
- case "ss":
246
- return b.s(e3.$s, 2, "0");
247
- case "SSS":
248
- return b.s(e3.$ms, 3, "0");
249
- case "Z":
250
- return i2;
251
- }
252
- return null;
253
- }(t4) || i2.replace(":", "");
254
- });
255
- }, m2.utcOffset = function() {
256
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
257
- }, m2.diff = function(r3, d2, l2) {
258
- var $2, y2 = this, M3 = b.p(d2), m3 = O(r3), v2 = (m3.utcOffset() - this.utcOffset()) * e2, g2 = this - m3, D2 = function() {
259
- return b.m(y2, m3);
260
- };
261
- switch (M3) {
262
- case h:
263
- $2 = D2() / 12;
264
- break;
265
- case c2:
266
- $2 = D2();
267
- break;
268
- case f:
269
- $2 = D2() / 3;
270
- break;
271
- case o:
272
- $2 = (g2 - v2) / 6048e5;
273
- break;
274
- case a2:
275
- $2 = (g2 - v2) / 864e5;
276
- break;
277
- case u:
278
- $2 = g2 / n2;
279
- break;
280
- case s2:
281
- $2 = g2 / e2;
282
- break;
283
- case i:
284
- $2 = g2 / t2;
285
- break;
286
- default:
287
- $2 = g2;
288
- }
289
- return l2 ? $2 : b.a($2);
290
- }, m2.daysInMonth = function() {
291
- return this.endOf(c2).$D;
292
- }, m2.$locale = function() {
293
- return D[this.$L];
294
- }, m2.locale = function(t3, e3) {
295
- if (!t3)
296
- return this.$L;
297
- var n3 = this.clone(), r3 = w(t3, e3, true);
298
- return r3 && (n3.$L = r3), n3;
299
- }, m2.clone = function() {
300
- return b.w(this.$d, this);
301
- }, m2.toDate = function() {
302
- return new Date(this.valueOf());
303
- }, m2.toJSON = function() {
304
- return this.isValid() ? this.toISOString() : null;
305
- }, m2.toISOString = function() {
306
- return this.$d.toISOString();
307
- }, m2.toString = function() {
308
- return this.$d.toUTCString();
309
- }, M2;
310
- }(), k = _.prototype;
311
- return O.prototype = k, [["$ms", r2], ["$s", i], ["$m", s2], ["$H", u], ["$W", a2], ["$M", c2], ["$y", h], ["$D", d]].forEach(function(t3) {
312
- k[t3[1]] = function(e3) {
313
- return this.$g(e3, t3[0], t3[1]);
94
+ if ("string" == typeof e3 && !/Z$/i.test(e3)) {
95
+ var r3 = e3.match($);
96
+ if (r3) {
97
+ var i2 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
98
+ return n3 ? new Date(Date.UTC(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
99
+ }
100
+ }
101
+ return new Date(e3);
102
+ }(t3), this.init();
103
+ }, m2.init = function() {
104
+ var t3 = this.$d;
105
+ this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
106
+ }, m2.$utils = function() {
107
+ return b;
108
+ }, m2.isValid = function() {
109
+ return !(this.$d.toString() === l);
110
+ }, m2.isSame = function(t3, e3) {
111
+ var n3 = O(t3);
112
+ return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
113
+ }, m2.isAfter = function(t3, e3) {
114
+ return O(t3) < this.startOf(e3);
115
+ }, m2.isBefore = function(t3, e3) {
116
+ return this.endOf(e3) < O(t3);
117
+ }, m2.$g = function(t3, e3, n3) {
118
+ return b.u(t3) ? this[e3] : this.set(n3, t3);
119
+ }, m2.unix = function() {
120
+ return Math.floor(this.valueOf() / 1e3);
121
+ }, m2.valueOf = function() {
122
+ return this.$d.getTime();
123
+ }, m2.startOf = function(t3, e3) {
124
+ var n3 = this, r3 = !!b.u(e3) || e3, f2 = b.p(t3), l2 = function(t4, e4) {
125
+ var i2 = b.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
126
+ return r3 ? i2 : i2.endOf(a2);
127
+ }, $2 = function(t4, e4) {
128
+ return b.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
129
+ }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
130
+ switch (f2) {
131
+ case h:
132
+ return r3 ? l2(1, 0) : l2(31, 11);
133
+ case c2:
134
+ return r3 ? l2(1, M3) : l2(0, M3 + 1);
135
+ case o:
136
+ var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
137
+ return l2(r3 ? m3 - D2 : m3 + (6 - D2), M3);
138
+ case a2:
139
+ case d:
140
+ return $2(v2 + "Hours", 0);
141
+ case u:
142
+ return $2(v2 + "Minutes", 1);
143
+ case s2:
144
+ return $2(v2 + "Seconds", 2);
145
+ case i:
146
+ return $2(v2 + "Milliseconds", 3);
147
+ default:
148
+ return this.clone();
149
+ }
150
+ }, m2.endOf = function(t3) {
151
+ return this.startOf(t3, false);
152
+ }, m2.$set = function(t3, e3) {
153
+ var n3, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a2] = f2 + "Date", n3[d] = f2 + "Date", n3[c2] = f2 + "Month", n3[h] = f2 + "FullYear", n3[u] = f2 + "Hours", n3[s2] = f2 + "Minutes", n3[i] = f2 + "Seconds", n3[r2] = f2 + "Milliseconds", n3)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
154
+ if (o2 === c2 || o2 === h) {
155
+ var y2 = this.clone().set(d, 1);
156
+ y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
157
+ } else
158
+ l2 && this.$d[l2]($2);
159
+ return this.init(), this;
160
+ }, m2.set = function(t3, e3) {
161
+ return this.clone().$set(t3, e3);
162
+ }, m2.get = function(t3) {
163
+ return this[b.p(t3)]();
164
+ }, m2.add = function(r3, f2) {
165
+ var d2, l2 = this;
166
+ r3 = Number(r3);
167
+ var $2 = b.p(f2), y2 = function(t3) {
168
+ var e3 = O(l2);
169
+ return b.w(e3.date(e3.date() + Math.round(t3 * r3)), l2);
314
170
  };
315
- }), O.extend = function(t3, e3) {
316
- return t3.$i || (t3(e3, _, O), t3.$i = true), O;
317
- }, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
318
- return O(1e3 * t3);
319
- }, O.en = D[g], O.Ls = D, O.p = {}, O;
320
- });
321
- })(dayjs_min);
322
- return dayjs_min.exports;
323
- }
324
- var dayjs_minExports = requireDayjs_min();
171
+ if ($2 === c2)
172
+ return this.set(c2, this.$M + r3);
173
+ if ($2 === h)
174
+ return this.set(h, this.$y + r3);
175
+ if ($2 === a2)
176
+ return y2(1);
177
+ if ($2 === o)
178
+ return y2(7);
179
+ var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i] = t2, d2)[$2] || 1, m3 = this.$d.getTime() + r3 * M3;
180
+ return b.w(m3, this);
181
+ }, m2.subtract = function(t3, e3) {
182
+ return this.add(-1 * t3, e3);
183
+ }, m2.format = function(t3) {
184
+ var e3 = this, n3 = this.$locale();
185
+ if (!this.isValid())
186
+ return n3.invalidDate || l;
187
+ var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s3 = this.$H, u2 = this.$m, a3 = this.$M, o2 = n3.weekdays, c3 = n3.months, f2 = n3.meridiem, h2 = function(t4, n4, i3, s4) {
188
+ return t4 && (t4[n4] || t4(e3, r3)) || i3[n4].slice(0, s4);
189
+ }, d2 = function(t4) {
190
+ return b.s(s3 % 12 || 12, t4, "0");
191
+ }, $2 = f2 || function(t4, e4, n4) {
192
+ var r4 = t4 < 12 ? "AM" : "PM";
193
+ return n4 ? r4.toLowerCase() : r4;
194
+ };
195
+ return r3.replace(y, function(t4, r4) {
196
+ return r4 || function(t5) {
197
+ switch (t5) {
198
+ case "YY":
199
+ return String(e3.$y).slice(-2);
200
+ case "YYYY":
201
+ return b.s(e3.$y, 4, "0");
202
+ case "M":
203
+ return a3 + 1;
204
+ case "MM":
205
+ return b.s(a3 + 1, 2, "0");
206
+ case "MMM":
207
+ return h2(n3.monthsShort, a3, c3, 3);
208
+ case "MMMM":
209
+ return h2(c3, a3);
210
+ case "D":
211
+ return e3.$D;
212
+ case "DD":
213
+ return b.s(e3.$D, 2, "0");
214
+ case "d":
215
+ return String(e3.$W);
216
+ case "dd":
217
+ return h2(n3.weekdaysMin, e3.$W, o2, 2);
218
+ case "ddd":
219
+ return h2(n3.weekdaysShort, e3.$W, o2, 3);
220
+ case "dddd":
221
+ return o2[e3.$W];
222
+ case "H":
223
+ return String(s3);
224
+ case "HH":
225
+ return b.s(s3, 2, "0");
226
+ case "h":
227
+ return d2(1);
228
+ case "hh":
229
+ return d2(2);
230
+ case "a":
231
+ return $2(s3, u2, true);
232
+ case "A":
233
+ return $2(s3, u2, false);
234
+ case "m":
235
+ return String(u2);
236
+ case "mm":
237
+ return b.s(u2, 2, "0");
238
+ case "s":
239
+ return String(e3.$s);
240
+ case "ss":
241
+ return b.s(e3.$s, 2, "0");
242
+ case "SSS":
243
+ return b.s(e3.$ms, 3, "0");
244
+ case "Z":
245
+ return i2;
246
+ }
247
+ return null;
248
+ }(t4) || i2.replace(":", "");
249
+ });
250
+ }, m2.utcOffset = function() {
251
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
252
+ }, m2.diff = function(r3, d2, l2) {
253
+ var $2, y2 = this, M3 = b.p(d2), m3 = O(r3), v2 = (m3.utcOffset() - this.utcOffset()) * e2, g2 = this - m3, D2 = function() {
254
+ return b.m(y2, m3);
255
+ };
256
+ switch (M3) {
257
+ case h:
258
+ $2 = D2() / 12;
259
+ break;
260
+ case c2:
261
+ $2 = D2();
262
+ break;
263
+ case f:
264
+ $2 = D2() / 3;
265
+ break;
266
+ case o:
267
+ $2 = (g2 - v2) / 6048e5;
268
+ break;
269
+ case a2:
270
+ $2 = (g2 - v2) / 864e5;
271
+ break;
272
+ case u:
273
+ $2 = g2 / n2;
274
+ break;
275
+ case s2:
276
+ $2 = g2 / e2;
277
+ break;
278
+ case i:
279
+ $2 = g2 / t2;
280
+ break;
281
+ default:
282
+ $2 = g2;
283
+ }
284
+ return l2 ? $2 : b.a($2);
285
+ }, m2.daysInMonth = function() {
286
+ return this.endOf(c2).$D;
287
+ }, m2.$locale = function() {
288
+ return D[this.$L];
289
+ }, m2.locale = function(t3, e3) {
290
+ if (!t3)
291
+ return this.$L;
292
+ var n3 = this.clone(), r3 = w(t3, e3, true);
293
+ return r3 && (n3.$L = r3), n3;
294
+ }, m2.clone = function() {
295
+ return b.w(this.$d, this);
296
+ }, m2.toDate = function() {
297
+ return new Date(this.valueOf());
298
+ }, m2.toJSON = function() {
299
+ return this.isValid() ? this.toISOString() : null;
300
+ }, m2.toISOString = function() {
301
+ return this.$d.toISOString();
302
+ }, m2.toString = function() {
303
+ return this.$d.toUTCString();
304
+ }, M2;
305
+ }(), k = _.prototype;
306
+ return O.prototype = k, [["$ms", r2], ["$s", i], ["$m", s2], ["$H", u], ["$W", a2], ["$M", c2], ["$y", h], ["$D", d]].forEach(function(t3) {
307
+ k[t3[1]] = function(e3) {
308
+ return this.$g(e3, t3[0], t3[1]);
309
+ };
310
+ }), O.extend = function(t3, e3) {
311
+ return t3.$i || (t3(e3, _, O), t3.$i = true), O;
312
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
313
+ return O(1e3 * t3);
314
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
315
+ });
316
+ })(dayjs_min);
317
+ var dayjs_minExports = dayjs_min.exports;
325
318
  const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
326
319
  var zh = { exports: {} };
327
320
  (function(module, exports) {
328
321
  !function(e2, _) {
329
- module.exports = _(requireDayjs_min());
322
+ module.exports = _(dayjs_minExports);
330
323
  }(commonjsGlobal, function(e2) {
331
324
  function _(e3) {
332
325
  return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
@@ -1176,6 +1169,7 @@ const pv_phase_failed$1 = "Failed";
1176
1169
  const pv_phase_pending$1 = "Pending";
1177
1170
  const exec_pod = "Execute shell";
1178
1171
  const search$1 = "Search";
1172
+ const edit_label$1 = "Edit label";
1179
1173
  const dovetail$1 = {
1180
1174
  copy: copy$2,
1181
1175
  reset_arguments: reset_arguments$1,
@@ -1347,7 +1341,8 @@ const dovetail$1 = {
1347
1341
  pv_phase_failed: pv_phase_failed$1,
1348
1342
  pv_phase_pending: pv_phase_pending$1,
1349
1343
  exec_pod,
1350
- search: search$1
1344
+ search: search$1,
1345
+ edit_label: edit_label$1
1351
1346
  };
1352
1347
  const EN = {
1353
1348
  dovetail: dovetail$1
@@ -1526,6 +1521,14 @@ const disconnected = "连接异常。";
1526
1521
  const connecting = "正在连接...";
1527
1522
  const reconnect = "重新连接";
1528
1523
  const search = "搜索";
1524
+ const edit_form = "编辑表单";
1525
+ const exit_yaml_tip = "返回编辑表单,不会保留对 YAML 文件做出的所有更改。";
1526
+ const form = "表单";
1527
+ const yaml = "YAML";
1528
+ const edit_label = "编辑标签";
1529
+ const edit_label_success_toast = "编辑资源 {{name}} 的标签成功";
1530
+ const edit_annotation = "编辑注解";
1531
+ const edit_annotation_success_toast = "编辑资源 {{name}} 的注解成功";
1529
1532
  const dovetail = {
1530
1533
  copy: copy$1,
1531
1534
  reset_arguments,
@@ -1703,7 +1706,15 @@ const dovetail = {
1703
1706
  disconnected,
1704
1707
  connecting,
1705
1708
  reconnect,
1706
- search
1709
+ search,
1710
+ edit_form,
1711
+ exit_yaml_tip,
1712
+ form,
1713
+ yaml,
1714
+ edit_label,
1715
+ edit_label_success_toast,
1716
+ edit_annotation,
1717
+ edit_annotation_success_toast
1707
1718
  };
1708
1719
  const ZH = {
1709
1720
  dovetail
@@ -5953,7 +5964,7 @@ lodash.exports;
5953
5964
  comparator = typeof comparator == "function" ? comparator : undefined$1;
5954
5965
  return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined$1, comparator);
5955
5966
  });
5956
- function uniq(array) {
5967
+ function uniq2(array) {
5957
5968
  return array && array.length ? baseUniq(array) : [];
5958
5969
  }
5959
5970
  function uniqBy(array, iteratee2) {
@@ -7615,7 +7626,7 @@ lodash.exports;
7615
7626
  lodash2.union = union;
7616
7627
  lodash2.unionBy = unionBy;
7617
7628
  lodash2.unionWith = unionWith;
7618
- lodash2.uniq = uniq;
7629
+ lodash2.uniq = uniq2;
7619
7630
  lodash2.uniqBy = uniqBy;
7620
7631
  lodash2.uniqWith = uniqWith;
7621
7632
  lodash2.unset = unset2;
@@ -8086,18 +8097,19 @@ function resolveRef(schema, schemas, options) {
8086
8097
  return schema;
8087
8098
  }
8088
8099
  class K8sOpenAPI {
8089
- constructor(resourceBasePath) {
8100
+ constructor(resourceBasePath, pathPrefix) {
8090
8101
  // private response: OpenAPIResponse | null = null;
8091
8102
  __publicField(this, "apiVersion");
8092
8103
  __publicField(this, "schemas", null);
8093
8104
  this.resourceBasePath = resourceBasePath;
8105
+ this.pathPrefix = pathPrefix;
8094
8106
  this.apiVersion = getApiVersion(resourceBasePath);
8095
8107
  }
8096
8108
  // Fetch and process OpenAPI schemas
8097
8109
  async fetch() {
8098
8110
  try {
8099
8111
  const response = await fetch(
8100
- `/api/sks/api/v1/clusters/sks-mgmt/proxy/openapi/v3${this.resourceBasePath}`
8112
+ `${this.pathPrefix}${this.resourceBasePath}`
8101
8113
  );
8102
8114
  const result = await response.json();
8103
8115
  this.schemas = Object.values(result.components.schemas);
@@ -8142,6 +8154,9 @@ class K8sOpenAPI {
8142
8154
  });
8143
8155
  }
8144
8156
  }
8157
+ const ConstantsContext = createContext({
8158
+ schemaUrlPrefix: ""
8159
+ });
8145
8160
  function useApiGroupSchema() {
8146
8161
  const [state2, setState] = useState({
8147
8162
  schemas: null,
@@ -8149,7 +8164,7 @@ function useApiGroupSchema() {
8149
8164
  loading: false,
8150
8165
  error: null
8151
8166
  });
8152
- const fetchSchema = useCallback(async (apiGroups) => {
8167
+ const fetchSchema = useCallback(async (apiGroups, schemaUrlPrefix) => {
8153
8168
  setState((prev) => ({ ...prev, loading: true, error: null }));
8154
8169
  try {
8155
8170
  const results = await Promise.all(
@@ -8157,7 +8172,7 @@ function useApiGroupSchema() {
8157
8172
  if (state2.schemasMap[apiGroup]) {
8158
8173
  return { apiGroup, schemas: state2.schemasMap[apiGroup] };
8159
8174
  }
8160
- const openapi = new K8sOpenAPI(apiGroup);
8175
+ const openapi = new K8sOpenAPI(apiGroup, schemaUrlPrefix);
8161
8176
  const groupSchemas = await openapi.fetch();
8162
8177
  return { apiGroup, schemas: groupSchemas || [] };
8163
8178
  })
@@ -8180,18 +8195,19 @@ function useApiGroupSchema() {
8180
8195
  return { ...state2, fetchSchema };
8181
8196
  }
8182
8197
  function useSchema(options) {
8183
- var _a;
8198
+ var _a, _b;
8184
8199
  const [schema, setSchema] = useState(null);
8185
8200
  const [loading, setLoading] = useState(false);
8186
8201
  const [error, setError] = useState(null);
8187
8202
  const useResourceResult = useResource();
8188
8203
  const resource = (options == null ? void 0 : options.resource) || useResourceResult.resource;
8204
+ const { schemaUrlPrefix } = useContext(ConstantsContext);
8189
8205
  const openapi = useMemo(
8190
8206
  () => {
8191
8207
  var _a2;
8192
- return new K8sOpenAPI((_a2 = resource == null ? void 0 : resource.meta) == null ? void 0 : _a2.resourceBasePath);
8208
+ return new K8sOpenAPI((_a2 = resource == null ? void 0 : resource.meta) == null ? void 0 : _a2.resourceBasePath, schemaUrlPrefix);
8193
8209
  },
8194
- [(_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.resourceBasePath]
8210
+ [(_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.resourceBasePath, schemaUrlPrefix]
8195
8211
  );
8196
8212
  const fetchSchema = useCallback(async () => {
8197
8213
  var _a2;
@@ -8207,7 +8223,7 @@ function useSchema(options) {
8207
8223
  } finally {
8208
8224
  setLoading(false);
8209
8225
  }
8210
- }, [resource, openapi]);
8226
+ }, [(_b = resource == null ? void 0 : resource.meta) == null ? void 0 : _b.kind, openapi]);
8211
8227
  useEffect(() => {
8212
8228
  if (options == null ? void 0 : options.skip)
8213
8229
  return;
@@ -8246,11 +8262,13 @@ var cx = function cx2() {
8246
8262
  };
8247
8263
  var cx_default = cx;
8248
8264
  const ConfigsContext = createContext({});
8249
- const useDeleteModal_vv2pzj = "";
8265
+ const modal_1eijuvm = "";
8266
+ const FullscreenModalStyle = "fq4465w";
8267
+ const SmallModalStyle = "s1nc293e";
8268
+ const useDeleteModal_mi8he5 = "";
8250
8269
  const TextStyle = "t1vq0ett";
8251
8270
  const TipStyle = "t139onst";
8252
8271
  const NameStyle$1 = "n18lzor8";
8253
- const ModalStyle = "mvvgkkc";
8254
8272
  const useDeleteModal = (resource) => {
8255
8273
  const configs = useContext(ConfigsContext);
8256
8274
  const config = configs[resource];
@@ -8265,7 +8283,7 @@ const useDeleteModal = (resource) => {
8265
8283
  t: t2
8266
8284
  } = useTranslation();
8267
8285
  const modalProps = {
8268
- className: ModalStyle,
8286
+ className: SmallModalStyle,
8269
8287
  title: t2("dovetail.delete_resource", {
8270
8288
  resource: config.kind
8271
8289
  }),
@@ -8346,7 +8364,7 @@ const useDeleteModal = (resource) => {
8346
8364
  openDeleteConfirmModal
8347
8365
  };
8348
8366
  };
8349
- const index_wrn16i = "";
8367
+ const index_18b69qa = "";
8350
8368
  const EMPTY_VALUES = [void 0, null, "", "-"];
8351
8369
  const EmptyStyle = "e5223w8";
8352
8370
  const ContentStyle$2 = "cdjsw14";
@@ -8358,7 +8376,7 @@ function ValueDisplay(props) {
8358
8376
  style
8359
8377
  } = props;
8360
8378
  return EMPTY_VALUES.includes(value2) ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
8361
- className: cx_default(EmptyStyle, className),
8379
+ className: cx_default(EmptyStyle, "empty-text", className),
8362
8380
  style,
8363
8381
  children: "-"
8364
8382
  }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
@@ -8430,7 +8448,7 @@ function DurationTime(props) {
8430
8448
  };
8431
8449
  return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: elapsedTime(value2, i18nMap).label || /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" }) });
8432
8450
  }
8433
- const index_hex8jv = "";
8451
+ const index_1xaw1mq = "";
8434
8452
  const BreadcrumbStyle = "b142d7q8";
8435
8453
  function Breadcrumb(props) {
8436
8454
  const {
@@ -8738,7 +8756,7 @@ var styled_default = process.env.NODE_ENV !== "production" ? new Proxy(styled, {
8738
8756
  return o(prop);
8739
8757
  }
8740
8758
  }) : styled;
8741
- const index_cp12i5 = "";
8759
+ const index_1q7r2i0 = "";
8742
8760
  const ErrorWrapper = /* @__PURE__ */ styled_default("div")({
8743
8761
  name: "ErrorWrapper",
8744
8762
  class: "egn3dbn",
@@ -8799,13 +8817,13 @@ const WidgetErrorContent = (props) => {
8799
8817
  })
8800
8818
  });
8801
8819
  };
8802
- const TableWidgets_ny30pi = "";
8820
+ const TableWidgets_sc2nyo = "";
8803
8821
  const AuxiliaryLine = /* @__PURE__ */ styled_default("div")({
8804
8822
  name: "AuxiliaryLine",
8805
8823
  class: "ax1qopv",
8806
8824
  propsAsIs: false
8807
8825
  });
8808
- const index_dmbxj3 = "";
8826
+ const index_dp43sd = "";
8809
8827
  const TableContainerStyle = "t1upn1sz";
8810
8828
  function Table(props) {
8811
8829
  const {
@@ -9118,6 +9136,16 @@ class ResourceModel {
9118
9136
  restore() {
9119
9137
  return this._rawYaml;
9120
9138
  }
9139
+ updateLabel(labels) {
9140
+ const newYaml = this._globalStore.restoreItem(this);
9141
+ newYaml.metadata.labels = labels;
9142
+ return newYaml;
9143
+ }
9144
+ updateAnnotation(annotations) {
9145
+ const newYaml = this._globalStore.restoreItem(this);
9146
+ newYaml.metadata.annotations = annotations;
9147
+ return newYaml;
9148
+ }
9121
9149
  }
9122
9150
  class IngressModel extends ResourceModel {
9123
9151
  constructor(_rawYaml, _globalStore) {
@@ -9614,7 +9642,7 @@ const SERVER_INSTANCE_INIT_VALUE = {
9614
9642
  }
9615
9643
  }
9616
9644
  };
9617
- const TIMESTAMP_LABEL = "sks.user.kubesmart.smtx.io/timestamp";
9645
+ const REDEPLOY_TIMESTAMP_KEY = "kubectl.kubernetes.io/restartedAt";
9618
9646
  const SECRET_OPAQUE_INIT_VALUE = {
9619
9647
  "apiVersion": "v1",
9620
9648
  "kind": "Secret",
@@ -9863,7 +9891,7 @@ class WorkloadModel extends WorkloadBaseModel {
9863
9891
  const annotations = lodashExports.get(newOne, path2, {});
9864
9892
  lodashExports.set(newOne, path2, {
9865
9893
  ...annotations,
9866
- [TIMESTAMP_LABEL]: (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d+Z$/, "Z")
9894
+ [REDEPLOY_TIMESTAMP_KEY]: (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d+Z$/, "Z")
9867
9895
  });
9868
9896
  return newOne;
9869
9897
  }
@@ -10239,7 +10267,7 @@ class PersistentVolumeClaimModel extends ResourceModel {
10239
10267
  this._rawYaml = _rawYaml;
10240
10268
  }
10241
10269
  }
10242
- const index_1lzkrja = "";
10270
+ const index_1iq0dq9 = "";
10243
10271
  const ServiceInClusterAccessComponent = ({
10244
10272
  service
10245
10273
  }) => {
@@ -10318,7 +10346,7 @@ const ServiceOutClusterAccessComponent = ({
10318
10346
  children: content || "-"
10319
10347
  });
10320
10348
  };
10321
- const index_10ylmu3 = "";
10349
+ const index_1sc40y3 = "";
10322
10350
  const TagWrapper = "t13a6vox";
10323
10351
  const TagStyle = "t12ikbmp";
10324
10352
  const Tags = (props) => {
@@ -10345,7 +10373,7 @@ const Tags = (props) => {
10345
10373
  children: tags
10346
10374
  });
10347
10375
  };
10348
- const StateTag_1wmvw42 = "";
10376
+ const StateTag_1o2atxo = "";
10349
10377
  const StateTagStyle = "s8qkbck";
10350
10378
  const StateTag = ({
10351
10379
  state: state2 = WorkloadState.UPDATING,
@@ -10430,7 +10458,7 @@ var relativeTime$1 = { exports: {} };
10430
10458
  })(relativeTime$1);
10431
10459
  var relativeTimeExports = relativeTime$1.exports;
10432
10460
  const relativeTime = /* @__PURE__ */ getDefaultExportFromCjs(relativeTimeExports);
10433
- const index_1779z85 = "";
10461
+ const index_1jgp4p8 = "";
10434
10462
  dayjs.extend(relativeTime, {
10435
10463
  thresholds: [{
10436
10464
  l: "s",
@@ -10602,7 +10630,7 @@ function download(filename, content) {
10602
10630
  function useDownloadYAML() {
10603
10631
  return function(options) {
10604
10632
  const { name: name2, item } = options;
10605
- const content = yaml.dump(item);
10633
+ const content = yaml$1.dump(item);
10606
10634
  download(`${name2}.yaml`, content);
10607
10635
  };
10608
10636
  }
@@ -10687,6 +10715,410 @@ function useOpenForm(options) {
10687
10715
  }
10688
10716
  };
10689
10717
  }
10718
+ function FormErrorAlert(props) {
10719
+ const { title, errorMsgs, style, className, isEdit } = props;
10720
+ const { i18n: i18n2 } = useTranslation();
10721
+ return errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10722
+ Alert,
10723
+ {
10724
+ message: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
10725
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title || i18n2.t(isEdit ? "dovetail.save_failed_tip" : "dovetail.create_failed_tip") }),
10726
+ errorMsgs.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
10727
+ index2 + 1 + ". ",
10728
+ " ",
10729
+ errorMsg
10730
+ ] }, errorMsg)) }) : first(errorMsgs)
10731
+ ] }),
10732
+ type: "error",
10733
+ style,
10734
+ className
10735
+ }
10736
+ ) : null;
10737
+ }
10738
+ function getCommonErrors(responseBody, i18n2) {
10739
+ var _a;
10740
+ 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))) {
10741
+ return [];
10742
+ }
10743
+ const causes = ((_a = responseBody.details) == null ? void 0 : _a.causes) || responseBody.graphQLErrors || [];
10744
+ if (causes.length) {
10745
+ return causes.map((cause) => {
10746
+ let params = {};
10747
+ let message2 = cause.message;
10748
+ try {
10749
+ const info = JSON.parse(cause.message);
10750
+ params = info.params;
10751
+ message2 = info.message;
10752
+ } catch {
10753
+ return i18n2.t(
10754
+ [
10755
+ `error.${cause.reason}`,
10756
+ `error.${cause.code}`,
10757
+ `${cause.field ? `${cause.field}: ` : ""}${message2}`
10758
+ ],
10759
+ {
10760
+ ...params,
10761
+ fallbackLng: ""
10762
+ }
10763
+ );
10764
+ }
10765
+ return i18n2.t(
10766
+ [
10767
+ `error.${cause.reason}`,
10768
+ `error.${cause.code}`,
10769
+ `${cause.field ? `${cause.field}: ` : ""}${message2}`
10770
+ ],
10771
+ {
10772
+ ...params,
10773
+ fallbackLng: ""
10774
+ }
10775
+ );
10776
+ });
10777
+ }
10778
+ return [
10779
+ i18n2.t(
10780
+ [`error.${responseBody.code}`, `error.${responseBody.reason}`, responseBody.message || ""],
10781
+ { fallbackLng: "" }
10782
+ )
10783
+ ];
10784
+ }
10785
+ function useSubmitForm(options) {
10786
+ const { formRef, onSubmitSuccess } = options;
10787
+ const { i18n: i18n2 } = useTranslation();
10788
+ const [submitting, setSubmitting] = useState(false);
10789
+ const [errorMsgs, setErrorMsgs] = useState([]);
10790
+ const reset = useCallback(() => {
10791
+ setSubmitting(false);
10792
+ setErrorMsgs([]);
10793
+ }, []);
10794
+ const onSubmit = useCallback(async () => {
10795
+ var _a;
10796
+ try {
10797
+ setSubmitting(true);
10798
+ await ((_a = formRef.current) == null ? void 0 : _a.submit());
10799
+ onSubmitSuccess == null ? void 0 : onSubmitSuccess();
10800
+ reset();
10801
+ } catch (error) {
10802
+ if (error instanceof Object) {
10803
+ if ("response" in error && error.response instanceof Response) {
10804
+ const response = error.response;
10805
+ const body = await response.json();
10806
+ setErrorMsgs(getCommonErrors(body, i18n2));
10807
+ } else if ("message" in error && typeof error.message === "string") {
10808
+ setErrorMsgs([error.message]);
10809
+ }
10810
+ }
10811
+ } finally {
10812
+ setSubmitting(false);
10813
+ }
10814
+ }, [formRef, i18n2, reset, onSubmitSuccess]);
10815
+ return {
10816
+ submitting,
10817
+ errorMsgs,
10818
+ reset,
10819
+ onSubmit
10820
+ };
10821
+ }
10822
+ const index_130sdg8 = "";
10823
+ const EditButtonStyle = "esoz3jw";
10824
+ function EditFieldModal(props) {
10825
+ const {
10826
+ title,
10827
+ formRef: form2,
10828
+ renderContent,
10829
+ fullscreen
10830
+ } = props;
10831
+ const {
10832
+ i18n: i18n2
10833
+ } = useTranslation();
10834
+ const popModal = usePopModal();
10835
+ const {
10836
+ submitting,
10837
+ errorMsgs,
10838
+ reset,
10839
+ onSubmit
10840
+ } = useSubmitForm({
10841
+ formRef: form2,
10842
+ onSubmitSuccess: () => {
10843
+ popModal();
10844
+ }
10845
+ });
10846
+ const close = useCallback(() => {
10847
+ popModal();
10848
+ reset();
10849
+ }, [reset]);
10850
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Modal, {
10851
+ className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
10852
+ title: title || i18n2.t("dovetail.edit"),
10853
+ confirmLoading: submitting,
10854
+ onOk: onSubmit,
10855
+ onCancel: close,
10856
+ okText: i18n2.t("dovetail.save"),
10857
+ normal: true,
10858
+ destroyOnClose: true,
10859
+ fullscreen,
10860
+ children: [renderContent(), /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
10861
+ style: {
10862
+ marginTop: 16
10863
+ },
10864
+ errorMsgs,
10865
+ isEdit: true
10866
+ })]
10867
+ });
10868
+ }
10869
+ function EditField(props) {
10870
+ const {
10871
+ modalProps
10872
+ } = props;
10873
+ const {
10874
+ i18n: i18n2
10875
+ } = useTranslation();
10876
+ const {
10877
+ resource
10878
+ } = useResource();
10879
+ const pushModal = usePushModal();
10880
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
10881
+ resource: resource == null ? void 0 : resource.name,
10882
+ action: AccessControlAuth.Edit,
10883
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
10884
+ className: EditButtonStyle,
10885
+ type: "link",
10886
+ onClick: () => {
10887
+ pushModal({
10888
+ component: EditFieldModal,
10889
+ props: modalProps
10890
+ });
10891
+ },
10892
+ children: i18n2.t("dovetail.edit")
10893
+ })
10894
+ });
10895
+ }
10896
+ const EditLabelForm = React__default.forwardRef(
10897
+ function EditLabelForm2(props, ref) {
10898
+ var _a;
10899
+ const { resourceModel } = props;
10900
+ const { mutateAsync } = useUpdate();
10901
+ const { t: t2 } = useTranslation();
10902
+ const [value2, setValue] = useState([]);
10903
+ const defaultValue = useMemo(() => {
10904
+ var _a2;
10905
+ return Object.keys(((_a2 = resourceModel.metadata) == null ? void 0 : _a2.labels) || {}).map((key2) => {
10906
+ var _a3, _b;
10907
+ return { key: key2, value: (_b = (_a3 = resourceModel.metadata) == null ? void 0 : _a3.labels) == null ? void 0 : _b[key2] };
10908
+ });
10909
+ }, [(_a = resourceModel.metadata) == null ? void 0 : _a.labels]);
10910
+ const submit = useCallback(() => {
10911
+ const newLabels = {};
10912
+ value2.forEach(({ key: key2, value: value22 }) => {
10913
+ newLabels[key2] = value22;
10914
+ });
10915
+ const newYaml = resourceModel.updateLabel(newLabels);
10916
+ pruneBeforeEdit(newYaml);
10917
+ return mutateAsync({
10918
+ id: resourceModel.id,
10919
+ resource: resourceModel.name || "",
10920
+ values: newYaml,
10921
+ meta: {
10922
+ resourceBasePath: resourceModel.apiVersion,
10923
+ kind: resourceModel.kind
10924
+ },
10925
+ successNotification() {
10926
+ return {
10927
+ message: t2("dovetail.edit_label_success_toast", {
10928
+ kind: resourceModel.kind,
10929
+ name: resourceModel.metadata.name,
10930
+ interpolation: {
10931
+ escapeValue: false
10932
+ }
10933
+ }),
10934
+ type: "success"
10935
+ };
10936
+ },
10937
+ errorNotification: false
10938
+ });
10939
+ }, [value2, resourceModel, mutateAsync, t2]);
10940
+ useImperativeHandle(
10941
+ ref,
10942
+ () => ({
10943
+ submit
10944
+ }),
10945
+ [submit]
10946
+ );
10947
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
10948
+ TableForm,
10949
+ {
10950
+ onBodyChange: (value22) => {
10951
+ setValue(value22);
10952
+ },
10953
+ columns: [
10954
+ {
10955
+ key: "key",
10956
+ title: "Key",
10957
+ type: "input"
10958
+ },
10959
+ {
10960
+ key: "value",
10961
+ title: "Value",
10962
+ type: "input"
10963
+ }
10964
+ ],
10965
+ disableBatchFilling: true,
10966
+ rowAddConfig: {
10967
+ addible: true
10968
+ },
10969
+ defaultData: defaultValue,
10970
+ row: {
10971
+ deletable: true
10972
+ }
10973
+ }
10974
+ );
10975
+ }
10976
+ );
10977
+ function EditLabelDropdownMenuItem(props) {
10978
+ const { formRef, resourceModel } = props;
10979
+ const { t: t2 } = useTranslation();
10980
+ const pushModal = usePushModal();
10981
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
10982
+ Menu$1.Item,
10983
+ {
10984
+ className: "ant-dropdown-menu-item",
10985
+ onClick: () => {
10986
+ const modalProps = {
10987
+ formRef,
10988
+ title: t2("dovetail.edit_label"),
10989
+ fullscreen: true,
10990
+ renderContent() {
10991
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
10992
+ EditLabelForm,
10993
+ {
10994
+ ref: formRef,
10995
+ resourceModel
10996
+ }
10997
+ );
10998
+ }
10999
+ };
11000
+ pushModal({
11001
+ component: EditFieldModal,
11002
+ props: modalProps
11003
+ });
11004
+ },
11005
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: EditPen16BlueIcon, children: t2("dovetail.edit_label") })
11006
+ }
11007
+ );
11008
+ }
11009
+ const EditAnnotationForm = React__default.forwardRef(
11010
+ function EditAnnotationForm2(props, ref) {
11011
+ var _a;
11012
+ const { resourceModel } = props;
11013
+ const { mutateAsync } = useUpdate();
11014
+ const { t: t2 } = useTranslation();
11015
+ const [value2, setValue] = useState([]);
11016
+ const defaultValue = useMemo(() => {
11017
+ var _a2;
11018
+ return Object.keys(((_a2 = resourceModel.metadata) == null ? void 0 : _a2.annotations) || {}).map((key2) => {
11019
+ var _a3, _b;
11020
+ return { key: key2, value: (_b = (_a3 = resourceModel.metadata) == null ? void 0 : _a3.annotations) == null ? void 0 : _b[key2] };
11021
+ });
11022
+ }, [(_a = resourceModel.metadata) == null ? void 0 : _a.annotations]);
11023
+ const submit = useCallback(() => {
11024
+ const newAnnotations = {};
11025
+ value2.forEach(({ key: key2, value: value22 }) => {
11026
+ newAnnotations[key2] = value22;
11027
+ });
11028
+ const newYaml = resourceModel.updateLabel(newAnnotations);
11029
+ pruneBeforeEdit(newYaml);
11030
+ return mutateAsync({
11031
+ id: resourceModel.id,
11032
+ resource: resourceModel.name || "",
11033
+ values: newYaml,
11034
+ meta: {
11035
+ resourceBasePath: resourceModel.apiVersion,
11036
+ kind: resourceModel.kind
11037
+ },
11038
+ successNotification() {
11039
+ return {
11040
+ message: t2("dovetail.edit_annotation_success_toast", {
11041
+ kind: resourceModel.kind,
11042
+ name: resourceModel.metadata.name,
11043
+ interpolation: {
11044
+ escapeValue: false
11045
+ }
11046
+ }),
11047
+ type: "success"
11048
+ };
11049
+ },
11050
+ errorNotification: false
11051
+ });
11052
+ }, [value2, resourceModel, mutateAsync, t2]);
11053
+ useImperativeHandle(
11054
+ ref,
11055
+ () => ({
11056
+ submit
11057
+ }),
11058
+ [submit]
11059
+ );
11060
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
11061
+ TableForm,
11062
+ {
11063
+ onBodyChange: (value22) => {
11064
+ setValue(value22);
11065
+ },
11066
+ columns: [
11067
+ {
11068
+ key: "key",
11069
+ title: "Key",
11070
+ type: "input"
11071
+ },
11072
+ {
11073
+ key: "value",
11074
+ title: "Value",
11075
+ type: "input"
11076
+ }
11077
+ ],
11078
+ disableBatchFilling: true,
11079
+ rowAddConfig: {
11080
+ addible: true
11081
+ },
11082
+ defaultData: defaultValue,
11083
+ row: {
11084
+ deletable: true
11085
+ }
11086
+ }
11087
+ );
11088
+ }
11089
+ );
11090
+ function EditAnnotationDropdownMenuItem(props) {
11091
+ const { formRef, resourceModel } = props;
11092
+ const { t: t2 } = useTranslation();
11093
+ const pushModal = usePushModal();
11094
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
11095
+ Menu$1.Item,
11096
+ {
11097
+ className: "ant-dropdown-menu-item",
11098
+ onClick: () => {
11099
+ const modalProps = {
11100
+ formRef,
11101
+ title: t2("dovetail.edit_annotation"),
11102
+ fullscreen: true,
11103
+ renderContent() {
11104
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
11105
+ EditAnnotationForm,
11106
+ {
11107
+ ref: formRef,
11108
+ resourceModel
11109
+ }
11110
+ );
11111
+ }
11112
+ };
11113
+ pushModal({
11114
+ component: EditFieldModal,
11115
+ props: modalProps
11116
+ });
11117
+ },
11118
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: EditPen16BlueIcon, children: t2("dovetail.edit_annotation") })
11119
+ }
11120
+ );
11121
+ }
10690
11122
  function K8sDropdown(props) {
10691
11123
  const { record, size = "normal" } = props;
10692
11124
  const { globalStore } = useGlobalStore();
@@ -10707,18 +11139,15 @@ function K8sDropdown(props) {
10707
11139
  resource: resource == null ? void 0 : resource.name,
10708
11140
  action: AccessControlAuth.Delete
10709
11141
  });
11142
+ const formRef = useRef(null);
11143
+ const editLabelMenuItem = (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(EditLabelDropdownMenuItem, { formRef, resourceModel: record }) : null;
11144
+ const editAnnotationMenuItem = (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(EditAnnotationDropdownMenuItem, { formRef, resourceModel: record }) : null;
10710
11145
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
10711
11146
  /* @__PURE__ */ jsxRuntimeExports.jsx(
10712
11147
  Dropdown,
10713
11148
  {
10714
11149
  overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu$1, { children: [
10715
- isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
10716
- Menu$1.Item,
10717
- {
10718
- onClick: openForm,
10719
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: EditPen16PrimaryIcon, children: t2("dovetail.edit_yaml") })
10720
- }
10721
- ),
11150
+ 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") }) }),
10722
11151
  /* @__PURE__ */ jsxRuntimeExports.jsx(
10723
11152
  Menu$1.Item,
10724
11153
  {
@@ -10734,6 +11163,8 @@ function K8sDropdown(props) {
10734
11163
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: Download16GradientBlueIcon, children: t2("dovetail.download_yaml") })
10735
11164
  }
10736
11165
  ),
11166
+ editLabelMenuItem,
11167
+ editAnnotationMenuItem,
10737
11168
  props.children,
10738
11169
  (canDeleteData == null ? void 0 : canDeleteData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { style: { margin: 0 } }) : null,
10739
11170
  (canDeleteData == null ? void 0 : canDeleteData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -10920,7 +11351,7 @@ const DeleteManyButton = (props) => {
10920
11351
  visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ...modalProps }) : null
10921
11352
  ] });
10922
11353
  };
10923
- const TableToolBar_4s5vf2 = "";
11354
+ const TableToolBar_nvjftd = "";
10924
11355
  const ToolbarWrapperStyle = "t1v3ienx";
10925
11356
  const ToolbarStyle$3 = "tgejfwe";
10926
11357
  const TitleStyle$2 = "tq6dc79";
@@ -10956,7 +11387,7 @@ const TableToolBar = ({
10956
11387
  }) : null]
10957
11388
  });
10958
11389
  };
10959
- const index_6qzjtx = "";
11390
+ const index_dyz3nd = "";
10960
11391
  const WrapperStyle$5 = "w16agr8o";
10961
11392
  function matchOwner(job, owner) {
10962
11393
  var _a;
@@ -11111,7 +11542,7 @@ const EventsTable = ({ uid }) => {
11111
11542
  }
11112
11543
  );
11113
11544
  };
11114
- const index_218swh = "";
11545
+ const index_mvy4dx = "";
11115
11546
  const ImageWrapperStyle = "i1u1f5zp";
11116
11547
  const ImageNames = ({
11117
11548
  value: value2,
@@ -11125,7 +11556,7 @@ const ImageNames = ({
11125
11556
  }, `${image2}-${index2}`)) : value2.join(", ")
11126
11557
  });
11127
11558
  };
11128
- const index_1m8lip = "";
11559
+ const index_14bl0m = "";
11129
11560
  const LinkStyle$1 = "lmmrm55";
11130
11561
  function LinkFallback({
11131
11562
  fullPath
@@ -11142,7 +11573,7 @@ function LinkFallback({
11142
11573
  children: fullPath
11143
11574
  });
11144
11575
  }
11145
- const index_cbhkdt = "";
11576
+ const index_x36tts = "";
11146
11577
  const LinkStyle = "l1vnw9x0";
11147
11578
  const ResourceLink = (props) => {
11148
11579
  const {
@@ -11281,7 +11712,7 @@ const IngressRulesTable = ({ ingress }) => {
11281
11712
  }
11282
11713
  );
11283
11714
  };
11284
- const KeyValue_q4vd5r = "";
11715
+ const KeyValue_18l1y97 = "";
11285
11716
  const ContentBlockStyle = "c8jy7dc";
11286
11717
  const KeyStyle = "k2sddxl";
11287
11718
  const ValueStyle$2 = "v16vicsr";
@@ -11317,7 +11748,7 @@ const KeyValue = (props) => {
11317
11748
  function toAsterisk(str) {
11318
11749
  return Array(str.length).join("*");
11319
11750
  }
11320
- const KeyValueAnnotation_1inegjq = "";
11751
+ const KeyValueAnnotation_ug7k2g = "";
11321
11752
  const WrapperStyle$4 = "w14056kz";
11322
11753
  const HeaderStyle$1 = "hisq2gt";
11323
11754
  const HeaderItemStyle = "h11urhaw";
@@ -11361,7 +11792,7 @@ function Tabs(props) {
11361
11792
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
11362
11793
  }) });
11363
11794
  }
11364
- const ShowContent_1u0cbxv = "";
11795
+ const ShowContent_11g4jr2 = "";
11365
11796
  const ShowContentWrapperStyle = "s9agep2";
11366
11797
  const BackButton = "bo89gfi";
11367
11798
  const ToolBarWrapper = "t1ohe42f";
@@ -11572,7 +12003,7 @@ const ShowContent = (props) => {
11572
12003
  }), tabs]
11573
12004
  });
11574
12005
  };
11575
- const KeyValueSecret_1ibo68a = "";
12006
+ const KeyValueSecret_c3ji18 = "";
11576
12007
  const ButtonStyle = "b11tbgf7";
11577
12008
  const GroupStyle = "gtbyh5g";
11578
12009
  function KeyValueSecret(props) {
@@ -11627,7 +12058,7 @@ function PVVolumeModeDisplay(props) {
11627
12058
  };
11628
12059
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: map[value2] || value2 });
11629
12060
  }
11630
- const WorkloadPodsTable_1giuese = "";
12061
+ const WorkloadPodsTable_975j2t = "";
11631
12062
  const WorkloadPodsTable = ({
11632
12063
  namespace: namespace2,
11633
12064
  selector,
@@ -11696,183 +12127,7 @@ const WorkloadPodsTable = ({
11696
12127
  })]
11697
12128
  });
11698
12129
  };
11699
- function FormErrorAlert(props) {
11700
- const { title, errorMsgs, style, className, isEdit } = props;
11701
- const { i18n: i18n2 } = useTranslation();
11702
- return errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
11703
- Alert,
11704
- {
11705
- message: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
11706
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title || i18n2.t(isEdit ? "dovetail.save_failed_tip" : "dovetail.create_failed_tip") }),
11707
- errorMsgs.length > 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
11708
- index2 + 1 + ". ",
11709
- " ",
11710
- errorMsg
11711
- ] }, errorMsg)) }) : first(errorMsgs)
11712
- ] }),
11713
- type: "error",
11714
- style,
11715
- className
11716
- }
11717
- ) : null;
11718
- }
11719
- function getCommonErrors(responseBody, i18n2) {
11720
- var _a;
11721
- 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))) {
11722
- return [];
11723
- }
11724
- const causes = ((_a = responseBody.details) == null ? void 0 : _a.causes) || responseBody.graphQLErrors || [];
11725
- if (causes.length) {
11726
- return causes.map((cause) => {
11727
- let params = {};
11728
- let message2 = cause.message;
11729
- try {
11730
- const info = JSON.parse(cause.message);
11731
- params = info.params;
11732
- message2 = info.message;
11733
- } catch {
11734
- return i18n2.t(
11735
- [
11736
- `error.${cause.reason}`,
11737
- `error.${cause.code}`,
11738
- `${cause.field ? `${cause.field}: ` : ""}${message2}`
11739
- ],
11740
- {
11741
- ...params,
11742
- fallbackLng: ""
11743
- }
11744
- );
11745
- }
11746
- return i18n2.t(
11747
- [
11748
- `error.${cause.reason}`,
11749
- `error.${cause.code}`,
11750
- `${cause.field ? `${cause.field}: ` : ""}${message2}`
11751
- ],
11752
- {
11753
- ...params,
11754
- fallbackLng: ""
11755
- }
11756
- );
11757
- });
11758
- }
11759
- return [
11760
- i18n2.t(
11761
- [`error.${responseBody.code}`, `error.${responseBody.reason}`, responseBody.message || ""],
11762
- { fallbackLng: "" }
11763
- )
11764
- ];
11765
- }
11766
- function useSubmitForm(options) {
11767
- const { formRef, onSubmitSuccess } = options;
11768
- const { i18n: i18n2 } = useTranslation();
11769
- const [submitting, setSubmitting] = useState(false);
11770
- const [errorMsgs, setErrorMsgs] = useState([]);
11771
- const reset = useCallback(() => {
11772
- setSubmitting(false);
11773
- setErrorMsgs([]);
11774
- }, []);
11775
- const onSubmit = useCallback(async () => {
11776
- var _a;
11777
- try {
11778
- setSubmitting(true);
11779
- await ((_a = formRef.current) == null ? void 0 : _a.submit());
11780
- onSubmitSuccess == null ? void 0 : onSubmitSuccess();
11781
- reset();
11782
- } catch (error) {
11783
- if (error instanceof Object) {
11784
- if ("response" in error && error.response instanceof Response) {
11785
- const response = error.response;
11786
- const body = await response.json();
11787
- setErrorMsgs(getCommonErrors(body, i18n2));
11788
- } else if ("message" in error && typeof error.message === "string") {
11789
- setErrorMsgs([error.message]);
11790
- }
11791
- }
11792
- } finally {
11793
- setSubmitting(false);
11794
- }
11795
- }, [formRef, i18n2, reset, onSubmitSuccess]);
11796
- return {
11797
- submitting,
11798
- errorMsgs,
11799
- reset,
11800
- onSubmit
11801
- };
11802
- }
11803
- const index_1twfoei = "";
11804
- const EditButtonStyle = "esoz3jw";
11805
- function EditFieldModal(props) {
11806
- const {
11807
- title,
11808
- formRef: form,
11809
- renderContent
11810
- } = props;
11811
- const {
11812
- i18n: i18n2
11813
- } = useTranslation();
11814
- const popModal = usePopModal();
11815
- const {
11816
- submitting,
11817
- errorMsgs,
11818
- reset,
11819
- onSubmit
11820
- } = useSubmitForm({
11821
- formRef: form,
11822
- onSubmitSuccess: () => {
11823
- popModal();
11824
- }
11825
- });
11826
- const close = useCallback(() => {
11827
- popModal();
11828
- reset();
11829
- }, [reset]);
11830
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Modal, {
11831
- className: ModalStyle,
11832
- title: title || i18n2.t("dovetail.edit"),
11833
- confirmLoading: submitting,
11834
- onOk: onSubmit,
11835
- onCancel: close,
11836
- okText: i18n2.t("dovetail.save"),
11837
- normal: true,
11838
- destroyOnClose: true,
11839
- children: [renderContent(), /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
11840
- style: {
11841
- marginTop: 16
11842
- },
11843
- errorMsgs,
11844
- isEdit: true
11845
- })]
11846
- });
11847
- }
11848
- function EditField(props) {
11849
- const {
11850
- modalProps
11851
- } = props;
11852
- const {
11853
- i18n: i18n2
11854
- } = useTranslation();
11855
- const {
11856
- resource
11857
- } = useResource();
11858
- const pushModal = usePushModal();
11859
- return /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
11860
- resource: resource == null ? void 0 : resource.name,
11861
- action: AccessControlAuth.Edit,
11862
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
11863
- className: EditButtonStyle,
11864
- type: "link",
11865
- onClick: () => {
11866
- pushModal({
11867
- component: EditFieldModal,
11868
- props: modalProps
11869
- });
11870
- },
11871
- children: i18n2.t("dovetail.edit")
11872
- })
11873
- });
11874
- }
11875
- const index_c9frt4 = "";
12130
+ const index_p1cude = "";
11876
12131
  const WorkloadReplicasWrapperStyle = "w8ychfk";
11877
12132
  const DonutChartWrapperStyle = "d1o004do";
11878
12133
  const DonutChartStyle = "dfo80qq";
@@ -17956,7 +18211,7 @@ const LogViewerBase = memo((_a) => {
17956
18211
  const LogViewer = React__default.forwardRef((props, ref) => React__default.createElement(LogViewerBase, Object.assign({ innerRef: ref }, props)));
17957
18212
  LogViewer.displayName = "LogViewer";
17958
18213
  const baseNoReset = "";
17959
- const index_jv52b6 = "";
18214
+ const index_v855ki = "";
17960
18215
  const WrapperStyle$3 = "wve7dfm";
17961
18216
  const ToolbarStyle$2 = "t9oeh3c";
17962
18217
  const ToolbarAreaStyle$1 = "t1u2zqn6";
@@ -18191,7 +18446,7 @@ const PodLogTab = (i18n2) => ({
18191
18446
  }
18192
18447
  ]
18193
18448
  });
18194
- const style_inzxm5 = "";
18449
+ const style_h6krld = "";
18195
18450
  const ToolBarStyle = "t1joof7s";
18196
18451
  const ToolBarHeaderStyle = "tti58uh";
18197
18452
  const ErrorIconStyle = "e15yt16p";
@@ -18365,7 +18620,7 @@ const MonacoYamlEditor$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
18365
18620
  __proto__: null,
18366
18621
  default: MonacoYamlEditor$1
18367
18622
  }, Symbol.toStringTag, { value: "Module" }));
18368
- const NetworkPolicyRulesViewer_13asgaq = "";
18623
+ const NetworkPolicyRulesViewer_6z3c00 = "";
18369
18624
  const EditorStyle$1 = "e1cjl2b8";
18370
18625
  const NetworkPolicyRulesViewer = ({
18371
18626
  ingressOrEgress,
@@ -18387,7 +18642,7 @@ const NetworkPolicyRulesViewer = ({
18387
18642
  }
18388
18643
  return /* @__PURE__ */ jsxRuntimeExports.jsx(MonacoYamlEditor$1, {
18389
18644
  schemas: [],
18390
- defaultValue: yaml.dump(ingressOrEgress),
18645
+ defaultValue: yaml$1.dump(ingressOrEgress),
18391
18646
  height: "300px",
18392
18647
  className: EditorStyle$1,
18393
18648
  readOnly: true,
@@ -18711,7 +18966,7 @@ const PageShow = (props) => {
18711
18966
  }, [isError, nav, resource]);
18712
18967
  return isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(Loading, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ShowContent, { ...props });
18713
18968
  };
18714
- const index_17v8shn = "";
18969
+ const index_az4wrx = "";
18715
18970
  const WrapperStyle$1 = "w1akirqw";
18716
18971
  const TitleStyle = "t30srnq";
18717
18972
  function FormLayout(props) {
@@ -31920,7 +32175,7 @@ function copy(text, options) {
31920
32175
  }
31921
32176
  var copyToClipboard$1 = copy;
31922
32177
  const copyToClipboard$2 = /* @__PURE__ */ getDefaultExportFromCjs(copyToClipboard$1);
31923
- const ShellToolbar_ox6trc = "";
32178
+ const ShellToolbar_ihg418 = "";
31924
32179
  const ToolbarStyle$1 = "tzxa6d";
31925
32180
  const ToolbarAreaStyle = "t1sxu3rr";
31926
32181
  const IconWrapperStyle = "ix8ych8";
@@ -32029,7 +32284,7 @@ function ShellToolbar(props) {
32029
32284
  });
32030
32285
  }
32031
32286
  const xterm = "";
32032
- const index_z4cp87 = "";
32287
+ const index_1bj2t02 = "";
32033
32288
  const ContainerStyle = "c1q5a2qi";
32034
32289
  const ShellStyle = "sdz5fm1";
32035
32290
  const LoadingStyle = "lbp0h2e";
@@ -32409,8 +32664,6 @@ const Shell = React__default.forwardRef(function Shell2(props, ref) {
32409
32664
  });
32410
32665
  });
32411
32666
  const GlobalStoreContext = createContext({});
32412
- const modal_7iwhwk = "";
32413
- const FullscreenModalStyle = "fq4465w";
32414
32667
  var buffer = {};
32415
32668
  var base64Js = {};
32416
32669
  base64Js.byteLength = byteLength;
@@ -34650,7 +34903,7 @@ function parseJSON(value2) {
34650
34903
  return void 0;
34651
34904
  }
34652
34905
  }
34653
- const index_1xad2h9 = "";
34906
+ const index_1jqojte = "";
34654
34907
  const SelectStyle = "sj0ggy";
34655
34908
  const DropdownStyle = "d1eo8uqs";
34656
34909
  const SearchInputStyle = "s64gojc";
@@ -34856,7 +35109,7 @@ function useNamespaceRefineFilter() {
34856
35109
  }), [nsFilters]);
34857
35110
  return filters;
34858
35111
  }
34859
- const index_hp158y = "";
35112
+ const index_1l2xllo = "";
34860
35113
  const ListPageStyle = "laykzsq";
34861
35114
  const ListContentStyle = "l1ng0psc";
34862
35115
  const TableStyle = "tj6zpn4";
@@ -34950,6 +35203,8 @@ function ResourceShow(props) {
34950
35203
  }
34951
35204
  );
34952
35205
  }
35206
+ const button_1uhn9v1 = "";
35207
+ const WarningButtonStyle = "wwyz7ti";
34953
35208
  var isCheckBoxInput = (element) => element.type === "checkbox";
34954
35209
  var isDateObject = (value2) => value2 instanceof Date;
34955
35210
  var isNullOrUndefined = (value2) => value2 == null;
@@ -36310,9 +36565,9 @@ function createFormControl(props = {}, flushRootRender) {
36310
36565
  if (field && field._f) {
36311
36566
  const fieldReference = Array.isArray(field._f.refs) ? field._f.refs[0] : field._f.ref;
36312
36567
  if (isHTMLElement(fieldReference)) {
36313
- const form = fieldReference.closest("form");
36314
- if (form) {
36315
- form.reset();
36568
+ const form2 = fieldReference.closest("form");
36569
+ if (form2) {
36570
+ form2.reset();
36316
36571
  break;
36317
36572
  }
36318
36573
  }
@@ -36527,43 +36782,41 @@ function useForm$1(props = {}) {
36527
36782
  _formControl.current.formState = getProxyFormState(formState, control);
36528
36783
  return _formControl.current;
36529
36784
  }
36530
- const RefineFormContent_1jki0fx = "";
36531
- const RefineFormContent = (props) => {
36785
+ function useFieldsConfig(config, resourceId) {
36532
36786
  var _a, _b, _c, _d;
36533
- const {
36534
- config,
36535
- formResult,
36536
- resourceId,
36537
- errorMsg
36538
- } = props;
36539
- const {
36540
- control,
36541
- getValues
36542
- } = formResult;
36543
36787
  const action = resourceId ? "edit" : "create";
36544
36788
  const listQuery = useList({
36545
36789
  resource: config == null ? void 0 : config.name,
36546
- meta: {
36547
- resourceBasePath: config == null ? void 0 : config.basePath,
36548
- kind: config == null ? void 0 : config.kind
36549
- },
36790
+ meta: { resourceBasePath: config == null ? void 0 : config.basePath, kind: config == null ? void 0 : config.kind },
36550
36791
  pagination: {
36551
36792
  mode: "off"
36552
36793
  }
36553
36794
  });
36554
36795
  const showQuery = useShow({
36555
36796
  resource: config == null ? void 0 : config.name,
36556
- meta: {
36557
- resourceBasePath: config == null ? void 0 : config.basePath,
36558
- kind: config == null ? void 0 : config.kind
36559
- },
36797
+ meta: { resourceBasePath: config == null ? void 0 : config.basePath, kind: config == null ? void 0 : config.kind },
36560
36798
  id: resourceId
36561
36799
  });
36562
- const formFieldsConfig = (_d = (_a = config == null ? void 0 : config.formConfig) == null ? void 0 : _a.fields) == null ? void 0 : _d.call(_a, {
36800
+ return (_d = (_a = config == null ? void 0 : config.formConfig) == null ? void 0 : _a.fields) == null ? void 0 : _d.call(_a, {
36563
36801
  record: (_b = showQuery.queryResult.data) == null ? void 0 : _b.data,
36564
36802
  records: ((_c = listQuery.data) == null ? void 0 : _c.data) || [],
36565
36803
  action
36566
36804
  });
36805
+ }
36806
+ const RefineFormContent_7gh3uw = "";
36807
+ const RefineFormContent = (props) => {
36808
+ const {
36809
+ config,
36810
+ formResult,
36811
+ resourceId,
36812
+ errorMsg
36813
+ } = props;
36814
+ const {
36815
+ control,
36816
+ getValues
36817
+ } = formResult;
36818
+ const action = resourceId ? "edit" : "create";
36819
+ const formFieldsConfig = useFieldsConfig(config, resourceId);
36567
36820
  const fields = formFieldsConfig == null ? void 0 : formFieldsConfig.map((c2) => {
36568
36821
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Controller, {
36569
36822
  control,
@@ -36593,7 +36846,7 @@ const RefineFormContent = (props) => {
36593
36846
  },
36594
36847
  fieldState
36595
36848
  }) => {
36596
- var _a2;
36849
+ var _a;
36597
36850
  const formValue = getValues();
36598
36851
  let ele = /* @__PURE__ */ jsxRuntimeExports.jsx(Fields.String, {
36599
36852
  placeholder: c2.placeholder,
@@ -36646,7 +36899,7 @@ const RefineFormContent = (props) => {
36646
36899
  labelCol: {
36647
36900
  flex: "0 0 216px"
36648
36901
  },
36649
- help: (_a2 = fieldState.error) == null ? void 0 : _a2.message,
36902
+ help: (_a = fieldState.error) == null ? void 0 : _a.message,
36650
36903
  validateStatus: fieldState.invalid ? "error" : void 0,
36651
36904
  children: ele
36652
36905
  }, c2.key);
@@ -37341,7 +37594,7 @@ const useRefineForm = (props) => {
37341
37594
  }, [config.formConfig, result]);
37342
37595
  return { formResult: result, responseErrorMsg };
37343
37596
  };
37344
- const index_12sfrn = "";
37597
+ const index_2ivb33 = "";
37345
37598
  const Style = "s1bsn3us";
37346
37599
  const Separator = () => {
37347
37600
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
@@ -37349,7 +37602,7 @@ const Separator = () => {
37349
37602
  });
37350
37603
  };
37351
37604
  const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
37352
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-2612b8d0.js"));
37605
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-1593cfad.js"));
37353
37606
  const YamlEditorComponent = forwardRef(
37354
37607
  function YamlEditorComponent2(props, ref) {
37355
37608
  const {
@@ -37681,7 +37934,7 @@ function generateYamlBySchema(defaultValue, schema) {
37681
37934
  return merged2;
37682
37935
  }
37683
37936
  const merged = merge2(defaultValue, typeObject);
37684
- const content = yaml.dump(merged);
37937
+ const content = yaml$1.dump(merged);
37685
37938
  return content.replace(/(')(#.+?)(')/g, "$2").replace(/( +)(#)/g, "$2$1");
37686
37939
  }
37687
37940
  const useGlobalStore = () => {
@@ -37715,8 +37968,10 @@ const useYamlForm = ({
37715
37968
  overtimeOptions,
37716
37969
  editorOptions,
37717
37970
  initialValuesForCreate,
37971
+ initialValuesForEdit,
37718
37972
  transformInitValues,
37719
- transformApplyValues
37973
+ transformApplyValues,
37974
+ rules
37720
37975
  } = {}) => {
37721
37976
  var _a;
37722
37977
  const editor = useRef(null);
@@ -37725,6 +37980,7 @@ const useYamlForm = ({
37725
37980
  const [isYamlValid, setIsYamlValid] = useState(true);
37726
37981
  const [isSchemaValid, setIsSchemaValid] = useState(true);
37727
37982
  const [editorErrors, setEditorErrors] = useState([]);
37983
+ const [rulesErrors, setRulesErrors] = useState([]);
37728
37984
  const [errorResponseBody, setErrorResponseBody] = useState(null);
37729
37985
  const useResourceResult = useResource();
37730
37986
  const { globalStore } = useGlobalStore();
@@ -37740,11 +37996,20 @@ const useYamlForm = ({
37740
37996
  const formSF = useForm$3({
37741
37997
  form: formAnt
37742
37998
  });
37743
- const { form } = formSF;
37999
+ const { form: form2 } = formSF;
37744
38000
  const { fold: fold2 } = useK8sYamlEditor();
37745
38001
  const useFormCoreResult = useForm$2({
37746
38002
  onMutationSuccess: onMutationSuccessProp ? onMutationSuccessProp : void 0,
37747
- onMutationError,
38003
+ onMutationError: (error, ...restParams) => {
38004
+ var _a2;
38005
+ const response = error.response;
38006
+ if (response && !(response == null ? void 0 : response.bodyUsed)) {
38007
+ (_a2 = response.json) == null ? void 0 : _a2.call(response).then((body) => {
38008
+ setErrorResponseBody(body);
38009
+ });
38010
+ }
38011
+ onMutationError == null ? void 0 : onMutationError(error, ...restParams);
38012
+ },
37748
38013
  redirect,
37749
38014
  action: actionFromProps,
37750
38015
  resource,
@@ -37770,30 +38035,24 @@ const useYamlForm = ({
37770
38035
  const { formLoading, onFinish, queryResult } = useFormCoreResult;
37771
38036
  const { warnWhenUnsavedChanges: warnWhenUnsavedChangesRefine, setWarnWhen } = useWarnAboutChange();
37772
38037
  const warnWhenUnsavedChanges = warnWhenUnsavedChangesProp ?? warnWhenUnsavedChangesRefine;
38038
+ const action = useMemo(
38039
+ () => actionFromProps || useResourceResult.action,
38040
+ [actionFromProps, useResourceResult.action]
38041
+ );
37773
38042
  const initialValues = useMemo(() => {
37774
38043
  var _a2;
37775
- const initialValues2 = (((_a2 = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a2.data) ? globalStore == null ? void 0 : globalStore.restoreItem(queryResult.data.data) : initialValuesForCreate) || {};
38044
+ const initialValues2 = (action === "edit" && ((_a2 = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _a2.data) ? initialValuesForEdit || (globalStore == null ? void 0 : globalStore.restoreItem(queryResult.data.data)) : initialValuesForCreate) || {};
37776
38045
  if (initialValues2) {
37777
38046
  pruneBeforeEdit(initialValues2);
37778
38047
  }
37779
38048
  return (transformInitValues == null ? void 0 : transformInitValues(initialValues2)) || initialValues2;
37780
38049
  }, [queryResult, globalStore, initialValuesForCreate, transformInitValues]);
37781
- const action = useMemo(
37782
- () => actionFromProps || useResourceResult.action,
37783
- [actionFromProps, useResourceResult.action]
37784
- );
37785
- React__default.useEffect(() => {
37786
- var _a2, _b;
37787
- const response = (_a2 = useFormCoreResult.mutationResult.error) == null ? void 0 : _a2.response;
37788
- if (response && !(response == null ? void 0 : response.bodyUsed)) {
37789
- (_b = response.json) == null ? void 0 : _b.call(response).then((body) => {
37790
- setErrorResponseBody(body);
37791
- });
37792
- }
37793
- }, [useFormCoreResult.mutationResult]);
38050
+ const finalErrors = useMemo(() => {
38051
+ return uniq([...editorErrors, ...rulesErrors]);
38052
+ }, [editorErrors, rulesErrors]);
37794
38053
  const onKeyUp = (event2) => {
37795
38054
  if (submitOnEnter && event2.key === "Enter") {
37796
- form.submit();
38055
+ form2.submit();
37797
38056
  }
37798
38057
  };
37799
38058
  const onValuesChange = (changeValues) => {
@@ -37802,14 +38061,33 @@ const useYamlForm = ({
37802
38061
  }
37803
38062
  return changeValues;
37804
38063
  };
38064
+ const validateYaml = (yamlValue) => {
38065
+ const errorMap = {};
38066
+ if (rules && isYamlValid && isSchemaValid) {
38067
+ const formValue = yaml$1.load(yamlValue || "");
38068
+ rules.forEach((rule2) => {
38069
+ const { path: path2, validators } = rule2;
38070
+ const value2 = get$3(formValue, path2);
38071
+ for (const validator of validators || []) {
38072
+ const { isValid, errorMsg } = validator(value2, formValue);
38073
+ if (!isValid) {
38074
+ errorMap[path2.join(".")] = `${errorMsg}(${path2.join(".")})`;
38075
+ break;
38076
+ }
38077
+ }
38078
+ });
38079
+ }
38080
+ setRulesErrors(uniq(Object.values(errorMap)));
38081
+ return errorMap;
38082
+ };
37805
38083
  const saveButtonProps = useMemo(
37806
38084
  () => ({
37807
38085
  loading: formLoading,
37808
38086
  onClick: () => {
37809
- form.submit();
38087
+ form2.submit();
37810
38088
  }
37811
38089
  }),
37812
- [formLoading, form]
38090
+ [formLoading, form2]
37813
38091
  );
37814
38092
  const schemas = useMemo(() => {
37815
38093
  return schema ? [schema] : [];
@@ -37818,10 +38096,10 @@ const useYamlForm = ({
37818
38096
  var _a2;
37819
38097
  return {
37820
38098
  ref: editor,
37821
- defaultValue: schema && (editorOptions == null ? void 0 : editorOptions.isGenerateAnnotations) ? generateYamlBySchema(initialValues || {}, schema) : yaml.dump(initialValues),
38099
+ defaultValue: schema && (editorOptions == null ? void 0 : editorOptions.isGenerateAnnotations) ? generateYamlBySchema(initialValues || {}, schema) : yaml$1.dump(initialValues),
37822
38100
  schemas,
37823
38101
  id: ((_a2 = useResourceResult.resource) == null ? void 0 : _a2.name) || "",
37824
- errorMsgs: editorErrors,
38102
+ errorMsgs: finalErrors,
37825
38103
  onValidate(yamlValid, schemaValid) {
37826
38104
  setIsYamlValid(yamlValid);
37827
38105
  setIsSchemaValid(schemaValid);
@@ -37831,7 +38109,7 @@ const useYamlForm = ({
37831
38109
  },
37832
38110
  onEditorCreate(editorInstance) {
37833
38111
  var _a3, _b;
37834
- const editorValue = yaml.dump(initialValues);
38112
+ const editorValue = yaml$1.dump(initialValues);
37835
38113
  (_a3 = editor.current) == null ? void 0 : _a3.setEditorValue(editorValue);
37836
38114
  (_b = editor.current) == null ? void 0 : _b.setValue(editorValue);
37837
38115
  if (action === "edit") {
@@ -37839,13 +38117,13 @@ const useYamlForm = ({
37839
38117
  }
37840
38118
  }
37841
38119
  };
37842
- }, [schema, editorOptions == null ? void 0 : editorOptions.isGenerateAnnotations, initialValues, schemas, (_a = useResourceResult.resource) == null ? void 0 : _a.name, editorErrors, action, fold2]);
38120
+ }, [schema, editorOptions == null ? void 0 : editorOptions.isGenerateAnnotations, initialValues, schemas, (_a = useResourceResult.resource) == null ? void 0 : _a.name, editorErrors, action, finalErrors, fold2]);
37843
38121
  return {
37844
38122
  form: formSF.form,
37845
38123
  formProps: {
37846
38124
  ...formSF.formProps,
37847
38125
  onFinish: (values) => {
37848
- var _a2;
38126
+ var _a2, _b;
37849
38127
  const errors = [
37850
38128
  !isYamlValid ? t2("dovetail.yaml_format_wrong") : "",
37851
38129
  !isSchemaValid ? t2("dovetail.yaml_value_wrong") : ""
@@ -37854,8 +38132,13 @@ const useYamlForm = ({
37854
38132
  setEditorErrors(errors);
37855
38133
  return;
37856
38134
  }
38135
+ const rulesErrors2 = validateYaml(((_a2 = editor.current) == null ? void 0 : _a2.getEditorValue()) || "");
38136
+ if (Object.keys(rulesErrors2).length) {
38137
+ setRulesErrors(Object.values(rulesErrors2));
38138
+ return;
38139
+ }
37857
38140
  try {
37858
- const objectValues = editor.current ? yaml.load(((_a2 = editor.current) == null ? void 0 : _a2.getEditorValue()) || "") : values;
38141
+ const objectValues = editor.current ? yaml$1.load(((_b = editor.current) == null ? void 0 : _b.getEditorValue()) || "") : values;
37859
38142
  const finalValues = (transformApplyValues == null ? void 0 : transformApplyValues(objectValues)) || objectValues;
37860
38143
  return onFinish(finalValues);
37861
38144
  } catch (error) {
@@ -37885,19 +38168,19 @@ const useYamlForm = ({
37885
38168
  switchEditor() {
37886
38169
  var _a2, _b;
37887
38170
  if (enableEditor && ((_a2 = editor.current) == null ? void 0 : _a2.getEditorValue())) {
37888
- const value2 = yaml.load((_b = editor.current) == null ? void 0 : _b.getEditorValue());
37889
- form == null ? void 0 : form.setFieldsValue(value2);
38171
+ const value2 = yaml$1.load((_b = editor.current) == null ? void 0 : _b.getEditorValue());
38172
+ form2 == null ? void 0 : form2.setFieldsValue(value2);
37890
38173
  }
37891
38174
  setEnableEditor(!enableEditor);
37892
38175
  },
37893
38176
  onFinish: async (values) => {
37894
38177
  var _a2;
37895
- const finalValues = enableEditor ? yaml.load(((_a2 = editor.current) == null ? void 0 : _a2.getEditorValue()) || "") : values ?? formSF.form.getFieldsValue(true);
38178
+ const finalValues = enableEditor ? yaml$1.load(((_a2 = editor.current) == null ? void 0 : _a2.getEditorValue()) || "") : values ?? formSF.form.getFieldsValue(true);
37896
38179
  return await onFinish(finalValues);
37897
38180
  }
37898
38181
  };
37899
38182
  };
37900
- const YamlForm_1u3sf7g = "";
38183
+ const YamlForm_1lo4xcc = "";
37901
38184
  const FormStyle = "f1aiwt90";
37902
38185
  const EditorStyle = "e1guqlj2";
37903
38186
  var SchemaStrategy = /* @__PURE__ */ ((SchemaStrategy2) => {
@@ -37916,7 +38199,8 @@ function YamlForm(props) {
37916
38199
  transformInitValues,
37917
38200
  transformApplyValues,
37918
38201
  onSaveButtonPropsChange,
37919
- onErrorsChange
38202
+ onErrorsChange,
38203
+ rules
37920
38204
  } = props;
37921
38205
  const {
37922
38206
  action: actionFromResource,
@@ -37940,7 +38224,9 @@ function YamlForm(props) {
37940
38224
  /* None */
37941
38225
  },
37942
38226
  liveMode: "off",
37943
- initialValuesForCreate: props.initialValues ?? BASE_INIT_VALUE,
38227
+ initialValuesForCreate: props.initialValuesForCreate ?? BASE_INIT_VALUE,
38228
+ initialValuesForEdit: props.initialValuesForEdit,
38229
+ rules,
37944
38230
  successNotification(data2) {
37945
38231
  var _a;
37946
38232
  return {
@@ -38035,12 +38321,39 @@ function YamlForm(props) {
38035
38321
  })
38036
38322
  });
38037
38323
  }
38038
- const FormModal_bppzr9 = "";
38324
+ const FormModal_64brhp = "";
38039
38325
  const FormDescStyle = "f1nltbcu";
38040
- const MaxWidthModalStyle = "m1qgcca6";
38041
- const ErrorStyle = "e1tl3wq2";
38326
+ const ErrorStyle = "e1qgcca6";
38327
+ const TitleWrapperStyle = "t1tl3wq2";
38328
+ function ConfirmModal({
38329
+ onOk
38330
+ }) {
38331
+ const {
38332
+ t: t2
38333
+ } = useTranslation();
38334
+ const popModal = usePopModal();
38335
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, {
38336
+ className: SmallModalStyle,
38337
+ width: "414px",
38338
+ title: t2("dovetail.edit_form"),
38339
+ okButtonProps: {
38340
+ type: "primary",
38341
+ className: WarningButtonStyle
38342
+ },
38343
+ onOk: () => {
38344
+ onOk == null ? void 0 : onOk();
38345
+ popModal();
38346
+ },
38347
+ onCancel: popModal,
38348
+ destroyOnClose: true,
38349
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
38350
+ className: Typo.Label.l2_regular,
38351
+ children: t2("dovetail.exit_yaml_tip")
38352
+ })
38353
+ });
38354
+ }
38042
38355
  function FormModal(props) {
38043
- var _a, _b, _c, _d, _e;
38356
+ var _a, _b, _c, _d, _e, _f;
38044
38357
  const {
38045
38358
  resource: resourceFromProps,
38046
38359
  id,
@@ -38055,47 +38368,60 @@ function FormModal(props) {
38055
38368
  const configs = useContext(ConfigsContext);
38056
38369
  const [yamlSaveButtonProps, setYamlSaveButtonProps] = useState({});
38057
38370
  const [isError, setIsError] = useState(false);
38371
+ const [mode, setMode] = useState(
38372
+ "form"
38373
+ /* Form */
38374
+ );
38375
+ const isYamlMode = mode === "yaml";
38058
38376
  const popModal = usePopModal();
38377
+ const pushModal = usePushModal();
38059
38378
  const config = configs[resourceFromProps || (resource == null ? void 0 : resource.name) || ""];
38379
+ const isDisabledChangeMode = (_a = config.formConfig) == null ? void 0 : _a.isDisabledChangeMode;
38060
38380
  const okText = i18n2.t(id ? "dovetail.save" : "dovetail.create");
38061
38381
  const action = id ? "edit" : "create";
38382
+ const fieldsConfig = useFieldsConfig(config, id);
38383
+ const refineFormResult = useRefineForm({
38384
+ config,
38385
+ id,
38386
+ refineProps: {
38387
+ onMutationSuccess: () => {
38388
+ popModal();
38389
+ },
38390
+ redirect: false,
38391
+ ...(_b = config.formConfig) == null ? void 0 : _b.refineCoreProps
38392
+ }
38393
+ });
38062
38394
  const yamlFormProps = useMemo(() => {
38063
38395
  var _a2, _b2, _c2;
38064
38396
  return {
38065
38397
  ...props.formProps,
38066
38398
  transformInitValues: (_a2 = config.formConfig) == null ? void 0 : _a2.transformInitValues,
38067
38399
  transformApplyValues: (_b2 = config.formConfig) == null ? void 0 : _b2.transformApplyValues,
38068
- initialValues: ((_c2 = props.formProps) == null ? void 0 : _c2.initialValues) || (config == null ? void 0 : config.initValue),
38400
+ initialValuesForCreate: isYamlMode ? refineFormResult.formResult.getValues() : ((_c2 = props.formProps) == null ? void 0 : _c2.initialValuesForCreate) || (config == null ? void 0 : config.initValue),
38401
+ initialValuesForEdit: isYamlMode ? refineFormResult.formResult.getValues() : void 0,
38069
38402
  id,
38070
38403
  action,
38071
38404
  isShowLayout: false,
38072
38405
  useFormProps: {
38073
38406
  redirect: false
38074
38407
  },
38408
+ rules: isYamlMode ? fieldsConfig == null ? void 0 : fieldsConfig.map((config2) => ({
38409
+ path: config2.path,
38410
+ validators: config2.validators
38411
+ })) : void 0,
38075
38412
  onSaveButtonPropsChange: setYamlSaveButtonProps,
38076
38413
  onErrorsChange(errors) {
38077
38414
  setIsError(!!errors.length);
38078
38415
  },
38079
38416
  onFinish: popModal
38080
38417
  };
38081
- }, [props.formProps, (_a = config.formConfig) == null ? void 0 : _a.transformInitValues, (_b = config.formConfig) == null ? void 0 : _b.transformApplyValues, config == null ? void 0 : config.initValue, id, action, popModal]);
38082
- const refineFormResult = useRefineForm({
38083
- config,
38084
- id,
38085
- refineProps: {
38086
- onMutationSuccess: () => {
38087
- popModal();
38088
- },
38089
- redirect: false,
38090
- ...(_c = config.formConfig) == null ? void 0 : _c.refineCoreProps
38091
- }
38092
- });
38093
- const isYamlForm = !((_d = config.formConfig) == null ? void 0 : _d.fields);
38418
+ }, [props.formProps, (_c = config.formConfig) == null ? void 0 : _c.transformInitValues, (_d = config.formConfig) == null ? void 0 : _d.transformApplyValues, config == null ? void 0 : config.initValue, id, action, refineFormResult.formResult, isYamlMode, fieldsConfig, popModal]);
38419
+ const isYamlForm = !((_e = config.formConfig) == null ? void 0 : _e.fields);
38094
38420
  const formEle = (() => {
38095
38421
  if (renderForm) {
38096
38422
  return renderForm(yamlFormProps);
38097
38423
  }
38098
- if (isYamlForm)
38424
+ if (isYamlForm || isYamlMode)
38099
38425
  return /* @__PURE__ */ jsxRuntimeExports.jsx(YamlForm, {
38100
38426
  ...yamlFormProps
38101
38427
  });
@@ -38106,7 +38432,7 @@ function FormModal(props) {
38106
38432
  resourceId: id
38107
38433
  });
38108
38434
  })();
38109
- const saveButtonProps = isYamlForm ? yamlSaveButtonProps : refineFormResult.formResult.saveButtonProps;
38435
+ const saveButtonProps = isYamlForm || isYamlMode ? yamlSaveButtonProps : refineFormResult.formResult.saveButtonProps;
38110
38436
  const onCancel = useCallback(() => {
38111
38437
  popModal();
38112
38438
  }, [popModal]);
@@ -38115,6 +38441,23 @@ function FormModal(props) {
38115
38441
  setIsError(false);
38116
38442
  (_a2 = saveButtonProps.onClick) == null ? void 0 : _a2.call(saveButtonProps, e2);
38117
38443
  }, [saveButtonProps]);
38444
+ const onChangeMode = useCallback((value2) => {
38445
+ if (value2 === "form") {
38446
+ pushModal({
38447
+ component: ConfirmModal,
38448
+ props: {
38449
+ onOk: () => {
38450
+ setMode(
38451
+ "form"
38452
+ /* Form */
38453
+ );
38454
+ }
38455
+ }
38456
+ });
38457
+ } else {
38458
+ setMode(value2);
38459
+ }
38460
+ }, [pushModal]);
38118
38461
  const errorText = (() => {
38119
38462
  if (!!refineFormResult.responseErrorMsg || isError) {
38120
38463
  return i18n2.t(id ? "dovetail.save_failed" : "dovetail.create_failed");
@@ -38141,16 +38484,36 @@ function FormModal(props) {
38141
38484
  return "";
38142
38485
  }, [action, config.formConfig]);
38143
38486
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Modal, {
38144
- className: cx_default(FullscreenModalStyle, isYamlForm ? "" : MaxWidthModalStyle),
38487
+ className: cx_default(FullscreenModalStyle),
38488
+ style: {
38489
+ "--max-modal-width": isYamlForm || !isDisabledChangeMode ? "1024px" : "648px"
38490
+ },
38145
38491
  width: "calc(100vw - 16px)",
38146
- title,
38492
+ title: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
38493
+ className: TitleWrapperStyle,
38494
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
38495
+ children: title
38496
+ }), !(isYamlForm || isDisabledChangeMode) ? /* @__PURE__ */ jsxRuntimeExports.jsx(SegmentControl, {
38497
+ value: mode,
38498
+ options: [{
38499
+ value: "form",
38500
+ label: i18n2.t("dovetail.form")
38501
+ }, {
38502
+ value: "yaml",
38503
+ label: i18n2.t("dovetail.yaml")
38504
+ }],
38505
+ onChange: (val) => {
38506
+ onChangeMode(val);
38507
+ }
38508
+ }) : null]
38509
+ }),
38147
38510
  error: errorText ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
38148
38511
  className: ErrorStyle,
38149
38512
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(ExclamationErrorCircleFill16RedIcon, {}), " ", errorText]
38150
38513
  }) : "",
38151
38514
  okButtonProps: {
38152
38515
  ...saveButtonProps,
38153
- children: (_e = config.formConfig) == null ? void 0 : _e.saveButtonText,
38516
+ children: (_f = config.formConfig) == null ? void 0 : _f.saveButtonText,
38154
38517
  onClick: onOk
38155
38518
  },
38156
38519
  closeIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(CloseCircleFilled$1, {}),
@@ -38164,7 +38527,7 @@ function FormModal(props) {
38164
38527
  }) : void 0, formEle]
38165
38528
  });
38166
38529
  }
38167
- const RefineFormPage_aqoiay = "";
38530
+ const RefineFormPage_1v0fhor = "";
38168
38531
  const RefineFormPage = (props) => {
38169
38532
  const {
38170
38533
  config
@@ -38290,7 +38653,7 @@ function CronJobDropdown(props) {
38290
38653
  }
38291
38654
  ) : null });
38292
38655
  }
38293
- const index_1wzdp7m = "";
38656
+ const index_sazpyf = "";
38294
38657
  const WrapperStyle = "wfg6u6g";
38295
38658
  const InnerBar = ({
38296
38659
  usage: usage2,
@@ -38365,7 +38728,7 @@ const DeleteButton = () => {
38365
38728
  visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ...modalProps }) : null
38366
38729
  ] });
38367
38730
  };
38368
- const index_1wt5px2 = "";
38731
+ const index_1tehui8 = "";
38369
38732
  const MenuStyle = "mdppgn0";
38370
38733
  const Menu = () => {
38371
38734
  const {
@@ -38390,7 +38753,7 @@ const Menu = () => {
38390
38753
  children: renderMenuItems(menuItems)
38391
38754
  });
38392
38755
  };
38393
- const index_1qxsm42 = "";
38756
+ const index_1po979g = "";
38394
38757
  const HeaderStyle = "h16z07g";
38395
38758
  const ContentLayoutStyle = "c1i80kj";
38396
38759
  const SiderStyle = "s18sezq1";
@@ -38546,7 +38909,7 @@ const IngressRulesComponent = ({ ingress }) => {
38546
38909
  });
38547
38910
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: result });
38548
38911
  };
38549
- const columns_1h38dp = "";
38912
+ const columns_irlsbh = "";
38550
38913
  const DashedTitleStyle = "dh5j833";
38551
38914
  const ServiceClusterTooltipStyle = "s1fcgan";
38552
38915
  const NameLink = (props) => {
@@ -39177,13 +39540,18 @@ const Dovetail = (props) => {
39177
39540
  const {
39178
39541
  resourcesConfig,
39179
39542
  urlPrefix = "",
39543
+ schemaUrlPrefix,
39180
39544
  Layout: Layout2,
39181
39545
  history,
39182
39546
  globalStore,
39183
39547
  accessControlProvider,
39184
- routerProvider: customRouterProvider
39548
+ routerProvider: customRouterProvider,
39549
+ antdGetPopupContainer
39185
39550
  } = props;
39186
39551
  const msg = useMessage();
39552
+ useEffect(() => {
39553
+ msg.config({ getContainer: antdGetPopupContainer });
39554
+ }, [msg, antdGetPopupContainer]);
39187
39555
  const notCustomResources = useMemo(() => {
39188
39556
  return resourcesConfig.filter((c2) => !c2.isCustom);
39189
39557
  }, [resourcesConfig]);
@@ -39215,37 +39583,48 @@ const Dovetail = (props) => {
39215
39583
  };
39216
39584
  return provider;
39217
39585
  }, [msg]);
39218
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Router, { history, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KitStoreProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConfigsContext.Provider, { value: keyBy(resourcesConfig, "name"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
39219
- Refine,
39586
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Router, { history, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KitStoreProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConfigsContext.Provider, { value: keyBy(resourcesConfig, "name"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConstantsContext.Provider, { value: { schemaUrlPrefix }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
39587
+ ConfigProvider,
39220
39588
  {
39221
- dataProvider: {
39222
- default: dataProvider(globalStore)
39589
+ antd5Configs: {
39590
+ getPopupContainer: antdGetPopupContainer || (() => document.body)
39223
39591
  },
39224
- routerProvider: customRouterProvider || routerProvider,
39225
- liveProvider: liveProvider(globalStore),
39226
- notificationProvider,
39227
- options: {
39228
- warnWhenUnsavedChanges: true,
39229
- liveMode: "auto",
39230
- disableTelemetry: true
39592
+ antd4Configs: {
39593
+ getPopupContainer: antdGetPopupContainer || (() => document.body)
39231
39594
  },
39232
- accessControlProvider,
39233
- resources: resourcesConfig.map((c2) => {
39234
- return {
39235
- name: c2.name,
39236
- meta: {
39237
- resourceBasePath: c2.basePath,
39238
- kind: c2.kind,
39239
- parent: c2.parent,
39240
- label: `${c2.kind}s`
39595
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
39596
+ Refine,
39597
+ {
39598
+ dataProvider: {
39599
+ default: dataProvider(globalStore)
39241
39600
  },
39242
- list: `${urlPrefix}/${c2.name}`,
39243
- show: `${urlPrefix}/${c2.name}/show`,
39244
- create: `${urlPrefix}/${c2.name}/create`,
39245
- edit: `${urlPrefix}/${c2.name}/edit`
39246
- };
39247
- }),
39248
- children: content
39601
+ routerProvider: customRouterProvider || routerProvider,
39602
+ liveProvider: liveProvider(globalStore),
39603
+ notificationProvider,
39604
+ options: {
39605
+ warnWhenUnsavedChanges: true,
39606
+ liveMode: "auto",
39607
+ disableTelemetry: true
39608
+ },
39609
+ accessControlProvider,
39610
+ resources: resourcesConfig.map((c2) => {
39611
+ return {
39612
+ name: c2.name,
39613
+ meta: {
39614
+ resourceBasePath: c2.basePath,
39615
+ kind: c2.kind,
39616
+ parent: c2.parent,
39617
+ label: `${c2.kind}s`
39618
+ },
39619
+ list: `${urlPrefix}/${c2.name}`,
39620
+ show: `${urlPrefix}/${c2.name}/show`,
39621
+ create: `${urlPrefix}/${c2.name}/create`,
39622
+ edit: `${urlPrefix}/${c2.name}/edit`
39623
+ };
39624
+ }),
39625
+ children: content
39626
+ }
39627
+ ) })
39249
39628
  }
39250
39629
  ) }) }) }) });
39251
39630
  };
@@ -39394,7 +39773,7 @@ const relationPlugin = new RelationPlugin();
39394
39773
  const ProviderPlugins = [relationPlugin, modelPlugin];
39395
39774
  const dovetailRefineI18n = i18n;
39396
39775
  export {
39397
- rfc1035LabelRules as $,
39776
+ NamespaceSelectWidget as $,
39398
39777
  AgeColumnRenderer as A,
39399
39778
  PVCStorageColumnRenderer as B,
39400
39779
  CommonSorter as C,
@@ -39407,200 +39786,201 @@ export {
39407
39786
  ColumnKeys as J,
39408
39787
  addDefaultRenderToColumns as K,
39409
39788
  useEagleTable as L,
39410
- ModalStyle as M,
39789
+ useDownloadYAML as M,
39411
39790
  NameColumnRenderer as N,
39412
- useDownloadYAML as O,
39791
+ useEdit as O,
39413
39792
  PlainTextNameColumnRenderer as P,
39414
- useEdit as Q,
39793
+ useGlobalStore as Q,
39415
39794
  ReplicasColumnRenderer as R,
39416
39795
  StateDisplayColumnRenderer as S,
39417
- useGlobalStore as T,
39418
- useOpenForm as U,
39419
- index as V,
39796
+ useOpenForm as T,
39797
+ index as U,
39798
+ Breadcrumb as V,
39420
39799
  WorkloadImageColumnRenderer as W,
39421
- Breadcrumb as X,
39422
- NameInputWidget as Y,
39423
- dnsSubDomainRules as Z,
39424
- rfc1123LabelRules as _,
39800
+ NameInputWidget as X,
39801
+ dnsSubDomainRules as Y,
39802
+ rfc1123LabelRules as Z,
39803
+ rfc1035LabelRules as _,
39425
39804
  useApiGroupSchema as a,
39426
- PVAccessModeField as a$,
39427
- NamespaceSelectWidget as a0,
39428
- namespaceRules as a1,
39429
- KeyValueListWidget as a2,
39430
- MetadataForm as a3,
39431
- PageShow as a4,
39432
- Time as a5,
39433
- ConditionsTable as a6,
39434
- FormErrorAlert as a7,
39435
- PodContainersTable as a8,
39436
- WorkloadDropdown as a9,
39437
- PodsField as aA,
39438
- JobsField as aB,
39439
- DataField as aC,
39440
- SecretDataField as aD,
39441
- StartTimeField as aE,
39442
- ServiceTypeField as aF,
39443
- ClusterIpField as aG,
39444
- SessionAffinityField as aH,
39445
- ServicePodsField as aI,
39446
- IngressRulesTableTabField as aJ,
39447
- EventsTableTabField as aK,
39448
- NamespaceField as aL,
39449
- AgeField as aM,
39450
- LabelsField as aN,
39451
- AnnotationsField as aO,
39452
- ServiceInnerClusterAccessField as aP,
39453
- ServiceOutClusterAccessField as aQ,
39454
- PodSelectorField as aR,
39455
- PortsTableField as aS,
39456
- DurationField as aT,
39457
- StorageClassProvisionerField as aU,
39458
- StorageClassPvField as aV,
39459
- PVCapacityField as aW,
39460
- PVCStorageField as aX,
39461
- PVStorageClassField as aY,
39462
- PVPhaseField as aZ,
39463
- PVVolumeModeField as a_,
39464
- ReplicasDropdown as aa,
39465
- PodDropdown as ab,
39466
- CreateButton as ac,
39467
- ImageNames as ad,
39468
- ResourceList as ae,
39469
- ResourceShow as af,
39470
- ResourceForm as ag,
39471
- ResourceCRUD as ah,
39472
- WorkloadPodsTable as ai,
39473
- CronJobDropdown as aj,
39474
- K8sDropdown as ak,
39475
- ResourceUsageBar as al,
39476
- WorkloadReplicasForm as am,
39477
- WorkloadReplicas as an,
39478
- CronjobJobsTable as ao,
39479
- KeyValue as ap,
39480
- KeyValueAnnotation as aq,
39481
- KeyValueSecret as ar,
39482
- Separator as as,
39483
- YamlEditorComponent as at,
39484
- DeleteButton as au,
39485
- Layout as av,
39486
- AreaType as aw,
39487
- ImageField as ax,
39488
- ReplicaField as ay,
39489
- ConditionsField as az,
39805
+ PVVolumeModeField as a$,
39806
+ namespaceRules as a0,
39807
+ KeyValueListWidget as a1,
39808
+ MetadataForm as a2,
39809
+ PageShow as a3,
39810
+ Time as a4,
39811
+ ConditionsTable as a5,
39812
+ FormErrorAlert as a6,
39813
+ PodContainersTable as a7,
39814
+ WorkloadDropdown as a8,
39815
+ ReplicasDropdown as a9,
39816
+ ConditionsField as aA,
39817
+ PodsField as aB,
39818
+ JobsField as aC,
39819
+ DataField as aD,
39820
+ SecretDataField as aE,
39821
+ StartTimeField as aF,
39822
+ ServiceTypeField as aG,
39823
+ ClusterIpField as aH,
39824
+ SessionAffinityField as aI,
39825
+ ServicePodsField as aJ,
39826
+ IngressRulesTableTabField as aK,
39827
+ EventsTableTabField as aL,
39828
+ NamespaceField as aM,
39829
+ AgeField as aN,
39830
+ LabelsField as aO,
39831
+ AnnotationsField as aP,
39832
+ ServiceInnerClusterAccessField as aQ,
39833
+ ServiceOutClusterAccessField as aR,
39834
+ PodSelectorField as aS,
39835
+ PortsTableField as aT,
39836
+ DurationField as aU,
39837
+ StorageClassProvisionerField as aV,
39838
+ StorageClassPvField as aW,
39839
+ PVCapacityField as aX,
39840
+ PVCStorageField as aY,
39841
+ PVStorageClassField as aZ,
39842
+ PVPhaseField as a_,
39843
+ PodDropdown as aa,
39844
+ CreateButton as ab,
39845
+ ImageNames as ac,
39846
+ ResourceList as ad,
39847
+ ResourceShow as ae,
39848
+ ResourceForm as af,
39849
+ ResourceCRUD as ag,
39850
+ WorkloadPodsTable as ah,
39851
+ CronJobDropdown as ai,
39852
+ K8sDropdown as aj,
39853
+ EditLabelDropdownMenuItem as ak,
39854
+ EditAnnotationDropdownMenuItem as al,
39855
+ ResourceUsageBar as am,
39856
+ WorkloadReplicasForm as an,
39857
+ WorkloadReplicas as ao,
39858
+ CronjobJobsTable as ap,
39859
+ KeyValue as aq,
39860
+ KeyValueAnnotation as ar,
39861
+ KeyValueSecret as as,
39862
+ Separator as at,
39863
+ YamlEditorComponent as au,
39864
+ DeleteButton as av,
39865
+ Layout as aw,
39866
+ AreaType as ax,
39867
+ ImageField as ay,
39868
+ ReplicaField as az,
39490
39869
  useSchema as b,
39491
- INGRESS_INIT_VALUE as b$,
39492
- EventsTab as b0,
39493
- PodLogTab as b1,
39494
- BasicGroup as b2,
39495
- PodsGroup as b3,
39496
- PodContainersGroup as b4,
39497
- ServicePodsGroup as b5,
39498
- ConditionsGroup as b6,
39499
- SecretDataGroup as b7,
39500
- JobsGroup as b8,
39501
- IngressRulesGroup as b9,
39502
- useRefineForm as bA,
39503
- ServiceInClusterAccessComponent as bB,
39504
- ServiceOutClusterAccessComponent as bC,
39505
- Tags as bD,
39506
- TextTags as bE,
39507
- PodLog as bF,
39508
- NetworkPolicyRulesViewer as bG,
39509
- PVPhaseDisplay as bH,
39510
- PVVolumeModeDisplay as bI,
39511
- Tabs as bJ,
39512
- ResourceSelect as bK,
39513
- SocketStatus as bL,
39514
- Shell as bM,
39515
- PodShellModal as bN,
39516
- PodShell as bO,
39517
- BASE_INIT_VALUE as bP,
39518
- DEPLOYMENT_INIT_VALUE as bQ,
39519
- CRONJOB_INIT_VALUE as bR,
39520
- DAEMONSET_INIT_VALUE as bS,
39521
- JOB_INIT_VALUE as bT,
39522
- STATEFULSET_INIT_VALUE as bU,
39523
- POD_INIT_VALUE as bV,
39524
- SERVICE_CLUSTER_IP_INIT_VALUE as bW,
39525
- SERVICE_NODE_PORT_INIT_VALUE as bX,
39526
- SERVICE_LOAD_BALANCER_INIT_VALUE as bY,
39527
- SERVICE_EXTERNAL_NAME_INIT_VALUE as bZ,
39528
- SERVICE_HEADLESS_INIT_VALUE as b_,
39529
- PodSelectorGroup as ba,
39530
- PortsGroup as bb,
39531
- DataGroup as bc,
39532
- NetworkPolicyIngressRulesGroup as bd,
39533
- NetworkPolicyEgressRulesGroup as be,
39534
- StorageClassPvGroup as bf,
39535
- ShowGroupComponent as bg,
39536
- ShowContent as bh,
39537
- DeleteManyButton as bi,
39538
- ListPage as bj,
39539
- StateTagStyle as bk,
39540
- StateTag as bl,
39541
- DrawerShow as bm,
39542
- Menu as bn,
39543
- EditButton as bo,
39544
- ReferenceLink as bp,
39545
- ResourceLink as bq,
39546
- NS_STORE_KEY as br,
39547
- ALL_NS as bs,
39548
- useNamespacesFilter as bt,
39549
- NamespacesFilter as bu,
39550
- FormModal as bv,
39551
- RefineFormContent as bw,
39552
- RefineFormPage as bx,
39553
- SchemaStrategy as by,
39554
- YamlForm as bz,
39870
+ SERVICE_HEADLESS_INIT_VALUE as b$,
39871
+ PVAccessModeField as b0,
39872
+ EventsTab as b1,
39873
+ PodLogTab as b2,
39874
+ BasicGroup as b3,
39875
+ PodsGroup as b4,
39876
+ PodContainersGroup as b5,
39877
+ ServicePodsGroup as b6,
39878
+ ConditionsGroup as b7,
39879
+ SecretDataGroup as b8,
39880
+ JobsGroup as b9,
39881
+ YamlForm as bA,
39882
+ useRefineForm as bB,
39883
+ ServiceInClusterAccessComponent as bC,
39884
+ ServiceOutClusterAccessComponent as bD,
39885
+ Tags as bE,
39886
+ TextTags as bF,
39887
+ PodLog as bG,
39888
+ NetworkPolicyRulesViewer as bH,
39889
+ PVPhaseDisplay as bI,
39890
+ PVVolumeModeDisplay as bJ,
39891
+ Tabs as bK,
39892
+ ResourceSelect as bL,
39893
+ SocketStatus as bM,
39894
+ Shell as bN,
39895
+ PodShellModal as bO,
39896
+ PodShell as bP,
39897
+ BASE_INIT_VALUE as bQ,
39898
+ DEPLOYMENT_INIT_VALUE as bR,
39899
+ CRONJOB_INIT_VALUE as bS,
39900
+ DAEMONSET_INIT_VALUE as bT,
39901
+ JOB_INIT_VALUE as bU,
39902
+ STATEFULSET_INIT_VALUE as bV,
39903
+ POD_INIT_VALUE as bW,
39904
+ SERVICE_CLUSTER_IP_INIT_VALUE as bX,
39905
+ SERVICE_NODE_PORT_INIT_VALUE as bY,
39906
+ SERVICE_LOAD_BALANCER_INIT_VALUE as bZ,
39907
+ SERVICE_EXTERNAL_NAME_INIT_VALUE as b_,
39908
+ IngressRulesGroup as ba,
39909
+ PodSelectorGroup as bb,
39910
+ PortsGroup as bc,
39911
+ DataGroup as bd,
39912
+ NetworkPolicyIngressRulesGroup as be,
39913
+ NetworkPolicyEgressRulesGroup as bf,
39914
+ StorageClassPvGroup as bg,
39915
+ ShowGroupComponent as bh,
39916
+ ShowContent as bi,
39917
+ DeleteManyButton as bj,
39918
+ ListPage as bk,
39919
+ StateTagStyle as bl,
39920
+ StateTag as bm,
39921
+ DrawerShow as bn,
39922
+ Menu as bo,
39923
+ EditButton as bp,
39924
+ ReferenceLink as bq,
39925
+ ResourceLink as br,
39926
+ NS_STORE_KEY as bs,
39927
+ ALL_NS as bt,
39928
+ useNamespacesFilter as bu,
39929
+ NamespacesFilter as bv,
39930
+ FormModal as bw,
39931
+ RefineFormContent as bx,
39932
+ RefineFormPage as by,
39933
+ SchemaStrategy as bz,
39555
39934
  useDeleteModal as c,
39556
- NETWORK_POLICY_INIT_VALUE as c0,
39557
- CONFIG_MAP_INIT_VALUE as c1,
39558
- SERVER_INSTANCE_INIT_VALUE as c2,
39559
- TIMESTAMP_LABEL as c3,
39560
- SECRET_OPAQUE_INIT_VALUE as c4,
39561
- SECRET_IMAGE_REPO_INIT_VALUE as c5,
39562
- SECRET_BASIC_AUTH_INIT_VALUE as c6,
39563
- SECRET_SSH_AUTH_INIT_VALUE as c7,
39564
- SECRET_TLS_INIT_VALUE as c8,
39565
- SECRET_CUSTOM_INIT_VALUE as c9,
39566
- NodeModel as cA,
39567
- StorageClassModel as cB,
39568
- PersistentVolumeModel as cC,
39569
- PersistentVolumeClaimModel as cD,
39570
- ProviderPlugins as cE,
39571
- ModelPlugin as cF,
39572
- modelPlugin as cG,
39573
- RelationPlugin as cH,
39574
- relationPlugin as cI,
39575
- generateValueFromSchema as cJ,
39576
- generateSchemaTypeValue as cK,
39577
- resolveRef as cL,
39578
- NODE_INIT_VALUE as ca,
39579
- STORAGE_CLASS_INIT_VALUE as cb,
39580
- WorkloadState as cc,
39581
- AccessControlAuth as cd,
39582
- Dovetail as ce,
39583
- RESOURCE_GROUP as cf,
39584
- FormType as cg,
39585
- ComponentContext as ch,
39586
- GlobalStoreContext as ci,
39587
- ConfigsContext as cj,
39588
- IngressModel as ck,
39589
- NetworkPolicyModel as cl,
39590
- JobModel as cm,
39591
- WorkloadModel as cn,
39592
- WorkloadBaseModel as co,
39593
- PodModel as cp,
39594
- PodMetricsModel as cq,
39595
- ResourceModel as cr,
39596
- CronJobModel as cs,
39597
- EventModel as ct,
39598
- DeploymentModel as cu,
39599
- DaemonSetModel as cv,
39600
- StatefulSetModel as cw,
39601
- ServiceTypeEnum as cx,
39602
- ServiceModel as cy,
39603
- NodeRole as cz,
39935
+ INGRESS_INIT_VALUE as c0,
39936
+ NETWORK_POLICY_INIT_VALUE as c1,
39937
+ CONFIG_MAP_INIT_VALUE as c2,
39938
+ SERVER_INSTANCE_INIT_VALUE as c3,
39939
+ REDEPLOY_TIMESTAMP_KEY as c4,
39940
+ SECRET_OPAQUE_INIT_VALUE as c5,
39941
+ SECRET_IMAGE_REPO_INIT_VALUE as c6,
39942
+ SECRET_BASIC_AUTH_INIT_VALUE as c7,
39943
+ SECRET_SSH_AUTH_INIT_VALUE as c8,
39944
+ SECRET_TLS_INIT_VALUE as c9,
39945
+ NodeRole as cA,
39946
+ NodeModel as cB,
39947
+ StorageClassModel as cC,
39948
+ PersistentVolumeModel as cD,
39949
+ PersistentVolumeClaimModel as cE,
39950
+ ProviderPlugins as cF,
39951
+ ModelPlugin as cG,
39952
+ modelPlugin as cH,
39953
+ RelationPlugin as cI,
39954
+ relationPlugin as cJ,
39955
+ generateValueFromSchema as cK,
39956
+ generateSchemaTypeValue as cL,
39957
+ resolveRef as cM,
39958
+ SECRET_CUSTOM_INIT_VALUE as ca,
39959
+ NODE_INIT_VALUE as cb,
39960
+ STORAGE_CLASS_INIT_VALUE as cc,
39961
+ WorkloadState as cd,
39962
+ AccessControlAuth as ce,
39963
+ Dovetail as cf,
39964
+ RESOURCE_GROUP as cg,
39965
+ FormType as ch,
39966
+ ComponentContext as ci,
39967
+ GlobalStoreContext as cj,
39968
+ ConfigsContext as ck,
39969
+ IngressModel as cl,
39970
+ NetworkPolicyModel as cm,
39971
+ JobModel as cn,
39972
+ WorkloadModel as co,
39973
+ WorkloadBaseModel as cp,
39974
+ PodModel as cq,
39975
+ PodMetricsModel as cr,
39976
+ ResourceModel as cs,
39977
+ CronJobModel as ct,
39978
+ EventModel as cu,
39979
+ DeploymentModel as cv,
39980
+ DaemonSetModel as cw,
39981
+ StatefulSetModel as cx,
39982
+ ServiceTypeEnum as cy,
39983
+ ServiceModel as cz,
39604
39984
  dovetailRefineI18n as d,
39605
39985
  NameSpaceColumnRenderer as e,
39606
39986
  WorkloadRestartsColumnRenderer as f,