<%#
LuCI - Lua Configuration Interface
Copyright 2015 Mikeqin <Fengling.Qin@gmail.com>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

$Id$

-%>

<html>
	<head>
	<title><%:MM Upgrading%></title>
	<link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/cascade.css" />
	<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
	<script type="text/javascript">//<![CDATA[
	XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "checkupgrade")%>', null,
		function(x, st)
		{
			if (st.finish)
				location.href = '<%=luci.dispatcher.build_url("admin", "status", "mmupgrade")%>?step=3';
		})
	</script>
	</head>
	<body>
		<div id="maincontainer">
			<div id="maincontent">
				<h2><a id="content" name="content"><%:MM Upgrading ...%></a></h2>
				<fieldset class="cbi-section">
				    <p>
				    <% if finish then %>
				    <%:MM upgrade finish.%><br><br>
				    <input type="button" value=" Return to Upgrade " onclick="location.href='<%=luci.dispatcher.build_url("admin", "status", "mmupgrade")%>'" href="#"/>
				    <input type="button" value=" Cgminer Status" onclick="location.href='<%=luci.dispatcher.build_url("admin", "status", "cgminerstatus")%>'" href="#"/>
				    <% else %>
				    <img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" />
				    <%:Waiting for MM upgrading ...%>
				    </p>
				    <% end %>
				</fieldset>
			</div>
		</div>
	</body>
</html>
