pmg-gui/js/RuleEditor.js
Dominik Csapak 1a7e73d192 add ruleeditor
this is the editwindow for the rules

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-04-05 06:41:10 +02:00

48 lines
902 B
JavaScript

Ext.define('PMG.RuleEditor', {
extend: 'Proxmox.window.Edit',
xtype: 'ruleeditwindow',
url: undefined,
method: 'PUT',
subject: gettext('Rules'),
width: 400,
items: [
{
xtype: 'textfield',
name: 'name',
allowBlank: false,
fieldLabel: gettext('Name')
},
{
xtype: 'proxmoxintegerfield',
name: 'priority',
allowBlank: false,
minValue: 0,
maxValue: 100,
fieldLabel: gettext('Priority')
},
{
xtype: 'proxmoxKVComboBox',
name: 'direction',
comboItems: [
[0, PMG.Utils.rule_direction_text[0]],
[1, PMG.Utils.rule_direction_text[1]],
[2, PMG.Utils.rule_direction_text[2]]],
value: 2,
fieldLabel: gettext('Direction')
},
{
xtype: 'proxmoxcheckbox',
name: 'active',
defaultValue: 0,
uncheckedValue: 0,
checked: false,
fieldLabel: gettext('Active')
}
],
});