Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/components/CvssGauge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function CvssGauge ({ data }: Readonly<Props>) {
score_color = 'bg-red-900';

return (
<div className="bg-gray-800 w-[216px] aspect-[2] overflow-hidden">
<div className="bg-gray-800 w-full aspect-[2] overflow-hidden">
<div className="relative flex items-center justify-center bg-gray-800">
{/* Outer ring with ranges (rotate angles modifiable to get custom range) */}
<div className="absolute top-0 aspect-square w-full rounded-full rotate-[calc(0deg-45deg)] bg-gradient-to-tr from-transparent from-50% to-green-600 to-50% transition-transform duration-500"></div>
Expand Down
56 changes: 28 additions & 28 deletions frontend/src/components/VulnModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ const dt_options: Intl.DateTimeFormatOptions = {
<div className="p-4 md:p-5 space-y-4 text-gray-300 text-justify" id="vulnerability_modal_body">

<div className="flex flex-row mb-6 ">
<ul className="grow leading-6">
<ul className="flex-[1.5] leading-6">
<li key="severity">
<span className="font-bold mr-1">Severity:</span>
<SeverityTag severity={vuln.severity.severity} className="text-white" />
Expand Down Expand Up @@ -609,35 +609,35 @@ const dt_options: Intl.DateTimeFormatOptions = {
</li>
</ul>

<div className="ml-2">
<div className="flex justify-between items-center mb-2">
<div className="ml-2 grow-1">
<div className="flex gap-3 justify-start items-center mb-2">
<h3 className="text-lg font-bold text-white flex items-center">
CVSS
{isEditing && (
<div className="relative ml-3">
<button
onClick={() => setShowCustomCvss(!showCustomCvss)}
className="text-blue-400 hover:text-blue-300 transition-colors"
title="Add custom CVSS vector"
aria-label="Add custom CVSS vector"
>
<FontAwesomeIcon icon={faPlus} className="w-4 h-4" />
</button>

{showCustomCvss && (
<div className="absolute right-0 mt-2 z-50 w-64">
<CustomCvss
onCancel={() => setShowCustomCvss(false)}
onAddCvss={(vector) => {
addCvss(vector);
}}
triggerBanner={showMessage}
/>
</div>
)}
</div>
)}
</h3>
{isEditing && (
<div className="relative">
<button
onClick={() => setShowCustomCvss(!showCustomCvss)}
className="text-blue-400 hover:text-blue-300 transition-colors"
title="Add custom CVSS vector"
aria-label="Add custom CVSS vector"
>
<FontAwesomeIcon icon={faPlus} className="w-4 h-4" />
</button>

{showCustomCvss && (
<div className="absolute right-0 mt-2 z-50 w-64">
<CustomCvss
onCancel={() => setShowCustomCvss(false)}
onAddCvss={(vector) => {
addCvss(vector);
}}
triggerBanner={showMessage}
/>
</div>
)}
</div>
)}
</div>

<div className="flex flex-wrap gap-2">
Expand All @@ -646,7 +646,7 @@ const dt_options: Intl.DateTimeFormatOptions = {
key={encodeURIComponent(
`${cvss.author}-${cvss.version}-${cvss.base_score}`
)}
className="bg-gray-800 p-2 rounded-xl flex-1 min-w-[150px]"
className="bg-gray-800 p-2 rounded-xl min-w-[216px]"
>
<h3 className="text-center font-bold">CVSS {cvss.version}</h3>
<CvssGauge data={cvss} />
Expand Down
Loading