ronds-metadata 1.3.61 → 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";
|
|
14
|
-
import
|
|
19
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
20
|
+
import { tr } from '../../../../framework/locale/index';
|
|
15
21
|
import { LinkOutlined, UploadOutlined, PlusOutlined } from '@ant-design/icons';
|
|
16
22
|
import React from 'react';
|
|
17
|
-
import Editable from '
|
|
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),
|
|
@@ -149,22 +129,148 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
149
129
|
_React$useState24 = _slicedToArray(_React$useState23, 2),
|
|
150
130
|
filePath = _React$useState24[0],
|
|
151
131
|
setFilePath = _React$useState24[1];
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
132
|
+
// http 调用接口
|
|
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
|
|
156
260
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
157
261
|
label: tr('数据源'),
|
|
158
262
|
name: 'dataSource',
|
|
159
263
|
required: true
|
|
160
264
|
}, /*#__PURE__*/React.createElement(_Select, {
|
|
161
|
-
options: sourceOpts,
|
|
162
265
|
value: source,
|
|
163
266
|
onChange: function onChange(val) {
|
|
164
267
|
return setSource(val);
|
|
165
268
|
},
|
|
269
|
+
options: myOptions[0],
|
|
166
270
|
allowClear: true
|
|
167
|
-
})), /*#__PURE__*/React.createElement(
|
|
271
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
272
|
+
span: 8
|
|
273
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
168
274
|
name: tr('defaultSource'),
|
|
169
275
|
colon: false
|
|
170
276
|
}, /*#__PURE__*/React.createElement(_Select, {
|
|
@@ -172,30 +278,35 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
172
278
|
onChange: function onChange(val) {
|
|
173
279
|
return setDefaultSource(val);
|
|
174
280
|
},
|
|
281
|
+
options: myOptions[1],
|
|
175
282
|
allowClear: true
|
|
176
|
-
})), /*#__PURE__*/React.createElement(
|
|
283
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
284
|
+
span: 8
|
|
285
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
177
286
|
colon: false
|
|
178
287
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
179
288
|
className: "ml-2",
|
|
180
289
|
type: "link",
|
|
181
290
|
icon: /*#__PURE__*/React.createElement(LinkOutlined, null),
|
|
182
291
|
onClick: function onClick() {}
|
|
183
|
-
}, tr('测试连接')))), isSource && source === 'Kafka' && /*#__PURE__*/React.createElement(
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
292
|
+
}, tr('测试连接'))))), isSource && source === 'Kafka' && /*#__PURE__*/React.createElement(_Row, {
|
|
293
|
+
gutter: 16
|
|
294
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
295
|
+
span: 8
|
|
187
296
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
188
297
|
label: tr('消费策略'),
|
|
189
298
|
name: 'autoOffsetReset',
|
|
190
299
|
required: true
|
|
191
300
|
}, /*#__PURE__*/React.createElement(_Select, {
|
|
192
|
-
options: strategyOpts,
|
|
193
301
|
value: autoOffsetReset,
|
|
194
302
|
onChange: function onChange(val) {
|
|
195
303
|
return setAutoOffsetReset(val);
|
|
196
304
|
},
|
|
305
|
+
options: myOptions[2],
|
|
197
306
|
allowClear: true
|
|
198
|
-
})), /*#__PURE__*/React.createElement(
|
|
307
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
308
|
+
span: 8
|
|
309
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
199
310
|
label: tr('批间隔'),
|
|
200
311
|
name: 'batchDuration',
|
|
201
312
|
required: true
|
|
@@ -205,10 +316,10 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
205
316
|
var _e$target;
|
|
206
317
|
return setBatchDuration(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
207
318
|
}
|
|
208
|
-
}))), isSource && (source === 'PgSql' || source === 'SqlServer') && /*#__PURE__*/React.createElement(
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
319
|
+
})))), isSource && (source === 'PgSql' || source === 'SqlServer') && /*#__PURE__*/React.createElement(_Row, {
|
|
320
|
+
gutter: 16
|
|
321
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
322
|
+
span: 8
|
|
212
323
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
213
324
|
label: 'fetch size',
|
|
214
325
|
name: 'fetchSize',
|
|
@@ -219,7 +330,9 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
219
330
|
var _e$target2;
|
|
220
331
|
return setFetchSize(e === null || e === void 0 ? void 0 : (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.value);
|
|
221
332
|
}
|
|
222
|
-
})), /*#__PURE__*/React.createElement(
|
|
333
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
334
|
+
span: 8
|
|
335
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
223
336
|
label: 'sql',
|
|
224
337
|
name: 'sql',
|
|
225
338
|
required: true
|
|
@@ -229,7 +342,7 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
229
342
|
var _e$target3;
|
|
230
343
|
return setSql(e === null || e === void 0 ? void 0 : (_e$target3 = e.target) === null || _e$target3 === void 0 ? void 0 : _e$target3.value);
|
|
231
344
|
}
|
|
232
|
-
}))), 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, {
|
|
233
346
|
label: tr('上传文件'),
|
|
234
347
|
name: 'filepath',
|
|
235
348
|
required: true
|
|
@@ -241,7 +354,11 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
241
354
|
}
|
|
242
355
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
243
356
|
icon: /*#__PURE__*/React.createElement(UploadOutlined, null)
|
|
244
|
-
}, tr('上传'))))
|
|
357
|
+
}, tr('上传')))), /*#__PURE__*/React.createElement(_Row, {
|
|
358
|
+
gutter: 16
|
|
359
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
360
|
+
span: 16
|
|
361
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
245
362
|
label: tr('文件信息'),
|
|
246
363
|
name: 'headers'
|
|
247
364
|
}, /*#__PURE__*/React.createElement(Editable, {
|
|
@@ -261,7 +378,11 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
261
378
|
width: '100%',
|
|
262
379
|
marginTop: '2px'
|
|
263
380
|
}
|
|
264
|
-
}, 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, {
|
|
265
386
|
label: tr('键空间'),
|
|
266
387
|
name: 'keyspace',
|
|
267
388
|
required: true
|
|
@@ -270,11 +391,10 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
270
391
|
onChange: function onChange(val) {
|
|
271
392
|
return setKeyspace(val);
|
|
272
393
|
},
|
|
394
|
+
options: myOptions[2],
|
|
273
395
|
allowClear: true
|
|
274
|
-
})), /*#__PURE__*/React.createElement(
|
|
275
|
-
|
|
276
|
-
display: 'flex'
|
|
277
|
-
}
|
|
396
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
397
|
+
span: 8
|
|
278
398
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
279
399
|
label: tr('数据表'),
|
|
280
400
|
name: 'dtname',
|
|
@@ -284,18 +404,21 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
284
404
|
onChange: function onChange(val) {
|
|
285
405
|
return setDtname(val);
|
|
286
406
|
},
|
|
407
|
+
options: myOptions[3],
|
|
287
408
|
allowClear: true
|
|
288
|
-
})), /*#__PURE__*/React.createElement(
|
|
409
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
410
|
+
span: 8
|
|
411
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
289
412
|
colon: false
|
|
290
413
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
291
414
|
className: "ml-2",
|
|
292
415
|
type: "link",
|
|
293
416
|
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
|
294
417
|
onClick: function onClick() {}
|
|
295
|
-
}, tr('手动建表'))))), isTarget && (source === 'PgSql' || source === 'SqlServer') && /*#__PURE__*/React.createElement(
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
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
|
|
299
422
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
300
423
|
label: 'schema',
|
|
301
424
|
name: 'schema',
|
|
@@ -305,8 +428,11 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
305
428
|
onChange: function onChange(val) {
|
|
306
429
|
return setSchema(val);
|
|
307
430
|
},
|
|
431
|
+
options: myOptions[4],
|
|
308
432
|
allowClear: true
|
|
309
|
-
})), /*#__PURE__*/React.createElement(
|
|
433
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
434
|
+
span: 8
|
|
435
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
310
436
|
label: tr('数据库'),
|
|
311
437
|
name: 'dbname',
|
|
312
438
|
required: true
|
|
@@ -315,11 +441,12 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
315
441
|
onChange: function onChange(val) {
|
|
316
442
|
return setDbname(val);
|
|
317
443
|
},
|
|
444
|
+
options: myOptions[5],
|
|
318
445
|
allowClear: true
|
|
319
|
-
}))), /*#__PURE__*/React.createElement(
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
446
|
+
})))), /*#__PURE__*/React.createElement(_Row, {
|
|
447
|
+
gutter: 16
|
|
448
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
449
|
+
span: 8
|
|
323
450
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
324
451
|
label: tr('数据表'),
|
|
325
452
|
name: 'dtname',
|
|
@@ -329,15 +456,22 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
329
456
|
onChange: function onChange(val) {
|
|
330
457
|
return setDtname(val);
|
|
331
458
|
},
|
|
459
|
+
options: myOptions[6],
|
|
332
460
|
allowClear: true
|
|
333
|
-
})), /*#__PURE__*/React.createElement(
|
|
461
|
+
}))), /*#__PURE__*/React.createElement(_Col, {
|
|
462
|
+
span: 8
|
|
463
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
334
464
|
colon: false
|
|
335
465
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
336
466
|
className: "ml-2",
|
|
337
467
|
type: "link",
|
|
338
468
|
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
|
339
469
|
onClick: function onClick() {}
|
|
340
|
-
}, 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, {
|
|
341
475
|
label: tr('文件路径'),
|
|
342
476
|
name: 'filepath',
|
|
343
477
|
required: true
|
|
@@ -346,7 +480,7 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
346
480
|
onChange: function onChange(e) {
|
|
347
481
|
return setFilePath(e.target.value);
|
|
348
482
|
}
|
|
349
|
-
}))));
|
|
483
|
+
}))))));
|
|
350
484
|
};
|
|
351
485
|
export default SourceConfig;
|
|
352
486
|
var FormItem = function FormItem(props) {
|