optimize 'running' field

we do not need to check for qemu/lxc/node because the other types
do not have an uptime value

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2017-05-03 17:04:26 +02:00 committed by Dietmar Maurer
parent a0a3cd4112
commit 0d8fcbabd9

View File

@ -53,11 +53,7 @@ Ext.define('PVE.data.ResourceStore', {
hidden: true,
convert: function(value, record) {
var info = record.data;
if (info.type === 'qemu' || info.type === 'lxc' || info.type === 'node') {
return (Ext.isNumeric(info.uptime) && (info.uptime > 0));
} else {
return false;
}
return (Ext.isNumeric(info.uptime) && (info.uptime > 0));
}
},
text: {