Skip to content
Open
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"prettier": "^2.7.1",
"stylelint": "^15.10.2",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-recommended": "10.0.1",
"stylelint-config-standard-less": "^1.0.0",
"stylelint-config-styled-components": "^0.1.1",
"stylelint-prettier": "^4.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,23 @@ exports[`base/CloudBeaver/CBSqlOperationAuditDetailDrawer should match snap shot
>
<div
class="result-item has-delete-rule-wrapper css-1737itt"
data-error-priority="ungraded"
data-icon-key="error"
>
<span
class="ant-tag ant-tag-volcano message-rule-disabled css-dev-only-do-not-override-txh9fw"
>
该规则已删除
</span>
<div
class="css-9paak3"
class="audit-result-message audit-result-icon-error css-1lugxev"
>
<span
aria-label="错误"
class="icon-wrapper"
data-error-priority="ungraded"
data-icon-key="error"
title="错误"
>
<svg
height="20"
Expand All @@ -124,6 +130,12 @@ exports[`base/CloudBeaver/CBSqlOperationAuditDetailDrawer should match snap shot
/>
</svg>
</span>
<span
class="audit-result-priority-label audit-result-priority-label-error"
data-error-priority="ungraded"
>
错误
</span>
<span
class="text-wrapper"
>
Expand All @@ -137,17 +149,23 @@ exports[`base/CloudBeaver/CBSqlOperationAuditDetailDrawer should match snap shot
>
<div
class="result-item has-delete-rule-wrapper css-1737itt"
data-error-priority="ungraded"
data-icon-key="error"
>
<span
class="ant-tag ant-tag-volcano message-rule-disabled css-dev-only-do-not-override-txh9fw"
>
该规则已删除
</span>
<div
class="css-9paak3"
class="audit-result-message audit-result-icon-error css-1lugxev"
>
<span
aria-label="错误"
class="icon-wrapper"
data-error-priority="ungraded"
data-icon-key="error"
title="错误"
>
<svg
height="20"
Expand All @@ -161,6 +179,12 @@ exports[`base/CloudBeaver/CBSqlOperationAuditDetailDrawer should match snap shot
/>
</svg>
</span>
<span
class="audit-result-priority-label audit-result-priority-label-error"
data-error-priority="ungraded"
>
错误
</span>
<span
class="text-wrapper"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -904,12 +904,16 @@ exports[`test base/CloudBeaver/List filter data with search 1`] = `
>
<div
class=" css-1737itt"
data-icon-key="warn"
>
<div
class="css-9paak3"
class="audit-result-message audit-result-icon-warn css-1lugxev"
>
<span
aria-label="告警"
class="icon-wrapper"
data-icon-key="warn"
title="告警"
>
<svg
fill="none"
Expand Down Expand Up @@ -2345,12 +2349,16 @@ exports[`test base/CloudBeaver/List render init table 1`] = `
>
<div
class=" css-1737itt"
data-icon-key="warn"
>
<div
class="css-9paak3"
class="audit-result-message audit-result-icon-warn css-1lugxev"
>
<span
aria-label="告警"
class="icon-wrapper"
data-icon-key="warn"
title="告警"
>
<svg
fill="none"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1442,12 +1442,16 @@ exports[`test base/page/CloudBeaver should match snapshot when sql query is disa
>
<div
class=" css-1737itt"
data-icon-key="warn"
>
<div
class="css-9paak3"
class="audit-result-message audit-result-icon-warn css-1lugxev"
>
<span
aria-label="告警"
class="icon-wrapper"
data-icon-key="warn"
title="告警"
>
<svg
fill="none"
Expand Down Expand Up @@ -2902,12 +2906,16 @@ exports[`test base/page/CloudBeaver should render jump to cloud beaver when sql
>
<div
class=" css-1737itt"
data-icon-key="warn"
>
<div
class="css-9paak3"
class="audit-result-message audit-result-icon-warn css-1lugxev"
>
<span
aria-label="告警"
class="icon-wrapper"
data-icon-key="warn"
title="告警"
>
<svg
fill="none"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
import { IListDataExportTaskSQL } from '@actiontech/shared/lib/api/base/service/common';
import { SQLRenderer } from '@actiontech/shared';

type AuditSqlResultWithPriority = NonNullable<
IListDataExportTaskSQL['audit_sql_result']
>[number] & { error_priority?: string };

export const AuditResultForCreateOrderColumn = (
onClickAuditResult: (record: IListDataExportTaskSQL) => void
): ActiontechTableColumn<IListDataExportTaskSQL> => {
Expand Down Expand Up @@ -44,19 +48,23 @@
title: () => t('dmsDataExport.common.auditResult.column.auditResult'),
className: 'audit-result-column',
render: (result = [], record) => {
const results = (result ?? []) as AuditSqlResultWithPriority[];

Check warning on line 51 in packages/base/src/page/DataExportManagement/Common/AuditResultList/Table/column.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
return (
<div onClick={() => onClickAuditResult(record)}>
{result?.length > 1 ? (
<div
className="audit-result-wrapper"
onClick={() => onClickAuditResult(record)}
>
{results.length > 1 ? (
<ResultIconRender
iconLevels={result.map((item) => {
return item.level ?? '';
})}
auditResultInfo={results.map((item) => ({
level: item.level ?? '',
executionFailed: false,
error_priority: item.error_priority
}))}
/>
) : (
<AuditResultMessage
auditResult={
Array.isArray(result) && result.length ? result[0] : {}
}
auditResult={results.length ? results[0] : {}}
/>
)}
</div>
Expand Down
Loading
Loading