diff --git a/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/wifiscan.html b/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/wifiscan.html index 1191252c..c9d099d9 100755 --- a/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/wifiscan.html +++ b/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/wifiscan.html @@ -3,9 +3,17 @@ <%in /www/include/header %>
-
- Wifi Scan - +<% +htmloutput=0 +devs=$(iw dev | sed -n '/^phy/,/Interface/{s/^.*Interface //p}') +for dev in $devs +do + scanresult="$(iw dev $dev scan)" + if [ $? -ne 0 ]; then continue; fi +%> +
+ Wifi Scan: <% echo -n $dev %> +
@@ -14,12 +22,19 @@ <% -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]*).*/, "", "g"); print r;}' | sort -n | sed 's#&#\&#' - # The HTML comment contains the signal quality to allow sorting + echo "$scanresult" | 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]*).*/, "", "g"); print r;}' | sort -n | sed 's#&#\&#' + # The HTML comment contains the signal quality to allow sorting + htmloutput=1 %>
Name Frequenz
\\4\\2 MHz\\3 dBm\\1
\\4\\2 MHz\\3 dBm\\1
+<% +done +if [ ${htmloutput} -eq 0 ]; then + echo "No wireless interface available that supports scan." +fi +%>
diff --git a/src/packages/fff/fff-web-ui/files/www/ssl/style.css b/src/packages/fff/fff-web-ui/files/www/ssl/style.css index d644b3a8..5be16b26 100644 --- a/src/packages/fff/fff-web-ui/files/www/ssl/style.css +++ b/src/packages/fff/fff-web-ui/files/www/ssl/style.css @@ -146,6 +146,10 @@ fieldset th { vertical-align: top; } +fieldset.wifitable:not(:last-child) { + margin-bottom: 1.5em !important; +} + .wifitable th { text-align: center; }