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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/dist/{MonacoYamlDiffEditor-0f76e977.js → MonacoYamlDiffEditor-adaa32ac.js} +1 -1
  2. package/dist/{index-aacb414b.js → index-906cb61f.js} +1161 -874
  3. package/dist/refine.js +208 -203
  4. package/dist/refine.umd.cjs +954 -667
  5. package/dist/style.css +44 -44
  6. package/lib/components/CreateButton/index.d.ts +5 -1
  7. package/lib/components/DropdownMenuItems/EditNodeTaintDropdownMenuItem.d.ts +12 -0
  8. package/lib/components/Dropdowns/CronJobDropdown/index.d.ts +9 -0
  9. package/lib/components/Dropdowns/K8sDropdown/index.d.ts +9 -0
  10. package/lib/components/Dropdowns/PodDropdown/index.d.ts +9 -0
  11. package/lib/components/Dropdowns/ReplicasDropdown/index.d.ts +9 -0
  12. package/lib/components/Dropdowns/WorkloadDropdown/index.d.ts +9 -0
  13. package/lib/components/EditField/index.d.ts +1 -1
  14. package/lib/components/EditMetadataForm/EditNodeTaintForm.d.ts +12 -0
  15. package/lib/components/InternalBaseTable/TableWidgets.d.ts +6 -0
  16. package/lib/components/InternalBaseTable/index.d.ts +43 -0
  17. package/lib/components/ListPage/index.d.ts +2 -2
  18. package/lib/components/NodeTaintsTable/NodeTaintsTable.d.ts +7 -0
  19. package/lib/components/NodeTaintsTable/index.d.ts +1 -0
  20. package/lib/components/PVCDistributeStorage/index.d.ts +1 -1
  21. package/lib/components/ResourceFiledDisplays.d.ts +2 -3
  22. package/lib/components/ResourceLink/index.d.ts +2 -2
  23. package/lib/components/ResourceSelect/index.d.ts +2 -2
  24. package/lib/components/ShowContent/fields.d.ts +2 -0
  25. package/lib/components/ShowContent/groups.d.ts +4 -2
  26. package/lib/components/StateTag/StateTag.d.ts +3 -3
  27. package/lib/components/Table/TableToolBar.d.ts +1 -0
  28. package/lib/components/Table/index.d.ts +11 -43
  29. package/lib/components/TableToolbar/index.d.ts +9 -0
  30. package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +2 -0
  31. package/lib/components/index.d.ts +7 -5
  32. package/lib/constants/state.d.ts +8 -3
  33. package/lib/contexts/component.d.ts +1 -1
  34. package/lib/hooks/useEagleTable/columns.d.ts +2 -1
  35. package/lib/hooks/useEagleTable/useEagleTable.d.ts +3 -4
  36. package/lib/hooks/useSubmitForm.d.ts +1 -1
  37. package/lib/hooks/useTableData.d.ts +1 -1
  38. package/lib/i18n.d.ts +29 -18
  39. package/lib/locales/zh-CN/index.d.ts +29 -18
  40. package/lib/models/cronjob-model.d.ts +2 -2
  41. package/lib/models/daemonset-model.d.ts +2 -2
  42. package/lib/models/deployment-model.d.ts +2 -2
  43. package/lib/models/job-model.d.ts +2 -2
  44. package/lib/models/node-model.d.ts +2 -2
  45. package/lib/models/persistent-volume-claim.d.ts +2 -0
  46. package/lib/models/persistent-volume.d.ts +3 -0
  47. package/lib/models/statefulset-model.d.ts +2 -2
  48. package/lib/src/App.d.ts +3 -0
  49. package/lib/src/Dovetail.d.ts +18 -0
  50. package/lib/src/components/Breadcrumb/index.d.ts +6 -0
  51. package/lib/src/components/ConditionsTable/ConditionsTable.d.ts +7 -0
  52. package/lib/src/components/ConditionsTable/index.d.ts +1 -0
  53. package/lib/src/components/CreateButton/index.d.ts +2 -0
  54. package/lib/src/components/CronJobDropdown/index.d.ts +9 -0
  55. package/lib/src/components/CronjobJobsTable/index.d.ts +8 -0
  56. package/lib/src/components/DeleteButton/index.d.ts +2 -0
  57. package/lib/src/components/DeleteManyButton/index.d.ts +4 -0
  58. package/lib/src/components/DrawerShow/DrawerShow.d.ts +9 -0
  59. package/lib/src/components/DrawerShow/index.d.ts +1 -0
  60. package/lib/src/components/DurationTime/index.d.ts +6 -0
  61. package/lib/src/components/EditButton/index.d.ts +2 -0
  62. package/lib/src/components/EditField/index.d.ts +15 -0
  63. package/lib/src/components/ErrorContent/index.d.ts +17 -0
  64. package/lib/src/components/EventsTable/EventsTable.d.ts +6 -0
  65. package/lib/src/components/EventsTable/index.d.ts +1 -0
  66. package/lib/src/components/Form/FormModal.d.ts +9 -0
  67. package/lib/src/components/Form/RefineFormContent.d.ts +12 -0
  68. package/lib/src/components/Form/RefineFormPage.d.ts +7 -0
  69. package/lib/src/components/Form/YamlForm.d.ts +29 -0
  70. package/lib/src/components/Form/index.d.ts +7 -0
  71. package/lib/src/components/Form/type.d.ts +17 -0
  72. package/lib/src/components/Form/useFieldsConfig.d.ts +4 -0
  73. package/lib/src/components/Form/useReactHookForm.d.ts +30 -0
  74. package/lib/src/components/Form/useRefineForm.d.ts +13 -0
  75. package/lib/src/components/Form/useYamlForm.d.ts +50 -0
  76. package/lib/src/components/FormErrorAlert/index.d.ts +9 -0
  77. package/lib/src/components/FormLayout/index.d.ts +7 -0
  78. package/lib/src/components/FormWidgets/KeyValueListWidget.d.ts +6 -0
  79. package/lib/src/components/FormWidgets/MetadataForm.d.ts +2 -0
  80. package/lib/src/components/FormWidgets/NameInputWidget.d.ts +51 -0
  81. package/lib/src/components/FormWidgets/NamespaceSelectWidget.d.ts +9 -0
  82. package/lib/src/components/FormWidgets/index.d.ts +4 -0
  83. package/lib/src/components/FormWidgets/widget.d.ts +5 -0
  84. package/lib/src/components/ImageNames/index.d.ts +5 -0
  85. package/lib/src/components/IngressRulesComponent/index.d.ts +5 -0
  86. package/lib/src/components/IngressRulesTable/IngressRulesTable.d.ts +7 -0
  87. package/lib/src/components/IngressRulesTable/index.d.ts +1 -0
  88. package/lib/src/components/K8sDropdown/index.d.ts +9 -0
  89. package/lib/src/components/KeyValue/KeyValue.d.ts +7 -0
  90. package/lib/src/components/KeyValue/KeyValueAnnotation.d.ts +6 -0
  91. package/lib/src/components/KeyValue/KeyValueSecret.d.ts +5 -0
  92. package/lib/src/components/KeyValue/index.d.ts +3 -0
  93. package/lib/src/components/Layout/index.d.ts +3 -0
  94. package/lib/src/components/LinkFallback/index.d.ts +4 -0
  95. package/lib/src/components/ListPage/index.d.ts +10 -0
  96. package/lib/src/components/Menu/index.d.ts +2 -0
  97. package/lib/src/components/NamespacesFilter/index.d.ts +11 -0
  98. package/lib/src/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +8 -0
  99. package/lib/src/components/NetworkPolicyRulesViewer/index.d.ts +1 -0
  100. package/lib/src/components/PVCDistributeStorage/index.d.ts +16 -0
  101. package/lib/src/components/PageShow/PageShow.d.ts +12 -0
  102. package/lib/src/components/PageShow/index.d.ts +1 -0
  103. package/lib/src/components/PodContainersTable/PodContainersTable.d.ts +8 -0
  104. package/lib/src/components/PodContainersTable/index.d.ts +1 -0
  105. package/lib/src/components/PodDropdown/index.d.ts +9 -0
  106. package/lib/src/components/PodLog/index.d.ts +6 -0
  107. package/lib/src/components/PodSelectorTable/index.d.ts +6 -0
  108. package/lib/src/components/PodShellModal/PodShell.d.ts +18 -0
  109. package/lib/src/components/PodShellModal/index.d.ts +10 -0
  110. package/lib/src/components/PortsTable/index.d.ts +7 -0
  111. package/lib/src/components/ReferenceLink/index.d.ts +8 -0
  112. package/lib/src/components/ReplicasDropdown/index.d.ts +9 -0
  113. package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +8 -0
  114. package/lib/src/components/ResourceCRUD/create/index.d.ts +8 -0
  115. package/lib/src/components/ResourceCRUD/index.d.ts +4 -0
  116. package/lib/src/components/ResourceCRUD/list/index.d.ts +9 -0
  117. package/lib/src/components/ResourceCRUD/show/index.d.ts +9 -0
  118. package/lib/src/components/ResourceFiledDisplays.d.ts +7 -0
  119. package/lib/src/components/ResourceLink/index.d.ts +8 -0
  120. package/lib/src/components/ResourceSelect/index.d.ts +12 -0
  121. package/lib/src/components/ResourceTable/index.d.ts +9 -0
  122. package/lib/src/components/ResourceUsageBar/index.d.ts +8 -0
  123. package/lib/src/components/Separator/index.d.ts +2 -0
  124. package/lib/src/components/ServiceComponents/index.d.ts +10 -0
  125. package/lib/src/components/Shell/ShellToolbar.d.ts +16 -0
  126. package/lib/src/components/Shell/index.d.ts +74 -0
  127. package/lib/src/components/ShowContent/ShowContent.d.ts +18 -0
  128. package/lib/src/components/ShowContent/fields.d.ts +76 -0
  129. package/lib/src/components/ShowContent/groups.d.ts +24 -0
  130. package/lib/src/components/ShowContent/index.d.ts +4 -0
  131. package/lib/src/components/ShowContent/tabs.d.ts +5 -0
  132. package/lib/src/components/StateTag/StateTag.d.ts +10 -0
  133. package/lib/src/components/StateTag/index.d.ts +1 -0
  134. package/lib/src/components/Table/TableToolBar.d.ts +8 -0
  135. package/lib/src/components/Table/TableWidgets.d.ts +6 -0
  136. package/lib/src/components/Table/index.d.ts +43 -0
  137. package/lib/src/components/Tabs/index.d.ts +10 -0
  138. package/lib/src/components/Tags/index.d.ts +6 -0
  139. package/lib/src/components/TextTags/index.d.ts +6 -0
  140. package/lib/src/components/Time/index.d.ts +8 -0
  141. package/lib/src/components/ValueDisplay/index.d.ts +9 -0
  142. package/lib/src/components/WorkloadDropdown/index.d.ts +9 -0
  143. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +9 -0
  144. package/lib/src/components/WorkloadPodsTable/index.d.ts +1 -0
  145. package/lib/src/components/WorkloadReplicas/index.d.ts +17 -0
  146. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
  147. package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
  148. package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +27 -0
  149. package/lib/src/components/YamlEditor/index.d.ts +1 -0
  150. package/lib/src/components/YamlEditor/style.d.ts +11 -0
  151. package/lib/src/components/YamlEditor/yaml.worker.d.ts +1 -0
  152. package/lib/src/components/index.d.ts +49 -0
  153. package/lib/src/constants/auth.d.ts +5 -0
  154. package/lib/src/constants/index.d.ts +3 -0
  155. package/lib/src/constants/k8s.d.ts +522 -0
  156. package/lib/src/constants/state.d.ts +15 -0
  157. package/lib/src/contexts/component.d.ts +8 -0
  158. package/lib/src/contexts/configs.d.ts +4 -0
  159. package/lib/src/contexts/global-store.d.ts +6 -0
  160. package/lib/src/contexts/index.d.ts +3 -0
  161. package/lib/src/hooks/index.d.ts +8 -0
  162. package/lib/src/hooks/useDeleteModal/index.d.ts +1 -0
  163. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.d.ts +8 -0
  164. package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
  165. package/lib/src/hooks/useDownloadYAML.d.ts +7 -0
  166. package/lib/src/hooks/useEagleTable/columns.d.ts +47 -0
  167. package/lib/src/hooks/useEagleTable/index.d.ts +2 -0
  168. package/lib/src/hooks/useEagleTable/useEagleTable.d.ts +56 -0
  169. package/lib/src/hooks/useEdit.d.ts +4 -0
  170. package/lib/src/hooks/useGlobalStore.d.ts +3 -0
  171. package/lib/src/hooks/useK8sYamlEditor.d.ts +5 -0
  172. package/lib/src/hooks/useNamespaceRefineFilter.d.ts +5 -0
  173. package/lib/src/hooks/useOpenForm.d.ts +8 -0
  174. package/lib/src/hooks/useSchema.d.ts +21 -0
  175. package/lib/src/hooks/useSubmitForm.d.ts +14 -0
  176. package/lib/src/hooks/useTableData.d.ts +20 -0
  177. package/lib/src/i18n.d.ts +371 -0
  178. package/lib/src/index.d.ts +12 -0
  179. package/lib/src/locales/en-US/index.d.ts +175 -0
  180. package/lib/src/locales/index.d.ts +2 -0
  181. package/lib/src/locales/zh-CN/index.d.ts +193 -0
  182. package/lib/src/main.d.ts +3 -0
  183. package/lib/src/models/cronjob-model.d.ts +15 -0
  184. package/lib/src/models/daemonset-model.d.ts +15 -0
  185. package/lib/src/models/deployment-model.d.ts +13 -0
  186. package/lib/src/models/event-model.d.ts +7 -0
  187. package/lib/src/models/index.d.ts +19 -0
  188. package/lib/src/models/ingress-model.d.ts +20 -0
  189. package/lib/src/models/job-model.d.ts +20 -0
  190. package/lib/src/models/network-policy-model.d.ts +9 -0
  191. package/lib/src/models/node-model.d.ts +17 -0
  192. package/lib/src/models/persistent-volume-claim.d.ts +13 -0
  193. package/lib/src/models/persistent-volume.d.ts +13 -0
  194. package/lib/src/models/pod-metrics-model.d.ts +8 -0
  195. package/lib/src/models/pod-model.d.ts +20 -0
  196. package/lib/src/models/resource-model.d.ts +21 -0
  197. package/lib/src/models/service-model.d.ts +24 -0
  198. package/lib/src/models/statefulset-model.d.ts +13 -0
  199. package/lib/src/models/storage-class.d.ts +16 -0
  200. package/lib/src/models/types/index.d.ts +1 -0
  201. package/lib/src/models/types/metric.d.ts +25 -0
  202. package/lib/src/models/workload-base-model.d.ts +12 -0
  203. package/lib/src/models/workload-model.d.ts +18 -0
  204. package/lib/src/pages/configmaps/index.d.ts +4 -0
  205. package/lib/src/pages/cronjobs/create/index.d.ts +3 -0
  206. package/lib/src/pages/cronjobs/index.d.ts +3 -0
  207. package/lib/src/pages/cronjobs/list/index.d.ts +3 -0
  208. package/lib/src/pages/cronjobs/show/index.d.ts +3 -0
  209. package/lib/src/pages/daemonsets/create/index.d.ts +3 -0
  210. package/lib/src/pages/daemonsets/index.d.ts +3 -0
  211. package/lib/src/pages/daemonsets/list/index.d.ts +3 -0
  212. package/lib/src/pages/daemonsets/show/index.d.ts +3 -0
  213. package/lib/src/pages/deployments/index.d.ts +2 -0
  214. package/lib/src/pages/deployments/list/index.d.ts +3 -0
  215. package/lib/src/pages/deployments/show/index.d.ts +3 -0
  216. package/lib/src/pages/ingresses/index.d.ts +4 -0
  217. package/lib/src/pages/jobs/index.d.ts +4 -0
  218. package/lib/src/pages/networkPolicies/index.d.ts +4 -0
  219. package/lib/src/pages/nodes/index.d.ts +2 -0
  220. package/lib/src/pages/nodes/list/index.d.ts +3 -0
  221. package/lib/src/pages/nodes/show/index.d.ts +3 -0
  222. package/lib/src/pages/persistentvolumeclaims/index.d.ts +4 -0
  223. package/lib/src/pages/persistentvolumes/index.d.ts +4 -0
  224. package/lib/src/pages/pods/create/index.d.ts +3 -0
  225. package/lib/src/pages/pods/index.d.ts +3 -0
  226. package/lib/src/pages/pods/list/index.d.ts +3 -0
  227. package/lib/src/pages/pods/show/index.d.ts +3 -0
  228. package/lib/src/pages/secrets/index.d.ts +4 -0
  229. package/lib/src/pages/services/index.d.ts +4 -0
  230. package/lib/src/pages/statefulsets/index.d.ts +4 -0
  231. package/lib/src/pages/storageclasses/form/index.d.ts +9 -0
  232. package/lib/src/pages/storageclasses/index.d.ts +48 -0
  233. package/lib/src/plugins/index.d.ts +4 -0
  234. package/lib/src/plugins/model-plugin.d.ts +13 -0
  235. package/lib/src/plugins/relation-plugin.d.ts +26 -0
  236. package/lib/src/plugins/type.d.ts +8 -0
  237. package/lib/src/providers/index.d.ts +1 -0
  238. package/lib/src/providers/router-provider/index.d.ts +21 -0
  239. package/lib/src/styles/button.d.ts +1 -0
  240. package/lib/src/styles/modal.d.ts +1 -0
  241. package/lib/src/types/index.d.ts +1 -0
  242. package/lib/src/types/resource.d.ts +62 -0
  243. package/lib/src/utils/addId.d.ts +3 -0
  244. package/lib/src/utils/download.d.ts +1 -0
  245. package/lib/src/utils/error.d.ts +20 -0
  246. package/lib/src/utils/form.d.ts +3 -0
  247. package/lib/src/utils/index.d.ts +1 -0
  248. package/lib/src/utils/k8s.d.ts +3 -0
  249. package/lib/src/utils/labels.d.ts +9 -0
  250. package/lib/src/utils/match-selector.d.ts +3 -0
  251. package/lib/src/utils/openapi.d.ts +40 -0
  252. package/lib/src/utils/schema.d.ts +18 -0
  253. package/lib/src/utils/selector.d.ts +3 -0
  254. package/lib/src/utils/shell.d.ts +16 -0
  255. package/lib/src/utils/storage.d.ts +13 -0
  256. package/lib/src/utils/string.d.ts +1 -0
  257. package/lib/src/utils/time.d.ts +13 -0
  258. package/lib/src/utils/unit.d.ts +12 -0
  259. package/lib/src/utils/yaml.d.ts +2 -0
  260. package/lib/styles/tag.d.ts +1 -0
  261. package/lib/types/resource.d.ts +3 -3
  262. package/lib/vite.config.d.ts +2 -0
  263. package/package.json +5 -5
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { CrudSorting } from '@refinedev/core';
3
- import { Column, SorterOrder } from 'src/components/Table';
3
+ import { Column, SorterOrder } from 'src/components/InternalBaseTable';
4
4
  type UseTableDataProps<Data extends {
5
5
  id: string;
6
6
  }> = {
package/lib/i18n.d.ts CHANGED
@@ -235,18 +235,18 @@ export declare const resources: {
235
235
  fetch_schema_fail: string;
236
236
  obtain_data_error: string;
237
237
  retry: string;
238
- ready: string;
239
- updating: string;
240
- completed: string;
241
- failed: string;
242
- suspended: string;
243
- running: string;
244
- terminating: string;
245
- succeeded: string;
246
- terminated: string;
247
- unknown: string;
248
- pending: string;
249
- waiting: string;
238
+ ready_state: string;
239
+ updating_state: string;
240
+ completed_state: string;
241
+ abnormal_state: string;
242
+ suspended_state: string;
243
+ running_state: string;
244
+ terminating_state: string;
245
+ succeeded_state: string;
246
+ terminated_state: string;
247
+ unknown_state: string;
248
+ pending_state: string;
249
+ waiting_state: string;
250
250
  create_resource: string;
251
251
  edit_resource: string;
252
252
  sec: string;
@@ -283,6 +283,7 @@ export declare const resources: {
283
283
  protocol: string;
284
284
  key: string;
285
285
  value: string;
286
+ effect: string;
286
287
  show_data_value: string;
287
288
  hide_data_value: string;
288
289
  path_type: string;
@@ -333,7 +334,7 @@ export declare const resources: {
333
334
  only_support_one_yaml: string;
334
335
  support: string;
335
336
  not_support: string;
336
- stopped: string;
337
+ stopped_state: string;
337
338
  any_node_ip: string;
338
339
  storage_class: string;
339
340
  persistent_volume: string;
@@ -344,11 +345,11 @@ export declare const resources: {
344
345
  volume_mode: string;
345
346
  access_mode: string;
346
347
  block: string;
347
- pv_phase_available: string;
348
- pv_phase_bound: string;
349
- pv_phase_released: string;
350
- pv_phase_failed: string;
351
- pv_phase_pending: string;
348
+ available_state: string;
349
+ bound_state: string;
350
+ released_state: string;
351
+ failed_state: string;
352
+ lost_state: string;
352
353
  font_size: string;
353
354
  download_shell_content: string;
354
355
  clear_shell: string;
@@ -374,6 +375,16 @@ export declare const resources: {
374
375
  edit_distribute_storage: string;
375
376
  edit_distribute_storage_success_toast: string;
376
377
  edit_distribute_storage_failed_toast: string;
378
+ edit_node_taint: string;
379
+ edit_node_taint_success_toast: string;
380
+ node_taint_NoSchedule: string;
381
+ node_taint_PreferNoSchedule: string;
382
+ node_taint_NoExecute: string;
383
+ taint: string;
384
+ change_form_mode_alert: string;
385
+ pvc_storage_required: string;
386
+ pvc_storage_min: string;
387
+ pvc_storage_reduce_limit: string;
377
388
  };
378
389
  };
379
390
  };
@@ -57,18 +57,18 @@ declare const _default: {
57
57
  fetch_schema_fail: string;
58
58
  obtain_data_error: string;
59
59
  retry: string;
60
- ready: string;
61
- updating: string;
62
- completed: string;
63
- failed: string;
64
- suspended: string;
65
- running: string;
66
- terminating: string;
67
- succeeded: string;
68
- terminated: string;
69
- unknown: string;
70
- pending: string;
71
- waiting: string;
60
+ ready_state: string;
61
+ updating_state: string;
62
+ completed_state: string;
63
+ abnormal_state: string;
64
+ suspended_state: string;
65
+ running_state: string;
66
+ terminating_state: string;
67
+ succeeded_state: string;
68
+ terminated_state: string;
69
+ unknown_state: string;
70
+ pending_state: string;
71
+ waiting_state: string;
72
72
  create_resource: string;
73
73
  edit_resource: string;
74
74
  sec: string;
@@ -105,6 +105,7 @@ declare const _default: {
105
105
  protocol: string;
106
106
  key: string;
107
107
  value: string;
108
+ effect: string;
108
109
  show_data_value: string;
109
110
  hide_data_value: string;
110
111
  path_type: string;
@@ -155,7 +156,7 @@ declare const _default: {
155
156
  only_support_one_yaml: string;
156
157
  support: string;
157
158
  not_support: string;
158
- stopped: string;
159
+ stopped_state: string;
159
160
  any_node_ip: string;
160
161
  storage_class: string;
161
162
  persistent_volume: string;
@@ -166,11 +167,11 @@ declare const _default: {
166
167
  volume_mode: string;
167
168
  access_mode: string;
168
169
  block: string;
169
- pv_phase_available: string;
170
- pv_phase_bound: string;
171
- pv_phase_released: string;
172
- pv_phase_failed: string;
173
- pv_phase_pending: string;
170
+ available_state: string;
171
+ bound_state: string;
172
+ released_state: string;
173
+ failed_state: string;
174
+ lost_state: string;
174
175
  font_size: string;
175
176
  download_shell_content: string;
176
177
  clear_shell: string;
@@ -196,6 +197,16 @@ declare const _default: {
196
197
  edit_distribute_storage: string;
197
198
  edit_distribute_storage_success_toast: string;
198
199
  edit_distribute_storage_failed_toast: string;
200
+ edit_node_taint: string;
201
+ edit_node_taint_success_toast: string;
202
+ node_taint_NoSchedule: string;
203
+ node_taint_PreferNoSchedule: string;
204
+ node_taint_NoExecute: string;
205
+ taint: string;
206
+ change_form_mode_alert: string;
207
+ pvc_storage_required: string;
208
+ pvc_storage_min: string;
209
+ pvc_storage_reduce_limit: string;
199
210
  };
200
211
  };
201
212
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
2
  import { CronJob } from 'kubernetes-types/batch/v1';
3
- import { WorkloadState } from '../constants';
3
+ import { ResourceState } from '../constants';
4
4
  import { WorkloadBaseModel } from './workload-base-model';
5
5
  type RequiredCronJob = Required<CronJob> & Unstructured;
6
6
  export declare class CronJobModel extends WorkloadBaseModel {
@@ -8,7 +8,7 @@ export declare class CronJobModel extends WorkloadBaseModel {
8
8
  spec?: RequiredCronJob['spec'];
9
9
  status?: RequiredCronJob['status'];
10
10
  constructor(_rawYaml: RequiredCronJob, _globalStore: GlobalStore);
11
- get stateDisplay(): WorkloadState.SUSPENDED | WorkloadState.RUNNING;
11
+ get stateDisplay(): ResourceState.SUSPENDED | ResourceState.RUNNING;
12
12
  suspend(): RequiredCronJob;
13
13
  resume(): RequiredCronJob;
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
2
  import { DaemonSet } from 'kubernetes-types/apps/v1';
3
- import { WorkloadState } from '../constants';
3
+ import { ResourceState } from '../constants';
4
4
  import { WorkloadModel } from './workload-model';
5
5
  type RequiredDaemonSet = Required<DaemonSet> & Unstructured;
6
6
  export declare class DaemonSetModel extends WorkloadModel {
@@ -8,7 +8,7 @@ export declare class DaemonSetModel extends WorkloadModel {
8
8
  spec?: RequiredDaemonSet['spec'];
9
9
  status?: RequiredDaemonSet['status'];
10
10
  constructor(_rawYaml: RequiredDaemonSet, _globalStore: GlobalStore);
11
- get stateDisplay(): WorkloadState.UPDATING | WorkloadState.READY;
11
+ get stateDisplay(): ResourceState.UPDATING | ResourceState.READY;
12
12
  get replicas(): number;
13
13
  get readyReplicas(): number;
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
2
  import { Deployment } from 'kubernetes-types/apps/v1';
3
- import { WorkloadState } from '../constants';
3
+ import { ResourceState } from '../constants';
4
4
  import { WorkloadModel } from './workload-model';
5
5
  type RequiredDeployment = Required<Deployment> & Unstructured;
6
6
  export declare class DeploymentModel extends WorkloadModel {
@@ -8,6 +8,6 @@ export declare class DeploymentModel extends WorkloadModel {
8
8
  spec?: RequiredDeployment['spec'];
9
9
  status?: RequiredDeployment['status'];
10
10
  constructor(_rawYaml: RequiredDeployment, _globalStore: GlobalStore);
11
- get stateDisplay(): WorkloadState.UPDATING | WorkloadState.READY | WorkloadState.STOPPED;
11
+ get stateDisplay(): ResourceState.UPDATING | ResourceState.READY | ResourceState.STOPPED;
12
12
  }
13
13
  export {};
@@ -1,6 +1,6 @@
1
1
  import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
2
  import { Job } from 'kubernetes-types/batch/v1';
3
- import { WorkloadState } from '../constants';
3
+ import { ResourceState } from '../constants';
4
4
  import { WorkloadBaseModel } from './workload-base-model';
5
5
  type RequiredJob = Required<Job> & Unstructured;
6
6
  export declare class JobModel extends WorkloadBaseModel {
@@ -15,6 +15,6 @@ export declare class JobModel extends WorkloadBaseModel {
15
15
  get completionsDisplay(): string;
16
16
  get succeeded(): number;
17
17
  get completions(): number | undefined;
18
- get stateDisplay(): WorkloadState.COMPLETED | WorkloadState.FAILED | WorkloadState.SUSPENDED | WorkloadState.RUNNING;
18
+ get stateDisplay(): ResourceState.COMPLETED | ResourceState.ABNORMAL | ResourceState.SUSPENDED | ResourceState.RUNNING;
19
19
  }
20
20
  export {};
@@ -1,12 +1,12 @@
1
1
  import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
2
  import type { Node } from 'kubernetes-types/core/v1';
3
- import { WorkloadBaseModel } from './workload-base-model';
3
+ import { ResourceModel } from './resource-model';
4
4
  type RequiredNode = Required<Node> & Unstructured;
5
5
  export declare enum NodeRole {
6
6
  ControlPlane = "Control Plane",
7
7
  Worker = "Worker"
8
8
  }
9
- export declare class NodeModel extends WorkloadBaseModel {
9
+ export declare class NodeModel extends ResourceModel {
10
10
  _rawYaml: RequiredNode;
11
11
  constructor(_rawYaml: RequiredNode, _globalStore: GlobalStore);
12
12
  get role(): NodeRole;
@@ -1,5 +1,6 @@
1
1
  import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
2
  import type { PersistentVolumeClaim } from 'kubernetes-types/core/v1';
3
+ import { ResourceState } from 'src/constants';
3
4
  import { ResourceModel } from './resource-model';
4
5
  type RequiredPersistentClaimVolume = Required<PersistentVolumeClaim> & Unstructured;
5
6
  export declare class PersistentVolumeClaimModel extends ResourceModel {
@@ -8,6 +9,7 @@ export declare class PersistentVolumeClaimModel extends ResourceModel {
8
9
  constructor(_rawYaml: RequiredPersistentClaimVolume, _globalStore: GlobalStore);
9
10
  get phase(): string | undefined;
10
11
  get pv(): string | undefined;
12
+ get stateDisplay(): ResourceState.FAILED | ResourceState.PENDING | ResourceState.BOUND | ResourceState.LOST | undefined;
11
13
  updateDistributeStorage(distributeStorage: number): Unstructured;
12
14
  }
13
15
  export {};
@@ -1,5 +1,6 @@
1
1
  import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
2
  import type { PersistentVolume } from 'kubernetes-types/core/v1';
3
+ import { ResourceState } from 'src/constants';
3
4
  import { ResourceModel } from './resource-model';
4
5
  type RequiredPersistentVolume = Required<PersistentVolume> & Unstructured;
5
6
  export declare class PersistentVolumeModel extends ResourceModel {
@@ -7,7 +8,9 @@ export declare class PersistentVolumeModel extends ResourceModel {
7
8
  spec: PersistentVolume['spec'];
8
9
  constructor(_rawYaml: RequiredPersistentVolume, _globalStore: GlobalStore);
9
10
  get phase(): string | undefined;
11
+ get stateDisplay(): ResourceState.FAILED | ResourceState.UNKNOWN | ResourceState.PENDING | ResourceState.AVAILABLE | ResourceState.BOUND | ResourceState.RELEASED;
10
12
  get csi(): string | undefined;
11
13
  get pvc(): string | undefined;
14
+ get pvcNamespace(): string | undefined;
12
15
  }
13
16
  export {};
@@ -1,6 +1,6 @@
1
1
  import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
2
  import { StatefulSet } from 'kubernetes-types/apps/v1';
3
- import { WorkloadState } from '../constants';
3
+ import { ResourceState } from '../constants';
4
4
  import { WorkloadModel } from './workload-model';
5
5
  type RequiredStatefulSet = Required<StatefulSet> & Unstructured;
6
6
  export declare class StatefulSetModel extends WorkloadModel {
@@ -8,6 +8,6 @@ export declare class StatefulSetModel extends WorkloadModel {
8
8
  spec?: RequiredStatefulSet['spec'];
9
9
  status?: RequiredStatefulSet['status'];
10
10
  constructor(_rawYaml: RequiredStatefulSet, _globalStore: GlobalStore);
11
- get stateDisplay(): WorkloadState.UPDATING | WorkloadState.READY | WorkloadState.STOPPED;
11
+ get stateDisplay(): ResourceState.UPDATING | ResourceState.READY | ResourceState.STOPPED;
12
12
  }
13
13
  export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function App(): JSX.Element;
3
+ export default App;
@@ -0,0 +1,18 @@
1
+ import { AccessControlProvider } from '@refinedev/core';
2
+ import { History } from 'history';
3
+ import { GlobalStore } from 'k8s-api-provider';
4
+ import React from 'react';
5
+ import { ResourceConfig } from './types';
6
+ import './styles.css';
7
+ type Props = {
8
+ resourcesConfig: ResourceConfig[];
9
+ useHashUrl?: boolean;
10
+ urlPrefix?: string;
11
+ Layout?: React.FC<unknown>;
12
+ history: History;
13
+ globalStore: GlobalStore;
14
+ accessControlProvider?: AccessControlProvider;
15
+ routerProvider?: any;
16
+ };
17
+ export declare const Dovetail: React.FC<Props>;
18
+ export {};
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface BreadcrumbProps {
3
+ className?: string;
4
+ }
5
+ export declare function Breadcrumb(props: BreadcrumbProps): JSX.Element;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Condition } from 'kubernetes-types/meta/v1';
2
+ import React from 'react';
3
+ type Props = {
4
+ conditions: Condition[];
5
+ };
6
+ export declare const ConditionsTable: React.FC<Props>;
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from './ConditionsTable';
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function CreateButton(): JSX.Element;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { CronJobModel } from '../../models';
3
+ import { DropdownSize } from '../K8sDropdown';
4
+ type Props<Model extends CronJobModel> = {
5
+ record: Model;
6
+ size?: DropdownSize;
7
+ };
8
+ export declare function CronJobDropdown<Model extends CronJobModel>(props: Props<Model>): JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import { OwnerReference } from 'kubernetes-types/meta/v1';
2
+ import React from 'react';
3
+ export declare const CronjobJobsTable: React.FC<{
4
+ owner?: OwnerReference & {
5
+ namespace: string;
6
+ };
7
+ hideToolBar?: boolean;
8
+ }>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DeleteButton: React.FC;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const DeleteManyButton: React.FC<{
3
+ ids: string[];
4
+ }>;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ResourceModel } from '../../models';
3
+ import { ShowConfig } from '../ShowContent';
4
+ type Props<Model extends ResourceModel> = {
5
+ showConfig: ShowConfig<Model>;
6
+ formatter?: (r: Model) => Model;
7
+ };
8
+ export declare const DrawerShow: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(props: Props<Model>) => JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export * from './DrawerShow';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface DurationTimeProps {
3
+ value: number;
4
+ }
5
+ declare function DurationTime(props: DurationTimeProps): JSX.Element;
6
+ export { DurationTime };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const EditButton: React.FC;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ export interface EditFieldModalProps {
3
+ title?: string;
4
+ submitting?: boolean;
5
+ errorMsgs?: string[];
6
+ formRef: React.MutableRefObject<{
7
+ submit: () => (Promise<unknown> | undefined);
8
+ } | null>;
9
+ renderContent: () => React.ReactNode;
10
+ }
11
+ export declare function EditFieldModal(props: EditFieldModalProps): JSX.Element;
12
+ export interface EditField {
13
+ modalProps: EditFieldModalProps;
14
+ }
15
+ export declare function EditField(props: EditField): JSX.Element;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export declare const ErrorWrapper: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const ErrorContent: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
+ export declare enum ErrorContentType {
5
+ List = "list",
6
+ Card = "card",
7
+ Widget = "widget"
8
+ }
9
+ export type WidgetErrorContentProps = {
10
+ className?: string;
11
+ style?: React.CSSProperties;
12
+ errorText?: string;
13
+ type?: ErrorContentType;
14
+ refetch?: () => void;
15
+ };
16
+ declare const WidgetErrorContent: React.FunctionComponent<WidgetErrorContentProps>;
17
+ export default WidgetErrorContent;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ type EventTableProps = {
3
+ uid: string;
4
+ };
5
+ export declare const EventsTable: React.FC<EventTableProps>;
6
+ export {};
@@ -0,0 +1 @@
1
+ export * from './EventsTable';
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { YamlFormProps } from './YamlForm';
3
+ export type FormModalProps = {
4
+ resource?: string;
5
+ id?: string;
6
+ formProps?: YamlFormProps;
7
+ renderForm?: (props: YamlFormProps) => React.ReactNode;
8
+ };
9
+ export declare function FormModal(props: FormModalProps): JSX.Element;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { UseFormReturnType } from '@refinedev/react-hook-form';
3
+ import { ResourceModel } from '../../models';
4
+ import { ResourceConfig } from '../../types';
5
+ type Props<Model extends ResourceModel> = {
6
+ config?: ResourceConfig<Model>;
7
+ formResult: UseFormReturnType;
8
+ errorMsg?: string;
9
+ resourceId?: string;
10
+ };
11
+ export declare const RefineFormContent: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(props: Props<Model>) => JSX.Element;
12
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ResourceConfig } from '../../types';
3
+ type Props = {
4
+ config: ResourceConfig<any>;
5
+ };
6
+ export declare const RefineFormPage: (props: Props) => JSX.Element;
7
+ export {};
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ import { FormAction } from '@refinedev/core';
3
+ import { Unstructured } from 'k8s-api-provider';
4
+ import useYamlForm from './useYamlForm';
5
+ export declare enum SchemaStrategy {
6
+ Required = "Required",
7
+ Optional = "Optional",
8
+ None = "None"
9
+ }
10
+ export interface YamlFormProps {
11
+ id?: string;
12
+ action?: FormAction;
13
+ initialValues?: Record<string, unknown>;
14
+ schemaStrategy?: SchemaStrategy;
15
+ isShowLayout?: boolean;
16
+ useFormProps?: Parameters<typeof useYamlForm>[0];
17
+ transformInitValues?: (values: Record<string, unknown>) => Record<string, unknown>;
18
+ transformApplyValues?: (values: Unstructured) => Unstructured;
19
+ onSaveButtonPropsChange?: (saveButtonProps: {
20
+ disabled?: boolean;
21
+ onClick: () => void;
22
+ loading?: boolean | {
23
+ delay?: number | undefined;
24
+ };
25
+ }) => void;
26
+ onErrorsChange?: (errors: string[]) => void;
27
+ onFinish?: () => void;
28
+ }
29
+ export declare function YamlForm(props: YamlFormProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ export * from './FormModal';
2
+ export * from './RefineFormContent';
3
+ export * from './RefineFormPage';
4
+ export * from './YamlForm';
5
+ export * from './useRefineForm';
6
+ export * from './useYamlForm';
7
+ export * from './type';
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { Control } from 'react-hook-form';
3
+ export type RefineFormValidator = (value: unknown, formValue: unknown) => {
4
+ isValid: boolean;
5
+ errorMsg: string;
6
+ };
7
+ export type RefineFormField = {
8
+ path: string[];
9
+ key: string;
10
+ label: string;
11
+ placeholder?: string;
12
+ helperText?: React.ReactNode;
13
+ type?: 'number';
14
+ validators?: RefineFormValidator[];
15
+ disabledWhenEdit?: boolean;
16
+ render?: (value: unknown, onChange: (event: unknown) => void, formValue: unknown, onBlur: () => void, action: 'edit' | 'create', control: Control) => React.ReactElement;
17
+ };
@@ -0,0 +1,4 @@
1
+ import { ResourceModel } from 'src/models';
2
+ import { ResourceConfig } from 'src/types';
3
+ declare function useFieldsConfig<Model extends ResourceModel>(config?: ResourceConfig<Model>, resourceId?: string): import("./type").RefineFormField[] | undefined;
4
+ export default useFieldsConfig;
@@ -0,0 +1,30 @@
1
+ import { BaseRecord, HttpError, UseFormProps as UseFormCoreProps, UseFormReturnType as UseFormReturnTypeCore } from '@refinedev/core';
2
+ import React from 'react';
3
+ import { UseFormProps as UseHookFormProps, UseFormReturn, FieldValues } from 'react-hook-form';
4
+ export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturn<TVariables, TContext> & {
5
+ refineCore: UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
6
+ saveButtonProps: {
7
+ disabled: boolean;
8
+ onClick: (e: React.BaseSyntheticEvent) => void;
9
+ };
10
+ };
11
+ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = {
12
+ /**
13
+ * Configuration object for the core of the [useForm](/docs/api-reference/core/hooks/useForm/)
14
+ * @type [`UseFormCoreProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>`](/docs/api-reference/core/hooks/useForm/#properties)
15
+ */
16
+ refineCoreProps?: UseFormCoreProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
17
+ /**
18
+ * When you have unsaved changes and try to leave the current page, **refine** shows a confirmation modal box.
19
+ * @default `false*`
20
+ */
21
+ warnWhenUnsavedChanges?: boolean;
22
+ /**
23
+ * Disables server-side validation
24
+ * @default false
25
+ * @see {@link https://refine.dev/docs/advanced-tutorials/forms/server-side-form-validation/}
26
+ */
27
+ disableServerSideValidation?: boolean;
28
+ transformApplyValues?: (values: TVariables) => TVariables;
29
+ } & UseHookFormProps<TVariables, TContext>;
30
+ export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ refineCoreProps, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, disableServerSideValidation: disableServerSideValidationProp, transformApplyValues, ...rest }?: UseFormProps<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>;
@@ -0,0 +1,13 @@
1
+ import { ResourceConfig } from '../../types';
2
+ import { UseFormProps } from './useReactHookForm';
3
+ export declare const useRefineForm: (props: {
4
+ config: ResourceConfig;
5
+ id?: string;
6
+ refineProps?: UseFormProps['refineCoreProps'];
7
+ useFormProps?: UseFormProps;
8
+ }) => {
9
+ formResult: import("./useReactHookForm").UseFormReturnType<import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError, {
10
+ [x: string]: any;
11
+ }, {}, import("@refinedev/core").BaseRecord, import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError>;
12
+ responseErrorMsg: string;
13
+ };