]>
Commit | Line | Data |
---|---|---|
b5d7e0ca DM |
1 | Ext.define('PMG.SpamDetectorOptions', { |
2 | extend: 'Proxmox.grid.ObjectGrid', | |
3 | alias: ['widget.pmgSpamDetectorOptions'], | |
4 | ||
5 | initComponent : function() { | |
6 | var me = this; | |
7 | ||
8 | me.add_boolean_row('use_awl', gettext('Use auto-whitelists'), | |
9 | { defaultValue: 1 }); | |
10 | ||
11 | me.add_boolean_row('use_bayes', gettext('Use Bayesian filter'), | |
12 | { defaultValue: 1 }); | |
13 | ||
14 | me.add_boolean_row('rbl_checks', gettext('Use RBL checks'), | |
15 | { defaultValue: 1 }); | |
16 | ||
dbda33bb DM |
17 | me.add_boolean_row('use_razor', gettext('Use Razor2 checks'), |
18 | { defaultValue: 1 }); | |
19 | ||
b5d7e0ca DM |
20 | me.add_integer_row('maxspamsize', gettext('Max Spam Size (bytes)'), |
21 | { defaultValue: 200*1024, | |
22 | minValue: 64, deleteEmpty: true }); | |
23 | ||
24 | var baseurl = '/config/spam'; | |
25 | ||
26 | me.selModel = Ext.create('Ext.selection.RowModel', {}); | |
27 | ||
28 | Ext.apply(me, { | |
29 | tbar: [{ | |
30 | text: gettext('Edit'), | |
31 | xtype: 'proxmoxButton', | |
32 | disabled: true, | |
33 | handler: function() { me.run_editor() }, | |
34 | selModel: me.selModel | |
35 | }], | |
36 | url: '/api2/json' + baseurl, | |
37 | editorConfig: { | |
38 | url: '/api2/extjs' + baseurl, | |
39 | }, | |
40 | interval: 5000, | |
41 | cwidth1: 200, | |
42 | listeners: { | |
43 | itemdblclick: me.run_editor | |
44 | } | |
45 | }); | |
46 | ||
47 | me.callParent(); | |
48 | ||
49 | me.on('activate', me.rstore.startUpdate); | |
50 | me.on('destroy', me.rstore.stopUpdate); | |
51 | } | |
52 | }); |