1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Bug #3971: Fix values for ucpu & umem onevm columns

This commit is contained in:
Carlos Martín 2015-09-08 13:53:58 +02:00
parent 246395752c
commit 475e163ad1

View File

@ -243,11 +243,14 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
end
column :UCPU, "CPU percentage used by the VM", :size=>4 do |d|
d["CPU"]
cpu = d["MONITORING"]["CPU"]
cpu = "0" if cpu.nil?
cpu
end
column :UMEM, "Memory used by the VM", :size=>7 do |d|
OpenNebulaHelper.unit_to_str(d["MEMORY"].to_i, options)
OpenNebulaHelper.unit_to_str(d["MONITORING"]["MEMORY"].to_i, options)
end
column :HOST, "Host where the VM is running", :left, :size=>10 do |d|