Skip to content

Commit

Permalink
PullRequest: 496 Fixes oceanbase/odc#3110
Browse files Browse the repository at this point in the history
Merge branch 'fix/dev-4.3.1-3110 of [email protected]:oceanbase/oceanbase-developer-center.git into dev-4.3.1

https://code.alipay.com/oceanbase/oceanbase-developer-center/pull_requests/496


Signed-off-by: 晓康 <[email protected]>


* Fixes oceanbase/odc#3110
  • Loading branch information
yezaoshu committed Aug 7, 2024
1 parent b40ca0e commit 94e3ebb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/component/Task/component/DatabaseSelecter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Icon, { DeleteOutlined } from '@ant-design/icons';
import { Empty, Popconfirm, Space, Spin, Tree, Typography, Checkbox, Tooltip } from 'antd';
import classnames from 'classnames';
import styles from './index.less';
import datasourceStatus from '@/store/datasourceStatus';

const { Text } = Typography;

Expand Down Expand Up @@ -52,6 +53,7 @@ const DatabaseSelecter: React.FC<IProps> = function ({
try {
const res = await listDatabases(projectId, null, null, null, null, null, null, true, null);
if (res?.contents) {
datasourceStatus.asyncUpdateStatus(res?.contents?.map((item) => item?.dataSource?.id));
setDatabaseList(res?.contents);
}
} catch (e) {
Expand Down
2 changes: 2 additions & 0 deletions src/component/Task/component/TableSelecter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { isNumber } from 'lodash';
import styles from './index.less';
import { EnvColorMap } from '@/constant';
import DataBaseStatusIcon from '@/component/StatusIcon/DatabaseIcon';
import datasourceStatus from '@/store/datasourceStatus';

export type TableItem = { databaseId: number; tableName: string; tableId?: number };

Expand Down Expand Up @@ -222,6 +223,7 @@ const TableSelecter: React.ForwardRefRenderFunction<TableSelecterRef, IProps> =
try {
const res = await listDatabases(projectId, null, null, null, null, null, null, true, true);
if (res?.contents) {
datasourceStatus.asyncUpdateStatus(res?.contents?.map((item) => item?.dataSource?.id));
const list: IDataBaseWithTable[] = res.contents.map((db) => ({
...db,
tableList: [],
Expand Down

0 comments on commit 94e3ebb

Please sign in to comment.