[pve-devel] [PATCH manager 1/4] ext6migrate: fix Task History for nodes
Dominik Csapak
d.csapak at proxmox.com
Thu Feb 25 14:11:20 CET 2016
fixes include:
move static configuration to class declaration
use Ext.create instead of new for reload_task
use store.reload(), because store.filter() triggers no reload with
activated
remove store.guaranteeRange hack for infinite grid (works properly now)
since buffered: true is deprecated, use a BufferedStore instead
remove verticalScrollerType and invalidateScrollerOnRefresh
since this does not exist anymore in extjs6
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/node/Tasks.js | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/www/manager6/node/Tasks.js b/www/manager6/node/Tasks.js
index e76a982..6a73ef8 100644
--- a/www/manager6/node/Tasks.js
+++ b/www/manager6/node/Tasks.js
@@ -2,7 +2,9 @@ Ext.define('PVE.node.Tasks', {
extend: 'Ext.grid.GridPanel',
alias: ['widget.pveNodeTasks'],
-
+ stateful: false,
+ loadMask: true,
+ sortableColumns: false,
vmidFilter: 0,
initComponent : function() {
@@ -13,9 +15,9 @@ Ext.define('PVE.node.Tasks', {
throw "no node name specified";
}
- var store = Ext.create('Ext.data.Store', {
+ var store = Ext.create('Ext.data.BufferedStore', {
pageSize: 500,
- buffered: true,
+ autoLoad: true,
remoteFilter: true,
model: 'pve-tasks',
proxy: {
@@ -44,11 +46,9 @@ Ext.define('PVE.node.Tasks', {
updateProxyParams();
- // fixme: scroller update fails
- // http://www.sencha.com/forum/showthread.php?133677-scroller-does-not-adjust-to-the-filtered-grid-data&p=602887
- var reload_task = new Ext.util.DelayedTask(function() {
+ var reload_task = Ext.create('Ext.util.DelayedTask',function() {
updateProxyParams();
- store.filter();
+ store.reload();
});
var run_task_viewer = function() {
@@ -73,14 +73,10 @@ Ext.define('PVE.node.Tasks', {
Ext.apply(me, {
store: store,
- stateful: false,
- verticalScrollerType: 'paginggridscroller',
- loadMask: true,
- invalidateScrollerOnRefresh: false,
viewConfig: {
trackOver: false,
stripeRows: false, // does not work with getRowClass()
-
+
getRowClass: function(record, index) {
var status = record.get('status');
@@ -115,7 +111,6 @@ Ext.define('PVE.node.Tasks', {
}
}, ' '
],
- sortableColumns: false,
columns: [
{
header: gettext("Start Time"),
@@ -173,7 +168,6 @@ Ext.define('PVE.node.Tasks', {
me.callParent();
- store.guaranteeRange(0, store.pageSize - 1);
}
});
--
2.1.4
More information about the pve-devel
mailing list