#from Plugins.Extensions.OpenWebif.local import tstrings
<body>
	<div data-role="page" id="mainPage">
		<div id="header">
			<div class="button" onClick="history.back()">$tstrings['back']</div>
			<h1><a style="color:#FFF;text-decoration:none;" href='/mobile'>OpenWebif</a></h1>
		</div>
		<div id="contentContainer">
			<div id="mainContent" class="ui-corner-all">
			
			<table width="100%" border="0" cellspacing="1" cellpadding="5">
				<tr>
					<td style="width: 30px;">$tstrings['snr']:</td>
					<td>
						<div class="ui-btn-down-d ui-btn-corner-all" style="height: 22px;">
							<div name="snrslider" id="snrslider" class="ui-btn-up-b ui-btn-corner-all ui-shadow" style="width: 0%; height: 20px; text-align: center;">0</div>
						</div>
					</td>
				</tr>
				<tr>
					<td style="width: 30px;">$tstrings['agc']:</td>
					<td>
						<div class="ui-btn-down-d ui-btn-corner-all" style="height: 22px;">
							<div name="agcslider" id="agcslider" class="ui-btn-up-b ui-btn-corner-all ui-shadow" style="width: 0%; height: 20px; text-align: center;">0</div>
						</div>
					</td>
				</tr>
				<tr>
					<td style="width: 30px;">$tstrings['ber']:</td>
					<td>
						<div class="ui-btn-down-d ui-btn-corner-all" style="height: 22px;">
							<div name="berslider" id="berslider" style="width: 100%; height: 20px; text-align: center;">0</div>
						</div>
					</td>
				</tr>
			</table>

			</div>
		</div>
		
		<div id="footer">
			<p>OpenWebif Mobile</p>
			<a onclick="document.location.href='/index?mode=fullpage';return false;" href="#">$tstrings['show_full_openwebif']</a>
		</div>

	<script>
	function getFrontendStatus() {
		jQuery.getJSON('/api/signal')
		.success(function(statusinfo) {
			 jQuery('#snrslider').css('width', statusinfo['snr']+'%').html(statusinfo['snr']+'%');
			 jQuery('#agcslider').css('width', statusinfo['agc']+'%').html(statusinfo['agc']+'%');
			 jQuery('#berslider').css('width', '100%').html(statusinfo['ber']);
			 setTimeout("getFrontendStatus()", 5000);
		});
		return true;
	}
	getFrontendStatus();
	</script>
	</div>
</body>
</html>
