mirror of
https://github.com/kiddin9/openwrt-packages.git
synced 2025-01-08 12:57:28 +08:00
🗽 Sync 2024-06-07 18:09:14
This commit is contained in:
parent
4587b1de33
commit
81beb675ed
@ -57,7 +57,7 @@ return view.extend({
|
||||
var pg = document.querySelector('#sinr'+i)
|
||||
var vn = parseInt(v) || 0;
|
||||
var mn = parseInt(m) || 100;
|
||||
var pc = Math.floor(100-(100*(1-((mn - vn)/(mn - 40)))));
|
||||
var pc = Math.floor(100-(100*(1-((mn - vn)/(mn - 30)))));
|
||||
pg.firstElementChild.style.width = pc + '%';
|
||||
pg.style.width = '%d%%';
|
||||
pg.firstElementChild.style.animationDirection = "reverse";
|
||||
@ -73,6 +73,16 @@ return view.extend({
|
||||
pg.firstElementChild.style.animationDirection = "reverse";
|
||||
pg.setAttribute('title', '%s'.format(v));
|
||||
}
|
||||
function ecio_bar(v,m) {
|
||||
var pg = document.querySelector('#sinr'+i)
|
||||
var vn = parseInt(v) || 0
|
||||
var mn = parseInt(m) || 100
|
||||
var pc = Math.floor(100-(100/mn)*vn);
|
||||
pg.firstElementChild.style.width = pc + '%';
|
||||
pg.style.width = '%d%%';
|
||||
pg.firstElementChild.style.animationDirection = "reverse";
|
||||
pg.setAttribute('title', '%s'.format(v));
|
||||
}
|
||||
// icon signal streigh
|
||||
var icon;
|
||||
var p = (json.modem[i].csq_per);
|
||||
@ -392,7 +402,7 @@ return view.extend({
|
||||
sinr_bar(json.modem[i].sinr + " dB", sinr_min);
|
||||
} else {
|
||||
var sinr_min = -24;
|
||||
sinr_bar(json.modem[i].sinr + " dB", sinr_min);
|
||||
ecio_bar(json.modem[i].sinr + " dB", sinr_min);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -511,6 +511,17 @@
|
||||
let iface_select = document.getElementById('iface_select');
|
||||
let selected = iface_select.value;
|
||||
let ifaces = responseText.trimEnd().split('\n').filter(line=>line).map(iface=>{
|
||||
let priority = 0;
|
||||
switch (iface) {
|
||||
case "br-lan":
|
||||
priority = -2;
|
||||
break;
|
||||
case "docker0":
|
||||
priority = -1;
|
||||
break;
|
||||
}
|
||||
return {iface:iface, priority:priority};
|
||||
}).sort((a,b)=>a.priority-b.priority).map(o=>o.iface).map(iface=>{
|
||||
let option = document.createElement('option');
|
||||
option.value = iface;
|
||||
option.innerHTML = iface;
|
||||
|
@ -29,7 +29,7 @@ lookup() {
|
||||
}
|
||||
|
||||
get_wan_iface() {
|
||||
tail -n +2 /proc/net/route | sed -n -e 's/^\([^\t]\+\)\t00000000\t[^\t]\+\t[^\t]\+\t[^\t]\+\t[^\t]\+\t[^\t]\+\t00000000\t.*$/\1/p'
|
||||
tail -n +2 /proc/net/route | sed -n -e 's/^\([^\t]\+\)\t00000000\t[^\t]\+\t[^\t]\+\t[^\t]\+\t[^\t]\+\t[^\t]\+\t00000000\t.*$/\1/p' | head -1
|
||||
}
|
||||
|
||||
get_arp_excluded() {
|
||||
@ -38,7 +38,7 @@ get_arp_excluded() {
|
||||
|
||||
enforce_wan_iface() {
|
||||
local INTERFACE="$1"
|
||||
[[ "$INTERFACE" = "br-lan" ]] && INTERFACE=`uci show network.wan | grep -E 'network\.wan\.(device|ifname)' | sed -n -e "1s/network\\.wan\\.[^=]\\+='\\([^']\\+\\)'\$/\\1/p"`
|
||||
[[ "$INTERFACE" = "br-lan" ]] && INTERFACE=`uci show network.wan | grep -E 'network\.wan\.(device|ifname)=' | sed -n -e "1s/network\\.wan\\.[^=]\\+='\\([^']\\+\\)'\$/\\1/p"`
|
||||
[ -z "$INTERFACE" ] && INTERFACE="/"
|
||||
echo "$INTERFACE"
|
||||
}
|
||||
@ -175,7 +175,7 @@ show_ifaces() {
|
||||
local WAN_INTERFACE=`get_wan_iface`
|
||||
[ -z "$WAN_INTERFACE" ] && return 1
|
||||
WAN_INTERFACE="$(enforce_wan_iface "$WAN_INTERFACE")"
|
||||
ip addr show scope global up | grep '^ \+inet ' | sed -n -e 's/^.* \([^ ]\+\)$/\1/p' | grep -Fv "$WAN_INTERFACE" | sort -u
|
||||
ip addr show scope global up | grep '^ \+inet ' | sed -n -e 's/^.* \([^ ]\+\)$/\1/p' | grep -Fxv "$WAN_INTERFACE" | sort -u
|
||||
}
|
||||
|
||||
prerm() {
|
||||
|
@ -135,7 +135,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_MosDNS
|
||||
bool "Include MosDNS"
|
||||
default y
|
||||
default y if aarch64||arm||i386||x86_64
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria
|
||||
bool "Include Hysteria"
|
||||
|
Loading…
Reference in New Issue
Block a user