mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix: 修复APILark数据源
This commit is contained in:
@@ -1275,6 +1275,25 @@ public class DatasourceServer implements DatasourceApi {
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, String>> multidimensionalTables(Map<String, String> request) throws DEException {
|
||||
List<ApiDefinition> paramsList = new ArrayList<>();
|
||||
ApiDefinition apiDefinition = JsonUtil.parseObject(new String(java.util.Base64.getDecoder().decode(request.get("data"))), ApiDefinition.class);
|
||||
paramsList.add(apiDefinition);
|
||||
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||
DatasourceDTO datasource = new DatasourceDTO();
|
||||
datasource.setConfiguration(JsonUtil.toJSONString(paramsList).toString());
|
||||
datasourceRequest.setDatasource(datasource);
|
||||
List<Map<String, String>> result = new ArrayList<>();
|
||||
if (request.keySet().contains("type") && request.get("type").equals("tables")) {
|
||||
result = (List<Map<String, String>>) invokeMethod(request.get("dsType"), "listTables", DatasourceRequest.class, datasourceRequest);
|
||||
}
|
||||
if (request.keySet().contains("type") && request.get("type").equals("views")) {
|
||||
result = (List<Map<String, String>>) invokeMethod(request.get("dsType"), "listViews", DatasourceRequest.class, datasourceRequest);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private Method getMethod(String dsType, String methodName, Class<?> classes) {
|
||||
Method method = null;
|
||||
try {
|
||||
|
||||
@@ -943,7 +943,7 @@ export default {
|
||||
field_description: 'Field remark',
|
||||
dl: 'Data lake',
|
||||
other: 'Other',
|
||||
local_file: 'Local file',
|
||||
local_file: 'File',
|
||||
select_ds_type: 'Select Datasource type',
|
||||
select_ds: 'Select Datasource',
|
||||
ds_info: 'Enter Datasource information',
|
||||
@@ -998,6 +998,9 @@ export default {
|
||||
oracle_sid: 'SID',
|
||||
oracle_service_name: 'Service name',
|
||||
get_schema: 'Get Schema',
|
||||
get_tables: 'Get data tables',
|
||||
get_views: 'Get views',
|
||||
view: 'View',
|
||||
schema: 'Schema',
|
||||
charset: 'Character set',
|
||||
targetCharset: 'Target character set',
|
||||
@@ -1129,7 +1132,13 @@ export default {
|
||||
sync_table: 'Synchronize the specified table',
|
||||
req_completed: 'Request successful',
|
||||
sync_rate: 'Update frequency',
|
||||
has_same_ds: 'There is a Datasource with the same configuration, confirm to save? '
|
||||
has_same_ds: 'There is a Datasource with the same configuration, confirm to save? ',
|
||||
app_token: 'app_token',
|
||||
input_app_token: 'Please enter the app_token',
|
||||
table_id: 'table_id',
|
||||
input_table_id: 'Please select a data table',
|
||||
view_id: 'view_id',
|
||||
input_view_id: 'Please select a view'
|
||||
},
|
||||
chart: {
|
||||
align: 'Alignment',
|
||||
|
||||
@@ -913,7 +913,7 @@ export default {
|
||||
field_description: '字段備註',
|
||||
dl: '資料湖',
|
||||
other: '其他',
|
||||
local_file: '本地檔案',
|
||||
local_file: '檔案',
|
||||
select_ds_type: '選擇資料來源類型',
|
||||
select_ds: '選擇資料來源',
|
||||
ds_info: '錄入資料來源資訊',
|
||||
@@ -1098,7 +1098,13 @@ export default {
|
||||
sync_table: '同步指定表',
|
||||
req_completed: '請求成功',
|
||||
sync_rate: '更新頻率',
|
||||
has_same_ds: '存在相同配置資料來源,確認保存? '
|
||||
has_same_ds: '存在相同配置資料來源,確認保存? ',
|
||||
app_token: 'app_token',
|
||||
input_app_token: '請輸入app_token',
|
||||
table_id: 'table_id',
|
||||
input_table_id: '請選擇數據表',
|
||||
view_id: 'view_id',
|
||||
input_view_id: '請選擇視圖'
|
||||
},
|
||||
chart: {
|
||||
align: '對齊方式',
|
||||
@@ -3672,6 +3678,9 @@ export default {
|
||||
oracle_sid: 'SID',
|
||||
oracle_service_name: '服務名',
|
||||
get_schema: '取得Schema',
|
||||
get_tables: '獲取數據表',
|
||||
get_views: '獲取視圖',
|
||||
view: '視圖',
|
||||
schema: 'Schema',
|
||||
charset: '字符集',
|
||||
targetCharset: '目標字元集',
|
||||
|
||||
@@ -915,7 +915,7 @@ export default {
|
||||
field_description: '字段备注',
|
||||
dl: '数据湖',
|
||||
other: '其他',
|
||||
local_file: '本地文件',
|
||||
local_file: '文件',
|
||||
select_ds_type: '选择数据源类型',
|
||||
select_ds: '选择数据源',
|
||||
ds_info: '录入数据源信息',
|
||||
@@ -968,6 +968,9 @@ export default {
|
||||
oracle_sid: 'SID',
|
||||
oracle_service_name: '服务名',
|
||||
get_schema: '获取 Schema',
|
||||
get_tables: '获取数据表',
|
||||
get_views: '获取视图',
|
||||
view: '视图',
|
||||
schema: 'Schema',
|
||||
charset: '字符集',
|
||||
targetCharset: '目标字符集',
|
||||
@@ -1101,14 +1104,12 @@ export default {
|
||||
req_completed: '请求成功',
|
||||
sync_rate: '更新频率',
|
||||
has_same_ds: '存在相同配置数据源,确认保存?',
|
||||
table_addr: '表格地址',
|
||||
input_addr: '请输入表格地址',
|
||||
app_token: 'app_token',
|
||||
input_app_token: '请输入app_token',
|
||||
table_id: 'table_id',
|
||||
input_table_id: '请输入table_id',
|
||||
input_table_id: '请选择数据表',
|
||||
view_id: 'view_id',
|
||||
input_view_id: '请输入view_id'
|
||||
input_view_id: '请选择视图'
|
||||
},
|
||||
chart: {
|
||||
align: '对齐方式',
|
||||
|
||||
@@ -163,4 +163,7 @@ public interface DatasourceApi {
|
||||
@GetMapping("/simple/{id}")
|
||||
DsSimpleVO simple(@PathVariable("id") Long id);
|
||||
|
||||
@PostMapping("/multidimensionalTables")
|
||||
@Operation(summary = "获取多维表格列表")
|
||||
List<Map<String, String>> multidimensionalTables(@RequestBody Map<String, String> data) throws DEException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user