mirror of
https://github.com/rocky-linux/peridot.git
synced 2025-01-07 09:30:56 +00:00
Add product picker filter
This commit is contained in:
parent
c69be4edc5
commit
6cfe9a7b44
1 changed files with 22 additions and 0 deletions
|
@ -106,6 +106,7 @@ export const Overview = () => {
|
||||||
const [filtersKeyword, setFiltersKeyword] = useState<string>();
|
const [filtersKeyword, setFiltersKeyword] = useState<string>();
|
||||||
const [filterBefore, setFilterBefore] = useState<Date>();
|
const [filterBefore, setFilterBefore] = useState<Date>();
|
||||||
const [filterAfter, setFilterAfter] = useState<Date>();
|
const [filterAfter, setFilterAfter] = useState<Date>();
|
||||||
|
const [filterProduct, setFilterProduct] = useState<string>('');
|
||||||
const [filtersType, setFiltersType] =
|
const [filtersType, setFiltersType] =
|
||||||
useState<keyof typeof ListAdvisoriesFiltersTypeEnum>();
|
useState<keyof typeof ListAdvisoriesFiltersTypeEnum>();
|
||||||
const [filtersSeverity, setFiltersSeverity] =
|
const [filtersSeverity, setFiltersSeverity] =
|
||||||
|
@ -121,6 +122,7 @@ export const Overview = () => {
|
||||||
filtersKeyword,
|
filtersKeyword,
|
||||||
filtersBefore: filterBefore,
|
filtersBefore: filterBefore,
|
||||||
filtersAfter: filterAfter,
|
filtersAfter: filterAfter,
|
||||||
|
filtersProduct: filterProduct,
|
||||||
filtersSeverity: filtersSeverity
|
filtersSeverity: filtersSeverity
|
||||||
? ListAdvisoriesFiltersSeverityEnum[filtersSeverity]
|
? ListAdvisoriesFiltersSeverityEnum[filtersSeverity]
|
||||||
: undefined,
|
: undefined,
|
||||||
|
@ -157,6 +159,7 @@ export const Overview = () => {
|
||||||
filterBefore,
|
filterBefore,
|
||||||
filterAfter,
|
filterAfter,
|
||||||
filtersSeverity,
|
filtersSeverity,
|
||||||
|
filterProduct,
|
||||||
filtersType,
|
filtersType,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -264,6 +267,25 @@ export const Overview = () => {
|
||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
)}
|
)}
|
||||||
|
<FormControl width="180px" flexShrink={0} flexGrow={1}>
|
||||||
|
<FormLabel fontSize="sm">Product</FormLabel>
|
||||||
|
<Select
|
||||||
|
aria-label="Product"
|
||||||
|
placeholder="All"
|
||||||
|
variant="filled"
|
||||||
|
background={inputBackground}
|
||||||
|
borderRadius="0"
|
||||||
|
value={filterProduct}
|
||||||
|
onChange={(e) => {
|
||||||
|
console.log('On change', e.currentTarget.value);
|
||||||
|
setFilterProduct(e.currentTarget.value as string);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{['Rocky Linux 8', 'Rocky Linux 9'].map((s) => (
|
||||||
|
<option key={s} value={s}>{s}</option>
|
||||||
|
))}
|
||||||
|
</Select>
|
||||||
|
</FormControl>
|
||||||
</HStack>
|
</HStack>
|
||||||
<HStack>
|
<HStack>
|
||||||
<FormControl width="180px" flexShrink={0} flexGrow={1}>
|
<FormControl width="180px" flexShrink={0} flexGrow={1}>
|
||||||
|
|
Loading…
Reference in a new issue