mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-25 12:54:18 +00:00
Fix NextJS reviews
This commit is contained in:
10 files changed
+17
-87
No files matched your search
@@ -5,14 +5,14 @@ export const getLighthouseCompliancesOverview = async ({
|
||||
fields,
|
||||
filters,
|
||||
page,
|
||||
page_size,
|
||||
pageSize,
|
||||
sort,
|
||||
}: {
|
||||
scanId: string;
|
||||
fields?: string[];
|
||||
filters?: Record<string, string | number | boolean | undefined>;
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
pageSize?: number;
|
||||
sort?: string;
|
||||
}) => {
|
||||
const headers = await getAuthHeaders({ contentType: false });
|
||||
@@ -39,8 +39,8 @@ export const getLighthouseCompliancesOverview = async ({
|
||||
if (page) {
|
||||
url.searchParams.append("page[number]", page.toString());
|
||||
}
|
||||
if (page_size) {
|
||||
url.searchParams.append("page[size]", page_size.toString());
|
||||
if (pageSize) {
|
||||
url.searchParams.append("page[size]", pageSize.toString());
|
||||
}
|
||||
|
||||
// Handle sorting
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import "@/styles/globals.css";
|
||||
|
||||
import React from "react";
|
||||
|
||||
import { ContentLayout } from "@/components/ui";
|
||||
|
||||
interface ChatbotConfigLayoutProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
export default function ChatbotConfigLayout({
|
||||
children,
|
||||
}: ChatbotConfigLayoutProps) {
|
||||
return (
|
||||
<ContentLayout title="Configure Chatbot" icon="lucide:settings">
|
||||
{children}
|
||||
</ContentLayout>
|
||||
);
|
||||
}
|
||||
@@ -4,10 +4,8 @@ import Chat from "./chat";
|
||||
|
||||
export default function AIChatbot() {
|
||||
return (
|
||||
<div>
|
||||
<ContentLayout title="Cloud Security Analyst" icon="lucide:bot">
|
||||
<Chat />
|
||||
</ContentLayout>
|
||||
</div>
|
||||
<ContentLayout title="Cloud Security Analyst" icon="lucide:bot">
|
||||
<Chat />
|
||||
</ContentLayout>
|
||||
);
|
||||
}
|
||||
@@ -4,8 +4,8 @@ import { getLighthouseProviderChecks } from "@/lib/lighthouse/helpers/checks";
|
||||
import { checkSchema } from "@/types/lighthouse";
|
||||
|
||||
export const getProviderChecksTool = tool(
|
||||
async ({ provider_type }) => {
|
||||
const checks = await getLighthouseProviderChecks(provider_type);
|
||||
async ({ providerType }) => {
|
||||
const checks = await getLighthouseProviderChecks(providerType);
|
||||
return checks;
|
||||
},
|
||||
{
|
||||
|
||||
@@ -12,13 +12,13 @@ import {
|
||||
} from "@/types/lighthouse";
|
||||
|
||||
export const getCompliancesOverviewTool = tool(
|
||||
async ({ scanId, fields, filters, page, page_size, sort }) => {
|
||||
async ({ scanId, fields, filters, page, pageSize, sort }) => {
|
||||
return await getLighthouseCompliancesOverview({
|
||||
scanId,
|
||||
fields,
|
||||
filters,
|
||||
page,
|
||||
page_size,
|
||||
pageSize,
|
||||
sort,
|
||||
});
|
||||
},
|
||||
@@ -31,8 +31,8 @@ export const getCompliancesOverviewTool = tool(
|
||||
);
|
||||
|
||||
export const getComplianceFrameworksTool = tool(
|
||||
async ({ provider }) => {
|
||||
return await getLighthouseComplianceFrameworks(provider);
|
||||
async ({ providerType }) => {
|
||||
return await getLighthouseComplianceFrameworks(providerType);
|
||||
},
|
||||
{
|
||||
name: "getComplianceFrameworks",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const checkSchema = z.object({
|
||||
provider_type: z.enum(["aws", "gcp", "azure", "kubernetes", "m365"]),
|
||||
providerType: z.enum(["aws", "gcp", "azure", "kubernetes", "m365"]),
|
||||
});
|
||||
@@ -81,15 +81,15 @@ export const getCompliancesOverviewSchema = z.object({
|
||||
"The filters to get the compliances overview for. If not provided, all regions will be returned by default.",
|
||||
),
|
||||
page: z.number().optional().describe("Page number. Default is 1."),
|
||||
page_size: z.number().optional().describe("Page size. Default is 10."),
|
||||
pageSize: z.number().optional().describe("Page size. Default is 10."),
|
||||
sort: getCompliancesOverviewSort
|
||||
.optional()
|
||||
.describe("Sort by field. Default is inserted_at."),
|
||||
});
|
||||
|
||||
export const getComplianceFrameworksSchema = z.object({
|
||||
provider: z
|
||||
.enum(["aws", "azure", "gcp", "kubernetes"])
|
||||
providerType: z
|
||||
.enum(["aws", "azure", "gcp", "kubernetes", "m365"])
|
||||
.describe("The provider type to get the compliance frameworks for."),
|
||||
});
|
||||
|
||||
|
||||
@@ -2,24 +2,6 @@ import { z } from "zod";
|
||||
|
||||
// Get Findings Schema
|
||||
|
||||
// const findingFieldsEnum = z.enum([
|
||||
// "",
|
||||
// "uid",
|
||||
// "delta",
|
||||
// "status",
|
||||
// "status_extended",
|
||||
// "severity",
|
||||
// "check_id",
|
||||
// "check_metadata",
|
||||
// "raw_result",
|
||||
// "inserted_at",
|
||||
// "updated_at",
|
||||
// "first_seen_at",
|
||||
// "url",
|
||||
// "scan",
|
||||
// "resources",
|
||||
// ]);
|
||||
|
||||
const deltaEnum = z.enum(["", "new", "changed"]);
|
||||
|
||||
const impactEnum = z.enum([
|
||||
|
||||
@@ -18,24 +18,6 @@ export const getProvidersOverviewSchema = z.object({
|
||||
|
||||
// Get Findings By Status
|
||||
|
||||
// const findingsOverviewFieldsEnum = z.enum([
|
||||
// "",
|
||||
// "id",
|
||||
// "new",
|
||||
// "changed",
|
||||
// "unchanged",
|
||||
// "fail_new",
|
||||
// "fail_changed",
|
||||
// "pass_new",
|
||||
// "pass_changed",
|
||||
// "muted_new",
|
||||
// "muted_changed",
|
||||
// "total",
|
||||
// "fail",
|
||||
// "muted",
|
||||
// "pass",
|
||||
// ]);
|
||||
|
||||
const providerTypeEnum = z.enum(["", "aws", "azure", "gcp", "kubernetes"]);
|
||||
|
||||
const sortFieldsEnum = z.enum([
|
||||
|
||||
@@ -2,19 +2,6 @@ import { z } from "zod";
|
||||
|
||||
// Get Providers Schema
|
||||
|
||||
// const providerFieldsEnum = z.enum([
|
||||
// "",
|
||||
// "inserted_at",
|
||||
// "updated_at",
|
||||
// "provider",
|
||||
// "uid",
|
||||
// "alias",
|
||||
// "connection",
|
||||
// "secret",
|
||||
// "provider_groups",
|
||||
// "url",
|
||||
// ]);
|
||||
|
||||
const providerEnum = z.enum(["", "aws", "azure", "gcp", "kubernetes"]);
|
||||
|
||||
const sortFieldsEnum = z.enum([
|
||||
|
||||
Reference in new issue
Block a user