mirror of
https://github.com/coolsnowwolf/luci
synced 2025-01-07 07:06:41 +08:00
update luci-app-dawn (#78)
Co-authored-by: ntlf9t <dingzhong110@gmail.com>
This commit is contained in:
parent
9b796b1d60
commit
abde3cb3be
@ -5,7 +5,6 @@ function index()
|
||||
e.dependent = false
|
||||
e.acl_depends = { "luci-app-dawn" }
|
||||
|
||||
entry({ "admin", "dawn", "configure_daemon" }, cbi("dawn/dawn_config"), "Configure DAWN", 1)
|
||||
entry({ "admin", "dawn", "view_network" }, cbi("dawn/dawn_network"), "View Network Overview", 2)
|
||||
entry({ "admin", "dawn", "view_hearing_map" }, cbi("dawn/dawn_hearing_map"), "View Hearing Map", 3)
|
||||
entry({ "admin", "dawn", "view_network" }, cbi("dawn/dawn_network"), "View Network Overview", 1)
|
||||
entry({ "admin", "dawn", "view_hearing_map" }, cbi("dawn/dawn_hearing_map"), "View Hearing Map", 2)
|
||||
end
|
||||
|
@ -1,42 +0,0 @@
|
||||
m = Map("dawn", translate("Dawn Configuration"), translate(""))
|
||||
s = m:section(TypedSection, "metric", "Metric", "Metric"); s.anonymous = true;
|
||||
s:option(Value, "ht_support", "High Throughput Support")
|
||||
s:option(Value, "no_ht_support", "No High Throughput Support")
|
||||
s:option(Value, "vht_support", "Very High Throughput Support")
|
||||
s:option(Value, "no_vht_support", "No Very High Throughput Support")
|
||||
s:option(Value, "rssi", "RSSI")
|
||||
s:option(Value, "low_rssi", "Low RSSI")
|
||||
s:option(Value, "freq", "5GHz")
|
||||
s:option(Value, "chan_util", "Channel Utilization")
|
||||
s:option(Value, "max_chan_util", "Above Maximum Channel Utilization")
|
||||
|
||||
s = m:section(TypedSection, "metric", "Threshold", "Thresholds"); s.anonymous = true;
|
||||
s:option(Value, "bandwidth_threshold", "Bandwidth Threshold")
|
||||
s:option(Value, "rssi_val", "RSSI Threshold")
|
||||
s:option(Value, "low_rssi_val", "Low RSSI Threshold")
|
||||
s:option(Value, "chan_util_val", "Channel Utilization Threshold")
|
||||
s:option(Value, "max_chan_util_val", "Maximaum Channel Utilization Threshold")
|
||||
s:option(Value, "min_probe_count", "Minimum Probe Count")
|
||||
s:option(Value, "min_number_to_kick", "Minimum Number After Kicking Client")
|
||||
|
||||
s = m:section(TypedSection, "metric", "Evaluate", "What should be evaluated?"); s.anonymous = true;
|
||||
s:option(Flag, "kicking", "Activate Kicking")
|
||||
s:option(Flag, "eval_probe_req", "Evaluate Probe Requests")
|
||||
s:option(Flag, "eval_auth_req", "Evaluate Authentication Requests")
|
||||
s:option(Flag, "eval_assoc_req", "Evaluate Association Requests")
|
||||
s:option(Flag, "use_station_count", "Use Station Count")
|
||||
|
||||
s = m:section(TypedSection, "metric", "IEE802.11", "Reasons for denying"); s.anonymous = true;
|
||||
s:option(Value, "deny_auth_reason", "Denying Authentication")
|
||||
s:option(Value, "deny_assoc_reason", "Denying Association")
|
||||
|
||||
s = m:section(TypedSection, "times", "Time Configuration", "Time Configs"); s.anonymous = true;
|
||||
s:option(Value, "update_client", "Update Client Information Interval")
|
||||
s:option(Value, "denied_req_threshold", "Checking if client is connected")
|
||||
s:option(Value, "remove_client", "Remove Client Information")
|
||||
s:option(Value, "remove_probe", "Remove Hearing Map Information")
|
||||
s:option(Value, "update_hostapd", "Check for new Hostapd Sockets")
|
||||
s:option(Value, "update_tcp_con", "Check for new Routers")
|
||||
s:option(Value, "update_chan_util", "Update Channel Utilization Interval")
|
||||
|
||||
return m
|
@ -8,15 +8,13 @@ function s.render(self, sid)
|
||||
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
|
||||
%>
|
||||
<div class="cbi-section-node">
|
||||
<h3>SSID: <%= xml.pcdata(name) %></h3>
|
||||
<h3>SSID: <%= name %></h3>
|
||||
<table class="table" id="dawn_hearing_map">
|
||||
<tr class="tr table-titles">
|
||||
<th class="th">Client MAC</th>
|
||||
@ -34,7 +32,6 @@ function s.render(self, sid)
|
||||
<%
|
||||
local mac, data
|
||||
for mac, data in pairs(macs) do
|
||||
|
||||
local mac2, data2
|
||||
local count_loop = 0
|
||||
for mac2, data2 in pairs(data) do
|
||||
@ -65,4 +62,4 @@ function s.render(self, sid)
|
||||
]])
|
||||
end
|
||||
|
||||
return m
|
||||
return m
|
@ -12,14 +12,13 @@ function s.render(self, sid)
|
||||
local status = require "luci.tools.ieee80211"
|
||||
local utl = require "luci.util"
|
||||
local sys = require "luci.sys"
|
||||
local xml = require "luci.xml"
|
||||
local hosts = sys.net.host_hints()
|
||||
local stat = utl.ubus("dawn", "get_network", { })
|
||||
local name, macs
|
||||
for name, macs in pairs(stat) do
|
||||
%>
|
||||
<div class="cbi-section-node">
|
||||
<h3>SSID: <%= xml.pcdata(name) %></h3>
|
||||
<h3>SSID: <%= name %></h3>
|
||||
<table class="table" id="network_overview_main">
|
||||
<tr class="tr table-titles">
|
||||
<th class="th">AP</th>
|
||||
@ -43,8 +42,8 @@ function s.render(self, sid)
|
||||
<th class="th">VHT Sup</th>
|
||||
</tr>
|
||||
<tr class="tr">
|
||||
<td class="td"><%= xml.pcdata(data.hostname) %></td>
|
||||
<td class="td"><%= xml.pcdata(data.iface) %></td>
|
||||
<td class="td"><%= data.hostname %></td>
|
||||
<td class="td"><%= data.iface %></td>
|
||||
<td class="td"><%= mac %></td>
|
||||
<td class="td"><%= "%.2f" %(data.channel_utilization / 2.55) %> %</td>
|
||||
<td class="td"><%= "%.3f" %( data.freq / 1000 ) %> GHz (Channel: <%= "%d" %( status.frequency_to_channel(data.freq) ) %>)</td>
|
||||
@ -91,4 +90,4 @@ function s.render(self, sid)
|
||||
]])
|
||||
end
|
||||
|
||||
return m
|
||||
return m
|
19
applications/luci-app-dawn/po/zh-cn/dawn.po
Normal file
19
applications/luci-app-dawn/po/zh-cn/dawn.po
Normal file
@ -0,0 +1,19 @@
|
||||
#: applications/luci-app-dawn/luasrc/controller/dawn.lua:8
|
||||
msgid "Configure DAWN"
|
||||
msgstr "配置 DAWN"
|
||||
|
||||
#: applications/luci-app-dawn/luasrc/controller/dawn.lua:9
|
||||
msgid "View Network Overview"
|
||||
msgstr "查看网络概览"
|
||||
|
||||
#: applications/luci-app-dawn/luasrc/controller/dawn.lua:10
|
||||
msgid "View Hearing Map"
|
||||
msgstr "查看发现地图"
|
||||
|
||||
#: applications/luci-app-dawn/luasrc/model/cbi/dawn/dawn_network.lua:1
|
||||
msgid "Network Overview"
|
||||
msgstr "网络概览"
|
||||
|
||||
#: applications/luci-app-dawn/luasrc/model/cbi/dawn/dawn_hearing_map.lua:1
|
||||
msgid "Hearing Map"
|
||||
msgstr "发现地图"
|
1
applications/luci-app-dawn/po/zh_Hans
Symbolic link
1
applications/luci-app-dawn/po/zh_Hans
Symbolic link
@ -0,0 +1 @@
|
||||
zh-cn
|
Loading…
Reference in New Issue
Block a user