<!DOCTYPE html>
<html>
    <head>
	  <meta charset="utf-8">
	  <title>OpenJudge</title>
	  <meta name="viewport" content="width=device-width, initial-scale=1">
	  <link rel="stylesheet" href="/static/normalize.css">
	  <link rel="stylesheet" href="/static/skeleton.css">
	  <script src="/static/jquery.js"></script>
	</head>
    <body>
        <div class='container'>
            <div class='row'>
                <div class='twelve columns'>
                    <b>OpenJudge</b>  -- [
                    <a href='/'>Home</a> ]
                </div>
            </div>
        <hr>
        </div>
        <div class='container'>
            % if available:
                <button id='refresh_button' class='.button-primmary'>Refresh</button>
                <div class='row'>
                    <img src='/static/traffic.png' alt='Attempt Traffic vs Time plots' width=400 />
                    <img src='/static/question.png' alt='Percent test cases passed violin plots for questions' width=400 />
                </div>
                <script>
                    $( document ).ready(function() {
                        $('#refresh_button').click(function (){
                            $.get('/update_analysis');
                            location.reload();
                        });
                    });
                </script>
            % else:
            <div>
                Analysis is not available due to lack of <b>pandas</b> and/or <b>matplotlib</b>. Please install them in the openJudge environment to make use of analysis.

                <pre> pip install openjudge[analysis] </pre> may be used to install the full openJudge.
            </div>
            % end
        </div>
    </body>
</html>
