{% extends "inc/base.j2" %}
{% block content %}
  <nav>
    <ul>
      <li><h3>state</h3></li>
      <li><a href="/api/system/state/toml">view</a></li>
    </ul>
  </nav>

  <table>
    <thead>
    <tr>
      <th>key</th>
      <th>value</th>
      <th>persistent</th>
      <th>toml</th>
      <th>update</th>
      <th>view</th>
    </tr>
    </thead>
    <tbody>
    {% for key, value in info.state.items() %}
      <tr>
        <td title="{{ info.descriptions[key] | escape }}">{{ key }}</td>
        <td>
          {{ value | string | truncate(119) }}
        </td>
        <td>{{ info.persistent[key] | yes_no }}</td>
        <td><a href="/api/system/state/{{ key }}/toml">toml</a></td>
        <td><a href="/system/state/{{ key }}">update</a></td>
        <td>
          {% if info.persistent[key] %}
            <a href="/api/system/state/{{ key }}">db</a>
          {% endif %}
          <a href="/api/system/state/{{ key }}/value">value</a>
        </td>
      </tr>
    {% endfor %}
    </tbody>
  </table>

{% endblock %}
