Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o
## [2.81.0](https://github.com/ethyca/fides/compare/2.80.1..2.81.0)

### Added
- Enabled LLM classifier toggle for Okta infrastructure monitors [#7641](https://github.com/ethyca/fides/pull/7641)
- Added questionnaire_tone_prompt column to privacy assessment config [#7563](https://github.com/ethyca/fides/pull/7563) https://github.com/ethyca/fides/labels/db-migration
- Chromatic builds for fidesui [#7485](https://github.com/ethyca/fides/pull/7485)
- Okta integration logo in action center [#7597](https://github.com/ethyca/fides/pull/7597)
Expand Down Expand Up @@ -81,6 +82,9 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o
- Replaced Ant default icons with Carbon icons in Alert component [#7613](https://github.com/ethyca/fides/pull/7613)
- Migrated Organization encrypted columns from pgcrypto to AES-GCM [#7554](https://github.com/ethyca/fides/pull/7554) https://github.com/ethyca/fides/labels/db-migration
- Refined chart components with animation state management and dark theme card config [#7537](https://github.com/ethyca/fides/pull/7537)
- Changed span to div in ExperienceDescription to expand the set of supported HTML tags in experience descriptions [#7502](https://github.com/ethyca/fides/pull/7502)
- Un-deprecated GET /system/{fides_key}/connection endpoint [#7668](https://github.com/ethyca/fides/pull/7668)
- Okta ux refactor [#7596](https://github.com/ethyca/fides/pull/7596)

### Developer Experience
- Added Carbon icon defaults for Ant Modal imperative API methods [#7569](https://github.com/ethyca/fides/pull/7569)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,19 +502,19 @@ describe("Action center infrastructure systems", () => {
cy.contains("button", "Actions").should("not.be.disabled");
});

it("should show Add and Ignore actions on non-ignored tab", () => {
it("should show Approve and Ignore actions on non-ignored tab", () => {
cy.visit(`${ACTION_CENTER_ROUTE}/infrastructure/${monitorId}`);
cy.wait("@getInfrastructureSystems");

cy.get('input[type="checkbox"]').eq(1).check();
cy.contains("button", "Actions").click();

cy.contains("Add").should("exist");
cy.contains("Approve").should("exist");
cy.contains("Ignore").should("exist");
cy.contains("Restore").should("not.exist");
});

it("should show Add and Restore actions when filtering for ignored systems", () => {
it("should show Approve and Restore actions when filtering for ignored systems", () => {
stubInfrastructureSystems({
fixture:
"detection-discovery/results/infrastructure-systems-ignored-tab.json",
Expand All @@ -530,20 +530,20 @@ describe("Action center infrastructure systems", () => {
cy.get('input[type="checkbox"]').eq(1).check();
cy.contains("button", "Actions").click();

cy.get(".ant-dropdown-menu-item").contains("Add").should("exist");
cy.get(".ant-dropdown-menu-item").contains("Approve").should("exist");
cy.get(".ant-dropdown-menu-item").contains("Restore").should("exist");
cy.get(".ant-dropdown-menu-item")
.contains("Ignore")
.should("not.exist");
});

it("should perform bulk Add action with explicit selection", () => {
it("should perform bulk Approve action with explicit selection", () => {
cy.visit(`${ACTION_CENTER_ROUTE}/infrastructure/${monitorId}`);
cy.wait("@getInfrastructureSystems");

cy.get('input[type="checkbox"]').eq(1).check();
cy.contains("button", "Actions").click();
cy.contains("Add").click();
cy.contains("Approve").click();

cy.wait("@bulkPromoteInfrastructureSystems").then((interception) => {
expect(interception.request.body).to.be.an("array");
Expand Down Expand Up @@ -596,7 +596,7 @@ describe("Action center infrastructure systems", () => {
cy.contains("selected").should("not.exist");
});

it("should perform bulk Add action with select all mode", () => {
it("should perform bulk Approve action with select all mode", () => {
stubInfrastructureSystems({
fixture:
"detection-discovery/results/infrastructure-systems-large-dataset.json",
Expand All @@ -607,7 +607,7 @@ describe("Action center infrastructure systems", () => {

cy.contains("Select all").click();
cy.contains("button", "Actions").click();
cy.contains("Add").click();
cy.contains("Approve").click();

cy.wait("@bulkPromoteInfrastructureSystems").then((interception) => {
expect(interception.request.body).to.have.property("filters");
Expand All @@ -621,7 +621,7 @@ describe("Action center infrastructure systems", () => {

cy.get('input[type="checkbox"]').eq(1).check();
cy.contains("button", "Actions").click();
cy.contains("Add").click();
cy.contains("Approve").click();

cy.contains("button", "Actions").should("be.disabled");
});
Expand All @@ -639,7 +639,7 @@ describe("Action center infrastructure systems", () => {
cy.get('input[type="checkbox"]').eq(1).uncheck();

cy.contains("button", "Actions").click();
cy.contains("Add").click();
cy.contains("Approve").click();

cy.wait("@bulkPromoteInfrastructureSystems").then((interception) => {
expect(interception.request.body).to.have.property("exclude_urns");
Expand Down
2 changes: 1 addition & 1 deletion clients/admin-ui/src/features/common/nav/nav-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const NAV_CONFIG: NavConfigGroup[] = [
{
title: "Policies",
path: routes.POLICIES_ROUTE,
requiresFlag: "alphaPolicies",
requiresFlag: "policies",
scopes: [ScopeRegistryEnum.POLICY_READ],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface InfrastructureSystemActionsCellProps {
allowIgnore?: boolean;
allowRestore?: boolean;
activeTab?: ActionCenterTabHash | null;
addIcon?: React.ReactNode;
approveIcon?: React.ReactNode;
ignoreIcon?: React.ReactNode;
onPromoteSuccess?: () => void;
}
Expand All @@ -33,7 +33,7 @@ export const InfrastructureSystemActionsCell = ({
allowIgnore,
allowRestore,
activeTab,
addIcon = <Icons.Checkmark />,
approveIcon = <Icons.Checkmark />,
ignoreIcon = <Icons.ViewOff />,
onPromoteSuccess,
}: InfrastructureSystemActionsCellProps) => {
Expand All @@ -52,7 +52,7 @@ export const InfrastructureSystemActionsCell = ({

const messageApi = useMessage();

const handleAdd = async () => {
const handleApprove = async () => {
if (!system.urn) {
messageApi.error("Cannot promote: system URN is missing");
return;
Expand Down Expand Up @@ -125,20 +125,20 @@ export const InfrastructureSystemActionsCell = ({

const getActionTooltip = (
action:
| InfrastructureSystemBulkActionType.ADD
| InfrastructureSystemBulkActionType.APPROVE
| InfrastructureSystemBulkActionType.RESTORE,
) => {
const isAdd = action === InfrastructureSystemBulkActionType.ADD;
const isApprove = action === InfrastructureSystemBulkActionType.APPROVE;
if (!system.urn) {
return `This system cannot be ${isAdd ? "promoted" : "restored"}: URN is missing.`;
return `This system cannot be ${isApprove ? "promoted" : "restored"}: URN is missing.`;
}
if (isAdd && isIgnored) {
if (isApprove && isIgnored) {
return "Restore systems before adding to the inventory";
}
if (!isAdd && !isIgnored) {
if (!isApprove && !isIgnored) {
return "You can only restore ignored systems";
}
return isAdd ? "Add" : "Restore";
return isApprove ? "Approve" : "Restore";
};

return (
Expand Down Expand Up @@ -174,17 +174,19 @@ export const InfrastructureSystemActionsCell = ({
</Tooltip>
)}

<Tooltip title={getActionTooltip(InfrastructureSystemBulkActionType.ADD)}>
<Tooltip
title={getActionTooltip(InfrastructureSystemBulkActionType.APPROVE)}
>
<Button
data-testid="add-btn"
data-testid="approve-btn"
size="small"
onClick={handleAdd}
onClick={handleApprove}
disabled={!system.urn || isIgnored || isActionInProgress}
loading={isPromoting}
icon={addIcon}
aria-label="Add"
icon={approveIcon}
aria-label="Approve"
>
{!addIcon && "Add"}
{!approveIcon && "Approve"}
</Button>
</Tooltip>
</Space>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,34 +153,37 @@ export const InfrastructureSystemListItem = ({
</Flex>
}
description={
<InfrastructureClassificationSelect
mode="multiple"
value={item.preferred_data_uses ?? []}
urn={itemKey}
tagRender={(props) => {
// Show sparkle icon if the data use was auto-detected (in data_uses)
// and not manually assigned (not in user_assigned_data_uses)
const isAutoDetectedFromCompass = item.data_uses?.includes(
props.value as string,
);
<>
<Text>{item.description}</Text>
<InfrastructureClassificationSelect
mode="multiple"
value={item.preferred_data_uses ?? []}
urn={itemKey}
tagRender={(props) => {
// Show sparkle icon if the data use was auto-detected (in data_uses)
// and not manually assigned (not in user_assigned_data_uses)
const isAutoDetectedFromCompass = item.data_uses?.includes(
props.value as string,
);

const handleClose = () => {
const newDataUses =
item.preferred_data_uses?.filter(
(dataUse) => dataUse !== props.value,
) ?? [];
handleUpdateDataUses(newDataUses);
};
const handleClose = () => {
const newDataUses =
item.preferred_data_uses?.filter(
(dataUse) => dataUse !== props.value,
) ?? [];
handleUpdateDataUses(newDataUses);
};

return tagRender({
...props,
isFromClassifier: isAutoDetectedFromCompass,
onClose: handleClose,
});
}}
onSelectDataUse={handleSelectDataUse}
disabled={dataUsesDisabled}
/>
return tagRender({
...props,
isFromClassifier: isAutoDetectedFromCompass,
onClose: handleClose,
});
}}
onSelectDataUse={handleSelectDataUse}
disabled={dataUsesDisabled}
/>
</>
}
/>
</List.Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export enum ConfidenceLevelLabel {
}

export enum InfrastructureSystemBulkActionType {
ADD = "add",
APPROVE = "approve",
IGNORE = "ignore",
RESTORE = "restore",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const useInfrastructureSystemsBulkActions = ({

count = urns.length;

if (action === InfrastructureSystemBulkActionType.ADD) {
if (action === InfrastructureSystemBulkActionType.APPROVE) {
result = await bulkPromoteIdentityProviderMonitorResultsMutation({
monitor_config_key: monitorId,
urns,
Expand Down Expand Up @@ -129,7 +129,7 @@ export const useInfrastructureSystemsBulkActions = ({
// Use a placeholder that will be updated from the response
count = 0;

if (action === InfrastructureSystemBulkActionType.ADD) {
if (action === InfrastructureSystemBulkActionType.APPROVE) {
result = await bulkPromoteIdentityProviderMonitorResultsMutation({
monitor_config_key: monitorId,
bulkSelection: bulkSelectionPayload,
Expand Down Expand Up @@ -172,7 +172,7 @@ export const useInfrastructureSystemsBulkActions = ({
finalCount = 0;
}

if (action === InfrastructureSystemBulkActionType.ADD) {
if (action === InfrastructureSystemBulkActionType.APPROVE) {
successMessage = `${finalCount} system${finalCount > 1 ? "s" : ""} ${finalCount > 1 ? "have" : "has"} been promoted to the system inventory.`;
} else if (action === InfrastructureSystemBulkActionType.IGNORE) {
successMessage = `${finalCount} system${finalCount > 1 ? "s" : ""} ${finalCount > 1 ? "have" : "has"} been ignored.`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
Alert,
Button,
Checkbox,
Dropdown,
Expand Down Expand Up @@ -146,6 +147,12 @@ export const DiscoveredInfrastructureSystemsTable = ({

return (
<Flex vertical gap="middle" className="h-full overflow-hidden">
<Alert
showIcon
message="Fides detected the following systems"
description="Some may not yet be in your inventory. Review each system's detected data use — approve to add it to your inventory, or ignore if it's not relevant."
closable
/>
<Flex justify="space-between" gap="middle">
<Flex gap="small">
<DebouncedSearchInput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { DiffStatus } from "~/types/api";

import { InfrastructureSystemBulkActionType } from "../constants";

const { APPROVE, RESTORE, IGNORE } = InfrastructureSystemBulkActionType;

interface GetBulkActionsMenuItemsConfig {
isIgnoredTab: boolean;
allowIgnore: boolean;
Expand All @@ -16,44 +18,34 @@ export const getBulkActionsMenuItems = ({
allowIgnore,
isBulkActionInProgress,
onBulkAction,
}: GetBulkActionsMenuItemsConfig): MenuProps["items"] => {
if (isIgnoredTab) {
return [
{
key: InfrastructureSystemBulkActionType.ADD,
label: "Add",
onClick: () => onBulkAction(InfrastructureSystemBulkActionType.ADD),
disabled: isBulkActionInProgress,
},
{
key: InfrastructureSystemBulkActionType.RESTORE,
label: "Restore",
onClick: () => onBulkAction(InfrastructureSystemBulkActionType.RESTORE),
disabled: isBulkActionInProgress,
},
];
}

return [
{
key: InfrastructureSystemBulkActionType.ADD,
label: "Add",
onClick: () => onBulkAction(InfrastructureSystemBulkActionType.ADD),
disabled: isBulkActionInProgress,
},
...(allowIgnore
? [
{
key: InfrastructureSystemBulkActionType.IGNORE,
label: "Ignore",
onClick: () =>
onBulkAction(InfrastructureSystemBulkActionType.IGNORE),
disabled: isBulkActionInProgress,
},
]
: []),
];
};
}: GetBulkActionsMenuItemsConfig): MenuProps["items"] => [
{
key: APPROVE,
label: "Approve",
onClick: () => onBulkAction(APPROVE),
disabled: isBulkActionInProgress,
},
...(isIgnoredTab
? [
{
key: RESTORE,
label: "Restore",
onClick: () => onBulkAction(RESTORE),
disabled: isBulkActionInProgress,
},
]
: []),
...(allowIgnore
? [
{
key: IGNORE,
label: "Ignore",
onClick: () => onBulkAction(IGNORE),
disabled: isBulkActionInProgress,
},
]
: []),
];

export const shouldAllowIgnore = (
activeDiffStatusFilters: DiffStatus[] | DiffStatus | undefined,
Expand Down
Loading
Loading