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

PROD-2323 Add-tabs-to-display-monitored-and-ignored-schema-in-Data-Detection #5236

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8b0405e
PROD-2323 WIP
Aug 22, 2024
447b10a
Merge branch 'main' of github.com:ethyca/fides into PROD-2323-Add-tab…
Aug 26, 2024
36e1025
PROD-2323 WIP
Aug 26, 2024
178fcb3
PROD-2323 WIP
Aug 26, 2024
eccf640
PROD-2658 Fix pagination not being reset
Aug 26, 2024
cac7a2d
Update changelog
Aug 26, 2024
661e38c
PROD-2658 code update
Aug 26, 2024
4774e15
Revert file commited accidentaly
Aug 26, 2024
5cfb0a4
Merge branch 'PROD-2658-Blank-table-after-going-back-using-Data-Detec…
Aug 27, 2024
956ecb8
PROD-2323 Make change type icon be monitored when the active tab is m…
Aug 27, 2024
bc84463
PROD_2323 Match the activity icon to the filter tab
Aug 27, 2024
dae626f
Merge branch 'PROD-2323-Add-tabs-to-display-monitored-and-ignored-sch…
Aug 27, 2024
42e58b1
PROD-2323 Reset table pagination to page 1 after switching data detec…
Aug 27, 2024
d523748
PROD-2323 Reset table pagination to page 1 after switching data detec…
Aug 27, 2024
53bd47a
PROD-2323 Fix discovery results using unmonitored tab
Aug 27, 2024
40cc1c8
PROD-2323 Fix detection results using unmonitored tab
Aug 27, 2024
3d0ec8b
PROD-2323 WIP
Aug 27, 2024
39f1bb9
Merge branch 'main' of github.com:ethyca/fides into PROD-2323-Add-tab…
Aug 28, 2024
3859549
PROD-2323 update paging when filters change
Aug 28, 2024
7e7dc08
PROD-2323 Fix bug
Aug 28, 2024
6cb0091
PROD-2323 Don't show confirm button in Monitored/Unmonitored view
Aug 28, 2024
82e1329
PROD-2323 Update tests
Aug 28, 2024
7690924
PROD-2323 Remove confusing eye icons for monitor/unmonitor
Aug 28, 2024
15a629d
PROD-2323 Update test
Aug 28, 2024
99d8de1
PROD-2323 Update changelog
Aug 28, 2024
e04d548
PROD-2323 Add size width of 180 to actions column to prevent buttons …
Aug 28, 2024
1c7e59d
PROD-2323 Update changelog
Aug 28, 2024
fa7c4a4
Merge branch 'main' into PROD-2323-Add-tabs-to-display-monitored-and-…
lucanovera Aug 28, 2024
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ The types of changes are:
### Added
- Added Gzip Middleware for responses [#5225](https://github.com/ethyca/fides/pull/5225)
- Adding source and submitted_by fields to privacy requests (Fidesplus) [#5206](https://github.com/ethyca/fides/pull/5206)
- Added Action Required / Monitored / Unmonitored tabs to Data Detection & Discovery page [#5236](https://github.com/ethyca/fides/pull/5236)


### Changed
- Removed unused `username` parameter from the Delighted integration configuration [#5220](https://github.com/ethyca/fides/pull/5220)
Expand Down
61 changes: 38 additions & 23 deletions clients/admin-ui/cypress/e2e/discovery-detection.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,20 @@ describe("discovery and detection", () => {
}).as("getFilteredDetectionTables");
cy.intercept(
"GET",
"/api/v1/plus/discovery-monitor/results?*diff_status=monitored&diff_status=muted*",
"/api/v1/plus/discovery-monitor/results?diff_status=monitored*",
{
fixture:
"detection-discovery/results/detection/table-list-full-schema.json",
"detection-discovery/results/detection/table-list-monitored-tab-filter.json",
},
).as("getAllDetectionTables");
).as("getAllMonitoredTables");
cy.intercept(
"GET",
"/api/v1/plus/discovery-monitor/results?diff_status=muted*",
{
fixture:
"detection-discovery/results/detection/table-list-unmonitored-tab-filter.json",
},
).as("getAllMutedTables");
cy.visit(
`${DATA_DETECTION_ROUTE}/my_bigquery_monitor.prj-bigquery-418515.test_dataset_1`,
);
Expand All @@ -181,12 +189,12 @@ describe("discovery and detection", () => {
cy.getByTestId("row-my_bigquery_monitor-consent-reports-20").should(
"exist",
);
cy.getByTestId("row-my_bigquery_monitor-consent-reports-19").should(
"exist",
);
cy.getByTestId("row-my_bigquery_monitor-consent-reports-21").should(
"not.exist",
);
cy.getByTestId("full-schema-toggle").within(() => {
cy.get("span").should("not.have.attr", "data-checked");
});
});

it("should navigate to field view on row click", () => {
Expand All @@ -198,35 +206,42 @@ describe("discovery and detection", () => {
);
});

describe("full schema view", () => {
it("should be able to toggle showing full schema", () => {
cy.getByTestId("full-schema-toggle").click();
cy.wait("@getAllDetectionTables");
cy.getByTestId(
"row-my_bigquery_monitor-consent-reports-21-col-status",
).should("contain", "Unmonitored");
describe("Tab filter views", () => {
it("should be able to switch to monitored tab", () => {
cy.getByTestId("tab-Monitored").click();
cy.wait("@getAllMonitoredTables");

cy.getByTestId(
"row-my_bigquery_monitor-consent-reports-22-col-status",
).should("contain", "Monitoring");
});

it("should allow muted tables to be unmuted", () => {
cy.getByTestId("full-schema-toggle").click();
it("should allow monitored tables to be muted", () => {
cy.getByTestId("tab-Monitored").click();
cy.getByTestId(
"row-my_bigquery_monitor-consent-reports-21-col-actions",
"row-my_bigquery_monitor-consent-reports-22-col-actions",
).within(() => {
cy.getByTestId("action-Monitor").click();
cy.wait("@unmuteResource");
cy.getByTestId("action-Ignore").click();
cy.wait("@ignoreResource");
});
});

it("should allow monitored tables to be muted", () => {
cy.getByTestId("full-schema-toggle").click();
it("should be able to switch to unmonitored tab", () => {
cy.getByTestId("tab-Unmonitored").click();
cy.wait("@getAllMutedTables");

cy.getByTestId(
"row-my_bigquery_monitor-consent-reports-22-col-actions",
"row-my_bigquery_monitor-consent-reports-21-col-status",
).should("contain", "Unmonitored");
});

it("should allow muted tables to be unmuted", () => {
cy.getByTestId("tab-Unmonitored").click();
cy.getByTestId(
"row-my_bigquery_monitor-consent-reports-21-col-actions",
).within(() => {
cy.getByTestId("action-Ignore").click();
cy.wait("@ignoreResource");
cy.getByTestId("action-Monitor").click();
cy.wait("@unmuteResource");
});
});
});
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"items": [
{
"urn": "my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20",
"user_assigned_data_categories": [],
"name": "consent-reports-22",
"description": null,
"monitor_config_id": "my_bigquery_monitor",
"updated_at": null,
"source_modified": "2024-03-27T21:47:09.915000+00:00",
"classifications": [],
"diff_status": "monitored",
"child_diff_statuses": {},
"parent_schema": "my_bigquery_monitor.prj-bigquery-418515.test_dataset_1",
"schema_name": "test_dataset_1",
"num_rows": 19,
"fields": [
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Created",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Fides_user_device",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.User_geography",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Preference",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Notice_title",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Phone_number",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Request_origin",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Method",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Email"
],
"database_name": "prj-bigquery-418515"
}
],
"total": 2,
"page": 1,
"size": 25,
"pages": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"items": [
{
"urn": "my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20",
"user_assigned_data_categories": [],
"name": "consent-reports-21",
"description": null,
"monitor_config_id": "my_bigquery_monitor",
"updated_at": null,
"source_modified": "2024-03-27T21:47:09.915000+00:00",
"classifications": [],
"diff_status": "muted",
"child_diff_statuses": {},
"parent_schema": "my_bigquery_monitor.prj-bigquery-418515.test_dataset_1",
"schema_name": "test_dataset_1",
"num_rows": 19,
"fields": [
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Created",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Fides_user_device",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.User_geography",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Preference",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Notice_title",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Phone_number",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Request_origin",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Method",
"my_bigquery_monitor.prj-bigquery-418515.test_dataset_1.consent-reports-20.Email"
],
"database_name": "prj-bigquery-418515"
}
],
"total": 1,
"page": 1,
"size": 25,
"pages": 1
}
7 changes: 6 additions & 1 deletion clients/admin-ui/src/features/common/DataTabsHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ import { FidesTab, TabData, TabListBorder } from "~/features/common/DataTabs";
interface DataTabsHeaderProps {
data: Pick<TabData, "label" | "isDisabled">[];
border?: TabListBorder;
borderWidth?: TabsProps["borderWidth"];
}

const DataTabsHeader = ({
data,
border = "partial",
borderWidth = 2,
...other
}: DataTabsHeaderProps & Omit<TabsProps, "children">) => (
<Tabs colorScheme="complimentary" {...other}>
<TabList width={border === "partial" ? "max-content" : undefined}>
<TabList
width={border === "partial" ? "max-content" : undefined}
borderBottomWidth={borderWidth}
>
{data.map((tab) => (
<FidesTab
key={tab.label}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import DataTabsHeader from "~/features/common/DataTabsHeader";

interface DetectionResultFilterTabsProps {
filterTabIndex: number;
onChange: (index: number) => void;
filterTabs: { label: string }[];
}

const DetectionResultFilterTabs = ({
filterTabs,
onChange,
filterTabIndex,
}: DetectionResultFilterTabsProps) => {
return (
<DataTabsHeader
border="full-width"
mb={5}
size="sm"
data={filterTabs}
borderWidth={1}
index={filterTabIndex}
onChange={onChange}
/>
);
};
export default DetectionResultFilterTabs;
Loading
Loading