mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 16:44:39 +00:00
api, dns / firewall live log. change output to associative array so we can easily map list of results. https://github.com/opnsense/core/issues/1788
This commit is contained in:
parent
632d887d9a
commit
557effd64a
@ -54,7 +54,7 @@ class DnsController extends ApiControllerBase
|
||||
}
|
||||
$result = array();
|
||||
foreach ($address as $addr) {
|
||||
$result[] = gethostbyaddr($addr);
|
||||
$result[$addr] = gethostbyaddr($addr);
|
||||
}
|
||||
return $result;
|
||||
} else {
|
||||
|
||||
@ -122,9 +122,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
$(this).unbind('click');
|
||||
$(".act_info_fld_src, .act_info_fld_dst").each(function(){
|
||||
var target_field = $(this);
|
||||
ajaxGet(url='/api/diagnostics/dns/reverse_lookup', {'address': $(this).text()}, callback=function(data, status) {
|
||||
if (Array.isArray(data)) {
|
||||
var resolv_output = data.join(',');
|
||||
ajaxGet(url='/api/diagnostics/dns/reverse_lookup', {'address': target_field.text()}, callback=function(data, status) {
|
||||
if (data[target_field.text()] != undefined) {
|
||||
var resolv_output = data[target_field.text()];
|
||||
if (target_field.text() != resolv_output) {
|
||||
target_field.text(target_field.text() + ' [' + resolv_output + ']');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user