a2336f76a744453c57680502afb40a96af928ee0
[project/luci.git] / applications / luci-minidlna / luasrc / view / minidlna_status.htm
1 <%- luci.i18n.loadc("minidlna") -%>
2
3 <script type="text/javascript">//<![CDATA[
4 XHR.poll(5, '<%=luci.dispatcher.build_url("admin/services/minidlna_status")%>', null,
5 function(x, st)
6 {
7 var tb = document.getElementById('minidlna_status');
8 if (st && tb)
9 {
10 if (st.running)
11 {
12 tb.innerHTML = String.format(
13 '<%:The miniDLNA service is active, serving %d audio, %d video and %d image files.%>',
14 st.audio, st.video, st.image
15 );
16 }
17 else
18 {
19 tb.innerHTML = '<em><%:The miniDLNA service is not running.%></em>';
20 }
21 }
22 }
23 );
24 //]]></script>
25
26 <fieldset class="cbi-section">
27 <legend><%:miniDLNA Status%></legend>
28 <p id="minidlna_status">
29 <em><%:Collecting data...%></em>
30 </p>
31 </fieldset>