|
@@ -259,12 +259,12 @@ const DatasourceManage = forwardRef(({ dataType }, ref) => {
|
|
|
setScheamData(dataList)
|
|
|
}
|
|
|
|
|
|
- const fetchAilabDataPreview = async (key, type) => {
|
|
|
+ const fetchAilabDataPreview = async (params, type) => {
|
|
|
setContentLoading(true)
|
|
|
const { data } =
|
|
|
type === 'ailab'
|
|
|
- ? await ailabTablePreview(key)
|
|
|
- : await lakeTablePreview(key)
|
|
|
+ ? await ailabTablePreview(params)
|
|
|
+ : await lakeTablePreview(params)
|
|
|
if (data.code === 200) {
|
|
|
handleContent(data.data)
|
|
|
} else {
|
|
@@ -273,10 +273,10 @@ const DatasourceManage = forwardRef(({ dataType }, ref) => {
|
|
|
setContentLoading(false)
|
|
|
}
|
|
|
|
|
|
- const fetchAilabSchema = async (key, type) => {
|
|
|
+ const fetchAilabSchema = async (params, type) => {
|
|
|
setSchemaLoading(true)
|
|
|
const { data } =
|
|
|
- type === 'ailab' ? await ailabSchema(key) : await lakeSchema(key)
|
|
|
+ type === 'ailab' ? await ailabSchema(params) : await lakeSchema(params)
|
|
|
if (data.code === 200) {
|
|
|
handleSchema(data.data)
|
|
|
} else {
|
|
@@ -291,9 +291,9 @@ const DatasourceManage = forwardRef(({ dataType }, ref) => {
|
|
|
setDataPreviewVisible(true)
|
|
|
}
|
|
|
|
|
|
- const watchLakeData = async table_name => {
|
|
|
- fetchAilabDataPreview(table_name, 'lake')
|
|
|
- fetchAilabSchema(table_name, 'lake')
|
|
|
+ const watchLakeData = async params => {
|
|
|
+ fetchAilabDataPreview(params, 'lake')
|
|
|
+ fetchAilabSchema(params, 'lake')
|
|
|
setDataPreviewVisible(true)
|
|
|
}
|
|
|
|
|
@@ -502,7 +502,10 @@ const DatasourceManage = forwardRef(({ dataType }, ref) => {
|
|
|
<Space size="middle">
|
|
|
<Button
|
|
|
onClick={() => {
|
|
|
- watchLakeData(record.datatable_name)
|
|
|
+ watchLakeData({
|
|
|
+ db_name: record.database_name,
|
|
|
+ table_name: record.datatable_name,
|
|
|
+ })
|
|
|
}}
|
|
|
type="link">
|
|
|
查看
|
|
@@ -577,7 +580,7 @@ const DatasourceManage = forwardRef(({ dataType }, ref) => {
|
|
|
dataSource={contentData}
|
|
|
bordered
|
|
|
loading={contentLoading}
|
|
|
- scroll={{ x: contentCols.length * 120 }}
|
|
|
+ scroll={{ x: contentCols.length * 200 }}
|
|
|
/>
|
|
|
</TabPane>
|
|
|
<TabPane
|
|
@@ -589,7 +592,7 @@ const DatasourceManage = forwardRef(({ dataType }, ref) => {
|
|
|
dataSource={schemaData}
|
|
|
bordered
|
|
|
loading={schemaLoading}
|
|
|
- scroll={{ x: schemaCols.length * 120 }}
|
|
|
+ scroll={{ x: schemaCols.length * 200 }}
|
|
|
/>
|
|
|
</TabPane>
|
|
|
</Tabs>
|