From 699776111bc43d723958ed0bd9790c36f4a56cb3 Mon Sep 17 00:00:00 2001 From: leSamo Date: Fri, 20 Dec 2024 21:57:01 +0100 Subject: [PATCH] fix(CVSS popover): Fix misalignment of CVSS popover --- .../CVEDetailsPageSidebar.test.js.snap | 19 ++--- .../CvssVector/CvssVector.js | 70 +++++++++++-------- .../__snapshots__/CveDetailsPage.test.js.snap | 19 ++--- 3 files changed, 59 insertions(+), 49 deletions(-) diff --git a/src/Components/PresentationalComponents/CVEDetailsPageSidebar/__snapshots__/CVEDetailsPageSidebar.test.js.snap b/src/Components/PresentationalComponents/CVEDetailsPageSidebar/__snapshots__/CVEDetailsPageSidebar.test.js.snap index d360b460e..ed1e4fc81 100644 --- a/src/Components/PresentationalComponents/CVEDetailsPageSidebar/__snapshots__/CVEDetailsPageSidebar.test.js.snap +++ b/src/Components/PresentationalComponents/CVEDetailsPageSidebar/__snapshots__/CVEDetailsPageSidebar.test.js.snap @@ -147,14 +147,14 @@ exports[`CVEDetailsPageSidebar component should render correctly 1`] = `
-
- - CVSS 3.0 base score @@ -163,11 +163,12 @@ exports[`CVEDetailsPageSidebar component should render correctly 1`] = ` > - -
+
+ diff --git a/src/Components/PresentationalComponents/CvssVector/CvssVector.js b/src/Components/PresentationalComponents/CvssVector/CvssVector.js index 0c347fcb5..8941cbd09 100644 --- a/src/Components/PresentationalComponents/CvssVector/CvssVector.js +++ b/src/Components/PresentationalComponents/CvssVector/CvssVector.js @@ -43,42 +43,50 @@ const CvssVector = ({ cvss2_metrics: CVSS2Vector, cvss3_metrics: CVSS3Vector, sc {context => ( - - {cvssVector ? - ( - - -
- ) : (notAvailable)} - - } - > -
+ + {score} diff --git a/src/Components/SmartComponents/CVEDetailsPage/__snapshots__/CveDetailsPage.test.js.snap b/src/Components/SmartComponents/CVEDetailsPage/__snapshots__/CveDetailsPage.test.js.snap index 7fdad56d6..2806b7714 100644 --- a/src/Components/SmartComponents/CVEDetailsPage/__snapshots__/CveDetailsPage.test.js.snap +++ b/src/Components/SmartComponents/CVEDetailsPage/__snapshots__/CveDetailsPage.test.js.snap @@ -342,14 +342,14 @@ exports[`CVE details: Should render match snapshot 1`] = `
-
- - CVSS 3.0 base score @@ -358,11 +358,12 @@ exports[`CVE details: Should render match snapshot 1`] = ` > - -
+
+