pmg-gui/js/VirusDetectorOptions.js
Stoiko Ivanov 9e9c9d2671 change display for 'archiveblockencrypted'
As described in the release notes of ClamAV 0.101.0 the legacy Option
ArchiveBlockEncrypted was used for blocking both encrypted archives _and_
documents. This patch reflects the change in the VirusDetectorOptions.

[0] https://blog.clamav.net/2018/12/clamav-01010-has-been-released.html

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-08-09 08:49:24 +02:00

64 lines
1.6 KiB
JavaScript

Ext.define('PMG.VirusDetectorOptions', {
extend: 'Proxmox.grid.ObjectGrid',
alias: ['widget.pmgVirusDetectorOptions'],
monStoreErrors: true,
initComponent : function() {
var me = this;
me.add_boolean_row('archiveblockencrypted',
gettext('Block encrypted archives and documents'));
me.add_integer_row('archivemaxrec', gettext('Max recursion'),
{ minValue: 1, defaultValue: 5,
deleteEmpty: true });
me.add_integer_row('archivemaxfiles', gettext('Max files'),
{ minValue: 0, defaultValue: 1000,
deleteEmpty: true });
me.add_integer_row('archivemaxsize', gettext('Max file size'),
{ minValue: 1000000, defaultValue: 25000000,
deleteEmpty: true });
me.add_integer_row('maxscansize', gettext('Max scan size'),
{ minValue: 1000000, defaultValue: 100000000,
deleteEmpty: true });
me.add_integer_row('maxcccount', gettext('Max credit card numbers'),
{ minValue: 0, defaultValue: 0,
deleteEmpty: true });
var baseurl = '/config/clamav';
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,
onlineHelp: 'pmgconfig_clamav_options'
},
interval: 5000,
cwidth1: 270,
listeners: {
itemdblclick: me.run_editor
}
});
me.callParent();
me.on('activate', me.rstore.startUpdate);
me.on('destroy', me.rstore.stopUpdate);
me.on('deactivate', me.rstore.stopUpdate);
}
});