-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into PROD-1243-ns-fix-undefined-custom-options-path
- Loading branch information
Showing
5 changed files
with
104 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
clients/admin-ui/src/features/datamap/GVLDatamapNotice.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Box } from "@fidesui/react"; | ||
|
||
import EmptyTableState from "~/features/common/table/EmptyTableState"; | ||
|
||
const GVLDatamapNotice = () => ( | ||
<Box mb="6" maxW="720px" data-testid="GVL-datamap-notice"> | ||
<EmptyTableState | ||
title="GVL and AC vendors are not displayed" | ||
description="Global Vendor List and Google Additional Consent vendors are not displayed on the data map for performance reasons. An enhancement is in the works!" | ||
/> | ||
</Box> | ||
); | ||
|
||
export default GVLDatamapNotice; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from typing import List | ||
|
||
from loguru import logger | ||
from sqlalchemy import not_, or_ | ||
from sqlalchemy.exc import SQLAlchemyError | ||
from sqlalchemy.ext.asyncio import AsyncSession | ||
from sqlalchemy.future import select | ||
from sqlalchemy.sql import Select | ||
|
||
from fides.api.models.sql_models import System # type: ignore[attr-defined] | ||
from fides.api.util import errors | ||
|
||
AC_PREFIX = "gacp." | ||
GVL_PREFIX = "gvl." | ||
|
||
|
||
def exclude_gvl_systems(query: Select) -> Select: | ||
"""Utility function to add a query clause that excludes GVL systems""" | ||
return query.where( | ||
or_(System.vendor_id.is_(None), not_(System.vendor_id.startswith(GVL_PREFIX))) | ||
) | ||
|
||
|
||
def exclude_ac_systems(query: Select) -> Select: | ||
"""Utility function to add a query clause that excludes AC systems""" | ||
return query.where( | ||
or_(System.vendor_id.is_(None), not_(System.vendor_id.startswith(AC_PREFIX))) | ||
) | ||
|
||
|
||
def list_non_tcf_systems(exclude_gvl: bool = True, exclude_ac: bool = True) -> Select: | ||
""" | ||
Utility to retrieve all Systems that are not GVL systems using | ||
the provided (async) DB session. | ||
""" | ||
|
||
query = select(System) | ||
if exclude_gvl: | ||
query = exclude_gvl_systems(query) | ||
if exclude_ac: | ||
query = exclude_ac_systems(query) | ||
return query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters