[pve-devel] [PATCH 08/18] add ruleeditor

Dominik Csapak d.csapak at proxmox.com
Tue Apr 4 13:48:48 CEST 2017


this is the editwindow for the rules

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 js/RuleEditor.js | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 js/RuleEditor.js

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





More information about the pve-devel mailing list