@dovetail-v2/refine 0.0.55 → 0.0.57

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 (202) hide show
  1. package/dist/{MonacoYamlDiffEditor-9d8bb154.js → MonacoYamlDiffEditor-06894d28.js} +1 -1
  2. package/dist/{index-0789694e.js → index-ced408be.js} +103 -67
  3. package/dist/refine.js +1 -1
  4. package/dist/refine.umd.cjs +101 -65
  5. package/dist/style.css +6 -5
  6. package/lib/src/components/LinkFallback/index.d.ts +4 -0
  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/ShowContent/ShowContent.d.ts +3 -2
  10. package/lib/src/components/YamlForm/index.d.ts +4 -0
  11. package/lib/src/hooks/useEagleForm.d.ts +2 -1
  12. package/lib/src/hooks/useModal.d.ts +0 -0
  13. package/lib/src/hooks/useNamespaceFilter.d.ts +5 -0
  14. package/lib/src/model/cronjob-model.d.ts +9 -0
  15. package/lib/src/model/index.d.ts +6 -0
  16. package/lib/src/model/job-model.d.ts +10 -0
  17. package/lib/src/model/pod-metrics-model.d.ts +7 -0
  18. package/lib/src/model/pod-model.d.ts +15 -0
  19. package/lib/src/model/resource-model.d.ts +17 -0
  20. package/lib/src/model/workload-model.d.ts +17 -0
  21. package/lib/src/types/metric.d.ts +25 -0
  22. package/package.json +1 -1
  23. package/lib/src/App.js +0 -91
  24. package/lib/src/Dovetail.js +0 -45
  25. package/lib/src/components/Breadcrumb/index.js +0 -20
  26. package/lib/src/components/ConditionsTable/ConditionsTable.js +0 -56
  27. package/lib/src/components/ConditionsTable/index.js +0 -1
  28. package/lib/src/components/CreateButton/index.js +0 -10
  29. package/lib/src/components/CronJobDropdown/index.js +0 -26
  30. package/lib/src/components/CronjobJobsTable/index.js +0 -49
  31. package/lib/src/components/DeleteButton/index.js +0 -13
  32. package/lib/src/components/DeleteManyButton/index.js +0 -16
  33. package/lib/src/components/DrawerShow/DrawerShow.js +0 -13
  34. package/lib/src/components/DrawerShow/index.js +0 -1
  35. package/lib/src/components/EditButton/index.js +0 -13
  36. package/lib/src/components/EditField/index.js +0 -47
  37. package/lib/src/components/ErrorContent/index.js +0 -36
  38. package/lib/src/components/EventsTable/EventsTable.js +0 -59
  39. package/lib/src/components/EventsTable/index.js +0 -1
  40. package/lib/src/components/Form/KeyValueListWidget.js +0 -56
  41. package/lib/src/components/Form/MetadataForm.js +0 -9
  42. package/lib/src/components/Form/NameInputWidget.js +0 -50
  43. package/lib/src/components/Form/NamespaceSelectWidget.js +0 -21
  44. package/lib/src/components/Form/index.js +0 -4
  45. package/lib/src/components/Form/widget.js +0 -1
  46. package/lib/src/components/FormErrorAlert/index.js +0 -8
  47. package/lib/src/components/FormLayout/index.js +0 -21
  48. package/lib/src/components/FormModal/index.js +0 -51
  49. package/lib/src/components/ImageNames/index.js +0 -14
  50. package/lib/src/components/IngressRulesComponent/index.js +0 -11
  51. package/lib/src/components/IngressRulesTable/IngressRulesTable.js +0 -51
  52. package/lib/src/components/IngressRulesTable/index.js +0 -1
  53. package/lib/src/components/K8sDropdown/index.js +0 -31
  54. package/lib/src/components/KeyValue/KeyValue.js +0 -27
  55. package/lib/src/components/KeyValue/index.js +0 -1
  56. package/lib/src/components/KeyValueData/index.js +0 -50
  57. package/lib/src/components/Layout/index.js +0 -39
  58. package/lib/src/components/ListPage/index.js +0 -25
  59. package/lib/src/components/Menu/index.js +0 -36
  60. package/lib/src/components/NamespacesFilter/index.js +0 -34
  61. package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.js +0 -77
  62. package/lib/src/components/NetworkPolicyRulesTable/index.js +0 -1
  63. package/lib/src/components/PageShow/PageShow.js +0 -11
  64. package/lib/src/components/PageShow/index.js +0 -1
  65. package/lib/src/components/PodContainersTable/PodContainersTable.js +0 -78
  66. package/lib/src/components/PodContainersTable/index.js +0 -1
  67. package/lib/src/components/PodLog/index.js +0 -136
  68. package/lib/src/components/ReferenceLink/index.js +0 -17
  69. package/lib/src/components/RefineForm/RefineFormContent.d.ts +0 -10
  70. package/lib/src/components/RefineForm/RefineFormModal.d.ts +0 -8
  71. package/lib/src/components/RefineForm/RefineFormPage.d.ts +0 -7
  72. package/lib/src/components/RefineForm/index.d.ts +0 -3
  73. package/lib/src/components/RefineForm/type.d.ts +0 -20
  74. package/lib/src/components/RefineForm/useRefineForm.d.ts +0 -10
  75. package/lib/src/components/ResourceCRUD/ResourceCRUD.js +0 -15
  76. package/lib/src/components/ResourceCRUD/create/index.js +0 -13
  77. package/lib/src/components/ResourceCRUD/index.js +0 -4
  78. package/lib/src/components/ResourceCRUD/list/index.js +0 -19
  79. package/lib/src/components/ResourceCRUD/show/index.js +0 -6
  80. package/lib/src/components/ResourceLink/index.js +0 -21
  81. package/lib/src/components/ResourceUsageBar/index.js +0 -81
  82. package/lib/src/components/Separator/index.js +0 -11
  83. package/lib/src/components/ShowContent/ShowContent.js +0 -157
  84. package/lib/src/components/ShowContent/fields.js +0 -157
  85. package/lib/src/components/ShowContent/index.js +0 -2
  86. package/lib/src/components/StateTag/StateTag.js +0 -22
  87. package/lib/src/components/StateTag/index.js +0 -1
  88. package/lib/src/components/Table/ErrorContent.js +0 -36
  89. package/lib/src/components/Table/TableToolBar.js +0 -14
  90. package/lib/src/components/Table/TableWidgets.js +0 -28
  91. package/lib/src/components/Table/index.js +0 -69
  92. package/lib/src/components/Tags/index.js +0 -22
  93. package/lib/src/components/Time/index.js +0 -14
  94. package/lib/src/components/WorkloadDropdown/index.js +0 -24
  95. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.js +0 -39
  96. package/lib/src/components/WorkloadPodsTable/index.js +0 -1
  97. package/lib/src/components/WorkloadReplicas/index.js +0 -50
  98. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.js +0 -34
  99. package/lib/src/components/YamlEditor/MonacoYamlEditor.js +0 -149
  100. package/lib/src/components/YamlEditor/YamlEditorComponent.js +0 -90
  101. package/lib/src/components/YamlEditor/index.js +0 -1
  102. package/lib/src/components/YamlEditor/style.js +0 -102
  103. package/lib/src/components/YamlEditor/yaml.worker.js +0 -1
  104. package/lib/src/components/YamlForm/index.js +0 -61
  105. package/lib/src/components/index.js +0 -38
  106. package/lib/src/constants/index.js +0 -2
  107. package/lib/src/constants/k8s.js +0 -203
  108. package/lib/src/constants/state.js +0 -15
  109. package/lib/src/contexts/component.js +0 -3
  110. package/lib/src/contexts/configs.js +0 -3
  111. package/lib/src/contexts/global-store.js +0 -3
  112. package/lib/src/contexts/index.js +0 -3
  113. package/lib/src/hooks/index.js +0 -7
  114. package/lib/src/hooks/useDeleteModal/index.js +0 -1
  115. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.js +0 -31
  116. package/lib/src/hooks/useDeleteModal/useDeleteModal.js +0 -38
  117. package/lib/src/hooks/useDownloadYAML.js +0 -10
  118. package/lib/src/hooks/useEagleForm.js +0 -177
  119. package/lib/src/hooks/useEagleTable/columns.js +0 -246
  120. package/lib/src/hooks/useEagleTable/index.js +0 -2
  121. package/lib/src/hooks/useEagleTable/useEagleTable.js +0 -63
  122. package/lib/src/hooks/useEdit.js +0 -19
  123. package/lib/src/hooks/useGlobalStore.js +0 -5
  124. package/lib/src/hooks/useK8sYamlEditor.js +0 -37
  125. package/lib/src/hooks/useOpenForm.js +0 -43
  126. package/lib/src/hooks/useSchema.js +0 -37
  127. package/lib/src/hooks/useSubmitForm.js +0 -42
  128. package/lib/src/i18n.js +0 -19
  129. package/lib/src/index.js +0 -13
  130. package/lib/src/locales/en-US/dovetail.json +0 -18
  131. package/lib/src/locales/en-US/index.js +0 -4
  132. package/lib/src/locales/index.js +0 -6
  133. package/lib/src/locales/zh-CN/dovetail.json +0 -91
  134. package/lib/src/locales/zh-CN/index.js +0 -4
  135. package/lib/src/main.js +0 -12
  136. package/lib/src/models/cronjob-model.js +0 -32
  137. package/lib/src/models/daemonset-model.js +0 -17
  138. package/lib/src/models/deployment-model.js +0 -17
  139. package/lib/src/models/event-model.js +0 -11
  140. package/lib/src/models/index.js +0 -14
  141. package/lib/src/models/ingress-model.js +0 -24
  142. package/lib/src/models/job-model.js +0 -56
  143. package/lib/src/models/network-policy-model.js +0 -10
  144. package/lib/src/models/pod-metrics-model.js +0 -34
  145. package/lib/src/models/pod-model.js +0 -78
  146. package/lib/src/models/resource-model.js +0 -34
  147. package/lib/src/models/server-instance-model.d.ts +0 -10
  148. package/lib/src/models/service-model.js +0 -17
  149. package/lib/src/models/statefulset-model.js +0 -17
  150. package/lib/src/models/types/index.js +0 -1
  151. package/lib/src/models/types/metric.js +0 -1
  152. package/lib/src/models/workload-base-model.js +0 -22
  153. package/lib/src/models/workload-model.js +0 -51
  154. package/lib/src/pages/configmaps/index.js +0 -15
  155. package/lib/src/pages/cronjobs/create/index.js +0 -6
  156. package/lib/src/pages/cronjobs/index.js +0 -3
  157. package/lib/src/pages/cronjobs/list/index.js +0 -42
  158. package/lib/src/pages/cronjobs/show/index.js +0 -16
  159. package/lib/src/pages/daemonsets/create/index.js +0 -6
  160. package/lib/src/pages/daemonsets/index.js +0 -3
  161. package/lib/src/pages/daemonsets/list/index.js +0 -32
  162. package/lib/src/pages/daemonsets/show/index.js +0 -16
  163. package/lib/src/pages/deployments/create/index.js +0 -7
  164. package/lib/src/pages/deployments/index.js +0 -3
  165. package/lib/src/pages/deployments/list/index.js +0 -26
  166. package/lib/src/pages/deployments/show/index.js +0 -16
  167. package/lib/src/pages/ingresses/index.js +0 -26
  168. package/lib/src/pages/jobs/index.js +0 -34
  169. package/lib/src/pages/networkPolicies/index.js +0 -67
  170. package/lib/src/pages/pods/create/index.js +0 -6
  171. package/lib/src/pages/pods/index.js +0 -3
  172. package/lib/src/pages/pods/list/index.js +0 -81
  173. package/lib/src/pages/pods/show/index.js +0 -54
  174. package/lib/src/pages/secrets/index.js +0 -15
  175. package/lib/src/pages/services/index.js +0 -26
  176. package/lib/src/pages/statefulsets/create/index.js +0 -6
  177. package/lib/src/pages/statefulsets/index.js +0 -3
  178. package/lib/src/pages/statefulsets/list/index.js +0 -26
  179. package/lib/src/pages/statefulsets/show/index.js +0 -16
  180. package/lib/src/plugins/index.js +0 -3
  181. package/lib/src/plugins/model-plugin.js +0 -46
  182. package/lib/src/plugins/relation-plugin.js +0 -81
  183. package/lib/src/plugins/type.js +0 -1
  184. package/lib/src/providers/index.js +0 -1
  185. package/lib/src/providers/router-provider/index.js +0 -100
  186. package/lib/src/types/index.js +0 -1
  187. package/lib/src/types/resource.js +0 -12
  188. package/lib/src/utils/addId.js +0 -8
  189. package/lib/src/utils/download.js +0 -9
  190. package/lib/src/utils/error.js +0 -53
  191. package/lib/src/utils/form.js +0 -9
  192. package/lib/src/utils/k8s.js +0 -6
  193. package/lib/src/utils/labels.js +0 -15
  194. package/lib/src/utils/match-selector.js +0 -12
  195. package/lib/src/utils/openapi.js +0 -33
  196. package/lib/src/utils/schema.js +0 -117
  197. package/lib/src/utils/selector.js +0 -12
  198. package/lib/src/utils/string.js +0 -6
  199. package/lib/src/utils/time.js +0 -46
  200. package/lib/src/utils/unit.js +0 -69
  201. package/lib/src/utils/yaml.js +0 -44
  202. package/lib/vite.config.js +0 -60
@@ -1115,7 +1115,7 @@ var __publicField = (obj, key, value) => {
1115
1115
  const auto_wrap$1 = "Auto wrap";
1116
1116
  const container_num$1 = "Containers";
1117
1117
  const edit_resource_success$1 = "{{resource}} {{name}} was edited successfully";
1118
- const redeploy_success_toast$1 = "{{kind}} was redeployed successfully";
1118
+ const redeploy_success_toast$1 = "{{kind}} {{name}} was redeployed successfully";
1119
1119
  const redeploy_failed_toast$1 = "Failed to redeploy {{kind}} {{name}}";
1120
1120
  const pause_success_toast$1 = "Successfully suspended";
1121
1121
  const pause_failed_toast$1 = "Failed to suspend";
@@ -8605,7 +8605,7 @@ var __publicField = (obj, key, value) => {
8605
8605
  return o(prop);
8606
8606
  }
8607
8607
  }) : styled;
8608
- const index_6dotpx = "";
8608
+ const index_cp12i5 = "";
8609
8609
  const ErrorWrapper = /* @__PURE__ */ styled_default("div")({
8610
8610
  name: "ErrorWrapper",
8611
8611
  class: "egn3dbn",
@@ -8648,11 +8648,11 @@ var __publicField = (obj, key, value) => {
8648
8648
  ]: eagle.Typo.Display.d2_bold_title
8649
8649
  };
8650
8650
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorWrapper, {
8651
- className: props.className,
8651
+ className: cx_default(props.className, type2),
8652
8652
  style: props.style,
8653
8653
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorContent, {
8654
8654
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
8655
- className: cx_default(fontMap[type2], "title", type2),
8655
+ className: cx_default(fontMap[type2], "title"),
8656
8656
  children: errorText || t2("dovetail.obtain_data_error")
8657
8657
  }), !refetch ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
8658
8658
  size: "small",
@@ -9474,7 +9474,7 @@ var __publicField = (obj, key, value) => {
9474
9474
  },
9475
9475
  "type": "Opaque",
9476
9476
  "data": {
9477
- "key": window.btoa("value")
9477
+ "key": "value"
9478
9478
  }
9479
9479
  };
9480
9480
  const SECRET_IMAGE_REPO_INIT_VALUE = {
@@ -9498,8 +9498,8 @@ var __publicField = (obj, key, value) => {
9498
9498
  },
9499
9499
  "type": "kubernetes.io/basic-auth",
9500
9500
  "data": {
9501
- "username": window.btoa("example"),
9502
- "password": window.btoa("example")
9501
+ "username": "example",
9502
+ "password": "example"
9503
9503
  }
9504
9504
  };
9505
9505
  const SECRET_SSH_AUTH_INIT_VALUE = {
@@ -10048,7 +10048,7 @@ var __publicField = (obj, key, value) => {
10048
10048
  service,
10049
10049
  breakLine = true
10050
10050
  }) => {
10051
- var _a, _b, _c, _d;
10051
+ var _a, _b, _c, _d, _e;
10052
10052
  const {
10053
10053
  i18n: i18n2
10054
10054
  } = useTranslation();
@@ -10057,10 +10057,14 @@ var __publicField = (obj, key, value) => {
10057
10057
  let content = "-";
10058
10058
  switch (spec.type) {
10059
10059
  case ServiceTypeEnum.NodePort:
10060
- content = (_a = spec.ports) == null ? void 0 : _a.filter((v) => !!v).map((p, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
10060
+ if (!breakLine) {
10061
+ content = (_a = spec.ports) == null ? void 0 : _a.filter((v) => !!v).map((p) => `${i18n2.t("dovetail.any_node_ip")}:${p.nodePort}`).join(", ");
10062
+ break;
10063
+ }
10064
+ content = (_b = spec.ports) == null ? void 0 : _b.filter((v) => !!v).map((p) => /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
10061
10065
  content: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
10062
10066
  className: cx_default(eagle.Typo.Label.l4_regular_title, BreakLineStyle),
10063
- children: [i18n2.t("dovetail.any_node_ip"), ":", p.nodePort, !breakLine && index !== (spec.ports || []).length - 1 ? ", " : ""]
10067
+ children: [i18n2.t("dovetail.any_node_ip"), ":", p.nodePort]
10064
10068
  }),
10065
10069
  tooltip: `${i18n2.t("dovetail.any_node_ip")}:${p.nodePort}`
10066
10070
  }, p.nodePort));
@@ -10069,12 +10073,14 @@ var __publicField = (obj, key, value) => {
10069
10073
  });
10070
10074
  case ServiceTypeEnum.ExternalName:
10071
10075
  content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
10072
- value: (_b = spec.externalIPs) == null ? void 0 : _b.join(breakLine ? "\n" : ", ")
10076
+ useOverflow: false,
10077
+ value: (_c = spec.externalIPs) == null ? void 0 : _c.join(breakLine ? "\n" : ", ")
10073
10078
  });
10074
10079
  break;
10075
10080
  case ServiceTypeEnum.LoadBalancer:
10076
10081
  content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
10077
- value: (_d = (_c = status.loadBalancer) == null ? void 0 : _c.ingress) == null ? void 0 : _d.map(({
10082
+ useOverflow: false,
10083
+ value: (_e = (_d = status.loadBalancer) == null ? void 0 : _d.ingress) == null ? void 0 : _e.map(({
10078
10084
  ip
10079
10085
  }) => ip).join(breakLine ? "\n" : ", ")
10080
10086
  });
@@ -10084,6 +10090,7 @@ var __publicField = (obj, key, value) => {
10084
10090
  break;
10085
10091
  default:
10086
10092
  content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
10093
+ useOverflow: false,
10087
10094
  value: ""
10088
10095
  });
10089
10096
  break;
@@ -10907,8 +10914,25 @@ var __publicField = (obj, key, value) => {
10907
10914
  }, `${image2}-${index}`)) : value2.join(", ")
10908
10915
  });
10909
10916
  };
10917
+ const index_1m8lip = "";
10918
+ const LinkStyle$1 = "lmmrm55";
10919
+ function LinkFallback({
10920
+ fullPath
10921
+ }) {
10922
+ if (fullPath.includes("http") && !fullPath.includes("*")) {
10923
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Link, {
10924
+ className: LinkStyle$1,
10925
+ href: fullPath,
10926
+ target: "_blank",
10927
+ children: fullPath
10928
+ });
10929
+ }
10930
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
10931
+ children: fullPath
10932
+ });
10933
+ }
10910
10934
  const index_cbhkdt = "";
10911
- const LinkStyle$1 = "l1vnw9x0";
10935
+ const LinkStyle = "l1vnw9x0";
10912
10936
  const ResourceLink = (props) => {
10913
10937
  const {
10914
10938
  name: name2,
@@ -10930,7 +10954,7 @@ var __publicField = (obj, key, value) => {
10930
10954
  });
10931
10955
  };
10932
10956
  return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.Link, {
10933
- className: LinkStyle$1,
10957
+ className: LinkStyle,
10934
10958
  onClick,
10935
10959
  children: resourceId
10936
10960
  });
@@ -10958,7 +10982,10 @@ var __publicField = (obj, key, value) => {
10958
10982
  dataIndex: "fullPath",
10959
10983
  title: t2("dovetail.path"),
10960
10984
  width: 478,
10961
- sortable: true
10985
+ sortable: true,
10986
+ render(value2) {
10987
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(LinkFallback, { fullPath: value2 });
10988
+ }
10962
10989
  },
10963
10990
  {
10964
10991
  key: "serviceName",
@@ -11125,14 +11152,14 @@ var __publicField = (obj, key, value) => {
11125
11152
  return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.tabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
11126
11153
  }) });
11127
11154
  }
11128
- const ShowContent_fjwscu = "";
11155
+ const ShowContent_vvz9yc = "";
11129
11156
  const ShowContentWrapperStyle = "s9agep2";
11130
11157
  const BackButton = "bo89gfi";
11131
11158
  const ToolBarWrapper = "t1ohe42f";
11132
11159
  const NameStyle = "nqm4qz0";
11133
11160
  const TopBarStyle = "ticl0qc";
11134
11161
  const ShowContentHeaderStyle = "so9uwk1";
11135
- const GroupStyle = "ge26ou0";
11162
+ const GroupStyle$1 = "ge26ou0";
11136
11163
  const GroupTitleStyle = "g17f8vl9";
11137
11164
  const FullTabContentStyle = "fykgn2i";
11138
11165
  const FieldWrapperStyle = "fngr745";
@@ -11147,7 +11174,7 @@ var __publicField = (obj, key, value) => {
11147
11174
  operationEle
11148
11175
  } = props;
11149
11176
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
11150
- className: cx_default(GroupStyle, className),
11177
+ className: cx_default(GroupStyle$1, className),
11151
11178
  children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
11152
11179
  className: cx_default(eagle.Typo.Heading.h2_bold_title, GroupTitleStyle),
11153
11180
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
@@ -11301,11 +11328,17 @@ var __publicField = (obj, key, value) => {
11301
11328
  children: (_a2 = tab.groups) == null ? void 0 : _a2.map((group) => {
11302
11329
  const GroupContainer = group.title ? ShowGroupComponent : React.Fragment;
11303
11330
  const FieldContainer = group.title ? kit.row : React.Fragment;
11331
+ const groupContainerProps = group.title ? {
11332
+ title: group.title || ""
11333
+ } : {};
11334
+ const fieldContainerProps = group.title ? {
11335
+ gutter: [24, 8]
11336
+ } : {};
11304
11337
  return /* @__PURE__ */ jsxRuntimeExports.jsx(GroupContainer, {
11305
- title: group.title || "",
11338
+ ...groupContainerProps,
11306
11339
  children: group.areas.map((area, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
11307
11340
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(FieldContainer, {
11308
- gutter: [24, 8],
11341
+ ...fieldContainerProps,
11309
11342
  children: renderFields(area.fields, area.type, !!group.title)
11310
11343
  }, index), index !== group.areas.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(kit.divider, {
11311
11344
  style: {
@@ -11329,8 +11362,9 @@ var __publicField = (obj, key, value) => {
11329
11362
  }), tabs]
11330
11363
  });
11331
11364
  };
11332
- const KeyValueSecret_1nzeh2v = "";
11365
+ const KeyValueSecret_1ibo68a = "";
11333
11366
  const ButtonStyle = "b11tbgf7";
11367
+ const GroupStyle = "gtbyh5g";
11334
11368
  function KeyValueSecret(props) {
11335
11369
  const {
11336
11370
  data: data2 = {}
@@ -11352,6 +11386,7 @@ var __publicField = (obj, key, value) => {
11352
11386
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ShowGroupComponent, {
11353
11387
  title: i18n2.t("dovetail.data"),
11354
11388
  operationEle: toggleButton,
11389
+ className: GroupStyle,
11355
11390
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, {
11356
11391
  data: data2,
11357
11392
  hideSecret,
@@ -11471,7 +11506,7 @@ var __publicField = (obj, key, value) => {
11471
11506
  [
11472
11507
  `error.${cause.reason}`,
11473
11508
  `error.${cause.code}`,
11474
- `${message2}${cause.field ? `(${cause.field})` : ""}`
11509
+ `${cause.field ? `${cause.field}: ` : ""}${message2}`
11475
11510
  ],
11476
11511
  {
11477
11512
  ...params,
@@ -11483,7 +11518,7 @@ var __publicField = (obj, key, value) => {
11483
11518
  [
11484
11519
  `error.${cause.reason}`,
11485
11520
  `error.${cause.code}`,
11486
- `${message2}${cause.field ? `(${cause.field})` : ""}`
11521
+ `${cause.field ? `${cause.field}: ` : ""}${message2}`
11487
11522
  ],
11488
11523
  {
11489
11524
  ...params,
@@ -17657,6 +17692,12 @@ var __publicField = (obj, key, value) => {
17657
17692
  scrollOffsetToBottom,
17658
17693
  scrollUpdateWasRequested
17659
17694
  } = params;
17695
+ if (scrollOffsetToBottom === -1) {
17696
+ setTimeout(() => {
17697
+ var _a2;
17698
+ (_a2 = logViewerRef.current) == null ? void 0 : _a2.scrollToBottom();
17699
+ }, 16);
17700
+ }
17660
17701
  if (!scrollUpdateWasRequested) {
17661
17702
  if (scrollOffsetToBottom > 0) {
17662
17703
  setPaused(true);
@@ -17901,7 +17942,9 @@ var __publicField = (obj, key, value) => {
17901
17942
  scrollBeyondLastLine: false,
17902
17943
  model,
17903
17944
  scrollbar: {
17904
- handleMouseWheel: !isScrollOnFocus
17945
+ handleMouseWheel: !isScrollOnFocus,
17946
+ alwaysConsumeMouseWheel: false
17947
+ // https://github.com/microsoft/monaco-editor/issues/2007
17905
17948
  },
17906
17949
  tabSize: 2,
17907
17950
  readOnly,
@@ -24053,45 +24096,37 @@ var __publicField = (obj, key, value) => {
24053
24096
  });
24054
24097
  return /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: tags });
24055
24098
  };
24056
- const index_18ct5u4 = "";
24057
- const LinkStyle = "l25ca2k";
24058
- const IngressRulesComponent = ({
24059
- ingress
24060
- }) => {
24099
+ const IngressRulesComponent = ({ ingress }) => {
24061
24100
  const kit = eagle.useUIKit();
24062
24101
  const result = ingress.flattenedRules.map((r2) => {
24063
24102
  const divider = " > ";
24064
- let pre = /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
24065
- children: r2.fullPath
24066
- });
24067
- if (r2.fullPath.includes("http") && !r2.fullPath.includes("*")) {
24068
- pre = /* @__PURE__ */ jsxRuntimeExports.jsx(kit.Link, {
24069
- className: LinkStyle,
24070
- href: r2.fullPath,
24071
- target: "_blank",
24072
- children: r2.fullPath
24073
- });
24074
- }
24075
- return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.overflowTooltip, {
24076
- content: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
24077
- children: [pre, /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
24078
- children: divider
24079
- }), r2.serviceName ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
24080
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx(ResourceLink, {
24081
- name: "services",
24082
- namespace: ingress.metadata.namespace || "default",
24083
- resourceId: r2.serviceName
24084
- }), /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
24085
- children: [":", r2.servicePort]
24086
- })]
24087
- }) : r2.resourceName]
24088
- }),
24089
- tooltip: `${r2.fullPath}${divider}:${r2.servicePort}`
24090
- }, r2.fullPath);
24091
- });
24092
- return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
24093
- children: result
24103
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
24104
+ kit.overflowTooltip,
24105
+ {
24106
+ content: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
24107
+ /* @__PURE__ */ jsxRuntimeExports.jsx(LinkFallback, { fullPath: r2.fullPath }),
24108
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: divider }),
24109
+ r2.serviceName ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
24110
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24111
+ ResourceLink,
24112
+ {
24113
+ name: "services",
24114
+ namespace: ingress.metadata.namespace || "default",
24115
+ resourceId: r2.serviceName
24116
+ }
24117
+ ),
24118
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
24119
+ ":",
24120
+ r2.servicePort
24121
+ ] })
24122
+ ] }) : r2.resourceName
24123
+ ] }),
24124
+ tooltip: `${r2.fullPath}${divider}:${r2.servicePort}`
24125
+ },
24126
+ r2.fullPath
24127
+ );
24094
24128
  });
24129
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: result });
24095
24130
  };
24096
24131
  const columns_1h38dp = "";
24097
24132
  const DashedTitleStyle = "dh5j833";
@@ -24391,6 +24426,7 @@ var __publicField = (obj, key, value) => {
24391
24426
  display: true,
24392
24427
  dataIndex: [],
24393
24428
  width: 160,
24429
+ sorter: void 0,
24394
24430
  render(_, record) {
24395
24431
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceInClusterAccessComponent, {
24396
24432
  service: record
@@ -24437,6 +24473,7 @@ var __publicField = (obj, key, value) => {
24437
24473
  display: true,
24438
24474
  dataIndex: [],
24439
24475
  width: 160,
24476
+ sorter: void 0,
24440
24477
  render(_, record) {
24441
24478
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceOutClusterAccessComponent, {
24442
24479
  service: record
@@ -24475,7 +24512,7 @@ var __publicField = (obj, key, value) => {
24475
24512
  display: true,
24476
24513
  dataIndex,
24477
24514
  sortable: true,
24478
- sorter: CommonSorter(dataIndex),
24515
+ sorter: void 0,
24479
24516
  width: 300,
24480
24517
  render(_, record) {
24481
24518
  return /* @__PURE__ */ jsxRuntimeExports.jsx(IngressRulesComponent, {
@@ -24578,7 +24615,8 @@ var __publicField = (obj, key, value) => {
24578
24615
  });
24579
24616
  },
24580
24617
  width: 300,
24581
- sortable: true
24618
+ sortable: true,
24619
+ sorter: void 0
24582
24620
  };
24583
24621
  };
24584
24622
  const PortMappingColumnRenderer = (i18n2, clusterVip) => {
@@ -24594,6 +24632,7 @@ var __publicField = (obj, key, value) => {
24594
24632
  display: true,
24595
24633
  dataIndex: ["displayPortMapping"],
24596
24634
  width: 300,
24635
+ sorter: void 0,
24597
24636
  render(value2, record) {
24598
24637
  var _a;
24599
24638
  const content = (_a = record.displayPortMapping) == null ? void 0 : _a.map((v) => /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
@@ -24668,10 +24707,7 @@ var __publicField = (obj, key, value) => {
24668
24707
  options: {
24669
24708
  warnWhenUnsavedChanges: true,
24670
24709
  liveMode: "auto",
24671
- disableTelemetry: true,
24672
- overtime: {
24673
- interval: Number.MAX_SAFE_INTEGER
24674
- }
24710
+ disableTelemetry: true
24675
24711
  },
24676
24712
  accessControlProvider,
24677
24713
  resources: resourcesConfig.map((c2) => {
package/dist/style.css CHANGED
@@ -5,8 +5,8 @@
5
5
  .e5223w8.e5223w8{color:rgba(0,21,64,.3);}
6
6
  .cdjsw14{width:100%;}.cdjsw14.overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
7
7
  .b142d7q8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.b142d7q8 .breadcrumb-item:not(:last-of-type):after{content:'>';margin:0 8px;}
8
- .egn3dbn{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;}
9
- .e136jgy8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.e136jgy8 .title{margin-bottom:8px;}.e136jgy8 .title.widget{background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-image:linear-gradient(211.41deg,#929dad 0%,#d3dbe3 100%);}.e136jgy8 .title.list{color:rgba(44,56,82,0.60);}.e136jgy8 .title.card{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:60px;color:rgba(0,21,64,0.30);}
8
+ .egn3dbn{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;}.egn3dbn.widget .title{background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-image:linear-gradient(211.41deg,#929dad 0%,#d3dbe3 100%);}.egn3dbn.list .title{color:rgba(44,56,82,0.60);}.egn3dbn.card .title{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:96px;color:rgba(0,21,64,0.30);}
9
+ .e136jgy8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.e136jgy8 .title{margin-bottom:8px;}
10
10
  .ax1qopv{position:absolute;top:0;left:0;bottom:0;width:1px;background:$blue-60;-webkit-transform:translateX(-9999px);-ms-transform:translateX(-9999px);transform:translateX(-9999px);z-index:999;}.ax1qopv::before{content:'';position:absolute;height:34px;width:3px;top:0;left:-1px;background:$blue-60;}
11
11
  .t1upn1sz{width:100%;border-top:1px solid rgba(211,218,235,0.6);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.t1upn1sz .ant-table-pagination{display:none;}.t1upn1sz .table-container{min-height:0;}
12
12
  .b1vtjd4k.ant-btn.ant-btn-link{display:block;}
@@ -20,6 +20,7 @@
20
20
  .d1wqyhgc{color:rgba(44,56,82,0.75);}
21
21
  .w16agr8o.ant-space{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}
22
22
  .i1u1f5zp{white-space:pre-line;}
23
+ .lmmrm55{padding:0 !important;}
23
24
  .l1vnw9x0{padding:0 !important;}
24
25
  .c8jy7dc{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:8px 10px;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;gap:8px;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;border-radius:4px;background:rgba(237,241,250,0.6);}.c8jy7dc:not(:last-of-type){margin-bottom:8px;}
25
26
  .k2sddxl{color:rgba(44,56,82,0.75);width:calc(30% - 4px);margin-right:8px;word-break:break-all;}
@@ -34,14 +35,15 @@
34
35
  .nqm4qz0{color:#00122E;margin-right:8px;}
35
36
  .ticl0qc{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;width:100%;}
36
37
  .so9uwk1{width:100%;}
37
- .ge26ou0{padding:12px 16px;padding-bottom:8px;border-radius:8px;border:1px solid rgba(211,218,235,0.6);box-shadow: 0px 0px 2.003px 0px rgba(107,125,153,0.15), 0px 0px 16px 0px rgba(107,125,153,0.08);background-color:#fff;margin:0 24px;overflow:auto;width:calc(100% - 48px);max-width:1592px;}.ge26ou0:first-of-type{margin-top:16px;}.ge26ou0:not(:last-of-type){margin-bottom:24px;}.ge26ou0 .pagination-wrapper{padding-top:12px;padding-bottom:0;}
38
- .g17f8vl9{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:#1d326c;margin-bottom:12px;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
38
+ .ge26ou0{padding:12px 16px;padding-bottom:4px;border-radius:8px;border:1px solid rgba(211,218,235,0.6);box-shadow: 0px 0px 2.003px 0px rgba(107,125,153,0.15), 0px 0px 16px 0px rgba(107,125,153,0.08);background-color:#fff;margin:0 24px;overflow:auto;width:calc(100% - 48px);max-width:1592px;}.ge26ou0:first-of-type{margin-top:16px;}.ge26ou0:not(:last-of-type){margin-bottom:24px;}.ge26ou0 .pagination-wrapper{padding-top:12px;padding-bottom:0;}
39
+ .g17f8vl9{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:#1d326c;margin-bottom:10px;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
39
40
  .fykgn2i{background-color:#fff;height:100%;}
40
41
  .fngr745{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}
41
42
  .t11wg61l{padding-bottom:16px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-width:904px;}
42
43
  .v1x3rivf{color:#00122E;}
43
44
  .tf5s6s.ant-tabs{-webkit-flex:1;-ms-flex:1;flex:1;min-height:0;}.tf5s6s.ant-tabs .ant-tabs-nav{margin-bottom:0;margin-right:24px;}.tf5s6s.ant-tabs .ant-tabs-nav-list{margin-left:24px;}.tf5s6s.ant-tabs .ant-tabs-content-holder{overflow:auto;}.tf5s6s.ant-tabs .ant-tabs-content-holder .ant-tabs-content,.tf5s6s.ant-tabs .ant-tabs-content-holder .ant-tabs-tabpane-active{height:100%;}
44
45
  .b11tbgf7.ant-btn-quiet.ant-btn{color:rgba(44,56,82,0.75);}
46
+ .gtbyh5g{padding-bottom:12px;}
45
47
  .c1dicff8{width:100%;vertical-align:top;}
46
48
  .esoz3jw.ant-btn.ant-btn-link{font-size:13px;height:22px;margin-left:8px;}
47
49
  .w8ychfk{border-radius:8px;border:1px solid rgba(211,218,235,0.60);padding:16px;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
@@ -1538,7 +1540,6 @@
1538
1540
  .c1i80kj{height:100%;}
1539
1541
  .s18sezq1.ant-layout-sider{background:#edf0f7;}
1540
1542
  .cyc9hl2.ant-layout-content{background:#fff;}
1541
- .l25ca2k{padding:0 !important;}
1542
1543
  .dh5j833{border-bottom:1px dashed rgba(107,128,167,0.6);padding-bottom:1px;}
1543
1544
  .s1fcgan.ant-tooltip .ant-tooltip-inner{width:256px;}
1544
1545
  .ciistgu{padding:0 !important;}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare function LinkFallback({ fullPath }: {
3
+ fullPath: string;
4
+ }): JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface ModalInfo {
3
+ resource: string;
4
+ id?: string;
5
+ }
6
+ type ModalContextValue = ModalInfo & {
7
+ open: (info: ModalInfo) => void;
8
+ close: () => void;
9
+ };
10
+ export declare const ModalContext: React.Context<ModalContextValue>;
11
+ declare function ModalContextProvider(props: React.PropsWithChildren<Record<string, unknown>>): JSX.Element;
12
+ export default ModalContextProvider;
@@ -2,6 +2,7 @@ import type { NetworkPolicyIngressRule, NetworkPolicyEgressRule } from 'kubernet
2
2
  import React from 'react';
3
3
  type Props = {
4
4
  ingressOrEgress: NetworkPolicyIngressRule[] | NetworkPolicyEgressRule[];
5
+ kind?: string;
5
6
  };
6
- export declare const NetworkPolicyRulesTable: React.FC<Props>;
7
+ export declare const NetworkPolicyRulesViewer: React.FC<Props>;
7
8
  export {};
@@ -8,10 +8,11 @@ type Props<Model extends ResourceModel> = {
8
8
  record: Model;
9
9
  }>;
10
10
  };
11
- export declare function ShowGroupComponent(props: React.PropsWithChildren<{
11
+ type ShowGroupComponentProps = React.PropsWithChildren<{
12
12
  title: string;
13
13
  className?: string;
14
14
  operationEle?: React.ReactElement | null;
15
- }>): JSX.Element;
15
+ }>;
16
+ export declare function ShowGroupComponent(props: ShowGroupComponentProps): JSX.Element;
16
17
  export declare const ShowContent: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(props: Props<Model>) => JSX.Element | null;
17
18
  export {};
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { FormAction } from '@refinedev/core';
2
3
  import useEagleForm from 'src/hooks/useEagleForm';
3
4
  export declare enum SchemaStrategy {
4
5
  Required = "Required",
@@ -7,7 +8,9 @@ export declare enum SchemaStrategy {
7
8
  }
8
9
  export interface YamlFormProps {
9
10
  id?: string;
11
+ action?: FormAction;
10
12
  initialValues?: Record<string, unknown>;
13
+ transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
11
14
  schemaStrategy?: SchemaStrategy;
12
15
  isShowLayout?: boolean;
13
16
  useFormProps?: Parameters<typeof useEagleForm>[0];
@@ -15,6 +18,7 @@ export interface YamlFormProps {
15
18
  disabled?: boolean;
16
19
  onClick: () => void;
17
20
  }) => void;
21
+ onErrorsChange?: (errors: string[]) => void;
18
22
  onFinish?: () => void;
19
23
  }
20
24
  declare function YamlForm(props: YamlFormProps): JSX.Element;
@@ -20,6 +20,7 @@ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError ex
20
20
  isSkipSchema?: boolean;
21
21
  };
22
22
  initialValuesForCreate?: Record<string, unknown>;
23
+ transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
23
24
  };
24
25
  export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
25
26
  form: FormInstance;
@@ -43,5 +44,5 @@ declare const useEagleForm: <TQueryFnData extends Unstructured = Unstructured &
43
44
  [prop: string]: unknown;
44
45
  } = {
45
46
  [prop: string]: unknown;
46
- }, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
47
+ }, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action: actionFromProps, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, transformValues, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
47
48
  export default useEagleForm;
File without changes
@@ -0,0 +1,5 @@
1
+ import { CrudFilters } from '@refinedev/core';
2
+ declare function useNamespaceRefineFilter(): {
3
+ permanent: CrudFilters;
4
+ };
5
+ export default useNamespaceRefineFilter;
@@ -0,0 +1,9 @@
1
+ import { CronJob } from 'kubernetes-types/batch/v1';
2
+ import { WithId } from '../types';
3
+ import { WorkloadModel } from './workload-model';
4
+ export declare class CronJobModel extends WorkloadModel<CronJob> {
5
+ data: WithId<CronJob>;
6
+ constructor(data: WithId<CronJob>);
7
+ suspend(): WithId<CronJob>;
8
+ resume(): WithId<CronJob>;
9
+ }
@@ -0,0 +1,6 @@
1
+ export * from './job-model';
2
+ export * from './pod-model';
3
+ export * from './pod-metrics-model';
4
+ export * from './resource-model';
5
+ export * from './workload-model';
6
+ export * from './cronjob-model';
@@ -0,0 +1,10 @@
1
+ import { Job } from 'kubernetes-types/batch/v1';
2
+ import { WithId } from '../types';
3
+ import { WorkloadModel } from './workload-model';
4
+ export declare class JobModel extends WorkloadModel<Job> {
5
+ rawYaml: WithId<Job>;
6
+ constructor(rawYaml: WithId<Job>);
7
+ get duration(): number;
8
+ get durationDisplay(): string | undefined;
9
+ get completionsDisplay(): string;
10
+ }
@@ -0,0 +1,7 @@
1
+ import { PodMetrics, ResourceQuantity } from 'src/types/metric';
2
+ import { ResourceModel } from './resource-model';
3
+ export declare class PodMetricsModel extends ResourceModel {
4
+ data: PodMetrics;
5
+ usage: ResourceQuantity;
6
+ constructor(data: PodMetrics);
7
+ }
@@ -0,0 +1,15 @@
1
+ import type { Pod } from 'kubernetes-types/core/v1';
2
+ import { ResourceQuantity } from 'src/types/metric';
3
+ import { WithId } from '../types';
4
+ import { WorkloadModel } from './workload-model';
5
+ export declare class PodModel extends WorkloadModel<Pod> {
6
+ rawYaml: WithId<Pod>;
7
+ request: ResourceQuantity;
8
+ limit: ResourceQuantity;
9
+ constructor(rawYaml: WithId<Pod>);
10
+ get imageNames(): string[];
11
+ get restartCount(): number;
12
+ get readyDisplay(): string;
13
+ get readyContainerCount(): number | undefined;
14
+ get containerCount(): number | undefined;
15
+ }
@@ -0,0 +1,17 @@
1
+ import { Resource } from '../types';
2
+ export declare class ResourceModel implements Resource {
3
+ rawYaml: Resource;
4
+ id: Resource['id'];
5
+ apiVersion: Resource['apiVersion'];
6
+ kind: Resource['kind'];
7
+ metadata: Resource['metadata'];
8
+ constructor(rawYaml: Resource);
9
+ get name(): string | undefined;
10
+ get namespace(): string | undefined;
11
+ get labels(): {
12
+ [name: string]: string;
13
+ } | undefined;
14
+ get annotations(): {
15
+ [name: string]: string;
16
+ } | undefined;
17
+ }
@@ -0,0 +1,17 @@
1
+ import type { DaemonSet, Deployment, StatefulSet } from 'kubernetes-types/apps/v1';
2
+ import type { CronJob, Job } from 'kubernetes-types/batch/v1';
3
+ import { Pod } from 'kubernetes-types/core/v1';
4
+ import { WithId } from '../types';
5
+ import { ResourceModel } from './resource-model';
6
+ type WorkloadTypes = Deployment | StatefulSet | Job | DaemonSet | CronJob | Pod;
7
+ export declare class WorkloadModel<T extends WorkloadTypes = WorkloadTypes> extends ResourceModel {
8
+ rawYaml: WithId<T>;
9
+ constructor(rawYaml: WithId<T>);
10
+ get status(): T['status'];
11
+ get spec(): T['spec'];
12
+ get imageNames(): string[];
13
+ get restartCount(): number;
14
+ redeploy(): WithId<T>;
15
+ scale(value: number): WithId<T>;
16
+ }
17
+ export {};
@@ -0,0 +1,25 @@
1
+ import { Resource } from './resource';
2
+ type Quantity = string;
3
+ export type ContainerMetrics = {
4
+ name: string;
5
+ usage: {
6
+ cpu?: Quantity;
7
+ memory?: Quantity;
8
+ };
9
+ };
10
+ export type PodMetrics = {
11
+ timestamp: string;
12
+ window: string;
13
+ containers: ContainerMetrics[];
14
+ } & Resource;
15
+ export type ResourceQuantity = {
16
+ cpu: {
17
+ si: string;
18
+ value: number;
19
+ };
20
+ memory: {
21
+ si: string;
22
+ value: number;
23
+ };
24
+ };
25
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.0.55",
3
+ "version": "0.0.57",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",