body_for_table_summary.twig 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <tbody id="tbl_summary_row">
  2. <tr>
  3. <th class="print_ignore"></th>
  4. <th class="tbl_num nowrap">
  5. {% set num_tables_trans -%}
  6. {% trans %}%s table{% plural num_tables %}%s tables{% endtrans %}
  7. {%- endset %}
  8. {{ num_tables_trans|format(Util_formatNumber(num_tables, 0)) }}
  9. </th>
  10. {% if server_slave_status %}
  11. <th>{% trans 'Replication' %}</th>
  12. {% endif %}
  13. {% set sum_colspan = db_is_system_schema ? 4 : 7 %}
  14. {% if num_favorite_tables == 0 %}
  15. {% set sum_colspan = sum_colspan - 1 %}
  16. {% endif %}
  17. <th colspan="{{ sum_colspan }}" class="print_ignore">{% trans 'Sum' %}</th>
  18. {% set row_count_sum = Util_formatNumber(sum_entries, 0) %}
  19. {# If a table shows approximate rows count, display update-all-real-count anchor. #}
  20. {% set row_sum_url = [] %}
  21. {% if approx_rows is defined %}
  22. {% set row_sum_url = {
  23. 'ajax_request': true,
  24. 'db': db,
  25. 'real_row_count': 'true',
  26. 'real_row_count_all': 'true'
  27. } %}
  28. {% endif %}
  29. {% if approx_rows %}
  30. {% set cell_text -%}
  31. <a href="db_structure.php
  32. {{- Url_getCommon(row_sum_url) }}" class="ajax row_count_sum">~
  33. {{- row_count_sum -}}
  34. </a>
  35. {%- endset %}
  36. {% else %}
  37. {% set cell_text = row_count_sum %}
  38. {% endif %}
  39. <th class="value tbl_rows">{{ cell_text }}</th>
  40. {% if not (properties_num_columns > 1) %}
  41. {# MySQL <= 5.5.2 #}
  42. {% set default_engine = dbi.fetchValue('SELECT @@storage_engine;') %}
  43. {% if default_engine is empty %}
  44. {# MySQL >= 5.5.3 #}
  45. {% set default_engine = dbi.fetchValue('SELECT @@default_storage_engine;') %}
  46. {% endif %}
  47. <th class="center">
  48. <dfn title="{{ '%s is the default storage engine on this MySQL server.'|trans|format(default_engine) }}">
  49. {{ default_engine }}
  50. </dfn>
  51. </th>
  52. <th>
  53. {% if db_collation is not empty %}
  54. <dfn title="{{ Charsets_getCollationDescr(db_collation) }} ({% trans 'Default' %})">
  55. {{ db_collation }}
  56. </dfn>
  57. {% endif %}
  58. </th>
  59. {% endif %}
  60. {% if is_show_stats %}
  61. {% set sum = Util_formatByteDown(sum_size, 3, 1) %}
  62. {% set sum_formatted = sum[0] %}
  63. {% set sum_unit = sum[1] %}
  64. <th class="value tbl_size">{{ sum_formatted }} {{ sum_unit }}</th>
  65. {% set overhead = Util_formatByteDown(overhead_size, 3, 1) %}
  66. {% set overhead_formatted = overhead[0] %}
  67. {% set overhead_unit = overhead[1] %}
  68. <th class="value tbl_overhead">{{ overhead_formatted }} {{ overhead_unit }}</th>
  69. {% endif %}
  70. {% if show_charset %}
  71. <th>{{ db_charset }}</th>
  72. {% endif %}
  73. {% if show_comment %}
  74. <th></th>
  75. {% endif %}
  76. {% if show_creation %}
  77. <th class="value tbl_creation">
  78. {{ create_time_all ? Util_localisedDate(strtotime(create_time_all)) : '-' }}
  79. </th>
  80. {% endif %}
  81. {% if show_last_update %}
  82. <th class="value tbl_last_update">
  83. {{ update_time_all ? Util_localisedDate(strtotime(update_time_all)) : '-' }}
  84. </th>
  85. {% endif %}
  86. {% if show_last_check %}
  87. <th class="value tbl_last_check">
  88. {{ check_time_all ? Util_localisedDate(strtotime(check_time_all)) : '-' }}
  89. </th>
  90. {% endif %}
  91. </tr>
  92. </tbody>