]> git.proxmox.com Git - pmg-gui.git/commitdiff
add ruleeditor
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 4 Apr 2017 11:48:48 +0000 (13:48 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 5 Apr 2017 04:41:10 +0000 (06:41 +0200)
this is the editwindow for the rules

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
js/RuleEditor.js [new file with mode: 0644]

diff --git a/js/RuleEditor.js b/js/RuleEditor.js
new file mode 100644 (file)
index 0000000..3ee030b
--- /dev/null
@@ -0,0 +1,47 @@
+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')
+       }
+    ],
+});