1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

feat: filter project flags by state (#7618)

This commit is contained in:
Mateusz Kwasniewski 2024-07-18 14:52:27 +02:00 committed by GitHub
parent 41203340fd
commit d1959dd0e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 24 additions and 1 deletions

View File

@ -75,6 +75,7 @@ export const ProjectFeatureToggles = ({
tag: tableState.tag,
createdAt: tableState.createdAt,
type: tableState.type,
state: tableState.state,
...(flagCreatorEnabled ? { createdBy: tableState.createdBy } : {}),
};

View File

@ -35,7 +35,26 @@ export const ProjectOverviewFilters: VFC<IProjectOverviewFilters> = ({
value: String(creator.id),
}));
const stateOptions = [
{
label: 'Active',
value: 'active',
},
{
label: 'Stale',
value: 'stale',
},
];
const availableFilters: IFilterItem[] = [
{
label: 'State',
icon: 'hexagon',
options: stateOptions,
filterKey: 'state',
singularOperators: ['IS', 'IS_NOT'],
pluralOperators: ['IS_ANY_OF', 'IS_NONE_OF'],
},
{
label: 'Tags',
icon: 'label',

View File

@ -37,6 +37,7 @@ export const useProjectFeatureSearch = (
sortOrder: withDefault(StringParam, 'desc'),
columns: ArrayParam,
tag: FilterItemParam,
state: FilterItemParam,
createdAt: FilterItemParam,
type: FilterItemParam,
...(flagCreatorEnabled ? { createdBy: FilterItemParam } : {}),

View File

@ -97,7 +97,9 @@ export const ProjectHealth: FC<{ health: ProjectInsightsSchemaHealth }> = ({
<StatusWithDot>
<Dot color={theme.palette.error.border} />
<Box sx={{ fontWeight: 'bold' }}>Stale</Box>
<Link to={`/projects/${projectId}`}>
<Link
to={`/projects/${projectId}?state=IS%3Astale`}
>
(view flags)
</Link>
</StatusWithDot>