[pve-devel] [PATCH manager 1/2] fix #1176: sort user/group/realm selector

Dominik Csapak d.csapak at proxmox.com
Wed Dec 7 15:41:49 CET 2016


this adds a default sort for the user, group and realmselector
so that the entries are in a consistent order

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/form/GroupSelector.js | 5 ++++-
 www/manager6/form/RoleSelector.js  | 5 ++++-
 www/manager6/form/UserSelector.js  | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/www/manager6/form/GroupSelector.js b/www/manager6/form/GroupSelector.js
index f243f3e..2db8e5a 100644
--- a/www/manager6/form/GroupSelector.js
+++ b/www/manager6/form/GroupSelector.js
@@ -28,7 +28,10 @@ Ext.define('PVE.form.GroupSelector', {
 	var me = this;
 
 	var store = new Ext.data.Store({
-	    model: 'pve-groups'
+	    model: 'pve-groups',
+	    sorters: [{
+		property: 'groupid'
+	    }]
 	});
 
 	Ext.apply(me, {
diff --git a/www/manager6/form/RoleSelector.js b/www/manager6/form/RoleSelector.js
index b9e7883..acef5f9 100644
--- a/www/manager6/form/RoleSelector.js
+++ b/www/manager6/form/RoleSelector.js
@@ -10,7 +10,10 @@ Ext.define('PVE.form.RoleSelector', {
 	var me = this;
 
 	var store = new Ext.data.Store({
-	    model: 'pve-roles'
+	    model: 'pve-roles',
+	    sorters: [{
+		property: 'roleid'
+	    }]
 	});
 
 	Ext.apply(me, {
diff --git a/www/manager6/form/UserSelector.js b/www/manager6/form/UserSelector.js
index c84cef4..c131b22 100644
--- a/www/manager6/form/UserSelector.js
+++ b/www/manager6/form/UserSelector.js
@@ -9,7 +9,10 @@ Ext.define('PVE.form.UserSelector', {
 	var me = this;
 
 	var store = new Ext.data.Store({
-	    model: 'pve-users'
+	    model: 'pve-users',
+	    sorters: [{
+		property: 'userid'
+	    }]
 	});
 
 	var render_full_name = function(firstname, metaData, record) {
-- 
2.1.4





More information about the pve-devel mailing list