Skip to content

Commit 1bb143b

Browse files
committed
2 parents 8599eda + cceeaef commit 1bb143b

File tree

3 files changed

+119
-23
lines changed
  • dqops/src/main/frontend/src/pages

3 files changed

+119
-23
lines changed

dqops/src/main/frontend/src/pages/TableMonitoringChecksUIFilterView/index.tsx

+40-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,48 @@
11
import React, { useEffect, useState } from 'react';
22
import { useSelector } from 'react-redux';
33
import { CheckContainerModel, CheckResultsOverviewDataModel } from '../../api';
4-
import Button from "../../components/Button";
4+
import Button from '../../components/Button';
55
import DataQualityChecks from '../../components/DataQualityChecks';
66
import SvgIcon from '../../components/SvgIcon';
77
import { useActionDispatch } from '../../hooks/useActionDispatch';
88
import {
99
getTableMonitoringChecksModelFilter,
1010
setTableUpdatedMonitoringChecksModelFilter
1111
} from '../../redux/actions/table.actions';
12-
import { getFirstLevelActiveTab, getFirstLevelState } from "../../redux/selectors";
13-
import { CheckResultOverviewApi, TableApiClient } from "../../services/apiClient";
14-
import { CheckTypes } from "../../shared/routes";
12+
import {
13+
getFirstLevelActiveTab,
14+
getFirstLevelState
15+
} from '../../redux/selectors';
16+
import {
17+
CheckResultOverviewApi,
18+
TableApiClient
19+
} from '../../services/apiClient';
20+
import { CheckTypes } from '../../shared/routes';
1521
import { useDecodedParams } from '../../utils';
1622

1723
const TableMonitoringChecksUIFilterView = () => {
18-
const { checkTypes, connection: connectionName, schema: schemaName, table: tableName, timePartitioned, category, checkName }: { checkTypes: CheckTypes, connection: string, schema: string, table: string, timePartitioned: 'daily' | 'monthly', category: string, checkName: string } = useDecodedParams();
19-
const { monitoringChecksUIFilter, isUpdatedMonitoringChecksUIFilter, loading } = useSelector(getFirstLevelState(checkTypes));
24+
const {
25+
checkTypes,
26+
connection: connectionName,
27+
schema: schemaName,
28+
table: tableName,
29+
timePartitioned,
30+
category,
31+
checkName
32+
}: {
33+
checkTypes: CheckTypes;
34+
connection: string;
35+
schema: string;
36+
table: string;
37+
timePartitioned: 'daily' | 'monthly';
38+
category: string;
39+
checkName: string;
40+
} = useDecodedParams();
41+
const {
42+
monitoringChecksUIFilter,
43+
isUpdatedMonitoringChecksUIFilter,
44+
loading
45+
} = useSelector(getFirstLevelState(checkTypes));
2046
const dispatch = useActionDispatch();
2147
const [checkResultsOverview, setCheckResultsOverview] = useState<
2248
CheckResultsOverviewDataModel[]
@@ -50,7 +76,14 @@ const TableMonitoringChecksUIFilterView = () => {
5076
checkName
5177
)
5278
);
53-
}, [connectionName, schemaName, tableName, category, checkName]);
79+
}, [
80+
connectionName,
81+
schemaName,
82+
tableName,
83+
category,
84+
checkName,
85+
firstLevelActiveTab
86+
]);
5487

5588
const onUpdate = async () => {
5689
setIsUpdating(true);

dqops/src/main/frontend/src/pages/TablePartitionedChecksUIFilterView/index.tsx

+40-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,48 @@
11
import React, { useEffect, useState } from 'react';
22
import { useSelector } from 'react-redux';
33
import { CheckContainerModel, CheckResultsOverviewDataModel } from '../../api';
4-
import Button from "../../components/Button";
4+
import Button from '../../components/Button';
55
import DataQualityChecks from '../../components/DataQualityChecks';
66
import SvgIcon from '../../components/SvgIcon';
77
import { useActionDispatch } from '../../hooks/useActionDispatch';
88
import {
99
getTablePartitionedChecksModelFilter,
1010
setTableUpdatedPartitionedChecksModelFilter
1111
} from '../../redux/actions/table.actions';
12-
import { getFirstLevelActiveTab, getFirstLevelState } from "../../redux/selectors";
13-
import { CheckResultOverviewApi, TableApiClient } from "../../services/apiClient";
14-
import { CheckTypes } from "../../shared/routes";
12+
import {
13+
getFirstLevelActiveTab,
14+
getFirstLevelState
15+
} from '../../redux/selectors';
16+
import {
17+
CheckResultOverviewApi,
18+
TableApiClient
19+
} from '../../services/apiClient';
20+
import { CheckTypes } from '../../shared/routes';
1521
import { useDecodedParams } from '../../utils';
1622

1723
const TablePartitionedChecksUIFilterView = () => {
18-
const { checkTypes, connection: connectionName, schema: schemaName, table: tableName, timePartitioned, category, checkName }: { checkTypes: CheckTypes, connection: string, schema: string, table: string, timePartitioned: 'daily' | 'monthly', category: string, checkName: string } = useDecodedParams();
19-
const { partitionedChecksUIFilter, isUpdatedPartitionedChecksUIFilter, loading } = useSelector(getFirstLevelState(checkTypes));
24+
const {
25+
checkTypes,
26+
connection: connectionName,
27+
schema: schemaName,
28+
table: tableName,
29+
timePartitioned,
30+
category,
31+
checkName
32+
}: {
33+
checkTypes: CheckTypes;
34+
connection: string;
35+
schema: string;
36+
table: string;
37+
timePartitioned: 'daily' | 'monthly';
38+
category: string;
39+
checkName: string;
40+
} = useDecodedParams();
41+
const {
42+
partitionedChecksUIFilter,
43+
isUpdatedPartitionedChecksUIFilter,
44+
loading
45+
} = useSelector(getFirstLevelState(checkTypes));
2046
const dispatch = useActionDispatch();
2147
const [checkResultsOverview, setCheckResultsOverview] = useState<
2248
CheckResultsOverviewDataModel[]
@@ -50,7 +76,14 @@ const TablePartitionedChecksUIFilterView = () => {
5076
checkName
5177
)
5278
);
53-
}, [connectionName, schemaName, tableName, category, checkName]);
79+
}, [
80+
connectionName,
81+
schemaName,
82+
tableName,
83+
category,
84+
checkName,
85+
firstLevelActiveTab
86+
]);
5487

5588
const onUpdate = async () => {
5689
setIsUpdating(true);

dqops/src/main/frontend/src/pages/TableProfilingChecksUIFilterView/index.tsx

+39-9
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,51 @@
11
import React, { useEffect, useState } from 'react';
22
import { useSelector } from 'react-redux';
33
import { CheckContainerModel, CheckResultsOverviewDataModel } from '../../api';
4-
import Button from "../../components/Button";
4+
import Button from '../../components/Button';
55
import DataQualityChecks from '../../components/DataQualityChecks';
66
import SvgIcon from '../../components/SvgIcon';
77
import { useActionDispatch } from '../../hooks/useActionDispatch';
88
import {
99
getTableProfilingChecksModelFilter,
1010
setTableUpdatedProfilingChecksModelFilter
1111
} from '../../redux/actions/table.actions';
12-
import { getFirstLevelActiveTab, getFirstLevelState } from "../../redux/selectors";
13-
import { CheckResultOverviewApi, TableApiClient } from "../../services/apiClient";
14-
import { CheckTypes } from "../../shared/routes";
12+
import {
13+
getFirstLevelActiveTab,
14+
getFirstLevelState
15+
} from '../../redux/selectors';
16+
import {
17+
CheckResultOverviewApi,
18+
TableApiClient
19+
} from '../../services/apiClient';
20+
import { CheckTypes } from '../../shared/routes';
1521
import { useDecodedParams } from '../../utils';
1622

1723
const TableProfilingChecksUIFilterView = () => {
18-
const { checkTypes, connection: connectionName, schema: schemaName, table: tableName, category, checkName }: { checkTypes: CheckTypes, connection: string, schema: string, table: string, category: string, checkName: string } = useDecodedParams();
19-
const { checksUIFilter, isUpdatedChecksUIFilter, loading } = useSelector(getFirstLevelState(checkTypes));
24+
const {
25+
checkTypes,
26+
connection: connectionName,
27+
schema: schemaName,
28+
table: tableName,
29+
category,
30+
checkName
31+
}: {
32+
checkTypes: CheckTypes;
33+
connection: string;
34+
schema: string;
35+
table: string;
36+
category: string;
37+
checkName: string;
38+
} = useDecodedParams();
39+
const { checksUIFilter, isUpdatedChecksUIFilter, loading } = useSelector(
40+
getFirstLevelState(checkTypes)
41+
);
2042
const dispatch = useActionDispatch();
2143
const [checkResultsOverview, setCheckResultsOverview] = useState<
2244
CheckResultsOverviewDataModel[]
2345
>([]);
2446
const [isUpdating, setIsUpdating] = useState(false);
2547
const firstLevelActiveTab = useSelector(getFirstLevelActiveTab(checkTypes));
26-
48+
console.log(firstLevelActiveTab);
2749
const getCheckOverview = () => {
2850
CheckResultOverviewApi.getTableProfilingChecksOverview(
2951
connectionName,
@@ -37,6 +59,7 @@ const TableProfilingChecksUIFilterView = () => {
3759
};
3860

3961
useEffect(() => {
62+
console.log(connectionName, schemaName, tableName, category, checkName);
4063
dispatch(
4164
getTableProfilingChecksModelFilter(
4265
checkTypes,
@@ -48,7 +71,14 @@ const TableProfilingChecksUIFilterView = () => {
4871
checkName
4972
)
5073
);
51-
}, [connectionName, schemaName, tableName, category, checkName]);
74+
}, [
75+
connectionName,
76+
schemaName,
77+
tableName,
78+
category,
79+
checkName,
80+
firstLevelActiveTab
81+
]);
5282

5383
const onUpdate = async () => {
5484
setIsUpdating(true);
@@ -82,7 +112,7 @@ const TableProfilingChecksUIFilterView = () => {
82112
)
83113
);
84114
};
85-
115+
console.log(checksUIFilter);
86116
return (
87117
<>
88118
<div className="flex justify-between px-4 py-2 border-b border-gray-300 mb-2 min-h-14">

0 commit comments

Comments
 (0)