Host pools improvements

- Traffic Policy: get first available pool, not the "Not Assigned"
- Allow to change MAC address host pool from the MAC page
- When changing an IP address pool from the host page, change MAC address instead, if available
- Show the MAC manufacturer in the host pool memebers page and allow to set a filter with it
This commit is contained in:
emanuele-f 2017-05-22 12:47:10 +02:00
parent 1e4b0636ed
commit 4bc96c935a
11 changed files with 179 additions and 38 deletions

View file

@ -1685,3 +1685,28 @@ function printProtocolQuota(proto, ndpi_stats, category_stats, quotas_to_show, s
end
-- #################################################
function printPoolChangeDropdown(pool_id)
print[[<tr>
<th>]] print(i18n("host_config.host_pool")) print [[</th>
<td>
<form class="form-inline" style="margin-bottom: 0px; display:inline;" method="post">
<select name="pool" class="form-control" style="width:20em; display:inline;">]]
for _,pool in ipairs(host_pools_utils.getPoolsList(ifId)) do
print[[<option value="]] print(pool.id) print[["]]
if pool.id == pool_id then
print[[ selected]]
end
if pool.id == host_pools_utils.DEFAULT_POOL_ID then
print[[ disabled]]
end
print[[>]] print(pool.name) print[[</option>]]
end
print[[
</select>&nbsp;
<input id="csrf" name="csrf" type="hidden" value="]] print(ntop.getRandomCSRFValue()) print[[" />
<button type="submit" class="btn btn-default">]] print(i18n("save")) print[[</button>
</form>
</td>
</tr>]]
end