ronds-metadata 1.3.74 → 1.3.76
Sign up to get free protection for your applications and to get access to all the features.
- package/es/api/index.js +1 -1
- package/es/comps/MetadataForm/DataCell/Input.js +7 -41
- package/es/comps/MetadataForm/DataCell/business/config.d.ts +203 -3
- package/es/comps/MetadataForm/DataCell/business/config.js +239 -9
- package/es/comps/MetadataForm/DataCell/business/index.js +9 -1
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/Cassandra.d.ts +10 -0
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/Cassandra.js +103 -0
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/Kafka.d.ts +2 -0
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/Kafka.js +8 -4
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/PostgreSQL.d.ts +6 -1
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/PostgreSQL.js +74 -11
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/SqlServer.d.ts +10 -0
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/SqlServer.js +118 -0
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/hooks.d.ts +3 -1
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/hooks.js +73 -13
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/index.js +35 -8
- package/es/comps/MetadataForm/DataCell/plugin/MapTable.d.ts +1 -0
- package/es/comps/MetadataForm/DataCell/plugin/MapTable.js +26 -11
- package/es/comps/MetadataForm/DataCell/plugin/SparkSqlTable.d.ts +1 -2
- package/es/comps/MetadataForm/DataCell/plugin/SparkSqlTable.js +20 -3
- package/es/comps/MetadataForm/HOC/index.js +1 -1
- package/es/comps/MetadataForm/index.less +29 -26
- package/package.json +1 -1
package/es/api/index.js
CHANGED
@@ -10,7 +10,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
import { guid, md5 } from '../utils';
|
11
11
|
import { addInterceptor, HttpHelper } from '../framework/http';
|
12
12
|
var http = new HttpHelper();
|
13
|
-
var token = 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkMyMTJFMjI1NTcwNjRDQTE3M0U2NjkxRjM4QzFDOEEyIiwidHlwIjoiYXQrand0In0.
|
13
|
+
var token = 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkMyMTJFMjI1NTcwNjRDQTE3M0U2NjkxRjM4QzFDOEEyIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MjQyMDkyNzMsImV4cCI6MTcyNDQ2ODQ3MywiaXNzIjoiaHR0cDovL2ZhYmlvOjk5OTkvc3VwZXJjYXJlY29yZSIsImF1ZCI6ImVwbSIsImNsaWVudF9pZCI6ImVwbSIsInN1YiI6IjNhMTIxZDJiLWYwZDUtZDQ3OC0xN2Q3LWQwODEwZDgzZDViMSIsImF1dGhfdGltZSI6MTcyNDIwOTI3MiwiaWRwIjoibG9jYWwiLCJuYW1lIjoicGhtIiwiZW1haWwiOiJwaG1AYWJwLmlvIiwicm9sZSI6WyJhZG1pbiIsInBobV9hZG1pbiJdLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9naXZlbm5hbWUiOiJwaG3ov5Dnu7TotKblj7ciLCJwaG9uZV9udW1iZXIiOiIxMzYwMDAwMDAwMCIsInBob25lX251bWJlcl92ZXJpZmllZCI6IlRydWUiLCJlbWFpbF92ZXJpZmllZCI6IlRydWUiLCJpYXQiOjE3MjQyMDkyNzMsInNjb3BlIjpbImFkZHJlc3MiLCJlbWFpbCIsImVwbSIsIm9wZW5pZCIsInBob25lIiwicHJvZmlsZSIsInJvbGUiLCJvZmZsaW5lX2FjY2VzcyJdLCJhbXIiOlsicHdkIl19.t-AeiGQDr2N4PgLGHI6HRjwhTlSAt7TjtDVQgMBCVJgf31L9lKzuiakfXukTNzeXz0qHTeJOBmJL8Q-Lhlz_Khd-pr4fsaBP6qI8NWcLan1hZPWgms5mbsJukLOIvUVWxZGxJ501yxdQLJIZPwX6CfvXzCWfIeF8SQJ8c4d_zXWrpdJBHfmX8vl4Ut7hOX5IC9Sn79uoe-0-96aI8Ltv07iHdTAJSH3Y4svh_jwEt34-oBmT3daZ0iWvfuNx0QFYGiW6lN-kALIbnEOpphA3mHtwtUpB2RtG6BGCTJZGraT-7Fmboks34y6C1ApJzO221x4-_VZGa5hwwvZttkxzlw';
|
14
14
|
addInterceptor(function (httpClient) {
|
15
15
|
httpClient.interceptors.request.use(function (_config) {
|
16
16
|
if (!_config.headers) {
|
@@ -21,7 +21,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
21
21
|
/*
|
22
22
|
* @Author: wangxian
|
23
23
|
* @Date: 2021-09-18 14:15:04
|
24
|
-
* @LastEditTime: 2024-08-
|
24
|
+
* @LastEditTime: 2024-08-21 08:47:42
|
25
25
|
*/
|
26
26
|
import React from 'react';
|
27
27
|
import { UploadOutlined } from '@ant-design/icons';
|
@@ -34,7 +34,6 @@ import { useAsyncMemo } from '../../../framework/hooks/use-async-memo';
|
|
34
34
|
import { MetadataService } from '../../../framework/metadata/MetadataService';
|
35
35
|
import SparkSqlTable from './plugin/SparkSqlTable';
|
36
36
|
import MapTable from './plugin/MapTable';
|
37
|
-
import SourceConfig from './plugin/SourceConfig';
|
38
37
|
import DataSource from './plugin/Datasource';
|
39
38
|
import BusinessForm from './business';
|
40
39
|
var TextArea = _Input.TextArea;
|
@@ -214,8 +213,6 @@ function Index(props) {
|
|
214
213
|
return /*#__PURE__*/React.createElement(SparkSqlTable, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.sparkSqlTable);
|
215
214
|
case 'mapTable':
|
216
215
|
return /*#__PURE__*/React.createElement(MapTable, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.mapTable);
|
217
|
-
case 'sourceConfig':
|
218
|
-
return /*#__PURE__*/React.createElement(SourceConfig, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.sourceConfig);
|
219
216
|
default:
|
220
217
|
return /*#__PURE__*/React.createElement(_Input, {
|
221
218
|
addonAfter: ((_extraInfo$addonAfter2 = extraInfo.addonAfter) === null || _extraInfo$addonAfter2 === void 0 ? void 0 : _extraInfo$addonAfter2.key) ? /*#__PURE__*/React.createElement(_Form.Item, {
|
@@ -237,42 +234,6 @@ function Index(props) {
|
|
237
234
|
});
|
238
235
|
}
|
239
236
|
};
|
240
|
-
var getLabelCol = function getLabelCol() {
|
241
|
-
if (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) {
|
242
|
-
return {
|
243
|
-
flex: 0,
|
244
|
-
offset: 0
|
245
|
-
};
|
246
|
-
}
|
247
|
-
if (labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal') {
|
248
|
-
return {
|
249
|
-
flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
|
250
|
-
offset: 0
|
251
|
-
};
|
252
|
-
}
|
253
|
-
return undefined;
|
254
|
-
};
|
255
|
-
var getWrapperCol = function getWrapperCol() {
|
256
|
-
if (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) {
|
257
|
-
return {
|
258
|
-
style: {
|
259
|
-
width: 0,
|
260
|
-
flex: 0,
|
261
|
-
offset: 0
|
262
|
-
}
|
263
|
-
};
|
264
|
-
}
|
265
|
-
if (labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal') {
|
266
|
-
return {
|
267
|
-
style: {
|
268
|
-
width: "".concat((24 - labelSpan) * 100 / 24, "%")
|
269
|
-
},
|
270
|
-
flex: "0 0 ".concat((24 - labelSpan) * 100 / 24, "%"),
|
271
|
-
offset: 0
|
272
|
-
};
|
273
|
-
}
|
274
|
-
return undefined;
|
275
|
-
};
|
276
237
|
// ref引用的 应用类型是否展示成表单
|
277
238
|
if (isObj && isRefForm && field) {
|
278
239
|
var _extraInfo$addonAfter6;
|
@@ -329,7 +290,12 @@ function Index(props) {
|
|
329
290
|
flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
|
330
291
|
offset: 0
|
331
292
|
} : undefined,
|
332
|
-
wrapperCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
|
293
|
+
wrapperCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) ? {
|
294
|
+
style: {
|
295
|
+
width: '100%',
|
296
|
+
flex: 1
|
297
|
+
}
|
298
|
+
} : {
|
333
299
|
style: {
|
334
300
|
width: "".concat((24 - labelSpan) * 100 / 24, "%")
|
335
301
|
},
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export declare const BusinessSchema: {
|
2
|
-
|
2
|
+
etl_source: {
|
3
3
|
id: string;
|
4
4
|
type: string;
|
5
5
|
properties: ({
|
@@ -12,9 +12,10 @@ export declare const BusinessSchema: {
|
|
12
12
|
value: {
|
13
13
|
common: {
|
14
14
|
label: string;
|
15
|
+
require: boolean;
|
15
16
|
titleHidden: boolean;
|
16
17
|
borderHidden: boolean;
|
17
|
-
|
18
|
+
colSpan: number;
|
18
19
|
};
|
19
20
|
'common-en-US': {};
|
20
21
|
text: {
|
@@ -29,6 +30,7 @@ export declare const BusinessSchema: {
|
|
29
30
|
};
|
30
31
|
}[];
|
31
32
|
enum?: undefined;
|
33
|
+
items?: undefined;
|
32
34
|
} | {
|
33
35
|
id: string;
|
34
36
|
type: string;
|
@@ -43,7 +45,6 @@ export declare const BusinessSchema: {
|
|
43
45
|
common: {
|
44
46
|
label: string;
|
45
47
|
require: boolean;
|
46
|
-
labelSpan: number;
|
47
48
|
depend: {
|
48
49
|
show: string;
|
49
50
|
};
|
@@ -51,6 +52,27 @@ export declare const BusinessSchema: {
|
|
51
52
|
'common-en-US': {};
|
52
53
|
};
|
53
54
|
}[];
|
55
|
+
items?: undefined;
|
56
|
+
} | {
|
57
|
+
id: string;
|
58
|
+
type: string;
|
59
|
+
fields: {
|
60
|
+
id: string;
|
61
|
+
type: string;
|
62
|
+
refId: string;
|
63
|
+
value: {
|
64
|
+
common: {
|
65
|
+
label: string;
|
66
|
+
require: boolean;
|
67
|
+
depend: {
|
68
|
+
show: string;
|
69
|
+
};
|
70
|
+
};
|
71
|
+
'common-en-US': {};
|
72
|
+
};
|
73
|
+
}[];
|
74
|
+
enum?: undefined;
|
75
|
+
items?: undefined;
|
54
76
|
} | {
|
55
77
|
id: string;
|
56
78
|
type: string;
|
@@ -71,6 +93,184 @@ export declare const BusinessSchema: {
|
|
71
93
|
};
|
72
94
|
}[];
|
73
95
|
enum?: undefined;
|
96
|
+
items?: undefined;
|
97
|
+
} | {
|
98
|
+
id: string;
|
99
|
+
type: string;
|
100
|
+
fields: {
|
101
|
+
id: string;
|
102
|
+
type: string;
|
103
|
+
refId: string;
|
104
|
+
value: {
|
105
|
+
common: {
|
106
|
+
id: string;
|
107
|
+
label: string;
|
108
|
+
depend: {
|
109
|
+
show: string;
|
110
|
+
};
|
111
|
+
};
|
112
|
+
text: {
|
113
|
+
type: string;
|
114
|
+
};
|
115
|
+
};
|
116
|
+
}[];
|
117
|
+
enum?: undefined;
|
118
|
+
items?: undefined;
|
119
|
+
} | {
|
120
|
+
id: string;
|
121
|
+
type: string;
|
122
|
+
fields: {
|
123
|
+
id: string;
|
124
|
+
type: string;
|
125
|
+
refId: string;
|
126
|
+
value: {
|
127
|
+
common: {
|
128
|
+
id: string;
|
129
|
+
label: string;
|
130
|
+
colSpan: number;
|
131
|
+
depend: {
|
132
|
+
show: string;
|
133
|
+
};
|
134
|
+
};
|
135
|
+
array: {
|
136
|
+
layout: string;
|
137
|
+
};
|
138
|
+
};
|
139
|
+
}[];
|
140
|
+
items: {
|
141
|
+
type: string;
|
142
|
+
refId: string;
|
143
|
+
};
|
144
|
+
enum?: undefined;
|
145
|
+
} | {
|
146
|
+
id: string;
|
147
|
+
type: string;
|
148
|
+
fields: {
|
149
|
+
id: string;
|
150
|
+
type: string;
|
151
|
+
refId: string;
|
152
|
+
value: {
|
153
|
+
common: {
|
154
|
+
label: string;
|
155
|
+
colSpan: number;
|
156
|
+
labelSpan: number;
|
157
|
+
require: boolean;
|
158
|
+
};
|
159
|
+
'common-en-US': {};
|
160
|
+
text: {
|
161
|
+
type: string;
|
162
|
+
sparkSqlTable: {
|
163
|
+
extraDico: any[];
|
164
|
+
initSql: string;
|
165
|
+
};
|
166
|
+
};
|
167
|
+
};
|
168
|
+
}[];
|
169
|
+
enum?: undefined;
|
170
|
+
items?: undefined;
|
171
|
+
})[];
|
172
|
+
fields: {
|
173
|
+
id: string;
|
174
|
+
type: string;
|
175
|
+
refId: string;
|
176
|
+
value: {
|
177
|
+
colSpan: number;
|
178
|
+
labelSpan: number;
|
179
|
+
layout: string;
|
180
|
+
};
|
181
|
+
}[];
|
182
|
+
types: {
|
183
|
+
id: string;
|
184
|
+
type: string;
|
185
|
+
properties: {
|
186
|
+
id: string;
|
187
|
+
type: string;
|
188
|
+
fields: {
|
189
|
+
id: string;
|
190
|
+
type: string;
|
191
|
+
refId: string;
|
192
|
+
value: {
|
193
|
+
common: {
|
194
|
+
id: string;
|
195
|
+
label: string;
|
196
|
+
depend: {};
|
197
|
+
};
|
198
|
+
text: {};
|
199
|
+
};
|
200
|
+
}[];
|
201
|
+
}[];
|
202
|
+
}[];
|
203
|
+
}[];
|
204
|
+
etl_direction: {
|
205
|
+
id: string;
|
206
|
+
type: string;
|
207
|
+
properties: ({
|
208
|
+
id: string;
|
209
|
+
type: string;
|
210
|
+
fields: {
|
211
|
+
id: string;
|
212
|
+
type: string;
|
213
|
+
refId: string;
|
214
|
+
value: {
|
215
|
+
common: {
|
216
|
+
label: string;
|
217
|
+
require: boolean;
|
218
|
+
titleHidden: boolean;
|
219
|
+
borderHidden: boolean;
|
220
|
+
colSpan: number;
|
221
|
+
};
|
222
|
+
'common-en-US': {};
|
223
|
+
text: {
|
224
|
+
type: string;
|
225
|
+
datasource: {
|
226
|
+
type: string[];
|
227
|
+
kafka: {
|
228
|
+
isMutiple: boolean;
|
229
|
+
};
|
230
|
+
};
|
231
|
+
};
|
232
|
+
};
|
233
|
+
}[];
|
234
|
+
} | {
|
235
|
+
id: string;
|
236
|
+
type: string;
|
237
|
+
fields: {
|
238
|
+
id: string;
|
239
|
+
type: string;
|
240
|
+
refId: string;
|
241
|
+
value: {
|
242
|
+
common: {
|
243
|
+
label: string;
|
244
|
+
require: boolean;
|
245
|
+
labelSpan: number;
|
246
|
+
colSpan: number;
|
247
|
+
depend: {
|
248
|
+
show: string;
|
249
|
+
};
|
250
|
+
};
|
251
|
+
'common-en-US': {};
|
252
|
+
};
|
253
|
+
}[];
|
254
|
+
} | {
|
255
|
+
id: string;
|
256
|
+
type: string;
|
257
|
+
fields: {
|
258
|
+
id: string;
|
259
|
+
type: string;
|
260
|
+
refId: string;
|
261
|
+
value: {
|
262
|
+
common: {
|
263
|
+
label: string;
|
264
|
+
colSpan: number;
|
265
|
+
labelSpan: number;
|
266
|
+
};
|
267
|
+
'common-en-US': {};
|
268
|
+
text: {
|
269
|
+
type: string;
|
270
|
+
mapTable: {};
|
271
|
+
};
|
272
|
+
};
|
273
|
+
}[];
|
74
274
|
})[];
|
75
275
|
fields: {
|
76
276
|
id: string;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: wangxian
|
3
3
|
* @Date: 2024-08-20 19:43:42
|
4
|
-
* @LastEditTime: 2024-08-
|
4
|
+
* @LastEditTime: 2024-08-21 09:07:58
|
5
5
|
*/
|
6
|
-
var
|
6
|
+
var ETL_SOURCE_SCHEMA = [{
|
7
7
|
id: 'FormGenerator',
|
8
8
|
type: 'object',
|
9
9
|
properties: [{
|
@@ -16,15 +16,17 @@ var KAFKA_SCHEMA = [{
|
|
16
16
|
value: {
|
17
17
|
common: {
|
18
18
|
label: '数据源配置',
|
19
|
+
require: true,
|
19
20
|
titleHidden: true,
|
20
21
|
borderHidden: true,
|
21
|
-
labelSpan:
|
22
|
+
// labelSpan: 2,
|
23
|
+
colSpan: 2
|
22
24
|
},
|
23
25
|
'common-en-US': {},
|
24
26
|
text: {
|
25
27
|
type: 'datasource',
|
26
28
|
datasource: {
|
27
|
-
type: ['Kafka', '
|
29
|
+
type: ['Kafka', 'PostgreSql', 'Minio', 'SqlServer'],
|
28
30
|
kafka: {
|
29
31
|
isMutiple: true
|
30
32
|
}
|
@@ -48,7 +50,7 @@ var KAFKA_SCHEMA = [{
|
|
48
50
|
common: {
|
49
51
|
label: '消费策略',
|
50
52
|
require: true,
|
51
|
-
labelSpan: 4,
|
53
|
+
// labelSpan: 4,
|
52
54
|
depend: {
|
53
55
|
show: 'datasource.dsType=="Kafka"'
|
54
56
|
}
|
@@ -67,7 +69,7 @@ var KAFKA_SCHEMA = [{
|
|
67
69
|
common: {
|
68
70
|
label: '批间隔',
|
69
71
|
require: true,
|
70
|
-
labelSpan: 4,
|
72
|
+
// labelSpan: 4,
|
71
73
|
depend: {
|
72
74
|
show: 'datasource.dsType=="Kafka"'
|
73
75
|
}
|
@@ -75,18 +77,246 @@ var KAFKA_SCHEMA = [{
|
|
75
77
|
'common-en-US': {}
|
76
78
|
}
|
77
79
|
}]
|
80
|
+
}, {
|
81
|
+
id: 'fetchsize',
|
82
|
+
type: 'number',
|
83
|
+
fields: [{
|
84
|
+
id: 'Rule.Form',
|
85
|
+
type: 'ref',
|
86
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
87
|
+
value: {
|
88
|
+
common: {
|
89
|
+
label: '批处理大小',
|
90
|
+
require: true,
|
91
|
+
labelSpan: 4,
|
92
|
+
depend: {
|
93
|
+
show: 'datasource.dsType=="PostgreSql" || datasource.dsType=="SqlServer"'
|
94
|
+
}
|
95
|
+
},
|
96
|
+
'common-en-US': {}
|
97
|
+
}
|
98
|
+
}]
|
99
|
+
}, {
|
100
|
+
id: 'sql',
|
101
|
+
type: 'text',
|
102
|
+
fields: [{
|
103
|
+
id: 'Rule.Form',
|
104
|
+
type: 'ref',
|
105
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
106
|
+
value: {
|
107
|
+
common: {
|
108
|
+
label: 'SQL',
|
109
|
+
require: true,
|
110
|
+
labelSpan: 4,
|
111
|
+
depend: {
|
112
|
+
show: 'datasource.dsType=="PostgreSql" || datasource.dsType=="SqlServer"'
|
113
|
+
}
|
114
|
+
},
|
115
|
+
'common-en-US': {}
|
116
|
+
}
|
117
|
+
}]
|
118
|
+
}, {
|
119
|
+
id: 'filepath',
|
120
|
+
type: 'text',
|
121
|
+
fields: [{
|
122
|
+
id: 'com.ronds.schema.default.Rule.Form',
|
123
|
+
type: 'ref',
|
124
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
125
|
+
value: {
|
126
|
+
common: {
|
127
|
+
id: 'filepath',
|
128
|
+
label: '文件上传',
|
129
|
+
depend: {
|
130
|
+
show: 'datasource.dsType=="Minio"'
|
131
|
+
}
|
132
|
+
},
|
133
|
+
text: {
|
134
|
+
type: 'upload'
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}]
|
138
|
+
}, {
|
139
|
+
id: 'headers',
|
140
|
+
type: 'array',
|
141
|
+
fields: [{
|
142
|
+
id: 'com.ronds.schema.default.Rule.Form',
|
143
|
+
type: 'ref',
|
144
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
145
|
+
value: {
|
146
|
+
common: {
|
147
|
+
id: 'headers',
|
148
|
+
label: '文件信息',
|
149
|
+
colSpan: 2,
|
150
|
+
depend: {
|
151
|
+
show: 'datasource.dsType=="Minio"'
|
152
|
+
}
|
153
|
+
},
|
154
|
+
array: {
|
155
|
+
layout: 'table'
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}],
|
159
|
+
items: {
|
160
|
+
type: 'ref',
|
161
|
+
refId: 'headers_ref'
|
162
|
+
}
|
163
|
+
}, {
|
164
|
+
id: 'sparkSql',
|
165
|
+
type: 'text',
|
166
|
+
fields: [{
|
167
|
+
id: 'Rule.Form',
|
168
|
+
type: 'ref',
|
169
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
170
|
+
value: {
|
171
|
+
common: {
|
172
|
+
label: 'Spark Sql',
|
173
|
+
colSpan: 2,
|
174
|
+
labelSpan: 4,
|
175
|
+
require: true
|
176
|
+
},
|
177
|
+
'common-en-US': {},
|
178
|
+
text: {
|
179
|
+
type: 'sparkSqlTable',
|
180
|
+
sparkSqlTable: {
|
181
|
+
extraDico: [],
|
182
|
+
initSql: 'select * from raw.ChannerlLog'
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
186
|
+
}]
|
187
|
+
}],
|
188
|
+
fields: [{
|
189
|
+
id: 'com.ronds.schema.default.Rule.Form',
|
190
|
+
type: 'ref',
|
191
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
192
|
+
value: {
|
193
|
+
colSpan: 12,
|
194
|
+
labelSpan: 4,
|
195
|
+
layout: 'horizontal'
|
196
|
+
}
|
197
|
+
}],
|
198
|
+
types: [{
|
199
|
+
id: 'headers_ref',
|
200
|
+
type: 'object',
|
201
|
+
properties: [{
|
202
|
+
id: 'input_fc05',
|
203
|
+
type: 'text',
|
204
|
+
fields: [{
|
205
|
+
id: 'com.ronds.schema.default.Rule.Form',
|
206
|
+
type: 'ref',
|
207
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
208
|
+
value: {
|
209
|
+
common: {
|
210
|
+
id: 'sheetname',
|
211
|
+
label: '页名',
|
212
|
+
depend: {}
|
213
|
+
},
|
214
|
+
text: {}
|
215
|
+
}
|
216
|
+
}]
|
217
|
+
}, {
|
218
|
+
id: 'input_ae91',
|
219
|
+
type: 'number',
|
220
|
+
fields: [{
|
221
|
+
id: 'com.ronds.schema.default.Rule.Form',
|
222
|
+
type: 'ref',
|
223
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
224
|
+
value: {
|
225
|
+
common: {
|
226
|
+
id: 'header',
|
227
|
+
label: '表头位置',
|
228
|
+
depend: {}
|
229
|
+
},
|
230
|
+
text: {}
|
231
|
+
}
|
232
|
+
}]
|
233
|
+
}]
|
234
|
+
}]
|
235
|
+
}];
|
236
|
+
var ETL_DIRECTION_SCHEMA = [{
|
237
|
+
id: 'FormGenerator',
|
238
|
+
type: 'object',
|
239
|
+
properties: [{
|
240
|
+
id: 'datasource',
|
241
|
+
type: 'text',
|
242
|
+
fields: [{
|
243
|
+
id: 'Rule.Form',
|
244
|
+
type: 'ref',
|
245
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
246
|
+
value: {
|
247
|
+
common: {
|
248
|
+
label: '数据源配置',
|
249
|
+
require: true,
|
250
|
+
titleHidden: true,
|
251
|
+
borderHidden: true,
|
252
|
+
// labelSpan: 2,
|
253
|
+
colSpan: 2
|
254
|
+
},
|
255
|
+
'common-en-US': {},
|
256
|
+
text: {
|
257
|
+
type: 'datasource',
|
258
|
+
datasource: {
|
259
|
+
type: ['Cassandra', 'PostgreSql', 'Minio', 'SqlServer'],
|
260
|
+
kafka: {
|
261
|
+
isMutiple: true
|
262
|
+
}
|
263
|
+
}
|
264
|
+
}
|
265
|
+
}
|
266
|
+
}]
|
267
|
+
}, {
|
268
|
+
id: 'filepath',
|
269
|
+
type: 'text',
|
270
|
+
fields: [{
|
271
|
+
id: 'Rule.Form',
|
272
|
+
type: 'ref',
|
273
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
274
|
+
value: {
|
275
|
+
common: {
|
276
|
+
label: '文件路径',
|
277
|
+
require: true,
|
278
|
+
labelSpan: 4,
|
279
|
+
colSpan: 2,
|
280
|
+
depend: {
|
281
|
+
show: 'datasource.dsType=="Minio"'
|
282
|
+
}
|
283
|
+
},
|
284
|
+
'common-en-US': {}
|
285
|
+
}
|
286
|
+
}]
|
287
|
+
}, {
|
288
|
+
id: 'mapTable',
|
289
|
+
type: 'text',
|
290
|
+
fields: [{
|
291
|
+
id: 'Rule.Form',
|
292
|
+
type: 'ref',
|
293
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
294
|
+
value: {
|
295
|
+
common: {
|
296
|
+
label: '字段映射',
|
297
|
+
colSpan: 2,
|
298
|
+
labelSpan: 4
|
299
|
+
},
|
300
|
+
'common-en-US': {},
|
301
|
+
text: {
|
302
|
+
type: 'mapTable',
|
303
|
+
mapTable: {}
|
304
|
+
}
|
305
|
+
}
|
306
|
+
}]
|
78
307
|
}],
|
79
308
|
fields: [{
|
80
309
|
id: 'com.ronds.schema.default.Rule.Form',
|
81
310
|
type: 'ref',
|
82
311
|
refId: 'com.ronds.schema.default.Rule.Form',
|
83
312
|
value: {
|
84
|
-
colSpan:
|
85
|
-
labelSpan:
|
313
|
+
colSpan: 12,
|
314
|
+
labelSpan: 4,
|
86
315
|
layout: 'horizontal'
|
87
316
|
}
|
88
317
|
}]
|
89
318
|
}];
|
90
319
|
export var BusinessSchema = {
|
91
|
-
|
320
|
+
etl_source: ETL_SOURCE_SCHEMA,
|
321
|
+
etl_direction: ETL_DIRECTION_SCHEMA
|
92
322
|
};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
1
2
|
import MetadataForm from '../..';
|
2
3
|
import { BusinessSchema } from './config';
|
3
4
|
import React from 'react';
|
@@ -11,7 +12,14 @@ var BusinessForm = function BusinessForm(props) {
|
|
11
12
|
var _extraInfo$bussiness;
|
12
13
|
return BusinessSchema[extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$bussiness = extraInfo.bussiness) === null || _extraInfo$bussiness === void 0 ? void 0 : _extraInfo$bussiness.type];
|
13
14
|
}, [extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$bussiness2 = extraInfo.bussiness) === null || _extraInfo$bussiness2 === void 0 ? void 0 : _extraInfo$bussiness2.type]);
|
14
|
-
var
|
15
|
+
var valueRef = React.useRef({});
|
16
|
+
var triggerChange = function triggerChange(changedValue) {
|
17
|
+
valueRef.current = _objectSpread(_objectSpread({}, valueRef.current), changedValue);
|
18
|
+
onChange && onChange(valueRef.current);
|
19
|
+
};
|
20
|
+
var onValuesChange = function onValuesChange(values, allVals) {
|
21
|
+
triggerChange(values);
|
22
|
+
};
|
15
23
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(MetadataForm, {
|
16
24
|
schema: schema,
|
17
25
|
getFormInstance: function getFormInstance(form) {
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
interface ICassandraDatasourceProps {
|
3
|
+
extraInfo?: any;
|
4
|
+
datasource?: any;
|
5
|
+
wrapperCol: string;
|
6
|
+
labelCol: string;
|
7
|
+
onChange?: any;
|
8
|
+
}
|
9
|
+
declare const CassandraDatasource: (props: ICassandraDatasourceProps) => React.JSX.Element;
|
10
|
+
export default CassandraDatasource;
|