databases_footer.twig 2.5 KB

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