-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add status field to D&D tables (#5141)
- Loading branch information
Showing
15 changed files
with
240 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
clients/admin-ui/src/features/data-discovery-and-detection/IndicatorLegend.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { | ||
Box, | ||
Popover, | ||
PopoverArrow, | ||
PopoverBody, | ||
PopoverContent, | ||
PopoverHeader, | ||
PopoverTrigger, | ||
QuestionIcon, | ||
SimpleGrid, | ||
} from "fidesui"; | ||
|
||
import { | ||
AdditionIndicator, | ||
ChangeIndicator, | ||
ClassificationIndicator, | ||
MonitoredIndicator, | ||
MutedIndicator, | ||
RemovalIndicator, | ||
} from "~/features/data-discovery-and-detection/statusIndicators"; | ||
|
||
const IconLegendTooltip = () => ( | ||
<Popover isLazy trigger="hover"> | ||
<PopoverTrigger> | ||
<QuestionIcon color="gray.400" /> | ||
</PopoverTrigger> | ||
<PopoverContent | ||
bgColor="gray.800" | ||
color="white" | ||
fontSize="sm" | ||
w="auto" | ||
border="none" | ||
> | ||
<PopoverHeader fontWeight="semibold" border="none" pb={0}> | ||
Activity legend: | ||
</PopoverHeader> | ||
<PopoverArrow bgColor="gray.800" /> | ||
<PopoverBody border="none"> | ||
<SimpleGrid columns={2} spacing={2}> | ||
<Box> | ||
<ChangeIndicator /> Change detected | ||
</Box> | ||
<Box> | ||
<ClassificationIndicator /> Data labeled | ||
</Box> | ||
<Box> | ||
<MonitoredIndicator /> Monitoring | ||
</Box> | ||
<Box> | ||
<AdditionIndicator /> Addition detected | ||
</Box> | ||
<Box> | ||
<MutedIndicator /> Unmonitored | ||
</Box> | ||
<Box> | ||
<RemovalIndicator /> Removal detected | ||
</Box> | ||
</SimpleGrid> | ||
</PopoverBody> | ||
</PopoverContent> | ||
</Popover> | ||
); | ||
|
||
export default IconLegendTooltip; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
clients/admin-ui/src/features/data-discovery-and-detection/statusIndicators.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { CircleIcon } from "~/features/common/Icon/CircleIcon"; | ||
import { RightDownArrowIcon } from "~/features/common/Icon/RightDownArrowIcon"; | ||
import { RightUpArrowIcon } from "~/features/common/Icon/RightUpArrowIcon"; | ||
import { TagIcon } from "~/features/common/Icon/TagIcon"; | ||
import { ResourceChangeType } from "~/features/data-discovery-and-detection/types/ResourceChangeType"; | ||
|
||
export const AdditionIndicator = () => ( | ||
<RightUpArrowIcon | ||
color="green.400" | ||
boxSize={2} | ||
mr={2} | ||
data-testid="add-icon" | ||
/> | ||
); | ||
|
||
export const RemovalIndicator = () => ( | ||
<RightDownArrowIcon | ||
color="red.400" | ||
boxSize={2} | ||
mr={2} | ||
data-testid="remove-icon" | ||
/> | ||
); | ||
|
||
export const ClassificationIndicator = () => ( | ||
<TagIcon color="orange.400" boxSize={3} mr={1} data-testid="classify-icon" /> | ||
); | ||
|
||
export const ChangeIndicator = () => ( | ||
<CircleIcon color="blue.400" boxSize={2} mr={2} data-testid="change-icon" /> | ||
); | ||
|
||
export const MonitoredIndicator = () => ( | ||
<CircleIcon | ||
color="green.400" | ||
boxSize={2} | ||
mr={2} | ||
data-testid="monitored-icon" | ||
/> | ||
); | ||
|
||
export const MutedIndicator = () => ( | ||
<CircleIcon color="red.400" boxSize={2} mr={2} data-testid="muted-icon" /> | ||
); | ||
|
||
export const STATUS_INDICATOR_MAP: Record< | ||
ResourceChangeType, | ||
JSX.Element | null | ||
> = { | ||
[ResourceChangeType.ADDITION]: <AdditionIndicator />, | ||
[ResourceChangeType.REMOVAL]: <RemovalIndicator />, | ||
[ResourceChangeType.CLASSIFICATION]: <ClassificationIndicator />, | ||
[ResourceChangeType.CHANGE]: <ChangeIndicator />, | ||
[ResourceChangeType.MONITORED]: <MonitoredIndicator />, | ||
[ResourceChangeType.MUTED]: <MutedIndicator />, | ||
[ResourceChangeType.NONE]: null, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.