diff --git a/awx/ui/client/lib/components/tag/_index.less b/awx/ui/client/lib/components/tag/_index.less index d1b14a6893..5834c5208d 100644 --- a/awx/ui/client/lib/components/tag/_index.less +++ b/awx/ui/client/lib/components/tag/_index.less @@ -18,7 +18,6 @@ margin: 2px @at-space-2x; align-self: center; word-break: break-word; - text-transform: lowercase; &:hover, &:focus { diff --git a/awx/ui/client/lib/services/base-string.service.js b/awx/ui/client/lib/services/base-string.service.js index cab067700e..9ecf87b69b 100644 --- a/awx/ui/client/lib/services/base-string.service.js +++ b/awx/ui/client/lib/services/base-string.service.js @@ -58,6 +58,7 @@ function BaseStringService (namespace) { * the project. */ this.CANCEL = t.s('CANCEL'); + this.CLOSE = t.s('CLOSE'); this.SAVE = t.s('SAVE'); this.OK = t.s('OK'); this.NEXT = t.s('NEXT'); diff --git a/awx/ui/client/src/inventories-hosts/inventories/inventory.list.js b/awx/ui/client/src/inventories-hosts/inventories/inventory.list.js index c821221d28..4e8a0efc61 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/inventory.list.js +++ b/awx/ui/client/src/inventories-hosts/inventories/inventory.list.js @@ -19,7 +19,7 @@ export default ['i18n', function(i18n) { basePath: 'inventory', title: false, disableRow: "{{ inventory.pending_deletion }}", - disableRowValue: 'pending_deletion', + disableRowValue: 'inventory.pending_deletion', fields: { status: { diff --git a/awx/ui/client/src/scheduler/schedulerAdd.controller.js b/awx/ui/client/src/scheduler/schedulerAdd.controller.js index 8af2fd78b5..c5e04c5035 100644 --- a/awx/ui/client/src/scheduler/schedulerAdd.controller.js +++ b/awx/ui/client/src/scheduler/schedulerAdd.controller.js @@ -8,12 +8,12 @@ export default ['$filter', '$state', '$stateParams', '$http', 'Wait', '$scope', '$rootScope', 'CreateSelect2', 'ParseTypeChange', 'GetBasePath', 'Rest', 'ParentObject', 'JobTemplateModel', '$q', 'Empty', 'SchedulePost', 'ProcessErrors', 'SchedulerInit', '$location', 'PromptService', 'RRuleToAPI', 'moment', - 'WorkflowJobTemplateModel', 'TemplatesStrings', 'rbacUiControlService', + 'WorkflowJobTemplateModel', 'TemplatesStrings', 'rbacUiControlService', 'Alert', 'i18n', function($filter, $state, $stateParams, $http, Wait, $scope, $rootScope, CreateSelect2, ParseTypeChange, GetBasePath, Rest, ParentObject, JobTemplate, $q, Empty, SchedulePost, ProcessErrors, SchedulerInit, $location, PromptService, RRuleToAPI, moment, - WorkflowJobTemplate, TemplatesStrings, rbacUiControlService + WorkflowJobTemplate, TemplatesStrings, rbacUiControlService, Alert, i18n ) { var base = $scope.base || $location.path().replace(/^\//, '').split('/')[0], @@ -112,6 +112,14 @@ export default ['$filter', '$state', '$stateParams', '$http', 'Wait', .then((responses) => { let launchConf = responses[1].data; + if (launchConf.passwords_needed_to_start && + launchConf.passwords_needed_to_start.length > 0 && + !launchConf.ask_credential_on_launch + ) { + Alert(i18n._('Warning'), i18n._('This Job Template has a default credential that requires a password before launch. Adding or editing schedules is prohibited while this credential is selected. To add or edit a schedule, credentials that require a password must be removed from the Job Template.'), 'alert-info'); + $state.go('^', { reload: true }); + } + let watchForPromptChanges = () => { let promptValuesToWatch = [ 'promptData.prompts.inventory.value', @@ -156,7 +164,6 @@ export default ['$filter', '$state', '$stateParams', '$http', 'Wait', !launchConf.survey_enabled && !launchConf.credential_needed_to_start && !launchConf.inventory_needed_to_start && - launchConf.passwords_needed_to_start.length === 0 && launchConf.variables_needed_to_start.length === 0) { $scope.showPromptButton = false; } else { diff --git a/awx/ui/client/src/scheduler/schedulerEdit.controller.js b/awx/ui/client/src/scheduler/schedulerEdit.controller.js index 9a981d352a..6d63b04361 100644 --- a/awx/ui/client/src/scheduler/schedulerEdit.controller.js +++ b/awx/ui/client/src/scheduler/schedulerEdit.controller.js @@ -1,11 +1,11 @@ export default ['$filter', '$state', '$stateParams', 'Wait', '$scope', 'moment', '$rootScope', '$http', 'CreateSelect2', 'ParseTypeChange', 'ParentObject', 'ProcessErrors', 'Rest', 'GetBasePath', 'SchedulerInit', 'SchedulePost', 'JobTemplateModel', '$q', 'Empty', 'PromptService', 'RRuleToAPI', -'WorkflowJobTemplateModel', 'TemplatesStrings', 'scheduleResolve', 'timezonesResolve', +'WorkflowJobTemplateModel', 'TemplatesStrings', 'scheduleResolve', 'timezonesResolve', 'Alert', 'i18n', function($filter, $state, $stateParams, Wait, $scope, moment, $rootScope, $http, CreateSelect2, ParseTypeChange, ParentObject, ProcessErrors, Rest, GetBasePath, SchedulerInit, SchedulePost, JobTemplate, $q, Empty, PromptService, RRuleToAPI, - WorkflowJobTemplate, TemplatesStrings, scheduleResolve, timezonesResolve + WorkflowJobTemplate, TemplatesStrings, scheduleResolve, timezonesResolve, Alert, i18n ) { let schedule, scheduler, scheduleCredentials = []; @@ -249,8 +249,15 @@ function($filter, $state, $stateParams, Wait, $scope, moment, .then((responses) => { let launchOptions = responses[0].data, launchConf = responses[1].data; + scheduleCredentials = responses[2].data.results; - scheduleCredentials = responses[2].data.results; + if (launchConf.passwords_needed_to_start && + launchConf.passwords_needed_to_start.length > 0 && + !launchConf.ask_credential_on_launch + ) { + Alert(i18n._('Warning'), i18n._('This Job Template has a default credential that requires a password before launch. Adding or editing schedules is prohibited while this credential is selected. To add or edit a schedule, credentials that require a password must be removed from the Job Template.'), 'alert-info'); + $scope.credentialRequiresPassword = true; + } let watchForPromptChanges = () => { let promptValuesToWatch = [ diff --git a/awx/ui/client/src/scheduler/schedulerForm.partial.html b/awx/ui/client/src/scheduler/schedulerForm.partial.html index d3bfd2f249..6b89b335df 100644 --- a/awx/ui/client/src/scheduler/schedulerForm.partial.html +++ b/awx/ui/client/src/scheduler/schedulerForm.partial.html @@ -28,7 +28,7 @@ name="schedulerName" id="schedulerName" ng-model="schedulerName" required - ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)" + ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd) || credentialRequiresPassword" placeholder="Schedule name">