pmg-gui/js/VirusQuarantineOptions.js
Thomas Lamprecht 0012b5d8a2 fix indentation and code style for various Options grid
Line-count increases but that small cost is easily covered by easier
to read code and better git change tracking, which is shown line-wise
by default.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-26 11:36:57 +01:00

55 lines
1.2 KiB
JavaScript

Ext.define('PMG.VirusQuarantineOptions', {
extend: 'Proxmox.grid.ObjectGrid',
alias: ['widget.pmgVirusQuarantineOptions'],
monStoreErrors: true,
initComponent: function() {
var me = this;
me.add_integer_row('lifetime', gettext('Lifetime (days)'), {
minValue: 1,
defaultValue: 7,
deleteEmpty: true,
});
me.add_boolean_row('viewimages', gettext('View images'), {
defaultValue: 1,
});
me.add_boolean_row('allowhrefs', gettext('Allow HREFs'), {
defaultValue: 1,
});
var baseurl = '/config/virusquar';
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_quarantine',
},
interval: 5000,
cwidth1: 200,
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);
},
});