Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
184
admin/phpMyAdmin/templates/database/routines/editor_form.twig
Normal file
184
admin/phpMyAdmin/templates/database/routines/editor_form.twig
Normal file
|
@ -0,0 +1,184 @@
|
|||
<form class="rte_form{{ not is_ajax ? ' disableAjax' }}" action="{{ url('/database/routines') }}" method="post">
|
||||
<input name="{{ is_edit_mode ? 'edit_item' : 'add_item' }}" type="hidden" value="1">
|
||||
{% if is_edit_mode %}
|
||||
<input name="item_original_name" type="hidden" value="{{ routine.item_original_name }}">
|
||||
<input name="item_original_type" type="hidden" value="{{ routine.item_original_type }}">
|
||||
{% endif %}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{% trans 'Details' %}
|
||||
{% if not is_edit_mode %}
|
||||
{{ show_mysql_docu('CREATE_PROCEDURE') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="rte_table table table-borderless table-sm">
|
||||
<tr>
|
||||
<td>{% trans 'Routine name' %}</td>
|
||||
<td>
|
||||
<input type="text" name="item_name" maxlength="64" value="{{ routine.item_name }}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'Type' %}</td>
|
||||
<td>
|
||||
{% if is_ajax %}
|
||||
<select name="item_type">
|
||||
<option value="PROCEDURE"{{ routine.item_type == 'PROCEDURE' ? ' selected' }}>PROCEDURE</option>
|
||||
<option value="FUNCTION"{{ routine.item_type == 'FUNCTION' ? ' selected' }}>FUNCTION</option>
|
||||
</select>
|
||||
{% else %}
|
||||
<input name="item_type" type="hidden" value="{{ routine.item_type }}">
|
||||
<div class="fw-bold text-center w-50">
|
||||
{{ routine['item_type'] }}
|
||||
</div>
|
||||
<input type="submit" class="btn btn-secondary" name="routine_changetype" value="{{ 'Change to %s'|trans|format(routine.item_type_toggle) }}">
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'Parameters' %}</td>
|
||||
<td>
|
||||
<table class="routine_params_table table table-borderless table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<th class="routine_direction_cell{{ routine.item_type == 'FUNCTION' ? ' hide' }}">{% trans 'Direction' %}</th>
|
||||
<th>{% trans 'Name' %}</th>
|
||||
<th>{% trans 'Type' %}</th>
|
||||
<th>{% trans 'Length/Values' %}</th>
|
||||
<th colspan="2">{% trans 'Options' %}</th>
|
||||
<th class="routine_param_remove hide"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ parameter_rows|raw }}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
{% if is_ajax %}
|
||||
<button type="button" class="btn btn-primary" id="addRoutineParameterButton">{% trans 'Add parameter' %}</button>
|
||||
{% else %}
|
||||
<input type="submit" class="btn btn-primary" name="routine_addparameter" value="{% trans 'Add parameter' %}">
|
||||
<input type="submit" class="btn btn-secondary" name="routine_removeparameter" value="{% trans 'Remove last parameter' %}"{{ not routine.item_num_params ? ' disabled' }}>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="routine_return_row{{ routine.item_type == 'PROCEDURE' ? ' hide' }}">
|
||||
<td>{% trans 'Return type' %}</td>
|
||||
<td>
|
||||
<select name="item_returntype">
|
||||
{{ get_supported_datatypes(true, routine.item_returntype) }}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="routine_return_row{{ routine.item_type == 'PROCEDURE' ? ' hide' }}">
|
||||
<td>{% trans 'Return length/values' %}</td>
|
||||
<td>
|
||||
<input type="text" name="item_returnlength" value="{{ routine.item_returnlength }}">
|
||||
</td>
|
||||
<td class="hide no_len">---</td>
|
||||
</tr>
|
||||
<tr class="routine_return_row{{ routine.item_type == 'PROCEDURE' ? ' hide' }}">
|
||||
<td>{% trans 'Return options' %}</td>
|
||||
<td>
|
||||
<div>
|
||||
<select lang="en" dir="ltr" name="item_returnopts_text">
|
||||
<option value="">{% trans 'Charset' %}</option>
|
||||
<option value=""></option>
|
||||
{% for charset in charsets %}
|
||||
<option value="{{ charset.getName() }}" title="{{ charset.getDescription() }}"{{ routine.item_returnopts_text == charset.getName() ? ' selected' }}>{{ charset.getName() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<select name="item_returnopts_num">
|
||||
<option value=""></option>
|
||||
{% for numeric_option in numeric_options %}
|
||||
<option value="{{ numeric_option }}"{{ routine.item_returnopts_num == numeric_option ? ' selected' }}>{{ numeric_option }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="hide no_opts">---</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'Definition' %}</td>
|
||||
<td>
|
||||
<textarea name="item_definition" rows="15" cols="40">{{ routine.item_definition }}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'Is deterministic' %}</td>
|
||||
<td>
|
||||
<input type="checkbox" name="item_isdeterministic"{{ routine.item_isdeterministic|raw }}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% if is_edit_mode %}
|
||||
<tr>
|
||||
<td>
|
||||
{% trans 'Adjust privileges' %}
|
||||
{{ show_docu('faq', 'faq6-39') }}
|
||||
</td>
|
||||
<td>
|
||||
{% if has_privileges %}
|
||||
<input type="checkbox" name="item_adjust_privileges" value="1" checked>
|
||||
{% else %}
|
||||
<input type="checkbox" name="item_adjust_privileges" value="1" title="{% trans 'You do not have sufficient privileges to perform this operation; Please refer to the documentation for more details.' %}" disabled>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
<tr>
|
||||
<td>{% trans 'Definer' %}</td>
|
||||
<td>
|
||||
<input type="text" name="item_definer" value="{{ routine.item_definer }}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'Security type' %}</td>
|
||||
<td>
|
||||
<select name="item_securitytype">
|
||||
<option value="DEFINER"{{ routine.item_securitytype_definer|raw }}>DEFINER</option>
|
||||
<option value="INVOKER"{{ routine.item_securitytype_invoker|raw }}>INVOKER</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'SQL data access' %}</td>
|
||||
<td>
|
||||
<select name="item_sqldataaccess">
|
||||
{% for value in sql_data_access %}
|
||||
<option value="{{ value }}"{{ routine.item_sqldataaccess == value ? ' selected' }}>{{ value }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'Comment' %}</td>
|
||||
<td>
|
||||
<input type="text" name="item_comment" maxlength="64" value="{{ routine.item_comment }}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% if is_ajax %}
|
||||
<input type="hidden" name="{{ is_edit_mode ? 'editor_process_edit' : 'editor_process_add' }}" value="true">
|
||||
<input type="hidden" name="ajax_request" value="true">
|
||||
{% else %}
|
||||
<div class="card-footer">
|
||||
<input class="btn btn-primary" type="submit" name="{{ is_edit_mode ? 'editor_process_edit' : 'editor_process_add' }}" value="{% trans 'Go' %}">
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
|
@ -0,0 +1,62 @@
|
|||
<form action="{{ url('/database/routines') }}" method="post" class="rte_form ajax" onsubmit="return false">
|
||||
<input type="hidden" name="item_name" value="{{ routine['item_name'] }}">
|
||||
<input type="hidden" name="item_type" value="{{ routine['item_type'] }}">
|
||||
{{ get_hidden_inputs(db) }}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">{{ ajax ? 'Routine parameters'|trans : routine['item_name'] }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table w-auto rte_table{{ not ajax ? ' caption-top' }}">
|
||||
{% if not ajax %}
|
||||
<caption class="tblHeaders">{% trans 'Routine parameters' %}</caption>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th>{% trans 'Name' %}</th>
|
||||
<th>{% trans 'Type' %}</th>
|
||||
{% if show_function_fields %}
|
||||
<th>{% trans 'Function' %}</th>
|
||||
{% endif %}
|
||||
<th>{% trans 'Value' %}</th>
|
||||
</tr>
|
||||
{% for i in 0..routine['item_num_params'] - 1 %}
|
||||
<tr>
|
||||
<td>{{ routine['item_param_name'][loop.index0] }}</td>
|
||||
<td>{{ routine['item_param_type'][loop.index0] }}</td>
|
||||
{% if show_function_fields %}
|
||||
<td>
|
||||
{% if params[loop.index0]['generator'] is not null %}
|
||||
<select name="funcs[{{ routine['item_param_name'][loop.index0] }}]">
|
||||
{{ params[loop.index0]['generator']|raw }}</select>
|
||||
{% else %}
|
||||
--
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="nowrap">
|
||||
{% if routine['item_param_type'][loop.index0] in ['ENUM', 'SET'] %}
|
||||
{% for value in routine['item_param_length_arr'][loop.index0] %}
|
||||
<input name="params[{{ routine['item_param_name'][loop.parent.loop.index0] }}][]" value="{{ params[loop.parent.loop.index0]['htmlentities'][loop.index0] }}" type="{{ params[loop.parent.loop.index0]['input_type'] }}">
|
||||
{{ params[loop.parent.loop.index0]['htmlentities'][loop.index0] }}
|
||||
<br>
|
||||
{% endfor %}
|
||||
{% elseif routine['item_param_type'][loop.index0]|lower in params['no_support_types'] %}
|
||||
{% else %}
|
||||
<input class="{{ params[loop.index0]['class'] }}" type="text" name="params[{{ routine['item_param_name'][loop.index0] }}]">
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% if not ajax %}
|
||||
<div class="card-footer">
|
||||
<input class="btn btn-primary" type="submit" name="execute_routine" value="{% trans 'Go' %}">
|
||||
</div>
|
||||
{% else %}
|
||||
<input type="hidden" name="execute_routine" value="true">
|
||||
<input type="hidden" name="ajax_request" value="true">
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
62
admin/phpMyAdmin/templates/database/routines/index.twig
Normal file
62
admin/phpMyAdmin/templates/database/routines/index.twig
Normal file
|
@ -0,0 +1,62 @@
|
|||
<div class="container-fluid my-3">
|
||||
<h2>
|
||||
{{ get_icon('b_routines', 'Routines'|trans) }}
|
||||
{{ show_mysql_docu('STORED_ROUTINES') }}
|
||||
</h2>
|
||||
|
||||
<div class="d-flex flex-wrap my-3">
|
||||
<div>
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">
|
||||
<div class="form-check mb-0">
|
||||
<input class="form-check-input checkall_box" type="checkbox" value="" id="checkAllCheckbox" form="rteListForm">
|
||||
<label class="form-check-label" for="checkAllCheckbox">{% trans 'Check all' %}</label>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-outline-secondary" id="bulkActionExportButton" type="submit" name="submit_mult" value="export" form="rteListForm" title="{% trans 'Export' %}">
|
||||
{{ get_icon('b_export', 'Export'|trans) }}
|
||||
</button>
|
||||
<button class="btn btn-outline-secondary" id="bulkActionDropButton" type="submit" name="submit_mult" value="drop" form="rteListForm" title="{% trans 'Drop' %}">
|
||||
{{ get_icon('b_drop', 'Drop'|trans) }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ms-auto">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">{{ get_image('b_search', 'Search'|trans) }}</span>
|
||||
<input class="form-control" name="filterText" type="text" id="filterText" value="" placeholder="{% trans 'Search' %}" aria-label="{% trans 'Search' %}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ms-2">
|
||||
<a class="ajax add_anchor btn btn-primary{{ not has_privilege ? ' disabled' }}" href="{{ url('/database/routines', {'db': db, 'table': table, 'add_item': true}) }}" role="button"{{ not has_privilege ? ' tabindex="-1" aria-disabled="true"' }}>
|
||||
{{ get_icon('b_routine_add', 'Create new routine'|trans) }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="rteListForm" class="ajax" action="{{ url('/database/routines') }}">
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
|
||||
<div id="nothing2display"{{ items is not empty ? ' class="hide"' }}>
|
||||
{% trans 'There are no routines to display.' %}
|
||||
</div>
|
||||
|
||||
<table id="routinesTable" class="table table-striped table-hover{{ items is empty ? ' hide' }} data w-auto">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{% trans 'Name' %}</th>
|
||||
<th>{% trans 'Type' %}</th>
|
||||
<th>{% trans 'Returns' %}</th>
|
||||
<th colspan="4"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="hide">{% for i in 0..7 %}<td></td>{% endfor %}</tr>
|
||||
|
||||
{{ rows|raw }}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
|
@ -0,0 +1,54 @@
|
|||
<tr>
|
||||
<td class="dragHandle">
|
||||
<span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
|
||||
</td>
|
||||
<td class="routine_direction_cell{{ class }}">
|
||||
<select name="item_param_dir[{{ index }}]">
|
||||
{% for value in param_directions %}
|
||||
<option value="{{ value }}"{{ item_param_dir == value ? ' selected' }}>{{ value }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input name="item_param_name[{{ index }}]" type="text" value="{{ item_param_name|raw }}">
|
||||
</td>
|
||||
<td>
|
||||
<select name="item_param_type[{{ index }}]">
|
||||
{{ supported_datatypes|raw }}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input id="item_param_length_{{ index }}" name="item_param_length[{{ index }}]" type="text" value="{{ item_param_length|raw }}">
|
||||
<div class="enum_hint">
|
||||
<a href="#" class="open_enum_editor">
|
||||
{{ get_image('b_edit', '', {'title': 'ENUM/SET editor'|trans}) }}
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hide no_len">---</td>
|
||||
<td class="routine_param_opts_text">
|
||||
<select lang="en" dir="ltr" name="item_param_opts_text[{{ index }}]">
|
||||
<option value="">{% trans 'Charset' %}</option>
|
||||
<option value=""></option>
|
||||
{% for charset in charsets %}
|
||||
<option value="{{ charset.name }}" title="{{ charset.description }}"{{ charset.is_selected ? ' selected' }}>
|
||||
{{- charset.name -}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td class="hide no_opts">---</td>
|
||||
<td class="routine_param_opts_num">
|
||||
<select name="item_param_opts_num[{{ index }}]">
|
||||
<option value=""></option>
|
||||
{% for value in param_opts_num %}
|
||||
<option value="{{ value }}"{{ item_param_opts_num == value ? ' selected' }}>{{ value }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td class="routine_param_remove{{ drop_class }}">
|
||||
<a href="#" class="routine_param_remove_anchor">
|
||||
{{ get_icon('b_drop', 'Drop'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
83
admin/phpMyAdmin/templates/database/routines/row.twig
Normal file
83
admin/phpMyAdmin/templates/database/routines/row.twig
Normal file
|
@ -0,0 +1,83 @@
|
|||
<tr{% if row_class is not empty %} class="{{ row_class }}"{% endif %} data-filter-row="{{ routine.name|upper }}">
|
||||
<td>
|
||||
<input type="checkbox" class="checkall" name="item_name[]" value="{{ routine.name }}">
|
||||
</td>
|
||||
<td>
|
||||
<span class="drop_sql hide">{{ sql_drop }}</span>
|
||||
<strong>{{ routine.name }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ routine.type }}
|
||||
</td>
|
||||
<td dir="ltr">
|
||||
{{ routine.returns }}
|
||||
</td>
|
||||
<td>
|
||||
{% if has_edit_privilege %}
|
||||
<a class="ajax edit_anchor" href="{{ url('/database/routines', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'edit_item': true,
|
||||
'item_name': routine.name,
|
||||
'item_type': routine.type
|
||||
}) }}">
|
||||
{{ get_icon('b_edit', 'Edit'|trans) }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ get_icon('bd_edit', 'Edit'|trans) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if has_execute_privilege and execute_action is not empty %}
|
||||
{% if execute_action == 'execute_routine' %}
|
||||
<a class="ajax exec_anchor" href="{{ url('/database/routines', {'db': db, 'table': table}) }}" data-post="{{ get_common({
|
||||
'execute_routine': true,
|
||||
'item_name': routine.name,
|
||||
'item_type': routine.type
|
||||
}, '') }}">
|
||||
{{ get_icon('b_nextpage', 'Execute'|trans) }}
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="ajax exec_anchor" href="{{ url('/database/routines', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'execute_dialog': true,
|
||||
'item_name': routine.name,
|
||||
'item_type': routine.type
|
||||
}) }}">
|
||||
{{ get_icon('b_nextpage', 'Execute'|trans) }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ get_icon('bd_nextpage', 'Execute'|trans) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if has_export_privilege %}
|
||||
<a class="ajax export_anchor" href="{{ url('/database/routines', {
|
||||
'db': db,
|
||||
'table': table,
|
||||
'export_item': true,
|
||||
'item_name': routine.name,
|
||||
'item_type': routine.type
|
||||
}) }}">
|
||||
{{ get_icon('b_export', 'Export'|trans) }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ get_icon('bd_export', 'Export'|trans) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ link_or_button(
|
||||
url('/sql'),
|
||||
{
|
||||
'db': db,
|
||||
'table': table,
|
||||
'sql_query': sql_drop,
|
||||
'goto': url('/database/routines', {'db': db})
|
||||
},
|
||||
get_icon('b_drop', 'Drop'|trans),
|
||||
{'class': 'ajax drop_anchor'}
|
||||
) }}
|
||||
</td>
|
||||
</tr>
|
Loading…
Add table
Add a link
Reference in a new issue