remove type search field from single-type credential lookup modals, resolves #2976 (#2985)

This commit is contained in:
Leigh Johnson
2016-07-13 16:36:21 -04:00
committed by GitHub
parent 5c32b17aea
commit c60b8986de
6 changed files with 22 additions and 0 deletions

View File

@@ -391,6 +391,9 @@ export function ProjectsAdd(Refresh, $scope, $rootScope, $compile, $location, $l
defaultUrl = GetBasePath('projects'), defaultUrl = GetBasePath('projects'),
master = {}; master = {};
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
generator.inject(form, { mode: 'add', related: false, scope: $scope }); generator.inject(form, { mode: 'add', related: false, scope: $scope });
generator.reset(); generator.reset();
@@ -567,6 +570,10 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
id = $stateParams.id, id = $stateParams.id,
relatedSets = {}; relatedSets = {};
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
SchedulesList.well = false; SchedulesList.well = false;
generator.inject(form, { generator.inject(form, {
mode: 'edit', mode: 'edit',

View File

@@ -163,6 +163,8 @@ angular.module('JobTemplatesHelper', ['Utilities'])
}); });
CredentialList.basePath = GetBasePath('credentials') + '?kind=ssh'; CredentialList.basePath = GetBasePath('credentials') + '?kind=ssh';
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
LookUpInit({ LookUpInit({
url: GetBasePath('credentials') + '?kind=ssh', url: GetBasePath('credentials') + '?kind=ssh',

View File

@@ -12,6 +12,9 @@
var generator = GenerateForm, var generator = GenerateForm,
form = GroupForm(); form = GroupForm();
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
$scope.formCancel = function(){ $scope.formCancel = function(){
$state.go('^'); $state.go('^');
}; };

View File

@@ -13,6 +13,10 @@
GroupManageService, GetChoices, GetBasePath, CreateSelect2, GetSourceTypeOptions, groupData, inventorySourceData){ GroupManageService, GetChoices, GetBasePath, CreateSelect2, GetSourceTypeOptions, groupData, inventorySourceData){
var generator = GenerateForm, var generator = GenerateForm,
form = GroupForm(); form = GroupForm();
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
$scope.formCancel = function(){ $scope.formCancel = function(){
$state.go('^'); $state.go('^');
}; };

View File

@@ -34,6 +34,9 @@
base = $location.path().replace(/^\//, '').split('/')[0], base = $location.path().replace(/^\//, '').split('/')[0],
context = (base === 'job_templates') ? 'job_template' : 'inv'; context = (base === 'job_templates') ? 'job_template' : 'inv';
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
CallbackHelpInit({ scope: $scope }); CallbackHelpInit({ scope: $scope });
$scope.can_edit = true; $scope.can_edit = true;
generator.inject(form, { mode: 'add', related: false, scope: $scope }); generator.inject(form, { mode: 'add', related: false, scope: $scope });
@@ -82,6 +85,7 @@
NetworkCredentialList.iterator = 'networkcredential'; NetworkCredentialList.iterator = 'networkcredential';
NetworkCredentialList.basePath = '/api/v1/credentials?kind=net'; NetworkCredentialList.basePath = '/api/v1/credentials?kind=net';
SurveyControllerInit({ SurveyControllerInit({
scope: $scope, scope: $scope,
parent_scope: $scope parent_scope: $scope

View File

@@ -46,6 +46,8 @@ export default
checkSCMStatus, getPlaybooks, callback, checkSCMStatus, getPlaybooks, callback,
choicesCount = 0; choicesCount = 0;
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
CallbackHelpInit({ scope: $scope }); CallbackHelpInit({ scope: $scope });