databases_footer.twig 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <tfoot>
  2. <tr>
  3. {% if is_superuser or allow_user_drop_database %}
  4. <th></th>
  5. {% endif %}
  6. <th>
  7. {% trans 'Total' %}: <span id="filter-rows-count">
  8. {{- database_count -}}
  9. </span>
  10. </th>
  11. {% for stat_name, stat in column_order %}
  12. {% if stat_name in first_database|keys %}
  13. {% if stat['format'] is same as('byte') %}
  14. {% set byte_format = Util_formatByteDown(stat['footer'], 3, 1) %}
  15. {% set value = byte_format[0] %}
  16. {% set unit = byte_format[1] %}
  17. {% elseif stat['format'] is same as('number') %}
  18. {% set value = Util_formatNumber(stat['footer'], 0) %}
  19. {% else %}
  20. {% set value = htmlentities(stat['footer'], 0) %}
  21. {% endif %}
  22. <th class="value">
  23. {% if stat['description_function'] is defined %}
  24. <dfn title="{{ Charsets_getCollationDescr(stat['footer']) }}">
  25. {{ value }}
  26. </dfn>
  27. {% else %}
  28. {{ value }}
  29. {% endif %}
  30. </th>
  31. {% if stat['format'] is same as('byte') %}
  32. <th class="unit">{{ unit }}</th>
  33. {% endif %}
  34. {% endif %}
  35. {% endfor %}
  36. {% if master_replication %}
  37. <th></th>
  38. {% endif %}
  39. {% if slave_replication %}
  40. <th></th>
  41. {% endif %}
  42. <th></th>
  43. </tr>
  44. </tfoot>
  45. </table>
  46. </div>
  47. {# Footer buttons #}
  48. {% if is_superuser or allow_user_drop_database %}
  49. {% include 'select_all.twig' with {
  50. 'pma_theme_image': pma_theme_image,
  51. 'text_dir': text_dir,
  52. 'form_name': 'dbStatsForm'
  53. } only %}
  54. {{ Util_getButtonOrImage(
  55. '',
  56. 'mult_submit ajax',
  57. 'Drop'|trans,
  58. 'b_deltbl'
  59. ) }}
  60. {% endif %}
  61. {# Enable statistics #}
  62. {% if dbstats is empty %}
  63. {{ Message_notice('Note: Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server.'|trans) }}
  64. <ul>
  65. <li class="li_switch_dbstats">
  66. <a href="server_databases.php" data-post="{{ Url_getCommon({'dbstats': '1'}, '', false) }}" title="{% trans 'Enable statistics' %}">
  67. <strong>{% trans 'Enable statistics' %}</strong>
  68. </a>
  69. </li>
  70. </ul>
  71. {% endif %}
  72. </form>
  73. </div>