ethyca-fides 2.67.0rc0__py2.py3-none-any.whl → 2.67.0rc2__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ethyca-fides might be problematic. Click here for more details.
- {ethyca_fides-2.67.0rc0.dist-info → ethyca_fides-2.67.0rc2.dist-info}/METADATA +1 -1
- {ethyca_fides-2.67.0rc0.dist-info → ethyca_fides-2.67.0rc2.dist-info}/RECORD +129 -128
- fides/_version.py +3 -3
- fides/api/common_exceptions.py +4 -0
- fides/api/graph/execution.py +16 -0
- fides/api/schemas/connection_configuration/connection_secrets_datahub.py +10 -1
- fides/api/service/connectors/base_connector.py +14 -0
- fides/api/service/connectors/bigquery_connector.py +5 -0
- fides/api/service/connectors/query_configs/bigquery_query_config.py +4 -4
- fides/api/service/connectors/query_configs/snowflake_query_config.py +3 -3
- fides/api/service/connectors/snowflake_connector.py +55 -2
- fides/api/service/connectors/sql_connector.py +107 -9
- fides/api/task/graph_task.py +2 -0
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/5x65uIwZtfTiu6ITZ4wqq/_buildManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5309-d9a488457898263b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{6780-fc7d9ddb1a03e7b3.js → 6780-b42a27e72707936d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/7725-539d3a906f627531.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/8735-40caf91800a3610c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9046-7085a401297c5520.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-4b5bff46158a19a3.js → _app-750d6bd16c971bb9.js} +2 -2
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-a286affa43687eb5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-92b0bd97d8e79340.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-ee3c0a103346fc06.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-8e346fb36e8034d2.js +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-preview.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +4 -4
- fides/ui-build/static/admin/lib/fides.js +4 -4
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/poc/ant-components.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
- fides/ui-build/static/admin/poc/forms.html +1 -1
- fides/ui-build/static/admin/poc/table-migration.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about/alpha.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/ui-build/static/admin/_next/static/GKmhMPa_1gMto8JZO8ENy/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5309-ce5702b9faeaff55.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8237-841439bef6682177.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9046-04a8c092fef1cd83.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-7caea7bb58c1f153.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-a9a70856f7be1542.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-1f0ea5c92ae9a2b4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-f53fe1f2cbebda7c.js +0 -1
- {ethyca_fides-2.67.0rc0.dist-info → ethyca_fides-2.67.0rc2.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.67.0rc0.dist-info → ethyca_fides-2.67.0rc2.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.67.0rc0.dist-info → ethyca_fides-2.67.0rc2.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.67.0rc0.dist-info → ethyca_fides-2.67.0rc2.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{GKmhMPa_1gMto8JZO8ENy → 5x65uIwZtfTiu6ITZ4wqq}/_ssgManifest.js +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3450-ca4ba70da999f264.js → 3450-69f4e16978971bb8.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{4608-43acf39319177bee.js → 4608-f16f281f2d05d963.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6662-4392ba1e4c254ef7.js → 6662-a9e54ead3dc53644.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6954-9c4912fbce87c4df.js → 6954-ba98e778a5b45ebf.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-d5b01abcb76792ce.js → data-catalog-7770a8dc34bd0fc0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-8446418c7ad28f77.js → new-c6614583b14dc9f2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-0f29b47402292070.js → datastore-connection-3bd77864da523d41.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-142abe3e3e3e5bf7.js → integrations-7f15cd8538cdc24d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-1b6b0d703cf59389.js → [id]-79f1576b1126975c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-ccd8d9e06cf2d278.js → privacy-requests-96a08c4431b5462c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-fd1a67892056830a.js → datamap-9d1840f8309b706e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/{alpha-8f98a4895e74725e.js → alpha-1066f0c202ef744c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-8155a35a62fdb5ae.js → about-37ba24a72a06862e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-bc4eb541906781e6.js → new-de8cb3739ab99c09.js} +0 -0
|
@@ -93,7 +93,7 @@ class BigQueryQueryConfig(QueryStringWithoutTuplesOverrideQueryConfig):
|
|
|
93
93
|
|
|
94
94
|
return where_clauses
|
|
95
95
|
|
|
96
|
-
def
|
|
96
|
+
def generate_table_name(self) -> str:
|
|
97
97
|
"""
|
|
98
98
|
Prepends the dataset ID and project ID to the base table name
|
|
99
99
|
if the BigQuery namespace meta is provided.
|
|
@@ -116,7 +116,7 @@ class BigQueryQueryConfig(QueryStringWithoutTuplesOverrideQueryConfig):
|
|
|
116
116
|
Returns a query string with backtick formatting for tables that have the same names as
|
|
117
117
|
BigQuery reserved words.
|
|
118
118
|
"""
|
|
119
|
-
return f'SELECT {field_list} FROM `{self.
|
|
119
|
+
return f'SELECT {field_list} FROM `{self.generate_table_name()}` WHERE ({" OR ".join(clauses)})'
|
|
120
120
|
|
|
121
121
|
def generate_masking_stmt(
|
|
122
122
|
self,
|
|
@@ -197,7 +197,7 @@ class BigQueryQueryConfig(QueryStringWithoutTuplesOverrideQueryConfig):
|
|
|
197
197
|
)
|
|
198
198
|
return []
|
|
199
199
|
|
|
200
|
-
table = Table(self.
|
|
200
|
+
table = Table(self.generate_table_name(), MetaData(bind=client), autoload=True)
|
|
201
201
|
where_clauses: List[ColumnElement] = [
|
|
202
202
|
table.c[k] == v for k, v in non_empty_reference_field_keys.items()
|
|
203
203
|
]
|
|
@@ -256,7 +256,7 @@ class BigQueryQueryConfig(QueryStringWithoutTuplesOverrideQueryConfig):
|
|
|
256
256
|
)
|
|
257
257
|
return []
|
|
258
258
|
|
|
259
|
-
table = Table(self.
|
|
259
|
+
table = Table(self.generate_table_name(), MetaData(bind=client), autoload=True)
|
|
260
260
|
|
|
261
261
|
# Build individual reference clauses
|
|
262
262
|
where_clauses: List[ColumnElement] = []
|
|
@@ -30,7 +30,7 @@ class SnowflakeQueryConfig(SQLQueryConfig):
|
|
|
30
30
|
"""Returns field names in clauses surrounded by quotation marks as required by Snowflake syntax."""
|
|
31
31
|
return f'"{string_path}" {operator} (:{operand})'
|
|
32
32
|
|
|
33
|
-
def
|
|
33
|
+
def generate_table_name(self) -> str:
|
|
34
34
|
"""
|
|
35
35
|
Prepends the dataset name and schema to the base table name
|
|
36
36
|
if the Snowflake namespace meta is provided.
|
|
@@ -57,7 +57,7 @@ class SnowflakeQueryConfig(SQLQueryConfig):
|
|
|
57
57
|
clauses: List[str],
|
|
58
58
|
) -> str:
|
|
59
59
|
"""Returns a query string with double quotation mark formatting as required by Snowflake syntax."""
|
|
60
|
-
return f'SELECT {field_list} FROM {self.
|
|
60
|
+
return f'SELECT {field_list} FROM {self.generate_table_name()} WHERE ({" OR ".join(clauses)})'
|
|
61
61
|
|
|
62
62
|
def format_key_map_for_update_stmt(self, param_map: Dict[str, Any]) -> List[str]:
|
|
63
63
|
"""Adds the appropriate formatting for update statements in this datastore."""
|
|
@@ -69,4 +69,4 @@ class SnowflakeQueryConfig(SQLQueryConfig):
|
|
|
69
69
|
where_clauses: List[str],
|
|
70
70
|
) -> str:
|
|
71
71
|
"""Returns a parameterized update statement in Snowflake dialect."""
|
|
72
|
-
return f'UPDATE {self.
|
|
72
|
+
return f'UPDATE {self.generate_table_name()} SET {", ".join(update_clauses)} WHERE {" AND ".join(where_clauses)}'
|
|
@@ -3,11 +3,11 @@ from typing import Any, Dict, Union
|
|
|
3
3
|
from cryptography.hazmat.backends import default_backend
|
|
4
4
|
from cryptography.hazmat.primitives import serialization
|
|
5
5
|
from snowflake.sqlalchemy import URL as Snowflake_URL
|
|
6
|
+
from sqlalchemy import text
|
|
6
7
|
from sqlalchemy.orm import Session
|
|
7
8
|
|
|
8
9
|
from fides.api.graph.execution import ExecutionNode
|
|
9
10
|
from fides.api.schemas.connection_configuration import SnowflakeSchema
|
|
10
|
-
from fides.api.service.connectors.query_configs.query_config import SQLQueryConfig
|
|
11
11
|
from fides.api.service.connectors.query_configs.snowflake_query_config import (
|
|
12
12
|
SnowflakeQueryConfig,
|
|
13
13
|
)
|
|
@@ -69,10 +69,63 @@ class SnowflakeConnector(SQLConnector):
|
|
|
69
69
|
connect_args["private_key"] = private_key
|
|
70
70
|
return connect_args
|
|
71
71
|
|
|
72
|
-
def query_config(self, node: ExecutionNode) ->
|
|
72
|
+
def query_config(self, node: ExecutionNode) -> SnowflakeQueryConfig:
|
|
73
73
|
"""Query wrapper corresponding to the input execution_node."""
|
|
74
74
|
|
|
75
75
|
db: Session = Session.object_session(self.configuration)
|
|
76
76
|
return SnowflakeQueryConfig(
|
|
77
77
|
node, SQLConnector.get_namespace_meta(db, node.address.dataset)
|
|
78
78
|
)
|
|
79
|
+
|
|
80
|
+
def get_qualified_table_name(self, node: ExecutionNode) -> str:
|
|
81
|
+
"""Get fully qualified Snowflake table name using existing query config logic"""
|
|
82
|
+
query_config = self.query_config(node)
|
|
83
|
+
return query_config.generate_table_name()
|
|
84
|
+
|
|
85
|
+
def table_exists(self, qualified_table_name: str) -> bool:
|
|
86
|
+
"""
|
|
87
|
+
Check if table exists in Snowflake using the proper three-part naming convention.
|
|
88
|
+
|
|
89
|
+
Snowflake supports database.schema.table naming, and the generic SQLConnector
|
|
90
|
+
table_exists method doesn't handle quoted identifiers properly.
|
|
91
|
+
"""
|
|
92
|
+
try:
|
|
93
|
+
client = self.create_client()
|
|
94
|
+
with client.connect() as connection:
|
|
95
|
+
# Remove quotes and split the parts
|
|
96
|
+
clean_name = qualified_table_name.replace('"', "")
|
|
97
|
+
parts = clean_name.split(".")
|
|
98
|
+
|
|
99
|
+
if len(parts) == 1:
|
|
100
|
+
# Simple table name - use current schema
|
|
101
|
+
table_name = parts[0]
|
|
102
|
+
result = connection.execute(text(f'DESC TABLE "{table_name}"'))
|
|
103
|
+
elif len(parts) == 2:
|
|
104
|
+
# schema.table format
|
|
105
|
+
schema_name, table_name = parts
|
|
106
|
+
result = connection.execute(
|
|
107
|
+
text(f'DESC TABLE "{schema_name}"."{table_name}"')
|
|
108
|
+
)
|
|
109
|
+
elif len(parts) >= 3:
|
|
110
|
+
# database.schema.table format
|
|
111
|
+
database_name, schema_name, table_name = (
|
|
112
|
+
parts[-3],
|
|
113
|
+
parts[-2],
|
|
114
|
+
parts[-1],
|
|
115
|
+
)
|
|
116
|
+
# Use the database.schema.table format
|
|
117
|
+
result = connection.execute(
|
|
118
|
+
text(
|
|
119
|
+
f'DESC TABLE "{database_name}"."{schema_name}"."{table_name}"'
|
|
120
|
+
)
|
|
121
|
+
)
|
|
122
|
+
else:
|
|
123
|
+
return False
|
|
124
|
+
|
|
125
|
+
# If we get here without an exception, the table exists
|
|
126
|
+
result.close()
|
|
127
|
+
return True
|
|
128
|
+
|
|
129
|
+
except Exception:
|
|
130
|
+
# Table doesn't exist or other error
|
|
131
|
+
return False
|
|
@@ -6,7 +6,7 @@ import paramiko
|
|
|
6
6
|
import sshtunnel # type: ignore
|
|
7
7
|
from aiohttp.client_exceptions import ClientResponseError
|
|
8
8
|
from loguru import logger
|
|
9
|
-
from sqlalchemy import Column, select
|
|
9
|
+
from sqlalchemy import Column, inspect, select
|
|
10
10
|
from sqlalchemy.dialects.postgresql import JSONB
|
|
11
11
|
from sqlalchemy.engine import ( # type: ignore
|
|
12
12
|
Connection,
|
|
@@ -22,6 +22,7 @@ from sqlalchemy.sql.elements import TextClause
|
|
|
22
22
|
from fides.api.common_exceptions import (
|
|
23
23
|
ConnectionException,
|
|
24
24
|
SSHTunnelConfigNotFoundException,
|
|
25
|
+
TableNotFound,
|
|
25
26
|
)
|
|
26
27
|
from fides.api.graph.execution import ExecutionNode
|
|
27
28
|
from fides.api.models.connectionconfig import ConnectionConfig, ConnectionTestStatus
|
|
@@ -189,14 +190,28 @@ class SQLConnector(BaseConnector[Engine]):
|
|
|
189
190
|
|
|
190
191
|
logger.info("Starting data retrieval for {}", node.address)
|
|
191
192
|
with client.connect() as connection:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
193
|
+
try:
|
|
194
|
+
self.set_schema(connection)
|
|
195
|
+
if (
|
|
196
|
+
query_config.partitioning
|
|
197
|
+
): # only BigQuery supports partitioning, for now
|
|
198
|
+
return self.partitioned_retrieval(query_config, connection, stmt)
|
|
199
|
+
|
|
200
|
+
results = connection.execute(stmt)
|
|
201
|
+
return self.cursor_result_to_rows(results)
|
|
202
|
+
except Exception as exc:
|
|
203
|
+
# Check if table exists using qualified table name
|
|
204
|
+
qualified_table_name = self.get_qualified_table_name(node)
|
|
205
|
+
if not self.table_exists(qualified_table_name):
|
|
206
|
+
# Central decision point - will raise TableNotFound or ConnectionException
|
|
207
|
+
self.handle_table_not_found(
|
|
208
|
+
node=node,
|
|
209
|
+
table_name=qualified_table_name,
|
|
210
|
+
operation_context="data retrieval",
|
|
211
|
+
original_exception=exc,
|
|
212
|
+
)
|
|
213
|
+
# Table exists or can't check - re-raise original exception
|
|
214
|
+
raise
|
|
200
215
|
|
|
201
216
|
def mask_data(
|
|
202
217
|
self,
|
|
@@ -290,3 +305,86 @@ class SQLConnector(BaseConnector[Engine]):
|
|
|
290
305
|
raise NotImplementedError(
|
|
291
306
|
"Partitioned retrieval is only supported for BigQuery currently!"
|
|
292
307
|
)
|
|
308
|
+
|
|
309
|
+
def get_qualified_table_name(self, node: ExecutionNode) -> str:
|
|
310
|
+
"""
|
|
311
|
+
Get the fully qualified table name for this database.
|
|
312
|
+
|
|
313
|
+
Default: Returns the simple collection name
|
|
314
|
+
Override: Database-specific connectors can implement namespace resolution
|
|
315
|
+
"""
|
|
316
|
+
return node.collection.name
|
|
317
|
+
|
|
318
|
+
def table_exists(self, qualified_table_name: str) -> bool:
|
|
319
|
+
"""
|
|
320
|
+
Check if table exists using SQLAlchemy introspection.
|
|
321
|
+
|
|
322
|
+
This is a generic implementation that should work for most SQL databases.
|
|
323
|
+
Override: Connectors can implement database-specific table existence checking
|
|
324
|
+
"""
|
|
325
|
+
try:
|
|
326
|
+
client = self.create_client()
|
|
327
|
+
with client.connect() as connection:
|
|
328
|
+
inspector = inspect(connection)
|
|
329
|
+
|
|
330
|
+
# For simple table names
|
|
331
|
+
if "." not in qualified_table_name:
|
|
332
|
+
return inspector.has_table(qualified_table_name)
|
|
333
|
+
|
|
334
|
+
# For qualified names like schema.table or database.schema.table
|
|
335
|
+
parts = qualified_table_name.split(".")
|
|
336
|
+
|
|
337
|
+
if len(parts) == 2:
|
|
338
|
+
# schema.table format
|
|
339
|
+
schema_name, table_name = parts
|
|
340
|
+
return inspector.has_table(table_name, schema=schema_name)
|
|
341
|
+
|
|
342
|
+
if len(parts) >= 3:
|
|
343
|
+
# database.schema.table format (use schema.table)
|
|
344
|
+
schema_name, table_name = parts[-2], parts[-1]
|
|
345
|
+
return inspector.has_table(table_name, schema=schema_name)
|
|
346
|
+
|
|
347
|
+
# Fallback for unexpected format
|
|
348
|
+
return inspector.has_table(qualified_table_name)
|
|
349
|
+
|
|
350
|
+
except Exception as exc:
|
|
351
|
+
# Graceful fallback - if we can't check, assume table exists
|
|
352
|
+
# to preserve existing behavior for connectors that don't implement this
|
|
353
|
+
logger.error("Unable to check if table exists, assuming it does: {}", exc)
|
|
354
|
+
return True
|
|
355
|
+
|
|
356
|
+
def handle_table_not_found(
|
|
357
|
+
self,
|
|
358
|
+
node: ExecutionNode,
|
|
359
|
+
table_name: str,
|
|
360
|
+
operation_context: str,
|
|
361
|
+
original_exception: Optional[Exception] = None,
|
|
362
|
+
) -> None:
|
|
363
|
+
"""
|
|
364
|
+
Central decision point for table-not-found scenarios.
|
|
365
|
+
|
|
366
|
+
Raises TableNotFound (for collection skipping) or ConnectionException (for hard errors).
|
|
367
|
+
The raised exception will be caught by the @retry decorator in graph_task.py.
|
|
368
|
+
|
|
369
|
+
Args:
|
|
370
|
+
node: The ExecutionNode being processed
|
|
371
|
+
table_name: Name of the missing table
|
|
372
|
+
operation_context: Context like "data retrieval" or "data masking"
|
|
373
|
+
original_exception: The original exception that triggered this check
|
|
374
|
+
"""
|
|
375
|
+
if node.has_outgoing_dependencies():
|
|
376
|
+
# Collection has dependencies - cannot skip safely
|
|
377
|
+
error_msg = (
|
|
378
|
+
f"Table '{table_name}' did not exist during {operation_context}. "
|
|
379
|
+
f"Cannot skip collection '{node.address}' because other collections depend on it."
|
|
380
|
+
)
|
|
381
|
+
if original_exception:
|
|
382
|
+
raise ConnectionException(error_msg) from original_exception
|
|
383
|
+
raise ConnectionException(error_msg)
|
|
384
|
+
|
|
385
|
+
# Safe to skip - raise TableNotFound for @retry decorator to catch
|
|
386
|
+
skip_msg = f"Table '{table_name}' did not exist during {operation_context}."
|
|
387
|
+
if original_exception:
|
|
388
|
+
raise TableNotFound(skip_msg) from original_exception
|
|
389
|
+
|
|
390
|
+
raise TableNotFound(skip_msg)
|
fides/api/task/graph_task.py
CHANGED
|
@@ -18,6 +18,7 @@ from fides.api.common_exceptions import (
|
|
|
18
18
|
NotSupportedForCollection,
|
|
19
19
|
PrivacyRequestErasureEmailSendRequired,
|
|
20
20
|
SkippingConsentPropagation,
|
|
21
|
+
TableNotFound,
|
|
21
22
|
)
|
|
22
23
|
from fides.api.graph.config import (
|
|
23
24
|
ROOT_COLLECTION_ADDRESS,
|
|
@@ -126,6 +127,7 @@ def retry(
|
|
|
126
127
|
CollectionDisabled,
|
|
127
128
|
ActionDisabled,
|
|
128
129
|
NotSupportedForCollection,
|
|
130
|
+
TableNotFound,
|
|
129
131
|
) as exc:
|
|
130
132
|
logger.warning(
|
|
131
133
|
"{} - Skipping collection {} for privacy_request: {}",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/d9924caa849931b3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d9924caa849931b3.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-90e8ec1fc5c6455b.js" defer=""></script><script src="/_next/static/chunks/framework-c92fc3344e6fd165.js" defer=""></script><script src="/_next/static/chunks/main-090643377c8254e6.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/d9924caa849931b3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d9924caa849931b3.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-90e8ec1fc5c6455b.js" defer=""></script><script src="/_next/static/chunks/framework-c92fc3344e6fd165.js" defer=""></script><script src="/_next/static/chunks/main-090643377c8254e6.js" defer=""></script><script src="/_next/static/chunks/pages/_app-750d6bd16c971bb9.js" defer=""></script><script src="/_next/static/chunks/pages/404-2d803dab6a00f353.js" defer=""></script><script src="/_next/static/5x65uIwZtfTiu6ITZ4wqq/_buildManifest.js" defer=""></script><script src="/_next/static/5x65uIwZtfTiu6ITZ4wqq/_ssgManifest.js" defer=""></script><style>.data-ant-cssinjs-cache-path{content:"";}</style></head><body><div id="__next"><div style="height:100%;display:flex"></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"5x65uIwZtfTiu6ITZ4wqq","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,e,t,a,c,n,i,d,o,r,p,u,g,f,m,j,b,k,h,y,l,v,I,F,x,_,U,w,q,N,A,S,B,C,z,D,E,L,M,T,P,G,H,J,K,O,Q){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[I,"static/chunks/pages/index-fbf9b845bb901238.js"],"/404":["static/chunks/pages/404-2d803dab6a00f353.js"],"/_error":["static/chunks/pages/_error-bede3a8288930dcf.js"],"/add-systems":[I,"static/chunks/pages/add-systems-0902f0bb4080643e.js"],"/add-systems/manual":[s,e,t,c,p,a,i,u,b,F,x,"static/chunks/pages/add-systems/manual-2a655ff3a97f2492.js"],"/add-systems/multiple":[i,g,_,"static/chunks/pages/add-systems/multiple-8ff7f37913ad736a.js"],"/consent":["static/chunks/pages/consent-e17c56eec8d91371.js"],"/consent/configure":[i,g,"static/chunks/pages/consent/configure-0e1ca0f4c8e7f4da.js"],"/consent/configure/add-vendors":[i,g,_,"static/chunks/pages/consent/configure/add-vendors-d00c9034cdeb0236.js"],"/consent/privacy-experience":[p,U,"static/chunks/pages/consent/privacy-experience-21f997c69fc3b4c2.js"],"/consent/privacy-experience/new":[s,d,f,m,w,"static/chunks/pages/consent/privacy-experience/new-e74cb5ea87f15b40.js"],"/consent/privacy-experience/[id]":[s,d,f,m,w,"static/chunks/pages/consent/privacy-experience/[id]-f22ddd9b48a5c418.js"],"/consent/privacy-notices":[U,"static/chunks/pages/consent/privacy-notices-ad105181bc91209b.js"],"/consent/privacy-notices/new":[s,d,f,m,q,"static/chunks/pages/consent/privacy-notices/new-a57d251c88ce68ae.js"],"/consent/privacy-notices/[id]":[s,d,f,m,q,"static/chunks/pages/consent/privacy-notices/[id]-da4124b7600a2a1d.js"],"/consent/properties":[N,"static/chunks/pages/consent/properties-057cad65e7414a44.js"],"/consent/reporting":["static/chunks/2150-930ffaf2c4718edc.js","static/chunks/pages/consent/reporting-b0c4235fe6d0b0c8.js"],"/data-catalog":[s,e,t,a,"static/css/95ac327e5d70148d.css","static/chunks/pages/data-catalog-7770a8dc34bd0fc0.js"],"/data-catalog/[systemId]/projects":[s,e,t,a,k,n,"static/chunks/pages/data-catalog/[systemId]/projects-29784a11fe0fbd0a.js"],"/data-catalog/[systemId]/projects/[projectUrn]":[A,"static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-80a6cc8e8573514a.js"],"/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]":[s,e,t,a,k,S,n,"static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]-aad6047a4604b945.js"],"/data-catalog/[systemId]/resources":[A,"static/chunks/pages/data-catalog/[systemId]/resources-6c3714ee97a718c1.js"],"/data-catalog/[systemId]/resources/[resourceUrn]":[s,e,t,a,k,S,n,"static/chunks/pages/data-catalog/[systemId]/resources/[resourceUrn]-b6b98cea25dd94fa.js"],"/data-discovery/action-center":[h,"static/chunks/pages/data-discovery/action-center-ee3c0a103346fc06.js"],"/data-discovery/action-center/[monitorId]":[s,e,t,h,B,y,"static/chunks/pages/data-discovery/action-center/[monitorId]-92b0bd97d8e79340.js"],"/data-discovery/action-center/[monitorId]/[systemId]":[s,e,t,i,b,h,B,"static/css/23cf870196941c9a.css","static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-a286affa43687eb5.js"],"/data-discovery/activity":[r,"static/chunks/pages/data-discovery/activity-ad6a84a6276f914c.js"],"/data-discovery/detection":[r,C,"static/chunks/pages/data-discovery/detection-2822a423a7ad0550.js"],"/data-discovery/detection/[resourceUrn]":[r,C,"static/chunks/pages/data-discovery/detection/[resourceUrn]-31e6c54794a9883e.js"],"/data-discovery/discovery":[s,e,t,a,r,z,n,"static/chunks/pages/data-discovery/discovery-56eb4c014f0d96a3.js"],"/data-discovery/discovery/[resourceUrn]":[s,e,t,a,r,z,n,"static/chunks/pages/data-discovery/discovery/[resourceUrn]-f98dd251babb7e28.js"],"/datamap":[t,"static/chunks/255-1bc0cbef7a59cdc6.js",u,D,"static/chunks/pages/datamap-d23b3ae139f0428b.js"],"/dataset":[o,j,"static/chunks/pages/dataset-f3348d0a92543bab.js"],"/dataset/new":[o,j,"static/chunks/pages/dataset/new-0d50084fbdf9b84c.js"],"/dataset/[datasetId]":["static/chunks/9729-fcf6ff4e3534e4a8.js",l,"static/chunks/pages/dataset/[datasetId]-a8e8b5f4ee7af86c.js"],"/dataset/[datasetId]/[collectionName]":[s,e,t,c,a,l,n,"static/chunks/pages/dataset/[datasetId]/[collectionName]-0fa72873e464f581.js"],"/dataset/[datasetId]/[collectionName]/[...subfieldNames]":[s,e,t,c,a,l,n,"static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-15301bd6bf7cf718.js"],"/datastore-connection":["static/css/5f393dea1c0d031c.css","static/chunks/pages/datastore-connection-3bd77864da523d41.js"],"/datastore-connection/new":[s,c,o,p,E,j,L,"static/chunks/pages/datastore-connection/new-c6614583b14dc9f2.js"],"/datastore-connection/[id]":[s,c,o,E,j,L,"static/chunks/pages/datastore-connection/[id]-7d6027570d05c57f.js"],"/fides-js-docs":["static/chunks/2fbcc6de-a6c61724c327e9fa.js","static/chunks/e3251fe7-5777b5d778e6fffa.js",s,e,t,c,o,"static/chunks/5619-9b50cec521203989.js",M,"static/css/ab65b8cc3144bfc8.css","static/chunks/5596-4378b2927dae65b2.js","static/chunks/pages/fides-js-docs-1f4335dca5c09860.js"],"/integrations":[s,e,t,c,d,T,P,n,"static/chunks/pages/integrations-7f15cd8538cdc24d.js"],"/integrations/[id]":[s,e,t,c,d,T,P,n,"static/chunks/pages/integrations/[id]-8e346fb36e8034d2.js"],"/login":["static/chunks/pages/login-0cb0eb44bf2dd24c.js"],"/login/[provider]":["static/chunks/pages/login/[provider]-c58beef131c3a82d.js"],"/messaging":[s,e,"static/chunks/346-aa3b88efb85f2e28.js","static/chunks/pages/messaging-1bae386d8c190348.js"],"/messaging/add-template":[G,"static/chunks/pages/messaging/add-template-feca66ad5c5fe54a.js"],"/messaging/[id]":[G,"static/chunks/pages/messaging/[id]-5627d0d0668077f9.js"],"/poc/ant-components":["static/chunks/pages/poc/ant-components-64a322d01aae5ca7.js"],"/poc/form-experiments/AntForm":["static/chunks/pages/poc/form-experiments/AntForm-8bca16a7726e7eb2.js"],"/poc/form-experiments/FormikAntFormItem":["static/chunks/pages/poc/form-experiments/FormikAntFormItem-b0f246fc3b67ebf7.js"],"/poc/form-experiments/FormikControlled":["static/chunks/pages/poc/form-experiments/FormikControlled-1a0852b090bfc392.js"],"/poc/form-experiments/FormikField":["static/chunks/pages/poc/form-experiments/FormikField-11f3de1b45e36583.js"],"/poc/form-experiments/FormikSpreadField":[H,"static/chunks/pages/poc/form-experiments/FormikSpreadField-af097d661f6abcf4.js"],"/poc/forms":[H,"static/chunks/pages/poc/forms-1b73a1c2b6c6285f.js"],"/poc/table-migration":[i,g,"static/chunks/pages/poc/table-migration-05616e2ae20ff4f8.js"],"/privacy-requests":[s,"static/chunks/3550-d04125c828d591a1.js",J,"static/chunks/pages/privacy-requests-96a08c4431b5462c.js"],"/privacy-requests/configure":["static/chunks/pages/privacy-requests/configure-e551a860ec727802.js"],"/privacy-requests/configure/messaging":["static/chunks/pages/privacy-requests/configure/messaging-f1d818242d8550f8.js"],"/privacy-requests/configure/storage":["static/chunks/pages/privacy-requests/configure/storage-d40a26bddb126c5c.js"],"/privacy-requests/[id]":[J,"static/css/8bc1833f1fa53ff0.css","static/chunks/pages/privacy-requests/[id]-79f1576b1126975c.js"],"/properties":[N,"static/chunks/pages/properties-e959378bb32b6b73.js"],"/properties/add-property":[K,"static/chunks/pages/properties/add-property-0bdbc1fcbf553b8f.js"],"/properties/[id]":[K,"static/chunks/pages/properties/[id]-dd99183f93763ae4.js"],"/reporting/datamap":[s,e,t,M,u,D,"static/chunks/pages/reporting/datamap-9d1840f8309b706e.js"],"/settings/about":["static/chunks/pages/settings/about-37ba24a72a06862e.js"],"/settings/about/alpha":["static/chunks/pages/settings/about/alpha-1066f0c202ef744c.js"],"/settings/consent":["static/chunks/pages/settings/consent-f61b87e79367865b.js"],"/settings/consent/[configuration_id]/[purpose_id]":["static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-e891d01ece59669e.js"],"/settings/custom-fields":["static/chunks/pages/settings/custom-fields-f8eea5d508c60c64.js"],"/settings/domain-records":["static/chunks/pages/settings/domain-records-51333dbd21cb37c8.js"],"/settings/domains":["static/chunks/pages/settings/domains-bde86e5f6c09da5a.js"],"/settings/email-templates":["static/chunks/pages/settings/email-templates-4f9a5cc8bea7725b.js"],"/settings/locations":[O,y,"static/chunks/pages/settings/locations-ed6a140b362c5baa.js"],"/settings/organization":["static/chunks/pages/settings/organization-ff9a34264d48c35f.js"],"/settings/regulations":[O,y,"static/chunks/pages/settings/regulations-102efd9199e87124.js"],"/systems":["static/chunks/pages/systems-c05b49ddec1a1b4f.js"],"/systems/configure/[id]":[s,e,t,c,p,a,i,u,b,F,x,"static/chunks/pages/systems/configure/[id]-c8f5fbaa83dd9945.js"],"/systems/configure/[id]/test-datasets":[o,"static/chunks/pages/systems/configure/[id]/test-datasets-a4b6d41ca679298b.js"],"/taxonomy":["static/chunks/678d4732-50255cc09048e643.js",s,e,d,"static/chunks/6148-59a59d5c5925344f.js","static/css/34a7eb08b86ddb57.css","static/chunks/pages/taxonomy-df0d88716578e295.js"],"/user-management":[v,"static/chunks/pages/user-management-e98dfc7d4f2a4e16.js"],"/user-management/new":[v,Q,"static/chunks/pages/user-management/new-de8cb3739ab99c09.js"],"/user-management/profile/[id]":[v,Q,"static/chunks/pages/user-management/profile/[id]-da68efc31998dc66.js"],sortedPages:["/","/404","/_app","/_error","/add-systems","/add-systems/manual","/add-systems/multiple","/consent","/consent/configure","/consent/configure/add-vendors","/consent/privacy-experience","/consent/privacy-experience/new","/consent/privacy-experience/[id]","/consent/privacy-notices","/consent/privacy-notices/new","/consent/privacy-notices/[id]","/consent/properties","/consent/reporting","/data-catalog","/data-catalog/[systemId]/projects","/data-catalog/[systemId]/projects/[projectUrn]","/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]","/data-catalog/[systemId]/resources","/data-catalog/[systemId]/resources/[resourceUrn]","/data-discovery/action-center","/data-discovery/action-center/[monitorId]","/data-discovery/action-center/[monitorId]/[systemId]","/data-discovery/activity","/data-discovery/detection","/data-discovery/detection/[resourceUrn]","/data-discovery/discovery","/data-discovery/discovery/[resourceUrn]","/datamap","/dataset","/dataset/new","/dataset/[datasetId]","/dataset/[datasetId]/[collectionName]","/dataset/[datasetId]/[collectionName]/[...subfieldNames]","/datastore-connection","/datastore-connection/new","/datastore-connection/[id]","/fides-js-docs","/integrations","/integrations/[id]","/login","/login/[provider]","/messaging","/messaging/add-template","/messaging/[id]","/poc/ant-components","/poc/form-experiments/AntForm","/poc/form-experiments/FormikAntFormItem","/poc/form-experiments/FormikControlled","/poc/form-experiments/FormikField","/poc/form-experiments/FormikSpreadField","/poc/forms","/poc/table-migration","/privacy-requests","/privacy-requests/configure","/privacy-requests/configure/messaging","/privacy-requests/configure/storage","/privacy-requests/[id]","/properties","/properties/add-property","/properties/[id]","/reporting/datamap","/settings/about","/settings/about/alpha","/settings/consent","/settings/consent/[configuration_id]/[purpose_id]","/settings/custom-fields","/settings/domain-records","/settings/domains","/settings/email-templates","/settings/locations","/settings/organization","/settings/regulations","/systems","/systems/configure/[id]","/systems/configure/[id]/test-datasets","/taxonomy","/user-management","/user-management/new","/user-management/profile/[id]"]}}("static/chunks/8765-f622a35b40a7ec63.js","static/chunks/9278-08cc704317fe535e.js","static/chunks/5163-e682273cd76a7d07.js","static/chunks/409-ea70638a59296659.js","static/chunks/699-8ca44b0de9fa20f0.js","static/css/d2d4e9a6923e6730.css","static/chunks/401-3cc1fee61494e3bd.js","static/chunks/3662-f6a1ddca5ee42076.js","static/chunks/6527-0eed08abe252a918.js","static/chunks/431-1db919f6569a4021.js","static/chunks/5277-e8a036319456127f.js","static/chunks/9951-7c6639e5d062779e.js","static/chunks/3923-13a6b4da2d51bf8f.js","static/chunks/6419-d0c00d661b01f8fa.js","static/chunks/6084-ddbad3149364725d.js","static/chunks/5574-9312f97b637d9ee2.js","static/chunks/6780-b42a27e72707936d.js","static/chunks/6882-59ea739e3616ce83.js","static/chunks/7725-539d3a906f627531.js","static/css/10994e916bc9a00a.css","static/chunks/9226-2dcac54ab3fb94be.js","static/chunks/7476-cc0d9a94ed7aad53.js","static/css/972dc7eef106ee7c.css","static/chunks/3450-69f4e16978971bb8.js","static/css/304c6f148886a8d4.css","static/chunks/796-3bdda2a7868464af.js","static/chunks/6853-d0190d2cca9dbde2.js","static/chunks/1817-b78b58ae3b75d75a.js","static/chunks/6954-ba98e778a5b45ebf.js","static/chunks/79-2aab56be75e16187.js","static/chunks/3872-0a0f0032ca39a93f.js","static/chunks/3855-509ca7ac99b5eada.js","static/chunks/8735-40caf91800a3610c.js","static/chunks/5309-d9a488457898263b.js","static/chunks/9046-7085a401297c5520.js","static/chunks/4230-114e31621c19ea69.js","static/chunks/1467-8808ec8836e033f9.js","static/chunks/4608-f16f281f2d05d963.js","static/chunks/9187-7438242f0d380bb0.js","static/chunks/1316-2606e19807c08aa5.js","static/chunks/6662-a9e54ead3dc53644.js","static/chunks/7630-b1c93688013ef013.js","static/chunks/2921-86f1547ac40a5cdf.js","static/chunks/203-cd78ea279cecba60.js","static/chunks/787-c57185ad89c4e288.js","static/chunks/9826-3c578665c6d3b21d.js","static/chunks/4121-877e19d3fa078c7b.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5309],{74833:function(e,t,i){var r=i(56127),a=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(a,""):e}},56127:function(e){var t=/\s/;e.exports=function(e){for(var i=e.length;i--&&t.test(e.charAt(i)););return i}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},55193:function(e,t,i){var r=i(99736),a=i(92360);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},91936:function(e,t,i){var r=i(74833),a=i(11611),s=i(55193),l=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return l;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var i=o.test(e);return i||c.test(e)?d(e.slice(2),i?2:8):n.test(e)?l:+e}},58754:function(e,t,i){"use strict";var r=i(24246),a=i(13577),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:n,rightContent:o,style:c,...d}=e;return(0,r.jsxs)("div",{...d,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,r.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(a.lQT,{className:i||n?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,r.jsx)(s.m,{className:n?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),n]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return c}});var r=i(24246),a=i(13577),s=i(79894),l=i.n(s),n=i(27378);let{Text:o}=a.AntTypography,c=e=>{let{items:t,...i}=e,s=(0,n.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,n={...e},c=n.onClick&&!n.href;return("string"==typeof n.title&&(n.title=(0,r.jsx)(o,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:n.title})),c)?n.title=(0,r.jsx)(a.wpx,{type:"text",size:"small",icon:n.icon,onClick:n.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:n.title}):(n.icon&&(n.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:n.icon}),n.title]})),n.href&&n.title&&(n.title=(0,r.jsx)(l(),{href:n.href,className:"ant-breadcrumb-link",children:n.title}),delete n.href)),n}),[t]);return(0,r.jsx)(a.zrq,{items:s,...i})}},14908:function(e,t,i){"use strict";var r=i(86677),a=i(27378);let s=e=>e.startsWith("#")?e.slice(1):e;t.Z=e=>{let{tabKeys:t,initialTab:i}=e,l=(0,r.useRouter)(),n=l.asPath.split("#")[1]||t[0],[o,c]=(0,a.useState)(n);return(0,a.useEffect)(()=>{i&&t.includes(i)&&c(i)},[i,t,l.isReady]),{activeTab:o,onTabChange:(0,a.useCallback)(async e=>{if(!t.includes(e)){await l.replace({pathname:l.pathname,query:l.query,hash:void 0}),c(t[0]);return}l.isReady&&(await l.replace({pathname:l.pathname,query:l.query,hash:s(e)},void 0,{shallow:!0}),c(e))},[l,t])}}},69828:function(e,t,i){"use strict";i.d(t,{Y:function(){return l}});var r=i(24246),a=i(13577),s=i(70788);let l=[(0,r.jsx)(a.PJP.S9g,{},"layers"),(0,r.jsx)(a.PJP.ehp,{},"dataset"),(0,r.jsx)(a.PJP.iA_,{},"table"),(0,r.jsx)(a.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];t.Z=e=>{let{resourceUrn:t,parentLink:i,onPathClick:a=()=>{}}=e,n=[];if(t||n.push({title:"All activity"}),t){n.push({title:"All activity",href:i});let e=t.split(".");e.forEach((t,i)=>{0!==i&&n.push({title:t,icon:l[i-1],onClick:t=>{t.preventDefault(),a(e.slice(0,i+1).join("."))}})})}return(0,r.jsx)(s.m,{"data-testid":"results-breadcrumb",items:n})}},1039:function(e,t,i){"use strict";i.d(t,{Z:function(){return M}});var r,a,s=i(24246),l=i(59003),n=i(92222),o=i(13577),c=i(27378),d=i(47935),u=i(70675),h=i(72625),p=i(54409),m=i(79947),g=i(87667),x=i(50169),f=i(28278),v=i(54682),j=i(74241),L=e=>{let{resourceType:t,changeTypeOverride:i}=e,r=(0,n.Cl)(),a=[];return t?t===v.D$.SCHEMA?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Name",...e}),size:300}),r.accessor(e=>e.urn,{id:"project",cell:e=>(0,s.jsx)(d.G3,{value:(0,j.Z)(e.getValue())}),header:e=>(0,s.jsx)(d.Rr,{value:"Project",...e})}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.system,{id:"system",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"System",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{ignoreChildActions:i===f.E.MONITORED||i===f.E.MUTED,resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:t===v.D$.TABLE?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Table name",...e}),size:300}),r.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:t===v.D$.FIELD?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Field name",...e}),size:300}),r.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,s.jsx)(m.Z,{type:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Data type",...e})}),r.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:t===v.D$.ENDPOINT?{columns:[r.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(g.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Object",...e}),size:300}),r.accessor(e=>e.description,{id:"description",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,s.jsx)(d.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),r.display({id:"status",cell:e=>(0,s.jsx)(x.Z,{changeTypeOverride:i,result:e.row.original}),header:e=>(0,s.jsx)(d.Rr,{value:"Status",...e})}),r.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"Detected by",...e})}),r.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(d.Rr,{value:"When",...e})}),r.display({id:"actions",cell:e=>(0,s.jsx)(p.Z,{resource:e.row.original}),header:"Actions",size:200,meta:{disableRowClick:!0}})]}:{columns:a}:{columns:a}},y=i(14908);(r=a||(a={})).ACTION_REQUIRED="action-required",r.MONITORED="monitored",r.UNMONITORED="unmonitored";let b={"action-required":{label:"Action Required",key:"action-required",filters:[v.LL.ADDITION,v.LL.REMOVAL],childFilters:[v.LL.ADDITION,v.LL.REMOVAL]},monitored:{label:"Monitored",key:"monitored",filters:[v.LL.MONITORED],childFilters:[],changeTypeOverride:f.E.MONITORED},unmonitored:{label:"Unmonitored",key:"unmonitored",filters:[v.LL.MUTED],childFilters:[],changeTypeOverride:f.E.MUTED}};var R=()=>{var e,t,i;let{activeTab:r,onTabChange:s}=(0,y.Z)({tabKeys:Object.values(a)});return{filterTabs:Object.values(b),activeTabKey:r,onTabChange:s,activeDiffFilters:null===(e=b[r])||void 0===e?void 0:e.filters,activeChildDiffFilters:null===(t=b[r])||void 0===t?void 0:t.childFilters,activeChangeTypeOverride:null===(i=b[r])||void 0===i?void 0:i.changeTypeOverride}},D=i(47182),T=i(38347),w=i(7940),_=i(80285),C=i(36168),O=i(30952);let I={items:[],total:0,page:1,size:50,pages:1},H=()=>(0,s.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,s.jsxs)(o.gCW,{children:[(0,s.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,s.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var M=e=>{let{resourceUrn:t}=e,[i,r]=(0,c.useState)(""),{filterTabs:a,activeTabKey:h,onTabChange:p,activeDiffFilters:m,activeChildDiffFilters:g,activeChangeTypeOverride:x}=R(),{PAGE_SIZES:f,pageSize:j,setPageSize:y,onPreviousPageClick:b,isPreviousPageDisabled:M,onNextPageClick:Z,isNextPageDisabled:k,startRange:E,endRange:N,pageIndex:A,setTotalPages:P,resetPageIndexToDefault:V}=(0,d.oi)();(0,c.useEffect)(()=>{V()},[t,i,V,m,g]);let{isFetching:S,isLoading:F,data:z}=(0,u.z8)({staged_resource_urn:t,page:A,size:j,child_diff_status:g,diff_status:m,search:i}),$=(0,w.G)(null==z?void 0:z.items[0]),{columns:U}=L({resourceType:$,changeTypeOverride:x}),{items:G,total:q,pages:W}=(0,c.useMemo)(()=>null!=z?z:I,[z]);(0,c.useEffect)(()=>{P(W)},[W,P]);let B=(0,c.useMemo)(()=>U,[U]),{navigateToDetectionResults:J}=(0,D.Z)(),K=(0,l.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),getRowId:_.Z,columns:B,manualPagination:!0,data:G,columnResizeMode:"onChange"});return F?(0,s.jsx)(d.I4,{rowHeight:36,numRows:36}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A5g,{items:a.map(e=>({key:e.key,label:e.label})),activeKey:h,onChange:e=>p(e)}),(0,s.jsx)(d.Q$,{children:(0,s.jsx)(o.kCb,{direction:"row",alignItems:"center",justifyContent:"space-between",width:"full",children:(0,s.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,s.jsx)(o.xuv,{flexShrink:0,children:(0,s.jsx)(O.f,{value:i,onChange:r})}),(0,s.jsx)(T.Z,{})]})})}),(0,s.jsx)(d.ZK,{tableInstance:K,onRowClick:e=>J({resourceUrn:e.urn,filterTab:h}),getRowIsClickable:e=>$!==v.D$.FIELD||(0,C.Z)(e),emptyTableNotice:(0,s.jsx)(H,{})}),(0,s.jsx)(d.s8,{totalRows:q||0,pageSizes:f,setPageSize:y,onPreviousPageClick:b,isPreviousPageDisabled:M||S,onNextPageClick:Z,isNextPageDisabled:k||S,startRange:E,endRange:N})]})}},54409:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var r=i(24246),a=i(13577),s=i(812),l=i(14047),n=i(54682),o=i(31883);let c=(0,a.IUT)({displayName:"MonitorOffIcon",viewBox:"0 0 12 12",path:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.47125 1H5.85H6.15H6.51188L6.58875 1.36914L7.52062 5.83268L6.42408 4.98635L6.03375 3.11719L5.8038 4.50761L4.99323 3.882L5.40562 1.38867L5.47125 1ZM4.80795 5.0022L4.67675 5.79545L5.48735 6.42109L5.61854 5.62783L4.80795 5.0022ZM6.73856 6.49227L6.96125 7.55866L8.42407 8.6877L8.69498 8.00228L7.94864 7.42624L7.88625 7.58398L7.83501 7.33853L6.73856 6.49227ZM8.33138 6.45844L9.07755 7.03434L9.30188 6.4668H11.55H12V5.5293H11.55H9H8.69812L8.58375 5.82031L8.33138 6.45844ZM7.27551 9.06443L7.35399 9.125H7.28813L7.27551 9.06443ZM4.49147 6.91566L5.30209 7.54131L4.79437 10.6113L4.72875 11H4.35H4.05H3.69563L3.61313 10.6406L2.64563 6.46875H0.45H0V5.53125H0.45H2.69777L3.49646 6.1477L4.15125 8.97266L4.49147 6.91566Z",fill:"currentColor"}),(0,r.jsx)("g",{clipPath:"url(#clip0_341_3102)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6755 10.4168L0.164222 2.304L0.775218 1.51237L11.2865 9.62517L10.6755 10.4168Z",fill:"currentColor"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_341_3102",children:(0,r.jsx)("rect",{width:"11.5",height:"9",fill:"white",transform:"translate(0 1.5)"})})})]})}),d=(0,a.IUT)({displayName:"MonitorOnIcon",viewBox:"0 0 12 10",path:(0,r.jsx)("path",{d:"M5.47125 0H5.85H6.15H6.51188L6.58875 0.369141L7.88625 6.58398L8.58375 4.82031L8.69812 4.5293H9H11.55H12V5.4668H11.55H9.30188L8.36625 7.83398L8.25188 8.125H7.95H7.65H7.28813L7.21125 7.75586L6.03375 2.11719L4.79437 9.61133L4.72875 10H4.35H4.05H3.69563L3.61313 9.64062L2.64563 5.46875H0.45H0V4.53125H0.45H3H3.35438L3.43688 4.89062L4.15125 7.97266L5.40562 0.388672L5.47125 0Z",fill:"currentColor"})});var u=i(79494),h=i(70675),p=i(7940),m=e=>{let{resource:t,ignoreChildActions:i=!1}=e,m=(0,p.G)(t),[g,{isLoading:x}]=(0,h.v8)(),[f,{isLoading:v}]=(0,h.vi)(),[j,{isLoading:L}]=(0,h.Tl)(),{successAlert:y,errorAlert:b}=(0,l.V)(),R=async()=>{let e=await g({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id});(0,o.D4)(e)?b((0,s.e$)(e.error,"Failed to confirm resource")):y("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(t.name||"The resource"," is now being monitored."))},D=async()=>{let e=await j({staged_resource_urn:t.urn});(0,o.D4)(e)?b((0,s.e$)(e.error),"Failed to un-mute resource"):y("".concat(t.name||"The resource"," has been un-muted and is now being monitored."))},T=async()=>{let e=await g({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0});(0,o.D4)(e)?b((0,s.e$)(e.error),"Failed to un-mute resource"):y("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(t.name||"The resource"," is now being monitored."))},w=async()=>{let e=await f({staged_resource_urn:t.urn});(0,o.D4)(e)?b((0,s.e$)(e.error),"Failed to mute resource"):y("Ignored data will not be monitored for changes or added to Fides datasets.","".concat(t.name||"Resource"," ignored"))},_=x||v||L,{diff_status:C,child_diff_statuses:O}=t,I=m===n.D$.SCHEMA,H=m===n.D$.FIELD,M=O&&(O[n.LL.CLASSIFICATION_ADDITION]||O[n.LL.CLASSIFICATION_UPDATE]),Z=I&&void 0===C||!H&&C===n.LL.ADDITION||M,k=C!==n.LL.MUTED,E=C===n.LL.MUTED&&!H,N=C===n.LL.MUTED&&H,A=O&&(O[n.LL.ADDITION]||O[n.LL.REMOVAL]),P=C===n.LL.MONITORED&&!i&&A&&!M;return(0,r.jsxs)(a.Ugi,{children:[(Z||P)&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:R,disabled:_,loading:x}),N&&(0,r.jsx)(u.Z,{title:"Un-Mute",icon:(0,r.jsx)(d,{}),onClick:D,disabled:_,loading:x}),E&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:T,disabled:_,loading:x}),k&&(0,r.jsx)(u.Z,{title:"Ignore",icon:(0,r.jsx)(c,{}),onClick:w,disabled:_,loading:v})]})}},79947:function(e,t,i){"use strict";var r=i(24246),a=i(13577);t.Z=e=>{let{type:t}=e;return(0,r.jsx)(a.kCb,{align:"center",h:"full",children:!!t&&(0,r.jsx)(a.j8w,{children:t})})}},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=i(19043)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6780],{66726:function(a,e,n){var i=n(11611),t=n(82846),s=n(91936),r=Math.max,o=Math.min;a.exports=function(a,e,n){var _,l,F,d,u,c,m=0,h=!1,S=!1,y=!0;if("function"!=typeof a)throw TypeError("Expected a function");function C(e){var n=_,i=l;return _=l=void 0,m=e,d=a.apply(i,n)}function g(a){var n=a-c,i=a-m;return void 0===c||n>=e||n<0||S&&i>=F}function p(){var a,n,i,s=t();if(g(s))return f(s);u=setTimeout(p,(a=s-c,n=s-m,i=e-a,S?o(i,F-n):i))}function f(a){return(u=void 0,y&&_)?C(a):(_=l=void 0,d)}function v(){var a,n=t(),i=g(n);if(_=arguments,l=this,c=n,i){if(void 0===u)return m=a=c,u=setTimeout(p,e),h?C(a):d;if(S)return clearTimeout(u),u=setTimeout(p,e),C(c)}return void 0===u&&(u=setTimeout(p,e)),d}return e=s(e)||0,i(n)&&(h=!!n.leading,F=(S="maxWait"in n)?r(s(n.maxWait)||0,e):F,y="trailing"in n?!!n.trailing:y),v.cancel=function(){void 0!==u&&clearTimeout(u),m=0,_=c=l=u=void 0},v.flush=function(){return void 0===u?d:f(t())},v}},82846:function(a,e,n){var i=n(77400);a.exports=function(){return i.Date.now()}},30952:function(a,e,n){"use strict";n.d(e,{f:function(){return _}});var i=n(24246),t=n(66726),s=n.n(t),r=n(27378),o=n(26917);let _=a=>{let{value:e,onChange:n,placeholder:t,..._}=a,[l,F]=(0,r.useState)(e),d=s()(n,500),u=(0,r.useCallback)(a=>{F(a),d(a)},[]);return(0,i.jsx)(o.Z,{value:l,onChange:u,onClear:()=>{F(""),n("")},placeholder:t,..._})}},26089:function(a,e,n){"use strict";var i=n(24246),t=n(13577),s=n(99830),r=n.n(s);e.Z=a=>{let{onClick:e,children:n}=a;return(0,i.jsx)(t.wpx,{onClick:e,type:"link",role:"link",size:"small",className:r().toastLink,children:n})}},29850:function(a,e,n){"use strict";n.d(e,{R:function(){return F}});var i=n(24246),t=n(13577),s=n(27378),r=n(65450);let o=a=>{let{children:e,className:n,style:s,...r}=a;return(0,i.jsx)(t.wpx,{...r,type:"text",className:"w-full justify-start ".concat(n),style:{fontWeight:600,padding:"var(--ant-select-option-padding)",backgroundColor:"var(--ant-select-option-selected-bg)",...s},children:e})};var _=n(16394);let l=(a,e)=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o,{onClick:e,"data-testid":"add-new-system",id:"add-new-system",children:"Add new system +"}),a]}),F=a=>{var e;let{onAddSystem:n,...o}=a,[F,d]=(0,s.useState)(),{data:u,isFetching:c}=(0,r.xF)({page:1,size:25,search:F||void 0}),m=null==u?void 0:null===(e=u.items)||void 0===e?void 0:e.map(a=>({value:a.fides_key,label:a.name})),h=(0,s.useCallback)(a=>{(null==a?void 0:a.length)>1&&d(a),(null==a?void 0:a.length)===0&&d(void 0)},[d]),S=(0,s.useMemo)(()=>(0,_.Ds)(h,300),[h]);return(0,i.jsx)(t.WPr,{placeholder:"Search...","aria-label":"Search for a system to select",popupRender:n?a=>l(a,n):void 0,"data-testid":"system-select",...o,styles:{popup:{root:{minWidth:"500px"}},...o.styles},filterOption:!1,options:m,onSearch:S,loading:o.loading||c})}},8411:function(a,e,n){"use strict";n.d(e,{NA:function(){return s},Z8:function(){return t}});var i=n(54682);let t={[i._F.ER]:"Eritrea",[i._F.DJ]:"Djibouti",[i._F.MR]:"Mauritania",[i._F.NA]:"Namibia",[i._F.GH]:"Ghana",[i._F.SS]:"South Sudan",[i._F.SC]:"Seychelles",[i._F.IO]:"British Indian Ocean Territory",[i._F.GQ]:"Equatorial Guinea",[i._F.AO]:"Angola",[i._F.CG]:"Republic of the Congo",[i._F.BW]:"Botswana",[i._F.BI]:"Burundi",[i._F.DZ]:"Algeria",[i._F.TD]:"Chad",[i._F.NG]:"Nigeria",[i._F.TZ]:"Tanzania",[i._F.EH]:"Western Sahara",[i._F.SN]:"Senegal",[i._F.LR]:"Liberia",[i._F.ZA]:"South Africa",[i._F.CV]:"Cape Verde",[i._F.GM]:"Gambia",[i._F.SD]:"Sudan",[i._F.KM]:"Comoros",[i._F.SZ]:"Eswatini",[i._F.UG]:"Uganda",[i._F.MG]:"Madagascar",[i._F.RW]:"Rwanda",[i._F.CD]:"DR Congo",[i._F.CM]:"Cameroon",[i._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[i._F.TG]:"Togo",[i._F.MU]:"Mauritius",[i._F.NE]:"Niger",[i._F.BJ]:"Benin",[i._F.EG]:"Egypt",[i._F.LS]:"Lesotho",[i._F.ET]:"Ethiopia",[i._F.MA]:"Morocco",[i._F.YT]:"Mayotte",[i._F.BF]:"Burkina Faso",[i._F.RE]:"R\xe9union",[i._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[i._F.CF]:"Central African Republic",[i._F.MZ]:"Mozambique",[i._F.MW]:"Malawi",[i._F.ML]:"Mali",[i._F.ZM]:"Zambia",[i._F.LY]:"Libya",[i._F.GW]:"Guinea-Bissau",[i._F.SO]:"Somalia",[i._F.KE]:"Kenya",[i._F.GN]:"Guinea",[i._F.ZW]:"Zimbabwe",[i._F.TN]:"Tunisia",[i._F.SL]:"Sierra Leone",[i._F.GA]:"Gabon",[i._F.CI]:"Ivory Coast",[i._F.JO]:"Jordan",[i._F.PK]:"Pakistan",[i._F.KP]:"North Korea",[i._F.MO]:"Macau",[i._F.AM]:"Armenia",[i._F.SY]:"Syria",[i._F.TJ]:"Tajikistan",[i._F.SA]:"Saudi Arabia",[i._F.KR]:"South Korea",[i._F.NP]:"Nepal",[i._F.PH]:"Philippines",[i._F.IQ]:"Iraq",[i._F.LB]:"Lebanon",[i._F.MN]:"Mongolia",[i._F.PS]:"Palestine",[i._F.YE]:"Yemen",[i._F.JP]:"Japan",[i._F.KZ]:"Kazakhstan",[i._F.LK]:"Sri Lanka",[i._F.MM]:"Myanmar",[i._F.KG]:"Kyrgyzstan",[i._F.CN]:"China",[i._F.AF]:"Afghanistan",[i._F.OM]:"Oman",[i._F.IN]:"India",[i._F.LA]:"Laos",[i._F.UZ]:"Uzbekistan",[i._F.MV]:"Maldives",[i._F.ID]:"Indonesia",[i._F.VN]:"Vietnam",[i._F.MY]:"Malaysia",[i._F.TW]:"Taiwan",[i._F.KH]:"Cambodia",[i._F.AE]:"United Arab Emirates",[i._F.HK]:"Hong Kong",[i._F.GE]:"Georgia (Country)",[i._F.BD]:"Bangladesh",[i._F.KW]:"Kuwait",[i._F.TM]:"Turkmenistan",[i._F.QA]:"Qatar",[i._F.BH]:"Bahrain",[i._F.BN]:"Brunei",[i._F.TH]:"Thailand",[i._F.BT]:"Bhutan",[i._F.SG]:"Singapore",[i._F.IL]:"Israel",[i._F.AZ]:"Azerbaijan",[i._F.TL]:"Timor-Leste",[i._F.IR]:"Iran",[i._F.TR]:"Turkey",[i._F.MK]:"North Macedonia",[i._F.IE]:"Ireland",[i._F.DK]:"Denmark",[i._F.SK]:"Slovakia",[i._F.MD]:"Moldova",[i._F.AX]:"\xc5land Islands",[i._F.PL]:"Poland",[i._F.BA]:"Bosnia and Herzegovina",[i._F.SM]:"San Marino",[i._F.CZ]:"Czechia",[i._F.EE]:"Estonia",[i._F.XK]:"Kosovo",[i._F.FO]:"Faroe Islands",[i._F.SJ]:"Svalbard and Jan Mayen",[i._F.GG]:"Guernsey",[i._F.FR]:"France",[i._F.NL]:"Netherlands",[i._F.FI]:"Finland",[i._F.PT]:"Portugal",[i._F.DE]:"Germany",[i._F.MT]:"Malta",[i._F.JE]:"Jersey",[i._F.IS]:"Iceland",[i._F.ES]:"Spain",[i._F.GI]:"Gibraltar",[i._F.NO]:"Norway",[i._F.CY]:"Cyprus",[i._F.RS]:"Serbia",[i._F.LT]:"Lithuania",[i._F.MC]:"Monaco",[i._F.LU]:"Luxembourg",[i._F.UA]:"Ukraine",[i._F.IM]:"Isle of Man",[i._F.RO]:"Romania",[i._F.BE]:"Belgium",[i._F.SE]:"Sweden",[i._F.ME]:"Montenegro",[i._F.LV]:"Latvia",[i._F.VA]:"Vatican City",[i._F.AT]:"Austria",[i._F.AL]:"Albania",[i._F.LI]:"Liechtenstein",[i._F.GR]:"Greece",[i._F.IT]:"Italy",[i._F.AD]:"Andorra",[i._F.GB]:"United Kingdom",[i._F.RU]:"Russia",[i._F.SI]:"Slovenia",[i._F.BY]:"Belarus",[i._F.CH]:"Switzerland",[i._F.HU]:"Hungary",[i._F.BG]:"Bulgaria",[i._F.HR]:"Croatia",[i._F.TC]:"Turks and Caicos Islands",[i._F.CW]:"Cura\xe7ao",[i._F.GP]:"Guadeloupe",[i._F.UM]:"United States Minor Outlying Islands",[i._F.GT]:"Guatemala",[i._F.PM]:"Saint Pierre and Miquelon",[i._F.BQ]:"Caribbean Netherlands",[i._F.GL]:"Greenland",[i._F.SX]:"Sint Maarten",[i._F.PA]:"Panama",[i._F.AW]:"Aruba",[i._F.MQ]:"Martinique",[i._F.AG]:"Antigua and Barbuda",[i._F.BM]:"Bermuda",[i._F.CU]:"Cuba",[i._F.GD]:"Grenada",[i._F.NI]:"Nicaragua",[i._F.LC]:"Saint Lucia",[i._F.KN]:"Saint Kitts and Nevis",[i._F.DO]:"Dominican Republic",[i._F.VC]:"Saint Vincent and the Grenadines",[i._F.BZ]:"Belize",[i._F.HT]:"Haiti",[i._F.JM]:"Jamaica",[i._F.BS]:"Bahamas",[i._F.MX]:"Mexico",[i._F.MF]:"Saint Martin",[i._F.SV]:"El Salvador",[i._F.BL]:"Saint Barth\xe9lemy",[i._F.AI]:"Anguilla",[i._F.MS]:"Montserrat",[i._F.VG]:"British Virgin Islands",[i._F.BB]:"Barbados",[i._F.HN]:"Honduras",[i._F.KY]:"Cayman Islands",[i._F.DM]:"Dominica",[i._F.TT]:"Trinidad and Tobago",[i._F.CR]:"Costa Rica",[i._F.SR]:"Suriname",[i._F.CX]:"Christmas Island",[i._F.WS]:"Samoa",[i._F.PF]:"French Polynesia",[i._F.AS]:"American Samoa",[i._F.NC]:"New Caledonia",[i._F.TK]:"Tokelau",[i._F.PW]:"Palau",[i._F.KI]:"Kiribati",[i._F.VU]:"Vanuatu",[i._F.PN]:"Pitcairn Islands",[i._F.CK]:"Cook Islands",[i._F.FJ]:"Fiji",[i._F.PG]:"Papua New Guinea",[i._F.MP]:"Northern Mariana Islands",[i._F.NU]:"Niue",[i._F.TV]:"Tuvalu",[i._F.NF]:"Norfolk Island",[i._F.TO]:"Tonga",[i._F.FM]:"Micronesia",[i._F.SB]:"Solomon Islands",[i._F.NR]:"Nauru",[i._F.WF]:"Wallis and Futuna",[i._F.GU]:"Guam",[i._F.AU]:"Australia",[i._F.NZ]:"New Zealand",[i._F.MH]:"Marshall Islands",[i._F.CC]:"Cocos (Keeling) Islands",[i._F.VE]:"Venezuela",[i._F.PY]:"Paraguay",[i._F.BR]:"Brazil",[i._F.CO]:"Colombia",[i._F.PE]:"Peru",[i._F.CL]:"Chile",[i._F.UY]:"Uruguay",[i._F.AR]:"Argentina",[i._F.GY]:"Guyana",[i._F.BO]:"Bolivia",[i._F.GF]:"French Guiana",[i._F.EC]:"Ecuador",[i._F.FK]:"Falkland Islands",[i._F.US_AL]:"Alabama",[i._F.US_AK]:"Alaska",[i._F.US_AZ]:"Arizona",[i._F.US_AR]:"Arkansas",[i._F.US_CA]:"California",[i._F.US_CO]:"Colorado",[i._F.US_CT]:"Connecticut",[i._F.US_DE]:"Delaware",[i._F.US_DC]:"District of Columbia (DC)",[i._F.US_FL]:"Florida",[i._F.US_GA]:"Georgia",[i._F.US_HI]:"Hawaii",[i._F.US_ID]:"Idaho",[i._F.US_IL]:"Illinois",[i._F.US_IN]:"Indiana",[i._F.US_IA]:"Iowa",[i._F.US_KS]:"Kansas",[i._F.US_KY]:"Kentucky",[i._F.US_LA]:"Louisiana",[i._F.US_ME]:"Maine",[i._F.US_MD]:"Maryland",[i._F.US_MA]:"Massachusetts",[i._F.US_MI]:"Michigan",[i._F.US_MN]:"Minnesota",[i._F.US_MS]:"Mississippi",[i._F.US_MO]:"Missouri",[i._F.US_MT]:"Montana",[i._F.US_NE]:"Nebraska",[i._F.US_NV]:"Nevada",[i._F.US_NH]:"New Hampshire",[i._F.US_NJ]:"New Jersey",[i._F.US_NM]:"New Mexico",[i._F.US_NY]:"New York",[i._F.US_NC]:"North Carolina",[i._F.US_ND]:"North Dakota",[i._F.US_OH]:"Ohio",[i._F.US_OK]:"Oklahoma",[i._F.US_OR]:"Oregon",[i._F.US_PA]:"Pennsylvania",[i._F.US_PR]:"Puerto Rico",[i._F.US_RI]:"Rhode Island",[i._F.US_SC]:"South Carolina",[i._F.US_SD]:"South Dakota",[i._F.US_TN]:"Tennessee",[i._F.US_TX]:"Texas",[i._F.US_UT]:"Utah",[i._F.US_VA]:"Virginia",[i._F.US_VI]:"United States Virgin Islands",[i._F.US_VT]:"Vermont",[i._F.US_WA]:"Washington",[i._F.US_WV]:"West Virginia",[i._F.US_WI]:"Wisconsin",[i._F.US_WY]:"Wyoming",[i._F.CA_AB]:"Alberta",[i._F.CA_BC]:"British Columbia",[i._F.CA_MB]:"Manitoba",[i._F.CA_NB]:"New Brunswick",[i._F.CA_NL]:"Newfoundland and Labrador",[i._F.CA_NS]:"Nova Scotia",[i._F.CA_ON]:"Ontario",[i._F.CA_PE]:"Prince Edward Island",[i._F.CA_QC]:"Quebec",[i._F.CA_SK]:"Saskatchewan",[i._F.CA_NT]:"Northwest Territories",[i._F.CA_NU]:"Nunavut",[i._F.CA_YT]:"Yukon",[i._F.CA]:"Canada",[i._F.US]:"United States",[i._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[i._F.CARIBBEAN]:"Caribbean",[i._F.EEA]:"European Economic Area (EEA)",[i._F.NON_EEA]:"Non European Economic Area",[i._F.GLOBAL]:"Global"},s=new Map(Object.entries(t));Object.entries(t).map(a=>({value:a[0],label:a[1]}))},14908:function(a,e,n){"use strict";var i=n(86677),t=n(27378);let s=a=>a.startsWith("#")?a.slice(1):a;e.Z=a=>{let{tabKeys:e,initialTab:n}=a,r=(0,i.useRouter)(),o=r.asPath.split("#")[1]||e[0],[_,l]=(0,t.useState)(o);return(0,t.useEffect)(()=>{n&&e.includes(n)&&l(n)},[n,e,r.isReady]),{activeTab:_,onTabChange:(0,t.useCallback)(async a=>{if(!e.includes(a)){l(e[0]),await r.replace({pathname:r.pathname,query:r.query,hash:void 0});return}l(a),r.isReady&&await r.replace({pathname:r.pathname,query:r.query,hash:s(a)},void 0,{shallow:!0})},[r,e])}}},77685:function(a,e,n){"use strict";n.d(e,{i:function(){return M}});var i=n(24246),t=n(13577),s=n(34090),r=n(27378),o=n(55484),_=n(16134),l=n(25980),F=n(97181),d=n(40324),u=n(812),c=n(14047),m=n(45938),h=n(8133),S=n(33335),y=n(32885),C=n(57865),g=n(93237),p=n(65450),f=n(36345);let{Text:v}=t.AntTypography,b={name:"",vendor_id:void 0,description:"",tags:[]},M=a=>{let{onSuccessfulSubmit:e,toastOnSuccess:n,...M}=a,[A,N]=(0,r.useState)(!1),U=(0,_.T)(),{tcf:I,dictionaryService:x}=(0,l.hz)(),{isLoading:T}=(0,y.Rd)(void 0,{skip:!x}),j=(0,_.C)(y.o),w=(0,_.C)(C.gU),[B]=(0,p.in)(),[E]=(0,y.Qk)(),[k]=(0,p.f7)(),{successAlert:G,errorAlert:L}=(0,c.V)(),{setSuggestions:R,setLockedForGVL:P}=C.dictSuggestionsSlice.actions,K=(0,r.useRef)(null),D=(0,r.useMemo)(()=>o.Ry().shape({name:o.Z_().required().label("System name").test("is-unique","",async(a,e)=>{let{data:n}=await B({page:1,size:10,search:a});return!((null==n?void 0:n.items)||[]).filter(e=>e.name===a).some(e=>e.name===a)||e.createError({message:'You already have a system called "'.concat(a,'". Please specify a unique name for this system.')})})}),[B]),O=a=>{if(x){if(!a){U(R("hiding")),U(P(!1));return}U(R("showing")),I&&(0,u.cj)(a)===u.c6.GVL?U(P(!0)):U(P(!1))}},W=()=>{M.onClose(),U(R("initial")),U(P(!1))},V=async a=>{if(N(!0),a.vendor_id){let i=await E([a.vendor_id]);if((0,u.D4)(i))L((0,u.e$)(i.error));else{let{data:a}=i,t=a.systems[0];null==e||e(t.fides_key,t.name),n&&G("".concat(a.name," has been added to your system inventory."))}}else{let i={...a,fides_key:(0,S.E)(a.name),system_type:"",body:"",privacy_declarations:[]},t=await k(i);if((0,u.D4)(t))L((0,u.e$)(t.error));else{let{fides_key:i,name:s}=t.data;null==e||e(i,s),n&&G("".concat(a.name," has been added to your system inventory."))}W()}N(!1)};return(0,i.jsx)(h.Z,{title:"Add New System",...M,onClose:W,children:(0,i.jsx)(s.J9,{initialValues:b,onSubmit:V,validationSchema:D,innerRef:K,children:a=>{let{dirty:e,isValid:n}=a;return(0,i.jsxs)(s.l0,{children:[(0,i.jsx)(m.Gt,{id:"new-system-modal",name:"Add New System"}),(0,i.jsxs)(t.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,i.jsx)(v,{children:"Fides will add this system to your inventory and configure it for consent using the categories of consent listed below. Optionally, you can check if this system is listed within the Fides compass library by selecting the compass icon below."}),x?(0,i.jsx)(f.Z,{label:"System name",options:j,onVendorSelected:O,isCreate:!0,lockedForGVL:w,isLoading:T}):(0,i.jsx)(d.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(0,i.jsx)(g.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:w}),(0,i.jsx)(F.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:w})]}),(0,i.jsxs)(t.jqI,{justify:"space-between",children:[(0,i.jsx)(t.wpx,{htmlType:"reset",onClick:W,disabled:T||!e||!n,"data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(t.wpx,{htmlType:"submit",type:"primary",disabled:T||!e||!n,loading:A,"data-testid":"save-btn",children:"Save"})]})]})}})})}},93237:function(a,e,n){"use strict";n.d(e,{Sv:function(){return m},Yb:function(){return c},dQ:function(){return h},lm:function(){return S}});var i=n(24246),t=n(13577),s=n(34090),r=n(27378),o=n(16134),_=n(40324),l=n(46238),F=n(32885),d=n(57865);let u=(a,e,n)=>{var i,t;let[_,l,{setValue:u,setTouched:c}]=(0,s.U$)({name:a,type:n||void 0}),m=!!(l.touched&&l.error),{error:h}=l,S={..._,value:null!==(i=_.value)&&void 0!==i?i:""},[y,C]=(0,r.useState)(null!==(t=S.value)&&void 0!==t?t:""),{values:g}=(0,s.u6)(),{vendor_id:p}=g,f=(0,o.C)((0,F.$e)(p||"")),v=(0,o.C)(d.bN),b=(0,r.useRef)();return(0,r.useEffect)(()=>{"showing"===v&&C(S.value)},[v,C]),(0,r.useEffect)(()=>{if("showing"===v&&f){let n=e?e(f):f[a];S.value!==n&&(u(n),setTimeout(()=>{var a;c(!0),null===(a=b.current)||void 0===a||a.blur()},300))}},[v,u,f,b.current]),(0,r.useEffect)(()=>{"hiding"===v&&u(y)},[v,u,y]),{field:S,isInvalid:m,isShowingSuggestions:v,error:h,inputRef:b}},c=a=>{let{label:e,tooltip:n,disabled:s,isRequired:r=!1,dictField:o,name:F,placeholder:d,id:c}=a,{field:m,isInvalid:h,isShowingSuggestions:S,error:y,inputRef:C}=u(F,o);return(0,i.jsx)(t.NIc,{isInvalid:h,isRequired:r,children:(0,i.jsxs)(t.gCW,{alignItems:"start",children:[(0,i.jsxs)(t.kCb,{alignItems:"center",children:[(0,i.jsx)(_.__,{htmlFor:c||F,fontSize:"xs",my:0,mr:1,children:e}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(_.oi,{...m,ref:C,isRequired:r,isDisabled:s,"data-testid":"input-".concat(m.name),placeholder:d,isPassword:!1,color:"showing"===S?"complimentary.500":"gray.800"}),(0,i.jsx)(_.Bc,{isInvalid:h,message:y,fieldName:m.name})]})})},m=a=>{let{label:e,tooltip:n,disabled:s,isRequired:r=!1,dictField:o,name:F,id:d}=a,{field:c,isInvalid:m,isShowingSuggestions:h,error:S}=u(F,o);return(0,i.jsx)(t.NIc,{isInvalid:m,isRequired:r,children:(0,i.jsxs)(t.gCW,{alignItems:"start",children:[(0,i.jsxs)(t.kCb,{alignItems:"center",children:[(0,i.jsx)(_.__,{htmlFor:d||F,fontSize:"xs",my:0,mr:1,children:e}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(t.gxH,{...c,size:"sm","data-testid":"input-".concat(c.name),focusBorderColor:"primary.600",color:"showing"===h?"complimentary.500":"gray.800",isDisabled:s}),(0,i.jsx)(_.Bc,{isInvalid:m,message:S,fieldName:c.name})]})})},h=a=>{let{label:e,tooltip:n,dictField:r,name:o,id:F,disabled:d}=a,{field:c,isInvalid:m,error:h}=u(o,r,"checkbox");return(0,i.jsxs)(t.NIc,{isInvalid:m,width:"full",children:[(0,i.jsxs)(t.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,i.jsxs)(t.Ugi,{spacing:1,children:[(0,i.jsx)(_.__,{htmlFor:F||o,fontSize:"xs",my:0,mr:0,children:e}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(t.Ugi,{children:(0,i.jsx)(s.gN,{name:c.name,children:a=>{let{form:{setFieldValue:e}}=a;return(0,i.jsx)(t.rAg,{checked:c.checked,onChange:a=>{e(c.name,a)},disabled:d,className:"mr-2","data-testid":"input-".concat(c.name),size:"small"})}})})]}),(0,i.jsx)(_.Bc,{isInvalid:m,message:h,fieldName:c.name})]})},S=a=>{let{label:e,tooltip:n,dictField:r,name:o,id:F,disabled:d}=a,{field:c,isInvalid:m,error:h,isShowingSuggestions:S}=u(o,r,"numeric"),{setFieldValue:y}=(0,s.u6)();return(0,i.jsxs)(t.NIc,{isInvalid:m,width:"full",children:[(0,i.jsxs)(t.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,i.jsxs)(t.Ugi,{spacing:1,children:[(0,i.jsx)(_.__,{htmlFor:F||o,fontSize:"xs",my:0,mr:0,children:e}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(t.Ugi,{children:(0,i.jsxs)(t.Y2U,{value:c.value,name:c.name,size:"xs",onBlur:c.onBlur,onChange:a=>{y(c.name,a)},w:"100%",colorScheme:"terracotta",inputMode:"numeric","data-testid":"input-".concat(c.name),color:"showing"===S?"complimentary.500":"gray.800",focusBorderColor:"primary.600",isDisabled:d,children:[(0,i.jsx)(t.zuI,{}),(0,i.jsxs)(t.FiK,{children:[(0,i.jsx)(t.WQu,{}),(0,i.jsx)(t.Y_d,{})]})]})})]}),(0,i.jsx)(_.Bc,{isInvalid:m,message:h,fieldName:c.name})]})}},99830:function(a){a.exports={toastLink:"ToastLink_toastLink__OLSeq"}}}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6780],{66726:function(a,e,n){var i=n(11611),t=n(82846),s=n(91936),r=Math.max,o=Math.min;a.exports=function(a,e,n){var _,l,F,d,u,c,m=0,h=!1,S=!1,y=!0;if("function"!=typeof a)throw TypeError("Expected a function");function C(e){var n=_,i=l;return _=l=void 0,m=e,d=a.apply(i,n)}function g(a){var n=a-c,i=a-m;return void 0===c||n>=e||n<0||S&&i>=F}function p(){var a,n,i,s=t();if(g(s))return f(s);u=setTimeout(p,(a=s-c,n=s-m,i=e-a,S?o(i,F-n):i))}function f(a){return(u=void 0,y&&_)?C(a):(_=l=void 0,d)}function v(){var a,n=t(),i=g(n);if(_=arguments,l=this,c=n,i){if(void 0===u)return m=a=c,u=setTimeout(p,e),h?C(a):d;if(S)return clearTimeout(u),u=setTimeout(p,e),C(c)}return void 0===u&&(u=setTimeout(p,e)),d}return e=s(e)||0,i(n)&&(h=!!n.leading,F=(S="maxWait"in n)?r(s(n.maxWait)||0,e):F,y="trailing"in n?!!n.trailing:y),v.cancel=function(){void 0!==u&&clearTimeout(u),m=0,_=c=l=u=void 0},v.flush=function(){return void 0===u?d:f(t())},v}},82846:function(a,e,n){var i=n(77400);a.exports=function(){return i.Date.now()}},30952:function(a,e,n){"use strict";n.d(e,{f:function(){return _}});var i=n(24246),t=n(66726),s=n.n(t),r=n(27378),o=n(26917);let _=a=>{let{value:e,onChange:n,placeholder:t,..._}=a,[l,F]=(0,r.useState)(e),d=s()(n,500),u=(0,r.useCallback)(a=>{F(a),d(a)},[]);return(0,i.jsx)(o.Z,{value:l,onChange:u,onClear:()=>{F(""),n("")},placeholder:t,..._})}},26089:function(a,e,n){"use strict";var i=n(24246),t=n(13577),s=n(99830),r=n.n(s);e.Z=a=>{let{onClick:e,children:n}=a;return(0,i.jsx)(t.wpx,{onClick:e,type:"link",role:"link",size:"small",className:r().toastLink,children:n})}},29850:function(a,e,n){"use strict";n.d(e,{R:function(){return F}});var i=n(24246),t=n(13577),s=n(27378),r=n(65450);let o=a=>{let{children:e,className:n,style:s,...r}=a;return(0,i.jsx)(t.wpx,{...r,type:"text",className:"w-full justify-start ".concat(n),style:{fontWeight:600,padding:"var(--ant-select-option-padding)",backgroundColor:"var(--ant-select-option-selected-bg)",...s},children:e})};var _=n(16394);let l=(a,e)=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o,{onClick:e,"data-testid":"add-new-system",id:"add-new-system",children:"Add new system +"}),a]}),F=a=>{var e;let{onAddSystem:n,...o}=a,[F,d]=(0,s.useState)(),{data:u,isFetching:c}=(0,r.xF)({page:1,size:25,search:F||void 0}),m=null==u?void 0:null===(e=u.items)||void 0===e?void 0:e.map(a=>({value:a.fides_key,label:a.name})),h=(0,s.useCallback)(a=>{(null==a?void 0:a.length)>1&&d(a),(null==a?void 0:a.length)===0&&d(void 0)},[d]),S=(0,s.useMemo)(()=>(0,_.Ds)(h,300),[h]);return(0,i.jsx)(t.WPr,{placeholder:"Search...","aria-label":"Search for a system to select",popupRender:n?a=>l(a,n):void 0,"data-testid":"system-select",...o,styles:{popup:{root:{minWidth:"500px"}},...o.styles},filterOption:!1,options:m,onSearch:S,loading:o.loading||c})}},8411:function(a,e,n){"use strict";n.d(e,{NA:function(){return s},Z8:function(){return t}});var i=n(54682);let t={[i._F.ER]:"Eritrea",[i._F.DJ]:"Djibouti",[i._F.MR]:"Mauritania",[i._F.NA]:"Namibia",[i._F.GH]:"Ghana",[i._F.SS]:"South Sudan",[i._F.SC]:"Seychelles",[i._F.IO]:"British Indian Ocean Territory",[i._F.GQ]:"Equatorial Guinea",[i._F.AO]:"Angola",[i._F.CG]:"Republic of the Congo",[i._F.BW]:"Botswana",[i._F.BI]:"Burundi",[i._F.DZ]:"Algeria",[i._F.TD]:"Chad",[i._F.NG]:"Nigeria",[i._F.TZ]:"Tanzania",[i._F.EH]:"Western Sahara",[i._F.SN]:"Senegal",[i._F.LR]:"Liberia",[i._F.ZA]:"South Africa",[i._F.CV]:"Cape Verde",[i._F.GM]:"Gambia",[i._F.SD]:"Sudan",[i._F.KM]:"Comoros",[i._F.SZ]:"Eswatini",[i._F.UG]:"Uganda",[i._F.MG]:"Madagascar",[i._F.RW]:"Rwanda",[i._F.CD]:"DR Congo",[i._F.CM]:"Cameroon",[i._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[i._F.TG]:"Togo",[i._F.MU]:"Mauritius",[i._F.NE]:"Niger",[i._F.BJ]:"Benin",[i._F.EG]:"Egypt",[i._F.LS]:"Lesotho",[i._F.ET]:"Ethiopia",[i._F.MA]:"Morocco",[i._F.YT]:"Mayotte",[i._F.BF]:"Burkina Faso",[i._F.RE]:"R\xe9union",[i._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[i._F.CF]:"Central African Republic",[i._F.MZ]:"Mozambique",[i._F.MW]:"Malawi",[i._F.ML]:"Mali",[i._F.ZM]:"Zambia",[i._F.LY]:"Libya",[i._F.GW]:"Guinea-Bissau",[i._F.SO]:"Somalia",[i._F.KE]:"Kenya",[i._F.GN]:"Guinea",[i._F.ZW]:"Zimbabwe",[i._F.TN]:"Tunisia",[i._F.SL]:"Sierra Leone",[i._F.GA]:"Gabon",[i._F.CI]:"Ivory Coast",[i._F.JO]:"Jordan",[i._F.PK]:"Pakistan",[i._F.KP]:"North Korea",[i._F.MO]:"Macau",[i._F.AM]:"Armenia",[i._F.SY]:"Syria",[i._F.TJ]:"Tajikistan",[i._F.SA]:"Saudi Arabia",[i._F.KR]:"South Korea",[i._F.NP]:"Nepal",[i._F.PH]:"Philippines",[i._F.IQ]:"Iraq",[i._F.LB]:"Lebanon",[i._F.MN]:"Mongolia",[i._F.PS]:"Palestine",[i._F.YE]:"Yemen",[i._F.JP]:"Japan",[i._F.KZ]:"Kazakhstan",[i._F.LK]:"Sri Lanka",[i._F.MM]:"Myanmar",[i._F.KG]:"Kyrgyzstan",[i._F.CN]:"China",[i._F.AF]:"Afghanistan",[i._F.OM]:"Oman",[i._F.IN]:"India",[i._F.LA]:"Laos",[i._F.UZ]:"Uzbekistan",[i._F.MV]:"Maldives",[i._F.ID]:"Indonesia",[i._F.VN]:"Vietnam",[i._F.MY]:"Malaysia",[i._F.TW]:"Taiwan",[i._F.KH]:"Cambodia",[i._F.AE]:"United Arab Emirates",[i._F.HK]:"Hong Kong",[i._F.GE]:"Georgia (Country)",[i._F.BD]:"Bangladesh",[i._F.KW]:"Kuwait",[i._F.TM]:"Turkmenistan",[i._F.QA]:"Qatar",[i._F.BH]:"Bahrain",[i._F.BN]:"Brunei",[i._F.TH]:"Thailand",[i._F.BT]:"Bhutan",[i._F.SG]:"Singapore",[i._F.IL]:"Israel",[i._F.AZ]:"Azerbaijan",[i._F.TL]:"Timor-Leste",[i._F.IR]:"Iran",[i._F.TR]:"Turkey",[i._F.MK]:"North Macedonia",[i._F.IE]:"Ireland",[i._F.DK]:"Denmark",[i._F.SK]:"Slovakia",[i._F.MD]:"Moldova",[i._F.AX]:"\xc5land Islands",[i._F.PL]:"Poland",[i._F.BA]:"Bosnia and Herzegovina",[i._F.SM]:"San Marino",[i._F.CZ]:"Czechia",[i._F.EE]:"Estonia",[i._F.XK]:"Kosovo",[i._F.FO]:"Faroe Islands",[i._F.SJ]:"Svalbard and Jan Mayen",[i._F.GG]:"Guernsey",[i._F.FR]:"France",[i._F.NL]:"Netherlands",[i._F.FI]:"Finland",[i._F.PT]:"Portugal",[i._F.DE]:"Germany",[i._F.MT]:"Malta",[i._F.JE]:"Jersey",[i._F.IS]:"Iceland",[i._F.ES]:"Spain",[i._F.GI]:"Gibraltar",[i._F.NO]:"Norway",[i._F.CY]:"Cyprus",[i._F.RS]:"Serbia",[i._F.LT]:"Lithuania",[i._F.MC]:"Monaco",[i._F.LU]:"Luxembourg",[i._F.UA]:"Ukraine",[i._F.IM]:"Isle of Man",[i._F.RO]:"Romania",[i._F.BE]:"Belgium",[i._F.SE]:"Sweden",[i._F.ME]:"Montenegro",[i._F.LV]:"Latvia",[i._F.VA]:"Vatican City",[i._F.AT]:"Austria",[i._F.AL]:"Albania",[i._F.LI]:"Liechtenstein",[i._F.GR]:"Greece",[i._F.IT]:"Italy",[i._F.AD]:"Andorra",[i._F.GB]:"United Kingdom",[i._F.RU]:"Russia",[i._F.SI]:"Slovenia",[i._F.BY]:"Belarus",[i._F.CH]:"Switzerland",[i._F.HU]:"Hungary",[i._F.BG]:"Bulgaria",[i._F.HR]:"Croatia",[i._F.TC]:"Turks and Caicos Islands",[i._F.CW]:"Cura\xe7ao",[i._F.GP]:"Guadeloupe",[i._F.UM]:"United States Minor Outlying Islands",[i._F.GT]:"Guatemala",[i._F.PM]:"Saint Pierre and Miquelon",[i._F.BQ]:"Caribbean Netherlands",[i._F.GL]:"Greenland",[i._F.SX]:"Sint Maarten",[i._F.PA]:"Panama",[i._F.AW]:"Aruba",[i._F.MQ]:"Martinique",[i._F.AG]:"Antigua and Barbuda",[i._F.BM]:"Bermuda",[i._F.CU]:"Cuba",[i._F.GD]:"Grenada",[i._F.NI]:"Nicaragua",[i._F.LC]:"Saint Lucia",[i._F.KN]:"Saint Kitts and Nevis",[i._F.DO]:"Dominican Republic",[i._F.VC]:"Saint Vincent and the Grenadines",[i._F.BZ]:"Belize",[i._F.HT]:"Haiti",[i._F.JM]:"Jamaica",[i._F.BS]:"Bahamas",[i._F.MX]:"Mexico",[i._F.MF]:"Saint Martin",[i._F.SV]:"El Salvador",[i._F.BL]:"Saint Barth\xe9lemy",[i._F.AI]:"Anguilla",[i._F.MS]:"Montserrat",[i._F.VG]:"British Virgin Islands",[i._F.BB]:"Barbados",[i._F.HN]:"Honduras",[i._F.KY]:"Cayman Islands",[i._F.DM]:"Dominica",[i._F.TT]:"Trinidad and Tobago",[i._F.CR]:"Costa Rica",[i._F.SR]:"Suriname",[i._F.CX]:"Christmas Island",[i._F.WS]:"Samoa",[i._F.PF]:"French Polynesia",[i._F.AS]:"American Samoa",[i._F.NC]:"New Caledonia",[i._F.TK]:"Tokelau",[i._F.PW]:"Palau",[i._F.KI]:"Kiribati",[i._F.VU]:"Vanuatu",[i._F.PN]:"Pitcairn Islands",[i._F.CK]:"Cook Islands",[i._F.FJ]:"Fiji",[i._F.PG]:"Papua New Guinea",[i._F.MP]:"Northern Mariana Islands",[i._F.NU]:"Niue",[i._F.TV]:"Tuvalu",[i._F.NF]:"Norfolk Island",[i._F.TO]:"Tonga",[i._F.FM]:"Micronesia",[i._F.SB]:"Solomon Islands",[i._F.NR]:"Nauru",[i._F.WF]:"Wallis and Futuna",[i._F.GU]:"Guam",[i._F.AU]:"Australia",[i._F.NZ]:"New Zealand",[i._F.MH]:"Marshall Islands",[i._F.CC]:"Cocos (Keeling) Islands",[i._F.VE]:"Venezuela",[i._F.PY]:"Paraguay",[i._F.BR]:"Brazil",[i._F.CO]:"Colombia",[i._F.PE]:"Peru",[i._F.CL]:"Chile",[i._F.UY]:"Uruguay",[i._F.AR]:"Argentina",[i._F.GY]:"Guyana",[i._F.BO]:"Bolivia",[i._F.GF]:"French Guiana",[i._F.EC]:"Ecuador",[i._F.FK]:"Falkland Islands",[i._F.US_AL]:"Alabama",[i._F.US_AK]:"Alaska",[i._F.US_AZ]:"Arizona",[i._F.US_AR]:"Arkansas",[i._F.US_CA]:"California",[i._F.US_CO]:"Colorado",[i._F.US_CT]:"Connecticut",[i._F.US_DE]:"Delaware",[i._F.US_DC]:"District of Columbia (DC)",[i._F.US_FL]:"Florida",[i._F.US_GA]:"Georgia",[i._F.US_HI]:"Hawaii",[i._F.US_ID]:"Idaho",[i._F.US_IL]:"Illinois",[i._F.US_IN]:"Indiana",[i._F.US_IA]:"Iowa",[i._F.US_KS]:"Kansas",[i._F.US_KY]:"Kentucky",[i._F.US_LA]:"Louisiana",[i._F.US_ME]:"Maine",[i._F.US_MD]:"Maryland",[i._F.US_MA]:"Massachusetts",[i._F.US_MI]:"Michigan",[i._F.US_MN]:"Minnesota",[i._F.US_MS]:"Mississippi",[i._F.US_MO]:"Missouri",[i._F.US_MT]:"Montana",[i._F.US_NE]:"Nebraska",[i._F.US_NV]:"Nevada",[i._F.US_NH]:"New Hampshire",[i._F.US_NJ]:"New Jersey",[i._F.US_NM]:"New Mexico",[i._F.US_NY]:"New York",[i._F.US_NC]:"North Carolina",[i._F.US_ND]:"North Dakota",[i._F.US_OH]:"Ohio",[i._F.US_OK]:"Oklahoma",[i._F.US_OR]:"Oregon",[i._F.US_PA]:"Pennsylvania",[i._F.US_PR]:"Puerto Rico",[i._F.US_RI]:"Rhode Island",[i._F.US_SC]:"South Carolina",[i._F.US_SD]:"South Dakota",[i._F.US_TN]:"Tennessee",[i._F.US_TX]:"Texas",[i._F.US_UT]:"Utah",[i._F.US_VA]:"Virginia",[i._F.US_VI]:"United States Virgin Islands",[i._F.US_VT]:"Vermont",[i._F.US_WA]:"Washington",[i._F.US_WV]:"West Virginia",[i._F.US_WI]:"Wisconsin",[i._F.US_WY]:"Wyoming",[i._F.CA_AB]:"Alberta",[i._F.CA_BC]:"British Columbia",[i._F.CA_MB]:"Manitoba",[i._F.CA_NB]:"New Brunswick",[i._F.CA_NL]:"Newfoundland and Labrador",[i._F.CA_NS]:"Nova Scotia",[i._F.CA_ON]:"Ontario",[i._F.CA_PE]:"Prince Edward Island",[i._F.CA_QC]:"Quebec",[i._F.CA_SK]:"Saskatchewan",[i._F.CA_NT]:"Northwest Territories",[i._F.CA_NU]:"Nunavut",[i._F.CA_YT]:"Yukon",[i._F.CA]:"Canada",[i._F.US]:"United States",[i._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[i._F.CARIBBEAN]:"Caribbean",[i._F.EEA]:"European Economic Area (EEA)",[i._F.NON_EEA]:"Non European Economic Area",[i._F.GLOBAL]:"Global"},s=new Map(Object.entries(t));Object.entries(t).map(a=>({value:a[0],label:a[1]}))},14908:function(a,e,n){"use strict";var i=n(86677),t=n(27378);let s=a=>a.startsWith("#")?a.slice(1):a;e.Z=a=>{let{tabKeys:e,initialTab:n}=a,r=(0,i.useRouter)(),o=r.asPath.split("#")[1]||e[0],[_,l]=(0,t.useState)(o);return(0,t.useEffect)(()=>{n&&e.includes(n)&&l(n)},[n,e,r.isReady]),{activeTab:_,onTabChange:(0,t.useCallback)(async a=>{if(!e.includes(a)){await r.replace({pathname:r.pathname,query:r.query,hash:void 0}),l(e[0]);return}r.isReady&&(await r.replace({pathname:r.pathname,query:r.query,hash:s(a)},void 0,{shallow:!0}),l(a))},[r,e])}}},77685:function(a,e,n){"use strict";n.d(e,{i:function(){return M}});var i=n(24246),t=n(13577),s=n(34090),r=n(27378),o=n(55484),_=n(16134),l=n(25980),F=n(97181),d=n(40324),u=n(812),c=n(14047),m=n(45938),h=n(8133),S=n(33335),y=n(32885),C=n(57865),g=n(93237),p=n(65450),f=n(36345);let{Text:v}=t.AntTypography,b={name:"",vendor_id:void 0,description:"",tags:[]},M=a=>{let{onSuccessfulSubmit:e,toastOnSuccess:n,...M}=a,[A,N]=(0,r.useState)(!1),U=(0,_.T)(),{tcf:I,dictionaryService:x}=(0,l.hz)(),{isLoading:T}=(0,y.Rd)(void 0,{skip:!x}),j=(0,_.C)(y.o),w=(0,_.C)(C.gU),[B]=(0,p.in)(),[E]=(0,y.Qk)(),[k]=(0,p.f7)(),{successAlert:G,errorAlert:L}=(0,c.V)(),{setSuggestions:R,setLockedForGVL:P}=C.dictSuggestionsSlice.actions,K=(0,r.useRef)(null),D=(0,r.useMemo)(()=>o.Ry().shape({name:o.Z_().required().label("System name").test("is-unique","",async(a,e)=>{let{data:n}=await B({page:1,size:10,search:a});return!((null==n?void 0:n.items)||[]).filter(e=>e.name===a).some(e=>e.name===a)||e.createError({message:'You already have a system called "'.concat(a,'". Please specify a unique name for this system.')})})}),[B]),O=a=>{if(x){if(!a){U(R("hiding")),U(P(!1));return}U(R("showing")),I&&(0,u.cj)(a)===u.c6.GVL?U(P(!0)):U(P(!1))}},W=()=>{M.onClose(),U(R("initial")),U(P(!1))},V=async a=>{if(N(!0),a.vendor_id){let i=await E([a.vendor_id]);if((0,u.D4)(i))L((0,u.e$)(i.error));else{let{data:a}=i,t=a.systems[0];null==e||e(t.fides_key,t.name),n&&G("".concat(a.name," has been added to your system inventory."))}}else{let i={...a,fides_key:(0,S.E)(a.name),system_type:"",body:"",privacy_declarations:[]},t=await k(i);if((0,u.D4)(t))L((0,u.e$)(t.error));else{let{fides_key:i,name:s}=t.data;null==e||e(i,s),n&&G("".concat(a.name," has been added to your system inventory."))}W()}N(!1)};return(0,i.jsx)(h.Z,{title:"Add New System",...M,onClose:W,children:(0,i.jsx)(s.J9,{initialValues:b,onSubmit:V,validationSchema:D,innerRef:K,children:a=>{let{dirty:e,isValid:n}=a;return(0,i.jsxs)(s.l0,{children:[(0,i.jsx)(m.Gt,{id:"new-system-modal",name:"Add New System"}),(0,i.jsxs)(t.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,i.jsx)(v,{children:"Fides will add this system to your inventory and configure it for consent using the categories of consent listed below. Optionally, you can check if this system is listed within the Fides compass library by selecting the compass icon below."}),x?(0,i.jsx)(f.Z,{label:"System name",options:j,onVendorSelected:O,isCreate:!0,lockedForGVL:w,isLoading:T}):(0,i.jsx)(d.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(0,i.jsx)(g.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:w}),(0,i.jsx)(F.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:w})]}),(0,i.jsxs)(t.jqI,{justify:"space-between",children:[(0,i.jsx)(t.wpx,{htmlType:"reset",onClick:W,disabled:T||!e||!n,"data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(t.wpx,{htmlType:"submit",type:"primary",disabled:T||!e||!n,loading:A,"data-testid":"save-btn",children:"Save"})]})]})}})})}},93237:function(a,e,n){"use strict";n.d(e,{Sv:function(){return m},Yb:function(){return c},dQ:function(){return h},lm:function(){return S}});var i=n(24246),t=n(13577),s=n(34090),r=n(27378),o=n(16134),_=n(40324),l=n(46238),F=n(32885),d=n(57865);let u=(a,e,n)=>{var i,t;let[_,l,{setValue:u,setTouched:c}]=(0,s.U$)({name:a,type:n||void 0}),m=!!(l.touched&&l.error),{error:h}=l,S={..._,value:null!==(i=_.value)&&void 0!==i?i:""},[y,C]=(0,r.useState)(null!==(t=S.value)&&void 0!==t?t:""),{values:g}=(0,s.u6)(),{vendor_id:p}=g,f=(0,o.C)((0,F.$e)(p||"")),v=(0,o.C)(d.bN),b=(0,r.useRef)();return(0,r.useEffect)(()=>{"showing"===v&&C(S.value)},[v,C]),(0,r.useEffect)(()=>{if("showing"===v&&f){let n=e?e(f):f[a];S.value!==n&&(u(n),setTimeout(()=>{var a;c(!0),null===(a=b.current)||void 0===a||a.blur()},300))}},[v,u,f,b.current]),(0,r.useEffect)(()=>{"hiding"===v&&u(y)},[v,u,y]),{field:S,isInvalid:m,isShowingSuggestions:v,error:h,inputRef:b}},c=a=>{let{label:e,tooltip:n,disabled:s,isRequired:r=!1,dictField:o,name:F,placeholder:d,id:c}=a,{field:m,isInvalid:h,isShowingSuggestions:S,error:y,inputRef:C}=u(F,o);return(0,i.jsx)(t.NIc,{isInvalid:h,isRequired:r,children:(0,i.jsxs)(t.gCW,{alignItems:"start",children:[(0,i.jsxs)(t.kCb,{alignItems:"center",children:[(0,i.jsx)(_.__,{htmlFor:c||F,fontSize:"xs",my:0,mr:1,children:e}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(_.oi,{...m,ref:C,isRequired:r,isDisabled:s,"data-testid":"input-".concat(m.name),placeholder:d,isPassword:!1,color:"showing"===S?"complimentary.500":"gray.800"}),(0,i.jsx)(_.Bc,{isInvalid:h,message:y,fieldName:m.name})]})})},m=a=>{let{label:e,tooltip:n,disabled:s,isRequired:r=!1,dictField:o,name:F,id:d}=a,{field:c,isInvalid:m,isShowingSuggestions:h,error:S}=u(F,o);return(0,i.jsx)(t.NIc,{isInvalid:m,isRequired:r,children:(0,i.jsxs)(t.gCW,{alignItems:"start",children:[(0,i.jsxs)(t.kCb,{alignItems:"center",children:[(0,i.jsx)(_.__,{htmlFor:d||F,fontSize:"xs",my:0,mr:1,children:e}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(t.gxH,{...c,size:"sm","data-testid":"input-".concat(c.name),focusBorderColor:"primary.600",color:"showing"===h?"complimentary.500":"gray.800",isDisabled:s}),(0,i.jsx)(_.Bc,{isInvalid:m,message:S,fieldName:c.name})]})})},h=a=>{let{label:e,tooltip:n,dictField:r,name:o,id:F,disabled:d}=a,{field:c,isInvalid:m,error:h}=u(o,r,"checkbox");return(0,i.jsxs)(t.NIc,{isInvalid:m,width:"full",children:[(0,i.jsxs)(t.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,i.jsxs)(t.Ugi,{spacing:1,children:[(0,i.jsx)(_.__,{htmlFor:F||o,fontSize:"xs",my:0,mr:0,children:e}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(t.Ugi,{children:(0,i.jsx)(s.gN,{name:c.name,children:a=>{let{form:{setFieldValue:e}}=a;return(0,i.jsx)(t.rAg,{checked:c.checked,onChange:a=>{e(c.name,a)},disabled:d,className:"mr-2","data-testid":"input-".concat(c.name),size:"small"})}})})]}),(0,i.jsx)(_.Bc,{isInvalid:m,message:h,fieldName:c.name})]})},S=a=>{let{label:e,tooltip:n,dictField:r,name:o,id:F,disabled:d}=a,{field:c,isInvalid:m,error:h,isShowingSuggestions:S}=u(o,r,"numeric"),{setFieldValue:y}=(0,s.u6)();return(0,i.jsxs)(t.NIc,{isInvalid:m,width:"full",children:[(0,i.jsxs)(t.xuv,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,i.jsxs)(t.Ugi,{spacing:1,children:[(0,i.jsx)(_.__,{htmlFor:F||o,fontSize:"xs",my:0,mr:0,children:e}),(0,i.jsx)(l.b,{label:n})]}),(0,i.jsx)(t.Ugi,{children:(0,i.jsxs)(t.Y2U,{value:c.value,name:c.name,size:"xs",onBlur:c.onBlur,onChange:a=>{y(c.name,a)},w:"100%",colorScheme:"terracotta",inputMode:"numeric","data-testid":"input-".concat(c.name),color:"showing"===S?"complimentary.500":"gray.800",focusBorderColor:"primary.600",isDisabled:d,children:[(0,i.jsx)(t.zuI,{}),(0,i.jsxs)(t.FiK,{children:[(0,i.jsx)(t.WQu,{}),(0,i.jsx)(t.Y_d,{})]})]})})]}),(0,i.jsx)(_.Bc,{isInvalid:m,message:h,fieldName:c.name})]})}},99830:function(a){a.exports={toastLink:"ToastLink_toastLink__OLSeq"}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7725],{74833:function(t,e,r){var s=r(56127),n=/^\s+/;t.exports=function(t){return t?t.slice(0,s(t)+1).replace(n,""):t}},56127:function(t){var e=/\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},91936:function(t,e,r){var s=r(74833),n=r(11611),o=r(55193),i=0/0,u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return i;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=s(t);var r=a.test(t);return r||l.test(t)?c(t.slice(2),r?2:8):u.test(t)?i:+t}},58754:function(t,e,r){"use strict";var s=r(24246),n=r(13577),o=r(70788);e.Z=t=>{let{heading:e,breadcrumbItems:r,isSticky:i=!0,children:u,rightContent:a,style:l,...c}=t;return(0,s.jsxs)("div",{...c,style:i?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...l}:{paddingBottom:"24px",...l},children:[(0,s.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof e?(0,s.jsx)(n.lQT,{className:r||u?"pb-4":void 0,level:1,"data-testid":"page-heading",children:e}):e,a&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!r&&(0,s.jsx)(o.m,{className:u?"pb-4":void 0,items:r,"data-testid":"page-breadcrumb"}),u]})}},70788:function(t,e,r){"use strict";r.d(e,{m:function(){return l}});var s=r(24246),n=r(13577),o=r(79894),i=r.n(o),u=r(27378);let{Text:a}=n.AntTypography,l=t=>{let{items:e,...r}=t,o=(0,u.useMemo)(()=>null==e?void 0:e.map((t,r)=>{let o=r===e.length-1,u={...t},l=u.onClick&&!u.href;return("string"==typeof u.title&&(u.title=(0,s.jsx)(a,{style:{color:"inherit",maxWidth:o?void 0:400},ellipsis:!o,children:u.title})),l)?u.title=(0,s.jsx)(n.wpx,{type:"text",size:"small",icon:u.icon,onClick:u.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:u.title}):(u.icon&&(u.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:u.icon}),u.title]})),u.href&&u.title&&(u.title=(0,s.jsx)(i(),{href:u.href,className:"ant-breadcrumb-link",children:u.title}),delete u.href)),u}),[e]);return(0,s.jsx)(n.zrq,{items:o,...r})}},54762:function(t,e,r){"use strict";r.d(e,{l:function(){return u}});var s=r(24246),n=r(13577),o=r(62165),i=r(54682);let u=t=>{let{consentStatus:e}=t,{flags:r}=(0,o.hz)(),{assetConsentStatusLabels:u}=r;return u&&(null==e?void 0:e.status)===i.pF.ALERT?(0,s.jsx)(n.esZ,{title:null==e?void 0:e.message,"data-testid":"discovery-status-icon-alert-tooltip",children:(0,s.jsx)("div",{className:"mb-px","data-testid":"discovery-status-icon-alert",children:(0,s.jsx)(n.PJP.OdJ,{style:{color:"var(--fidesui-error)"}})})}):null}},37059:function(t,e,r){"use strict";r.d(e,{Ak:function(){return g},EY:function(){return m},Tj:function(){return y},Ud:function(){return u},Vr:function(){return f},WJ:function(){return l},mi:function(){return h},nP:function(){return d},nS:function(){return p},rs:function(){return c},sX:function(){return v},ut:function(){return T},wi:function(){return a}});var s=r(78780),n=r(16394),o=r(54682),i=r(98145);let{useGetAggregateMonitorResultsQuery:u,useGetDiscoveredSystemAggregateQuery:a,useGetDiscoveredAssetsQuery:l,useAddMonitorResultSystemsMutation:c,useIgnoreMonitorResultSystemsMutation:d,useAddMonitorResultAssetsMutation:m,useIgnoreMonitorResultAssetsMutation:p,useRestoreMonitorResultAssetsMutation:y,useUpdateAssetsSystemMutation:v,useUpdateAssetsDataUseMutation:g,useUpdateAssetsMutation:f,useGetConsentBreakdownQuery:h,useGetWebsiteMonitorResourceFiltersQuery:T}=s.u.injectEndpoints({endpoints:t=>({getAggregateMonitorResults:t.query({query:t=>{let{page:e=1,size:r=20,search:s}=t;return{url:"/plus/discovery-monitor/aggregate-results",params:{page:e,size:r,search:s,diff_status:"addition"}}},providesTags:["Discovery Monitor Results"]}),getDiscoveredSystemAggregate:t.query({query:t=>{let{key:e,page:r=1,size:s=20,search:n,diff_status:o}=t;return{url:"/plus/discovery-monitor/system-aggregate-results",params:{monitor_config_id:e,page:r,size:s,search:n,diff_status:o}}},providesTags:["Discovery Monitor Results"]}),getDiscoveredAssets:t.query({query:t=>{let{key:e,system:r,page:s=1,size:u=20,search:a,diff_status:l=[o.LL.ADDITION],sort_by:c=[i.r.CONSENT_AGGREGATED,"urn"],sort_asc:d=!0,resource_type:m,data_uses:p,locations:y,consent_aggregated:v}=t,g=Array.isArray(c)?c:[c],f=(0,n.$J)({sort_by:g,resource_type:m,data_uses:p,locations:y,consent_aggregated:v});return{url:"/plus/discovery-monitor/".concat(e,"/results?").concat(f.toString()),params:{resolved_system_id:r,page:s,size:u,search:a,diff_status:l,sort_asc:d}}},providesTags:()=>["Discovery Monitor Results"]}),addMonitorResultSystems:t.mutation({query:t=>{let{monitor_config_key:e,resolved_system_ids:r}=t,s=(0,n.du)(r,"resolved_system_ids");return{url:"/plus/discovery-monitor/".concat(e,"/promote"),method:"POST",params:s?new URLSearchParams(s):new URLSearchParams}},invalidatesTags:["Discovery Monitor Results"]}),ignoreMonitorResultSystems:t.mutation({query:t=>{let{monitor_config_key:e,resolved_system_ids:r}=t,s=(0,n.du)(r,"resolved_system_ids");return{method:"POST",url:"/plus/discovery-monitor/".concat(e,"/mute?").concat(s)}},invalidatesTags:["Discovery Monitor Results"]}),addMonitorResultAssets:t.mutation({query:t=>{var e;let r=new URLSearchParams;return null===(e=t.urnList)||void 0===e||e.forEach(t=>r.append("staged_resource_urns",t)),{method:"POST",url:"/plus/discovery-monitor/promote?".concat(r)}},invalidatesTags:["Discovery Monitor Results"]}),ignoreMonitorResultAssets:t.mutation({query:t=>{var e;let r=new URLSearchParams;return null===(e=t.urnList)||void 0===e||e.forEach(t=>r.append("staged_resource_urns",t)),{method:"POST",url:"/plus/discovery-monitor/mute?".concat(r)}},invalidatesTags:["Discovery Monitor Results"]}),restoreMonitorResultAssets:t.mutation({query:t=>{var e;let r=new URLSearchParams({status_to_set:o.LL.ADDITION});return null===(e=t.urnList)||void 0===e||e.forEach(t=>r.append("staged_resource_urns",t)),{method:"POST",url:"/plus/discovery-monitor/un-mute?".concat(r)}},invalidatesTags:["Discovery Monitor Results"]}),updateAssetsSystem:t.mutation({query:t=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(t.monitorId,"/results"),body:t.urnList.map(e=>({urn:e,user_assigned_system_key:t.systemKey}))}),invalidatesTags:["Discovery Monitor Results","System Assets"]}),updateAssetsDataUse:t.mutation({query:t=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(t.monitorId,"/results"),body:t.urnList.map(e=>({urn:e,user_assigned_data_uses:t.dataUses}))}),invalidatesTags:["Discovery Monitor Results"]}),updateAssets:t.mutation({query:t=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(t.monitorId,"/results"),body:t.assets}),invalidatesTags:["Discovery Monitor Results"]}),getConsentBreakdown:t.query({query:t=>{let{stagedResourceUrn:e,status:r,page:s=1,size:n=20}=t;return{url:"/plus/discovery-monitor/staged_resource/".concat(encodeURIComponent(e),"/consent"),params:{status:r,page:s,size:n}}}}),getWebsiteMonitorResourceFilters:t.query({query:t=>{let{monitor_config_id:e,resolved_system_id:r,diff_status:s=[o.LL.ADDITION],search:i,resource_type:u,data_uses:a,locations:l,consent_aggregated:c}=t,d={monitor_config_id:e,resolved_system_id:r,diff_status:s};i&&(d.search=i);let m=(0,n.$J)({resource_type:u,data_uses:a,locations:l,consent_aggregated:c}).toString();return{url:m?"/plus/filters/website_monitor_resources?".concat(m):"/plus/filters/website_monitor_resources",params:d}},providesTags:["Discovery Monitor Results"]})})})},98145:function(t,e,r){"use strict";var s,n,o,i;r.d(e,{X:function(){return s},r:function(){return n}}),(o=s||(s={})).WITH_CONSENT="With consent",o.WITHOUT_CONSENT="Without consent",o.EXEMPT="Exempt",o.UNKNOWN="Unknown",(i=n||(n={})).NAME="name",i.RESOURCE_TYPE="resource_type",i.SYSTEM="system",i.DATA_USES="data_uses",i.LOCATIONS="locations",i.DOMAIN="domain",i.PAGE="page",i.CONSENT_AGGREGATED="consent_aggregated",i.ACTIONS="actions"}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8735],{56632:function(e,t,n){var a=n(89278),i=n(80068),r=n(50098);e.exports=function(e){return function(t,n,s){var l=Object(t);if(!i(t)){var c=a(n,3);t=r(t),n=function(e){return c(l[e],e,l)}}var u=e(t,n,s);return u>-1?l[c?t[u]:u]:void 0}}},64925:function(e,t,n){var a=n(56632)(n(66259));e.exports=a},66259:function(e,t,n){var a=n(95372),i=n(89278),r=n(47991),s=Math.max;e.exports=function(e,t,n){var l=null==e?0:e.length;if(!l)return -1;var c=null==n?0:r(n);return c<0&&(c=s(l+c,0)),a(e,i(t,3),c)}},94919:function(e,t,n){var a=n(91936),i=1/0;e.exports=function(e){return e?(e=a(e))===i||e===-i?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,n){var a=n(94919);e.exports=function(e){var t=a(e),n=t%1;return t==t?n?t-n:t:0}},35287:function(e,t,n){"use strict";var a=n(24246),i=n(13577),r=n(88038),s=n.n(r);n(27378),t.Z=e=>{let{children:t,title:n,mainProps:r}=e;return(0,a.jsxs)(i.kCb,{"data-testid":n,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,a.jsxs)(s(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsx)(i.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...r,children:t})]})}},34929:function(e,t,n){"use strict";var a=n(24246),i=n(64925),r=n.n(i),s=n(27378),l=n(16134),c=n(30002),u=n(28079),o=n(57072);let d=()=>{let{isLoading:e}=(0,u.fd)(),t=(0,l.C)(u.U3),{isLoading:n}=(0,o.MO)(),a=(0,l.C)(o.qb),{isLoading:i}=(0,c.te)();return{dataUses:t,dataSubjects:(0,l.C)(c.ZL),dataCategories:a,isLoading:e||n||i}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:n,isLoading:i}=d(),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=t(e);if(!a)return{};let i=t(l(e,n)),r=!!a.parent_key;return{name:a.name||void 0,primaryName:r&&(null==i?void 0:i.name)!==a.name&&(null==i?void 0:i.name)||void 0}},u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:i,primaryName:r}=c(e,t,n);return i?r?(0,a.jsxs)(s.Fragment,{children:[(0,a.jsxs)("strong",{children:[r,":"]})," ",i]},e):(0,a.jsx)("strong",{children:i},e):e},o=t=>r()(e,{fides_key:t}),f=e=>r()(t,{fides_key:e}),p=e=>r()(n,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:o,getDataUseDisplayName:e=>u(e,o,1),getDataUseDisplayNameProps:e=>c(e,o,1),getDataCategories:()=>t,getDataCategoryByKey:f,getDataCategoryDisplayName:e=>u(e,f,2),getDataCategoryDisplayNameProps:e=>c(e,f,2),getDataSubjects:()=>n,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:l,isLoading:i}}},25415:function(e,t,n){"use strict";n.d(t,{a:function(){return r}});var a=n(24246);let{Text:i}=n(13577).AntTypography,r=e=>{let{count:t}=e;return(0,a.jsx)(i,{size:"sm",strong:!0,"data-testid":"selected-count",children:"".concat(t," selected")})}},2525:function(e,t,n){"use strict";n.d(t,{Q:function(){return l}});var a=n(24246),i=n(13577),r=n(27378),s=n(97327);let l=e=>{let{values:t,columnState:n,...l}=e,{isExpanded:c,isWrapped:u,version:o}=n||{},[d,f]=(0,r.useState)(!c),[p,g]=(0,r.useState)(!!u),[h,m]=(0,r.useState)(c?t:null==t?void 0:t.slice(0,2));(0,r.useEffect)(()=>{f(!c)},[c,o]),(0,r.useEffect)(()=>{g(!!u)},[u]),(0,r.useEffect)(()=>{(null==t?void 0:t.length)&&m(d?t.slice(0,2):t)},[d,t]);let v=(0,r.useCallback)(()=>{m(null==t?void 0:t.slice(0,2)),f(!0)},[t]),x=(0,r.useCallback)(()=>{f(!1)},[]),j=(0,r.useCallback)(()=>{d?x():v()},[d,x,v]);return(0,r.useMemo)(()=>(null==h?void 0:h.length)?(0,a.jsxs)(i.jqI,{align:"center",wrap:p?"wrap":"nowrap",gap:"small","data-testid":"tag-expandable-cell",children:[h.map(e=>(0,a.jsx)(i.j8w,{color:"white","data-testid":e.key,...l,children:e.label},e.key)),t&&t.length>2&&(0,a.jsx)(i.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),j()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:d?"+".concat(t.length-2," more"):s.T})]}):(0,a.jsx)("span",{"data-testid":"tag-expandable-cell-empty"}),[h,d,p,t,j,l])}},97327:function(e,t,n){"use strict";n.d(t,{T:function(){return a}});let a="show less"},91982:function(e,t,n){"use strict";n.d(t,{vx:function(){return c},OL:function(){return o},Q3:function(){return d.Q},DI:function(){return u}});var a=n(24246),i=n(13577),r=n(27378),s=n(97327);let{Text:l}=i.AntTypography,c=e=>{let{values:t,valueSuffix:n,columnState:c}=e,{isExpanded:u,version:o}=c||{},[d,f]=(0,r.useState)(!u);(0,r.useEffect)(()=>{f(!u)},[u,o]);let p=(0,r.useCallback)(()=>{f(!0)},[]),g=(0,r.useCallback)(()=>{f(!1)},[]),h=(0,r.useCallback)(()=>{d?g():p()},[d,g,p]);return(0,r.useMemo)(()=>(null==t?void 0:t.length)?1===t.length?(0,a.jsx)(l,{ellipsis:!0,"data-testid":"list-expandable-cell-single",children:t[0]}):(0,a.jsxs)(i.jqI,{align:d?"center":"flex-start",vertical:!d,gap:d?"small":"none","data-testid":"list-expandable-cell",children:[d?(0,a.jsxs)(l,{ellipsis:!0,children:[t.length," ",n]}):(0,a.jsx)(i.krs,{dataSource:t,renderItem:e=>(0,a.jsx)("li",{children:e})}),(0,a.jsx)(i.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),h()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:d?"view":s.T})]}):null,[d,t,n,h])},u=[{key:"expand-all",label:"Expand all",icon:(0,a.jsx)(i.PJP.jbG,{})},{key:"collapse-all",label:"Collapse all",icon:(0,a.jsx)(i.PJP.MVB,{})}],o=e=>{let{title:t,menuIcon:n,menuIconLabel:r="Menu",menu:s,...l}=e;return(0,a.jsxs)(i.jqI,{align:"center",justify:"space-between",children:[t,(0,a.jsx)(i.S0p,{trigger:["click"],menu:s,placement:"bottomRight",...l,children:(0,a.jsx)(i.wpx,{icon:n||(0,a.jsx)(i.PJP.r43,{title:r}),size:"small",type:"text",className:"ant-table-filter-trigger",onClick:e=>{e.stopPropagation()}})})]})};var d=n(2525)},9320:function(e,t,n){"use strict";n.d(t,{_:function(){return r}});var a=n(24246),i=n(26089);let r=(e,t)=>(0,a.jsxs)(a.Fragment,{children:[e," ",t&&(0,a.jsx)(i.Z,{onClick:t,children:"View"})]})},88708:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var a,i,r=n(27378),s=n(14908),l=n(54682);(a=i||(i={})).ATTENTION_REQUIRED="attention-required",a.RECENT_ACTIVITY="recent-activity",a.IGNORED="ignored",t.Z=e=>{let{activeTab:t,onTabChange:n}=(0,s.Z)({tabKeys:Object.values(i)}),a=(0,r.useMemo)(()=>[{label:"Attention required",params:{diff_status:[l.LL.ADDITION],system:e},hash:"attention-required"},{label:"Recent activity",params:{diff_status:[l.LL.MONITORED]},hash:"recent-activity"},{label:"Ignored",params:{diff_status:[l.LL.MUTED],system:e},hash:"ignored"}],[e]),{diff_status:c,system:u}=(0,r.useMemo)(()=>{var e;return null!==(e=a.find(e=>e.hash===t))&&void 0!==e?e:a[0]},[a,t]).params,o=(0,r.useMemo)(()=>c.includes(l.LL.MONITORED),[c]);return{filterTabs:a,activeTab:t,onTabChange:n,activeParams:(0,r.useMemo)(()=>e?{diff_status:c,system:u}:{diff_status:c},[e,c,u]),actionsDisabled:o}}},78238:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});let a=["essential","functional.service.improve","personalize","analytics","marketing.advertising.first_party.targeted","marketing.advertising.third_party.targeted"];t.Z=e=>a.includes(e)},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return a.Bw},D4:function(){return a.D4}});var a=n(19043)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9046],{12627:function(e,s,a){var i=a(24246),t=a(79283),l=a(34929);s.Z=e=>{let{selectedTaxonomies:s,showDisabled:a=!1,...r}=e,{getDataCategoryDisplayNameProps:n,getDataCategories:o}=(0,l.Z)(),d=(a?o():o().filter(e=>e.active)).filter(e=>!s.includes(e.fides_key)).map(e=>{let{name:s,primaryName:a}=n(e.fides_key);return{value:e.fides_key,name:s,primaryName:a,description:e.description||""}});return(0,i.jsx)(t.l,{options:d,...r})}},14908:function(e,s,a){var i=a(86677),t=a(27378);let l=e=>e.startsWith("#")?e.slice(1):e;s.Z=e=>{let{tabKeys:s,initialTab:a}=e,r=(0,i.useRouter)(),n=r.asPath.split("#")[1]||s[0],[o,d]=(0,t.useState)(n);return(0,t.useEffect)(()=>{a&&s.includes(a)&&d(a)},[a,s,r.isReady]),{activeTab:o,onTabChange:(0,t.useCallback)(async e=>{if(!s.includes(e)){await r.replace({pathname:r.pathname,query:r.query,hash:void 0}),d(s[0]);return}r.isReady&&(await r.replace({pathname:r.pathname,query:r.query,hash:l(e)},void 0,{shallow:!0}),d(e))},[r,s])}}},69828:function(e,s,a){a.d(s,{Y:function(){return r}});var i=a(24246),t=a(13577),l=a(70788);let r=[(0,i.jsx)(t.PJP.S9g,{},"layers"),(0,i.jsx)(t.PJP.ehp,{},"dataset"),(0,i.jsx)(t.PJP.iA_,{},"table"),(0,i.jsx)(t.PJP.$4y,{style:{transform:"rotate(-90deg)"}},"field")];s.Z=e=>{let{resourceUrn:s,parentLink:a,onPathClick:t=()=>{}}=e,n=[];if(s||n.push({title:"All activity"}),s){n.push({title:"All activity",href:a});let e=s.split(".");e.forEach((s,a)=>{0!==a&&n.push({title:s,icon:r[a-1],onClick:s=>{s.preventDefault(),t(e.slice(0,a+1).join("."))}})})}return(0,i.jsx)(l.m,{"data-testid":"results-breadcrumb",items:n})}},11904:function(e,s,a){a.d(s,{Z:function(){return E}});var i,t,l=a(24246),r=a(59003),n=a(92222),o=a(13577),d=a(27378),c=a(47935),u=a(70675),g=a(72625),x=a(79947),h=a(50169),j=a(28278),m=a(74241),p=a(54682),f=a(91761),v=a(61099),y=a(87667),I=e=>{let{resourceType:s}=e,a=(0,n.Cl)();return s===p.D$.SCHEMA?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(y.Z,{result:e.row.original,changeTypeOverride:j.E.CLASSIFICATION}),header:e=>(0,l.jsx)(c.Rr,{value:"Name",...e}),size:300}),a.accessor(e=>e.urn,{id:"project",cell:e=>(0,l.jsx)(c.G3,{value:(0,m.Z)(e.getValue())}),header:e=>(0,l.jsx)(c.Rr,{value:"Project",...e})}),a.display({id:"status",cell:e=>(0,l.jsx)(h.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),a.accessor(e=>e.system,{id:"system",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"System",...e})}),a.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"Detected by",...e})}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"action",cell:e=>e.row.original.diff_status!==p.LL.MUTED?(0,l.jsx)(f.Z,{resource:e.row.original}):(0,l.jsx)(c.G3,{value:"--"}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.TABLE?{columns:[a.display({id:"select",cell:e=>{var s;let{row:a}=e;return(0,l.jsx)(g.k,{isChecked:a.getIsSelected(),onChange:a.getToggleSelectedHandler(),dataTestId:"select-".concat(null!==(s=a.original.name)&&void 0!==s?s:a.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(g.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40}),a.accessor(e=>e.name,{id:"tables",cell:e=>(0,l.jsx)(y.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Table name",...e}),size:300}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(h.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(c.G3,{value:"Table"}),header:"Type"}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(g.Cy,{time:e.getValue()}),header:"Time"}),a.display({id:"actions",cell:e=>(0,l.jsx)(f.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.FIELD?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(y.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Field name",...e}),size:300}),a.accessor(e=>e.source_data_type,{id:"data-type",cell:e=>(0,l.jsx)(x.Z,{type:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"Data type",...e})}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(h.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(c.G3,{value:"Field"}),header:"Type"}),a.display({id:"classifications",cell:e=>{let{row:s}=e;return(0,l.jsx)(v.Z,{resource:s.original})},meta:{overflow:"visible",disableRowClick:!0},header:"Data category",minSize:280}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,l.jsx)(f.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:s===p.D$.ENDPOINT?{columns:[a.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(y.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Object",...e}),size:300}),a.accessor(e=>e.description,{id:"description",cell:e=>(0,l.jsx)(c.G3,{value:e.getValue(),cellProps:e}),header:e=>(0,l.jsx)(c.Rr,{value:"Description",...e}),meta:{showHeaderMenu:!0}}),a.display({id:"status",cell:e=>(0,l.jsx)(h.Z,{result:e.row.original}),header:e=>(0,l.jsx)(c.Rr,{value:"Status",...e})}),a.display({id:"type",cell:()=>(0,l.jsx)(c.G3,{value:"Endpoint"}),header:"Type"}),a.display({id:"classifications",cell:e=>{let{row:s}=e;return(0,l.jsx)(v.Z,{resource:s.original})},meta:{overflow:"visible",disableRowClick:!0},header:"Data category",minSize:280}),a.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,l.jsx)(g.Cy,{time:e.getValue()}),header:e=>(0,l.jsx)(c.Rr,{value:"When",...e})}),a.display({id:"actions",cell:e=>(0,l.jsx)(f.Z,{resource:e.row.original}),header:"Actions",size:235,meta:{disableRowClick:!0}})]}:{columns:[]}},C=a(14908);(i=t||(t={})).ACTION_REQUIRED="action-required",i.IN_PROGRESS="in-progress",i.UNMONITORED="unmonitored";let _={"action-required":{label:"Action Required",key:"action-required",filters:[p.LL.CLASSIFICATION_ADDITION,p.LL.CLASSIFICATION_UPDATE],childFilters:[p.LL.CLASSIFICATION_ADDITION,p.LL.CLASSIFICATION_UPDATE]},"in-progress":{label:"In progress",key:"in-progress",filters:[p.LL.CLASSIFYING,p.LL.CLASSIFICATION_QUEUED],childFilters:[p.LL.CLASSIFYING,p.LL.CLASSIFICATION_QUEUED]},unmonitored:{label:"Unmonitored",key:"unmonitored",filters:[p.LL.MUTED],childFilters:[]}};var L=()=>{var e,s;let{activeTab:a,onTabChange:i}=(0,C.Z)({tabKeys:Object.values(t)});return{filterTabs:Object.values(_),activeTab:a,onTabChange:i,activeDiffFilters:null===(e=_[a])||void 0===e?void 0:e.filters,activeChildDiffFilters:null===(s=_[a])||void 0===s?void 0:s.childFilters}},b=a(47182),w=a(38347),S=a(79494),A=e=>{let{resourceUrn:s}=e,[a,{isLoading:i}]=(0,u.Hf)(),[t,{isLoading:r}]=(0,u.zV)(),n=i||r,d=async e=>{await t({staged_resource_urns:e})},c=async e=>{await a({staged_resource_urns:e})};return(0,l.jsx)(o.jqI,{"data-testid":"bulk-actions-menu",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(S.Z,{title:"Confirm all",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>c([s]),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(S.Z,{title:"Ignore all",icon:(0,l.jsx)(o.tpL,{}),onClick:()=>d([s]),disabled:n,loading:r,size:"middle"})]})})},R=e=>{let{selectedUrns:s}=e,[a,{isLoading:i}]=(0,u.Hf)(),[t,{isLoading:r}]=(0,u.zV)(),n=i||r,d=async e=>{await a({staged_resource_urns:e})},c=async e=>{await t({staged_resource_urns:e})};return s.length?(0,l.jsxs)(o.jqI,{className:"items-center","data-testid":"bulk-actions-menu",children:[(0,l.jsx)(o.xvT,{fontSize:"xs",fontWeight:"semibold",minW:16,mr:4,children:"".concat(s.length," selected")}),(0,l.jsxs)(o.jqI,{className:"gap-2",children:[(0,l.jsx)(S.Z,{title:"Confirm",icon:(0,l.jsx)(o.nQG,{}),onClick:()=>d(s),disabled:n,loading:i,type:"primary",size:"middle"}),(0,l.jsx)(S.Z,{title:"Ignore",icon:(0,l.jsx)(o.tpL,{}),disabled:n,loading:r,onClick:()=>c(s),size:"middle"})]})]}):null},T=a(7940),D=a(80285),k=a(36168),N=a(30952);let Z={items:[],total:0,page:1,size:50,pages:1},F=()=>(0,l.jsx)(o.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,l.jsxs)(o.gCW,{children:[(0,l.jsx)(o.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,l.jsx)(o.xvT,{fontSize:"sm",children:"You're up to date!"})]})});var E=e=>{let{resourceUrn:s}=e,[a,i]=(0,d.useState)(""),{filterTabs:t,activeTab:g,onTabChange:x,activeDiffFilters:h,activeChildDiffFilters:j}=L(),[m,f]=(0,d.useState)({}),{PAGE_SIZES:v,pageSize:y,setPageSize:C,onPreviousPageClick:_,isPreviousPageDisabled:S,onNextPageClick:E,isNextPageDisabled:P,startRange:z,endRange:O,pageIndex:G,setTotalPages:U,resetPageIndexToDefault:M}=(0,c.oi)();(0,d.useEffect)(()=>{M()},[s,a,M,h,j]);let{isFetching:V,isLoading:q,data:$}=(0,u.z8)({staged_resource_urn:s,page:G,size:y,child_diff_status:j,diff_status:h,search:a}),W=(0,T.G)(null==$?void 0:$.items[0]),{items:H,total:Q,pages:J}=(0,d.useMemo)(()=>null!=$?$:Z,[$]);(0,d.useEffect)(()=>{U(J)},[J,U]);let{columns:Y}=I({resourceType:W}),B=(0,d.useMemo)(()=>Y,[Y]),{navigateToDiscoveryResults:K}=(0,b.Z)(),X=(0,r.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),columns:B,manualPagination:!0,onRowSelectionChange:f,state:{rowSelection:m},getRowId:D.Z,data:H,columnResizeMode:"onChange"}),ee=Object.keys(m).filter(e=>m[e]);return q?(0,l.jsx)(c.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.A5g,{items:t.map(e=>({key:e.key,label:e.label})),activeKey:g,onChange:e=>x(e)}),(0,l.jsxs)(c.Q$,{children:[(0,l.jsxs)(o.kCb,{gap:6,align:"center",children:[(0,l.jsx)(o.xuv,{flexShrink:0,children:(0,l.jsx)(N.f,{value:a,onChange:i})}),(0,l.jsx)(w.Z,{})]}),W===p.D$.TABLE&&!!ee.length&&(0,l.jsx)(R,{selectedUrns:ee}),W===p.D$.FIELD&&"unmonitored"!==g&&(0,l.jsx)(A,{resourceUrn:s})]}),(0,l.jsx)(c.ZK,{tableInstance:X,onRowClick:e=>K({resourceUrn:e.urn,filterTab:g}),getRowIsClickable:e=>W!==p.D$.FIELD||(0,k.Z)(e),emptyTableNotice:(0,l.jsx)(F,{})}),(0,l.jsx)(c.s8,{totalRows:Q||0,pageSizes:v,setPageSize:C,onPreviousPageClick:_,isPreviousPageDisabled:S||V,onNextPageClick:E,isNextPageDisabled:P||V,startRange:z,endRange:O})]})}},91761:function(e,s,a){var i=a(24246),t=a(13577),l=a(812),r=a(14047),n=a(7940),o=a(98559),d=a(54682),c=a(79494),u=a(70675);s.Z=e=>{let{resource:s}=e,[a,{isLoading:g}]=(0,u.v8)(),[x,{isLoading:h}]=(0,u.cM)(),[j,{isLoading:m}]=(0,u.vi)(),p=h||m||g,{diff_status:f,child_diff_statuses:v,top_level_field_name:y}=s,{successAlert:I,errorAlert:C}=(0,r.V)(),_=f===d.LL.CLASSIFICATION_ADDITION||f===d.LL.CLASSIFICATION_UPDATE,L=v&&(v[d.LL.CLASSIFICATION_ADDITION]||v[d.LL.CLASSIFICATION_UPDATE]),b=(_||L)&&!y,w=_||L,S=(0,n.G)(s)!==d.D$.FIELD,A=b&&w&&S,R=async()=>{let e=await x({staged_resource_urn:s.urn});(0,l.D4)(e)?C((0,l.e$)(e.error),"Failed to promote resource"):I('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},T=async()=>{let e=await j({staged_resource_urn:s.urn});(0,l.D4)(e)?C((0,l.e$)(e.error),"Failed to mute resource"):I("Ignored changes will not be added to a Fides dataset.","".concat(s.name||"Changes"," ignored"))},D=async()=>{let e=await a({staged_resource_urn:s.urn,monitor_config_id:s.monitor_config_id,start_classification:!0,diff_statuses_to_classify:[d.LL.CLASSIFICATION_ADDITION,d.LL.CLASSIFICATION_UPDATE,d.LL.CLASSIFYING,d.LL.CLASSIFICATION_QUEUED]});(0,l.D4)(e)?C((0,l.e$)(e.error),"Failed to reclassify resource"):I("Reclassification of ".concat((0,o.Z)(s)||"the resource"," has begun. The results may take some time to appear in the “Data discovery“ tab."),"Reclassification started")};return(0,i.jsxs)(t.Ugi,{gap:2,children:[b&&(0,i.jsx)(c.Z,{title:"Confirm",icon:(0,i.jsx)(t.nQG,{}),onClick:R,disabled:p,loading:h}),w&&(0,i.jsx)(c.Z,{title:"Ignore",icon:(0,i.jsx)(t.tpL,{}),onClick:T,disabled:p,loading:m}),S&&!A&&(0,i.jsx)(c.Z,{title:"Reclassify",icon:(0,i.jsx)(t.nyI,{}),onClick:D,disabled:p,loading:g}),A&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.LZC,{}),(0,i.jsxs)(t.v2r,{children:[(0,i.jsx)(t.j2t,{as:t.wpx,size:"small",type:"text",icon:(0,i.jsx)(t.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"actions-overflow-btn"}),(0,i.jsx)(t.qyq,{children:(0,i.jsx)(t.sNh,{onClick:D,icon:(0,i.jsx)(t.nyI,{}),"data-testid":"action-reclassify",children:"Reclassify"})})]})]})]})}},61099:function(e,s,a){var i=a(24246),t=a(13577),l=a(27378),r=a(12627),n=a(34929),o=a(26183),d=a(70675);s.Z=e=>{var s,a,c;let{resource:u}=e,[g,x]=(0,l.useState)(!1),{getDataCategoryDisplayName:h}=(0,n.Z)(),[j]=(0,d.NA)(),m=(null===(s=u.classifications)||void 0===s?void 0:s.length)?u.classifications[0].label:null,p=null!==(c=u.user_assigned_data_categories)&&void 0!==c?c:[],f=!m&&!(null==p?void 0:p.length),v=null===(a=u.sub_field_urns)||void 0===a?void 0:a.length,y=e=>{j({staged_resource_urn:u.urn,monitor_config_id:u.monitor_config_id,user_assigned_data_categories:[...p,e]})},I=e=>{var s;j({staged_resource_urn:u.urn,monitor_config_id:u.monitor_config_id,user_assigned_data_categories:null!==(s=null==p?void 0:p.filter(s=>s!==e))&&void 0!==s?s:[]})},C=!g&&!!p.length,_=!g&&!!m&&!p.length;return(0,i.jsxs)(o.Z,{"data-testid":"edit-category-cell",children:[f&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.j8w,{"data-testid":"no-classifications",color:"white",children:"None"}),!v&&(0,i.jsx)(t.j8w,{onClick:()=>x(!0),addable:!0,"data-testid":"taxonomy-add-btn","aria-label":"Add category"})]}),C&&(0,i.jsxs)(i.Fragment,{children:[p.map(e=>(0,i.jsx)(t.j8w,{"data-testid":"user-classification-".concat(e),color:"white",closable:!0,onClose:()=>I(e),closeButtonLabel:"Remove category",children:h(e)},e)),(0,i.jsx)(t.j8w,{onClick:()=>x(!0),addable:!0,"data-testid":"taxonomy-add-btn","aria-label":"Add category"})]}),_&&(0,i.jsxs)(t.j8w,{onClick:()=>x(!0),color:"white","data-testid":"classification-".concat(m),hasSparkle:!0,children:[h(m),(0,i.jsx)(t.PJP.I8b,{size:10})]}),g&&(0,i.jsx)(t.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,i.jsx)(r.Z,{selectedTaxonomies:p,onChange:e=>{x(!1),y(e)},onBlur:()=>x(!1),open:!0})})]})}},79947:function(e,s,a){var i=a(24246),t=a(13577);s.Z=e=>{let{type:s}=e;return(0,i.jsx)(t.kCb,{align:"center",h:"full",children:!!s&&(0,i.jsx)(t.j8w,{children:s})})}}}]);
|