{% extends 'layouts/master-page' %}
{% block title %}Error{% endblock %}
{% block content %}
  <div class="well">
    {% if status['except']=='redis-connection' %}
      <h3>This page can not be displayed due to an error</h3>
      <p>Unable to connect to Redis. Is it running on {{status['info']['host']}}:{{status['info']['port']}}?</p>
    {% elif status['except']=='hosts-found' %}
      <h3>No Hosts</h3>
      <p>There is no hosts in the Ivulncheck database.
         This could mean that ivulncheck-agent were not executed or that the database is not reachable</p>
    {% elif status['except']=='host-found' %}
      <h3>No Host {{ status['info']['host'] }}</h3>
      <p>There is no host {{ status['info']['host'] }} in the Ivulncheck database.
         This could mean that ivulncheck-agent was not executed on {{ status['info']['host'] }} or that the database is not reachable</p>
    {% elif status['except']=='vulns-found' %}
      <h3>No Vulns</h3>
      <p>There is no vulns in the Ivulncheck database.
         This could mean that vulnerability check was not launched or that the database is not reachable</p>
    {% elif status['except']=='fixes-found' %}
    <h3>No Fixes</h3>
      <p>There is no fixes in the Ivulncheck database.
         This could mean that fix check was not launched or that the database is not reachable</p>
    {% elif status['except']=='host-vulns-found' %}
      <h3>No Vulns on Host {{ status['info']['host'] }}</h3>
      <p>There is no vulns for host {{ status['info']['host'] }} in the Ivulncheck database.
         This could mean that ivulncheck-agent was not executed on {{ status['info']['host'] }} or that vulnerability check was not launched after Host {{ status['info']['host'] }} was inserted or that the database is not reachable</p>
    {% elif status['except']=='host-fixes-found' %}
      <h3>No Fixes on Host {{ status['info']['host'] }}</h3>
      <p>There is no fixes for host {{ status['info']['host'] }} in the Ivulncheck database.
         This could mean that Host {{ status['info']['host'] }} is up to date and there is no unfixed vulnerability (impossible) ivulncheck-agent was not executed on {{ status['info']['host'] }} or that fix check was not launched after Host {{ status['info']['host'] }} was inserted or that the database is not reachable</p>
    {% elif status['except']=='api-error' %}
      <h3>Ivulncheck API Error</h3>
      <p>Unable to get response to Ivulncheck API : {{status['info']}}</p>
    {% endif %}
  </div>
{% endblock %}
