display_table_stats.phtml
3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<div id="tablestatistics">
<?php $odd_row = false; ?>
<fieldset>
<legend><?php echo __('Information'); ?></legend>
<a id="showusage"></a>
<?php if (! $tbl_is_view && ! $db_is_system_schema): ?>
<table id="tablespaceusage" class="data">
<caption class="tblHeaders"><?php echo __('Space usage'); ?></caption>
<tbody>
<tr class="<?php echo (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
<th class="name"><?php echo __('Data'); ?></th>
<td class="value"><?php echo $data_size; ?></td>
<td class="unit"><?php echo $data_unit; ?></td>
</tr>
<?php if (isset($index_size)): ?>
<tr class="<?php echo (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
<th class="name"><?php echo __('Index'); ?></th>
<td class="value"><?php echo $index_size; ?></td>
<td class="unit"><?php echo $index_unit; ?></td>
</tr>
<?php endif; ?>
<?php if (isset($free_size)): ?>
<tr class="<?php echo ((!$odd_row) ? 'odd' : 'even'); ?>">
<th class="name"><?php echo __('Overhead'); ?></th>
<td class="value"><?php echo $free_size; ?></td>
<td class="unit"><?php echo $free_unit; ?></td>
</tr>
<tr class="<?php echo (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
<th class="name"><?php echo __('Effective'); ?></th>
<td class="value"><?php echo $effect_size; ?></td>
<td class="unit"><?php echo $effect_unit; ?></td>
</tr>
<?php endif; ?>
<?php if (isset($tot_size) && $mergetable == false): ?>
<tr class="<?php echo (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
<th class="name"><?php echo __('Total'); ?></th>
<td class="value"><?php echo $tot_size; ?></td>
<td class="unit"><?php echo $tot_unit; ?></td>
</tr>
<?php endif; ?>
<!-- Optimize link if overhead -->
<?php if (isset($free_size) && !PMA_DRIZZLE
&& ($tbl_storage_engine == 'MYISAM'
|| $tbl_storage_engine == 'ARIA'
|| $tbl_storage_engine == 'MARIA'
|| $tbl_storage_engine == 'BDB')): ?>
<tr class="tblFooters">
<td colspan="3" class="center">
<a href="sql.php<?php echo $url_query; ?>&pos=0&sql_query=<?php echo urlencode(
'OPTIMIZE TABLE ' . PMA_Util::backquote($GLOBALS['table'])); ?>">
<?php echo PMA_Util::getIcon('b_tbloptimize.png', __('Optimize table')); ?>
</a>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<?php endif; ?>
<?php
echo PMA\Template::get('table/structure/row_stats_table')->render(
array(
'showtable' => $showtable,
'tbl_collation' => $tbl_collation,
'is_innodb' => $is_innodb,
'mergetable' => $mergetable,
'avg_size' => (isset ($avg_size) ? $avg_size : ''),
'avg_unit' => (isset ($avg_unit) ? $avg_unit : '')
)
);
?>
</fieldset>
</div>