File tree Expand file tree Collapse file tree 5 files changed +44
-12
lines changed
Expand file tree Collapse file tree 5 files changed +44
-12
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ ul, ol {
7070/* HEADER SECTION */
7171/* ============================== */
7272.header {
73+ border : green 3px ;
7374 text-align : left; /* Only header is left-aligned */
7475 padding : 20px ;
7576 margin-bottom : 30px ;
@@ -81,6 +82,11 @@ ul, ol {
8182 color : var (--clr-primary );
8283}
8384
85+ .title {
86+ font-size : 32px ;
87+ font-weight : 900 ;
88+ }
89+
8490.sast-description {
8591 font-size : 16px ;
8692 color : var (--clr-dark );
@@ -347,21 +353,32 @@ body {
347353/* STATISTICS */
348354/* ============================== */
349355.statistics-container {
350- display : flex;
351356 align-content : flex-start;
352357 justify-content : center;
353358}
354359
355360.statistics {
361+ display : flex;
362+ gap : 10px ;
356363 padding : 10px ;
357364}
358365
359- .statistics > ol {
360- display : table;
366+ .filter-button {
367+ padding : 10px 20px ;
368+ border : none;
369+ cursor : pointer;
370+ }
371+
372+ .filter-button .high {
373+ background : # ff5e5e ;
374+ }
375+
376+ .filter-button .medium {
377+ background : # ffa22b ;
361378}
362379
363- .statistics > ol > li {
364- display : table-row ;
380+ .filter-button . low {
381+ background : # 39c4ff ;
365382}
366383
367384/* ============================== */
Original file line number Diff line number Diff line change @@ -53,8 +53,25 @@ <h3>Recent Activity</h3>
5353 < img src ="../icons/sidebar.png " alt ="Toggle Sidebar Icon " width ="24 "/>
5454</ button >
5555
56+ < header class ="header ">
57+ < h1 class ="title "> Findings</ h1 >
58+ </ header >
59+
5660< section class ="statistics-container ">
57- < ol id ="statistics " class ="statistics "> </ ol >
61+ < div id ="statistics " class ="statistics ">
62+ < button id ="btnHigh " class ="filter-button high ">
63+ < span class ="label "> High:</ span >
64+ < span class ="count "> </ span >
65+ </ button >
66+ < button id ="btnMedium " class ="filter-button medium ">
67+ < span class ="label "> Medium:</ span >
68+ < span class ="count "> </ span >
69+ </ button >
70+ < button id ="btnLow " class ="filter-button low ">
71+ < span class ="label "> Low:</ span >
72+ < span class ="count "> </ span >
73+ </ button >
74+ </ div >
5875</ section >
5976
6077< section class ="vulnerability-container ">
Original file line number Diff line number Diff line change @@ -25,13 +25,11 @@ function handleFileSelection(filePath) {
2525}
2626
2727function displayStatistics ( statistics ) {
28- let statisticsList = document . getElementById ( "statistics" ) ;
29- statisticsList . innerHTML = "" ;
30-
3128 Object . entries ( statistics ) . forEach ( ( [ key , value ] ) => {
32- let li = document . createElement ( "li" ) ;
33- li . textContent = `${ key } : ${ value } `
34- statisticsList . appendChild ( li ) ;
29+ let button = document . getElementById ( `btn${ key } ` ) ;
30+ if ( button ) {
31+ button . querySelector ( ".count" ) . textContent = `${ value } ` ;
32+ }
3533 } ) ;
3634}
3735
You can’t perform that action at this time.
0 commit comments