Update website

This commit is contained in:
Guilhem Lavaux 2025-03-24 09:27:39 +01:00
parent a0b0d3dae7
commit ae7ef6ad45
3151 changed files with 566766 additions and 48 deletions

View file

@ -0,0 +1,107 @@
<h2>
{{ get_image('s_tbl') }}
{% trans 'Binary log' %}
</h2>
<form action="{{ url('/server/binlog') }}" method="post">
{{ get_hidden_inputs(url_params) }}
<fieldset>
<legend>
{% trans 'Select binary log to view' %}
</legend>
{% set full_size = 0 %}
<select name="log">
{% for each_log in binary_logs %}
<option value="{{ each_log['Log_name'] }}"
{{- each_log['Log_name'] == log ? ' selected' }}>
{{ each_log['Log_name'] }}
{% if each_log['File_size'] is defined %}
({{ format_byte_down(each_log['File_size'], 3, 2)|join(' ') }})
{% set full_size = full_size + each_log['File_size'] %}
{% endif %}
</option>
{% endfor %}
</select>
{{ binary_logs|length }}
{% trans 'Files' %},
{% if full_size > 0 %}
{{ format_byte_down(full_size)|join(' ') }}
{% endif %}
</fieldset>
<fieldset class="tblFooters">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</fieldset>
</form>
{{ sql_message|raw }}
<table class="pma-table" id="binlogTable">
<thead>
<tr>
<td colspan="6" class="text-center">
{% if has_previous %}
{% if has_icons %}
<a href="{{ url('/server/binlog') }}" data-post="{{ get_common(previous_params, '') }}" title="
{%- trans %}Previous{% context %}Previous page{% endtrans %}">
&laquo;
</a>
{% else %}
<a href="{{ url('/server/binlog') }}" data-post="{{ get_common(previous_params, '') }}">
{% trans %}Previous{% context %}Previous page{% endtrans %} &laquo;
</a>
{% endif %}
-
{% endif %}
{% if is_full_query %}
<a href="{{ url('/server/binlog') }}" data-post="{{ get_common(full_queries_params, '') }}" title="{% trans 'Truncate shown queries' %}">
<img src="{{ image_path }}s_partialtext.png" alt="{% trans 'Truncate shown queries' %}">
</a>
{% else %}
<a href="{{ url('/server/binlog') }}" data-post="{{ get_common(full_queries_params, '') }}" title="{% trans 'Show full queries' %}">
<img src="{{ image_path }}s_fulltext.png" alt="{% trans 'Show full queries' %}">
</a>
{% endif %}
{% if has_next %}
-
{% if has_icons %}
<a href="{{ url('/server/binlog') }}" data-post="{{ get_common(next_params, '') }}" title="
{%- trans %}Next{% context %}Next page{% endtrans %}">
&raquo;
</a>
{% else %}
<a href="{{ url('/server/binlog') }}" data-post="{{ get_common(next_params, '') }}">
{% trans %}Next{% context %}Next page{% endtrans %} &raquo;
</a>
{% endif %}
{% endif %}
</td>
</tr>
<tr>
<th>{% trans 'Log name' %}</th>
<th>{% trans 'Position' %}</th>
<th>{% trans 'Event type' %}</th>
<th>{% trans 'Server ID' %}</th>
<th>{% trans 'Original position' %}</th>
<th>{% trans 'Information' %}</th>
</tr>
</thead>
<tbody>
{% for value in values %}
<tr class="noclick">
<td>{{ value['Log_name'] }}</td>
<td class="right">{{ value['Pos'] }}</td>
<td>{{ value['Event_type'] }}</td>
<td class="right">{{ value['Server_id'] }}</td>
<td class="right">
{{- value['Orig_log_pos'] is defined ? value['Orig_log_pos'] : value['End_log_pos'] -}}
</td>
<td>{{ format_sql(value['Info'], not is_full_query) }}</td>
</tr>
{% endfor %}
</tbody>
</table>

View file

@ -0,0 +1,41 @@
<div class=container-fluid>
<div class="row">
<h2>
{{ get_image('s_asci') }}
{% trans 'Character sets and collations' %}
</h2>
</div>
<div class="table-responsive">
<table class="table table-light table-striped table-hover table-sm w-auto">
<thead class="thead-light">
<tr>
<th scope="col">{% trans 'Collation' %}</th>
<th scope="col">{% trans 'Description' %}</th>
</tr>
</thead>
{% for charset in charsets %}
<tr>
<th colspan="2" class="table-primary">
{{ charset.name }}
{% if charset.description is not empty %}
(<em>{{ charset.description }}</em>)
{% endif %}
</th>
</tr>
{% for collation in charset.collations %}
<tr{{ collation.is_default ? ' class="table-info"' }}>
<td>
{{ collation.name }}
{% if collation.is_default %}
<span class="sr-only">{% trans '(default)' %}</span>
{% endif %}
</td>
<td>{{ collation.description }}</td>
</tr>
{% endfor %}
{% endfor %}
</table>
</div>
</div>

View file

@ -0,0 +1,331 @@
<div class="container-fluid">
<div class="row">
<h2>
{{ get_image('s_db') }}
{% if has_statistics %}
{% trans 'Databases statistics' %}
{% else %}
{% trans 'Databases' %}
{% endif %}
</h2>
</div>
{% if is_create_database_shown %}
<div class="row">
<ul>
<li id="li_create_database" class="no_bullets">
{% if has_create_database_privileges %}
<form method="post" action="{{ url('/server/databases/create') }}" id="create_database_form" class="ajax">
<p>
<strong>
<label for="text_create_db">
{{ get_image('b_newdb') }}
{% trans 'Create database' %}
</label>
{{ show_mysql_docu('CREATE_DATABASE') }}
</strong>
</p>
{{ get_hidden_inputs('', '', 5) }}
<input type="hidden" name="reload" value="1">
{% if has_statistics %}
<input type="hidden" name="statistics" value="1">
{% endif %}
<input type="text" name="new_db" maxlength="64" class="textfield" value="
{{- database_to_create }}" id="text_create_db" placeholder="
{%- trans 'Database name' %}" required>
{% if charsets is not empty %}
<select lang="en" dir="ltr" name="db_collation">
<option value="">{% trans 'Collation' %}</option>
<option value=""></option>
{% for charset in charsets %}
<optgroup label="{{ charset.name }}" title="{{ charset.description }}">
{% for collation in charset.collations %}
<option value="{{ collation.name }}" title="{{ collation.description }}"{{ collation.is_selected ? ' selected' }}>
{{- collation.name -}}
</option>
{% endfor %}
</optgroup>
{% endfor %}
</select>
{% endif %}
<input id="buttonGo" class="btn btn-primary" type="submit" value="{% trans 'Create' %}">
</form>
{% else %}
<p>
<strong>
{{ get_image('b_newdb') }}
{% trans 'Create database' %}
{{ show_mysql_docu('CREATE_DATABASE') }}
</strong>
</p>
<span class="noPrivileges">
{{ get_image('s_error', '', {
'hspace': 2,
'border': 0,
'align': 'middle'
}) }}
{% trans 'No privileges to create databases' %}
</span>
{% endif %}
</li>
</ul>
</div>
{% endif %}
{% if database_count > 0 %}
{% include 'filter.twig' with {'filter_value': ''} only %}
<div id="tableslistcontainer row">
<div class="container-fluid">
{{ get_list_navigator(
database_count,
pos,
url_params,
url('/server/databases'),
'frame_content',
max_db_list
) }}
<form class="ajax" action="{{ url('/server/databases') }}" method="post" name="dbStatsForm" id="dbStatsForm">
{{ get_hidden_inputs(url_params) }}
<div class="table-responsive row">
<table class="table table-striped table-hover w-auto">
<thead class="thead-light">
<tr>
{% if is_drop_allowed %}
<th></th>
{% endif %}
<th>
<a href="{{ url('/server/databases', url_params|merge({
'sort_by': 'SCHEMA_NAME',
'sort_order': url_params.sort_by == 'SCHEMA_NAME'
and url_params.sort_order == 'asc' ? 'desc' : 'asc'
})) }}">
{% trans 'Database' %}
{% if url_params.sort_by == 'SCHEMA_NAME' %}
{% if url_params.sort_order == 'asc' %}
{{ get_image('s_asc', 'Ascending'|trans) }}
{% else %}
{{ get_image('s_desc', 'Descending'|trans) }}
{% endif %}
{% endif %}
</a>
</th>
<th>
<a href="{{ url('/server/databases', url_params|merge({
'sort_by': 'DEFAULT_COLLATION_NAME',
'sort_order': url_params.sort_by == 'DEFAULT_COLLATION_NAME'
and url_params.sort_order == 'asc' ? 'desc' : 'asc'
})) }}">
{% trans 'Collation' %}
{% if url_params.sort_by == 'DEFAULT_COLLATION_NAME' %}
{% if url_params.sort_order == 'asc' %}
{{ get_image('s_asc', 'Ascending'|trans) }}
{% else %}
{{ get_image('s_desc', 'Descending'|trans) }}
{% endif %}
{% endif %}
</a>
</th>
{% if has_statistics %}
{% for name, statistic in header_statistics %}
<th{{ statistic.format == 'byte' ? ' colspan="2"' }}>
<a href="{{ url('/server/databases', url_params|merge({
'sort_by': name,
'sort_order': url_params.sort_by == name
and url_params.sort_order == 'asc' ? 'desc' : 'asc'
})) }}">
{{ statistic.title }}
{% if url_params.sort_by == name %}
{% if url_params.sort_order == 'asc' %}
{{ get_image('s_asc', 'Ascending'|trans) }}
{% else %}
{{ get_image('s_desc', 'Descending'|trans) }}
{% endif %}
{% endif %}
</a>
</th>
{% endfor %}
{% endif %}
{% if has_master_replication %}
<th>{% trans 'Master replication' %}</th>
{% endif %}
{% if has_slave_replication %}
<th>{% trans 'Slave replication' %}</th>
{% endif %}
<th>{% trans 'Action' %}</th>
</tr>
</thead>
<tbody>
{% for database in databases %}
<tr class="db-row{{ database.is_system_schema or database.is_pmadb ? ' noclick' }}" data-filter-row="{{ database.name|upper }}">
{% if is_drop_allowed %}
<td class="tool">
<input type="checkbox" name="selected_dbs[]" class="checkall" title="
{{- database.name }}" value="
{{- database.name }}"
{{- database.is_system_schema or database.is_pmadb ? ' disabled' }}>
</td>
{% endif %}
<td class="name">
<a href="{{ database.url }}" title="
{{- "Jump to database '%s'"|trans|format(database.name) }}">
{{ database.name }}
</a>
</td>
<td class="value">
<dfn title="{{ database.collation.description }}">
{{ database.collation.name }}
</dfn>
</td>
{% if has_statistics %}
{% for statistic in database.statistics %}
{% if statistic.format is same as('byte') %}
{% set value = format_byte_down(statistic.raw, 3, 1) %}
<td class="value">
<data value="{{ statistic.raw }}" title="{{ statistic.raw }}">
{{ value[0] }}
</data>
</td>
<td class="unit">{{ value[1] }}</td>
{% else %}
<td class="value">
<data value="{{ statistic.raw }}" title="{{ statistic.raw }}">
{{ format_number(statistic.raw, 0) }}
</data>
</td>
{% endif %}
{% endfor %}
{% endif %}
{% if database.replication.master.status %}
{% if database.replication.master.is_replicated %}
<td class="tool text-center">
{{ get_icon('s_success', 'Replicated'|trans) }}
</td>
{% else %}
<td class="tool text-center">
{{ get_icon('s_cancel', 'Not replicated'|trans) }}
</td>
{% endif %}
{% endif %}
{% if database.replication.slave.status %}
{% if database.replication.slave.is_replicated %}
<td class="tool text-center">
{{ get_icon('s_success', 'Replicated'|trans) }}
</td>
{% else %}
<td class="tool text-center">
{{ get_icon('s_cancel', 'Not replicated'|trans) }}
</td>
{% endif %}
{% endif %}
<td class="tool">
<a class="server_databases" data="
{{- database.name|js_format }}" href="{{ url('/server/privileges', {
'db': database.name,
'checkprivsdb': database.name
}) }}" title="
{{- 'Check privileges for database "%s".'|trans|format(database.name) }}">
{{ get_icon('s_rights', 'Check privileges'|trans) }}
</a>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot class="thead-light">
<tr>
<th colspan="{{ is_drop_allowed ? '3' : '2' }}">
{% trans 'Total:' %}
<span id="filter-rows-count">
{{- database_count -}}
</span>
</th>
{% if has_statistics %}
{% for statistic in total_statistics %}
{% if statistic.format is same as('byte') %}
{% set value = format_byte_down(statistic.raw, 3, 1) %}
<th class="value">
<data value="{{ statistic.raw }}" title="{{ statistic.raw }}">
{{ value[0] }}
</data>
</th>
<th class="unit">{{ value[1] }}</th>
{% else %}
<th class="value">
<data value="{{ statistic.raw }}" title="{{ statistic.raw }}">
{{ format_number(statistic.raw, 0) }}
</data>
</th>
{% endif %}
{% endfor %}
{% endif %}
{% if has_master_replication %}
<th></th>
{% endif %}
{% if has_slave_replication %}
<th></th>
{% endif %}
<th></th>
</tr>
</tfoot>
</table>
</div>
{# Footer buttons #}
{% if is_drop_allowed %}
{% include 'select_all.twig' with {
'theme_image_path': theme_image_path,
'text_dir': text_dir,
'form_name': 'dbStatsForm'
} only %}
<button class="btn btn-link mult_submit ajax" type="submit" name="" value="Drop" title="{% trans 'Drop' %}">
{{ get_icon('b_deltbl', 'Drop'|trans) }}
</button>
{% endif %}
{# Enable statistics #}
{% if not has_statistics %}
<div class="row">
{{ 'Note: Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server.'|trans|notice }}
</div>
<div class="row">
<ul>
<li class="li_switch_dbstats">
<a href="{{ url('/server/databases') }}" data-post="{{ get_common({'statistics': '1'}, '') }}" title="{% trans 'Enable statistics' %}">
<strong>{% trans 'Enable statistics' %}</strong>
</a>
</li>
</ul>
</div>
{% endif %}
</form>
</div>
</div>
</div>
{% else %}
<p>{{ 'No databases'|trans|notice }}</p>
{% endif %}

View file

@ -0,0 +1,33 @@
<div class="container-fluid">
<div class="row">
<h2>
{{ get_image('b_engine') }}
{% trans 'Storage engines' %}
</h2>
</div>
<div class="table-responsive">
<table class="table table-light table-striped table-hover w-auto">
<thead class="thead-light">
<tr>
<th scope="col">{% trans 'Storage Engine' %}</th>
<th scope="col">{% trans 'Description' %}</th>
</tr>
</thead>
<tbody>
{% for engine, details in engines %}
<tr class="
{{- details['Support'] == 'NO' or details['Support'] == 'DISABLED' ? ' disabled' }}
{{ details['Support'] == 'DEFAULT' ? ' marked' }}">
<td>
<a rel="newpage" href="{{ url('/server/engines/' ~ engine) }}">
{{ details['Engine'] }}
</a>
</td>
<td>{{ details['Comment'] }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>

View file

@ -0,0 +1,46 @@
<h2>
{{ get_image('b_engine') }}
{% trans 'Storage engines' %}
</h2>
{% if engine is not empty %}
<h2>
{{ get_image('b_engine') }}
{{ engine.title }}
{{ show_mysql_docu(engine.help_page) }}
</h2>
<p><em>{{ engine.comment }}</em></p>
{% if engine.info_pages is not empty and engine.info_pages is iterable %}
<p>
<strong>[</strong>
{% if page is empty %}
<strong>{% trans 'Variables' %}</strong>
{% else %}
<a href="{{ url('/server/engines/' ~ engine.engine) }}">
{% trans 'Variables' %}
</a>
{% endif %}
{% for current, label in engine.info_pages %}
<strong>|</strong>
{% if page is defined and page == current %}
<strong>{{ label }}</strong>
{% else %}
<a href="{{ url('/server/engines/' ~ engine.engine ~ '/' ~ current) }}">
{{ label }}
</a>
{% endif %}
{% endfor %}
<strong>]</strong>
</p>
{% endif %}
{% if engine.page is not empty %}
{{ engine.page|raw }}
{% else %}
<p>{{ engine.support }}</p>
{{ engine.variables|raw }}
{% endif %}
{% else %}
<p>{{ 'Unknown storage engine.'|trans|error }}</p>
{% endif %}

View file

@ -0,0 +1,33 @@
{% extends 'export.twig' %}
{% block title %}{% trans 'Exporting databases from the current server' %}{% endblock %}
{% block selection_options %}
<div class="exportoptions" id="databases_and_tables">
<h3>{% trans 'Databases:' %}</h3>
<div>
<p>
<a href="#" id="db_select_all">
{% trans 'Select all' %}
</a>
/
<a href="#" id="db_unselect_all">
{% trans 'Unselect all' %}
</a>
</p>
<select name="db_select[]" id="db_select" size="10" multiple>
{% for database in databases %}
<option value="{{ database.name }}"{{ database.is_selected ? ' selected' }}>
{{ database.name }}
</option>
{% endfor %}
</select>
</div>
</div>
{% endblock %}
{% set filename_hint %}
{% trans '@SERVER@ will become the server name.' %}
{% endset %}

View file

@ -0,0 +1,3 @@
{% extends 'import.twig' %}
{% block title %}{% trans 'Importing into the current server' %}{% endblock %}

View file

@ -0,0 +1,64 @@
<div class="container-fluid">
<h2>
{{ get_image('b_plugin') }}
{% trans 'Plugins' %}
</h2>
<div id="plugins_plugins">
<div id="sectionlinks" class="row no-gutters">
<div class="col-12">
{% for type in plugins|keys %}
<a class="btn btn-primary" href="#plugins-{{ clean_types[type] }}">
{{ type }}
</a>
{% endfor %}
</div>
</div>
{% for type, list in plugins %}
<div class="row">
<div class="table-responsive col-12">
<table class="table table-light table-striped table-hover w-auto" id="plugins-{{ clean_types[type] }}">
<caption>
{{ type }}
</caption>
<thead class="thead-light">
<tr>
<th scope="col">{% trans 'Plugin' %}</th>
<th scope="col">{% trans 'Description' %}</th>
<th scope="col">{% trans 'Version' %}</th>
<th scope="col">{% trans 'Author' %}</th>
<th scope="col">{% trans 'License' %}</th>
</tr>
</thead>
<tbody>
{% for plugin in list %}
<tr class="noclick">
<th>
{{ plugin.name }}
{% if plugin.status != 'ACTIVE' %}
<span class="badge badge-danger">
{% if plugin.status == 'INACTIVE' %}
{% trans 'inactive' %}
{% elseif plugin.status == 'DISABLED' %}
{% trans 'disabled' %}
{% elseif plugin.status == 'DELETING' %}
{% trans 'deleting' %}
{% elseif plugin.status == 'DELETED' %}
{% trans 'deleted' %}
{% endif %}
</span>
{% endif %}
</th>
<td>{{ plugin.description }}</td>
<td>{{ plugin.version }}</td>
<td>{{ plugin.author }}</td>
<td>{{ plugin.license }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endfor %}
</div>
</div>

View file

@ -0,0 +1,38 @@
<h2>
{{ get_icon('b_usradd') }}
{% trans 'Add user account' %}
</h2>
<form name="usersForm" id="addUsersForm" action="{{ url('/server/privileges') }}" method="post" autocomplete="off">
{{ get_hidden_inputs() }}
{{ login_information_fields_new|raw }}
<fieldset id="fieldset_add_user_database">
<legend>{% trans 'Database for user account' %}</legend>
<input type="checkbox" name="createdb-1" id="createdb-1">
<label for="createdb-1">{% trans 'Create database with same name and grant all privileges.' %}</label>
<br>
<input type="checkbox" name="createdb-2" id="createdb-2">
<label for="createdb-2">{% trans 'Grant all privileges on wildcard name (username\\_%).' %}</label>
<br>
{% if database is not empty %}
<input type="checkbox" name="createdb-3" id="createdb-3" checked>
<label for="createdb-3">{{ 'Grant all privileges on database %s.'|trans|format(database) }}</label>
<input type="hidden" name="dbname" value="{{ database }}">
<br>
{% endif %}
</fieldset>
{% if is_grant_user %}
{{ privileges_table|raw }}
{% endif %}
<fieldset id="fieldset_add_user_footer" class="tblFooters">
<input type="hidden" name="adduser_submit" value="1">
<input class="btn btn-primary" type="submit" id="adduser_submit" value="{% trans 'Go' %}">
</fieldset>
</form>

View file

@ -0,0 +1,12 @@
<div class="row">
<div class="col-12">
<fieldset id="fieldset_add_user">
<legend>{% trans %}New{% context %}Create new user{% endtrans %}</legend>
<a id="add_user_anchor" href="{{ url('/server/privileges', url_params) }}"
{% if rel_params is not empty %}
rel="{{ get_common(rel_params) }}"
{% endif %}>
{{ get_icon('b_usradd') }}{% trans 'Add user account' %}</a>
</fieldset>
</div>
</div>

View file

@ -0,0 +1,72 @@
<form method="post" id="change_password_form" action="
{{- is_privileges ? url('/server/privileges') : url('/user-password') }}" name="chgPassword" class="{{ is_privileges ? 'submenu-item' }}">
{{ get_hidden_inputs() }}
{% if is_privileges %}
<input type="hidden" name="username" value="{{ username }}">
<input type="hidden" name="hostname" value="{{ hostname }}">
{% endif %}
<fieldset id="fieldset_change_password">
<legend{{ is_privileges ? ' data-submenu-label="Change password"' }}>{% trans 'Change password' %}</legend>
<table class="table table-borderless w-auto">
<tr>
<td colspan="2">
<input type="radio" name="nopass" value="1" id="nopass_1">
<label for="nopass_1">{% trans 'No Password' %}</label>
</td>
</tr>
<tr class="vmiddle">
<td>
<input type="radio" name="nopass" value="0" id="nopass_0" checked="checked">
<label for="nopass_0">{% trans 'Password:' %}&nbsp;</label>
</td>
<td>
{% trans 'Enter:' %}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="password" name="pma_pw" id="text_pma_change_pw" size="10" class="textfield"
onkeyup="Functions.checkPasswordStrength($(this).val(), $('#change_password_strength_meter'), meter_obj_label = $('#change_password_strength'), CommonParams.get('user'));"
onchange="nopass[1].checked = true">
<span>{% trans %}Strength:{% context %}Password strength{% endtrans %}</span>
<meter max="4" id="change_password_strength_meter" name="pw_meter"></meter>
<span id="change_password_strength" name="pw_strength"></span>
<br>
{% trans 'Re-type:' %}&nbsp;
<input type="password" name="pma_pw2" id="text_pma_change_pw2" size="10" class="textfield" onchange="nopass[1].checked = true">
</td>
</tr>
{% if not is_new or (is_new and has_more_auth_plugins) %}
<tr class="vmiddle">
<td>
<label for="select_authentication_plugin_cp">{% trans 'Password Hashing:' %}</label>
</td>
<td>
<select name="authentication_plugin" id="select_authentication_plugin_cp">
{% for plugin_name, plugin_description in active_auth_plugins %}
<option value="{{ plugin_name }}"{{ plugin_name == orig_auth_plugin ? ' selected' }}>{{ plugin_description }}</option>
{% endfor %}
</select>
</td>
</tr>
{% endif %}
<tr id="tr_element_before_generate_password"></tr>
</table>
{% if is_new and has_more_auth_plugins %}
<div{{ orig_auth_plugin != 'sha256_password' ? ' class="hide"' }} id="ssl_reqd_warning_cp">
{% apply notice %}
{% trans %}
This method requires using an '<i>SSL connection</i>' or an '<i>unencrypted connection that encrypts the password using RSA</i>'; while connecting to the server.
{% endtrans %}
{{ show_mysql_docu('sha256-authentication-plugin') }}
{% endapply %}
</div>
{% endif %}
</fieldset>
<fieldset id="fieldset_change_password_footer" class="tblFooters">
<input type="hidden" name="change_pw" value="1">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</fieldset>
</form>

View file

@ -0,0 +1,15 @@
<form class="ajax" id="changeUserGroupForm" action="{{ url('/server/privileges') }}" method="post">
{{ get_hidden_inputs(params) }}
<fieldset id="fieldset_user_group_selection">
<legend>{% trans 'User group' %}</legend>
<label for="userGroupSelect">{% trans 'User group:' %}</label>
<select name="userGroup" id="userGroupSelect">
<option value=""></option>
{% for option in all_user_groups %}
<option value="{{ option }}"{{ user_group == option ? ' selected' }}>{{ option }}</option>
{% endfor %}
</select>
<input type="hidden" name="changeUserGroup" value="1">
</fieldset>
</form>

View file

@ -0,0 +1,105 @@
<div id="edit_user_dialog">
<h2>
{{ get_icon('b_usredit') }}
{% trans 'Edit privileges:' %}
{% trans 'User account' %}
<em>
<a class="edit_user_anchor" href="{{ url('/server/privileges', {
'username': username,
'hostname': hostname,
'dbname': '',
'tablename': ''
}) }}">
'{{ username }}'@'{{ hostname }}'
</a>
</em>
-
{% trans 'Database' %}
<em>
<a href="{{ url('/server/privileges', {
'username': username,
'hostname': hostname,
'dbname': dbname,
'routinename': ''
}) }}">
{{ database }}
</a>
</em>
-
{% trans 'Routine' %}
<em>{{ routine }}</em>
</h2>
{% if current_user == username ~ '@' ~ hostname %}
{{ 'Note: You are attempting to edit privileges of the user with which you are currently logged in.'|trans|notice }}
{% endif %}
<form class="submenu-item" name="usersForm" id="addUsersForm" action="{{ url('/server/privileges') }}" method="post">
{{ get_hidden_inputs() }}
<input type="hidden" name="username" value="{{ username }}">
<input type="hidden" name="hostname" value="{{ hostname }}">
<input type="hidden" name="dbname" value="{{ database }}">
<input type="hidden" name="routinename" value="{{ routine }}">
<input type="hidden" name="grant_count" value="{{ privileges|length }}">
<fieldset id="fieldset_user_global_rights">
<legend data-submenu-label="{% trans 'Routine' %}">
{% trans 'Routine-specific privileges' %}
</legend>
<p>
<small>
<em>{% trans 'Note: MySQL privilege names are expressed in English.' %}</em>
</small>
</p>
<fieldset>
<legend>
<input type="checkbox" class="sub_checkall_box" id="checkall_Routine_priv" title="{% trans 'Check all' %}">
<label for="checkall_Routine_priv">{% trans 'Routine' %}</label>
</legend>
<div class="item">
<input type="checkbox" class="checkall" name="Grant_priv" id="checkbox_Grant_priv" value="Y" title="
{%- trans 'Allows user to give to other users or remove from other users privileges that user possess on this routine.' %}"
{{- privileges['Grant_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Grant_priv">
<code>
<dfn title="{% trans 'Allows user to give to other users or remove from other users privileges that user possess on this routine.' %}">
GRANT
</dfn>
</code>
</label>
</div>
<div class="item">
<input type="checkbox" class="checkall" name="Alter_routine_priv" id="checkbox_Alter_routine_priv" value="Y" title="
{%- trans 'Allows altering and dropping this routine.' %}"{{ privileges['Alter_routine_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Alter_routine_priv">
<code>
<dfn title="{% trans 'Allows altering and dropping this routine.' %}">
ALTER ROUTINE
</dfn>
</code>
</label>
</div>
<div class="item">
<input type="checkbox" class="checkall" name="Execute_priv" id="checkbox_Execute_priv" value="Y" title="
{%- trans 'Allows executing this routine.' %}"{{ privileges['Execute_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Execute_priv">
<code>
<dfn title="{% trans 'Allows executing this routine.' %}">
EXECUTE
</dfn>
</code>
</label>
</div>
</fieldset>
</fieldset>
<fieldset id="fieldset_user_privtable_footer" class="tblFooters">
<input type="hidden" name="update_privs" value="1">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</fieldset>
</form>
</div>

View file

@ -0,0 +1,24 @@
<table class="pma-table" id="initials_table" cellspacing="5">
<tr>
{% for tmp_initial, initial_was_found in array_initials %}
{% if tmp_initial is not same as(null) %}
{% if initial_was_found %}
<td>
<a class="ajax
{{- initial is defined and initial is same as(tmp_initial) ? ' active' -}}
" href="{{ url('/server/privileges', {'initial': tmp_initial}) }}">
{{- tmp_initial|raw -}}
</a>
</td>
{% else %}
<td>{{ tmp_initial|raw }}</td>
{% endif %}
{% endif %}
{% endfor %}
<td>
<a href="{{ url('/server/privileges', {'showall': 1}) }}" class="nowrap">
{% trans 'Show all' %}
</a>
</td>
</tr>
</table>

View file

@ -0,0 +1,91 @@
<fieldset id="fieldset_add_user_login">
<legend>{% trans 'Login Information' %}</legend>
<div class="item">
<label for="select_pred_username">{% trans 'User name:' %}</label>
<span class="options">
<select name="pred_username" id="select_pred_username" title="{% trans 'User name' %}">
<option value="any"{{ pred_username == 'any' ? ' selected' }}>{% trans 'Any user' %}</option>
<option value="userdefined"{{ pred_username is null or pred_username == 'userdefined' ? ' selected' }}>{% trans 'Use text field' %}</option>
</select>
</span>
<input type="text" name="username" id="pma_username" class="autofocus" maxlength="{{ username_length }}" title="{% trans 'User name' %}"
{%- if g_username is not empty %} value="{{ g_new_username is not null ? g_new_username : g_username }}"{% endif -%}
{{- pred_username is null or pred_username == 'userdefined' ? ' required' }}>
<div id="user_exists_warning" class="hide">
{{ 'An account already exists with the same username but possibly a different hostname.'|trans|notice }}
</div>
</div>
<div class="item">
<label for="select_pred_hostname">
{% trans 'Host name:' %}
</label>
<span class="options">
<select name="pred_hostname" id="select_pred_hostname" title="{% trans 'Host name' %}"
{{- this_host is not null and this_host != 'localhost' and this_host != '127.0.0.1' ? ' data-thishost="' ~ this_host ~ '"' }}>
<option value="any"{{ pred_hostname == 'any' ? ' selected' }}>{% trans 'Any host' %}</option>
<option value="localhost"{{ pred_hostname == 'localhost' ? ' selected' }}>{% trans 'Local' %}</option>
{% if this_host is not empty %}
<option value="thishost"{{ pred_hostname == 'thishost' ? ' selected' }}>{% trans 'This host' %}</option>
{% endif %}
<option value="hosttable"{{ pred_hostname == 'hosttable' ? ' selected' }}>{% trans 'Use host table' %}</option>
<option value="userdefined"{{ pred_hostname == 'userdefined' ? ' selected' }}>{% trans 'Use text field' %}</option>
</select>
</span>
<input type="text" name="hostname" id="pma_hostname" maxlength="{{ hostname_length }}" value="{{ g_hostname|default('%') }}" title="
{%- trans 'Host name' %}"{{ pred_hostname == 'userdefined' ? ' required' }}>
{{ show_hint('When Host table is used, this field is ignored and values stored in Host table are used instead.'|trans) }}
</div>
<div class="item">
<label for="select_pred_password">{% trans 'Password:' %}</label>
<span class="options">
<select name="pred_password" id="select_pred_password" title="{% trans 'Password' %}">
{% if is_change %}
<option value="keep" selected>{% trans 'Do not change the password' %}</option>
{% endif %}
<option value="none"{{ g_username is not null and not is_change ? ' selected' }}>{% trans 'No password' %}</option>
<option value="userdefined"{{ g_username is null ? ' selected' }}>{% trans 'Use text field' %}</option>
</select>
</span>
<input type="password" id="text_pma_pw" name="pma_pw" title="{% trans 'Password' %}"{{ g_username is null ? ' required' }}>
<span>{% trans %}Strength:{% context %}Password strength{% endtrans %}</span>
<meter max="4" id="password_strength_meter" name="pw_meter"></meter>
<span id="password_strength" name="pw_strength"></span>
</div>
<div class="item" id="div_element_before_generate_password">
<label for="text_pma_pw2">{% trans 'Re-type:' %}</label>
<span class="options">&nbsp;</span>
<input type="password" name="pma_pw2" id="text_pma_pw2" title="{% trans 'Re-type' %}"{{ g_username is null ? ' required' }}>
</div>
<div class="item" id="authentication_plugin_div">
<label for="select_authentication_plugin">
{% if is_new %}
{% trans 'Authentication plugin' %}
{% else %}
{% trans 'Password hashing method' %}
{% endif %}
</label>
<span class="options">&nbsp;</span>
<select name="authentication_plugin" id="select_authentication_plugin">
{% for plugin_name, plugin_description in active_auth_plugins %}
<option value="{{ plugin_name }}"{{ plugin_name == auth_plugin ? ' selected' }}>{{ plugin_description }}</option>
{% endfor %}
</select>
<div id="ssl_reqd_warning"{{ auth_plugin != 'sha256_password' ? ' class="hide"' }}>
{% apply notice %}
{% trans %}
This method requires using an '<em>SSL connection</em>' or an '<em>unencrypted connection that encrypts the password using RSA</em>'; while connecting to the server.
{% endtrans %}
{{ show_mysql_docu('sha256-authentication-plugin') }}
{% endapply %}
</div>
</div>
{# Generate password added here via jQuery #}
</fieldset>

View file

@ -0,0 +1,66 @@
<tr>
<td>
<input type="checkbox" name="selected_usr[]" id="checkbox_sel_users_" value="
{{- user.name ~ '&amp;#27;' ~ user.host }}">
</td>
<td>
<label for="checkbox_sel_users_">
{% if user.name is empty %}
<span class="text-danger">{% trans 'Any' %}</span>
{% else %}
{{ user.name }}
{% endif %}
</label>
</td>
<td>
{{ user.host }}
</td>
<td>
{% if user.has_password %}
{% trans 'Yes' %}
{% else %}
<span class="text-danger">{% trans 'No' %}</span>
{% endif %}
</td>
<td>
<code>
{{ user.privileges|raw }}
</code>
</td>
{% if user.has_group %}
<td class="usrGroup"></td>
{% endif %}
<td>
{{ user.has_grant ? 'Yes'|trans : 'No'|trans }}
</td>
{% if is_grantuser %}
<td>
<a class="edit_user_anchor" href="{{ url('/server/privileges', {
'username': user.name,
'hostname': user.host,
'dbname': '',
'tablename': '',
'routinename': ''
}) }}">
{{ get_icon('b_usredit', 'Edit privileges'|trans) }}
</a>
</td>
{% endif %}
{% if user.has_group_edit %}
<td>
<a class="edit_user_group_anchor ajax" href="{{ url('/server/privileges', {'username': user.name}) }}">
{{ get_icon('b_usrlist', 'Edit user group'|trans) }}
</a>
</td>
{% endif %}
<td>
<a class="export_user_anchor ajax" href="{{ url('/server/privileges', {
'username': user.name,
'hostname': user.host,
'export': true,
'initial': initial
}) }}">
{{ get_icon('b_tblexport', 'Export'|trans) }}
</a>
</td>
</tr>

View file

@ -0,0 +1,104 @@
<form class="submenu-item" action="{{ url('/server/privileges') }}" id="{{ form_id }}" method="post">
{{ get_hidden_inputs() }}
<input type="hidden" name="username" value="{{ username }}">
<input type="hidden" name="hostname" value="{{ hostname }}">
<fieldset>
<legend data-submenu-label="{{ sub_menu_label }}">
{{ legend }}
</legend>
<table class="table table-light table-striped table-hover w-auto">
<thead class="thead-light">
<tr>
<th scope="col">{{ type_label }}</th>
<th scope="col">{% trans 'Privileges' %}</th>
<th scope="col">{% trans 'Grant' %}</th>
{% if type == 'database' %}
<th scope="col">{% trans 'Table-specific privileges' %}</th>
{% elseif type == 'table' %}
<th scope="col">{% trans 'Column-specific privileges' %}</th>
{% endif %}
<th scope="col" colspan="2">{% trans 'Action' %}</th>
</tr>
</thead>
<tbody>
{% if privileges|length == 0 %}
{% set colspan = type == 'database' ? 7 : (type == 'table' ? 6 : 5) %}
<tr>
<td class="text-center" colspan="{{ colspan }}"><em>{% trans 'None' %}</em></td>
</tr>
{% else %}
{% for privilege in privileges %}
<tr>
<td>{{ privilege['name'] }}</td>
<td><code>{{ privilege['privileges']|raw }}</code></td>
<td>{{ privilege['grant'] ? 'Yes'|trans : 'No'|trans }}</td>
{% if type == 'database' %}
<td>{{ privilege['table_privs'] ? 'Yes'|trans : 'No'|trans }}</td>
{% elseif type == 'table' %}
<td>{{ privilege['column_privs'] ? 'Yes'|trans : 'No'|trans }}</td>
{% endif %}
<td>{{ privilege['edit_link']|raw }}</td>
<td>{{ privilege['revoke_link']|raw }}</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
{% if type == 'database' %}
<label for="text_dbname">{% trans 'Add privileges on the following database(s):' %}</label>
{%- if databases is not empty %}
<select name="pred_dbname[]" multiple="multiple">
{% for database in databases %}
<option value="{{ escaped_databases[loop.index0]|escape_mysql_wildcards }}">
{{ database }}
</option>
{% endfor %}
</select>
{% endif -%}
<input type="text" id="text_dbname" name="dbname">
{{ show_hint("Wildcards % and _ should be escaped with a \\ to use them literally."|trans) }}
{% elseif type == 'table' %}
<input type="hidden" name="dbname" value="{{ database }}">
<label for="text_tablename">{% trans 'Add privileges on the following table:' %}</label>
{%- if tables is not empty %}
<select name="pred_tablename" class="autosubmit">
<option value="" selected="selected">{% trans 'Use text field' %}:</option>
{% for table in tables %}
<option value="{{ table }}">{{ table }}</option>
{% endfor %}
</select>
{% endif -%}
<input type="text" id="text_tablename" name="tablename">
{% else %}
<input type="hidden" name="dbname" value="{{ database }}">
<label for="text_routinename">{% trans 'Add privileges on the following routine:' %}</label>
{%- if routines is not empty %}
<select name="pred_routinename" class="autosubmit">
<option value="" selected="selected">{% trans 'Use text field' %}:</option>
{% for routine in routines %}
<option value="{{ routine }}">{{ routine }}</option>
{% endfor %}
</select>
{% endif -%}
<input type="text" id="text_routinename" name="routinename">
{% endif %}
</fieldset>
<fieldset class="tblFooters">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</fieldset>
</form>

View file

@ -0,0 +1,836 @@
{% if columns is not empty %}
<input type="hidden" name="grant_count" value="{{ row|length }}">
<input type="hidden" name="column_count" value="{{ columns|length }}">
<fieldset id="fieldset_user_priv">
<legend data-submenu-label="{% trans 'Table' %}">
{% trans 'Table-specific privileges' %}
</legend>
<p>
<small><em>{% trans 'Note: MySQL privilege names are expressed in English.' %}</em></small>
</p>
<div class="item" id="div_item_select">
<label for="select_select_priv">
<code><dfn title="{% trans 'Allows reading data.' %}">SELECT</dfn></code>
</label>
<select id="select_select_priv" name="Select_priv[]" size="8" multiple>
{% for curr_col, curr_col_privs in columns %}
<option value="{{ curr_col }}"{{ row['Select_priv'] == 'Y' or curr_col_privs['Select'] ? ' selected' }}>
{{ curr_col }}
</option>
{% endfor %}
</select>
<em>{% trans 'Or' %}</em>
<label for="checkbox_Select_priv_none">
<input type="checkbox" name="Select_priv_none" id="checkbox_Select_priv_none" title="
{%- trans %}None{% context %}None privileges{% endtrans %}">
{% trans %}None{% context %}None privileges{% endtrans %}
</label>
</div>
<div class="item" id="div_item_insert">
<label for="select_insert_priv">
<code><dfn title="{% trans 'Allows inserting and replacing data.' %}">INSERT</dfn></code>
</label>
<select id="select_insert_priv" name="Insert_priv[]" size="8" multiple>
{% for curr_col, curr_col_privs in columns %}
<option value="{{ curr_col }}"{{ row['Insert_priv'] == 'Y' or curr_col_privs['Insert'] ? ' selected' }}>
{{ curr_col }}
</option>
{% endfor %}
</select>
<em>{% trans 'Or' %}</em>
<label for="checkbox_Insert_priv_none">
<input type="checkbox" name="Insert_priv_none" id="checkbox_Insert_priv_none" title="
{%- trans %}None{% context %}None privileges{% endtrans %}">
{% trans %}None{% context %}None privileges{% endtrans %}
</label>
</div>
<div class="item" id="div_item_update">
<label for="select_update_priv">
<code><dfn title="{% trans 'Allows changing data.' %}">UPDATE</dfn></code>
</label>
<select id="select_update_priv" name="Update_priv[]" size="8" multiple>
{% for curr_col, curr_col_privs in columns %}
<option value="{{ curr_col }}"{{ row['Update_priv'] == 'Y' or curr_col_privs['Update'] ? ' selected' }}>
{{ curr_col }}
</option>
{% endfor %}
</select>
<em>{% trans 'Or' %}</em>
<label for="checkbox_Update_priv_none">
<input type="checkbox" name="Update_priv_none" id="checkbox_Update_priv_none" title="
{%- trans %}None{% context %}None privileges{% endtrans %}">
{% trans %}None{% context %}None privileges{% endtrans %}
</label>
</div>
<div class="item" id="div_item_references">
<label for="select_references_priv">
<code><dfn title="{% trans 'Has no effect in this MySQL version.' %}">REFERENCES</dfn></code>
</label>
<select id="select_references_priv" name="References_priv[]" size="8" multiple>
{% for curr_col, curr_col_privs in columns %}
<option value="{{ curr_col }}"{{ row['References_priv'] == 'Y' or curr_col_privs['References'] ? ' selected' }}>
{{ curr_col }}
</option>
{% endfor %}
</select>
<em>{% trans 'Or' %}</em>
<label for="checkbox_References_priv_none">
<input type="checkbox" name="References_priv_none" id="checkbox_References_priv_none" title="
{%- trans %}None{% context %}None privileges{% endtrans %}">
{% trans %}None{% context %}None privileges{% endtrans %}
</label>
</div>
<div class="item">
<div class="item">
<input type="checkbox" name="Delete_priv" id="checkbox_Delete_priv" value="Y" title="
{%- trans 'Allows deleting data.' %}"{{ row['Delete_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Delete_priv">
<code>
<dfn title="{% trans 'Allows deleting data.' %}">
DELETE
</dfn>
</code>
</label>
</div>
<div class="item">
<input type="checkbox" name="Create_priv" id="checkbox_Create_priv" value="Y" title="
{%- trans 'Allows creating new tables.' %}"{{ row['Create_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Create_priv">
<code>
<dfn title="{% trans 'Allows creating new tables.' %}">
CREATE
</dfn>
</code>
</label>
</div>
<div class="item">
<input type="checkbox" name="Drop_priv" id="checkbox_Drop_priv" value="Y" title="
{%- trans 'Allows dropping tables.' %}"{{ row['Drop_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Drop_priv">
<code>
<dfn title="{% trans 'Allows dropping tables.' %}">
DROP
</dfn>
</code>
</label>
</div>
<div class="item">
<input type="checkbox" name="Grant_priv" id="checkbox_Grant_priv" value="Y" title="
{%- trans 'Allows user to give to other users or remove from other users the privileges that user possess yourself.' %}"
{{- row['Grant_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Grant_priv">
<code>
<dfn title="{% trans 'Allows user to give to other users or remove from other users the privileges that user possess yourself.' %}">
GRANT
</dfn>
</code>
</label>
</div>
<div class="item">
<input type="checkbox" name="Index_priv" id="checkbox_Index_priv" value="Y" title="
{%- trans 'Allows creating and dropping indexes.' %}"{{ row['Index_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Index_priv">
<code>
<dfn title="{% trans 'Allows creating and dropping indexes.' %}">
INDEX
</dfn>
</code>
</label>
</div>
<div class="item">
<input type="checkbox" name="Alter_priv" id="checkbox_Alter_priv" value="Y" title="
{%- trans 'Allows altering the structure of existing tables.' %}"{{ row['Alter_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Alter_priv">
<code>
<dfn title="{% trans 'Allows altering the structure of existing tables.' %}">
ALTER
</dfn>
</code>
</label>
</div>
<div class="item">
<input type="checkbox" name="Create_view_priv" id="checkbox_Create_view_priv" value="Y" title="
{%- trans 'Allows creating new views.' %}"{{ row['Create View_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Create_view_priv">
<code>
<dfn title="{% trans 'Allows creating new views.' %}">
CREATE VIEW
</dfn>
</code>
</label>
</div>
<div class="item">
<input type="checkbox" name="Show_view_priv" id="checkbox_Show_view_priv" value="Y" title="
{%- trans 'Allows performing SHOW CREATE VIEW queries.' %}"{{ row['Show view_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Show_view_priv">
<code>
<dfn title="{% trans 'Allows performing SHOW CREATE VIEW queries.' %}">
SHOW VIEW
</dfn>
</code>
</label>
</div>
<div class="item">
<input type="checkbox" name="Trigger_priv" id="checkbox_Trigger_priv" value="Y" title="
{%- trans 'Allows creating and dropping triggers.' %}"{{ row['Trigger_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Trigger_priv">
<code>
<dfn title="{% trans 'Allows creating and dropping triggers.' %}">
TRIGGER
</dfn>
</code>
</label>
</div>
{% if row['Delete versioning rows_priv'] is defined or row['Delete_history_priv'] is defined %}
<div class="item">
<input type="checkbox" name="Delete_history_priv" id="checkbox_Delete_history_priv" value="Y" title="
{%- trans 'Allows deleting historical rows.' %}"
{{- row['Delete versioning rows_priv'] == 'Y' or row['Delete_history_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Delete_history_priv">
<code>
<dfn title="{% trans 'Allows deleting historical rows.' %}">
DELETE HISTORY
</dfn>
</code>
</label>
</div>
{% endif %}
</div>
<div class="clearfloat"></div>
</fieldset>
{% else %}
{% set grant_count = 0 %}
<fieldset id="fieldset_user_global_rights">
<legend data-submenu-label="
{%- if is_global %}
{%- trans 'Global' -%}
{% elseif is_database %}
{%- trans 'Database' -%}
{% else %}
{%- trans 'Table' -%}
{% endif %}">
{% if is_global %}
{% trans 'Global privileges' %}
{% elseif is_database %}
{% trans 'Database-specific privileges' %}
{% else %}
{% trans 'Table-specific privileges' %}
{% endif %}
<input type="checkbox" id="addUsersForm_checkall" class="checkall_box" title="{% trans 'Check all' %}">
<label for="addUsersForm_checkall">{% trans 'Check all' %}</label>
</legend>
<p>
<small><em>{% trans 'Note: MySQL privilege names are expressed in English.' %}</em></small>
</p>
<fieldset>
<legend>
<input type="checkbox" class="sub_checkall_box" id="checkall_Data_priv" title="{% trans 'Check all' %}">
<label for="checkall_Data_priv">{% trans 'Data' %}</label>
</legend>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Select_priv" id="checkbox_Select_priv" value="Y" title="
{%- trans 'Allows reading data.' %}"{{ row['Select_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Select_priv">
<code>
<dfn title="{% trans 'Allows reading data.' %}">
SELECT
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Insert_priv" id="checkbox_Insert_priv" value="Y" title="
{%- trans 'Allows inserting and replacing data.' %}"{{ row['Insert_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Insert_priv">
<code>
<dfn title="{% trans 'Allows inserting and replacing data.' %}">
INSERT
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Update_priv" id="checkbox_Update_priv" value="Y" title="
{%- trans 'Allows changing data.' %}"{{ row['Update_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Update_priv">
<code>
<dfn title="{% trans 'Allows changing data.' %}">
UPDATE
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Delete_priv" id="checkbox_Delete_priv" value="Y" title="
{%- trans 'Allows deleting data.' %}"{{ row['Delete_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Delete_priv">
<code>
<dfn title="{% trans 'Allows deleting data.' %}">
DELETE
</dfn>
</code>
</label>
</div>
{% if is_global %}
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="File_priv" id="checkbox_File_priv" value="Y" title="
{%- trans 'Allows importing data from and exporting data into files.' %}"{{ row['File_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_File_priv">
<code>
<dfn title="{% trans 'Allows importing data from and exporting data into files.' %}">
FILE
</dfn>
</code>
</label>
</div>
{% endif %}
</fieldset>
<fieldset>
<legend>
<input type="checkbox" class="sub_checkall_box" id="checkall_Structure_priv" title="{% trans 'Check all' %}">
<label for="checkall_Structure_priv">{% trans 'Structure' %}</label>
</legend>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Create_priv" id="checkbox_Create_priv" value="Y" title="
{%- if is_database %}
{%- trans 'Allows creating new databases and tables.' -%}
{% else %}
{%- trans 'Allows creating new tables.' -%}
{% endif %}"{{ row['Create_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Create_priv">
<code>
<dfn title="
{%- if is_database %}
{%- trans 'Allows creating new databases and tables.' -%}
{% else %}
{%- trans 'Allows creating new tables.' -%}
{% endif %}">
CREATE
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Alter_priv" id="checkbox_Alter_priv" value="Y" title="
{%- trans 'Allows altering the structure of existing tables.' %}"{{ row['Alter_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Alter_priv">
<code>
<dfn title="{% trans 'Allows altering the structure of existing tables.' %}">
ALTER
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Index_priv" id="checkbox_Index_priv" value="Y" title="
{%- trans 'Allows creating and dropping indexes.' %}"{{ row['Index_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Index_priv">
<code>
<dfn title="{% trans 'Allows creating and dropping indexes.' %}">
INDEX
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Drop_priv" id="checkbox_Drop_priv" value="Y" title="
{%- if is_database %}
{%- trans 'Allows dropping databases and tables.' -%}
{% else %}
{%- trans 'Allows dropping tables.' -%}
{% endif %}"{{ row['Drop_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Drop_priv">
<code>
<dfn title="
{%- if is_database %}
{%- trans 'Allows dropping databases and tables.' -%}
{% else %}
{%- trans 'Allows dropping tables.' -%}
{% endif %}">
DROP
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Create_tmp_table_priv" id="checkbox_Create_tmp_table_priv" value="Y" title="
{%- trans 'Allows creating temporary tables.' %}"{{ row['Create_tmp_table_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Create_tmp_table_priv">
<code>
<dfn title="{% trans 'Allows creating temporary tables.' %}">
CREATE TEMPORARY TABLES
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Show_view_priv" id="checkbox_Show_view_priv" value="Y" title="
{%- trans 'Allows performing SHOW CREATE VIEW queries.' %}"{{ row['Show_view_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Show_view_priv">
<code>
<dfn title="{% trans 'Allows performing SHOW CREATE VIEW queries.' %}">
SHOW VIEW
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Create_routine_priv" id="checkbox_Create_routine_priv" value="Y" title="
{%- trans 'Allows creating stored routines.' %}"{{ row['Create_routine_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Create_routine_priv">
<code>
<dfn title="{% trans 'Allows creating stored routines.' %}">
CREATE ROUTINE
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Alter_routine_priv" id="checkbox_Alter_routine_priv" value="Y" title="
{%- trans 'Allows altering and dropping stored routines.' %}"{{ row['Alter_routine_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Alter_routine_priv">
<code>
<dfn title="{% trans 'Allows altering and dropping stored routines.' %}">
ALTER ROUTINE
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Execute_priv" id="checkbox_Execute_priv" value="Y" title="
{%- trans 'Allows executing stored routines.' %}"{{ row['Execute_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Execute_priv">
<code>
<dfn title="{% trans 'Allows executing stored routines.' %}">
EXECUTE
</dfn>
</code>
</label>
</div>
{% if row['Create_view_priv'] is defined %}
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Create_view_priv" id="checkbox_Create_view_priv" value="Y" title="
{%- trans 'Allows creating new views.' %}"{{ row['Create_view_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Create_view_priv">
<code>
<dfn title="{% trans 'Allows creating new views.' %}">
CREATE VIEW
</dfn>
</code>
</label>
</div>
{% endif %}
{% if row['Create View_priv'] is defined %}
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Create View_priv" id="checkbox_Create View_priv" value="Y" title="
{%- trans 'Allows creating new views.' %}"{{ row['Create View_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Create View_priv">
<code>
<dfn title="{% trans 'Allows creating new views.' %}">
CREATE VIEW
</dfn>
</code>
</label>
</div>
{% endif %}
{% if row['Event_priv'] is defined %}
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Event_priv" id="checkbox_Event_priv" value="Y" title="
{%- trans 'Allows to set up events for the event scheduler.' %}"{{ row['Event_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Event_priv">
<code>
<dfn title="{% trans 'Allows to set up events for the event scheduler.' %}">
EVENT
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Trigger_priv" id="checkbox_Trigger_priv" value="Y" title="
{%- trans 'Allows creating and dropping triggers.' %}"{{ row['Trigger_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Trigger_priv">
<code>
<dfn title="{% trans 'Allows creating and dropping triggers.' %}">
TRIGGER
</dfn>
</code>
</label>
</div>
{% endif %}
</fieldset>
<fieldset>
<legend>
<input type="checkbox" class="sub_checkall_box" id="checkall_Administration_priv" title="{% trans 'Check all' %}">
<label for="checkall_Administration_priv">{% trans 'Administration' %}</label>
</legend>
{% if is_global %}
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Grant_priv" id="checkbox_Grant_priv" value="Y" title="
{%- trans 'Allows adding users and privileges without reloading the privilege tables.' %}"{{ row['Grant_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Grant_priv">
<code>
<dfn title="{% trans 'Allows adding users and privileges without reloading the privilege tables.' %}">
GRANT
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Super_priv" id="checkbox_Super_priv" value="Y" title="
{%- trans 'Allows connecting, even if maximum number of connections is reached; required for most administrative operations like setting global variables or killing threads of other users.' %}"
{{- row['Super_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Super_priv">
<code>
<dfn title="{% trans 'Allows connecting, even if maximum number of connections is reached; required for most administrative operations like setting global variables or killing threads of other users.' %}">
SUPER
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Process_priv" id="checkbox_Process_priv" value="Y" title="
{%- trans 'Allows viewing processes of all users.' %}"{{ row['Process_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Process_priv">
<code>
<dfn title="{% trans 'Allows viewing processes of all users.' %}">
PROCESS
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Reload_priv" id="checkbox_Reload_priv" value="Y" title="
{%- trans 'Allows reloading server settings and flushing the server\'s caches.' %}"{{ row['Reload_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Reload_priv">
<code>
<dfn title="{% trans 'Allows reloading server settings and flushing the server\'s caches.' %}">
RELOAD
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Shutdown_priv" id="checkbox_Shutdown_priv" value="Y" title="
{%- trans 'Allows shutting down the server.' %}"{{ row['Shutdown_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Shutdown_priv">
<code>
<dfn title="{% trans 'Allows shutting down the server.' %}">
SHUTDOWN
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Show_db_priv" id="checkbox_Show_db_priv" value="Y" title="
{%- trans 'Gives access to the complete list of databases.' %}"{{ row['Show_db_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Show_db_priv">
<code>
<dfn title="{% trans 'Gives access to the complete list of databases.' %}">
SHOW DATABASES
</dfn>
</code>
</label>
</div>
{% else %}
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Grant_priv" id="checkbox_Grant_priv" value="Y" title="
{%- trans 'Allows user to give to other users or remove from other users the privileges that user possess yourself.' %}"
{{- row['Grant_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Grant_priv">
<code>
<dfn title="{% trans 'Allows user to give to other users or remove from other users the privileges that user possess yourself.' %}">
GRANT
</dfn>
</code>
</label>
</div>
{% endif %}
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Lock_tables_priv" id="checkbox_Lock_tables_priv" value="Y" title="
{%- trans 'Allows locking tables for the current thread.' %}"{{ row['Lock_tables_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Lock_tables_priv">
<code>
<dfn title="{% trans 'Allows locking tables for the current thread.' %}">
LOCK TABLES
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="References_priv" id="checkbox_References_priv" value="Y" title="
{%- trans 'Has no effect in this MySQL version.' %}"{{ row['References_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_References_priv">
<code>
{# l10n: The "REFERENCES" privilege when granting privileges #}
<dfn title="{{ supports_references_privilege ? 'Allows creating foreign key relations.'|trans : (is_mariadb ? 'Not used on MariaDB.'|trans: 'Not used for this MySQL version.'|trans) }}">
REFERENCES
</dfn>
</code>
</label>
</div>
{% if is_global %}
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Repl_client_priv" id="checkbox_Repl_client_priv" value="Y" title="
{%- trans 'Allows the user to ask where the slaves / masters are.' %}"{{ row['Repl_client_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Repl_client_priv">
<code>
<dfn title="{% trans 'Allows the user to ask where the slaves / masters are.' %}">
REPLICATION CLIENT
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Repl_slave_priv" id="checkbox_Repl_slave_priv" value="Y" title="
{%- trans 'Needed for the replication slaves.' %}"{{ row['Repl_slave_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Repl_slave_priv">
<code>
<dfn title="{% trans 'Needed for the replication slaves.' %}">
REPLICATION SLAVE
</dfn>
</code>
</label>
</div>
<div class="item">
{% set grant_count = grant_count + 1 %}
<input type="checkbox" class="checkall" name="Create_user_priv" id="checkbox_Create_user_priv" value="Y" title="
{%- trans 'Allows creating, dropping and renaming user accounts.' %}"{{ row['Create_user_priv'] == 'Y' ? ' checked' }}>
<label for="checkbox_Create_user_priv">
<code>
<dfn title="{% trans 'Allows creating, dropping and renaming user accounts.' %}">
CREATE USER
</dfn>
</code>
</label>
</div>
{% endif %}
</fieldset>
{% if is_global %}
<fieldset>
<legend>{% trans 'Resource limits' %}</legend>
<p>
<small><em>{% trans 'Note: Setting these options to 0 (zero) removes the limit.' %}</em></small>
</p>
<div class="item">
<label for="text_max_questions">
<code>
<dfn title="{% trans 'Limits the number of queries the user may send to the server per hour.' %}">
MAX QUERIES PER HOUR
</dfn>
</code>
</label>
<input type="number" name="max_questions" id="text_max_questions" value="
{{- row.max_questions ?? '0' }}" title="
{%- trans 'Limits the number of queries the user may send to the server per hour.' %}">
</div>
<div class="item">
<label for="text_max_updates">
<code>
<dfn title="{% trans 'Limits the number of commands that change any table or database the user may execute per hour.' %}">
MAX UPDATES PER HOUR
</dfn>
</code>
</label>
<input type="number" name="max_updates" id="text_max_updates" value="
{{- row.max_updates ?? '0' }}" title="
{%- trans 'Limits the number of commands that change any table or database the user may execute per hour.' %}">
</div>
<div class="item">
<label for="text_max_connections">
<code>
<dfn title="{% trans 'Limits the number of new connections the user may open per hour.' %}">
MAX CONNECTIONS PER HOUR
</dfn>
</code>
</label>
<input type="number" name="max_connections" id="text_max_connections" value="
{{- row.max_connections ?? '0' }}" title="
{%- trans 'Limits the number of new connections the user may open per hour.' %}">
</div>
<div class="item">
<label for="text_max_user_connections">
<code>
<dfn title="{% trans 'Limits the number of simultaneous connections the user may have.' %}">
MAX USER_CONNECTIONS
</dfn>
</code>
</label>
<input type="number" name="max_user_connections" id="text_max_user_connections" value="
{{- row.max_user_connections ?? '0' }}" title="
{%- trans 'Limits the number of simultaneous connections the user may have.' %}">
</div>
</fieldset>
<fieldset>
<legend>SSL</legend>
<div id="require_ssl_div">
<div class="item">
<input type="radio" name="ssl_type" id="ssl_type_NONE" title="
{%- trans 'Does not require SSL-encrypted connections.' %}" value="NONE"
{{- row.ssl_type == 'NONE' or row.ssl_type == '' ? ' checked' }}>
<label for="ssl_type_NONE">
<code>REQUIRE NONE</code>
</label>
</div>
<div class="item">
<input type="radio" name="ssl_type" id="ssl_type_ANY" title="
{%- trans 'Requires SSL-encrypted connections.' %}" value="ANY"
{{- row.ssl_type == 'ANY' ? ' checked' }}>
<label for="ssl_type_ANY">
<code>REQUIRE SSL</code>
</label>
</div>
<div class="item">
<input type="radio" name="ssl_type" id="ssl_type_X509" title="
{%- trans 'Requires a valid X509 certificate.' %}" value="X509"
{{- row.ssl_type == 'X509' ? ' checked' }}>
<label for="ssl_type_X509">
<code>REQUIRE X509</code>
</label>
</div>
<div class="item">
<input type="radio" name="ssl_type" id="ssl_type_SPECIFIED" value="SPECIFIED"
{{- row.ssl_type == 'SPECIFIED' ? ' checked' }}>
<label for="ssl_type_SPECIFIED">
<code>SPECIFIED</code>
</label>
</div>
<div id="specified_div" style="padding-left:20px;">
<div class="item">
<label for="text_ssl_cipher">
<code>REQUIRE CIPHER</code>
</label>
<input type="text" name="ssl_cipher" id="text_ssl_cipher" value="{{ row.ssl_cipher }}" size="80" title="
{%- trans 'Requires that a specific cipher method be used for a connection.' %}"
{{- row.ssl_type != 'SPECIFIED' ? ' disabled' }}>
</div>
<div class="item">
<label for="text_x509_issuer">
<code>REQUIRE ISSUER</code>
</label>
<input type="text" name="x509_issuer" id="text_x509_issuer" value="{{ row.x509_issuer }}" size="80" title="
{%- trans 'Requires that a valid X509 certificate issued by this CA be presented.' %}"
{{- row.ssl_type != 'SPECIFIED' ? ' disabled' }}>
</div>
<div class="item">
<label for="text_x509_subject">
<code>REQUIRE SUBJECT</code>
</label>
<input type="text" name="x509_subject" id="text_x509_subject" value="{{ row.x509_subject }}" size="80" title="
{%- trans 'Requires that a valid X509 certificate with this subject be presented.' %}"
{{- row.ssl_type != 'SPECIFIED' ? ' disabled' }}>
</div>
</div>
</div>
</fieldset>
{% endif %}
<div class="clearfloat"></div>
</fieldset>
<input type="hidden" name="grant_count" value="{{ grant_count - (row['Grant_priv'] is defined ? 1 : 0) }}">
{% endif %}
{% if has_submit %}
<fieldset id="fieldset_user_privtable_footer" class="tblFooters">
<input type="hidden" name="update_privs" value="1">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</fieldset>
{% endif %}

View file

@ -0,0 +1,16 @@
<div class="row">
<ul class="nav nav-pills m-2">
<li class="nav-item">
<a class="nav-link{{ active == 'privileges' ? ' active' }}" href="{{ url('/server/privileges', {'viewing_mode': 'server'}) }}">
{% trans 'User accounts overview' %}
</a>
</li>
{% if is_super_user %}
<li class="nav-item">
<a class="nav-link{{ active == 'user-groups' ? ' active' }}" href="{{ url('/server/user-groups') }}">
{% trans 'User groups' %}
</a>
</li>
{% endif %}
</ul>
</div>

View file

@ -0,0 +1,31 @@
<div class="row">
<div class="col-12">
<h2>
{{ get_icon('b_usrlist') }}
{% trans 'User accounts overview' %}
</h2>
</div>
</div>
{{ error_messages|raw }}
{{ empty_user_notice|raw }}
{{ initials|raw }}
{% if users_overview is not empty %}
{{ users_overview|raw }}
{% elseif is_createuser %}
<div class="row">
<div class="col-12">
<fieldset id="fieldset_add_user">
<legend>{% trans %}New{% context %}Create new user{% endtrans %}</legend>
<a id="add_user_anchor" href="{{ url('/server/privileges', {'adduser': true}) }}">
{{ get_icon('b_usradd', 'Add user account'|trans) }}
</a>
</fieldset>
</div>
</div>
{% endif %}
{{ flush_notice|raw }}

View file

@ -0,0 +1,152 @@
<div id="edit_user_dialog">
<h2>
{{ get_icon('b_usredit') }}
{% trans 'Edit privileges:' %}
{% trans 'User account' %}
{% if database is not empty %}
<em>
<a class="edit_user_anchor" href="{{ url('/server/privileges', {
'username': username,
'hostname': hostname,
'dbname': '',
'tablename': ''
}) }}">
'{{ username }}'@'{{ hostname }}'
</a>
</em>
-
{% if is_databases %}
{% trans 'Databases' %}
{% else %}
{% trans 'Database' %}
{% endif %}
{% if table is not empty %}
<em>
<a href="{{ url('/server/privileges', {
'username': username,
'hostname': hostname,
'dbname': dbname,
'tablename': ''
}) }}">
{{ database }}
</a>
</em>
-
{% trans 'Table' %}
<em>{{ table }}</em>
{% else %}
{% if database is not iterable %}
{% set database = [database] %}
{% endif %}
<em>
{{ database|join(', ') }}
</em>
{% endif %}
{% else %}
<em>'{{ username }}'@'{{ hostname }}'</em>
{% endif %}
</h2>
{% if current_user == username ~ '@' ~ hostname %}
{{ 'Note: You are attempting to edit privileges of the user with which you are currently logged in.'|trans|notice }}
{% endif %}
{% if user_does_not_exists %}
{{ 'The selected user was not found in the privilege table.'|trans|error }}
{{ login_information_fields|raw }}
{% endif %}
<form class="submenu-item" name="usersForm" id="addUsersForm" action="{{ url('/server/privileges') }}" method="post">
{{ get_hidden_inputs(params) }}
{{ privileges_table|raw }}
</form>
{{ table_specific_rights|raw }}
{% if database is not iterable and database|length > 0 and not is_wildcard %}
[
{% trans 'Database' %}
<a href="{{ database_url|raw }}{{ get_common({
'db': database|replace({'\\_': '_', '\\%': '%'}),
'reload': true
}, '&') }}">
{{ database|replace({'\\_': '_', '\\%': '%'}) }}:
{{ database_url_title }}
</a>
]
{% if table|length > 0 %}
[
{% trans 'Table' %}
<a href="{{ table_url|raw }}{{ get_common({
'db': database|replace({'\\_': '_', '\\%': '%'}),
'table': table,
'reload': true
}, '&') }}">
{{ table }}:
{{ table_url_title }}
</a>
]
{% endif %}
{% endif %}
{{ change_password|raw }}
<form action="{{ url('/server/privileges') }}" id="copyUserForm" method="post" class="copyUserForm submenu-item">
{{ get_hidden_inputs() }}
<input type="hidden" name="old_username" value="{{ username }}">
<input type="hidden" name="old_hostname" value="{{ hostname }}">
{% if user_group is not empty %}
<input type="hidden" name="old_usergroup" value="{{ user_group }}">
{% endif %}
<fieldset id="fieldset_change_copy_user">
<legend data-submenu-label="{% trans 'Login Information' %}">
{% trans 'Change login information / Copy user account' %}
</legend>
{{ change_login_info_fields|raw }}
<fieldset id="fieldset_mode">
<legend>
{% trans 'Create a new user account with the same privileges and …' %}
</legend>
<div class="form-group form-check">
<input class="form-check-input" type="radio" name="mode" id="mode_4" value="4" checked>
<label class="form-check-label" for="mode_4">
{% trans '… keep the old one.' %}
</label>
</div>
<div class="form-group form-check">
<input class="form-check-input" type="radio" name="mode" id="mode_1" value="1">
<label class="form-check-label" for="mode_1">
{% trans '… delete the old one from the user tables.' %}
</label>
</div>
<div class="form-group form-check">
<input class="form-check-input" type="radio" name="mode" id="mode_2" value="2">
<label class="form-check-label" for="mode_2">
{% trans '… revoke all active privileges from the old one and delete it afterwards.' %}
</label>
</div>
<div class="form-group form-check">
<input class="form-check-input" type="radio" name="mode" id="mode_3" value="3">
<label class="form-check-label" for="mode_3">
{% trans '… delete the old one from the user tables and reload the privileges afterwards.' %}
</label>
</div>
</fieldset>
</fieldset>
<fieldset id="fieldset_change_copy_user_footer" class="tblFooters">
<input type="hidden" name="change_copy" value="1">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</fieldset>
</form>
</div>

View file

@ -0,0 +1,146 @@
<form name="usersForm" id="usersForm" action="{{ url('/server/privileges') }}" method="post">
{{ get_hidden_inputs() }}
<div class="table-responsive">
<table id="userRightsTable" class="table table-light table-striped table-hover w-auto">
<thead class="thead-light">
<tr>
<th></th>
<th scope="col">{% trans 'User name' %}</th>
<th scope="col">{% trans 'Host name' %}</th>
<th scope="col">{% trans 'Password' %}</th>
<th scope="col">
{% trans 'Global privileges' %}
{{ show_hint('Note: MySQL privilege names are expressed in English.') }}
</th>
{% if menus_work %}
<th scope="col">{% trans 'User group' %}</th>
{% endif %}
<th scope="col">{% trans 'Grant' %}</th>
<th scope="col" colspan="{{ user_group_count > 0 ? '3' : '2' }}">{% trans 'Action' %}</th>
</tr>
</thead>
<tbody>
{% for host in hosts %}
<tr>
<td>
<input type="checkbox" class="checkall" id="checkbox_sel_users_{{ loop.index }}" value="
{{- host.user ~ '&amp;#27;' ~ host.host }}" name="selected_usr[]">
</td>
<td>
<label for="checkbox_sel_users_{{ loop.index }}">
{% if host.user is empty %}
<span class="text-danger">{% trans 'Any' %}</span>
{% else %}
<a class="edit_user_anchor" href="{{ url('/server/privileges', {
'username': host.user,
'hostname': host.host,
'dbname': '',
'tablename': '',
'routinename': '',
}) }}">
{{ host.user }}
</a>
{% endif %}
</label>
</td>
<td>{{ host.host }}</td>
<td>
{% if host.has_password %}
{% trans 'Yes' %}
{% else %}
<span class="text-danger">{% trans 'No' %}</span>
{% endif %}
{{ not host.has_select_priv ? show_hint('The selected user was not found in the privilege table.'|trans) }}
</td>
<td>
<code>{{ host.privileges|join(', ')|raw }}</code>
</td>
{% if menus_work %}
<td class="usrGroup">{{ host.group }}</td>
{% endif %}
<td>{{ host.has_grant ? 'Yes'|trans : 'No'|trans }}</td>
{% if is_grantuser %}
<td class="text-center">
<a class="edit_user_anchor" href="{{ url('/server/privileges', {
'username': host.user,
'hostname': host.host,
'dbname': '',
'tablename': '',
'routinename': '',
}) }}">
{{ get_icon('b_usredit', 'Edit privileges'|trans) }}
</a>
</td>
{% endif %}
{% if menus_work and user_group_count > 0 %}
<td class="text-center">
{% if host.user is not empty %}
<a class="edit_user_group_anchor ajax" href="{{ url('/server/privileges', {'username': host.user}) }}">
{{ get_icon('b_usrlist', 'Edit user group'|trans) }}
</a>
{% endif %}
</td>
{% endif %}
<td class="text-center">
<a class="export_user_anchor ajax" href="{{ url('/server/privileges', {
'username': host.user,
'hostname': host.host,
'initial': initial,
'export': true,
}) }}">
{{ get_icon('b_tblexport', 'Export'|trans) }}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="floatleft row">
<div class="col-12">
<img class="selectallarrow" width="38" height="22" src="
{{- theme_image_path }}arrow_{{ text_dir }}.png" alt="{% trans 'With selected:' %}">
<input type="checkbox" id="usersForm_checkall" class="checkall_box" title="{% trans 'Check all' %}">
<label for="usersForm_checkall">{% trans 'Check all' %}</label>
<em class="with-selected">{% trans 'With selected:' %}</em>
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="export" title="{% trans 'Export' %}">
{{ get_icon('b_tblexport', 'Export'|trans) }}
</button>
<input type="hidden" name="initial" value="{{ initial }}">
</div>
</div>
<div class="clearfloat"></div>
{% if is_createuser %}
<div class="card mb-3">
<div class="card-header">{% trans %}New{% context %}Create new user{% endtrans %}</div>
<div class="card-body">
<a id="add_user_anchor" href="{{ url('/server/privileges', {'adduser': true}) }}">
{{ get_icon('b_usradd', 'Add user account'|trans) }}
</a>
</div>
</div>
{% endif %}
<div id="deleteUserCard" class="card mb-3">
<div class="card-header">{{ get_icon('b_usrdrop', 'Remove selected user accounts'|trans) }}</div>
<div class="card-body">
<p class="card-text">{% trans 'Revoke all active privileges from the users and delete them afterwards.' %}</p>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="dropUsersDbCheckbox" name="drop_users_db">
<label class="form-check-label" for="dropUsersDbCheckbox">
{% trans 'Drop the databases that have the same names as the users.' %}
</label>
</div>
</div>
<div class="card-footer text-right">
<input type="hidden" name="mode" value="2">
<input id="buttonGo" class="btn btn-primary ajax" type="submit" name="delete" value="{% trans 'Go' %}">
</div>
</div>
</form>

View file

@ -0,0 +1,35 @@
<form method="post" action="{{ url('/server/replication') }}">
{{ get_hidden_inputs('', '') }}
<fieldset id="fieldset_add_user_login">
<legend>
{% trans 'Slave configuration' %} -
{% trans 'Change or reconfigure master server' %}
</legend>
<p>
{% trans 'Make sure you have a unique server-id in your configuration file (my.cnf). If not, please add the following line into [mysqld] section:' %}
</p>
<pre>server-id={{ server_id }}</pre>
<div class="item">
<label for="text_username">{% trans 'User name:' %}</label>
<input id="text_username" name="username" type="text" maxlength="{{ username_length }}" title="{% trans 'User name' %}" required>
</div>
<div class="item">
<label for="text_pma_pw">{% trans 'Password:' %}</label>
<input id="text_pma_pw" name="pma_pw" type="password" title="{% trans 'Password' %}" required>
</div>
<div class="item">
<label for="text_hostname">{% trans 'Host:' %}</label>
<input id="text_hostname" name="hostname" type="text" maxlength="{{ hostname_length }}" value="" required>
</div>
<div class="item">
<label for="text_port">{% trans 'Port:' %}</label>
<input id="text_port" name="text_port" type="number" maxlength="6" value="3306" required>
</div>
</fieldset>
<fieldset id="fieldset_user_privtable_footer" class="tblFooters">
<input type="hidden" name="sr_take_action" value="true">
<input type="hidden" name="{{ submit_name }}" value="1">
<input class="btn btn-primary" type="submit" id="confslave_submit" value="{% trans 'Go' %}">
</fieldset>
</form>

View file

@ -0,0 +1,9 @@
<select id="db_select" class="width96" name="db_select[]" size="6" multiple>
{% for database in databases %}
<option value="{{ database }}">{{ database }}</option>
{% endfor %}
</select>
<p>
<a href="#" id="db_select_href">{% trans 'Select all' %}</a> /
<a href="#" id="db_reset_href">{% trans 'Unselect all' %}</a>
</p>

View file

@ -0,0 +1,44 @@
<div class="container-fluid">
<div class="row">
<h2>
{{ get_image('s_replication') }}
{% trans 'Replication' %}
</h2>
</div>
{% if is_super_user %}
<div class="row">
<div id="replication" class="container-fluid">
{{ error_messages|raw }}
{% if is_master %}
{{ master_replication_html|raw }}
{% elseif master_configure is null and clear_screen is null %}
<div class="card mb-2">
<div class="card-header">{% trans 'Master replication' %}</div>
<div class="card-body">
{% apply format('<a href="' ~ url('/server/replication') ~ '" data-post="' ~ get_common(url_params|merge({'mr_configure': true}), '') ~ '">', '</a>')|raw %}
{% trans %}
This server is not configured as master in a replication process. Would you like to %sconfigure%s it?
{% endtrans %}
{% endapply %}
</div>
</div>
{% endif %}
{% if master_configure is not null %}
{{ master_configuration_html|raw }}
{% else %}
{% if clear_screen is null %}
{{ slave_configuration_html|raw }}
{% endif %}
{% if slave_configure is not null %}
{{ change_master_html|raw }}
{% endif %}
{% endif %}
</div>
</div>
</div>
{% else %}
{{ 'No privileges'|trans|error }}
{% endif %}

View file

@ -0,0 +1,84 @@
<div id="master_addslaveuser_gui">
<form action="{{ url('/server/privileges') }}" method="post" autocomplete="off" id="addUsersForm">
{{ get_hidden_inputs('', '') }}
<fieldset id="fieldset_add_user_login">
<legend>{% trans 'Add slave replication user' %}</legend>
<input type="hidden" name="grant_count" value="25">
<input type="hidden" name="createdb" id="createdb_0" value="0">
{# Needed for the replication slaves. #}
<input type="hidden" name="Repl_slave_priv" id="checkbox_Repl_slave_priv" value="Y">
<input type="hidden" name="sr_take_action" value="true">
<div class="item">
<label for="select_pred_username">
{% trans 'User name:' %}
</label>
<span class="options">
<select name="pred_username" id="select_pred_username" title="{% trans 'User name' %}">
<option value="any"{{ predefined_username == 'any' ? ' selected' }}>{% trans 'Any user' %}</option>
<option value="userdefined"{{ predefined_username == 'userdefined' ? ' selected' }}>{% trans 'Use text field:' %}</option>
</select>
</span>
<input type="text" name="username" id="pma_username" maxlength="{{ username_length }}" title="{% trans 'User name' %}" value="{{ username }}">
</div>
<div class="item">
<label for="select_pred_hostname">
{% trans 'Host:' %}
</label>
<span class="options">
<select name="pred_hostname" id="select_pred_hostname" title="{% trans 'Host' %}"
{%- if this_host is not null %} data-thishost="{{ this_host }}"{% endif %}>
<option value="any"{{ predefined_hostname == 'any' ? ' selected' }}>{% trans 'Any host' %}</option>
<option value="localhost"{{ predefined_hostname == 'localhost' ? ' selected' }}>{% trans 'Local' %}</option>
{% if this_host is not null %}
<option value="thishost"{{ predefined_hostname == 'thishost' ? ' selected' }}>{% trans 'This host' %}</option>
{% endif %}
<option value="hosttable"{{ predefined_hostname == 'hosttable' ? ' selected' }}>{% trans 'Use host table' %}</option>
<option value="userdefined"{{ predefined_hostname == 'userdefined' ? ' selected' }}>{% trans 'Use text field:' %}</option>
</select>
</span>
<input type="text" name="hostname" id="pma_hostname" maxlength="{{ hostname_length }}" title="{% trans 'Host' %}" value="{{ hostname }}">
{{ show_hint('When Host table is used, this field is ignored and values stored in Host table are used instead.'|trans) }}
</div>
<div class="item">
<label for="select_pred_password">
{% trans 'Password:' %}
</label>
<span class="options">
<select name="pred_password" id="select_pred_password" title="{% trans 'Password' %}">
<option value="none"{{ has_username ? ' selected' }}>{% trans 'No password' %}</option>
<option value="userdefined"{{ not has_username ? ' selected' }}>{% trans 'Use text field:' %}</option>
</select>
</span>
<input type="password" id="text_pma_pw" name="pma_pw" title="{% trans 'Password' %}">
</div>
<div class="item">
<label for="text_pma_pw2">
{% trans 'Re-type:' %}
</label>
<span class="options"></span>
<input type="password" id="text_pma_pw2" name="pma_pw2" title="{% trans 'Re-type' %}">
</div>
<div class="item">
<label for="button_generate_password">
{% trans 'Generate password:' %}
</label>
<span class="options">
<input type="button" class="btn btn-secondary button" id="button_generate_password" value="{% trans 'Generate' %}">
</span>
<input type="text" name="generated_pw" id="generated_pw">
</div>
</fieldset>
<fieldset id="fieldset_user_privtable_footer" class="tblFooters">
<input type="hidden" name="adduser_submit" value="1">
<input class="btn btn-primary" type="submit" id="adduser_submit" value="{% trans 'Go' %}">
</fieldset>
</form>
</div>

View file

@ -0,0 +1,32 @@
<fieldset>
<legend>{% trans 'Master configuration' %}</legend>
<p>
{% trans %}
This server is not configured as a master server in a replication process. You can choose from either replicating all databases and ignoring some of them (useful if you want to replicate a majority of the databases) or you can choose to ignore all databases by default and allow only certain databases to be replicated. Please select the mode:
{% endtrans %}
</p>
<select name="db_type" id="db_type">
<option value="all">{% trans 'Replicate all databases; Ignore:' %}</option>
<option value="ign">{% trans 'Ignore all databases; Replicate:' %}</option>
</select>
<p>{% trans 'Please select databases:' %}</p>
{{ database_multibox|raw }}
<p>
{% trans %}
Now, add the following lines at the end of [mysqld] section in your my.cnf and please restart the MySQL server afterwards.
{% endtrans %}
</p>
<pre id="rep"></pre>
<p>
{% trans %}
Once you restarted MySQL server, please click on Go button. Afterwards, you should see a message informing you, that this server <strong>is</strong> configured as master.
{% endtrans %}
</p>
</fieldset>
<fieldset class="tblFooters">
<form method="post" action="{{ url('/server/replication') }}">
{{ get_hidden_inputs('', '') }}
<input id="goButton" class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</form>
</fieldset>

View file

@ -0,0 +1,54 @@
{% if not clear_screen %}
<div class="card mb-2">
<div class="card-header">{% trans 'Master replication' %}</div>
<div class="card-body">
{% 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="pma-table 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="{{ url('/server/replication') }}" 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>
</div>
</div>
{% endif %}

View file

@ -0,0 +1,111 @@
<div class="card">
<div class="card-header">{% trans 'Slave replication' %}</div>
<div class="card-body">
{% if server_slave_multi_replication %}
{% trans 'Master connection:' %}
<form method="get" action="{{ url('/server/replication') }}">
{{ get_hidden_inputs(url_params) }}
<select name="master_connection">
<option value="">{% trans 'Default' %}</option>
{% for server in server_slave_multi_replication %}
<option value="{{ server['Connection_name'] }}"{{ master_connection == server['Connection_name'] ? ' selected' }}>
{{ server['Connection_name'] }}
</option>
{% endfor %}
</select>
<input id="goButton" class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</form>
<br>
<br>
{% endif %}
{% if server_slave_status %}
<div id="slave_configuration_gui">
{% if not slave_sql_running %}
{{ 'Slave SQL Thread not running!'|trans|error }}
{% endif %}
{% if not slave_io_running %}
{{ 'Slave IO Thread not running!'|trans|error }}
{% endif %}
<p>{% trans 'Server is configured as slave in a replication process. Would you like to:' %}</p>
<ul>
<li>
<a href="#slave_status_href" id="slave_status_href">{% trans 'See slave status table' %}</a>
{{ slave_status_table|raw }}
</li>
<li>
<a href="#slave_control_href" id="slave_control_href">{% trans 'Control slave:' %}</a>
<div id="slave_control_gui" class="hide">
<ul>
<li>
<a href="{{ url('/server/replication') }}" data-post="{{ slave_control_full_link|raw }}">
{{ not slave_io_running or not slave_sql_running ? 'Full start' : 'Full stop' }}
</a>
</li>
<li>
<a class="ajax" id="reset_slave" href="{{ url('/server/replication') }}" data-post="{{ slave_control_reset_link|raw }}">
{% trans 'Reset slave' %}
</a>
</li>
<li>
<a href="{{ url('/server/replication') }}" data-post="{{ slave_control_sql_link|raw }}">
{% if not slave_sql_running %}
{% trans 'Start SQL Thread only' %}
{% else %}
{% trans 'Stop SQL Thread only' %}
{% endif %}
</a>
</li>
<li>
<a href="{{ url('/server/replication') }}" data-post="{{ slave_control_io_link|raw }}">
{% if not slave_io_running %}
{% trans 'Start IO Thread only' %}
{% else %}
{% trans 'Stop IO Thread only' %}
{% endif %}
</a>
</li>
</ul>
</div>
</li>
<li>
<a href="#slave_errormanagement_href" id="slave_errormanagement_href">
{% trans 'Error management:' %}
</a>
<div id="slave_errormanagement_gui" class="hide">
{{ 'Skipping errors might lead into unsynchronized master and slave!'|trans|error }}
<ul>
<li>
<a href="{{ url('/server/replication') }}" data-post="{{ slave_skip_error_link|raw }}">
{% trans 'Skip current error' %}
</a>
</li>
<li>
<form method="post" action="{{ url('/server/replication') }}">
{{ get_hidden_inputs('', '') }}
{{ 'Skip next %s errors.'|trans|format('<input type="text" name="sr_skip_errors_count" value="1" class="repl_gui_skip_err_cnt">')|raw }}
<input class="btn btn-primary" type="submit" name="sr_slave_skip_error" value="{% trans 'Go' %}">
<input type="hidden" name="sr_take_action" value="1">
</form>
</li>
</ul>
</div>
</li>
<li>
<a href="{{ url('/server/replication') }}" data-post="{{ reconfigure_master_link|raw }}">
{% trans 'Change or reconfigure master server' %}
</a>
</li>
</ul>
</div>
{% elseif not has_slave_configure %}
{% apply format('<a href="' ~ url('/server/replication') ~ '" data-post="' ~ get_common(url_params|merge({
'sl_configure': true,
'repl_clear_scr': true
})) ~ '">', '</a>')|raw %}
{% trans 'This server is not configured as slave in a replication process. Would you like to %sconfigure%s it?' %}
{% endapply %}
{% endif %}
</div>
</div>

View file

@ -0,0 +1,34 @@
<div id="replication_{{ type }}_section"{{ is_hidden ? ' style="display: none;"' }}>
{% if has_title %}
<h4>
<a id="replication_{{ type }}"></a>
{% if type == 'master' %}
{% trans 'Master status' %}
{% else %}
{% trans 'Slave status' %}
{% endif %}
</h4>
{% endif %}
<table id="server{{ type }}replicationsummary" class="pma-table data">
<thead>
<tr>
<th>{% trans 'Variable' %}</th>
<th>{% trans 'Value' %}</th>
</tr>
</thead>
<tbody>
{% for variable in variables %}
<tr>
<td class="name">{{ variable.name }}</td>
<td class="value">
<span{% if variable.status == 'attention' %} class="attention"{% elseif variable.status == 'allfine' %} class="allfine"{% endif %}>
{{ variable.value }}
</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>

View file

@ -0,0 +1,101 @@
{% extends 'server/status/base.twig' %}
{% set active = 'advisor' %}
{% block content %}
<h2>{% trans 'Advisor system' %}</h2>
{% if data is empty %}
{{ 'Not enough privilege to view the advisor.'|trans|error }}
{% else %}
<button type="button" class="btn btn-secondary mb-4" data-toggle="modal" data-target="#advisorInstructionsModal">
{{ get_icon('b_help', 'Instructions'|trans) }}
</button>
<div class="modal fade" id="advisorInstructionsModal" tabindex="-1" role="dialog" aria-labelledby="advisorInstructionsModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="advisorInstructionsModalLabel">{% trans 'Advisor system' %}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="{% trans 'Close' %}">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>
{%- trans -%}
The Advisor system can provide recommendations on server variables by analyzing the server status variables.
{%- endtrans -%}
</p>
<p>
{%- trans -%}
Do note however that this system provides recommendations based on simple calculations and by rule of thumb which may not necessarily apply to your system.
{%- endtrans -%}
</p>
<p>
{%- trans -%}
Prior to changing any of the configuration, be sure to know what you are changing (by reading the documentation) and how to undo the change. Wrong tuning can have a very negative effect on performance.
{%- endtrans -%}
</p>
<p>
{%- trans -%}
The best way to tune your system would be to change only one setting at a time, observe or benchmark your database, and undo the change if there was no clearly measurable improvement.
{%- endtrans -%}
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">{% trans 'Close' %}</button>
</div>
</div>
</div>
</div>
{% if data.errors|length > 0 %}
<div class="alert alert-danger mt-2 mb-2" role="alert">
<h4 class="alert-heading">{% trans 'Errors occurred while executing rule expressions:' %}</h4>
<ul>
{% for error in data.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if data.fired|length > 0 %}
<h4>{% trans 'Possible performance issues' %}</h4>
<div class="accordion mb-4" id="rulesAccordion">
{% for rule in data.fired %}
<div class="card">
<div class="card-header" id="heading{{ loop.index }}">
<button class="btn btn-link{{ not loop.first ? ' collapsed' }}" type="button" data-toggle="collapse" data-target="#collapse{{ loop.index }}" aria-expanded="{{ loop.first ? 'true' : 'false' }}" aria-controls="collapse{{ loop.index }}">
{{ rule.issue|striptags }}
</button>
</div>
<div id="collapse{{ loop.index }}" class="collapse{{ loop.first ? ' show' }}" aria-labelledby="heading{{ loop.index }}" data-parent="#rulesAccordion">
<div class="card-body">
<dl>
<dt>{% trans 'Issue:' %}</dt>
<dd>{{ rule.issue|raw }}</dd>
<dt>{% trans 'Recommendation:' %}</dt>
<dd>{{ rule.recommendation|raw }}</dd>
<dt>{% trans 'Justification:' %}</dt>
<dd>{{ rule.justification }}</dd>
<dt>{% trans 'Used variable / formula:' %}</dt>
<dd>{{ rule.formula }}</dd>
<dt>{% trans 'Test:' %}</dt>
<dd>{{ rule.test }}</dd>
</dl>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
{% endblock %}

View file

@ -0,0 +1,38 @@
<div class="container-fluid">
<div class="row">
<ul class="nav nav-pills m-2">
<li class="nav-item">
<a href="{{ url('/server/status') }}" class="nav-link{{ active == 'status' ? ' active' }}">
{% trans 'Server' %}
</a>
</li>
<li class="nav-item">
<a href="{{ url('/server/status/processes') }}" class="nav-link{{ active == 'processes' ? ' active' }}">
{% trans 'Processes' %}
</a>
</li>
<li class="nav-item">
<a href="{{ url('/server/status/queries') }}" class="nav-link{{ active == 'queries' ? ' active' }}">
{% trans 'Query statistics' %}
</a>
</li>
<li class="nav-item">
<a href="{{ url('/server/status/variables') }}" class="nav-link{{ active == 'variables' ? ' active' }}">
{% trans 'All status variables' %}
</a>
</li>
<li class="nav-item">
<a href="{{ url('/server/status/monitor') }}" class="nav-link{{ active == 'monitor' ? ' active' }}">
{% trans 'Monitor' %}
</a>
</li>
<li class="nav-item">
<a href="{{ url('/server/status/advisor') }}" class="nav-link{{ active == 'advisor' ? ' active' }}">
{% trans 'Advisor' %}
</a>
</li>
</ul>
</div>
{% block content %}{% endblock %}
</div>

View file

@ -0,0 +1,269 @@
{% extends 'server/status/base.twig' %}
{% set active = 'monitor' %}
{% block content %}
<div class="tabLinks row">
<a href="#pauseCharts">
{{ get_image('play') }}
{% trans 'Start Monitor' %}
</a>
<a href="#settingsPopup" class="popupLink">
{{ get_image('s_cog') }}
{% trans 'Settings' %}
</a>
<a href="#monitorInstructionsDialog">
{{ get_image('b_help') }}
{% trans 'Instructions/Setup' %}
</a>
<a href="#endChartEditMode" class="hide">
{{ get_image('s_okay') }}
{% trans 'Done dragging (rearranging) charts' %}
</a>
</div>
<div class="popupContent settingsPopup">
<a href="#addNewChart">
{{ get_image('b_chart') }}
{% trans 'Add chart' %}
</a>
<a href="#rearrangeCharts">
{{ get_image('b_tblops') }}
{% trans 'Enable charts dragging' %}
</a>
<div class="clearfloat paddingtop"></div>
<div class="floatleft">
{% trans 'Refresh rate' %}
<br>
<select id="id_gridChartRefresh" class="refreshRate" name="gridChartRefresh">
{% for rate in [2, 3, 4, 5, 10, 20, 40, 60, 120, 300, 600, 1200] %}
<option value="{{ rate }}"{{ rate == 5 ? ' selected' }}>
{% if rate < 60 %}
{% if rate == 1 %}
{{ '%d second'|trans|format(rate) }}
{% else %}
{{ '%d seconds'|trans|format(rate) }}
{% endif %}
{% else %}
{% if rate / 60 == 1 %}
{{ '%d minute'|trans|format(rate / 60) }}
{% else %}
{{ '%d minutes'|trans|format(rate / 60) }}
{% endif %}
{% endif %}
</option>
{% endfor %}
</select>
<br>
</div>
<div class="floatleft">
{% trans 'Chart columns' %}
<br>
<select name="chartColumns">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
</div>
<div class="clearfloat paddingtop">
<strong>{% trans 'Chart arrangement' %}</strong>
{{ show_hint('The arrangement of the charts is stored to the browsers local storage. You may want to export it if you have a complicated set up.'|trans) }}
<br>
<a class="ajax" href="#importMonitorConfig">
{% trans 'Import' %}
</a> -
<a class="disableAjax" href="#exportMonitorConfig">
{% trans 'Export' %}
</a> -
<a href="#clearMonitorConfig">
{% trans 'Reset to default' %}
</a>
</div>
</div>
<div id="monitorInstructionsDialog" title="{% trans 'Monitor Instructions' %}" class="hide">
<p>
{% trans %}
The phpMyAdmin Monitor can assist you in optimizing the server configuration and track down time intensive queries. For the latter you will need to set log_output to 'TABLE' and have either the slow_query_log or general_log enabled. Note however, that the general_log produces a lot of data and increases server load by up to 15%.
{% endtrans %}
</p>
<img class="ajaxIcon" src="{{ image_path }}ajax_clock_small.gif" alt="{% trans 'Loading…' %}">
<div class="ajaxContent"></div>
<br>
<div class="monitorUse hide">
<p><strong>{% trans 'Using the monitor:' %}</strong></p>
<p>
{% trans %}
Your browser will refresh all displayed charts in a regular interval. You may add charts and change the refresh rate under 'Settings', or remove any chart using the cog icon on each respective chart.
{% endtrans %}
</p>
<p>
{% trans %}
To display queries from the logs, select the relevant time span on any chart by holding down the left mouse button and panning over the chart. Once confirmed, this will load a table of grouped queries, there you may click on any occurring SELECT statements to further analyze them.
{% endtrans %}
</p>
<p>
{{ get_image('s_attention') }}
<strong>{% trans 'Please note:' %}</strong>
</p>
<p>
{% trans %}
Enabling the general_log may increase the server load by 5-15%. Also be aware that generating statistics from the logs is a load intensive task, so it is advisable to select only a small time span and to disable the general_log and empty its table once monitoring is not required any more.
{% endtrans %}
</p>
</div>
</div>
<div id="addChartDialog" title="{% trans 'Add chart' %}" class="hide">
<div id="tabGridVariables">
<p>
<input type="text" name="chartTitle" value="{% trans 'Chart Title' %}">
</p>
<input type="radio" name="chartType" value="preset" id="chartPreset">
<label for="chartPreset">{% trans 'Preset chart' %}</label>
<select name="presetCharts"></select>
<br>
<input type="radio" name="chartType" value="variable" id="chartStatusVar" checked="checked">
<label for="chartStatusVar">
{% trans 'Status variable(s)' %}
</label>
<br>
<div id="chartVariableSettings">
<label for="chartSeries">{% trans 'Select series:' %}</label>
<br>
<select id="chartSeries" name="varChartList" size="1">
<option>{% trans 'Commonly monitored' %}</option>
<option>Processes</option>
<option>Questions</option>
<option>Connections</option>
<option>Bytes_sent</option>
<option>Bytes_received</option>
<option>Threads_connected</option>
<option>Created_tmp_disk_tables</option>
<option>Handler_read_first</option>
<option>Innodb_buffer_pool_wait_free</option>
<option>Key_reads</option>
<option>Open_tables</option>
<option>Select_full_join</option>
<option>Slow_queries</option>
</select>
<br>
<label for="variableInput">
{% trans 'or type variable name:' %}
</label>
<input type="text" name="variableInput" id="variableInput">
<br>
<input type="checkbox" name="differentialValue" id="differentialValue" value="differential" checked="checked">
<label for="differentialValue">
{% trans 'Display as differential value' %}
</label>
<br>
<input type="checkbox" id="useDivisor" name="useDivisor" value="1">
<label for="useDivisor">{% trans 'Apply a divisor' %}</label>
<span class="divisorInput hide">
<input type="text" name="valueDivisor" size="4" value="1">
(<a href="#kibDivisor">{% trans 'KiB' %}</a>,
<a href="#mibDivisor">{% trans 'MiB' %}</a>)
</span>
<br>
<input type="checkbox" id="useUnit" name="useUnit" value="1">
<label for="useUnit">
{% trans 'Append unit to data values' %}
</label>
<span class="unitInput hide">
<input type="text" name="valueUnit" size="4" value="">
</span>
<p>
<a href="#submitAddSeries">
<strong>{% trans 'Add this series' %}</strong>
</a>
<span id="clearSeriesLink" class="hide">
| <a href="#submitClearSeries">{% trans 'Clear series' %}</a>
</span>
</p>
{% trans 'Series in chart:' %}
<br>
<span id="seriesPreview">
<em>{% trans 'None' %}</em>
</span>
</div>
</div>
</div>
<div id="logAnalyseDialog" title="{% trans 'Log statistics' %}" class="hide">
<p>
{% trans 'Selected time range:' %}
<input type="text" name="dateStart" class="datetimefield" value="">
-
<input type="text" name="dateEnd" class="datetimefield" value="">
</p>
<input type="checkbox" id="limitTypes" value="1" checked="checked">
<label for="limitTypes">
{% trans 'Only retrieve SELECT,INSERT,UPDATE and DELETE Statements' %}
</label>
<br>
<input type="checkbox" id="removeVariables" value="1" checked="checked">
<label for="removeVariables">
{% trans 'Remove variable data in INSERT statements for better grouping' %}
</label>
<p>
{% trans 'Choose from which log you want the statistics to be generated from.' %}
</p>
<p>
{% trans 'Results are grouped by query text.' %}
</p>
</div>
<div id="queryAnalyzerDialog" title="{% trans 'Query analyzer' %}" class="hide">
<textarea id="sqlquery"></textarea>
<br>
<div class="placeHolder"></div>
</div>
<div class="clearfloat"></div>
<div class="row"><table class="pma-table clearfloat tdblock" id="chartGrid"></table></div>
<div id="logTable"><br></div>
<script type="text/javascript">
var variableNames = [
{% for variable_name in javascript_variable_names %}
"{{ variable_name|e('js') }}",
{% endfor %}
];
</script>
<form id="js_data" class="hide">
{% for name, value in form %}
<input type="hidden" name="{{ name }}" value="{{ value }}">
{% endfor %}
</form>
<div id="profiling_docu" class="hide">
{{ show_mysql_docu('general-thread-states') }}
</div>
<div id="explain_docu" class="hide">
{{ show_mysql_docu('explain-output') }}
</div>
{% endblock %}

View file

@ -0,0 +1,57 @@
{% extends 'server/status/base.twig' %}
{% set active = 'processes' %}
{% block content %}
<div class="row">
<fieldset id="tableFilter">
<legend>{% trans 'Filters' %}</legend>
<form action="{{ url('/server/status/processes') }}" method="post">
{{ get_hidden_inputs(url_params) }}
<input class="btn btn-secondary" type="submit" value="{% trans 'Refresh' %}">
<div class="formelement">
<input type="checkbox" name="showExecuting" id="showExecuting" class="autosubmit"{{ is_checked ? ' checked' }}>
<label for="showExecuting">
{% trans 'Show only active' %}
</label>
</div>
</form>
</fieldset>
</div>
{{ server_process_list|raw }}
<div class="row">
{{ 'Note: Enabling the auto refresh here might cause heavy traffic between the web server and the MySQL server.'|trans|notice }}
</div>
<div class="tabLinks row">
<label>
{% trans 'Refresh rate' %}:
<select id="id_refreshRate" class="refreshRate" name="refreshRate">
{% for rate in [2, 3, 4, 5, 10, 20, 40, 60, 120, 300, 600, 1200] %}
<option value="{{ rate }}"{{ rate == 5 ? ' selected' }}>
{% if rate < 60 %}
{% if rate == 1 %}
{{ '%d second'|trans|format(rate) }}
{% else %}
{{ '%d seconds'|trans|format(rate) }}
{% endif %}
{% else %}
{% if rate / 60 == 1 %}
{{ '%d minute'|trans|format(rate / 60) }}
{% else %}
{{ '%d minutes'|trans|format(rate / 60) }}
{% endif %}
{% endif %}
</option>
{% endfor %}
</select>
</label>
<a id="toggleRefresh" href="#">
{{ get_image('play') }}
{% trans 'Start auto refresh' %}
</a>
</div>
{% endblock %}

View file

@ -0,0 +1,65 @@
<div class="responsivetable row">
<table id="tableprocesslist" class="table table-light table-striped table-hover sortable w-auto">
<thead class="thead-light">
<tr>
<th>{% trans 'Processes' %}</th>
{% for column in columns %}
<th scope="col">
<a href="{{ url('/server/status/processes') }}" data-post="{{ get_common(column.params) }}" class="sortlink">
{{ column.name }}
{% if column.is_sorted %}
<img class="icon ic_s_desc soimg" alt="
{%- trans 'Descending' %}" src="themes/dot.gif" style="display: {{ column.sort_order == 'DESC' ? 'none' : 'inline' }}">
<img class="icon ic_s_asc soimg hide" alt="
{%- trans 'Ascending' %}" src="themes/dot.gif" style="display: {{ column.sort_order == 'DESC' ? 'inline' : 'none' }}">
{% endif %}
</a>
{% if column.has_full_query %}
<a href="{{ url('/server/status/processes') }}" data-post="{{ get_common(refresh_params, '') }}">
{% if column.is_full %}
{{ get_image(
's_partialtext',
'Truncate shown queries'|trans,
{'class': 'icon_fulltext'}
) }}
{% else %}
{{ get_image(
's_fulltext',
'Show full queries'|trans,
{'class': 'icon_fulltext'}
) }}
{% endif %}
</a>
{% endif %}
</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in rows %}
<tr>
<td>
<a class="ajax kill_process" href="{{ url('/server/status/processes/kill/' ~ row.id) }}" data-post="{{ get_common({'kill': row.id}, '') }}">
{% trans 'Kill' %}
</a>
</td>
<td class="text-monospace text-right">{{ row.id }}</td>
<td>{{ row.user }}</td>
<td>{{ row.host }}</td>
<td>
{% if row.db != '' %}
{{ row.db }}
{% else %}
<em>{% trans 'None' %}</em>
{% endif %}
</td>
<td>{{ row.command }}</td>
<td class="text-monospace text-right">{{ row.time }}</td>
<td>{{ row.state }}</td>
<td>{{ row.progress }}</td>
<td>{{ row.info|raw }}</td>
{% endfor %}
</tbody>
</table>
</div>

View file

@ -0,0 +1,62 @@
{% extends 'server/status/base.twig' %}
{% set active = 'queries' %}
{% block content %}
{% if is_data_loaded %}
<div class="row">
<h3 id="serverstatusqueries">
{% trans %}
Questions since startup:
{% notes %}
Questions is the name of a MySQL Status variable
{% endtrans %}
{{ format_number(stats.total, 0) }}
{{ show_mysql_docu('server-status-variables', false, null, null, 'statvar_Questions') }}
</h3>
</div>
<div class="row">
<ul>
<li>ø {% trans 'per hour:' %} {{ format_number(stats.per_hour, 0) }}</li>
<li>ø {% trans 'per minute:' %} {{ format_number(stats.per_minute, 0) }}</li>
{% if stats.per_second >= 1 %}
<li>ø {% trans 'per second:' %} {{ format_number(stats.per_second, 0) }}</li>
{% endif %}
</ul>
</div>
<div class="row">
<table id="serverStatusQueriesDetails" class="table table-light table-striped table-hover sortable col-md-4 col-12">
<colgroup>
<col class="namecol">
<col class="valuecol" span="3">
</colgroup>
<thead class="thead-light">
<tr>
<th scope="col">{% trans 'Statements' %}</th>
<th scope="col">{% trans %}#{% notes %}# = Amount of queries{% endtrans %}</th>
<th scope="col">{% trans 'ø per hour' %}</th>
<th scope="col">%</th>
</tr>
</thead>
<tbody>
{% for query in queries %}
<tr>
<th scope="row">{{ query.name }}</th>
<td class="text-monospace text-right">{{ format_number(query.value, 5, 0, true) }}</td>
<td class="text-monospace text-right">{{ format_number(query.per_hour, 4, 1, true) }}</td>
<td class="text-monospace text-right">{{ format_number(query.percentage, 0, 2) }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div id="serverstatusquerieschart" class="w-100 col-12 col-md-6" data-chart="{{ chart|json_encode }}"></div>
</div>
{% else %}
{{ 'Not enough privilege to view query statistics.'|trans|error }}
{% endif %}
{% endblock %}

View file

@ -0,0 +1,78 @@
{% extends 'server/status/base.twig' %}
{% set active = 'status' %}
{% block content %}
{% if is_data_loaded %}
<div class="row"><h3>{{ 'Network traffic since startup: %s'|trans|format(network_traffic) }}</h3></div>
<div class="row"><p>{{ 'This MySQL server has been running for %1$s. It started up on %2$s.'|trans|format(uptime, start_time) }}</p></div>
<div class="row justify-content-between">
<table class="table table-light table-striped table-hover col-12 col-md-5">
<thead class="thead-light">
<tr>
<th scope="col">
{% trans 'Traffic' %}
{{ show_hint('On a busy server, the byte counters may overrun, so those statistics as reported by the MySQL server may be incorrect.'|trans) }}
</th>
<th scope="col">#</th>
<th scope="col">{% trans 'ø per hour' %}</th>
</tr>
</thead>
<tbody>
{% for each_traffic in traffic %}
<tr>
<th scope="row">{{ each_traffic.name }}</th>
<td class="text-monospace text-right">{{ each_traffic.number }}</td>
<td class="text-monospace text-right">{{ each_traffic.per_hour }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<table class="table table-light table-striped table-hover col-12 col-md-6">
<thead class="thead-light">
<tr>
<th scope="col">{% trans 'Connections' %}</th>
<th scope="col">#</th>
<th scope="col">{% trans 'ø per hour' %}</th>
<th scope="col">%</th>
</tr>
</thead>
<tbody>
{% for connection in connections %}
<tr>
<th>{{ connection.name }}</th>
<td class="text-monospace text-right">{{ connection.number }}</td>
<td class="text-monospace text-right">{{ connection.per_hour }}</td>
<td class="text-monospace text-right">{{ connection.percentage }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if is_master or is_slave %}
<p class="alert alert-primary clearfloat" role="alert">
{% if is_master and is_slave %}
{% trans 'This MySQL server works as <b>master</b> and <b>slave</b> in <b>replication</b> process.' %}
{% elseif is_master %}
{% trans 'This MySQL server works as <b>master</b> in <b>replication</b> process.' %}
{% elseif is_slave %}
{% trans 'This MySQL server works as <b>slave</b> in <b>replication</b> process.' %}
{% endif %}
</p>
<hr class="clearfloat">
<h3>{% trans 'Replication status' %}</h3>
{{ replication|raw }}
{% endif %}
{% else %}
{{ 'Not enough privilege to view server status.'|trans|error }}
{% endif %}
{% endblock %}

View file

@ -0,0 +1,139 @@
{% extends 'server/status/base.twig' %}
{% set active = 'variables' %}
{% block content %}
{% if is_data_loaded %}
<div class="row">
<fieldset id="tableFilter">
<legend>{% trans 'Filters' %}</legend>
<form action="{{ url('/server/status/variables') }}" method="post">
{{ get_hidden_inputs() }}
<input class="btn btn-secondary" type="submit" value="{% trans 'Refresh' %}">
<div class="formelement">
<label for="filterText">{% trans 'Containing the word:' %}</label>
<input name="filterText" type="text" id="filterText" value="{{ filter_text }}">
</div>
<div class="formelement">
<input type="checkbox" name="filterAlert" id="filterAlert"{{ is_only_alerts ? ' checked' }}>
<label for="filterAlert">
{% trans 'Show only alert values' %}
</label>
</div>
<div class="formelement">
<select id="filterCategory" name="filterCategory">
<option value="">{% trans 'Filter by category…' %}</option>
{% for category in categories %}
<option value="{{ category.id }}"{{ category.is_selected ? ' selected' }}>{{ category.name }}</option>
{% endfor %}
</select>
</div>
<div class="formelement">
<input type="checkbox" name="dontFormat" id="dontFormat"{{ is_not_formatted ? ' checked' }}>
<label for="dontFormat">
{% trans 'Show unformatted values' %}
</label>
</div>
</form>
</fieldset>
</div>
<div id="linkSuggestions" class="defaultLinks hide">
<p class="alert alert-primary" role="alert">
{% trans 'Related links:' %}
{% for link in links %}
<span class="{{ link.name }}">
{% for link_name, link_url in link.links %}
{% if link_name == 'doc' %}
{{ show_mysql_docu(link_url) }}
{% else %}
<a href="{{ link_url.url }}"{% if link_url.params is not empty %} data-post="{{ link_url.params }}"{% endif %}>{{ link_name }}</a>
{% endif %}
|
{% endfor %}
</span>
{% endfor %}
</p>
</div>
<div class="responsivetable row">
<table class="table table-light table-striped table-hover table-sm" id="serverStatusVariables">
<colgroup>
<col class="namecol">
<col class="valuecol">
<col class="descrcol">
</colgroup>
<thead class="thead-light">
<tr>
<th scope="col">{% trans 'Variable' %}</th>
<th scope="col">{% trans 'Value' %}</th>
<th scope="col">{% trans 'Description' %}</th>
</tr>
</thead>
<tbody>
{% for variable in variables %}
<tr{% if variable.class is not empty %} class="s_{{ variable.class }}"{% endif %}>
<th class="name">
{{ variable.name|replace({'_': ' '}) }}
{{ variable.doc|raw }}
</th>
<td class="value text-monospace text-right">
<span class="formatted">
{% if variable.has_alert %}
<span class="{{ variable.is_alert ? 'attention' : 'allfine' }}">
{% endif %}
{% if variable.name ends with '%' %}
{{ format_number(variable.value, 0, 2) }} %
{% elseif 'Uptime' in variable.name %}
{{ timespan_format(variable.value) }}
{% elseif variable.is_numeric and variable.value >= 1000 %}
<abbr title="{{ format_number(variable.value, 0) }}">
{{ format_number(variable.value, 3, 1) }}
</abbr>
{% elseif variable.is_numeric %}
{{ format_number(variable.value, 3, 1) }}
{% else %}
{{ variable.value }}
{% endif %}
{% if variable.has_alert %}
</span>
{% endif %}
</span>
<span class="original hide">
{% if variable.has_alert %}
<span class="{{ variable.is_alert ? 'attention' : 'allfine' }}">
{% endif %}
{{ variable.value }}
{% if variable.has_alert %}
</span>
{% endif %}
</span>
</td>
<td class="w-50">
{{ variable.description }}
{% for doc in variable.description_doc %}
{% if doc.name == 'doc' %}
{{ show_mysql_docu(doc.url) }}
{% else %}
<a href="{{ doc.url.url }}" data-post="{{ doc.url.params }}">{{ doc.name }}</a>
{% endif %}
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
{{ 'Not enough privilege to view status variables.'|trans|error }}
{% endif %}
{% endblock %}

View file

@ -0,0 +1,16 @@
{# array contains Sub page icon and text #}
{% set header = {
'privileges': {
'image': 'b_usrlist',
'text': 'Privileges'|trans
}
} %}
<h2>
{% if is_image|default(true) %}
{{ get_image(header[type]['image']) }}
{% else %}
{{ get_icon(header[type]['image']) }}
{% endif %}
{{ header[type]['text'] }}
{{ link is defined ? show_mysql_docu(link) }}
</h2>

View file

@ -0,0 +1,23 @@
{% if user_group == null %}
<h2>{% trans 'Add user group' %}</h2>
{% else %}
<h2>{{ 'Edit user group: \'%s\''|trans|format(edit_user_group_special_chars) }}</h2>
{% endif %}
<form name="userGroupForm" id="userGroupForm" action="{{ user_group_url|raw }}" method="post">
{{ hidden_inputs|raw }}
<fieldset id="fieldset_user_group_rights">
<legend>{% trans 'User group menu assignments' %} &nbsp;&nbsp;&nbsp;
<input type="checkbox" id="addUsersForm_checkall" class="checkall_box" title="Check all">
<label for="addUsersForm_checkall">{% trans 'Check all' %}</label>
</legend>
{% if user_group == null %}
<label for="userGroup">{% trans 'Group name:' %}</label>
<input type="text" name="userGroup" maxlength="64" autocomplete="off" required="required">
<div class="clearfloat"></div>
{% endif %}
{{ tab_list|raw }}
</fieldset>
<fieldset id="fieldset_user_group_rights_footer" class="tblFooters">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</fieldset>
</form>

View file

@ -0,0 +1,13 @@
<fieldset>
<legend>
{{ title }}
</legend>
{% for tab_detail in tab_details %}
<div class="item">
<input type="checkbox" class="checkall"{{ tab_detail.in_array|raw }} name="{{ level }}_{{ tab_detail.tab }}" value="Y">
<label for="{{ level }}_{{ tab_detail.tab }}">
<code>{{ tab_detail.tab_name }}</code>
</label>
</div>
{% endfor %}
</fieldset>

View file

@ -0,0 +1,49 @@
<div class="row"><h2>{% trans 'User groups' %}</h2></div>
{% if has_rows > 0 %}
<form name="userGroupsForm" id="userGroupsForm" action="{{ action|raw }}" method="post">
{{ hidden_inputs|raw }}
<table class="table table-light table-striped table-hover">
<thead class="thead-light">
<tr class="text-nowrap">
<th scope="col">
{% trans 'User groups' %}
</th>
<th scope="col">
{% trans 'Server level tabs' %}
</th>
<th scope="col">
{% trans 'Database level tabs' %}
</th>
<th scope="col">
{% trans 'Table level tabs' %}
</th>
<th scope="col">
{% trans 'Action' %}
</th>
</tr>
</thead>
<tbody>
{% for groupName in user_groups_values %}
<tr>
<td>{{ groupName.name }}</td>
<td>{{ groupName.serverTab }}</td>
<td>{{ groupName.dbTab }}</td>
<td>{{ groupName.tableTab }}</td>
<td class="text-nowrap">
<a class="" href="{{ groupName.userGroupUrl|raw }}" data-post="{{ groupName.viewUsersUrl|raw }}">{{ groupName.viewUsersIcon|raw }}</a>
&nbsp;&nbsp;
<a class="" href="{{ groupName.userGroupUrl|raw }}" data-post="{{ groupName.editUsersUrl|raw }}">{{ groupName.editUsersIcon|raw }}</a>
&nbsp;&nbsp;
<a class="deleteUserGroup ajax" href="{{ groupName.userGroupUrl|raw }}" data-post="{{ groupName.deleteUsersUrl|raw }}">{{ groupName.deleteUsersIcon|raw }}</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endif %}
<div class="row">
<fieldset id="fieldset_add_user_group">
<a href="{{ add_user_url|raw }}">{{ add_user_icon|raw }}{% trans 'Add user group' %}</a>
</fieldset>
</div>

View file

@ -0,0 +1,22 @@
<h2>{{ 'Users of \'%s\' user group'|trans|format(user_group_special_chars) }}</h2>
{% if num_rows == 0 %}
<p>{% trans 'No users were found belonging to this user group.' %}</p>
{% else %}
<table class="pma-table">
<thead>
<tr>
<th>#</th>
<th>{% trans 'User' %}</th>
</tr>
</thead>
<tbody>
{% for obj in users %}
<tr>
<td>{{ obj.count }}</td>
<td>{{ obj.user }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}

View file

@ -0,0 +1 @@
<abbr title="{{ valueTitle }}">{{ value }}</abbr>

View file

@ -0,0 +1,83 @@
<div class="container-fluid">
<div class="row">
<h2>
{{ get_image('s_vars') }}
{% trans 'Server variables and settings' %}
{{ show_mysql_docu('server_system_variables') }}
</h2>
</div>
{% if variables is not empty %}
<a href="#" class="ajax saveLink hide">
{{ get_icon('b_save', 'Save'|trans) }}
</a>
<a href="#" class="cancelLink hide">
{{ get_icon('b_close', 'Cancel'|trans) }}
</a>
{{ get_image('b_help', 'Documentation'|trans, {
'class': 'hide',
'id': 'docImage'
}) }}
{% include 'filter.twig' with {
'filter_value': filter_value
} only %}
<div class="table-responsive">
<table id="serverVariables" class="table table-light table-striped table-hover table-sm">
<thead class="thead-light">
<tr>
<th scope="col">{% trans 'Action' %}</th>
<th scope="col">{% trans 'Variable' %}</th>
<th scope="col" class="text-right">{% trans 'Value' %}</th>
</tr>
</thead>
<tbody>
{% for variable in variables %}
<tr class="var-row" data-filter-row="{{ variable.name|upper }}">
<td>
{% if variable.is_editable %}
<a href="#" data-variable="{{ variable.name }}" class="editLink">{{ get_icon('b_edit', 'Edit'|trans) }}</a>
{% else %}
<span title="{% trans 'This is a read-only variable and can not be edited' %}" class="read_only_var">
{{ get_icon('bd_edit', 'Edit'|trans) }}
</span>
{% endif %}
</td>
<td class="var-name font-weight-bold">
{% if variable.doc_link != null %}
<span title="{{ variable.name|replace({'_': ' '}) }}">
{{ variable.doc_link|raw }}
</span>
{% else %}
{{ variable.name|replace({'_': ' '}) }}
{% endif %}
</td>
<td class="var-value text-right text-monospace{{ is_superuser ? ' editable' }}">
{% if variable.is_escaped %}
{{ variable.value|raw }}
{% else %}
{{ variable.value|e|replace({',': ',&#8203;'})|raw }}
{% endif %}
</td>
</tr>
{% if variable.has_session_value %}
<tr class="var-row" data-filter-row="{{ variable.name|upper }}">
<td></td>
<td class="var-name font-italic">{{ variable.name|replace({'_': ' '}) }} ({% trans 'Session value' %})</td>
<td class="var-value text-right text-monospace">{{ variable.session_value }}</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
</div>
{% else %}
{{ 'Not enough privilege to view server variables and settings. %s'|trans|format(
link_to_var_documentation('show_compatibility_56', is_mariadb)
)|error }}
{% endif %}