Switch from an image view UI to a manifest view UI
We no longer allow viewing individual images, but instead only manifests. This will help with the transition to Clair V3 (which is manifest based) and, eventually, the the new data model (which will also be manifest based)
This commit is contained in:
parent
d41dcaae23
commit
fc6eb71ab1
24 changed files with 312 additions and 260 deletions
60
static/js/pages/manifest-view.js
Normal file
60
static/js/pages/manifest-view.js
Normal file
|
@ -0,0 +1,60 @@
|
|||
(function() {
|
||||
/**
|
||||
* Page to view the details of a single manifest.
|
||||
*/
|
||||
angular.module('quayPages').config(['pages', function(pages) {
|
||||
pages.create('manifest-view', 'manifest-view.html', ManifestViewCtrl, {
|
||||
'newLayout': true,
|
||||
'title': '{{ manifest_digest }}',
|
||||
'description': 'Manifest {{ manifest_digest }}'
|
||||
})
|
||||
}]);
|
||||
|
||||
function ManifestViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, ImageMetadataService, Features, CookieService) {
|
||||
var namespace = $routeParams.namespace;
|
||||
var name = $routeParams.name;
|
||||
var manifest_digest = $routeParams.manifest_digest;
|
||||
|
||||
$scope.manifestSecurityCounter = 0;
|
||||
$scope.manifestPackageCounter = 0;
|
||||
|
||||
$scope.options = {
|
||||
'vulnFilter': ''
|
||||
};
|
||||
|
||||
var loadManifest = function() {
|
||||
var params = {
|
||||
'repository': namespace + '/' + name,
|
||||
'manifestref': manifest_digest
|
||||
};
|
||||
|
||||
$scope.manifestResource = ApiService.getRepoManifestAsResource(params).get(function(manifest) {
|
||||
$scope.manifest = manifest;
|
||||
$scope.reversedHistory = manifest.image.history.reverse();
|
||||
});
|
||||
};
|
||||
|
||||
var loadRepository = function() {
|
||||
var params = {
|
||||
'repository': namespace + '/' + name
|
||||
};
|
||||
|
||||
$scope.repositoryResource = ApiService.getRepoAsResource(params).get(function(repo) {
|
||||
$scope.repository = repo;
|
||||
});
|
||||
};
|
||||
|
||||
loadManifest();
|
||||
loadRepository();
|
||||
|
||||
$scope.loadManifestSecurity = function() {
|
||||
if (!Features.SECURITY_SCANNER) { return; }
|
||||
$scope.manifestSecurityCounter++;
|
||||
};
|
||||
|
||||
$scope.loadManifestPackages = function() {
|
||||
if (!Features.SECURITY_SCANNER) { return; }
|
||||
$scope.manifestPackageCounter++;
|
||||
};
|
||||
}
|
||||
})();
|
Reference in a new issue