From 334091eea21e1567cdacaeb6dbc8f483825c4929 Mon Sep 17 00:00:00 2001 From: Sudhir Verma Date: Tue, 8 Oct 2024 15:03:34 +0530 Subject: [PATCH 1/2] Fix title for Vulnerabilities and Risk Posture --- .../Charts/BarChart/VulHistory/index.tsx | 20 +++++++- src/components/Charts/PieChart/index.tsx | 46 +++++++++++++------ .../AssessmentAnalytics/index.tsx | 16 ++----- 3 files changed, 55 insertions(+), 27 deletions(-) diff --git a/src/components/Charts/BarChart/VulHistory/index.tsx b/src/components/Charts/BarChart/VulHistory/index.tsx index 904672ee..f6cf3026 100644 --- a/src/components/Charts/BarChart/VulHistory/index.tsx +++ b/src/components/Charts/BarChart/VulHistory/index.tsx @@ -5,12 +5,13 @@ import ReactApexChart from "react-apexcharts"; import { useTheme } from "@mui/material/styles"; import useChart from "../useChart"; import MKBox from "../../../../components/MKBox"; +import MKTypography from "../../../MKTypography"; -function VulHistory({ vuldata }: any) { +function VulHistory({ vuldata, title }: any) { const theme = useTheme(); const chartLabels = vuldata.map((i: { label: any }) => i.label); const chartData = vuldata.map((i: { value: any }) => i.value); - const chartSeries = [{ name: "series-1", data: chartData }]; + const chartSeries = [{ name: `CVEs Reported`, data: chartData }]; const chartOptions = useChart({ xaxis: { @@ -82,6 +83,21 @@ function VulHistory({ vuldata }: any) { + { + (title === "Known Vulnerabilities") ? + { title } + : <> + } - - { title } - + { + (title === "Risk Posture") ? + { title } + : + { title } + + } + diff --git a/src/pages/BesVersionHistory/AssessmentAnalytics/index.tsx b/src/pages/BesVersionHistory/AssessmentAnalytics/index.tsx index a59caea0..2efdd4cd 100644 --- a/src/pages/BesVersionHistory/AssessmentAnalytics/index.tsx +++ b/src/pages/BesVersionHistory/AssessmentAnalytics/index.tsx @@ -122,7 +122,6 @@ const FetchData = ({ if (report === "Risk Posture") { if (severityData.length !== 0) { return ( - - ); } else { return ( @@ -158,12 +156,10 @@ const FetchData = ({ ); } - } - - else if (report === "Vulnerability History") { + } else if (report === "Known Vulnerabilities") { if (vulHistoryData.length !== 0) { return ( - + ); } else { return ( @@ -198,14 +194,12 @@ function AssessmentAnalytics({ }: any) { const report: string[] = [ "Risk Posture", - "Vulnerability History" - // "Critical Issues" + "Known Vulnerabilities" ]; return ( - { /* */ } - { report.map((value, index) => { + { report.map((value) => { return ( Date: Tue, 8 Oct 2024 15:07:32 +0530 Subject: [PATCH 2/2] updated the version from 0.19.1 -> 0.19.2 --- src/apiDetailsConfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apiDetailsConfig.json b/src/apiDetailsConfig.json index 4c037bdc..91d725f6 100644 --- a/src/apiDetailsConfig.json +++ b/src/apiDetailsConfig.json @@ -13,6 +13,6 @@ "token": "" }, "activeTool": "github", - "version": "0.19.1", + "version": "0.19.2", "labName": "Be-Secure Community Lab" } \ No newline at end of file