]> git.proxmox.com Git - pmg-gui.git/commitdiff
add virusfilter
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 12 Oct 2017 09:42:37 +0000 (11:42 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 13 Oct 2017 04:21:55 +0000 (06:21 +0200)
we now also disable the edit button if the objectgroup editor has an
'uneditable' flag set, we need this, because the virusfilter has nothing
which we could edit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
js/ObjectGroup.js
js/ObjectGroupConfiguration.js
js/Utils.js

index f47c2918926f6c51c3cbebae2ab40dbfca1b27dd..9db0191530dba9d45462effda5e6f62e28b8ef83 100644 (file)
@@ -138,7 +138,7 @@ Ext.define('PMG.ObjectGroup', {
            }
 
            var editor = PMG.Utils.object_editors[rec.data.otype];
-           if (!editor) {
+           if (!editor || editor.uneditable) {
                return;
            }
 
@@ -195,6 +195,10 @@ Ext.define('PMG.ObjectGroup', {
                    text: gettext('Edit'),
                    disabled: true,
                    selModel: me.selModel,
+                   enableFn: function(rec) {
+                       var editor = PMG.Utils.object_editors[rec.data.otype];
+                       return (editor && !editor.uneditable);
+                   },
                    handler: run_editor
                },
                remove_btn
index 03515fe5b6f2f93b64def73a8ae6226af6cb0391..390dbbda3ecdea46b5bf9f38812e7b3da0590fb0 100644 (file)
@@ -91,6 +91,6 @@ Ext.define('PMG.WhatConfiguration', {
     xtype: 'pmgWhatConfiguration',
 
     ogclass: 'what',
-    otype_list: [3000, 3002, 3003, 3004, 3005]
+    otype_list: [3000, 3001, 3002, 3003, 3004, 3005]
 });
 
index e8d43d4b94d4efe4b1f8a1453489bfcf05388f36..4becd5674c77df0967e51062bc9726c2ec64814c 100644 (file)
@@ -286,6 +286,18 @@ Ext.define('PMG.Utils', {
                }
            ]
        },
+       3001: {
+           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: {
            xtype: 'proxmoxWindowEdit',
            subdir: 'matchfield',