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