<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr" >
<head>
    <title>{{ sw_version }}</title>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <style type="text/css">html, body.{{ DOJANGO.THEME }} { width: 100%; height: 100%; }</style>
    <script type="text/javascript">
        var dojoConfig = {
            'isDebug':true,
            'parseOnLoad':true,
            'baseUrl':"{{ DOJANGO.DOJO_URL }}",
            'async': true,
            'packages': [
            {name: "freeadmin", location: "../../../../../static/lib/js/freeadmin"},
            {name: "dgrid", location: "../../../../../static/lib/js/dgrid"},
            {name: "xstyle", location: "../../../../../static/lib/js/xstyle"},
            {name: "put-selector", location: "../../../../../static/lib/js/put-selector"}
            ]
        };
    </script>
    <script type="text/javascript" src="{{ DOJANGO.DOJO_URL }}/dojo.js"></script>
<link href="{{ STATIC_URL }}favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="stylesheet" href="{{ STATIC_URL }}css/template.css" type="text/css" />
<script type="text/javascript">

require([
    "dojo",
    "dojo/ready",
    "dojo/request/xhr",
    "dojo/_base/html",
    "dijit/MenuItem",
    "dijit/PopupMenuItem",
    "dijit/form/Button",
    "dijit/layout/ContentPane",
    "dijit/layout/BorderContainer",
    ], function(dojo, ready, xhr) {

    ready(function() {

        checkRunning = function() {

            xhr.get('/legacy/', {
                sync: true
            }).then(function(data) {
                window.location = '/legacy/';
            }, function(err) {
                setTimeout('checkRunning()', 3000);
            });

        }

        setTimeout(function() {
            xhr.get('/legacy/system/reboot/run/', {
                sync: true
            }).then(function(a1) {
                setTimeout('checkRunning()', 10000);
            }, function(a1) {
                setTimeout('checkRunning()', 10000);
            });
        }, 1000);

    });

});

</script>
</head>
<body class="{{ DOJANGO.THEME }}" style="background:none repeat scroll 0 0 #ECEFF0;">

    <div id="main" data-dojo-type="dijit.layout.BorderContainer" style="width:100%;height:100%;" data-dojo-props="gutters: false, baseClass: 'NoGutter'">
		<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'top', gutters: false">
                <div id="page-header">
                    <div>
                        <a href="/legacy/" title="{{ sw_name }}"><img src="{{ STATIC_URL }}images/ui/{{ sw_name|lower }}-logo.png" alt="{{ sw_name }}" /></a>
                    </div>
                </div>
	    </div>
		<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'center'" style="padding: 10px;">
            <h1>{% trans "System is rebooting" %}</h1>
		</div>
	</div>

</body>
</html>
