init web ems all

This commit is contained in:
agtuser
2024-09-27 17:13:36 +08:00
parent 81c97acbe9
commit 5cc56f8078
4263 changed files with 798779 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
<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>{{ Util_formatSql(value['Info'], not dontlimitchars) }}</td>
</tr>

View File

@@ -0,0 +1,29 @@
<form action="server_binlog.php" method="post">
{{ Url_getHiddenInputs(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="selected"' }}>
{{ each_log['Log_name'] }}
{% if each_log['File_size'] is defined %}
({{ Util_formatByteDown(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 %}
{{ Util_formatByteDown(full_size)|join(' ') }}
{% endif %}
</fieldset>
<fieldset class="tblFooters">
<input type="submit" value="{% trans 'Go' %}" />
</fieldset>
</form>

View File

@@ -0,0 +1,26 @@
<div id="div_mysql_charset_collations">
<table class="data noclick">
<thead>
<tr>
<th id="collationHeader">{% trans 'Collation' %}</th>
<th>{% trans 'Description' %}</th>
</tr>
</thead>
{% for current_charset in mysql_charsets %}
<tr>
<th colspan="2" class="right">
{{ current_charset }}
{% if mysql_charsets_desc[current_charset] is not empty %}
(<em>{{ mysql_charsets_desc[current_charset] }}</em>)
{% endif %}
</th>
</tr>
{% for current_collation in mysql_collations[current_charset] %}
<tr class="{{ mysql_dft_collations[current_charset] == current_collation ? ' marked' }}">
<td>{{ current_collation }}</td>
<td>{{ Charsets_getCollationDescr(current_collation) }}</td>
</tr>
{% endfor %}
{% endfor %}
</table>
</div>

View File

@@ -0,0 +1,50 @@
<ul>
<li id="li_create_database" class="no_bullets">
{% if is_create_db_priv %}
<form method="post" action="server_databases.php" id="create_database_form" class="ajax">
<p><strong>
<label for="text_create_db">
{{ Util_getImage('b_newdb') }}
{% trans 'Create database' %}
</label>
{{ Util_showMySQLDocu('CREATE_DATABASE') }}
</strong></p>
{{ Url_getHiddenInputs('', '', 5) }}
<input type="hidden" name="reload" value="1" />
{% if dbstats is not empty %}
<input type="hidden" name="dbstats" value="1" />
{% endif %}
<input type="text" name="new_db" value="{{ db_to_create }}"
maxlength="64" class="textfield" id="text_create_db" required
placeholder="{% trans 'Database name' %}" />
{{ Charsets_getCollationDropdownBox(
dbi,
disable_is,
'db_collation',
null,
server_collation,
true
) }}
<input type="submit" value="{% trans 'Create' %}" id="buttonGo" />
</form>
{% else %}
{# db creation no privileges message #}
<p><strong>
{{ Util_getImage('b_newdb') }}
{% trans 'Create database' %}
{{ Util_showMySQLDocu('CREATE_DATABASE') }}
</strong></p>
<span class="noPrivileges">
{{ Util_getImage(
's_error',
'',
{'hspace': 2, 'border': 0, 'align': 'middle'}
) }}
{% trans 'No Privileges' %}
</span>
{% endif %}
</li>
</ul>

View File

@@ -0,0 +1,77 @@
<tfoot>
<tr>
{% if is_superuser or allow_user_drop_database %}
<th></th>
{% endif %}
<th>
{% trans 'Total' %}: <span id="filter-rows-count">
{{- database_count -}}
</span>
</th>
{% for stat_name, stat in column_order %}
{% if stat_name in first_database|keys %}
{% if stat['format'] is same as('byte') %}
{% set byte_format = Util_formatByteDown(stat['footer'], 3, 1) %}
{% set value = byte_format[0] %}
{% set unit = byte_format[1] %}
{% elseif stat['format'] is same as('number') %}
{% set value = Util_formatNumber(stat['footer'], 0) %}
{% else %}
{% set value = htmlentities(stat['footer'], 0) %}
{% endif %}
<th class="value">
{% if stat['description_function'] is defined %}
<dfn title="{{ Charsets_getCollationDescr(stat['footer']) }}">
{{ value }}
</dfn>
{% else %}
{{ value }}
{% endif %}
</th>
{% if stat['format'] is same as('byte') %}
<th class="unit">{{ unit }}</th>
{% endif %}
{% endif %}
{% endfor %}
{% if master_replication %}
<th></th>
{% endif %}
{% if slave_replication %}
<th></th>
{% endif %}
<th></th>
</tr>
</tfoot>
</table>
</div>
{# Footer buttons #}
{% if is_superuser or allow_user_drop_database %}
{% include 'select_all.twig' with {
'pma_theme_image': pma_theme_image,
'text_dir': text_dir,
'form_name': 'dbStatsForm'
} only %}
{{ Util_getButtonOrImage(
'',
'mult_submit ajax',
'Drop'|trans,
'b_deltbl'
) }}
{% endif %}
{# Enable statistics #}
{% if dbstats is empty %}
{{ Message_notice('Note: Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server.'|trans) }}
<ul>
<li class="li_switch_dbstats">
<a href="server_databases.php" data-post="{{ Url_getCommon({'dbstats': '1'}, '', false) }}" title="{% trans 'Enable statistics' %}">
<strong>{% trans 'Enable statistics' %}</strong>
</a>
</li>
</ul>
{% endif %}
</form>
</div>

View File

@@ -0,0 +1,29 @@
<div id="tableslistcontainer">
{{ Util_getListNavigator(
database_count,
pos,
url_params,
'server_databases.php',
'frame_content',
max_db_list
) }}
<form class="ajax" action="server_databases.php" method="post" name="dbStatsForm" id="dbStatsForm">
{{ Url_getHiddenInputs(url_params) }}
{% set url_params = url_params|merge({
'sort_by': 'SCHEMA_NAME',
'sort_order': sort_by == 'SCHEMA_NAME' and sort_order == 'asc' ? 'desc' : 'asc'
}) %}
<div class="responsivetable">
<table id="tabledatabases" class="data">
{% include 'server/databases/table_header.twig' with {
'url_params': url_params,
'sort_by': sort_by,
'sort_order': sort_order,
'sort_order_text': sort_order == 'asc' ? 'Ascending'|trans : 'Descending'|trans,
'column_order': column_order,
'first_database': first_database,
'master_replication': master_replication,
'slave_replication': slave_replication,
'is_superuser': is_superuser,
'allow_user_drop_database': allow_user_drop_database
} only %}

View File

@@ -0,0 +1,25 @@
{# Displays the sub-page heading #}
{% include 'server/sub_page_header.twig' with {
'type': dbstats ? 'database_statistics' : 'databases'
} only %}
{# Displays For Create database #}
{% if show_create_db %}
{% include 'server/databases/create.twig' with {
'is_create_db_priv': is_create_db_priv,
'dbstats': dbstats,
'db_to_create': db_to_create,
'server_collation': server_collation,
'dbi': dbi,
'disable_is': disable_is
} only %}
{% endif %}
{% include 'filter.twig' with {'filter_value': ''} only %}
{# Displays the page #}
{% if databases is not null %}
{{ databases|raw }}
{% else %}
<p>{% trans 'No databases' %}</p>
{% endif %}

View File

@@ -0,0 +1,41 @@
<thead>
<tr>
{% if is_superuser or allow_user_drop_database %}
<th></th>
{% endif %}
<th>
<a href="server_databases.php{{ Url_getCommon(url_params) }}">
{% trans 'Database' %}
{{ sort_by == 'SCHEMA_NAME' ? Util_getImage(
's_' ~ sort_order,
sort_order_text
) }}
</a>
</th>
{% for stat_name, stat in column_order %}
{% if stat_name in first_database|keys %}
{% set url_params = url_params|merge({
'sort_by': stat_name,
'sort_order': sort_by == stat_name and sort_order == 'desc' ? 'asc' : 'desc'
}) %}
<th{{ stat['format'] is same as('byte') ? ' colspan="2"' }}>
<a href="server_databases.php{{ Url_getCommon(url_params) }}">
{{ stat['disp_name'] }}
{{ sort_by == stat_name ? Util_getImage(
's_' ~ sort_order,
sort_order_text
) }}
</a>
</th>
{% endif %}
{% endfor %}
{% if master_replication %}
<th>{% trans 'Master replication' %}</th>
{% endif %}
{% if slave_replication %}
<th>{% trans 'Slave replication' %}</th>
{% endif %}
<th>{% trans 'Action' %}</th>
</tr>
</thead>

View File

@@ -0,0 +1,67 @@
<tr{% if tr_class %} class="{{ tr_class }}"{% endif %} data-filter-row="{{ current['SCHEMA_NAME']|upper }}">
{% if is_superuser or allow_user_drop_database %}
<td class="tool">
<input type="checkbox" name="selected_dbs[]" class="checkall" title="
{{- current['SCHEMA_NAME'] }}" value="
{{- current['SCHEMA_NAME'] }}"
{%- if is_system_schema %} disabled="disabled"{% endif %} />
</td>
{% endif %}
<td class="name">
<a href="{{ Util_getScriptNameForOption(default_tab_database, 'database') }}
{{- Url_getCommon({'db': current['SCHEMA_NAME']}) }}" title="
{{- "Jump to database '%s'"|trans|format(current['SCHEMA_NAME']|e) }}">
{{ current['SCHEMA_NAME'] }}
</a>
</td>
{% for stat_name, stat in column_order %}
{% if stat_name in current|keys %}
{% if stat['format'] is same as('byte') %}
{% set byte_format = Util_formatByteDown(current[stat_name], 3, 1) %}
{% set value = byte_format[0] %}
{% set unit = byte_format[1] %}
{% elseif stat['format'] is same as('number') %}
{% set value = Util_formatNumber(current[stat_name], 0) %}
{% else %}
{% set value = htmlentities(current[stat_name], 0) %}
{% endif %}
<td class="value">
{% if stat['description_function'] is defined %}
<dfn title="{{ Charsets_getCollationDescr(current[stat_name]) }}">
{{ value }}
</dfn>
{% else %}
{{ value }}
{% endif %}
</td>
{% if stat['format'] is same as('byte') %}
<td class="unit">{{ unit }}</td>
{% endif %}
{% endif %}
{% endfor %}
{% if master_replication_status %}
<td class="tool center">
{{ master_replication|raw }}
</td>
{% endif %}
{% if slave_replication_status %}
<td class="tool center">
{{ slave_replication|raw }}
</td>
{% endif %}
<td class="tool">
<a class="server_databases" data="
{{- Sanitize_jsFormat(current['SCHEMA_NAME']) }}" href="server_privileges.php
{{- Url_getCommon({
'db': current['SCHEMA_NAME'],
'checkprivsdb': current['SCHEMA_NAME']
}) }}" title="
{{- 'Check privileges for database "%s".'|trans|format(current['SCHEMA_NAME']|e) }}">
{{ Util_getIcon('s_rights', 'Check privileges'|trans) }}
</a>
</td>
</tr>

View File

@@ -0,0 +1,39 @@
<h2>
{{ Util_getImage('b_engine') }}
{{ title }}
{{ Util_showMySQLDocu(help_page) }}
</h2>
<p><em>{{ comment }}</em></p>
{% if info_pages is not empty and info_pages is iterable %}
<p>
<strong>[</strong>
{% if page is empty %}
<strong>{% trans 'Variables' %}</strong>
{% else %}
<a href="server_engines.php
{{- Url_getCommon({'engine': engine}) }}">
{% trans 'Variables' %}
</a>
{% endif %}
{% for current, label in info_pages %}
<strong>|</strong>
{% if page is defined and page == current %}
<strong>{{ label }}</strong>
{% else %}
<a href="server_engines.php
{{- Url_getCommon({'engine': engine, 'page': current}) }}">
{{ label }}
</a>
{% endif %}
{% endfor %}
<strong>]</strong>
</p>
{% endif %}
{% if page_output is not empty %}
{{ page_output|raw }}
{% else %}
<p>{{ support }}</p>
{{ variables|raw }}
{% endif %}

View File

@@ -0,0 +1,22 @@
<table class="noclick">
<thead>
<tr>
<th>{% trans 'Storage Engine' %}</th>
<th>{% 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="server_engines.php{{ Url_getCommon({'engine': engine}) }}">
{{ details['Engine'] }}
</a>
</td>
<td>{{ details['Comment'] }}</td>
</tr>
{% endfor %}
</tbody>
</table>

View File

@@ -0,0 +1,35 @@
<div class="responsivetable">
<table class="data_full_width" id="plugins-
{{- preg_replace('/[^a-z]/', '', plugin_type|lower) }}">
<caption class="tblHeaders">
{{ plugin_type }}
</caption>
<thead>
<tr>
<th>{% trans 'Plugin' %}</th>
<th>{% trans 'Description' %}</th>
<th>{% trans 'Version' %}</th>
<th>{% trans 'Author' %}</th>
<th>{% trans 'License' %}</th>
</tr>
</thead>
<tbody>
{% for plugin in plugin_list %}
<tr class="noclick">
<th>
{{ plugin['plugin_name'] }}
{% if not plugin['is_active'] %}
<small class="attention">
{% trans 'disabled' %}
</small>
{% endif %}
</th>
<td>{{ plugin['plugin_description'] }}</td>
<td>{{ plugin['plugin_type_version'] }}</td>
<td>{{ plugin['plugin_author'] }}</td>
<td>{{ plugin['plugin_license'] }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>

View File

@@ -0,0 +1,7 @@
<div id="sectionlinks">
{% for plugin_type in plugins|keys %}
<a href="#plugins-{{ preg_replace('/[^a-z]/', '', plugin_type|lower) }}">
{{ plugin_type }}
</a>
{% endfor %}
</div>

View File

@@ -0,0 +1,48 @@
{# array contains Sub page icon and text #}
{% set header = {
'variables': {
'image': 's_vars',
'text': 'Server variables and settings'|trans
},
'engines': {
'image': 'b_engine',
'text': 'Storage engines'|trans
},
'plugins': {
'image': 'b_plugin',
'text': 'Plugins'|trans
},
'binlog': {
'image': 's_tbl',
'text': 'Binary log'|trans
},
'collations': {
'image': 's_asci',
'text': 'Character sets and collations'|trans
},
'replication': {
'image': 's_replication',
'text': 'Replication'|trans
},
'database_statistics': {
'image': 's_db',
'text': 'Databases statistics'|trans
},
'databases': {
'image': 's_db',
'text': 'Databases'|trans
},
'privileges': {
'image': 'b_usrlist',
'text': 'Privileges'|trans
}
} %}
<h2>
{% if is_image|default(true) %}
{{ Util_getImage(header[type]['image']) }}
{% else %}
{{ Util_getIcon(header[type]['image']) }}
{% endif %}
{{ header[type]['text'] }}
{{ link is defined ? Util_showMySQLDocu(link) }}
</h2>

View File

@@ -0,0 +1,10 @@
<a href="{{ url|raw }}" class="ajax saveLink hide">
{{ Util_getIcon('b_save', 'Save'|trans) }}
</a>
<a href="#" class="cancelLink hide">
{{ Util_getIcon('b_close', 'Cancel'|trans) }}
</a>
{{ Util_getImage('b_help', 'Documentation'|trans, {
'class': 'hide',
'id': 'docImage'
}) }}

View File

@@ -0,0 +1,5 @@
<tr class="var-row {{ row_class }}" data-filter-row="{{ name | upper }}">
<td class="var-action"></td>
<td class="var-name session">({% trans 'Session value' %})</td>
<td class="var-value value">&nbsp;{{ value }}</td>
</tr>

View File

@@ -0,0 +1,29 @@
<tr class="var-row {{ row_class }}" data-filter-row="{{ name | upper }}">
<td class="var-action">
{% if editable %}
<a href="#" data-variable="{{ name }}" class="editLink">{{ Util_getIcon('b_edit', 'Edit'|trans) }}</a>
{% else %}
<span title="{% trans 'This is a read-only variable and can not be edited' %}" class="read_only_var">
{{ Util_getIcon('bd_edit', 'Edit'|trans) }}
</span>
{% endif %}
</td>
<td class="var-name">
{% if doc_link != null %}
<span title="{{ name|replace({'_': ' '}) }}">
{{ Util_showMySQLDocu(doc_link[1], false, doc_link[2] ~ '_' ~ doc_link[0], true) }}
{{ name|e|replace({'_': '&nbsp;'})|raw }}
</a>
</span>
{% else %}
{{ name|replace({'_': ' '}) }}
{% endif %}
</td>
<td class="var-value value{{ is_superuser ? ' editable' }}">
{% if is_html_formatted == false %}
{{ value|e|replace({',': ',&#8203;'})|raw }}
{% else %}
{{ value|raw }}
{% endif %}
</td>
</tr>

View File

@@ -0,0 +1,7 @@
<thead>
<tr class="var-header var-row">
<td class="var-action">{% trans 'Action' %}</td>
<td class="var-name">{% trans 'Variable' %}</td>
<td class="var-value">{% trans 'Value' %}</td>
</tr>
</thead>