lib/big_brother/app.rb in big_brother-0.5.0 vs lib/big_brother/app.rb in big_brother-0.6.0
- old
+ new
@@ -7,11 +7,11 @@
get "/" do
[200, <<-CONTENT]
Big Brother: #{BigBrother::VERSION}
Running:
-#{BigBrother.clusters.running.map { |cluster| "+ #{cluster}\n" }.join}
+#{BigBrother.clusters.running.map { |cluster| "+ #{cluster} - CombinedWeight: #{cluster.combined_weight}\n" }.join}
Stopped:
#{BigBrother.clusters.stopped.map { |cluster| "- #{cluster}\n" }.join}
CONTENT
end
@@ -20,10 +20,10 @@
halt 404, "Cluster #{name} not found" if @cluster.nil?
end
get "/cluster/:name" do |name|
@cluster.synchronize! unless @cluster.monitored?
- [200, "Running: #{@cluster.monitored?}"]
+ [200, "Running: #{@cluster.monitored?}\nCombinedWeight: #{@cluster.combined_weight}\n"]
end
put "/cluster/:name" do |name|
@cluster.synchronize!
halt 304 if @cluster.monitored?