Unverified Commit fbaa3dc8 authored by aiwenmo's avatar aiwenmo Committed by GitHub

[Fix-2593] [metadata] Fix database update bug and studio console bug (#2594)

* [Fix-2593] [metadata] Fix database update bug and studio console bug * Remove useless code --------- Co-authored-by: 's avatarwenmo <32723967+wenmo@users.noreply.github.com>
parent 175cd494
......@@ -96,18 +96,12 @@ public class DataBaseServiceImpl extends SuperServiceImpl<DataBaseMapper, DataBa
if (Asserts.isNull(dataBase)) {
return false;
}
if (Asserts.isNull(dataBase.getId())) {
try {
checkHeartBeat(dataBase);
} finally {
try {
checkHeartBeat(dataBase);
} finally {
if (Asserts.isNull(dataBase.getId())) {
return save(dataBase);
}
} else {
DataBase dataBaseInfo = getById(dataBase.getId());
dataBase.setConnectConfig(dataBaseInfo.getConnectConfig());
try {
checkHeartBeat(dataBase);
} finally {
} else {
return updateById(dataBase);
}
}
......
......@@ -28,16 +28,14 @@ import { connect } from '@@/exports';
import { PlusOutlined } from '@ant-design/icons';
import { ConfigProvider, Space, Tabs } from 'antd';
import React from 'react';
import {isProjectTabs} from "@/pages/DataStudio/function";
export type BottomContainerProps = {
size: number;
height: number | string;
};
const BottomContainer: React.FC<BottomContainerProps> = (props: any) => {
const { dispatch, size, bottomContainer, height, tabs: { panes, activeKey }, } = props;
const { dispatch, size, bottomContainer, height } = props;
const width = document.documentElement.clientWidth - VIEW.sideWidth * 2;
const isProject = isProjectTabs(panes, activeKey);
/**
* 侧边栏最小化
......@@ -219,24 +217,21 @@ const BottomContainer: React.FC<BottomContainerProps> = (props: any) => {
handlerMinimize={handleMinimize}
maxWidth={width}
>
{!isProject &&
< Tabs
< Tabs
activeKey={
bottomContainer.selectKey +
'/' +
(bottomContainer.selectSubKey[bottomContainer.selectKey]
? bottomContainer.selectSubKey[bottomContainer.selectKey]
: '')
}
bottomContainer.selectKey +
'/' +
(bottomContainer.selectSubKey[bottomContainer.selectKey]
? bottomContainer.selectSubKey[bottomContainer.selectKey]
: '')
}
items={renderItems()}
tabBarStyle={{display: 'none'}}
/>
}
/>
</MovableSidebar>
);
};
export default connect(({ Studio }: { Studio: StateType }) => ({
bottomContainer: Studio.bottomContainer,
tabs: Studio.tabs
}))(BottomContainer);
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