chore: delete old dummy data for compliances dashboard

This commit is contained in:
Pablo Lara
2024-11-16 21:13:41 +01:00
parent d1424b3c9c
commit e92bbffc53
3 changed files with 0 additions and 487 deletions
-39
View File
@@ -1,39 +0,0 @@
"use server";
import { revalidatePath } from "next/cache";
import { redirect } from "next/navigation";
import { parseStringify } from "@/lib";
export const getCompliance = async ({ page = 1 }) => {
if (isNaN(Number(page)) || page < 1) redirect("/compliance");
const keyServer = process.env.SITE_URL;
try {
const compliance = await fetch(
`${keyServer}/api/compliance?page%5Bnumber%5D=${page}`,
);
const data = await compliance.json();
const parsedData = parseStringify(data);
revalidatePath("/compliance");
return parsedData;
} catch (error) {
console.error("Error fetching Compliance:", error);
return undefined;
}
};
export const getErrorMessage = (error: unknown): string => {
let message: string;
if (error instanceof Error) {
message = error.message;
} else if (error && typeof error === "object" && "message" in error) {
message = String(error.message);
} else if (typeof error === "string") {
message = error;
} else {
message = "Oops! Something went wrong.";
}
return message;
};
-10
View File
@@ -1,10 +0,0 @@
import { NextResponse } from "next/server";
import data from "../../../dataCompliance.json";
export async function GET() {
// Simulate fetching data with a delay
await new Promise((resolve) => setTimeout(resolve, 2000));
return NextResponse.json({ compliance: data });
}
-438
View File
@@ -1,438 +0,0 @@
{
"links": {
"first": "http://localhost:8080/api/v1/compliance?page%5Bnumber%5D=1",
"last": "http://localhost:8080/api/v1/compliance?page%5Bnumber%5D=1",
"next": null,
"prev": null
},
"data": [
{
"id": "001",
"attributes": {
"title": "AWS Account Security Onboarding",
"passingRequirements": 28,
"totalRequirements": 83,
"regions": ["us-east-1", "us-east-2"]
},
"lastScan": {
"attributes": {
"passingRequirements": 28,
"totalRequirements": 83
}
}
},
{
"id": "002",
"attributes": {
"title": "AWS Audit Manager Control Tower Guardrails",
"passingRequirements": 10,
"totalRequirements": 14,
"regions": ["us-west-1", "us-west-2"]
},
"lastScan": {
"attributes": {
"passingRequirements": 14,
"totalRequirements": 14
}
}
},
{
"id": "003",
"attributes": {
"title": "AWS Foundational Security Best Practices",
"passingRequirements": 22,
"totalRequirements": 37,
"regions": ["eu-west-1", "eu-west-2"]
},
"lastScan": {
"attributes": {
"passingRequirements": 22,
"totalRequirements": 37
}
}
},
{
"id": "004",
"attributes": {
"title": "AWS Foundational Technical Review",
"passingRequirements": 3,
"totalRequirements": 45,
"regions": ["ap-southeast-1", "ap-southeast-2"]
},
"lastScan": {
"attributes": {
"passingRequirements": 25,
"totalRequirements": 45
}
}
},
{
"id": "005",
"attributes": {
"title": "AWS Well Architected Framework Reliability Pillar",
"passingRequirements": 2,
"totalRequirements": 3,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 0,
"totalRequirements": 3
}
}
},
{
"id": "006",
"attributes": {
"title": "AWS Well Architected Framework Security Pillar",
"passingRequirements": 19,
"totalRequirements": 57,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 24,
"totalRequirements": 57
}
}
},
{
"id": "007",
"attributes": {
"title": "CIS 1.4",
"passingRequirements": 43,
"totalRequirements": 58,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 40,
"totalRequirements": 58
}
}
},
{
"id": "008",
"attributes": {
"title": "CIS 1.5",
"passingRequirements": 48,
"totalRequirements": 63,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 50,
"totalRequirements": 63
}
}
},
{
"id": "009",
"attributes": {
"title": "CIS 2.0",
"passingRequirements": 47,
"totalRequirements": 64,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 64,
"totalRequirements": 64
}
}
},
{
"id": "010",
"attributes": {
"title": "CIS 3.0",
"passingRequirements": 45,
"totalRequirements": 62,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 48,
"totalRequirements": 62
}
}
},
{
"id": "011",
"attributes": {
"title": "CISA",
"passingRequirements": 4,
"totalRequirements": 16,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 4,
"totalRequirements": 16
}
}
},
{
"id": "012",
"attributes": {
"title": "ENS RD2022 Categoría ALTA",
"passingRequirements": 89,
"totalRequirements": 189,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 82,
"totalRequirements": 189
}
}
},
{
"id": "013",
"attributes": {
"title": "FFIEC",
"passingRequirements": 8,
"totalRequirements": 44,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 40,
"totalRequirements": 44
}
}
},
{
"id": "014",
"attributes": {
"title": "FedRAMP Low Revision 4",
"passingRequirements": 4,
"totalRequirements": 18,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 4,
"totalRequirements": 18
}
}
},
{
"id": "015",
"attributes": {
"title": "FedRamp Moderate Revision 4",
"passingRequirements": 11,
"totalRequirements": 64,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 28,
"totalRequirements": 64
}
}
},
{
"id": "016",
"attributes": {
"title": "GDPR",
"passingRequirements": 0,
"totalRequirements": 3,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 0,
"totalRequirements": 3
}
}
},
{
"id": "017",
"attributes": {
"title": "GxP 21 CFR Part 11",
"passingRequirements": 1,
"totalRequirements": 11,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 11,
"totalRequirements": 11
}
}
},
{
"id": "018",
"attributes": {
"title": "GxP EU Annex 11",
"passingRequirements": 5,
"totalRequirements": 14,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 5,
"totalRequirements": 14
}
}
},
{
"id": "019",
"attributes": {
"title": "HIPAA",
"passingRequirements": 2,
"totalRequirements": 32,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 9,
"totalRequirements": 32
}
}
},
{
"id": "020",
"attributes": {
"title": "ISO27001 2013",
"passingRequirements": 55,
"totalRequirements": 79,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 66,
"totalRequirements": 79
}
}
},
{
"id": "021",
"attributes": {
"title": "MITRE ATTACK",
"passingRequirements": 7,
"totalRequirements": 46,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 19,
"totalRequirements": 46
}
}
},
{
"id": "022",
"attributes": {
"title": "NIST 800 171 Revision 2",
"passingRequirements": 3,
"totalRequirements": 50,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 3,
"totalRequirements": 50
}
}
},
{
"id": "023",
"attributes": {
"title": "NIST 800 53 Revision 4",
"passingRequirements": 21,
"totalRequirements": 64,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 21,
"totalRequirements": 64
}
}
},
{
"id": "024",
"attributes": {
"title": "NIST 800 53 Revision 5",
"passingRequirements": 75,
"totalRequirements": 288,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 75,
"totalRequirements": 288
}
}
},
{
"id": "025",
"attributes": {
"title": "NIST CSF 1.1",
"passingRequirements": 15,
"totalRequirements": 56,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 46,
"totalRequirements": 56
}
}
},
{
"id": "026",
"attributes": {
"title": "PCI 3.2.1",
"passingRequirements": 11,
"totalRequirements": 19,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 19,
"totalRequirements": 19
}
}
},
{
"id": "027",
"attributes": {
"title": "RBI Cyber Security Framework",
"passingRequirements": 3,
"totalRequirements": 9,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 3,
"totalRequirements": 9
}
}
},
{
"id": "028",
"attributes": {
"title": "SOC2",
"passingRequirements": 7,
"totalRequirements": 56,
"regions": []
},
"lastScan": {
"attributes": {
"passingRequirements": 7,
"totalRequirements": 56
}
}
}
],
"meta": {
"pagination": {
"page": 1,
"pages": 1,
"count": 28
},
"version": "v1"
}
}