@dovetail-v2/refine 0.1.11-alpha.2 → 0.1.11

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 (233) hide show
  1. package/dist/{MonacoYamlDiffEditor-42ab72d2.js → MonacoYamlDiffEditor-10d71161.js} +1 -1
  2. package/dist/{index-8ae38abf.js → index-bf5bacd7.js} +324 -121
  3. package/dist/refine.js +3 -1
  4. package/dist/refine.umd.cjs +322 -119
  5. package/dist/style.css +135 -0
  6. package/lib/components/EditField/index.d.ts +3 -0
  7. package/lib/components/EditMetadataForm/KeyValueTableForm.d.ts +15 -0
  8. package/lib/components/EditMetadataForm/LabelFormatPopover.d.ts +3 -0
  9. package/lib/i18n.d.ts +20 -0
  10. package/lib/locales/zh-CN/index.d.ts +20 -0
  11. package/lib/utils/index.d.ts +1 -0
  12. package/lib/utils/validation.d.ts +8 -0
  13. package/package.json +6 -6
  14. package/lib/components/CronJobDropdown/index.d.ts +0 -9
  15. package/lib/components/K8sDropdown/index.d.ts +0 -9
  16. package/lib/components/PodDropdown/index.d.ts +0 -9
  17. package/lib/components/ReplicasDropdown/index.d.ts +0 -9
  18. package/lib/components/Table/TableToolBar.d.ts +0 -9
  19. package/lib/components/Table/TableWidgets.d.ts +0 -6
  20. package/lib/components/WorkloadDropdown/index.d.ts +0 -9
  21. package/lib/src/App.d.ts +0 -3
  22. package/lib/src/Dovetail.d.ts +0 -18
  23. package/lib/src/components/Breadcrumb/index.d.ts +0 -6
  24. package/lib/src/components/ConditionsTable/ConditionsTable.d.ts +0 -7
  25. package/lib/src/components/ConditionsTable/index.d.ts +0 -1
  26. package/lib/src/components/CreateButton/index.d.ts +0 -2
  27. package/lib/src/components/CronJobDropdown/index.d.ts +0 -9
  28. package/lib/src/components/CronjobJobsTable/index.d.ts +0 -8
  29. package/lib/src/components/DeleteButton/index.d.ts +0 -2
  30. package/lib/src/components/DeleteManyButton/index.d.ts +0 -4
  31. package/lib/src/components/DrawerShow/DrawerShow.d.ts +0 -9
  32. package/lib/src/components/DrawerShow/index.d.ts +0 -1
  33. package/lib/src/components/DurationTime/index.d.ts +0 -6
  34. package/lib/src/components/EditButton/index.d.ts +0 -2
  35. package/lib/src/components/EditField/index.d.ts +0 -15
  36. package/lib/src/components/ErrorContent/index.d.ts +0 -17
  37. package/lib/src/components/EventsTable/EventsTable.d.ts +0 -6
  38. package/lib/src/components/EventsTable/index.d.ts +0 -1
  39. package/lib/src/components/Form/FormModal.d.ts +0 -9
  40. package/lib/src/components/Form/RefineFormContent.d.ts +0 -12
  41. package/lib/src/components/Form/RefineFormPage.d.ts +0 -7
  42. package/lib/src/components/Form/YamlForm.d.ts +0 -29
  43. package/lib/src/components/Form/index.d.ts +0 -7
  44. package/lib/src/components/Form/type.d.ts +0 -17
  45. package/lib/src/components/Form/useFieldsConfig.d.ts +0 -4
  46. package/lib/src/components/Form/useReactHookForm.d.ts +0 -30
  47. package/lib/src/components/Form/useRefineForm.d.ts +0 -13
  48. package/lib/src/components/Form/useYamlForm.d.ts +0 -50
  49. package/lib/src/components/FormErrorAlert/index.d.ts +0 -9
  50. package/lib/src/components/FormLayout/index.d.ts +0 -7
  51. package/lib/src/components/FormWidgets/KeyValueListWidget.d.ts +0 -6
  52. package/lib/src/components/FormWidgets/MetadataForm.d.ts +0 -2
  53. package/lib/src/components/FormWidgets/NameInputWidget.d.ts +0 -51
  54. package/lib/src/components/FormWidgets/NamespaceSelectWidget.d.ts +0 -9
  55. package/lib/src/components/FormWidgets/index.d.ts +0 -4
  56. package/lib/src/components/FormWidgets/widget.d.ts +0 -5
  57. package/lib/src/components/ImageNames/index.d.ts +0 -5
  58. package/lib/src/components/IngressRulesComponent/index.d.ts +0 -5
  59. package/lib/src/components/IngressRulesTable/IngressRulesTable.d.ts +0 -7
  60. package/lib/src/components/IngressRulesTable/index.d.ts +0 -1
  61. package/lib/src/components/K8sDropdown/index.d.ts +0 -9
  62. package/lib/src/components/KeyValue/KeyValue.d.ts +0 -7
  63. package/lib/src/components/KeyValue/KeyValueAnnotation.d.ts +0 -6
  64. package/lib/src/components/KeyValue/KeyValueSecret.d.ts +0 -5
  65. package/lib/src/components/KeyValue/index.d.ts +0 -3
  66. package/lib/src/components/Layout/index.d.ts +0 -3
  67. package/lib/src/components/LinkFallback/index.d.ts +0 -4
  68. package/lib/src/components/ListPage/index.d.ts +0 -10
  69. package/lib/src/components/Menu/index.d.ts +0 -2
  70. package/lib/src/components/NamespacesFilter/index.d.ts +0 -11
  71. package/lib/src/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +0 -8
  72. package/lib/src/components/NetworkPolicyRulesViewer/index.d.ts +0 -1
  73. package/lib/src/components/PVCDistributeStorage/index.d.ts +0 -16
  74. package/lib/src/components/PageShow/PageShow.d.ts +0 -12
  75. package/lib/src/components/PageShow/index.d.ts +0 -1
  76. package/lib/src/components/PodContainersTable/PodContainersTable.d.ts +0 -8
  77. package/lib/src/components/PodContainersTable/index.d.ts +0 -1
  78. package/lib/src/components/PodDropdown/index.d.ts +0 -9
  79. package/lib/src/components/PodLog/index.d.ts +0 -6
  80. package/lib/src/components/PodSelectorTable/index.d.ts +0 -6
  81. package/lib/src/components/PodShellModal/PodShell.d.ts +0 -18
  82. package/lib/src/components/PodShellModal/index.d.ts +0 -10
  83. package/lib/src/components/PortsTable/index.d.ts +0 -7
  84. package/lib/src/components/ReferenceLink/index.d.ts +0 -8
  85. package/lib/src/components/ReplicasDropdown/index.d.ts +0 -9
  86. package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +0 -8
  87. package/lib/src/components/ResourceCRUD/create/index.d.ts +0 -8
  88. package/lib/src/components/ResourceCRUD/index.d.ts +0 -4
  89. package/lib/src/components/ResourceCRUD/list/index.d.ts +0 -9
  90. package/lib/src/components/ResourceCRUD/show/index.d.ts +0 -9
  91. package/lib/src/components/ResourceFiledDisplays.d.ts +0 -7
  92. package/lib/src/components/ResourceLink/index.d.ts +0 -8
  93. package/lib/src/components/ResourceSelect/index.d.ts +0 -12
  94. package/lib/src/components/ResourceTable/index.d.ts +0 -9
  95. package/lib/src/components/ResourceUsageBar/index.d.ts +0 -8
  96. package/lib/src/components/Separator/index.d.ts +0 -2
  97. package/lib/src/components/ServiceComponents/index.d.ts +0 -10
  98. package/lib/src/components/Shell/ShellToolbar.d.ts +0 -16
  99. package/lib/src/components/Shell/index.d.ts +0 -74
  100. package/lib/src/components/ShowContent/ShowContent.d.ts +0 -18
  101. package/lib/src/components/ShowContent/fields.d.ts +0 -76
  102. package/lib/src/components/ShowContent/groups.d.ts +0 -24
  103. package/lib/src/components/ShowContent/index.d.ts +0 -4
  104. package/lib/src/components/ShowContent/tabs.d.ts +0 -5
  105. package/lib/src/components/StateTag/StateTag.d.ts +0 -10
  106. package/lib/src/components/StateTag/index.d.ts +0 -1
  107. package/lib/src/components/Table/TableToolBar.d.ts +0 -8
  108. package/lib/src/components/Table/TableWidgets.d.ts +0 -6
  109. package/lib/src/components/Table/index.d.ts +0 -43
  110. package/lib/src/components/Tabs/index.d.ts +0 -10
  111. package/lib/src/components/Tags/index.d.ts +0 -6
  112. package/lib/src/components/TextTags/index.d.ts +0 -6
  113. package/lib/src/components/Time/index.d.ts +0 -8
  114. package/lib/src/components/ValueDisplay/index.d.ts +0 -9
  115. package/lib/src/components/WorkloadDropdown/index.d.ts +0 -9
  116. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +0 -9
  117. package/lib/src/components/WorkloadPodsTable/index.d.ts +0 -1
  118. package/lib/src/components/WorkloadReplicas/index.d.ts +0 -17
  119. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.d.ts +0 -9
  120. package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +0 -19
  121. package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +0 -27
  122. package/lib/src/components/YamlEditor/index.d.ts +0 -1
  123. package/lib/src/components/YamlEditor/style.d.ts +0 -11
  124. package/lib/src/components/YamlEditor/yaml.worker.d.ts +0 -1
  125. package/lib/src/components/index.d.ts +0 -49
  126. package/lib/src/constants/auth.d.ts +0 -5
  127. package/lib/src/constants/index.d.ts +0 -3
  128. package/lib/src/constants/k8s.d.ts +0 -522
  129. package/lib/src/constants/state.d.ts +0 -15
  130. package/lib/src/contexts/component.d.ts +0 -8
  131. package/lib/src/contexts/configs.d.ts +0 -4
  132. package/lib/src/contexts/global-store.d.ts +0 -6
  133. package/lib/src/contexts/index.d.ts +0 -3
  134. package/lib/src/hooks/index.d.ts +0 -8
  135. package/lib/src/hooks/useDeleteModal/index.d.ts +0 -1
  136. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.d.ts +0 -8
  137. package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +0 -7
  138. package/lib/src/hooks/useDownloadYAML.d.ts +0 -7
  139. package/lib/src/hooks/useEagleTable/columns.d.ts +0 -47
  140. package/lib/src/hooks/useEagleTable/index.d.ts +0 -2
  141. package/lib/src/hooks/useEagleTable/useEagleTable.d.ts +0 -56
  142. package/lib/src/hooks/useEdit.d.ts +0 -4
  143. package/lib/src/hooks/useGlobalStore.d.ts +0 -3
  144. package/lib/src/hooks/useK8sYamlEditor.d.ts +0 -5
  145. package/lib/src/hooks/useNamespaceRefineFilter.d.ts +0 -5
  146. package/lib/src/hooks/useOpenForm.d.ts +0 -8
  147. package/lib/src/hooks/useSchema.d.ts +0 -21
  148. package/lib/src/hooks/useSubmitForm.d.ts +0 -14
  149. package/lib/src/hooks/useTableData.d.ts +0 -20
  150. package/lib/src/i18n.d.ts +0 -371
  151. package/lib/src/index.d.ts +0 -12
  152. package/lib/src/locales/en-US/index.d.ts +0 -175
  153. package/lib/src/locales/index.d.ts +0 -2
  154. package/lib/src/locales/zh-CN/index.d.ts +0 -193
  155. package/lib/src/main.d.ts +0 -3
  156. package/lib/src/models/cronjob-model.d.ts +0 -15
  157. package/lib/src/models/daemonset-model.d.ts +0 -15
  158. package/lib/src/models/deployment-model.d.ts +0 -13
  159. package/lib/src/models/event-model.d.ts +0 -7
  160. package/lib/src/models/index.d.ts +0 -19
  161. package/lib/src/models/ingress-model.d.ts +0 -20
  162. package/lib/src/models/job-model.d.ts +0 -20
  163. package/lib/src/models/network-policy-model.d.ts +0 -9
  164. package/lib/src/models/node-model.d.ts +0 -17
  165. package/lib/src/models/persistent-volume-claim.d.ts +0 -13
  166. package/lib/src/models/persistent-volume.d.ts +0 -13
  167. package/lib/src/models/pod-metrics-model.d.ts +0 -8
  168. package/lib/src/models/pod-model.d.ts +0 -20
  169. package/lib/src/models/resource-model.d.ts +0 -21
  170. package/lib/src/models/service-model.d.ts +0 -24
  171. package/lib/src/models/statefulset-model.d.ts +0 -13
  172. package/lib/src/models/storage-class.d.ts +0 -16
  173. package/lib/src/models/types/index.d.ts +0 -1
  174. package/lib/src/models/types/metric.d.ts +0 -25
  175. package/lib/src/models/workload-base-model.d.ts +0 -12
  176. package/lib/src/models/workload-model.d.ts +0 -18
  177. package/lib/src/pages/configmaps/index.d.ts +0 -4
  178. package/lib/src/pages/cronjobs/create/index.d.ts +0 -3
  179. package/lib/src/pages/cronjobs/index.d.ts +0 -3
  180. package/lib/src/pages/cronjobs/list/index.d.ts +0 -3
  181. package/lib/src/pages/cronjobs/show/index.d.ts +0 -3
  182. package/lib/src/pages/daemonsets/create/index.d.ts +0 -3
  183. package/lib/src/pages/daemonsets/index.d.ts +0 -3
  184. package/lib/src/pages/daemonsets/list/index.d.ts +0 -3
  185. package/lib/src/pages/daemonsets/show/index.d.ts +0 -3
  186. package/lib/src/pages/deployments/index.d.ts +0 -2
  187. package/lib/src/pages/deployments/list/index.d.ts +0 -3
  188. package/lib/src/pages/deployments/show/index.d.ts +0 -3
  189. package/lib/src/pages/ingresses/index.d.ts +0 -4
  190. package/lib/src/pages/jobs/index.d.ts +0 -4
  191. package/lib/src/pages/networkPolicies/index.d.ts +0 -4
  192. package/lib/src/pages/nodes/index.d.ts +0 -2
  193. package/lib/src/pages/nodes/list/index.d.ts +0 -3
  194. package/lib/src/pages/nodes/show/index.d.ts +0 -3
  195. package/lib/src/pages/persistentvolumeclaims/index.d.ts +0 -4
  196. package/lib/src/pages/persistentvolumes/index.d.ts +0 -4
  197. package/lib/src/pages/pods/create/index.d.ts +0 -3
  198. package/lib/src/pages/pods/index.d.ts +0 -3
  199. package/lib/src/pages/pods/list/index.d.ts +0 -3
  200. package/lib/src/pages/pods/show/index.d.ts +0 -3
  201. package/lib/src/pages/secrets/index.d.ts +0 -4
  202. package/lib/src/pages/services/index.d.ts +0 -4
  203. package/lib/src/pages/statefulsets/index.d.ts +0 -4
  204. package/lib/src/pages/storageclasses/form/index.d.ts +0 -9
  205. package/lib/src/pages/storageclasses/index.d.ts +0 -48
  206. package/lib/src/plugins/index.d.ts +0 -4
  207. package/lib/src/plugins/model-plugin.d.ts +0 -13
  208. package/lib/src/plugins/relation-plugin.d.ts +0 -26
  209. package/lib/src/plugins/type.d.ts +0 -8
  210. package/lib/src/providers/index.d.ts +0 -1
  211. package/lib/src/providers/router-provider/index.d.ts +0 -21
  212. package/lib/src/styles/button.d.ts +0 -1
  213. package/lib/src/styles/modal.d.ts +0 -1
  214. package/lib/src/types/index.d.ts +0 -1
  215. package/lib/src/types/resource.d.ts +0 -62
  216. package/lib/src/utils/addId.d.ts +0 -3
  217. package/lib/src/utils/download.d.ts +0 -1
  218. package/lib/src/utils/error.d.ts +0 -20
  219. package/lib/src/utils/form.d.ts +0 -3
  220. package/lib/src/utils/index.d.ts +0 -1
  221. package/lib/src/utils/k8s.d.ts +0 -3
  222. package/lib/src/utils/labels.d.ts +0 -9
  223. package/lib/src/utils/match-selector.d.ts +0 -3
  224. package/lib/src/utils/openapi.d.ts +0 -40
  225. package/lib/src/utils/schema.d.ts +0 -18
  226. package/lib/src/utils/selector.d.ts +0 -3
  227. package/lib/src/utils/shell.d.ts +0 -16
  228. package/lib/src/utils/storage.d.ts +0 -13
  229. package/lib/src/utils/string.d.ts +0 -1
  230. package/lib/src/utils/time.d.ts +0 -13
  231. package/lib/src/utils/unit.d.ts +0 -12
  232. package/lib/src/utils/yaml.d.ts +0 -2
  233. package/lib/vite.config.d.ts +0 -2
@@ -1,25 +0,0 @@
1
- import { Unstructured } from 'k8s-api-provider';
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
- } & Unstructured;
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 {};
@@ -1,12 +0,0 @@
1
- import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
- import type { DaemonSet, Deployment, StatefulSet } from 'kubernetes-types/apps/v1';
3
- import type { CronJob, Job } from 'kubernetes-types/batch/v1';
4
- import { Pod, Node } from 'kubernetes-types/core/v1';
5
- import { ResourceModel } from './resource-model';
6
- type WorkloadBaseTypes = Required<Deployment | StatefulSet | Job | DaemonSet | CronJob | Pod | Node> & Unstructured;
7
- export declare class WorkloadBaseModel extends ResourceModel<WorkloadBaseTypes> {
8
- _rawYaml: WorkloadBaseTypes;
9
- constructor(_rawYaml: WorkloadBaseTypes, _globalStore: GlobalStore);
10
- get imageNames(): string[];
11
- }
12
- export {};
@@ -1,18 +0,0 @@
1
- import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
- import type { DaemonSet, Deployment, StatefulSet } from 'kubernetes-types/apps/v1';
3
- import { WorkloadBaseModel } from './workload-base-model';
4
- type WorkloadTypes = Required<Deployment | StatefulSet | DaemonSet> & Unstructured;
5
- export declare class WorkloadModel extends WorkloadBaseModel {
6
- _rawYaml: WorkloadTypes;
7
- restarts: number;
8
- spec?: WorkloadTypes['spec'];
9
- status?: WorkloadTypes['status'];
10
- constructor(_rawYaml: WorkloadTypes, _globalStore: GlobalStore);
11
- init(): Promise<void>;
12
- private getRestarts;
13
- get replicas(): number | undefined;
14
- get readyReplicas(): number | undefined;
15
- redeploy(): WorkloadTypes;
16
- scale(value: number): WorkloadTypes;
17
- }
18
- export {};
@@ -1,4 +0,0 @@
1
- import { i18n } from 'i18next';
2
- import { ResourceModel } from '../../models';
3
- import { ResourceConfig } from '../../types';
4
- export declare const ConfigMapConfig: (i18n: i18n) => ResourceConfig<ResourceModel>;
@@ -1,3 +0,0 @@
1
- import { FormProps } from 'antd/lib/form';
2
- import React from 'react';
3
- export declare const CronJobForm: React.FC<FormProps>;
@@ -1,3 +0,0 @@
1
- export * from './create';
2
- export * from './list';
3
- export * from './show';
@@ -1,3 +0,0 @@
1
- import { IResourceComponentsProps } from '@refinedev/core';
2
- import React from 'react';
3
- export declare const CronJobList: React.FC<IResourceComponentsProps>;
@@ -1,3 +0,0 @@
1
- import { IResourceComponentsProps } from '@refinedev/core';
2
- import React from 'react';
3
- export declare const CronJobShow: React.FC<IResourceComponentsProps>;
@@ -1,3 +0,0 @@
1
- import { FormProps } from 'antd/lib/form';
2
- import React from 'react';
3
- export declare const DaemonSetForm: React.FC<FormProps>;
@@ -1,3 +0,0 @@
1
- export * from './create';
2
- export * from './list';
3
- export * from './show';
@@ -1,3 +0,0 @@
1
- import { IResourceComponentsProps } from '@refinedev/core';
2
- import React from 'react';
3
- export declare const DaemonSetList: React.FC<IResourceComponentsProps>;
@@ -1,3 +0,0 @@
1
- import { IResourceComponentsProps } from '@refinedev/core';
2
- import React from 'react';
3
- export declare const DaemonSetShow: React.FC<IResourceComponentsProps>;
@@ -1,2 +0,0 @@
1
- export * from './list';
2
- export * from './show';
@@ -1,3 +0,0 @@
1
- import { IResourceComponentsProps } from '@refinedev/core';
2
- import React from 'react';
3
- export declare const DeploymentList: React.FC<IResourceComponentsProps>;
@@ -1,3 +0,0 @@
1
- import { IResourceComponentsProps } from '@refinedev/core';
2
- import React from 'react';
3
- export declare const DeploymentShow: React.FC<IResourceComponentsProps>;
@@ -1,4 +0,0 @@
1
- import { i18n } from 'i18next';
2
- import { IngressModel } from '../../models';
3
- import { ResourceConfig } from '../../types';
4
- export declare const IngressConfig: (i18n: i18n) => ResourceConfig<IngressModel>;
@@ -1,4 +0,0 @@
1
- import { i18n } from 'i18next';
2
- import { JobModel } from '../../models';
3
- import { ResourceConfig } from '../../types';
4
- export declare const JobConfig: (i18n: i18n) => ResourceConfig<JobModel>;
@@ -1,4 +0,0 @@
1
- import { i18n } from 'i18next';
2
- import { NetworkPolicyModel } from '../../models';
3
- import { ResourceConfig } from '../../types';
4
- export declare const NetworkPolicyConfig: (i18n: i18n) => ResourceConfig<NetworkPolicyModel>;
@@ -1,2 +0,0 @@
1
- export * from './list';
2
- export * from './show';
@@ -1,3 +0,0 @@
1
- import { IResourceComponentsProps } from '@refinedev/core';
2
- import React from 'react';
3
- export declare const NodeList: React.FC<IResourceComponentsProps>;
@@ -1,3 +0,0 @@
1
- import { IResourceComponentsProps } from '@refinedev/core';
2
- import React from 'react';
3
- export declare const NodeShow: React.FC<IResourceComponentsProps>;
@@ -1,4 +0,0 @@
1
- import { i18n as I18n } from 'i18next';
2
- import { ResourceConfig } from 'src/types';
3
- import { PersistentVolumeClaimModel } from '../../models';
4
- export declare const PersistentVolumeClaimConfig: (i18n: I18n) => ResourceConfig<PersistentVolumeClaimModel>;
@@ -1,4 +0,0 @@
1
- import { i18n as I18n } from 'i18next';
2
- import { ResourceConfig } from 'src/types';
3
- import { PersistentVolumeModel } from '../../models';
4
- export declare const PersistentVolumeConfig: (i18n: I18n) => ResourceConfig<PersistentVolumeModel>;
@@ -1,3 +0,0 @@
1
- import { FormProps } from 'antd/lib/form';
2
- import React from 'react';
3
- export declare const PodForm: React.FC<FormProps>;
@@ -1,3 +0,0 @@
1
- export * from './create';
2
- export * from './list';
3
- export * from './show';
@@ -1,3 +0,0 @@
1
- import { IResourceComponentsProps } from '@refinedev/core';
2
- import React from 'react';
3
- export declare const PodList: React.FC<IResourceComponentsProps>;
@@ -1,3 +0,0 @@
1
- import { IResourceComponentsProps } from '@refinedev/core';
2
- import React from 'react';
3
- export declare const PodShow: React.FC<IResourceComponentsProps>;
@@ -1,4 +0,0 @@
1
- import { i18n } from 'i18next';
2
- import { ResourceModel } from '../../models';
3
- import { ResourceConfig } from '../../types';
4
- export declare const SecretsConfig: (i18n: i18n) => ResourceConfig<ResourceModel>;
@@ -1,4 +0,0 @@
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>;
@@ -1,4 +0,0 @@
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>;
@@ -1,9 +0,0 @@
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 {};
@@ -1,48 +0,0 @@
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
- };
16
- parameters: {};
17
- provisioner: string;
18
- reclaimPolicy: string;
19
- allowVolumeExpansion: boolean;
20
- volumeBindingMode: string;
21
- };
22
- formConfig: {
23
- fields?: ((props: {
24
- record?: import("../..").ResourceModel<import("k8s-api-provider").Unstructured> | undefined;
25
- records: import("../..").ResourceModel<import("k8s-api-provider").Unstructured>[];
26
- action: "create" | "edit";
27
- }) => import("../../components").RefineFormField[]) | undefined;
28
- saveButtonText?: string | undefined;
29
- renderForm?: ((props: import("../../components").YamlFormProps) => import("react").ReactNode) | undefined;
30
- formType?: import("src/types").FormType | undefined;
31
- transformInitValues?: ((values: Record<string, unknown>) => Record<string, unknown>) | undefined;
32
- transformApplyValues?: ((values: Record<string, unknown>) => import("k8s-api-provider").Unstructured) | undefined;
33
- formTitle?: string | ((action: "create" | "edit") => string) | undefined;
34
- formDesc?: string | ((action: "create" | "edit") => string) | undefined;
35
- formatError?: ((errorBody: any) => string) | undefined;
36
- 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;
37
- useFormProps?: import("@refinedev/react-hook-form").UseFormProps | undefined;
38
- } | undefined;
39
- columns: () => (import("../../components").Column<import("../..").ResourceModel<import("k8s-api-provider").Unstructured>> | import("../../components").Column<import("../..").StorageClassModel>)[];
40
- showConfig: () => {
41
- tabs: {
42
- title: string;
43
- key: string;
44
- groups: import("../../components").ShowGroup<import("../..").StorageClassModel>[];
45
- }[];
46
- };
47
- };
48
- export * from './form';
@@ -1,4 +0,0 @@
1
- import { IProviderPlugin } from 'k8s-api-provider';
2
- export * from './model-plugin';
3
- export * from './relation-plugin';
4
- export declare const ProviderPlugins: IProviderPlugin<import("k8s-api-provider").Unstructured>[];
@@ -1,13 +0,0 @@
1
- import { GlobalStore, Unstructured, UnstructuredList, IProviderPlugin, DataList } from 'k8s-api-provider';
2
- import { ResourceModel } from '../models';
3
- export declare class ModelPlugin implements IProviderPlugin<ResourceModel> {
4
- _globalStore?: GlobalStore;
5
- private ModelMap;
6
- init(globalStore: GlobalStore): void;
7
- processData(res: UnstructuredList): Promise<DataList<ResourceModel<Unstructured>>>;
8
- processItem(item: Unstructured): Promise<ResourceModel>;
9
- restoreData(res: DataList<ResourceModel>): UnstructuredList;
10
- restoreItem(item: ResourceModel): Unstructured;
11
- setModelMap(key: string, model: ResourceModel): void;
12
- }
13
- export declare const modelPlugin: ModelPlugin;
@@ -1,26 +0,0 @@
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
- export 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;
@@ -1,8 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export { routerProvider } from './router-provider';
@@ -1,21 +0,0 @@
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;
15
- Link: React.ForwardRefExoticComponent<Pick<{
16
- [prop: string]: any;
17
- to: string;
18
- } & {
19
- children?: React.ReactNode;
20
- }, string | number> & React.RefAttributes<HTMLAnchorElement>>;
21
- };
@@ -1 +0,0 @@
1
- export declare const WarningButtonStyle: import("@linaria/core").LinariaClassName;
@@ -1 +0,0 @@
1
- export declare const FullscreenModalStyle: import("@linaria/core").LinariaClassName;
@@ -1 +0,0 @@
1
- export * from './resource';
@@ -1,62 +0,0 @@
1
- /// <reference types="react" />
2
- import { UseFormProps } from '@refinedev/react-hook-form';
3
- import { YamlFormProps } from '../components';
4
- import { RefineFormField } from '../components/Form';
5
- import { ShowConfig } from '../components/ShowContent';
6
- import { Column, TableProps } from '../components/Table';
7
- import { ResourceModel } from '../models';
8
- export declare enum RESOURCE_GROUP {
9
- WORKLOAD = "WORKLOAD",
10
- STORAGE = "STORAGE",
11
- NETWORK = "NETWORK",
12
- CLUSTER = "CLUSTER",
13
- SERVICE = "SERVICE",
14
- SERVICE_AND_NETWORK = "SERVICE_AND_NETWORK",
15
- CONFIG = "CONFIG",
16
- NODE_MANAGEMENT = "NODE_MANAGEMENT"
17
- }
18
- export declare enum FormType {
19
- PAGE = "PAGE",
20
- MODAL = "MODAL"
21
- }
22
- export type WithId<T> = T & {
23
- id: string;
24
- };
25
- export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
26
- name: string;
27
- kind: string;
28
- basePath: string;
29
- apiVersion: string;
30
- label: string;
31
- hideListToolBar?: boolean;
32
- hideNamespacesFilter?: boolean;
33
- description?: string;
34
- parent?: RESOURCE_GROUP;
35
- formatter?: (v: Model) => Model;
36
- initValue?: Record<string, unknown>;
37
- columns?: () => Column<Model>[];
38
- noShow?: boolean;
39
- showConfig?: () => ShowConfig<Model>;
40
- Dropdown?: React.FC<{
41
- record: Model;
42
- }>;
43
- tableProps?: Partial<TableProps<Model>>;
44
- isCustom?: boolean;
45
- formConfig?: {
46
- fields?: (props: {
47
- record?: Model;
48
- records: Model[];
49
- action: 'create' | 'edit';
50
- }) => RefineFormField[];
51
- saveButtonText?: string;
52
- renderForm?: (props: YamlFormProps) => React.ReactNode;
53
- formType?: FormType;
54
- transformInitValues?: (values: Record<string, unknown>) => Record<string, unknown>;
55
- transformApplyValues?: (values: Record<string, unknown>) => Model['_rawYaml'];
56
- formTitle?: string | ((action: 'create' | 'edit') => string);
57
- formDesc?: string | ((action: 'create' | 'edit') => string);
58
- formatError?: (errorBody: any) => string;
59
- refineCoreProps?: UseFormProps['refineCoreProps'];
60
- useFormProps?: UseFormProps;
61
- };
62
- };
@@ -1,3 +0,0 @@
1
- export declare function addId<T extends object>(arr: T[], idKey: keyof T): ({
2
- id: string;
3
- } & T)[];
@@ -1 +0,0 @@
1
- export declare function download(filename: string, content: string): void;
@@ -1,20 +0,0 @@
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): string;
19
- export declare function getCommonErrors(responseBody: ErrorResponseBody, i18n: I18n): string[];
20
- export {};
@@ -1,3 +0,0 @@
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>;
@@ -1 +0,0 @@
1
- export * from './schema';
@@ -1,3 +0,0 @@
1
- import { BaseRecord } from '@refinedev/core';
2
- export declare function getApiVersion(resourceBasePath: string): string;
3
- export declare function pruneBeforeEdit(v: BaseRecord): void;
@@ -1,9 +0,0 @@
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 {};
@@ -1,3 +0,0 @@
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;
@@ -1,40 +0,0 @@
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
- private resourceBasePath;
33
- private apiVersion;
34
- private schemas;
35
- constructor(resourceBasePath: string);
36
- fetch(): Promise<Array<OpenAPIResponse['components']['schemas'][string]> | null>;
37
- findSchema(kind: string): JSONSchema7 | undefined;
38
- private processSchemas;
39
- }
40
- export default K8sOpenAPI;
@@ -1,18 +0,0 @@
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
- prePath?: string;
16
- };
17
- export declare function resolveRef(schema: JSONSchema7, schemas: Record<string, JSONSchema7>, options: ResolveOptions): JSONSchema7;
18
- export {};
@@ -1,3 +0,0 @@
1
- import { LabelSelector } from 'kubernetes-types/meta/v1';
2
- import { PodModel } from '../models';
3
- export declare function matchSelector(pod: PodModel, selector: LabelSelector): boolean;
@@ -1,16 +0,0 @@
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 {};
@@ -1,13 +0,0 @@
1
- export declare enum StorageUnit {
2
- Pi = "Pi",
3
- PiB = "PiB",
4
- Ti = "Ti",
5
- TiB = "TiB",
6
- Gi = "Gi",
7
- GiB = "GiB",
8
- Mi = "Mi",
9
- MiB = "MiB",
10
- Ki = "Ki",
11
- KiB = "KiB"
12
- }
13
- export declare function transformStorageUnit(value: string, toUnit?: StorageUnit): number;
@@ -1 +0,0 @@
1
- export declare function shortenedImage(image: string): string;
@@ -1,13 +0,0 @@
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
- };
@@ -1,12 +0,0 @@
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 {};
@@ -1,2 +0,0 @@
1
- import { JSONSchema7 } from 'json-schema';
2
- export declare function generateYamlBySchema(defaultValue: Record<string, unknown>, schema: JSONSchema7): string;
@@ -1,2 +0,0 @@
1
- declare const _default: import("vite").UserConfig;
2
- export default _default;