#parse('/templates/base/header.vm')

<script type="text/javascript">
    $(document).ready(function() {
        var statusUrl = "http://status.cometserver.eu/";

        var instances = [
            #foreach( $instance in $instances ) #if($foreach.index>  0),#end "$instance.id" #end
        ];

        for (var i = 0; i < instances.length; i++) {
            var instance = instances[i];

            $('.instance-' + instance).addClass("label label-success");
            $('.instance-' + instance).html("Online");
        }
    });
</script>

<div class="row">
    <div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading"><b>My Instances</b></div>
            <ul class="list-group">
                #foreach($instance in $instances)
                    <a href="/instance/$instance.id">
                        <li class="list-group-item">
                            $instance.name &nbsp; &nbsp;<span class="instance-$instance.id"></span>
                        </li>
                    </a>
                #end
            </ul>
        </div>
    </div>
    <div class="col-md-8">
        <div class="row">
            <div class="col-sm-6 col-md-4">
                <div class="well">
                    <center><b>x</b> open tickets</center>
                </div>
            </div>

            <div class="col-sm-6 col-md-4">
                <div class="well">
                    <center><b>x</b> active instances</center>
                </div>
            </div>

            <div class="col-sm-6 col-md-4">
                <div class="well">
                    <center><b>x,xxx</b> players online</center>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading"><b>Notifications</b></div>
            <div class="panel-body">
                You have no unread notifications.
            </div>
        </div>
    </div>

#include('/templates/base/footer.vm')