summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2018-07-28 19:02:35 +0200
committerDirk Brenken <dev@brenken.org>2018-07-28 19:02:35 +0200
commit11cd64e08e3b69371ed61459f5118c7a48a7f846 (patch)
tree1da5d68ace19dc8fda8061e12e428396b1fe8ff7 /applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm
parent39cabc03611369d7cb421b5fcff90ce20d9d51c4 (diff)
luci-app-travelmate: sync with travelmate 1.2.1
* Runtime Information, Logview and Station Overview are now dynamically updated via XHR poll * New runtime information for "Faulty Stations" (Travelmate backend will no longer rename faulty uplinks) * Add a new "Restart" button to reset "Faulty Stations" information and trigger a Travelmate restart * In Stations overview the currently used uplink is emphasized in blue, faulty uplinks in red * Numerous cleanups (e.g. space=>tab indentation) and other small fixes Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm')
-rw-r--r--applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm45
1 files changed, 38 insertions, 7 deletions
diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm
index c40bdeeb59..4457296f54 100644
--- a/applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm
+++ b/applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm
@@ -5,16 +5,47 @@ This is free software, licensed under the Apache License, Version 2.0
<%+header%>
+<style type="text/css">
+ select[readonly],
+ textarea[readonly]
+ {
+ width: 100%;
+ height: 450px;
+ border: 1px solid #cccccc;
+ padding: 5px;
+ font-size: 12px;
+ font-family: monospace;
+ resize: none;
+ pointer-events: auto;
+ cursor: auto;
+ }
+</style>
+
+<script type="text/javascript">
+//<![CDATA[
+ function log_update()
+ {
+ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "travelmate", "logread")%>', null,
+ function(x)
+ {
+ if (!x)
+ {
+ return;
+ }
+ var view = document.getElementById("view_id");
+ view.value = x.responseText;
+ view.scrollTop = view.scrollHeight;
+ });
+ }
+ window.onload = log_update();
+//]]>
+</script>
+
<div class="cbi-map">
<div class="cbi-section">
- <div class="cbi-section-descr"><%:This form shows the syslog output, pre-filtered for travelmate related messages only.%></div>
- <textarea id="logread_id" style="width: 100%; height: 450px; border: 1px solid #cccccc; padding: 5px; font-size: 12px; font-family: monospace; resize: none;" readonly="readonly" wrap="off" rows="<%=content:cmatch("\n")+2%>"><%=content:pcdata()%></textarea>
+ <div class="cbi-section-descr"><%:The syslog output, pre-filtered for travelmate related messages only.%></div>
+ <textarea id="view_id" readonly="readonly" wrap="off" value=""></textarea>
</div>
</div>
-<script type="text/javascript">
- var textarea = document.getElementById('logread_id');
- textarea.scrollTop = textarea.scrollHeight;
-</script>
-
<%+footer%>