{% extends "base_layout.html" %}
{% block body %}
  <div class="be-wrapper be-fixed-sidebar">
    <nav class="navbar navbar-default navbar-fixed-top be-top-header">
      <div class="container-fluid">
        <div class="navbar-header"><a href="{{ url_for('index') }}" class="navbar-brand"></a></div>
        <div class="be-right-navbar">
          <div class="page-title"><span>Packy Agent</span>{% if is_upgrade_in_progress() %} (upgrading...){% endif %}</div>
          <div class="nav navbar-nav navbar-right be-icons-nav">
            <form method="post" action="{{ url_for('logout') }}">
              <button type="submit" class="btn btn-space btn-link">Log out</button>
            </form>
          </div>
        </div>
      </div>
    </nav>
    <div class="be-left-sidebar">
      <div class="left-sidebar-wrapper"><a href="{{ url_for('index') }}" class="left-sidebar-toggle">Dashboard</a>
        <div class="left-sidebar-spacer">
          <div class="left-sidebar-scroll">
            <div class="left-sidebar-content">
              <ul class="sidebar-elements">
                <li class="divider">Menu</li>
                <li class="{% if active_menu_item == 'status' %}active{% else %}title{% endif %}"><a href="{{ url_for('index') }}"><i class="icon mdi mdi-home"></i><span>Status</span></a></li>
                {% if not is_inside_docker_container %}
                  <li class="{% if active_menu_item == 'network' %}active{% else %}title{% endif %}"><a href="{{ url_for('network') }}"><i class="icon mdi mdi-settings"></i><span>Network</span></a></li>
                {% endif %}
                <li class="{% if active_menu_item == 'control' %}active{% else %}title{% endif %}"><a href="{{ url_for('control') }}"><i class="icon mdi mdi-dot-circle"></i><span>Control</span></a></li>
                <li class="{% if active_menu_item == 'upgrade' %}active{% else %}title{% endif %}"><a href="{{ url_for('upgrade') }}"><i class="icon mdi mdi-download"></i><span>Upgrade</span></a></li>
                <li class="{% if active_menu_item == 'reset' %}active{% else %}title{% endif %}"><a href="{{ url_for('reset') }}"><i class="icon mdi mdi-refresh"></i><span>Reset</span></a></li>
                {% if is_debug_mode %}
                  <li class="{% if active_menu_item == 'debug' %}active{% else %}title{% endif %}"><a href="{{ url_for('debug') }}"><i class="icon mdi mdi-laptop"></i><span>Debug</span></a></li>
                {% endif %}
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="be-content">
      <div class="main-content container-fluid">
          {% block content %}
          {% endblock %}
      </div>
    </div>
  </div>
{% endblock %}
