firmware/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/wifiscan.html
Adrian Schmutzler 8a648af3e2 fff-web: rename to fff-web-ui
The former fff-web package is essentially for serving a user
interface (UI). Therefore, include the UI in the name to distinguish
it from other web packages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Acked-by: Christian Dresel <freifunk@dresel.systems>
2021-01-01 08:43:43 +01:00

27 lines
669 B
HTML
Executable File

#!/usr/bin/haserl
<%in /www/include/header %>
<table style="width: 100%">
<tr><td>
<fieldset>
<legend>Wifi Scan</legend>
<table class="wifitable">
<tr>
<th>Name</th>
<th>Frequenz</th>
<th>Signal</th>
<th>MAC</th>
</tr>
<%
iw dev w2mesh scan | sed 's/^BSS/\nBSS/g' |\
awk -v RS='' '{r = gensub(/.*BSS ([0-9a-f:]*)?.*freq: ([0-9]*).*signal: (-[0-9]*\.[0-9]*) dBm.*SSID: ([^\n]*).*/, "<!-- \\3 --><tr><td>\\4</td><td>\\2 MHz</td><td>\\3 dBm</td><td>\\1</td></tr>", "g"); print r;}' | sort -n | sed 's#&#\&amp;#'
# The HTML comment contains the signal quality to allow sorting
%>
</table>
</fieldset>
</td></tr>
</table>
<%in /www/include/footer %>