[pve-devel] [PATCH] dc tasks grid : keep running tasks on top

Alexandre Derumier aderumier at odiso.com
Thu Jun 11 06:05:07 CEST 2015


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 www/manager/dc/Tasks.js | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/www/manager/dc/Tasks.js b/www/manager/dc/Tasks.js
index 25fd51b..7e34d68 100644
--- a/www/manager/dc/Tasks.js
+++ b/www/manager/dc/Tasks.js
@@ -12,18 +12,24 @@ Ext.define('PVE.dc.Tasks', {
 	    proxy: {
                 type: 'pve',
 		url: '/api2/json/cluster/tasks'
-	    },
+	    }
+	});
+
+	var store = Ext.create('PVE.data.DiffStore', { 
+	    rstore: taskstore,
+	    sortAfterUpdate: true,
+	    appendAtStart: true,
 	    sorters: [
 		{
+		    property : 'pid',
+		    direction: 'DESC'
+		},
+		{
 		    property : 'starttime',
 		    direction: 'DESC'
 		}
 	    ]
-	});
 
-	var store = Ext.create('PVE.data.DiffStore', { 
-	    rstore: taskstore,
-	    appendAtStart: true 
 	});
 
 	var run_task_viewer = function() {
@@ -128,4 +134,4 @@ Ext.define('PVE.dc.Tasks', {
 
 	me.callParent();
     }
-});
\ No newline at end of file
+});
-- 
2.1.4




More information about the pve-devel mailing list