diff --git a/awx/ui/client/src/inventories/main.js b/awx/ui/client/src/inventories/main.js
index aa2b450332..8505c9b80f 100644
--- a/awx/ui/client/src/inventories/main.js
+++ b/awx/ui/client/src/inventories/main.js
@@ -25,7 +25,7 @@ angular.module('inventory', [
// This means inventoryManage states will not be registered correctly on page refresh, unless they're registered at the same time as the inventories state tree
let stateTree, inventories,
addGroup, editGroup, addHost, editHost,
- listSchedules, addSchedule, editSchedule,
+ listSchedules, addSchedule, editSchedule, adhocCredentialLookup,
stateDefinitions = stateDefinitionsProvider.$get(),
stateExtender = $stateExtenderProvider.$get();
@@ -195,6 +195,60 @@ angular.module('inventory', [
},
});
+ adhocCredentialLookup = {
+ searchPrefix: 'credential',
+ name: 'inventoryManage.adhoc.credential',
+ url: '/credential',
+ data: {
+ formChildState: true
+ },
+ params: {
+ credential_search: {
+ value: {
+ page_size: '5'
+ },
+ squash: true,
+ dynamic: true
+ }
+ },
+ ncyBreadcrumb: {
+ skip: true
+ },
+ views: {
+ 'related': {
+ templateProvider: function(ListDefinition, generateList) {
+ let list_html = generateList.build({
+ mode: 'lookup',
+ list: ListDefinition,
+ input_type: 'radio'
+ });
+ return `
Select the credential you want to use when ' + 'accessing the remote hosts to run the command. ' + diff --git a/awx/ui/client/src/shared/multi-select-list/select-list-item.directive.js b/awx/ui/client/src/shared/multi-select-list/select-list-item.directive.js index 068abb1fa7..4867c5e07c 100644 --- a/awx/ui/client/src/shared/multi-select-list/select-list-item.directive.js +++ b/awx/ui/client/src/shared/multi-select-list/select-list-item.directive.js @@ -30,7 +30,7 @@ export default item: '=item' }, require: '^multiSelectList', - template: '', + template: '', link: function(scope, element, attrs, multiSelectList) { scope.decoratedItem = multiSelectList.registerItem(scope.item);