1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Add value to $scope.querySet when in .users.add states

This commit is contained in:
Marliana Lara 2018-06-08 10:59:27 -04:00
parent 431ee9bbbf
commit 750f70c21f
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE

View File

@ -88,6 +88,7 @@ export default ['addPermissionsTeamsList', 'addPermissionsUsersList', 'TemplateL
list.fields.name.columnClass = 'col-md-6 col-sm-6 col-xs-11';
break;
case 'Users':
list.querySet = { order_by: 'username', page_size: '5' };
list.fields = {
username: list.fields.username,
first_name: list.fields.first_name,
@ -161,10 +162,11 @@ export default ['addPermissionsTeamsList', 'addPermissionsUsersList', 'TemplateL
function optionsRequestDataProcessing(){
if(scope.list.name === 'users'){
if (scope[list.name] !== undefined) {
scope[`${list.iterator}_queryset`] = list.querySet;
scope[list.name].forEach(function(item, item_idx) {
var itm = scope[list.name][item_idx];
if(itm.summary_fields.user_capabilities.edit){
// undefined doesn't render the tooltip,
// undefined doesn't render the tooltip,
// which is intended here.
itm.tooltip = undefined;
}