add matchfield and contenttype rules

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2017-09-11 13:23:51 +02:00 committed by Dietmar Maurer
parent a32c09e62d
commit 3a9b95a74a
2 changed files with 59 additions and 1 deletions

View File

@ -91,6 +91,6 @@ Ext.define('PMG.WhatConfiguration', {
xtype: 'pmgWhatConfiguration',
ogclass: 'what',
otype_list: []
otype_list: [3002, 3003]
});

View File

@ -208,6 +208,64 @@ Ext.define('PMG.Utils', {
}
]
},
3002: {
xtype: 'proxmoxWindowEdit',
subdir: 'matchfield',
subject: gettext('Match Field'),
items: [
{
xtype: 'textfield',
name: 'field',
allowBlank: false,
fieldLabel: gettext('Field')
},
{
xtype: 'textfield',
name: 'value',
allowBlank: false,
fieldLabel: gettext('Value')
},
]
},
3003: {
xtype: 'proxmoxWindowEdit',
subdir: 'contenttype',
width: 400,
subject: gettext('Content Type'),
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,
},
]
},
4005: {
xtype: 'proxmoxWindowEdit',
subdir: 'bcc',