Skip to content

Commit

Permalink
LA-171: adds column for action type in event logs (#5546)
Browse files Browse the repository at this point in the history
  • Loading branch information
eastandwestwind authored Dec 2, 2024
1 parent 6c3b1ea commit a601fbe
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ The types of changes are:

## [Unreleased](https://github.com/ethyca/fides/compare/2.50.0...main)

### Added
- Added new column for Action Type in privacy request event logs [#5546](https://github.com/ethyca/fides/pull/5546)

### Changed
- Adding hashes to system tab URLs [#5535](https://github.com/ethyca/fides/pull/5535)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,28 @@ import {
} from "fidesui";
import { ExecutionLog, ExecutionLogStatus } from "privacy-requests/types";

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

type EventDetailsProps = {
eventLogs: ExecutionLog[];
openErrorPanel: (message: string) => void;
};

const actionTypeToLabel = (actionType: string) => {
switch (actionType) {
case ActionType.ACCESS:
return "Data Retrieval";
case ActionType.ERASURE:
return "Data Deletion";
case ActionType.CONSENT:
return "Consent";
case ActionType.UPDATE:
return "Data Update";
default:
return actionType;
}
};

const EventLog = ({ eventLogs, openErrorPanel }: EventDetailsProps) => {
const tableItems = eventLogs?.map((detail) => (
<Tr
Expand All @@ -40,6 +57,11 @@ const EventLog = ({ eventLogs, openErrorPanel }: EventDetailsProps) => {
{formatDate(detail.updated_at)}
</Text>
</Td>
<Td>
<Text color="gray.600" fontSize="xs" lineHeight="4" fontWeight="medium">
{actionTypeToLabel(detail.action_type)}
</Text>
</Td>
<Td>
<Text color="gray.600" fontSize="xs" lineHeight="4" fontWeight="medium">
{detail.status}
Expand Down Expand Up @@ -79,6 +101,16 @@ const EventLog = ({ eventLogs, openErrorPanel }: EventDetailsProps) => {
Time
</Text>
</Th>
<Th>
<Text
color="black"
fontSize="xs"
lineHeight="4"
fontWeight="medium"
>
Action Type
</Text>
</Th>
<Th>
<Text
color="black"
Expand Down

0 comments on commit a601fbe

Please sign in to comment.