@dovetail-v2/refine 0.1.4 → 0.1.5-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/dist/{MonacoYamlDiffEditor-4060eeb6.js → MonacoYamlDiffEditor-c27ab21c.js} +1 -1
  2. package/dist/{index-9767c246.js → index-984f2ec7.js} +16296 -2217
  3. package/dist/refine.js +163 -158
  4. package/dist/refine.umd.cjs +16049 -1970
  5. package/dist/style.css +231 -3
  6. package/lib/App.d.ts +2 -0
  7. package/lib/Dovetail.d.ts +18 -0
  8. package/lib/components/Breadcrumb/index.d.ts +5 -0
  9. package/lib/components/ConditionsTable/ConditionsTable.d.ts +7 -0
  10. package/lib/components/ConditionsTable/index.d.ts +1 -0
  11. package/lib/components/CreateButton/index.d.ts +1 -0
  12. package/lib/components/CronJobDropdown/index.d.ts +8 -0
  13. package/lib/components/CronjobJobsTable/index.d.ts +8 -0
  14. package/lib/components/DeleteButton/index.d.ts +2 -0
  15. package/lib/components/DeleteManyButton/index.d.ts +4 -0
  16. package/lib/components/DrawerShow/DrawerShow.d.ts +8 -0
  17. package/lib/components/DrawerShow/index.d.ts +1 -0
  18. package/lib/components/DurationTime/index.d.ts +5 -0
  19. package/lib/components/EditButton/index.d.ts +2 -0
  20. package/lib/components/EditField/index.d.ts +15 -0
  21. package/lib/components/ErrorContent/index.d.ts +17 -0
  22. package/lib/components/EventsTable/EventsTable.d.ts +6 -0
  23. package/lib/components/EventsTable/index.d.ts +1 -0
  24. package/lib/components/Form/FormModal.d.ts +10 -0
  25. package/lib/components/Form/RefineFormContent.d.ts +11 -0
  26. package/lib/components/Form/RefineFormPage.d.ts +6 -0
  27. package/lib/components/Form/YamlForm.d.ts +28 -0
  28. package/lib/components/Form/index.d.ts +7 -0
  29. package/lib/components/Form/type.d.ts +17 -0
  30. package/lib/components/Form/useReactHookForm.d.ts +29 -0
  31. package/lib/components/Form/useRefineForm.d.ts +13 -0
  32. package/lib/components/Form/useYamlForm.d.ts +51 -0
  33. package/lib/components/FormErrorAlert/index.d.ts +9 -0
  34. package/lib/components/FormLayout/index.d.ts +7 -0
  35. package/lib/components/FormWidgets/KeyValueListWidget.d.ts +5 -0
  36. package/lib/components/FormWidgets/MetadataForm.d.ts +1 -0
  37. package/lib/components/FormWidgets/NameInputWidget.d.ts +50 -0
  38. package/lib/components/FormWidgets/NamespaceSelectWidget.d.ts +8 -0
  39. package/lib/components/FormWidgets/index.d.ts +4 -0
  40. package/lib/components/FormWidgets/widget.d.ts +5 -0
  41. package/lib/components/ImageNames/index.d.ts +5 -0
  42. package/lib/components/IngressRulesComponent/index.d.ts +5 -0
  43. package/lib/components/IngressRulesTable/IngressRulesTable.d.ts +7 -0
  44. package/lib/components/IngressRulesTable/index.d.ts +1 -0
  45. package/lib/components/K8sDropdown/index.d.ts +9 -0
  46. package/lib/components/KeyValue/KeyValue.d.ts +7 -0
  47. package/lib/components/KeyValue/KeyValueAnnotation.d.ts +5 -0
  48. package/lib/components/KeyValue/KeyValueSecret.d.ts +4 -0
  49. package/lib/components/KeyValue/index.d.ts +3 -0
  50. package/lib/components/Layout/index.d.ts +3 -0
  51. package/lib/components/LinkFallback/index.d.ts +3 -0
  52. package/lib/components/ListPage/index.d.ts +9 -0
  53. package/lib/components/Menu/index.d.ts +1 -0
  54. package/lib/components/NamespacesFilter/index.d.ts +11 -0
  55. package/lib/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +8 -0
  56. package/lib/components/NetworkPolicyRulesViewer/index.d.ts +1 -0
  57. package/lib/components/PageShow/PageShow.d.ts +12 -0
  58. package/lib/components/PageShow/index.d.ts +1 -0
  59. package/lib/components/PodContainersTable/PodContainersTable.d.ts +8 -0
  60. package/lib/components/PodContainersTable/index.d.ts +1 -0
  61. package/lib/components/PodDropdown/index.d.ts +9 -0
  62. package/lib/components/PodLog/index.d.ts +6 -0
  63. package/lib/components/PodSelectorTable/index.d.ts +6 -0
  64. package/lib/components/PodShellModal/PodShell.d.ts +18 -0
  65. package/lib/components/PodShellModal/index.d.ts +9 -0
  66. package/lib/components/PortsTable/index.d.ts +7 -0
  67. package/lib/components/ReferenceLink/index.d.ts +8 -0
  68. package/lib/components/ReplicasDropdown/index.d.ts +9 -0
  69. package/lib/components/ResourceCRUD/ResourceCRUD.d.ts +7 -0
  70. package/lib/components/ResourceCRUD/create/index.d.ts +7 -0
  71. package/lib/components/ResourceCRUD/index.d.ts +4 -0
  72. package/lib/components/ResourceCRUD/list/index.d.ts +8 -0
  73. package/lib/components/ResourceCRUD/show/index.d.ts +8 -0
  74. package/lib/components/ResourceFiledDisplays.d.ts +6 -0
  75. package/lib/components/ResourceLink/index.d.ts +8 -0
  76. package/lib/components/ResourceSelect/index.d.ts +11 -0
  77. package/lib/components/ResourceUsageBar/index.d.ts +8 -0
  78. package/lib/components/Separator/index.d.ts +2 -0
  79. package/lib/components/ServiceComponents/index.d.ts +10 -0
  80. package/lib/components/Shell/index.d.ts +54 -0
  81. package/lib/components/ShowContent/ShowContent.d.ts +18 -0
  82. package/lib/components/ShowContent/fields.d.ts +68 -0
  83. package/lib/components/ShowContent/groups.d.ts +23 -0
  84. package/lib/components/ShowContent/index.d.ts +4 -0
  85. package/lib/components/ShowContent/tabs.d.ts +5 -0
  86. package/lib/components/StateTag/StateTag.d.ts +10 -0
  87. package/lib/components/StateTag/index.d.ts +1 -0
  88. package/lib/components/Table/TableToolBar.d.ts +8 -0
  89. package/lib/components/Table/TableWidgets.d.ts +6 -0
  90. package/lib/components/Table/index.d.ts +43 -0
  91. package/lib/components/Tabs/index.d.ts +10 -0
  92. package/lib/components/Tags/index.d.ts +6 -0
  93. package/lib/components/TextTags/index.d.ts +6 -0
  94. package/lib/components/Time/index.d.ts +8 -0
  95. package/lib/components/ValueDisplay/index.d.ts +9 -0
  96. package/lib/components/WorkloadDropdown/index.d.ts +9 -0
  97. package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +9 -0
  98. package/lib/components/WorkloadPodsTable/index.d.ts +1 -0
  99. package/lib/components/WorkloadReplicas/index.d.ts +17 -0
  100. package/lib/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
  101. package/lib/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
  102. package/lib/components/YamlEditor/YamlEditorComponent.d.ts +27 -0
  103. package/lib/components/YamlEditor/index.d.ts +1 -0
  104. package/lib/components/YamlEditor/style.d.ts +11 -0
  105. package/lib/components/YamlEditor/yaml.worker.d.ts +1 -0
  106. package/lib/components/index.d.ts +47 -0
  107. package/lib/constants/auth.d.ts +5 -0
  108. package/lib/constants/index.d.ts +3 -0
  109. package/lib/constants/k8s.d.ts +487 -0
  110. package/lib/constants/state.d.ts +15 -0
  111. package/lib/contexts/component.d.ts +7 -0
  112. package/lib/contexts/configs.d.ts +3 -0
  113. package/lib/contexts/global-store.d.ts +5 -0
  114. package/lib/contexts/index.d.ts +3 -0
  115. package/lib/hooks/index.d.ts +8 -0
  116. package/lib/hooks/useDeleteModal/index.d.ts +1 -0
  117. package/lib/hooks/useDeleteModal/useDeleteManyModal.d.ts +7 -0
  118. package/lib/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
  119. package/lib/hooks/useDownloadYAML.d.ts +7 -0
  120. package/lib/hooks/useEagleTable/columns.d.ts +41 -0
  121. package/lib/hooks/useEagleTable/index.d.ts +2 -0
  122. package/lib/hooks/useEagleTable/useEagleTable.d.ts +55 -0
  123. package/lib/hooks/useEdit.d.ts +4 -0
  124. package/lib/hooks/useGlobalStore.d.ts +3 -0
  125. package/lib/hooks/useK8sYamlEditor.d.ts +5 -0
  126. package/lib/hooks/useNamespaceRefineFilter.d.ts +5 -0
  127. package/lib/hooks/useOpenForm.d.ts +7 -0
  128. package/lib/hooks/useSchema.d.ts +14 -0
  129. package/lib/hooks/useSubmitForm.d.ts +14 -0
  130. package/lib/hooks/useTableData.d.ts +19 -0
  131. package/lib/i18n.d.ts +353 -0
  132. package/lib/index.d.ts +11 -0
  133. package/lib/locales/en-US/index.d.ts +175 -0
  134. package/lib/locales/index.d.ts +2 -0
  135. package/lib/locales/zh-CN/index.d.ts +175 -0
  136. package/lib/main.d.ts +3 -0
  137. package/lib/models/cronjob-model.d.ts +15 -0
  138. package/lib/models/daemonset-model.d.ts +15 -0
  139. package/lib/models/deployment-model.d.ts +13 -0
  140. package/lib/models/event-model.d.ts +7 -0
  141. package/lib/models/index.d.ts +19 -0
  142. package/lib/models/ingress-model.d.ts +20 -0
  143. package/lib/models/job-model.d.ts +20 -0
  144. package/lib/models/network-policy-model.d.ts +9 -0
  145. package/lib/models/node-model.d.ts +17 -0
  146. package/lib/models/persistent-volume-claim.d.ts +9 -0
  147. package/lib/models/persistent-volume.d.ts +9 -0
  148. package/lib/models/pod-metrics-model.d.ts +8 -0
  149. package/lib/models/pod-model.d.ts +20 -0
  150. package/lib/models/resource-model.d.ts +21 -0
  151. package/lib/models/service-model.d.ts +24 -0
  152. package/lib/models/statefulset-model.d.ts +13 -0
  153. package/lib/models/storage-class.d.ts +12 -0
  154. package/lib/models/types/index.d.ts +1 -0
  155. package/lib/models/types/metric.d.ts +25 -0
  156. package/lib/models/workload-base-model.d.ts +12 -0
  157. package/lib/models/workload-model.d.ts +18 -0
  158. package/lib/pages/configmaps/index.d.ts +4 -0
  159. package/lib/pages/cronjobs/create/index.d.ts +3 -0
  160. package/lib/pages/cronjobs/index.d.ts +3 -0
  161. package/lib/pages/cronjobs/list/index.d.ts +3 -0
  162. package/lib/pages/cronjobs/show/index.d.ts +3 -0
  163. package/lib/pages/daemonsets/create/index.d.ts +3 -0
  164. package/lib/pages/daemonsets/index.d.ts +3 -0
  165. package/lib/pages/daemonsets/list/index.d.ts +3 -0
  166. package/lib/pages/daemonsets/show/index.d.ts +3 -0
  167. package/lib/pages/deployments/index.d.ts +2 -0
  168. package/lib/pages/deployments/list/index.d.ts +3 -0
  169. package/lib/pages/deployments/show/index.d.ts +3 -0
  170. package/lib/pages/ingresses/index.d.ts +4 -0
  171. package/lib/pages/jobs/index.d.ts +4 -0
  172. package/lib/pages/networkPolicies/index.d.ts +4 -0
  173. package/lib/pages/nodes/index.d.ts +2 -0
  174. package/lib/pages/nodes/list/index.d.ts +3 -0
  175. package/lib/pages/nodes/show/index.d.ts +3 -0
  176. package/lib/pages/persistentvolumeclaims/index.d.ts +4 -0
  177. package/lib/pages/persistentvolumes/index.d.ts +4 -0
  178. package/lib/pages/pods/create/index.d.ts +3 -0
  179. package/lib/pages/pods/index.d.ts +3 -0
  180. package/lib/pages/pods/list/index.d.ts +3 -0
  181. package/lib/pages/pods/show/index.d.ts +3 -0
  182. package/lib/pages/secrets/index.d.ts +4 -0
  183. package/lib/pages/services/index.d.ts +4 -0
  184. package/lib/pages/statefulsets/index.d.ts +4 -0
  185. package/lib/pages/storageclasses/form/index.d.ts +9 -0
  186. package/lib/pages/storageclasses/index.d.ts +44 -0
  187. package/lib/plugins/index.d.ts +4 -0
  188. package/lib/plugins/model-plugin.d.ts +13 -0
  189. package/lib/plugins/relation-plugin.d.ts +26 -0
  190. package/lib/plugins/type.d.ts +8 -0
  191. package/lib/providers/index.d.ts +1 -0
  192. package/lib/providers/router-provider/index.d.ts +21 -0
  193. package/lib/src/components/PodDropdown/index.d.ts +9 -0
  194. package/lib/src/components/PodShellModal/PodShell.d.ts +18 -0
  195. package/lib/src/components/PodShellModal/index.d.ts +10 -0
  196. package/lib/src/components/Shell/ShellToolbar.d.ts +16 -0
  197. package/lib/src/components/Shell/index.d.ts +74 -0
  198. package/lib/src/components/index.d.ts +3 -0
  199. package/lib/src/i18n.d.ts +8 -0
  200. package/lib/src/locales/en-US/index.d.ts +1 -0
  201. package/lib/src/locales/zh-CN/index.d.ts +7 -0
  202. package/lib/src/styles/modal.d.ts +1 -0
  203. package/lib/src/utils/index.d.ts +1 -0
  204. package/lib/src/utils/shell.d.ts +16 -0
  205. package/lib/types/index.d.ts +1 -0
  206. package/lib/types/resource.d.ts +62 -0
  207. package/lib/utils/addId.d.ts +3 -0
  208. package/lib/utils/download.d.ts +1 -0
  209. package/lib/utils/error.d.ts +20 -0
  210. package/lib/utils/form.d.ts +3 -0
  211. package/lib/utils/k8s.d.ts +3 -0
  212. package/lib/utils/labels.d.ts +9 -0
  213. package/lib/utils/match-selector.d.ts +3 -0
  214. package/lib/utils/openapi.d.ts +45 -0
  215. package/lib/utils/schema.d.ts +17 -0
  216. package/lib/utils/selector.d.ts +3 -0
  217. package/lib/utils/shell.d.ts +15 -0
  218. package/lib/utils/string.d.ts +1 -0
  219. package/lib/utils/time.d.ts +13 -0
  220. package/lib/utils/unit.d.ts +12 -0
  221. package/lib/utils/yaml.d.ts +2 -0
  222. package/package.json +14 -5
@@ -0,0 +1,175 @@
1
+ declare const _default: {
2
+ dovetail: {
3
+ copy: string;
4
+ reset_arguments: string;
5
+ view_changes: string;
6
+ back_to_edit: string;
7
+ configure_file: string;
8
+ yaml_format_wrong: string;
9
+ yaml_value_wrong: string;
10
+ edit_yaml: string;
11
+ copied: string;
12
+ already_reset: string;
13
+ cancel: string;
14
+ delete: string;
15
+ create: string;
16
+ delete_resource: string;
17
+ confirm_delete_text: string;
18
+ delete_tip: string;
19
+ edit: string;
20
+ namespace: string;
21
+ name: string;
22
+ state: string;
23
+ image: string;
24
+ created_time: string;
25
+ label: string;
26
+ annotation: string;
27
+ type: string;
28
+ event: string;
29
+ reason: string;
30
+ object: string;
31
+ note: string;
32
+ condition: string;
33
+ download_yaml: string;
34
+ detail: string;
35
+ restarts: string;
36
+ updated_time: string;
37
+ message: string;
38
+ save: string;
39
+ workload: string;
40
+ all_namespaces: string;
41
+ empty: string;
42
+ schedule: string;
43
+ lastScheduleTime: string;
44
+ duration: string;
45
+ started: string;
46
+ init_container: string;
47
+ regular_container: string;
48
+ container: string;
49
+ redeploy: string;
50
+ data: string;
51
+ suspend: string;
52
+ resume: string;
53
+ clusterIp: string;
54
+ sessionAffinity: string;
55
+ log: string;
56
+ select_container: string;
57
+ fetch_schema_fail: string;
58
+ obtain_data_error: string;
59
+ retry: string;
60
+ ready: string;
61
+ updating: string;
62
+ completed: string;
63
+ failed: string;
64
+ suspended: string;
65
+ running: string;
66
+ terminating: string;
67
+ succeeded: string;
68
+ terminated: string;
69
+ unknown: string;
70
+ pending: string;
71
+ waiting: string;
72
+ create_resource: string;
73
+ edit_resource: string;
74
+ sec: string;
75
+ min: string;
76
+ hr: string;
77
+ day: string;
78
+ expand: string;
79
+ fold: string;
80
+ rule: string;
81
+ default_backend: string;
82
+ ingress_class: string;
83
+ port: string;
84
+ pod_ready_num: string;
85
+ pod_complete_num: string;
86
+ pod_replicas_num: string;
87
+ edit_replicas: string;
88
+ cert: string;
89
+ dns_record: string;
90
+ port_mapping: string;
91
+ out_cluster_access: string;
92
+ in_cluster_access: string;
93
+ fail_get_detail: string;
94
+ basic_info: string;
95
+ pod: string;
96
+ pod_num: string;
97
+ pod_selector: string;
98
+ ingress_rule: string;
99
+ egress_rule: string;
100
+ ip_address: string;
101
+ last_seen: string;
102
+ service_port: string;
103
+ pod_port: string;
104
+ node_port: string;
105
+ protocol: string;
106
+ key: string;
107
+ value: string;
108
+ show_data_value: string;
109
+ hide_data_value: string;
110
+ path_type: string;
111
+ path: string;
112
+ backend: string;
113
+ belong_to_node: string;
114
+ please_input: string;
115
+ create_failed: string;
116
+ create_failed_tip: string;
117
+ save_failed: string;
118
+ save_failed_tip: string;
119
+ completion_num_tooltip: string;
120
+ ready_num_tooltip: string;
121
+ true: string;
122
+ false: string;
123
+ warning: string;
124
+ normal: string;
125
+ realtime_log: string;
126
+ previous_log: string;
127
+ auto_wrap: string;
128
+ name_can_not_be_empty: string;
129
+ password: string;
130
+ username: string;
131
+ host: string;
132
+ container_num: string;
133
+ edit_resource_success: string;
134
+ redeploy_success_toast: string;
135
+ redeploy_failed_toast: string;
136
+ pause_success_toast: string;
137
+ pause_failed_toast: string;
138
+ resume_success_toast: string;
139
+ resume_failed_toast: string;
140
+ delete_success_toast: string;
141
+ delete_failed_toast: string;
142
+ create_success_toast: string;
143
+ save_yaml_success_toast: string;
144
+ save_replicas_success_toast: string;
145
+ save_replicas_failed_toast: string;
146
+ no_resource: string;
147
+ port_mapping_title_tooltip: string;
148
+ in_cluster_desc: string;
149
+ in_cluster_ip_desc: string;
150
+ in_cluster_external_name_desc: string;
151
+ out_cluster_ip_desc: string;
152
+ out_cluster_node_port_desc: string;
153
+ out_cluster_lb_desc: string;
154
+ out_external_name_desc: string;
155
+ only_support_one_yaml: string;
156
+ not_support: string;
157
+ stopped: string;
158
+ any_node_ip: string;
159
+ storage_class: string;
160
+ persistent_volume: string;
161
+ provisioner: string;
162
+ file_system: string;
163
+ capacity: string;
164
+ phase: string;
165
+ volume_mode: string;
166
+ access_mode: string;
167
+ block: string;
168
+ pv_phase_available: string;
169
+ pv_phase_bound: string;
170
+ pv_phase_released: string;
171
+ pv_phase_failed: string;
172
+ pv_phase_pending: string;
173
+ };
174
+ };
175
+ export default _default;
package/lib/main.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import './i18n';
2
+ import 'antd/dist/antd.css';
3
+ import '@cloudtower/eagle/dist/style.css';
@@ -0,0 +1,15 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import { CronJob } from 'kubernetes-types/batch/v1';
3
+ import { WorkloadState } from '../constants';
4
+ import { WorkloadBaseModel } from './workload-base-model';
5
+ type RequiredCronJob = Required<CronJob> & Unstructured;
6
+ export declare class CronJobModel extends WorkloadBaseModel {
7
+ _rawYaml: RequiredCronJob;
8
+ spec?: RequiredCronJob['spec'];
9
+ status?: RequiredCronJob['status'];
10
+ constructor(_rawYaml: RequiredCronJob, _globalStore: GlobalStore);
11
+ get stateDisplay(): WorkloadState.SUSPENDED | WorkloadState.RUNNING;
12
+ suspend(): RequiredCronJob;
13
+ resume(): RequiredCronJob;
14
+ }
15
+ export {};
@@ -0,0 +1,15 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import { DaemonSet } from 'kubernetes-types/apps/v1';
3
+ import { WorkloadState } from '../constants';
4
+ import { WorkloadModel } from './workload-model';
5
+ type RequiredDaemonSet = Required<DaemonSet> & Unstructured;
6
+ export declare class DaemonSetModel extends WorkloadModel {
7
+ _rawYaml: RequiredDaemonSet;
8
+ spec?: RequiredDaemonSet['spec'];
9
+ status?: RequiredDaemonSet['status'];
10
+ constructor(_rawYaml: RequiredDaemonSet, _globalStore: GlobalStore);
11
+ get stateDisplay(): WorkloadState.UPDATING | WorkloadState.READY;
12
+ get replicas(): number;
13
+ get readyReplicas(): number;
14
+ }
15
+ export {};
@@ -0,0 +1,13 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import { Deployment } from 'kubernetes-types/apps/v1';
3
+ import { WorkloadState } from '../constants';
4
+ import { WorkloadModel } from './workload-model';
5
+ type RequiredDeployment = Required<Deployment> & Unstructured;
6
+ export declare class DeploymentModel extends WorkloadModel {
7
+ _rawYaml: RequiredDeployment;
8
+ spec?: RequiredDeployment['spec'];
9
+ status?: RequiredDeployment['status'];
10
+ constructor(_rawYaml: RequiredDeployment, _globalStore: GlobalStore);
11
+ get stateDisplay(): WorkloadState.UPDATING | WorkloadState.READY | WorkloadState.STOPPED;
12
+ }
13
+ export {};
@@ -0,0 +1,7 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import { Event } from 'kubernetes-types/core/v1';
3
+ import { ResourceModel } from './resource-model';
4
+ export declare class EventModel extends ResourceModel {
5
+ _rawYaml: Unstructured & Event;
6
+ constructor(_rawYaml: Unstructured & Event, _globalStore: GlobalStore);
7
+ }
@@ -0,0 +1,19 @@
1
+ export * from './ingress-model';
2
+ export * from './network-policy-model';
3
+ export * from './job-model';
4
+ export * from './workload-model';
5
+ export * from './workload-base-model';
6
+ export * from './pod-model';
7
+ export * from './pod-metrics-model';
8
+ export * from './resource-model';
9
+ export * from './workload-model';
10
+ export * from './cronjob-model';
11
+ export * from './event-model';
12
+ export * from './deployment-model';
13
+ export * from './daemonset-model';
14
+ export * from './statefulset-model';
15
+ export * from './service-model';
16
+ export * from './node-model';
17
+ export * from './storage-class';
18
+ export * from './persistent-volume';
19
+ export * from './persistent-volume-claim';
@@ -0,0 +1,20 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import type { Ingress } from 'kubernetes-types/networking/v1';
3
+ import { ResourceModel } from './resource-model';
4
+ type IngressTypes = Required<Ingress> & Unstructured;
5
+ export type RuleItem = {
6
+ serviceName?: string;
7
+ resourceName?: string;
8
+ fullPath: string;
9
+ pathType: string;
10
+ host?: string;
11
+ servicePort?: number | string;
12
+ };
13
+ export declare class IngressModel extends ResourceModel<IngressTypes> {
14
+ _rawYaml: IngressTypes;
15
+ flattenedRules: RuleItem[];
16
+ constructor(_rawYaml: IngressTypes, _globalStore: GlobalStore);
17
+ init(): Promise<void>;
18
+ private getFullPath;
19
+ }
20
+ export {};
@@ -0,0 +1,20 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import { Job } from 'kubernetes-types/batch/v1';
3
+ import { WorkloadState } from '../constants';
4
+ import { WorkloadBaseModel } from './workload-base-model';
5
+ type RequiredJob = Required<Job> & Unstructured;
6
+ export declare class JobModel extends WorkloadBaseModel {
7
+ _rawYaml: RequiredJob;
8
+ restarts: number;
9
+ spec?: RequiredJob['spec'];
10
+ status?: RequiredJob['status'];
11
+ constructor(_rawYaml: RequiredJob, _globalStore: GlobalStore);
12
+ init(): Promise<void>;
13
+ private getRestarts;
14
+ get duration(): number;
15
+ get completionsDisplay(): string;
16
+ get succeeded(): number;
17
+ get completions(): number | undefined;
18
+ get stateDisplay(): WorkloadState.COMPLETED | WorkloadState.FAILED | WorkloadState.SUSPENDED | WorkloadState.RUNNING;
19
+ }
20
+ export {};
@@ -0,0 +1,9 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import type { NetworkPolicy } from 'kubernetes-types/networking/v1';
3
+ import { ResourceModel } from './resource-model';
4
+ type NetworkPolicyTypes = Required<NetworkPolicy> & Unstructured;
5
+ export declare class NetworkPolicyModel extends ResourceModel<NetworkPolicyTypes> {
6
+ _rawYaml: NetworkPolicyTypes;
7
+ constructor(_rawYaml: NetworkPolicyTypes, _globalStore: GlobalStore);
8
+ }
9
+ export {};
@@ -0,0 +1,17 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import type { Node } from 'kubernetes-types/core/v1';
3
+ import { WorkloadBaseModel } from './workload-base-model';
4
+ type RequiredNode = Required<Node> & Unstructured;
5
+ export declare enum NodeRole {
6
+ ControlPlane = "Control Plane",
7
+ Worker = "Worker"
8
+ }
9
+ export declare class NodeModel extends WorkloadBaseModel {
10
+ _rawYaml: RequiredNode;
11
+ constructor(_rawYaml: RequiredNode, _globalStore: GlobalStore);
12
+ get role(): NodeRole;
13
+ get ip(): string | undefined;
14
+ get nodeGroupName(): string | undefined;
15
+ get isControlPlane(): boolean;
16
+ }
17
+ export {};
@@ -0,0 +1,9 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import type { PersistentVolumeClaim } from 'kubernetes-types/core/v1';
3
+ import { ResourceModel } from './resource-model';
4
+ type RequiredPersistentClaimVolume = Required<PersistentVolumeClaim> & Unstructured;
5
+ export declare class PersistentVolumeClaimModel extends ResourceModel {
6
+ _rawYaml: RequiredPersistentClaimVolume;
7
+ constructor(_rawYaml: RequiredPersistentClaimVolume, _globalStore: GlobalStore);
8
+ }
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import type { PersistentVolume } from 'kubernetes-types/core/v1';
3
+ import { ResourceModel } from './resource-model';
4
+ type RequiredPersistentVolume = Required<PersistentVolume> & Unstructured;
5
+ export declare class PersistentVolumeModel extends ResourceModel {
6
+ _rawYaml: RequiredPersistentVolume;
7
+ constructor(_rawYaml: RequiredPersistentVolume, _globalStore: GlobalStore);
8
+ }
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import { GlobalStore } from 'k8s-api-provider';
2
+ import { ResourceModel } from './resource-model';
3
+ import { PodMetrics, ResourceQuantity } from './types/metric';
4
+ export declare class PodMetricsModel extends ResourceModel<PodMetrics> {
5
+ _rawYaml: PodMetrics;
6
+ usage: ResourceQuantity;
7
+ constructor(_rawYaml: PodMetrics, _globalStore: GlobalStore);
8
+ }
@@ -0,0 +1,20 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import type { Pod } from 'kubernetes-types/core/v1';
3
+ import { ResourceQuantity } from './types/metric';
4
+ import { WorkloadBaseModel } from './workload-base-model';
5
+ type RequiredPod = Required<Pod> & Unstructured;
6
+ export declare class PodModel extends WorkloadBaseModel {
7
+ _rawYaml: RequiredPod;
8
+ request: ResourceQuantity;
9
+ limit: ResourceQuantity;
10
+ spec?: RequiredPod['spec'];
11
+ status?: RequiredPod['status'];
12
+ constructor(_rawYaml: RequiredPod, _globalStore: GlobalStore);
13
+ get imageNames(): string[];
14
+ get restartCount(): number;
15
+ get readyDisplay(): string;
16
+ get readyContainerCount(): number | undefined;
17
+ get containerCount(): number;
18
+ get stateDisplay(): string;
19
+ }
20
+ export {};
@@ -0,0 +1,21 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ export type IResourceModel = Unstructured & ResourceModel;
3
+ export declare class ResourceModel<T extends Unstructured = Unstructured> {
4
+ _rawYaml: T;
5
+ id: string;
6
+ apiVersion: T['apiVersion'];
7
+ kind: T['kind'];
8
+ metadata: T['metadata'];
9
+ _globalStore: GlobalStore;
10
+ constructor(_rawYaml: T, _globalStore: GlobalStore);
11
+ init(): Promise<void>;
12
+ get name(): string | undefined;
13
+ get namespace(): string | undefined;
14
+ get labels(): {
15
+ [name: string]: string;
16
+ } | undefined;
17
+ get annotations(): {
18
+ [name: string]: string;
19
+ } | undefined;
20
+ restore(): T;
21
+ }
@@ -0,0 +1,24 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import { Service } from 'kubernetes-types/core/v1';
3
+ import { ResourceModel } from './resource-model';
4
+ export type ServiceType = Required<Unstructured & Service>;
5
+ export declare enum ServiceTypeEnum {
6
+ ClusterIP = "ClusterIP",
7
+ NodePort = "NodePort",
8
+ LoadBalancer = "LoadBalancer",
9
+ ExternalName = "ExternalName",
10
+ Headless = "Headless"
11
+ }
12
+ export declare class ServiceModel extends ResourceModel<ServiceType> {
13
+ _rawYaml: ServiceType;
14
+ constructor(_rawYaml: ServiceType, _globalStore: GlobalStore);
15
+ get displayType(): string | undefined;
16
+ get dnsRecord(): string;
17
+ get displayPortMapping(): {
18
+ servicePort: number;
19
+ nodePort: number | undefined;
20
+ link: string;
21
+ targetPort: string | number | undefined;
22
+ protocol: string | undefined;
23
+ }[] | undefined;
24
+ }
@@ -0,0 +1,13 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import { StatefulSet } from 'kubernetes-types/apps/v1';
3
+ import { WorkloadState } from '../constants';
4
+ import { WorkloadModel } from './workload-model';
5
+ type RequiredStatefulSet = Required<StatefulSet> & Unstructured;
6
+ export declare class StatefulSetModel extends WorkloadModel {
7
+ _rawYaml: RequiredStatefulSet;
8
+ spec?: RequiredStatefulSet['spec'];
9
+ status?: RequiredStatefulSet['status'];
10
+ constructor(_rawYaml: RequiredStatefulSet, _globalStore: GlobalStore);
11
+ get stateDisplay(): WorkloadState.UPDATING | WorkloadState.READY | WorkloadState.STOPPED;
12
+ }
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
+ import type { StorageClass } from 'kubernetes-types/storage/v1';
3
+ import { PersistentVolumeModel } from './persistent-volume';
4
+ import { ResourceModel } from './resource-model';
5
+ type RequiredStorageClass = Required<StorageClass> & Unstructured;
6
+ export declare class StorageClassModel extends ResourceModel {
7
+ _rawYaml: RequiredStorageClass;
8
+ pvs: PersistentVolumeModel[];
9
+ constructor(_rawYaml: RequiredStorageClass, _globalStore: GlobalStore);
10
+ init(): Promise<void>;
11
+ }
12
+ export {};
@@ -0,0 +1 @@
1
+ export * from './metric';
@@ -0,0 +1,25 @@
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 {};
@@ -0,0 +1,12 @@
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 {};
@@ -0,0 +1,18 @@
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 {};
@@ -0,0 +1,4 @@
1
+ import { i18n } from 'i18next';
2
+ import { ResourceModel } from '../../models';
3
+ import { ResourceConfig } from '../../types';
4
+ export declare const ConfigMapConfig: (i18n: i18n) => ResourceConfig<ResourceModel>;
@@ -0,0 +1,3 @@
1
+ import { FormProps } from 'antd/lib/form';
2
+ import React from 'react';
3
+ export declare const CronJobForm: 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 CronJobList: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,3 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const CronJobShow: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,3 @@
1
+ import { FormProps } from 'antd/lib/form';
2
+ import React from 'react';
3
+ export declare const DaemonSetForm: 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 DaemonSetList: React.FC<IResourceComponentsProps>;
@@ -0,0 +1,3 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import React from 'react';
3
+ export declare const DaemonSetShow: React.FC<IResourceComponentsProps>;
@@ -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,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,4 @@
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>;
@@ -0,0 +1,4 @@
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>;
@@ -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>;