[pve-devel] r6017 - pve-manager/pve2/www/new/node
svn-commits at proxmox.com
svn-commits at proxmox.com
Tue May 24 14:49:56 CEST 2011
Author: dietmar
Date: 2011-05-24 14:49:56 +0200 (Tue, 24 May 2011)
New Revision: 6017
Modified:
pve-manager/pve2/www/new/node/Tasks.js
Log:
add filters
Modified: pve-manager/pve2/www/new/node/Tasks.js
===================================================================
--- pve-manager/pve2/www/new/node/Tasks.js 2011-05-24 12:07:14 UTC (rev 6016)
+++ pve-manager/pve2/www/new/node/Tasks.js 2011-05-24 12:49:56 UTC (rev 6017)
@@ -46,25 +46,59 @@
var reload_task = new Ext.util.DelayedTask(function() {
var params = {
- // specify params for the first page load if using paging
- start: 0,
- limit: store.pageSize,
errors: filter_errors
};
if (userfilter)
params.userfilter = userfilter;
- store.baseParams = params;
+ store.proxy.extraParams = params;
ptbar.doRefresh();
});
- //reload_task.delay(10);
- store.loadPage(1);
+ reload_task.delay(10);
Ext.apply(me, {
store: store,
stateful: false,
bbar: ptbar,
+ viewConfig: {
+ trackOver: false,
+ stripeRows: false, // does not work with getRowClass()
+
+ getRowClass: function(record, index) {
+ var status = record.get('status');
+
+ if (status && status != 'OK')
+ return "x-form-invalid-field";
+ }
+ },
+ tbar: [
+ '->', 'User:', ' ',
+ {
+ xtype: 'textfield',
+ width: 200,
+ value: userfilter,
+ enableKeyEvents: true,
+ listeners: {
+ keyup: function(field, e) {
+ userfilter = field.getValue();
+ reload_task.delay(500);
+ }
+ }
+ }, ' ', 'Only Errors:', ' ',
+ {
+ xtype: 'checkbox',
+ hideLabel: true,
+ checked: filter_errors,
+ listeners: {
+ change: function(field, checked) {
+ filter_errors = checked ? 1 : 0;
+ reload_task.delay(10);
+ }
+ }
+ }
+ ],
+
columns: [
{
header: "Start Time", dataIndex: 'starttime',
More information about the pve-devel
mailing list