Skip to content

Commit

Permalink
Merge branch 'main' into jpople/hj-390/2-button-2-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpople committed Jan 29, 2025
2 parents dc5eefe + 5cd195f commit aa23ac9
Show file tree
Hide file tree
Showing 67 changed files with 1,399 additions and 413 deletions.
2 changes: 2 additions & 0 deletions .fides/db_dataset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2227,6 +2227,8 @@ dataset:
data_categories: [system]
- name: user_assigned_data_categories
data_categories: [system]
- name: data_uses
data_categories: [system]
- name: fides_user_invite
fields:
- name: created_at
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/cypress_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,9 @@ jobs:

- name: Teardown
run: nox -s teardown

- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos-cypress-e2e
path: /home/runner/work/fides/fides/clients/cypress-e2e/cypress/videos/*.mp4
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o

### Changed
- Updated UI colors to new brand. Update logo, homepage cards. [#5668](https://github.com/ethyca/fides/pull/5668)
- Privacy request status tags colors have been updated [#5699](https://github.com/ethyca/fides/pull/5699)
- The privacy declarations for a system are now sorted alphabetically by name. [#5683](https://github.com/ethyca/fides/pull/5683)
- Upgraded GPP library to `3.1.5` and added support for all available state sections (ustx, usde, usia, etc.) [#5696](https://github.com/ethyca/fides/pull/5696)
- Updating DSR execution to allow collections to be unreachable when they don't contain policy-relevant data categories [#5689](https://github.com/ethyca/fides/pull/5689)

### Developer Experience
- Migrated radio buttons and groups to Ant Design [#5681](https://github.com/ethyca/fides/pull/5681)

### Added
- Migration to add the `data_uses` column to `stagedresource` table, prereqs for Data Catalog work in Fidesplus [#5600](https://github.com/ethyca/fides/pull/5600/) https://github.com/ethyca/fides/labels/db-migration

### Fixed
- Updating mongodb connectors so it can support usernames and password with URL encoded characters [#5682](https://github.com/ethyca/fides/pull/5682)
- After creating a new system, the url is now updated correctly to the new system edit page [#5701](https://github.com/ethyca/fides/pull/5701)
- Visual fixes for table header buttons [#5693](https://github.com/ethyca/fides/pull/5693)

## [2.53.0](https://github.com/ethyca/fides/compare/2.52.0...2.53.0)
Expand All @@ -53,6 +61,7 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o
- Fixed column ordering issue in the Data Map report [#5649](https://github.com/ethyca/fides/pull/5649)
- Fixed issue where the Data Map report filter dialog was missing an Accordion item label [#5649](https://github.com/ethyca/fides/pull/5649)
- Improved database session management for long running access request tasks [#5667](https://github.com/ethyca/fides/pull/5667)
- Ensured decode_password function properly handles plaintext but valid base64 passwords [#5698](https://github.com/ethyca/fides/pull/5698)

## [2.52.0](https://github.com/ethyca/fides/compare/2.51.2...2.52.0)

Expand Down
21 changes: 9 additions & 12 deletions clients/admin-ui/src/features/common/RequestStatusBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Badge, BadgeProps, Spinner } from "fidesui";
import { Badge, BadgeProps } from "fidesui";

import { PrivacyRequestStatus } from "~/types/api";

Expand All @@ -14,39 +14,39 @@ export const statusPropMap: {
label: "Completed",
},
awaiting_email_send: {
bg: "olive.100",
bg: "marble.100",
label: "Awaiting Email Send",
},
denied: {
bg: "error.100",
bg: "warn.100",
label: "Denied",
},
canceled: {
bg: "white.100",
bg: "marble.100",
label: "Canceled",
},
error: {
bg: "error.100",
label: "Error",
},
in_processing: {
bg: "nectar.100",
bg: "caution.100",
label: "In Progress",
},
paused: {
bg: "sandstone.100",
bg: "marble.100",
label: "Paused",
},
pending: {
bg: "alert.100",
bg: "info.100",
label: "New",
},
identity_unverified: {
bg: "error.100",
bg: "marble.100",
label: "Unverified",
},
requires_input: {
bg: "warn.100",
bg: "alert.100",
label: "Requires Input",
},
};
Expand All @@ -72,9 +72,6 @@ const RequestStatusBadge = ({ status }: RequestBadgeProps) => (
}}
>
{statusPropMap[status].label}
{status === PrivacyRequestStatus.IN_PROCESSING && (
<Spinner size="xs" color="white" ml={2} />
)}
</span>
</Badge>
);
Expand Down
14 changes: 2 additions & 12 deletions clients/admin-ui/src/features/common/RequestType.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Tag } from "fidesui";
import { Badge, Box } from "fidesui";
import { Rule } from "privacy-requests/types";
import React from "react";

Expand All @@ -25,17 +25,7 @@ export const getActionTypes = (rules: Rule[]): ActionType[] =>
const RequestType = ({ rules }: RequestTypeProps) => {
const tags = getActionTypes(rules)
.map((action) => capitalize(action))
.map((action_type) => (
<Tag
key={action_type}
color="white"
bg="primary.400"
fontWeight="medium"
fontSize="sm"
>
{action_type}
</Tag>
));
.map((action_type) => <Badge key={action_type}>{action_type}</Badge>);

return <Box>{tags}</Box>;
};
Expand Down
1 change: 1 addition & 0 deletions clients/admin-ui/src/features/common/api.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const baseApi = createApi({
"Notification",
"Organization",
"Plus",
"Policies",
"Privacy Experience Configs",
"Experience Config Translations",
"Privacy Notices",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const ClassificationCategoryBadge = ({
variant="taxonomy"
textTransform="none"
fontWeight="normal"
display="flex"
alignItems="center"
gap={1.5}
as={onClick ? "button" : undefined}
onClick={onClick}
_hover={onClick ? { borderColor: "primary.900" } : undefined}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ const ConnectorParametersForm = ({
disabled={!connection?.key}
loading={result.isLoading || result.isFetching}
onClick={handleTestConnectionClick}
data-testid="test-connection-button"
>
{testButtonLabel}
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,14 @@ export const datastoreConnectionApi = baseApi.injectEndpoints({
{
connection_key: string;
dataset_key: string;
input_data: Record<string, any>;
identities: Record<string, any>;
policy_key: string;
}
>({
query: (params) => ({
url: `${CONNECTION_ROUTE}/${params.connection_key}/dataset/${params.dataset_key}/test`,
method: "POST",
body: params.input_data,
body: { identities: params.identities, policy_key: params.policy_key },
}),
}),
getDatasetInputs: build.query<
Expand All @@ -406,12 +407,18 @@ export const datastoreConnectionApi = baseApi.injectEndpoints({
}),
getDatasetReachability: build.query<
{ reachable: boolean; details: string },
{ connectionKey: string; datasetKey: string }
{ connectionKey: string; datasetKey: string; policyKey?: string }
>({
query: ({ connectionKey, datasetKey }) => ({
url: `${CONNECTION_ROUTE}/${connectionKey}/dataset/${datasetKey}/reachability`,
method: "GET",
}),
query: ({ connectionKey, datasetKey, policyKey }) => {
const baseUrl = `${CONNECTION_ROUTE}/${connectionKey}/dataset/${datasetKey}/reachability`;
const queryString = policyKey ? `?policy_key=${policyKey}` : "";
const url = baseUrl + queryString;

return {
url,
method: "GET",
};
},
providesTags: () => ["Datastore Connection"],
}),
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ type TestConnectionMessageProps = {

const TestConnectionMessage = ({ status }: TestConnectionMessageProps) => (
<>
{status === "success" && <Text>Connection test was successful</Text>}
{status === "success" && (
<Text data-testid="toast-success-msg">
Connection test was successful
</Text>
)}
{status === "error" && (
<Text>Test failed: please check your connection info</Text>
<Text data-testid="toast-error-msg">
Test failed: please check your connection info
</Text>
)}
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ export const ConnectorParametersForm = ({
}
loading={isLoading || isFetching}
onClick={() => handleTestConnectionClick(props)}
data-testid="test-connection-button"
>
{testButtonLabel}
</Button>
Expand Down
14 changes: 14 additions & 0 deletions clients/admin-ui/src/features/policy/policy.slice.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { baseApi } from "~/features/common/api.slice";
import { Page_PolicyResponse_ } from "~/types/api";

// Policy API
const policyApi = baseApi.injectEndpoints({
endpoints: (build) => ({
getPolicies: build.query<Page_PolicyResponse_, void>({
query: () => ({ url: `/dsr/policy` }),
providesTags: () => ["Policies"],
}),
}),
});

export const { useGetPoliciesQuery } = policyApi;
19 changes: 5 additions & 14 deletions clients/admin-ui/src/features/privacy-requests/RequestDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Divider, Flex, Heading, HStack, Tag, Text } from "fidesui";
import { Badge, Box, Divider, Flex, Heading, HStack, Text } from "fidesui";

import ClipboardButton from "~/features/common/ClipboardButton";
import DaysLeftTag from "~/features/common/DaysLeftTag";
Expand Down Expand Up @@ -53,19 +53,12 @@ const RequestDetails = ({ subjectRequest }: RequestDetailsProps) => {
<ClipboardButton copyText={id} size="small" />
</Flex>
{hasPlus && subjectRequest.source && (
<Flex>
<Flex alignItems="center">
<Text mr={2} fontSize="sm" color="gray.900" fontWeight="500">
Source:
</Text>
<Box>
<Tag
color="white"
bg="primary.400"
fontWeight="medium"
fontSize="sm"
>
{subjectRequest.source}
</Tag>
<Badge>{subjectRequest.source}</Badge>
</Box>
</Flex>
)}
Expand All @@ -77,14 +70,12 @@ const RequestDetails = ({ subjectRequest }: RequestDetailsProps) => {
<RequestType rules={policy.rules} />
</Box>
</Flex>
<Flex>
<Flex alignItems="center">
<Text mr={2} fontSize="sm" color="gray.900" fontWeight="500">
Policy key:
</Text>
<Box>
<Tag color="white" bg="primary.400" fontWeight="medium" fontSize="sm">
{subjectRequest.policy.key}
</Tag>
<Badge>{subjectRequest.policy.key}</Badge>
</Box>
</Flex>
<Flex alignItems="center">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Divider, Flex, Heading, Tag, Text } from "fidesui";
import { Badge, Divider, Flex, Heading, Text } from "fidesui";

import { PrivacyRequestEntity } from "./types";

Expand Down Expand Up @@ -29,21 +29,14 @@ const SubjectIdentities = ({ subjectRequest }: SubjectIdentitiesProps) => {
{Object.entries(identity)
.filter(([, { value }]) => value !== null)
.map(([key, { value, label }]) => (
<Flex key={key} alignItems="flex-start">
<Text mb={4} mr={2} fontSize="sm" color="gray.900" fontWeight="500">
<Flex key={key} alignItems="center" mb={4}>
<Text mr={2} fontSize="sm" color="gray.900" fontWeight="500">
{label}:
</Text>
<Text color="gray.600" fontWeight="500" fontSize="sm" mr={2}>
{value || ""}
</Text>
<Tag
color="white"
bg="primary.400"
fontWeight="medium"
fontSize="sm"
>
{identityVerifiedAt ? "Verified" : "Unverified"}
</Tag>
<Badge>{identityVerifiedAt ? "Verified" : "Unverified"}</Badge>
</Flex>
))}
{customPrivacyRequestFields &&
Expand Down Expand Up @@ -77,14 +70,7 @@ const SubjectIdentities = ({ subjectRequest }: SubjectIdentitiesProps) => {
? item.value.join(", ")
: item.value}
</Text>
<Tag
color="white"
bg="primary.400"
fontWeight="medium"
fontSize="sm"
>
Unverified
</Tag>
<Badge>Unverified</Badge>
</Flex>
))}
</>
Expand Down
17 changes: 11 additions & 6 deletions clients/admin-ui/src/features/privacy-requests/cells.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,47 @@ export const statusPropMap: {
[key in PrivacyRequestStatus]: BadgeProps & { label: string };
} = {
approved: {
colorScheme: "green",
colorScheme: "success",
label: "Approved",
},
complete: {
label: "Completed",
colorScheme: "success",
},
awaiting_email_send: {
label: "Awaiting Email Send",
colorScheme: "marble",
},
denied: {
label: "Denied",
colorScheme: "warn",
},
canceled: {
label: "Canceled",
colorScheme: "marble",
},
error: {
colorScheme: "red",
label: "Error",
colorScheme: "error",
},
in_processing: {
colorScheme: "yellow",
label: "In Progress",
colorScheme: "caution",
},
paused: {
label: "Paused",
colorScheme: "marble",
},
pending: {
colorScheme: "blue",
label: "New",
colorScheme: "info",
},
identity_unverified: {
colorScheme: "red",
label: "Unverified",
colorScheme: "marble",
},
requires_input: {
colorScheme: "orange",
colorScheme: "alert",
label: "Requires Input",
},
};
Expand Down
Loading

0 comments on commit aa23ac9

Please sign in to comment.