| 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" style="border: 1px solid black; margin-bottom: 5px;"> |
| 26 |
<?php foreach ($barChart as $idx => $bar): ?> |
| 27 |
<div class="stackedbarchart__bar stackedbarchart__color--<?php echo esc_attr($idx % 10); ?>" style="width: <?php echo esc_html($bar['percent']) ?>%; height: 20px;"> |
| 28 |
<?php if ($bar['percent'] > 10): ?> |
| 29 |
<?php echo esc_html($bar['label']) ?> |
| 30 |
<?php endif; ?> |
| 31 |
</div> |
| 32 |
<?php endforeach ?> |
| 33 |
</div> |
| 34 |
<div class="stackedbarchart__legend"> |
| 35 |
<?php foreach ($barChart as $idx => $bar): ?> |
| 36 |
<div> |
| 37 |
<div class="stackedbarchart__legendcolor stackedbarchart__color--<?php echo esc_attr($idx % 10); ?>"></div> |
| 38 |
<!-- <?php echo esc_html($bar['percent']) ?>% --> |
| 39 |
<?php echo esc_html($bar['mb']) ?> MB |
| 40 |
<?php echo esc_html($bar['label']) ?> |
| 41 |
</div> |
| 42 |
<?php endforeach ?> |
| 43 |
</div> |
| 44 |
</div> |
| 45 |
</div> |
| 46 |
|
| 47 |
<div hx-trigger="load" |
| 48 |
hx-get="<?php echo esc_url($WP_ADMIN_AJAX_URL); ?>?action=dui_results_table&table=browser&snapshot=<?php echo esc_js($WP_SNAPSHOT_FILE); ?>" |
| 49 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 50 |
class="TOP10" |
| 51 |
> |
| 52 |
|
| 53 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 54 |
<div class="DUI-panel__content"> |
| 55 |
... |
| 56 |
</div> |
| 57 |
</div> |
| 58 |
|
| 59 |
</div> |
| 60 |
|
| 61 |
<div hx-trigger="load" |
| 62 |
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); ?>" |
| 63 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 64 |
class="TOP10" |
| 65 |
> |
| 66 |
|
| 67 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 68 |
<div class="DUI-panel__content"> |
| 69 |
... |
| 70 |
</div> |
| 71 |
</div> |
| 72 |
|
| 73 |
</div> |
| 74 |
|
| 75 |
<div hx-trigger="load" |
| 76 |
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); ?>" |
| 77 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 78 |
class="TOP10" |
| 79 |
> |
| 80 |
|
| 81 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 82 |
<div class="DUI-panel__content"> |
| 83 |
... |
| 84 |
</div> |
| 85 |
</div> |
| 86 |
|
| 87 |
</div> |
| 88 |
|
| 89 |
<div hx-trigger="load" |
| 90 |
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); ?>" |
| 91 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 92 |
class="TOP10" |
| 93 |
> |
| 94 |
|
| 95 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 96 |
<div class="DUI-panel__content"> |
| 97 |
... |
| 98 |
</div> |
| 99 |
</div> |
| 100 |
|
| 101 |
</div> |
| 102 |
|
| 103 |
<div hx-trigger="load" |
| 104 |
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); ?>" |
| 105 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 106 |
class="TOP10" |
| 107 |
> |
| 108 |
|
| 109 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 110 |
<div class="DUI-panel__content"> |
| 111 |
... |
| 112 |
</div> |
| 113 |
</div> |
| 114 |
|
| 115 |
</div> |
| 116 |
|
| 117 |
<div hx-trigger="load" |
| 118 |
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); ?>" |
| 119 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 120 |
class="TOP10" |
| 121 |
> |
| 122 |
|
| 123 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 124 |
<div class="DUI-panel__content"> |
| 125 |
... |
| 126 |
</div> |
| 127 |
</div> |
| 128 |
|
| 129 |
</div> |
| 130 |
|
| 131 |
<div hx-trigger="load" |
| 132 |
|
| 133 |
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); ?>" |
| 134 |
hx-vals='{"_ajax_nonce":"<?php echo esc_js($WP_NONCE); ?>"}' |
| 135 |
class="TOP10" |
| 136 |
> |
| 137 |
|
| 138 |
<div class="DUI-panel DUI-panel--TOP10"> |
| 139 |
<div class="DUI-panel__content"> |
| 140 |
... |
| 141 |
</div> |
| 142 |
</div> |
| 143 |
|
| 144 |
</div> |