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 ...@@ -96,18 +96,12 @@ public class DataBaseServiceImpl extends SuperServiceImpl<DataBaseMapper, DataBa
if (Asserts.isNull(dataBase)) { if (Asserts.isNull(dataBase)) {
return false; return false;
} }
if (Asserts.isNull(dataBase.getId())) {
try { try {
checkHeartBeat(dataBase); checkHeartBeat(dataBase);
} finally { } finally {
if (Asserts.isNull(dataBase.getId())) {
return save(dataBase); return save(dataBase);
}
} else { } else {
DataBase dataBaseInfo = getById(dataBase.getId());
dataBase.setConnectConfig(dataBaseInfo.getConnectConfig());
try {
checkHeartBeat(dataBase);
} finally {
return updateById(dataBase); return updateById(dataBase);
} }
} }
......
...@@ -28,16 +28,14 @@ import { connect } from '@@/exports'; ...@@ -28,16 +28,14 @@ import { connect } from '@@/exports';
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import { ConfigProvider, Space, Tabs } from 'antd'; import { ConfigProvider, Space, Tabs } from 'antd';
import React from 'react'; import React from 'react';
import {isProjectTabs} from "@/pages/DataStudio/function";
export type BottomContainerProps = { export type BottomContainerProps = {
size: number; size: number;
height: number | string; height: number | string;
}; };
const BottomContainer: React.FC<BottomContainerProps> = (props: any) => { 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 width = document.documentElement.clientWidth - VIEW.sideWidth * 2;
const isProject = isProjectTabs(panes, activeKey);
/** /**
* 侧边栏最小化 * 侧边栏最小化
...@@ -219,7 +217,6 @@ const BottomContainer: React.FC<BottomContainerProps> = (props: any) => { ...@@ -219,7 +217,6 @@ const BottomContainer: React.FC<BottomContainerProps> = (props: any) => {
handlerMinimize={handleMinimize} handlerMinimize={handleMinimize}
maxWidth={width} maxWidth={width}
> >
{!isProject &&
< Tabs < Tabs
activeKey={ activeKey={
bottomContainer.selectKey + bottomContainer.selectKey +
...@@ -231,12 +228,10 @@ const BottomContainer: React.FC<BottomContainerProps> = (props: any) => { ...@@ -231,12 +228,10 @@ const BottomContainer: React.FC<BottomContainerProps> = (props: any) => {
items={renderItems()} items={renderItems()}
tabBarStyle={{display: 'none'}} tabBarStyle={{display: 'none'}}
/> />
}
</MovableSidebar> </MovableSidebar>
); );
}; };
export default connect(({ Studio }: { Studio: StateType }) => ({ export default connect(({ Studio }: { Studio: StateType }) => ({
bottomContainer: Studio.bottomContainer, bottomContainer: Studio.bottomContainer,
tabs: Studio.tabs
}))(BottomContainer); }))(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