Merge pull request #4559 from kensible/4430-logging-dropdown-behavior

Fixed logging type dropdown, removed unused system form
This commit is contained in:
kensible 2017-01-04 12:00:40 -05:00 committed by GitHub
commit 448b066cfc
3 changed files with 9 additions and 56 deletions

View File

@ -5,7 +5,7 @@
*************************************************/
export default [
'$rootScope', '$scope', '$state', '$stateParams',
'$rootScope', '$scope', '$state', '$stateParams', '$timeout',
'AngularCodeMirror',
'systemActivityStreamForm',
'systemLoggingForm',
@ -16,7 +16,7 @@ export default [
'GenerateForm',
'i18n',
function(
$rootScope, $scope, $state, $stateParams,
$rootScope, $scope, $state, $stateParams, $timeout,
AngularCodeMirror,
systemActivityStreamForm,
systemLoggingForm,
@ -171,6 +171,12 @@ export default [
});
// Fix for bug where adding selected opts causes form to be $dirty and triggering modal
// TODO Find better solution for this bug
$timeout(function(){
$scope.$parent.configuration_logging_template_form.$setPristine();
}, 1000);
angular.extend(systemVm, {
activeForm: activeForm,
activeSystemForm: activeSystemForm,

View File

@ -1,54 +0,0 @@
/*************************************************
* Copyright (c) 2016 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
export default ['i18n', function(i18n) {
return {
showHeader: false,
name: 'configuration_system_template',
showActions: true,
fields: {
TOWER_URL_BASE: {
type: 'text',
reset: 'TOWER_URL_BASE',
},
TOWER_ADMIN_ALERTS: {
type: 'toggleSwitch',
},
ACTIVITY_STREAM_ENABLED: {
type: 'toggleSwitch',
},
ACTIVITY_STREAM_ENABLED_FOR_INVENTORY_SYNC: {
type: 'toggleSwitch'
},
ORG_ADMINS_CAN_SEE_ALL_USERS: {
type: 'toggleSwitch',
},
// LICENSE: {
// type: 'textarea',
// rows: 6,
// codeMirror: true,
// class: 'Form-textAreaLabel Form-formGroup--fullWidth'
// }
},
buttons: {
reset: {
ngClick: 'vm.resetAllConfirm()',
label: i18n._('Reset All'),
class: 'Form-button--left Form-cancelButton'
},
cancel: {
ngClick: 'vm.formCancel()',
},
save: {
ngClick: 'vm.formSave()',
ngDisabled: true
}
}
};
}
];

View File

@ -23,6 +23,7 @@
type: 'select',
reset: 'LOG_AGGREGATOR_TYPE',
ngOptions: 'type.label for type in LOG_AGGREGATOR_TYPE_options track by type.value',
multiSelect: true
},
LOG_AGGREGATOR_USERNAME: {
type: 'text',