{% load i18n %}
<div class="djDebugPanelTitle">
  <h3>{% translate "Explain Results" %}</h3>
  <button type="button" class="djDebugClose">»</button>
</div>
<div class="djDebugPanelContent">
  <div class="djdt-scroll">
    <dl>
      <dt>{% translate "Executed MQL" %}</dt>
      <dd><pre style="margin: 0; white-space: pre-wrap; word-wrap: break-word;">{{ mql }}</pre></dd>
      <dt>{% translate "Time" %}</dt>
      <dd>{{ duration|floatformat:"3" }} ms</dd>
      <dt>{% translate "Database" %}</dt>
      <dd>{{ alias }}</dd>
    </dl>
    {% if result %}
      <h4>{% translate "Explain Results" %}</h4>
      {% for row in result %}
        {% for item in row %}
          <pre style="margin: 0; white-space: pre-wrap; word-wrap: break-word;">{{ item }}</pre>
        {% endfor %}
      {% endfor %}
    {% else %}
      <p>{% translate "No explain data available." %}</p>
    {% endif %}
  </div>
</div>
