@dovetail-v2/refine 0.1.14-alpha.1 → 0.1.14-alpha.3

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 (227) hide show
  1. package/dist/{MonacoYamlDiffEditor-c3cc3648.js → MonacoYamlDiffEditor-cc759677.js} +1 -1
  2. package/dist/{index-cfefd39c.js → index-bae71e98.js} +305 -298
  3. package/dist/refine.js +1 -1
  4. package/dist/refine.umd.cjs +304 -297
  5. package/lib/components/CronJobDropdown/index.d.ts +9 -0
  6. package/lib/components/K8sDropdown/index.d.ts +9 -0
  7. package/lib/components/PodDropdown/index.d.ts +9 -0
  8. package/lib/components/ReplicasDropdown/index.d.ts +9 -0
  9. package/lib/components/Table/TableToolBar.d.ts +9 -0
  10. package/lib/components/Table/TableWidgets.d.ts +6 -0
  11. package/lib/components/WorkloadDropdown/index.d.ts +9 -0
  12. package/lib/constants/k8s.d.ts +4 -2
  13. package/lib/pages/storageclasses/index.d.ts +3 -1
  14. package/lib/src/App.d.ts +3 -0
  15. package/lib/src/Dovetail.d.ts +18 -0
  16. package/lib/src/components/Breadcrumb/index.d.ts +6 -0
  17. package/lib/src/components/ConditionsTable/ConditionsTable.d.ts +7 -0
  18. package/lib/src/components/ConditionsTable/index.d.ts +1 -0
  19. package/lib/src/components/CreateButton/index.d.ts +2 -0
  20. package/lib/src/components/CronJobDropdown/index.d.ts +9 -0
  21. package/lib/src/components/CronjobJobsTable/index.d.ts +8 -0
  22. package/lib/src/components/DeleteButton/index.d.ts +2 -0
  23. package/lib/src/components/DeleteManyButton/index.d.ts +4 -0
  24. package/lib/src/components/DrawerShow/DrawerShow.d.ts +9 -0
  25. package/lib/src/components/DrawerShow/index.d.ts +1 -0
  26. package/lib/src/components/DurationTime/index.d.ts +6 -0
  27. package/lib/src/components/EditButton/index.d.ts +2 -0
  28. package/lib/src/components/EditField/index.d.ts +15 -0
  29. package/lib/src/components/ErrorContent/index.d.ts +17 -0
  30. package/lib/src/components/EventsTable/EventsTable.d.ts +6 -0
  31. package/lib/src/components/EventsTable/index.d.ts +1 -0
  32. package/lib/src/components/Form/FormModal.d.ts +9 -0
  33. package/lib/src/components/Form/RefineFormContent.d.ts +12 -0
  34. package/lib/src/components/Form/RefineFormPage.d.ts +7 -0
  35. package/lib/src/components/Form/YamlForm.d.ts +29 -0
  36. package/lib/src/components/Form/index.d.ts +7 -0
  37. package/lib/src/components/Form/type.d.ts +17 -0
  38. package/lib/src/components/Form/useFieldsConfig.d.ts +4 -0
  39. package/lib/src/components/Form/useReactHookForm.d.ts +30 -0
  40. package/lib/src/components/Form/useRefineForm.d.ts +13 -0
  41. package/lib/src/components/Form/useYamlForm.d.ts +50 -0
  42. package/lib/src/components/FormErrorAlert/index.d.ts +9 -0
  43. package/lib/src/components/FormLayout/index.d.ts +7 -0
  44. package/lib/src/components/FormWidgets/KeyValueListWidget.d.ts +6 -0
  45. package/lib/src/components/FormWidgets/MetadataForm.d.ts +2 -0
  46. package/lib/src/components/FormWidgets/NameInputWidget.d.ts +51 -0
  47. package/lib/src/components/FormWidgets/NamespaceSelectWidget.d.ts +9 -0
  48. package/lib/src/components/FormWidgets/index.d.ts +4 -0
  49. package/lib/src/components/FormWidgets/widget.d.ts +5 -0
  50. package/lib/src/components/ImageNames/index.d.ts +5 -0
  51. package/lib/src/components/IngressRulesComponent/index.d.ts +5 -0
  52. package/lib/src/components/IngressRulesTable/IngressRulesTable.d.ts +7 -0
  53. package/lib/src/components/IngressRulesTable/index.d.ts +1 -0
  54. package/lib/src/components/K8sDropdown/index.d.ts +9 -0
  55. package/lib/src/components/KeyValue/KeyValue.d.ts +7 -0
  56. package/lib/src/components/KeyValue/KeyValueAnnotation.d.ts +6 -0
  57. package/lib/src/components/KeyValue/KeyValueSecret.d.ts +5 -0
  58. package/lib/src/components/KeyValue/index.d.ts +3 -0
  59. package/lib/src/components/Layout/index.d.ts +3 -0
  60. package/lib/src/components/LinkFallback/index.d.ts +4 -0
  61. package/lib/src/components/ListPage/index.d.ts +10 -0
  62. package/lib/src/components/Menu/index.d.ts +2 -0
  63. package/lib/src/components/NamespacesFilter/index.d.ts +11 -0
  64. package/lib/src/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +8 -0
  65. package/lib/src/components/NetworkPolicyRulesViewer/index.d.ts +1 -0
  66. package/lib/src/components/PVCDistributeStorage/index.d.ts +16 -0
  67. package/lib/src/components/PageShow/PageShow.d.ts +12 -0
  68. package/lib/src/components/PageShow/index.d.ts +1 -0
  69. package/lib/src/components/PodContainersTable/PodContainersTable.d.ts +8 -0
  70. package/lib/src/components/PodContainersTable/index.d.ts +1 -0
  71. package/lib/src/components/PodDropdown/index.d.ts +9 -0
  72. package/lib/src/components/PodLog/index.d.ts +6 -0
  73. package/lib/src/components/PodSelectorTable/index.d.ts +6 -0
  74. package/lib/src/components/PodShellModal/PodShell.d.ts +18 -0
  75. package/lib/src/components/PodShellModal/index.d.ts +10 -0
  76. package/lib/src/components/PortsTable/index.d.ts +7 -0
  77. package/lib/src/components/ReferenceLink/index.d.ts +8 -0
  78. package/lib/src/components/ReplicasDropdown/index.d.ts +9 -0
  79. package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +8 -0
  80. package/lib/src/components/ResourceCRUD/create/index.d.ts +8 -0
  81. package/lib/src/components/ResourceCRUD/index.d.ts +4 -0
  82. package/lib/src/components/ResourceCRUD/list/index.d.ts +9 -0
  83. package/lib/src/components/ResourceCRUD/show/index.d.ts +9 -0
  84. package/lib/src/components/ResourceFiledDisplays.d.ts +7 -0
  85. package/lib/src/components/ResourceLink/index.d.ts +8 -0
  86. package/lib/src/components/ResourceSelect/index.d.ts +12 -0
  87. package/lib/src/components/ResourceTable/index.d.ts +9 -0
  88. package/lib/src/components/ResourceUsageBar/index.d.ts +8 -0
  89. package/lib/src/components/Separator/index.d.ts +2 -0
  90. package/lib/src/components/ServiceComponents/index.d.ts +10 -0
  91. package/lib/src/components/Shell/ShellToolbar.d.ts +16 -0
  92. package/lib/src/components/Shell/index.d.ts +74 -0
  93. package/lib/src/components/ShowContent/ShowContent.d.ts +18 -0
  94. package/lib/src/components/ShowContent/fields.d.ts +76 -0
  95. package/lib/src/components/ShowContent/groups.d.ts +24 -0
  96. package/lib/src/components/ShowContent/index.d.ts +4 -0
  97. package/lib/src/components/ShowContent/tabs.d.ts +5 -0
  98. package/lib/src/components/StateTag/StateTag.d.ts +10 -0
  99. package/lib/src/components/StateTag/index.d.ts +1 -0
  100. package/lib/src/components/Table/TableToolBar.d.ts +8 -0
  101. package/lib/src/components/Table/TableWidgets.d.ts +6 -0
  102. package/lib/src/components/Table/index.d.ts +43 -0
  103. package/lib/src/components/Tabs/index.d.ts +10 -0
  104. package/lib/src/components/Tags/index.d.ts +6 -0
  105. package/lib/src/components/TextTags/index.d.ts +6 -0
  106. package/lib/src/components/Time/index.d.ts +8 -0
  107. package/lib/src/components/ValueDisplay/index.d.ts +9 -0
  108. package/lib/src/components/WorkloadDropdown/index.d.ts +9 -0
  109. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +9 -0
  110. package/lib/src/components/WorkloadPodsTable/index.d.ts +1 -0
  111. package/lib/src/components/WorkloadReplicas/index.d.ts +17 -0
  112. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
  113. package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
  114. package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +27 -0
  115. package/lib/src/components/YamlEditor/index.d.ts +1 -0
  116. package/lib/src/components/YamlEditor/style.d.ts +11 -0
  117. package/lib/src/components/YamlEditor/yaml.worker.d.ts +1 -0
  118. package/lib/src/components/index.d.ts +49 -0
  119. package/lib/src/constants/auth.d.ts +5 -0
  120. package/lib/src/constants/index.d.ts +3 -0
  121. package/lib/src/constants/k8s.d.ts +522 -0
  122. package/lib/src/constants/state.d.ts +15 -0
  123. package/lib/src/contexts/component.d.ts +8 -0
  124. package/lib/src/contexts/configs.d.ts +4 -0
  125. package/lib/src/contexts/global-store.d.ts +6 -0
  126. package/lib/src/contexts/index.d.ts +3 -0
  127. package/lib/src/hooks/index.d.ts +8 -0
  128. package/lib/src/hooks/useDeleteModal/index.d.ts +1 -0
  129. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.d.ts +8 -0
  130. package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
  131. package/lib/src/hooks/useDownloadYAML.d.ts +7 -0
  132. package/lib/src/hooks/useEagleTable/columns.d.ts +47 -0
  133. package/lib/src/hooks/useEagleTable/index.d.ts +2 -0
  134. package/lib/src/hooks/useEagleTable/useEagleTable.d.ts +56 -0
  135. package/lib/src/hooks/useEdit.d.ts +4 -0
  136. package/lib/src/hooks/useGlobalStore.d.ts +3 -0
  137. package/lib/src/hooks/useK8sYamlEditor.d.ts +5 -0
  138. package/lib/src/hooks/useNamespaceRefineFilter.d.ts +5 -0
  139. package/lib/src/hooks/useOpenForm.d.ts +8 -0
  140. package/lib/src/hooks/useSchema.d.ts +21 -0
  141. package/lib/src/hooks/useSubmitForm.d.ts +14 -0
  142. package/lib/src/hooks/useTableData.d.ts +20 -0
  143. package/lib/src/i18n.d.ts +371 -0
  144. package/lib/src/index.d.ts +12 -0
  145. package/lib/src/locales/en-US/index.d.ts +175 -0
  146. package/lib/src/locales/index.d.ts +2 -0
  147. package/lib/src/locales/zh-CN/index.d.ts +193 -0
  148. package/lib/src/main.d.ts +3 -0
  149. package/lib/src/models/cronjob-model.d.ts +15 -0
  150. package/lib/src/models/daemonset-model.d.ts +15 -0
  151. package/lib/src/models/deployment-model.d.ts +13 -0
  152. package/lib/src/models/event-model.d.ts +7 -0
  153. package/lib/src/models/index.d.ts +19 -0
  154. package/lib/src/models/ingress-model.d.ts +20 -0
  155. package/lib/src/models/job-model.d.ts +20 -0
  156. package/lib/src/models/network-policy-model.d.ts +9 -0
  157. package/lib/src/models/node-model.d.ts +17 -0
  158. package/lib/src/models/persistent-volume-claim.d.ts +13 -0
  159. package/lib/src/models/persistent-volume.d.ts +13 -0
  160. package/lib/src/models/pod-metrics-model.d.ts +8 -0
  161. package/lib/src/models/pod-model.d.ts +20 -0
  162. package/lib/src/models/resource-model.d.ts +21 -0
  163. package/lib/src/models/service-model.d.ts +24 -0
  164. package/lib/src/models/statefulset-model.d.ts +13 -0
  165. package/lib/src/models/storage-class.d.ts +16 -0
  166. package/lib/src/models/types/index.d.ts +1 -0
  167. package/lib/src/models/types/metric.d.ts +25 -0
  168. package/lib/src/models/workload-base-model.d.ts +12 -0
  169. package/lib/src/models/workload-model.d.ts +18 -0
  170. package/lib/src/pages/configmaps/index.d.ts +4 -0
  171. package/lib/src/pages/cronjobs/create/index.d.ts +3 -0
  172. package/lib/src/pages/cronjobs/index.d.ts +3 -0
  173. package/lib/src/pages/cronjobs/list/index.d.ts +3 -0
  174. package/lib/src/pages/cronjobs/show/index.d.ts +3 -0
  175. package/lib/src/pages/daemonsets/create/index.d.ts +3 -0
  176. package/lib/src/pages/daemonsets/index.d.ts +3 -0
  177. package/lib/src/pages/daemonsets/list/index.d.ts +3 -0
  178. package/lib/src/pages/daemonsets/show/index.d.ts +3 -0
  179. package/lib/src/pages/deployments/index.d.ts +2 -0
  180. package/lib/src/pages/deployments/list/index.d.ts +3 -0
  181. package/lib/src/pages/deployments/show/index.d.ts +3 -0
  182. package/lib/src/pages/ingresses/index.d.ts +4 -0
  183. package/lib/src/pages/jobs/index.d.ts +4 -0
  184. package/lib/src/pages/networkPolicies/index.d.ts +4 -0
  185. package/lib/src/pages/nodes/index.d.ts +2 -0
  186. package/lib/src/pages/nodes/list/index.d.ts +3 -0
  187. package/lib/src/pages/nodes/show/index.d.ts +3 -0
  188. package/lib/src/pages/persistentvolumeclaims/index.d.ts +4 -0
  189. package/lib/src/pages/persistentvolumes/index.d.ts +4 -0
  190. package/lib/src/pages/pods/create/index.d.ts +3 -0
  191. package/lib/src/pages/pods/index.d.ts +3 -0
  192. package/lib/src/pages/pods/list/index.d.ts +3 -0
  193. package/lib/src/pages/pods/show/index.d.ts +3 -0
  194. package/lib/src/pages/secrets/index.d.ts +4 -0
  195. package/lib/src/pages/services/index.d.ts +4 -0
  196. package/lib/src/pages/statefulsets/index.d.ts +4 -0
  197. package/lib/src/pages/storageclasses/form/index.d.ts +9 -0
  198. package/lib/src/pages/storageclasses/index.d.ts +48 -0
  199. package/lib/src/plugins/index.d.ts +4 -0
  200. package/lib/src/plugins/model-plugin.d.ts +13 -0
  201. package/lib/src/plugins/relation-plugin.d.ts +26 -0
  202. package/lib/src/plugins/type.d.ts +8 -0
  203. package/lib/src/providers/index.d.ts +1 -0
  204. package/lib/src/providers/router-provider/index.d.ts +21 -0
  205. package/lib/src/styles/button.d.ts +1 -0
  206. package/lib/src/styles/modal.d.ts +1 -0
  207. package/lib/src/types/index.d.ts +1 -0
  208. package/lib/src/types/resource.d.ts +62 -0
  209. package/lib/src/utils/addId.d.ts +3 -0
  210. package/lib/src/utils/download.d.ts +1 -0
  211. package/lib/src/utils/error.d.ts +20 -0
  212. package/lib/src/utils/form.d.ts +3 -0
  213. package/lib/src/utils/index.d.ts +1 -0
  214. package/lib/src/utils/k8s.d.ts +3 -0
  215. package/lib/src/utils/labels.d.ts +9 -0
  216. package/lib/src/utils/match-selector.d.ts +3 -0
  217. package/lib/src/utils/openapi.d.ts +40 -0
  218. package/lib/src/utils/schema.d.ts +18 -0
  219. package/lib/src/utils/selector.d.ts +3 -0
  220. package/lib/src/utils/shell.d.ts +16 -0
  221. package/lib/src/utils/storage.d.ts +13 -0
  222. package/lib/src/utils/string.d.ts +1 -0
  223. package/lib/src/utils/time.d.ts +13 -0
  224. package/lib/src/utils/unit.d.ts +12 -0
  225. package/lib/src/utils/yaml.d.ts +2 -0
  226. package/lib/vite.config.d.ts +2 -0
  227. package/package.json +1 -1
@@ -0,0 +1,15 @@
1
+ export declare enum WorkloadState {
2
+ Terminated = "terminated",
3
+ UPDATING = "updating",
4
+ READY = "ready",
5
+ COMPLETED = "completed",
6
+ FAILED = "failed",
7
+ SUSPENDED = "suspended",
8
+ RUNNING = "running",
9
+ SUCCEEDED = "succeeded",
10
+ UNKNOWN = "unknown",
11
+ TERMINATING = "terminating",
12
+ PENDING = "pending",
13
+ WAITING = "waiting",
14
+ STOPPED = "stopped"
15
+ }
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import Table from 'src/components/Table';
3
+ import { Tabs } from 'src/components/Tabs';
4
+ declare const ComponentContext: import("react").Context<{
5
+ Table?: typeof Table | undefined;
6
+ Tabs?: typeof Tabs | undefined;
7
+ }>;
8
+ export default ComponentContext;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ResourceConfig } from 'src/types';
3
+ declare const ConfigsContext: import("react").Context<Record<string, ResourceConfig>>;
4
+ export default ConfigsContext;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { GlobalStore } from 'k8s-api-provider';
3
+ declare const GlobalStoreContext: import("react").Context<{
4
+ globalStore?: GlobalStore | undefined;
5
+ }>;
6
+ export default GlobalStoreContext;
@@ -0,0 +1,3 @@
1
+ export { default as ComponentContext } from './component';
2
+ export { default as GlobalStoreContext } from './global-store';
3
+ export { default as ConfigsContext } from './configs';
@@ -0,0 +1,8 @@
1
+ export * from './useSchema';
2
+ export * from './useDeleteModal';
3
+ export * from './useEagleTable';
4
+ export * from './useDownloadYAML';
5
+ export * from './useEdit';
6
+ export * from './useGlobalStore';
7
+ export * from './useOpenForm';
8
+ export { default as useNamespaceRefineFilter } from './useNamespaceRefineFilter';
@@ -0,0 +1 @@
1
+ export * from './useDeleteModal';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { ModalProps } from '@cloudtower/eagle';
3
+ import { BaseKey } from '@refinedev/core';
4
+ export declare const useDeleteManyModal: (resource: string, ids: BaseKey[]) => {
5
+ modalProps: ModalProps;
6
+ visible: boolean;
7
+ setVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
8
+ };
@@ -0,0 +1,7 @@
1
+ import { ModalProps } from '@cloudtower/eagle';
2
+ export declare const ModalStyle: import("@linaria/core").LinariaClassName;
3
+ export declare const useDeleteModal: (resource: string) => {
4
+ modalProps: ModalProps;
5
+ visible: boolean;
6
+ openDeleteConfirmModal: (id: string) => void;
7
+ };
@@ -0,0 +1,7 @@
1
+ import { Unstructured } from 'k8s-api-provider';
2
+ type DownloadYAMLOptions = {
3
+ name: string;
4
+ item: Omit<Unstructured, 'id'>;
5
+ };
6
+ export declare function useDownloadYAML(): (options: DownloadYAMLOptions) => void;
7
+ export {};
@@ -0,0 +1,47 @@
1
+ /// <reference types="react" />
2
+ import { i18n as I18nType } from 'i18next';
3
+ import { Column } from '../../components/Table';
4
+ import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, DaemonSetModel, StorageClassModel, PersistentVolumeModel, PersistentVolumeClaimModel } from '../../models';
5
+ export declare const CommonSorter: (dataIndex: string[]) => (a: unknown, b: unknown) => 0 | 1 | -1;
6
+ export declare const NameColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType, resource?: string) => Column<Model>;
7
+ export declare const PlainTextNameColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
8
+ export declare const NameSpaceColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
9
+ export declare const StateDisplayColumnRenderer: <Model extends PodModel | JobModel | WorkloadModel | CronJobModel | DaemonSetModel | ServiceModel>(i18n: I18nType) => Column<Model>;
10
+ export declare const WorkloadImageColumnRenderer: <Model extends WorkloadBaseModel>(i18n: I18nType) => Column<Model>;
11
+ export declare const WorkloadRestartsColumnRenderer: <Model extends WorkloadModel>(i18n: I18nType) => Column<Model>;
12
+ export declare const ReplicasColumnRenderer: <Model extends WorkloadModel>(i18n: I18nType) => Column<Model>;
13
+ export declare const AgeColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType, config?: {
14
+ title?: string;
15
+ width: number;
16
+ }, { isRelativeTime }?: {
17
+ isRelativeTime?: boolean | undefined;
18
+ }) => Column<Model>;
19
+ export declare const NodeNameColumnRenderer: <Model extends PodModel>(i18n: I18nType, options?: Partial<Column<Model>> | undefined) => Column<Model>;
20
+ export declare const RestartCountColumnRenderer: <Model extends PodModel>(i18n: I18nType) => Column<Model>;
21
+ export declare const CompletionsCountColumnRenderer: <Model extends JobModel>(i18n: I18nType) => Column<Model>;
22
+ export declare const DurationColumnRenderer: <Model extends JobModel | CronJobModel>(i18n: I18nType) => Column<Model>;
23
+ export declare const ServiceTypeColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
24
+ export declare function ServiceInClusterAccessTitle(): JSX.Element;
25
+ export declare const ServiceInClusterAccessColumnRenderer: <Model extends ServiceModel>() => Column<Model>;
26
+ export declare function ServiceOutClusterAccessTitle(): JSX.Element;
27
+ export declare const ServiceOutClusterAccessColumnRenderer: <Model extends ServiceModel>() => Column<Model>;
28
+ export declare const PodWorkloadColumnRenderer: <Model extends PodModel>(i18n: I18nType) => Column<Model>;
29
+ export declare const IngressRulesColumnRenderer: <Model extends IngressModel>(i18n: I18nType) => Column<Model>;
30
+ export declare const IngressDefaultBackendColumnRenderer: <Model extends IngressModel>(i18n: I18nType) => Column<Model>;
31
+ export declare const IngressClassColumnRenderer: <Model extends IngressModel>(i18n: I18nType) => Column<Model>;
32
+ export declare const IngressTlsColumnRenderer: <Model extends IngressModel>(i18n: I18nType) => Column<Model>;
33
+ export declare const PodContainersNumColumnRenderer: <Model extends PodModel>(i18n: I18nType) => Column<Model>;
34
+ export declare const DataKeysColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
35
+ export declare const PortMappingColumnRenderer: <Model extends ServiceModel>(i18n: I18nType, clusterVip: string) => Column<Model>;
36
+ export declare const ProvisionerColumnRenderer: <Model extends StorageClassModel>(i18n: I18nType) => Column<Model>;
37
+ export declare const PVCapacityColumnRenderer: <Model extends PersistentVolumeModel>(i18n: I18nType) => Column<Model>;
38
+ export declare const PVCStorageColumnRenderer: <Model extends PersistentVolumeClaimModel>(i18n: I18nType) => Column<Model>;
39
+ export declare const PVRefColumnRenderer: <Model extends PersistentVolumeClaimModel>(i18n: I18nType) => Column<Model>;
40
+ export declare const PVStorageClassColumnRenderer: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => Column<Model>;
41
+ export declare const PVPhaseColumnRenderer: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => Column<Model>;
42
+ export declare const PVCRefColumnRenderer: <Model extends PersistentVolumeModel>(i18n: I18nType) => Column<Model>;
43
+ export declare const PVCSIRefColumnRenderer: <Model extends PersistentVolumeModel>(i18n: I18nType) => Column<Model>;
44
+ export declare const PVVolumeModeColumnRenderer: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => Column<Model>;
45
+ export declare const PVAccessModeColumnRenderer: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => Column<Model>;
46
+ export declare const IsDefaultSCColumnRenderer: <Model extends StorageClassModel>(i18n: I18nType) => Column<Model>;
47
+ export declare const SCReclaimPolicyColumnRenderer: <Model extends StorageClassModel>(i18n: I18nType) => Column<Model>;
@@ -0,0 +1,2 @@
1
+ export * from './columns';
2
+ export * from './useEagleTable';
@@ -0,0 +1,56 @@
1
+ import { RequiredColumnProps } from '@cloudtower/eagle';
2
+ import { useTable } from '@refinedev/core';
3
+ import React from 'react';
4
+ import { Column, TableProps } from '../../components/Table';
5
+ import { ResourceModel } from '../../models';
6
+ type Params<Model extends ResourceModel> = {
7
+ useTableParams: Parameters<typeof useTable<Model>>[0];
8
+ resource?: string;
9
+ columns: Column<Model>[];
10
+ tableProps?: Partial<TableProps<Model>>;
11
+ formatter?: (d: Model) => Model;
12
+ Dropdown?: React.FC<{
13
+ record: Model;
14
+ }>;
15
+ };
16
+ export declare enum ColumnKeys {
17
+ age = "age",
18
+ name = "name",
19
+ namespace = "namespace",
20
+ phase = "phase",
21
+ replicas = "replicas",
22
+ deploymentImage = "deploymentImage",
23
+ podImage = "podImage"
24
+ }
25
+ export declare function addDefaultRenderToColumns<Data, Col extends RequiredColumnProps<Data> = RequiredColumnProps<Data>>(columns: Col[]): ({
26
+ render(value: unknown): JSX.Element;
27
+ } & Col)[];
28
+ export declare const useEagleTable: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(params: Params<Model>) => {
29
+ tableQueryResult: import("@tanstack/query-core").QueryObserverResult<import("@refinedev/core").GetListResponse<Model>, import("@refinedev/core").HttpError>;
30
+ sorter: import("@refinedev/core").CrudSorting;
31
+ sorters: import("@refinedev/core").CrudSorting;
32
+ setSorter: (sorter: import("@refinedev/core").CrudSorting) => void;
33
+ setSorters: (sorter: import("@refinedev/core").CrudSorting) => void;
34
+ filters: import("@refinedev/core").CrudFilters;
35
+ setFilters: ((filters: import("@refinedev/core").CrudFilters, behavior?: ("replace" | "merge") | undefined) => void) & ((setter: (prevFilters: import("@refinedev/core").CrudFilters) => import("@refinedev/core").CrudFilters) => void);
36
+ createLinkForSyncWithLocation: (params: {
37
+ pagination: {
38
+ current?: number | undefined;
39
+ pageSize?: number | undefined;
40
+ };
41
+ sorter?: import("@refinedev/core").CrudSorting | undefined;
42
+ sorters: import("@refinedev/core").CrudSorting;
43
+ filters: import("@refinedev/core").CrudFilters;
44
+ }) => string;
45
+ current: number;
46
+ setCurrent: (value: React.SetStateAction<number>) => void;
47
+ pageSize: number;
48
+ setPageSize: (value: React.SetStateAction<number>) => void;
49
+ pageCount: number;
50
+ overtime: {
51
+ elapsedTime?: number | undefined;
52
+ };
53
+ tableProps: TableProps<Model>;
54
+ selectedKeys: string[];
55
+ };
56
+ export {};
@@ -0,0 +1,4 @@
1
+ import { BaseKey } from '@refinedev/core';
2
+ export declare function useEdit(): {
3
+ edit: (id: BaseKey) => void;
4
+ };
@@ -0,0 +1,3 @@
1
+ export declare const useGlobalStore: () => {
2
+ globalStore?: import("k8s-api-provider").GlobalStore | undefined;
3
+ };
@@ -0,0 +1,5 @@
1
+ import * as monaco from 'monaco-editor';
2
+ declare function useK8sYamlEditor(): {
3
+ fold: (editor: monaco.editor.IStandaloneCodeEditor) => Promise<void>;
4
+ };
5
+ export default useK8sYamlEditor;
@@ -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,8 @@
1
+ /// <reference types="react" />
2
+ import { YamlFormProps } from '../components';
3
+ interface UseOpenFormOptions {
4
+ id?: string;
5
+ renderForm?: (props: YamlFormProps) => React.ReactNode;
6
+ }
7
+ export declare function useOpenForm(options?: UseOpenFormOptions): () => void;
8
+ export {};
@@ -0,0 +1,21 @@
1
+ import { type IResourceItem } from '@refinedev/core';
2
+ import { JSONSchema7 } from 'json-schema';
3
+ type UseSchemaOptions = {
4
+ resource?: IResourceItem;
5
+ skip?: boolean;
6
+ };
7
+ type UseSchemaResult = {
8
+ schema: JSONSchema7 | null;
9
+ loading: boolean;
10
+ error: Error | null;
11
+ fetchSchema: () => void;
12
+ };
13
+ export declare function useApiGroupSchema(): {
14
+ fetchSchema: (apiGroups: string[]) => Promise<void>;
15
+ schemas: JSONSchema7[] | null;
16
+ schemasMap: Record<string, JSONSchema7[]>;
17
+ loading: boolean;
18
+ error: Error | null;
19
+ };
20
+ export declare function useSchema(options?: UseSchemaOptions): UseSchemaResult;
21
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ interface UseSubmitFormOptions {
3
+ formRef: React.MutableRefObject<{
4
+ submit: () => (Promise<unknown> | undefined);
5
+ } | null>;
6
+ onSubmitSuccess?: () => void;
7
+ }
8
+ export declare function useSubmitForm(options: UseSubmitFormOptions): {
9
+ submitting: boolean;
10
+ errorMsgs: string[];
11
+ reset: () => void;
12
+ onSubmit: () => Promise<void>;
13
+ };
14
+ export {};
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { CrudSorting } from '@refinedev/core';
3
+ import { Column, SorterOrder } from 'src/components/Table';
4
+ type UseTableDataProps<Data extends {
5
+ id: string;
6
+ }> = {
7
+ pageSize?: number;
8
+ defaultSorters?: CrudSorting;
9
+ data: Data[];
10
+ columns: Column<Data>[];
11
+ };
12
+ declare function useTableData<Data extends {
13
+ id: string;
14
+ }>({ data, columns, pageSize, defaultSorters }: UseTableDataProps<Data>): {
15
+ data: Data[];
16
+ currentPage: number;
17
+ onPageChange: import("react").Dispatch<import("react").SetStateAction<number>>;
18
+ onSorterChange: (order?: SorterOrder | null, key?: string) => void;
19
+ };
20
+ export default useTableData;
@@ -0,0 +1,371 @@
1
+ import 'dayjs/locale/zh';
2
+ import i18n from 'i18next';
3
+ export declare const resources: {
4
+ 'en-US': {
5
+ dovetail: {
6
+ copy: string;
7
+ reset_arguments: string;
8
+ view_changes: string;
9
+ back_to_edit: string;
10
+ configure_file: string;
11
+ yaml_format_wrong: string;
12
+ yaml_value_wrong: string;
13
+ edit_yaml: string;
14
+ copied: string;
15
+ already_reset: string;
16
+ fetch_schema_fail: string;
17
+ obtain_data_error: string;
18
+ retry: string;
19
+ create_resource: string;
20
+ edit_resource: string;
21
+ state: string;
22
+ name: string;
23
+ pod: string;
24
+ cancel: string;
25
+ delete: string;
26
+ create: string;
27
+ confirm_delete_text: string;
28
+ edit: string;
29
+ namespace: string;
30
+ created_time: string;
31
+ label: string;
32
+ annotation: string;
33
+ type: string;
34
+ event: string;
35
+ reason: string;
36
+ object: string;
37
+ note: string;
38
+ condition: string;
39
+ download_yaml: string;
40
+ detail: string;
41
+ message: string;
42
+ save: string;
43
+ workload: string;
44
+ empty: string;
45
+ schedule: string;
46
+ lastScheduleTime: string;
47
+ duration: string;
48
+ started: string;
49
+ container: string;
50
+ redeploy: string;
51
+ data: string;
52
+ resume: string;
53
+ sessionAffinity: string;
54
+ log: string;
55
+ ready: string;
56
+ updating: string;
57
+ completed: string;
58
+ failed: string;
59
+ suspended: string;
60
+ running: string;
61
+ terminating: string;
62
+ terminated: string;
63
+ succeeded: string;
64
+ unknown: string;
65
+ pending: string;
66
+ waiting: string;
67
+ expand: string;
68
+ fold: string;
69
+ rule: string;
70
+ port: string;
71
+ cert: string;
72
+ ip_address: string;
73
+ last_seen: string;
74
+ node_port: string;
75
+ protocol: string;
76
+ key: string;
77
+ value: string;
78
+ path: string;
79
+ backend: string;
80
+ belong_to_node: string;
81
+ true: string;
82
+ false: string;
83
+ warning: string;
84
+ normal: string;
85
+ delete_tip: string;
86
+ delete_resource: string;
87
+ password: string;
88
+ username: string;
89
+ host: string;
90
+ no_resource: string;
91
+ all_namespaces: string;
92
+ clusterIp: string;
93
+ select_container: string;
94
+ sec: string;
95
+ min: string;
96
+ hr: string;
97
+ day: string;
98
+ port_mapping: string;
99
+ out_cluster_access: string;
100
+ in_cluster_access: string;
101
+ fail_get_detail: string;
102
+ pod_num: string;
103
+ show_data_value: string;
104
+ hide_data_value: string;
105
+ please_input: string;
106
+ create_failed: string;
107
+ create_failed_tip: string;
108
+ save_failed: string;
109
+ save_failed_tip: string;
110
+ completion_num_tooltip: string;
111
+ ready_num_tooltip: string;
112
+ realtime_log: string;
113
+ previous_log: string;
114
+ auto_wrap: string;
115
+ container_num: string;
116
+ edit_resource_success: string;
117
+ redeploy_success_toast: string;
118
+ redeploy_failed_toast: string;
119
+ pause_success_toast: string;
120
+ pause_failed_toast: string;
121
+ resume_success_toast: string;
122
+ resume_failed_toast: string;
123
+ delete_success_toast: string;
124
+ delete_failed_toast: string;
125
+ create_success_toast: string;
126
+ save_yaml_success_toast: string;
127
+ save_replicas_success_toast: string;
128
+ save_replicas_failed_toast: string;
129
+ port_mapping_title_tooltip: string;
130
+ in_cluster_desc: string;
131
+ in_cluster_ip_desc: string;
132
+ in_cluster_external_name_desc: string;
133
+ out_cluster_ip_desc: string;
134
+ out_cluster_node_port_desc: string;
135
+ out_cluster_lb_desc: string;
136
+ out_external_name_desc: string;
137
+ image: string;
138
+ restarts: string;
139
+ updated_time: string;
140
+ init_container: string;
141
+ regular_container: string;
142
+ suspend: string;
143
+ default_backend: string;
144
+ ingress_class: string;
145
+ pod_ready_num: string;
146
+ pod_complete_num: string;
147
+ pod_replicas_num: string;
148
+ edit_replicas: string;
149
+ dns_record: string;
150
+ basic_info: string;
151
+ pod_selector: string;
152
+ ingress_rule: string;
153
+ egress_rule: string;
154
+ service_port: string;
155
+ pod_port: string;
156
+ path_type: string;
157
+ only_support_one_yaml: string;
158
+ not_support: string;
159
+ stopped: string;
160
+ any_node_ip: string;
161
+ storage_class: string;
162
+ persistent_volume: string;
163
+ provisioner: string;
164
+ file_system: string;
165
+ capacity: string;
166
+ volume_mode: string;
167
+ access_mode: string;
168
+ 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;
174
+ exec_pod: string;
175
+ search: string;
176
+ };
177
+ };
178
+ 'zh-CN': {
179
+ dovetail: {
180
+ copy: string;
181
+ reset_arguments: string;
182
+ view_changes: string;
183
+ back_to_edit: string;
184
+ configure_file: string;
185
+ yaml_format_wrong: string;
186
+ yaml_value_wrong: string;
187
+ edit_yaml: string;
188
+ copied: string;
189
+ already_reset: string;
190
+ cancel: string;
191
+ delete: string;
192
+ create: string;
193
+ delete_resource: string;
194
+ confirm_delete_text: string;
195
+ delete_tip: string;
196
+ edit: string;
197
+ namespace: string;
198
+ name: string;
199
+ state: string;
200
+ image: string;
201
+ created_time: string;
202
+ label: string;
203
+ annotation: string;
204
+ type: string;
205
+ event: string;
206
+ reason: string;
207
+ object: string;
208
+ note: string;
209
+ condition: string;
210
+ download_yaml: string;
211
+ detail: string;
212
+ restarts: string;
213
+ updated_time: string;
214
+ message: string;
215
+ save: string;
216
+ workload: string;
217
+ all_namespaces: string;
218
+ empty: string;
219
+ schedule: string;
220
+ lastScheduleTime: string;
221
+ duration: string;
222
+ started: string;
223
+ init_container: string;
224
+ regular_container: string;
225
+ container: string;
226
+ redeploy: string;
227
+ data: string;
228
+ suspend: string;
229
+ resume: string;
230
+ clusterIp: string;
231
+ sessionAffinity: string;
232
+ log: string;
233
+ select_container: string;
234
+ fetch_schema_fail: string;
235
+ obtain_data_error: string;
236
+ retry: string;
237
+ ready: string;
238
+ updating: string;
239
+ completed: string;
240
+ failed: string;
241
+ suspended: string;
242
+ running: string;
243
+ terminating: string;
244
+ succeeded: string;
245
+ terminated: string;
246
+ unknown: string;
247
+ pending: string;
248
+ waiting: string;
249
+ create_resource: string;
250
+ edit_resource: string;
251
+ sec: string;
252
+ min: string;
253
+ hr: string;
254
+ day: string;
255
+ expand: string;
256
+ fold: string;
257
+ rule: string;
258
+ default_backend: string;
259
+ ingress_class: string;
260
+ port: string;
261
+ pod_ready_num: string;
262
+ pod_complete_num: string;
263
+ pod_replicas_num: string;
264
+ edit_replicas: string;
265
+ cert: string;
266
+ dns_record: string;
267
+ port_mapping: string;
268
+ out_cluster_access: string;
269
+ in_cluster_access: string;
270
+ fail_get_detail: string;
271
+ basic_info: string;
272
+ pod: string;
273
+ pod_num: string;
274
+ pod_selector: string;
275
+ ingress_rule: string;
276
+ egress_rule: string;
277
+ ip_address: string;
278
+ last_seen: string;
279
+ service_port: string;
280
+ pod_port: string;
281
+ node_port: string;
282
+ protocol: string;
283
+ key: string;
284
+ value: string;
285
+ show_data_value: string;
286
+ hide_data_value: string;
287
+ path_type: string;
288
+ path: string;
289
+ backend: string;
290
+ belong_to_node: string;
291
+ please_input: string;
292
+ create_failed: string;
293
+ create_failed_tip: string;
294
+ save_failed: string;
295
+ save_failed_tip: string;
296
+ completion_num_tooltip: string;
297
+ ready_num_tooltip: string;
298
+ true: string;
299
+ false: string;
300
+ warning: string;
301
+ normal: string;
302
+ realtime_log: string;
303
+ previous_log: string;
304
+ auto_wrap: string;
305
+ name_can_not_be_empty: string;
306
+ password: string;
307
+ username: string;
308
+ host: string;
309
+ container_num: string;
310
+ edit_resource_success: string;
311
+ redeploy_success_toast: string;
312
+ redeploy_failed_toast: string;
313
+ pause_success_toast: string;
314
+ pause_failed_toast: string;
315
+ resume_success_toast: string;
316
+ resume_failed_toast: string;
317
+ delete_success_toast: string;
318
+ delete_failed_toast: string;
319
+ create_success_toast: string;
320
+ save_yaml_success_toast: string;
321
+ save_replicas_success_toast: string;
322
+ save_replicas_failed_toast: string;
323
+ no_resource: string;
324
+ port_mapping_title_tooltip: string;
325
+ in_cluster_desc: string;
326
+ in_cluster_ip_desc: string;
327
+ in_cluster_external_name_desc: string;
328
+ out_cluster_ip_desc: string;
329
+ out_cluster_node_port_desc: string;
330
+ out_cluster_lb_desc: string;
331
+ out_external_name_desc: string;
332
+ only_support_one_yaml: string;
333
+ support: string;
334
+ not_support: string;
335
+ stopped: string;
336
+ any_node_ip: string;
337
+ storage_class: string;
338
+ persistent_volume: string;
339
+ provisioner: string;
340
+ file_system: string;
341
+ capacity: string;
342
+ distributed: string;
343
+ volume_mode: string;
344
+ access_mode: string;
345
+ block: string;
346
+ pv_phase_available: string;
347
+ pv_phase_bound: string;
348
+ pv_phase_released: string;
349
+ pv_phase_failed: string;
350
+ pv_phase_pending: string;
351
+ font_size: string;
352
+ download_shell_content: string;
353
+ clear_shell: string;
354
+ disconnected: string;
355
+ connecting: string;
356
+ reconnect: string;
357
+ search: string;
358
+ pvc: string;
359
+ pv: string;
360
+ csi: string;
361
+ retain: string;
362
+ default_sc: string;
363
+ reclaim_policy: string;
364
+ allow_expand: string;
365
+ edit_distribute_storage: string;
366
+ edit_distribute_storage_success_toast: string;
367
+ edit_distribute_storage_failed_toast: string;
368
+ };
369
+ };
370
+ };
371
+ export default i18n;
@@ -0,0 +1,12 @@
1
+ export declare const dovetailRefineI18n: import("i18next").i18n;
2
+ export * from './providers';
3
+ export * from './hooks';
4
+ export * from './components';
5
+ export * from './constants';
6
+ export * from './hooks';
7
+ export * from './Dovetail';
8
+ export * from './types';
9
+ export * from './contexts';
10
+ export * from './models';
11
+ export * from './plugins';
12
+ export * from './utils';