mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-06-02 13:40:24 +00:00
add fetchmal configuration panel
This commit is contained in:
parent
6a2f908e59
commit
c37614f59a
84
js/FetchmailEdit.js
Normal file
84
js/FetchmailEdit.js
Normal file
@ -0,0 +1,84 @@
|
||||
Ext.define('PMG.FetchmailEdit', {
|
||||
extend: 'Proxmox.window.Edit',
|
||||
xtype: 'pmgFetchmailEdit',
|
||||
|
||||
userid: undefined,
|
||||
|
||||
isAdd: true,
|
||||
|
||||
subject: 'Fetchmail',
|
||||
|
||||
fieldDefaults: { labelWidth: 120 },
|
||||
|
||||
items: {
|
||||
xtype: 'inputpanel',
|
||||
column1: [
|
||||
{
|
||||
xtype: 'textfield',
|
||||
name: 'server',
|
||||
fieldLabel: gettext('Server'),
|
||||
allowBlank: false
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxintegerfield',
|
||||
name: 'port',
|
||||
fieldLabel: gettext('Port'),
|
||||
minValue: 1,
|
||||
maxValue: 65535,
|
||||
allowBlank: false
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
name: 'user',
|
||||
fieldLabel: gettext('Username'),
|
||||
allowBlank: false
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
name: 'pass',
|
||||
inputType: 'password',
|
||||
fieldLabel: gettext('Passsword'),
|
||||
allowBlank: false
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
name: 'target',
|
||||
fieldLabel: gettext('Deliver to'),
|
||||
allowBlank: false
|
||||
},
|
||||
|
||||
],
|
||||
column2: [
|
||||
{
|
||||
xtype: 'proxmoxcheckbox',
|
||||
fieldLabel: gettext('Enabled'),
|
||||
name: 'enable',
|
||||
uncheckedValue: 0,
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxintegerfield',
|
||||
name: 'interval',
|
||||
fieldLabel: gettext('Interval'),
|
||||
value: 1,
|
||||
minValue: 1,
|
||||
maxValue: 24*12*7,
|
||||
allowBlank: false
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxcheckbox',
|
||||
fieldLabel: gettext('Use SSL'),
|
||||
name: 'ssl',
|
||||
uncheckedValue: 0,
|
||||
checked: false
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxcheckbox',
|
||||
fieldLabel: gettext('Keep old mails'),
|
||||
name: 'keep',
|
||||
uncheckedValue: 0,
|
||||
checked: false
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
@ -17,6 +17,8 @@ Ext.define('PMG.FetchmailView', {
|
||||
extend: 'Ext.grid.GridPanel',
|
||||
xtype: 'pmgFetchmailView',
|
||||
|
||||
baseurl: '/api2/extjs/config/fetchmail',
|
||||
|
||||
store: {
|
||||
autoDestroy: true,
|
||||
autoLoad: true,
|
||||
@ -29,15 +31,30 @@ Ext.define('PMG.FetchmailView', {
|
||||
|
||||
init: function(view) {
|
||||
Proxmox.Utils.monStoreErrors(view, view.store, true);
|
||||
},
|
||||
|
||||
onEdit: function() {
|
||||
var view = this.getView();
|
||||
|
||||
var rec = view.selModel.getSelection()[0];
|
||||
|
||||
var win = Ext.create('PMG.FetchmailEdit', {
|
||||
userid: rec.data.id,
|
||||
url: view.baseurl + '/' + rec.data.id,
|
||||
method: 'PUT',
|
||||
autoLoad: true
|
||||
});
|
||||
win.on('destroy', function() { view.store.load(); });
|
||||
win.show();
|
||||
}
|
||||
},
|
||||
|
||||
listeners: {
|
||||
//scope: 'controller',
|
||||
//itemdblclick: 'onEdit',
|
||||
itemdblclick: 'onEdit',
|
||||
},
|
||||
|
||||
columns: [
|
||||
columns: [
|
||||
{
|
||||
header: gettext('Server'),
|
||||
flex: 1,
|
||||
|
@ -56,6 +56,7 @@ JSSRC= \
|
||||
LDAPConfig.js \
|
||||
UserEdit.js \
|
||||
UserView.js \
|
||||
FetchmailEdit.js \
|
||||
FetchmailView.js \
|
||||
UserManagement.js \
|
||||
ViewMailHeaders.js \
|
||||
|
@ -14,7 +14,7 @@ Ext.define('PMG.UserManagement', {
|
||||
xtype: "pmgUserView"
|
||||
},
|
||||
{
|
||||
title: gettext('LDAP'),
|
||||
title: 'LDAP',
|
||||
xtype: 'pmgLDAPConfig'
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user