mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-09-15 21:04:21 +08:00
Compare commits
4
Commits
e218b63670
...
6a58ba53d0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a58ba53d0 | ||
|
|
d1aa8b1c10 | ||
|
|
6b1fd2d7c3 | ||
|
|
2a2f7e4252 |
@@ -528,7 +528,7 @@ jobs:
|
|||||||
cp -rf luci-app-bypass/root/www/luci-static/bypass/* luci-app-passwall/root/www/luci-static/passwall/
|
cp -rf luci-app-bypass/root/www/luci-static/bypass/* luci-app-passwall/root/www/luci-static/passwall/
|
||||||
cp -rf luci-app-bypass/root/www/luci-static/bypass/* luci-app-passwall2/root/www/luci-static/passwall2/
|
cp -rf luci-app-bypass/root/www/luci-static/bypass/* luci-app-passwall2/root/www/luci-static/passwall2/
|
||||||
cp -rf luci-app-bypass/root/www/luci-static/bypass/* luci-app-ssr-plus/root/www/luci-static/shadowsocksr/
|
cp -rf luci-app-bypass/root/www/luci-static/bypass/* luci-app-ssr-plus/root/www/luci-static/shadowsocksr/
|
||||||
echo ".page-container>div>div>a:first-child{display:none}" >>luci-app-quickstart/htdocs/luci-static/quickstart/style.css
|
echo ".page-container>div>div>a:first-child,.info_content>.status_box{display:none !important}" >>luci-app-quickstart/htdocs/luci-static/quickstart/style.css
|
||||||
sed -i 's/icon!=="baby"/icon!==""/' luci-app-quickstart/htdocs/luci-static/quickstart/index.js
|
sed -i 's/icon!=="baby"/icon!==""/' luci-app-quickstart/htdocs/luci-static/quickstart/index.js
|
||||||
sed -i 's/+php8-cgi /+php8-cgi +php8-fpm /' luci-theme-spectra/Makefile
|
sed -i 's/+php8-cgi /+php8-cgi +php8-fpm /' luci-theme-spectra/Makefile
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -10,8 +10,8 @@ include $(TOPDIR)/rules.mk
|
|||||||
PKG_ARCH_BAIDUDRIVE:=$(ARCH)
|
PKG_ARCH_BAIDUDRIVE:=$(ARCH)
|
||||||
|
|
||||||
PKG_NAME:=baidudrive
|
PKG_NAME:=baidudrive
|
||||||
PKG_VERSION:=linkeasefull-runtime-v3.0.10
|
PKG_VERSION:=linkeasefull-runtime-v3.0.11
|
||||||
PKG_RELEASE:=13
|
PKG_RELEASE:=14
|
||||||
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/istoreos/istoreos-app-hub/releases/download/baidudrive-runtime-v$(PKG_VERSION)/
|
PKG_SOURCE_URL:=https://github.com/istoreos/istoreos-app-hub/releases/download/baidudrive-runtime-v$(PKG_VERSION)/
|
||||||
PKG_HASH:=skip
|
PKG_HASH:=skip
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ PKG_ARCH_ISTOREENHANCE:=$(ARCH)
|
|||||||
|
|
||||||
PKG_NAME:=istoreenhance
|
PKG_NAME:=istoreenhance
|
||||||
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
||||||
PKG_SOURCE_DATE:=0.7.5
|
PKG_SOURCE_DATE:=0.7.15
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=4
|
||||||
ARCH_HEXCODE:=
|
ARCH_HEXCODE:=
|
||||||
ifeq ($(ARCH),x86_64)
|
ifeq ($(ARCH),x86_64)
|
||||||
ARCH_HEXCODE=8664
|
ARCH_HEXCODE=8664
|
||||||
@@ -23,9 +23,9 @@ ARCH_HEXCODE=aa32
|
|||||||
else ifeq ($(ARCH),mipsel)
|
else ifeq ($(ARCH),mipsel)
|
||||||
ARCH_HEXCODE=1b0c
|
ARCH_HEXCODE=1b0c
|
||||||
endif
|
endif
|
||||||
PKG_SOURCE_VERSION:=$(ARCH_HEXCODE)
|
PKG_SOURCE_VERSION:=c74312de1d50b9de65d0044fcf7c4d88a1f9917c
|
||||||
PKG_SOURCE:=iStoreEnhance-binary-$(PKG_SOURCE_DATE).tar.gz
|
PKG_SOURCE:=iStoreEnhance-binary-$(PKG_SOURCE_DATE).tar.gz
|
||||||
PKG_SOURCE_URL:=http://dl.istoreos.com/binary/kspeeder/
|
PKG_SOURCE_URL:=https://github.com/kspeeder/docker_kspeeder/releases/download/v0.7.15/
|
||||||
PKG_HASH:=skip
|
PKG_HASH:=skip
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/iStoreEnhance-binary-$(PKG_SOURCE_DATE)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/iStoreEnhance-binary-$(PKG_SOURCE_DATE)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=librespeed-common
|
PKG_NAME:=librespeed-common
|
||||||
PKG_VERSION:=1.0.0
|
PKG_VERSION:=1.0.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
|
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
|
||||||
PKG_LICENSE:=GPL-2.0-only
|
PKG_LICENSE:=GPL-2.0-only
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { open, readfile, writefile, rename, mkdir } from 'fs';
|
import { open, readfile, writefile, rename, mkdir, error } from 'fs';
|
||||||
|
|
||||||
// Packaging checks probe every executable for these.
|
// Packaging checks probe every executable for these.
|
||||||
if (length(ARGV) > 0) {
|
if (length(ARGV) > 0) {
|
||||||
@@ -177,8 +177,11 @@ if (dir != '' && dir != archive_path)
|
|||||||
mkdir(dir, 0o755);
|
mkdir(dir, 0o755);
|
||||||
|
|
||||||
// Atomic: a reader never sees a half-written archive. A failed write goes to
|
// Atomic: a reader never sees a half-written archive. A failed write goes to
|
||||||
// syslog: this runs from cron, where stderr has nowhere to go.
|
// syslog: this runs from cron, where stderr has nowhere to go. The reason
|
||||||
|
// comes along, since a missing mount, a read-only filesystem and a full disk
|
||||||
|
// each want something different from whoever reads that log.
|
||||||
if (writefile(tmp, out) != null)
|
if (writefile(tmp, out) != null)
|
||||||
rename(tmp, archive_path);
|
rename(tmp, archive_path);
|
||||||
else
|
else
|
||||||
system(['logger', '-t', 'librespeed', `aggregate: cannot write ${tmp}`]);
|
system(['logger', '-t', 'librespeed',
|
||||||
|
`aggregate: cannot write ${tmp}: ${error()}`]);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ PKG_ARCH_LINKEASE:=$(ARCH)
|
|||||||
PKG_NAME:=linkease-common-bin
|
PKG_NAME:=linkease-common-bin
|
||||||
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
||||||
PKG_SOURCE_DATE:=1.7.5
|
PKG_SOURCE_DATE:=1.7.5
|
||||||
PKG_RELEASE:=8
|
PKG_RELEASE:=9
|
||||||
|
|
||||||
ARCH_HEXCODE:=
|
ARCH_HEXCODE:=
|
||||||
ifeq ($(ARCH),x86_64)
|
ifeq ($(ARCH),x86_64)
|
||||||
@@ -28,7 +28,7 @@ else ifeq ($(ARCH),mipsel)
|
|||||||
ARCH_HEXCODE=1b0c
|
ARCH_HEXCODE=1b0c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PKG_SOURCE_VERSION:=e0457eac600cd37b128eddf251ff9344702b1d03
|
PKG_SOURCE_VERSION:=1d2184f103526f9427259c2aba880486cbd930fd
|
||||||
PKG_SOURCE:=linkease-common-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE).tar.gz
|
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_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)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/linkease-common-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE)
|
||||||
|
|||||||
@@ -3,25 +3,21 @@
|
|||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
ensure_linkease_config() {
|
ensure_linkease_config() {
|
||||||
if ! uci -q get linkease.@linkease[0] >/dev/null; then
|
if [ ! -f /etc/config/linkease ]; then
|
||||||
uci -q add linkease linkease >/dev/null
|
touch /etc/config/linkease || return 1
|
||||||
uci -q set linkease.@linkease[0].enabled='0'
|
|
||||||
uci -q set linkease.@linkease[0].port='8897'
|
|
||||||
uci -q set linkease.@linkease[0].allowPublic='0'
|
|
||||||
uci -q commit linkease
|
|
||||||
fi
|
fi
|
||||||
}
|
if ! uci -q get linkease.@linkease[0] >/dev/null; then
|
||||||
|
uci -q add linkease linkease >/dev/null || return 1
|
||||||
sync_linkeasefull_local_home() {
|
uci -q set linkease.@linkease[0].enabled='0' || return 1
|
||||||
if uci -q get linkeasefull.@linkeasefull[0] >/dev/null; then
|
uci -q set linkease.@linkease[0].port='8897' || return 1
|
||||||
uci -q set "linkeasefull.@linkeasefull[0].data_root_parent=$1"
|
uci -q set linkease.@linkease[0].allowPublic='0' || return 1
|
||||||
uci -q commit linkeasefull
|
uci -q commit linkease || return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
save)
|
save)
|
||||||
ensure_linkease_config
|
ensure_linkease_config || exit 1
|
||||||
if [ ! -z "$2" ]; then
|
if [ ! -z "$2" ]; then
|
||||||
uci set "linkease.@linkease[0].preconfig=$2"
|
uci set "linkease.@linkease[0].preconfig=$2"
|
||||||
uci commit linkease
|
uci commit linkease
|
||||||
@@ -29,7 +25,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
load)
|
load)
|
||||||
ensure_linkease_config
|
ensure_linkease_config || exit 1
|
||||||
if [ -f "/usr/sbin/preconfig.data" ]; then
|
if [ -f "/usr/sbin/preconfig.data" ]; then
|
||||||
data="`cat /usr/sbin/preconfig.data`"
|
data="`cat /usr/sbin/preconfig.data`"
|
||||||
uci set "linkease.@linkease[0].preconfig=${data}"
|
uci set "linkease.@linkease[0].preconfig=${data}"
|
||||||
@@ -48,13 +44,15 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
local_save)
|
local_save)
|
||||||
ensure_linkease_config
|
|
||||||
if [ ! -z "$2" ]; then
|
if [ ! -z "$2" ]; then
|
||||||
|
ensure_linkease_config || exit 1
|
||||||
uci set "linkease.@linkease[0].local_home=$2"
|
uci set "linkease.@linkease[0].local_home=$2"
|
||||||
uci commit linkease
|
uci commit linkease
|
||||||
sync_linkeasefull_local_home "$2"
|
|
||||||
ROOT_DIR="$2"
|
ROOT_DIR="$2"
|
||||||
if [ -f "/etc/config/quickstart" ]; then
|
if [ -f "/etc/config/quickstart" ]; then
|
||||||
|
if ! uci -q get quickstart.main >/dev/null; then
|
||||||
|
uci -q set quickstart.main=main
|
||||||
|
fi
|
||||||
config_load quickstart
|
config_load quickstart
|
||||||
config_get MAIN_DIR main main_dir ""
|
config_get MAIN_DIR main main_dir ""
|
||||||
config_get CONF_DIR main conf_dir ""
|
config_get CONF_DIR main conf_dir ""
|
||||||
@@ -83,16 +81,8 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
local_load)
|
local_load)
|
||||||
ensure_linkease_config
|
ensure_linkease_config || exit 1
|
||||||
if [ -f "/etc/config/quickstart" ]; then
|
|
||||||
data="`uci -q get quickstart.main.main_dir`"
|
|
||||||
fi
|
|
||||||
if [ -z "$data" ]; then
|
|
||||||
data="`uci -q get linkease.@linkease[0].local_home`"
|
data="`uci -q get linkease.@linkease[0].local_home`"
|
||||||
fi
|
|
||||||
if [ -z "$data" ]; then
|
|
||||||
data="`uci -q get linkeasefull.@linkeasefull[0].data_root_parent`"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${data}" ]; then
|
if [ -z "${data}" ]; then
|
||||||
echo "nil"
|
echo "nil"
|
||||||
|
|||||||
+2
-2
@@ -12,7 +12,7 @@ PKG_ARCH_LINKEASE:=$(ARCH)
|
|||||||
PKG_NAME:=linkease
|
PKG_NAME:=linkease
|
||||||
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
||||||
PKG_SOURCE_DATE:=1.7.5
|
PKG_SOURCE_DATE:=1.7.5
|
||||||
PKG_RELEASE:=11
|
PKG_RELEASE:=12
|
||||||
|
|
||||||
ARCH_HEXCODE:=
|
ARCH_HEXCODE:=
|
||||||
ifeq ($(ARCH),x86_64)
|
ifeq ($(ARCH),x86_64)
|
||||||
@@ -28,7 +28,7 @@ else ifeq ($(ARCH),mipsel)
|
|||||||
ARCH_HEXCODE=1b0c
|
ARCH_HEXCODE=1b0c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PKG_SOURCE_VERSION:=e0457eac600cd37b128eddf251ff9344702b1d03
|
PKG_SOURCE_VERSION:=1d2184f103526f9427259c2aba880486cbd930fd
|
||||||
PKG_SOURCE:=linkease-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE).tar.gz
|
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_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)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/linkease-bin-$(PKG_SOURCE_DATE)-linux-$(PKG_ARCH_LINKEASE)
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ PKG_ARCH_LINKEASE:=$(ARCH)
|
|||||||
|
|
||||||
PKG_NAME:=linkeasefull
|
PKG_NAME:=linkeasefull
|
||||||
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
# use PKG_SOURCE_DATE instead of PKG_VERSION for compitable
|
||||||
PKG_SOURCE_DATE:=3.0.5
|
PKG_SOURCE_DATE:=3.0.11
|
||||||
PKG_RELEASE:=10
|
PKG_RELEASE:=11
|
||||||
|
|
||||||
ARCH_HEXCODE:=
|
ARCH_HEXCODE:=
|
||||||
ifeq ($(ARCH),x86_64)
|
ifeq ($(ARCH),x86_64)
|
||||||
@@ -24,7 +24,7 @@ LINKEASE_RUNTIME_ARCH:=arm64
|
|||||||
PKG_HASH:=skip
|
PKG_HASH:=skip
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PKG_SOURCE_VERSION:=e0457eac600cd37b128eddf251ff9344702b1d03
|
PKG_SOURCE_VERSION:=1d2184f103526f9427259c2aba880486cbd930fd
|
||||||
PKG_SOURCE:=linkease-runtime-$(PKG_SOURCE_DATE)-linux-$(LINKEASE_RUNTIME_ARCH).tar.gz
|
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_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)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/linkease-runtime-$(PKG_SOURCE_DATE)-linux-$(LINKEASE_RUNTIME_ARCH)
|
||||||
@@ -39,7 +39,7 @@ define Package/$(PKG_NAME)
|
|||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
SUBMENU:=Web Servers/Proxies
|
SUBMENU:=Web Servers/Proxies
|
||||||
TITLE:=LinkEase Full - the local web desktop
|
TITLE:=LinkEase Full - the local web desktop
|
||||||
DEPENDS:=@(x86_64||aarch64) +linkease-common-bin +ca-bundle
|
DEPENDS:=@(x86_64||aarch64) +linkease-common-bin +ca-bundle +cifsmount +kmod-fs-cifs
|
||||||
PKGARCH:=all
|
PKGARCH:=all
|
||||||
URL:=https://www.linkease.com/
|
URL:=https://www.linkease.com/
|
||||||
endef
|
endef
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
config linkeasefull
|
config linkeasefull
|
||||||
option enabled '1'
|
option enabled '1'
|
||||||
option data_root_parent ''
|
|
||||||
|
|||||||
@@ -5,51 +5,53 @@ STOP=10
|
|||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
||||||
PROG=/usr/bin/linkease-full
|
PROG=/usr/bin/linkease-full
|
||||||
LINKEASE_LIBEXEC=/usr/libexec/linkeasefull
|
|
||||||
LINKEASE_FULL_PORT=19290
|
LINKEASE_FULL_PORT=19290
|
||||||
LINKEASE_BASE_PATH=/apps/
|
LINKEASE_BASE_PATH=/apps/
|
||||||
LINKEASE_LEGACY_ADDR=0.0.0.0:8897
|
LINKEASE_LEGACY_ADDR=0.0.0.0:8897
|
||||||
LOCAL_API=/var/run/linkease.sock
|
LOCAL_API=/var/run/linkease.sock
|
||||||
|
DATA_ROOT_WAIT_SECONDS=${LINKEASEFULL_DATA_ROOT_WAIT_SECONDS:-60}
|
||||||
|
|
||||||
is_persistent_data_root_parent() {
|
ensure_linkease_config() {
|
||||||
|
if [ ! -f /etc/config/linkease ]; then
|
||||||
|
touch /etc/config/linkease || return 1
|
||||||
|
fi
|
||||||
|
if ! uci -q get linkease.@linkease[0] >/dev/null; then
|
||||||
|
uci -q add linkease linkease >/dev/null || return 1
|
||||||
|
uci -q set linkease.@linkease[0].enabled='0' || return 1
|
||||||
|
uci -q set linkease.@linkease[0].port='8897' || return 1
|
||||||
|
uci -q set linkease.@linkease[0].allowPublic='0' || return 1
|
||||||
|
uci -q commit linkease || return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
is_allowed_data_root_parent() {
|
||||||
[ -n "$1" ] || return 1
|
[ -n "$1" ] || return 1
|
||||||
case "$1" in
|
case "$1" in
|
||||||
/tmp|/tmp/*|/var|/var/*|/run|/run/*|/dev|/dev/*|/proc|/proc/*|/sys|/sys/*|/rom|/rom/*|/overlay|/overlay/*) return 1 ;;
|
/tmp|/tmp/*|/var|/var/*|/run|/run/*|/dev|/dev/*|/proc|/proc/*|/sys|/sys/*|/rom|/rom/*|/overlay|/overlay/*) return 1 ;;
|
||||||
esac
|
esac
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
wait_for_data_root_parent() {
|
||||||
|
is_allowed_data_root_parent "$1" || return 1
|
||||||
|
wait_left="$DATA_ROOT_WAIT_SECONDS"
|
||||||
|
case "$wait_left" in
|
||||||
|
""|*[!0-9]*) wait_left=60 ;;
|
||||||
|
esac
|
||||||
|
while [ "$wait_left" -gt 0 ]; do
|
||||||
|
[ -d "$1" ] && return 0
|
||||||
|
sleep 1
|
||||||
|
wait_left=$((wait_left - 1))
|
||||||
|
done
|
||||||
|
[ -d "$1" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
is_persistent_data_root_parent() {
|
||||||
|
is_allowed_data_root_parent "$1" || return 1
|
||||||
[ -d "$1" ] || return 1
|
[ -d "$1" ] || return 1
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve_data_root_parent() {
|
|
||||||
if [ -n "$data_root_parent" ]; then
|
|
||||||
is_persistent_data_root_parent "$data_root_parent"
|
|
||||||
return $?
|
|
||||||
fi
|
|
||||||
|
|
||||||
local_home="$(uci -q get linkease.@linkease[0].local_home || true)"
|
|
||||||
if is_persistent_data_root_parent "$local_home"; then
|
|
||||||
data_root_parent="$local_home"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f /etc/config/quickstart ]; then
|
|
||||||
quickstart_main_dir="$(uci -q get quickstart.main.main_dir || true)"
|
|
||||||
if [ -n "$quickstart_main_dir" ]; then
|
|
||||||
if is_persistent_data_root_parent "$quickstart_main_dir"; then
|
|
||||||
data_root_parent="$quickstart_main_dir"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
sync_shared_local_home() {
|
|
||||||
[ -x /usr/sbin/linkease-config.sh ] || return 0
|
|
||||||
/usr/sbin/linkease-config.sh local_save "$data_root_parent" >/dev/null 2>&1 || true
|
|
||||||
}
|
|
||||||
|
|
||||||
linkease_enabled() {
|
linkease_enabled() {
|
||||||
[ "$(uci -q get linkease.@linkease[0].enabled 2>/dev/null)" = "1" ]
|
[ "$(uci -q get linkease.@linkease[0].enabled 2>/dev/null)" = "1" ]
|
||||||
}
|
}
|
||||||
@@ -57,15 +59,20 @@ linkease_enabled() {
|
|||||||
read_config() {
|
read_config() {
|
||||||
section="$1"
|
section="$1"
|
||||||
config_get_bool enabled "$section" enabled 1
|
config_get_bool enabled "$section" enabled 1
|
||||||
config_get data_root_parent "$section" data_root_parent ""
|
ensure_linkease_config || true
|
||||||
|
data_root_parent="$(uci -q get linkease.@linkease[0].local_home 2>/dev/null || true)"
|
||||||
|
|
||||||
if ! resolve_data_root_parent; then
|
if [ -n "$data_root_parent" ] && ! wait_for_data_root_parent "$data_root_parent"; then
|
||||||
data_root_parent=""
|
data_root_parent=""
|
||||||
return 1
|
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$data_root_parent" ] && ! is_persistent_data_root_parent "$data_root_parent"; then
|
||||||
|
data_root_parent=""
|
||||||
|
fi
|
||||||
|
if [ -n "$data_root_parent" ]; then
|
||||||
data_root="$data_root_parent/.linkease_data"
|
data_root="$data_root_parent/.linkease_data"
|
||||||
recycle_root="$data_root_parent/.linkease_recycle"
|
recycle_root="$data_root_parent/.linkease_recycle"
|
||||||
apptunnel_config_dir="/tmp/linkeasefull/apptunnel-config"
|
fi
|
||||||
|
log_root="/tmp/linkeasefull/logs"
|
||||||
}
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
@@ -77,16 +84,15 @@ start_service() {
|
|||||||
echo "linkeasefull: linkease is enabled; please disable linkease before starting linkeasefull" >&2
|
echo "linkeasefull: linkease is enabled; please disable linkease before starting linkeasefull" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
if [ -z "$data_root_parent" ]; then
|
|
||||||
echo "linkeasefull: please choose a persistent disk storage path in LuCI" >&2
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
sync_shared_local_home
|
|
||||||
|
|
||||||
rm -f "$LOCAL_API"
|
rm -f "$LOCAL_API"
|
||||||
|
if [ -n "$data_root_parent" ]; then
|
||||||
mkdir -p "$data_root/users/admin" "$data_root/system" "$data_root/tmp" "$recycle_root"
|
mkdir -p "$data_root/users/admin" "$data_root/system" "$data_root/tmp" "$recycle_root"
|
||||||
mkdir -p "$data_root/apptunnel" "$data_root/mountremote" "$data_root/logs"
|
mkdir -p "$data_root/config" "$data_root/apptunnel" "$data_root/mountremote"
|
||||||
mkdir -p "$apptunnel_config_dir"
|
else
|
||||||
|
echo "linkeasefull: data root is not initialized; starting for first-run setup" >&2
|
||||||
|
fi
|
||||||
|
mkdir -p "$log_root"
|
||||||
|
|
||||||
# Do not set LINKEASE_CONFIG on OpenWrt. That variable belongs to
|
# Do not set LINKEASE_CONFIG on OpenWrt. That variable belongs to
|
||||||
# Docker/file-backend deployments where users explicitly mount
|
# Docker/file-backend deployments where users explicitly mount
|
||||||
@@ -103,41 +109,16 @@ start_service() {
|
|||||||
|
|
||||||
procd_open_instance linkeasefull
|
procd_open_instance linkeasefull
|
||||||
procd_set_param limits nofile="65535 65535"
|
procd_set_param limits nofile="65535 65535"
|
||||||
procd_set_param command "$PROG"
|
procd_set_param command "$PROG" \
|
||||||
|
--host "0.0.0.0" \
|
||||||
|
--port "$LINKEASE_FULL_PORT" \
|
||||||
|
--mode "release" \
|
||||||
|
--basePath "$LINKEASE_BASE_PATH" \
|
||||||
|
--deviceAddr "$LINKEASE_LEGACY_ADDR" \
|
||||||
|
--localApi "$LOCAL_API" \
|
||||||
|
--supplierCode "linkease"
|
||||||
procd_set_param env \
|
procd_set_param env \
|
||||||
"SERVER_HOST=0.0.0.0" \
|
"KAIPLUS_ENABLED=0"
|
||||||
"SERVER_PORT=$LINKEASE_FULL_PORT" \
|
|
||||||
"SERVER_MODE=release" \
|
|
||||||
"SERVER_BASE_PATH=$LINKEASE_BASE_PATH" \
|
|
||||||
"LINKEASE_AUTH_PROVIDER=openwrt_luci" \
|
|
||||||
"LINKEASE_EDITION=nas-full" \
|
|
||||||
"KAIPLUS_ENABLED=0" \
|
|
||||||
"LINKEASE_DATA_ROOT=$data_root" \
|
|
||||||
"LINKEASE_RECYCLE_ROOT=$recycle_root" \
|
|
||||||
"LINKEASE_APPTUNNEL_INTERNAL_ADDR=127.0.0.1:19810" \
|
|
||||||
"LINKEASE_APPTUNNEL_LEGACY_ADDR=$LINKEASE_LEGACY_ADDR" \
|
|
||||||
"LINKEASE_APPTUNNEL_LOCAL_API=$LOCAL_API" \
|
|
||||||
"LINKEASE_APPTUNNEL_CONFIG_DIR=$apptunnel_config_dir" \
|
|
||||||
"LINKEASE_APPTUNNEL_DATA_DIR=$data_root/apptunnel" \
|
|
||||||
"LINKEASE_APPTUNNEL_CACHE_DIR=$data_root/apptunnel/cache" \
|
|
||||||
"LINKEASE_APPTUNNEL_RUNTIME_DIR=$data_root/apptunnel/runtime" \
|
|
||||||
"LINKEASE_APPTUNNEL_LOG_DIR=$data_root/logs" \
|
|
||||||
"APPTUNNEL_MOUNTREMOTE_MODE=real" \
|
|
||||||
"APPTUNNEL_MOUNTREMOTE_LINKREMOTE_AGENT_BINARY=/usr/bin/linkremote-agent" \
|
|
||||||
"APPTUNNEL_MOUNTREMOTE_SMBD_BINARY=$LINKEASE_LIBEXEC/linkmount_bin/linkmount_bin" \
|
|
||||||
"APPTUNNEL_MOUNTREMOTE_WORK_DIR=$data_root/mountremote" \
|
|
||||||
"APPTUNNEL_MOUNTREMOTE_SOCKET_DIR=$data_root/mountremote" \
|
|
||||||
"APPTUNNEL_MOUNTREMOTE_SAMBA_DIR=$data_root/mountremote/samba" \
|
|
||||||
"APPTUNNEL_MOUNTREMOTE_STORE_PATH=$data_root/mountremote/mounts.json" \
|
|
||||||
"APPTUNNEL_MOUNTREMOTE_STARTUP_RECONCILE=true" \
|
|
||||||
"APPTUNNEL_MOUNTREMOTE_ROOT_WATCH_DIR=$data_root/mountremote/root-watch" \
|
|
||||||
"APPTUNNEL_MOUNTREMOTE_ALLOWED_MOUNT_PREFIX=$data_root_parent" \
|
|
||||||
"MOUNTREMOTE_ALLOWED_MOUNT_PREFIX=$data_root_parent" \
|
|
||||||
"LINKEASE_LINKMOUNT_BIN=$LINKEASE_LIBEXEC/linkmount_bin/linkmount_bin" \
|
|
||||||
"LINKEASE_LINKMOUNT_LIB_DIR=$LINKEASE_LIBEXEC/linkmount_bin/lib" \
|
|
||||||
"USER_DATA_PATH=$data_root/users/admin" \
|
|
||||||
"SYSTEM_DATA_PATH=$data_root/system" \
|
|
||||||
"TEMP_PATH=$data_root/tmp"
|
|
||||||
procd_set_param respawn
|
procd_set_param respawn
|
||||||
procd_set_param stdout 1
|
procd_set_param stdout 1
|
||||||
procd_set_param stderr 1
|
procd_set_param stderr 1
|
||||||
|
|||||||
@@ -31,6 +31,5 @@ uci -q batch <<-EOF >/dev/null
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
/etc/init.d/linkeasefull enable
|
/etc/init.d/linkeasefull enable
|
||||||
/etc/init.d/linkeasefull restart
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -240,7 +240,23 @@ return view.extend({
|
|||||||
return [ fam, pr ].filter(x => x).join(' · ') || '–';
|
return [ fam, pr ].filter(x => x).join(' · ') || '–';
|
||||||
};
|
};
|
||||||
|
|
||||||
const rows = entries.slice().reverse();
|
/* Sort the whole range here, not just the page: ui.Table only ever
|
||||||
|
* orders the rows it was handed, so paging first would turn the
|
||||||
|
* headers into a per-page sort while the count below still speaks
|
||||||
|
* for every measurement. */
|
||||||
|
let rows = entries.slice().reverse();
|
||||||
|
const sorting = this.table.getActiveSortState();
|
||||||
|
|
||||||
|
if (sorting)
|
||||||
|
rows = rows
|
||||||
|
.map(L.bind(function(r) {
|
||||||
|
return [ this.table.deriveSortKey(r[sorting[0]], sorting[0]), r ];
|
||||||
|
}, this))
|
||||||
|
.sort((a, b) => sorting[1]
|
||||||
|
? -L.naturalCompare(a[0], b[0])
|
||||||
|
: L.naturalCompare(a[0], b[0]))
|
||||||
|
.map(x => x[1]);
|
||||||
|
|
||||||
const pages = Math.max(1, Math.ceil(rows.length / pageSize));
|
const pages = Math.max(1, Math.ceil(rows.length / pageSize));
|
||||||
|
|
||||||
if (this.page >= pages)
|
if (this.page >= pages)
|
||||||
@@ -312,6 +328,14 @@ return view.extend({
|
|||||||
_('Download [Mbps]'), _('Upload [Mbps]'), _('Ping [ms]'), _('Jitter [ms]')
|
_('Download [Mbps]'), _('Upload [Mbps]'), _('Ping [ms]'), _('Jitter [ms]')
|
||||||
], { id: 'librespeed-history' });
|
], { id: 'librespeed-history' });
|
||||||
this.tableNode = this.table.render();
|
this.tableNode = this.table.render();
|
||||||
|
/* The table's own handler re-sorts the page it holds; this runs
|
||||||
|
* after it and re-sorts the range, from the first page. */
|
||||||
|
this.tableNode.addEventListener('click', L.bind(function(ev) {
|
||||||
|
if (ev.target.closest('th[data-sortable-row], .th[data-sortable-row]')) {
|
||||||
|
this.page = 0;
|
||||||
|
this.redraw();
|
||||||
|
}
|
||||||
|
}, this));
|
||||||
|
|
||||||
const renderControls = L.bind(function() {
|
const renderControls = L.bind(function() {
|
||||||
const groups = lscommon.switcher(this,
|
const groups = lscommon.switcher(this,
|
||||||
|
|||||||
@@ -566,16 +566,9 @@ return view.extend({
|
|||||||
this.recentMetric = 'download_mbps';
|
this.recentMetric = 'download_mbps';
|
||||||
/* Two directions, one chart at a time: the page answers "how am I
|
/* Two directions, one chart at a time: the page answers "how am I
|
||||||
* doing" at a glance, and mixing both series would make that a
|
* doing" at a glance, and mixing both series would make that a
|
||||||
* comparison instead. History is where series get combined. */
|
* comparison instead. History is where series get combined. The
|
||||||
this.recentSwitch = lscommon.switcher(this,
|
* buttons themselves are filled by renderRecent, first call included. */
|
||||||
lscommon.GROUPS.speed.map(k => {
|
this.recentSwitch = E('div', {});
|
||||||
const m = lscommon.METRICS.find(x => x[0] == k);
|
|
||||||
return [ k, m[1] ];
|
|
||||||
}), this.recentMetric,
|
|
||||||
function(v) {
|
|
||||||
this.recentMetric = v;
|
|
||||||
this.renderRecent(this.recentData);
|
|
||||||
});
|
|
||||||
this.button = E('button', { 'class': 'cbi-button cbi-button-action' },
|
this.button = E('button', { 'class': 'cbi-button cbi-button-action' },
|
||||||
[ _('Start test') ]);
|
[ _('Start test') ]);
|
||||||
|
|
||||||
@@ -617,7 +610,13 @@ return view.extend({
|
|||||||
rows.map(r => E('tr', { 'class': 'tr' }, [
|
rows.map(r => E('tr', { 'class': 'tr' }, [
|
||||||
E('td', { 'class': 'td librespeed-muted', 'style': 'width:45%' }, [ r[0] ]),
|
E('td', { 'class': 'td librespeed-muted', 'style': 'width:45%' }, [ r[0] ]),
|
||||||
E('td', { 'class': 'td' }, [
|
E('td', { 'class': 'td' }, [
|
||||||
r[2] ? E('span', { 'class': 'librespeed-hint', 'data-tooltip': r[2] }, [ r[1] ]) : r[1]
|
r[2] ? E('span', {
|
||||||
|
/* tabindex, or the focus half of "hover or focus"
|
||||||
|
* never fires: a bare span is not in the tab order. */
|
||||||
|
'class': 'librespeed-hint',
|
||||||
|
'tabindex': '0',
|
||||||
|
'data-tooltip': r[2]
|
||||||
|
}, [ r[1] ]) : r[1]
|
||||||
])
|
])
|
||||||
])));
|
])));
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:272
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:288
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:223
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:223
|
||||||
msgid "%d measurements"
|
msgid "%d measurements"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -116,7 +116,7 @@ msgstr ""
|
|||||||
msgid "Download"
|
msgid "Download"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:312
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:328
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:563
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:563
|
||||||
msgid "Download [Mbps]"
|
msgid "Download [Mbps]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -125,11 +125,11 @@ msgstr ""
|
|||||||
msgid "Enable"
|
msgid "Enable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:628
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:627
|
||||||
msgid "Enabled"
|
msgid "Enabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:652
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:651
|
||||||
msgid ""
|
msgid ""
|
||||||
"Encrypted transfers, which on hardware without AES acceleration may bound "
|
"Encrypted transfers, which on hardware without AES acceleration may bound "
|
||||||
"the result."
|
"the result."
|
||||||
@@ -151,11 +151,11 @@ msgstr ""
|
|||||||
msgid "Every 6 hours"
|
msgid "Every 6 hours"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:381
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:405
|
||||||
msgid "Export CSV"
|
msgid "Export CSV"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:384
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:408
|
||||||
msgid "Export JSON"
|
msgid "Export JSON"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -167,11 +167,11 @@ msgstr ""
|
|||||||
msgid "Grant access to LibreSpeed measurements"
|
msgid "Grant access to LibreSpeed measurements"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:647
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:646
|
||||||
msgid "HTTP (forced)"
|
msgid "HTTP (forced)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:646
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:645
|
||||||
msgid "HTTPS (forced)"
|
msgid "HTTPS (forced)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -196,16 +196,16 @@ msgstr ""
|
|||||||
msgid "Hours"
|
msgid "Hours"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:311
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:327
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:348
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:372
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/settings.js:25
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/settings.js:25
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:509
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:509
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:642
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:641
|
||||||
msgid "Interface"
|
msgid "Interface"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/settings.js:61
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/settings.js:61
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:631
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:630
|
||||||
msgid "Interval"
|
msgid "Interval"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -214,7 +214,7 @@ msgstr ""
|
|||||||
msgid "Jitter"
|
msgid "Jitter"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:312
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:328
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:563
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:563
|
||||||
msgid "Jitter [ms]"
|
msgid "Jitter [ms]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -231,7 +231,7 @@ msgstr ""
|
|||||||
msgid "Last successful measurement"
|
msgid "Last successful measurement"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:318
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:342
|
||||||
msgid "Latency"
|
msgid "Latency"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -239,12 +239,12 @@ msgstr ""
|
|||||||
msgid "Leave empty to run every day."
|
msgid "Leave empty to run every day."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:684
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:686
|
||||||
#: applications/luci-app-librespeed/root/usr/share/luci/menu.d/luci-app-librespeed.json:3
|
#: applications/luci-app-librespeed/root/usr/share/luci/menu.d/luci-app-librespeed.json:3
|
||||||
msgid "LibreSpeed"
|
msgid "LibreSpeed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:393
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:417
|
||||||
msgid "LibreSpeed – History"
|
msgid "LibreSpeed – History"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -260,11 +260,11 @@ msgstr ""
|
|||||||
msgid "Measurement"
|
msgid "Measurement"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:376
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:400
|
||||||
msgid "Measurements"
|
msgid "Measurements"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:687
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:689
|
||||||
msgid "Measures the internet connection from this router."
|
msgid "Measures the internet connection from this router."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -280,15 +280,15 @@ msgstr ""
|
|||||||
msgid "Must be an http(s) URL"
|
msgid "Must be an http(s) URL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:286
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:302
|
||||||
msgid "Next"
|
msgid "Next"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:633
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:632
|
||||||
msgid "Next run"
|
msgid "Next run"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:628
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:627
|
||||||
msgid "No"
|
msgid "No"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -308,7 +308,7 @@ msgstr ""
|
|||||||
msgid "No measurements match the current filters."
|
msgid "No measurements match the current filters."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:368
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:392
|
||||||
msgid "No measurements yet"
|
msgid "No measurements yet"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -330,7 +330,7 @@ msgid ""
|
|||||||
"forcing plain HTTP then measures the line rather than the cipher."
|
"forcing plain HTTP then measures the line rather than the cipher."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:281
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:297
|
||||||
msgid "Page %d of %d"
|
msgid "Page %d of %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -344,23 +344,23 @@ msgstr ""
|
|||||||
msgid "Ping"
|
msgid "Ping"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:312
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:328
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:563
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:563
|
||||||
msgid "Ping [ms]"
|
msgid "Ping [ms]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:279
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:295
|
||||||
msgid "Previous"
|
msgid "Previous"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:311
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:327
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/settings.js:49
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/settings.js:49
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:518
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:518
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:645
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:644
|
||||||
msgid "Protocol"
|
msgid "Protocol"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:673
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:674
|
||||||
msgid "Recent history"
|
msgid "Recent history"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@ msgstr ""
|
|||||||
msgid "Retention"
|
msgid "Retention"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:685
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:687
|
||||||
msgid "Router speed test"
|
msgid "Router speed test"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -386,7 +386,7 @@ msgstr ""
|
|||||||
msgid "Saturday"
|
msgid "Saturday"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:657
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:656
|
||||||
msgid "Schedule status"
|
msgid "Schedule status"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -394,12 +394,12 @@ msgstr ""
|
|||||||
msgid "Scheduled measurements"
|
msgid "Scheduled measurements"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:311
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:327
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:346
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:370
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/settings.js:30
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/settings.js:30
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:507
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:507
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:562
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:562
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:643
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:642
|
||||||
msgid "Server"
|
msgid "Server"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -415,7 +415,7 @@ msgstr ""
|
|||||||
msgid "Show this series"
|
msgid "Show this series"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:318
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:342
|
||||||
msgid "Speed"
|
msgid "Speed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -427,9 +427,9 @@ msgstr ""
|
|||||||
msgid "Stable — averaged %d Mbps, ranging from %d to %d Mbps."
|
msgid "Stable — averaged %d Mbps, ranging from %d to %d Mbps."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:362
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:386
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:349
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:349
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:580
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:573
|
||||||
msgid "Start test"
|
msgid "Start test"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -445,7 +445,7 @@ msgstr ""
|
|||||||
msgid "Test"
|
msgid "Test"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:640
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:639
|
||||||
msgid "Test configuration"
|
msgid "Test configuration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -457,7 +457,7 @@ msgstr ""
|
|||||||
msgid "Thursday"
|
msgid "Thursday"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:311
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:327
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:562
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:562
|
||||||
msgid "Time"
|
msgid "Time"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -474,7 +474,7 @@ msgid ""
|
|||||||
"official list."
|
"official list."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:650
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:649
|
||||||
msgid "Unencrypted transfers, so the line is measured rather than the cipher."
|
msgid "Unencrypted transfers, so the line is measured rather than the cipher."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -488,7 +488,7 @@ msgstr ""
|
|||||||
msgid "Upload"
|
msgid "Upload"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:312
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/history.js:328
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:563
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:563
|
||||||
msgid "Upload [Mbps]"
|
msgid "Upload [Mbps]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -513,15 +513,15 @@ msgstr ""
|
|||||||
msgid "Wednesday"
|
msgid "Wednesday"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:653
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:652
|
||||||
msgid "Whichever scheme the server list provides."
|
msgid "Whichever scheme the server list provides."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:628
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:627
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:644
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:643
|
||||||
msgid "automatic (nearest)"
|
msgid "automatic (nearest)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -575,7 +575,7 @@ msgid "server %s"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/settings.js:51
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/settings.js:51
|
||||||
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:648
|
#: applications/luci-app-librespeed/htdocs/luci-static/resources/view/librespeed/test.js:647
|
||||||
msgid "server default"
|
msgid "server default"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ LUCI_DEPENDS:=+linkeasefull +luci-lib-linkeasefile
|
|||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
|
|
||||||
PKG_VERSION:=1.0.0
|
PKG_VERSION:=1.0.0
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=4
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
module("luci.controller.linkeasefull", package.seeall)
|
module("luci.controller.linkeasefull", package.seeall)
|
||||||
|
|
||||||
function index()
|
function index()
|
||||||
|
entry({"admin", "services", "linkeasefull_status"}, call("linkeasefull_status"))
|
||||||
|
entry({"admin", "services", "linkeasefull", "auth"}, call("linkeasefull_auth")).leaf = true
|
||||||
|
|
||||||
if not nixio.fs.access("/etc/config/linkeasefull") then
|
if not nixio.fs.access("/etc/config/linkeasefull") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
entry({"admin", "services", "linkeasefull"}, cbi("linkeasefull"), _("LinkEase Full"), 21).dependent = true
|
entry({"admin", "services", "linkeasefull"}, cbi("linkeasefull"), _("LinkEase Full"), 21).dependent = true
|
||||||
entry({"admin", "services", "linkeasefull_status"}, call("linkeasefull_status"))
|
|
||||||
entry({"admin", "services", "linkeasefull", "auth"}, call("linkeasefull_auth")).leaf = true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function uhttpd_has_apps_proxy_prefix()
|
local function uhttpd_has_apps_proxy_prefix()
|
||||||
@@ -62,11 +63,39 @@ local function valid_apps_return(value)
|
|||||||
if not value or value == "" then
|
if not value or value == "" then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if value == "/apps" then
|
local function valid_path(path)
|
||||||
|
if path == "/apps" then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
local prefix = value:sub(1, 6)
|
local prefix = path:sub(1, 6)
|
||||||
return prefix == "/apps/" or prefix == "/apps?" or prefix == "/apps#"
|
return prefix == "/apps/" or prefix == "/apps?" or prefix == "/apps#"
|
||||||
|
end
|
||||||
|
if value:sub(1, 1) == "/" then
|
||||||
|
return valid_path(value)
|
||||||
|
end
|
||||||
|
|
||||||
|
local scheme, authority, path = value:match("^(https?://)([^/]+)(/.*)$")
|
||||||
|
if not scheme or not authority or not valid_path(path) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local http = require "luci.http"
|
||||||
|
local uci = require "luci.model.uci".cursor()
|
||||||
|
local request_host = http.getenv("HTTP_HOST") or ""
|
||||||
|
local lan_host = uci:get("network", "lan", "ipaddr") or ""
|
||||||
|
local allowed_authorities = {
|
||||||
|
request_host,
|
||||||
|
request_host .. ":19290",
|
||||||
|
lan_host,
|
||||||
|
lan_host .. ":19290"
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, host in ipairs(allowed_authorities) do
|
||||||
|
if host ~= "" and authority == host then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local function valid_cookie_value(value)
|
local function valid_cookie_value(value)
|
||||||
|
|||||||
@@ -45,6 +45,22 @@ local function storage_mounts()
|
|||||||
return mounts
|
return mounts
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function ensure_linkease_config(uci)
|
||||||
|
if not fs.access("/etc/config/linkease") then
|
||||||
|
fs.writefile("/etc/config/linkease", "")
|
||||||
|
end
|
||||||
|
uci:load("linkease")
|
||||||
|
local section = uci:get_first("linkease", "linkease")
|
||||||
|
if not section then
|
||||||
|
section = uci:add("linkease", "linkease")
|
||||||
|
uci:set("linkease", section, "enabled", "0")
|
||||||
|
uci:set("linkease", section, "port", "8897")
|
||||||
|
uci:set("linkease", section, "allowPublic", "0")
|
||||||
|
uci:commit("linkease")
|
||||||
|
end
|
||||||
|
return section
|
||||||
|
end
|
||||||
|
|
||||||
m = Map("linkeasefull", translate("LinkEase Full"), translate("LinkEase Full uses fixed entries at port 19290 /apps/ and legacy port 8897."))
|
m = Map("linkeasefull", translate("LinkEase Full"), translate("LinkEase Full uses fixed entries at port 19290 /apps/ and legacy port 8897."))
|
||||||
|
|
||||||
m:section(SimpleSection).template = "linkeasefull_status"
|
m:section(SimpleSection).template = "linkeasefull_status"
|
||||||
@@ -55,10 +71,11 @@ s.anonymous = true
|
|||||||
|
|
||||||
s:option(Flag, "enabled", translate("Enable")).rmempty = false
|
s:option(Flag, "enabled", translate("Enable")).rmempty = false
|
||||||
|
|
||||||
local data = s:option(ListValue, "data_root_parent", translate("Storage path"), translate("Choose a mounted persistent disk. /tmp is not allowed."))
|
local data = s:option(ListValue, "_local_home", translate("Storage path"), translate("Choose a mounted persistent disk. /tmp is not allowed."))
|
||||||
data.rmempty = false
|
data.rmempty = false
|
||||||
|
|
||||||
local current = m.uci:get_first("linkeasefull", "linkeasefull", "data_root_parent") or ""
|
ensure_linkease_config(m.uci)
|
||||||
|
local current = m.uci:get_first("linkease", "linkease", "local_home") or ""
|
||||||
local has_current = false
|
local has_current = false
|
||||||
for _, mount in ipairs(storage_mounts()) do
|
for _, mount in ipairs(storage_mounts()) do
|
||||||
data:value(mount.path, mount.label)
|
data:value(mount.path, mount.label)
|
||||||
@@ -83,4 +100,15 @@ function data.validate(self, value)
|
|||||||
return value
|
return value
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function data.cfgvalue(self, section)
|
||||||
|
m.uci:load("linkease")
|
||||||
|
return m.uci:get_first("linkease", "linkease", "local_home") or ""
|
||||||
|
end
|
||||||
|
|
||||||
|
function data.write(self, section, value)
|
||||||
|
local linkease_section = ensure_linkease_config(m.uci)
|
||||||
|
m.uci:set("linkease", linkease_section, "local_home", value)
|
||||||
|
m.uci:commit("linkease")
|
||||||
|
end
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -17,7 +17,7 @@ LUCI_NAME:=luci-theme-footstrap
|
|||||||
FOOTSTRAP_VERSION?=
|
FOOTSTRAP_VERSION?=
|
||||||
ifneq ($(FOOTSTRAP_VERSION),)
|
ifneq ($(FOOTSTRAP_VERSION),)
|
||||||
PKG_VERSION:=$(FOOTSTRAP_VERSION)
|
PKG_VERSION:=$(FOOTSTRAP_VERSION)
|
||||||
PKG_RELEASE:=28
|
PKG_RELEASE:=29
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LUCI_TITLE:=Footstrap Theme
|
LUCI_TITLE:=Footstrap Theme
|
||||||
|
|||||||
@@ -338,6 +338,12 @@ let _restAt = null, _restPage = null;
|
|||||||
function pageStamp() {
|
function pageStamp() {
|
||||||
return (document.body && document.body.getAttribute('data-page')) || '';
|
return (document.body && document.body.getAttribute('data-page')) || '';
|
||||||
}
|
}
|
||||||
|
/* -> the memo is void: whoever calls this owns the offset now (see the export below) */
|
||||||
|
function forgetRest() {
|
||||||
|
_rest = null;
|
||||||
|
_restAt = null;
|
||||||
|
_restPage = null;
|
||||||
|
}
|
||||||
function rememberRest() {
|
function rememberRest() {
|
||||||
if (ENGINE_ANCHORS || scrolling()) return;
|
if (ENGINE_ANCHORS || scrolling()) return;
|
||||||
const ref = anchorRef();
|
const ref = anchorRef();
|
||||||
@@ -588,6 +594,17 @@ return baseclass.extend({
|
|||||||
scrolling,
|
scrolling,
|
||||||
deferMeasurement,
|
deferMeasurement,
|
||||||
|
|
||||||
|
/* "THE OFFSET IS MINE NOW, FORGET WHAT YOU REMEMBERED." Called by fs-router where it resets both
|
||||||
|
* scrollers for an incoming page, and it is not a courtesy — without it the correction below
|
||||||
|
* fights that reset. The router resets synchronously and stamps `body[data-page]` an await later,
|
||||||
|
* so between the two there is a window, as long as the incoming view takes to arrive, in which a
|
||||||
|
* poll tick from the OUTGOING page still fires: the offset is 0, the remembered one is where the
|
||||||
|
* reader was, nobody is scrolling and the stamp still names the page they came from — every term
|
||||||
|
* of "the engine clamped this" is true, and the reader would be dragged back down a page they
|
||||||
|
* have left, with the new page committing mid-scroll. Reported in review on the upstream
|
||||||
|
* proposal. The stamp cannot close it alone, because it is written afterwards. */
|
||||||
|
forgetRest,
|
||||||
|
|
||||||
/* Raise the stylesheet's "an unanswered table takes no room" rule. Called by the module that
|
/* Raise the stylesheet's "an unanswered table takes no room" rule. Called by the module that
|
||||||
* answers — see armGate above; nothing else may call it. */
|
* answers — see armGate above; nothing else may call it. */
|
||||||
armGate,
|
armGate,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
*
|
*
|
||||||
* WHAT THAT COST, and why the code below looks the way it does: the old location bought two timing
|
* WHAT THAT COST, and why the code below looks the way it does: the old location bought two timing
|
||||||
* guarantees for free, because LuCI evaluated the file INSIDE index.load(). Both had to be paid for
|
* guarantees for free, because LuCI evaluated the file INSIDE index.load(). Both had to be paid for
|
||||||
* explicitly — see ensureOverviewHelpers() and patchOverview() at the bottom. */
|
* explicitly — see patchOverview() below and ensureOverviewHelpers() in menu-footstrap-common.js. */
|
||||||
/* section title -> grid role. _() with NO msgctxt on purpose: these must resolve to exactly what
|
/* section title -> grid role. _() with NO msgctxt on purpose: these must resolve to exactly what
|
||||||
* luci-mod-status resolves to, or the titles stop matching. Built once — it used to cost an
|
* luci-mod-status resolves to, or the titles stop matching. Built once — it used to cost an
|
||||||
* allocation plus three _() lookups per poll tick. */
|
* allocation plus three _() lookups per poll tick. */
|
||||||
@@ -191,44 +191,10 @@ function fillSection(inc, container, res) {
|
|||||||
container.parentNode.style.display = '';
|
container.parentNode.style.display = '';
|
||||||
container.parentNode.classList.add('fade-in');
|
container.parentNode.classList.add('fade-in');
|
||||||
if (!inc.hide)
|
if (!inc.hide)
|
||||||
swapContent(container, content);
|
dom.content(container, content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* WHAT `dom.content()` DOES TO A READER TWO SCREENS DOWN, and the reason a section is filled through
|
|
||||||
* here rather than through it directly.
|
|
||||||
*
|
|
||||||
* `dom.content()` removes every child and then appends the new ones. Between those two halves the
|
|
||||||
* section has NO height, and a document that just lost several hundred pixels is a document the
|
|
||||||
* engine clamps the scroll offset into: the offset drops to whatever length is left, the section
|
|
||||||
* fills again, and nothing puts the offset back. The reader is now somewhere else, once a second,
|
|
||||||
* for as long as the Overview is open. Reported from Safari on macOS and iOS with the offset moving
|
|
||||||
* 200-887px per tick, and reproduced in WebKit with the engine's own scroll anchoring off: a 30-row
|
|
||||||
* section swapped for a 35-row one two screens above the reader moved the page 255px under them —
|
|
||||||
* 0px with the height held across the swap.
|
|
||||||
*
|
|
||||||
* fs-fit's anchoring covers the same fault from the other side (it now recognises a clamped offset
|
|
||||||
* and puts the reader back), and it has to: every OTHER page's poll calls `dom.content()` too and no
|
|
||||||
* theme code is in that path. This is the half that can be prevented rather than corrected, and
|
|
||||||
* prevention is worth the line — a correction is a scroll the reader did not ask for, and on iOS it
|
|
||||||
* lands in the middle of whatever momentum the page still has.
|
|
||||||
*
|
|
||||||
* The cost is one `offsetHeight` per filled section per tick — a forced layout, which this theme
|
|
||||||
* spends carefully (fs-fit.js). It is paid because the alternative is not "no layout" but "a layout
|
|
||||||
* whose result is the page jumping": the swap dirties this container anyway.
|
|
||||||
*
|
|
||||||
* The pin is released in the same call, so nothing is left to a later frame that could take the
|
|
||||||
* minimum with it if the next tick throws — and a section that legitimately got shorter is shorter
|
|
||||||
* again by the time this returns. */
|
|
||||||
function swapContent(container, content) {
|
|
||||||
const hold = container.offsetHeight;
|
|
||||||
const prev = container.style.minHeight;
|
|
||||||
if (hold > 0)
|
|
||||||
container.style.minHeight = hold + 'px';
|
|
||||||
try { dom.content(container, content); }
|
|
||||||
finally { if (hold > 0) container.style.minHeight = prev; }
|
|
||||||
}
|
|
||||||
|
|
||||||
let _inflight = null;
|
let _inflight = null;
|
||||||
/* WHICH containers the in-flight run is filling. The guard below is module-level because the
|
/* WHICH containers the in-flight run is filling. The guard below is module-level because the
|
||||||
* duplicate load it kills is module-level, but the frames are per RENDER — so joining a run blindly
|
* duplicate load it kills is module-level, but the frames are per RENDER — so joining a run blindly
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
'require fs-menutree as tree';
|
'require fs-menutree as tree';
|
||||||
'require fs-chrome as chrome';
|
'require fs-chrome as chrome';
|
||||||
'require fs-sheets as sheets';
|
'require fs-sheets as sheets';
|
||||||
|
'require fs-fit as fit';
|
||||||
|
|
||||||
/* ---- SPA client router ----
|
/* ---- SPA client router ----
|
||||||
*
|
*
|
||||||
@@ -1091,6 +1092,12 @@ function navigate(pathname, push, kbd) {
|
|||||||
* swap and is undone by it (see restoreScroll above), so it neither helps nor hurts, and 'manual' would only take away
|
* swap and is undone by it (see restoreScroll above), so it neither helps nor hurts, and 'manual' would only take away
|
||||||
* the case that does work — a genuine full load. */
|
* the case that does work — a genuine full load. */
|
||||||
if (push) {
|
if (push) {
|
||||||
|
/* BEFORE the two writes, and the order is the point: fs-fit keeps the offset the reader was
|
||||||
|
* last still at, so it can tell an engine's clamp from a reader who moved. This reset is
|
||||||
|
* neither, and it lands a whole require ahead of the `data-page` stamp fs-fit would otherwise
|
||||||
|
* notice it by — so a poll tick from the page being left would read the reset as a clamp and
|
||||||
|
* put the reader back on it. Told rather than inferred. */
|
||||||
|
fit.forgetRest();
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
const sc = document.getElementById('maincontent');
|
const sc = document.getElementById('maincontent');
|
||||||
if (sc) sc.scrollTo(0, 0);
|
if (sc) sc.scrollTo(0, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user