mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 19:14:34 +04:00
luci-app-travelmate: update 2.3.0-2
* fix a small issue in the new log-template
Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit adf9e685ec)
This commit is contained in:
@@ -7,7 +7,7 @@ LUCI_TITLE:=LuCI support for Travelmate
|
||||
LUCI_DEPENDS:=+luci-base +luci-lib-uqr +travelmate
|
||||
|
||||
PKG_VERSION:=2.3.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
||||
|
||||
|
||||
@@ -18,9 +18,7 @@ function Logview(logtag, name) {
|
||||
const logEl = document.getElementById('logfile');
|
||||
if (!logEl) return;
|
||||
|
||||
const entries = res?.log ?? [];
|
||||
if (entries.length > 0) {
|
||||
const filtered = entries
|
||||
const filtered = (res?.log ?? [])
|
||||
.filter(entry => !logtag || entry.msg.includes(logtag))
|
||||
.map(entry => {
|
||||
const d = new Date(entry.time);
|
||||
@@ -37,6 +35,7 @@ function Logview(logtag, name) {
|
||||
});
|
||||
return `[${date}-${time}] ${entry.msg}`;
|
||||
});
|
||||
if (filtered.length > 0) {
|
||||
logEl.value = filtered.join('\n');
|
||||
} else {
|
||||
logEl.value = _('No %s related logs yet!').format(name);
|
||||
|
||||
Reference in New Issue
Block a user