From b8550ff970a99943f3981d7c2f75434353485123 Mon Sep 17 00:00:00 2001 From: Pushpit Date: Fri, 19 Mar 2021 16:31:53 +0530 Subject: [PATCH 01/18] Added severity in the view at http://127.0.0.1:8000/vulnerabilities/ by calling the scores() function for the particular reference and getting its value and scoring_system Signed-off-by: Pushpit --- vulnerabilities/templates/vulnerability.html | 52 +++++++++++++++----- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/vulnerabilities/templates/vulnerability.html b/vulnerabilities/templates/vulnerability.html index 75682cfe7..93389fe9b 100644 --- a/vulnerabilities/templates/vulnerability.html +++ b/vulnerabilities/templates/vulnerability.html @@ -24,25 +24,53 @@

References:

Reference ID URL + Severity + Scoring System + {% for ref in object_list %} - - {% if ref.reference_id %} - {{ref.reference_id}} + + {% if ref.reference_id %} + {{ref.reference_id}} + + {% else %} + - + + {% endif %} - {% else %} - - + {% if ref.url %} + {{ref.url}} - {% endif %} + {% else %} + - - {% if ref.url %} - {{ref.url}} + {% endif %} - {% else %} - - + {% if ref %} + + {% for obj in ref.scores %} + {{obj.value}} + {% if not forloop.last %}, {% endif %} + {% endfor %} + + {% else %} + - - {% endif %} - + {% endif %} + + {% if ref %} + + {% for obj in ref.scores %} + {{obj.scoring_system}} + {% if not forloop.last %}, {% endif %} + {% endfor %} + + + {% else %} + - + + {% endif %} + {% endfor %} From 4bd3b23ebf5bccec1569e1a3fec76b47184a3605 Mon Sep 17 00:00:00 2001 From: Pushpit Date: Thu, 1 Apr 2021 16:01:58 +0530 Subject: [PATCH 02/18] Updated design for severities view Signed-off-by: Pushpit --- vulnerabilities/static/css/custom.css | 4 + vulnerabilities/templates/base.html | 1 + vulnerabilities/templates/vulnerability.html | 85 +++++++++++++------- 3 files changed, 60 insertions(+), 30 deletions(-) diff --git a/vulnerabilities/static/css/custom.css b/vulnerabilities/static/css/custom.css index 81d734102..764e70598 100644 --- a/vulnerabilities/static/css/custom.css +++ b/vulnerabilities/static/css/custom.css @@ -6,4 +6,8 @@ .Site-content { flex: 1; +} + +table { + border: 1px solid black; } \ No newline at end of file diff --git a/vulnerabilities/templates/base.html b/vulnerabilities/templates/base.html index 6efa9ccb2..6c166bfe2 100644 --- a/vulnerabilities/templates/base.html +++ b/vulnerabilities/templates/base.html @@ -6,6 +6,7 @@ +