| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) { // Ensure running within WordPress |
| 3 |
exit; |
| 4 |
} |
| 5 |
?> |
| 6 |
<?php include_once __DIR__ . '/blocks/header.php'; ?> |
| 7 |
|
| 8 |
<h1>Snapshot <?php echo esc_html($snapshot); ?></h1> |
| 9 |
<div> |
| 10 |
<a href="?page=disk-usage-insights">Dashboard</a> > Snapshot <?php echo esc_html($snapshot); ?> |
| 11 |
</div> |
| 12 |
<br> |
| 13 |
|
| 14 |
<!-- |
| 15 |
<input id="cbIncludeCore" type="checkbox" checked><label for="cbIncludeCore">Include WordPress Core Files</label><br> |
| 16 |
<br> |
| 17 |
--> |
| 18 |
|
| 19 |
<div class="DUI-panel"> |
| 20 |
<div class="DUI-panel__content"> |
| 21 |
Root Directory: <?php echo esc_html($root); ?><br> |
| 22 |
Total Size: <?php echo esc_html(number_format_i18n($totalSize)); ?> |
| 23 |
<br> |
| 24 |
<br> |
| 25 |
<div class="stackedbarchart"> |
| 26 |
<?php foreach ($barChart as $bar): ?> |
| 27 |
<div class="stackedbarchart__bar" style="width: <?php echo esc_html($bar['percent']) ?>%"><?php echo esc_html($bar['label']) ?></div> |
| 28 |
<?php endforeach ?> |
| 29 |
</div> |
| 30 |
|
| 31 |
<table> |
| 32 |
<?php foreach ($barChart as $bar): ?> |
| 33 |
<tr> |
| 34 |
<td><?php echo esc_html($bar['label']) ?>:</td> |
| 35 |
<td><?php echo esc_html($bar['gb']) ?> GB</td> |
| 36 |
<td><?php echo esc_html($bar['percent']) ?>%</td> |
| 37 |
</tr> |
| 38 |
<?php endforeach ?> |
| 39 |
</table> |
| 40 |
</div> |
| 41 |
</div> |
| 42 |
|
| 43 |
|
| 44 |
<div hx-trigger="load" |
| 45 |
hx-get="<?php echo esc_url($WP_ADMIN_AJAX_URL); ?>?action=dui_results_table&table=largest-files&snapshot=<?php echo esc_js($WP_SNAPSHOT_FILE); ?>" |
| 46 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 47 |
class="TOP10" |
| 48 |
> |
| 49 |
|
| 50 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 51 |
<div class="DUI-panel__content"> |
| 52 |
... |
| 53 |
</div> |
| 54 |
</div> |
| 55 |
|
| 56 |
</div> |
| 57 |
|
| 58 |
<div hx-trigger="load" |
| 59 |
hx-get="<?php echo esc_url($WP_ADMIN_AJAX_URL); ?>?action=dui_results_table&table=largest-folders-files&snapshot=<?php echo esc_js($WP_SNAPSHOT_FILE); ?>" |
| 60 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 61 |
class="TOP10" |
| 62 |
> |
| 63 |
|
| 64 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 65 |
<div class="DUI-panel__content"> |
| 66 |
... |
| 67 |
</div> |
| 68 |
</div> |
| 69 |
|
| 70 |
</div> |
| 71 |
|
| 72 |
<div hx-trigger="load" |
| 73 |
hx-get="<?php echo esc_url($WP_ADMIN_AJAX_URL); ?>?action=dui_results_table&table=largest-folders-sub-folders&snapshot=<?php echo esc_js($WP_SNAPSHOT_FILE); ?>" |
| 74 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 75 |
class="TOP10" |
| 76 |
> |
| 77 |
|
| 78 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 79 |
<div class="DUI-panel__content"> |
| 80 |
... |
| 81 |
</div> |
| 82 |
</div> |
| 83 |
|
| 84 |
</div> |
| 85 |
|
| 86 |
<div hx-trigger="load" |
| 87 |
hx-get="<?php echo esc_url($WP_ADMIN_AJAX_URL); ?>?action=dui_results_table&table=folders-most-files&snapshot=<?php echo esc_js($WP_SNAPSHOT_FILE); ?>" |
| 88 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 89 |
class="TOP10" |
| 90 |
> |
| 91 |
|
| 92 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 93 |
<div class="DUI-panel__content"> |
| 94 |
... |
| 95 |
</div> |
| 96 |
</div> |
| 97 |
|
| 98 |
</div> |
| 99 |
|
| 100 |
<div hx-trigger="load" |
| 101 |
hx-get="<?php echo esc_url($WP_ADMIN_AJAX_URL); ?>?action=dui_results_table&table=largest-plugins&snapshot=<?php echo esc_js($WP_SNAPSHOT_FILE); ?>" |
| 102 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 103 |
class="TOP10" |
| 104 |
> |
| 105 |
|
| 106 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 107 |
<div class="DUI-panel__content"> |
| 108 |
... |
| 109 |
</div> |
| 110 |
</div> |
| 111 |
|
| 112 |
</div> |
| 113 |
|
| 114 |
<div hx-trigger="load" |
| 115 |
|
| 116 |
hx-get="<?php echo esc_url($WP_ADMIN_AJAX_URL); ?>?action=dui_results_table&table=largest-themes&snapshot=<?php echo esc_js($WP_SNAPSHOT_FILE); ?>" |
| 117 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 118 |
class="TOP10" |
| 119 |
> |
| 120 |
|
| 121 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 122 |
<div class="DUI-panel__content"> |
| 123 |
... |
| 124 |
</div> |
| 125 |
</div> |
| 126 |
|
| 127 |
</div> |