start GUI for general system configuration options

This commit is contained in:
Dietmar Maurer 2017-08-18 12:45:08 +02:00
parent ec92285424
commit fc7de588fd
3 changed files with 56 additions and 3 deletions

View File

@ -25,6 +25,7 @@ JSSRC= \
VersionInfo.js \
NavigationTree.js \
RuleConfiguration.js \
SystemOptions.js \
SystemConfiguration.js \
MailProxyRelaying.js \
MailProxyPorts.js \

View File

@ -91,9 +91,9 @@ Ext.define('PMG.SystemConfiguration', {
xtype: 'pmgRestoreSystemConfiguration'
},
{
itemId: 'reports',
title: gettext('Reports'),
html: "Reports"
itemId: 'options',
title: gettext('Options'),
xtype: 'pmgSystemOptions',
},
{
itemId: 'ssh',

52
js/SystemOptions.js Normal file
View File

@ -0,0 +1,52 @@
Ext.define('PMG.SystemOptions', {
extend: 'Proxmox.grid.ObjectGrid',
xtype: 'pmgSystemOptions',
monStoreErrors: true,
interval: 5000,
cwidth1: 200,
url: '/api2/json/config/admin',
editorConfig: {
url: '/api2/extjs/config/admin'
},
controller: {
xclass: 'Ext.app.ViewController',
onEdit: function() {
var me = this.getView();
me.run_editor();
}
},
tbar: [{
text: gettext('Edit'),
xtype: 'proxmoxButton',
disabled: true,
handler: 'onEdit'
}],
listeners: {
itemdblclick: 'onEdit',
},
initComponent : function() {
var me = this;
me.add_boolean_row('dailyreport', gettext('Send daily reports'),
{ defaultValue: 1});
me.add_integer_row('statlifetime', gettext('User statistic lifetime (days)'),
{ minValue: 1, defaultValue: 7, deleteEmpty: true });
me.add_text_row('email', gettext("Administrator EMail"),
{ deleteEmpty: true, defaultValue: Proxmox.Utils.noneText });
me.callParent();
me.on('activate', me.rstore.startUpdate);
me.on('destroy', me.rstore.stopUpdate);
}
})