mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-09 21:14:22 +00:00
fix: move ProviderType to shared types and update usages (#7710)
This commit is contained in:
+4
-68
@@ -1,6 +1,8 @@
|
||||
import { LucideIcon } from "lucide-react";
|
||||
import { SVGProps } from "react";
|
||||
|
||||
import { ProviderType } from "./providers";
|
||||
|
||||
export type IconSvgProps = SVGProps<SVGSVGElement> & {
|
||||
size?: number;
|
||||
};
|
||||
@@ -45,7 +47,7 @@ export interface CollapseMenuButtonProps {
|
||||
export interface SelectScanComplianceDataProps {
|
||||
scans: (ScanProps & {
|
||||
providerInfo: {
|
||||
provider: "aws" | "azure" | "gcp" | "kubernetes";
|
||||
provider: ProviderType;
|
||||
uid: string;
|
||||
alias: string;
|
||||
};
|
||||
@@ -174,27 +176,6 @@ export interface FindingsSeverityOverview {
|
||||
};
|
||||
}
|
||||
|
||||
export interface ProviderOverviewProps {
|
||||
data: {
|
||||
type: "provider-overviews";
|
||||
id: "aws" | "gcp" | "azure" | "kubernetes";
|
||||
attributes: {
|
||||
findings: {
|
||||
pass: number;
|
||||
fail: number;
|
||||
manual: number;
|
||||
total: number;
|
||||
};
|
||||
resources: {
|
||||
total: number;
|
||||
};
|
||||
};
|
||||
}[];
|
||||
meta: {
|
||||
version: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface TaskDetails {
|
||||
attributes: {
|
||||
state: string;
|
||||
@@ -509,51 +490,6 @@ export interface UserProps {
|
||||
}[];
|
||||
}
|
||||
|
||||
export interface ProviderProps {
|
||||
id: string;
|
||||
type: "providers";
|
||||
attributes: {
|
||||
provider: "aws" | "azure" | "m365" | "gcp" | "kubernetes";
|
||||
uid: string;
|
||||
alias: string;
|
||||
status: "completed" | "pending" | "cancelled";
|
||||
resources: number;
|
||||
connection: {
|
||||
connected: boolean;
|
||||
last_checked_at: string;
|
||||
};
|
||||
scanner_args: {
|
||||
only_logs: boolean;
|
||||
excluded_checks: string[];
|
||||
aws_retries_max_attempts: number;
|
||||
};
|
||||
inserted_at: string;
|
||||
updated_at: string;
|
||||
created_by: {
|
||||
object: string;
|
||||
id: string;
|
||||
};
|
||||
};
|
||||
relationships: {
|
||||
secret: {
|
||||
data: {
|
||||
type: string;
|
||||
id: string;
|
||||
} | null;
|
||||
};
|
||||
provider_groups: {
|
||||
meta: {
|
||||
count: number;
|
||||
};
|
||||
data: Array<{
|
||||
type: string;
|
||||
id: string;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
groupNames?: string[];
|
||||
}
|
||||
|
||||
export interface ScanProps {
|
||||
type: "scans";
|
||||
id: string;
|
||||
@@ -596,7 +532,7 @@ export interface ScanProps {
|
||||
};
|
||||
};
|
||||
providerInfo?: {
|
||||
provider: "aws" | "azure" | "gcp" | "kubernetes";
|
||||
provider: ProviderType;
|
||||
uid: string;
|
||||
alias: string;
|
||||
};
|
||||
|
||||
@@ -2,3 +2,4 @@ export * from "./authFormSchema";
|
||||
export * from "./components";
|
||||
export * from "./filters";
|
||||
export * from "./formSchemas";
|
||||
export * from "./providers";
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
export type ProviderType = "aws" | "azure" | "m365" | "gcp" | "kubernetes";
|
||||
|
||||
export interface ProviderProps {
|
||||
id: string;
|
||||
type: "providers";
|
||||
attributes: {
|
||||
provider: ProviderType;
|
||||
uid: string;
|
||||
alias: string;
|
||||
status: "completed" | "pending" | "cancelled";
|
||||
resources: number;
|
||||
connection: {
|
||||
connected: boolean;
|
||||
last_checked_at: string;
|
||||
};
|
||||
scanner_args: {
|
||||
only_logs: boolean;
|
||||
excluded_checks: string[];
|
||||
aws_retries_max_attempts: number;
|
||||
};
|
||||
inserted_at: string;
|
||||
updated_at: string;
|
||||
created_by: {
|
||||
object: string;
|
||||
id: string;
|
||||
};
|
||||
};
|
||||
relationships: {
|
||||
secret: {
|
||||
data: {
|
||||
type: string;
|
||||
id: string;
|
||||
} | null;
|
||||
};
|
||||
provider_groups: {
|
||||
meta: {
|
||||
count: number;
|
||||
};
|
||||
data: Array<{
|
||||
type: string;
|
||||
id: string;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
groupNames?: string[];
|
||||
}
|
||||
|
||||
export interface ProviderOverviewProps {
|
||||
data: {
|
||||
type: "provider-overviews";
|
||||
id: ProviderType;
|
||||
attributes: {
|
||||
findings: {
|
||||
pass: number;
|
||||
fail: number;
|
||||
manual: number;
|
||||
total: number;
|
||||
};
|
||||
resources: {
|
||||
total: number;
|
||||
};
|
||||
};
|
||||
}[];
|
||||
meta: {
|
||||
version: string;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user