mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
add to pool shortcut for interface and local network (#4093)
This commit is contained in:
parent
4608c52596
commit
d9bba4b4b2
4 changed files with 75 additions and 1 deletions
|
|
@ -20,6 +20,9 @@ local format_utils = require "format_utils"
|
|||
local top_talkers_utils = require "top_talkers_utils"
|
||||
local internals_utils = require "internals_utils"
|
||||
local page_utils = require("page_utils")
|
||||
local ui_utils = require("ui_utils")
|
||||
local interface_pools = require ("interface_pools")
|
||||
|
||||
|
||||
require "lua_utils"
|
||||
require "prefs_utils"
|
||||
|
|
@ -31,6 +34,7 @@ local recording_utils = require "recording_utils"
|
|||
local companion_interface_utils = require "companion_interface_utils"
|
||||
local storage_utils = require "storage_utils"
|
||||
|
||||
|
||||
local have_nedge = ntop.isnEdge()
|
||||
|
||||
if ntop.isPro() then
|
||||
|
|
@ -1411,6 +1415,7 @@ elseif(page == "config") then
|
|||
return
|
||||
end
|
||||
|
||||
local interface_pools_instance = interface_pools:create()
|
||||
local messages = {}
|
||||
|
||||
-- Flow dump check
|
||||
|
|
@ -1434,6 +1439,13 @@ elseif(page == "config") then
|
|||
end
|
||||
end
|
||||
|
||||
if _SERVER["REQUEST_METHOD"] == "POST" then
|
||||
-- bind interface to pool
|
||||
if (_POST["pool"]) then
|
||||
interface_pools_instance:bind_member(ifid, tonumber(_POST["pool"]))
|
||||
end
|
||||
end
|
||||
|
||||
if not table.empty(messages) then
|
||||
printMessageBanners(messages)
|
||||
print("<br>")
|
||||
|
|
@ -1460,6 +1472,16 @@ elseif(page == "config") then
|
|||
</td>
|
||||
</tr>]]
|
||||
|
||||
-- Interface Pool
|
||||
print([[
|
||||
<tr>
|
||||
<th>]].. i18n("pools.pool") ..[[</th>
|
||||
<td>
|
||||
]].. ui_utils.render_pools_dropdown(interface_pools_instance, ifid, "interface") ..[[
|
||||
</td>
|
||||
</tr>
|
||||
]])
|
||||
|
||||
-- Interface speed
|
||||
if not have_nedge then
|
||||
print[[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue