M #-: Allow empty monitoring data (fresh VM) (#4644)

This commit is contained in:
Jan Orel authored and GitHub committed 2020-05-04 10:36:57 +02:00
1 parent 13040cb87a
commit a8abef07cc
1 file changed
+3 -1
+3 -1
View File
@@ -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")