Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/sql backup 1 #513

Merged
merged 4 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ exports[`page/DataSource/DataSourceForm render cancel rule 1`] = `
SQL备份配置
</h1>
<div
class="ant-form-item has-label-tip css-1jlm9cy css-dev-only-do-not-override-txh9fw"
class="ant-form-item has-label-tip css-1jlm9cy css-dev-only-do-not-override-txh9fw ant-form-item-has-success"
>
<div
class="ant-row ant-form-item-row css-dev-only-do-not-override-txh9fw"
Expand Down Expand Up @@ -1211,8 +1211,8 @@ exports[`page/DataSource/DataSourceForm render cancel rule 1`] = `
class="ant-form-item-control-input-content"
>
<button
aria-checked="false"
class="ant-switch basic-switch-wrapper css-g6dhbn css-dev-only-do-not-override-txh9fw"
aria-checked="true"
class="ant-switch basic-switch-wrapper css-g6dhbn css-dev-only-do-not-override-txh9fw ant-switch-checked"
id="enableBackup"
role="switch"
type="button"
Expand Down Expand Up @@ -2576,7 +2576,7 @@ exports[`page/DataSource/DataSourceForm render cancel rule 2`] = `
SQL备份配置
</h1>
<div
class="ant-form-item has-label-tip css-1jlm9cy css-dev-only-do-not-override-txh9fw"
class="ant-form-item has-label-tip css-1jlm9cy css-dev-only-do-not-override-txh9fw ant-form-item-has-success"
>
<div
class="ant-row ant-form-item-row css-dev-only-do-not-override-txh9fw"
Expand Down Expand Up @@ -2613,8 +2613,8 @@ exports[`page/DataSource/DataSourceForm render cancel rule 2`] = `
class="ant-form-item-control-input-content"
>
<button
aria-checked="false"
class="ant-switch basic-switch-wrapper css-g6dhbn css-dev-only-do-not-override-txh9fw"
aria-checked="true"
class="ant-switch basic-switch-wrapper css-g6dhbn css-dev-only-do-not-override-txh9fw ant-switch-checked"
id="enableBackup"
role="switch"
type="button"
Expand Down Expand Up @@ -3885,7 +3885,7 @@ exports[`page/DataSource/DataSourceForm render change switch when page is update
SQL备份配置
</h1>
<div
class="ant-form-item has-label-tip css-1jlm9cy css-dev-only-do-not-override-txh9fw"
class="ant-form-item has-label-tip css-1jlm9cy css-dev-only-do-not-override-txh9fw ant-form-item-has-success"
>
<div
class="ant-row ant-form-item-row css-dev-only-do-not-override-txh9fw"
Expand Down Expand Up @@ -3922,8 +3922,8 @@ exports[`page/DataSource/DataSourceForm render change switch when page is update
class="ant-form-item-control-input-content"
>
<button
aria-checked="false"
class="ant-switch basic-switch-wrapper css-g6dhbn css-dev-only-do-not-override-txh9fw"
aria-checked="true"
class="ant-switch basic-switch-wrapper css-g6dhbn css-dev-only-do-not-override-txh9fw ant-switch-checked"
id="enableBackup"
role="switch"
type="button"
Expand Down Expand Up @@ -5110,7 +5110,7 @@ exports[`page/DataSource/DataSourceForm render change switch when page is update
SQL备份配置
</h1>
<div
class="ant-form-item has-label-tip css-1jlm9cy css-dev-only-do-not-override-txh9fw"
class="ant-form-item has-label-tip css-1jlm9cy css-dev-only-do-not-override-txh9fw ant-form-item-has-success"
>
<div
class="ant-row ant-form-item-row css-dev-only-do-not-override-txh9fw"
Expand Down Expand Up @@ -5147,8 +5147,8 @@ exports[`page/DataSource/DataSourceForm render change switch when page is update
class="ant-form-item-control-input-content"
>
<button
aria-checked="false"
class="ant-switch basic-switch-wrapper css-g6dhbn css-dev-only-do-not-override-txh9fw"
aria-checked="true"
class="ant-switch basic-switch-wrapper css-g6dhbn css-dev-only-do-not-override-txh9fw ant-switch-checked"
id="enableBackup"
role="switch"
type="button"
Expand Down Expand Up @@ -6335,7 +6335,7 @@ exports[`page/DataSource/DataSourceForm render change switch when page is update
SQL备份配置
</h1>
<div
class="ant-form-item has-label-tip css-1jlm9cy css-dev-only-do-not-override-txh9fw"
class="ant-form-item has-label-tip css-1jlm9cy css-dev-only-do-not-override-txh9fw ant-form-item-has-success"
>
<div
class="ant-row ant-form-item-row css-dev-only-do-not-override-txh9fw"
Expand Down Expand Up @@ -6372,8 +6372,8 @@ exports[`page/DataSource/DataSourceForm render change switch when page is update
class="ant-form-item-control-input-content"
>
<button
aria-checked="false"
class="ant-switch basic-switch-wrapper css-g6dhbn css-dev-only-do-not-override-txh9fw"
aria-checked="true"
class="ant-switch basic-switch-wrapper css-g6dhbn css-dev-only-do-not-override-txh9fw ant-switch-checked"
id="enableBackup"
role="switch"
type="button"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useTranslation } from 'react-i18next';
import { BasicTag, BasicToolTips } from '@actiontech/shared';
import { formatTime } from '@actiontech/shared/lib/utils/Common';
import { Space, Tag, Typography } from 'antd';
import { Space, Typography } from 'antd';
import { ListDBServiceLastConnectionTestStatusEnum } from '@actiontech/shared/lib/api/base/service/common.enum';

type Props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7204,7 +7204,7 @@ exports[`page/DataSource/UpdateDataSource render prepare api 1`] = `
SQL备份配置
</h1>
<div
class="ant-form-item has-label-tip css-1jlm9cy css-dev-only-do-not-override-txh9fw"
class="ant-form-item has-label-tip css-1jlm9cy css-dev-only-do-not-override-txh9fw ant-form-item-has-success"
>
<div
class="ant-row ant-form-item-row css-dev-only-do-not-override-txh9fw"
Expand Down Expand Up @@ -7241,8 +7241,8 @@ exports[`page/DataSource/UpdateDataSource render prepare api 1`] = `
class="ant-form-item-control-input-content"
>
<button
aria-checked="false"
class="ant-switch basic-switch-wrapper css-g6dhbn css-dev-only-do-not-override-txh9fw"
aria-checked="true"
class="ant-switch basic-switch-wrapper css-g6dhbn css-dev-only-do-not-override-txh9fw ant-switch-checked"
id="enableBackup"
role="switch"
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,23 @@ exports[`useRuleTemplate should render static option for exec status 2`] = `
unselectable="on"
/>
</div>
<div
aria-selected="false"
class="ant-select-item ant-select-item-option"
title="执行回滚"
>
<div
class="ant-select-item-option-content"
>
执行回滚
</div>
<span
aria-hidden="true"
class="ant-select-item-option-state"
style="user-select: none;"
unselectable="on"
/>
</div>
</div>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion packages/sqle/src/locale/zh-CN/execWorkflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,9 @@ export default {
execStatus: '执行状态',
remark: '备注',
addRemark: '添加备注',
originSql: '原始SQL'
originSql: '原始SQL',
rollbackOrder: '回滚次序',
sourceOrder: '原始次序'
},
associatedRollbackWorkflow: '关联回滚工单'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,139 +56,6 @@ exports[`sqle/ExecWorkflow/Common/DownloadRecord render snap download btn 1`] =
</body>
`;

exports[`sqle/ExecWorkflow/Common/DownloadRecord render snap when click down backup sql 1`] = `
<body>
<div>
<button
class="ant-btn css-dev-only-do-not-override-674gwq ant-btn-default ant-btn-sm basic-button-wrapper css-geipcv"
type="button"
>
<span
class="ant-btn-icon"
>
<svg
height="16"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M1.75 11.083h10.5v1.167H1.75zm5.833-3.4 3.542-3.541.825.824L7 9.916 2.05 4.968l.825-.825 3.542 3.54V1.167h1.166z"
/>
</svg>
</span>
<div
class="ant-space css-dev-only-do-not-override-674gwq ant-space-horizontal ant-space-align-center"
>
<div
class="ant-space-item"
style="margin-right: 5px;"
>
下载
</div>
<div
class="ant-space-item"
>
<span
class="css-u3jcp4"
>
<svg
color="currentColor"
height="16"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m8 8.781 3.3-3.3.943.943L8 10.667 3.757 6.424l.943-.943z"
fill="currentColor"
/>
</svg>
</span>
</div>
</div>
</button>
</div>
<div>
<div
class="ant-popover ant-popover-hidden css-dev-only-do-not-override-txh9fw css-dev-only-do-not-override-txh9fw ant-popover-placement-bottomLeft"
style="--arrow-x: 0px; --arrow-y: 0px; left: 0px; top: 0px; box-sizing: border-box; pointer-events: none;"
>
<div
class="ant-popover-content"
>
<div
class="ant-popover-inner"
role="tooltip"
style="padding: 0px;"
>
<div
class="ant-popover-inner-content"
>
<div
class="css-1oz57g3"
>
<div
class="download-record-item"
>
<svg
class="download-record-item-icon"
color="currentColor"
height="16"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M14 6v7.995a.666.666 0 0 1-.662.672H2.662A.66.66 0 0 1 2 14.005V1.995c0-.358.298-.662.665-.662h6.668v4A.667.667 0 0 0 10 6zm0-1.333h-3.333V1.335zm-8.667 0V6h2V4.667zm0 2.666v1.334h5.334V7.333zm0 2.667v1.333h5.334V10z"
fill="currentColor"
/>
</svg>
下载审核报告
</div>
<div
class="download-record-item"
>
<svg
class="download-record-item-icon"
height="16"
viewBox="0 0 18 18"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M15 7.5H3v6.75h12zM2.25 2.25h13.5a.75.75 0 0 1 .75.75v12a.75.75 0 0 1-.75.75H2.25A.75.75 0 0 1 1.5 15V3a.75.75 0 0 1 .75-.75m1.5 2.25V6h1.5V4.5zm3 0V6h1.5V4.5zm-3 3.75H6V12H3.75z"
fill="currentColor"
/>
</svg>
下载SQL语句
</div>
<div
class="download-record-item"
>
<svg
class="download-record-item-icon"
height="16"
viewBox="0 0 18 18"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M15 7.5H3v6.75h12zM2.25 2.25h13.5a.75.75 0 0 1 .75.75v12a.75.75 0 0 1-.75.75H2.25A.75.75 0 0 1 1.5 15V3a.75.75 0 0 1 .75-.75m1.5 2.25V6h1.5V4.5zm3 0V6h1.5V4.5zm-3 3.75H6V12H3.75z"
fill="currentColor"
/>
</svg>
下载回滚语句
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
`;

exports[`sqle/ExecWorkflow/Common/DownloadRecord render snap when click down file 1`] = `
<body>
<div>
Expand Down Expand Up @@ -296,23 +163,6 @@ exports[`sqle/ExecWorkflow/Common/DownloadRecord render snap when click down fil
</svg>
下载SQL语句
</div>
<div
class="download-record-item"
>
<svg
class="download-record-item-icon"
height="16"
viewBox="0 0 18 18"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M15 7.5H3v6.75h12zM2.25 2.25h13.5a.75.75 0 0 1 .75.75v12a.75.75 0 0 1-.75.75H2.25A.75.75 0 0 1 1.5 15V3a.75.75 0 0 1 .75-.75m1.5 2.25V6h1.5V4.5zm3 0V6h1.5V4.5zm-3 3.75H6V12H3.75z"
fill="currentColor"
/>
</svg>
下载回滚语句
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -429,23 +279,6 @@ exports[`sqle/ExecWorkflow/Common/DownloadRecord render snap when click down rep
</svg>
下载SQL语句
</div>
<div
class="download-record-item"
>
<svg
class="download-record-item-icon"
height="16"
viewBox="0 0 18 18"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M15 7.5H3v6.75h12zM2.25 2.25h13.5a.75.75 0 0 1 .75.75v12a.75.75 0 0 1-.75.75H2.25A.75.75 0 0 1 1.5 15V3a.75.75 0 0 1 .75-.75m1.5 2.25V6h1.5V4.5zm3 0V6h1.5V4.5zm-3 3.75H6V12H3.75z"
fill="currentColor"
/>
</svg>
下载回滚语句
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -563,23 +396,6 @@ exports[`sqle/ExecWorkflow/Common/DownloadRecord render snap when click down sho
</svg>
下载SQL语句
</div>
<div
class="download-record-item"
>
<svg
class="download-record-item-icon"
height="16"
viewBox="0 0 18 18"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M15 7.5H3v6.75h12zM2.25 2.25h13.5a.75.75 0 0 1 .75.75v12a.75.75 0 0 1-.75.75H2.25A.75.75 0 0 1 1.5 15V3a.75.75 0 0 1 .75-.75m1.5 2.25V6h1.5V4.5zm3 0V6h1.5V4.5zm-3 3.75H6V12H3.75z"
fill="currentColor"
/>
</svg>
下载回滚语句
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('sqle/ExecWorkflow/Common/DownloadRecord ce', () => {
await act(async () => jest.advanceTimersByTime(300));
expect(screen.getByText('下载审核报告')).toBeInTheDocument();
expect(screen.getByText('下载SQL语句')).toBeInTheDocument();
expect(screen.queryByText('下载回滚语句')).not.toBeInTheDocument();
// expect(screen.queryByText('下载回滚语句')).not.toBeInTheDocument();
expect(baseElement).toMatchSnapshot();
});
});
Loading