sonatype-nexus-community / nexus-iq-chrome-extension

Chrome extension for use with Sonatype Nexus Lifecycle - IQ server
https://sonatype-nexus-community.github.io/nexus-iq-chrome-extension/
Apache License 2.0
20 stars 12 forks source link

bug: sort policy table by threat level #250

Closed acpcreation closed 1 year ago

acpcreation commented 1 year ago

bug: sort policy table by threat level

maurycupitt commented 1 year ago

This is already sorted by Threat Level

ctownshend commented 1 year ago

I think that this is still not sorted in v 2.x.x use this URL to test https://www.npmjs.com/package/lodash/v/4.17.19 Actual:

image

9 | CVE-2021-23337  10 | sonatype-2019-0467 10 | sonatype-2020-0739

Expected: 10 ->10 -> 9 (sort by CVSS descending then by CVE descending) 10 | sonatype-2020-0739 10 | sonatype-2019-0467 9 | CVE-2021-23337

ctownshend commented 1 year ago

Added sort code const pv = nexusContext.policyDetails.results[0].policyData.policyViolations.sort( (a, b) => b.threatLevel - a.threatLevel );