@dovetail-v2/refine 0.0.30 → 0.0.32-beta.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 (40) hide show
  1. package/dist/{MonacoYamlDiffEditor-7505595f.js → MonacoYamlDiffEditor-0d108b88.js} +1 -3
  2. package/dist/MonacoYamlEditor-e382457d.js +167 -0
  3. package/dist/{index-d02782c8.js → index-3a367ae3.js} +7089 -4127
  4. package/dist/refine.js +133 -105
  5. package/dist/refine.umd.cjs +8081 -4966
  6. package/dist/style.css +40 -24
  7. package/lib/src/components/CronJobDropdown/index.d.ts +2 -0
  8. package/lib/src/components/CronjobJobsTable/index.d.ts +1 -0
  9. package/lib/src/components/K8sDropdown/index.d.ts +2 -0
  10. package/lib/src/components/RefineForm/RefineFormContent.d.ts +10 -0
  11. package/lib/src/components/RefineForm/RefineFormModal.d.ts +8 -0
  12. package/lib/src/components/RefineForm/RefineFormPage.d.ts +7 -0
  13. package/lib/src/components/RefineForm/index.d.ts +3 -0
  14. package/lib/src/components/RefineForm/type.d.ts +20 -0
  15. package/lib/src/components/RefineForm/useRefineForm.d.ts +10 -0
  16. package/lib/src/components/ServiceComponents/index.d.ts +8 -0
  17. package/lib/src/components/ShowContent/fields.d.ts +34 -24
  18. package/lib/src/components/ShowContent/groups.d.ts +11 -0
  19. package/lib/src/components/ShowContent/index.d.ts +2 -0
  20. package/lib/src/components/ShowContent/tabs.d.ts +12 -0
  21. package/lib/src/components/StateTag/StateTag.d.ts +1 -0
  22. package/lib/src/components/Tabs/index.d.ts +10 -0
  23. package/lib/src/components/TextTags/index.d.ts +6 -0
  24. package/lib/src/components/Time/index.d.ts +2 -3
  25. package/lib/src/components/WorkloadDropdown/index.d.ts +2 -0
  26. package/lib/src/components/WorkloadReplicas/index.d.ts +1 -2
  27. package/lib/src/components/YamlForm/index.d.ts +2 -0
  28. package/lib/src/components/index.d.ts +4 -0
  29. package/lib/src/constants/k8s.d.ts +23 -0
  30. package/lib/src/contexts/component.d.ts +2 -0
  31. package/lib/src/hooks/useEagleTable/columns.d.ts +9 -3
  32. package/lib/src/i18n.d.ts +132 -10
  33. package/lib/src/locales/en-US/index.d.ts +95 -1
  34. package/lib/src/locales/zh-CN/index.d.ts +36 -9
  35. package/lib/src/models/index.d.ts +1 -0
  36. package/lib/src/models/service-model.d.ts +10 -1
  37. package/lib/src/pages/services/index.d.ts +2 -2
  38. package/lib/src/pages/statefulsets/index.d.ts +4 -3
  39. package/lib/src/types/resource.d.ts +5 -1
  40. package/package.json +10 -8
package/lib/src/i18n.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import 'dayjs/locale/zh';
1
2
  import i18n from 'i18next';
2
3
  export declare const resources: {
3
4
  'en-US': {
@@ -17,7 +18,101 @@ export declare const resources: {
17
18
  retry: string;
18
19
  create_resource: string;
19
20
  edit_resource: string;
20
- status: string;
21
+ state: string;
22
+ name: string;
23
+ pod: string;
24
+ cancel: string;
25
+ delete: string;
26
+ create: string;
27
+ confirm_delete_text: string;
28
+ edit: string;
29
+ namespace: string;
30
+ image: string;
31
+ created_time: string;
32
+ label: string;
33
+ annotation: string;
34
+ type: string;
35
+ event: string;
36
+ reason: string;
37
+ object: string;
38
+ note: string;
39
+ condition: string;
40
+ download_yaml: string;
41
+ detail: string;
42
+ restarts: string;
43
+ updated_time: string;
44
+ message: string;
45
+ save: string;
46
+ more: string;
47
+ workload: string;
48
+ all_namespaces: string;
49
+ empty: string;
50
+ schedule: string;
51
+ lastScheduleTime: string;
52
+ duration: string;
53
+ started: string;
54
+ init_container: string;
55
+ regular_container: string;
56
+ container: string;
57
+ redeploy: string;
58
+ data: string;
59
+ suspend: string;
60
+ resume: string;
61
+ clusterIp: string;
62
+ sessionAffinity: string;
63
+ log: string;
64
+ select_container: string;
65
+ wrap: string;
66
+ resume_log: string;
67
+ log_new_lines: string;
68
+ ready: string;
69
+ updating: string;
70
+ completed: string;
71
+ failed: string;
72
+ suspended: string;
73
+ running: string;
74
+ terminating: string;
75
+ terminated: string;
76
+ succeeded: string;
77
+ unknown: string;
78
+ pending: string;
79
+ waiting: string;
80
+ sec: string;
81
+ min: string;
82
+ hr: string;
83
+ day: string;
84
+ expand: string;
85
+ fold: string;
86
+ rule: string;
87
+ default_backend: string;
88
+ ingress_class: string;
89
+ port: string;
90
+ pod_ready_num: string;
91
+ pod_replicas_num: string;
92
+ edit_replicas: string;
93
+ cert: string;
94
+ dns_record: string;
95
+ port_mapping: string;
96
+ out_cluster_access: string;
97
+ in_cluster_access: string;
98
+ any_node_ip: string;
99
+ fail_get_detail: string;
100
+ basic_info: string;
101
+ pod_selector: string;
102
+ ingress_rule: string;
103
+ egress_rule: string;
104
+ ip_address: string;
105
+ last_seen: string;
106
+ service_port: string;
107
+ pod_port: string;
108
+ node_port: string;
109
+ protocol: string;
110
+ key: string;
111
+ value: string;
112
+ path_type: string;
113
+ path: string;
114
+ backend: string;
115
+ belong_to_node: string;
21
116
  };
22
117
  };
23
118
  'zh-CN': {
@@ -40,10 +135,7 @@ export declare const resources: {
40
135
  namespace: string;
41
136
  name: string;
42
137
  state: string;
43
- status: string;
44
- phase: string;
45
138
  image: string;
46
- replicas: string;
47
139
  created_time: string;
48
140
  label: string;
49
141
  annotation: string;
@@ -55,7 +147,6 @@ export declare const resources: {
55
147
  condition: string;
56
148
  download_yaml: string;
57
149
  detail: string;
58
- node_name: string;
59
150
  restarts: string;
60
151
  updated_time: string;
61
152
  message: string;
@@ -67,17 +158,14 @@ export declare const resources: {
67
158
  schedule: string;
68
159
  lastScheduleTime: string;
69
160
  duration: string;
70
- completions: string;
71
161
  started: string;
72
162
  init_container: string;
163
+ regular_container: string;
73
164
  container: string;
74
165
  redeploy: string;
75
166
  data: string;
76
167
  suspend: string;
77
168
  resume: string;
78
- cluster: string;
79
- storage: string;
80
- network: string;
81
169
  clusterIp: string;
82
170
  sessionAffinity: string;
83
171
  log: string;
@@ -96,6 +184,7 @@ export declare const resources: {
96
184
  running: string;
97
185
  terminating: string;
98
186
  succeeded: string;
187
+ terminated: string;
99
188
  unknown: string;
100
189
  pending: string;
101
190
  waiting: string;
@@ -109,8 +198,41 @@ export declare const resources: {
109
198
  fold: string;
110
199
  rule: string;
111
200
  default_backend: string;
112
- ingress_rule_type: string;
201
+ ingress_class: string;
113
202
  port: string;
203
+ pod_ready_num: string;
204
+ pod_replicas_num: string;
205
+ edit_replicas: string;
206
+ cert: string;
207
+ dns_record: string;
208
+ port_mapping: string;
209
+ out_cluster_access: string;
210
+ in_cluster_access: string;
211
+ any_node_ip: string;
212
+ fail_get_detail: string;
213
+ basic_info: string;
214
+ pod: string;
215
+ pod_selector: string;
216
+ ingress_rule: string;
217
+ egress_rule: string;
218
+ ip_address: string;
219
+ last_seen: string;
220
+ service_port: string;
221
+ pod_port: string;
222
+ node_port: string;
223
+ protocol: string;
224
+ key: string;
225
+ value: string;
226
+ path_type: string;
227
+ path: string;
228
+ backend: string;
229
+ belong_to_node: string;
230
+ name_can_not_be_empty: string;
231
+ password: string;
232
+ username: string;
233
+ host: string;
234
+ create_resource_success: string;
235
+ edit_resource_success: string;
114
236
  };
115
237
  };
116
238
  };
@@ -15,7 +15,101 @@ declare const _default: {
15
15
  retry: string;
16
16
  create_resource: string;
17
17
  edit_resource: string;
18
- status: string;
18
+ state: string;
19
+ name: string;
20
+ pod: string;
21
+ cancel: string;
22
+ delete: string;
23
+ create: string;
24
+ confirm_delete_text: string;
25
+ edit: string;
26
+ namespace: string;
27
+ image: string;
28
+ created_time: string;
29
+ label: string;
30
+ annotation: string;
31
+ type: string;
32
+ event: string;
33
+ reason: string;
34
+ object: string;
35
+ note: string;
36
+ condition: string;
37
+ download_yaml: string;
38
+ detail: string;
39
+ restarts: string;
40
+ updated_time: string;
41
+ message: string;
42
+ save: string;
43
+ more: string;
44
+ workload: string;
45
+ all_namespaces: string;
46
+ empty: string;
47
+ schedule: string;
48
+ lastScheduleTime: string;
49
+ duration: string;
50
+ started: string;
51
+ init_container: string;
52
+ regular_container: string;
53
+ container: string;
54
+ redeploy: string;
55
+ data: string;
56
+ suspend: string;
57
+ resume: string;
58
+ clusterIp: string;
59
+ sessionAffinity: string;
60
+ log: string;
61
+ select_container: string;
62
+ wrap: string;
63
+ resume_log: string;
64
+ log_new_lines: string;
65
+ ready: string;
66
+ updating: string;
67
+ completed: string;
68
+ failed: string;
69
+ suspended: string;
70
+ running: string;
71
+ terminating: string;
72
+ terminated: string;
73
+ succeeded: string;
74
+ unknown: string;
75
+ pending: string;
76
+ waiting: string;
77
+ sec: string;
78
+ min: string;
79
+ hr: string;
80
+ day: string;
81
+ expand: string;
82
+ fold: string;
83
+ rule: string;
84
+ default_backend: string;
85
+ ingress_class: string;
86
+ port: string;
87
+ pod_ready_num: string;
88
+ pod_replicas_num: string;
89
+ edit_replicas: string;
90
+ cert: string;
91
+ dns_record: string;
92
+ port_mapping: string;
93
+ out_cluster_access: string;
94
+ in_cluster_access: string;
95
+ any_node_ip: string;
96
+ fail_get_detail: string;
97
+ basic_info: string;
98
+ pod_selector: string;
99
+ ingress_rule: string;
100
+ egress_rule: string;
101
+ ip_address: string;
102
+ last_seen: string;
103
+ service_port: string;
104
+ pod_port: string;
105
+ node_port: string;
106
+ protocol: string;
107
+ key: string;
108
+ value: string;
109
+ path_type: string;
110
+ path: string;
111
+ backend: string;
112
+ belong_to_node: string;
19
113
  };
20
114
  };
21
115
  export default _default;
@@ -18,10 +18,7 @@ declare const _default: {
18
18
  namespace: string;
19
19
  name: string;
20
20
  state: string;
21
- status: string;
22
- phase: string;
23
21
  image: string;
24
- replicas: string;
25
22
  created_time: string;
26
23
  label: string;
27
24
  annotation: string;
@@ -33,7 +30,6 @@ declare const _default: {
33
30
  condition: string;
34
31
  download_yaml: string;
35
32
  detail: string;
36
- node_name: string;
37
33
  restarts: string;
38
34
  updated_time: string;
39
35
  message: string;
@@ -45,17 +41,14 @@ declare const _default: {
45
41
  schedule: string;
46
42
  lastScheduleTime: string;
47
43
  duration: string;
48
- completions: string;
49
44
  started: string;
50
45
  init_container: string;
46
+ regular_container: string;
51
47
  container: string;
52
48
  redeploy: string;
53
49
  data: string;
54
50
  suspend: string;
55
51
  resume: string;
56
- cluster: string;
57
- storage: string;
58
- network: string;
59
52
  clusterIp: string;
60
53
  sessionAffinity: string;
61
54
  log: string;
@@ -74,6 +67,7 @@ declare const _default: {
74
67
  running: string;
75
68
  terminating: string;
76
69
  succeeded: string;
70
+ terminated: string;
77
71
  unknown: string;
78
72
  pending: string;
79
73
  waiting: string;
@@ -87,8 +81,41 @@ declare const _default: {
87
81
  fold: string;
88
82
  rule: string;
89
83
  default_backend: string;
90
- ingress_rule_type: string;
84
+ ingress_class: string;
91
85
  port: string;
86
+ pod_ready_num: string;
87
+ pod_replicas_num: string;
88
+ edit_replicas: string;
89
+ cert: string;
90
+ dns_record: string;
91
+ port_mapping: string;
92
+ out_cluster_access: string;
93
+ in_cluster_access: string;
94
+ any_node_ip: string;
95
+ fail_get_detail: string;
96
+ basic_info: string;
97
+ pod: string;
98
+ pod_selector: string;
99
+ ingress_rule: string;
100
+ egress_rule: string;
101
+ ip_address: string;
102
+ last_seen: string;
103
+ service_port: string;
104
+ pod_port: string;
105
+ node_port: string;
106
+ protocol: string;
107
+ key: string;
108
+ value: string;
109
+ path_type: string;
110
+ path: string;
111
+ backend: string;
112
+ belong_to_node: string;
113
+ name_can_not_be_empty: string;
114
+ password: string;
115
+ username: string;
116
+ host: string;
117
+ create_resource_success: string;
118
+ edit_resource_success: string;
92
119
  };
93
120
  };
94
121
  export default _default;
@@ -12,3 +12,4 @@ export * from './event-model';
12
12
  export * from './deployment-model';
13
13
  export * from './daemonset-model';
14
14
  export * from './statefulset-model';
15
+ export * from './service-model';
@@ -2,9 +2,18 @@ import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
2
  import { Service } from 'kubernetes-types/core/v1';
3
3
  import { ResourceModel } from './resource-model';
4
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
+ }
5
12
  export declare class ServiceModel extends ResourceModel<ServiceType> {
6
13
  _rawYaml: ServiceType;
7
14
  _globalStore: GlobalStore;
8
15
  constructor(_rawYaml: ServiceType, _globalStore: GlobalStore);
9
- inClusterAccess(): string | undefined;
16
+ get displayType(): string | undefined;
17
+ get dnsRecord(): string;
18
+ get displayPortMapping(): string[] | undefined;
10
19
  }
@@ -1,4 +1,4 @@
1
1
  import { i18n } from 'i18next';
2
- import { ResourceModel } from '../../models';
2
+ import { ServiceModel } from '../../models/service-model';
3
3
  import { ResourceConfig } from '../../types';
4
- export declare const ServicesConfig: (i18n: i18n) => ResourceConfig<ResourceModel>;
4
+ export declare const ServicesConfig: (i18n: i18n) => ResourceConfig<ServiceModel>;
@@ -1,3 +1,4 @@
1
- export * from './create';
2
- export * from './list';
3
- export * from './show';
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,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { FormModalProps } from 'src/components/FormModal';
3
+ import { RefineFormConfig } from '../components/RefineForm';
3
4
  import { ShowConfig } from '../components/ShowContent';
4
5
  import { Column } from '../components/Table';
5
6
  import { ResourceModel } from '../models';
@@ -7,7 +8,9 @@ export declare enum RESOURCE_GROUP {
7
8
  WORKLOAD = "WORKLOAD",
8
9
  STORAGE = "STORAGE",
9
10
  NETWORK = "NETWORK",
10
- CLUSTER = "CLUSTER"
11
+ CLUSTER = "CLUSTER",
12
+ SERVICE = "SERVICE",
13
+ SERVICE_AND_NETWORK = "SERVICE_AND_NETWORK"
11
14
  }
12
15
  export declare enum FormType {
13
16
  PAGE = "PAGE",
@@ -33,4 +36,5 @@ export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
33
36
  formType?: FormType;
34
37
  FormModal?: React.FC<FormModalProps>;
35
38
  isCustom?: boolean;
39
+ formConfig?: RefineFormConfig;
36
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.0.30",
3
+ "version": "0.0.32-beta.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -10,12 +10,13 @@
10
10
  "module": "./dist/refine.js",
11
11
  "types": "./lib/src/index.d.ts",
12
12
  "dependencies": {
13
- "@cloudtower/eagle": "^0.27.59",
14
- "@cloudtower/icons-react": "^0.27.59",
13
+ "@cloudtower/eagle": "^0.27.73",
14
+ "@cloudtower/icons-react": "^0.27.73",
15
15
  "@patternfly/react-core": "^5.1.1",
16
16
  "@patternfly/react-log-viewer": "^5.0.0",
17
- "@refinedev/core": "^4.38.0",
18
- "@refinedev/inferencer": "^4.5.4",
17
+ "@refinedev/core": "^4.47.2",
18
+ "@refinedev/inferencer": "^4.5.20",
19
+ "@refinedev/react-hook-form": "^4.8.14",
19
20
  "antd": "4.5.0",
20
21
  "dayjs": "^1.11.10",
21
22
  "i18next": "^23.2.3",
@@ -29,6 +30,7 @@
29
30
  "qs": "6.11.2",
30
31
  "react": "^16.12.0",
31
32
  "react-dom": "^16.12.0",
33
+ "react-hook-form": "^7.50.1",
32
34
  "react-router-dom": "^5.1.2",
33
35
  "sunflower-antd": "^1.0.0-beta.3",
34
36
  "usehooks-ts": "^2.9.1"
@@ -67,9 +69,9 @@
67
69
  "vite-plugin-commonjs": "^0.10.0"
68
70
  },
69
71
  "peerDependencies": {
70
- "@cloudtower/eagle": "^0.27.70",
71
- "@cloudtower/icons-react": "^0.27.70",
72
- "@refinedev/core": "^4.38.0",
72
+ "@cloudtower/eagle": "^0.27.73",
73
+ "@cloudtower/icons-react": "^0.27.73",
74
+ "@refinedev/core": "^4.47.2",
73
75
  "antd": "4.5.0",
74
76
  "i18next": "^23.2.3",
75
77
  "react": "^16.12.0",