mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-22 20:54:49 +09:00
M #-: Allow empty monitoring data (fresh VM) (#4644)
This commit is contained in:
1 parent
13040cb87a
commit
a8abef07cc
1 file changed
+3
-1
@@ -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")
|
||||
|
||||
|
||||
Reference in new issue
Block a user