-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings-system.lp
312 lines (309 loc) · 17.5 KB
/
settings-system.lp
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<? --[[
* 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/pi-hole/lua/header_authenticated.lp','r')
-- Page title and level selector
PageTitle = "System Settings"
mg.include('scripts/pi-hole/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">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">Hostname:</th>
<td><span id="sysinfo-hostname"></span></td>
</tr>
<tr>
<th scope="row">CPU:</th>
<td><span id="sysinfo-cpu"></span> <span id="sysinfo-cpu-ftl"></span></td>
</tr>
<tr>
<th scope="row">RAM:</th>
<td><span id="sysinfo-memory-ram"></span> <span id="sysinfo-ram-ftl"></span</td>
</tr>
<tr>
<th scope="row">Swap:</th>
<td><span id="sysinfo-memory-swap"></span></td>
</tr>
<tr>
<th scope="row">Kernel:</th>
<td><span id="sysinfo-kernel"></span></td>
</tr>
<tr>
<th scope="row">Uptime:</th>
<td><span id="sysinfo-uptime"></span></td>
</tr>
<tr>
<th scope="row">FTL:</th>
<td>PID <span id="sysinfo-pid-ftl">?</span>, last restart was on <span id="sysinfo-uptime-ftl"></span></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">
<div class="box-header with-border">
<h3 class="box-title">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="Client broadcast to locate available servers">
<th scope="row">
<span>DHCPDISCOVER:</span>
</th>
<td id="sysinfo-dhcp-discover"> </td>
</tr>
<tr title="Server to client in response to DHCPDISCOVER with offer of configuration parameters">
<th scope="row">
<span>DHCPOFFER:</span>
</th>
<td id="sysinfo-dhcp-offer"> </td>
</tr>
<tr title="Client message to servers either 
 (a) requesting offered parameters from one server and implicitly declining offers from all others, 
 (b) confirming correctness of previously allocated address after, e.g., system reboot, or 
 (c) extending the lease on a particular network address">
<th scope="row">
<span>DHCPREQUEST:</span>
</th>
<td id="sysinfo-dhcp-request"> </td>
</tr>
<tr title="Server to client with configuration parameters, including committed network address">
<th scope="row">
<span>DHCPACK:</span>
</th>
<td id="sysinfo-dhcp-ack"> </td>
</tr>
<tr title="Server to client indicating client's notion of network address is incorrect (e.g., client has moved to new subnet) or client's lease as expired">
<th scope="row">
<span>DHCPNAK:</span>
</th>
<td id="sysinfo-dhcp-nak"> </td>
</tr>
<tr title="Client to server indicating network address is already in use">
<th scope="row">
<span>DHCPDECLINE:</span>
</th>
<td id="sysinfo-dhcp-decline"> </td>
</tr>
<tr title="Client to server, asking only for local configuration parameters; client already has externally configured network address">
<th scope="row">
<span>DHCPINFORM:</span>
</th>
<td id="sysinfo-dhcp-inform"> </td>
</tr>
<tr title="Client to server relinquishing network address and cancelling remaining lease">
<th scope="row">
<span>DHCPRELEASE:</span>
</th>
<td id="sysinfo-dhcp-release"> </td>
</tr>
<tr title="Could not provide an answer, e.g., because there are no leases left, the client wants to renew a lease that is outside of our range, or the explicitly requested address is already in use">
<th scope="row">
<span>DHCPNOANSWER:</span>
</th>
<td id="sysinfo-dhcp-noanswer"> </td>
</tr>
<tr title="Processed BOOTP packets">
<th scope="row">
<span>BOOTP:</span>
</th>
<td id="sysinfo-dhcp-bootp"> </td>
</tr>
<tr title="Processed PXE packets">
<th scope="row">
<span>PXE:</span>
</th>
<td id="sysinfo-dhcp-pxe"> </td>
</tr>
<tr>
<th scope="row">
<span>Allocated / pruned IPv4 leases:</span>
</th>
<td><span id="sysinfo-dhcp-leases-allocated_4"> </span> /
<span id="sysinfo-dhcp-leases-pruned_4"> </span>
</td>
</tr>
<tr>
<th scope="row">
<span>Allocated / pruned IPv6 leases:</span>
</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" id="cache-metrics">
<div class="box-header with-border">
<h3 class="box-title">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="Total size of the DNS cache">
<th scope="row">
<span>DNS cache size:</span>
</th>
<td id="sysinfo-dns-cache-size"> </td>
</tr>
<tr title="Share of the allocated cache that is currently in use (this includes stale/expired entries). If the percentage value is very low, it is advisable to reduce the DNS cache size to optimize performance">
<th scope="row">
<span>Active cache records:</span>
</th>
<td id="cache-utilization"> </td>
</tr>
<tr title="Number of cache insertions, this number will grow continuously as expiring records naturally make space for new records">
<th scope="row">
<span>Total cache insertions:</span>
</th>
<td id="sysinfo-dns-cache-inserted"> </td>
</tr>
<tr title="Number of cache entries that had to be removed although they are not expired. When this number if larger than zero, you should consider increasing your total cache size" lookatme-text="DNS cache evictions:">
<th scope="row">
<span>DNS cache evictions:</span>
</th>
<td id="sysinfo-dns-cache-evicted"> </td>
</tr>
<tr title="Number of expired cache entries (they can still be used by the cache optimizer). These entries will only be freed when space is really needed (for efficiency reasons)">
<th scope="row">
<span>Expired DNS cache entries:</span>
</th>
<td id="sysinfo-dns-cache-expired"> </td>
</tr>
<tr title="Number of immortal cache entries that will never expire (e.g. from /etc/hosts or local configuration)">
<th scope="row">
<span>Immortal DNS cache entries:</span>
</th>
<td id="sysinfo-dns-cache-immortal"> </td>
</tr>
</tbody>
</table>
<!-- <table class="table table-striped table-bordered nowrap settings-level-expert">
<tbody id="dns-cache-table">
</tbody>
</table> -->
</div>
<div class="col-lg-12">
See also our <a href="https://docs.pi-hole.net/ftldns/dns-cache/" rel="noopener" target="_blank">DNS cache documentation</a>.<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">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">
<span>Local/cache replies:</span>
</th>
<td id="sysinfo-dns-replies-local"> </td>
</tr>
<tr>
<th scope="row">
Forwarded queries:
</th>
<td id="sysinfo-dns-replies-forwarded"> </td>
</tr>
<tr>
<th scope="row">
<span>Cache optimizer replies:</span>
</th>
<td id="sysinfo-dns-replies-optimized"> </td>
</tr>
<tr>
<th scope="row">
Unanswered queries:
</th>
<td id="sysinfo-dns-replies-unanswered"> </td>
</tr>
<tr class="settings-level-expert">
<th scope="row">
<span>Authoritative replies:</span>
</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">
<div class="box box-warning">
<div class="box-header with-border">
<h3 class="box-title">Actions<span id="actions-title"></span></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="true">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="true">Flush network table</button>
</div>
<div class="col-xs-12 col-md-6 col-lg-3 settings-level-expert">
<button type="button" class="btn btn-danger confirm-flushlogs btn-block button-pad destructive_action" disabled="true">Flush logs (last 24 hours)</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="<?=pihole.fileversion('scripts/vendor/bootstrap-toggle.min.js')?>"></script>
<script src="<?=pihole.fileversion('scripts/vendor/jquery.confirm.min.js')?>"></script>
<script src="<?=pihole.fileversion('scripts/pi-hole/js/charts.js')?>"></script>
<script src="<?=pihole.fileversion('scripts/pi-hole/js/settings-system.js')?>"></script>
<script src="<?=pihole.fileversion('scripts/pi-hole/js/settings.js')?>"></script>
<? mg.include('scripts/pi-hole/lua/footer.lp','r')?>