diff --git a/awx/ui/client/src/access/add-rbac-user-team/rbac-selected-list.directive.js b/awx/ui/client/src/access/add-rbac-user-team/rbac-selected-list.directive.js index 7a66606e5f..abc4031775 100644 --- a/awx/ui/client/src/access/add-rbac-user-team/rbac-selected-list.directive.js +++ b/awx/ui/client/src/access/add-rbac-user-team/rbac-selected-list.directive.js @@ -7,8 +7,10 @@ /* jshint unused: vars */ export default ['$compile','templateUrl', 'i18n', 'generateList', 'ProjectList', 'TemplateList', 'InventoryList', 'CredentialList', + 'OrganizationList', function($compile, templateUrl, i18n, generateList, - ProjectList, TemplateList, InventoryList, CredentialList) { + ProjectList, TemplateList, InventoryList, CredentialList, + OrganizationList) { return { restrict: 'E', scope: { @@ -24,7 +26,8 @@ export default ['$compile','templateUrl', 'i18n', 'generateList', job_templates: TemplateList, workflow_templates: TemplateList, inventories: InventoryList, - credentials: CredentialList + credentials: CredentialList, + organizations: OrganizationList }; list = _.cloneDeep(listMap[scope.resourceType]); @@ -63,6 +66,9 @@ export default ['$compile','templateUrl', 'i18n', 'generateList', break; case 'job_templates': + case 'workflow_templates': + case 'credentials': + case 'organizations': list.name = 'job_templates'; list.iterator = 'job_template'; list.fields = { @@ -72,25 +78,6 @@ export default ['$compile','templateUrl', 'i18n', 'generateList', list.fields.name.columnClass = 'col-md-5 col-sm-5 col-xs-10'; list.fields.description.columnClass = 'col-md-5 col-sm-5 hidden-xs'; break; - - case 'workflow_templates': - list.name = 'workflow_templates'; - list.iterator = 'workflow_template'; - list.basePath = 'workflow_job_templates'; - list.fields = { - name: list.fields.name, - description: list.fields.description - }; - list.fields.name.columnClass = 'col-md-5 col-sm-5 col-xs-10'; - list.fields.description.columnClass = 'col-md-5 col-sm-5 hidden-xs'; - break; - case 'credentials': - list.fields = { - name: list.fields.name, - description: list.fields.description - }; - list.fields.name.columnClass = 'col-md-5 col-sm-5 col-xs-10'; - list.fields.description.columnClass = 'col-md-5 col-sm-5 hidden-xs'; } list.fields = _.each(list.fields, (field) => field.nosort = true); diff --git a/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.controller.js b/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.controller.js index a97bd0218c..31021ec418 100644 --- a/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.controller.js +++ b/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.controller.js @@ -18,7 +18,7 @@ function(rootScope, scope, $state, i18n, CreateSelect2, GetBasePath, Rest, $q, W function init(){ - let resources = ['job_templates', 'workflow_templates', 'projects', 'inventories', 'credentials']; + let resources = ['job_templates', 'workflow_templates', 'projects', 'inventories', 'credentials', 'organizations']; // data model: // selected - keyed by type of resource @@ -43,7 +43,8 @@ function(rootScope, scope, $state, i18n, CreateSelect2, GetBasePath, Rest, $q, W workflow_templates: false, projects: false, inventories: false, - credentials: false + credentials: false, + organizations: false }; // initializes select2 per select field diff --git a/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.partial.html b/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.partial.html index f162e28c58..2bd31c170d 100644 --- a/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.partial.html +++ b/awx/ui/client/src/access/add-rbac-user-team/rbac-user-team.partial.html @@ -1,7 +1,8 @@