mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 20:42:02 +00:00
fix(findings): order findings by inserted_at DESC (#6782)
This commit is contained in:
@@ -26,11 +26,10 @@ export default async function Findings({
|
||||
searchParams: SearchParamsProps;
|
||||
}) {
|
||||
const searchParamsKey = JSON.stringify(searchParams || {});
|
||||
const defaultSort = "severity,status";
|
||||
const sort = searchParams.sort?.toString() || defaultSort;
|
||||
const sort = searchParams.sort?.toString();
|
||||
|
||||
// Make sure the sort is correctly encoded
|
||||
const encodedSort = sort.replace(/^\+/, "");
|
||||
const encodedSort = sort?.replace(/^\+/, "");
|
||||
|
||||
// Extract all filter parameters and combine with default filters
|
||||
const defaultFilters = {
|
||||
@@ -137,7 +136,7 @@ const SSRDataTable = async ({
|
||||
searchParams: SearchParamsProps;
|
||||
}) => {
|
||||
const page = parseInt(searchParams.page?.toString() || "1", 10);
|
||||
const defaultSort = "severity,status";
|
||||
const defaultSort = "severity,status,-inserted_at";
|
||||
const sort = searchParams.sort?.toString() || defaultSort;
|
||||
|
||||
// Make sure the sort is correctly encoded
|
||||
|
||||
@@ -129,7 +129,7 @@ const SSRFindingsBySeverity = async ({
|
||||
|
||||
const SSRDataNewFindingsTable = async () => {
|
||||
const page = 1;
|
||||
const sort = "severity,updated_at";
|
||||
const sort = "severity,-inserted_at";
|
||||
|
||||
const defaultFilters = {
|
||||
"filter[status__in]": "FAIL",
|
||||
|
||||
Reference in New Issue
Block a user