1
0
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:
Jan Orel 2020-05-04 10:36:57 +02:00 committed by GitHub
parent 13040cb87a
commit a8abef07cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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")