Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added resources/v2/noIssues.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions resources/v2/smallNoIssues.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions utils/outputwriter/icons.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ const (
notApplicableLowSeveritySource ImageSource = "v2/notApplicableLow.png"
unknownSeveritySource ImageSource = "v2/applicableUnknownSeverity.png"
notApplicableUnknownSeveritySource ImageSource = "v2/notApplicableUnknown.png"
noIssuesSource ImageSource = "v2/noIssues.png"

smallCriticalSeveritySource ImageSource = "v2/smallCritical.svg"
smallHighSeveritySource ImageSource = "v2/smallHigh.svg"
smallMediumSeveritySource ImageSource = "v2/smallMedium.svg"
smallLowSeveritySource ImageSource = "v2/smallLow.svg"
smallUnknownSeveritySource ImageSource = "v2/smallUnknown.svg"
smallNoIssuesSource ImageSource = "v2/smallNoIssues.svg"
)

func getSeverityTag(iconName IconName, applicability string) string {
Expand All @@ -56,6 +58,8 @@ func getNotApplicableIconTags(iconName IconName) string {
return GetIconTag(notApplicableMediumSeveritySource, "medium (not applicable)") + "<br>"
case "low":
return GetIconTag(notApplicableLowSeveritySource, "low (not applicable)") + "<br>"
case "scanned - no issues":
return GetIconTag(noIssuesSource, "scanned - no issues found") + "<br>"
}
return GetIconTag(notApplicableUnknownSeveritySource, "unknown (not applicable)") + "<br>"
}
Expand All @@ -70,6 +74,8 @@ func getApplicableIconTags(iconName IconName) string {
return GetIconTag(mediumSeveritySource, "medium") + "<br>"
case "low":
return GetIconTag(lowSeveritySource, "low") + "<br>"
case "scanned - no issues":
return GetIconTag(noIssuesSource, "scanned - no issues found") + "<br>"
}
return GetIconTag(unknownSeveritySource, "unknown") + "<br>"
}
Expand All @@ -84,6 +90,8 @@ func getSmallApplicableIconTags(iconName IconName) string {
return GetImgTag(smallMediumSeveritySource, "")
case "low":
return GetImgTag(smallLowSeveritySource, "")
case "scanned - no issues":
return GetImgTag(smallNoIssuesSource, "")
}
return GetImgTag(smallUnknownSeveritySource, "")
}
Expand Down
Loading