{% extends "base.html" %}

{% block content %}
<div class="row">
    <div class="large-12 columns">
        <h2>Tableau de bord</h2>
    </div>
</div>

<div class="row">
    <div class="large-6 columns">
        <h3>Alertes</h3>
        <div class="panel">Ici les news de santé des serveurs, etc.</div>
    </div>
    <div class="large-6 columns">
        <h3>Stats</h3>
        <div class="panel">Use MOAR bandwidth !</div>
    </div>
    <div class="large-6 columns">
        <h3>News d'Illyse</h3>
        <div class="panel" id="feed_isp"><i class="fa fa-spinner fa-spin"></i>
 Chargement en cours</div>
    </div>
    <div class="large-6 columns">
        <h3>News de FFDN</h3>
        <div class="panel" id="feed_ffdn"><i class="fa fa-spinner fa-spin"></i>
 Chargement en cours</div>
    </div>
</div>

{% endblock %}


{% block js %}
    {{ block.super }}
    <script>
    $(function() {
        $.ajax({
            url: "{% url 'feed' feed_name='isp' %}",
        }).done(function(html) {
            $('#feed_isp').html(html);
        }).fail(function() {
            $('#feed_ffdn').html('Erreur lors du chargement du flux');
        });
        $.ajax({
            url: "{% url 'feed' feed_name='ffdn' %}",
        }).done(function(html) {
            $('#feed_ffdn').html(html);
        }).fail(function() {
            $('#feed_ffdn').html('Erreur lors du chargement du flux');
        });
    });
    </script>
{% endblock js %}
