Merge pull request #2193 from rosysong/freespace
[oweals/luci.git] / applications / luci-app-travelmate / luasrc / view / travelmate / logread.htm
1 <%#
2 Copyright 2017-2018 Dirk Brenken (dev@brenken.org)
3 This is free software, licensed under the Apache License, Version 2.0
4 -%>
5
6 <%+header%>
7
8 <style type="text/css">
9         select[readonly],
10         textarea[readonly]
11         {
12                 width: 100%;
13                 height: 450px;
14                 border: 1px solid #cccccc;
15                 padding: 5px;
16                 font-size: 12px;
17                 font-family: monospace;
18                 resize: none;
19                 pointer-events: auto;
20                 cursor: auto;
21         }
22 </style>
23
24 <script type="text/javascript">
25 //<![CDATA[
26         function log_update()
27         {
28                 XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "travelmate", "logread")%>', null,
29                 function(x)
30                 {
31                         if (!x)
32                         {
33                                 return;
34                         }
35                         var view       = document.getElementById("view_id");
36                         view.value     = x.responseText;
37                         view.scrollTop = view.scrollHeight;
38                 });
39         }
40         window.onload = log_update();
41 //]]>
42 </script>
43
44 <div class="cbi-map">
45         <div class="cbi-section">
46                 <div class="cbi-section-descr"><%:The syslog output, pre-filtered for travelmate related messages only.%></div>
47                 <textarea id="view_id" readonly="readonly" wrap="off" value=""></textarea>
48         </div>
49 </div>
50
51 <%+footer%>