]>
Commit | Line | Data |
---|---|---|
7bf889cb DM |
1 | Ext.define('PMG.MailProxyPorts', { |
2 | extend: 'Proxmox.grid.ObjectGrid', | |
3 | alias: ['widget.pmgMailProxyPorts'], | |
4 | ||
98d2cb7f DM |
5 | url: '/api2/json/config/mail', |
6 | ||
5e453db7 DM |
7 | monStoreErrors: true, |
8 | ||
98d2cb7f | 9 | editorConfig: { |
573a6e8b | 10 | url: '/api2/extjs/config/mail', |
c87d46fb | 11 | onlineHelp: 'pmgconfig_mailproxy_ports', |
98d2cb7f DM |
12 | }, |
13 | ||
14 | interval: 5000, | |
15 | ||
16 | cwidth1: 200, | |
17 | ||
18 | controller: { | |
19 | ||
20 | xclass: 'Ext.app.ViewController', | |
21 | ||
22 | onEdit: function() { | |
23 | this.getView().run_editor(); | |
c87d46fb | 24 | }, |
98d2cb7f DM |
25 | }, |
26 | ||
27 | listeners: { | |
c87d46fb | 28 | itemdblclick: 'onEdit', |
98d2cb7f DM |
29 | }, |
30 | ||
31 | tbar: [ | |
32 | { | |
33 | text: gettext('Edit'), | |
34 | xtype: 'proxmoxButton', | |
35 | disabled: true, | |
c87d46fb TL |
36 | handler: 'onEdit', |
37 | }, | |
98d2cb7f DM |
38 | ], |
39 | ||
c87d46fb | 40 | initComponent: function() { |
7bf889cb DM |
41 | var me = this; |
42 | ||
4fad6a19 | 43 | me.add_integer_row('ext_port', gettext('External SMTP Port'), |
c87d46fb TL |
44 | { |
45 | defaultValue: 25, deleteEmpty: true, | |
46 | minValue: 1, maxValue: 65535, | |
47 | }); | |
4fad6a19 DM |
48 | |
49 | me.add_integer_row('int_port', gettext('Internal SMTP Port'), | |
c87d46fb TL |
50 | { |
51 | defaultValue: 26, deleteEmpty: true, | |
52 | minValue: 1, maxValue: 65535, | |
53 | }); | |
7bf889cb | 54 | |
7bf889cb DM |
55 | me.callParent(); |
56 | ||
00564597 | 57 | me.on('activate', me.rstore.startUpdate); |
7bf889cb | 58 | me.on('destroy', me.rstore.stopUpdate); |
00564597 | 59 | me.on('deactivate', me.rstore.stopUpdate); |
c87d46fb | 60 | }, |
7bf889cb | 61 | }); |