<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* server/replication/slave_configuration.twig */
class __TwigTemplate_ed054b779c0d9b2cce961ad886ee0fad10e2c2d2cd7bc3fade8f1471a043ce4f extends \Twig\Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
            '__internal_25e4382ee606fd517fda0ab70299cf87411b0736dc761a3ffec522e68c526f24' => [$this, 'block___internal_25e4382ee606fd517fda0ab70299cf87411b0736dc761a3ffec522e68c526f24'],
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo "<div class=\"row\">
<fieldset>
  <legend>";
        // line 3
        echo _gettext("Slave replication");
        echo "</legend>
  ";
        // line 4
        if (($context["server_slave_multi_replication"] ?? null)) {
            // line 5
            echo "    ";
            echo _gettext("Master connection:");
            // line 6
            echo "    <form method=\"get\" action=\"";
            echo PhpMyAdmin\Url::getFromRoute("/server/replication");
            echo "\">
      ";
            // line 7
            echo PhpMyAdmin\Url::getHiddenInputs(($context["url_params"] ?? null));
            echo "
      <select name=\"master_connection\">
        <option value=\"\">";
            // line 9
            echo _gettext("Default");
            echo "</option>
        ";
            // line 10
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["server_slave_multi_replication"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["server"]) {
                // line 11
                echo "          <option value=\"";
                echo twig_escape_filter($this->env, (($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 = $context["server"]) && is_array($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4) || $__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 instanceof ArrayAccess ? ($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4["Connection_name"] ?? null) : null), "html", null, true);
                echo "\"";
                echo (((($context["master_connection"] ?? null) == (($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144 = $context["server"]) && is_array($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144) || $__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144 instanceof ArrayAccess ? ($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144["Connection_name"] ?? null) : null))) ? (" selected") : (""));
                echo ">
            ";
                // line 12
                echo twig_escape_filter($this->env, (($__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b = $context["server"]) && is_array($__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b) || $__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b instanceof ArrayAccess ? ($__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b["Connection_name"] ?? null) : null), "html", null, true);
                echo "
          </option>
        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['server'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 15
            echo "      </select>
      <input id=\"goButton\" class=\"btn btn-primary\" type=\"submit\" value=\"";
            // line 16
            echo _gettext("Go");
            echo "\">
    </form>
    <br>
    <br>
  ";
        }
        // line 21
        echo "
  ";
        // line 22
        if (($context["server_slave_status"] ?? null)) {
            // line 23
            echo "    <div id=\"slave_configuration_gui\">
      ";
            // line 24
            if ( !($context["slave_sql_running"] ?? null)) {
                // line 25
                echo "        ";
                echo call_user_func_array($this->env->getFilter('error')->getCallable(), [_gettext("Slave SQL Thread not running!")]);
                echo "
      ";
            }
            // line 27
            echo "      ";
            if ( !($context["slave_io_running"] ?? null)) {
                // line 28
                echo "        ";
                echo call_user_func_array($this->env->getFilter('error')->getCallable(), [_gettext("Slave IO Thread not running!")]);
                echo "
      ";
            }
            // line 30
            echo "
      <p>";
            // line 31
            echo _gettext("Server is configured as slave in a replication process. Would you like to:");
            echo "</p>
      <ul>
        <li>
          <a href=\"#slave_status_href\" id=\"slave_status_href\">";
            // line 34
            echo _gettext("See slave status table");
            echo "</a>
          ";
            // line 35
            echo ($context["slave_status_table"] ?? null);
            echo "
        </li>
        <li>
          <a href=\"#slave_control_href\" id=\"slave_control_href\">";
            // line 38
            echo _gettext("Control slave:");
            echo "</a>
          <div id=\"slave_control_gui\" class=\"hide\">
            <ul>
              <li>
                <a href=\"";
            // line 42
            echo PhpMyAdmin\Url::getFromRoute("/server/replication");
            echo "\" data-post=\"";
            echo twig_escape_filter($this->env, ($context["slave_control_full_link"] ?? null), "html", null, true);
            echo "\">
                  ";
            // line 43
            echo ((( !($context["slave_io_running"] ?? null) ||  !($context["slave_sql_running"] ?? null))) ? ("Full start") : ("Full stop"));
            echo "
                </a>
              </li>
              <li>
                <a class=\"ajax\" id=\"reset_slave\" href=\"";
            // line 47
            echo PhpMyAdmin\Url::getFromRoute("/server/replication");
            echo "\" data-post=\"";
            echo twig_escape_filter($this->env, ($context["slave_control_reset_link"] ?? null), "html", null, true);
            echo "\">
                  ";
            // line 48
            echo _gettext("Reset slave");
            // line 49
            echo "                </a>
              </li>
              <li>
                <a href=\"";
            // line 52
            echo PhpMyAdmin\Url::getFromRoute("/server/replication");
            echo "\" data-post=\"";
            echo twig_escape_filter($this->env, ($context["slave_control_sql_link"] ?? null), "html", null, true);
            echo "\">
                  ";
            // line 53
            if ( !($context["slave_sql_running"] ?? null)) {
                // line 54
                echo "                    ";
                echo _gettext("Start SQL Thread only");
                // line 55
                echo "                  ";
            } else {
                // line 56
                echo "                    ";
                echo _gettext("Stop SQL Thread only");
                // line 57
                echo "                  ";
            }
            // line 58
            echo "                </a>
              </li>
              <li>
                <a href=\"";
            // line 61
            echo PhpMyAdmin\Url::getFromRoute("/server/replication");
            echo "\" data-post=\"";
            echo twig_escape_filter($this->env, ($context["slave_control_io_link"] ?? null), "html", null, true);
            echo "\">
                  ";
            // line 62
            if ( !($context["slave_io_running"] ?? null)) {
                // line 63
                echo "                    ";
                echo _gettext("Start IO Thread only");
                // line 64
                echo "                  ";
            } else {
                // line 65
                echo "                    ";
                echo _gettext("Stop IO Thread only");
                // line 66
                echo "                  ";
            }
            // line 67
            echo "                </a>
              </li>
            </ul>
          </div>
        </li>
        <li>
          <a href=\"#slave_errormanagement_href\" id=\"slave_errormanagement_href\">
            ";
            // line 74
            echo _gettext("Error management:");
            // line 75
            echo "          </a>
          <div id=\"slave_errormanagement_gui\" class=\"hide\">
            ";
            // line 77
            echo call_user_func_array($this->env->getFilter('error')->getCallable(), [_gettext("Skipping errors might lead into unsynchronized master and slave!")]);
            echo "
            <ul>
              <li>
                <a href=\"";
            // line 80
            echo PhpMyAdmin\Url::getFromRoute("/server/replication");
            echo "\" data-post=\"";
            echo twig_escape_filter($this->env, ($context["slave_skip_error_link"] ?? null), "html", null, true);
            echo "\">
                  ";
            // line 81
            echo _gettext("Skip current error");
            // line 82
            echo "                </a>
              </li>
              <li>
                <form method=\"post\" action=\"";
            // line 85
            echo PhpMyAdmin\Url::getFromRoute("/server/replication");
            echo "\">
                  ";
            // line 86
            echo PhpMyAdmin\Url::getHiddenInputs("", "");
            echo "
                  ";
            // line 87
            echo sprintf(_gettext("Skip next %s errors."), "<input type=\"text\" name=\"sr_skip_errors_count\" value=\"1\" class=\"repl_gui_skip_err_cnt\">");
            echo "
                  <input class=\"btn btn-primary\" type=\"submit\" name=\"sr_slave_skip_error\" value=\"";
            // line 88
            echo _gettext("Go");
            echo "\">
                  <input type=\"hidden\" name=\"sr_take_action\" value=\"1\">
                </form>
              </li>
            </ul>
          </div>
        </li>
        <li>
          <a href=\"";
            // line 96
            echo PhpMyAdmin\Url::getFromRoute("/server/replication");
            echo "\" data-post=\"";
            echo twig_escape_filter($this->env, ($context["reconfigure_master_link"] ?? null), "html", null, true);
            echo "\">
            ";
            // line 97
            echo _gettext("Change or reconfigure master server");
            // line 98
            echo "          </a>
        </li>
      </ul>
    </div>
  ";
        } elseif ( !        // line 102
($context["has_slave_configure"] ?? null)) {
            // line 103
            echo "    ";
            echo sprintf(            $this->renderBlock("__internal_25e4382ee606fd517fda0ab70299cf87411b0736dc761a3ffec522e68c526f24", $context, $blocks), (((("<a href=\"" . PhpMyAdmin\Url::getFromRoute("/server/replication")) . "\" data-post=\"") . PhpMyAdmin\Url::getCommon(twig_array_merge(($context["url_params"] ?? null), ["sl_configure" => true, "repl_clear_scr" => true]))) . "\">"), "</a>");
            // line 109
            echo "  ";
        }
        // line 110
        echo "</fieldset>
</div>
";
    }

    // line 103
    public function block___internal_25e4382ee606fd517fda0ab70299cf87411b0736dc761a3ffec522e68c526f24($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 107
        echo "      ";
        echo _gettext("This server is not configured as slave in a replication process. Would you like to %sconfigure%s it?");
        // line 108
        echo "    ";
    }

    public function getTemplateName()
    {
        return "server/replication/slave_configuration.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  310 => 108,  307 => 107,  303 => 103,  297 => 110,  294 => 109,  291 => 103,  289 => 102,  283 => 98,  281 => 97,  275 => 96,  264 => 88,  260 => 87,  256 => 86,  252 => 85,  247 => 82,  245 => 81,  239 => 80,  233 => 77,  229 => 75,  227 => 74,  218 => 67,  215 => 66,  212 => 65,  209 => 64,  206 => 63,  204 => 62,  198 => 61,  193 => 58,  190 => 57,  187 => 56,  184 => 55,  181 => 54,  179 => 53,  173 => 52,  168 => 49,  166 => 48,  160 => 47,  153 => 43,  147 => 42,  140 => 38,  134 => 35,  130 => 34,  124 => 31,  121 => 30,  115 => 28,  112 => 27,  106 => 25,  104 => 24,  101 => 23,  99 => 22,  96 => 21,  88 => 16,  85 => 15,  76 => 12,  69 => 11,  65 => 10,  61 => 9,  56 => 7,  51 => 6,  48 => 5,  46 => 4,  42 => 3,  38 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "server/replication/slave_configuration.twig", "/home/files/phpmyadmin/release/phpMyAdmin-5.1+snapshot/templates/server/replication/slave_configuration.twig");
    }
}
