Fix handling of non-features from Clair and other small UI fixes
This commit is contained in:
parent
5b7d6b0638
commit
65037ac5e1
8 changed files with 95 additions and 17 deletions
|
@ -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();
|
||||
};
|
||||
|
|
Reference in a new issue