@dovetail-v2/refine 0.0.59 → 0.0.61-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/dist/{MonacoYamlDiffEditor-df3d853a.js → MonacoYamlDiffEditor-e5cfbfbd.js} +1 -1
  2. package/dist/{index-a278a1a6.js → index-f46a38ea.js} +343 -185
  3. package/dist/refine.js +175 -158
  4. package/dist/refine.umd.cjs +186 -28
  5. package/lib/src/components/Form/type.d.ts +4 -3
  6. package/lib/src/components/K8sDropdown/index.d.ts +1 -1
  7. package/lib/src/components/ModalContextProvider/index.d.ts +12 -0
  8. package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts +2 -1
  9. package/lib/src/components/PodDropdown/index.d.ts +9 -0
  10. package/lib/src/components/PodShellModal/index.d.ts +7 -0
  11. package/lib/src/components/ResourceSelect/index.d.ts +12 -0
  12. package/lib/src/components/ValueDisplay/index.d.ts +1 -1
  13. package/lib/src/components/YamlForm/index.d.ts +4 -0
  14. package/lib/src/components/index.d.ts +2 -0
  15. package/lib/src/constants/k8s.d.ts +18 -0
  16. package/lib/src/hooks/useEagleForm.d.ts +2 -1
  17. package/lib/src/hooks/useEagleTable/columns.d.ts +8 -1
  18. package/lib/src/hooks/useModal.d.ts +0 -0
  19. package/lib/src/hooks/useNamespaceFilter.d.ts +5 -0
  20. package/lib/src/model/cronjob-model.d.ts +9 -0
  21. package/lib/src/model/index.d.ts +6 -0
  22. package/lib/src/model/job-model.d.ts +10 -0
  23. package/lib/src/model/pod-metrics-model.d.ts +7 -0
  24. package/lib/src/model/pod-model.d.ts +15 -0
  25. package/lib/src/model/resource-model.d.ts +17 -0
  26. package/lib/src/model/workload-model.d.ts +17 -0
  27. package/lib/src/models/index.d.ts +4 -0
  28. package/lib/src/models/ingress-model.d.ts +0 -1
  29. package/lib/src/models/node-model.d.ts +15 -0
  30. package/lib/src/models/persistent-volume-claim.d.ts +10 -0
  31. package/lib/src/models/persistent-volume.d.ts +10 -0
  32. package/lib/src/models/storage-class.d.ts +10 -0
  33. package/lib/src/models/workload-base-model.d.ts +2 -2
  34. package/lib/src/pages/nodes/hooks/useNodeMetrics.d.ts +17 -0
  35. package/lib/src/pages/{pods/index.js → nodes/index.d.ts} +0 -1
  36. package/lib/src/pages/nodes/list/index.d.ts +3 -0
  37. package/lib/src/pages/nodes/show/index.d.ts +3 -0
  38. package/lib/src/pages/storageclasses/form/index.d.ts +9 -0
  39. package/lib/src/pages/storageclasses/index.d.ts +44 -0
  40. package/lib/src/pages/storageclasses/list/index.d.ts +3 -0
  41. package/lib/src/pages/storageclasses/show/index.d.ts +3 -0
  42. package/lib/src/types/metric.d.ts +25 -0
  43. package/lib/src/types/resource.d.ts +3 -1
  44. package/lib/src/utils/shell.d.ts +5 -0
  45. package/package.json +1 -1
  46. package/lib/src/App.js +0 -91
  47. package/lib/src/Dovetail.js +0 -45
  48. package/lib/src/components/Breadcrumb/index.js +0 -20
  49. package/lib/src/components/ConditionsTable/ConditionsTable.js +0 -56
  50. package/lib/src/components/ConditionsTable/index.js +0 -1
  51. package/lib/src/components/CreateButton/index.js +0 -10
  52. package/lib/src/components/CronJobDropdown/index.js +0 -26
  53. package/lib/src/components/CronjobJobsTable/index.js +0 -49
  54. package/lib/src/components/DeleteButton/index.js +0 -13
  55. package/lib/src/components/DeleteManyButton/index.js +0 -16
  56. package/lib/src/components/DrawerShow/DrawerShow.js +0 -13
  57. package/lib/src/components/DrawerShow/index.js +0 -1
  58. package/lib/src/components/EditButton/index.js +0 -13
  59. package/lib/src/components/EditField/index.js +0 -47
  60. package/lib/src/components/ErrorContent/index.js +0 -36
  61. package/lib/src/components/EventsTable/EventsTable.js +0 -59
  62. package/lib/src/components/EventsTable/index.js +0 -1
  63. package/lib/src/components/Form/KeyValueListWidget.js +0 -56
  64. package/lib/src/components/Form/MetadataForm.js +0 -9
  65. package/lib/src/components/Form/NameInputWidget.js +0 -50
  66. package/lib/src/components/Form/NamespaceSelectWidget.js +0 -21
  67. package/lib/src/components/Form/index.js +0 -4
  68. package/lib/src/components/Form/widget.js +0 -1
  69. package/lib/src/components/FormErrorAlert/index.js +0 -8
  70. package/lib/src/components/FormLayout/index.js +0 -21
  71. package/lib/src/components/FormModal/index.js +0 -51
  72. package/lib/src/components/ImageNames/index.js +0 -14
  73. package/lib/src/components/IngressRulesComponent/index.js +0 -11
  74. package/lib/src/components/IngressRulesTable/IngressRulesTable.js +0 -51
  75. package/lib/src/components/IngressRulesTable/index.js +0 -1
  76. package/lib/src/components/K8sDropdown/index.js +0 -31
  77. package/lib/src/components/KeyValue/KeyValue.js +0 -27
  78. package/lib/src/components/KeyValue/index.js +0 -1
  79. package/lib/src/components/KeyValueData/index.js +0 -50
  80. package/lib/src/components/Layout/index.js +0 -39
  81. package/lib/src/components/ListPage/index.js +0 -25
  82. package/lib/src/components/Menu/index.js +0 -36
  83. package/lib/src/components/NamespacesFilter/index.js +0 -34
  84. package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.js +0 -77
  85. package/lib/src/components/NetworkPolicyRulesTable/index.js +0 -1
  86. package/lib/src/components/PageShow/PageShow.js +0 -11
  87. package/lib/src/components/PageShow/index.js +0 -1
  88. package/lib/src/components/PodContainersTable/PodContainersTable.js +0 -78
  89. package/lib/src/components/PodContainersTable/index.js +0 -1
  90. package/lib/src/components/PodLog/index.js +0 -136
  91. package/lib/src/components/ReferenceLink/index.js +0 -17
  92. package/lib/src/components/RefineForm/RefineFormContent.d.ts +0 -10
  93. package/lib/src/components/RefineForm/RefineFormModal.d.ts +0 -8
  94. package/lib/src/components/RefineForm/RefineFormPage.d.ts +0 -7
  95. package/lib/src/components/RefineForm/index.d.ts +0 -3
  96. package/lib/src/components/RefineForm/type.d.ts +0 -20
  97. package/lib/src/components/RefineForm/useRefineForm.d.ts +0 -10
  98. package/lib/src/components/ResourceCRUD/ResourceCRUD.js +0 -15
  99. package/lib/src/components/ResourceCRUD/create/index.js +0 -13
  100. package/lib/src/components/ResourceCRUD/index.js +0 -4
  101. package/lib/src/components/ResourceCRUD/list/index.js +0 -19
  102. package/lib/src/components/ResourceCRUD/show/index.js +0 -6
  103. package/lib/src/components/ResourceLink/index.js +0 -21
  104. package/lib/src/components/ResourceUsageBar/index.js +0 -81
  105. package/lib/src/components/Separator/index.js +0 -11
  106. package/lib/src/components/ShowContent/ShowContent.js +0 -157
  107. package/lib/src/components/ShowContent/fields.js +0 -157
  108. package/lib/src/components/ShowContent/index.js +0 -2
  109. package/lib/src/components/StateTag/StateTag.js +0 -22
  110. package/lib/src/components/StateTag/index.js +0 -1
  111. package/lib/src/components/Table/ErrorContent.js +0 -36
  112. package/lib/src/components/Table/TableToolBar.js +0 -14
  113. package/lib/src/components/Table/TableWidgets.js +0 -28
  114. package/lib/src/components/Table/index.js +0 -69
  115. package/lib/src/components/Tags/index.js +0 -22
  116. package/lib/src/components/Time/index.js +0 -14
  117. package/lib/src/components/WorkloadDropdown/index.js +0 -24
  118. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.js +0 -39
  119. package/lib/src/components/WorkloadPodsTable/index.js +0 -1
  120. package/lib/src/components/WorkloadReplicas/index.js +0 -50
  121. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.js +0 -34
  122. package/lib/src/components/YamlEditor/MonacoYamlEditor.js +0 -149
  123. package/lib/src/components/YamlEditor/YamlEditorComponent.js +0 -90
  124. package/lib/src/components/YamlEditor/index.js +0 -1
  125. package/lib/src/components/YamlEditor/style.js +0 -102
  126. package/lib/src/components/YamlEditor/yaml.worker.js +0 -1
  127. package/lib/src/components/YamlForm/index.js +0 -61
  128. package/lib/src/components/index.js +0 -38
  129. package/lib/src/constants/index.js +0 -2
  130. package/lib/src/constants/k8s.js +0 -203
  131. package/lib/src/constants/state.js +0 -15
  132. package/lib/src/contexts/component.js +0 -3
  133. package/lib/src/contexts/configs.js +0 -3
  134. package/lib/src/contexts/global-store.js +0 -3
  135. package/lib/src/contexts/index.js +0 -3
  136. package/lib/src/hooks/index.js +0 -7
  137. package/lib/src/hooks/useDeleteModal/index.js +0 -1
  138. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.js +0 -31
  139. package/lib/src/hooks/useDeleteModal/useDeleteModal.js +0 -38
  140. package/lib/src/hooks/useDownloadYAML.js +0 -10
  141. package/lib/src/hooks/useEagleForm.js +0 -177
  142. package/lib/src/hooks/useEagleTable/columns.js +0 -246
  143. package/lib/src/hooks/useEagleTable/index.js +0 -2
  144. package/lib/src/hooks/useEagleTable/useEagleTable.js +0 -63
  145. package/lib/src/hooks/useEdit.js +0 -19
  146. package/lib/src/hooks/useGlobalStore.js +0 -5
  147. package/lib/src/hooks/useK8sYamlEditor.js +0 -37
  148. package/lib/src/hooks/useOpenForm.js +0 -43
  149. package/lib/src/hooks/useSchema.js +0 -37
  150. package/lib/src/hooks/useSubmitForm.js +0 -42
  151. package/lib/src/i18n.js +0 -19
  152. package/lib/src/index.js +0 -13
  153. package/lib/src/locales/en-US/dovetail.json +0 -18
  154. package/lib/src/locales/en-US/index.js +0 -4
  155. package/lib/src/locales/index.js +0 -6
  156. package/lib/src/locales/zh-CN/dovetail.json +0 -91
  157. package/lib/src/locales/zh-CN/index.js +0 -4
  158. package/lib/src/main.js +0 -12
  159. package/lib/src/models/cronjob-model.js +0 -32
  160. package/lib/src/models/daemonset-model.js +0 -17
  161. package/lib/src/models/deployment-model.js +0 -17
  162. package/lib/src/models/event-model.js +0 -11
  163. package/lib/src/models/index.js +0 -14
  164. package/lib/src/models/ingress-model.js +0 -24
  165. package/lib/src/models/job-model.js +0 -56
  166. package/lib/src/models/network-policy-model.js +0 -10
  167. package/lib/src/models/pod-metrics-model.js +0 -34
  168. package/lib/src/models/pod-model.js +0 -78
  169. package/lib/src/models/resource-model.js +0 -34
  170. package/lib/src/models/server-instance-model.d.ts +0 -10
  171. package/lib/src/models/service-model.js +0 -17
  172. package/lib/src/models/statefulset-model.js +0 -17
  173. package/lib/src/models/types/index.js +0 -1
  174. package/lib/src/models/types/metric.js +0 -1
  175. package/lib/src/models/workload-base-model.js +0 -22
  176. package/lib/src/models/workload-model.js +0 -51
  177. package/lib/src/pages/configmaps/index.js +0 -15
  178. package/lib/src/pages/cronjobs/create/index.js +0 -6
  179. package/lib/src/pages/cronjobs/index.js +0 -3
  180. package/lib/src/pages/cronjobs/list/index.js +0 -42
  181. package/lib/src/pages/cronjobs/show/index.js +0 -16
  182. package/lib/src/pages/daemonsets/create/index.js +0 -6
  183. package/lib/src/pages/daemonsets/index.js +0 -3
  184. package/lib/src/pages/daemonsets/list/index.js +0 -32
  185. package/lib/src/pages/daemonsets/show/index.js +0 -16
  186. package/lib/src/pages/deployments/create/index.js +0 -7
  187. package/lib/src/pages/deployments/index.js +0 -3
  188. package/lib/src/pages/deployments/list/index.js +0 -26
  189. package/lib/src/pages/deployments/show/index.js +0 -16
  190. package/lib/src/pages/ingresses/index.js +0 -26
  191. package/lib/src/pages/jobs/index.js +0 -34
  192. package/lib/src/pages/networkPolicies/index.js +0 -67
  193. package/lib/src/pages/pods/create/index.js +0 -6
  194. package/lib/src/pages/pods/list/index.js +0 -81
  195. package/lib/src/pages/pods/show/index.js +0 -54
  196. package/lib/src/pages/secrets/index.js +0 -15
  197. package/lib/src/pages/services/index.js +0 -26
  198. package/lib/src/pages/statefulsets/create/index.js +0 -6
  199. package/lib/src/pages/statefulsets/index.js +0 -3
  200. package/lib/src/pages/statefulsets/list/index.js +0 -26
  201. package/lib/src/pages/statefulsets/show/index.js +0 -16
  202. package/lib/src/plugins/index.js +0 -3
  203. package/lib/src/plugins/model-plugin.js +0 -46
  204. package/lib/src/plugins/relation-plugin.js +0 -81
  205. package/lib/src/plugins/type.js +0 -1
  206. package/lib/src/providers/index.js +0 -1
  207. package/lib/src/providers/router-provider/index.js +0 -100
  208. package/lib/src/types/index.js +0 -1
  209. package/lib/src/types/resource.js +0 -12
  210. package/lib/src/utils/addId.js +0 -8
  211. package/lib/src/utils/download.js +0 -9
  212. package/lib/src/utils/error.js +0 -53
  213. package/lib/src/utils/form.js +0 -9
  214. package/lib/src/utils/k8s.js +0 -6
  215. package/lib/src/utils/labels.js +0 -15
  216. package/lib/src/utils/match-selector.js +0 -12
  217. package/lib/src/utils/openapi.js +0 -33
  218. package/lib/src/utils/schema.js +0 -117
  219. package/lib/src/utils/selector.js +0 -12
  220. package/lib/src/utils/string.js +0 -6
  221. package/lib/src/utils/time.js +0 -46
  222. package/lib/src/utils/unit.js +0 -69
  223. package/lib/src/utils/yaml.js +0 -44
  224. package/lib/vite.config.js +0 -60
@@ -1,4 +1,4 @@
1
- import { j as jsxRuntimeExports } from "./index-a278a1a6.js";
1
+ import { j as jsxRuntimeExports } from "./index-f46a38ea.js";
2
2
  import * as monaco from "monaco-editor";
3
3
  import { useRef, useEffect } from "react";
4
4
  import "i18next";
@@ -10,7 +10,7 @@ import React__default, { createElement, isValidElement, cloneElement, Children,
10
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";
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, useUIKit, kitContext, OverflowTooltip, Tooltip, StatusCapsule, usePushModal, Icon as Icon$1, Link as Link$1, Button, usePopModal, Loading, Divider, Fields, Space, Form, Modal, useMessage, ModalStack, KitStoreProvider } from "@cloudtower/eagle";
13
+ import { Typo, Tag, useUIKit, kitContext, OverflowTooltip, Tooltip, StatusCapsule, usePushModal, Icon as Icon$1, Link as Link$1, Button, usePopModal, Loading, Divider, Fields, Space, Form, Modal, Select, AntdOption, useMessage, ModalStack, KitStoreProvider } from "@cloudtower/eagle";
14
14
  import { EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, EditPen16GradientBlueIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, Retry16GradientBlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, ExclamationErrorCircleFill16RedIcon, Pause16GradientBlueIcon } from "@cloudtower/icons-react";
15
15
  import { omit as omit$1, merge, get as get$3, first, debounce, last, isObject as isObject$4, keyBy } from "lodash-es";
16
16
  import yaml from "js-yaml";
@@ -8975,49 +8975,34 @@ class ResourceModel {
8975
8975
  }
8976
8976
  class IngressModel extends ResourceModel {
8977
8977
  constructor(_rawYaml, _globalStore) {
8978
+ var _a;
8978
8979
  super(_rawYaml, _globalStore);
8979
- __publicField(this, "flattenedRules", []);
8980
+ __publicField(this, "flattenedRules");
8980
8981
  this._rawYaml = _rawYaml;
8981
8982
  this._globalStore = _globalStore;
8982
- }
8983
- async init() {
8984
- var _a, _b, _c, _d;
8985
- const services = await this._globalStore.get("services", {
8986
- resourceBasePath: "/api/v1",
8987
- kind: "Service"
8988
- });
8989
- const protocal = !!this._rawYaml.spec.tls ? "https" : "http";
8990
- const servicePort = (_c = (_b = (_a = services.items.find((s2) => {
8991
- var _a2, _b2;
8992
- return ((_a2 = s2.metadata) == null ? void 0 : _a2.name) === "contour-envoy" && ((_b2 = s2.spec) == null ? void 0 : _b2.type) === "NodePort";
8993
- })) == null ? void 0 : _a.spec) == null ? void 0 : _b.ports) == null ? void 0 : _c.find((p) => p.name === protocal);
8994
- this.flattenedRules = ((_d = this._rawYaml.spec.rules) == null ? void 0 : _d.reduce((res, rule2) => {
8983
+ this.flattenedRules = ((_a = this._rawYaml.spec.rules) == null ? void 0 : _a.reduce((res, rule2) => {
8995
8984
  var _a2;
8996
8985
  const paths = (_a2 = rule2.http) == null ? void 0 : _a2.paths.map((p) => {
8997
- var _a3, _b2, _c2, _d2, _e, _f;
8986
+ var _a3, _b, _c, _d, _e, _f;
8998
8987
  return {
8999
8988
  resourceName: ((_a3 = p.backend.resource) == null ? void 0 : _a3.name) || "",
9000
- serviceName: ((_b2 = p.backend.service) == null ? void 0 : _b2.name) || "",
9001
- fullPath: this.getFullPath(rule2, p.path, servicePort == null ? void 0 : servicePort.nodePort),
8989
+ serviceName: ((_b = p.backend.service) == null ? void 0 : _b.name) || "",
8990
+ fullPath: this.getFullPath(rule2, p.path),
9002
8991
  pathType: p.pathType,
9003
- servicePort: ((_d2 = (_c2 = p.backend.service) == null ? void 0 : _c2.port) == null ? void 0 : _d2.number) || ((_f = (_e = p.backend.service) == null ? void 0 : _e.port) == null ? void 0 : _f.name),
8992
+ servicePort: ((_d = (_c = p.backend.service) == null ? void 0 : _c.port) == null ? void 0 : _d.number) || ((_f = (_e = p.backend.service) == null ? void 0 : _e.port) == null ? void 0 : _f.name),
9004
8993
  host: rule2.host
9005
8994
  };
9006
8995
  });
9007
8996
  return [...res, ...paths || []];
9008
8997
  }, [])) || [];
9009
8998
  }
9010
- getFullPath(rule2, path2 = "", port2) {
8999
+ getFullPath(rule2, path2 = "") {
9011
9000
  if (!rule2.host) {
9012
9001
  return path2 || "";
9013
9002
  }
9014
9003
  const hostValue = rule2.host || "";
9015
9004
  const protocal = this._rawYaml.spec.tls ? "https://" : "http://";
9016
- const portText = port2 ? `:${port2}` : "";
9017
- if (path2[path2.length - 1] === "/") {
9018
- path2 = path2.slice(0, -1);
9019
- }
9020
- return `${protocal}${hostValue}${path2}${portText}`;
9005
+ return `${protocal}${hostValue}${path2}`;
9021
9006
  }
9022
9007
  }
9023
9008
  class NetworkPolicyModel extends ResourceModel {
@@ -9547,6 +9532,24 @@ const SECRET_CUSTOM_INIT_VALUE = {
9547
9532
  "type": "",
9548
9533
  "data": {}
9549
9534
  };
9535
+ const NODE_INIT_VALUE = {
9536
+ "apiVersion": "v1",
9537
+ "kind": "Node",
9538
+ "metadata": {
9539
+ "name": "example",
9540
+ "namespace": "default"
9541
+ },
9542
+ "spec": {}
9543
+ };
9544
+ const STORAGE_CLASS_INIT_VALUE = {
9545
+ "apiVersion": "storage.k8s.io/v1",
9546
+ "kind": "StorageClass",
9547
+ "metadata": {
9548
+ "name": "example",
9549
+ "namespace": "default"
9550
+ },
9551
+ "spec": {}
9552
+ };
9550
9553
  var WorkloadState = /* @__PURE__ */ ((WorkloadState2) => {
9551
9554
  WorkloadState2["Terminated"] = "terminated";
9552
9555
  WorkloadState2["UPDATING"] = "updating";
@@ -10032,6 +10035,42 @@ class ServiceModel extends ResourceModel {
10032
10035
  });
10033
10036
  }
10034
10037
  }
10038
+ var NodeRole = /* @__PURE__ */ ((NodeRole2) => {
10039
+ NodeRole2["ControlPlane"] = "Control Plane";
10040
+ NodeRole2["Worker"] = "Worker";
10041
+ return NodeRole2;
10042
+ })(NodeRole || {});
10043
+ class NodeModel extends WorkloadBaseModel {
10044
+ constructor(_rawYaml, _globalStore) {
10045
+ super(_rawYaml, _globalStore);
10046
+ this._rawYaml = _rawYaml;
10047
+ this._globalStore = _globalStore;
10048
+ }
10049
+ get role() {
10050
+ return "node-role.kubernetes.io/control-plane" in (this.metadata.labels || {}) ? "Control Plane" : "Worker";
10051
+ }
10052
+ }
10053
+ class StorageClassModel extends ResourceModel {
10054
+ constructor(_rawYaml, _globalStore) {
10055
+ super(_rawYaml, _globalStore);
10056
+ this._rawYaml = _rawYaml;
10057
+ this._globalStore = _globalStore;
10058
+ }
10059
+ }
10060
+ class PersistentVolumeModel extends ResourceModel {
10061
+ constructor(_rawYaml, _globalStore) {
10062
+ super(_rawYaml, _globalStore);
10063
+ this._rawYaml = _rawYaml;
10064
+ this._globalStore = _globalStore;
10065
+ }
10066
+ }
10067
+ class PersistentVolumeClaimModel extends ResourceModel {
10068
+ constructor(_rawYaml, _globalStore) {
10069
+ super(_rawYaml, _globalStore);
10070
+ this._rawYaml = _rawYaml;
10071
+ this._globalStore = _globalStore;
10072
+ }
10073
+ }
10035
10074
  const index_1lzkrja = "";
10036
10075
  const ServiceInClusterAccessComponent = ({
10037
10076
  service
@@ -10428,6 +10467,8 @@ var RESOURCE_GROUP = /* @__PURE__ */ ((RESOURCE_GROUP2) => {
10428
10467
  RESOURCE_GROUP2["CLUSTER"] = "CLUSTER";
10429
10468
  RESOURCE_GROUP2["SERVICE"] = "SERVICE";
10430
10469
  RESOURCE_GROUP2["SERVICE_AND_NETWORK"] = "SERVICE_AND_NETWORK";
10470
+ RESOURCE_GROUP2["CONFIG"] = "CONFIG";
10471
+ RESOURCE_GROUP2["NODE_MANAGEMENT"] = "NODE_MANAGEMENT";
10431
10472
  return RESOURCE_GROUP2;
10432
10473
  })(RESOURCE_GROUP || {});
10433
10474
  var FormType = /* @__PURE__ */ ((FormType2) => {
@@ -22236,6 +22277,9 @@ const RefineFormContent = (props) => {
22236
22277
  children: value2
22237
22278
  });
22238
22279
  }
22280
+ if (c2 == null ? void 0 : c2.render) {
22281
+ ele = c2.render(value2, onChange, formValue, onBlur, action, control);
22282
+ }
22239
22283
  if (c2.helperText) {
22240
22284
  ele = /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
22241
22285
  size: 4,
@@ -22247,9 +22291,6 @@ const RefineFormContent = (props) => {
22247
22291
  })]
22248
22292
  });
22249
22293
  }
22250
- if (c2 == null ? void 0 : c2.render) {
22251
- ele = c2.render(value2, onChange, formValue, onBlur, action);
22252
- }
22253
22294
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, {
22254
22295
  label: c2.label,
22255
22296
  colon: false,
@@ -22957,7 +22998,7 @@ const Separator = () => {
22957
22998
  });
22958
22999
  };
22959
23000
  const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
22960
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-df3d853a.js"));
23001
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-e5cfbfbd.js"));
22961
23002
  const YamlEditorComponent = forwardRef(
22962
23003
  function YamlEditorComponent2(props, ref) {
22963
23004
  const {
@@ -24106,6 +24147,32 @@ const TextTags = (props) => {
24106
24147
  });
24107
24148
  return /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: tags });
24108
24149
  };
24150
+ function ResourceSelect(props) {
24151
+ const { resource, resourceBasePath, kind, selectProps, value: value2, onChange } = props;
24152
+ const { data: data2, isLoading, isError } = useList({
24153
+ resource,
24154
+ meta: {
24155
+ resourceBasePath,
24156
+ kind
24157
+ },
24158
+ pagination: {
24159
+ mode: "off"
24160
+ }
24161
+ });
24162
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
24163
+ Select,
24164
+ {
24165
+ input: {
24166
+ value: value2,
24167
+ onChange
24168
+ },
24169
+ loading: isLoading,
24170
+ error: isError,
24171
+ ...selectProps,
24172
+ children: data2 == null ? void 0 : data2.data.map((namespace2) => /* @__PURE__ */ jsxRuntimeExports.jsx(AntdOption, { value: namespace2.metadata.name, children: namespace2.metadata.name }, namespace2.metadata.name))
24173
+ }
24174
+ );
24175
+ }
24109
24176
  const IngressRulesComponent = ({ ingress }) => {
24110
24177
  const kit = useUIKit();
24111
24178
  const result = ingress.flattenedRules.map((r2) => {
@@ -24665,6 +24732,76 @@ const PortMappingColumnRenderer = (i18n2, clusterVip) => {
24665
24732
  }
24666
24733
  };
24667
24734
  };
24735
+ const ProvisionerColumnRenderer = (i18n2) => {
24736
+ return {
24737
+ key: "provisioner",
24738
+ display: true,
24739
+ dataIndex: ["provisioner"],
24740
+ title: i18n2.t("dovetail.provisioner"),
24741
+ width: 120,
24742
+ sortable: true
24743
+ };
24744
+ };
24745
+ const FsTypeColumnRenderer = (i18n2) => {
24746
+ return {
24747
+ key: "fstype",
24748
+ display: true,
24749
+ dataIndex: ["parameters", "csi.storage.k8s.io/fstype"],
24750
+ title: i18n2.t("dovetail.file_system"),
24751
+ width: 120,
24752
+ sortable: true
24753
+ };
24754
+ };
24755
+ const PVCapacityColumnRenderer = (i18n2) => {
24756
+ return {
24757
+ key: "capacity",
24758
+ display: true,
24759
+ dataIndex: ["spec", "capacity", "storage"],
24760
+ title: i18n2.t("dovetail.capacity"),
24761
+ width: 120,
24762
+ sortable: true
24763
+ };
24764
+ };
24765
+ const PVStorageClassColumnRenderer = (i18n2) => {
24766
+ return {
24767
+ key: "storageClass",
24768
+ display: true,
24769
+ dataIndex: ["spec", "storageClassName"],
24770
+ title: i18n2.t("dovetail.storage_class"),
24771
+ width: 120,
24772
+ sortable: true
24773
+ };
24774
+ };
24775
+ const PVPhaseColumnRenderer = (i18n2) => {
24776
+ return {
24777
+ key: "phase",
24778
+ display: true,
24779
+ dataIndex: ["status", "phase"],
24780
+ title: i18n2.t("dovetail.phase"),
24781
+ width: 120,
24782
+ sortable: true
24783
+ };
24784
+ };
24785
+ const PVModeColumnRenderer = (i18n2) => {
24786
+ return {
24787
+ key: "mode",
24788
+ display: true,
24789
+ dataIndex: ["spec", "volumeMode"],
24790
+ title: i18n2.t("dovetail.volume_mode"),
24791
+ width: 120,
24792
+ sortable: true
24793
+ };
24794
+ };
24795
+ const PVAccessModeColumnRenderer = (i18n2) => {
24796
+ return {
24797
+ key: "accessMode",
24798
+ display: true,
24799
+ dataIndex: ["spec", "accessModes"],
24800
+ title: i18n2.t("dovetail.access_mode"),
24801
+ width: 120,
24802
+ sortable: true
24803
+ };
24804
+ };
24668
24805
  const styles = "";
24669
24806
  const Dovetail = (props) => {
24670
24807
  const {
@@ -24752,7 +24889,11 @@ const ModelMap = {
24752
24889
  Event: EventModel,
24753
24890
  Ingress: IngressModel,
24754
24891
  NetworkPolicy: NetworkPolicyModel,
24755
- Service: ServiceModel
24892
+ Service: ServiceModel,
24893
+ Node: NodeModel,
24894
+ StorageClass: StorageClassModel,
24895
+ PersistentVolume: PersistentVolumeModel,
24896
+ PersistentVolumeClaim: PersistentVolumeClaimModel
24756
24897
  };
24757
24898
  class ModelPlugin {
24758
24899
  constructor() {
@@ -24878,171 +25019,188 @@ const relationPlugin = new RelationPlugin();
24878
25019
  const ProviderPlugins = [relationPlugin, modelPlugin];
24879
25020
  const dovetailRefineI18n = i18n;
24880
25021
  export {
24881
- WorkloadDropdown as $,
25022
+ namespaceRules as $,
24882
25023
  AgeColumnRenderer as A,
24883
- useDownloadYAML as B,
25024
+ PVPhaseColumnRenderer as B,
24884
25025
  CommonSorter as C,
24885
25026
  DurationColumnRenderer as D,
24886
- useEdit as E,
24887
- useGlobalStore as F,
24888
- useOpenForm as G,
24889
- Breadcrumb as H,
25027
+ PVModeColumnRenderer as E,
25028
+ FsTypeColumnRenderer as F,
25029
+ PVAccessModeColumnRenderer as G,
25030
+ ColumnKeys as H,
24890
25031
  IngressRulesColumnRenderer as I,
24891
- NameInputWidget as J,
24892
- dnsSubDomainRules as K,
24893
- rfc1123LabelRules as L,
25032
+ addDefaultRenderToColumns as J,
25033
+ useEagleTable as K,
25034
+ useDownloadYAML as L,
24894
25035
  ModalStyle as M,
24895
25036
  NameColumnRenderer as N,
24896
- rfc1035LabelRules as O,
25037
+ useEdit as O,
24897
25038
  PlainTextNameColumnRenderer as P,
24898
- NamespaceSelectWidget as Q,
25039
+ useGlobalStore as Q,
24899
25040
  ReplicasColumnRenderer as R,
24900
25041
  StateDisplayColumnRenderer as S,
24901
- namespaceRules as T,
24902
- KeyValueListWidget as U,
24903
- MetadataForm as V,
25042
+ useOpenForm as T,
25043
+ Breadcrumb as U,
25044
+ NameInputWidget as V,
24904
25045
  WorkloadImageColumnRenderer as W,
24905
- PageShow as X,
24906
- Time as Y,
24907
- ConditionsTable as Z,
24908
- PodContainersTable as _,
25046
+ dnsSubDomainRules as X,
25047
+ rfc1123LabelRules as Y,
25048
+ rfc1035LabelRules as Z,
25049
+ NamespaceSelectWidget as _,
24909
25050
  useSchema as a,
24910
- StateTagStyle as a$,
24911
- ReplicasDropdown as a0,
24912
- CreateButton as a1,
24913
- ImageNames as a2,
24914
- ResourceList as a3,
24915
- ResourceShow as a4,
24916
- ResourceForm as a5,
24917
- ResourceCRUD as a6,
24918
- WorkloadPodsTable as a7,
24919
- CronJobDropdown as a8,
24920
- ResourceUsageBar as a9,
24921
- AgeField as aA,
24922
- LabelsField as aB,
24923
- AnnotationsField as aC,
24924
- ServiceInnerClusterAccessField as aD,
24925
- ServiceOutClusterAccessField as aE,
24926
- PodSelectorField as aF,
24927
- PortsTableField as aG,
24928
- DurationField as aH,
24929
- EventsTab as aI,
24930
- PodLogTab as aJ,
24931
- BasicGroup as aK,
24932
- PodsGroup as aL,
24933
- PodContainersGroup as aM,
24934
- ServicePodsGroup as aN,
24935
- ConditionsGroup as aO,
24936
- SecretDataGroup as aP,
24937
- JobsGroup as aQ,
24938
- IngressRulesGroup as aR,
24939
- PodSelectorGroup as aS,
24940
- PortsGroup as aT,
24941
- DataGroup as aU,
24942
- NetworkPolicyIngressRulesGroup as aV,
24943
- NetworkPolicyEgressRulesGroup as aW,
24944
- ShowGroupComponent as aX,
24945
- ShowContent as aY,
24946
- DeleteManyButton as aZ,
24947
- ListPage as a_,
24948
- WorkloadReplicasForm as aa,
24949
- WorkloadReplicas as ab,
24950
- CronjobJobsTable as ac,
24951
- KeyValue as ad,
24952
- KeyValueAnnotation as ae,
24953
- KeyValueSecret as af,
24954
- Separator as ag,
24955
- YamlEditorComponent as ah,
24956
- DeleteButton as ai,
24957
- Layout as aj,
24958
- AreaType as ak,
24959
- ImageField as al,
24960
- ReplicaField as am,
24961
- ConditionsField as an,
24962
- PodsField as ao,
24963
- JobsField as ap,
24964
- DataField as aq,
24965
- SecretDataField as ar,
24966
- StartTimeField as as,
24967
- ServiceTypeField as at,
24968
- ClusterIpField as au,
24969
- SessionAffinityField as av,
24970
- ServicePodsField as aw,
24971
- IngressRulesTableTabField as ax,
24972
- EventsTableTabField as ay,
24973
- NamespaceField as az,
25051
+ PortsGroup as a$,
25052
+ KeyValueListWidget as a0,
25053
+ MetadataForm as a1,
25054
+ PageShow as a2,
25055
+ Time as a3,
25056
+ ConditionsTable as a4,
25057
+ PodContainersTable as a5,
25058
+ WorkloadDropdown as a6,
25059
+ ReplicasDropdown as a7,
25060
+ CreateButton as a8,
25061
+ ImageNames as a9,
25062
+ StartTimeField as aA,
25063
+ ServiceTypeField as aB,
25064
+ ClusterIpField as aC,
25065
+ SessionAffinityField as aD,
25066
+ ServicePodsField as aE,
25067
+ IngressRulesTableTabField as aF,
25068
+ EventsTableTabField as aG,
25069
+ NamespaceField as aH,
25070
+ AgeField as aI,
25071
+ LabelsField as aJ,
25072
+ AnnotationsField as aK,
25073
+ ServiceInnerClusterAccessField as aL,
25074
+ ServiceOutClusterAccessField as aM,
25075
+ PodSelectorField as aN,
25076
+ PortsTableField as aO,
25077
+ DurationField as aP,
25078
+ EventsTab as aQ,
25079
+ PodLogTab as aR,
25080
+ BasicGroup as aS,
25081
+ PodsGroup as aT,
25082
+ PodContainersGroup as aU,
25083
+ ServicePodsGroup as aV,
25084
+ ConditionsGroup as aW,
25085
+ SecretDataGroup as aX,
25086
+ JobsGroup as aY,
25087
+ IngressRulesGroup as aZ,
25088
+ PodSelectorGroup as a_,
25089
+ ResourceList as aa,
25090
+ ResourceShow as ab,
25091
+ ResourceForm as ac,
25092
+ ResourceCRUD as ad,
25093
+ WorkloadPodsTable as ae,
25094
+ CronJobDropdown as af,
25095
+ K8sDropdown as ag,
25096
+ ResourceUsageBar as ah,
25097
+ WorkloadReplicasForm as ai,
25098
+ WorkloadReplicas as aj,
25099
+ CronjobJobsTable as ak,
25100
+ KeyValue as al,
25101
+ KeyValueAnnotation as am,
25102
+ KeyValueSecret as an,
25103
+ Separator as ao,
25104
+ YamlEditorComponent as ap,
25105
+ DeleteButton as aq,
25106
+ Layout as ar,
25107
+ AreaType as as,
25108
+ ImageField as at,
25109
+ ReplicaField as au,
25110
+ ConditionsField as av,
25111
+ PodsField as aw,
25112
+ JobsField as ax,
25113
+ DataField as ay,
25114
+ SecretDataField as az,
24974
25115
  useDeleteModal as b,
24975
- EventModel as b$,
24976
- StateTag as b0,
24977
- DrawerShow as b1,
24978
- Menu as b2,
24979
- EditButton as b3,
24980
- ReferenceLink as b4,
24981
- ResourceLink as b5,
24982
- NS_STORE_KEY as b6,
24983
- ALL_NS as b7,
24984
- useNamespacesFilter as b8,
24985
- NamespacesFilter as b9,
24986
- NETWORK_POLICY_INIT_VALUE as bA,
24987
- CONFIG_MAP_INIT_VALUE as bB,
24988
- SERVER_INSTANCE_INIT_VALUE as bC,
24989
- TIMESTAMP_LABEL as bD,
24990
- SECRET_OPAQUE_INIT_VALUE as bE,
24991
- SECRET_IMAGE_REPO_INIT_VALUE as bF,
24992
- SECRET_BASIC_AUTH_INIT_VALUE as bG,
24993
- SECRET_SSH_AUTH_INIT_VALUE as bH,
24994
- SECRET_TLS_INIT_VALUE as bI,
24995
- SECRET_CUSTOM_INIT_VALUE as bJ,
24996
- WorkloadState as bK,
24997
- AccessControlAuth as bL,
24998
- Dovetail as bM,
24999
- RESOURCE_GROUP as bN,
25000
- FormType as bO,
25001
- ComponentContext as bP,
25002
- GlobalStoreContext as bQ,
25003
- ConfigsContext as bR,
25004
- IngressModel as bS,
25005
- NetworkPolicyModel as bT,
25006
- JobModel as bU,
25007
- WorkloadModel as bV,
25008
- WorkloadBaseModel as bW,
25009
- PodModel as bX,
25010
- PodMetricsModel as bY,
25011
- ResourceModel as bZ,
25012
- CronJobModel as b_,
25013
- FormModal as ba,
25014
- RefineFormContent as bb,
25015
- RefineFormPage as bc,
25016
- SchemaStrategy as bd,
25017
- YamlForm as be,
25018
- useRefineForm as bf,
25019
- ServiceInClusterAccessComponent as bg,
25020
- ServiceOutClusterAccessComponent as bh,
25021
- Tags as bi,
25022
- TextTags as bj,
25023
- PodLog as bk,
25024
- NetworkPolicyRulesViewer as bl,
25025
- Tabs as bm,
25026
- BASE_INIT_VALUE as bn,
25027
- DEPLOYMENT_INIT_VALUE as bo,
25028
- CRONJOB_INIT_VALUE as bp,
25029
- DAEMONSET_INIT_VALUE as bq,
25030
- JOB_INIT_VALUE as br,
25031
- STATEFULSET_INIT_VALUE as bs,
25032
- POD_INIT_VALUE as bt,
25033
- SERVICE_CLUSTER_IP_INIT_VALUE as bu,
25034
- SERVICE_NODE_PORT_INIT_VALUE as bv,
25035
- SERVICE_LOAD_BALANCER_INIT_VALUE as bw,
25036
- SERVICE_EXTERNAL_NAME_INIT_VALUE as bx,
25037
- SERVICE_HEADLESS_INIT_VALUE as by,
25038
- INGRESS_INIT_VALUE as bz,
25116
+ ComponentContext as b$,
25117
+ DataGroup as b0,
25118
+ NetworkPolicyIngressRulesGroup as b1,
25119
+ NetworkPolicyEgressRulesGroup as b2,
25120
+ ShowGroupComponent as b3,
25121
+ ShowContent as b4,
25122
+ DeleteManyButton as b5,
25123
+ ListPage as b6,
25124
+ StateTagStyle as b7,
25125
+ StateTag as b8,
25126
+ DrawerShow as b9,
25127
+ DAEMONSET_INIT_VALUE as bA,
25128
+ JOB_INIT_VALUE as bB,
25129
+ STATEFULSET_INIT_VALUE as bC,
25130
+ POD_INIT_VALUE as bD,
25131
+ SERVICE_CLUSTER_IP_INIT_VALUE as bE,
25132
+ SERVICE_NODE_PORT_INIT_VALUE as bF,
25133
+ SERVICE_LOAD_BALANCER_INIT_VALUE as bG,
25134
+ SERVICE_EXTERNAL_NAME_INIT_VALUE as bH,
25135
+ SERVICE_HEADLESS_INIT_VALUE as bI,
25136
+ INGRESS_INIT_VALUE as bJ,
25137
+ NETWORK_POLICY_INIT_VALUE as bK,
25138
+ CONFIG_MAP_INIT_VALUE as bL,
25139
+ SERVER_INSTANCE_INIT_VALUE as bM,
25140
+ TIMESTAMP_LABEL as bN,
25141
+ SECRET_OPAQUE_INIT_VALUE as bO,
25142
+ SECRET_IMAGE_REPO_INIT_VALUE as bP,
25143
+ SECRET_BASIC_AUTH_INIT_VALUE as bQ,
25144
+ SECRET_SSH_AUTH_INIT_VALUE as bR,
25145
+ SECRET_TLS_INIT_VALUE as bS,
25146
+ SECRET_CUSTOM_INIT_VALUE as bT,
25147
+ NODE_INIT_VALUE as bU,
25148
+ STORAGE_CLASS_INIT_VALUE as bV,
25149
+ WorkloadState as bW,
25150
+ AccessControlAuth as bX,
25151
+ Dovetail as bY,
25152
+ RESOURCE_GROUP as bZ,
25153
+ FormType as b_,
25154
+ Menu as ba,
25155
+ EditButton as bb,
25156
+ ReferenceLink as bc,
25157
+ ResourceLink as bd,
25158
+ NS_STORE_KEY as be,
25159
+ ALL_NS as bf,
25160
+ useNamespacesFilter as bg,
25161
+ NamespacesFilter as bh,
25162
+ FormModal as bi,
25163
+ RefineFormContent as bj,
25164
+ RefineFormPage as bk,
25165
+ SchemaStrategy as bl,
25166
+ YamlForm as bm,
25167
+ useRefineForm as bn,
25168
+ ServiceInClusterAccessComponent as bo,
25169
+ ServiceOutClusterAccessComponent as bp,
25170
+ Tags as bq,
25171
+ TextTags as br,
25172
+ PodLog as bs,
25173
+ NetworkPolicyRulesViewer as bt,
25174
+ Tabs as bu,
25175
+ ValueDisplay as bv,
25176
+ ResourceSelect as bw,
25177
+ BASE_INIT_VALUE as bx,
25178
+ DEPLOYMENT_INIT_VALUE as by,
25179
+ CRONJOB_INIT_VALUE as bz,
25039
25180
  NameSpaceColumnRenderer as c,
25040
- DeploymentModel as c0,
25041
- DaemonSetModel as c1,
25042
- StatefulSetModel as c2,
25043
- ServiceTypeEnum as c3,
25044
- ServiceModel as c4,
25045
- ProviderPlugins as c5,
25181
+ GlobalStoreContext as c0,
25182
+ ConfigsContext as c1,
25183
+ IngressModel as c2,
25184
+ NetworkPolicyModel as c3,
25185
+ JobModel as c4,
25186
+ WorkloadModel as c5,
25187
+ WorkloadBaseModel as c6,
25188
+ PodModel as c7,
25189
+ PodMetricsModel as c8,
25190
+ ResourceModel as c9,
25191
+ CronJobModel as ca,
25192
+ EventModel as cb,
25193
+ DeploymentModel as cc,
25194
+ DaemonSetModel as cd,
25195
+ StatefulSetModel as ce,
25196
+ ServiceTypeEnum as cf,
25197
+ ServiceModel as cg,
25198
+ NodeRole as ch,
25199
+ NodeModel as ci,
25200
+ StorageClassModel as cj,
25201
+ PersistentVolumeModel as ck,
25202
+ PersistentVolumeClaimModel as cl,
25203
+ ProviderPlugins as cm,
25046
25204
  dovetailRefineI18n as d,
25047
25205
  WorkloadRestartsColumnRenderer as e,
25048
25206
  NodeNameColumnRenderer as f,
@@ -25063,7 +25221,7 @@ export {
25063
25221
  useNamespaceRefineFilter as u,
25064
25222
  DataKeysColumnRenderer as v,
25065
25223
  PortMappingColumnRenderer as w,
25066
- ColumnKeys as x,
25067
- addDefaultRenderToColumns as y,
25068
- useEagleTable as z
25224
+ ProvisionerColumnRenderer as x,
25225
+ PVCapacityColumnRenderer as y,
25226
+ PVStorageClassColumnRenderer as z
25069
25227
  };