{% extends "inc/base.j2" %}
{% block content %}

<div class="page-header">
  <h2>state</h2>
  <nav><a href="/api/system/state/toml">view toml</a></nav>
</div>

<table>
  <thead>
    <tr>
      <th>key</th>
      <th>value</th>
      <th>persistent</th>
      <th>actions</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> ·
        <a href="/system/state/{{ key }}">update</a> ·
        {% 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 %}
