Add experiment to hide the new Clair UI
This commit is contained in:
parent
09d8e643c0
commit
4c5c46aa8f
7 changed files with 241 additions and 3 deletions
19
static/js/pages/exp-new-sec-layout.js
Normal file
19
static/js/pages/exp-new-sec-layout.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
(function() {
|
||||
/**
|
||||
* Experiment enable page: New layout
|
||||
*/
|
||||
angular.module('quayPages').config(['pages', function(pages) {
|
||||
pages.create('exp-new-sec-layout', 'exp-new-sec-layout.html', ExpCtrl, {
|
||||
'newLayout': true
|
||||
});
|
||||
}]);
|
||||
|
||||
function ExpCtrl($scope, CookieService) {
|
||||
$scope.isEnabled = CookieService.get('quay.exp-new-sec-layout') == 'true';
|
||||
|
||||
$scope.setEnabled = function(value) {
|
||||
$scope.isEnabled = value;
|
||||
CookieService.putPermanent('quay.exp-new-sec-layout', value.toString());
|
||||
};
|
||||
}
|
||||
}());
|
|
@ -10,13 +10,15 @@
|
|||
})
|
||||
}]);
|
||||
|
||||
function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, ImageMetadataService, Features) {
|
||||
function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, ImageMetadataService, Features, CookieService) {
|
||||
var namespace = $routeParams.namespace;
|
||||
var name = $routeParams.name;
|
||||
var imageid = $routeParams.image;
|
||||
|
||||
$scope.imageSecurityCounter = 0;
|
||||
$scope.imagePackageCounter = 0;
|
||||
$scope.newUIExperiment = CookieService.get('quay.exp-new-sec-layout') == 'true';
|
||||
|
||||
$scope.options = {
|
||||
'vulnFilter': ''
|
||||
};
|
||||
|
|
Reference in a new issue