@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,25 @@
1
+ /// <reference types="react" />
2
+ import { FormAction } from '@refinedev/core';
3
+ import useEagleForm from 'src/hooks/useEagleForm';
4
+ export declare enum SchemaStrategy {
5
+ Required = "Required",
6
+ Optional = "Optional",
7
+ None = "None"
8
+ }
9
+ export interface YamlFormProps {
10
+ id?: string;
11
+ action?: FormAction;
12
+ initialValues?: Record<string, unknown>;
13
+ transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
14
+ schemaStrategy?: SchemaStrategy;
15
+ isShowLayout?: boolean;
16
+ useFormProps?: Parameters<typeof useEagleForm>[0];
17
+ onSaveButtonPropsChange?: (saveButtonProps: {
18
+ disabled?: boolean;
19
+ onClick: () => void;
20
+ }) => void;
21
+ onErrorsChange?: (errors: string[]) => void;
22
+ onFinish?: () => void;
23
+ }
24
+ declare function YamlForm(props: YamlFormProps): JSX.Element;
25
+ export default YamlForm;
@@ -0,0 +1,42 @@
1
+ export * from './Breadcrumb';
2
+ export * from './FormWidgets';
3
+ export * from './PageShow';
4
+ export * from './Time';
5
+ export * from './ConditionsTable';
6
+ export * from './FormLayout';
7
+ export * from './PodContainersTable';
8
+ export * from './WorkloadDropdown';
9
+ export * from './ReplicasDropdown';
10
+ export * from './PodDropdown';
11
+ export * from './CreateButton';
12
+ export * from './ImageNames';
13
+ export * from './ResourceCRUD';
14
+ export * from './WorkloadPodsTable';
15
+ export * from './CronJobDropdown';
16
+ export * from './K8sDropdown';
17
+ export * from './ResourceUsageBar';
18
+ export * from './WorkloadReplicas';
19
+ export * from './CronjobJobsTable';
20
+ export * from './KeyValue';
21
+ export * from './Separator';
22
+ export * from './YamlEditor';
23
+ export * from './DeleteButton';
24
+ export * from './Layout';
25
+ export * from './ShowContent';
26
+ export * from './DeleteManyButton';
27
+ export * from './ListPage';
28
+ export * from './StateTag';
29
+ export * from './DrawerShow';
30
+ export * from './Menu';
31
+ export * from './Table';
32
+ export * from './EditButton';
33
+ export * from './ReferenceLink';
34
+ export * from './ResourceLink';
35
+ export * from './NamespacesFilter';
36
+ export * from './Form';
37
+ export * from './ServiceComponents';
38
+ export * from './Tags';
39
+ export * from './TextTags';
40
+ export * from './PodLog';
41
+ export * from './NetworkPolicyRulesViewer';
42
+ export * from './Tabs';
@@ -0,0 +1,5 @@
1
+ export declare enum AccessControlAuth {
2
+ Edit = "Edit",
3
+ Delete = "Delete",
4
+ Create = "Create"
5
+ }
@@ -0,0 +1,3 @@
1
+ export * from './k8s';
2
+ export * from './state';
3
+ export * from './auth';
@@ -0,0 +1,469 @@
1
+ export declare const BASE_INIT_VALUE: {
2
+ metadata: {
3
+ name: string;
4
+ namespace: string;
5
+ annotations: {};
6
+ labels: {};
7
+ };
8
+ };
9
+ export declare const DEPLOYMENT_INIT_VALUE: {
10
+ apiVersion: string;
11
+ kind: string;
12
+ metadata: {
13
+ name: string;
14
+ namespace: string;
15
+ };
16
+ spec: {
17
+ selector: {
18
+ matchLabels: {
19
+ app: string;
20
+ };
21
+ };
22
+ replicas: number;
23
+ template: {
24
+ metadata: {
25
+ labels: {
26
+ app: string;
27
+ };
28
+ };
29
+ spec: {
30
+ containers: {
31
+ name: string;
32
+ image: string;
33
+ ports: {
34
+ containerPort: number;
35
+ protocol: string;
36
+ }[];
37
+ }[];
38
+ };
39
+ };
40
+ strategy: {
41
+ type: string;
42
+ rollingUpdate: {
43
+ maxSurge: string;
44
+ maxUnavailable: string;
45
+ };
46
+ };
47
+ };
48
+ };
49
+ export declare const CRONJOB_INIT_VALUE: {
50
+ apiVersion: string;
51
+ kind: string;
52
+ metadata: {
53
+ name: string;
54
+ namespace: string;
55
+ };
56
+ spec: {
57
+ schedule: string;
58
+ jobTemplate: {
59
+ spec: {
60
+ template: {
61
+ spec: {
62
+ containers: {
63
+ name: string;
64
+ image: string;
65
+ args: string[];
66
+ }[];
67
+ restartPolicy: string;
68
+ };
69
+ };
70
+ };
71
+ };
72
+ };
73
+ };
74
+ export declare const DAEMONSET_INIT_VALUE: {
75
+ apiVersion: string;
76
+ kind: string;
77
+ metadata: {
78
+ name: string;
79
+ namespace: string;
80
+ };
81
+ spec: {
82
+ selector: {
83
+ matchLabels: {
84
+ app: string;
85
+ };
86
+ };
87
+ template: {
88
+ metadata: {
89
+ labels: {
90
+ app: string;
91
+ };
92
+ };
93
+ spec: {
94
+ containers: {
95
+ name: string;
96
+ image: string;
97
+ ports: {
98
+ containerPort: number;
99
+ }[];
100
+ }[];
101
+ };
102
+ };
103
+ };
104
+ };
105
+ export declare const JOB_INIT_VALUE: {
106
+ apiVersion: string;
107
+ kind: string;
108
+ metadata: {
109
+ name: string;
110
+ namespace: string;
111
+ };
112
+ spec: {
113
+ selector: {};
114
+ template: {
115
+ metadata: {
116
+ name: string;
117
+ };
118
+ spec: {
119
+ containers: {
120
+ name: string;
121
+ image: string;
122
+ command: string[];
123
+ }[];
124
+ restartPolicy: string;
125
+ };
126
+ };
127
+ };
128
+ };
129
+ export declare const STATEFULSET_INIT_VALUE: {
130
+ apiVersion: string;
131
+ kind: string;
132
+ metadata: {
133
+ name: string;
134
+ namespace: string;
135
+ };
136
+ spec: {
137
+ serviceName: string;
138
+ replicas: number;
139
+ selector: {
140
+ matchLabels: {
141
+ app: string;
142
+ };
143
+ };
144
+ template: {
145
+ metadata: {
146
+ labels: {
147
+ app: string;
148
+ };
149
+ };
150
+ spec: {
151
+ terminationGracePeriodSeconds: number;
152
+ containers: {
153
+ name: string;
154
+ image: string;
155
+ command: string[];
156
+ args: string[];
157
+ ports: {
158
+ containerPort: number;
159
+ name: string;
160
+ }[];
161
+ volumeMounts: {
162
+ name: string;
163
+ mountPath: string;
164
+ }[];
165
+ }[];
166
+ };
167
+ };
168
+ volumeClaimTemplates: {
169
+ metadata: {
170
+ name: string;
171
+ };
172
+ spec: {
173
+ accessModes: string[];
174
+ resources: {
175
+ requests: {
176
+ storage: string;
177
+ };
178
+ };
179
+ };
180
+ }[];
181
+ };
182
+ };
183
+ export declare const POD_INIT_VALUE: {
184
+ apiVersion: string;
185
+ kind: string;
186
+ metadata: {
187
+ name: string;
188
+ namespace: string;
189
+ labels: {
190
+ app: string;
191
+ };
192
+ };
193
+ spec: {
194
+ securityContext: {
195
+ runAsNonRoot: boolean;
196
+ seccompProfile: {
197
+ type: string;
198
+ };
199
+ };
200
+ containers: {
201
+ name: string;
202
+ image: string;
203
+ ports: {
204
+ containerPort: number;
205
+ }[];
206
+ securityContext: {
207
+ allowPrivilegeEscalation: boolean;
208
+ capabilities: {
209
+ drop: string[];
210
+ };
211
+ };
212
+ }[];
213
+ };
214
+ };
215
+ export declare const SERVICE_CLUSTER_IP_INIT_VALUE: {
216
+ apiVersion: string;
217
+ kind: string;
218
+ metadata: {
219
+ name: string;
220
+ namespace: string;
221
+ };
222
+ spec: {
223
+ selector: {
224
+ app: string;
225
+ };
226
+ ports: {
227
+ name: string;
228
+ port: number;
229
+ protocol: string;
230
+ targetPort: number;
231
+ }[];
232
+ sessionAffinity: string;
233
+ type: string;
234
+ };
235
+ };
236
+ export declare const SERVICE_NODE_PORT_INIT_VALUE: {
237
+ apiVersion: string;
238
+ kind: string;
239
+ metadata: {
240
+ name: string;
241
+ namespace: string;
242
+ };
243
+ spec: {
244
+ selector: {
245
+ app: string;
246
+ };
247
+ ports: {
248
+ name: string;
249
+ port: number;
250
+ protocol: string;
251
+ targetPort: number;
252
+ }[];
253
+ sessionAffinity: string;
254
+ type: string;
255
+ };
256
+ };
257
+ export declare const SERVICE_LOAD_BALANCER_INIT_VALUE: {
258
+ apiVersion: string;
259
+ kind: string;
260
+ metadata: {
261
+ name: string;
262
+ namespace: string;
263
+ };
264
+ spec: {
265
+ selector: {
266
+ app: string;
267
+ };
268
+ ports: {
269
+ name: string;
270
+ port: number;
271
+ protocol: string;
272
+ targetPort: number;
273
+ }[];
274
+ sessionAffinity: string;
275
+ type: string;
276
+ };
277
+ };
278
+ export declare const SERVICE_EXTERNAL_NAME_INIT_VALUE: {
279
+ apiVersion: string;
280
+ kind: string;
281
+ metadata: {
282
+ name: string;
283
+ namespace: string;
284
+ };
285
+ spec: {
286
+ selector: {
287
+ app: string;
288
+ };
289
+ ports: {
290
+ name: string;
291
+ port: number;
292
+ protocol: string;
293
+ targetPort: number;
294
+ }[];
295
+ sessionAffinity: string;
296
+ type: string;
297
+ externalName: string;
298
+ };
299
+ };
300
+ export declare const SERVICE_HEADLESS_INIT_VALUE: {
301
+ apiVersion: string;
302
+ kind: string;
303
+ metadata: {
304
+ name: string;
305
+ namespace: string;
306
+ };
307
+ spec: {
308
+ selector: {
309
+ app: string;
310
+ };
311
+ clusterIP: string;
312
+ ports: {
313
+ name: string;
314
+ port: null;
315
+ protocol: string;
316
+ targetPort: null;
317
+ }[];
318
+ sessionAffinity: string;
319
+ type: string;
320
+ };
321
+ };
322
+ export declare const INGRESS_INIT_VALUE: {
323
+ apiVersion: string;
324
+ kind: string;
325
+ metadata: {
326
+ name: string;
327
+ namespace: string;
328
+ };
329
+ spec: {
330
+ rules: {
331
+ host: string;
332
+ http: {
333
+ paths: {
334
+ path: string;
335
+ pathType: string;
336
+ backend: {
337
+ service: {
338
+ name: string;
339
+ port: {
340
+ number: number;
341
+ };
342
+ };
343
+ };
344
+ }[];
345
+ };
346
+ }[];
347
+ };
348
+ };
349
+ export declare const NETWORK_POLICY_INIT_VALUE: {
350
+ apiVersion: string;
351
+ kind: string;
352
+ metadata: {
353
+ name: string;
354
+ namespace: string;
355
+ };
356
+ spec: {
357
+ podSelector: {};
358
+ policyTypes: never[];
359
+ };
360
+ };
361
+ export declare const CONFIG_MAP_INIT_VALUE: {
362
+ apiVersion: string;
363
+ kind: string;
364
+ metadata: {
365
+ name: string;
366
+ namespace: string;
367
+ };
368
+ data: {
369
+ key: string;
370
+ };
371
+ immutable: boolean;
372
+ };
373
+ export declare const SERVER_INSTANCE_INIT_VALUE: {
374
+ spec: {
375
+ address: {
376
+ host: string;
377
+ port: number;
378
+ protocol: string;
379
+ credentials: {
380
+ ssh: {
381
+ username: string;
382
+ password: string;
383
+ };
384
+ };
385
+ };
386
+ };
387
+ metadata: {
388
+ name: string;
389
+ namespace: string;
390
+ annotations: {};
391
+ labels: {};
392
+ };
393
+ apiVersion: string;
394
+ kind: string;
395
+ };
396
+ export declare const TIMESTAMP_LABEL = "sks.user.kubesmart.smtx.io/timestamp";
397
+ export declare const SECRET_OPAQUE_INIT_VALUE: {
398
+ apiVersion: string;
399
+ kind: string;
400
+ metadata: {
401
+ name: string;
402
+ namespace: string;
403
+ };
404
+ type: string;
405
+ data: {
406
+ key: string;
407
+ };
408
+ };
409
+ export declare const SECRET_IMAGE_REPO_INIT_VALUE: {
410
+ apiVersion: string;
411
+ kind: string;
412
+ metadata: {
413
+ name: string;
414
+ namespace: string;
415
+ };
416
+ type: string;
417
+ data: {
418
+ '.dockerconfigjson': string;
419
+ };
420
+ };
421
+ export declare const SECRET_BASIC_AUTH_INIT_VALUE: {
422
+ apiVersion: string;
423
+ kind: string;
424
+ metadata: {
425
+ name: string;
426
+ namespace: string;
427
+ };
428
+ type: string;
429
+ data: {
430
+ username: string;
431
+ password: string;
432
+ };
433
+ };
434
+ export declare const SECRET_SSH_AUTH_INIT_VALUE: {
435
+ apiVersion: string;
436
+ kind: string;
437
+ metadata: {
438
+ name: string;
439
+ namespace: string;
440
+ };
441
+ type: string;
442
+ data: {
443
+ 'ssh-publickey': string;
444
+ 'ssh-privatekey': string;
445
+ };
446
+ };
447
+ export declare const SECRET_TLS_INIT_VALUE: {
448
+ apiVersion: string;
449
+ kind: string;
450
+ metadata: {
451
+ name: string;
452
+ namespace: string;
453
+ };
454
+ type: string;
455
+ data: {
456
+ 'tls.crt': string;
457
+ 'tls.key': string;
458
+ };
459
+ };
460
+ export declare const SECRET_CUSTOM_INIT_VALUE: {
461
+ apiVersion: string;
462
+ kind: string;
463
+ metadata: {
464
+ name: string;
465
+ namespace: string;
466
+ };
467
+ type: string;
468
+ data: {};
469
+ };
@@ -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<import("..").ResourceModel<import("k8s-api-provider").Unstructured>>>>;
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,48 @@
1
+ import { HttpError, BaseRecord, UseFormReturnType as UseFormReturnTypeCore, UseFormProps as UseFormPropsCore, CreateResponse, UpdateResponse } from '@refinedev/core';
2
+ import { ButtonProps } from 'antd/lib/button';
3
+ import { FormInstance, FormProps } from 'antd/lib/form';
4
+ import { JSONSchema7 } from 'json-schema';
5
+ import { Unstructured } from 'k8s-api-provider';
6
+ import React from 'react';
7
+ import { type YamlEditorHandle, type YamlEditorProps } from 'src/components/YamlEditor';
8
+ type EditorProps = Omit<YamlEditorProps, 'schema'> & {
9
+ ref: React.RefObject<YamlEditorHandle>;
10
+ schema: JSONSchema7 | null;
11
+ };
12
+ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
13
+ submitOnEnter?: boolean;
14
+ /**
15
+ * Shows notification when unsaved changes exist
16
+ */
17
+ warnWhenUnsavedChanges?: boolean;
18
+ editorOptions?: {
19
+ isGenerateAnnotations?: boolean;
20
+ isSkipSchema?: boolean;
21
+ };
22
+ initialValuesForCreate?: Record<string, unknown>;
23
+ transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
24
+ };
25
+ export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
26
+ form: FormInstance;
27
+ formProps: FormProps;
28
+ saveButtonProps: ButtonProps & {
29
+ onClick: () => void;
30
+ };
31
+ editorProps: EditorProps;
32
+ schema: JSONSchema7 | null;
33
+ isLoadingSchema: boolean;
34
+ loadSchemaError: Error | null;
35
+ fetchSchema: () => void;
36
+ enableEditor: boolean;
37
+ errorResponseBody?: Record<string, unknown> | null;
38
+ switchEditor: () => void;
39
+ onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void>;
40
+ };
41
+ declare const useEagleForm: <TQueryFnData extends Unstructured = Unstructured & {
42
+ id: string;
43
+ }, TError extends HttpError = HttpError, TVariables extends {
44
+ [prop: string]: unknown;
45
+ } = {
46
+ [prop: string]: unknown;
47
+ }, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action: actionFromProps, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, transformValues, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
48
+ export default useEagleForm;