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());
|
||||
};
|
||||
}
|
||||
}());
|
Reference in a new issue