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:
parent
41203340fd
commit
d1959dd0e2
@ -75,6 +75,7 @@ export const ProjectFeatureToggles = ({
|
|||||||
tag: tableState.tag,
|
tag: tableState.tag,
|
||||||
createdAt: tableState.createdAt,
|
createdAt: tableState.createdAt,
|
||||||
type: tableState.type,
|
type: tableState.type,
|
||||||
|
state: tableState.state,
|
||||||
...(flagCreatorEnabled ? { createdBy: tableState.createdBy } : {}),
|
...(flagCreatorEnabled ? { createdBy: tableState.createdBy } : {}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,7 +35,26 @@ export const ProjectOverviewFilters: VFC<IProjectOverviewFilters> = ({
|
|||||||
value: String(creator.id),
|
value: String(creator.id),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
const stateOptions = [
|
||||||
|
{
|
||||||
|
label: 'Active',
|
||||||
|
value: 'active',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Stale',
|
||||||
|
value: 'stale',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
const availableFilters: IFilterItem[] = [
|
const availableFilters: IFilterItem[] = [
|
||||||
|
{
|
||||||
|
label: 'State',
|
||||||
|
icon: 'hexagon',
|
||||||
|
options: stateOptions,
|
||||||
|
filterKey: 'state',
|
||||||
|
singularOperators: ['IS', 'IS_NOT'],
|
||||||
|
pluralOperators: ['IS_ANY_OF', 'IS_NONE_OF'],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'Tags',
|
label: 'Tags',
|
||||||
icon: 'label',
|
icon: 'label',
|
||||||
|
@ -37,6 +37,7 @@ export const useProjectFeatureSearch = (
|
|||||||
sortOrder: withDefault(StringParam, 'desc'),
|
sortOrder: withDefault(StringParam, 'desc'),
|
||||||
columns: ArrayParam,
|
columns: ArrayParam,
|
||||||
tag: FilterItemParam,
|
tag: FilterItemParam,
|
||||||
|
state: FilterItemParam,
|
||||||
createdAt: FilterItemParam,
|
createdAt: FilterItemParam,
|
||||||
type: FilterItemParam,
|
type: FilterItemParam,
|
||||||
...(flagCreatorEnabled ? { createdBy: FilterItemParam } : {}),
|
...(flagCreatorEnabled ? { createdBy: FilterItemParam } : {}),
|
||||||
|
@ -97,7 +97,9 @@ export const ProjectHealth: FC<{ health: ProjectInsightsSchemaHealth }> = ({
|
|||||||
<StatusWithDot>
|
<StatusWithDot>
|
||||||
<Dot color={theme.palette.error.border} />
|
<Dot color={theme.palette.error.border} />
|
||||||
<Box sx={{ fontWeight: 'bold' }}>Stale</Box>
|
<Box sx={{ fontWeight: 'bold' }}>Stale</Box>
|
||||||
<Link to={`/projects/${projectId}`}>
|
<Link
|
||||||
|
to={`/projects/${projectId}?state=IS%3Astale`}
|
||||||
|
>
|
||||||
(view flags)
|
(view flags)
|
||||||
</Link>
|
</Link>
|
||||||
</StatusWithDot>
|
</StatusWithDot>
|
||||||
|
Loading…
Reference in New Issue
Block a user