[pmg-devel] [PATCH pmg-gui v2 1/1] add 'Match Archive Filename' to list of what objects

Dominik Csapak d.csapak at proxmox.com
Thu Apr 16 10:59:41 CEST 2020


and add an editor for it

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 js/ObjectGroupConfiguration.js |  2 +-
 js/Utils.js                    | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/js/ObjectGroupConfiguration.js b/js/ObjectGroupConfiguration.js
index 390dbbd..1c1a81c 100644
--- a/js/ObjectGroupConfiguration.js
+++ b/js/ObjectGroupConfiguration.js
@@ -91,6 +91,6 @@ Ext.define('PMG.WhatConfiguration', {
     xtype: 'pmgWhatConfiguration',
 
     ogclass: 'what',
-    otype_list: [3000, 3001, 3002, 3003, 3004, 3005]
+    otype_list: [3000, 3001, 3002, 3003, 3004, 3005, 3006]
 });
 
diff --git a/js/Utils.js b/js/Utils.js
index 686441b..b96010f 100644
--- a/js/Utils.js
+++ b/js/Utils.js
@@ -464,6 +464,31 @@ Ext.define('PMG.Utils', {
 		}
 	    ]
 	},
+	3006: {
+	    onlineHelp: 'pmg_mailfilter_regex',
+	    iconCls: 'fa fa-file-archive-o',
+	    xtype: 'proxmoxWindowEdit',
+	    subdir: 'archivefilenamefilter',
+	    width: 400,
+	    subject: gettext('Match Archive 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'
+		}
+	    ]
+	},
 	4002: {
 	    onlineHelp: 'pmg_mailfilter_action',
 	    xtype: 'proxmoxWindowEdit',
-- 
2.20.1




More information about the pmg-devel mailing list