1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +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'; list.fields.name.columnClass = 'col-md-6 col-sm-6 col-xs-11';
break; break;
case 'Users': case 'Users':
list.querySet = { order_by: 'username', page_size: '5' };
list.fields = { list.fields = {
username: list.fields.username, username: list.fields.username,
first_name: list.fields.first_name, first_name: list.fields.first_name,
@ -161,10 +162,11 @@ export default ['addPermissionsTeamsList', 'addPermissionsUsersList', 'TemplateL
function optionsRequestDataProcessing(){ function optionsRequestDataProcessing(){
if(scope.list.name === 'users'){ if(scope.list.name === 'users'){
if (scope[list.name] !== undefined) { if (scope[list.name] !== undefined) {
scope[`${list.iterator}_queryset`] = list.querySet;
scope[list.name].forEach(function(item, item_idx) { scope[list.name].forEach(function(item, item_idx) {
var itm = scope[list.name][item_idx]; var itm = scope[list.name][item_idx];
if(itm.summary_fields.user_capabilities.edit){ if(itm.summary_fields.user_capabilities.edit){
// undefined doesn't render the tooltip, // undefined doesn't render the tooltip,
// which is intended here. // which is intended here.
itm.tooltip = undefined; itm.tooltip = undefined;
} }