278 lines
16 KiB
Plaintext
278 lines
16 KiB
Plaintext
<? --[[
|
|
* Pi-hole: A black hole for Internet advertisements
|
|
* (c) 2023 Pi-hole, LLC (https://pi-hole.net)
|
|
* Network-wide ad blocking via your own hardware.
|
|
*
|
|
* This file is copyright under the latest version of the EUPL.
|
|
* Please see LICENSE file for your rights under this license.
|
|
--]]
|
|
|
|
mg.include('scripts/lua/header_authenticated.lp','r')
|
|
|
|
-- Page title and level selector
|
|
PageTitle = i18n('settings.system.title')
|
|
mg.include('scripts/lua/settings_header.lp','r')
|
|
?>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="box">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title"><?= i18n('settings.system.system_information') ?></h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<table class="table table-striped table-bordered nowrap">
|
|
<tbody>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.hostname') ?></th>
|
|
<td><span id="sysinfo-hostname"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.cpu') ?></th>
|
|
<td><span id="sysinfo-cpu"></span> <span id="sysinfo-cpu-ftl"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.ram') ?></th>
|
|
<td><span id="sysinfo-memory-ram"></span> <span id="sysinfo-ram-ftl"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.swap') ?></th>
|
|
<td><span id="sysinfo-memory-swap"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.kernel') ?></th>
|
|
<td><span id="sysinfo-kernel"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.uptime') ?></th>
|
|
<td><span id="sysinfo-uptime"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.ftl') ?></th>
|
|
<td><?= i18ns('settings.system.last_restart', '<span id="sysinfo-pid-ftl">?</span>', '<span id="sysinfo-uptime-ftl"></span>') ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h4><?= i18n('settings.system.primary_ip_addresses') ?></h4>
|
|
<table class="table table-striped table-bordered nowrap">
|
|
<tbody>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.ipv4') ?></th>
|
|
<td><code id="sysinfo-gw-v4-addr">?</code> @ <code id="sysinfo-gw-v4-iface">?</code></td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.ipv6') ?></th>
|
|
<td><code id="sysinfo-gw-v6-addr">?</code> @ <code id="sysinfo-gw-v6-iface">?</code></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="overlay" id="sysinfo-system-overlay">
|
|
<i class="fa fa-sync fa-spin"></i>
|
|
</div>
|
|
</div>
|
|
<div class="box settings-level-expert d-none">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title"><?= i18n('settings.system.dhcp_server_metrics') ?></h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<table class="table table-striped table-bordered nowrap">
|
|
<tbody>
|
|
<tr title="<?= i18n('settings.system.dhcpdiscover_title') ?>">
|
|
<th scope="row"><?= i18n('settings.system.dhcpdiscover') ?></th>
|
|
<td id="sysinfo-dhcp-discover"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.dhcpoffer_title') ?>">
|
|
<th scope="row"><?= i18n('settings.system.dhcpoffer') ?></th>
|
|
<td id="sysinfo-dhcp-offer"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.dhcprequest_title') ?>">
|
|
<th scope="row"><?= i18n('settings.system.dhcprequest') ?></th>
|
|
<td id="sysinfo-dhcp-request"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.dhcpack_title') ?>">
|
|
<th scope="row"><?= i18n('settings.system.dhcpack') ?></th>
|
|
<td id="sysinfo-dhcp-ack"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.dhcpnak_title') ?>">
|
|
<th scope="row"><?= i18n('settings.system.dhcpnak') ?></th>
|
|
<td id="sysinfo-dhcp-nak"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.dhcpdecline_title') ?>">
|
|
<th scope="row"><?= i18n('settings.system.dhcpdecline') ?></th>
|
|
<td id="sysinfo-dhcp-decline"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.dhcpinform_title') ?>">
|
|
<th scope="row"><?= i18n('settings.system.dhcpinform') ?></th>
|
|
<td id="sysinfo-dhcp-inform"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.dhcprelease_title') ?>">
|
|
<th scope="row"><?= i18n('settings.system.dhcprelease') ?></th>
|
|
<td id="sysinfo-dhcp-release"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.dhcpnoanswer_title') ?>">
|
|
<th scope="row"><?= i18n('settings.system.dhcpnoanswer') ?></th>
|
|
<td id="sysinfo-dhcp-noanswer"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.bootp_title') ?>">
|
|
<th scope="row"><?= i18n('settings.system.bootp') ?></th>
|
|
<td id="sysinfo-dhcp-bootp"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.pxe_title') ?>">
|
|
<th scope="row"><?= i18n('settings.system.pxe') ?></th>
|
|
<td id="sysinfo-dhcp-pxe"> </td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.allocated_pruned_ipv4_leases') ?></th>
|
|
<td><span id="sysinfo-dhcp-leases-allocated_4"> </span> /
|
|
<span id="sysinfo-dhcp-leases-pruned_4"> </span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.allocated_pruned_ipv6_leases') ?></th>
|
|
<td><span id="sysinfo-dhcp-leases-allocated_6"> </span> /
|
|
<span id="sysinfo-dhcp-leases-pruned_6"> </span>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="overlay" id="sysinfo-metrics-overlay-3">
|
|
<i class="fa fa-sync fa-spin"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="box settings-level-expert d-none" id="cache-metrics">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title"><?= i18n('settings.system.dns_cache_metrics') ?></h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<table class="table table-striped table-bordered nowrap">
|
|
<tbody>
|
|
<tr title="<?= i18n('settings.system.dns_cache_size_label') ?>">
|
|
<th scope="row"><?= i18n('settings.system.dns_cache_size') ?></th>
|
|
<td id="sysinfo-dns-cache-size"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.active_cache_records_label') ?>">
|
|
<th scope="row"><?= i18n('settings.system.active_cache_records') ?></th>
|
|
<td id="cache-utilization"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.total_cache_insertions_label') ?>">
|
|
<th scope="row"><?= i18n('settings.system.total_cache_insertions') ?></th>
|
|
<td id="sysinfo-dns-cache-inserted"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.dns_cache_evictions_label') ?>">
|
|
<th scope="row"><?= i18n('settings.system.dns_cache_evictions') ?></th>
|
|
<td id="sysinfo-dns-cache-evicted"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.expired_dns_cache_entries_label') ?>">
|
|
<th scope="row"><?= i18n('settings.system.expired_dns_cache_entries') ?></th>
|
|
<td id="sysinfo-dns-cache-expired"> </td>
|
|
</tr>
|
|
<tr title="<?= i18n('settings.system.immortal_dns_cache_entries_label') ?>">
|
|
<th scope="row"><?= i18n('settings.system.immortal_dns_cache_entries') ?></th>
|
|
<td id="sysinfo-dns-cache-immortal"> </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<!-- <table class="table table-striped table-bordered nowrap settings-level-expert d-none">
|
|
<tbody id="dns-cache-table">
|
|
</tbody>
|
|
</table> -->
|
|
</div>
|
|
<div class="col-lg-12">
|
|
<?= i18n('settings.system.dns_cache_documentation') ?><br>
|
|
</div>
|
|
<div class="col-lg-12" id="cache-metrics-chart">
|
|
<div style="width:50%">
|
|
<canvas id="cachePieChart" width="280" height="280"></canvas>
|
|
</div>
|
|
<div class="chart-legend" style="width:50%" id="cache-legend" ></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="overlay" id="sysinfo-metrics-overlay-1">
|
|
<i class="fa fa-sync fa-spin"></i>
|
|
</div>
|
|
</div>
|
|
<div class="box">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title"><?= i18n('settings.system.dns_reply_metrics') ?></h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<table class="table table-striped table-bordered nowrap">
|
|
<tbody>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.local_cache_replies') ?></th>
|
|
<td id="sysinfo-dns-replies-local"> </td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.forwarded_queries') ?></th>
|
|
<td id="sysinfo-dns-replies-forwarded"> </td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.cache_optimizer_replies') ?></th>
|
|
<td id="sysinfo-dns-replies-optimized"> </td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?= i18n('settings.system.unanswered_queries') ?></th>
|
|
<td id="sysinfo-dns-replies-unanswered"> </td>
|
|
</tr>
|
|
<tr class="settings-level-expert d-none">
|
|
<th scope="row"><?= i18n('settings.system.authoritative_replies') ?></th>
|
|
<td id="sysinfo-dns-replies-auth"> </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="overlay" id="sysinfo-metrics-overlay-2">
|
|
<i class="fa fa-sync fa-spin"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12 settings-level-expert d-none">
|
|
<div class="box box-warning">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title"><?= i18n('settings.system.actions') ?></h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-md-6 col-lg-3">
|
|
<button type="button" id="loggingButton" class="btn btn-block button-pad btn-primary"><i class="fa fa-spinner fa-pulse"></i></button>
|
|
</div>
|
|
<div class="col-xs-12 col-md-6 col-lg-3">
|
|
<button type="button" class="btn btn-warning confirm-restartdns btn-block button-pad destructive_action" disabled><?= i18n('settings.system.restart_dns_resolver') ?></button>
|
|
</div>
|
|
<div class="col-xs-12 col-md-6 col-lg-3">
|
|
<button type="button" class="btn btn-danger confirm-flusharp btn-block button-pad destructive_action" disabled><?= i18n('settings.system.flush_network_table') ?></button>
|
|
</div>
|
|
<div class="col-xs-12 col-md-6 col-lg-3 settings-level-expert d-none">
|
|
<button type="button" class="btn btn-danger confirm-flushlogs btn-block button-pad destructive_action" disabled><?= i18n('settings.system.flush_logs') ?></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="<?=pihole.fileversion('vendor/bootstrap-toggle/bootstrap-toggle.min.js')?>"></script>
|
|
<script src="<?=pihole.fileversion('vendor/jquery-confirm/jquery.confirm.min.js')?>"></script>
|
|
<script src="<?=pihole.fileversion('scripts/js/charts.js')?>"></script>
|
|
<script src="<?=pihole.fileversion('scripts/js/settings-system.js')?>"></script>
|
|
<script src="<?=pihole.fileversion('scripts/js/settings.js')?>"></script>
|
|
|
|
<? mg.include('scripts/lua/footer.lp','r')?>
|