Skip to content

Commit

Permalink
Merge branch 'dev-4.2.2' of code.alipay.com:oceanbase/oceanbase-devel…
Browse files Browse the repository at this point in the history
…oper-center into dev-4.2.2
  • Loading branch information
HSunboy committed Oct 30, 2023
2 parents 96843fa + dea64d5 commit 7da35a0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
8 changes: 6 additions & 2 deletions src/component/Task/DataClearTask/DetailContent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ import type { CycleTaskDetail, IDataArchiveJobParameters, TaskOperationType } fr
import { formatMessage } from '@/util/intl';
import { getFormatDateTime, kbToMb, mbToKb } from '@/util/utils';
import { DownOutlined, UpOutlined } from '@ant-design/icons';
import { Collapse, Descriptions, Divider, Space, message } from 'antd';
import { Collapse, Descriptions, Divider, Space, message, Typography } from 'antd';
import React from 'react';
import styles from '../../index.less';
import ArchiveRange from './ArchiveRange';
import ThrottleEditableCell from '../../component/ThrottleEditableCell';

const { Panel } = Collapse;
const { Text } = Typography;

interface IProps {
task: CycleTaskDetail<IDataArchiveJobParameters>;
Expand Down Expand Up @@ -83,7 +84,10 @@ const DataClearTaskContent: React.FC<IProps> = (props) => {
span={2}
label={formatMessage({ id: 'odc.DataClearTask.DetailContent.Database' })} /*数据库*/
>
{task?.databaseName || '-'}
<Space size={2}>
<span>{task?.databaseName || '-'}</span>
<Text type="secondary">{task?.datasource?.name}</Text>
</Space>
</Descriptions.Item>
{hasFlow && (
<Descriptions.Item
Expand Down
13 changes: 4 additions & 9 deletions src/component/Task/component/RollbackModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { RollbackType } from '@/d.ts';
import { formatMessage } from '@/util/intl';
import type { RadioChangeEvent } from 'antd';
import { Modal, Radio, Space, Typography } from 'antd';
import React, { useEffect, useState } from 'react';
import React, { useState } from 'react';
const { Text } = Typography;

interface IProps {
Expand All @@ -29,9 +29,9 @@ interface IProps {
}

const RollBackModal: React.FC<IProps> = (props) => {
const { open, generateRollbackPlan, onOk, onCancel } = props;
const [value, setValue] = useState<RollbackType>(RollbackType.REF);
const [disabledRef, setDisabledRef] = useState(false);
const { open, onOk, onCancel } = props;
const [value, setValue] = useState<RollbackType>(RollbackType.CUSTOM);
const disabledRef = true;

const handleChange = (e: RadioChangeEvent) => {
setValue(e.target.value);
Expand All @@ -41,11 +41,6 @@ const RollBackModal: React.FC<IProps> = (props) => {
onOk(value);
};

useEffect(() => {
setDisabledRef(!generateRollbackPlan);
setValue(generateRollbackPlan ? RollbackType.REF : RollbackType.CUSTOM);
}, [generateRollbackPlan]);

return (
<Modal
title={formatMessage({ id: 'odc.component.RollbackModal.Rollback' })}
Expand Down
5 changes: 5 additions & 0 deletions src/d.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2250,6 +2250,11 @@ export interface ICycleTaskRecord<T> {
name: string;
dbMode: ConnectionMode;
};
datasource?: {
id: number;
name: string;
dbMode: ConnectionMode;
};
riskLevel?: IRiskLevel;
description?: string;
}
Expand Down
3 changes: 2 additions & 1 deletion src/page/Workspace/components/ViewPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,13 @@ class ViewPage extends Component<IProps & { session: SessionStore }, IViewPageSt
};

showExportResuleSetModal = () => {
const { modalStore, session } = this.props;
const { modalStore, session, params } = this.props;
const { resultSet } = this.state;
const sql = resultSet?.originSql;
modalStore.changeCreateResultSetExportTaskModal(true, {
sql,
databaseId: session?.database.databaseId,
tableName: params?.viewName,
});
};

Expand Down

0 comments on commit 7da35a0

Please sign in to comment.