]> git.proxmox.com Git - pmg-gui.git/commitdiff
MailProxyTLS.js: add GUI to configure TLS
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 27 Feb 2017 08:11:50 +0000 (09:11 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 27 Feb 2017 08:11:50 +0000 (09:11 +0100)
js/MailProxyConfiguration.js
js/MailProxyTLS.js [new file with mode: 0644]
js/Makefile

index c000dc9bdbd31b73ac3c4858f221beda26712d06..1e99a7e3e4ac84c2d44517c0b224b4d47299d559 100644 (file)
@@ -31,7 +31,7 @@ Ext.define('PMG.MailProxyConfiguration', {
        },
        {
             title: gettext('TLS'),
-           html: "TLS"
+           xtype: 'pmgMailProxyTLS'
        },
        {
             title: gettext('Whitelist'),
diff --git a/js/MailProxyTLS.js b/js/MailProxyTLS.js
new file mode 100644 (file)
index 0000000..20ddd9b
--- /dev/null
@@ -0,0 +1,42 @@
+Ext.define('PMG.MailProxyTLS', {
+    extend: 'Proxmox.grid.ObjectGrid',
+    alias: ['widget.pmgMailProxyTLS'],
+
+    initComponent : function() {
+       var me = this;
+
+       me.add_boolean_row('tls', gettext('Enable TLS'));
+
+       me.add_boolean_row('tlslog', gettext('Enable TLS Logging'));
+
+       me.add_boolean_row('tlsheader', gettext('Add TLS received header'));
+
+       var baseurl = '/config/mail';
+
+       me.selModel = Ext.create('Ext.selection.RowModel', {});
+
+       Ext.apply(me, {
+           tbar: [{
+               text: gettext('Edit'),
+               xtype: 'proxmoxButton',
+               disabled: true,
+               handler: function() { me.run_editor() },
+               selModel: me.selModel
+           }],
+           url: '/api2/json' + baseurl,
+           editorConfig: {
+               url: '/api2/extjs' + baseurl,
+           },
+           interval: 5000,
+           cwidth1: 200,
+           listeners: {
+               itemdblclick: me.run_editor
+           }
+       });
+
+       me.callParent();
+
+       me.on('activate', me.rstore.startUpdate);
+       me.on('destroy', me.rstore.stopUpdate);
+    }
+});
index e35f3b1ff84413a75a61df33e4849bf2d4bf5945..6f22ffe4f5664e7d4039e7930c29e2e44543eb31 100644 (file)
@@ -7,6 +7,7 @@ JSSRC=                                                  \
        MailProxyRelaying.js                            \
        MailProxyPorts.js                               \
        MailProxyOptions.js                             \
+       MailProxyTLS.js                                 \
        Transport.js                                    \
        MyNetworks.js                                   \
        RelayDomains.js                                 \