Commit e8b4b4ff authored by Dietmar Maurer's avatar Dietmar Maurer

add task history to VM panel

parent 01c47656
......@@ -43,6 +43,10 @@ __PACKAGE__->register_method({
type => 'string',
optional => 1,
},
vmid => get_standard_option('pve-vmid', {
description => "Only list tasks for this VM.",
optional => 1
}),
errors => {
type => 'boolean',
optional => 1,
......@@ -91,6 +95,8 @@ __PACKAGE__->register_method({
return if $errors && $status && $status eq 'OK';
return if $param->{vmid} && (!$task->{id} || $task->{id} ne $param->{vmid});
return if $count++ < $start;
return if $limit <= 0;
......
......@@ -3,6 +3,8 @@ Ext.define('PVE.node.Tasks', {
alias: ['widget.pveNodeTasks'],
vmidFilter: 0,
initComponent : function() {
var me = this;
......@@ -27,16 +29,25 @@ Ext.define('PVE.node.Tasks', {
var userfilter = '';
var filter_errors = 0;
// 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 updateProxyParams = function() {
var params = {
errors: filter_errors
};
if (userfilter) {
params.userfilter = userfilter;
}
if (me.vmidFilter) {
params.vmid = me.vmidFilter;
}
store.proxy.extraParams = params;
};
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() {
updateProxyParams();
store.filter();
});
......
......@@ -143,6 +143,12 @@ Ext.define('PVE.openvz.Config', {
itemId: 'options',
xtype: 'pveOpenVZOptions'
},
{
title: 'Task History',
itemId: 'tasks',
xtype: 'pveNodeTasks',
vmidFilter: vmid
},
{
title: 'UBC',
itemId: 'ubc',
......
......@@ -141,6 +141,12 @@ Ext.define('PVE.qemu.Config', {
title: gettext('Options'),
itemId: 'options',
xtype: 'PVE.qemu.Options'
},
{
title: 'Task History',
itemId: 'tasks',
xtype: 'pveNodeTasks',
vmidFilter: vmid
}
]
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment