PluginProbe
Disk Usage Insights / trunk
Disk Usage Insights vtrunk
trunk 1.0 1.10 1.11 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9
disk-usage-insights / views / snapshots.php

snapshots.php in Disk Usage Insights trunk, at views/snapshots.php

41 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div id="DUI-snapshots" class="DUI-panel">
2 <div class="DUI-panel__headline">
3 View a previous snapshot
4 </div>
5 <div class="DUI-panel__content">
6 <div style="margin: 20px;">
7
8 <?php if (sizeof($DATABASES) > 0) { ?>
9
10 <table class="DUI-table">
11 <thead>
12 <tr class="DUI-table__header">
13 <th>Filename</th>
14 <th>Snapshot Size</th>
15 </tr>
16 </thead>
17 <tbody>
18 <?php foreach ($DATABASES as $DB) { ?>
19 <tr>
20 <td><a href="?page=disk-usage-insights&snapshot=<?php echo esc_attr($DB['filename']); ?>"><?php echo esc_html($DB['filename']); ?></a></td>
21 <td class="DUI-table__col--number"><?php echo esc_html(number_format_i18n($DB['filesize'])); ?></td>
22 <td>
23 &nbsp;
24 <button
25 hx-target="#DUI-snapshots"
26 hx-post="<?php echo esc_url($WP_ADMIN_AJAX_URL); ?>?action=dui_delete_snapshot"
27 hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>", "snapshot":"<?php echo esc_js($DB['filename']); ?>"}'
28 hx-confirm="Are you sure to delete this snapshot?"
29 >Delete</button>
30 </td>
31 </tr>
32 <?php } ?>
33 </tbody>
34 </table>
35 <?php } else { ?>
36 You haven't taken any snapshots yet.
37 <?php } ?>
38 </div>
39 </div>
40 </div>
41