{% extends "base.html" %}

{% set title = "Riego - System" %}
{% set active_menu = "system" %}


{% block content %}


{% if text is defined %}
<div id='test'>
  <pre>
    {{text}}
  </pre>
</div>

{% endif %}

{% if user is not none %}
    <p>
       Mittels {{user['provider']}} angemeldet als: {{user['identity']}}
    </p>
{% endif %}


{% if cloud_url is defined %}
    <h2>Cloud</h2>
    {% if cloud_url is none %}
    <p>
        Cloud ist nicht verbunden
    </p>
    {% else %}
    <p>
        Die Cloud ist unter <a href="{{cloud_url}}" target="_parent">{{cloud_url}}</a> erreichbar.
    </p>
    {% endif %}

    <form action="{{url('system_cloud') }}" method="POST"
    enctype="multipart/form-data">
    <input name="csrf_token" type="hidden" value="{{csrf_token}}">
    <input type="submit">
    </form>


{% else %}
<p>
    <a href="{{url('system_cloud')}}">Check Cloud</a>
</p>
{% endif %}






<p>
  <a href="{{url('system_check_update')}}">Check Update</a>
</p>

<p>
  <a href="{{url('system_do_update')}}">Do Update</a>
</p>

<p>
  <a href="{{url('system_restart')}}">Restart</a>
</p>

<p>
  <a href="{{url('system_log_file')}}" target="_blank">View log file</a>
</p>

<p>
  <a href="{{url('system_parameters')}}">Parameter</a>
</p>
  
<p>
   <a href="{{url('users')}}">User</a>
</p>
  

{% endblock %}

