(POOLER-132) Sync pool size on dashboard start

This commit updates the dashboard for vmpooler to ensure it is synchronized with any redis based configuration values before displaying the dashboard. Without this change the pool size value may be displayed incorrectly if the value has been set via the /config/poolsize API endpoint.
This commit is contained in:
kirby@puppetlabs.com 2018-10-03 13:07:20 -07:00
parent 9bc17a8935
commit 5704488cc5
3 changed files with 8 additions and 4 deletions

View file

@ -14,10 +14,6 @@ module Vmpooler
JSON.pretty_generate(result)
end
get '/' do
redirect to('/dashboard/')
end
# Load dashboard components
begin
require 'dashboard'

View file

@ -211,6 +211,11 @@ module Vmpooler
end
end
get '/' do
sync_pool_sizes
redirect to('/dashboard/')
end
# Provide run-time statistics
#
# Example: