mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-30 12:05:13 +08:00
🦄 Sync 2026-09-04 16:01:59
This commit is contained in:
1 parent
f2af90562f
commit
25ff979f91
106 files changed
+324
-5253
No files matched your search
-121
@@ -1,121 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=3ginfo
|
||||
PKG_VERSION:=20260425
|
||||
PKG_RELEASE:=3
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/3ginfo/Default
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Information about the status of the 3G/4G/5G modem
|
||||
MAINTAINER:=Cezary Jackiewicz <cezary@eko.one.pl>
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/3ginfo-old
|
||||
$(call Package/3ginfo/Default)
|
||||
DEPENDS:=+3ginfo-text-old +uhttpd
|
||||
endef
|
||||
|
||||
define Package/3ginfo-lite
|
||||
$(call Package/3ginfo/Default)
|
||||
TITLE+= (lite version)
|
||||
DEPENDS:=+comgt +@BUSYBOX_DEFAULT_AWK
|
||||
endef
|
||||
|
||||
define Package/3ginfo-qmisignal
|
||||
$(call Package/3ginfo/Default)
|
||||
TITLE+= (qmi signal)
|
||||
DEPENDS:=+uqmi +uhttpd
|
||||
endef
|
||||
|
||||
define Package/3ginfo-text-old
|
||||
$(call Package/3ginfo/Default)
|
||||
TITLE+= (text version)
|
||||
DEPENDS:=+comgt
|
||||
endef
|
||||
|
||||
define Package/3ginfo-text-old/conffiles
|
||||
/etc/config/3ginfo
|
||||
endef
|
||||
|
||||
define Package/3ginfo
|
||||
$(call Package/3ginfo/Default)
|
||||
DEPENDS:=+3ginfo-text +uhttpd
|
||||
endef
|
||||
|
||||
define Package/3ginfo-text
|
||||
$(call Package/3ginfo/Default)
|
||||
TITLE+= (text version)
|
||||
DEPENDS:=+comgt +sms-tool +modemdata
|
||||
endef
|
||||
|
||||
define Package/3ginfo-text/conffiles
|
||||
/etc/config/3ginfo
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/3ginfo-old/install
|
||||
$(CP) ./files-html-old/* $(1)
|
||||
endef
|
||||
|
||||
define Package/3ginfo-lite/install
|
||||
$(CP) ./files-lite/* $(1)
|
||||
$(CP) ./files-text-old/usr/share/3ginfo/mccmnc.dat $(1)/usr/share/3ginfo-lite
|
||||
$(CP) ./files-text-old/usr/share/3ginfo/scripts/probeport.gcom $(1)/usr/share/3ginfo-lite
|
||||
endef
|
||||
|
||||
define Package/3ginfo-qmisignal/install
|
||||
$(CP) ./files-qmisignal/* $(1)
|
||||
|
||||
$(FIND) $(1) -type f -name '*.js' | while read src; do \
|
||||
uglifyjs "$$$$src" -o "$$$$src".1 && \
|
||||
mv "$$$$src".1 "$$$$src" || true; \
|
||||
done
|
||||
endef
|
||||
|
||||
define Package/3ginfo-text-old/install
|
||||
$(CP) ./files-text-old/* $(1)
|
||||
endef
|
||||
|
||||
define Package/3ginfo-text-old/postinst
|
||||
#!/bin/sh
|
||||
[ -n "$${IPKG_INSTROOT}" ] || {
|
||||
ln -sf /usr/share/3ginfo/cgi-bin/3ginfo.sh /usr/bin/3ginfo
|
||||
}
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/3ginfo/install
|
||||
$(CP) ./files-html/* $(1)
|
||||
|
||||
$(SED) 's/?v=1/?v='${PKG_VERSION}'/g' $(1)/usr/share/3ginfo/html/index.html
|
||||
|
||||
$(SED) 's/^\t*//g;s/^\s*//g;/^$$$$/d' $(1)/usr/share/3ginfo/html/index.html
|
||||
|
||||
$(FIND) $(1) -type f -name '*.js' | while read src; do \
|
||||
uglifyjs "$$$$src" -o "$$$$src".1 && \
|
||||
mv "$$$$src".1 "$$$$src" || true; \
|
||||
done
|
||||
|
||||
$(FIND) $(1) -type f -name '*.css' | while read src; do \
|
||||
cleancss "$$$$src" -o "$$$$src".1 && \
|
||||
mv "$$$$src".1 "$$$$src" || true; \
|
||||
done
|
||||
endef
|
||||
|
||||
define Package/3ginfo-text/install
|
||||
$(CP) ./files-text/* $(1)
|
||||
endef
|
||||
|
||||
|
||||
$(eval $(call BuildPackage,3ginfo-old))
|
||||
$(eval $(call BuildPackage,3ginfo-lite))
|
||||
$(eval $(call BuildPackage,3ginfo-qmisignal))
|
||||
$(eval $(call BuildPackage,3ginfo-text-old))
|
||||
$(eval $(call BuildPackage,3ginfo))
|
||||
$(eval $(call BuildPackage,3ginfo-text))
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
# (c) 2010-2019 Cezary Jackiewicz <cezary@eko.one.pl>
|
||||
|
||||
START=99
|
||||
|
||||
start () {
|
||||
PORT=$(uci -q get 3ginfo.@3ginfo[0].http_port)
|
||||
[ -z $PORT ] && { PORT=81; }
|
||||
uhttpd -c /usr/share/3ginfo/uhttpd.conf -h /usr/share/3ginfo/ -p 0.0.0.0:$PORT > /dev/null 2>&1
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
DEVICE=$(uci get 3ginfo.@3ginfo[0].device)
|
||||
SCRIPT=$(uci get 3ginfo.@3ginfo[0].script)
|
||||
|
||||
echo -e "Content-type: text/html\n\n"
|
||||
if [ -e scripts/$SCRIPT.sh ]; then
|
||||
sh scripts/$SCRIPT.sh
|
||||
elif [ -e scripts/$SCRIPT.gcom ]; then
|
||||
if ! pidof gcom > /dev/null; then
|
||||
O=$(gcom -d $DEVICE -s scripts/$SCRIPT.gcom)
|
||||
echo "<div class=\"c\">$O</div>"
|
||||
else
|
||||
echo "<div class=\"c\">Brak możliwości sprawdzenia limitu. Spróbuj za chwilę.</div>"
|
||||
fi
|
||||
else
|
||||
echo "<div class=\"c\"><font color=red>Brak skryptu $SCRIPT</font></div>"
|
||||
fi
|
||||
echo "<div class=\"c\"><input type=\"button\" class=\"button\" value=\"Wróć\" onclick=\"trzyginfo('cgi-bin/3ginfo.sh');\"></div>"
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
SEC=$(uci -q get 3ginfo.@3ginfo[0].network)
|
||||
[ -z "$SEC" ] && exit 0
|
||||
|
||||
ALLOW=$(uci -q get 3ginfo.@3ginfo[0].connect_button)
|
||||
[ "x$ALLOW" = "x0" ] && exit 0
|
||||
|
||||
UP=$(ifstatus $SEC | grep "\"up\": true")
|
||||
if [ -n "$UP" ]; then
|
||||
ifdown $SEC > /dev/null 2>&1
|
||||
else
|
||||
ifup $SEC > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
sleep 3
|
||||
exit 0
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
D=$(uci -q get 3ginfo.@3ginfo[0].device)
|
||||
echo -e "Content-type: text/html\n\n"
|
||||
if [ -e $D ]; then
|
||||
gcom -d $D sig | sed -e 's/ /,/g'
|
||||
fi
|
||||
@@ -1,96 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Content-type: text/html"
|
||||
echo ""
|
||||
echo "
|
||||
<html>
|
||||
<style type=\"text/css\">
|
||||
body {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
#centered {
|
||||
width: 800px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
.label {
|
||||
text-align: left;
|
||||
}
|
||||
.text {
|
||||
width: 100%;
|
||||
}
|
||||
pre {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
<head>
|
||||
<title>SMS</title>
|
||||
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
|
||||
</head>
|
||||
<body>
|
||||
"
|
||||
if [ "$REQUEST_METHOD" = POST ]; then
|
||||
read -t 3 QUERY_STRING
|
||||
eval $(echo "$QUERY_STRING"|awk -F'&' '{for(i=1;i<=NF;i++){print $i}}')
|
||||
action=`uhttpd -d $action 2>/dev/null`
|
||||
tel=`uhttpd -d $msisdn 2>/dev/null`
|
||||
msg=`uhttpd -d $msg 2>/dev/null`
|
||||
id=`uhttpd -d $id 2>/dev/null`
|
||||
else
|
||||
action="x"
|
||||
fi
|
||||
|
||||
case "$action" in
|
||||
send)
|
||||
echo "[global]" > /tmp/gnokiirc
|
||||
echo "model = AT" >> /tmp/gnokiirc
|
||||
echo "port = "$(uci get 3ginfo.@3ginfo[0].device) >> /tmp/gnokiirc
|
||||
echo "connection = serial" >> /tmp/gnokiirc
|
||||
|
||||
echo "$msg" | tr '+' ' ' | gnokii --config /tmp/gnokiirc --sendsms $tel 2>/dev/null
|
||||
R=$?
|
||||
if [ $R -eq 0 ]; then
|
||||
echo "Wysłano wiadomość do $tel!<br />"
|
||||
else
|
||||
echo "<font color=red><strong>Wystąpił problem z wysłaniem wiadomości!</strong></font><br />"
|
||||
fi
|
||||
echo $tel": "$msg >> /tmp/sms.txt
|
||||
rm /tmp/gnokiirc
|
||||
;;
|
||||
delete)
|
||||
echo "[global]" > /tmp/gnokiirc
|
||||
echo "model = AT" >> /tmp/gnokiirc
|
||||
echo "port = "$(uci get 3ginfo.@3ginfo[0].device) >> /tmp/gnokiirc
|
||||
echo "connection = serial" >> /tmp/gnokiirc
|
||||
gnokii --config /tmp/gnokiirc --deletesms SM $id 2>/dev/null
|
||||
rm /tmp/gnokiirc
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "
|
||||
<form method=\"post\">
|
||||
<input type=\"hidden\" name=\"action\" id=\"action\" value=\"send\">
|
||||
<div class=label>Numer telefonu:</div><input name=\"msisdn\" class=text><br />
|
||||
<div class=label>Wiadomość:</div><textarea name=\"msg\" class=text></textarea><br /><br />
|
||||
<input type=\"submit\" name=\"submit\" value=\"Wyślij\" text-align=center>
|
||||
</form>
|
||||
"
|
||||
|
||||
echo "[global]" > /tmp/gnokiirc
|
||||
echo "model = AT" >> /tmp/gnokiirc
|
||||
echo "port = "$(uci get 3ginfo.@3ginfo[0].device) >> /tmp/gnokiirc
|
||||
echo "connection = serial" >> /tmp/gnokiirc
|
||||
echo "<pre>"
|
||||
gnokii --config /tmp/gnokiirc --getsms SM 0 end 2>/dev/null | \
|
||||
sed -e ' \
|
||||
s/ (unread)/<\/pre><font color=green><strong>Nowa wiadomość<\/strong><\/font><pre>/g; \
|
||||
s/Msg Center.*//g; \
|
||||
s/(read)//g; \
|
||||
s/^Sender/Nadawca/g;s/Date\/time/Data\/czas/g; \
|
||||
s/^Text:/Treść wiadomości:<\/pre><pre style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;">/g; \
|
||||
s/\(^[0-9]*\)..Inbox Message/<\/pre><hr \/><form style="text-align: left;" method="post"><input type="hidden" name="action" id="action" value="delete"><input type="hidden" name="id" id="id" value="\1"><input type="submit" name="submit" value="Usuń"><\/form><pre>/g'
|
||||
rm /tmp/gnokiirc
|
||||
|
||||
echo "</pre>
|
||||
</div>
|
||||
</body></html>"
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Content-type: text/html"
|
||||
echo ""
|
||||
echo "
|
||||
<html>
|
||||
<style type=\"text/css\">
|
||||
body {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
#centered {
|
||||
width: 800px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
.label {
|
||||
text-align: left;
|
||||
}
|
||||
.text {
|
||||
width: 100%;
|
||||
}
|
||||
pre {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
<head>
|
||||
<title>USSD</title>
|
||||
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
|
||||
</head>
|
||||
<body>
|
||||
"
|
||||
if [ "$REQUEST_METHOD" = POST ]; then
|
||||
read -t 3 QUERY_STRING
|
||||
eval $(echo "$QUERY_STRING"|awk -F'&' '{for(i=1;i<=NF;i++){print $i}}')
|
||||
action=`uhttpd -d $action`
|
||||
ussd=`uhttpd -d $ussd`
|
||||
else
|
||||
action="x"
|
||||
fi
|
||||
|
||||
case "$action" in
|
||||
send)
|
||||
A=$(ussd159 -p $(uci get 3ginfo.@3ginfo[0].device) -t 30 -u "$ussd")
|
||||
echo "Odpowiedź: $A<br /><br />"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "
|
||||
<form method=\"post\">
|
||||
<input type=\"hidden\" name=\"action\" id=\"action\" value=\"send\">
|
||||
<div class=label>USSD:</div><input name=\"ussd\" class=text><br />
|
||||
<input type=\"submit\" name=\"submit\" value=\"Wyślij\" text-align=center>
|
||||
</form>
|
||||
</div>
|
||||
</body></html>"
|
||||
@@ -1,75 +0,0 @@
|
||||
<html>
|
||||
<style type="text/css">
|
||||
body {font-family: Verdana, Arial, Helvetica, sans-serif;}
|
||||
.button {width:150px;}
|
||||
a:link {text-decoration:none;color:blue;}
|
||||
a:visited {text-decoration:none;color:blue;}
|
||||
a:active {text-decoration:none;color:blue;}
|
||||
a:hover {text-decoration:underline;color:blue;}
|
||||
.c {margin:auto;text-align:center;clear:both;}
|
||||
.l {width:39%;clear:both;float:left;text-align:right;}
|
||||
.r {width:59%;float:right; text-align:left;}
|
||||
</style>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>3G/4G</title>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function detailson() {
|
||||
document.getElementById('details').style.display = "inline";
|
||||
document.getElementById('details_on').style.display = "none";
|
||||
document.getElementById('details_off').style.display = "inline";
|
||||
}
|
||||
|
||||
function detailsoff() {
|
||||
document.getElementById('details').style.display = "none";
|
||||
document.getElementById('details_on').style.display = "inline";
|
||||
document.getElementById('details_off').style.display = "none";
|
||||
}
|
||||
|
||||
function trzyginfo(zrodlo, reload) {
|
||||
var a;
|
||||
|
||||
try {a = new XMLHttpRequest();} catch (e) {
|
||||
try {a = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {
|
||||
try {a = new ActiveXObject("Microsoft.XMLHTTP");} catch (e) {
|
||||
alert("Coś stara ta przelądarka...");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('loader').style.display = "block";
|
||||
document.getElementById('zawartosc').innerHTML = "";
|
||||
|
||||
a.open("GET", zrodlo);
|
||||
|
||||
a.onreadystatechange = function() {
|
||||
if (a.readyState == 4) {
|
||||
document.getElementById('loader').style.display = "none";
|
||||
document.getElementById('zawartosc').innerHTML = a.responseText;
|
||||
if (reload == 1) {
|
||||
location.reload(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a.send(null);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="trzyginfo('cgi-bin/3ginfo.sh',0);">
|
||||
|
||||
<table style='width:100%;height:100%;'>
|
||||
<tr><td colspan=3 style='height:100px;'> </td></tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style='width:600px; height:200px;'>
|
||||
<div id='zawartosc'></div>
|
||||
<div id='loader' style="text-align:center;display:block;"><img src="loader.gif"></div>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr><td colspan=3> </td></tr>
|
||||
</table>
|
||||
|
||||
</body></html>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.1 KiB |
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
O=$(wget -q -c http://www.cyfrowypolsat.pl/internet/biezace-zuzycie/ -O -)
|
||||
O1=$(echo "$O" | sed -n '/Okres rozliczeniowy/,/_idJsp27/p' | tr -d '\n' | sed -e 's/\t//g;s/ */ /g;s/.*\(<span class="bolder">Okres.*\)\(<br><br><span\).*/\1/' | tr '\277\363\263\346\352\266\261\274\361' zolcesazn | tr '\241\306\312\243\321\323\246\257\254' ACELNOSZZ)
|
||||
if [ -z "$O1" ]; then
|
||||
echo "<div class=\"c\">Brak możliwości sprawdzenia limitu.</div>"
|
||||
else
|
||||
echo "$O1"
|
||||
fi
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
pdu2txt() {
|
||||
# pobrany z https://forum.openwrt.org/viewtopic.php?pid=158891#p158891
|
||||
|
||||
data1=$(echo $1 | sed -e 's/.\{2\}/&\ /g')
|
||||
|
||||
ret=''
|
||||
shift=0
|
||||
carry=0
|
||||
|
||||
for byte in $data1; do
|
||||
if [ $shift -eq 7 ]; then
|
||||
ret=$ret$(echo $carry | awk '{printf("%c",$0)}')
|
||||
carry=0
|
||||
shift=0
|
||||
fi
|
||||
|
||||
byte=$((0x$byte))
|
||||
|
||||
: $(( a = (0xFF >> ($shift + 1)) & 0xFF ))
|
||||
: $(( b = $a ^ 0xFF ))
|
||||
|
||||
: $(( digit = $carry | (($byte & $a) << $shift) & 0xFF ))
|
||||
: $(( carry = ($byte & $b) >> (7 - $shift) ))
|
||||
|
||||
ret=$ret$(echo $digit | awk '{printf("%c",$0)}')
|
||||
|
||||
: $(( shift++ ))
|
||||
done
|
||||
|
||||
echo $ret
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.02
|
||||
waitquiet 0.2 0.2
|
||||
|
||||
send "AT+CUSD=1,\"AAD8EC3602\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
if % = -1 goto noresponse
|
||||
|
||||
get 1 "^m" $s
|
||||
print $s
|
||||
|
||||
exit 0
|
||||
|
||||
:noresponse
|
||||
print ""
|
||||
exit 0
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
. /usr/share/3ginfo/scripts/functions.sh
|
||||
|
||||
DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
|
||||
O=$(gcom -d $DEVICE -s /usr/share/3ginfo/scripts/lycamobile_pdu.gcom | cut -f2 -d\")
|
||||
if [ ! -z "$O" ]; then
|
||||
pdu2txt "$O" | tr '\n' ' ' | sed -e 's/1 Opis 9 Powrot 0 Wyjscie//g'
|
||||
else
|
||||
echo "Problem operatora - brak możliwości sprawdzenia"
|
||||
fi
|
||||
@@ -1,71 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.02
|
||||
waitquiet 0.2 0.2
|
||||
|
||||
send "AT+CNMI=0,1,0,0,0^m"
|
||||
waitfor 5 "OK"
|
||||
if % = -1 goto error
|
||||
|
||||
send "AT+CMGF=1^m"
|
||||
waitfor 5 "OK"
|
||||
if % = -1 goto error
|
||||
|
||||
send "AT+CMGL=\"ALL\"^m"
|
||||
waitfor 10 "OK"
|
||||
if % = -1 goto error
|
||||
|
||||
send "AT+CUSD=1,\"*121#\",15^m"
|
||||
waitfor 5 "+CUSD:"
|
||||
if % = -1 goto error
|
||||
|
||||
let $c="AT+CMGL=\"REC UNREAD\"^m"
|
||||
let $r="+CMGL"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT+CMGL=\"REC UNREAD\"^m"
|
||||
let $r="+CMGL"
|
||||
gosub readatcmd
|
||||
|
||||
:error
|
||||
print "Problem operatora - brak możliwości sprawdzenia..."
|
||||
exit 0
|
||||
|
||||
:readatcmd
|
||||
let i=20
|
||||
send $c
|
||||
:loop
|
||||
get 1 "^m" $s
|
||||
let l=len($r)
|
||||
if len($s) < l goto loop1
|
||||
if $mid($s,1,l) <> $r goto loop1
|
||||
|
||||
let $j="x"
|
||||
if $mid($s,9,1) <> "," goto del2
|
||||
let $j=$mid($s,8,1)
|
||||
goto del3
|
||||
:del2
|
||||
if $mid($s,10,1) <> "," goto del3
|
||||
let $j=$mid($s,8,2)
|
||||
|
||||
:del3
|
||||
get 1 "^m" $s
|
||||
print $s
|
||||
|
||||
if $j = "x" goto del4
|
||||
send "AT+CMGD="
|
||||
send $j
|
||||
send "^m"
|
||||
waitfor 5 "OK"
|
||||
:del4
|
||||
exit 0
|
||||
|
||||
:loop1
|
||||
if len($s) < 2 goto loop2
|
||||
if $mid($s,1,2) = "ER" return
|
||||
:loop2
|
||||
if i = 0 return
|
||||
let i=i-1
|
||||
sleep 0.5
|
||||
goto loop
|
||||
@@ -1,71 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.02
|
||||
waitquiet 0.2 0.2
|
||||
|
||||
send "AT+CNMI=0,1,0,0,0^m"
|
||||
waitfor 5 "OK"
|
||||
if % = -1 goto error
|
||||
|
||||
send "AT+CMGF=1^m"
|
||||
waitfor 5 "OK"
|
||||
if % = -1 goto error
|
||||
|
||||
send "AT+CMGL=\"ALL\"^m"
|
||||
waitfor 10 "OK"
|
||||
if % = -1 goto error
|
||||
|
||||
send "AT+CUSD=1,\"AA982C3602\",15^m"
|
||||
waitfor 5 "+CUSD:"
|
||||
if % = -1 goto error
|
||||
|
||||
let $c="AT+CMGL=\"REC UNREAD\"^m"
|
||||
let $r="+CMGL"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT+CMGL=\"REC UNREAD\"^m"
|
||||
let $r="+CMGL"
|
||||
gosub readatcmd
|
||||
|
||||
:error
|
||||
print "Problem operatora - brak możliwości sprawdzenia..."
|
||||
exit 0
|
||||
|
||||
:readatcmd
|
||||
let i=20
|
||||
send $c
|
||||
:loop
|
||||
get 1 "^m" $s
|
||||
let l=len($r)
|
||||
if len($s) < l goto loop1
|
||||
if $mid($s,1,l) <> $r goto loop1
|
||||
|
||||
let $j="x"
|
||||
if $mid($s,9,1) <> "," goto del2
|
||||
let $j=$mid($s,8,1)
|
||||
goto del3
|
||||
:del2
|
||||
if $mid($s,10,1) <> "," goto del3
|
||||
let $j=$mid($s,8,2)
|
||||
|
||||
:del3
|
||||
get 1 "^m" $s
|
||||
print $s
|
||||
|
||||
if $j = "x" goto del4
|
||||
send "AT+CMGD="
|
||||
send $j
|
||||
send "^m"
|
||||
waitfor 5 "OK"
|
||||
:del4
|
||||
exit 0
|
||||
|
||||
:loop1
|
||||
if len($s) < 2 goto loop2
|
||||
if $mid($s,1,2) = "ER" return
|
||||
:loop2
|
||||
if i = 0 return
|
||||
let i=i-1
|
||||
sleep 0.5
|
||||
goto loop
|
||||
@@ -1,27 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.02
|
||||
waitquiet 0.2 0.2
|
||||
|
||||
send "at+cmgf=0^m"
|
||||
waitfor 5 "OK"
|
||||
if % = -1 goto error
|
||||
|
||||
send "at+cscs=\"IRA\"^m"
|
||||
waitfor 5 "OK"
|
||||
if % = -1 goto error
|
||||
|
||||
send "AT+CUSD=1,\"AA182CA682C546\",15^m"
|
||||
waitfor 5 "+CUSD:"
|
||||
if % = -1 goto error
|
||||
|
||||
get 1 "^m" $s
|
||||
print $s
|
||||
|
||||
exit 0
|
||||
|
||||
:error
|
||||
print ""
|
||||
|
||||
exit 0
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
. /usr/share/3ginfo/scripts/functions.sh
|
||||
|
||||
DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
|
||||
O=$(gcom -d $DEVICE -s /usr/share/3ginfo/scripts/ofnk.gcom | cut -f2 -d\")
|
||||
if [ ! -z "$O" ]; then
|
||||
pdu2txt "$O"
|
||||
else
|
||||
echo "Problem operatora - brak możliwości sprawdzenia"
|
||||
fi
|
||||
@@ -1,19 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.02
|
||||
waitquiet 0.2 0.2
|
||||
|
||||
send "AT+CUSD=1,\"*101*01#\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
if % = -1 goto noresponse
|
||||
|
||||
get 1 "^m" $s
|
||||
print $s
|
||||
|
||||
exit 0
|
||||
|
||||
:noresponse
|
||||
print ""
|
||||
|
||||
exit 0
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
|
||||
O=$(gcom -d $DEVICE -s /usr/share/3ginfo/scripts/ofnk2.gcom | cut -f2 -d\")
|
||||
if [ ! -z "$O" ]; then
|
||||
A=$(echo $O | awk '{for(i=1;;i=i+4)if(substr($1,i,4)!=""){printf "%c",(index("0123456789ABCDEF",substr($1,i+2,1))-1)*16+(index("0123456789ABCDEF",substr($1,i+3,1))-1)}else exit;}')
|
||||
echo $A | sed -e 's/1 Opis.*9 Powrot.*0 Wyjscie//g'
|
||||
else
|
||||
echo "Problem operatora - brak możliwości sprawdzenia"
|
||||
fi
|
||||
@@ -1,37 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.02
|
||||
waitquiet 0.2 0.2
|
||||
|
||||
send "AT+CUSD=1,\"*111#\",15^m"
|
||||
waitfor 10 "0 Wyjscie"
|
||||
if % = -1 goto noresponse
|
||||
|
||||
send "AT+CUSD=1,\"1\",15^m"
|
||||
waitfor 10 "0 Wyjscie"
|
||||
if % = -1 goto noresponse
|
||||
|
||||
let c=20
|
||||
send "AT+CUSD=1,\"3\",15^m"
|
||||
:loop
|
||||
get 1 "^m" $s
|
||||
if c=0 goto exit
|
||||
if len($s) < 6 goto toshort
|
||||
if $mid($s,1,5) = "+CUSD" goto ok
|
||||
:toshort
|
||||
let c=c-1
|
||||
sleep 1
|
||||
goto loop
|
||||
:ok
|
||||
let $s=$right($s,len($s)-10)
|
||||
print $s,"\"\n"
|
||||
|
||||
:exit
|
||||
send "AT+CUSD=1,\"0\",15^m"
|
||||
waitfor 10 "Dziekujemy"
|
||||
exit 0
|
||||
|
||||
:noresponse
|
||||
print "Problem operatora - brak możliwości sprawdzenia..."
|
||||
exit 0
|
||||
@@ -1,28 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.02
|
||||
waitquiet 0.2 0.2
|
||||
|
||||
send "AT+CUSD=1,\"*111#\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
if % = -1 goto noresponse
|
||||
|
||||
send "AT+CUSD=1,\"1\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
if % = -1 goto noresponse
|
||||
|
||||
send "AT+CUSD=1,\"3\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
if % = -1 goto noresponse
|
||||
|
||||
get 1 "^m" $s
|
||||
print $s
|
||||
|
||||
send "AT+CUSD=1,\"0\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
exit 0
|
||||
|
||||
:noresponse
|
||||
print ""
|
||||
exit 0
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
|
||||
O=$(gcom -d $DEVICE -s /usr/share/3ginfo/scripts/play_fresh2.gcom | cut -f2 -d\")
|
||||
if [ ! -z "$O" ]; then
|
||||
A=$(echo $O | awk '{for(i=1;;i=i+4)if(substr($1,i,4)!=""){printf "%c",(index("0123456789ABCDEF",substr($1,i+2,1))-1)*16+(index("0123456789ABCDEF",substr($1,i+3,1))-1)}else exit;}')
|
||||
echo $A | sed -e 's/1 Opis.*9 Powrot.*0 Wyjscie//g'
|
||||
else
|
||||
echo "Problem operatora - brak możliwości sprawdzenia"
|
||||
fi
|
||||
@@ -1,28 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.02
|
||||
waitquiet 0.2 0.2
|
||||
|
||||
send "AT+CUSD=1,\"AA582C3602\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
if % = -1 goto noresponse
|
||||
|
||||
send "AT+CUSD=1,\"31\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
if % = -1 goto noresponse
|
||||
|
||||
send "AT+CUSD=1,\"33\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
if % = -1 goto noresponse
|
||||
|
||||
get 1 "^m" $s
|
||||
print $s
|
||||
|
||||
send "AT+CUSD=1,\"30\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
exit 0
|
||||
|
||||
:noresponse
|
||||
print ""
|
||||
exit 0
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
. /usr/share/3ginfo/scripts/functions.sh
|
||||
|
||||
DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
|
||||
O=$(gcom -d $DEVICE -s /usr/share/3ginfo/scripts/play_fresh_pdu.gcom | cut -f2 -d\")
|
||||
if [ ! -z "$O" ]; then
|
||||
pdu2txt "$O" | tr '\n' ' ' | sed -e 's/1 Opis.*9 Powrot.*0 Wyjscie//g'
|
||||
else
|
||||
echo "Problem operatora - brak możliwości sprawdzenia"
|
||||
fi
|
||||
@@ -1,20 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.02
|
||||
waitquiet 0.2 0.2
|
||||
|
||||
send "AT+CUSD=1,\"AA182C3602\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
if % = -1 goto noresponse
|
||||
|
||||
get 1 "^m" $s
|
||||
print $s
|
||||
|
||||
send "AT+CUSD=1,\"30\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
exit 0
|
||||
|
||||
:noresponse
|
||||
print ""
|
||||
exit 0
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
. /usr/share/3ginfo/scripts/functions.sh
|
||||
|
||||
DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
|
||||
O=$(gcom -d $DEVICE -s /usr/share/3ginfo/scripts/tmobile.gcom | cut -f2 -d\")
|
||||
if [ ! -z "$O" ]; then
|
||||
pdu2txt "$O" | tr '\n' ' ' | sed -e 's/1 Opis 9 Powrot 0 Wyjscie//g'
|
||||
else
|
||||
echo "Problem operatora - brak możliwości sprawdzenia"
|
||||
fi
|
||||
@@ -1,19 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.02
|
||||
waitquiet 0.2 0.2
|
||||
|
||||
send "AT+CUSD=1,\"*108#\",15^m"
|
||||
waitfor 10 "+CUSD: "
|
||||
if % = -1 goto noresponse
|
||||
|
||||
get 1 "^m" $s
|
||||
print $s
|
||||
|
||||
exit 0
|
||||
|
||||
:noresponse
|
||||
print ""
|
||||
|
||||
exit 0
|
||||
@@ -1,27 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.02
|
||||
waitquiet 0.2 0.2
|
||||
|
||||
send "at+cmgf=0^m"
|
||||
waitfor 5 "OK"
|
||||
if % = -1 goto error
|
||||
|
||||
send "at+cscs=\"IRA\"^m"
|
||||
waitfor 5 "OK"
|
||||
if % = -1 goto error
|
||||
|
||||
send "AT+CUSD=1,\"AA180C3702\",15^m"
|
||||
waitfor 5 "+CUSD:"
|
||||
if % = -1 goto error
|
||||
|
||||
get 1 "^m" $s
|
||||
print $s
|
||||
|
||||
exit 0
|
||||
|
||||
:error
|
||||
print ""
|
||||
|
||||
exit 0
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
. /usr/share/3ginfo/scripts/functions.sh
|
||||
|
||||
DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
|
||||
O=$(gcom -d $DEVICE -s /usr/share/3ginfo/scripts/virginmobile_pdu.gcom | cut -f2 -d\")
|
||||
if [ ! -z "$O" ]; then
|
||||
pdu2txt "$O"
|
||||
else
|
||||
echo "Problem operatora - brak możliwości sprawdzenia"
|
||||
fi
|
||||
@@ -1,86 +0,0 @@
|
||||
<html>
|
||||
<style type="text/css">
|
||||
body {font-family: Verdana, Arial, Helvetica, sans-serif;}
|
||||
.c {margin:auto;text-align:center;clear:both;}
|
||||
.l {width:49%;clear:both;float:left;text-align:right;}
|
||||
.r {width:49%;float:right;text-align:left;}
|
||||
</style>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Siła sygnału</title>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
var secs=0;
|
||||
var delay = 1000;
|
||||
|
||||
startTimer();
|
||||
function startTimer()
|
||||
{
|
||||
if (secs==0)
|
||||
{
|
||||
secs=3;
|
||||
refreshData();
|
||||
}
|
||||
else
|
||||
{
|
||||
self.status = secs;
|
||||
secs = secs - 1;
|
||||
}
|
||||
self.setTimeout("startTimer()", delay);
|
||||
}
|
||||
function refreshData()
|
||||
{
|
||||
var req;
|
||||
|
||||
try {req = new XMLHttpRequest();} catch (e) {
|
||||
try {req = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {
|
||||
try {req = new ActiveXObject("Microsoft.XMLHTTP");} catch (e) {
|
||||
alert("Coś stara ta przelądarka...");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
req.open("GET", "/cgi-bin/signal.sh");
|
||||
|
||||
req.onreadystatechange = function() {
|
||||
|
||||
if (req.readyState == 4) {
|
||||
var line=req.responseText;
|
||||
var arr=(line.split(/,/));
|
||||
if(arr.length>3)
|
||||
{
|
||||
var p = (arr[2]*100/31).toFixed();
|
||||
document.getElementById('csq').innerHTML=p+'%';
|
||||
document.getElementById('precent').style.width=p+"%";
|
||||
var color = "red";
|
||||
if (p > 29) {color="orange"; }
|
||||
if (p > 45) {color="yellow"; }
|
||||
if (p > 61) {color="green"; }
|
||||
document.getElementById('precent').style.backgroundColor=color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
req.send(null);
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table style='width:100%;height:100%;'>
|
||||
<tr><td colspan=3 style='height:100px;'> </td></tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td style='width:600px; height:200px;'>
|
||||
<span class="l">Siła sygnału:</span><span id="csq" class="r"></span>
|
||||
<div style="float:left; margin:1%; width:98%; height:20px; border:1px solid #000000; background-color:transparent;">
|
||||
<div id="precent" style="float:left; background-color:black; border-right:1px solid #000000; height:100%; width:0%"> </div>
|
||||
</div>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr><td colspan=3> </td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,35 +0,0 @@
|
||||
<span class="l" style="display:{STATUS_SHOW}">Status:</span><span class="r" style="display:{STATUS_SHOW}">{STATUS}</span>
|
||||
<span class="l" style="display:{STATUS_SHOW}"><small>Connection time:</small></span><span class="r" style="display:{STATUS_SHOW}"><small>{CONN_TIME}</small></span>
|
||||
<span class="l" style="display:{STATUS_SHOW}"><small>Received:</small></span><span class="r" style="display:{STATUS_SHOW}"><small>{RX}</small></span>
|
||||
<span class="l" style="display:{STATUS_SHOW}"><small>Transmitted:</small></span><span class="r" style="display:{STATUS_SHOW}"><small>{TX}</small></span>
|
||||
<span class="l">Operator:</span><span class="r">{COPS}</span>
|
||||
<span class="l">Operating mode:</span><span class="r">{MODE}</span>
|
||||
<span class="l">Signal strength:</span><span class="r"><strong>{CSQ_PER}%</strong></span>
|
||||
<div style="float:left; margin:1%; width:98%; height:20px; border:1px solid #000000; background-color:transparent;">
|
||||
<div style="float:left; background-color:{CSQ_COL}; border-right:1px solid #000000; height:100%; width:{CSQ_PER}%"> </div>
|
||||
</div>
|
||||
<div class="c" style="display:{SMS_SHOW};"><input type="button" class="button" value="SMS" onClick="window.location.href='cgi-bin/sms.sh'"></div>
|
||||
<div class="c" style="display:{USSD_SHOW};"><input type="button" class="button" value="USSD" onClick="window.location.href='cgi-bin/ussd.sh'"></div>
|
||||
<div class="c" style="display:{LIMIT_SHOW};"><input type="button" class="button" value="Pozostały limit" onClick="return trzyginfo('cgi-bin/limit.sh',0);"></div>
|
||||
<div class="c"><input type="button" class="button" value="Refresh" onClick="return trzyginfo('cgi-bin/3ginfo.sh',0);"></div>
|
||||
<div class="c" style="display:{STATUS_SHOW_BUTTON}"><input type="button" class="button" value="{STATUS_TRE}" onClick="trzyginfo('cgi-bin/onoff.sh',1);"></div>
|
||||
<br />
|
||||
<a href="#" id='details_on' onclick="detailson();" style="float:left;display:inline;"><small>Show details</small></a>
|
||||
<a href="#" id='details_off' onclick="detailsoff();" style="float:left;display:none;"><small>Hide details</small></a>
|
||||
<br />
|
||||
<div id='details' style="display:none;">
|
||||
<span class="l">CSQ:</span><span class="r">{CSQ}</span>
|
||||
<span class="l">RSSI:</span><span class="r">{CSQ_RSSI} dBm</span>
|
||||
<span class="l" style="display:{QOS_SHOW}">UMTS QoS Profile:</span><span class="r" style="display:{QOS_SHOW}">{DOWN} kbps DOWN | {UP} kbps UP</span>
|
||||
<span class="l">MCC MNC:</span><span class="r">{COPS_MCC} {COPS_MNC}</span>
|
||||
<span class="l">LAC:</span><span class="r">{LAC} ({LAC_NUM})</span>
|
||||
<span class="l">CID:</span><span class="r">{CID} ({CID_NUM})</span>
|
||||
<span class="l">TAC:</span><span class="r">{TAC} ({TAC_NUM})</span>
|
||||
<span class="l">RSCP:</span><span class="r">{RSCP} dBm</span>
|
||||
<span class="l">Ec/IO:</span><span class="r">{ECIO} dB</span>
|
||||
<span class="l">RSRP:</span><span class="r">{RSRP} dBm</span>
|
||||
<span class="l">SINR:</span><span class="r">{SINR} dB</span>
|
||||
<span class="l">RSRQ:</span><span class="r">{RSRQ} dB</span>
|
||||
<span class="l"> </span><small><span class="r">{BTSINFO}</small>
|
||||
<span class="l">Device:</span><span class="r">{DEVICE}</span>
|
||||
</div>
|
||||
@@ -1,35 +0,0 @@
|
||||
<span class="l" style="display:{STATUS_SHOW}">Staatus:</span><span class="r" style="display:{STATUS_SHOW}">{STATUS}</span>
|
||||
<span class="l" style="display:{STATUS_SHOW}"><small>Ühendusaeg:</small></span><span class="r" style="display:{STATUS_SHOW}"><small>{CONN_TIME}</small></span>
|
||||
<span class="l" style="display:{STATUS_SHOW}"><small>Vastvõetud:</small></span><span class="r" style="display:{STATUS_SHOW}"><small>{RX}</small></span>
|
||||
<span class="l" style="display:{STATUS_SHOW}"><small>Saadetud:</small></span><span class="r" style="display:{STATUS_SHOW}"><small>{TX}</small></span>
|
||||
<span class="l">Operaator:</span><span class="r">{COPS}</span>
|
||||
<span class="l">Töörežiim:</span><span class="r">{MODE}</span>
|
||||
<span class="l">Signaali tugevus:</span><span class="r"><strong>{CSQ_PER}%</strong></span>
|
||||
<div style="float:left; margin:1%; width:98%; height:20px; border:1px solid #000000; background-color:transparent;">
|
||||
<div style="float:left; background-color:{CSQ_COL}; border-right:1px solid #000000; height:100%; width:{CSQ_PER}%"> </div>
|
||||
</div>
|
||||
<div class="c" style="display:{SMS_SHOW};"><input type="button" class="button" value="SMS" onClick="window.location.href='cgi-bin/sms.sh'"></div>
|
||||
<div class="c" style="display:{USSD_SHOW};"><input type="button" class="button" value="USSD" onClick="window.location.href='cgi-bin/ussd.sh'"></div>
|
||||
<div class="c" style="display:{LIMIT_SHOW};"><input type="button" class="button" value="Pozostały limit" onClick="return trzyginfo('cgi-bin/limit.sh',0);"></div>
|
||||
<div class="c"><input type="button" class="button" value="Uuenda" onClick="return trzyginfo('cgi-bin/3ginfo.sh',0);"></div>
|
||||
<div class="c" style="display:{STATUS_SHOW_BUTTON}"><input type="button" class="button" value="{STATUS_TRE}" onClick="trzyginfo('cgi-bin/onoff.sh',1);"></div>
|
||||
<br />
|
||||
<a href="#" id='details_on' onclick="detailson();" style="float:left;display:inline;"><small>Näita detaile</small></a>
|
||||
<a href="#" id='details_off' onclick="detailsoff();" style="float:left;display:none;"><small>Peida detailid</small></a>
|
||||
<br />
|
||||
<div id='details' style="display:none;">
|
||||
<span class="l">CSQ:</span><span class="r">{CSQ}</span>
|
||||
<span class="l">RSSI:</span><span class="r">{CSQ_RSSI} dBm</span>
|
||||
<span class="l" style="display:{QOS_SHOW}">UMTS QoS Profile:</span><span class="r" style="display:{QOS_SHOW}">{DOWN} kbps DOWN | {UP} kbps UP</span>
|
||||
<span class="l">MCC MNC:</span><span class="r">{COPS_MCC} {COPS_MNC}</span>
|
||||
<span class="l">LAC:</span><span class="r">{LAC} ({LAC_NUM})</span>
|
||||
<span class="l">CID:</span><span class="r">{CID} ({CID_NUM})</span>
|
||||
<span class="l">TAC:</span><span class="r">{TAC} ({TAC_NUM})</span>
|
||||
<span class="l">RSCP:</span><span class="r">{RSCP} dBm</span>
|
||||
<span class="l">Ec/IO:</span><span class="r">{ECIO} dB</span>
|
||||
<span class="l">RSRP:</span><span class="r">{RSRP} dBm</span>
|
||||
<span class="l">SINR:</span><span class="r">{SINR} dB</span>
|
||||
<span class="l">RSRQ:</span><span class="r">{RSRQ} dB</span>
|
||||
<span class="l"> </span><small><span class="r">{BTSINFO}</small>
|
||||
<span class="l">Seade:</span><span class="r">{DEVICE}</span>
|
||||
</div>
|
||||
@@ -1,35 +0,0 @@
|
||||
<span class="l" style="display:{STATUS_SHOW}">Stato:</span><span class="r" style="display:{STATUS_SHOW}">{STATUS}</span>
|
||||
<span class="l" style="display:{STATUS_SHOW}"><small>Tempo di connessione:</small></span><span class="r" style="display:{STATUS_SHOW}"><small>{CONN_TIME}</small></span>
|
||||
<span class="l" style="display:{STATUS_SHOW}"><small>Ricevuti:</small></span><span class="r" style="display:{STATUS_SHOW}"><small>{RX}</small></span>
|
||||
<span class="l" style="display:{STATUS_SHOW}"><small>Trasmessi:</small></span><span class="r" style="display:{STATUS_SHOW}"><small>{TX}</small></span>
|
||||
<span class="l">Operatore:</span><span class="r">{COPS}</span>
|
||||
<span class="l">Tipo di connessione:</span><span class="r">{MODE}</span>
|
||||
<span class="l">Forza segnale:</span><span class="r"><strong>{CSQ_PER}%</strong></span>
|
||||
<div style="float:left; margin:1%; width:98%; height:20px; border:1px solid #000000; background-color:transparent;">
|
||||
<div style="float:left; background-color:{CSQ_COL}; border-right:1px solid #000000; height:100%; width:{CSQ_PER}%"> </div>
|
||||
</div>
|
||||
<div class="c" style="display:{SMS_SHOW};"><input type="button" class="button" value="SMS" onClick="window.location.href='cgi-bin/sms.sh'"></div>
|
||||
<div class="c" style="display:{USSD_SHOW};"><input type="button" class="button" value="USSD" onClick="window.location.href='cgi-bin/ussd.sh'"></div>
|
||||
<div class="c" style="display:{LIMIT_SHOW};"><input type="button" class="button" value="Limite" onClick="return trzyginfo('cgi-bin/limit.sh',0);"></div>
|
||||
<div class="c"><input type="button" class="button" value="Aggiorna" onClick="return trzyginfo('cgi-bin/3ginfo.sh',0);"></div>
|
||||
<div class="c" style="display:{STATUS_SHOW_BUTTON}"><input type="button" class="button" value="{STATUS_TRE}" onClick="trzyginfo('cgi-bin/onoff.sh',1);"></div>
|
||||
<br />
|
||||
<a href="#" id='details_on' onclick="detailson();" style="float:left;display:inline;"><small>Mostra dettagli</small></a>
|
||||
<a href="#" id='details_off' onclick="detailsoff();" style="float:left;display:none;"><small>Nascondi dettagli</small></a>
|
||||
<br />
|
||||
<div id='details' style="display:none;">
|
||||
<span class="l">CSQ:</span><span class="r">{CSQ}</span>
|
||||
<span class="l">RSSI:</span><span class="r">{CSQ_RSSI} dBm</span>
|
||||
<span class="l" style="display:{QOS_SHOW}">Profilo UMTS QoS:</span><span class="r" style="display:{QOS_SHOW}">{DOWN} kbps DOWN | {UP} kbps UP</span>
|
||||
<span class="l">MCC MNC:</span><span class="r">{COPS_MCC} {COPS_MNC}</span>
|
||||
<span class="l">LAC:</span><span class="r">{LAC} ({LAC_NUM})</span>
|
||||
<span class="l">CID:</span><span class="r">{CID} ({CID_NUM})</span>
|
||||
<span class="l">TAC:</span><span class="r">{TAC} ({TAC_NUM})</span>
|
||||
<span class="l">RSCP:</span><span class="r">{RSCP} dBm</span>
|
||||
<span class="l">Ec/IO:</span><span class="r">{ECIO} dB</span>
|
||||
<span class="l">RSRP:</span><span class="r">{RSRP} dBm</span>
|
||||
<span class="l">SINR:</span><span class="r">{SINR} dB</span>
|
||||
<span class="l">RSRQ:</span><span class="r">{RSRQ} dB</span>
|
||||
<span class="l"> </span><small><span class="r">{BTSINFO}</small>
|
||||
<span class="l">Dispositivo:</span><span class="r">{DEVICE}</span>
|
||||
</div>
|
||||
@@ -1,35 +0,0 @@
|
||||
<span class="l" style="display:{STATUS_SHOW}">Status:</span><span class="r" style="display:{STATUS_SHOW}">{STATUS}</span>
|
||||
<span class="l" style="display:{STATUS_SHOW}"><small>Czas połączenia:</small></span><span class="r" style="display:{STATUS_SHOW}"><small>{CONN_TIME}</small></span>
|
||||
<span class="l" style="display:{STATUS_SHOW}"><small>Pobrano:</small></span><span class="r" style="display:{STATUS_SHOW}"><small>{RX}</small></span>
|
||||
<span class="l" style="display:{STATUS_SHOW}"><small>Wysłano:</small></span><span class="r" style="display:{STATUS_SHOW}"><small>{TX}</small></span>
|
||||
<span class="l">Operator:</span><span class="r">{COPS}</span>
|
||||
<span class="l">Tryb pracy:</span><span class="r">{MODE}</span>
|
||||
<span class="l">Siła sygnału:</span><span class="r"><strong>{CSQ_PER}%</strong></span>
|
||||
<div style="float:left; margin:1%; width:98%; height:20px; border:1px solid #000000; background-color:transparent;">
|
||||
<div style="float:left; background-color:{CSQ_COL}; border-right:1px solid #000000; height:100%; width:{CSQ_PER}%"> </div>
|
||||
</div>
|
||||
<div class="c" style="display:{SMS_SHOW};"><input type="button" class="button" value="SMS" onClick="window.location.href='cgi-bin/sms.sh'"></div>
|
||||
<div class="c" style="display:{USSD_SHOW};"><input type="button" class="button" value="USSD" onClick="window.location.href='cgi-bin/ussd.sh'"></div>
|
||||
<div class="c" style="display:{LIMIT_SHOW};"><input type="button" class="button" value="Pozostały limit" onClick="return trzyginfo('cgi-bin/limit.sh',0);"></div>
|
||||
<div class="c"><input type="button" class="button" value="Odśwież" onClick="return trzyginfo('cgi-bin/3ginfo.sh',0);"></div>
|
||||
<div class="c" style="display:{STATUS_SHOW_BUTTON}"><input type="button" class="button" value="{STATUS_TRE}" onClick="trzyginfo('cgi-bin/onoff.sh',1);"></div>
|
||||
<br />
|
||||
<a href="#" id='details_on' onclick="detailson();" style="float:left;display:inline;"><small>Pokaż informacje dodatkowe</small></a>
|
||||
<a href="#" id='details_off' onclick="detailsoff();" style="float:left;display:none;"><small>Ukryj informacje dodatkowe</small></a>
|
||||
<br />
|
||||
<div id='details' style="display:none;">
|
||||
<span class="l">CSQ:</span><span class="r">{CSQ}</span>
|
||||
<span class="l">RSSI:</span><span class="r">{CSQ_RSSI} dBm</span>
|
||||
<span class="l" style="display:{QOS_SHOW}">Profil UMTS QoS:</span><span class="r" style="display:{QOS_SHOW}">{DOWN} kbps DOWN | {UP} kbps UP</span>
|
||||
<span class="l">MCC MNC:</span><span class="r">{COPS_MCC} {COPS_MNC}</span>
|
||||
<span class="l">LAC:</span><span class="r">{LAC} ({LAC_NUM})</span>
|
||||
<span class="l">CID:</span><span class="r">{CID} ({CID_NUM})</span>
|
||||
<span class="l">TAC:</span><span class="r">{TAC} ({TAC_NUM})</span>
|
||||
<span class="l">RSCP:</span><span class="r">{RSCP} dBm</span>
|
||||
<span class="l">Ec/IO:</span><span class="r">{ECIO} dB</span>
|
||||
<span class="l">RSRP:</span><span class="r">{RSRP} dBm</span>
|
||||
<span class="l">SINR:</span><span class="r">{SINR} dB</span>
|
||||
<span class="l">RSRQ:</span><span class="r">{RSRQ} dB</span>
|
||||
<span class="l"> </span><small><span class="r">{BTSINFO}</small>
|
||||
<span class="l">Urządzenie:</span><span class="r">{DEVICE}</span>
|
||||
</div>
|
||||
@@ -1 +0,0 @@
|
||||
E404:/index.html
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
#
|
||||
# (c) 2010-2024 Cezary Jackiewicz <cezary@eko.one.pl>
|
||||
#
|
||||
|
||||
START=99
|
||||
|
||||
start() {
|
||||
PORT=$(uci -q get 3ginfo.@3ginfo[0].http_port)
|
||||
[ -z "$PORT" ] && PORT=81
|
||||
uhttpd -E /index.html -x /cgi-bin -h /usr/share/3ginfo/html -p 0.0.0.0:$PORT -i .sh=/bin/sh > /dev/null 2>&1
|
||||
}
|
||||
@@ -1,192 +0,0 @@
|
||||
label {
|
||||
font-weight: 400;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: rgb(0,0,0);
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: #fefefe;
|
||||
margin: 15% auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: 80%;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.section {
|
||||
border-bottom: 1px dashed #8c8b8b;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#container {
|
||||
transition: margin-left .5s;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.click,
|
||||
.click:hover,
|
||||
.click:visited,
|
||||
.click:link {
|
||||
text-decoration: none;
|
||||
color: #31708f;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.margintop {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.margintop {
|
||||
margin-top: -90px;
|
||||
}
|
||||
.center-xd {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.sizing-box {
|
||||
height: 110px;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.signal-bars {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.signal-bars .bar {
|
||||
width: 14%;
|
||||
margin-left: 1%;
|
||||
min-height: 20%;
|
||||
display: inline-block;
|
||||
}
|
||||
.signal-bars .bar.first-bar { height: 20%; }
|
||||
.signal-bars .bar.second-bar { height: 40%; }
|
||||
.signal-bars .bar.third-bar { height: 60%; }
|
||||
.signal-bars .bar.fourth-bar { height: 80%; }
|
||||
.signal-bars .bar.fifth-bar { height: 99%; }
|
||||
|
||||
.lzero .bar {
|
||||
background-color: #fafafa;
|
||||
border: thin solid #ccc;
|
||||
}
|
||||
.lone .bar {
|
||||
background-color: #ff0000;
|
||||
border: thin solid #800000;
|
||||
}
|
||||
.ltwo .bar {
|
||||
background-color: #ff6a00;
|
||||
border: thin solid #803500;
|
||||
}
|
||||
.lthree .bar {
|
||||
background-color: #ffd800;
|
||||
border: thin solid #806a00;
|
||||
}
|
||||
.lfour .bar {
|
||||
background-color: #b6ff00;
|
||||
border: thin solid #558000;
|
||||
}
|
||||
.lfive .bar {
|
||||
background-color: #4cff00;
|
||||
border: thin solid #2a8000;
|
||||
}
|
||||
|
||||
.four-bars .bar.fifth-bar,
|
||||
.three-bars .bar.fifth-bar,
|
||||
.three-bars .bar.fourth-bar,
|
||||
.one-bar .bar:not(.first-bar),
|
||||
.two-bars .bar:not(.first-bar):not(.second-bar) {
|
||||
background-color: #fafafa;
|
||||
border: thin solid #ccc;
|
||||
}
|
||||
|
||||
.oneline {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
@media (max-width: 527px) {
|
||||
.hidden-vxs {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 578px) and (max-width: 821px) {
|
||||
.modalmargintop {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.col-xs-12-text-left {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.tab {
|
||||
overflow: hidden;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.tab button {
|
||||
background-color: inherit;
|
||||
float: left;
|
||||
border: none;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
padding: 14px 16px;
|
||||
transition: 0.3s;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.tab button:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.tab button.active {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
.tabcontent {
|
||||
display: none;
|
||||
padding: 6px 12px;
|
||||
b1order: 1px solid #ccc;
|
||||
b1order-top: none;
|
||||
}
|
||||
|
||||
.full-height {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.flex-center {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.position-ref {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.flex-content {
|
||||
text-align: center;
|
||||
}
|
||||
@@ -1,803 +0,0 @@
|
||||
function readdata(source, callback) {
|
||||
var xmlhttp;
|
||||
try {xmlhttp = new XMLHttpRequest();} catch (e) {
|
||||
try {xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {
|
||||
try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");} catch (e) {
|
||||
alert("Old browser?");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
xmlhttp.open("GET", "/cgi-bin/" + source);
|
||||
xmlhttp.onreadystatechange = function() {
|
||||
if (xmlhttp.readyState == 4) {
|
||||
if(xmlhttp.status == 200) {
|
||||
callback(JSON.parse(xmlhttp.responseText));
|
||||
}
|
||||
}
|
||||
}
|
||||
xmlhttp.send(null);
|
||||
}
|
||||
|
||||
function translate() {
|
||||
var lang = navigator.languages ? navigator.languages[0] : navigator.language;
|
||||
this._lang = lang.substr(0, 2);
|
||||
// this._lang = 'en';
|
||||
|
||||
fetch(`/i18n/${this._lang}.json`)
|
||||
.then((response) => {
|
||||
if (response.ok) {
|
||||
return response.json();
|
||||
}
|
||||
throw new Error('Something went wrong');
|
||||
})
|
||||
.then((translation) => {
|
||||
this._translation = translation;
|
||||
this._elements = document.querySelectorAll("[data-i18n]");
|
||||
this._elements.forEach((element) => {
|
||||
var keys = element.dataset.i18n.split(".");
|
||||
var text = keys.reduce((obj, i) => obj[i], translation);
|
||||
if (text) {
|
||||
element.innerHTML = text;
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(`Could not load ${this._lang}, en will be used`);
|
||||
});
|
||||
}
|
||||
|
||||
function _t(text, defaulttext) {
|
||||
if (this._translation) {
|
||||
var key = text.replaceAll(' ', '').toLowerCase();
|
||||
if (key in this._translation) {
|
||||
return this._translation[key];
|
||||
}
|
||||
}
|
||||
return defaulttext ? defaulttext : text;
|
||||
}
|
||||
|
||||
function info_onload() {
|
||||
translate();
|
||||
showmodeminfo();
|
||||
}
|
||||
|
||||
function formatDateTime(s) {
|
||||
if (s.length == 14) {
|
||||
return s.replace(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/, "$1-$2-$3 $4:$5:$6");
|
||||
} else if (s.length == 12) {
|
||||
return s.replace(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/, "$1-$2-$3 $4:$5");
|
||||
} else if (s.length == 8) {
|
||||
return s.replace(/(\d{4})(\d{2})(\d{2})/, "$1-$2-$3");
|
||||
} else if (s.length == 6) {
|
||||
return s.replace(/(\d{4})(\d{2})/, "$1-$2");
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
function lz(n) {
|
||||
return (n < 10 ? '0' : '' ) + n;
|
||||
}
|
||||
|
||||
function formatDateTimeForUptime(uptime) {
|
||||
var d = new Date(new Date().getTime() - uptime * 1000);
|
||||
return '' +
|
||||
d.getFullYear() + '-' +
|
||||
lz(d.getMonth() + 1) + '-' +
|
||||
lz(d.getDate()) + ' ' +
|
||||
lz(d.getHours()) + ':' +
|
||||
lz(d.getMinutes()) + ':' +
|
||||
lz(d.getSeconds());
|
||||
}
|
||||
|
||||
function createRowForModal(key, value) {
|
||||
return '<div class="row"><div class="col-xs-5 col-sm-6 text-right">' + key + '</div><div class="col-xs-7 col-sm-6 text-left"><p>' + value + '</p></div></div>';
|
||||
}
|
||||
|
||||
function createRow9ColForModal(arr) {
|
||||
return '<div class="row">' +
|
||||
'<div class="col-xs-1 text-right"><p>' + arr[0] + '</p></div>' +
|
||||
'<div class="col-xs-3 text-left"><p>' + arr[1] + '</p></div>' +
|
||||
'<div class="col-xs-2 text-left"><p>' + arr[2] + '</p></div>' +
|
||||
'<div class="col-xs-1 text-left"><p>' + arr[3] + '</p></div>' +
|
||||
'<div class="col-xs-1 text-left"><p>' + arr[4] + '</p></div>' +
|
||||
'<div class="col-xs-1 text-left"><p>' + arr[5] + '</p></div>' +
|
||||
'<div class="col-xs-1 text-left"><p>' + arr[6] + '</p></div>' +
|
||||
'<div class="col-xs-1 text-left"><p>' + arr[7] + '</p></div>' +
|
||||
'<div class="col-xs-1 text-left"><p>' + arr[8] + '</p></div>' +
|
||||
'</div>';
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
var modal;
|
||||
|
||||
function setValue(element, value) {
|
||||
var e = document.getElementById(element);
|
||||
if (e.tagName == "SELECT") {
|
||||
for (var i = 0; i < e.options.length; i++) {
|
||||
if (e.options[i].value == value) {
|
||||
e.selectedIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (e.tagName == "P") {
|
||||
e.innerHTML = value;
|
||||
} else if (e.tagName == "H3") {
|
||||
e.innerHTML = value;
|
||||
} else if (e.tagName == "SPAN") {
|
||||
e.innerHTML = value;
|
||||
} else if (e.tagName == "DIV") {
|
||||
e.innerHTML = value;
|
||||
} else if (e.type === 'checkbox') {
|
||||
e.checked = value;
|
||||
} else if (e.type === 'radio') {
|
||||
e.checked = value;
|
||||
} else {
|
||||
e.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
function setDisplay(element, show) {
|
||||
document.getElementById(element).style.display = (show ? 'block' : 'none');
|
||||
}
|
||||
|
||||
function addClasses(element, classes) {
|
||||
for (var i = 0; i < classes.length; i++) {
|
||||
if (!element.className.match(new RegExp('(?:^|\\s)' + classes[i] + '(?!\\S)', 'g')))
|
||||
element.className += " " + classes[i];
|
||||
}
|
||||
}
|
||||
|
||||
function removeClasses(element, classes) {
|
||||
for (var i = 0; i < classes.length; i++) {
|
||||
element.className = element.className.replace(new RegExp('(?:^|\\s)' + classes[i] + '(?!\\S)', 'g'), '');
|
||||
}
|
||||
}
|
||||
|
||||
function showMsg(msg, error) {
|
||||
closeMsg();
|
||||
|
||||
if (!msg || 0 === msg.length) { msg = _t('Please wait') + '...'; }
|
||||
var e = document.getElementById('msgtxt');
|
||||
e.innerHTML = msg;
|
||||
|
||||
if (error) {
|
||||
e.style.color = 'red';
|
||||
addClasses(e, ['has-error']);
|
||||
} else {
|
||||
e.style.color = null;
|
||||
removeClasses(e, ['has-error']);
|
||||
}
|
||||
|
||||
modal = document.getElementById('div_msg');
|
||||
modal.style.display = 'block';
|
||||
|
||||
window.onclick = function(event) {
|
||||
if (event.target == modal) {
|
||||
modal.style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function closeMsg() {
|
||||
if (modal) { modal.style.display = 'none'; }
|
||||
}
|
||||
|
||||
function sortJSON(data, key, way) {
|
||||
return data.sort(function(a, b) {
|
||||
var x = a[key]; var y = b[key];
|
||||
if (way === 'asc' ) { return ((x < y) ? -1 : ((x > y) ? 1 : 0)); }
|
||||
if (way === 'desc') { return ((x > y) ? -1 : ((x < y) ? 1 : 0)); }
|
||||
});
|
||||
}
|
||||
|
||||
function formatDuration(s, showsec) {
|
||||
if (s === '-') {return '-';}
|
||||
if (s === '') {return '-';}
|
||||
var d = Math.floor(s/86400),
|
||||
h = Math.floor(s/3600) % 24,
|
||||
m = Math.floor(s/60)%60,
|
||||
s = s % 60;
|
||||
var time = d > 0 ? d + 'd ' : '';
|
||||
if (time != '') {time += h + _t('h') + ' '} else {time = h > 0 ? h + _t('h') + ' ' : ''}
|
||||
if (time != '') {time += m + 'm '} else {time = m > 0 ? m + 'm ' : ''}
|
||||
if (showsec) {
|
||||
time += s + 's';
|
||||
} else {
|
||||
if (time == '') { time += m + 'm'; }
|
||||
}
|
||||
return time;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
function modem(evt, modem) {
|
||||
var i, tabcontent, tablinks;
|
||||
tabcontent = document.getElementsByClassName("tabcontent");
|
||||
for (i = 0; i < tabcontent.length; i++) {
|
||||
tabcontent[i].style.display = "none";
|
||||
}
|
||||
tablinks = document.getElementsByClassName("tablinks");
|
||||
for (i = 0; i < tablinks.length; i++) {
|
||||
tablinks[i].className = tablinks[i].className.replace(" active", "");
|
||||
}
|
||||
document.getElementById(modem).style.display = "block";
|
||||
evt.currentTarget.className += " active";
|
||||
}
|
||||
|
||||
function showmodeminfo() {
|
||||
readdata('infoproducts.sh', function(data1) {
|
||||
var html = '';
|
||||
if (data1.res.length > 1) {
|
||||
var htmltab = '<div class="tab">';
|
||||
(data1.res).forEach(function callback(value, idx) {
|
||||
var id = (idx == 0 ? 'id="defaultOpen"' : '');
|
||||
htmltab += '<button class="tablinks" onclick="modem(event, \'modem' + idx + '\')"' + id + '><span id="tabtitle' + idx + '"></span></button>';
|
||||
html += ('<div id="modem' + idx + '" class="tabcontent">' + document.getElementById('div_template').innerHTML + '</div>').replaceAll('_idx', idx);
|
||||
});
|
||||
htmltab += '</div>';
|
||||
setValue('div_modems', '');
|
||||
document.getElementById('div_modems').insertAdjacentHTML('beforeend', htmltab + html);
|
||||
|
||||
document.getElementById("defaultOpen").click();
|
||||
} else {
|
||||
setValue('div_modems', '');
|
||||
html += ('<div id="modem0">' + document.getElementById('div_template').innerHTML + '</div>').replaceAll('_idx', 0);
|
||||
document.getElementById('div_modems').insertAdjacentHTML('beforeend', html);
|
||||
}
|
||||
|
||||
(data1.res).forEach(function callback(data, idx) {
|
||||
setValue('vendor' + idx, data.vendor == '' ? '-' : data.vendor);
|
||||
setValue('product' + idx, data.product == '' ? '-' : data.product);
|
||||
if (data1.res.length > 1) {
|
||||
setValue('tabtitle' + idx, data.product == '' ? 'modem #' + (idx + 1) : data.product);
|
||||
}
|
||||
setValue('revision' + idx, data.revision == '' ? '-' : data.revision);
|
||||
setValue('imei' + idx, data.imei == '' ? '-' : data.imei);
|
||||
setValue('iccid' + idx, data.iccid == '' ? '-' : data.iccid);
|
||||
setValue('imsi' + idx, data.imsi == '' ? '-' : data.imsi);
|
||||
});
|
||||
|
||||
showmodemparams();
|
||||
setInterval(showmodemparams, 10000);
|
||||
});
|
||||
}
|
||||
|
||||
var arrmodemaddon = [];
|
||||
|
||||
function showmodemparams() {
|
||||
readdata('info.sh', function(data1) {
|
||||
|
||||
(data1.res).forEach(function callback(data2, idx) {
|
||||
var data = data2[0];
|
||||
setValue('rx' + idx, data.rx == '' ? '-' : data.rx);
|
||||
setValue('tx' + idx, data.tx == '' ? '-' : data.tx);
|
||||
setValue('uptime' + idx, formatDuration(data.conn_time_sec, false));
|
||||
setValue('uptime_since' + idx, ' (' + _t('since') + ' ' + formatDateTimeForUptime(data.conn_time_sec) + ')');
|
||||
|
||||
var data = data2[1];
|
||||
if (data.error)
|
||||
return;
|
||||
|
||||
arrmodemaddon[idx] = [];
|
||||
|
||||
switch(data.registration) {
|
||||
case "0":
|
||||
setValue('registration' + idx, _t('registered0', 'Not registered'));
|
||||
break;
|
||||
case "1":
|
||||
setValue('registration' + idx, _t('registered1', 'Registered, home network'));
|
||||
break;
|
||||
case "2":
|
||||
setValue('registration' + idx, _t('registered2', 'Not registered, searching'));
|
||||
break;
|
||||
case "3":
|
||||
setValue('registration' + idx, _t('registered3', 'Registration denied'));
|
||||
break;
|
||||
case "5":
|
||||
setValue('registration' + idx, _t('registered5', 'Registered, roaming'));
|
||||
break;
|
||||
case "6":
|
||||
setValue('registration' + idx, _t('registered6', 'Registered for SMS only, home network'));
|
||||
break;
|
||||
case "7":
|
||||
setValue('registration' + idx, _t('registered7', 'Registered for SMS only, roaming'));
|
||||
break;
|
||||
default:
|
||||
setValue('registration' + idx, data.registration == '' ? '-' : data.registration);
|
||||
}
|
||||
|
||||
if (data.registration == '1' || data.registration == '5' || data.registration == '6' || data.registration == '7') {
|
||||
setValue('signal' + idx, data.signal == '' ? '-' : data.signal + '%');
|
||||
|
||||
if (data.signal) {
|
||||
var e = document.getElementById('signal_bars' + idx);
|
||||
removeClasses(e, ['lzero', 'lone', 'ltwo', 'lthree', 'lfour', 'lfive', 'one-bar', 'two-bars', 'three-bars', 'four-bars', 'five-bars']);
|
||||
if (data.signal >= 80) {
|
||||
addClasses(e, ['lfive', 'five-bars']);
|
||||
}
|
||||
if (data.signal < 80 && data.signal >= 60) {
|
||||
addClasses(e, ['lfour', 'four-bars']);
|
||||
}
|
||||
if (data.signal < 60 && data.signal >= 40) {
|
||||
addClasses(e, ['lthree', 'three-bars']);
|
||||
}
|
||||
if (data.signal < 40 && data.signal >= 20) {
|
||||
addClasses(e, ['ltwo', 'two-bars']);
|
||||
}
|
||||
if (data.signal < 20 && data.signal > 0) {
|
||||
addClasses(e, ['lone', 'one-bar']);
|
||||
}
|
||||
if (data.signal == 0) {
|
||||
addClasses(e, ['lzero', 'one-bar']);
|
||||
}
|
||||
}
|
||||
|
||||
setValue('operator' + idx, data.operator_name == '' ? '-' : data.operator_name);
|
||||
var mode = (data.mode == '' ? '-' : data.mode);
|
||||
if (mode.toLowerCase().includes('lte') || mode.toLowerCase().includes('5g')) {
|
||||
if (mode.toLowerCase().includes('lte')) {
|
||||
mode = (data.mode).split(' ')[0];
|
||||
}
|
||||
if (mode.toLowerCase().includes('5g')) {
|
||||
mode = (data.mode).split(' ')[0] + ' ' + (data.mode).split(' ')[1];
|
||||
}
|
||||
var count = ((data.mode).match(/\//g) || []).length;
|
||||
if (count > 0) {
|
||||
mode += ' (' + (count + 1) + 'CA)';
|
||||
}
|
||||
}
|
||||
setValue('mode' + idx, mode);
|
||||
|
||||
arrmodemaddon[idx].push({'idx':1, 'key':'Mode', 'value':data.mode});
|
||||
if (data.country) {
|
||||
arrmodemaddon[idx].push({'idx':19, 'key':'Country', 'value':data.country});
|
||||
}
|
||||
if (data.operator_mcc && data.operator_mcc != '' && data.operator_mnc && data.operator_mnc != '') {
|
||||
arrmodemaddon[idx].push({'idx':20, 'key':'MCC MNC', 'value':data.operator_mcc + ' ' + data.operator_mnc});
|
||||
}
|
||||
if (data.lac_dec && data.lac_dec > 0) {
|
||||
arrmodemaddon[idx].push({'idx':22, 'key':'LAC', 'value':data.lac_dec + ' (' + data.lac_hex + ')'});
|
||||
}
|
||||
if (data.cid_dec && data.cid_dec > 0) {
|
||||
arrmodemaddon[idx].push({'idx':21, 'key':'Cell ID', 'value':data.cid_dec + ' (' + data.cid_hex + ')'});
|
||||
}
|
||||
|
||||
if (data.cid_dec && data.cid_dec > 0 && data.operator_mcc == 260) {
|
||||
switch (data.operator_mnc) {
|
||||
case '01':
|
||||
case '02':
|
||||
case '03':
|
||||
case '06':
|
||||
document.getElementById('btsearch' + idx).setAttribute('href', 'https://btsearch.pl/stations?mnc=260' + data.operator_mnc + '&q=' + data.cid_dec);
|
||||
break;
|
||||
default:
|
||||
document.getElementById('btsearch' + idx).setAttribute('href', 'https://btsearch.pl/stations?q=' + data.cid_dec);
|
||||
}
|
||||
setDisplay('div_btsearch' + idx, true);
|
||||
} else {
|
||||
setDisplay('div_btsearch' + idx, false);
|
||||
}
|
||||
} else {
|
||||
setValue('signal' + idx, '-');
|
||||
var e = document.getElementById('signal_bars' + idx);
|
||||
removeClasses(e, ['lzero', 'lone', 'ltwo', 'lthree', 'lfour', 'lfive', 'one-bar', 'two-bars', 'three-bars', 'four-bars', 'five-bars']);
|
||||
addClasses(e, ['lzero', 'one-bar']);
|
||||
setValue('operator' + idx, '-');
|
||||
setValue('mode' + idx, '-');
|
||||
setDisplay('div_btsearch' + idx, false);
|
||||
}
|
||||
if (data.addon) {
|
||||
arrmodemaddon[idx] = arrmodemaddon[idx].concat(data.addon);
|
||||
}
|
||||
setDisplay('div_addon' + idx, (arrmodemaddon[idx]).length > 0);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function paramdesc(param, value) {
|
||||
var pvalue = parseInt(value.split(' ')[0]);
|
||||
var description = '';
|
||||
var color = '';
|
||||
var title = '';
|
||||
switch(param) {
|
||||
case 'rssi':
|
||||
if (pvalue > -65) { color = '#2bdf5a'; description += _t('excellent'); }
|
||||
if (pvalue > -75 && pvalue <= -65 ) { color = '#efff12'; description += _t('good'); }
|
||||
if (pvalue > -85 && pvalue <= -75 ) { color = '#f8c200'; description += _t('fair'); }
|
||||
if (pvalue > -95 && pvalue <= -85 ) { color = '#fa0000'; description += _t('poor'); }
|
||||
if (pvalue <= -95) { color = '#fa0000'; description += _t('very poor'); }
|
||||
title += '> -65 dBm ' + _t('excellent') + '\n';
|
||||
title += '> -75 dBm i <= -65 dBm ' + _t('good') + '\n';
|
||||
title += '> -85 dBm i <= -75 dBm ' + _t('fair') + '\n';
|
||||
title += '> -95 dBm i <= -85 dBm ' + _t('poor') + '\n';
|
||||
title += '<= -95 dBm ' + _t('very poor');
|
||||
break;
|
||||
case 'rsrp':
|
||||
if (pvalue >= -80) { color = '#2bdf5a'; description += _t('excellent'); }
|
||||
if (pvalue >= -90 && pvalue < -80 ) { color = '#efff12'; description += _t('good'); }
|
||||
if (pvalue >= -100 && pvalue < -90 ) { color = '#f8c200'; description += _t('fair'); }
|
||||
if (pvalue < -100) { color = '#fa0000'; description += _t('poor'); }
|
||||
title += '> -80 dBm ' + _t('excellent') + '\n';
|
||||
title += '>= -90 dBm i < -80 dBm ' + _t('good') + '\n';
|
||||
title += '>= -100 dBm i < -90 dBm ' + _t('fair') + '\n';
|
||||
title += '< -100 dBm ' + _t('poor');
|
||||
break;
|
||||
case 'rsrq':
|
||||
if (pvalue >= -10) { color = '#2bdf5a'; description += _t('excellent'); }
|
||||
if (pvalue >= -15 && pvalue < -10 ) { color = '#efff12'; description += _t('good'); }
|
||||
if (pvalue >= -20 && pvalue < -15 ) { color = '#f8c200'; description += _t('fair'); }
|
||||
if (pvalue < -20) { color = '#fa0000'; description += _t('poor'); }
|
||||
title += '>= -10 dB ' + _t('excellent') + '\n';
|
||||
title += '>= -15 dB i < -10 dB ' + _t('good') + '\n';
|
||||
title += '>= -20 dB i < -15 dB ' + _t('fair') + '\n';
|
||||
title += '< -20 dB ' + _t('poor');
|
||||
break;
|
||||
}
|
||||
return ', <span style="color:' + color + '" title="' + title + '">' + description + '</span>';
|
||||
}
|
||||
|
||||
function modemaddon(idx) {
|
||||
var htmlco = '';
|
||||
var htmlxs = '';
|
||||
var html = '';
|
||||
var pcc = [];
|
||||
var scc1 = [];
|
||||
var scc2 = [];
|
||||
var scc3 = [];
|
||||
var scc4 = [];
|
||||
var ulscc = [];
|
||||
var sorted = sortJSON(arrmodemaddon[idx], 'idx', 'asc');
|
||||
sorted.forEach(function(e) {
|
||||
var description = '';
|
||||
switch (e.idx) {
|
||||
// MODE
|
||||
case 1:
|
||||
if ((e.value).search(/^LTE B/) > -1 || (e.value).search(/^LTE-A B/) > -1) {
|
||||
pcc[1] = (e.value).replace(/^LTE /, '').replace(/^LTE-A /, '');
|
||||
}
|
||||
if ((e.value).search(/^5G/) > -1) {
|
||||
pcc[1] = (e.value).replace(/^5G NSA /, '').replace(/^5G SA /, '');
|
||||
}
|
||||
break;
|
||||
// PCC
|
||||
case 30:
|
||||
if ((e.value).includes(' @')) {
|
||||
pcc[1] = (e.value).split(' @')[0];
|
||||
pcc[2] = (e.value).split(' @')[1];
|
||||
} else {
|
||||
pcc[1] = e.value;
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 31:
|
||||
pcc[2] = e.value;
|
||||
htmlxs += createRowForModal(e.key, e.value);
|
||||
break;
|
||||
case 32:
|
||||
if (typeof pcc[2] === 'undefined') {
|
||||
pcc[2] = e.value;
|
||||
} else {
|
||||
pcc[2] = e.value + ' DL<br>' + pcc[2] + ' UL'
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 33:
|
||||
pcc[3] = e.value;
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 34:
|
||||
if ((e.key).toLowerCase().includes('earfcn ul')) {
|
||||
if (typeof pcc[4] === 'undefined') {
|
||||
pcc[4] = e.value + ' UL';
|
||||
} else {
|
||||
pcc[4] = pcc[4] + ' DL<br>' + e.value + ' UL';
|
||||
}
|
||||
} else {
|
||||
if (typeof pcc[4] === 'undefined') {
|
||||
pcc[4] = e.value;
|
||||
} else {
|
||||
pcc[4] = e.value + ' DL<br>' + pcc[4];
|
||||
}
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 35:
|
||||
description = paramdesc('rssi', e.value);
|
||||
pcc[5] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 36:
|
||||
description = paramdesc('rsrp', e.value);
|
||||
pcc[6] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 37:
|
||||
description = paramdesc('rsrq', e.value);
|
||||
pcc[7] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 38:
|
||||
if ((e.key).toLowerCase().includes('sinr')) {
|
||||
pcc[8] = e.value;
|
||||
} else {
|
||||
html += createRowForModal(_t(e.key), e.value);
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
// SCC1
|
||||
case 50:
|
||||
if ((e.value).includes(' @')) {
|
||||
scc1[1] = (e.value).split(' @')[0];
|
||||
scc1[2] = (e.value).split(' @')[1];
|
||||
} else {
|
||||
scc1[1] = e.value;
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 52:
|
||||
scc1[2] = e.value;
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 53:
|
||||
scc1[3] = e.value;
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 54:
|
||||
if (!(e.key).toLowerCase().includes('earfcn ul')) {
|
||||
scc1[4] = e.value;
|
||||
} else {
|
||||
html += createRowForModal(_t(e.key), e.value);
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 55:
|
||||
description = paramdesc('rssi', e.value);
|
||||
scc1[5] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 56:
|
||||
description = paramdesc('rsrp', e.value);
|
||||
scc1[6] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 57:
|
||||
description = paramdesc('rsrq', e.value);
|
||||
scc1[7] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 58:
|
||||
if ((e.key).toLowerCase().includes('sinr')) {
|
||||
scc1[8] = e.value;
|
||||
} else {
|
||||
html += createRowForModal(e.key, e.value);
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
// SCC2
|
||||
case 60:
|
||||
if ((e.value).includes(' @')) {
|
||||
scc2[1] = (e.value).split(' @')[0];
|
||||
scc2[2] = (e.value).split(' @')[1];
|
||||
} else {
|
||||
scc2[1] = e.value;
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 62:
|
||||
scc2[2] = e.value;
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 63:
|
||||
scc2[3] = e.value;
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 64:
|
||||
if (!(e.key).toLowerCase().includes('earfcn ul')) {
|
||||
scc2[4] = e.value;
|
||||
} else {
|
||||
html += createRowForModal(_t(e.key), e.value);
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 65:
|
||||
description = paramdesc('rssi', e.value);
|
||||
scc2[5] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 66:
|
||||
description = paramdesc('rsrp', e.value);
|
||||
scc2[6] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 67:
|
||||
description = paramdesc('rsrq', e.value);
|
||||
scc2[7] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 68:
|
||||
if ((e.key).toLowerCase().includes('sinr')) {
|
||||
scc2[8] = e.value;
|
||||
} else {
|
||||
html += createRowForModal(_t(e.key), e.value);
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
// SCC3
|
||||
case 70:
|
||||
if ((e.value).includes(' @')) {
|
||||
scc3[1] = (e.value).split(' @')[0];
|
||||
scc3[2] = (e.value).split(' @')[1];
|
||||
} else {
|
||||
scc3[1] = e.value;
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 72:
|
||||
scc3[2] = e.value;
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 73:
|
||||
scc3[3] = e.value;
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 74:
|
||||
if (!(e.key).toLowerCase().includes('earfcn ul')) {
|
||||
scc3[4] = e.value;
|
||||
} else {
|
||||
html += createRowForModal(e.key, e.value);
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 75:
|
||||
description = paramdesc('rssi', e.value);
|
||||
scc3[5] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 76:
|
||||
description = paramdesc('rsrp', e.value);
|
||||
scc3[6] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 77:
|
||||
description = paramdesc('rsrq', e.value);
|
||||
scc3[7] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 78:
|
||||
if ((e.key).toLowerCase().includes('sinr')) {
|
||||
scc3[8] = e.value;
|
||||
} else {
|
||||
html += createRowForModal(_t(e.key), e.value);
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
// SCC4
|
||||
case 80:
|
||||
if ((e.value).includes(' @')) {
|
||||
scc4[1] = (e.value).split(' @')[0];
|
||||
scc4[2] = (e.value).split(' @')[1];
|
||||
} else {
|
||||
scc4[1] = e.value;
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 82:
|
||||
scc4[2] = e.value;
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 83:
|
||||
scc4[3] = e.value;
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 84:
|
||||
if (!(e.key).toLowerCase().includes('earfcn ul')) {
|
||||
scc4[4] = e.value;
|
||||
} else {
|
||||
html += createRowForModal(_t(e.key), e.value);
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 85:
|
||||
description = paramdesc('rssi', e.value);
|
||||
scc4[5] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 86:
|
||||
description = paramdesc('rsrp', e.value);
|
||||
scc4[6] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 87:
|
||||
description = paramdesc('rsrq', e.value);
|
||||
scc4[7] = e.value + description.replace(', ', '<br>');
|
||||
htmlxs += createRowForModal(_t(e.key), e.value + description);
|
||||
break;
|
||||
case 88:
|
||||
if ((e.key).toLowerCase().includes('sinr')) {
|
||||
scc4[8] = e.value;
|
||||
} else {
|
||||
html += createRowForModal(_t(e.key), e.value);
|
||||
}
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
break;
|
||||
case 150:
|
||||
ulscc[1] = e.value;
|
||||
htmlxs += createRowForModal(e.key, e.value);
|
||||
break;
|
||||
case 152:
|
||||
ulscc[2] = e.value;
|
||||
htmlxs += createRowForModal(e.key, e.value);
|
||||
break;
|
||||
case 153:
|
||||
ulscc[3] = e.value;
|
||||
htmlxs += createRowForModal(e.key, e.value);
|
||||
break;
|
||||
case 154:
|
||||
ulscc[4] = e.value;
|
||||
htmlxs += createRowForModal(e.key, e.value);
|
||||
break;
|
||||
default:
|
||||
if (e.idx < 30) {
|
||||
htmlco += createRowForModal(_t(e.key), e.value);
|
||||
} else {
|
||||
html += createRowForModal(_t(e.key), e.value);
|
||||
htmlxs += createRowForModal(_t(e.key), e.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
htmlco += '<div class="visible-xs-block visible-sm-block">' + htmlxs + '</div>';
|
||||
if (pcc.length + scc1.length + scc2.length + scc3.length + scc4.length > 0) {
|
||||
htmlco += '<div class="margintop hidden-xs hidden-sm">' + html;
|
||||
if (pcc.length > 0) {
|
||||
pcc[0] = 'PCC';
|
||||
for (var idx = 0; idx <= 9; idx++) {
|
||||
if (typeof pcc[idx] === 'undefined') { pcc[idx] = '-'; }
|
||||
}
|
||||
htmlco += createRow9ColForModal(['', _t('Band'), _t('Bandwidth'), 'PCI', 'EARFCN', 'RSSI', 'RSRP', 'RSRQ', 'SINR']);
|
||||
htmlco += createRow9ColForModal(pcc);
|
||||
}
|
||||
if (scc1.length > 0) {
|
||||
scc1[0] = 'SCC1';
|
||||
for (var idx = 0; idx <= 9; idx++) {
|
||||
if (typeof scc1[idx] === 'undefined') { scc1[idx] = '-'; }
|
||||
}
|
||||
htmlco += createRow9ColForModal(scc1);
|
||||
}
|
||||
if (scc2.length > 0) {
|
||||
scc2[0] = 'SCC2';
|
||||
for (var idx = 0; idx <= 9; idx++) {
|
||||
if (typeof scc2[idx] === 'undefined') { scc2[idx] = '-'; }
|
||||
}
|
||||
htmlco += createRow9ColForModal(scc2);
|
||||
}
|
||||
if (scc3.length > 0) {
|
||||
scc3[0] = 'SCC3';
|
||||
for (var idx = 0; idx <= 9; idx++) {
|
||||
if (typeof scc3[idx] === 'undefined') { scc3[idx] = '-'; }
|
||||
}
|
||||
htmlco += createRow9ColForModal(scc3);
|
||||
}
|
||||
if (scc4.length > 0) {
|
||||
scc4[0] = 'SCC4';
|
||||
for (var idx = 0; idx <= 9; idx++) {
|
||||
if (typeof scc4[idx] === 'undefined') { scc4[idx] = '-'; }
|
||||
}
|
||||
htmlco += createRow9ColForModal(scc4);
|
||||
}
|
||||
if (ulscc.length > 0) {
|
||||
ulscc[0] = 'UL SCC';
|
||||
for (var idx = 0; idx <= 9; idx++) {
|
||||
if (typeof ulscc[idx] === 'undefined') { ulscc[idx] = '-'; }
|
||||
}
|
||||
htmlco += createRow9ColForModal(ulscc);
|
||||
}
|
||||
htmlco += '</div>';
|
||||
}
|
||||
showMsg(htmlco);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
window.onload = info_onload;
|
||||
@@ -1,7 +0,0 @@
|
||||
/*!
|
||||
* Generated using the Bootstrap Customizer (https://getbootstrap.com/docs/3.4/customize/)
|
||||
*//*!
|
||||
* Bootstrap v3.4.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,*:before,*:after{color:#000 !important;text-shadow:none !important;background:transparent !important;-webkit-box-shadow:none !important;box-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:hover,a:focus{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role="button"]{cursor:pointer}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.Line truncated
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# (c) 2024-2025 Cezary Jackiewicz <cezary@eko.one.pl>
|
||||
#
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
RES="/usr/share/modemdata"
|
||||
ECM=""
|
||||
|
||||
SEPARATOR=""
|
||||
parse_section() {
|
||||
[ -n "$SEPARATOR" ] && echo "$SEPARATOR"
|
||||
local section="$1"
|
||||
config_get device "$section" device ""
|
||||
config_get network "$section" network ""
|
||||
config_get force_plmn "$section" force_plmn "0"
|
||||
|
||||
if echo "x$device" | grep -q "192.168."; then
|
||||
ECM="$RES/addon/ecm/huawei.sh $device"
|
||||
else
|
||||
ECM=""
|
||||
if [ ! -e /var/state/3ginfo-detected ]; then
|
||||
[ -z "$device" ] && device=$(/usr/share/3ginfo/detectdevice.sh)
|
||||
[ -z "$network" ] && network=$(/usr/share/3ginfo/detectsection.sh "$section")
|
||||
fi
|
||||
config_get pincode "$section" pincode ""
|
||||
if [ -n "$pincode" ] && [ ! -e /var/state/3ginfo-pincode ]; then
|
||||
[ -n "$device" ] && sms_tool -d "$device" at "at+cpin=\"$pincode\""
|
||||
fi
|
||||
fi
|
||||
echo "["
|
||||
$RES/network.sh "$network" | tr -d '\n'
|
||||
echo ","
|
||||
if [ -n "$ECM" ]; then
|
||||
$ECM params
|
||||
else
|
||||
$RES/params.sh "$device" "$force_plmn" | tr -d '\n'
|
||||
fi
|
||||
echo "]"
|
||||
SEPARATOR=","
|
||||
}
|
||||
|
||||
config_load 3ginfo
|
||||
echo -e "Content-type: application/json\n\n"
|
||||
echo '{"res":['
|
||||
config_foreach parse_section 3ginfo
|
||||
echo ']}'
|
||||
touch /var/state/3ginfo-detected
|
||||
touch /var/state/3ginfo-pincode
|
||||
|
||||
exit 0
|
||||
@@ -1,42 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# (c) 2024-2025 Cezary Jackiewicz <cezary@eko.one.pl>
|
||||
#
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
RES="/usr/share/modemdata"
|
||||
|
||||
SEPARATOR=""
|
||||
parse_section() {
|
||||
[ -n "$SEPARATOR" ] && echo "$SEPARATOR"
|
||||
local section="$1"
|
||||
local device
|
||||
local network
|
||||
config_get device "$section" device ""
|
||||
|
||||
if echo "x$device" | grep -q "192.168."; then
|
||||
$RES/addon/ecm/huawei.sh $device product
|
||||
else
|
||||
if [ ! -e /var/state/3ginfo-detected ]; then
|
||||
[ -z "$device" ] && device=$(/usr/share/3ginfo/detectdevice.sh)
|
||||
fi
|
||||
config_get pincode "$section" pincode ""
|
||||
if [ -n "$pincode" ] && [ ! -e /var/state/3ginfo-pincode ]; then
|
||||
[ -n "$device" ] && sms_tool -d "$device" at "at+cpin=\"$pincode\""
|
||||
fi
|
||||
$RES/product.sh "$device" | tr -d '\n'
|
||||
fi
|
||||
SEPARATOR=","
|
||||
}
|
||||
|
||||
config_load 3ginfo
|
||||
echo -e "Content-type: application/json\n\n"
|
||||
echo '{"res":['
|
||||
config_foreach parse_section 3ginfo
|
||||
echo ']}'
|
||||
touch /var/state/3ginfo-detected
|
||||
touch /var/state/3ginfo-pincode
|
||||
|
||||
exit 0
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
"device": "Urządzenie",
|
||||
"vendor": "Producent",
|
||||
"product": "Model",
|
||||
"revision": "Wersja",
|
||||
"imei": "Identyfikator modemu (IMEI)",
|
||||
"iccid": "Numer karty SIM (ICCID)",
|
||||
"imsi": "Identyfikator abonenta (IMSI)",
|
||||
"parameters": "Parametry",
|
||||
"signal": "Sygnał",
|
||||
"mode": "Technologia",
|
||||
"simstatus": "Status karty SIM",
|
||||
"more": "więcej parametrów",
|
||||
"btslocation": "lokalizacja stacji bazowej",
|
||||
"connection": "Połączenie z internetem",
|
||||
"connectiontime": "Czas połączenia",
|
||||
"tx": "Wysłano",
|
||||
"rx": "Pobrano",
|
||||
"registered0": "Brak sieci",
|
||||
"registered1": "Zalogowana do sieci macierzystej",
|
||||
"registered2": "Wyszukiwanie operatora",
|
||||
"registered3": "Odmowa dostępu",
|
||||
"registered5": "Zalogowana do sieci w roamingu",
|
||||
"registered6": "Zalogowana do sieci macierzystej, tylko SMS",
|
||||
"registered7": "Zalogowana do sieci w roamingu, tylko SMS",
|
||||
"since": "od",
|
||||
"h": "g",
|
||||
"temperature": "Temperatura",
|
||||
"band": "Pasmo",
|
||||
"primaryband": "Pasmo podstawowe",
|
||||
"bandwidth": "Szerokość",
|
||||
"excellent": "doskonały",
|
||||
"good": "dobry",
|
||||
"fair": "słaby",
|
||||
"poor": "zły",
|
||||
"verypoor": "bardzo zły",
|
||||
"pleasewait": "Proszę czekać",
|
||||
"country": "Kraj"
|
||||
}
|
||||
@@ -1,145 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="author" content="cezary@eko.one.pl">
|
||||
<title>3G/4G/5G</title>
|
||||
<link href="/bootstrap.min.css?v=1" rel="stylesheet">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="/html5shiv.min.js?v=1"></script>
|
||||
<script src="/respond.min.js?v=1"></script>
|
||||
<![endif]-->
|
||||
<link href="/3ginfo.css?v=1" rel="stylesheet">
|
||||
<script src="/3ginfo.js?v=1"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<div id="div_content">
|
||||
<div id="div_template" style="display:none">
|
||||
<h3 class="section" data-i18n="device">Device</h3>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="vendor">Vendor</div>
|
||||
<div class="col-xs-6">
|
||||
<p id="vendor_idx">-</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="product">Product</div>
|
||||
<div class="col-xs-6">
|
||||
<p id="product_idx">-</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="revision">Revision</div>
|
||||
<div class="col-xs-6">
|
||||
<p id="revision_idx">-</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="imei">International Mobile Equipment Identity (IMEI)</div>
|
||||
<div class="col-xs-6">
|
||||
<p id="imei_idx">-</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="iccid">SIM number (ICCID)</div>
|
||||
<div class="col-xs-6">
|
||||
<p id="iccid_idx">-</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="imsi">International Mobile Subscriber Identity (IMSI)</div>
|
||||
<div class="col-xs-6">
|
||||
<p id="imsi_idx">-</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section" data-i18n="parameters">Parameters</h3>
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="operator">Operator</div>
|
||||
<div class="col-xs-6">
|
||||
<p id="operator_idx">-</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="signal">Signal</div>
|
||||
<div class="col-xs-6">
|
||||
<p id="signal_idx">-</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="mode">Mode</div>
|
||||
<div class="col-xs-6">
|
||||
<p id="mode_idx">-</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="simstatus">SIM status</div>
|
||||
<div class="col-xs-6">
|
||||
<p id="registration_idx">-</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="div_addon_idx" style="display:none;">
|
||||
<div class="col-xs-6 col-xs-offset-6">
|
||||
<p><a href="#" class="click" onclick="modemaddon(_idx);" data-i18n="more">more parameters</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="div_btsearch_idx" style="display:none;">
|
||||
<div class="col-xs-6 col-xs-offset-6">
|
||||
<p><a href="#" id="btsearch_idx" class="click" target="_blank" data-i18n="btslocation">BTS location</a> →</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 center-xd">
|
||||
<div class="signal-bars sizing-box lzero one-bar" id="signal_bars_idx">
|
||||
<div class="first-bar bar"></div>
|
||||
<div class="second-bar bar"></div>
|
||||
<div class="third-bar bar"></div>
|
||||
<div class="fourth-bar bar"></div>
|
||||
<div class="fifth-bar bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section" data-i18n="connection">Connection</h3>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="connectiontime">Connection time</div>
|
||||
<div class="col-xs-6">
|
||||
<p><span id="uptime_idx">-</span><span class="visible-xs oneline"></span><span id="uptime_since_idx"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="tx">Uploaded</div>
|
||||
<div class="col-xs-6">
|
||||
<p id="tx_idx">-</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right" data-i18n="rx">Downloaded</div>
|
||||
<div class="col-xs-6">
|
||||
<p id="rx_idx">-</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="div_modems">
|
||||
<div class="flex-center position-ref full-height">
|
||||
<div class="flex-content">
|
||||
<div data-i18n="pleasewait">Please wait</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="div_msg" class="modal">
|
||||
<div id="msgtxt" class="modal-content text-center" data-i18n="pleasewait">Please wait</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center"> </div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +0,0 @@
|
||||
/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
|
||||
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
|
||||
* */
|
||||
|
||||
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);
|
||||
@@ -1,51 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.01
|
||||
waitquiet 0.01 0.01
|
||||
|
||||
let $c="AT+CSQ^m"
|
||||
let $r="+CSQ"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT+COPS=3,0;+COPS?^m"
|
||||
let $r="+COPS"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT+COPS=3,2;+COPS?^m"
|
||||
let $r="+COPS"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT+CREG=2;+CREG?^m"
|
||||
let $r="+CREG"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT+CPIN?^m"
|
||||
let $r="+CPIN"
|
||||
gosub readatcmd
|
||||
|
||||
exit 0
|
||||
|
||||
:readatcmd
|
||||
let i=15
|
||||
send $c
|
||||
:loop
|
||||
get 0.1 "^m" $s
|
||||
let l=len($r)
|
||||
if len($s) < l goto loop1
|
||||
if $mid($s,1,l) <> $r goto loop1
|
||||
print $s
|
||||
return
|
||||
|
||||
:loop1
|
||||
if len($s) < 2 goto loop2
|
||||
if $mid($s,1,2) = "ER" return
|
||||
if $mid($s,1,2) = "CO" return
|
||||
if len($s) < 10 goto loop2
|
||||
if $mid($s,1,10) != "+CME ERROR" goto loop2
|
||||
print $s
|
||||
return
|
||||
:loop2
|
||||
if i = 0 exit 0
|
||||
let i=i-1
|
||||
goto loop
|
||||
@@ -1,118 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# (c) 2010-2019 Cezary Jackiewicz <cezary@eko.one.pl>
|
||||
#
|
||||
|
||||
RES="/usr/share/3ginfo-lite"
|
||||
|
||||
DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
|
||||
if [ "x$DEVICE" = "x" ]; then
|
||||
touch /tmp/modem
|
||||
DEVICE=$(cat /tmp/modem)
|
||||
else
|
||||
echo "$DEVICE" > /tmp/modem
|
||||
fi
|
||||
|
||||
if [ "x$DEVICE" = "x" ]; then
|
||||
devices=$(ls /dev/ttyUSB* /dev/cdc-wdm* /dev/ttyACM* /dev/ttyHS* 2>/dev/null | sort -r)
|
||||
for d in $devices; do
|
||||
DEVICE=$d gcom -s $RES/probeport.gcom > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
echo "$d" > /tmp/modem
|
||||
break
|
||||
fi
|
||||
done
|
||||
DEVICE=$(cat /tmp/modem)
|
||||
fi
|
||||
|
||||
if [ "x$DEVICE" = "x" ]; then
|
||||
echo '{"error":"Device not found"}'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
O=$(gcom -d $DEVICE -s $RES/3ginfo.gcom 2>/dev/null)
|
||||
|
||||
# CSQ
|
||||
CSQ=$(echo "$O" | awk -F[,\ ] '/^\+CSQ/ {print $2}')
|
||||
|
||||
[ "x$CSQ" = "x" ] && CSQ=-1
|
||||
if [ $CSQ -ge 0 -a $CSQ -le 31 ]; then
|
||||
CSQ_PER=$(($CSQ * 100/31))
|
||||
else
|
||||
CSQ="-"
|
||||
CSQ_PER="0"
|
||||
fi
|
||||
|
||||
# COPS numeric
|
||||
COPS_NUM=$(echo "$O" | awk -F[\"] '/^\+COPS: .,2/ {print $2}' | head -1)
|
||||
if [ "x$COPS_NUM" = "x" ]; then
|
||||
COPS_NUM="-"
|
||||
COPS_MCC="-"
|
||||
COPS_MNC="-"
|
||||
else
|
||||
COPS_MCC=${COPS_NUM:0:3}
|
||||
COPS_MNC=${COPS_NUM:3:3}
|
||||
COPS=$(awk -F[\;] '/'$COPS_NUM'/ {print $2}' $RES/mccmnc.dat)
|
||||
fi
|
||||
[ "x$COPS" = "x" ] && COPS=$COPS_NUM
|
||||
|
||||
if [ -z "$FORCE_PLMN" ]; then
|
||||
# COPS alphanumeric
|
||||
T=$(echo "$O" | awk -F[\"] '/^\+COPS: .,0/ {print $2}')
|
||||
[ "x$T" != "x" ] && COPS="$T"
|
||||
fi
|
||||
|
||||
# CREG
|
||||
eval $(echo "$O" | busybox awk -F[,] '/^\+CREG/ {gsub(/[[:space:]"]+/,"");printf "T=\"%d\";LAC_HEX=\"%X\";CID_HEX=\"%X\";LAC_DEC=\"%d\";CID_DEC=\"%d\";MODE1=\"%d\"", $2, "0x"$3, "0x"$4, "0x"$3, "0x"$4, $5}')
|
||||
case "$T" in
|
||||
0*) REG="0";;
|
||||
1*) REG="1";;
|
||||
2*) REG="2";;
|
||||
3*) REG="3";;
|
||||
5*) REG="5";;
|
||||
*) REG="-";;
|
||||
esac
|
||||
|
||||
# MODE
|
||||
[ -z "$MODE1" -o "x$MODE1" = "x0" ] && MODE1=$(echo "$O" | awk -F[,] '/^\+COPS/ {print $4;exit}')
|
||||
case "$MODE1" in
|
||||
2*) MODE="UMTS";;
|
||||
3*) MODE="EDGE";;
|
||||
4*) MODE="HSDPA";;
|
||||
5*) MODE="HSUPA";;
|
||||
6*) MODE="HSPA";;
|
||||
7*) MODE="LTE";;
|
||||
*) MODE="-";;
|
||||
esac
|
||||
|
||||
T=$(echo "$O" | awk -F[,\ ] '/^\+CME ERROR:/ {print $0;exit}')
|
||||
if [ -n "$T" ]; then
|
||||
case "$T" in
|
||||
"+CME ERROR: 10"*) REG="SIM not inserted";;
|
||||
"+CME ERROR: 11"*) REG="SIM PIN required";;
|
||||
"+CME ERROR: 12"*) REG="SIM PUK required";;
|
||||
"+CME ERROR: 13"*) REG="SIM failure";;
|
||||
"+CME ERROR: 14"*) REG="SIM busy";;
|
||||
"+CME ERROR: 15"*) REG="SIM wrong";;
|
||||
"+CME ERROR: 17"*) REG="SIM PIN2 required";;
|
||||
"+CME ERROR: 18"*) REG="SIM PUK2 required";;
|
||||
*) REG=$(echo "$T" | cut -f2 -d: | xargs);;
|
||||
esac
|
||||
fi
|
||||
cat <<EOF
|
||||
{
|
||||
"csq":"$CSQ",
|
||||
"signal":"$CSQ_PER",
|
||||
"operator_name":"$COPS",
|
||||
"operator_mcc":"$COPS_MCC",
|
||||
"operator_mnc":"$COPS_MNC",
|
||||
"mode":"$MODE",
|
||||
"registration":"$REG",
|
||||
"lac_dec":"$LAC_DEC",
|
||||
"lac_hex":"$LAC_HEX",
|
||||
"cid_dec":"$CID_DEC",
|
||||
"cid_hex":"$CID_HEX"
|
||||
}
|
||||
EOF
|
||||
exit 0
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo "Content-type: application/json"
|
||||
echo ""
|
||||
if [ -e /dev/cdc-wdm0 ]; then
|
||||
uqmi -s -d /dev/cdc-wdm0 --get-signal-info | sed 's/"type":"hdr".*,"type"/"type"/g'
|
||||
else
|
||||
echo "{}"
|
||||
fi
|
||||
exit 0
|
||||
@@ -1,42 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="pl">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Status" />
|
||||
<meta name="author" content="Cezary Jackiewicz">
|
||||
<title>QMI</title>
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<p> </p>
|
||||
<table class='table table-condensed table-striped'>
|
||||
<colgroup><col class='col-xs-4'><col class='col-xs-2'><col class='col-xs-2'><col class='col-xs-2'><col class='col-xs-2'></colgroup>
|
||||
|
||||
<thead><tr><th>Parametr</th><th>Wartość</th><th>Min</th><th>Max</th><th>Jednostka</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td><span id='key1'> </span></td><td><span id='val1'></span></td><td><span id='min1'></span></td><td><span id='max1'></span></td><td><span id='unit1'></span></td></tr>
|
||||
<tr><td><span id='key2'> </span></td><td><span id='val2'></span></td><td><span id='min2'></span></td><td><span id='max2'></span></td><td><span id='unit2'></span></td></tr>
|
||||
<tr><td><span id='key3'> </span></td><td><span id='val3'></span></td><td><span id='min3'></span></td><td><span id='max3'></span></td><td><span id='unit3'></span></td></tr>
|
||||
<tr><td><span id='key4'> </span></td><td><span id='val4'></span></td><td><span id='min4'></span></td><td><span id='max4'></span></td><td><span id='unit4'></span></td></tr>
|
||||
<tr><td><span id='key5'> </span></td><td><span id='val5'></span></td><td><span id='min5'></span></td><td><span id='max5'></span></td><td><span id='unit5'></span></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="div_g" style="width:100%; height:300px;"><p class="text-center">Trwa zbieranie danych...</p></div>
|
||||
<p><i>Interwał 3s, okno 15 minut.</i></p>
|
||||
</div>
|
||||
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/dygraph/1.1.1/dygraph-combined.js"></script>
|
||||
<script src="/qmisignal.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,102 +0,0 @@
|
||||
var data = [];
|
||||
var g;
|
||||
var min = [], max = [];
|
||||
|
||||
var colors = [];
|
||||
colors['signal'] = '#333';
|
||||
colors['rssi'] = '#333';
|
||||
colors['rsrp'] = '#333';
|
||||
colors['ecio'] = '#333';
|
||||
colors['rsrq'] = '#333';
|
||||
colors['snr'] = '#333';
|
||||
|
||||
window.intervalId = setInterval(function() {
|
||||
$.getJSON( "/cgi-bin/qmisignal.sh", function(data1) {
|
||||
|
||||
var idx=0
|
||||
$.each(data1, function(i, val) {
|
||||
idx++;
|
||||
|
||||
unit='';
|
||||
if (!min[i]) {min[i]=999;max[i]=-999;}
|
||||
|
||||
switch(i) {
|
||||
case "type":
|
||||
val=(val).toUpperCase();
|
||||
break;
|
||||
case "signal":
|
||||
case "rssi":
|
||||
case "rsrp":
|
||||
if (val < min[i]) {min[i] = val;}
|
||||
if (val > max[i]) {max[i] = val;}
|
||||
unit='dBm'
|
||||
break;
|
||||
case "ecio":
|
||||
case "rsrq":
|
||||
case "snr":
|
||||
if (val < min[i]) {min[i] = val;}
|
||||
if (val > max[i]) {max[i] = val;}
|
||||
unit='dB'
|
||||
break;
|
||||
}
|
||||
|
||||
$("#key"+idx).text(''+i);
|
||||
$("#val"+idx).text(''+val);
|
||||
$('#val'+idx).css('color', colors[i]);
|
||||
$("#unit"+idx).text(''+unit);
|
||||
$('#unit'+idx).css('color', colors[i]);
|
||||
if (i != 'type')
|
||||
{
|
||||
$("#min"+idx).text(''+min[i]);
|
||||
$('#min'+idx).css('color', colors[i]);
|
||||
$("#max"+idx).text(''+max[i]);
|
||||
$('#max'+idx).css('color', colors[i]);
|
||||
}
|
||||
});
|
||||
|
||||
data.push([new Date(),
|
||||
data1["signal"],
|
||||
data1["rssi"],
|
||||
data1["rsrp"],
|
||||
data1["ecio"],
|
||||
data1["rsrq"],
|
||||
data1["snr"]
|
||||
]);
|
||||
|
||||
if (data.length > 300) {data.shift();}
|
||||
if (g==null) {
|
||||
g = new Dygraph(document.getElementById("div_g"), data, {
|
||||
drawPoints: false,
|
||||
showRoller: false,
|
||||
labels: ['', 'Signal', 'RSSI', 'RSRP', 'ECIO', 'RSRQ', 'SNR'],
|
||||
labelsSeparateLines: true,
|
||||
ylabel: 'RSSI, RSRP [dBm]',
|
||||
y2label: 'ECIO, RSRQ, SNR [dB]',
|
||||
series : {
|
||||
'ECIO': {axis: 'y2'},
|
||||
'RSRQ': {axis: 'y2'},
|
||||
'SNR': {axis: 'y2'}
|
||||
},
|
||||
axes: {
|
||||
y: {independentTicks: true},
|
||||
y2: {
|
||||
independentTicks: true,
|
||||
ticker: Dygraph.numericLinearTicks,
|
||||
drawGrid: true,
|
||||
gridLineColor: "#ff0000",
|
||||
gridLinePattern: [4,4]
|
||||
}
|
||||
}
|
||||
});
|
||||
var tcolors = g.getColors();
|
||||
colors['signal'] = tcolors[0];
|
||||
colors['rssi'] = tcolors[1];
|
||||
colors['rsrp'] = tcolors[2];
|
||||
colors['ecio'] = tcolors[3];
|
||||
colors['rsrq'] = tcolors[4];
|
||||
colors['snr'] = tcolors[5];
|
||||
} else {
|
||||
g.updateOptions({'file':data});
|
||||
}
|
||||
});
|
||||
}, 3000);
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
config 3ginfo
|
||||
option device ''
|
||||
option http_port '81'
|
||||
option language 'pl'
|
||||
option network 'wan'
|
||||
option pincode ''
|
||||
@@ -1,4 +0,0 @@
|
||||
case "$ACTION" in
|
||||
remove)
|
||||
[ -f /tmp/pincode_was_given ] && rm -f /tmp/pincode_was_given;;
|
||||
esac
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
ln -s /usr/share/3ginfo/cgi-bin/3ginfo.sh /usr/bin/3ginfo
|
||||
exit 0
|
||||
@@ -1,593 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# (c) 2010-2026 Cezary Jackiewicz <cezary@eko.one.pl>
|
||||
#
|
||||
|
||||
# Output format
|
||||
# 0 - html
|
||||
# 1 - txt
|
||||
# 2 - json
|
||||
|
||||
FORMAT=1
|
||||
RES="/usr/share/3ginfo"
|
||||
|
||||
LANG=$(uci -q get 3ginfo.@3ginfo[0].language)
|
||||
[ "x$LANG" = "x" ] && LANG="en"
|
||||
|
||||
getpath() {
|
||||
devname="$(basename "$1")"
|
||||
case "$devname" in
|
||||
'tty'*)
|
||||
devpath="$(readlink -f /sys/class/tty/$devname/device)"
|
||||
P=${devpath%/*/*}
|
||||
;;
|
||||
*)
|
||||
devpath="$(readlink -f /sys/class/usbmisc/$devname/device/)"
|
||||
P=${devpath%/*}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
showjsonerror() {
|
||||
echo "{\"error\": \"$1\"}"
|
||||
}
|
||||
|
||||
if [ "x$1" = "xjson" ]; then
|
||||
FORMAT=2
|
||||
else
|
||||
if [ "`basename $0`" = "3ginfo" ]; then
|
||||
FORMAT=1
|
||||
else
|
||||
FORMAT=0
|
||||
echo -e "Content-type: text/html\n\n"
|
||||
fi
|
||||
|
||||
if [ ! -e $RES/msg.dat.$LANG ]; then
|
||||
echo "File missing: $RES/msg.dat.$LANG"
|
||||
exit 0
|
||||
fi
|
||||
. $RES/msg.dat.$LANG
|
||||
fi
|
||||
|
||||
# odpytanie urzadzenia
|
||||
DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
|
||||
|
||||
if echo "x$DEVICE" | grep -q "192.168."; then
|
||||
if grep -q "Vendor=1bbb" /sys/kernel/debug/usb/devices; then
|
||||
O=$($RES/scripts/alcatel_hilink.sh $DEVICE)
|
||||
fi
|
||||
if grep -q "Vendor=12d1" /sys/kernel/debug/usb/devices; then
|
||||
O=$($RES/scripts/huawei_hilink.sh $DEVICE)
|
||||
fi
|
||||
if grep -q "Vendor=19d2" /sys/kernel/debug/usb/devices; then
|
||||
O=$($RES/scripts/zte.sh $DEVICE)
|
||||
fi
|
||||
SEC=$(uci -q get 3ginfo.@3ginfo[0].network)
|
||||
SEC=${SEC:-wan}
|
||||
else
|
||||
if [ "x$DEVICE" = "x" ]; then
|
||||
devices=$(ls /dev/ttyUSB* /dev/cdc-wdm* /dev/ttyACM* /dev/ttyHS* 2>/dev/null | sort -r);
|
||||
for d in $devices; do
|
||||
DEVICE=$d gcom -s $RES/scripts/probeport.gcom > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
uci set 3ginfo.@3ginfo[0].device="$d"
|
||||
uci commit 3ginfo
|
||||
break
|
||||
fi
|
||||
done
|
||||
DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
|
||||
fi
|
||||
|
||||
if [ "x$DEVICE" = "x" ]; then
|
||||
[ $FORMAT -eq 0 ] && echo "<h3 style='color:red;' class=\"c\">$NOTDETECTED</h3>"
|
||||
[ $FORMAT -eq 1 ] && echo $NOTDETECTED
|
||||
[ $FORMAT -eq 2 ] && showjsonerror "NOTDETECTED"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! -e $DEVICE ]; then
|
||||
[ $FORMAT -eq 0 ] && echo "<h3 style='color:red;' class=\"c\">$NODEVICE $DEVICE!</h3>"
|
||||
[ $FORMAT -eq 1 ] && echo "$NODEVICE $DEVICE."
|
||||
[ $FORMAT -eq 2 ] && showjsonerror "NODEVICE $DEVICE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# znajdz odpowiednia sekcje w konfiguracji
|
||||
SEC=$(uci -q get 3ginfo.@3ginfo[0].network)
|
||||
if [ -z "$SEC" ]; then
|
||||
getpath $DEVICE
|
||||
PORIG=$P
|
||||
for DEV in /sys/class/tty/* /sys/class/usbmisc/*; do
|
||||
getpath "/dev/"${DEV##/*/}
|
||||
if [ "x$PORIG" = "x$P" ]; then
|
||||
SEC=$(uci show network | grep "/dev/"${DEV##/*/} | cut -f2 -d.)
|
||||
[ -n "$SEC" ] && break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# [ "${DEVICE%%[0-9]}" = "/dev/ttyUSB" ] && stty -F $DEVICE -iexten -opost -icrnl
|
||||
|
||||
# daj pin jak jest taka potrzeba
|
||||
if [ ! -f /tmp/pincode_was_given ]; then
|
||||
# tylko za pierwszym razem
|
||||
if [ ! -z $SEC ]; then
|
||||
PINCODE=$(uci -q get network.$SEC.pincode)
|
||||
fi
|
||||
if [ -z "$PINCODE" ]; then
|
||||
PINCODE=$(uci -q get 3ginfo.@3ginfo[0].pincode)
|
||||
fi
|
||||
if [ ! -z $PINCODE ]; then
|
||||
PINCODE="$PINCODE" gcom -d "$DEVICE" -s /etc/gcom/setpin.gcom > /dev/null || {
|
||||
[ $FORMAT -eq 0 ] && echo "<h3 style='color:red;' class=\"c\">$PINERROR</h3>"
|
||||
[ $FORMAT -eq 1 ] && echo "$PINERROR"
|
||||
[ $FORMAT -eq 2 ] && showjsonerror "PINERROR"
|
||||
exit 0
|
||||
}
|
||||
fi
|
||||
touch /tmp/pincode_was_given
|
||||
fi
|
||||
|
||||
O=$(gcom -d $DEVICE -s $RES/scripts/3ginfo.gcom 2>/dev/null)
|
||||
fi
|
||||
|
||||
if [ "x$1" = "xtest" ]; then
|
||||
echo "$O"
|
||||
echo "---------------------------------------------------------------"
|
||||
ls /dev/tty*
|
||||
echo "---------------------------------------------------------------"
|
||||
cat /sys/kernel/debug/usb/devices
|
||||
echo "---------------------------------------------------------------"
|
||||
uci show 3ginfo
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# CSQ
|
||||
CSQ=$(echo "$O" | awk -F[,\ ] '/^\+CSQ/ {print $2}')
|
||||
|
||||
[ "x$CSQ" = "x" ] && CSQ=-1
|
||||
if [ $CSQ -ge 0 -a $CSQ -le 31 ]; then
|
||||
|
||||
# for Gargoyle
|
||||
[ -e /tmp/strength.txt ] && echo "+CSQ: $CSQ,99" > /tmp/strength.txt
|
||||
|
||||
CSQ_PER=$(($CSQ * 100/31))
|
||||
CSQ_COL="red"
|
||||
[ $CSQ -ge 10 ] && CSQ_COL="orange"
|
||||
[ $CSQ -ge 15 ] && CSQ_COL="yellow"
|
||||
[ $CSQ -ge 20 ] && CSQ_COL="green"
|
||||
CSQ_RSSI=$((2 * CSQ - 113))
|
||||
else
|
||||
CSQ="-"
|
||||
CSQ_PER="0"
|
||||
CSQ_COL="black"
|
||||
CSQ_RSSI="-"
|
||||
fi
|
||||
|
||||
# COPS
|
||||
COPS_NUM=$(echo "$O" | awk -F[\"] '/^\+COPS: .,2/ {print $2}')
|
||||
if [ "x$COPS_NUM" = "x" ]; then
|
||||
COPS_NUM="-"
|
||||
COPS_MCC="-"
|
||||
COPS_MNC="-"
|
||||
else
|
||||
COPS_MCC=${COPS_NUM:0:3}
|
||||
COPS_MNC=${COPS_NUM:3:3}
|
||||
COPS=$(awk -F[\;] '/'$COPS_NUM'/ {print $2}' $RES/mccmnc.dat)
|
||||
[ "x$COPS" = "x" ] && COPS="-"
|
||||
fi
|
||||
|
||||
# dla modemow Option i ZTE
|
||||
if [ "$COPS_NUM" = "-" ]; then
|
||||
COPS=$(echo "$O" | awk -F[\"] '/^\+COPS: .,0/ {print $2}')
|
||||
[ "x$COPS" = "x" ] && COPS="---"
|
||||
|
||||
COPS_TMP=$(awk -F[\;] 'BEGIN {IGNORECASE = 1} /'"$COPS"'/ {print $2}' $RES/mccmnc.dat)
|
||||
if [ "x$COPS_TMP" = "x" ]; then
|
||||
COPS_NUM="-"
|
||||
COPS_MCC="-"
|
||||
COPS_MNC="-"
|
||||
else
|
||||
COPS="$COPS_TMP"
|
||||
COPS_NUM=$(awk -F[\;] 'BEGIN {IGNORECASE = 1} /'"$COPS"'/ {print $1}' $RES/mccmnc.dat)
|
||||
COPS_MCC=${COPS_NUM:0:3}
|
||||
COPS_MNC=${COPS_NUM:3:3}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Technologia
|
||||
MODE="-"
|
||||
|
||||
# Nowe Huawei
|
||||
TECH=$(echo "$O" | awk -F[,] '/^\^SYSINFOEX/ {print $9}' | sed 's/"//g')
|
||||
if [ "x$TECH" != "x" ]; then
|
||||
MODE=$(echo "$TECH" | sed 's/-//g')
|
||||
fi
|
||||
|
||||
# Starsze modele Huawei i inne pozostale
|
||||
if [ "x$MODE" = "x-" ]; then
|
||||
TECH=$(echo "$O" | awk -F[,] '/^\^SYSINFO/ {print $7}')
|
||||
case $TECH in
|
||||
17*) MODE="HSPA+ (64QAM)";;
|
||||
18*) MODE="HSPA+ (MIMO)";;
|
||||
1*) MODE="GSM";;
|
||||
2*) MODE="GPRS";;
|
||||
3*) MODE="EDGE";;
|
||||
4*) MODE="UMTS";;
|
||||
5*) MODE="HSDPA";;
|
||||
6*) MODE="HSUPA";;
|
||||
7*) MODE="HSPA";;
|
||||
9*) MODE="HSPA+";;
|
||||
*) MODE="-";;
|
||||
esac
|
||||
fi
|
||||
|
||||
# ZTE
|
||||
if [ "x$MODE" = "x-" ]; then
|
||||
TECH=$(echo "$O" | awk -F[,\ ] '/^\+ZPAS/ {print $2}' | sed 's/"//g')
|
||||
if [ "x$TECH" != "x" -a "x$TECH" != "xNo" ]; then
|
||||
MODE="$TECH"
|
||||
fi
|
||||
fi
|
||||
|
||||
# OPTION
|
||||
if [ "x$MODE" = "x-" ]; then
|
||||
TECH=$(echo "$O" | awk -F, '/^\+COPS: 0/ {print $4}')
|
||||
MODE="-"
|
||||
if [ "$TECH" = 0 ]; then
|
||||
TECH1=$(echo "$O" | awk '/^_OCTI/ {print $2}' | cut -f1 -d,)
|
||||
case $TECH1 in
|
||||
1*) MODE="GSM";;
|
||||
2*) MODE="GPRS";;
|
||||
3*) MODE="EDGE";;
|
||||
*) MODE="-";;
|
||||
esac
|
||||
elif [ "$TECH" = 2 ]; then
|
||||
TECH1=$(echo "$O" | awk '/^_OWCTI/ {print $2}')
|
||||
case $TECH1 in
|
||||
1*) MODE="UMTS";;
|
||||
2*) MODE="HSDPA";;
|
||||
3*) MODE="HSUPA";;
|
||||
4*) MODE="HSPA";;
|
||||
*) MODE="-";;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
# Sierra
|
||||
if [ "x$MODE" = "x-" ]; then
|
||||
TECH=$(echo "$O" | awk -F[,\ ] '/^\*CNTI/ {print $3}' | sed 's|/|,|g')
|
||||
if [ "x$TECH" != "x" ]; then
|
||||
MODE="$TECH"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Novatel
|
||||
if [ "x$MODE" = "x-" ]; then
|
||||
TECH=$(echo "$O" | awk -F[,\ ] '/^\$CNTI/ {print $4}' | sed 's|/|,|g')
|
||||
if [ "x$TECH" != "x" ]; then
|
||||
MODE="$TECH"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Vodafone - icera
|
||||
if [ "x$MODE" = "x-" ]; then
|
||||
TECH=$(echo "$O" | awk -F[,\ ] '/^\%NWSTATE/ {print $4}' | sed 's|/|,|g')
|
||||
if [ "x$TECH" != "x" ]; then
|
||||
MODE="$TECH"
|
||||
fi
|
||||
fi
|
||||
|
||||
# SIMCOM
|
||||
if [ "x$MODE" = "x-" ]; then
|
||||
TECH=$(echo "$O" | awk -F[,\ ] '/^\+CNSMOD/ {print $3}')
|
||||
case "$TECH" in
|
||||
1*) MODE="GSM";;
|
||||
2*) MODE="GPRS";;
|
||||
3*) MODE="EDGE";;
|
||||
4*) MODE="UMTS";;
|
||||
5*) MODE="HSDPA";;
|
||||
6*) MODE="HSUPA";;
|
||||
7*) MODE="HSPA";;
|
||||
*) MODE="-";;
|
||||
esac
|
||||
fi
|
||||
|
||||
# generic 3GPP TS 27.007 V10.4.0
|
||||
if [ "x$MODE" = "x-" ]; then
|
||||
TECH=$(echo "$O" | awk -F[,] '/^\+COPS/ {print $4}')
|
||||
case "$TECH" in
|
||||
2*) MODE="UMTS";;
|
||||
3*) MODE="EDGE";;
|
||||
4*) MODE="HSDPA";;
|
||||
5*) MODE="HSUPA";;
|
||||
6*) MODE="HSPA";;
|
||||
7*) MODE="LTE";;
|
||||
*) MODE="-";;
|
||||
esac
|
||||
fi
|
||||
|
||||
# CREG
|
||||
CREG="+CGREG"
|
||||
LAC=$(echo "$O" | awk -F[,] '/\'$CREG'/ {printf "%s", toupper($3)}' | sed 's/[^A-F0-9]//g')
|
||||
if [ "x$LAC" = "x" ]; then
|
||||
CREG="+CREG"
|
||||
LAC=$(echo "$O" | awk -F[,] '/\'$CREG'/ {printf "%s", toupper($3)}' | sed 's/[^A-F0-9]//g')
|
||||
fi
|
||||
|
||||
if [ "x$LAC" != "x" ]; then
|
||||
LAC_NUM=$(printf %d 0x$LAC)
|
||||
else
|
||||
LAC="-"
|
||||
LAC_NUM="-"
|
||||
fi
|
||||
|
||||
# TAC
|
||||
TAC=$(echo "$O" | awk -F[,] '/^\+CEREG/ {printf "%s", toupper($3)}' | sed 's/[^A-F0-9]//g')
|
||||
if [ "x$TAC" != "x" ]; then
|
||||
TAC_NUM=$(printf %d 0x$TAC)
|
||||
else
|
||||
TAC="-"
|
||||
TAC_NUM="-"
|
||||
fi
|
||||
|
||||
|
||||
# ECIO / RSCP
|
||||
ECIO="-"
|
||||
RSCP="-"
|
||||
|
||||
ECIx=$(echo "$O" | awk -F[,\ ] '/^\+ZRSSI:/ {print $3}')
|
||||
if [ "x$ECIx" != "x" ]; then
|
||||
ECIO=`expr $ECIx / 2`
|
||||
ECIO="-"$ECIO
|
||||
fi
|
||||
|
||||
RSCx=$(echo "$O" | awk -F[,\ ] '/^\+ZRSSI:/ {print $4}')
|
||||
if [ "x$RSCx" != "x" ]; then
|
||||
RSCP=`expr $RSCx / 2`
|
||||
RSCP="-"$RSCP
|
||||
fi
|
||||
|
||||
RSCx=$(echo "$O" | awk -F[,\ ] '/^\^CSNR:/ {print $2}')
|
||||
if [ "x$RSCx" != "x" ]; then
|
||||
RSCP=$RSCx
|
||||
fi
|
||||
|
||||
ECIx=$(echo "$O" | awk -F[,\ ] '/^\^CSNR:/ {print $3}')
|
||||
if [ "x$ECIx" != "x" ]; then
|
||||
ECIO=$ECIx
|
||||
fi
|
||||
|
||||
# RSRP / RSRQ
|
||||
RSRP="-"
|
||||
RSRQ="-"
|
||||
SINR="-"
|
||||
RSRx=$(echo "$O" | awk -F[,:] '/^\^LTERSRP:/ {print $2}')
|
||||
if [ "x$RSRx" != "x" ]; then
|
||||
RSRP=$RSRx
|
||||
RSRQ=$(echo "$O" | awk -F[,:] '/^\^LTERSRP:/ {print $3}')
|
||||
fi
|
||||
|
||||
TECH=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $2}' | sed 's/[" ]//g')
|
||||
if [ "x$TECH" != "x" ]; then
|
||||
PARAM2=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $4}')
|
||||
PARAM3=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $5}')
|
||||
PARAM4=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $6}')
|
||||
|
||||
case "$TECH" in
|
||||
WCDMA*)
|
||||
RSCP=$(awk 'BEGIN {print -121 + '$PARAM2'}')
|
||||
ECIO=$(awk 'BEGIN {print -32.5 + '$PARAM3'/2}')
|
||||
;;
|
||||
LTE*)
|
||||
RSRP=$(awk 'BEGIN {print -141 + '$PARAM2'}')
|
||||
SINR=$(awk 'BEGIN {print -20.2 + '$PARAM3'/5}')
|
||||
RSRQ=$(awk 'BEGIN {print -20 + '$PARAM4'/2}')
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -n "$SEC" ]; then
|
||||
if [ "x$(uci -q get network.$SEC.proto)" = "xqmi" ]; then
|
||||
. /usr/share/libubox/jshn.sh
|
||||
json_init
|
||||
json_load "$(uqmi -d "$(uci -q get network.$SEC.device)" --get-signal-info)" >/dev/null 2>&1
|
||||
json_get_var T type
|
||||
if [ "x$T" = "xlte" ]; then
|
||||
json_get_var RSRP rsrp
|
||||
json_get_var RSRQ rsrq
|
||||
fi
|
||||
if [ "x$T" = "xwcdma" ]; then
|
||||
json_get_var ECIO ecio
|
||||
json_get_var RSSI rssi
|
||||
json_get_var RSCP rscp
|
||||
if [ -z "$RSCP" ]; then
|
||||
RSCP=$((RSSI+ECIO))
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
BTSINFO=""
|
||||
CID=$(echo "$O" | awk -F[,] '/\'$CREG'/ {printf "%s", toupper($4)}' | sed 's/[^A-F0-9]//g')
|
||||
if [ "x$CID" != "x" ]; then
|
||||
CID_NUM=$(printf %d 0x$CID)
|
||||
|
||||
if [ ${#CID} -gt 4 ]; then
|
||||
T=$(echo "$CID" | awk '{print substr($1,length(substr($1,1,length($1)-4))+1)}')
|
||||
else
|
||||
T=$CID
|
||||
fi
|
||||
|
||||
CLF=$(uci -q get 3ginfo.@3ginfo[0].clf)
|
||||
if [ -e "$CLF" ]; then
|
||||
PAT="xxx"
|
||||
[ "x$T" != "x-" -a "x$LAC_NUM" != "x-" ] && PAT="^$COPS_NUM;0x"$(printf %04X 0x$T)";0x"$(printf %04X $LAC_NUM)";"
|
||||
is_gz=$(dd if="$CLF" bs=1 count=2 2>/dev/null | hexdump -v -e '1/1 "%02x"')
|
||||
if [ "x$is_gz" = "x1f8b" ] ; then
|
||||
BTSINFO="<a href=\"https://maps.google.pl/?t=k\&z=17\&q="$(zcat "$CLF" | awk -F";" '/'$PAT'/ {printf $5","$6}')"\">"$(zcat "$CLF" | awk -F";" '/'$PAT'/ {gsub(/\!/,"\\!");print $8}')"</a>"
|
||||
else
|
||||
BTSINFO="<a href=\"https://maps.google.pl/?t=k\&z=17\&q="$(awk -F";" '/'$PAT'/ {printf $5","$6}' "$CLF")"\">"$(awk -F";" '/'$PAT'/ {gsub(/\!/,"\\!");print $8}' "$CLF")"</a>"
|
||||
fi
|
||||
if [ $FORMAT -eq 2 ]; then
|
||||
BTSINFO=$(echo "$BTSINFO" | sed 's!<a.*>\(.*\)</a>!\1!g')
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $FORMAT -eq 0 ]; then
|
||||
case $COPS_NUM in
|
||||
260*) CID="<a href=\"https://btsearch.pl/stations?q="$CID_NUM"\">$CID</a>";;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
CID="-"
|
||||
CID_NUM="-"
|
||||
fi
|
||||
|
||||
# CGEQNEG
|
||||
QOS_SHOW="none"
|
||||
DOWN="-"
|
||||
UP="-"
|
||||
|
||||
DOWx=$(echo "$O" | awk -F[,] '/\+CGEQNEG/ {printf "%s", $4}')
|
||||
if [ "x$DOWx" != "x" ]; then
|
||||
DOWN=$DOWx
|
||||
UP=$(echo "$O" | awk -F[,] '/\+CGEQNEG/ {printf "%s", $3}')
|
||||
QOS_SHOW="block"
|
||||
fi
|
||||
|
||||
# SMS
|
||||
if [ -e /usr/bin/gnokii ]; then
|
||||
SMS_SHOW="block"
|
||||
else
|
||||
SMS_SHOW="none"
|
||||
fi
|
||||
|
||||
# USSD
|
||||
which ussd159 >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
USSD_SHOW="block"
|
||||
else
|
||||
USSD_SHOW="none"
|
||||
fi
|
||||
|
||||
# Stan limitu
|
||||
LIMIT_SHOW="none"
|
||||
LIMIT=$(uci -q get 3ginfo.@3ginfo[0].script)
|
||||
if [ "x$LIMIT" != "x" ]; then
|
||||
LIMIT_SHOW="block"
|
||||
fi
|
||||
|
||||
# Status polaczenia
|
||||
|
||||
CONN_TIME="-"
|
||||
RX="-"
|
||||
TX="-"
|
||||
|
||||
if [ -z "$SEC" ]; then
|
||||
STATUS=$NOINFO
|
||||
[ $FORMAT -eq 2 ] && STATUS="NOINFO"
|
||||
|
||||
STATUS_TRE="-"
|
||||
STATUS_SHOW="none"
|
||||
STATUS_SHOW_BUTTON="none"
|
||||
else
|
||||
NETUP=$(ifstatus $SEC | grep "\"up\": true")
|
||||
if [ -n "$NETUP" ]; then
|
||||
[ $FORMAT -eq 0 ] && STATUS="<font color=green>$CONNECTED</font>"
|
||||
[ $FORMAT -eq 1 ] && STATUS=$CONNECTED
|
||||
[ $FORMAT -eq 2 ] && STATUS="CONNECTED"
|
||||
STATUS_TRE=$DISCONNECT
|
||||
|
||||
CT=$(uci -q -P /var/state/ get network.$SEC.connect_time)
|
||||
if [ -z $CT ]; then
|
||||
CT=$(ifstatus $SEC | awk -F[:,] '/uptime/ {print $2}' | xargs)
|
||||
else
|
||||
UPTIME=$(cut -d. -f1 /proc/uptime)
|
||||
CT=$((UPTIME-CT))
|
||||
fi
|
||||
if [ ! -z $CT ]; then
|
||||
D=$(expr $CT / 60 / 60 / 24)
|
||||
H=$(expr $CT / 60 / 60 % 24)
|
||||
M=$(expr $CT / 60 % 60)
|
||||
S=$(expr $CT % 60)
|
||||
CONN_TIME=$(printf "%dd, %02d:%02d:%02d" $D $H $M $S)
|
||||
fi
|
||||
IFACE=$(ifstatus $SEC | awk -F\" '/l3_device/ {print $4}')
|
||||
if [ -n "$IFACE" ]; then
|
||||
RX=$(ifconfig $IFACE | awk -F[\(\)] '/bytes/ {printf "%s",$2}')
|
||||
TX=$(ifconfig $IFACE | awk -F[\(\)] '/bytes/ {printf "%s",$4}')
|
||||
fi
|
||||
else
|
||||
|
||||
[ $FORMAT -eq 0 ] && STATUS="<font color=red>$DISCONNECTED</font>"
|
||||
[ $FORMAT -eq 1 ] && STATUS=$DISCONNECTED
|
||||
[ $FORMAT -eq 2 ] && STATUS="DISCONNECTED"
|
||||
STATUS_TRE=$CONNECT
|
||||
fi
|
||||
STATUS_SHOW="block"
|
||||
STATUS_SHOW_BUTTON="block"
|
||||
fi
|
||||
|
||||
if [ "x"$(uci -q get 3ginfo.@3ginfo[0].connect_button) = "x0" ]; then
|
||||
STATUS_SHOW_BUTTON="none"
|
||||
fi
|
||||
|
||||
# Informacja o urzadzeniu
|
||||
DEVICE=$(echo "$O" | awk -F[:] '/DEVICE/ { print $2}')
|
||||
if [ "x$DEVICE" = "x" ]; then
|
||||
DEVICE="-"
|
||||
fi
|
||||
|
||||
# podmiana w szablonie
|
||||
if [ $FORMAT -eq 2 ]; then
|
||||
TEMPLATE="$RES/status.json"
|
||||
else
|
||||
[ $FORMAT -eq 0 ] && EXT="html"
|
||||
[ $FORMAT -eq 1 ] && EXT="txt"
|
||||
TEMPLATE="$RES/status.$EXT.$LANG"
|
||||
fi
|
||||
|
||||
if [ -e $TEMPLATE ]; then
|
||||
sed -e "s!{CSQ}!$CSQ!g; \
|
||||
s!{CSQ_PER}!$CSQ_PER!g; \
|
||||
s!{CSQ_RSSI}!$CSQ_RSSI!g; \
|
||||
s!{CSQ_COL}!$CSQ_COL!g; \
|
||||
s!{COPS}!$COPS!g; \
|
||||
s!{COPS_NUM}!$COPS_NUM!g; \
|
||||
s!{COPS_MCC}!$COPS_MCC!g; \
|
||||
s!{COPS_MNC}!$COPS_MNC!g; \
|
||||
s!{LAC}!$LAC!g; \
|
||||
s!{LAC_NUM}!$LAC_NUM!g; \
|
||||
s!{CID}!$CID!g; \
|
||||
s!{CID_NUM}!$CID_NUM!g; \
|
||||
s!{TAC}!$TAC!g; \
|
||||
s!{TAC_NUM}!$TAC_NUM!g; \
|
||||
s!{BTSINFO}!$BTSINFO!g; \
|
||||
s!{DOWN}!$DOWN!g; \
|
||||
s!{UP}!$UP!g; \
|
||||
s!{QOS_SHOW}!$QOS_SHOW!g; \
|
||||
s!{SMS_SHOW}!$SMS_SHOW!g; \
|
||||
s!{USSD_SHOW}!$USSD_SHOW!g; \
|
||||
s!{LIMIT_SHOW}!$LIMIT_SHOW!g; \
|
||||
s!{STATUS}!$STATUS!g; \
|
||||
s!{CONN_TIME}!$CONN_TIME!g; \
|
||||
s!{CONN_TIME_SEC}!$CT!g; \
|
||||
s!{RX}!$RX!g; \
|
||||
s!{TX}!$TX!g; \
|
||||
s!{STATUS_TRE}!$STATUS_TRE!g; \
|
||||
s!{STATUS_SHOW}!$STATUS_SHOW!g; \
|
||||
s!{STATUS_SHOW_BUTTON}!$STATUS_SHOW_BUTTON!g; \
|
||||
s!{DEVICE}!$DEVICE!g; \
|
||||
s!{ECIO}!$ECIO!g; \
|
||||
s!{RSCP}!$RSCP!g; \
|
||||
s!{RSRP}!$RSRP!g; \
|
||||
s!{RSRQ}!$RSRQ!g; \
|
||||
s!{SINR}!$SINR!g; \
|
||||
s!{MODE}!$MODE!g" $TEMPLATE
|
||||
else
|
||||
echo "Template $TEMPLATE missing!"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -1,39 +0,0 @@
|
||||
22234;BT Italia SpA
|
||||
22202;Elsacom
|
||||
22299;H3G
|
||||
22233;H3G
|
||||
22277;IPSE 2000
|
||||
22235;Lycamobile Srl
|
||||
22207;Noverca Italia Srl
|
||||
22230;RFI Rete Ferroviaria Italiana SpA
|
||||
22243;Telecom Italia Mobile SpA
|
||||
22201;TIM
|
||||
22248;Telecom Italia Mobile SpA
|
||||
22210;Vodafone
|
||||
22206;Vodafone
|
||||
22244;WIND
|
||||
22288;WIND
|
||||
26001;Plus
|
||||
26002;T-Mobile;T-Mobile.pl
|
||||
26003;Orange;PTK Centertel;Orange PL
|
||||
26006;Play;Play Fakt Mobile
|
||||
26016;Mobyland LTE;Cyfrowy Polsat
|
||||
26017;Aero2
|
||||
26034;NetWorks
|
||||
24801;Telia
|
||||
24802;Elisa
|
||||
24803;Tele2
|
||||
51001;Indosat Ooredoo
|
||||
51003;StarOne
|
||||
51007;TelkomFlexi
|
||||
51008;AXIS
|
||||
51009;Smartfren
|
||||
51010;Telkomsel
|
||||
51011;XL 4G
|
||||
51020;TELKOMMobile
|
||||
51021;IM3
|
||||
51027;Ceria
|
||||
51028;Fren/Hepi
|
||||
51088;BOLT! Super 4G
|
||||
51089;3
|
||||
51099;Esia
|
||||
@@ -1,8 +0,0 @@
|
||||
NOTDETECTED="Not detected any device"
|
||||
NODEVICE="No device"
|
||||
PINERROR="PIN code error"
|
||||
CONNECTED="Connected"
|
||||
CONNECT="Connect"
|
||||
DISCONNECTED="Disconnected"
|
||||
DISCONNECT="Disconnect"
|
||||
NOINFO="No information"
|
||||
@@ -1,8 +0,0 @@
|
||||
NOTDETECTED="Ei tuvastatud ühtegi seadet"
|
||||
NODEVICE="Seade puudub"
|
||||
PINERROR="PIN-koodi viga"
|
||||
CONNECTED="Ühendatud"
|
||||
CONNECT="Ühenda"
|
||||
DISCONNECTED="Lahti ühendatud"
|
||||
DISCONNECT="Ühenda lahti"
|
||||
NOINFO="Pole informatsiooni"
|
||||
@@ -1,8 +0,0 @@
|
||||
NOTDETECTED="Nessun dispositivo trovato"
|
||||
NODEVICE="Nessun dispositivo"
|
||||
PINERROR="Errore codice PIN"
|
||||
CONNECTED="Connesso"
|
||||
CONNECT="Connetti"
|
||||
DISCONNECTED="Disconnesso"
|
||||
DISCONNECT="Disconnetti"
|
||||
NOINFO="Nessuna Informazione"
|
||||
@@ -1,8 +0,0 @@
|
||||
NOTDETECTED="Nie wykryto żadnego urządzenia!"
|
||||
NODEVICE="Brak urządzenia"
|
||||
PINERROR="Błąd kodu PIN"
|
||||
CONNECTED="Połączony"
|
||||
CONNECT="Połącz"
|
||||
DISCONNECTED="Rozłączony"
|
||||
DISCONNECT="Rozłącz"
|
||||
NOINFO="Brak informacji"
|
||||
@@ -1,176 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.02
|
||||
waitquiet 0.2 0.2
|
||||
|
||||
send "AT\^CURC=0^m"
|
||||
waitfor 5 "OK","ERROR"
|
||||
|
||||
let $c="AT+CSQ^m"
|
||||
let $r="+CSQ"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="ATE1; +CGMI^m"
|
||||
gosub readatcmdnr
|
||||
let $v=$s
|
||||
|
||||
if $toupper($mid($v,0,3)) = "HUA" goto huawei
|
||||
if $toupper($mid($v,0,3)) = "NOK" goto vodafone
|
||||
if $toupper($mid($v,0,3)) = "NOV" goto novatel
|
||||
if $toupper($mid($v,0,3)) = "OPT" goto option
|
||||
if $toupper($mid($v,0,3)) = "QUA" goto qualcomm
|
||||
if $toupper($mid($v,0,3)) = "SIM" goto simcom
|
||||
if $toupper($mid($v,0,3)) = "SIE" goto sierra
|
||||
if $toupper($mid($v,0,3)) = "VOD" goto vodafone
|
||||
if $toupper($mid($v,0,3)) = "ZTE" goto zte
|
||||
goto generic
|
||||
|
||||
:simcom
|
||||
let $c="AT+CNSMOD?^m"
|
||||
let $r="+CNSMOD"
|
||||
gosub readatcmd
|
||||
goto next
|
||||
|
||||
:vodafone
|
||||
let $c="AT%NWSTATE=1^m"
|
||||
let $r="%NWSTATE"
|
||||
gosub readatcmd
|
||||
goto next
|
||||
|
||||
:novatel
|
||||
let $c="AT$CNTI=0^m"
|
||||
let $r="$CNTI"
|
||||
gosub readatcmd
|
||||
goto next
|
||||
|
||||
:sierra
|
||||
let $c="AT*CNTI=0^m"
|
||||
let $r="*CNTI"
|
||||
gosub readatcmd
|
||||
goto next
|
||||
|
||||
:option
|
||||
let $c="AT_OCTI?^m"
|
||||
let $r="_OCTI"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT_OWCTI?^m"
|
||||
let $r="_OWCTI"
|
||||
gosub readatcmd
|
||||
goto next
|
||||
|
||||
:qualcomm
|
||||
let $c="AT+COPS?^m"
|
||||
let $r="+COPS"
|
||||
gosub readatcmd
|
||||
goto next1
|
||||
|
||||
:zte
|
||||
let $c="AT+COPS?^m"
|
||||
let $r="+COPS"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT+ZRSSI^m"
|
||||
let $r="+ZRSSI"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT+ZPAS?^m"
|
||||
let $r="+ZPAS"
|
||||
gosub readatcmd
|
||||
goto next1
|
||||
|
||||
:huawei
|
||||
let $c="AT\^SYSINFOEX^m"
|
||||
let $r="\^SYSINFOEX"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT\^CSNR?^m"
|
||||
let $r="\^CSNR"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT\^LTERSRP?^m"
|
||||
let $r="\^LTERSRP"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT\^HCSQ?^m"
|
||||
let $r="\^HCSQ"
|
||||
gosub readatcmd
|
||||
|
||||
:generic
|
||||
let $c="AT\^SYSINFO^m"
|
||||
let $r="\^SYSINFO"
|
||||
gosub readatcmd
|
||||
|
||||
:next
|
||||
let $c="AT+COPS=3,2;+COPS?^m"
|
||||
let $r="+COPS"
|
||||
gosub readatcmd
|
||||
|
||||
:next1
|
||||
let $c="AT+CREG=2;+CREG?^m"
|
||||
let $r="+CREG"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT+CGREG=2;+CGREG?^m"
|
||||
let $r="+CGREG"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT+CEREG=2;+CEREG?^m"
|
||||
let $r="+CEREG"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="AT+CGEQNEG=1^m"
|
||||
let $r="+CGEQNEG"
|
||||
gosub readatcmd
|
||||
|
||||
let $c="ATE1; +CGMM^m"
|
||||
gosub readatcmdnr
|
||||
print "\nDEVICE:",$v," ",$s,"\n"
|
||||
|
||||
exit 0
|
||||
|
||||
:readatcmd
|
||||
let i=15
|
||||
send $c
|
||||
:loop
|
||||
get 0.1 "^m" $s
|
||||
let l=len($r)
|
||||
if len($s) < l goto loop1
|
||||
if $mid($s,1,l) <> $r goto loop1
|
||||
print $s
|
||||
return
|
||||
|
||||
:loop1
|
||||
if len($s) < 2 goto loop2
|
||||
if $mid($s,1,2) = "ER" return
|
||||
if $mid($s,1,2) = "CO" return
|
||||
:loop2
|
||||
if i = 0 return
|
||||
let i=i-1
|
||||
goto loop
|
||||
|
||||
:readatcmdnr
|
||||
let i=15
|
||||
send $c
|
||||
:loop3
|
||||
get 0.1 "^m" $s
|
||||
if len($s) < 2 goto loop5
|
||||
if $mid($s,1,2) = "ER" goto loop4
|
||||
if $mid($s,1,2) = "OK" goto loop5
|
||||
if $mid($s,1,2) = "AT" goto loop5
|
||||
if $mid($s,1,2) = "TE" goto loop5
|
||||
if $mid($s,1,1) = "+" goto loop5
|
||||
if $mid($s,1,1) = "\^" goto loop5
|
||||
let l=len($s)
|
||||
let $s=$mid($s,1,l)
|
||||
return
|
||||
|
||||
:loop4
|
||||
let $s=""
|
||||
return
|
||||
|
||||
:loop5
|
||||
if i = 0 return
|
||||
let i=i-1
|
||||
goto loop3
|
||||
@@ -1,60 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
IP=$1
|
||||
[ -z "$IP" ] && exit 0
|
||||
[ -e /usr/bin/wget ] || exit 0
|
||||
|
||||
getvaluen() {
|
||||
echo $(sed 's!.*"'$2'":\([^,]*\).*!\1!g' /tmp/$1)
|
||||
}
|
||||
|
||||
getvalue() {
|
||||
echo $(sed 's!.*"'$2'":"\([^"]*\).*!\1!g' /tmp/$1)
|
||||
}
|
||||
|
||||
rand=`awk 'BEGIN{srand();print int(rand()*(99000-1000))+1000 }'`
|
||||
|
||||
files="getWanInfo getImgInfo getSysteminfo"
|
||||
for f in $files; do
|
||||
wget -t 3 -O /tmp/$f "http://$IP/goform/$f?rand=$rand" >/dev/null 2>&1
|
||||
done
|
||||
|
||||
MODEN=$(getvaluen getWanInfo "network_type")
|
||||
case $MODEN in
|
||||
1) MODE="GPRS";;
|
||||
2) MODE="EDGE";;
|
||||
3) MODE="HSDPA";;
|
||||
4) MODE="HSUPA";;
|
||||
5) MODE="UMTS";;
|
||||
9) MODE="GSM";;
|
||||
11) MODE="LTE";;
|
||||
12) MODE="HSPA+";;
|
||||
13) MODE="DC HSPA+";;
|
||||
*) MODE="-";;
|
||||
esac
|
||||
echo "^SYSINFOEX:x,x,x,x,,x,\"$MODE\",$MODEN,\"$MODE\""
|
||||
|
||||
OPER=$(getvalue getWanInfo "network_name")
|
||||
echo "+COPS: 0,0,\"$OPER\",x"
|
||||
|
||||
SIGNAL=$(getvaluen getImgInfo "signal")
|
||||
case $SIGNAL in
|
||||
1) CSQ="6";;
|
||||
2) CSQ="12";;
|
||||
3) CSQ="18";;
|
||||
4) CSQ="24";;
|
||||
5) CSQ="31";;
|
||||
*) CSQ="0";;
|
||||
esac
|
||||
echo "+CSQ: $CSQ,99"
|
||||
|
||||
MODEL=$(getvalue getSysteminfo "dev_name")
|
||||
echo "DEVICE:Alcatel $MODEL"
|
||||
|
||||
if [ "x$2" != "xdebug" ]; then
|
||||
for f in $files; do
|
||||
rm /tmp/$f
|
||||
done
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -1,172 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
IP=$1
|
||||
[ -z "$IP" ] && exit 0
|
||||
[ -e /usr/bin/wget ] || exit 0
|
||||
|
||||
getvaluen() {
|
||||
echo $(awk -F[\<\>] '/<'$2'>/ {print $3}' /tmp/$1 | sed 's/[^0-9]//g')
|
||||
}
|
||||
|
||||
getvaluens() {
|
||||
echo $(awk -F[\<\>] '/<'$2'>/ {print $3}' /tmp/$1 | sed 's/[^0-9-]//g')
|
||||
}
|
||||
|
||||
getvalue() {
|
||||
echo $(awk -F[\<\>] '/<'$2'>/ {print $3}' /tmp/$1)
|
||||
}
|
||||
|
||||
cookie=$(mktemp)
|
||||
/usr/bin/wget -t 25 -O /tmp/webserver-token "http://$IP/api/webserver/token" >/dev/null 2>&1
|
||||
token=$(getvaluen webserver-token token)
|
||||
if [ -z "$token" ]; then
|
||||
/usr/bin/wget -t 25 -O /tmp/webserver-token "http://$IP/api/webserver/SesTokInfo" >/dev/null 2>&1
|
||||
sesinfo=$(getvalue webserver-token SesInfo)
|
||||
fi
|
||||
if [ -z "$sesinfo" ]; then
|
||||
/usr/bin/wget -q -O /dev/null --keep-session-cookies --save-cookies $cookie "http://$IP/html/home.html"
|
||||
fi
|
||||
|
||||
/usr/bin/wget -t 25 -O /tmp/user-state-login "http://$IP/api/user/state-login"
|
||||
T1=$(getvalue user-state-login State)
|
||||
if [ "x$T1" != "x0" ]; then
|
||||
USER="admin"
|
||||
PASS="admin"
|
||||
PASS=$(echo -n "$PASS" | base64)
|
||||
DATA="<request><Username>$USER</Username><Password>$PASS</Password></request>"
|
||||
/usr/bin/wget -t 25 -O /dev/null "http://$IP/api/user/login" --post-data $DATA --header "__RequestVerificationToken: $token"
|
||||
fi
|
||||
|
||||
files="device/signal monitoring/status net/current-plmn net/signal-para device/information device/basic_information"
|
||||
for f in $files; do
|
||||
nf=$(echo $f | sed 's!/!-!g')
|
||||
if [ -n "$token" ]; then
|
||||
/usr/bin/wget -t 3 -O /tmp/$nf "http://$IP/api/$f" --header "__RequestVerificationToken: $token" >/dev/null 2>&1
|
||||
elif [ -n "$sesinfo" ]; then
|
||||
/usr/bin/wget -t 3 -O /tmp/$nf "http://$IP/api/$f" --header "Cookie: $sesinfo" >/dev/null 2>&1
|
||||
else
|
||||
/usr/bin/wget -t 3 -O /tmp/$nf "http://$IP/api/$f" --load-cookies=$cookie >/dev/null 2>&1
|
||||
fi
|
||||
done
|
||||
|
||||
rssi=$(getvaluen device-signal rssi)
|
||||
if [ -n "$rssi" ]; then
|
||||
CSQ=$(((-1*rssi + 113)/2))
|
||||
echo "+CSQ: $CSQ,99"
|
||||
else
|
||||
per=$(getvaluen monitoring-status SignalStrength)
|
||||
if [ -n "$per" ]; then
|
||||
CSQ=$((($per*31)/100))
|
||||
echo "+CSQ: $CSQ,99"
|
||||
fi
|
||||
fi
|
||||
|
||||
MODEN=$(getvaluen monitoring-status CurrentNetworkType)
|
||||
case $MODEN in
|
||||
1) MODE="GSM";;
|
||||
2) MODE="GPRS";;
|
||||
3) MODE="EDGE";;
|
||||
4) MODE="WCDMA";;
|
||||
5) MODE="HSDPA";;
|
||||
6) MODE="HSUPA";;
|
||||
7) MODE="HSPA";;
|
||||
8) MODE="TDSCDMA";;
|
||||
9) MODE="HSPA+";;
|
||||
10) MODE="EVDO rev. 0";;
|
||||
11) MODE="EVDO rev. A";;
|
||||
12) MODE="EVDO rev. B";;
|
||||
13) MODE="1xRTT";;
|
||||
14) MODE="UMB";;
|
||||
15) MODE="1xEVDV";;
|
||||
16) MODE="3xRTT";;
|
||||
17) MODE="HSPA+64QAM";;
|
||||
18) MODE="HSPA+MIMO";;
|
||||
19) MODE="LTE";;
|
||||
21) MODE="IS95A";;
|
||||
22) MODE="IS95B";;
|
||||
23) MODE="CDMA1x";;
|
||||
24) MODE="EVDO rev. 0";;
|
||||
25) MODE="EVDO rev. A";;
|
||||
26) MODE="EVDO rev. B";;
|
||||
27) MODE="Hybrydowa CDMA1x";;
|
||||
28) MODE="Hybrydowa EVDO rev. 0";;
|
||||
29) MODE="Hybrydowa EVDO rev. A";;
|
||||
30) MODE="Hybrydowa EVDO rev. B";;
|
||||
31) MODE="EHRPD rev. 0";;
|
||||
32) MODE="EHRPD rev. A";;
|
||||
33) MODE="EHRPD rev. B";;
|
||||
34) MODE="Hybrydowa EHRPD rev. 0";;
|
||||
35) MODE="Hybrydowa EHRPD rev. A";;
|
||||
36) MODE="Hybrydowa EHRPD rev. B";;
|
||||
41) MODE="WCDMA (UMTS)";;
|
||||
42) MODE="HSDPA";;
|
||||
43) MODE="HSUPA";;
|
||||
44) MODE="HSPA";;
|
||||
45) MODE="HSPA+";;
|
||||
46) MODE="DC-HSPA+";;
|
||||
61) MODE="TD SCDMA";;
|
||||
62) MODE="TD HSDPA";;
|
||||
63) MODE="TD HSUPA";;
|
||||
64) MODE="TD HSPA";;
|
||||
65) MODE="TD HSPA+";;
|
||||
81) MODE="802.16E";;
|
||||
101) MODE="LTE";;
|
||||
*) MODE="-";;
|
||||
esac
|
||||
echo "^SYSINFOEX:x,x,x,x,,x,\"$MODE\",$MODEN,\"$MODE\""
|
||||
|
||||
numeric=$(getvaluen net-current-plmn Numeric)
|
||||
echo "+COPS: 0,2,\"$numeric\",x"
|
||||
|
||||
lac=$(getvalue net-signal-para Lac)
|
||||
if [ -z "$lac" ]; then
|
||||
/usr/bin/wget -t 3 -O /tmp/add-param "http://$IP/config/deviceinformation/add_param.xml" > /dev/null 2>&1
|
||||
lac=$(getvalue add-param lac)
|
||||
rm /tmp/add-param
|
||||
fi
|
||||
cid=$(getvalue net-signal-para CellID)
|
||||
if [ -z "$cid" ]; then
|
||||
cell_id=$(getvalue device-signal cell_id)
|
||||
cid=""
|
||||
[ -n "$cell_id" ] && cid=$(printf %0X $cell_id)
|
||||
fi
|
||||
echo "+CREG: 2,1,\"$lac\",\"$cid\""
|
||||
|
||||
if [ "x$MODE" = "xLTE" ]; then
|
||||
rsrp=$(getvaluens device-signal rsrp)
|
||||
sinr=$(getvaluens device-signal sinr)
|
||||
rsrq=$(getvaluens device-signal rsrq)
|
||||
rsrp=$(awk 'BEGIN {print '$rsrp' + 141}')
|
||||
sinr=$(awk 'BEGIN {print ('$sinr'+20.2)*5}')
|
||||
rsrq=$(awk 'BEGIN {print ('$rsrq'+20)*2}')
|
||||
echo "^HCSQ: \"$MODE\",$rssi,$rsrp,$sinr,$rsrq"
|
||||
else
|
||||
rscp=$(getvaluens device-signal rscp)
|
||||
[ -z "$rscp" ] && rscp=$(getvaluens net-signal-para Rscp)
|
||||
ecio=$(getvaluens net-signal-para ecio)
|
||||
[ -z "$ecio" ] && ecio=$(getvaluens net-signal-para Ecio)
|
||||
echo "^CSNR: $rscp,$ecio"
|
||||
fi
|
||||
|
||||
device=$(getvalue device-information DeviceName)
|
||||
if [ -n "$device" ]; then
|
||||
class=$(getvalue device-information Classify)
|
||||
echo "DEVICE:Huawei $device $class"
|
||||
else
|
||||
device=$(getvalue device-basic_information devicename)
|
||||
class=$(getvalue device-basic_information classify)
|
||||
[ -n "$device" ] && echo "DEVICE:Huawei $device $class"
|
||||
fi
|
||||
|
||||
DATA="<request><Logout>1</Logout></request>"
|
||||
/usr/bin/wget -t 25 -O /tmp/ccc "http://$IP/api/user/logout" --post-data $DATA --header "__RequestVerificationToken: $token"
|
||||
|
||||
if [ "x$2" != "xdebug" ]; then
|
||||
for f in $files webserver/token; do
|
||||
nf=$(echo $f | sed 's!/!-!g')
|
||||
rm /tmp/$nf
|
||||
done
|
||||
fi
|
||||
rm $cookie
|
||||
|
||||
exit 0
|
||||
@@ -1,159 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
IP=$1
|
||||
[ -z "$IP" ] && exit 0
|
||||
[ -e /usr/bin/wget ] || exit 0
|
||||
|
||||
getvaluen() {
|
||||
echo $(awk -F[\<\>] '/<'$2'>/ {print $3}' /tmp/$1 | sed 's/[^0-9]//g')
|
||||
}
|
||||
|
||||
getvaluens() {
|
||||
echo $(awk -F[\<\>] '/<'$2'>/ {print $3}' /tmp/$1 | sed 's/[^0-9-]//g')
|
||||
}
|
||||
|
||||
getvalue() {
|
||||
echo $(awk -F[\<\>] '/<'$2'>/ {print $3}' /tmp/$1)
|
||||
}
|
||||
|
||||
cookie=$(mktemp)
|
||||
/usr/bin/wget -t 25 -O /tmp/webserver-token "http://$IP/api/webserver/token" >/dev/null 2>&1
|
||||
token=$(getvaluen webserver-token token)
|
||||
if [ -z "$token" ]; then
|
||||
/usr/bin/wget -t 25 -O /tmp/webserver-token "http://$IP/api/webserver/SesTokInfo" >/dev/null 2>&1
|
||||
sesinfo=$(getvalue webserver-token SesInfo)
|
||||
fi
|
||||
if [ -z "$sesinfo" ]; then
|
||||
/usr/bin/wget -q -O /dev/null --keep-session-cookies --save-cookies $cookie "http://$IP/html/home.html"
|
||||
fi
|
||||
|
||||
files="device/signal monitoring/status net/current-plmn net/signal-para device/information device/basic_information"
|
||||
for f in $files; do
|
||||
nf=$(echo $f | sed 's!/!-!g')
|
||||
if [ -n "$token" ]; then
|
||||
/usr/bin/wget -t 3 -O /tmp/$nf "http://$IP/api/$f" --header "__RequestVerificationToken: $token" >/dev/null 2>&1
|
||||
elif [ -n "$sesinfo" ]; then
|
||||
/usr/bin/wget -t 3 -O /tmp/$nf "http://$IP/api/$f" --header "Cookie: $sesinfo" >/dev/null 2>&1
|
||||
else
|
||||
/usr/bin/wget -t 3 -O /tmp/$nf "http://$IP/api/$f" --load-cookies=$cookie >/dev/null 2>&1
|
||||
fi
|
||||
done
|
||||
|
||||
rssi=$(getvaluen device-signal rssi)
|
||||
if [ -n "$rssi" ]; then
|
||||
CSQ=$(((-1*rssi + 113)/2))
|
||||
echo "+CSQ: $CSQ,99"
|
||||
else
|
||||
per=$(getvaluen monitoring-status SignalStrength)
|
||||
if [ -n "$per" ]; then
|
||||
CSQ=$((($per*31)/100))
|
||||
echo "+CSQ: $CSQ,99"
|
||||
fi
|
||||
fi
|
||||
|
||||
MODEN=$(getvaluen monitoring-status CurrentNetworkType)
|
||||
case $MODEN in
|
||||
1) MODE="GSM";;
|
||||
2) MODE="GPRS";;
|
||||
3) MODE="EDGE";;
|
||||
4) MODE="WCDMA";;
|
||||
5) MODE="HSDPA";;
|
||||
6) MODE="HSUPA";;
|
||||
7) MODE="HSPA";;
|
||||
8) MODE="TDSCDMA";;
|
||||
9) MODE="HSPA+";;
|
||||
10) MODE="EVDO rev. 0";;
|
||||
11) MODE="EVDO rev. A";;
|
||||
12) MODE="EVDO rev. B";;
|
||||
13) MODE="1xRTT";;
|
||||
14) MODE="UMB";;
|
||||
15) MODE="1xEVDV";;
|
||||
16) MODE="3xRTT";;
|
||||
17) MODE="HSPA+64QAM";;
|
||||
18) MODE="HSPA+MIMO";;
|
||||
19) MODE="LTE";;
|
||||
21) MODE="IS95A";;
|
||||
22) MODE="IS95B";;
|
||||
23) MODE="CDMA1x";;
|
||||
24) MODE="EVDO rev. 0";;
|
||||
25) MODE="EVDO rev. A";;
|
||||
26) MODE="EVDO rev. B";;
|
||||
27) MODE="Hybrydowa CDMA1x";;
|
||||
28) MODE="Hybrydowa EVDO rev. 0";;
|
||||
29) MODE="Hybrydowa EVDO rev. A";;
|
||||
30) MODE="Hybrydowa EVDO rev. B";;
|
||||
31) MODE="EHRPD rev. 0";;
|
||||
32) MODE="EHRPD rev. A";;
|
||||
33) MODE="EHRPD rev. B";;
|
||||
34) MODE="Hybrydowa EHRPD rev. 0";;
|
||||
35) MODE="Hybrydowa EHRPD rev. A";;
|
||||
36) MODE="Hybrydowa EHRPD rev. B";;
|
||||
41) MODE="WCDMA (UMTS)";;
|
||||
42) MODE="HSDPA";;
|
||||
43) MODE="HSUPA";;
|
||||
44) MODE="HSPA";;
|
||||
45) MODE="HSPA+";;
|
||||
46) MODE="DC-HSPA+";;
|
||||
61) MODE="TD SCDMA";;
|
||||
62) MODE="TD HSDPA";;
|
||||
63) MODE="TD HSUPA";;
|
||||
64) MODE="TD HSPA";;
|
||||
65) MODE="TD HSPA+";;
|
||||
81) MODE="802.16E";;
|
||||
101) MODE="LTE";;
|
||||
*) MODE="-";;
|
||||
esac
|
||||
echo "^SYSINFOEX:x,x,x,x,,x,\"$MODE\",$MODEN,\"$MODE\""
|
||||
|
||||
numeric=$(getvaluen net-current-plmn Numeric)
|
||||
echo "+COPS: 0,2,\"$numeric\",x"
|
||||
|
||||
lac=$(getvalue net-signal-para Lac)
|
||||
if [ -z "$lac" ]; then
|
||||
/usr/bin/wget -t 3 -O /tmp/add-param "http://$IP/config/deviceinformation/add_param.xml" > /dev/null 2>&1
|
||||
lac=$(getvalue add-param lac)
|
||||
rm /tmp/add-param
|
||||
fi
|
||||
cid=$(getvalue net-signal-para CellID)
|
||||
if [ -z "$cid" ]; then
|
||||
cell_id=$(getvalue device-signal cell_id)
|
||||
cid=""
|
||||
[ -n "$cell_id" ] && cid=$(printf %0X $cell_id)
|
||||
fi
|
||||
echo "+CREG: 2,1,\"$lac\",\"$cid\""
|
||||
|
||||
if [ "x$MODE" = "xLTE" ]; then
|
||||
rsrp=$(getvaluens device-signal rsrp)
|
||||
sinr=$(getvaluens device-signal sinr)
|
||||
rsrq=$(getvaluens device-signal rsrq)
|
||||
rsrp=$(awk 'BEGIN {print '$rsrp' + 141}')
|
||||
sinr=$(awk 'BEGIN {print ('$sinr'+20.2)*5}')
|
||||
rsrq=$(awk 'BEGIN {print ('$rsrq'+20)*2}')
|
||||
echo "^HCSQ: \"$MODE\",$rssi,$rsrp,$sinr,$rsrq"
|
||||
else
|
||||
rscp=$(getvaluens device-signal rscp)
|
||||
[ -z "$rscp" ] && rscp=$(getvaluens net-signal-para Rscp)
|
||||
ecio=$(getvaluens net-signal-para ecio)
|
||||
[ -z "$ecio" ] && ecio=$(getvaluens net-signal-para Ecio)
|
||||
echo "^CSNR: $rscp,$ecio"
|
||||
fi
|
||||
|
||||
device=$(getvalue device-information DeviceName)
|
||||
if [ -n "$device" ]; then
|
||||
class=$(getvalue device-information Classify)
|
||||
echo "DEVICE:Huawei $device $class"
|
||||
else
|
||||
device=$(getvalue device-basic_information devicename)
|
||||
class=$(getvalue device-basic_information classify)
|
||||
[ -n "$device" ] && echo "DEVICE:Huawei $device $class"
|
||||
fi
|
||||
|
||||
if [ "x$2" != "xdebug" ]; then
|
||||
for f in $files webserver/token; do
|
||||
nf=$(echo $f | sed 's!/!-!g')
|
||||
rm /tmp/$nf
|
||||
done
|
||||
fi
|
||||
rm $cookie
|
||||
|
||||
exit 0
|
||||
@@ -1,14 +0,0 @@
|
||||
let $d = $env("DEVICE")
|
||||
if $d = "" goto timeout
|
||||
|
||||
open com $d
|
||||
set com 115200n81
|
||||
set senddelay 0.05
|
||||
waitquiet 2 0.5
|
||||
send "AT^m"
|
||||
waitfor 2 "OK" "+CME ERROR"
|
||||
if % = -1 goto timeout
|
||||
exit 0
|
||||
|
||||
:timeout
|
||||
exit 1
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
IP=$1
|
||||
[ -z "$IP" ] && exit 0
|
||||
|
||||
T=$(mktemp)
|
||||
wget -q -O $T "http://$IP/goform/goform_get_cmd_process?multi_data=1&cmd=manufacturer_name,model_name,network_provider,network_type,lte_rsrp,lte_rsrq,lte_rssi,lte_snr,cell_id,lac_code,hmcc,hmnc,rmcc,rmnc,rssi,rscp,ecio"
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
json_load "$(cat $T)"
|
||||
|
||||
json_get_vars manufacturer_name model_name network_provider network_type lte_rsrp lte_rsrq lte_rssi lte_snr cell_id lac_code hmcc hmnc rmcc rmnc rssi rscp ecio
|
||||
|
||||
if [ -n "$lte_rssi" ]; then
|
||||
rssi=$lte_rssi
|
||||
fi
|
||||
if [ -n "$rssi" ]; then
|
||||
CSQ=$(((rssi+113)/2))
|
||||
else
|
||||
CSQ=0
|
||||
fi
|
||||
echo "+CSQ: $CSQ,99"
|
||||
|
||||
echo "DEVICE:$manufacturer_name $model_name"
|
||||
|
||||
echo "^SYSINFOEX:x,x,x,x,,x,\"$network_type\",x,\"$network_type\""
|
||||
|
||||
if [ -n "$hmcc" ]; then
|
||||
mcc=$(printf "%03d" $hmcc)
|
||||
else
|
||||
[ -n "$rmcc" ] && mcc=$(printf "%03d" $rmcc)
|
||||
fi
|
||||
|
||||
if [ -n "$hmnc" ]; then
|
||||
mnc=$(printf "%02d" $hmnc)
|
||||
else
|
||||
[ -n "$rmnc" ] && mnc=$(printf "%02d" $rmnc)
|
||||
fi
|
||||
echo "+COPS: 0,2,\"$mcc$mnc\",x"
|
||||
|
||||
if [ "x$network_type" = "xLTE" ]; then
|
||||
echo "^LTERSRP: $lte_rsrp,$lte_rsrq"
|
||||
else
|
||||
echo "^CSNR: $rscp,$ecio"
|
||||
fi
|
||||
|
||||
echo "+CREG: 2,1,\"$lac_code\",\"$cell_id\""
|
||||
|
||||
rm $T
|
||||
exit 0
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"error": "",
|
||||
"csq": "{CSQ}",
|
||||
"signal": "{CSQ_PER}",
|
||||
"rssi": "{CSQ_RSSI}",
|
||||
"mode": "{MODE}",
|
||||
"device": "{DEVICE}",
|
||||
"operator_name": "{COPS}",
|
||||
"operator": "{COPS_NUM}",
|
||||
"operator_mcc": "{COPS_MCC}",
|
||||
"operator_mnc": "{COPS_MNC}",
|
||||
"lac_hex": "{LAC}",
|
||||
"lac_dec": "{LAC_NUM}",
|
||||
"cid_hex": "{CID}",
|
||||
"cid_dec": "{CID_NUM}",
|
||||
"tac_hex": "{TAC}",
|
||||
"tac_dec": "{TAC_NUM}",
|
||||
"bts_info": "{BTSINFO}",
|
||||
"bts_qos_down": "{DOWN}",
|
||||
"bts_qos_up": "{UP}",
|
||||
"status": "{STATUS}",
|
||||
"conn_time": "{CONN_TIME}",
|
||||
"conn_time_sec": "{CONN_TIME_SEC}",
|
||||
"iface_rx": "{RX}",
|
||||
"iface_tx": "{TX}",
|
||||
"rscp": "{RSCP}",
|
||||
"ecio": "{ECIO}",
|
||||
"rsrp": "{RSRP}",
|
||||
"sinr": "{SINR}",
|
||||
"rsrq": "{RSRQ}"
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
Status: {STATUS}
|
||||
Connection time: {CONN_TIME}
|
||||
Received / Transmitted data: {RX} / {TX}
|
||||
Operator: {COPS}
|
||||
Operating mode: {MODE}
|
||||
Signal strength: {CSQ_PER}%
|
||||
Device: {DEVICE}
|
||||
MCC MNC: {COPS_MCC} {COPS_MNC}
|
||||
LAC: {LAC} ({LAC_NUM})
|
||||
CID: {CID} ({CID_NUM})
|
||||
TAC: {TAC} ({TAC_NUM})
|
||||
CSQ: {CSQ}
|
||||
RSSI: {CSQ_RSSI} dBm
|
||||
RSCP: {RSCP} dBm
|
||||
Ec/IO: {ECIO} dB
|
||||
RSRP: {RSRP} dBm
|
||||
SINR: {SINR} dB
|
||||
RSRQ: {RSRQ} dB
|
||||
@@ -1,18 +0,0 @@
|
||||
Staatus: {STATUS}
|
||||
Ühendusaeg: {CONN_TIME}
|
||||
Vastuvõetud/saadetud andmed: {RX} / {TX}
|
||||
Operaator: {COPS}
|
||||
Töörežiim: {MODE}
|
||||
Signaali tugevus: {CSQ_PER}%
|
||||
Seade: {DEVICE}
|
||||
MCC MNC: {COPS_MCC} {COPS_MNC}
|
||||
LAC: {LAC} ({LAC_NUM})
|
||||
CID: {CID} ({CID_NUM})
|
||||
TAC: {TAC} ({TAC_NUM})
|
||||
CSQ: {CSQ}
|
||||
RSSI: {CSQ_RSSI} dBm
|
||||
RSCP: {RSCP} dBm
|
||||
Ec/IO: {ECIO} dB
|
||||
RSRP: {RSRP} dBm
|
||||
SINR: {SINR} dB
|
||||
RSRQ: {RSRQ} dB
|
||||
@@ -1,18 +0,0 @@
|
||||
Stato: {STATUS}
|
||||
Tempo di connessione: {CONN_TIME}
|
||||
Dati ricevuti / Trasmessi: {RX} / {TX}
|
||||
Operatore: {COPS}
|
||||
Tipo di connessione: {MODE}
|
||||
Forza segnale: {CSQ_PER}%
|
||||
Dispositivo: {DEVICE}
|
||||
MCC MNC: {COPS_MCC} {COPS_MNC}
|
||||
LAC: {LAC} ({LAC_NUM})
|
||||
CID: {CID} ({CID_NUM})
|
||||
TAC: {TAC} ({TAC_NUM})
|
||||
CSQ: {CSQ}
|
||||
RSSI: {CSQ_RSSI} dBm
|
||||
RSCP: {RSCP} dBm
|
||||
Ec/IO: {ECIO} dB
|
||||
RSRP: {RSRP} dBm
|
||||
SINR: {SINR} dB
|
||||
RSRQ: {RSRQ} dB
|
||||
@@ -1,18 +0,0 @@
|
||||
Status: {STATUS}
|
||||
Czas polaczenia: {CONN_TIME}
|
||||
Przeslano danych: {RX} / {TX}
|
||||
Operator: {COPS}
|
||||
Tryb pracy: {MODE}
|
||||
Sila sygnalu: {CSQ_PER}%
|
||||
Urzadzenie: {DEVICE}
|
||||
MCC MNC: {COPS_MCC} {COPS_MNC}
|
||||
LAC: {LAC} ({LAC_NUM})
|
||||
CID: {CID} ({CID_NUM})
|
||||
TAC: {TAC} ({TAC_NUM})
|
||||
CSQ: {CSQ}
|
||||
RSSI: {CSQ_RSSI} dBm
|
||||
RSCP: {RSCP} dBm
|
||||
Ec/IO: {ECIO} dB
|
||||
RSRP: {RSRP} dBm
|
||||
SINR: {SINR} dB
|
||||
RSRQ: {RSRQ} dB
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
config 3ginfo
|
||||
option device ''
|
||||
option http_port '81'
|
||||
option network 'wan'
|
||||
option pincode ''
|
||||
@@ -1,138 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# (c) 2024-2025 Cezary Jackiewicz <cezary@eko.one.pl>
|
||||
#
|
||||
|
||||
. /lib/functions.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
FORMAT=1
|
||||
[ "x$1" = "xjson" ] && FORMAT=2
|
||||
ECM=""
|
||||
|
||||
RES="/usr/share/modemdata"
|
||||
|
||||
format_conn_time() {
|
||||
CT=$1
|
||||
D=$(expr $CT / 60 / 60 / 24)
|
||||
H=$(expr $CT / 60 / 60 % 24)
|
||||
M=$(expr $CT / 60 % 60)
|
||||
S=$(expr $CT % 60)
|
||||
printf "%dd, %02d:%02d:%02d" $D $H $M $S
|
||||
}
|
||||
|
||||
SEPARATOR=""
|
||||
parse_section() {
|
||||
[ -n "$SEPARATOR" ] && echo "$SEPARATOR"
|
||||
local section="$1"
|
||||
config_get device "$section" device ""
|
||||
config_get network "$section" network ""
|
||||
config_get force_plmn "$section" force_plmn "0"
|
||||
|
||||
if echo "x$device" | grep -q "192.168."; then
|
||||
ECM="$RES/addon/ecm/huawei.sh $device"
|
||||
else
|
||||
ECM=""
|
||||
if [ ! -e /var/state/3ginfo-detected ]; then
|
||||
[ -z "$device" ] && device=$(/usr/share/3ginfo/detectdevice.sh)
|
||||
[ -z "$network" ] && network=$(/usr/share/3ginfo/detectsection.sh "$section")
|
||||
fi
|
||||
config_get pincode "$section" pincode ""
|
||||
if [ -n "$pincode" ] && [ ! -e /var/state/3ginfo-pincode ]; then
|
||||
[ -n "$device" ] && sms_tool -d "$device" at "at+cpin=\"$pincode\""
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$FORMAT" = "1" ]; then
|
||||
SEPARATOR="---"
|
||||
json_init
|
||||
if [ -n "$ECM" ]; then
|
||||
json_load "$($ECM product)"
|
||||
else
|
||||
json_load "$($RES/product.sh "$device")"
|
||||
fi
|
||||
json_get_vars vendor product revision imei iccid imsi
|
||||
echo "Device: ${vendor} ${product}"
|
||||
echo "Revision: ${revision}"
|
||||
echo "IMEI: ${imei}"
|
||||
echo "ICCID: ${iccid}"
|
||||
echo "IMSI: ${imsi}"
|
||||
echo ""
|
||||
|
||||
json_init
|
||||
json_load "$($RES/network.sh "$network")"
|
||||
json_get_vars conn_time_sec rx tx
|
||||
echo "Connected time: "$(format_conn_time ${conn_time_sec})
|
||||
echo "TX: ${tx}"
|
||||
echo "RX: ${rx}"
|
||||
echo ""
|
||||
|
||||
json_init
|
||||
if [ -n "$ECM" ]; then
|
||||
json_load "$($ECM params)"
|
||||
else
|
||||
json_load "$($RES/params.sh "$device" "$force_plmn")"
|
||||
fi
|
||||
json_get_vars signal operator_name operator_mcc operator_mnc country mode registration lac_dec lac_hex cid_dec cid_hex
|
||||
echo "Signal: ${signal} %"
|
||||
echo "Mode: ${mode}"
|
||||
echo "Operator: ${operator_name} (${operator_mcc} ${operator_mnc})"
|
||||
[ -n "$country" ] && echo "Country: ${country}"
|
||||
case $registration in
|
||||
0) REG="not registered";;
|
||||
1) REG="registered, home network";;
|
||||
2) REG="not registered, searching";;
|
||||
3) REG="registration denied";;
|
||||
5) REG="registered, roaming";;
|
||||
6) REG="registered for SMS only, home network";;
|
||||
7) REG="registered for SMS only, roaming";;
|
||||
*) REG="$registration";;
|
||||
esac
|
||||
echo "Registration: ${REG}"
|
||||
echo ""
|
||||
T="21;CellID: ${cid_dec} (${cid_hex})"
|
||||
T="${T}\n22;LAC: ${lac_dec} (${lac_hex})"
|
||||
if json_is_a addon array; then
|
||||
json_get_keys addon addon
|
||||
json_select addon
|
||||
for i in $addon; do
|
||||
json_select "$i"
|
||||
json_get_vars idx key value
|
||||
json_select ..
|
||||
if [ "$idx" = "10" ]; then
|
||||
T="${T}\n${idx};${key}: ${value/°/°}"
|
||||
else
|
||||
T="${T}\n${idx};${key}: ${value}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
echo -e "$T" | sort | awk -F[\;] '{print $2}'
|
||||
else
|
||||
SEPARATOR=","
|
||||
echo "["
|
||||
if [ -n "$ECM" ]; then
|
||||
$ECM product
|
||||
echo ","
|
||||
$RES/network.sh "$network"
|
||||
echo ","
|
||||
$ECM params
|
||||
else
|
||||
$RES/product.sh "$device"
|
||||
echo ","
|
||||
$RES/network.sh "$network"
|
||||
echo ","
|
||||
$RES/params.sh "$device" "$force_plmn"
|
||||
fi
|
||||
echo "]"
|
||||
fi
|
||||
}
|
||||
|
||||
config_load 3ginfo
|
||||
[ "$FORMAT" = "2" ] && echo '{"res":['
|
||||
config_foreach parse_section 3ginfo
|
||||
[ "$FORMAT" = "2" ] && echo ']}'
|
||||
touch /var/state/3ginfo-detected
|
||||
touch /var/state/3ginfo-pincode
|
||||
|
||||
exit 0
|
||||
@@ -1,13 +0,0 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.01
|
||||
waitquiet 0.01 0.01
|
||||
|
||||
send "AT+CPIN?^m"
|
||||
waitfor 2 "OK" "+CME ERROR"
|
||||
if % = -1 goto timeout
|
||||
exit 0
|
||||
|
||||
:timeout
|
||||
exit 1
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# (c) 2023-2024 Cezary Jackiewicz <cezary@eko.one.pl>
|
||||
#
|
||||
|
||||
# find any device
|
||||
DEVICES=$(find /dev -name "ttyUSB*" -o -name "ttyACM*" -o -name "wwan*at*" | sort -r)
|
||||
for DEVICE in $DEVICES; do
|
||||
gcom -d $DEVICE -s /usr/share/3ginfo/check.gcom >/dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
uci set 3ginfo.@3ginfo[0].device="$DEVICE"
|
||||
uci commit 3ginfo
|
||||
echo "$DEVICE"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
exit 0
|
||||
@@ -1,60 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# (c) 2024 Cezary Jackiewicz <cezary@eko.one.pl>
|
||||
#
|
||||
|
||||
getdevicepath() {
|
||||
devname="$(basename $1)"
|
||||
case "$devname" in
|
||||
'wwan'*'at'*)
|
||||
devpath="$(readlink -f /sys/class/wwan/$devname/device)"
|
||||
echo ${devpath%/*/*/*}
|
||||
;;
|
||||
'ttyACM'*)
|
||||
devpath="$(readlink -f /sys/class/tty/$devname/device)"
|
||||
echo ${devpath%/*}
|
||||
;;
|
||||
'tty'*)
|
||||
devpath="$(readlink -f /sys/class/tty/$devname/device)"
|
||||
echo ${devpath%/*/*}
|
||||
;;
|
||||
*)
|
||||
devpath="$(readlink -f /sys/class/usbmisc/$devname/device)"
|
||||
echo ${devpath%/*}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
CONFIGSEC=$1
|
||||
if [ -n "$CONFIGSEC" ]; then
|
||||
SEC=$(uci -q get 3ginfo.${CONFIGSEC}.network)
|
||||
if [ -n "$SEC" ]; then
|
||||
echo "$SEC"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
DEVICE=$(uci -q get 3ginfo.${CONFIGSEC}.device)
|
||||
if [ -z "$DEVICE" ]; then
|
||||
echo ""
|
||||
exit 0
|
||||
fi
|
||||
|
||||
DEVPATH=$(getdevicepath "$DEVICE")
|
||||
DEVICES=$(uci show network | awk '/network\..*\.device/')
|
||||
for T in $DEVICES; do
|
||||
T1=$(echo "$T" | cut -f2 -d= | xargs)
|
||||
if [ -e "$T1" ]; then
|
||||
if [ "$DEVPATH" = "$(getdevicepath "$T1")" ]; then
|
||||
T2=$(echo "$T" | cut -f2 -d.)
|
||||
uci set 3ginfo.${CONFIGSEC}.network="$T2"
|
||||
uci commit 3ginfo
|
||||
echo "$T2"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
exit 0
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dnsproxy
|
||||
PKG_VERSION:=0.84.1
|
||||
PKG_RELEASE:=17
|
||||
PKG_VERSION:=0.84.2
|
||||
PKG_RELEASE:=18
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/dnsproxy/tar.gz/v$(PKG_VERSION)?
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# Copyright (C) 2015-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=geo2txt
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/sbwml/geo2txt/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=skip
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
PKG_MAINTAINER:=sbwml <admin@cooluc.com>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/geo2txt
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=V2ray geosite & geoip unpacking CLI tool
|
||||
URL:=https://github.com/sbwml/geo2txt
|
||||
endef
|
||||
|
||||
define Package/quickfile/description
|
||||
A lightweight pure C utility to unpack v2ray geosite.dat and geoip.dat.
|
||||
endef
|
||||
|
||||
define Package/geo2txt/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/geo2txt $(1)/usr/bin/geo2txt
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,geo2txt))
|
||||
@@ -12,7 +12,7 @@ PKG_ARCH_LINKEASE:=$(ARCH)
|
||||
PKG_NAME:=linkease-common-bin
|
||||
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
||||
PKG_SOURCE_DATE:=1.7.5
|
||||
PKG_RELEASE:=22
|
||||
PKG_RELEASE:=23
|
||||
|
||||
ARCH_HEXCODE:=
|
||||
ifeq ($(ARCH),x86_64)
|
||||
@@ -28,7 +28,7 @@ else ifeq ($(ARCH),mipsel)
|
||||
ARCH_HEXCODE=1b0c
|
||||
endif
|
||||
|
||||
PKG_SOURCE_VERSION:=f5227a7df2160100b478dba7880891aed1663eb4
|
||||
PKG_SOURCE_VERSION:=82c1daae2ec9dbe7f1fdc1d3b1bc5c9e8342ecc1
|
||||
PKG_SOURCE:=linkease-common-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/istoreos/istoreos-app-hub/releases/download/linkease-runtime-v$(PKG_SOURCE_DATE)/
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/linkease-common-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE)
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ PKG_ARCH_LINKEASE:=$(ARCH)
|
||||
PKG_NAME:=linkease
|
||||
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
||||
PKG_SOURCE_DATE:=1.7.5
|
||||
PKG_RELEASE:=25
|
||||
PKG_RELEASE:=26
|
||||
|
||||
ARCH_HEXCODE:=
|
||||
ifeq ($(ARCH),x86_64)
|
||||
@@ -28,7 +28,7 @@ else ifeq ($(ARCH),mipsel)
|
||||
ARCH_HEXCODE=1b0c
|
||||
endif
|
||||
|
||||
PKG_SOURCE_VERSION:=f5227a7df2160100b478dba7880891aed1663eb4
|
||||
PKG_SOURCE_VERSION:=82c1daae2ec9dbe7f1fdc1d3b1bc5c9e8342ecc1
|
||||
PKG_SOURCE:=linkease-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/istoreos/istoreos-app-hub/releases/download/linkease-runtime-v$(PKG_SOURCE_DATE)/
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/linkease-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE)
|
||||
|
||||
@@ -11,7 +11,7 @@ PKG_ARCH_LINKEASE:=$(ARCH)
|
||||
PKG_NAME:=linkeasefull
|
||||
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
||||
PKG_SOURCE_DATE:=3.0.17
|
||||
PKG_RELEASE:=24
|
||||
PKG_RELEASE:=25
|
||||
|
||||
ARCH_HEXCODE:=
|
||||
ifeq ($(ARCH),x86_64)
|
||||
@@ -24,7 +24,7 @@ LINKEASE_RUNTIME_ARCH:=arm64
|
||||
PKG_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_SOURCE_VERSION:=f5227a7df2160100b478dba7880891aed1663eb4
|
||||
PKG_SOURCE_VERSION:=82c1daae2ec9dbe7f1fdc1d3b1bc5c9e8342ecc1
|
||||
PKG_SOURCE:=linkease-runtime-$(PKG_SOURCE_DATE)-linux-$(LINKEASE_RUNTIME_ARCH).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/istoreos/istoreos-app-hub/releases/download/linkeasefull-runtime-v$(PKG_SOURCE_DATE)/
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/linkease-runtime-$(PKG_SOURCE_DATE)-linux-$(LINKEASE_RUNTIME_ARCH)
|
||||
|
||||
@@ -12,7 +12,7 @@ LUCI_DEPENDS:=+luci-base +logd +jsonfilter
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
PKG_VERSION:=0.1.37
|
||||
PKG_RELEASE:=5
|
||||
PKG_RELEASE:=6
|
||||
|
||||
# Reproducible build: honor SOURCE_DATE_EPOCH from the build environment (set by docker-sdk.sh / CI).
|
||||
ifdef SOURCE_DATE_EPOCH
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
* GENERATED — do not edit. Edit fwlive.css and run: node scripts/embed-fwlive-css.js
|
||||
*/
|
||||
return baseclass.extend({
|
||||
styleText: "\n.fwlive-map {\n\tmax-width: none;\n\twidth: 100%;\n\t--fwlive-pass-color: var(--success-color-high, var(--success-color, #46a546));\n\t--fwlive-deny-color: var(--error-color-high, var(--error-color, #ca3c3c));\n\t--fwlive-bg-medium: var(--background-color-medium, var(--white-color-low, #f9f9f9));\n\t--fwlive-paused-color: #b45309;\n}\n/* Wide page in Detail only — Simple keeps LuCI’s 940px column. */\n#maincontent.container:has(.fwlive-map[data-view=\"detailed\"]) {\n\tmax-width: none;\n\tpadding-left: 16px;\n\tpadding-right: 16px;\n}\n.fwlive-map[data-row-tint=\"accessible\"] {\n\t--fwlive-pass-color: #0d9488;\n\t--fwlive-deny-color: #c2410c;\n}\n.fwlive-map.fwlive-watch-paused .fwlive-title-row,\n.fwlive-map.fwlive-watch-paused .fwlive-watch-strip {\n\tbackground: rgba(180, 83, 9, 0.08);\n\tbackground: color-mix(in srgb, var(--fwlive-paused-color) 8%, transparent);\n}\n.fwlive-map.fwlive-watch-paused .fwlive-title-row {\n\tmargin: 0 -8px;\n\tpadding: 6px 8px 0;\n\tborder-radius: 3px 3px 0 0;\n}\n.fwlive-map.fwlive-watch-paused .fwlive-watch-strip {\n\tmargin: 0 -8px 10px;\n\tpadding: 8px;\n\tborder-radius: 0 0 3px 3px;\n\tborder-bottom-color: transparent;\n}\n.fwlive-title-row {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: baseline;\n\tjustify-content: space-between;\n\tgap: 8px 16px;\n\tmargin: 0 0 4px;\n}\n.fwlive-title-row h2 {\n\tmargin: 0;\n\tflex: 0 1 auto;\n}\n.fwlive-title-status {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\tflex-wrap: wrap;\n\tmin-width: 0;\n\tmargin-left: auto;\n}\n.fwlive-watch-strip {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: stretch;\n\tjustify-content: flex-start;\n\tgap: 0;\n\tmin-height: 40px;\n\tpadding: 8px 0 10px;\n\tborder-bottom: 1px solid var(--border-color-medium);\n\tmargin-bottom: 10px;\n}\n.fwlive-watch-group {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n\tmin-height: 28px;\n\tpadding: 0 10px;\n\tborder-left: 1px solid var(--border-color-medium);\n\tflex-wrap: wrap;\n}\n.fwlive-watch-group:last-child {\n\tpadding-right: 0;\n}\n.fwlive-watch-group-label {\n\tmargin-right: 2px;\n\tcolor: var(--text-color-medium);\n\tfont-size: 0.72em;\n\tfont-weight: 700;\n\tletter-spacing: 0.08em;\n\ttext-transform: uppercase;\n\twhite-space: nowrap;\n}\n.fwlive-watch-seg {\n\tdisplay: inline-flex;\n\talign-items: stretch;\n\tborder: 1px solid var(--border-color-medium);\n\tborder-radius: 3px;\n\toverflow: hidden;\n}\n.fwlive-watch-seg .fwlive-seg-btn {\n\tmargin: 0;\n\tborder: 0;\n\tborder-radius: 0;\n\tborder-right: 1px solid var(--border-color-medium);\n\tbackground: transparent;\n\tpadding: 4px 10px;\n\tfont-size: 0.88em;\n\tline-height: 1.25;\n\tmin-height: 28px;\n}\n.fwlive-watch-seg .fwlive-seg-btn:last-child {\n\tborder-right: 0;\n}\n.fwlive-watch-seg .fwlive-seg-btn[aria-pressed=\"true\"] {\n\tbackground: rgba(26, 111, 156, 0.12);\n\tbackground: color-mix(in srgb, var(--primary-color-high) 12%, transparent);\n\tcolor: var(--primary-color-high);\n\tfont-weight: 600;\n}\n.fwlive-watch-label { font-weight: 600; }\n.fwlive-watch-paused .fwlive-watch-label { color: var(--fwlive-paused-color); }\n.fwlive-map.fwlive-watch-paused .fwlive-title-status .fwlive-watch-label { color: var(--fwlive-paused-color); }\n.fwlive-dot {\n\twidth: 8px;\n\theight: 8px;\n\tborder-radius: 50%;\n\tbackground: var(--text-color-low, var(--border-color-high));\n\tdisplay: inline-block;\n\tflex-shrink: 0;\n}\n.fwlive-dot.fwlive-dot-on {\n\tbackground: var(--fwlive-pass-color);\n\tbox-shadow: 0 0 0 3px color-mix(in srgb, var(--fwlive-pass-color) 22%, transparent);\n}\n.fwlive-btn-ghost {\n\tbackground: transparent;\n\tborder-color: var(--border-color-medium);\n}\n.fwlive-btn-quiet {\n\tbackground: transparent;\n\tborder-color: var(--border-color-medium);\n\tcolor: var(--text-color-medium);\n\tfont-weight: 500;\n}\n.fwlive-log-merged {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tpadding: 4px 10px;\n\tborder: 1px solid var(--border-color-medium);\n\tborder-radius: 3px;\n\tbackground: var(--background-color-medium, var(--white-color-low, var(--background-color-high)));\n\tcolor: var(--text-color-high);\n\tfont-weight: 500;\n\tfont-size: 0.88em;\n\tline-height: 1.25;\n\tmin-height: 28px;\n\tcursor: pointer;\n}\n.fwlive-log-merged:hover {\n\tbackground: var(--background-color-low, var(--background-color-medium));\n}\n.fwlive-log-merged:disabled {\n\topacity: 0.65;\n\tcursor: default;\n}\n.fwlive-log-on-dot {\n\twidth: 6px;\n\theight: 6px;\n\tborder-radius: 50%;\n\tbackground: var(--fwlive-pass-color);\n\tflex-shrink: 0;\n}\n.fwlive-log-rate {\n\tcolor: var(--text-color-medium);\n\tfont-weight: 400;\n}\n.fwlive-display-bar {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 8px 14px;\n\tmargin: 0 0 12px;\n\tpadding: 8px 12px;\n\tborder: 1px solid var(--border-color-medium);\n\tborder-radius: 3px;\n\tbackground: var(--background-color-high);\n}\n.fwlive-display-bar-label {\n\tflex: 0 0 auto;\n\tfoLine truncated
|
||||
styleText: "\n.fwlive-map {\n\tmax-width: none;\n\twidth: 100%;\n\t--fwlive-pass-color: var(--success-color-high, var(--success-color, #46a546));\n\t--fwlive-deny-color: var(--error-color-high, var(--error-color, #ca3c3c));\n\t--fwlive-bg-medium: var(--background-color-medium, var(--white-color-low, #f9f9f9));\n\t--fwlive-paused-color: #b45309;\n}\n/* Wide page in Detail only — Simple keeps LuCI’s 940px column. */\n#maincontent.container:has(.fwlive-map[data-view=\"detailed\"]) {\n\tmax-width: none;\n\tpadding-left: 16px;\n\tpadding-right: 16px;\n}\n.fwlive-map[data-row-tint=\"accessible\"] {\n\t--fwlive-pass-color: #0d9488;\n\t--fwlive-deny-color: #c2410c;\n}\n.fwlive-map.fwlive-watch-paused .fwlive-title-row,\n.fwlive-map.fwlive-watch-paused .fwlive-watch-strip {\n\tbackground: rgba(180, 83, 9, 0.08);\n\tbackground: color-mix(in srgb, var(--fwlive-paused-color) 8%, transparent);\n}\n.fwlive-map.fwlive-watch-paused .fwlive-title-row {\n\tmargin: 0 -8px;\n\tpadding: 6px 8px 0;\n\tborder-radius: 3px 3px 0 0;\n}\n.fwlive-map.fwlive-watch-paused .fwlive-watch-strip {\n\tmargin: 0 -8px 10px;\n\tpadding: 8px;\n\tborder-radius: 0 0 3px 3px;\n\tborder-bottom-color: transparent;\n}\n.fwlive-title-row {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: baseline;\n\tjustify-content: space-between;\n\tgap: 8px 16px;\n\tmargin: 0 0 4px;\n}\n.fwlive-title-row h2 {\n\tmargin: 0;\n\tflex: 0 1 auto;\n}\n.fwlive-title-status {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\tflex-wrap: wrap;\n\tmin-width: 0;\n\tmargin-left: auto;\n}\n.fwlive-watch-strip {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: stretch;\n\tjustify-content: flex-start;\n\tgap: 0;\n\tmin-height: 40px;\n\tpadding: 8px 0 10px;\n\tborder-bottom: 1px solid var(--border-color-medium);\n\tmargin-bottom: 10px;\n}\n.fwlive-watch-group {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n\tmin-height: 28px;\n\tpadding: 0 10px;\n\tborder-left: 1px solid var(--border-color-medium);\n\tflex-wrap: wrap;\n}\n.fwlive-watch-group:last-child {\n\tpadding-right: 0;\n}\n.fwlive-watch-group-label {\n\tmargin-right: 2px;\n\tcolor: var(--text-color-medium);\n\tfont-size: 0.72em;\n\tfont-weight: 700;\n\tletter-spacing: 0.08em;\n\ttext-transform: uppercase;\n\twhite-space: nowrap;\n}\n.fwlive-watch-seg {\n\tdisplay: inline-flex;\n\talign-items: stretch;\n\tborder: 1px solid var(--border-color-medium);\n\tborder-radius: 3px;\n\toverflow: hidden;\n}\n.fwlive-watch-seg .fwlive-seg-btn {\n\tmargin: 0;\n\tborder: 0;\n\tborder-radius: 0;\n\tborder-right: 1px solid var(--border-color-medium);\n\tbackground: transparent;\n\tpadding: 4px 10px;\n\tfont-size: 0.88em;\n\tline-height: 1.25;\n\tmin-height: 28px;\n}\n.fwlive-watch-seg .fwlive-seg-btn:last-child {\n\tborder-right: 0;\n}\n.fwlive-watch-seg .fwlive-seg-btn[aria-pressed=\"true\"] {\n\tbackground: rgba(26, 111, 156, 0.12);\n\tbackground: color-mix(in srgb, var(--primary-color-high) 12%, transparent);\n\tcolor: var(--primary-color-high);\n\tfont-weight: 600;\n}\n.fwlive-watch-label { font-weight: 600; }\n.fwlive-watch-paused .fwlive-watch-label { color: var(--fwlive-paused-color); }\n.fwlive-map.fwlive-watch-paused .fwlive-title-status .fwlive-watch-label { color: var(--fwlive-paused-color); }\n.fwlive-dot {\n\twidth: 8px;\n\theight: 8px;\n\tborder-radius: 50%;\n\tbackground: var(--text-color-low, var(--border-color-high));\n\tdisplay: inline-block;\n\tflex-shrink: 0;\n}\n.fwlive-dot.fwlive-dot-on {\n\tbackground: var(--fwlive-pass-color);\n\tbox-shadow: 0 0 0 3px color-mix(in srgb, var(--fwlive-pass-color) 22%, transparent);\n}\n.fwlive-btn-ghost {\n\tbackground: transparent;\n\tborder-color: var(--border-color-medium);\n}\n.fwlive-btn-quiet {\n\tbackground: transparent;\n\tborder-color: var(--border-color-medium);\n\tcolor: var(--text-color-medium);\n\tfont-weight: 500;\n}\n.fwlive-log-merged {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tpadding: 4px 10px;\n\tborder: 1px solid var(--border-color-medium);\n\tborder-radius: 3px;\n\tbackground: var(--background-color-medium, var(--white-color-low, var(--background-color-high)));\n\tcolor: var(--text-color-high);\n\tfont-weight: 500;\n\tfont-size: 0.88em;\n\tline-height: 1.25;\n\tmin-height: 28px;\n\tcursor: pointer;\n}\n.fwlive-log-merged:hover {\n\tbackground: var(--background-color-low, var(--background-color-medium));\n}\n.fwlive-log-merged:disabled {\n\topacity: 0.65;\n\tcursor: default;\n}\n.fwlive-log-on-dot {\n\twidth: 6px;\n\theight: 6px;\n\tborder-radius: 50%;\n\tbackground: var(--fwlive-pass-color);\n\tflex-shrink: 0;\n}\n.fwlive-log-rate {\n\tcolor: var(--text-color-medium);\n\tfont-weight: 400;\n}\n.fwlive-display-bar {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 8px 14px;\n\tmargin: 0 0 12px;\n\tpadding: 8px 12px;\n\tborder: 1px solid var(--border-color-medium);\n\tborder-radius: 3px;\n\tbackground: var(--background-color-high);\n}\n.fwlive-display-bar-label {\n\tflex: 0 0 auto;\n\tfoLine truncated
|
||||
});
|
||||
@@ -717,6 +717,10 @@
|
||||
margin-left: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.fwlive-backend.fwlive-backend-warn {
|
||||
color: var(--warn-color-high);
|
||||
font-weight: 600;
|
||||
}
|
||||
.fwlive-filter-panel { margin-bottom: 12px; }
|
||||
.fwlive-map[data-view="simple"] .fwlive-grid-core {
|
||||
display: grid;
|
||||
|
||||
@@ -47,7 +47,8 @@ const callFwliveLoggingStatus = rpc.declare({
|
||||
nf_log_ipv4: false,
|
||||
nf_log_ipv6: false,
|
||||
ready: false,
|
||||
blockers: []
|
||||
blockers: [],
|
||||
warnings: []
|
||||
} }
|
||||
});
|
||||
|
||||
@@ -521,6 +522,7 @@ return view.extend({
|
||||
const label = document.getElementById('fwlive-backend');
|
||||
if (label) {
|
||||
let text = this.backendDisplayLabel();
|
||||
let degraded = false;
|
||||
if (this.lastRulesError) {
|
||||
let err = '';
|
||||
if (this.lastRulesError === 'rules_truncated')
|
||||
@@ -530,13 +532,16 @@ return view.extend({
|
||||
else
|
||||
err = _('Rule labels unavailable');
|
||||
text = text ? text + ' \u00b7 ' + err : err;
|
||||
degraded = true;
|
||||
}
|
||||
const warnings = (this.loggingStatus && this.loggingStatus.warnings) || [];
|
||||
if (warnings.indexOf('timeout_missing') >= 0) {
|
||||
const warn = _('Limited diagnostics — timeout command missing');
|
||||
text = text ? text + ' \u00b7 ' + warn : warn;
|
||||
degraded = true;
|
||||
}
|
||||
label.textContent = text;
|
||||
label.classList.toggle('fwlive-backend-warn', degraded);
|
||||
}
|
||||
|
||||
this.updateEmptyStateUi();
|
||||
@@ -1296,17 +1301,11 @@ return view.extend({
|
||||
const scroll = document.getElementById('fwlive-scroll');
|
||||
const wrapBtn = document.getElementById('fwlive-msg-wrap');
|
||||
const onelineBtn = document.getElementById('fwlive-msg-oneline');
|
||||
if (scroll) {
|
||||
/* add/remove — classList.toggle(name, force) is unsupported on some 21.02-era browsers */
|
||||
if (this.messageLayout === 'oneline') {
|
||||
scroll.classList.add('fwlive-msg-oneline');
|
||||
scroll.classList.remove('fwlive-msg-wrap');
|
||||
} else {
|
||||
scroll.classList.add('fwlive-msg-wrap');
|
||||
scroll.classList.remove('fwlive-msg-oneline');
|
||||
}
|
||||
}
|
||||
const oneline = this.messageLayout === 'oneline';
|
||||
if (scroll) {
|
||||
scroll.classList.toggle('fwlive-msg-oneline', oneline);
|
||||
scroll.classList.toggle('fwlive-msg-wrap', !oneline);
|
||||
}
|
||||
if (wrapBtn)
|
||||
wrapBtn.setAttribute('aria-pressed', oneline ? 'false' : 'true');
|
||||
if (onelineBtn)
|
||||
|
||||
@@ -1,652 +1,652 @@
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:926
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:926
|
||||
msgid "%d matching · %d/%d stored"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:929
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:929
|
||||
msgid "0 matching · %d/%d stored"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:251
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:251
|
||||
msgid "Accessible (teal/orange)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:32
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:32
|
||||
msgid "Action"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:618
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:618
|
||||
msgid "Administrator access is required to disable logging."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:586
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:586
|
||||
msgid "Administrator access is required to enable logging."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1092
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1092
|
||||
msgid "Also seen"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:571
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:607
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:571
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:607
|
||||
msgid "Another change is staged for the firewall; apply or revert it first."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1658
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1658
|
||||
msgid "Any action"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1085
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1085
|
||||
msgid "Any protocol"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:113
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:113
|
||||
msgid "Before you enable logging"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:569
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:569
|
||||
msgid "Cannot enable logging until kernel log modules are installed."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:116
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:116
|
||||
msgid "Changes:"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:250
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:250
|
||||
msgid "Classic (green/red)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1642
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1642
|
||||
msgid "Classic uses green/red; Accessible uses teal/orange"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:116
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:116
|
||||
msgid "Clear all"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1698
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1698
|
||||
msgid ""
|
||||
"Click a cell to filter · ≠ on a chip to exclude · Ctrl+click a rule for "
|
||||
"firewall settings · in Simple view, click a row for the full message"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1719
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1719
|
||||
msgid ""
|
||||
"Click a row (Time or other non-link cells) to see the full log line (Simple "
|
||||
"view)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:113
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:113
|
||||
msgid "Click a row for the full message"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1720
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1720
|
||||
msgid ""
|
||||
"Click an IP, action, or protocol to filter; use the Protocol menu (or ≠ on a "
|
||||
"chip) to exclude."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1086
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1086
|
||||
msgid "Common"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:944
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:944
|
||||
msgid "Connection lost — retrying…"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:609
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:609
|
||||
msgid "Could not disable logging."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:573
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:573
|
||||
msgid "Could not enable logging."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1680
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1680
|
||||
msgid "Custom protocol (prefix ! to exclude). Overrides the menu when set."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:42
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:42
|
||||
msgid "DPort"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:40
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:40
|
||||
msgid "Destination"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1691
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1691
|
||||
msgid "Destination IP contains (! to exclude)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1692
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1692
|
||||
msgid "Destination port (! to exclude)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1583
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1583
|
||||
msgid "Detail"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:37
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:37
|
||||
msgid "Dir"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:85
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:85
|
||||
msgid "Disabling…"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1616
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1616
|
||||
msgid "Display options"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1716
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1716
|
||||
msgid "Display options on the bar set Limit, row tint, palette, and hostnames."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:121
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:121
|
||||
msgid "Does not change:"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:138
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:138
|
||||
msgid "Don’t show this again"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:150
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:230
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:150
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:230
|
||||
msgid "Enable WAN drop/reject logging"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:104
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:104
|
||||
msgid "Enable WAN zone drop/reject logging (same as Network → Firewall)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:107
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:107
|
||||
msgid "Enable logging"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1715
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1715
|
||||
msgid ""
|
||||
"Enable logging turns on WAN zone drop/reject logging only (same as Network → "
|
||||
"Firewall). It does not add rules or log normal LAN browsing."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:107
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:150
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:230
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:107
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:150
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:230
|
||||
msgid "Enabling…"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1099
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1099
|
||||
msgid "Exclude"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:80
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:80
|
||||
msgid "Exclude instead"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/links.js:53
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/links.js:71
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/links.js:53
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/links.js:71
|
||||
msgid "Filter by %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/links.js:136
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/links.js:136
|
||||
msgid "Filter by interface"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/links.js:112
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/links.js:112
|
||||
msgid "Filter logs by rule (hint: %s). Ctrl+click to open firewall settings."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1540
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/root/usr/share/luci/menu.d/luci-app-fwlive.json:3
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1540
|
||||
#: openwrt-feed/luci-app-fwlive/root/usr/share/luci/menu.d/luci-app-fwlive.json:3
|
||||
msgid "Firewall Live View"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:43
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:43
|
||||
msgid "Flags"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:45
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:45
|
||||
msgid "Flow"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/root/usr/share/rpcd/acl.d/luci-app-fwlive.json:3
|
||||
#: openwrt-feed/luci-app-fwlive/root/usr/share/rpcd/acl.d/luci-app-fwlive.json:3
|
||||
msgid "Grant access to firewall live log view"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1712
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1712
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:895
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:895
|
||||
msgid ""
|
||||
"High event rate — table refresh is throttled to protect the browser. The "
|
||||
"buffer still updates; refresh will resume automatically."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1090
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1090
|
||||
msgid "ICMPv6"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:35
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:35
|
||||
msgid "IN"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1723
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1723
|
||||
msgid ""
|
||||
"If Row tint looks missing, the active LuCI theme may omit success/error or "
|
||||
"info/warn CSS variables; fwlive falls back to local colors (air-gapped, no "
|
||||
"data leaves the device)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:205
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:205
|
||||
msgid ""
|
||||
"If the WAN is quiet, wait for probes or use the optional ping check in "
|
||||
"Help / the enabling-logs guide."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:80
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:80
|
||||
msgid "Include instead"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:34
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:34
|
||||
msgid "Interface"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1688
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1688
|
||||
msgid "Interface (prefix ! to exclude)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:165
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:232
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:165
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:232
|
||||
msgid "I’ll configure this under Network → Firewall"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:194
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:194
|
||||
msgid "Kernel log modules missing"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:195
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:195
|
||||
msgid ""
|
||||
"Kernel netfilter log modules are missing. Install kmod-nf-log-ipv4 and kmod-"
|
||||
"nf-log-ipv6 (or kmod-nf-log / kmod-nf-log6), then reload the firewall."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:44
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:44
|
||||
msgid "Len"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1619
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1619
|
||||
msgid "Limit"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:536
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:536
|
||||
msgid "Limited diagnostics — timeout command missing"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:210
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:210
|
||||
msgid "Logging is off on this router"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:252
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:256
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:252
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:256
|
||||
msgid "Manual test (System → Terminal):"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:46
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:221
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1590
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1595
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:46
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:221
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1590
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1595
|
||||
msgid "Message"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1686
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1686
|
||||
msgid "More filters"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/links.js:37
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/links.js:37
|
||||
msgid "Network → Firewall"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:187
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:187
|
||||
msgid ""
|
||||
"No WAN firewall zone found in /etc/config/firewall. Configure zones under"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:185
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:185
|
||||
msgid "No WAN zone found"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:163
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:163
|
||||
msgid "Not now"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:220
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:220
|
||||
msgid "Nothing changes until you click Enable."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:36
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:36
|
||||
msgid "OUT"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1610
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1610
|
||||
msgid "One line"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:206
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:206
|
||||
msgid "Open firewall zone settings"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:211
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:211
|
||||
msgid ""
|
||||
"OpenWrt does not write firewall events to the log until you turn logging on. "
|
||||
"Live View only shows what the firewall already logs — it does not add allow/"
|
||||
"deny rules."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1638
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1638
|
||||
msgid "Palette"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:995
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1560
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:995
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1560
|
||||
msgid "Pause"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:993
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:993
|
||||
msgid "Paused"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:38
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:38
|
||||
msgid "Proto"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1674
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1674
|
||||
msgid "Protocol — common values"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1656
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1656
|
||||
msgid "Quick search"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:91
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:91
|
||||
msgid "Remove filter"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:995
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:995
|
||||
msgid "Resume"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1631
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1631
|
||||
msgid "Row tint"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1721
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1721
|
||||
msgid ""
|
||||
"Row tint shows pass/deny row backgrounds when checked. Choose Classic (green/"
|
||||
"red, default) or Accessible (teal/orange). Action text stays colored either "
|
||||
"way."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1550
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1550
|
||||
msgid ""
|
||||
"Row tint used a local color fallback because the active LuCI theme did not "
|
||||
"apply pass/deny backgrounds."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:33
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:33
|
||||
msgid "Rule"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:527
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:527
|
||||
msgid "Rule labels incomplete — map truncated"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:531
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:531
|
||||
msgid "Rule labels unavailable"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:529
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:529
|
||||
msgid "Rule labels unavailable — temp file failed"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:41
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:41
|
||||
msgid "SPort"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1650
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1650
|
||||
msgid "Show hostnames"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1629
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1629
|
||||
msgid "Show pass/deny row background colors"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1576
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1576
|
||||
msgid "Simple"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:39
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:39
|
||||
msgid "Source"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1689
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1689
|
||||
msgid "Source IP contains (! to exclude)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1690
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1690
|
||||
msgid "Source port (! to exclude)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1717
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1717
|
||||
msgid ""
|
||||
"The rate shown for WAN logging is the firewall zone log_limit. OpenWrt "
|
||||
"defaults to 10/minute when no explicit limit is configured; fwlive does not "
|
||||
"impose this cap."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1714
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1714
|
||||
msgid ""
|
||||
"The table updates automatically when your firewall logs traffic. Use Pause "
|
||||
"if it moves too fast."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1551
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1551
|
||||
msgid "Theme tint fallback"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:31
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/table.js:31
|
||||
msgid "Time"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:219
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:219
|
||||
msgid ""
|
||||
"Turns on WAN zone drop/reject logging (same as Network → Firewall → wan → "
|
||||
"Log). Rate-limited by the zone log_limit (OpenWrt default 10/minute). Normal "
|
||||
"LAN browsing is not logged."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:126
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:126
|
||||
msgid "Undo:"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1722
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1722
|
||||
msgid "Use Detail for all columns (flags, length, raw message)."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1564
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1568
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1564
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1568
|
||||
msgid "View"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:615
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:615
|
||||
msgid "WAN drop/reject logging is off."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:204
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:204
|
||||
msgid ""
|
||||
"WAN drop/reject logging is on. Blocked inbound WAN traffic will show up "
|
||||
"here. Normal LAN browsing will not."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:579
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:579
|
||||
msgid ""
|
||||
"WAN drop/reject logging is on. Blocked inbound traffic should appear here as "
|
||||
"it happens — not normal LAN browsing."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:581
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:581
|
||||
msgid "WAN logging is already enabled."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:88
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:88
|
||||
msgid "WAN logging on"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:94
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:94
|
||||
msgid "WAN logging on (%s). Click to disable."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:77
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:77
|
||||
msgid "WAN logging unavailable: missing kernel log modules"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:70
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:70
|
||||
msgid "WAN logging unavailable: no WAN zone"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:203
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:203
|
||||
msgid "Waiting for firewall events"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:993
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1545
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:993
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1545
|
||||
msgid "Watching"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1603
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1603
|
||||
msgid "Wrap"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:123
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:123
|
||||
msgid "allow/deny rules, LAN logging, or anything else."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:828
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:828
|
||||
msgid "buffer full"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:81
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:81
|
||||
msgid "default 10/minute"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:28
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:28
|
||||
msgid "is"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:823
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:823
|
||||
msgid "loading buffer"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:923
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:923
|
||||
msgid "loading…"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:37
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:44
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:37
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/chips.js:44
|
||||
msgid "not"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1107
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1107
|
||||
msgid "not AH"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1106
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1106
|
||||
msgid "not ESP"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1105
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1105
|
||||
msgid "not GRE"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1102
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1102
|
||||
msgid "not ICMP"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1103
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1103
|
||||
msgid "not ICMPv6"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1104
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1104
|
||||
msgid "not IGMP"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1108
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1108
|
||||
msgid "not SCTP"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1100
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1100
|
||||
msgid "not TCP"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1101
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1101
|
||||
msgid "not UDP"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1666
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1666
|
||||
msgid "not block"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1665
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1665
|
||||
msgid "not drop"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1664
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1664
|
||||
msgid "not pass"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1667
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1667
|
||||
msgid "not reject"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1668
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1668
|
||||
msgid "not unknown"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1679
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:1679
|
||||
msgid "or type…"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:830
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:830
|
||||
msgid "render paused (high rate)"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:832
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:832
|
||||
msgid "scroll frozen — scroll to top to follow live"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:118
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:118
|
||||
msgid "sets log on the WAN firewall zone and reloads the firewall."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:254
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:258
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:254
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:258
|
||||
msgid "then ping the router."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:128
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:128
|
||||
msgid "turn it back off with the WAN logging on control on the watch strip."
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:512
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:512
|
||||
msgid "using fw4"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:510
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:510
|
||||
msgid "using iptables"
|
||||
msgstr ""
|
||||
|
||||
#: /home/lalbers/gitroot/fwlive/openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:89
|
||||
#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/fwlive/logging.js:89
|
||||
msgid "· %s"
|
||||
msgstr ""
|
||||
@@ -1,40 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-proto-wwan
|
||||
PKG_VERSION:=20151207
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
PKG_BUILD_DEPENDS:=luci-base
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/luci-proto-wwan
|
||||
CATEGORY:=LuCI
|
||||
SUBMENU:=5. Protocols
|
||||
TITLE:=Support for WWAN/QMI/NCM
|
||||
MAINTAINER:=Cezary Jackiewicz <cezary@eko.one.pl>
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/luci-proto-wwan/install
|
||||
$(CP) ./files/* $(1)
|
||||
$(FIND) $(1) -type f -name '*.lua' | while read src; do \
|
||||
if $(STAGING_DIR_HOST)/bin/lua $(STAGING_DIR_HOST)/bin/LuaSrcDiet \
|
||||
--noopt-binequiv -o "$$$$src.o" "$$$$src"; \
|
||||
then mv "$$$$src.o" "$$$$src"; fi; \
|
||||
done
|
||||
endef
|
||||
|
||||
define Package/luci-proto-wwan/postinst
|
||||
#!/bin/sh
|
||||
[ -n "$${IPKG_INSTROOT}" ] || {
|
||||
rm -f /var/luci-indexcache
|
||||
}
|
||||
exit 0
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,luci-proto-wwan))
|
||||
@@ -1,78 +0,0 @@
|
||||
--[[
|
||||
LuCI - Lua Configuration Interface
|
||||
|
||||
Copyright 2015 Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
]]--
|
||||
|
||||
local map, section, net = ...
|
||||
|
||||
local device, apn, service, pincode, username, password
|
||||
local ipv6, metric, dns
|
||||
|
||||
|
||||
device = section:taboption("general", Value, "device", translate("Modem device"))
|
||||
device.rmempty = false
|
||||
|
||||
local device_suggestions = nixio.fs.glob("/dev/ttyUSB*")
|
||||
or nixio.fs.glob("/dev/cdc-wdm*")
|
||||
|
||||
if device_suggestions then
|
||||
local node
|
||||
for node in device_suggestions do
|
||||
device:value(node)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
mode = section:taboption("general", Value, "mode", translate("Service Type"))
|
||||
mode.default = "auto"
|
||||
mode:value("preferlte", translate("Prefer LTE"))
|
||||
mode:value("preferumts", translate("Prefer UMTS"))
|
||||
mode:value("lte", "LTE")
|
||||
mode:value("umts", "UMTS/GPRS")
|
||||
mode:value("gsm", translate("GPRS only"))
|
||||
mode:value("auto", translate("auto"))
|
||||
|
||||
|
||||
apn = section:taboption("general", Value, "apn", translate("APN"))
|
||||
|
||||
|
||||
pincode = section:taboption("general", Value, "pincode", translate("PIN"))
|
||||
|
||||
|
||||
username = section:taboption("general", Value, "username", translate("PAP/CHAP username"))
|
||||
|
||||
|
||||
password = section:taboption("general", Value, "password", translate("PAP/CHAP password"))
|
||||
password.password = true
|
||||
|
||||
|
||||
if luci.model.network:has_ipv6() then
|
||||
|
||||
ipv6 = section:taboption("advanced", Flag, "ipv6",
|
||||
translate("Enable IPv6 negotiation on the PPP link"))
|
||||
|
||||
ipv6.default = ipv6.disabled
|
||||
ipv6.rmempty = false
|
||||
|
||||
end
|
||||
|
||||
|
||||
metric = section:taboption("advanced", Value, "metric",
|
||||
translate("Use gateway metric"))
|
||||
|
||||
metric.placeholder = "0"
|
||||
metric.datatype = "uinteger"
|
||||
|
||||
|
||||
dns = section:taboption("advanced", DynamicList, "dns",
|
||||
translate("Use custom DNS servers"))
|
||||
|
||||
dns.datatype = "ipaddr"
|
||||
dns.cast = "string"
|
||||
@@ -1,77 +0,0 @@
|
||||
--[[
|
||||
LuCI - Lua Configuration Interface
|
||||
|
||||
Copyright 2015 Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
]]--
|
||||
|
||||
local map, section, net = ...
|
||||
|
||||
local device, apn, service, pincode, username, password
|
||||
local ipv6, metric, dns
|
||||
|
||||
|
||||
device = section:taboption("general", Value, "device", translate("Modem device"))
|
||||
device.rmempty = false
|
||||
|
||||
local device_suggestions = nixio.fs.glob("/dev/cdc-wdm*")
|
||||
|
||||
if device_suggestions then
|
||||
local node
|
||||
for node in device_suggestions do
|
||||
device:value(node)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
mode = section:taboption("general", Value, "mode", translate("Service Type"))
|
||||
mode.default = "all"
|
||||
mode:value("all", translate("all"))
|
||||
mode:value("lte", "LTE")
|
||||
mode:value("umts", "UMTS/GPRS")
|
||||
mode:value("gsm", translate("GPRS only"))
|
||||
mode:value("cdma", "CDMA")
|
||||
mode:value("td-scdma", "TD-SCDMA")
|
||||
|
||||
|
||||
apn = section:taboption("general", Value, "apn", translate("APN"))
|
||||
|
||||
|
||||
pincode = section:taboption("general", Value, "pincode", translate("PIN"))
|
||||
|
||||
|
||||
username = section:taboption("general", Value, "username", translate("PAP/CHAP username"))
|
||||
|
||||
|
||||
password = section:taboption("general", Value, "password", translate("PAP/CHAP password"))
|
||||
password.password = true
|
||||
|
||||
|
||||
if luci.model.network:has_ipv6() then
|
||||
|
||||
ipv6 = section:taboption("advanced", Flag, "ipv6",
|
||||
translate("Enable IPv6 negotiation on the PPP link"))
|
||||
|
||||
ipv6.default = ipv6.disabled
|
||||
ipv6.rmempty = false
|
||||
|
||||
end
|
||||
|
||||
|
||||
metric = section:taboption("advanced", Value, "metric",
|
||||
translate("Use gateway metric"))
|
||||
|
||||
metric.placeholder = "0"
|
||||
metric.datatype = "uinteger"
|
||||
|
||||
|
||||
dns = section:taboption("advanced", DynamicList, "dns",
|
||||
translate("Use custom DNS servers"))
|
||||
|
||||
dns.datatype = "ipaddr"
|
||||
dns.cast = "string"
|
||||
@@ -1,131 +0,0 @@
|
||||
--[[
|
||||
LuCI - Lua Configuration Interface
|
||||
|
||||
Copyright 2015 Aleksandr Kolesnik <neryba@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
]]--
|
||||
|
||||
local map, section, net = ...
|
||||
|
||||
local apn, service, pincode, username, password
|
||||
local ipv6, maxwait, defaultroute, metric, peerdns, dns,
|
||||
keepalive_failure, keepalive_interval, demand
|
||||
|
||||
apn = section:taboption("general", Value, "apn", translate("APN"))
|
||||
|
||||
|
||||
pincode = section:taboption("general", Value, "pincode", translate("PIN"))
|
||||
|
||||
|
||||
username = section:taboption("general", Value, "username", translate("PAP/CHAP username"))
|
||||
|
||||
|
||||
password = section:taboption("general", Value, "password", translate("PAP/CHAP password"))
|
||||
password.password = true
|
||||
|
||||
|
||||
if luci.model.network:has_ipv6() then
|
||||
|
||||
ipv6 = section:taboption("advanced", Flag, "ipv6",
|
||||
translate("Enable IPv6 negotiation on the PPP link"))
|
||||
|
||||
ipv6.default = ipv6.disabled
|
||||
ipv6.rmempty = false
|
||||
|
||||
end
|
||||
|
||||
|
||||
maxwait = section:taboption("advanced", Value, "maxwait",
|
||||
translate("Modem init timeout"),
|
||||
translate("Maximum amount of seconds to wait for the modem to become ready"))
|
||||
|
||||
maxwait.placeholder = "20"
|
||||
maxwait.datatype = "min(1)"
|
||||
|
||||
|
||||
defaultroute = section:taboption("advanced", Flag, "defaultroute",
|
||||
translate("Use default gateway"),
|
||||
translate("If unchecked, no default route is configured"))
|
||||
|
||||
defaultroute.default = defaultroute.enabled
|
||||
|
||||
|
||||
metric = section:taboption("advanced", Value, "metric",
|
||||
translate("Use gateway metric"))
|
||||
|
||||
metric.placeholder = "0"
|
||||
metric.datatype = "uinteger"
|
||||
metric:depends("defaultroute", defaultroute.enabled)
|
||||
|
||||
|
||||
peerdns = section:taboption("advanced", Flag, "peerdns",
|
||||
translate("Use DNS servers advertised by peer"),
|
||||
translate("If unchecked, the advertised DNS server addresses are ignored"))
|
||||
|
||||
peerdns.default = peerdns.enabled
|
||||
|
||||
|
||||
dns = section:taboption("advanced", DynamicList, "dns",
|
||||
translate("Use custom DNS servers"))
|
||||
|
||||
dns:depends("peerdns", "")
|
||||
dns.datatype = "ipaddr"
|
||||
dns.cast = "string"
|
||||
|
||||
|
||||
keepalive_failure = section:taboption("advanced", Value, "_keepalive_failure",
|
||||
translate("LCP echo failure threshold"),
|
||||
translate("Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures"))
|
||||
|
||||
function keepalive_failure.cfgvalue(self, section)
|
||||
local v = m:get(section, "keepalive")
|
||||
if v and #v > 0 then
|
||||
return tonumber(v:match("^(%d+)[ ,]+%d+") or v)
|
||||
end
|
||||
end
|
||||
|
||||
function keepalive_failure.write() end
|
||||
function keepalive_failure.remove() end
|
||||
|
||||
keepalive_failure.placeholder = "0"
|
||||
keepalive_failure.datatype = "uinteger"
|
||||
|
||||
|
||||
keepalive_interval = section:taboption("advanced", Value, "_keepalive_interval",
|
||||
translate("LCP echo interval"),
|
||||
translate("Send LCP echo requests at the given interval in seconds, only effective in conjunction with failure threshold"))
|
||||
|
||||
function keepalive_interval.cfgvalue(self, section)
|
||||
local v = m:get(section, "keepalive")
|
||||
if v and #v > 0 then
|
||||
return tonumber(v:match("^%d+[ ,]+(%d+)"))
|
||||
end
|
||||
end
|
||||
|
||||
function keepalive_interval.write(self, section, value)
|
||||
local f = tonumber(keepalive_failure:formvalue(section)) or 0
|
||||
local i = tonumber(value) or 5
|
||||
if i < 1 then i = 1 end
|
||||
if f > 0 then
|
||||
m:set(section, "keepalive", "%d %d" %{ f, i })
|
||||
else
|
||||
m:del(section, "keepalive")
|
||||
end
|
||||
end
|
||||
|
||||
keepalive_interval.remove = keepalive_interval.write
|
||||
keepalive_interval.placeholder = "5"
|
||||
keepalive_interval.datatype = "min(1)"
|
||||
|
||||
|
||||
demand = section:taboption("advanced", Value, "demand",
|
||||
translate("Inactivity timeout"),
|
||||
translate("Close inactive connection after the given amount of seconds, use 0 to persist connection"))
|
||||
|
||||
demand.placeholder = "0"
|
||||
demand.datatype = "uinteger"
|
||||
@@ -1,61 +0,0 @@
|
||||
--[[
|
||||
LuCI - Network model - NCM protocol extension
|
||||
|
||||
Copyright 2015 Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
]]--
|
||||
|
||||
local netmod = luci.model.network
|
||||
|
||||
local proto = netmod:register_protocol("ncm")
|
||||
local interface = luci.model.network.interface
|
||||
|
||||
function proto.get_i18n(self)
|
||||
return luci.i18n.translate("NCM")
|
||||
end
|
||||
|
||||
function proto.opkg_package(self)
|
||||
return "comgt-ncm"
|
||||
end
|
||||
|
||||
function proto.is_installed(self)
|
||||
return nixio.fs.access("/lib/netifd/proto/ncm.sh")
|
||||
end
|
||||
|
||||
function proto.is_floating(self)
|
||||
return true
|
||||
end
|
||||
|
||||
function proto.is_virtual(self)
|
||||
return true
|
||||
end
|
||||
|
||||
function proto.get_interface(self)
|
||||
local _ifname=netmod.protocol.ifname(self)
|
||||
if not _ifname then
|
||||
_ifname = "wan"
|
||||
end
|
||||
return interface(_ifname, self)
|
||||
end
|
||||
|
||||
function proto.get_interfaces(self)
|
||||
return nil
|
||||
end
|
||||
|
||||
function proto.contains_interface(self, ifc)
|
||||
return (netmod:ifnameof(ifc) == self:ifname())
|
||||
end
|
||||
|
||||
netmod:register_pattern_virtual("^ncm-%%w")
|
||||
@@ -1,61 +0,0 @@
|
||||
--[[
|
||||
LuCI - Network model - QMI protocol extension
|
||||
|
||||
Copyright 2015 Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
]]--
|
||||
|
||||
local netmod = luci.model.network
|
||||
|
||||
local proto = netmod:register_protocol("qmi")
|
||||
local interface = luci.model.network.interface
|
||||
|
||||
function proto.get_i18n(self)
|
||||
return luci.i18n.translate("QMI")
|
||||
end
|
||||
|
||||
function proto.opkg_package(self)
|
||||
return "uqmi"
|
||||
end
|
||||
|
||||
function proto.is_installed(self)
|
||||
return nixio.fs.access("/lib/netifd/proto/qmi.sh")
|
||||
end
|
||||
|
||||
function proto.is_floating(self)
|
||||
return true
|
||||
end
|
||||
|
||||
function proto.is_virtual(self)
|
||||
return true
|
||||
end
|
||||
|
||||
function proto.get_interface(self)
|
||||
local _ifname=netmod.protocol.ifname(self)
|
||||
if not _ifname then
|
||||
_ifname = "wan"
|
||||
end
|
||||
return interface(_ifname, self)
|
||||
end
|
||||
|
||||
function proto.get_interfaces(self)
|
||||
return nil
|
||||
end
|
||||
|
||||
function proto.contains_interface(self, ifc)
|
||||
return (netmod:ifnameof(ifc) == self:ifname())
|
||||
end
|
||||
|
||||
netmod:register_pattern_virtual("^qmi-%%w")
|
||||
@@ -1,61 +0,0 @@
|
||||
--[[
|
||||
LuCI - Network model - WWAN protocol extension
|
||||
|
||||
Copyright 2015 Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
]]--
|
||||
|
||||
local netmod = luci.model.network
|
||||
|
||||
local proto = netmod:register_protocol("wwan")
|
||||
local interface = luci.model.network.interface
|
||||
|
||||
function proto.get_i18n(self)
|
||||
return luci.i18n.translate("WWAN")
|
||||
end
|
||||
|
||||
function proto.opkg_package(self)
|
||||
return "wwan"
|
||||
end
|
||||
|
||||
function proto.is_installed(self)
|
||||
return nixio.fs.access("/lib/netifd/proto/wwan.sh")
|
||||
end
|
||||
|
||||
function proto.is_floating(self)
|
||||
return true
|
||||
end
|
||||
|
||||
function proto.is_virtual(self)
|
||||
return true
|
||||
end
|
||||
|
||||
function proto.get_interface(self)
|
||||
local _ifname=netmod.protocol.ifname(self)
|
||||
if not _ifname then
|
||||
_ifname = "wan"
|
||||
end
|
||||
return interface(_ifname, self)
|
||||
end
|
||||
|
||||
function proto.get_interfaces(self)
|
||||
return nil
|
||||
end
|
||||
|
||||
function proto.contains_interface(self, ifc)
|
||||
return (netmod:ifnameof(ifc) == self:ifname())
|
||||
end
|
||||
|
||||
netmod:register_pattern_virtual("^wwan-%%w")
|
||||
@@ -497,10 +497,8 @@ body[data-nav-type="sidebar"] {
|
||||
}
|
||||
}
|
||||
|
||||
& .sidebar-list .navigation-direct {
|
||||
/* flex, matching .nav-category: icon + label on one row (the label
|
||||
span owns the truncation). */
|
||||
@apply flex items-center gap-2 text-lg;
|
||||
& .sidebar-list .nav-row {
|
||||
@apply gap-2 rounded-xl px-3 py-2 text-lg font-semibold tracking-wide;
|
||||
}
|
||||
|
||||
& .sidebar-list .nav-icon {
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
* show/hide state only — never duplicate these recipes there.
|
||||
*/
|
||||
|
||||
.nav-row {
|
||||
@apply focus-visible:ring-focus-ring flex w-full cursor-pointer appearance-none items-center border-0 bg-transparent text-left no-underline shadow-none transition-colors duration-150 select-none hover:no-underline focus-visible:ring-2 focus-visible:outline-none;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
/* hover:no-underline: the global `a:hover { underline }` in _elements.css
|
||||
outranks a bare class (a:hover is 0,1,1), so nav rows must opt out at
|
||||
@@ -21,15 +25,17 @@
|
||||
/* Direct destinations use the same selected state in both navigation modes:
|
||||
a filled brand pill, matching the active sublink. */
|
||||
.navigation-direct.is-active-page {
|
||||
@apply text-brand hover:text-brand bg-brand-subtle font-medium;
|
||||
@apply text-brand hover:text-brand bg-brand-subtle;
|
||||
}
|
||||
|
||||
/* Category rows are group labels, not buttons: no hover surface, just a
|
||||
text-color shift. Block highlights belong to child links exclusively.
|
||||
appearance-none + border-0 + shadow-none strip the theme's global
|
||||
<button> chrome (_button.css), which would otherwise box every row. */
|
||||
.nav-category {
|
||||
@apply text-text-muted hover:text-text focus-visible:ring-focus-ring flex w-full cursor-pointer appearance-none items-center gap-2 rounded-lg border-0 bg-transparent px-3 py-2 text-left text-lg font-semibold tracking-wide shadow-none transition-colors duration-150 select-none focus-visible:ring-2 focus-visible:outline-none;
|
||||
:where(.sidebar-list) {
|
||||
& .nav-row {
|
||||
@apply text-text-muted hover:text-text;
|
||||
}
|
||||
|
||||
& .navigation-direct {
|
||||
@apply hover:bg-hover-faint;
|
||||
}
|
||||
}
|
||||
|
||||
.navigation-group-toggle {
|
||||
@@ -38,10 +44,6 @@
|
||||
@apply after:size-4.5 after:shrink-0 after:bg-current after:opacity-55 after:transition-[transform,opacity] after:duration-[250ms] after:content-[''] after:[mask:var(--icon-arrow-right)_center/cover_no-repeat] hover:after:opacity-100;
|
||||
}
|
||||
|
||||
.nav-category-label {
|
||||
@apply min-w-0 flex-1 truncate;
|
||||
}
|
||||
|
||||
/* An expanded group's label turns brand and its arrow rotates open. */
|
||||
.navigation-group.is-expanded > .navigation-group-toggle {
|
||||
@apply text-brand after:rotate-90;
|
||||
@@ -65,9 +67,8 @@
|
||||
@apply shrink-0 bg-current opacity-55 transition-opacity duration-150 [mask:var(--menu-icon,var(--icon-category))_center/contain_no-repeat];
|
||||
}
|
||||
|
||||
/* Direct-row labels; group rows keep .nav-category-label. flex-1 also
|
||||
holds the label against the drawer's justify-between rows. */
|
||||
.nav-label {
|
||||
.nav-label,
|
||||
.nav-category-label {
|
||||
@apply min-w-0 flex-1 truncate;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,16 +22,16 @@
|
||||
}
|
||||
|
||||
& .mobile-nav-list {
|
||||
@apply max-md:m-0 max-md:flex max-md:min-h-0 max-md:flex-1 max-md:-translate-y-2 max-md:list-none max-md:flex-col max-md:overflow-y-auto max-md:overscroll-contain max-md:p-0 max-md:pb-5 max-md:opacity-0;
|
||||
@apply max-md:m-0 max-md:flex max-md:min-h-0 max-md:flex-1 max-md:-translate-y-2 max-md:list-none max-md:flex-col max-md:gap-y-4 max-md:overflow-y-auto max-md:overscroll-contain max-md:p-0 max-md:pb-5 max-md:opacity-0;
|
||||
|
||||
& .mobile-nav-item {
|
||||
@apply max-md:shrink-0;
|
||||
|
||||
& .mobile-nav-link {
|
||||
& .nav-row {
|
||||
/* gap-3 (not 4): tight enough that the leading .nav-icon reads
|
||||
attached to its label; justify-between still pins the group
|
||||
arrow to the right edge. */
|
||||
@apply max-md:flex max-md:min-h-13 max-md:w-full max-md:items-center max-md:justify-between max-md:gap-3 max-md:rounded-none max-md:border-0 max-md:bg-transparent max-md:px-0 max-md:py-2.5 max-md:text-left max-md:text-2xl max-md:leading-tight max-md:font-medium max-md:tracking-tight max-md:no-underline max-md:shadow-none;
|
||||
@apply max-md:min-h-13 max-md:justify-between max-md:gap-3 max-md:rounded-none max-md:bg-transparent max-md:px-0 max-md:py-2.5 max-md:text-2xl max-md:leading-tight max-md:font-medium max-md:tracking-tight;
|
||||
|
||||
& .nav-icon {
|
||||
/* Row icons at drawer scale, against the text-2xl labels. */
|
||||
@@ -43,7 +43,7 @@
|
||||
& .mobile-nav-submenu-list {
|
||||
/* pl: rows are px-0, so icon (1.5) + gap (0.75) put the label
|
||||
at 2.25rem; sublinks bring px-3, the list supplies the rest. */
|
||||
@apply max-md:mx-0 max-md:mt-0 max-md:mb-2 max-md:py-1 max-md:pr-0 max-md:pl-6;
|
||||
@apply max-md:m-0 max-md:p-0 max-md:pl-6;
|
||||
}
|
||||
|
||||
& .mobile-nav-subitem {
|
||||
|
||||
@@ -398,9 +398,7 @@ return baseclass.extend({
|
||||
renderNavigationItem(item, mode) {
|
||||
const mobile = mode === "mobile";
|
||||
const itemClass = mobile ? "mobile-nav-item" : "";
|
||||
const directClass = mobile
|
||||
? "navigation-direct mobile-nav-link"
|
||||
: "navigation-direct nav-link";
|
||||
const directClass = "navigation-direct nav-row";
|
||||
|
||||
if (!item.hasChildren) {
|
||||
const attributes = {
|
||||
@@ -427,9 +425,7 @@ return baseclass.extend({
|
||||
item.isActiveGroup ? "is-expanded" : "",
|
||||
].filter(Boolean);
|
||||
const toggleAttributes = {
|
||||
class: mobile
|
||||
? "navigation-group-toggle mobile-nav-link mobile-nav-toggle"
|
||||
: "navigation-group-toggle nav-category",
|
||||
class: "navigation-group-toggle nav-row",
|
||||
type: "button",
|
||||
"aria-expanded": item.isActiveGroup ? "true" : "false",
|
||||
"aria-controls": submenuId,
|
||||
|
||||
@@ -307,6 +307,7 @@ test("defines the shared navigation renderer and emits its common contract", ()
|
||||
"navigation-submenu-list",
|
||||
"navigation-sublink",
|
||||
"navigation-direct",
|
||||
"nav-row",
|
||||
"is-active-group",
|
||||
"is-expanded",
|
||||
"is-active-page",
|
||||
@@ -366,7 +367,7 @@ test("renders an active direct item with shared and mode-specific state", () =>
|
||||
assert.equal(item.getAttribute("class"), "mobile-nav-item");
|
||||
assert.equal(
|
||||
anchor.getAttribute("class"),
|
||||
"navigation-direct mobile-nav-link is-active-page",
|
||||
"navigation-direct nav-row is-active-page",
|
||||
);
|
||||
assert.equal(anchor.getAttribute("href"), "/admin/status");
|
||||
assert.equal(anchor.getAttribute("aria-current"), "page");
|
||||
@@ -673,7 +674,7 @@ test("renders mobile items and logout repeatedly without duplicate listeners", (
|
||||
assert.equal(list.children.length, 2);
|
||||
assert.equal(
|
||||
list.children[0].children[0].getAttribute("class"),
|
||||
"navigation-direct mobile-nav-link",
|
||||
"navigation-direct nav-row",
|
||||
);
|
||||
assert.equal(
|
||||
list.children[1].getAttribute("class"),
|
||||
@@ -728,7 +729,7 @@ test("renders sidebar items, logout, and translated crumbs without duplication",
|
||||
);
|
||||
assert.equal(
|
||||
list.children[1].children[0].getAttribute("class"),
|
||||
"navigation-direct nav-link",
|
||||
"navigation-direct nav-row",
|
||||
);
|
||||
assert.equal(footer.children.length, 1);
|
||||
assert.equal(footer.children[0].getAttribute("class"), "nav-link");
|
||||
|
||||
@@ -68,9 +68,10 @@ test("shared navigation styles define active and expanded states", () => {
|
||||
assertIncludesUtilities(directActive, [
|
||||
"text-brand",
|
||||
"hover:text-brand",
|
||||
"font-medium",
|
||||
"bg-brand-subtle",
|
||||
]);
|
||||
// Weight is the surface's call — the two run different scales.
|
||||
assert.doesNotMatch(directActive, /font-(?:normal|medium|semibold|bold)/);
|
||||
// An expanded group's label turns brand and rotates its arrow open.
|
||||
assertIncludesUtilities(expandedToggle, ["after:rotate-90", "text-brand"]);
|
||||
// The active group keeps a brand label even when manually collapsed, so the
|
||||
@@ -95,6 +96,55 @@ test("shared navigation styles define active and expanded states", () => {
|
||||
assert.doesNotMatch(activeSublink, /before:/);
|
||||
});
|
||||
|
||||
test("one first-level row recipe serves both kinds on both surfaces", () => {
|
||||
const row = getBlock(navigationStyles, ".nav-row");
|
||||
|
||||
// Defined once, so a group toggle and a direct destination cannot come
|
||||
// out with different frames (#97).
|
||||
assertIncludesUtilities(row, [
|
||||
"flex",
|
||||
"w-full",
|
||||
"items-center",
|
||||
"appearance-none",
|
||||
"border-0",
|
||||
"bg-transparent",
|
||||
"shadow-none",
|
||||
"no-underline",
|
||||
]);
|
||||
// Mode files consume it; no per-kind or per-surface box class survives.
|
||||
assert.match(layoutStyles, /& \.sidebar-list \.nav-row \{/);
|
||||
assert.match(overlayStyles, /& \.nav-row \{/);
|
||||
assert.doesNotMatch(overlayStyles, /mobile-nav-link/);
|
||||
assert.doesNotMatch(navigationStyles, /nav-category \{/);
|
||||
|
||||
// :where() keeps the resting treatment at (0,1,0), below every state.
|
||||
const sidebarResting = getBlock(navigationStyles, ":where(.sidebar-list)");
|
||||
|
||||
assertIncludesUtilities(getBlock(sidebarResting, "& .nav-row"), [
|
||||
"text-text-muted",
|
||||
"hover:text-text",
|
||||
]);
|
||||
assertIncludesUtilities(getBlock(sidebarResting, "& .navigation-direct"), [
|
||||
"hover:bg-hover-faint",
|
||||
]);
|
||||
});
|
||||
|
||||
test("the drawer collapses a group to nothing so the row rhythm is declared", () => {
|
||||
const drawer = getBlock(overlayStyles, ".mobile-menu-overlay");
|
||||
const list = getBlock(drawer, "& .mobile-nav-list");
|
||||
const submenu = getBlock(drawer, "& .mobile-nav-submenu-list");
|
||||
|
||||
// The rhythm is the list's own gap, not a collapsed group's leftover box.
|
||||
assertIncludesUtilities(list, ["max-md:gap-y-4"]);
|
||||
// Full-bleed square rows must keep suppressing the shared selected fill.
|
||||
assertIncludesUtilities(getBlock(drawer, "& .nav-row"), [
|
||||
"max-md:bg-transparent",
|
||||
]);
|
||||
// Direct child of the 0fr track: its own box outlives the collapse.
|
||||
assertIncludesUtilities(submenu, ["max-md:m-0", "max-md:p-0"]);
|
||||
assert.doesNotMatch(submenu, /max-md:(?:mb-|py-|mt-|mx-|pt-|pb-)/);
|
||||
});
|
||||
|
||||
test("shared navigation styles own accordion animation without a guide rail", () => {
|
||||
const toggle = getBlock(navigationStyles, ".navigation-group-toggle");
|
||||
const region = getBlock(navigationStyles, ".navigation-group-region");
|
||||
@@ -124,13 +174,24 @@ test("shared navigation styles own accordion animation without a guide rail", ()
|
||||
|
||||
test("desktop sidebar styles only provide desktop navigation density", () => {
|
||||
const sidebar = getBlock(layoutStyles, 'body[data-nav-type="sidebar"]');
|
||||
const direct = getBlock(sidebar, "& .sidebar-list .navigation-direct");
|
||||
const row = getBlock(sidebar, "& .sidebar-list .nav-row");
|
||||
const icon = getBlock(sidebar, "& .sidebar-list .nav-icon");
|
||||
const submenu = getBlock(sidebar, "& .sidebar-submenu");
|
||||
const sublink = getBlock(sidebar, "& .sidebar-submenu .navigation-sublink");
|
||||
|
||||
// Direct rows are icon + label flex rows; the label span truncates.
|
||||
assertIncludesUtilities(direct, ["flex", "items-center", "gap-2", "text-lg"]);
|
||||
// Density for both first-level kinds at once.
|
||||
assertIncludesUtilities(row, [
|
||||
"gap-2",
|
||||
"px-3",
|
||||
"py-2",
|
||||
"text-lg",
|
||||
"font-semibold",
|
||||
"tracking-wide",
|
||||
]);
|
||||
// The frame is the shared recipe's; the mode file must not restate it.
|
||||
assert.doesNotMatch(row, /(^|\s)(?:flex|items-center|w-full)($|\s|;)/);
|
||||
// Nor colour: nesting under body[data-nav-type] would outrank the states.
|
||||
assert.doesNotMatch(row, /text-text|text-brand|bg-/);
|
||||
assertIncludesUtilities(icon, ["size-4.5"]);
|
||||
// pl-6.5 hangs sublink text off the parent label (px-3 + icon + gap −
|
||||
// the sublink's own px-3), not the row edge.
|
||||
|
||||
@@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
|
||||
LUCI_TITLE:=Aurora Theme (A modern browser theme built with Vite and Tailwind CSS)
|
||||
LUCI_DEPENDS:=+luci-base
|
||||
|
||||
PKG_VERSION:=1.3.0
|
||||
PKG_RELEASE:=77
|
||||
PKG_VERSION:=1.3.1
|
||||
PKG_RELEASE:=78
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
||||
LUCI_MINIFY_CSS:=
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
|
||||
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-content:"";--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-border-style:solid;--tw-duration:initial;--tw-ease:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-space-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-border-spacing-x:0;--tw-border-spacing-y:0}}}@layer theme{:root,:host{--font-sans:var(--font-sans);--font-mono:var(--font-mono);--spacing:var(--spacing);--container-xs:20rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1Line truncated
|
||||
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-content:"";--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-border-style:solid;--tw-duration:initial;--tw-ease:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-space-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-border-spacing-x:0;--tw-border-spacing-y:0}}}@layer theme{:root,:host{--font-sans:var(--font-sans);--font-mono:var(--font-mono);--spacing:var(--spacing);--container-xs:20rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1Line truncated
|
||||
Loaded 100 of 106 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user