diff --git a/spiderfoot/templates/scaninfo.tmpl b/spiderfoot/templates/scaninfo.tmpl index 4992ec774f..3ea24d9946 100644 --- a/spiderfoot/templates/scaninfo.tmpl +++ b/spiderfoot/templates/scaninfo.tmpl @@ -422,7 +422,7 @@ return; } sf.fetchData('${docroot}/scaneventresults', { 'id': instanceId, 'correlationId': correlationId }, function(data) { - var table = ""; + var table = "
"; table += ""; table += ""; table += ""; @@ -464,7 +464,7 @@ sf.updateTooltips(); return; } - var table = "
Data ElementSource Data Element
"; + var table = "
"; table += ""; for (var i = 0; i < data.length; i++) { table += ""; @@ -490,6 +490,17 @@ table += "
CorrelationRiskData Elements
"; $("#loader").fadeOut(500); $("#mainbody").append(table); + $.tablesorter.addParser({ + id: 'criticality', + is: function(s) { + return false; + }, + format: function(s) { + return s.toLowerCase().replace(/high/,3).replace(/medium/,2).replace(/low/,1).replace(/info/,0); + }, + type: 'numeric' + }); + $("#scansummary-content").tablesorter({ headers: { 1: { sorter: 'criticality' } } }); sf.updateTooltips(); }); }