{% extends "distributed/base_manage.html" %}
{% load i18n %}
{% load staticfiles %}

{% block headcss %}{{ block.super }}
    <link rel="stylesheet" type="text/css" href="{% static 'css/updates/base.css' %}" />
{% endblock headcss %}

{% block headjs %}{{ block.super }}
    <script type="text/javascript">
        var GET_SERVER_INFO_URL = "{% url 'get_server_info' %}";
        var UPDATE_SOFTWARE_URL = "{% url 'start_update_kalite' %}" 
    </script>
    <script type="text/javascript" src="{% static 'js/updates/base.js' %}"></script>

    <script type="text/javascript" >
    {% if not debug %}
        (function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,"script","//www.google-analytics.com/analytics.js","ga");

        ga("create", "UA-36937407-3", {"cookieDomain": "none"});

        ga("set", "dimension1", "{% if is_registered %}Registered{% else %}Unregistered{% endif %}");
        ga("set", "dimension2", "{% if zone_id %}{{ zone_id }}{% endif %}");
        ga("set", "dimension3", "{{ device_id }}");

        {% block ga_setmetrics %}
        {% endblock ga_setmetrics %}

        ga("send", "pageview");
    {% endif %}

        function ga_track() {
            if (_.isFunction(window.ga)) {
                ga.apply(this, arguments);
            }
        }
    </script>
{% endblock headjs %}
