Unverified Commit bce0f34e authored by ZackYoung's avatar ZackYoung Committed by GitHub

[Optimize][Web]optimize_web_catalog (#2457)

* optimize_web_catalog * optimize_web_catalog * add_json_to_sql_tool
parent a08fb07a
...@@ -158,7 +158,7 @@ public class StudioController { ...@@ -158,7 +158,7 @@ public class StudioController {
} }
/** 获取 Meta Store Flink Column 信息 */ /** 获取 Meta Store Flink Column 信息 */
@GetMapping("/getMSFlinkColumns") @PostMapping("/getMSColumns")
@ApiOperation("Get Flink Column List") @ApiOperation("Get Flink Column List")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "envId", value = "envId", required = true, dataType = "Integer", paramType = "query"), @ApiImplicitParam(name = "envId", value = "envId", required = true, dataType = "Integer", paramType = "query"),
...@@ -176,16 +176,7 @@ public class StudioController { ...@@ -176,16 +176,7 @@ public class StudioController {
paramType = "query"), paramType = "query"),
@ApiImplicitParam(name = "table", value = "table", required = true, dataType = "String", paramType = "query") @ApiImplicitParam(name = "table", value = "table", required = true, dataType = "String", paramType = "query")
}) })
public Result<List<Column>> getMSFlinkColumns( public Result<List<Column>> getMSColumns(@RequestBody StudioMetaStoreDTO studioMetaStoreDTO) {
@RequestParam Integer envId, return Result.succeed(studioService.getMSColumns(studioMetaStoreDTO));
@RequestParam String catalog,
@RequestParam String database,
@RequestParam String table) {
StudioMetaStoreDTO studioMetaStoreDTO = new StudioMetaStoreDTO();
studioMetaStoreDTO.setEnvId(envId);
studioMetaStoreDTO.setCatalog(catalog);
studioMetaStoreDTO.setDatabase(database);
studioMetaStoreDTO.setTable(table);
return Result.succeed(studioService.getMSFlinkColumns(studioMetaStoreDTO));
} }
} }
...@@ -55,5 +55,5 @@ public interface StudioService { ...@@ -55,5 +55,5 @@ public interface StudioService {
Schema getMSSchemaInfo(StudioMetaStoreDTO studioMetaStoreDTO); Schema getMSSchemaInfo(StudioMetaStoreDTO studioMetaStoreDTO);
List<Column> getMSFlinkColumns(StudioMetaStoreDTO studioMetaStoreDTO); List<Column> getMSColumns(StudioMetaStoreDTO studioMetaStoreDTO);
} }
...@@ -188,12 +188,19 @@ public class StudioServiceImpl implements StudioService { ...@@ -188,12 +188,19 @@ public class StudioServiceImpl implements StudioService {
} }
@Override @Override
public List<Column> getMSFlinkColumns(StudioMetaStoreDTO studioMetaStoreDTO) { public List<Column> getMSColumns(StudioMetaStoreDTO studioMetaStoreDTO) {
List<Column> columns = new ArrayList<>();
if (!Dialect.isCommonSql(studioMetaStoreDTO.getDialect())) {
String catalogName = studioMetaStoreDTO.getCatalog(); String catalogName = studioMetaStoreDTO.getCatalog();
String database = studioMetaStoreDTO.getDatabase(); String database = studioMetaStoreDTO.getDatabase();
String tableName = studioMetaStoreDTO.getTable(); String tableName = studioMetaStoreDTO.getTable();
List<Column> columns = new ArrayList<>();
if (Dialect.isCommonSql(studioMetaStoreDTO.getDialect())) {
DataBase dataBase = dataBaseService.getById(studioMetaStoreDTO.getDatabaseId());
if (Asserts.isNotNull(dataBase)) {
Driver driver = Driver.build(dataBase.getDriverConfig());
columns.addAll(driver.listColumns(database, tableName));
}
} else {
String envSql = taskService.buildEnvSql(studioMetaStoreDTO); String envSql = taskService.buildEnvSql(studioMetaStoreDTO);
JobManager jobManager = getJobManager(studioMetaStoreDTO, envSql); JobManager jobManager = getJobManager(studioMetaStoreDTO, envSql);
CustomTableEnvironment customTableEnvironment = CustomTableEnvironment customTableEnvironment =
......
...@@ -415,6 +415,12 @@ export default { ...@@ -415,6 +415,12 @@ export default {
'pages.metadata.DataSearch': 'Data Search', 'pages.metadata.DataSearch': 'Data Search',
'pages.metadata.selectDatabase': 'Select Database', 'pages.metadata.selectDatabase': 'Select Database',
'pages.task.savePointPath': 'SavePoint Path', 'pages.task.savePointPath': 'SavePoint Path',
'pages.datastudio.catalog.catalogSelect': 'Please select catalog & database',
'pages.datastudio.catalog.tableInfo': 'Table Info',
'pages.datastudio.catalog.fieldInformation': 'Field Information',
'pages.datastudio.catalog.selectDatasource': 'Select Datasource',
'pages.datastudio.catalog.openMission': 'Open Mission',
/** /**
* *
* rc * rc
......
...@@ -394,10 +394,11 @@ export default { ...@@ -394,10 +394,11 @@ export default {
'pages.datastudio.label.version.rollback.flinksqlConfirm': 'pages.datastudio.label.version.rollback.flinksqlConfirm':
'确定回滚Flink SQL版本至【{versionId}】吗?', '确定回滚Flink SQL版本至【{versionId}】吗?',
'pages.datastudio.catalog.flinkSqlEnvSelect': '请选择 FlinkSqlEnv',
'pages.datastudio.catalog.catalogSelect': '请选择 catalog & database', 'pages.datastudio.catalog.catalogSelect': '请选择 catalog & database',
'pages.datastudio.catalog.tableInfo': '表信息', 'pages.datastudio.catalog.tableInfo': '表信息',
'pages.datastudio.catalog.fieldInformation': '字段信息', 'pages.datastudio.catalog.fieldInformation': '字段信息',
'pages.datastudio.catalog.selectDatasource': '请选择数据源',
'pages.datastudio.catalog.openMission': '请打开任务',
'pages.datastudio.print.table.inputTableName': '请选择表名', 'pages.datastudio.print.table.inputTableName': '请选择表名',
'pages.devops.jobinfo.localenv': '本地环境', 'pages.devops.jobinfo.localenv': '本地环境',
......
...@@ -17,13 +17,12 @@ ...@@ -17,13 +17,12 @@
* *
*/ */
import { TableDataNode } from '@/pages/DataStudio/LeftContainer/Catalog/data'; import {TableDataNode} from '@/pages/DataStudio/LeftContainer/Catalog/data';
import { MetaStoreTableType } from '@/pages/DataStudio/model'; import {StateType} from '@/pages/DataStudio/model';
import { BtnRoute } from '@/pages/DataStudio/route'; import {BtnRoute} from '@/pages/DataStudio/route';
import ColumnInfo from '@/pages/RegCenter/DataSource/components/DataSourceDetail/RightTagsRouter/SchemaDesc/ColumnInfo'; import ColumnInfo from '@/pages/RegCenter/DataSource/components/DataSourceDetail/RightTagsRouter/SchemaDesc/ColumnInfo';
import TableInfo from '@/pages/RegCenter/DataSource/components/DataSourceDetail/RightTagsRouter/SchemaDesc/TableInfo'; import TableInfo from '@/pages/RegCenter/DataSource/components/DataSourceDetail/RightTagsRouter/SchemaDesc/TableInfo';
import { l } from '@/utils/intl'; import {l} from '@/utils/intl';
import { useRequest } from '@@/exports';
import { import {
AppstoreOutlined, AppstoreOutlined,
BlockOutlined, BlockOutlined,
...@@ -32,18 +31,41 @@ import { ...@@ -32,18 +31,41 @@ import {
FunctionOutlined, FunctionOutlined,
TableOutlined TableOutlined
} from '@ant-design/icons'; } from '@ant-design/icons';
import { Button, Col, Empty, Modal, Row, Select, Spin, Tabs } from 'antd'; import {Button, Col, Empty, Modal, Row, Select, Spin, Tabs} from 'antd';
import { DataNode } from 'antd/es/tree'; import {DataNode} from 'antd/es/tree';
import DirectoryTree from 'antd/es/tree/DirectoryTree'; import DirectoryTree from 'antd/es/tree/DirectoryTree';
import { DefaultOptionType } from 'rc-select/lib/Select'; import {DefaultOptionType} from 'rc-select/lib/Select';
import React, { useEffect, useState } from 'react'; import React, {useEffect, useState} from 'react';
import { getMSCatalogs, getMSFlinkColumns, getMSSchemaInfo } from './service'; import {getMSCatalogs, getMSColumns, getMSSchemaInfo} from './service';
import {getCurrentData} from "@/pages/DataStudio/function";
import {DIALECT} from "@/services/constants";
import {isSql} from "@/pages/DataStudio/HeaderContainer/service";
import {connect} from "@umijs/max";
export const Catalog: React.FC = (props: any) => { const Catalog: React.FC = (props: connect) => {
const data = useRequest({ const {tabs} = props;
url: '/api/task/listFlinkSQLEnv' const currentData = getCurrentData(tabs.panes, tabs.activeKey);
}); if (!currentData) {
const [envId, setEnvId] = useState<number>(); return <Empty description={l("pages.datastudio.catalog.selectDatasource")}/>
}
const dialect = currentData?.dialect.toLowerCase() ?? "";
const fragment = currentData?.fragment ?? true;
let envId: number | undefined;
let databaseId: number | undefined;
let engine: string | undefined;
if (dialect === DIALECT.FLINKSQLENV) {
envId = currentData?.id;
engine = "Flink";
} else if (dialect === DIALECT.FLINK_SQL) {
envId = currentData?.envId;
engine = "Flink";
} else if (isSql(dialect)) {
databaseId = currentData?.databaseId;
if (!databaseId){
return <Empty description={l("pages.datastudio.catalog.openMission")}/>
}
}
envId = envId ?? -1;
const [catalogSelect, setCatalogSelect] = useState<DefaultOptionType[]>([]); const [catalogSelect, setCatalogSelect] = useState<DefaultOptionType[]>([]);
const [catalog, setCatalog] = useState<string>('default_catalog'); const [catalog, setCatalog] = useState<string>('default_catalog');
const [database, setDatabase] = useState<string>(''); const [database, setDatabase] = useState<string>('');
...@@ -54,45 +76,25 @@ export const Catalog: React.FC = (props: any) => { ...@@ -54,45 +76,25 @@ export const Catalog: React.FC = (props: any) => {
const [loading, setLoading] = useState<boolean>(false); const [loading, setLoading] = useState<boolean>(false);
const [columnData, setColumnData] = useState([]); const [columnData, setColumnData] = useState([]);
useEffect(() => { BtnRoute['menu.datastudio.catalog'][0].onClick = () => {
if (envId) { refreshMetaStoreTables();
setLoading(true);
setTreeData([]);
setCatalogSelect([]);
setDatabase('');
let param = {
envId: envId,
fragment: true,
dialect: 'FlinkSqlEnv'
};
getMSCatalogs(param).then((d) => {
setCatalogSelect(
(d as any[]).map((item) => {
setLoading(false);
return {
label: item.name,
options: (item.schemas as any[]).map((schema) => {
return {
label: schema.name,
value: item.name + '.' + schema.name
};
})
}; };
})
); useEffect(() => {
}); getCatalogs();
} }, [envId,databaseId]);
}, [envId]);
useEffect(() => { useEffect(() => {
if (table) { if (table) {
setLoading(true); setLoading(true);
setColumnData([]); setColumnData([]);
getMSFlinkColumns({ getMSColumns({
envId, envId,
catalog, catalog,
database, database,
table table,
dialect,
databaseId
}).then((res) => { }).then((res) => {
setLoading(false); setLoading(false);
setColumnData(res); setColumnData(res);
...@@ -116,42 +118,40 @@ export const Catalog: React.FC = (props: any) => { ...@@ -116,42 +118,40 @@ export const Catalog: React.FC = (props: any) => {
setDatabase(databaseTmp); setDatabase(databaseTmp);
let param = { let param = {
envId: envId, envId: envId,
fragment: true, fragment: fragment,
dialect: 'FlinkSqlEnv', dialect: dialect,
catalog: catalogTmp, catalog: catalogTmp,
database: databaseTmp database: databaseTmp,
databaseId
}; };
const result = getMSSchemaInfo(param); const result = getMSSchemaInfo(param);
result.then((res) => { result.then((res) => {
setLoading(false); setLoading(false);
const tables: MetaStoreTableType[] = []; const tables: any[] = [];
if (res.tables) { if (res.tables) {
for (let i = 0; i < res.tables.length; i++) { for (let i = 0; i < res.tables.length; i++) {
tables.push({ tables.push(res.tables[i]);
name: res.tables[i].name,
columns: res.tables[i].columns
});
} }
} }
const treeDataTmp: DataNode[] = []; const treeDataTmp: DataNode[] = [];
const tablesData: TableDataNode[] = []; const tablesData: TableDataNode[] = [];
for (let i = 0; i < tables.length; i++) { for (const t of tables) {
tablesData.push({ tablesData.push({
title: tables[i].name, title: t.name,
key: tables[i].name, key: t.name,
icon: <TableOutlined />, icon: <TableOutlined/>,
isLeaf: true, isLeaf: true,
isTable: true, isTable: true,
name: tables[i].name, name: t.name,
schema: databaseTmp, schema: databaseTmp,
catalog: catalog, catalog: catalog,
comment: '-', comment: t.comment,
type: '', type: t.type,
engine: 'Flink', engine: engine ?? t.engine,
options: '', options: t.options,
rows: -1, rows: t.rows,
createTime: '', createTime: t.createTime,
updateTime: '' updateTime: t.updateTime
}); });
} }
treeDataTmp.push({ treeDataTmp.push({
...@@ -166,7 +166,7 @@ export const Catalog: React.FC = (props: any) => { ...@@ -166,7 +166,7 @@ export const Catalog: React.FC = (props: any) => {
viewsData.push({ viewsData.push({
title: res.views[i], title: res.views[i],
key: res.views[i], key: res.views[i],
icon: <BlockOutlined />, icon: <BlockOutlined/>,
isLeaf: true isLeaf: true
}); });
} }
...@@ -183,7 +183,7 @@ export const Catalog: React.FC = (props: any) => { ...@@ -183,7 +183,7 @@ export const Catalog: React.FC = (props: any) => {
functionsData.push({ functionsData.push({
title: res.functions[i], title: res.functions[i],
key: res.functions[i], key: res.functions[i],
icon: <FunctionOutlined />, icon: <FunctionOutlined/>,
isLeaf: true isLeaf: true
}); });
} }
...@@ -200,7 +200,7 @@ export const Catalog: React.FC = (props: any) => { ...@@ -200,7 +200,7 @@ export const Catalog: React.FC = (props: any) => {
userFunctionsData.push({ userFunctionsData.push({
title: res.userFunctions[i], title: res.userFunctions[i],
key: res.userFunctions[i], key: res.userFunctions[i],
icon: <FunctionOutlined />, icon: <FunctionOutlined/>,
isLeaf: true isLeaf: true
}); });
} }
...@@ -217,7 +217,7 @@ export const Catalog: React.FC = (props: any) => { ...@@ -217,7 +217,7 @@ export const Catalog: React.FC = (props: any) => {
modulesData.push({ modulesData.push({
title: res.modules[i], title: res.modules[i],
key: res.modules[i], key: res.modules[i],
icon: <AppstoreOutlined />, icon: <AppstoreOutlined/>,
isLeaf: true isLeaf: true
}); });
} }
...@@ -232,19 +232,50 @@ export const Catalog: React.FC = (props: any) => { ...@@ -232,19 +232,50 @@ export const Catalog: React.FC = (props: any) => {
}); });
}; };
const refreshMetaStoreTables = () => { const getCatalogs = () => {
onRefreshTreeData(catalog + '.' + database); if (envId || databaseId) {
setLoading(true);
setTreeData([]);
setCatalogSelect([]);
setDatabase('');
let param = {
envId: envId,
fragment: fragment,
dialect: dialect,
databaseId
}; };
getMSCatalogs(param).then((d) => {
setCatalogSelect(
(d as any[]).map((item) => {
setLoading(false);
return {
label: item.name,
options: (item.schemas as any[]).map((schema) => {
return {
label: schema.name,
value: item.name + '.' + schema.name
};
})
};
})
);
});
}
}
BtnRoute['menu.datastudio.catalog'][0].onClick = () => { const refreshMetaStoreTables = () => {
refreshMetaStoreTables(); if (database) {
onRefreshTreeData(catalog + '.' + database);
} else {
getCatalogs();
}
}; };
const onChangeMetaStoreCatalogs = (value: string) => { const onChangeMetaStoreCatalogs = (value: string) => {
onRefreshTreeData(value); onRefreshTreeData(value);
}; };
const openColumnInfo = (e: React.MouseEvent, node: TableDataNode) => { const openColumnInfo = (_e: React.MouseEvent, node: TableDataNode) => {
if (node.isLeaf && node.isTable) { if (node.isLeaf && node.isTable) {
setTable(node.name); setTable(node.name);
setRow(node); setRow(node);
...@@ -259,20 +290,12 @@ export const Catalog: React.FC = (props: any) => { ...@@ -259,20 +290,12 @@ export const Catalog: React.FC = (props: any) => {
return ( return (
<Spin spinning={loading}> <Spin spinning={loading}>
<div style={{ paddingInline: 10 }}> <div style={{paddingInline: 10, paddingBlock: 5}}>
<Row> <Row style={{paddingBlock: 10}}>
<Col span={24}> <Col span={24}>
<Select
placeholder={l('pages.datastudio.catalog.flinkSqlEnvSelect')}
style={{ width: '100%' }}
onChange={setEnvId}
options={(data.data as any[])?.map((x) => {
return { value: x.id, label: x.name };
})}
/>
<Select <Select
value={database ? database : null} value={database ? database : null}
style={{ width: '100%' }} style={{width: '100%'}}
placeholder={l('pages.datastudio.catalog.catalogSelect')} placeholder={l('pages.datastudio.catalog.catalogSelect')}
optionLabelProp='label' optionLabelProp='label'
onChange={onChangeMetaStoreCatalogs} onChange={onChangeMetaStoreCatalogs}
...@@ -284,14 +307,14 @@ export const Catalog: React.FC = (props: any) => { ...@@ -284,14 +307,14 @@ export const Catalog: React.FC = (props: any) => {
{treeData.length > 0 ? ( {treeData.length > 0 ? (
<DirectoryTree <DirectoryTree
showIcon showIcon
switcherIcon={<DownOutlined />} switcherIcon={<DownOutlined/>}
treeData={treeData} treeData={treeData}
onRightClick={({ event, node }: any) => { onRightClick={({event, node}: any) => {
openColumnInfo(event, node); openColumnInfo(event, node);
}} }}
/> />
) : ( ) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} /> <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>
)} )}
</div> </div>
<Modal <Modal
...@@ -320,25 +343,25 @@ export const Catalog: React.FC = (props: any) => { ...@@ -320,25 +343,25 @@ export const Catalog: React.FC = (props: any) => {
key: 'tableInfo', key: 'tableInfo',
label: ( label: (
<span> <span>
<TableOutlined /> <TableOutlined/>
{l('pages.datastudio.catalog.tableInfo')} {l('pages.datastudio.catalog.tableInfo')}
</span> </span>
), ),
children: row ? ( children: row ? (
<TableInfo tableInfo={row} /> <TableInfo tableInfo={row}/>
) : ( ) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} /> <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>
) )
}, },
{ {
key: 'columnsInfo', key: 'columnsInfo',
label: ( label: (
<span> <span>
<CodepenOutlined /> <CodepenOutlined/>
{l('pages.datastudio.catalog.fieldInformation')} {l('pages.datastudio.catalog.fieldInformation')}
</span> </span>
), ),
children: <Spin spinning={loading}>{<ColumnInfo columnInfo={columnData} />}</Spin> children: <Spin spinning={loading}>{<ColumnInfo columnInfo={columnData}/>}</Spin>
} }
]} ]}
/> />
...@@ -346,3 +369,6 @@ export const Catalog: React.FC = (props: any) => { ...@@ -346,3 +369,6 @@ export const Catalog: React.FC = (props: any) => {
</Spin> </Spin>
); );
}; };
export default connect(({Studio}: { Studio: StateType }) => ({
tabs: Studio.tabs
}))(Catalog);
\ No newline at end of file
...@@ -27,6 +27,6 @@ export async function getMSSchemaInfo(params: StudioMetaStoreParam) { ...@@ -27,6 +27,6 @@ export async function getMSSchemaInfo(params: StudioMetaStoreParam) {
export async function getMSCatalogs(params: StudioMetaStoreParam) { export async function getMSCatalogs(params: StudioMetaStoreParam) {
return (await postAll('/api/studio/getMSCatalogs', params)).data; return (await postAll('/api/studio/getMSCatalogs', params)).data;
} }
export async function getMSFlinkColumns(params: StudioMetaStoreParam) { export async function getMSColumns(params: StudioMetaStoreParam) {
return (await getDataByParamsReturnResult('/api/studio/getMSFlinkColumns', params)).data; return (await postAll('/api/studio/getMSColumns', params)).data;
} }
...@@ -110,7 +110,7 @@ const CodeEditor: React.FC<EditorProps & any> = (props) => { ...@@ -110,7 +110,7 @@ const CodeEditor: React.FC<EditorProps & any> = (props) => {
language={'sql'} language={'sql'}
options={{ options={{
readOnlyMessage: { value: l('pages.datastudio.editor.onlyread') }, readOnlyMessage: { value: l('pages.datastudio.editor.onlyread') },
readOnly: currentData?.step == JOB_LIFE_CYCLE.ONLINE, readOnly: currentData?.step == JOB_LIFE_CYCLE.PUBLISH,
scrollBeyondLastLine: false, scrollBeyondLastLine: false,
wordWrap: 'on', wordWrap: 'on',
autoDetectHighContrast: true, autoDetectHighContrast: true,
......
...@@ -125,6 +125,7 @@ export type TaskDataBaseType = { ...@@ -125,6 +125,7 @@ export type TaskDataBaseType = {
step: number; step: number;
// Only common sql has(只有普通sql才有) // Only common sql has(只有普通sql才有)
databaseId?: number; databaseId?: number;
envId?: number;
}; };
export type TaskDataType = TaskDataBaseType & Record<string, any>; export type TaskDataType = TaskDataBaseType & Record<string, any>;
......
...@@ -23,7 +23,6 @@ import Lineage from '@/pages/DataStudio/BottomContainer/Lineage'; ...@@ -23,7 +23,6 @@ import Lineage from '@/pages/DataStudio/BottomContainer/Lineage';
import Result from '@/pages/DataStudio/BottomContainer/Result'; import Result from '@/pages/DataStudio/BottomContainer/Result';
import TableData from '@/pages/DataStudio/BottomContainer/TableData'; import TableData from '@/pages/DataStudio/BottomContainer/TableData';
import { isSql } from '@/pages/DataStudio/HeaderContainer/service'; import { isSql } from '@/pages/DataStudio/HeaderContainer/service';
import { Catalog } from '@/pages/DataStudio/LeftContainer/Catalog';
import DataSource from '@/pages/DataStudio/LeftContainer/DataSource'; import DataSource from '@/pages/DataStudio/LeftContainer/DataSource';
import Project from '@/pages/DataStudio/LeftContainer/Project'; import Project from '@/pages/DataStudio/LeftContainer/Project';
import { TabsPageSubType, TabsPageType } from '@/pages/DataStudio/model'; import { TabsPageSubType, TabsPageType } from '@/pages/DataStudio/model';
...@@ -59,6 +58,7 @@ import { ...@@ -59,6 +58,7 @@ import {
} from '@ant-design/icons'; } from '@ant-design/icons';
import { DiffEditor } from '@monaco-editor/react'; import { DiffEditor } from '@monaco-editor/react';
import { ReactNode } from 'react'; import { ReactNode } from 'react';
import Catalog from "@/pages/DataStudio/LeftContainer/Catalog";
import JsonToSql from "@/pages/DataStudio/BottomContainer/Tools/JsonToSql"; import JsonToSql from "@/pages/DataStudio/BottomContainer/Tools/JsonToSql";
export const LeftSide = [ export const LeftSide = [
......
...@@ -122,7 +122,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => { ...@@ -122,7 +122,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
const onChangeDataBase = (value: string | number) => { const onChangeDataBase = (value: string | number) => {
onRefreshTreeData(Number(value)); onRefreshTreeData(Number(value));
setRow(null); setRow(undefined);
}; };
const refeshDataBase = (value: string | number) => { const refeshDataBase = (value: string | number) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment