+ 3000: {
+ iconCls: 'fa fa-bullhorn',
+ xtype: 'proxmoxWindowEdit',
+ subdir: 'spamfilter',
+ subject: gettext('Spam Filter'),
+ items: [
+ {
+ xtype: 'proxmoxintegerfield',
+ name: 'spamlevel',
+ allowBlank: false,
+ minValue: 0,
+ fieldLabel: gettext('Level')
+ }
+ ]
+ },
+ 3001: {
+ iconCls: 'fa fa-bug',
+ xtype: 'proxmoxWindowEdit',
+ subdir: 'virusfilter',
+ subject: gettext('Virus Filter'),
+ uneditable: true,
+ // there are no parameters to give, so we simply submit it
+ listeners: {
+ show: function(win) {
+ win.submit();
+ }
+ }
+ },
+ 3002: {
+ iconCls: 'fa fa-code',
+ xtype: 'proxmoxWindowEdit',
+ subdir: 'matchfield',
+ subject: gettext('Match Field'),
+ width: 400,
+ items: [
+ {
+ xtype: 'textfield',
+ name: 'field',
+ labelWidth: 150,
+ allowBlank: false,
+ fieldLabel: gettext('Field')
+ },
+ {
+ xtype: 'textfield',
+ reference: 'value',
+ name: 'value',
+ labelWidth: 150,
+ allowBlank: false,
+ fieldLabel: gettext('Value')
+ },
+ {
+ labelWidth: 150,
+ fieldLabel: gettext('Test String'),
+ xtype: 'pmgRegexTester',
+ regexFieldReference: 'value'
+ }
+ ]
+ },
+ 3003: {
+ iconCls: 'fa fa-file-image-o',
+ xtype: 'proxmoxWindowEdit',
+ subdir: 'contenttype',
+ width: 400,
+ subject: gettext('Content Type Filter'),
+ items: [
+ {
+ xtype: 'combobox',
+ displayField: 'text',
+ labelWidth: 150,
+ valueField: 'mimetype',
+ name: 'contenttype',
+ editable: true,
+ queryMode: 'local',
+ store: {
+ autoLoad: true,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/config/mimetypes'
+ }
+ },
+ fieldLabel: gettext('Content Type'),
+ anyMatch: true,
+ matchFieldWidth: false,
+ listeners: {
+ change: function(cb, value) {
+ var me = this;
+ me.up().down('displayfield').setValue(value);
+ }
+ }
+ },
+ {
+ xtype: 'displayfield',
+ fieldLabel: gettext('Value'),
+ labelWidth: 150,
+ allowBlank: false,
+ reset: Ext.emptyFn
+ }
+ ]
+ },
+ 3004: {
+ iconCls: 'fa fa-file-o',
+ xtype: 'proxmoxWindowEdit',
+ subdir: 'filenamefilter',
+ width: 400,
+ subject: gettext('Match Filename'),
+ items: [
+ {
+ xtype: 'textfield',
+ name: 'filename',
+ reference: 'filename',
+ fieldLabel: gettext('Filename'),
+ labelWidth: 150,
+ allowBlank: false
+ },
+ {
+ labelWidth: 150,
+ fieldLabel: gettext('Test String'),
+ wholeMatch: true,
+ xtype: 'pmgRegexTester',
+ regexFieldReference: 'filename'
+ }
+ ]
+ },
+ 3005: {
+ iconCls: 'fa fa-file-archive-o',
+ xtype: 'proxmoxWindowEdit',
+ subdir: 'archivefilter',
+ width: 400,
+ subject: gettext('Archive Filter'),
+ items: [
+ {
+ xtype: 'combobox',
+ displayField: 'text',
+ labelWidth: 150,
+ valueField: 'mimetype',
+ name: 'contenttype',
+ editable: true,
+ queryMode: 'local',
+ store: {
+ autoLoad: true,
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/config/mimetypes'
+ }
+ },
+ fieldLabel: gettext('Content Type'),
+ anyMatch: true,
+ matchFieldWidth: false,
+ listeners: {
+ change: function(cb, value) {
+ var me = this;
+ me.up().down('displayfield').setValue(value);
+ }
+ }
+ },
+ {
+ xtype: 'displayfield',
+ fieldLabel: gettext('Value'),
+ labelWidth: 150,
+ allowBlank: false,
+ reset: Ext.emptyFn
+ }
+ ]
+ },
+ 4002: {
+ xtype: 'proxmoxWindowEdit',
+ subdir: 'notification',
+ subject: gettext('Notification'),
+ width: 400,
+ items: [
+ {
+ xtype: 'textfield',
+ name: 'name',
+ allowBlank: false,
+ fieldLabel: gettext('Name')
+ },
+ {
+ xtype: 'textareafield',
+ name: 'info',
+ fieldLabel: gettext("Description")
+ },
+ {
+ xtype: 'textfield',
+ name: 'to',
+ allowBlank: false,
+ value: '__ADMIN__',
+ fieldLabel: gettext('Receiver')
+ },
+ {
+ xtype: 'textfield',
+ name: 'subject',
+ allowBlank: false,
+ value: 'Notification: __SUBJECT__',
+ fieldLabel: gettext('Subject')
+ },
+ {
+ xtype: 'textarea',
+ name: 'body',
+ allowBlank: false,
+ grow: true,
+ growMax: 250,
+ value:
+ "Proxmox Notifcation:\n\n" +
+ "Sender: __SENDER__\n" +
+ "Receiver: __RECEIVERS__\n" +
+ "Targets: __TARGETS__\n\n" +
+ "Subject: __SUBJECT__\n\n" +
+ "Matching Rule: __RULE__\n\n" +
+ "__RULE_INFO__\n\n" +
+ "__VIRUS_INFO__\n" +
+ "__SPAM_INFO__\n",
+ fieldLabel: gettext('Body')
+ },
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'attach',
+ fieldLabel: gettext("Attach orig. Mail")
+ }
+ ]
+ },
+ 4003: {
+ xtype: 'proxmoxWindowEdit',
+ subdir: 'field',
+ subject: gettext('Header Attribute'),
+ width: 400,
+ items: [
+ {
+ xtype: 'textfield',
+ name: 'name',
+ allowBlank: false,
+ fieldLabel: gettext('Name')
+ },
+ {
+ xtype: 'textareafield',
+ name: 'info',
+ fieldLabel: gettext("Description")
+ },
+ {
+ xtype: 'textfield',
+ name: 'field',
+ allowBlank: false,
+ fieldLabel: gettext('Field')
+ },
+ {
+ xtype: 'textfield',
+ reference: 'value',
+ name: 'value',
+ allowBlank: false,
+ fieldLabel: gettext('Value')
+ }
+ ]
+ },