Search mac into SNMP port cache when an exact mac address is provided in host search bar

This commit is contained in:
emanuele-f 2018-04-03 23:30:14 +02:00
parent f19249bf70
commit b524106303
6 changed files with 29 additions and 33 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -504,8 +504,10 @@ String.prototype.sformat = function() {
/* Used while searching hosts a and macs with typeahead */
function makeFindHostBeforeSubmitCallback(http_prefix) {
return function(form, data) {
if (data.isMac)
if (data.type == "mac")
form.attr("action", http_prefix + "/lua/mac_details.lua");
else if (data.type == "snmp")
form.attr("action", http_prefix + "/lua/pro/enterprise/snmp_device_info.lua");
else
form.attr("action", http_prefix + "/lua/host_details.lua");