ui: fix undefined data for iodelay
if ios are 0 and io_ticks are defined, the io_delay is zero Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
0cf2b6441e
commit
e3efaa1972
@ -13,8 +13,10 @@ Ext.define('pve-rrd-datastore', {
|
||||
let ios = 0;
|
||||
if (data.read_ios !== undefined) { ios += data.read_ios; }
|
||||
if (data.write_ios !== undefined) { ios += data.write_ios; }
|
||||
if (ios == 0 || data.io_ticks === undefined) {
|
||||
if (data.io_ticks === undefined) {
|
||||
return undefined;
|
||||
} else if (ios === 0) {
|
||||
return 0;
|
||||
}
|
||||
return (data.io_ticks*1000.0)/ios;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user