mirror of
https://github.com/ansible/awx.git
synced 2026-03-14 07:27:28 -02:30
Added logging, timeouts, changed dropdown labels, updated system section
This commit is contained in:
@@ -99,9 +99,9 @@ export default [
|
|||||||
|
|
||||||
var dropdownOptions = [
|
var dropdownOptions = [
|
||||||
{label: i18n._('Azure AD'), value: 'azure'},
|
{label: i18n._('Azure AD'), value: 'azure'},
|
||||||
{label: i18n._('Github'), value: 'github'},
|
{label: i18n._('GitHub'), value: 'github'},
|
||||||
{label: i18n._('Github Org'), value: 'github_org'},
|
{label: i18n._('GitHub Org'), value: 'github_org'},
|
||||||
{label: i18n._('Github Team'), value: 'github_team'},
|
{label: i18n._('GithHub Team'), value: 'github_team'},
|
||||||
{label: i18n._('Google OAuth2'), value: 'google_oauth'},
|
{label: i18n._('Google OAuth2'), value: 'google_oauth'},
|
||||||
{label: i18n._('LDAP'), value: 'ldap'},
|
{label: i18n._('LDAP'), value: 'ldap'},
|
||||||
{label: i18n._('RADIUS'), value: 'radius'},
|
{label: i18n._('RADIUS'), value: 'radius'},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="tab-pane Configuration-container" id="configuration_edit">
|
<div class="tab-pane Configuration-container" id="configuration_edit">
|
||||||
<!-- <div ui-view="form"></div>
|
<div class="Form-nav--dropdownContainer">
|
||||||
<div ng-cloak id="htmlTemplate"> -->
|
<div class="Form-nav--dropdownLabel">Sub Category</div>
|
||||||
<div class="Form-nav--dropdown">
|
<div class="Form-nav--dropdown">
|
||||||
<select
|
<select
|
||||||
id="configure-dropdown-nav"
|
id="configure-dropdown-nav"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
ng-options="opt.value as opt.label for opt in authVm.dropdownOptions"
|
ng-options="opt.value as opt.label for opt in authVm.dropdownOptions"
|
||||||
ng-change="authVm.activeForm()">
|
ng-change="authVm.activeForm()">
|
||||||
</select>
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
|
|||||||
@@ -21,11 +21,26 @@
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Form-nav--dropdown {
|
.Form-nav--dropdownContainer {
|
||||||
width: 175px;
|
width: 285px;
|
||||||
margin-top: -52px;
|
margin-top: -52px;
|
||||||
margin-bottom: 22px;
|
margin-bottom: 22px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-nav--dropdown {
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-nav--dropdownLabel {
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: @default-interface-txt;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
padding-right: 5px;
|
||||||
|
padding-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Form-tabRow {
|
.Form-tabRow {
|
||||||
|
|||||||
@@ -17,8 +17,10 @@ export default [
|
|||||||
'configurationLdapForm',
|
'configurationLdapForm',
|
||||||
'configurationRadiusForm',
|
'configurationRadiusForm',
|
||||||
'configurationSamlForm',
|
'configurationSamlForm',
|
||||||
|
'systemActivityStreamForm',
|
||||||
|
'systemLoggingForm',
|
||||||
|
'systemMiscForm',
|
||||||
'ConfigurationJobsForm',
|
'ConfigurationJobsForm',
|
||||||
'ConfigurationSystemForm',
|
|
||||||
'ConfigurationUiForm',
|
'ConfigurationUiForm',
|
||||||
function(
|
function(
|
||||||
$scope, $rootScope, $state, $stateParams, $timeout, $q, Alert, ClearScope,
|
$scope, $rootScope, $state, $stateParams, $timeout, $q, Alert, ClearScope,
|
||||||
@@ -33,8 +35,10 @@ export default [
|
|||||||
configurationLdapForm,
|
configurationLdapForm,
|
||||||
configurationRadiusForm,
|
configurationRadiusForm,
|
||||||
configurationSamlForm,
|
configurationSamlForm,
|
||||||
|
systemActivityStreamForm,
|
||||||
|
systemLoggingForm,
|
||||||
|
systemMiscForm,
|
||||||
ConfigurationJobsForm,
|
ConfigurationJobsForm,
|
||||||
ConfigurationSystemForm,
|
|
||||||
ConfigurationUiForm
|
ConfigurationUiForm
|
||||||
) {
|
) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
@@ -48,8 +52,10 @@ export default [
|
|||||||
'ldap': configurationLdapForm,
|
'ldap': configurationLdapForm,
|
||||||
'radius': configurationRadiusForm,
|
'radius': configurationRadiusForm,
|
||||||
'saml': configurationSamlForm,
|
'saml': configurationSamlForm,
|
||||||
|
'activity_stream': systemActivityStreamForm,
|
||||||
|
'logging': systemLoggingForm,
|
||||||
|
'misc': systemMiscForm,
|
||||||
'jobs': ConfigurationJobsForm,
|
'jobs': ConfigurationJobsForm,
|
||||||
'system': ConfigurationSystemForm,
|
|
||||||
'ui': ConfigurationUiForm
|
'ui': ConfigurationUiForm
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -84,19 +90,24 @@ export default [
|
|||||||
lastForm: '',
|
lastForm: '',
|
||||||
currentForm: '',
|
currentForm: '',
|
||||||
currentAuth: '',
|
currentAuth: '',
|
||||||
|
currentSystem: '',
|
||||||
setCurrent: function(form) {
|
setCurrent: function(form) {
|
||||||
this.lastForm = this.currentForm;
|
this.lastForm = this.currentForm;
|
||||||
this.currentForm = form;
|
this.currentForm = form;
|
||||||
},
|
},
|
||||||
setCurrentAuth: function(form) {
|
|
||||||
this.currentAuth = form;
|
|
||||||
this.setCurrent(this.currentAuth);
|
|
||||||
},
|
|
||||||
getCurrent: function() {
|
getCurrent: function() {
|
||||||
return this.currentForm;
|
return this.currentForm;
|
||||||
},
|
},
|
||||||
currentFormName: function() {
|
currentFormName: function() {
|
||||||
return 'configuration_' + this.currentForm + '_template_form';
|
return 'configuration_' + this.currentForm + '_template_form';
|
||||||
|
},
|
||||||
|
setCurrentAuth: function(form) {
|
||||||
|
this.currentAuth = form;
|
||||||
|
this.setCurrent(this.currentAuth);
|
||||||
|
},
|
||||||
|
setCurrentSystem: function(form) {
|
||||||
|
this.currentSystem = form;
|
||||||
|
this.setCurrent(this.currentSystem);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -182,6 +193,7 @@ export default [
|
|||||||
}
|
}
|
||||||
|
|
||||||
function active(setForm) {
|
function active(setForm) {
|
||||||
|
// Authentication and System's sub-module dropdowns handled first:
|
||||||
if (setForm === 'auth') {
|
if (setForm === 'auth') {
|
||||||
// Default to 'azure' on first load
|
// Default to 'azure' on first load
|
||||||
if (formTracker.currentAuth === '') {
|
if (formTracker.currentAuth === '') {
|
||||||
@@ -190,7 +202,15 @@ export default [
|
|||||||
// If returning to auth tab reset current form to previously viewed
|
// If returning to auth tab reset current form to previously viewed
|
||||||
formTracker.setCurrentAuth(formTracker.currentAuth);
|
formTracker.setCurrentAuth(formTracker.currentAuth);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (setForm === 'system') {
|
||||||
|
if (formTracker.currentSystem === '') {
|
||||||
|
formTracker.setCurrentSystem('misc');
|
||||||
|
} else {
|
||||||
|
// If returning to system tab reset current form to previously viewed
|
||||||
|
formTracker.setCurrentSystem(formTracker.currentSystem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
formTracker.setCurrent(setForm);
|
formTracker.setCurrent(setForm);
|
||||||
}
|
}
|
||||||
vm.activeTab = setForm;
|
vm.activeTab = setForm;
|
||||||
|
|||||||
@@ -46,7 +46,19 @@
|
|||||||
},
|
},
|
||||||
AWX_PROOT_ENABLED: {
|
AWX_PROOT_ENABLED: {
|
||||||
type: 'toggleSwitch',
|
type: 'toggleSwitch',
|
||||||
}
|
},
|
||||||
|
DEFAULT_JOB_TIMEOUT: {
|
||||||
|
type: 'text',
|
||||||
|
reset: 'DEFAULT_JOB_TIMEOUT',
|
||||||
|
},
|
||||||
|
DEFAULT_INVENTORY_UPDATE_TIMEOUT: {
|
||||||
|
type: 'text',
|
||||||
|
reset: 'DEFAULT_INVENTORY_UPDATE_TIMEOUT',
|
||||||
|
},
|
||||||
|
DEFAULT_PROJECT_UPDATE_TIMEOUT: {
|
||||||
|
type: 'text',
|
||||||
|
reset: 'DEFAULT_PROJECT_UPDATE_TIMEOUT',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
buttons: {
|
buttons: {
|
||||||
|
|||||||
@@ -20,8 +20,12 @@ import configurationLdapForm from './auth-form/sub-forms/auth-ldap.form.js';
|
|||||||
import configurationRadiusForm from './auth-form/sub-forms/auth-radius.form.js';
|
import configurationRadiusForm from './auth-form/sub-forms/auth-radius.form.js';
|
||||||
import configurationSamlForm from './auth-form/sub-forms/auth-saml.form';
|
import configurationSamlForm from './auth-form/sub-forms/auth-saml.form';
|
||||||
|
|
||||||
|
//system sub-forms
|
||||||
|
import systemActivityStreamForm from './system-form/sub-forms/system-activity-stream.form.js';
|
||||||
|
import systemLoggingForm from './system-form/sub-forms/system-logging.form.js';
|
||||||
|
import systemMiscForm from './system-form/sub-forms/system-misc.form.js';
|
||||||
|
|
||||||
import configurationJobsForm from './jobs-form/configuration-jobs.form';
|
import configurationJobsForm from './jobs-form/configuration-jobs.form';
|
||||||
import configurationSystemForm from './system-form/configuration-system.form';
|
|
||||||
import configurationUiForm from './ui-form/configuration-ui.form';
|
import configurationUiForm from './ui-form/configuration-ui.form';
|
||||||
|
|
||||||
export default
|
export default
|
||||||
@@ -36,10 +40,15 @@ angular.module('configuration', [])
|
|||||||
.factory('configurationLdapForm', configurationLdapForm)
|
.factory('configurationLdapForm', configurationLdapForm)
|
||||||
.factory('configurationRadiusForm', configurationRadiusForm)
|
.factory('configurationRadiusForm', configurationRadiusForm)
|
||||||
.factory('configurationSamlForm', configurationSamlForm)
|
.factory('configurationSamlForm', configurationSamlForm)
|
||||||
|
//system forms
|
||||||
|
.factory('systemActivityStreamForm', systemActivityStreamForm)
|
||||||
|
.factory('systemLoggingForm', systemLoggingForm)
|
||||||
|
.factory('systemMiscForm', systemMiscForm)
|
||||||
|
|
||||||
//other forms
|
//other forms
|
||||||
.factory('ConfigurationJobsForm', configurationJobsForm)
|
.factory('ConfigurationJobsForm', configurationJobsForm)
|
||||||
.factory('ConfigurationSystemForm', configurationSystemForm)
|
|
||||||
.factory('ConfigurationUiForm', configurationUiForm)
|
.factory('ConfigurationUiForm', configurationUiForm)
|
||||||
|
|
||||||
//helpers and services
|
//helpers and services
|
||||||
.factory('ConfigurationUtils', ConfigurationUtils)
|
.factory('ConfigurationUtils', ConfigurationUtils)
|
||||||
.service('ConfigurationService', configurationService)
|
.service('ConfigurationService', configurationService)
|
||||||
|
|||||||
@@ -5,22 +5,120 @@
|
|||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
'$rootScope', '$scope', '$state', 'AngularCodeMirror', 'Authorization', 'ConfigurationSystemForm', 'ConfigurationService',
|
'$rootScope', '$scope', '$state', '$stateParams',
|
||||||
'ConfigurationUtils', 'GenerateForm',
|
'AngularCodeMirror',
|
||||||
|
'systemActivityStreamForm',
|
||||||
|
'systemLoggingForm',
|
||||||
|
'systemMiscForm',
|
||||||
|
'ConfigurationService',
|
||||||
|
'ConfigurationUtils',
|
||||||
|
'CreateSelect2',
|
||||||
|
'GenerateForm',
|
||||||
|
'i18n',
|
||||||
function(
|
function(
|
||||||
$rootScope, $scope, $state, AngularCodeMirror, Authorization, ConfigurationSystemForm, ConfigurationService, ConfigurationUtils, GenerateForm
|
$rootScope, $scope, $state, $stateParams,
|
||||||
|
AngularCodeMirror,
|
||||||
|
systemActivityStreamForm,
|
||||||
|
systemLoggingForm,
|
||||||
|
systemMiscForm,
|
||||||
|
ConfigurationService,
|
||||||
|
ConfigurationUtils,
|
||||||
|
CreateSelect2,
|
||||||
|
GenerateForm,
|
||||||
|
i18n
|
||||||
) {
|
) {
|
||||||
var systemVm = this;
|
var systemVm = this;
|
||||||
var generator = GenerateForm;
|
|
||||||
var form = ConfigurationSystemForm;
|
|
||||||
var keys = _.keys(form.fields);
|
|
||||||
|
|
||||||
_.each(keys, function(key) {
|
var generator = GenerateForm;
|
||||||
addFieldInfo(form, key);
|
var formTracker = $scope.$parent.vm.formTracker;
|
||||||
|
var dropdownValue = 'misc';
|
||||||
|
var activeSystemForm = 'misc';
|
||||||
|
|
||||||
|
if ($stateParams.currentTab === 'system') {
|
||||||
|
formTracker.setCurrentSystem(activeSystemForm);
|
||||||
|
}
|
||||||
|
|
||||||
|
var activeForm = function() {
|
||||||
|
if(!$scope.$parent[formTracker.currentFormName()].$dirty) {
|
||||||
|
systemVm.activeSystemForm = systemVm.dropdownValue;
|
||||||
|
formTracker.setCurrentSystem(systemVm.activeSystemForm);
|
||||||
|
} else {
|
||||||
|
var msg = i18n._('You have unsaved changes. Would you like to proceed <strong>without</strong> saving?');
|
||||||
|
var title = i18n._('Warning: Unsaved Changes');
|
||||||
|
var buttons = [{
|
||||||
|
label: i18n._('Discard changes'),
|
||||||
|
"class": "btn Form-cancelButton",
|
||||||
|
"id": "formmodal-cancel-button",
|
||||||
|
onClick: function() {
|
||||||
|
$scope.$parent.vm.populateFromApi();
|
||||||
|
$scope.$parent[formTracker.currentFormName()].$setPristine();
|
||||||
|
systemVm.activeSystemForm = systemVm.dropdownValue;
|
||||||
|
formTracker.setCurrentSystem(systemVm.activeSystemForm);
|
||||||
|
$('#FormModal-dialog').dialog('close');
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
label: i18n._('Save changes'),
|
||||||
|
onClick: function() {
|
||||||
|
$scope.$parent.vm.formSave()
|
||||||
|
.then(function() {
|
||||||
|
$scope.$parent[formTracker.currentFormName()].$setPristine();
|
||||||
|
$scope.$parent.vm.populateFromApi();
|
||||||
|
systemVm.activeSystemForm = systemVm.dropdownValue;
|
||||||
|
formTracker.setCurrentSystem(systemVm.activeSystemForm);
|
||||||
|
$('#FormModal-dialog').dialog('close');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
"class": "btn btn-primary",
|
||||||
|
"id": "formmodal-save-button"
|
||||||
|
}];
|
||||||
|
$scope.$parent.vm.triggerModal(msg, title, buttons);
|
||||||
|
}
|
||||||
|
formTracker.setCurrentSystem(systemVm.activeSystemForm);
|
||||||
|
};
|
||||||
|
|
||||||
|
var dropdownOptions = [
|
||||||
|
{label: i18n._('Misc. System'), value: 'misc'},
|
||||||
|
{label: i18n._('Activity Stream'), value: 'activity_stream'},
|
||||||
|
{label: i18n._('Logging'), value: 'logging'},
|
||||||
|
];
|
||||||
|
|
||||||
|
CreateSelect2({
|
||||||
|
element: '#system-configure-dropdown-nav',
|
||||||
|
multiple: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Disable the save button for system auditors
|
var systemForms = [{
|
||||||
form.buttons.save.disabled = $rootScope.user_is_system_auditor;
|
formDef: systemLoggingForm,
|
||||||
|
id: 'system-logging-form'
|
||||||
|
}, {
|
||||||
|
formDef: systemActivityStreamForm,
|
||||||
|
id: 'system-activity-stream-form'
|
||||||
|
}, {
|
||||||
|
formDef: systemMiscForm,
|
||||||
|
id: 'system-misc-form'
|
||||||
|
}];
|
||||||
|
|
||||||
|
var forms = _.pluck(systemForms, 'formDef');
|
||||||
|
_.each(forms, function(form) {
|
||||||
|
var keys = _.keys(form.fields);
|
||||||
|
_.each(keys, function(key) {
|
||||||
|
if($scope.$parent.configDataResolve[key].type === 'choice') {
|
||||||
|
// Create options for dropdowns
|
||||||
|
var optionsGroup = key + '_options';
|
||||||
|
$scope.$parent[optionsGroup] = [];
|
||||||
|
_.each($scope.$parent.configDataResolve[key].choices, function(choice){
|
||||||
|
$scope.$parent[optionsGroup].push({
|
||||||
|
name: choice[0],
|
||||||
|
label: choice[1],
|
||||||
|
value: choice[0]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
addFieldInfo(form, key);
|
||||||
|
});
|
||||||
|
// Disable the save button for system auditors
|
||||||
|
form.buttons.save.disabled = $rootScope.user_is_system_auditor;
|
||||||
|
});
|
||||||
|
|
||||||
function addFieldInfo(form, key) {
|
function addFieldInfo(form, key) {
|
||||||
_.extend(form.fields[key], {
|
_.extend(form.fields[key], {
|
||||||
@@ -29,21 +127,56 @@ export default [
|
|||||||
name: key,
|
name: key,
|
||||||
toggleSource: key,
|
toggleSource: key,
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
|
placeholder: ConfigurationUtils.formatPlaceholder($scope.$parent.configDataResolve[key].placeholder, key) || null,
|
||||||
dataTitle: $scope.$parent.configDataResolve[key].label,
|
dataTitle: $scope.$parent.configDataResolve[key].label,
|
||||||
required: $scope.$parent.configDataResolve[key].required,
|
required: $scope.$parent.configDataResolve[key].required,
|
||||||
ngDisabled: $rootScope.user_is_system_auditor
|
ngDisabled: $rootScope.user_is_system_auditor
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
generator.inject(form, {
|
$scope.$parent.parseType = 'json';
|
||||||
id: 'configure-system-form',
|
|
||||||
mode: 'edit',
|
_.each(systemForms, function(form) {
|
||||||
scope: $scope.$parent,
|
generator.inject(form.formDef, {
|
||||||
related: true
|
id: form.id,
|
||||||
|
mode: 'edit',
|
||||||
|
scope: $scope.$parent,
|
||||||
|
related: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var dropdownRendered = false;
|
||||||
|
|
||||||
|
$scope.$on('populated', function() {
|
||||||
|
|
||||||
|
var opts = [];
|
||||||
|
if($scope.$parent.LOG_AGGREGATOR_TYPE !== null) {
|
||||||
|
_.each(ConfigurationUtils.listToArray($scope.$parent.LOG_AGGREGATOR_TYPE), function(type) {
|
||||||
|
opts.push({
|
||||||
|
id: type,
|
||||||
|
text: type
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!dropdownRendered) {
|
||||||
|
dropdownRendered = true;
|
||||||
|
CreateSelect2({
|
||||||
|
element: '#configuration_logging_template_LOG_AGGREGATOR_TYPE',
|
||||||
|
multiple: true,
|
||||||
|
placeholder: i18n._('Select types'),
|
||||||
|
opts: opts
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
angular.extend(systemVm, {
|
angular.extend(systemVm, {
|
||||||
|
activeForm: activeForm,
|
||||||
|
activeSystemForm: activeSystemForm,
|
||||||
|
dropdownOptions: dropdownOptions,
|
||||||
|
dropdownValue: dropdownValue,
|
||||||
|
systemForms: systemForms
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,9 +1,34 @@
|
|||||||
<div class="tab-pane Configuration-container">
|
<div class="tab-pane Configuration-container">
|
||||||
<!-- <div ui-view="form"></div>
|
<div class="Form-nav--dropdownContainer">
|
||||||
<div ng-cloak id="htmlTemplate"> -->
|
<div class="Form-nav--dropdownLabel">Sub Category</div>
|
||||||
|
<div class="Form-nav--dropdown">
|
||||||
|
<select
|
||||||
|
id="system-configure-dropdown-nav"
|
||||||
|
class="form-control"
|
||||||
|
ng-model="systemVm.dropdownValue"
|
||||||
|
ng-options="opt.value as opt.label for opt in systemVm.dropdownOptions"
|
||||||
|
ng-change="systemVm.activeForm()">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div id="configure-system-form"></div>
|
<!-- <div id="configure-system-form"></div> -->
|
||||||
|
<div ng-show="systemVm.activeSystemForm === 'misc'">
|
||||||
|
<div id="system-misc-form">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div ng-show="systemVm.activeSystemForm === 'activity_stream'">
|
||||||
|
<div id="system-activity-stream-form">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div ng-show="systemVm.activeSystemForm === 'logging'">
|
||||||
|
<div id="system-logging-form">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*************************************************
|
||||||
|
* Copyright (c) 2016 Ansible, Inc.
|
||||||
|
*
|
||||||
|
* All Rights Reserved
|
||||||
|
*************************************************/
|
||||||
|
|
||||||
|
export default ['i18n', function(i18n) {
|
||||||
|
return {
|
||||||
|
name: 'configuration_activity_stream_template',
|
||||||
|
showActions: true,
|
||||||
|
showHeader: false,
|
||||||
|
|
||||||
|
fields: {
|
||||||
|
ACTIVITY_STREAM_ENABLED: {
|
||||||
|
type: 'toggleSwitch',
|
||||||
|
},
|
||||||
|
ACTIVITY_STREAM_ENABLED_FOR_INVENTORY_SYNC: {
|
||||||
|
type: 'toggleSwitch'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/*************************************************
|
||||||
|
* Copyright (c) 2016 Ansible, Inc.
|
||||||
|
*
|
||||||
|
* All Rights Reserved
|
||||||
|
*************************************************/
|
||||||
|
|
||||||
|
export default ['i18n', function(i18n) {
|
||||||
|
return {
|
||||||
|
name: 'configuration_logging_template',
|
||||||
|
showActions: true,
|
||||||
|
showHeader: false,
|
||||||
|
|
||||||
|
fields: {
|
||||||
|
LOG_AGGREGATOR_HOST: {
|
||||||
|
type: 'text',
|
||||||
|
reset: 'LOG_AGGREGATOR_HOST'
|
||||||
|
},
|
||||||
|
LOG_AGGREGATOR_PORT: {
|
||||||
|
type: 'text',
|
||||||
|
reset: 'LOG_AGGREGATOR_PORT'
|
||||||
|
},
|
||||||
|
LOG_AGGREGATOR_TYPE: {
|
||||||
|
type: 'select',
|
||||||
|
reset: 'LOG_AGGREGATOR_TYPE',
|
||||||
|
ngOptions: 'type.label for type in LOG_AGGREGATOR_TYPE_options track by type.value',
|
||||||
|
},
|
||||||
|
LOG_AGGREGATOR_USERNAME: {
|
||||||
|
type: 'text',
|
||||||
|
reset: 'LOG_AGGREGATOR_USERNAME'
|
||||||
|
},
|
||||||
|
LOG_AGGREGATOR_PASSWORD: {
|
||||||
|
type: 'text',
|
||||||
|
reset: 'LOG_AGGREGATOR_PASSWORD'
|
||||||
|
},
|
||||||
|
LOG_AGGREGATOR_LOGGERS: {
|
||||||
|
type: 'textarea',
|
||||||
|
reset: 'LOG_AGGREGATOR_PASSWORD'
|
||||||
|
},
|
||||||
|
LOG_AGGREGATOR_INDIVIDUAL_FACTS: {
|
||||||
|
type: 'toggleSwitch',
|
||||||
|
},
|
||||||
|
LOG_AGGREGATOR_ENABLED: {
|
||||||
|
type: 'toggleSwitch',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/*************************************************
|
||||||
|
* Copyright (c) 2016 Ansible, Inc.
|
||||||
|
*
|
||||||
|
* All Rights Reserved
|
||||||
|
*************************************************/
|
||||||
|
|
||||||
|
export default ['i18n', function(i18n) {
|
||||||
|
return {
|
||||||
|
showHeader: false,
|
||||||
|
name: 'configuration_misc_template',
|
||||||
|
showActions: true,
|
||||||
|
|
||||||
|
fields: {
|
||||||
|
TOWER_URL_BASE: {
|
||||||
|
type: 'text',
|
||||||
|
reset: 'TOWER_URL_BASE',
|
||||||
|
},
|
||||||
|
TOWER_ADMIN_ALERTS: {
|
||||||
|
type: 'toggleSwitch',
|
||||||
|
},
|
||||||
|
ORG_ADMINS_CAN_SEE_ALL_USERS: {
|
||||||
|
type: 'toggleSwitch',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
Reference in New Issue
Block a user