aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/templates/server/status/processes
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/phpmyadmin/templates/server/status/processes')
-rw-r--r--srcs/phpmyadmin/templates/server/status/processes/index.twig53
-rw-r--r--srcs/phpmyadmin/templates/server/status/processes/list.twig65
2 files changed, 118 insertions, 0 deletions
diff --git a/srcs/phpmyadmin/templates/server/status/processes/index.twig b/srcs/phpmyadmin/templates/server/status/processes/index.twig
new file mode 100644
index 0000000..bb73156
--- /dev/null
+++ b/srcs/phpmyadmin/templates/server/status/processes/index.twig
@@ -0,0 +1,53 @@
+{% extends 'server/status/base.twig' %}
+{% set active = 'processes' %}
+{% block content %}
+
+<fieldset id="tableFilter">
+ <legend>{% trans 'Filters' %}</legend>
+ <form action="server_status_processes.php" 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>
+
+{{ server_process_list|raw }}
+
+{{ 'Note: Enabling the auto refresh here might cause heavy traffic between the web server and the MySQL server.'|trans|notice }}
+
+<div class="tabLinks">
+ <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 %}
diff --git a/srcs/phpmyadmin/templates/server/status/processes/list.twig b/srcs/phpmyadmin/templates/server/status/processes/list.twig
new file mode 100644
index 0000000..83561f9
--- /dev/null
+++ b/srcs/phpmyadmin/templates/server/status/processes/list.twig
@@ -0,0 +1,65 @@
+<div class="responsivetable">
+ <table id="tableprocesslist" class="data clearfloat noclick sortable">
+ <thead>
+ <tr>
+ <th>{% trans 'Processes' %}</th>
+ {% for column in columns %}
+ <th>
+ <a href="server_status_processes.php" 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="server_status_processes.php" 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="server_status_processes.php" data-post="{{ get_common({'kill': row.id}, '') }}">
+ {% trans 'Kill' %}
+ </a>
+ </td>
+ <td class="value">{{ 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="value">{{ row.time }}</td>
+ <td>{{ row.state }}</td>
+ <td>{{ row.progress }}</td>
+ <td>{{ row.info|raw }}</td>
+ {% endfor %}
+ </tbody>
+ </table>
+</div>