Add defcon1 banner

Fixes #771
This commit is contained in:
Joseph Schorr 2015-11-20 16:13:50 -05:00
parent de9a0e51d3
commit 666114dea4
3 changed files with 20 additions and 2 deletions

View file

@ -36,6 +36,8 @@ angular.module('quay').directive('repoPanelTags', function () {
$scope.showingHistory = false;
$scope.tagsPerPage = 25;
$scope.imageVulnerabilities = {};
$scope.defcon1 = {};
$scope.hasDefcon1 = false;
var setTagState = function() {
if (!$scope.repository || !$scope.selectedTags) { return; }
@ -173,6 +175,11 @@ angular.module('quay').directive('repoPanelTags', function () {
};
resp.data.Vulnerabilities.forEach(function(v) {
if (VulnerabilityService.LEVELS[v.Priority].index == 0) {
$scope.defcon1[v.ID] = v;
$scope.hasDefcon1 = true;
}
if (VulnerabilityService.LEVELS[v.Priority].index < highest.index) {
highest = {
'Priority': v.Priority,