From 8880188001da23a5f0960e3970c4eb9bbd448306 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Sun, 23 Feb 2014 19:11:29 +0200 Subject: Migrate to sinatra/puma from webrick As I can't do IO#select on sinatra/puma to run it when I have time, I have to run it on separate thread. This means Nodes container needs to be thread safe, it now has ghetto mutex locking, but I probably need to be be more focused what are the external methods that can be called and wrap those in @mutex.synchronize Provide also HTML UI not just JSON for ghetto UI to people who don't want to integrate --- lib/oxidized/node.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/oxidized/node.rb') diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb index 05a926c..6c7b3aa 100644 --- a/lib/oxidized/node.rb +++ b/lib/oxidized/node.rb @@ -58,12 +58,14 @@ module Oxidized def serialize h = { - :name => @name, - :ip => @ip, - :group => @group, - :model => @model.class.to_s, - :last => nil, + :name => @name, + :full_name => @name, + :ip => @ip, + :group => @group, + :model => @model.class.to_s, + :last => nil, } + h[:full_name] = [@group, @name].join('/') if @group if @last h[:last] = { :start => @last.start, -- cgit v1.2.1