mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
fix broken host pool member page
This commit is contained in:
parent
385cc072f1
commit
cc7d923c58
1 changed files with 11 additions and 1 deletions
|
|
@ -13,7 +13,17 @@ local host_pools = require "host_pools"
|
|||
|
||||
local host_pool = host_pools:create()
|
||||
local all_pools = host_pools:get_all_pools()
|
||||
local pool_id_get = _GET["pool"] or all_pools[1].pool_id
|
||||
local pool_id_get = _GET["pool"]
|
||||
|
||||
-- if the _GET["pool"] is not defined then
|
||||
-- show the first host pool in the page
|
||||
-- otherwise it means there are no host pools and then
|
||||
-- show an alert
|
||||
if #all_pools > 0 and pool_id_get == nil then
|
||||
pool_id_get = all_pools[1].pool_id
|
||||
elseif #all_pools == 0 then
|
||||
pool_id_get = 0
|
||||
end
|
||||
|
||||
sendHTTPContentTypeHeader('text/html')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue