{% extends "layout.html" %} {% set active_page = "dependencies" %} {% set help_page = ["dependencies", _('Dependencies')] %} {% block title %} - {{_('Dependencies')}}{% endblock %} {% block head %} {% if install_in_progress == 1 %} {% endif %} {% endblock %} {%- block body %}
{% include 'flash_messages.html' %}

{{_('Dependencies')}}

{{_('Several software dependencies used by Mycodo features may be disabled. This is done to speed up the initial installation process. This page can be used to determine which dependencies are installed and the ability to install currently unmet dependencies.')}}

{% if device != '0' %}

Device: {{device}}

{% if device_unmet_dependencies %} {% if install_in_progress == 1 %}

The install has been initiated for the following dependencies:

The Dependency Install Log below will refresh every 5 seconds. Wait until all dependencies have been installed to attempt to add the associated device again. You will know the entire install process have completed by "#### All Dependencies have been installed." appearing at the end of the log.

If there's an issue with the install and you need to reset the install state, delete ~/Mycodo/.dependency to restore dependency install functionality.



      {% else %}

    

There were unmet dependencies encountered when adding the following device: {{device}}

The Unmet dependencies are the following python modules:

To install these dependencies, click the Install button below and wait for the install to complete before attempting to add the device again.

{{form_dependencies.csrf_token}} {{form_dependencies.device(class_='form-control', value=device)}}
{{form_dependencies.install(class_='form-control btn btn-default')}}
{% endif %} {% else %}

All dependencies have been installed for this device.

{% endif %}

Return to device list

{% else %} {% if unmet_list %}

Some dependencies are not currently met

The following list contains dependencies that are not currently installed and the devices that use them. If you require the use of a feature that has one or more unmet dependencies, you must install them before being able to use the feature. Select a device name to view information about its depenencies and the option to install them.

{% for each_dep, devices in unmet_list.items()|sort(case_sensitive=False) %} {% endfor %}
# Dependency Mycodo Feature(s)
{{loop.index}} {{each_dep}} {% for each_device in devices %}{{each_device}}{% if not loop.last %} ,{% endif %}{% endfor %}
{% endif %} {% if unmet_exist %}

List of devices with unmet dependencies

{% for each_device, dependencies in unmet_dependencies.items()|sort(case_sensitive=False) if dependencies %}
{{each_device}}: {% for each_dep in dependencies %}{{each_dep}}{% if not loop.last %} ,{% endif %}{% endfor %}
{% endfor %}
{% else %}

All dependencies are currently installed

{% endif %} {% if met_exist %}

List of devices that have all dependencies installed

{% for each_device in met_dependencies|sort(case_sensitive=False) %}
{{each_device}}
{% endfor %}
{% endif %} {% endif %}
{% endblock -%}