mirror of
https://git.openwrt.org/project/luci.git
synced 2025-12-20 08:49:59 +08:00
luci-app-travelmate: update 2.3.0-2
Some checks failed
LuCI repo CodeQL Analysis / Analyze JavaScript and JSON (javascript-typescript) (push) Has been cancelled
Some checks failed
LuCI repo CodeQL Analysis / Analyze JavaScript and JSON (javascript-typescript) (push) Has been cancelled
* fix a small issue in the new log-template Signed-off-by: Dirk Brenken <dev@brenken.org>
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,25 +18,24 @@ function Logview(logtag, name) {
|
||||
const logEl = document.getElementById('logfile');
|
||||
if (!logEl) return;
|
||||
|
||||
const entries = res?.log ?? [];
|
||||
if (entries.length > 0) {
|
||||
const filtered = entries
|
||||
.filter(entry => !logtag || entry.msg.includes(logtag))
|
||||
.map(entry => {
|
||||
const d = new Date(entry.time);
|
||||
const date = d.toLocaleDateString([], {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit'
|
||||
});
|
||||
const time = d.toLocaleTimeString([], {
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
hour12: false
|
||||
});
|
||||
return `[${date}-${time}] ${entry.msg}`;
|
||||
});
|
||||
const filtered = (res?.log ?? [])
|
||||
.filter(entry => !logtag || entry.msg.includes(logtag))
|
||||
.map(entry => {
|
||||
const d = new Date(entry.time);
|
||||
const date = d.toLocaleDateString([], {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit'
|
||||
});
|
||||
const time = d.toLocaleTimeString([], {
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
hour12: false
|
||||
});
|
||||
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