m = Map("dawn", "Hearing Map", translate("Hearing Map")) m.pageaction = false s = m:section(NamedSection, "__hearingmap__") function s.render(self, sid) local tpl = require "luci.template" tpl.render_string([[ <% local utl = require "luci.util" local xml = require "luci.xml" local status = require "luci.tools.ieee80211" local stat = utl.ubus("dawn", "get_hearing_map", { }) local name, macs for name, macs in pairs(stat) do %>
Client MAC | AP MAC | Frequency | HT Sup | VHT Sup | Signal | RCPI | RSNI | Channel Utilization | Station connect to AP | Score |
---|---|---|---|---|---|---|---|---|---|---|
<%= (count_loop == 0) and mac or "" %> | <%= mac2 %> | <%= "%.3f" %( data2.freq / 1000 ) %> GHz Channel: <%= "%d" %( status.frequency_to_channel(data2.freq) ) %> | <%= (data2.ht_capabilities == true and data2.ht_support == true) and "True" or "False" %> | <%= (data2.vht_capabilities == true and data2.vht_support == true) and "True" or "False" %> | <%= "%d" % data2.signal %> | <%= "%d" % data2.rcpi %> | <%= "%d" % data2.rsni %> | <%= "%.2f" % (data2.channel_utilization / 2.55) %> % | <%= "%d" % data2.num_sta %> | <%= "%d" % data2.score %> |