{% extends "fmd_base.html" %}
{% block content %}

<div class="card mb-3">
  <div class="card-header"><h4>Configuration settings</h4></div>
  <div class="card-body">
    <div class="table-responsive">
      <table class="table table-striped table-bordered table-hover">
        <tr>
          <td><b>Dashboard link</b></td>
            <td><a href="{{ url_for(details.link + '.index') }}">/{{ details.link }}</a></td>
        </tr>
        <tr>
          <td><b>Measurements database</b></td>
          <td>{{ config.database_name }}</td>
        </tr>
        <tr>
          <td><b>Location of tests of monitored app</b></td>
          <td>{{ config.test_dir if config.test_dir != None else "Unspecified" }}</td>
        </tr>
        <tr>
          <td><b>Username</b></td>
          <td>{{ config.username }}</td>
        </tr>
        <tr>
          <td><b>Password</b></td>
          <td>{{ '*' * config.password|length }}</td>
        </tr>
        <tr>
          <td><b>Guest username</b></td>
          <td>{{ config.guest_username }}</td>
        </tr>
        <tr>
          <td><b>Guest password</b></td>
          <td>{{ config.guest_password }}</td>
        </tr>
        <tr>
          <td><b>Collecting outlier data?</b></td>
          <td>{% if config.outliers_enabled %}
              Yes, with outlier_detection_constant = {{ config.outlier_detection_constant }}
              {% else %}No
          {% endif %}</td>
        </tr>
        <tr>
            <td><b>Security token</b></td>
            <td>{{ '*' * config.security_token|length }}</td>
        </tr>
        <tr>
          <td><b>Custom endpoint colors</b></td>
          <td>{% for key, value in config.colors.items() %}
              {{ key }}: {{ value }}<br />
          {% endfor %}</td>
        </tr>
      </table>
    </div>
  </div>
</div>

<div class="card mb-3">
  <div class="card-header"><h4>Deployment details</h4></div>
  <div class="card-body">
    <div class="table-responsive">
      <table class="table table-striped table-bordered table-hover">
        <tr>
          <td><b>Current deployed version</b></td>
          <td>{{ details['config-version'] }}</td>
        </tr>
        <tr>
          <td><b>Monitoring Dashboard version</b></td>
          <td>{{ details['dashboard-version'] }}</td>
        </tr>
        <tr>
          <td><b>Measurements database</b></td>
          <td>{{ config.database_name }}</td>
        </tr>
        <tr>
          <td><b>First Request</b></td>
          <td>{{ details['first-request'] }}</td>
        </tr>
      </table>
    </div>
  </div>
</div>

{% endblock %}