Skip to content

Commit

Permalink
PullRequest: 531 fix/dev-4.3.2-3383
Browse files Browse the repository at this point in the history
Merge branch 'fix/dev-4.3.2-3383 of git@code.alipay.com:oceanbase/oceanbase-developer-center.git into dev-4.3.2

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


Signed-off-by: 晓康 <xxk268858@oceanbase.com>


* Fixes oceanbase/odc#3383
* Fixes oceanbase/odc#3389
* Fixes oceanbase/odc#3390
* Fixes oceanbase/odc#3387
* Fixes oceanbase/odc#3385
* Fixes oceanbase/odc#3384
* Fixes oceanbase/odc#3348
* feat(): add physical db list in logica db manager page
* fix: rollback blob formatter changes
  • Loading branch information
yezaoshu committed Sep 19, 2024
1 parent 16f4633 commit fd586b4
Show file tree
Hide file tree
Showing 13 changed files with 262 additions and 147 deletions.
12 changes: 11 additions & 1 deletion src/common/network/table/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,14 @@ export function convertTableToServerTable(
return serverTable;
}

export function convertServerTableToTable(data: IServerTable): Partial<ITableModel> {
export function convertServerTableToTable(
data: IServerTable,
logicalDbTableParams?: {
isLogicalTable: boolean;
tableId: number;
databaseId: number;
},
): Partial<ITableModel> {
if (!data) {
return null;
}
Expand All @@ -261,6 +268,9 @@ export function convertServerTableToTable(data: IServerTable): Partial<ITableMod
data.columnGroups?.map((item) => {
return item.allColumns ? ColumnStoreType.ROW : ColumnStoreType.COLUMN;
}) || [],
isLogicalTable: logicalDbTableParams?.isLogicalTable,
tableId: logicalDbTableParams?.tableId,
databaseId: logicalDbTableParams?.databaseId,
};
// column
table.columns = data.columns.map((column) => {
Expand Down
12 changes: 11 additions & 1 deletion src/common/network/table/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,17 @@ export async function getLogicTableInfo(
tableId: number,
): Promise<Partial<ITableModel>> {
const res = await getLogicalTableDetail(databaseId, tableId);
return { ...res, ...convertServerTableToTable({ ...res?.basePhysicalTable, name: res?.name }) };
return {
...res,
...convertServerTableToTable(
{ ...res?.basePhysicalTable, name: res?.name },
{
isLogicalTable: true,
tableId,
databaseId,
},
),
};
}

export async function queryTableOrViewData(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,6 @@ const CreateModal: React.FC<IProps> = (props) => {
}) /*立即执行*/
}
</Radio.Button>
<Radio.Button value={TaskExecStrategy.MANUAL}>
{formatMessage({
id: 'odc.components.TaskManagePage.ManualExecution',
defaultMessage: '手动执行',
})}
</Radio.Button>
<Radio.Button value={TaskExecStrategy.START_AT}>
{
formatMessage({
Expand Down
39 changes: 23 additions & 16 deletions src/component/Task/component/CommonDetailModal/TaskExecuteModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ const getColumns = () => {
},
{
title: '结果',
key: 'result',
dataIndex: 'result',
key: 'track',
dataIndex: 'track',
ellipsis: true,
render: (value: string, row: any) =>
row.status === ISqlExecuteResultStatus.SUCCESS ? (
getResultText(row)
Expand Down Expand Up @@ -105,25 +106,31 @@ const getColumns = () => {
(stage) => stage.stageName === 'DB Server Execute SQL',
);
const DBCostTime = formatTimeTemplate(
BigNumber(executeSQLStage?.totalDurationMicroseconds).div(1000000).toNumber(),
BigNumber(executeStage?.totalDurationMicroseconds).div(1000000).toNumber(),
);
const showDBTimeline = ![
ISqlExecuteResultStatus.CANCELED,
ISqlExecuteResultStatus.CREATED,
].includes(row?.status);

return (
<Space size={5}>
<span>{DBCostTime}</span>
<Tooltip
overlayStyle={{ maxWidth: 370 }}
color="var(--background-primary-color)"
overlayInnerStyle={{
maxHeight: 500,
overflow: 'auto',
}}
placement="rightTop"
showArrow={false}
title={<DBTimeline row={row} />}
>
<InfoCircleOutlined style={{ color: 'var(--text-color-hint)' }} />
</Tooltip>
{showDBTimeline ? (
<Tooltip
overlayStyle={{ maxWidth: 370 }}
color="var(--background-primary-color)"
overlayInnerStyle={{
maxHeight: 500,
overflow: 'auto',
}}
placement="rightTop"
showArrow={false}
title={<DBTimeline row={row} />}
>
<InfoCircleOutlined style={{ color: 'var(--text-color-hint)' }} />
</Tooltip>
) : null}
</Space>
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,12 @@ const TaskExecuteRecord: React.FC<IProps> = (props) => {
};

const handleLogicalDatabaseTaskStop = async (detailId: number) => {
await skipPhysicalSqlExecute(flowList?.contents?.[0]?.id, detailId);
await stopPhysicalSqlExecute(flowList?.contents?.[0]?.id, detailId);
onReload?.();
};

const handleLogicalDatabaseTaskSkip = async (detailId: number) => {
await stopPhysicalSqlExecute(flowList?.contents?.[0]?.id, detailId);
await skipPhysicalSqlExecute(flowList?.contents?.[0]?.id, detailId);
onReload?.();
};

Expand Down
2 changes: 1 addition & 1 deletion src/page/Datasource/Info/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ const Info: React.FC<IProps> = ({ id, datasource }) => {
dataIndex: 'lastSyncTime',
width: 200,
render(v, record) {
const time = record?.lastSyncTime || record?.objectLastSyncTime;
const time = record?.objectLastSyncTime || record?.lastSyncTime;
return getLocalFormatDateTime(time);
},
},
Expand Down
Loading

0 comments on commit fd586b4

Please sign in to comment.