ronds-metadata 1.3.62 → 1.3.63
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.
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface ISourceConfigProps {
|
|
3
3
|
configType: string;
|
|
4
|
-
|
|
4
|
+
sourceHttp?: any[];
|
|
5
|
+
sourceEnums?: any[];
|
|
6
|
+
targetHttp?: any[];
|
|
7
|
+
targetEnums?: any[];
|
|
5
8
|
}
|
|
6
9
|
declare const SourceConfig: (props: ISourceConfigProps) => React.JSX.Element;
|
|
7
10
|
export default SourceConfig;
|
|
@@ -4,47 +4,34 @@ import "antd/es/upload/style";
|
|
|
4
4
|
import _Upload from "antd/es/upload";
|
|
5
5
|
import "antd/es/input/style";
|
|
6
6
|
import _Input from "antd/es/input";
|
|
7
|
+
import "antd/es/row/style";
|
|
8
|
+
import _Row from "antd/es/row";
|
|
7
9
|
import "antd/es/button/style";
|
|
8
10
|
import _Button from "antd/es/button";
|
|
11
|
+
import "antd/es/col/style";
|
|
12
|
+
import _Col from "antd/es/col";
|
|
9
13
|
import "antd/es/select/style";
|
|
10
14
|
import _Select from "antd/es/select";
|
|
15
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
11
16
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
12
17
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
13
18
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
19
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
14
20
|
import { tr } from '../../../../framework/locale/index';
|
|
15
21
|
import { LinkOutlined, UploadOutlined, PlusOutlined } from '@ant-design/icons';
|
|
16
22
|
import React from 'react';
|
|
17
23
|
import Editable from '../../../Editable/index';
|
|
24
|
+
import { MetadataService } from '../../../../framework/metadata/MetadataService';
|
|
25
|
+
import { useAsyncMemo } from '../../../../framework/hooks/use-async-memo';
|
|
26
|
+
import { deepClone } from '../../../../utils';
|
|
18
27
|
var SourceConfig = function SourceConfig(props) {
|
|
19
28
|
var configType = props.configType,
|
|
20
|
-
|
|
29
|
+
sourceHttp = props.sourceHttp,
|
|
30
|
+
sourceEnums = props.sourceEnums,
|
|
31
|
+
targetHttp = props.targetHttp,
|
|
32
|
+
targetEnums = props.targetEnums;
|
|
21
33
|
var isTarget = configType === 'target';
|
|
22
34
|
var isSource = configType === 'source';
|
|
23
|
-
var sourceOpts = isTarget ? [{
|
|
24
|
-
value: 'Cassandra',
|
|
25
|
-
label: 'Cassandra'
|
|
26
|
-
}, {
|
|
27
|
-
value: 'PgSql',
|
|
28
|
-
label: 'PgSql'
|
|
29
|
-
}, {
|
|
30
|
-
value: 'Minio',
|
|
31
|
-
label: 'Minio'
|
|
32
|
-
}, {
|
|
33
|
-
value: 'SqlServer',
|
|
34
|
-
label: 'SqlServer'
|
|
35
|
-
}] : [{
|
|
36
|
-
value: 'Kafka',
|
|
37
|
-
label: 'Kafka'
|
|
38
|
-
}, {
|
|
39
|
-
value: 'PgSql',
|
|
40
|
-
label: 'PgSql'
|
|
41
|
-
}, {
|
|
42
|
-
value: 'Minio',
|
|
43
|
-
label: 'Minio'
|
|
44
|
-
}, {
|
|
45
|
-
value: 'SqlServer',
|
|
46
|
-
label: 'SqlServer'
|
|
47
|
-
}];
|
|
48
35
|
var _React$useState = React.useState(),
|
|
49
36
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
50
37
|
source = _React$useState2[0],
|
|
@@ -62,13 +49,6 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
62
49
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
63
50
|
batchDuration = _React$useState8[0],
|
|
64
51
|
setBatchDuration = _React$useState8[1];
|
|
65
|
-
var strategyOpts = [{
|
|
66
|
-
value: 'earliest',
|
|
67
|
-
label: 'earliest'
|
|
68
|
-
}, {
|
|
69
|
-
value: 'latest',
|
|
70
|
-
label: 'latest'
|
|
71
|
-
}];
|
|
72
52
|
// sql source
|
|
73
53
|
var _React$useState9 = React.useState(),
|
|
74
54
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
@@ -150,106 +130,147 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
150
130
|
filePath = _React$useState24[0],
|
|
151
131
|
setFilePath = _React$useState24[1];
|
|
152
132
|
// http 调用接口
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
133
|
+
var watchValueRef = React.useRef();
|
|
134
|
+
var pageRef = React.useRef(1);
|
|
135
|
+
var totalRef = React.useRef();
|
|
136
|
+
var processSelectOptionsData = function processSelectOptionsData() {
|
|
137
|
+
var _options = [];
|
|
138
|
+
var _items = [];
|
|
139
|
+
var _enum = deepClone(sourceEnums || targetEnums || []);
|
|
140
|
+
_enum.forEach(function (p) {
|
|
141
|
+
p.forEach(function (it) {
|
|
142
|
+
var _it$key;
|
|
143
|
+
var obj = {
|
|
144
|
+
label: it.value,
|
|
145
|
+
value: (_it$key = it === null || it === void 0 ? void 0 : it.key) !== null && _it$key !== void 0 ? _it$key : it === null || it === void 0 ? void 0 : it.value
|
|
146
|
+
};
|
|
147
|
+
_items.push(obj);
|
|
148
|
+
});
|
|
149
|
+
_options.push(_items);
|
|
150
|
+
_items = [];
|
|
151
|
+
});
|
|
152
|
+
return _options;
|
|
153
|
+
};
|
|
154
|
+
var options = React.useMemo(function () {
|
|
155
|
+
return processSelectOptionsData();
|
|
156
|
+
}, [sourceEnums, targetEnums]);
|
|
157
|
+
var getEnumDataByUrl = React.useCallback( /*#__PURE__*/function () {
|
|
158
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(http, pid, page) {
|
|
159
|
+
var server, _url, res, _res;
|
|
160
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
161
|
+
while (1) switch (_context.prev = _context.next) {
|
|
162
|
+
case 0:
|
|
163
|
+
server = new MetadataService();
|
|
164
|
+
_url = pid || pid === '' ? http.url.replace('{pid}', pid) : http.url;
|
|
165
|
+
_url = page ? http.url.replace('{page}', page) : _url;
|
|
166
|
+
if (watchValueRef.current) {
|
|
167
|
+
if (typeof watchValueRef.current === 'string') {
|
|
168
|
+
_url = _url.replace('{watch}', watchValueRef.current);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
_context.next = 6;
|
|
172
|
+
return server.GetEnumDataByUrl(_url, http.method, (http === null || http === void 0 ? void 0 : http.body) && JSON.parse(http === null || http === void 0 ? void 0 : http.body) ? _objectSpread(_objectSpread({}, JSON.parse(http === null || http === void 0 ? void 0 : http.body)), watchValueRef.current || {}) : watchValueRef.current);
|
|
173
|
+
case 6:
|
|
174
|
+
res = _context.sent;
|
|
175
|
+
_res = (res === null || res === void 0 ? void 0 : res.total) ? res === null || res === void 0 ? void 0 : res.list : res;
|
|
176
|
+
totalRef.current = res === null || res === void 0 ? void 0 : res.total;
|
|
177
|
+
if (!(_res && _res.length > 0)) {
|
|
178
|
+
_context.next = 19;
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
if (!((http === null || http === void 0 ? void 0 : http.isCascader) && http.url.indexOf('{pid}') === -1)) {
|
|
182
|
+
_context.next = 12;
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
return _context.abrupt("return", _res);
|
|
186
|
+
case 12:
|
|
187
|
+
if (!(http === null || http === void 0 ? void 0 : http.isGroup)) {
|
|
188
|
+
_context.next = 14;
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
return _context.abrupt("return", _res);
|
|
192
|
+
case 14:
|
|
193
|
+
if (!(http === null || http === void 0 ? void 0 : http.isTreeSelect)) {
|
|
194
|
+
_context.next = 16;
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
return _context.abrupt("return", _res);
|
|
198
|
+
case 16:
|
|
199
|
+
return _context.abrupt("return", _res.map(function (it) {
|
|
200
|
+
if (http === null || http === void 0 ? void 0 : http.isCascader) {
|
|
201
|
+
return {
|
|
202
|
+
value: it[(http === null || http === void 0 ? void 0 : http.key) || 'id'],
|
|
203
|
+
label: it[(http === null || http === void 0 ? void 0 : http.value) || 'name'],
|
|
204
|
+
isLeaf: it['isLeaf'] ? it['isLeaf'] : false
|
|
205
|
+
};
|
|
206
|
+
} else {
|
|
207
|
+
return {
|
|
208
|
+
value: it[(http === null || http === void 0 ? void 0 : http.key) || 'id'],
|
|
209
|
+
label: it[(http === null || http === void 0 ? void 0 : http.value) || 'name'],
|
|
210
|
+
disabled: false
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}));
|
|
214
|
+
case 19:
|
|
215
|
+
console.warn("".concat(_url, " is not return success result"));
|
|
216
|
+
return _context.abrupt("return", []);
|
|
217
|
+
case 21:
|
|
218
|
+
case "end":
|
|
219
|
+
return _context.stop();
|
|
220
|
+
}
|
|
221
|
+
}, _callee);
|
|
222
|
+
}));
|
|
223
|
+
return function (_x, _x2, _x3) {
|
|
224
|
+
return _ref.apply(this, arguments);
|
|
225
|
+
};
|
|
226
|
+
}(), []);
|
|
227
|
+
var httpOptions = useAsyncMemo( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
228
|
+
var _httpOptions;
|
|
229
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
230
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
231
|
+
case 0:
|
|
232
|
+
_httpOptions = (sourceHttp || targetHttp).map(function (it) {
|
|
233
|
+
if (it && it.url) {
|
|
234
|
+
getEnumDataByUrl(deepClone(it), '', (it === null || it === void 0 ? void 0 : it.isPagination) && pageRef.current).then(function (res) {
|
|
235
|
+
return res;
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
return [];
|
|
239
|
+
});
|
|
240
|
+
return _context2.abrupt("return", _httpOptions);
|
|
241
|
+
case 2:
|
|
242
|
+
case "end":
|
|
243
|
+
return _context2.stop();
|
|
244
|
+
}
|
|
245
|
+
}, _callee2);
|
|
246
|
+
})), [sourceHttp, targetHttp]);
|
|
247
|
+
var myOptions = React.useMemo(function () {
|
|
248
|
+
var _options = options;
|
|
249
|
+
httpOptions && httpOptions.forEach(function (p, i) {
|
|
250
|
+
if (p && p.length > 0) {
|
|
251
|
+
_options[i] = p;
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
return _options;
|
|
255
|
+
}, [options, httpOptions]);
|
|
256
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Row, {
|
|
257
|
+
gutter: 16
|
|
258
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
259
|
+
span: 8
|
|
241
260
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
242
261
|
label: tr('数据源'),
|
|
243
262
|
name: 'dataSource',
|
|
244
263
|
required: true
|
|
245
264
|
}, /*#__PURE__*/React.createElement(_Select, {
|
|
246
|
-
options: sourceOpts,
|
|
247
265
|
value: source,
|
|
248
266
|
onChange: function onChange(val) {
|
|
249
267
|
return setSource(val);
|
|
250
268
|
},
|
|
269
|
+
options: myOptions[0],
|
|
251
270
|
allowClear: true
|
|
252
|
-
})), /*#__PURE__*/React.createElement(
|
|
271
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
272
|
+
span: 8
|
|
273
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
253
274
|
name: tr('defaultSource'),
|
|
254
275
|
colon: false
|
|
255
276
|
}, /*#__PURE__*/React.createElement(_Select, {
|
|
@@ -257,30 +278,35 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
257
278
|
onChange: function onChange(val) {
|
|
258
279
|
return setDefaultSource(val);
|
|
259
280
|
},
|
|
281
|
+
options: myOptions[1],
|
|
260
282
|
allowClear: true
|
|
261
|
-
})), /*#__PURE__*/React.createElement(
|
|
283
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
284
|
+
span: 8
|
|
285
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
262
286
|
colon: false
|
|
263
287
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
264
288
|
className: "ml-2",
|
|
265
289
|
type: "link",
|
|
266
290
|
icon: /*#__PURE__*/React.createElement(LinkOutlined, null),
|
|
267
291
|
onClick: function onClick() {}
|
|
268
|
-
}, tr('测试连接')))), isSource && source === 'Kafka' && /*#__PURE__*/React.createElement(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
292
|
+
}, tr('测试连接'))))), isSource && source === 'Kafka' && /*#__PURE__*/React.createElement(_Row, {
|
|
293
|
+
gutter: 16
|
|
294
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
295
|
+
span: 8
|
|
272
296
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
273
297
|
label: tr('消费策略'),
|
|
274
298
|
name: 'autoOffsetReset',
|
|
275
299
|
required: true
|
|
276
300
|
}, /*#__PURE__*/React.createElement(_Select, {
|
|
277
|
-
options: strategyOpts,
|
|
278
301
|
value: autoOffsetReset,
|
|
279
302
|
onChange: function onChange(val) {
|
|
280
303
|
return setAutoOffsetReset(val);
|
|
281
304
|
},
|
|
305
|
+
options: myOptions[2],
|
|
282
306
|
allowClear: true
|
|
283
|
-
})), /*#__PURE__*/React.createElement(
|
|
307
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
308
|
+
span: 8
|
|
309
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
284
310
|
label: tr('批间隔'),
|
|
285
311
|
name: 'batchDuration',
|
|
286
312
|
required: true
|
|
@@ -290,10 +316,10 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
290
316
|
var _e$target;
|
|
291
317
|
return setBatchDuration(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
292
318
|
}
|
|
293
|
-
}))), isSource && (source === 'PgSql' || source === 'SqlServer') && /*#__PURE__*/React.createElement(
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
319
|
+
})))), isSource && (source === 'PgSql' || source === 'SqlServer') && /*#__PURE__*/React.createElement(_Row, {
|
|
320
|
+
gutter: 16
|
|
321
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
322
|
+
span: 8
|
|
297
323
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
298
324
|
label: 'fetch size',
|
|
299
325
|
name: 'fetchSize',
|
|
@@ -304,7 +330,9 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
304
330
|
var _e$target2;
|
|
305
331
|
return setFetchSize(e === null || e === void 0 ? void 0 : (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.value);
|
|
306
332
|
}
|
|
307
|
-
})), /*#__PURE__*/React.createElement(
|
|
333
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
334
|
+
span: 8
|
|
335
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
308
336
|
label: 'sql',
|
|
309
337
|
name: 'sql',
|
|
310
338
|
required: true
|
|
@@ -314,7 +342,7 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
314
342
|
var _e$target3;
|
|
315
343
|
return setSql(e === null || e === void 0 ? void 0 : (_e$target3 = e.target) === null || _e$target3 === void 0 ? void 0 : _e$target3.value);
|
|
316
344
|
}
|
|
317
|
-
}))), isSource && source === 'Minio' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
345
|
+
})))), isSource && source === 'Minio' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormItem, {
|
|
318
346
|
label: tr('上传文件'),
|
|
319
347
|
name: 'filepath',
|
|
320
348
|
required: true
|
|
@@ -326,7 +354,11 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
326
354
|
}
|
|
327
355
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
328
356
|
icon: /*#__PURE__*/React.createElement(UploadOutlined, null)
|
|
329
|
-
}, tr('上传'))))
|
|
357
|
+
}, tr('上传')))), /*#__PURE__*/React.createElement(_Row, {
|
|
358
|
+
gutter: 16
|
|
359
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
360
|
+
span: 16
|
|
361
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
330
362
|
label: tr('文件信息'),
|
|
331
363
|
name: 'headers'
|
|
332
364
|
}, /*#__PURE__*/React.createElement(Editable, {
|
|
@@ -346,7 +378,11 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
346
378
|
width: '100%',
|
|
347
379
|
marginTop: '2px'
|
|
348
380
|
}
|
|
349
|
-
}, tr('添加一行'))))), isTarget && source === 'Cassandra' && /*#__PURE__*/React.createElement(
|
|
381
|
+
}, tr('添加一行')))))), isTarget && source === 'Cassandra' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Row, {
|
|
382
|
+
gutter: 16
|
|
383
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
384
|
+
span: 8
|
|
385
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
350
386
|
label: tr('键空间'),
|
|
351
387
|
name: 'keyspace',
|
|
352
388
|
required: true
|
|
@@ -355,11 +391,10 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
355
391
|
onChange: function onChange(val) {
|
|
356
392
|
return setKeyspace(val);
|
|
357
393
|
},
|
|
394
|
+
options: myOptions[2],
|
|
358
395
|
allowClear: true
|
|
359
|
-
})), /*#__PURE__*/React.createElement(
|
|
360
|
-
|
|
361
|
-
display: 'flex'
|
|
362
|
-
}
|
|
396
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
397
|
+
span: 8
|
|
363
398
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
364
399
|
label: tr('数据表'),
|
|
365
400
|
name: 'dtname',
|
|
@@ -369,18 +404,21 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
369
404
|
onChange: function onChange(val) {
|
|
370
405
|
return setDtname(val);
|
|
371
406
|
},
|
|
407
|
+
options: myOptions[3],
|
|
372
408
|
allowClear: true
|
|
373
|
-
})), /*#__PURE__*/React.createElement(
|
|
409
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
410
|
+
span: 8
|
|
411
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
374
412
|
colon: false
|
|
375
413
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
376
414
|
className: "ml-2",
|
|
377
415
|
type: "link",
|
|
378
416
|
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
|
379
417
|
onClick: function onClick() {}
|
|
380
|
-
}, tr('手动建表'))))), isTarget && (source === 'PgSql' || source === 'SqlServer') && /*#__PURE__*/React.createElement(
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
418
|
+
}, tr('手动建表')))))), isTarget && (source === 'PgSql' || source === 'SqlServer') && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Row, {
|
|
419
|
+
gutter: 16
|
|
420
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
421
|
+
span: 8
|
|
384
422
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
385
423
|
label: 'schema',
|
|
386
424
|
name: 'schema',
|
|
@@ -390,8 +428,11 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
390
428
|
onChange: function onChange(val) {
|
|
391
429
|
return setSchema(val);
|
|
392
430
|
},
|
|
431
|
+
options: myOptions[4],
|
|
393
432
|
allowClear: true
|
|
394
|
-
})), /*#__PURE__*/React.createElement(
|
|
433
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
434
|
+
span: 8
|
|
435
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
395
436
|
label: tr('数据库'),
|
|
396
437
|
name: 'dbname',
|
|
397
438
|
required: true
|
|
@@ -400,11 +441,12 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
400
441
|
onChange: function onChange(val) {
|
|
401
442
|
return setDbname(val);
|
|
402
443
|
},
|
|
444
|
+
options: myOptions[5],
|
|
403
445
|
allowClear: true
|
|
404
|
-
}))), /*#__PURE__*/React.createElement(
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
446
|
+
})))), /*#__PURE__*/React.createElement(_Row, {
|
|
447
|
+
gutter: 16
|
|
448
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
449
|
+
span: 8
|
|
408
450
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
409
451
|
label: tr('数据表'),
|
|
410
452
|
name: 'dtname',
|
|
@@ -414,15 +456,22 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
414
456
|
onChange: function onChange(val) {
|
|
415
457
|
return setDtname(val);
|
|
416
458
|
},
|
|
459
|
+
options: myOptions[6],
|
|
417
460
|
allowClear: true
|
|
418
|
-
})), /*#__PURE__*/React.createElement(
|
|
461
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
462
|
+
span: 8
|
|
463
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
419
464
|
colon: false
|
|
420
465
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
421
466
|
className: "ml-2",
|
|
422
467
|
type: "link",
|
|
423
468
|
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
|
424
469
|
onClick: function onClick() {}
|
|
425
|
-
}, tr('手动建表'))))), isTarget && source === 'Minio' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
470
|
+
}, tr('手动建表')))))), isTarget && source === 'Minio' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Row, {
|
|
471
|
+
gutter: 16
|
|
472
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
473
|
+
span: 16
|
|
474
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
426
475
|
label: tr('文件路径'),
|
|
427
476
|
name: 'filepath',
|
|
428
477
|
required: true
|
|
@@ -431,7 +480,7 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
431
480
|
onChange: function onChange(e) {
|
|
432
481
|
return setFilePath(e.target.value);
|
|
433
482
|
}
|
|
434
|
-
}))));
|
|
483
|
+
}))))));
|
|
435
484
|
};
|
|
436
485
|
export default SourceConfig;
|
|
437
486
|
var FormItem = function FormItem(props) {
|