summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-minidlna/luasrc/view/minidlna_status.htm
blob: ba23bedcc421494116f511b1b01233dd5ca6a9f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<script type="text/javascript">//<![CDATA[
	XHR.poll(5, '<%=luci.dispatcher.build_url("admin/services/minidlna_status")%>', null,
		function(x, st)
		{
			var tb = document.getElementById('minidlna_status');
			if (st && tb)
			{
				if (st.running)
				{
					tb.innerHTML = String.format(
						'<%:The miniDLNA service is active, serving %d audio, %d video and %d image files.%>',
							st.audio, st.video, st.image
					);
				}
				else
				{
					tb.innerHTML = '<%:The miniDLNA service is not running.%>';
				}
			}
		}
	);
//]]></script>

<fieldset class="cbi-section">
	<legend><%:miniDLNA Status%></legend>
	<p id="minidlna_status">
		<em><%:Collecting data...%></em>
	</p>
</fieldset>