selectReference(reference)}
/>
@@ -52,11 +57,24 @@ export const ProfilingReferenceTableList = ({
{reference.reference_table?.schema_name}
-
+
{reference.reference_table?.table_name}
{' '}
+ {
+ selectReference(reference);
+ }}
+ disabled={canUserCreateTableComparison === false}
+ >
+
+
+ Edit table comparison
+
+
-
Delete table comparison
diff --git a/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/SeverityInputBlock.tsx b/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/SeverityInputBlock.tsx
index f2c8e690b6..4f6d4d2a07 100644
--- a/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/SeverityInputBlock.tsx
+++ b/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/SeverityInputBlock.tsx
@@ -1,18 +1,16 @@
import React from 'react';
-import Input from '../../../Input';
import { CompareThresholdsModel, TableComparisonModel } from '../../../../api';
+import Input from '../../../Input';
import { TSeverityValues } from './TableComparisonConstans';
type TSeverityInputBlock = {
onChange: (obj: Partial) => void;
reference: TableComparisonModel;
onUpdateChecksUI: (
- checksUI: any,
type: 'row' | 'column',
disabled?: boolean,
severity?: TSeverityValues
) => void;
- checksUI: any;
type: 'row' | 'column';
};
@@ -20,7 +18,6 @@ export default function SeverityInputBlock({
onChange,
reference,
onUpdateChecksUI,
- checksUI,
type
}: TSeverityInputBlock) {
return (
@@ -40,7 +37,7 @@ export default function SeverityInputBlock({
? undefined
: Number(e.target.value)
});
- onUpdateChecksUI(checksUI, type, undefined, {
+ onUpdateChecksUI(type, undefined, {
warning:
String(e.target.value).length === 0
? undefined
@@ -65,7 +62,7 @@ export default function SeverityInputBlock({
? undefined
: Number(e.target.value)
});
- onUpdateChecksUI(checksUI, type, undefined, {
+ onUpdateChecksUI(type, undefined, {
error:
String(e.target.value).length === 0
? undefined
@@ -90,7 +87,7 @@ export default function SeverityInputBlock({
? undefined
: Number(e.target.value)
});
- onUpdateChecksUI(checksUI, type, undefined, {
+ onUpdateChecksUI(type, undefined, {
fatal:
String(e.target.value).length === 0
? undefined
diff --git a/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableComparisonOverwiewBody.tsx b/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableComparisonOverwiewBody.tsx
index 887d07f8b3..4ed0c3b157 100644
--- a/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableComparisonOverwiewBody.tsx
+++ b/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableComparisonOverwiewBody.tsx
@@ -83,6 +83,7 @@ export default function TableComparisonOverwiewBody({
}
empty={true}
placeholder=""
+ className="pr-2"
/>
{itemsToRender.map((itemData, jIndex) => (
diff --git a/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableComparisonUtils.ts b/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableComparisonUtils.ts
index b7140422ab..fcb3b1926c 100644
--- a/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableComparisonUtils.ts
+++ b/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableComparisonUtils.ts
@@ -64,13 +64,13 @@ export const calculateColor = (
}
if (colorVar?.fatals && Number(colorVar.fatals) !== 0) {
- return 'bg-red-200';
+ return 'bg-[#EF8079]';
} else if (colorVar?.errors && Number(colorVar.errors) !== 0) {
- return 'bg-orange-200';
+ return 'bg-[#EFB87E]';
} else if (colorVar?.warnings && Number(colorVar.warnings) !== 0) {
- return 'bg-yellow-200';
+ return 'bg-[#EFEC82]';
} else if (colorVar?.valid_results && Number(colorVar.valid_results) !== 0) {
- return 'bg-green-200';
+ return 'bg-[#5CBCAB]';
} else {
return '';
}
@@ -84,7 +84,8 @@ export const onUpdate = (
timePartitioned: 'daily' | 'monthly' | undefined,
reference: TableComparisonModel | undefined,
handleChange: (value: CheckContainerModel) => Promise,
- tableChecksToUpdate: any
+ tableChecksToUpdate: any,
+ callback?: () => Promise
) => {
if (checkTypes === CheckTypes.PROFILING) {
TableComparisonsApi.updateTableComparisonProfiling(
@@ -93,9 +94,13 @@ export const onUpdate = (
table,
reference?.table_comparison_configuration_name ?? '',
reference
- ).catch((err) => {
- console.error(err);
- });
+ )
+ .then(() => {
+ callback && callback();
+ })
+ .catch((err) => {
+ console.error(err);
+ });
} else if (checkTypes === CheckTypes.MONITORING) {
if (timePartitioned === 'daily') {
TableComparisonsApi.updateTableComparisonMonitoringDaily(
@@ -104,9 +109,13 @@ export const onUpdate = (
table,
reference?.table_comparison_configuration_name ?? '',
reference
- ).catch((err) => {
- console.error(err);
- });
+ )
+ .then(() => {
+ callback && callback();
+ })
+ .catch((err) => {
+ console.error(err);
+ });
} else if (timePartitioned === 'monthly') {
TableComparisonsApi.updateTableComparisonMonitoringMonthly(
connection,
@@ -114,9 +123,13 @@ export const onUpdate = (
table,
reference?.table_comparison_configuration_name ?? '',
reference
- ).catch((err) => {
- console.error(err);
- });
+ )
+ .then(() => {
+ callback && callback();
+ })
+ .catch((err) => {
+ console.error(err);
+ });
}
} else if (checkTypes === CheckTypes.PARTITIONED) {
if (timePartitioned === 'daily') {
diff --git a/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableLevelResults.tsx b/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableLevelResults.tsx
index 20e653d688..8cf979047e 100644
--- a/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableLevelResults.tsx
+++ b/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableLevelResults.tsx
@@ -10,35 +10,35 @@ export default function TableLevelResults({
type
}: TTableLevelResults) {
return (
-
+
- Results:
+
Results
-
- Valid:
+
+ Correct results:
{
tableComparisonResults?.table_comparison_results?.[type ?? '']
?.valid_results
}
-
- Errors:
- {tableComparisonResults?.table_comparison_results?.[type ?? '']?.errors}
-
-
- Fatal:
- {tableComparisonResults?.table_comparison_results?.[type ?? '']?.fatals}
-
-
+
Warning:
{
tableComparisonResults?.table_comparison_results?.[type ?? '']
?.warnings
}
+
+ Errors:
+ {tableComparisonResults?.table_comparison_results?.[type ?? '']?.errors}
+
+
+ Fatal errors:
+ {tableComparisonResults?.table_comparison_results?.[type ?? '']?.fatals}
+
{type.includes('row') ? (
-
+
Show mismatches
;
showRowCount: boolean;
onUpdateChecksUI: (
- checksUI: any,
type: 'row' | 'column',
disabled?: boolean,
severity?: TSeverityValues
) => void;
- checksUI: any;
setIsUpdated: React.Dispatch>;
tableComparisonResults: any;
showColumnCount: boolean;
@@ -33,7 +31,6 @@ const TableRow: React.FC = ({
settableLevelComparisonExtended,
showRowCount,
onUpdateChecksUI,
- checksUI,
setIsUpdated,
tableComparisonResults,
showColumnCount,
@@ -88,7 +85,7 @@ const TableRow: React.FC = ({
{
- onUpdateChecksUI(checksUI, 'row', checked);
+ onUpdateChecksUI('row', checked);
setIsUpdated(true);
}}
/>
@@ -121,7 +118,7 @@ const TableRow: React.FC = ({
{
- onUpdateChecksUI(checksUI, 'column', checked);
+ onUpdateChecksUI('column', checked);
setIsUpdated(true);
}}
/>
diff --git a/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableReferenceComparisons.tsx b/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableReferenceComparisons.tsx
index 3a9c3ef417..be164d8b24 100644
--- a/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableReferenceComparisons.tsx
+++ b/dqops/src/main/frontend/src/components/Connection/TableView/TableComparison/TableReferenceComparisons.tsx
@@ -132,71 +132,29 @@ export const TableReferenceComparisons = ({
setIsEditing(true);
setIsCreting(false);
} else {
- let url = '';
- if (checkTypes === CheckTypes.PROFILING) {
- url = `${ROUTES.TABLE_LEVEL_PAGE(
- checkTypes,
- connection,
- schema,
- table,
- 'table-comparisons'
- )}`;
- dispatch(
- addFirstLevelTab(checkTypes, {
- url,
- value: ROUTES.TABLE_LEVEL_VALUE(
- checkTypes,
- connection,
- schema,
- table
- ),
- state: {},
- label: table
- })
- );
- } else if (timePartitioned === 'daily') {
- url = `${ROUTES.TABLE_LEVEL_PAGE(
- checkTypes,
- connection,
- schema,
- table,
- 'daily_comparisons'
- )}`;
- dispatch(
- addFirstLevelTab(checkTypes, {
- url,
- value: ROUTES.TABLE_LEVEL_VALUE(
- checkTypes,
- connection,
- schema,
- table
- ),
- state: {},
- label: table
- })
- );
- } else if (timePartitioned === 'monthly') {
- url = `${ROUTES.TABLE_LEVEL_PAGE(
- checkTypes,
- connection,
- schema,
- table,
- 'monthly_comparisons'
- )}`;
- dispatch(
- addFirstLevelTab(checkTypes, {
- url,
- value: ROUTES.TABLE_LEVEL_VALUE(
- checkTypes,
- connection,
- schema,
- table
- ),
- state: {},
- label: table
- })
- );
- }
+ const url = `${ROUTES.TABLE_LEVEL_PAGE(
+ checkTypes,
+ connection,
+ schema,
+ table,
+ 'table-comparisons'
+ )}`;
+ dispatch(
+ addFirstLevelTab(checkTypes, {
+ url,
+ value: ROUTES.TABLE_LEVEL_VALUE(
+ checkTypes,
+ connection,
+ schema,
+ table
+ ),
+ state: {
+ checksUI
+ },
+ label: table
+ })
+ );
+
if (isCreating === true) {
getNewTableComparison();
}
diff --git a/dqops/src/main/frontend/src/pages/TableProfilingChecks/index.tsx b/dqops/src/main/frontend/src/pages/TableProfilingChecks/index.tsx
index e130aff7e7..35c66cf2db 100644
--- a/dqops/src/main/frontend/src/pages/TableProfilingChecks/index.tsx
+++ b/dqops/src/main/frontend/src/pages/TableProfilingChecks/index.tsx
@@ -16,7 +16,6 @@ import {
import { CheckResultOverviewApi } from '../../services/apiClient';
import { CheckTypes } from '../../shared/routes';
import { useDecodedParams } from '../../utils';
-import { table } from 'console';
const TableProfilingChecks = () => {
const {
@@ -98,9 +97,7 @@ const TableProfilingChecks = () => {
};
return (
-