{% if not clear_screen %}
  <fieldset>
    <legend>{% trans 'Master replication' %}</legend>
    {% trans 'This server is configured as master in a replication process.' %}
    <ul>
      <li>
        <a href="#master_status_href" id="master_status_href">
          {% trans 'Show master status' %}
        </a>
        {{ master_status_table|raw }}
      </li>
      <li>
        <p>
          <a href="#master_slaves_href" id="master_slaves_href">
            {% trans 'Show connected slaves' %}
          </a>
        </p>

        <div id="replication_slaves_section" style="display: none;">
          <table class="data">
            <thead>
              <tr>
                <th>{% trans 'Server ID' %}</th>
                <th>{% trans 'Host' %}</th>
              </tr>
            </thead>
            <tbody>
              {% for slave in slaves %}
                <tr>
                  <td class="value">{{ slave['Server_id'] }}</td>
                  <td class="value">{{ slave['Host'] }}</td>
                </tr>
              {% endfor %}
            </tbody>
          </table>
          <br>
          {{ 'Only slaves started with the --report-host=host_name option are visible in this list.'|trans|notice }}
          <br>
        </div>
      </li>
      <li>
        <a href="server_replication.php" data-post="{{ get_common(url_params, '') }}" id="master_addslaveuser_href">
          {% trans 'Add slave replication user' %}
        </a>
      </li>
{% endif %}
{% if master_add_user %}
    {{ master_add_slave_user|raw }}
{% elseif not clear_screen %}
    </ul>
  </fieldset>
{% endif %}
