mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 21:11:53 +00:00
fix(scans): filters and sorting for scan table (#6713)
This commit is contained in:
@@ -3,7 +3,7 @@ import { Suspense } from "react";
|
||||
|
||||
import { getProvider, getProviders } from "@/actions/providers";
|
||||
import { getScans } from "@/actions/scans";
|
||||
import { filterScans } from "@/components/filters";
|
||||
import { FilterControls, filterScans } from "@/components/filters";
|
||||
import {
|
||||
ButtonRefreshData,
|
||||
NoProvidersAdded,
|
||||
@@ -83,6 +83,8 @@ export default async function Scans({
|
||||
<div className="col-span-12">
|
||||
<div className="flex flex-row items-center justify-between">
|
||||
<DataTableFilterCustom filters={filterScans || []} />
|
||||
<Spacer x={4} />
|
||||
<FilterControls />
|
||||
<ButtonRefreshData
|
||||
onPress={async () => {
|
||||
"use server";
|
||||
|
||||
@@ -14,8 +14,8 @@ export const filterScans = [
|
||||
values: ["aws", "azure", "gcp", "kubernetes"],
|
||||
},
|
||||
{
|
||||
key: "state",
|
||||
labelCheckboxGroup: "State",
|
||||
key: "state__in",
|
||||
labelCheckboxGroup: "Status",
|
||||
values: [
|
||||
"available",
|
||||
"scheduled",
|
||||
|
||||
@@ -81,9 +81,7 @@ export const ColumnGetScans: ColumnDef<ScanProps>[] = [
|
||||
},
|
||||
{
|
||||
accessorKey: "status",
|
||||
header: ({ column }) => (
|
||||
<DataTableColumnHeader column={column} title={"Status"} param="state" />
|
||||
),
|
||||
header: "Status",
|
||||
cell: ({ row }) => {
|
||||
const {
|
||||
attributes: { state },
|
||||
@@ -126,13 +124,7 @@ export const ColumnGetScans: ColumnDef<ScanProps>[] = [
|
||||
},
|
||||
{
|
||||
accessorKey: "next_scan_at",
|
||||
header: ({ column }) => (
|
||||
<DataTableColumnHeader
|
||||
column={column}
|
||||
title={"Next scan"}
|
||||
param="next_scan_at"
|
||||
/>
|
||||
),
|
||||
header: "Scheduled at",
|
||||
cell: ({ row }) => {
|
||||
const {
|
||||
attributes: { next_scan_at },
|
||||
|
||||
Reference in New Issue
Block a user