Add a roles directive and properly recolor the roles
This commit is contained in:
parent
1cd4fa8d9b
commit
a79b181496
6 changed files with 105 additions and 20 deletions
|
@ -436,6 +436,34 @@ quayApp.directive('entitySearch', function () {
|
|||
});
|
||||
|
||||
|
||||
quayApp.directive('roleGroup', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/role-group.html',
|
||||
replace: false,
|
||||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'roles': '=roles',
|
||||
'currentRole': '=currentRole',
|
||||
'roleChanged': '&roleChanged'
|
||||
},
|
||||
controller: function($scope, $element) {
|
||||
$scope.setRole = function(role) {
|
||||
$scope.currentRole = role;
|
||||
if ($scope.roleChanged) {
|
||||
if ($scope.changeParams) {
|
||||
$scope.changeParams();
|
||||
}
|
||||
$scope.roleChanged({'role': role});
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
||||
|
||||
|
||||
quayApp.directive('namespaceSelector', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
|
|
Reference in a new issue