mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
M #-: Allow empty monitoring data (fresh VM) (#4644)
This commit is contained in:
parent
13040cb87a
commit
a8abef07cc
@ -245,7 +245,9 @@ class One2OneDriver
|
||||
|
||||
# take only last monitoring entry
|
||||
# TODO: verify timestamp is fresh
|
||||
data = data.map {|key, entries| [key, entries.last.last] }.to_h
|
||||
data = data.map do |key, entries|
|
||||
[key, entries.last.is_a?(Array) ? entries.last.last : 0]
|
||||
end.to_h
|
||||
|
||||
data = hash_to_template(data, '', '', "\n")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user