pfsense/pfsense — pull request #943 by stilez (2014-02-19 02:57:54+00:00)
Title: AJAX-ify DNS lookups in standard firewall/filter

The standard firewall log has lookup ability but these open in a new tab/window, they don't show in the log, other places the same IP appears in the log aren't visibly resolved, - basically its begging for AJAX-ing.

This commit is simple, elegant, simplifies the interface, and does the following:

1) Handles AJAX efficiently, and should be pretty robust against untrustworthy data/bad return data
2) Retains the single "Click to resolve" icon (and its "hover" tip) next to each IP
3) On clicking:
- *all* visible log occurrences of that IP, whether as source or dest, display the resolved name (or "Cannot resolve") in font
- the "click to reslve" icons for all these occurrences are replaced by equivalent "faded" icons, and the onclick action and hover tip removed, which visually helps when scanning down the log

4) The "replace" functions use standard jQuery, which is already loaded anyway. Having tested, even on a log of several thousand entries it's an almost immediate response.

The log looks pretty elegant done this way - it doesn't "fill up with junk" in order to show the resolved lookup, and it's simpler and easier than the current version.

No obvious drawbacks.

(I've only done this for the standard filter log - I think the dynamic one could scroll too quickly for individual "item by item" to be useful)