@@ -11,16 +11,15 @@ import { initDropdownChart } from './core.js';
1111import { formatWholeNumbersOnly , getCssVar , renderers } from './renderers.js' ;
1212
1313const names = {
14- total_advisories : "Total Advisories" ,
15- advisories_without_packages : "Advisories without a Package" ,
16- advisories_with_packages : "Advisories with a Package" ,
17- advisories_without_ghost_packages : "Advisories without a Ghost Package" ,
18- advisories_with_ghost_packages : "Advisories with a Ghost Package" ,
19- advisories_without_exploits : "Advisories without an Exploit" ,
20- advisories_with_exploitdb : "Advisories with Exploit-DB" ,
21- advisories_with_metasploit : "Advisories with Metasploit" ,
22- advisories_with_kev : "Advisories with KEV" ,
23- advisories_with_exploits : "Advisories with an Exploit" ,
14+ advisories_with_packages : "with a PURL" ,
15+ advisories_without_packages : "without a PURL" ,
16+ advisories_without_ghost_packages : "with an existing PURL" ,
17+ advisories_with_ghost_packages : "with a non-existing PURL" ,
18+ advisories_with_exploits : "with an Exploit" ,
19+ advisories_without_exploits : "without an Exploit" ,
20+ advisories_with_exploitdb : "with a Exploit-DB exploit" ,
21+ advisories_with_metasploit : "with a Metasploit exploit" ,
22+ advisories_with_kev : "with a KEV" ,
2423} ;
2524
2625function renderImporterBar ( id , config ) {
@@ -57,8 +56,13 @@ function renderImporterBar(id, config) {
5756 bar : { width : { ratio : 0.8 } } ,
5857 tooltip : {
5958 grouped : true ,
59+ order : ( a , b ) => {
60+ //Keep a stable order of rows
61+ const cols = config . columns . map ( c => c [ 0 ] ) ;
62+ return cols . indexOf ( a . id ) - cols . indexOf ( b . id ) ;
63+ } ,
6064 format : {
61- title : ( x ) => `${ config . x_categories [ x ] } (Total: ${ totals ?. [ x + 1 ] ?. toLocaleString ( ) } )` ,
65+ title : ( x ) => `Advisories from ${ config . x_categories [ x ] } (Total: ${ totals ?. [ x + 1 ] ?. toLocaleString ( ) } )` ,
6266 value : ( val ) => val . toLocaleString ( ) ,
6367 } ,
6468 } ,
0 commit comments