diff --git a/awx/ui/client/src/access/rbac-multiselect/permissionsTeams.list.js b/awx/ui/client/src/access/rbac-multiselect/permissionsTeams.list.js index ae7bdd3d5d..8986478e85 100644 --- a/awx/ui/client/src/access/rbac-multiselect/permissionsTeams.list.js +++ b/awx/ui/client/src/access/rbac-multiselect/permissionsTeams.list.js @@ -25,8 +25,7 @@ label: 'organization', ngBind: 'team.summary_fields.organization.name', sourceModel: 'organization', - sourceField: 'name', - searchable: true + sourceField: 'name' } } diff --git a/awx/ui/client/src/dashboard/hosts/dashboard-hosts.list.js b/awx/ui/client/src/dashboard/hosts/dashboard-hosts.list.js index f439c0c859..dd4531c98e 100644 --- a/awx/ui/client/src/dashboard/hosts/dashboard-hosts.list.js +++ b/awx/ui/client/src/dashboard/hosts/dashboard-hosts.list.js @@ -42,8 +42,7 @@ export default [ 'i18n', function(i18n){ sourceModel: 'inventory', sourceField: 'name', columnClass: 'col-lg-5 col-md-4 col-sm-4 hidden-xs elllipsis', - linkTo: "{{ '/#/inventories/' + host.inventory_id }}", - searchable: false + linkTo: "{{ '/#/inventories/' + host.inventory_id }}" }, enabled: { label: i18n._('Status'), diff --git a/awx/ui/client/src/forms/Credentials.js b/awx/ui/client/src/forms/Credentials.js index 6a26c72d64..ccea4dca07 100644 --- a/awx/ui/client/src/forms/Credentials.js +++ b/awx/ui/client/src/forms/Credentials.js @@ -461,15 +461,13 @@ export default label: i18n._('Role'), type: 'role', noSort: true, - class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4', - searchable: false + class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4' }, team_roles: { label: i18n._('Team Roles'), type: 'team_roles', noSort: true, - class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4', - searchable: false + class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4' } } } diff --git a/awx/ui/client/src/forms/Organizations.js b/awx/ui/client/src/forms/Organizations.js index b50d7eeb3a..d8f12ea371 100644 --- a/awx/ui/client/src/forms/Organizations.js +++ b/awx/ui/client/src/forms/Organizations.js @@ -88,15 +88,13 @@ export default label: i18n._('Role'), type: 'role', noSort: true, - class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4', - searchable: false + class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4' }, team_roles: { label: i18n._('Team Roles'), type: 'team_roles', noSort: true, - class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4', - searchable: false + class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4' } } }, diff --git a/awx/ui/client/src/forms/Teams.js b/awx/ui/client/src/forms/Teams.js index 5ac0ee7aa1..3154dd42ed 100644 --- a/awx/ui/client/src/forms/Teams.js +++ b/awx/ui/client/src/forms/Teams.js @@ -98,8 +98,7 @@ export default label: i18n._('Role'), type: 'role', noSort: true, - class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4', - searchable: false + class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4' } } }, diff --git a/awx/ui/client/src/job-submission/job-submission.controller.js b/awx/ui/client/src/job-submission/job-submission.controller.js index 8a8215baef..49fb8b7640 100644 --- a/awx/ui/client/src/job-submission/job-submission.controller.js +++ b/awx/ui/client/src/job-submission/job-submission.controller.js @@ -63,9 +63,11 @@ export default [ '$scope', '$location', 'GetBasePath', 'Empty', 'Wait', 'Rest', 'ProcessErrors', - 'LaunchJob', '$state', 'generateList', 'InventoryList', 'CredentialList', 'ParseTypeChange', 'GetSurveyQuestions', + 'LaunchJob', '$state', 'generateList', 'InventoryList', 'CredentialList', 'ParseTypeChange', + 'GetSurveyQuestions', function($scope, $location, GetBasePath, Empty, Wait, Rest, ProcessErrors, - LaunchJob, $state, GenerateList, InventoryList, CredentialList, ParseTypeChange, GetSurveyQuestions) { + LaunchJob, $state, GenerateList, InventoryList, CredentialList, ParseTypeChange, + GetSurveyQuestions) { var launch_url; @@ -296,100 +298,10 @@ export default $scope.getListsAndSurvey = function() { if($scope.ask_inventory_on_launch) { - // @issue: OLD SEARCH - // var inventory_url = GetBasePath('inventory'); - - var invList = _.cloneDeep(InventoryList); - invList.fields.status.searchable = false; - invList.fields.organization.searchable = false; - invList.fields.has_inventory_sources.searchable = false; - invList.fields.has_active_failures.searchable = false; - invList.fields.inventory_sources_with_failures.searchable = false; - - GenerateList.inject(invList, { - mode: 'lookup', - id: 'job-submission-inventory-lookup', - scope: $scope, - input_type: 'radio' - }); - - // @issue: OLD SEARCH - // SearchInit({ - // scope: $scope, - // set: InventoryList.name, - // list: InventoryList, - // url: inventory_url - // }); - // - // PaginateInit({ - // scope: $scope, - // list: InventoryList, - // url: inventory_url, - // mode: 'lookup' - // }); - // - // $scope.search(InventoryList.iterator); - - $scope.$watchCollection('inventories', function () { - if($scope.selected_inventory) { - // Loop across the inventories and see if one of them should be "checked" - $scope.inventories.forEach(function(row, i) { - if (row.id === $scope.selected_inventory.id) { - $scope.inventories[i].checked = 1; - } - else { - $scope.inventories[i].checked = 0; - } - }); - } - }); + $scope.includeInventoryList = true; } if($scope.ask_credential_on_launch) { - // @issue: OLD SEARCH - // var credential_url = GetBasePath('credentials') + '?kind=ssh'; - - var credList = _.cloneDeep(CredentialList); - credList.basePath = GetBasePath('credentials') + '?kind=ssh'; - credList.fields.description.searchable = false; - credList.fields.kind.searchable = false; - - GenerateList.inject(credList, { - mode: 'lookup', - id: 'job-submission-credential-lookup', - scope: $scope, - input_type: 'radio' - }); - - // @issue: OLD SEARCH - // SearchInit({ - // scope: $scope, - // set: CredentialList.name, - // list: CredentialList, - // url: credential_url - // }); - // - // PaginateInit({ - // scope: $scope, - // list: CredentialList, - // url: credential_url, - // mode: 'lookup' - // }); - // - // $scope.search(CredentialList.iterator); - - $scope.$watchCollection('credentials', function () { - if($scope.selected_credential) { - // Loop across the inventories and see if one of them should be "checked" - $scope.credentials.forEach(function(row, i) { - if (row.id === $scope.selected_credential.id) { - $scope.credentials[i].checked = 1; - } - else { - $scope.credentials[i].checked = 0; - } - }); - } - }); + $scope.includeCredentialList = true; } if($scope.survey_enabled) { GetSurveyQuestions({ @@ -562,5 +474,14 @@ export default $scope.parseTypeChange('parseType', 'jobLaunchVariables'); }; + $scope.$on('inventorySelected', function(evt, selectedRow){ + $scope.selected_inventory = _.cloneDeep(selectedRow); + }); + + $scope.$on('credentialSelected', function(evt, selectedRow){ + $scope.selected_credential = _.cloneDeep(selectedRow); + updateRequiredPasswords(); + }); + } ]; diff --git a/awx/ui/client/src/job-submission/job-submission.partial.html b/awx/ui/client/src/job-submission/job-submission.partial.html index ed9b7ec620..d3c6689e1c 100644 --- a/awx/ui/client/src/job-submission/job-submission.partial.html +++ b/awx/ui/client/src/job-submission/job-submission.partial.html @@ -29,7 +29,7 @@ -
+