api2/node/tasks: add optional since/typefilter/statusfilter

and change all users of the /status/tasks api call to this

with this change we can now delete the /status/tasks api call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2020-10-30 15:02:12 +01:00
committed by Thomas Lamprecht
parent e7dd169fdf
commit a2a7dd1535
3 changed files with 47 additions and 6 deletions

View File

@ -232,8 +232,9 @@ Ext.define('PBS.Dashboard', {
model: 'proxmox-tasks',
proxy: {
type: 'proxmox',
url: '/api2/json/status/tasks',
url: '/api2/json/nodes/localhost/tasks',
extraParams: {
limit: 0,
since: '{sinceEpoch}',
},
},

View File

@ -39,6 +39,7 @@ Ext.define('PBS.TaskSummary', {
let state = me.states[cellindex];
let type = me.types[rowindex];
let filterParam = {
limit: 0,
'statusfilter': state,
'typefilter': type,
};
@ -111,7 +112,7 @@ Ext.define('PBS.TaskSummary', {
model: 'proxmox-tasks',
proxy: {
type: 'proxmox',
url: "/api2/json/status/tasks",
url: "/api2/json/nodes/localhost/tasks",
},
},
});