{% extends "admin/base.html" %}
{% load admin_static %}

{% block extrahead %}
<link rel="stylesheet"  href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="{% static 'suit/css/suit.css' %}" media="all">
<link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/css/jquery.dataTables_themeroller.css">
<link rel="stylesheet" type="text/css" href="{% static 'xos.css' %}" media="all">
{% if XOS_BRANDING_CSS %}
    <link rel="stylesheet" type="text/css" href="{{ XOS_BRANDING_CSS }}">
{% endif %}
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>


<!-- no need to include jquery here as it's already included by base.html. Including it multiple times will break mtuity statistics. -->
<!-- src="http://code.jquery.com/jquery-1.9.1.js" -->

<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="{% static 'log4javascript-1.4.6/log4javascript.js' %}"></script>
<script src="{% static 'js/Leaflet.MakiMarkers.js' %}" > </script>
  
<script>
  $(function() {
    $( "#hometabs" ).tabs({active: 0, //event: "mouseover"
      //collapsible: true
    });
  });

var consoleAppender = new log4javascript.BrowserConsoleAppender();
var patternLayout = new log4javascript.PatternLayout("%d{HH:mm:ss,SSS} %l{s:l} %-5p - %m{1}%n");
consoleAppender.setLayout(patternLayout);
//var log  = log4javascript.getDefaultLogger();
var log  = log4javascript.getRootLogger();
log.addAppender(consoleAppender);
log.setLevel(log4javascript.Level.ERROR);

function confirmDialog(title,msg) {
    var dialog = $('<div>'+msg+'</div>');
    var def = $.Deferred();

    $(dialog).dialog({
        resizable: false,
        title: title,
        autoOpen: true,
        modal: true,
        dialogClass: "dashboard-hpc-instance",
        buttons: {
            'OK': function() {
                def.resolve();
                log.debug("Chose to add a instance");
                $( this ).dialog( "close" );
            },
            'Cancel': function() {
                def.reject();
                $( this ).dialog( "close" );
            }
        },
        close: {
        }
    });
    return def.promise();
}

function errorDialog(title,msg) {
    var dialog = $('<div>'+msg+'</div>');
    var def = $.Deferred();

    $(dialog).dialog({
        resizable: false,
        title: title,
        autoOpen: true,
        modal: true,
        dialogClass: "dashboard-hpc-instance",
        buttons: {
            'OK': function() {
                def.resolve();
                $( this ).dialog( "close" );
            },
        },
        close: {
        }
    });
    return def.promise();
}

</script>
{% endblock %}

{% block content %}
dashboard goes here
{% endblock %}
