@dovetail-v2/refine 0.0.0-pod-exec.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 (243) hide show
  1. package/README.MD +49 -0
  2. package/dist/MonacoYamlDiffEditor-9f67fdf5.js +55 -0
  3. package/dist/assets/yaml.worker-5e5f190c.js +40608 -0
  4. package/dist/favicon.ico +0 -0
  5. package/dist/images/flags/de.svg +1 -0
  6. package/dist/images/flags/en.svg +1 -0
  7. package/dist/index-cd4b193d.js +34099 -0
  8. package/dist/locales/de/common.json +167 -0
  9. package/dist/locales/en/common.json +167 -0
  10. package/dist/refine.js +207 -0
  11. package/dist/refine.umd.cjs +34144 -0
  12. package/dist/style.css +1767 -0
  13. package/lib/src/App.d.ts +3 -0
  14. package/lib/src/Dovetail.d.ts +18 -0
  15. package/lib/src/components/Breadcrumb/index.d.ts +6 -0
  16. package/lib/src/components/ConditionsTable/ConditionsTable.d.ts +7 -0
  17. package/lib/src/components/ConditionsTable/index.d.ts +1 -0
  18. package/lib/src/components/CreateButton/index.d.ts +2 -0
  19. package/lib/src/components/CronJobDropdown/index.d.ts +9 -0
  20. package/lib/src/components/CronjobJobsTable/index.d.ts +8 -0
  21. package/lib/src/components/DeleteButton/index.d.ts +2 -0
  22. package/lib/src/components/DeleteManyButton/index.d.ts +4 -0
  23. package/lib/src/components/DrawerShow/DrawerShow.d.ts +9 -0
  24. package/lib/src/components/DrawerShow/index.d.ts +1 -0
  25. package/lib/src/components/DurationTime/index.d.ts +6 -0
  26. package/lib/src/components/EditButton/index.d.ts +2 -0
  27. package/lib/src/components/EditField/index.d.ts +15 -0
  28. package/lib/src/components/ErrorContent/index.d.ts +17 -0
  29. package/lib/src/components/EventsTable/EventsTable.d.ts +6 -0
  30. package/lib/src/components/EventsTable/index.d.ts +1 -0
  31. package/lib/src/components/Form/FormModal.d.ts +10 -0
  32. package/lib/src/components/Form/KeyValueListWidget.d.ts +6 -0
  33. package/lib/src/components/Form/MetadataForm.d.ts +2 -0
  34. package/lib/src/components/Form/NameInputWidget.d.ts +51 -0
  35. package/lib/src/components/Form/NamespaceSelectWidget.d.ts +9 -0
  36. package/lib/src/components/Form/RefineFormContent.d.ts +12 -0
  37. package/lib/src/components/Form/RefineFormPage.d.ts +7 -0
  38. package/lib/src/components/Form/YamlForm.d.ts +29 -0
  39. package/lib/src/components/Form/index.d.ts +7 -0
  40. package/lib/src/components/Form/type.d.ts +16 -0
  41. package/lib/src/components/Form/useReactHookForm.d.ts +29 -0
  42. package/lib/src/components/Form/useRefineForm.d.ts +10 -0
  43. package/lib/src/components/Form/useYamlForm.d.ts +51 -0
  44. package/lib/src/components/Form/widget.d.ts +5 -0
  45. package/lib/src/components/FormErrorAlert/index.d.ts +9 -0
  46. package/lib/src/components/FormLayout/index.d.ts +7 -0
  47. package/lib/src/components/FormModal/index.d.ts +10 -0
  48. package/lib/src/components/FormWidgets/KeyValueListWidget.d.ts +6 -0
  49. package/lib/src/components/FormWidgets/MetadataForm.d.ts +2 -0
  50. package/lib/src/components/FormWidgets/NameInputWidget.d.ts +51 -0
  51. package/lib/src/components/FormWidgets/NamespaceSelectWidget.d.ts +9 -0
  52. package/lib/src/components/FormWidgets/index.d.ts +4 -0
  53. package/lib/src/components/FormWidgets/widget.d.ts +5 -0
  54. package/lib/src/components/ImageNames/index.d.ts +5 -0
  55. package/lib/src/components/IngressRulesComponent/index.d.ts +5 -0
  56. package/lib/src/components/IngressRulesTable/IngressRulesTable.d.ts +7 -0
  57. package/lib/src/components/IngressRulesTable/index.d.ts +1 -0
  58. package/lib/src/components/K8sDropdown/index.d.ts +9 -0
  59. package/lib/src/components/KeyValue/KeyValue.d.ts +7 -0
  60. package/lib/src/components/KeyValue/KeyValueAnnotation.d.ts +6 -0
  61. package/lib/src/components/KeyValue/KeyValueSecret.d.ts +5 -0
  62. package/lib/src/components/KeyValue/index.d.ts +3 -0
  63. package/lib/src/components/KeyValueData/index.d.ts +6 -0
  64. package/lib/src/components/Layout/index.d.ts +3 -0
  65. package/lib/src/components/LinkFallback/index.d.ts +4 -0
  66. package/lib/src/components/ListPage/index.d.ts +9 -0
  67. package/lib/src/components/Menu/index.d.ts +2 -0
  68. package/lib/src/components/ModalContextProvider/index.d.ts +12 -0
  69. package/lib/src/components/NamespacesFilter/index.d.ts +11 -0
  70. package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts +8 -0
  71. package/lib/src/components/NetworkPolicyRulesTable/index.d.ts +1 -0
  72. package/lib/src/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +8 -0
  73. package/lib/src/components/NetworkPolicyRulesViewer/index.d.ts +1 -0
  74. package/lib/src/components/PageShow/PageShow.d.ts +12 -0
  75. package/lib/src/components/PageShow/index.d.ts +1 -0
  76. package/lib/src/components/PodContainersTable/PodContainersTable.d.ts +8 -0
  77. package/lib/src/components/PodContainersTable/index.d.ts +1 -0
  78. package/lib/src/components/PodDropdown/index.d.ts +9 -0
  79. package/lib/src/components/PodLog/index.d.ts +6 -0
  80. package/lib/src/components/PodSelectorTable/index.d.ts +6 -0
  81. package/lib/src/components/PodShellModal/index.d.ts +7 -0
  82. package/lib/src/components/PortsTable/index.d.ts +7 -0
  83. package/lib/src/components/ReferenceLink/index.d.ts +8 -0
  84. package/lib/src/components/ReplicasDropdown/index.d.ts +9 -0
  85. package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +8 -0
  86. package/lib/src/components/ResourceCRUD/create/index.d.ts +8 -0
  87. package/lib/src/components/ResourceCRUD/index.d.ts +4 -0
  88. package/lib/src/components/ResourceCRUD/list/index.d.ts +9 -0
  89. package/lib/src/components/ResourceCRUD/show/index.d.ts +9 -0
  90. package/lib/src/components/ResourceLink/index.d.ts +8 -0
  91. package/lib/src/components/ResourceSelect/index.d.ts +12 -0
  92. package/lib/src/components/ResourceUsageBar/index.d.ts +8 -0
  93. package/lib/src/components/Separator/index.d.ts +2 -0
  94. package/lib/src/components/ServiceComponents/index.d.ts +10 -0
  95. package/lib/src/components/ShowContent/ShowContent.d.ts +18 -0
  96. package/lib/src/components/ShowContent/fields.d.ts +57 -0
  97. package/lib/src/components/ShowContent/groups.d.ts +22 -0
  98. package/lib/src/components/ShowContent/index.d.ts +4 -0
  99. package/lib/src/components/ShowContent/tabs.d.ts +5 -0
  100. package/lib/src/components/StateTag/StateTag.d.ts +10 -0
  101. package/lib/src/components/StateTag/index.d.ts +1 -0
  102. package/lib/src/components/Table/ErrorContent.d.ts +10 -0
  103. package/lib/src/components/Table/TableToolBar.d.ts +8 -0
  104. package/lib/src/components/Table/TableWidgets.d.ts +6 -0
  105. package/lib/src/components/Table/index.d.ts +43 -0
  106. package/lib/src/components/Tabs/index.d.ts +10 -0
  107. package/lib/src/components/Tags/index.d.ts +6 -0
  108. package/lib/src/components/TextTags/index.d.ts +6 -0
  109. package/lib/src/components/Time/index.d.ts +8 -0
  110. package/lib/src/components/ValueDisplay/index.d.ts +9 -0
  111. package/lib/src/components/WorkloadDropdown/index.d.ts +9 -0
  112. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +9 -0
  113. package/lib/src/components/WorkloadPodsTable/index.d.ts +1 -0
  114. package/lib/src/components/WorkloadReplicas/index.d.ts +17 -0
  115. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
  116. package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
  117. package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +27 -0
  118. package/lib/src/components/YamlEditor/index.d.ts +1 -0
  119. package/lib/src/components/YamlEditor/style.d.ts +11 -0
  120. package/lib/src/components/YamlEditor/yaml.worker.d.ts +1 -0
  121. package/lib/src/components/YamlForm/index.d.ts +25 -0
  122. package/lib/src/components/index.d.ts +42 -0
  123. package/lib/src/constants/auth.d.ts +5 -0
  124. package/lib/src/constants/index.d.ts +3 -0
  125. package/lib/src/constants/k8s.d.ts +469 -0
  126. package/lib/src/constants/state.d.ts +15 -0
  127. package/lib/src/contexts/component.d.ts +8 -0
  128. package/lib/src/contexts/configs.d.ts +4 -0
  129. package/lib/src/contexts/global-store.d.ts +6 -0
  130. package/lib/src/contexts/index.d.ts +3 -0
  131. package/lib/src/hooks/index.d.ts +8 -0
  132. package/lib/src/hooks/useDeleteModal/index.d.ts +1 -0
  133. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.d.ts +8 -0
  134. package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
  135. package/lib/src/hooks/useDownloadYAML.d.ts +7 -0
  136. package/lib/src/hooks/useEagleForm.d.ts +48 -0
  137. package/lib/src/hooks/useEagleTable/columns.d.ts +35 -0
  138. package/lib/src/hooks/useEagleTable/index.d.ts +2 -0
  139. package/lib/src/hooks/useEagleTable/useEagleTable.d.ts +55 -0
  140. package/lib/src/hooks/useEdit.d.ts +4 -0
  141. package/lib/src/hooks/useGlobalStore.d.ts +3 -0
  142. package/lib/src/hooks/useK8sYamlEditor.d.ts +5 -0
  143. package/lib/src/hooks/useModal.d.ts +0 -0
  144. package/lib/src/hooks/useNamespaceFilter.d.ts +5 -0
  145. package/lib/src/hooks/useNamespaceRefineFilter.d.ts +5 -0
  146. package/lib/src/hooks/useOpenForm.d.ts +8 -0
  147. package/lib/src/hooks/useSchema.d.ts +14 -0
  148. package/lib/src/hooks/useSubmitForm.d.ts +14 -0
  149. package/lib/src/hooks/useTableData.d.ts +20 -0
  150. package/lib/src/i18n.d.ts +325 -0
  151. package/lib/src/index.d.ts +11 -0
  152. package/lib/src/locales/en-US/index.d.ts +161 -0
  153. package/lib/src/locales/index.d.ts +2 -0
  154. package/lib/src/locales/zh-CN/index.d.ts +161 -0
  155. package/lib/src/main.d.ts +3 -0
  156. package/lib/src/model/cronjob-model.d.ts +9 -0
  157. package/lib/src/model/index.d.ts +6 -0
  158. package/lib/src/model/job-model.d.ts +10 -0
  159. package/lib/src/model/pod-metrics-model.d.ts +7 -0
  160. package/lib/src/model/pod-model.d.ts +15 -0
  161. package/lib/src/model/resource-model.d.ts +17 -0
  162. package/lib/src/model/workload-model.d.ts +17 -0
  163. package/lib/src/models/cronjob-model.d.ts +16 -0
  164. package/lib/src/models/daemonset-model.d.ts +16 -0
  165. package/lib/src/models/deployment-model.d.ts +14 -0
  166. package/lib/src/models/event-model.d.ts +8 -0
  167. package/lib/src/models/index.d.ts +15 -0
  168. package/lib/src/models/ingress-model.d.ts +20 -0
  169. package/lib/src/models/job-model.d.ts +21 -0
  170. package/lib/src/models/network-policy-model.d.ts +10 -0
  171. package/lib/src/models/node-model.d.ts +15 -0
  172. package/lib/src/models/persistent-volume-claim.d.ts +10 -0
  173. package/lib/src/models/persistent-volume.d.ts +10 -0
  174. package/lib/src/models/pod-metrics-model.d.ts +9 -0
  175. package/lib/src/models/pod-model.d.ts +21 -0
  176. package/lib/src/models/resource-model.d.ts +21 -0
  177. package/lib/src/models/service-model.d.ts +25 -0
  178. package/lib/src/models/statefulset-model.d.ts +14 -0
  179. package/lib/src/models/storage-class.d.ts +10 -0
  180. package/lib/src/models/types/index.d.ts +1 -0
  181. package/lib/src/models/types/metric.d.ts +25 -0
  182. package/lib/src/models/workload-base-model.d.ts +13 -0
  183. package/lib/src/models/workload-model.d.ts +19 -0
  184. package/lib/src/pages/configmaps/index.d.ts +4 -0
  185. package/lib/src/pages/cronjobs/create/index.d.ts +3 -0
  186. package/lib/src/pages/cronjobs/index.d.ts +3 -0
  187. package/lib/src/pages/cronjobs/list/index.d.ts +3 -0
  188. package/lib/src/pages/cronjobs/show/index.d.ts +3 -0
  189. package/lib/src/pages/daemonsets/create/index.d.ts +3 -0
  190. package/lib/src/pages/daemonsets/index.d.ts +3 -0
  191. package/lib/src/pages/daemonsets/list/index.d.ts +3 -0
  192. package/lib/src/pages/daemonsets/show/index.d.ts +3 -0
  193. package/lib/src/pages/deployments/create/index.d.ts +3 -0
  194. package/lib/src/pages/deployments/index.d.ts +2 -0
  195. package/lib/src/pages/deployments/list/index.d.ts +3 -0
  196. package/lib/src/pages/deployments/show/index.d.ts +3 -0
  197. package/lib/src/pages/ingresses/index.d.ts +4 -0
  198. package/lib/src/pages/jobs/index.d.ts +4 -0
  199. package/lib/src/pages/networkPolicies/index.d.ts +4 -0
  200. package/lib/src/pages/nodes/hooks/useNodeMetrics.d.ts +17 -0
  201. package/lib/src/pages/nodes/index.d.ts +2 -0
  202. package/lib/src/pages/nodes/list/index.d.ts +3 -0
  203. package/lib/src/pages/nodes/show/index.d.ts +3 -0
  204. package/lib/src/pages/pods/create/index.d.ts +3 -0
  205. package/lib/src/pages/pods/index.d.ts +3 -0
  206. package/lib/src/pages/pods/list/index.d.ts +3 -0
  207. package/lib/src/pages/pods/show/index.d.ts +3 -0
  208. package/lib/src/pages/secrets/index.d.ts +4 -0
  209. package/lib/src/pages/services/index.d.ts +4 -0
  210. package/lib/src/pages/statefulsets/create/index.d.ts +3 -0
  211. package/lib/src/pages/statefulsets/index.d.ts +4 -0
  212. package/lib/src/pages/statefulsets/list/index.d.ts +3 -0
  213. package/lib/src/pages/statefulsets/show/index.d.ts +3 -0
  214. package/lib/src/pages/storageclasses/form/index.d.ts +9 -0
  215. package/lib/src/pages/storageclasses/index.d.ts +44 -0
  216. package/lib/src/pages/storageclasses/list/index.d.ts +3 -0
  217. package/lib/src/pages/storageclasses/show/index.d.ts +3 -0
  218. package/lib/src/plugins/index.d.ts +2 -0
  219. package/lib/src/plugins/model-plugin.d.ts +12 -0
  220. package/lib/src/plugins/relation-plugin.d.ts +27 -0
  221. package/lib/src/plugins/type.d.ts +8 -0
  222. package/lib/src/providers/index.d.ts +1 -0
  223. package/lib/src/providers/router-provider/index.d.ts +21 -0
  224. package/lib/src/types/index.d.ts +1 -0
  225. package/lib/src/types/metric.d.ts +25 -0
  226. package/lib/src/types/resource.d.ts +60 -0
  227. package/lib/src/utils/addId.d.ts +3 -0
  228. package/lib/src/utils/download.d.ts +1 -0
  229. package/lib/src/utils/error.d.ts +20 -0
  230. package/lib/src/utils/form.d.ts +3 -0
  231. package/lib/src/utils/k8s.d.ts +3 -0
  232. package/lib/src/utils/labels.d.ts +9 -0
  233. package/lib/src/utils/match-selector.d.ts +3 -0
  234. package/lib/src/utils/openapi.d.ts +45 -0
  235. package/lib/src/utils/schema.d.ts +17 -0
  236. package/lib/src/utils/selector.d.ts +3 -0
  237. package/lib/src/utils/shell.d.ts +16 -0
  238. package/lib/src/utils/string.d.ts +1 -0
  239. package/lib/src/utils/time.d.ts +13 -0
  240. package/lib/src/utils/unit.d.ts +12 -0
  241. package/lib/src/utils/yaml.d.ts +2 -0
  242. package/lib/vite.config.d.ts +2 -0
  243. package/package.json +112 -0
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { FormModalProps } from 'src/components/FormModal';
3
+ export declare const DeploymentForm: React.FC<FormModalProps>;
@@ -0,0 +1,2 @@
1
+ export * from './list';
2
+ export * from './show';
@@ -0,0 +1,3 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const DeploymentList: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,3 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const DeploymentShow: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,4 @@
1
+ import { i18n } from 'i18next';
2
+ import { IngressModel } from '../../models';
3
+ import { ResourceConfig } from '../../types';
4
+ export declare const IngressConfig: (i18n: i18n) => ResourceConfig<IngressModel>;
@@ -0,0 +1,4 @@
1
+ import { i18n } from 'i18next';
2
+ import { JobModel } from '../../models';
3
+ import { ResourceConfig } from '../../types';
4
+ export declare const JobConfig: (i18n: i18n) => ResourceConfig<JobModel>;
@@ -0,0 +1,4 @@
1
+ import { i18n } from 'i18next';
2
+ import { NetworkPolicyModel } from '../../models';
3
+ import { ResourceConfig } from '../../types';
4
+ export declare const NetworkPolicyConfig: (i18n: i18n) => ResourceConfig<NetworkPolicyModel>;
@@ -0,0 +1,17 @@
1
+ type MetricMap = Record<string, string>;
2
+ type NodeMetrics = {
3
+ cpuUsed: MetricMap | null;
4
+ cpuUsage: MetricMap | null;
5
+ };
6
+ export interface PrometheusResponse {
7
+ data: {
8
+ result: {
9
+ metric: Record<string, string>;
10
+ value: [number, string];
11
+ }[];
12
+ };
13
+ }
14
+ export declare function transformMetricResult(response: PrometheusResponse, metricName?: string): Record<string, string>;
15
+ export declare function getMonitorDatas(queries: string[], modelName?: string): Promise<Record<string, string>[]>;
16
+ export declare function useNodeMetrics(): NodeMetrics;
17
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './list';
2
+ export * from './show';
@@ -0,0 +1,3 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const NodeList: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,3 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const NodeShow: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,3 @@
1
+ import { FormProps } from 'antd/lib/form';
2
+ import React from 'react';
3
+ export declare const PodForm: React.FC<FormProps>;
@@ -0,0 +1,3 @@
1
+ export * from './create';
2
+ export * from './list';
3
+ export * from './show';
@@ -0,0 +1,3 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const PodList: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,3 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const PodShow: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,4 @@
1
+ import { i18n } from 'i18next';
2
+ import { ResourceModel } from '../../models';
3
+ import { ResourceConfig } from '../../types';
4
+ export declare const SecretsConfig: (i18n: i18n) => ResourceConfig<ResourceModel>;
@@ -0,0 +1,4 @@
1
+ import { i18n } from 'i18next';
2
+ import { ServiceModel } from '../../models/service-model';
3
+ import { ResourceConfig } from '../../types';
4
+ export declare const ServicesConfig: (i18n: i18n) => ResourceConfig<ServiceModel>;
@@ -0,0 +1,3 @@
1
+ import { FormProps } from 'antd/lib/form';
2
+ import React from 'react';
3
+ export declare const StatefulSetForm: React.FC<FormProps>;
@@ -0,0 +1,4 @@
1
+ import { i18n } from 'i18next';
2
+ import { StatefulSetModel } from 'src/models/statefulset-model';
3
+ import { ResourceConfig } from 'src/types';
4
+ export declare const StatefulSetConfig: (i18n: i18n) => ResourceConfig<StatefulSetModel>;
@@ -0,0 +1,3 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const StatefulSetList: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,3 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const StatefulSetShow: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,9 @@
1
+ import { ResourceModel } from 'src/models';
2
+ import { ResourceConfig } from 'src/types';
3
+ type GenerateStorageClassFormConfig = {
4
+ isEnabledZbs?: boolean;
5
+ isEnabledElf?: boolean;
6
+ isVmKsc?: boolean;
7
+ };
8
+ export declare function generateStorageClassFormConfig(options: GenerateStorageClassFormConfig): ResourceConfig<ResourceModel>['formConfig'];
9
+ export {};
@@ -0,0 +1,44 @@
1
+ /// <reference types="react" />
2
+ import { i18n as I18n } from 'i18next';
3
+ import { RESOURCE_GROUP } from 'src/types';
4
+ export declare const StorageClassConfig: (i18n: I18n) => {
5
+ name: string;
6
+ basePath: string;
7
+ kind: string;
8
+ parent: RESOURCE_GROUP;
9
+ label: string;
10
+ initValue: {
11
+ apiVersion: string;
12
+ kind: string;
13
+ metadata: {
14
+ name: string;
15
+ namespace: string;
16
+ };
17
+ spec: {};
18
+ };
19
+ formConfig: {
20
+ fields?: ((props: {
21
+ record?: import("../..").ResourceModel<import("k8s-api-provider").Unstructured> | undefined;
22
+ records: import("../..").ResourceModel<import("k8s-api-provider").Unstructured>[];
23
+ action: "create" | "edit";
24
+ }) => import("../..").RefineFormField[]) | undefined;
25
+ saveButtonText?: string | undefined;
26
+ renderForm?: ((props: import("../..").YamlFormProps) => import("react").ReactNode) | undefined;
27
+ formType?: import("src/types").FormType | undefined;
28
+ transformInitValues?: ((values: import("k8s-api-provider").Unstructured) => import("k8s-api-provider").Unstructured) | undefined;
29
+ transformApplyValues?: ((values: import("k8s-api-provider").Unstructured) => import("k8s-api-provider").Unstructured) | undefined;
30
+ formTitle?: string | ((action: "create" | "edit") => string) | undefined;
31
+ formDesc?: string | undefined;
32
+ formatError?: ((errorBody: any) => string) | undefined;
33
+ refineCoreProps?: import("@refinedev/core").UseFormProps<import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError, import("react-hook-form").FieldValues, import("@refinedev/core").BaseRecord, import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError> | undefined;
34
+ } | undefined;
35
+ columns: () => (import("../..").Column<import("../..").ResourceModel<import("k8s-api-provider").Unstructured>> | import("../..").Column<import("../..").StorageClassModel>)[];
36
+ showConfig: () => {
37
+ tabs: {
38
+ title: string;
39
+ key: string;
40
+ groups: import("../..").ShowGroup<import("../..").ResourceModel<import("k8s-api-provider").Unstructured>>[];
41
+ }[];
42
+ };
43
+ };
44
+ export * from './form';
@@ -0,0 +1,3 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const StorageClassList: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,3 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const StorageClassShow: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,2 @@
1
+ import { IProviderPlugin } from 'k8s-api-provider';
2
+ export declare const ProviderPlugins: IProviderPlugin<import("k8s-api-provider").Unstructured>[];
@@ -0,0 +1,12 @@
1
+ import { GlobalStore, Unstructured, UnstructuredList, IProviderPlugin, DataList } from 'k8s-api-provider';
2
+ import { ResourceModel } from '../models';
3
+ declare class ModelPlugin implements IProviderPlugin<ResourceModel> {
4
+ _globalStore?: GlobalStore;
5
+ init(globalStore: GlobalStore): void;
6
+ processData(res: UnstructuredList): Promise<DataList<ResourceModel<Unstructured>>>;
7
+ processItem(item: Unstructured): Promise<ResourceModel>;
8
+ restoreData(res: DataList<ResourceModel>): UnstructuredList;
9
+ restoreItem(item: ResourceModel): Unstructured;
10
+ }
11
+ export declare const modelPlugin: ModelPlugin;
12
+ export {};
@@ -0,0 +1,27 @@
1
+ import { GlobalStore, Unstructured, UnstructuredList } from 'k8s-api-provider';
2
+ import { LabelSelector, ObjectMeta } from 'kubernetes-types/meta/v1';
3
+ import { ResourceModel } from '../models';
4
+ export type Relation = {
5
+ kind: string;
6
+ apiVersion: string;
7
+ type: 'creates' | 'uses' | 'applies' | 'owner' | 'selects';
8
+ inbound: boolean;
9
+ name?: string;
10
+ namespace?: string;
11
+ selector?: LabelSelector;
12
+ };
13
+ export type ExtendObjectMeta = ObjectMeta & {
14
+ relations?: Relation[];
15
+ };
16
+ declare class RelationPlugin {
17
+ private globalStore?;
18
+ init(globalStore: GlobalStore): void;
19
+ processData(res: UnstructuredList): Promise<UnstructuredList>;
20
+ processItem(item: Unstructured): Promise<ResourceModel>;
21
+ restoreData(res: UnstructuredList): UnstructuredList;
22
+ restoreItem(item: Unstructured): Unstructured;
23
+ private processPodSelector;
24
+ private appendRelation;
25
+ }
26
+ export declare const relationPlugin: RelationPlugin;
27
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Unstructured } from 'k8s-api-provider';
2
+ import { ListMeta } from 'kubernetes-types/meta/v1';
3
+ export type DataList<Output extends Unstructured = Unstructured> = {
4
+ apiVersion: string;
5
+ kind: string;
6
+ metadata: ListMeta;
7
+ items: Array<Unstructured & Output>;
8
+ };
@@ -0,0 +1 @@
1
+ export { routerProvider } from './router-provider';
@@ -0,0 +1,21 @@
1
+ import { GoConfig, ParseResponse } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const stringifyConfig: {
4
+ addQueryPrefix: boolean;
5
+ skipNulls: boolean;
6
+ arrayFormat: "indices";
7
+ encode: boolean;
8
+ encodeValuesOnly: boolean;
9
+ };
10
+ export declare const convertToNumberIfPossible: (value: string | undefined) => string | number | undefined;
11
+ export declare const routerProvider: {
12
+ go: () => ({ to, type, query, hash, options: { keepQuery, keepHash } }: GoConfig) => string | void;
13
+ back: () => () => void;
14
+ parse: () => () => ParseResponse<Record<string, any>>;
15
+ Link: React.ForwardRefExoticComponent<Pick<{
16
+ [prop: string]: any;
17
+ to: string;
18
+ } & {
19
+ children?: React.ReactNode;
20
+ }, string | number> & React.RefAttributes<HTMLAnchorElement>>;
21
+ };
@@ -0,0 +1 @@
1
+ export * from './resource';
@@ -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 {};
@@ -0,0 +1,60 @@
1
+ /// <reference types="react" />
2
+ import { UseFormProps } from '@refinedev/react-hook-form';
3
+ import { Unstructured } from 'k8s-api-provider';
4
+ import { YamlFormProps } from '../components';
5
+ import { RefineFormField } from '../components/Form';
6
+ import { ShowConfig } from '../components/ShowContent';
7
+ import { Column, TableProps } from '../components/Table';
8
+ import { ResourceModel } from '../models';
9
+ export declare enum RESOURCE_GROUP {
10
+ WORKLOAD = "WORKLOAD",
11
+ STORAGE = "STORAGE",
12
+ NETWORK = "NETWORK",
13
+ CLUSTER = "CLUSTER",
14
+ SERVICE = "SERVICE",
15
+ SERVICE_AND_NETWORK = "SERVICE_AND_NETWORK"
16
+ }
17
+ export declare enum FormType {
18
+ PAGE = "PAGE",
19
+ MODAL = "MODAL"
20
+ }
21
+ export type WithId<T> = T & {
22
+ id: string;
23
+ };
24
+ export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
25
+ name: string;
26
+ kind: string;
27
+ basePath: string;
28
+ apiVersion: string;
29
+ label: string;
30
+ hideListToolBar?: boolean;
31
+ hideNamespacesFilter?: boolean;
32
+ description?: string;
33
+ parent?: RESOURCE_GROUP;
34
+ formatter?: (v: Model) => Model;
35
+ initValue?: Record<string, unknown>;
36
+ columns?: () => Column<Model>[];
37
+ noShow?: boolean;
38
+ showConfig?: () => ShowConfig<Model>;
39
+ Dropdown?: React.FC<{
40
+ record: Model;
41
+ }>;
42
+ tableProps?: Partial<TableProps<Model>>;
43
+ isCustom?: boolean;
44
+ formConfig?: {
45
+ fields?: (props: {
46
+ record?: Model;
47
+ records: Model[];
48
+ action: 'create' | 'edit';
49
+ }) => RefineFormField[];
50
+ saveButtonText?: string;
51
+ renderForm?: (props: YamlFormProps) => React.ReactNode;
52
+ formType?: FormType;
53
+ transformInitValues?: (values: Unstructured) => Unstructured;
54
+ transformApplyValues?: (values: Unstructured) => Unstructured;
55
+ formTitle?: string | ((action: 'create' | 'edit') => string);
56
+ formDesc?: string;
57
+ formatError?: (errorBody: any) => string;
58
+ refineCoreProps?: UseFormProps['refineCoreProps'];
59
+ };
60
+ };
@@ -0,0 +1,3 @@
1
+ export declare function addId<T extends object>(arr: T[], idKey: keyof T): ({
2
+ id: string;
3
+ } & T)[];
@@ -0,0 +1 @@
1
+ export declare function download(filename: string, content: string): void;
@@ -0,0 +1,20 @@
1
+ import { i18n as I18n } from 'i18next';
2
+ type Cause = {
3
+ code?: string;
4
+ reason?: string;
5
+ message: string;
6
+ field?: string;
7
+ };
8
+ export type ErrorResponseBody = {
9
+ message?: string;
10
+ code?: number;
11
+ reason?: string;
12
+ details?: {
13
+ causes?: Cause[];
14
+ };
15
+ graphQLErrors?: Cause[];
16
+ };
17
+ export declare function isNetworkError(errors?: Cause[]): boolean;
18
+ export declare function getSubmitError(errorResponse: ErrorResponseBody | undefined, text: string, i18n: I18n): any;
19
+ export declare function getCommonErrors(responseBody: ErrorResponseBody, i18n: I18n): any[];
20
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ResourceModel } from 'src/models';
2
+ import { ResourceConfig } from 'src/types';
3
+ export declare function getInitialValues<Model extends ResourceModel = ResourceModel>(config: ResourceConfig<Model>): Record<string, unknown>;
@@ -0,0 +1,3 @@
1
+ import { BaseRecord } from '@refinedev/core';
2
+ export declare function getApiVersion(resourceBasePath: string): string;
3
+ export declare function pruneBeforeEdit(v: BaseRecord): void;
@@ -0,0 +1,9 @@
1
+ type Labels = Record<string, string>;
2
+ type LabelsArray = {
3
+ key: string;
4
+ value: string;
5
+ }[];
6
+ export declare function toLabelStrings(labels?: Labels): string[];
7
+ export declare function toLabelsArray(labels?: Labels): LabelsArray;
8
+ export declare function toLabelsRecord(labels: LabelsArray): Labels;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ import { LabelSelector } from 'kubernetes-types/meta/v1';
2
+ import { PodModel } from '../models/pod-model';
3
+ export declare function matchSelector(pod: PodModel, selector?: LabelSelector, namespace?: string): boolean;
@@ -0,0 +1,45 @@
1
+ import { JSONSchema7 } from 'json-schema';
2
+ interface OpenAPIResponse {
3
+ openapi: string;
4
+ paths: {
5
+ [prop: string]: {
6
+ get: {
7
+ responses: {
8
+ 200: {
9
+ content: {
10
+ 'application/json': {
11
+ schema: JSONSchema7;
12
+ };
13
+ };
14
+ };
15
+ };
16
+ };
17
+ };
18
+ };
19
+ components: {
20
+ schemas: {
21
+ [prop: string]: JSONSchema7 & {
22
+ 'x-kubernetes-group-version-kind': {
23
+ group: string;
24
+ kind: string;
25
+ version: string;
26
+ }[];
27
+ };
28
+ };
29
+ };
30
+ }
31
+ declare class K8sOpenAPI {
32
+ resourceBasePath: string;
33
+ response: OpenAPIResponse | null;
34
+ apiVersion: string;
35
+ constructor(resourceBasePath: string);
36
+ fetch(): Promise<OpenAPIResponse>;
37
+ findSchema(kind: string): Promise<(JSONSchema7 & {
38
+ 'x-kubernetes-group-version-kind': {
39
+ group: string;
40
+ kind: string;
41
+ version: string;
42
+ }[];
43
+ }) | undefined>;
44
+ }
45
+ export default K8sOpenAPI;
@@ -0,0 +1,17 @@
1
+ import { JSONSchema7, JSONSchema7Type } from 'json-schema';
2
+ type TransformOptions = {
3
+ generateValue?: (schema: JSONSchema7) => JSONSchema7Type | undefined | null | Record<string, unknown>;
4
+ };
5
+ export declare function generateValueFromSchema(schema: JSONSchema7, options: TransformOptions): JSONSchema7Type | undefined | Record<string, unknown>;
6
+ export declare function generateSchemaTypeValue(schema: JSONSchema7): JSONSchema7Type | undefined | Record<string, unknown>;
7
+ type ResolveOptions = {
8
+ prune: {
9
+ description: boolean;
10
+ optional: boolean;
11
+ metadata: boolean;
12
+ fields: string[];
13
+ xProperty: boolean;
14
+ };
15
+ };
16
+ export declare function resolveRef(schema: JSONSchema7, schemas: Record<string, JSONSchema7>, options: ResolveOptions): JSONSchema7;
17
+ export {};
@@ -0,0 +1,3 @@
1
+ import { LabelSelector } from 'kubernetes-types/meta/v1';
2
+ import { PodModel } from '../models';
3
+ export declare function matchSelector(pod: PodModel, selector: LabelSelector): boolean;
@@ -0,0 +1,16 @@
1
+ /// <reference types="node" />
2
+ import { Buffer } from 'buffer';
3
+ export type QueryParams = {
4
+ [key: string]: string | string[];
5
+ };
6
+ export declare const stdin: (characters: string) => Buffer;
7
+ export declare function addParam(url: string, key: string, val: string | string[]): string;
8
+ export declare function addParams(url: string, params: QueryParams): string;
9
+ declare enum Alphabet {
10
+ NORMAL = "normal",
11
+ URL = "url"
12
+ }
13
+ export declare function base64Encode(str: string, alphabet?: Alphabet): string;
14
+ export declare function base64DecodeToBuffer(str: string): Buffer;
15
+ export declare function base64Decode(str: string): string;
16
+ export {};
@@ -0,0 +1 @@
1
+ export declare function shortenedImage(image: string): string;
@@ -0,0 +1,13 @@
1
+ export declare function getSecondsDiff(startDate: string, endDate: string): number;
2
+ export declare function elapsedTime(seconds: number, i18nMap: {
3
+ min: string;
4
+ sec: string;
5
+ hr: string;
6
+ day: string;
7
+ }): {
8
+ diff?: undefined;
9
+ label?: undefined;
10
+ } | {
11
+ diff: number;
12
+ label: string;
13
+ };
@@ -0,0 +1,12 @@
1
+ type FormatOptions = {
2
+ increment: number;
3
+ suffix: string | null;
4
+ firstSuffix: string | null;
5
+ startingExponent: number;
6
+ minExponent: number;
7
+ maxPrecision: number;
8
+ atLeastOne: boolean;
9
+ };
10
+ export declare function formatSi(inValue: number, options?: Partial<FormatOptions>): string;
11
+ export declare function parseSi(inValue: string, increment?: number | null, allowFractional?: boolean): number;
12
+ export {};
@@ -0,0 +1,2 @@
1
+ import { JSONSchema7 } from 'json-schema';
2
+ export declare function generateYamlBySchema(defaultValue: Record<string, unknown>, schema: JSONSchema7): string;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;