Fix handling of non-features from Clair and other small UI fixes

This commit is contained in:
Joseph Schorr 2016-03-04 18:07:44 -05:00
parent 5b7d6b0638
commit 65037ac5e1
8 changed files with 95 additions and 17 deletions

View file

@ -132,7 +132,11 @@ angular.module('quay').directive('imageFeatureView', function () {
if (data && data.Layer && data.Layer.Features) {
data.Layer.Features.forEach(function(feature) {
var imageId = feature.AddedBy.split('.')[0];
var imageId = null;
if (feature.AddedBy) {
imageId = feature.AddedBy.split('.')[0];
}
feature_obj = {
'name': feature.Name,
'namespace': feature.Namespace,
@ -268,11 +272,13 @@ angular.module('quay').directive('imageFeatureView', function () {
});
}
$scope.featureBreakdown.push({
'label': 'None',
'value': greenCount,
'color': '#2FC98E'
});
if (greenCount > 0) {
$scope.featureBreakdown.push({
'label': 'None',
'value': greenCount,
'color': '#2FC98E'
});
}
buildOrderedFeatures();
};