projects
/
proxmox-widget-toolkit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82327ac
)
ProxmoxProxy: add duration fields for proxmox-tasks
author
Dominik Csapak
<d.csapak@proxmox.com>
Mon, 15 Jun 2020 14:07:08 +0000
(16:07 +0200)
committer
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Tue, 16 Jun 2020 07:55:17 +0000
(09:55 +0200)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/data/ProxmoxProxy.js
patch
|
blob
|
blame
|
history
diff --git
a/src/data/ProxmoxProxy.js
b/src/data/ProxmoxProxy.js
index 53e92f3126d38c0f73613550122b97911763c3ba..7df8f286aef32e26d34326523f5d8f4074080ac6 100644
(file)
--- a/
src/data/ProxmoxProxy.js
+++ b/
src/data/ProxmoxProxy.js
@@
-43,6
+43,18
@@
Ext.define('Proxmox.RestProxy', {
{ name: 'starttime', type: 'date', dateFormat: 'timestamp' },
{ name: 'endtime', type: 'date', dateFormat: 'timestamp' },
{ name: 'pid', type: 'int' },
+ {
+ name: 'duration',
+ sortType: 'asInt',
+ calculate: function(data) {
+ let endtime = data.endtime;
+ let starttime = data.starttime;
+ if (endtime !== undefined) {
+ return (endtime - starttime)/1000;
+ }
+ return 0;
+ },
+ },
'node', 'upid', 'user', 'status', 'type', 'id',
],
idProperty: 'upid',