Implement new vulnerabilities and packages tabs.
Fixes https://github.com/coreos-inc/design/issues/268
This commit is contained in:
parent
c7904db30d
commit
ae9140caae
16 changed files with 1547 additions and 171 deletions
35
static/js/directives/ui/nvd-vectors-display.js
Normal file
35
static/js/directives/ui/nvd-vectors-display.js
Normal file
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* An element which displays NVD vectors is an expanded format.
|
||||
*/
|
||||
angular.module('quay').directive('nvdVectorsDisplay', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/nvd-vectors-display.html',
|
||||
replace: false,
|
||||
transclude: true,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'vectors': '@vectors',
|
||||
},
|
||||
controller: function($scope, $element, VulnerabilityService) {
|
||||
$scope.parsedVectors = VulnerabilityService.parseVectorsString($scope.vectors);
|
||||
|
||||
$scope.getVectorTitle = function(vector) {
|
||||
return VulnerabilityService.getVectorTitle(vector);
|
||||
};
|
||||
|
||||
$scope.getVectorDescription = function(vector) {
|
||||
return VulnerabilityService.getVectorDescription(vector);
|
||||
};
|
||||
|
||||
$scope.getVectorOptions = function(vectorString) {
|
||||
return VulnerabilityService.getVectorOptions(vectorString);
|
||||
};
|
||||
|
||||
$scope.getVectorClasses = function(option, vectorString) {
|
||||
return VulnerabilityService.getVectorClasses(option, vectorString);
|
||||
};
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
Reference in a new issue