]>
Commit | Line | Data |
---|---|---|
34c3efce DM |
1 | Ext.define('PMG.MailProxyRelaying', { |
2 | extend: 'Proxmox.grid.ObjectGrid', | |
3 | alias: ['widget.pmgMailProxyRelaying'], | |
4 | ||
5e453db7 DM |
5 | monStoreErrors: true, |
6 | ||
34c3efce DM |
7 | initComponent : function() { |
8 | var me = this; | |
9 | ||
5e72b93c | 10 | me.add_text_row('relay', gettext('Default Relay'), |
6ccd0a47 | 11 | { deleteEmpty: true, defaultValue: Proxmox.Utils.noneText }); |
dae26b95 DM |
12 | |
13 | me.add_integer_row('relayport', gettext('SMTP Port'), | |
14 | { defaultValue: 25, deleteEmpty: true, | |
15 | minValue: 1, maxValue: 65535 }); | |
34c3efce | 16 | |
5e72b93c | 17 | me.add_boolean_row('relaynomx', gettext('Disable MX lookup')); |
dae26b95 | 18 | |
5e72b93c | 19 | me.add_text_row('smarthost', gettext('Smarthost'), |
6ccd0a47 | 20 | { deleteEmpty: true, defaultValue: Proxmox.Utils.noneText }); |
34c3efce DM |
21 | |
22 | var baseurl = '/config/mail'; | |
23 | ||
d80ddaf7 DM |
24 | me.selModel = Ext.create('Ext.selection.RowModel', {}); |
25 | ||
34c3efce | 26 | Ext.apply(me, { |
d80ddaf7 DM |
27 | tbar: [{ |
28 | text: gettext('Edit'), | |
29 | xtype: 'proxmoxButton', | |
30 | disabled: true, | |
31 | handler: function() { me.run_editor() }, | |
32 | selModel: me.selModel | |
33 | }], | |
7bf889cb DM |
34 | url: '/api2/json' + baseurl, |
35 | editorConfig: { | |
36 | url: '/api2/extjs' + baseurl, | |
37 | }, | |
34c3efce | 38 | interval: 5000, |
7c876e16 | 39 | cwidth1: 200, |
34c3efce | 40 | listeners: { |
7bf889cb | 41 | itemdblclick: me.run_editor |
34c3efce DM |
42 | } |
43 | }); | |
44 | ||
45 | me.callParent(); | |
46 | ||
47 | me.on('activate', me.rstore.startUpdate); | |
48 | me.on('destroy', me.rstore.stopUpdate); | |
00564597 | 49 | me.on('deactivate', me.rstore.stopUpdate); |
34c3efce DM |
50 | } |
51 | }); |