mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 04:21:52 +00:00
chore: update FindingProps to the latest version
This commit is contained in:
@@ -4,21 +4,20 @@ import { ColumnDef } from "@tanstack/react-table";
|
||||
|
||||
import { DateWithTime } from "@/components/ui/entities";
|
||||
import { DataTableColumnHeader, StatusBadge } from "@/components/ui/table";
|
||||
import { FindingsProps } from "@/types";
|
||||
import { FindingProps } from "@/types";
|
||||
|
||||
import { DataTableRowActions } from "./data-table-row-actions";
|
||||
|
||||
const getFindingsData = (row: { original: FindingsProps }) => {
|
||||
const getFindingsData = (row: { original: FindingProps }) => {
|
||||
console.log(row.original);
|
||||
|
||||
return row.original;
|
||||
};
|
||||
|
||||
const getFindingsMetadata = (row: { original: FindingsProps }) => {
|
||||
return row.original.attributes.check_metadata.metadata;
|
||||
const getFindingsMetadata = (row: { original: FindingProps }) => {
|
||||
return row.original.attributes.check_metadata;
|
||||
};
|
||||
|
||||
export const ColumnFindings: ColumnDef<FindingsProps>[] = [
|
||||
export const ColumnFindings: ColumnDef<FindingProps>[] = [
|
||||
// {
|
||||
// header: " ",
|
||||
// cell: ({ row }) => <p className="text-medium">{row.index + 1}</p>,
|
||||
@@ -29,8 +28,8 @@ export const ColumnFindings: ColumnDef<FindingsProps>[] = [
|
||||
<DataTableColumnHeader column={column} title={"Check"} param="check" />
|
||||
),
|
||||
cell: ({ row }) => {
|
||||
const { CheckTitle } = getFindingsMetadata(row);
|
||||
return <p className="max-w-96 truncate text-medium">{CheckTitle}</p>;
|
||||
const { checktitle } = getFindingsMetadata(row);
|
||||
return <p className="max-w-96 truncate text-medium">{checktitle}</p>;
|
||||
},
|
||||
},
|
||||
// {
|
||||
@@ -79,8 +78,8 @@ export const ColumnFindings: ColumnDef<FindingsProps>[] = [
|
||||
/>
|
||||
),
|
||||
cell: ({ row }) => {
|
||||
const { ServiceName } = getFindingsMetadata(row);
|
||||
return <p className="max-w-96 truncate text-medium">{ServiceName}</p>;
|
||||
const { servicename } = getFindingsMetadata(row);
|
||||
return <p className="max-w-96 truncate text-medium">{servicename}</p>;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
+31
-36
@@ -107,7 +107,7 @@ export interface ScanProps {
|
||||
};
|
||||
}
|
||||
|
||||
export interface FindingsProps {
|
||||
export interface FindingProps {
|
||||
type: "Findings";
|
||||
id: string;
|
||||
attributes: {
|
||||
@@ -118,43 +118,38 @@ export interface FindingsProps {
|
||||
severity: "informational" | "low" | "medium" | "high" | "critical";
|
||||
check_id: string;
|
||||
check_metadata: {
|
||||
check_id: string;
|
||||
metadata: {
|
||||
Risk: string;
|
||||
Notes: string;
|
||||
CheckID: string;
|
||||
Provider: string;
|
||||
Severity: "informational" | "low" | "medium" | "high" | "critical";
|
||||
CheckType: string[];
|
||||
DependsOn: string[];
|
||||
RelatedTo: string[];
|
||||
Categories: string[];
|
||||
CheckTitle: string;
|
||||
RelatedUrl: string;
|
||||
Description: string;
|
||||
Remediation: {
|
||||
Code: {
|
||||
CLI: string;
|
||||
Other: string;
|
||||
NativeIaC: string;
|
||||
Terraform: string;
|
||||
};
|
||||
Recommendation: {
|
||||
Url: string;
|
||||
Text: string;
|
||||
};
|
||||
};
|
||||
ServiceName: string;
|
||||
ResourceType: string;
|
||||
SubServiceName: string;
|
||||
ResourceIdTemplate: string;
|
||||
};
|
||||
};
|
||||
raw_result: {
|
||||
impact: string;
|
||||
status: "PASS" | "FAIL" | "MANUAL" | "MUTED";
|
||||
risk: string;
|
||||
notes: string;
|
||||
checkid: string;
|
||||
provider: string;
|
||||
severity: "informational" | "low" | "medium" | "high" | "critical";
|
||||
checktype: string[];
|
||||
dependson: string[];
|
||||
relatedto: string[];
|
||||
categories: string[];
|
||||
checktitle: string;
|
||||
compliance: string | null;
|
||||
relatedurl: string;
|
||||
description: string;
|
||||
remediation: {
|
||||
code: {
|
||||
cli: string;
|
||||
other: string;
|
||||
nativeiac: string;
|
||||
terraform: string;
|
||||
};
|
||||
recommendation: {
|
||||
url: string;
|
||||
text: string;
|
||||
};
|
||||
};
|
||||
servicename: string;
|
||||
checkaliases: string[];
|
||||
resourcetype: string;
|
||||
subservicename: string;
|
||||
resourceidtemplate: string;
|
||||
};
|
||||
raw_result: object | null;
|
||||
inserted_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user