Hide smart inv button when no hosts exist. Updated disassociate tooltip. Filtered out the target group when associating existing groups

This commit is contained in:
Michael Abashian 2017-06-23 09:14:09 -04:00
parent 6143d275d6
commit af31c7972c
3 changed files with 7 additions and 2 deletions

View File

@ -110,7 +110,7 @@ export default ['i18n', function(i18n) {
awToolTip: "Create a new Smart Inventory from search results.",
actionClass: 'btn List-buttonDefault',
buttonContent: 'SMART INVENTORY',
ngShow: 'canAdd',
ngShow: 'canAdd && (hosts.length > 0 || !(searchTags | isEmpty))',
dataPlacement: "top",
ngDisabled: '!enableSmartInventoryButton'
}

View File

@ -99,7 +99,7 @@ export default {
//label: 'Delete',
mode: 'all',
ngClick: "disassociateGroup(nested_group)",
awToolTip: 'Delete group',
awToolTip: 'Disassociate group',
dataPlacement: "top",
ngShow: "nested_group.summary_fields.user_capabilities.delete"
}

View File

@ -23,6 +23,11 @@
page_size: 5
};
if($state.params.group_id) {
$scope.associate_group_default_params.not__id = $state.params.group_id;
$scope.associate_group_queryset.not__id = $state.params.group_id;
}
let list = _.cloneDeep(GroupList);
list.basePath = GetBasePath('inventory') + $state.params.inventory_id + '/groups';
list.iterator = 'associate_group';