ui: add RunningTasksStore

so that we have a global store for running tasks

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2020-07-09 13:38:20 +02:00
committed by Dietmar Maurer
parent bf7e2a4648
commit cc83c13660
4 changed files with 24 additions and 13 deletions

View File

@ -0,0 +1,21 @@
Ext.define('PBS.data.RunningTasksStore', {
extend: 'Proxmox.data.UpdateStore',
singleton: true,
constructor: function(config) {
let me = this;
config = config || {};
Ext.apply(config, {
interval: 3000,
storeid: 'pbs-running-tasks-dash',
model: 'proxmox-tasks',
proxy: {
type: 'proxmox',
// maybe separate api call?
url: '/api2/json/nodes/localhost/tasks?running=1',
},
});
me.callParent([config]);
},
});