Skip to content

Commit f05398a

Browse files
authored
Update admin interface dependencies (dani-garcia#4581)
- Updated JS/CSS dependencies - Fixed a small issue regarding DNS IP detection fixes dani-garcia#3946 fixes dani-garcia#3947
1 parent 9555ac7 commit f05398a

9 files changed

+1871
-2239
lines changed

src/api/web.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ pub fn static_files(filename: &str) -> Result<(ContentType, &'static [u8]), Erro
170170
}
171171
"bootstrap.css" => Ok((ContentType::CSS, include_bytes!("../static/scripts/bootstrap.css"))),
172172
"bootstrap.bundle.js" => Ok((ContentType::JavaScript, include_bytes!("../static/scripts/bootstrap.bundle.js"))),
173-
"jdenticon.js" => Ok((ContentType::JavaScript, include_bytes!("../static/scripts/jdenticon.js"))),
173+
"jdenticon-3.3.0.js" => Ok((ContentType::JavaScript, include_bytes!("../static/scripts/jdenticon-3.3.0.js"))),
174174
"datatables.js" => Ok((ContentType::JavaScript, include_bytes!("../static/scripts/datatables.js"))),
175175
"datatables.css" => Ok((ContentType::CSS, include_bytes!("../static/scripts/datatables.css"))),
176176
"jquery-3.7.1.slim.js" => {

src/static/scripts/admin_diagnostics.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ const browserUTC = `${year}-${month}-${day} ${hour}:${minute}:${seconds} UTC`;
2121

2222
// ================================
2323
// Check if the output is a valid IP
24-
const isValidIp = value => (/^(?:(?:^|\.)(?:2(?:5[0-5]|[0-4]\d)|1?\d?\d)){4}$/.test(value) ? true : false);
24+
function isValidIp(ip) {
25+
const ipv4Regex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
26+
const ipv6Regex = /^(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}|((?:[a-fA-F0-9]{1,4}:){1,7}:|:(:[a-fA-F0-9]{1,4}){1,7}|[a-fA-F0-9]{1,4}:((:[a-fA-F0-9]{1,4}){1,6}))$/;
27+
return ipv4Regex.test(ip) || ipv6Regex.test(ip);
28+
}
2529

2630
function checkVersions(platform, installed, latest, commit=null) {
2731
if (installed === "-" || latest === "-") {

src/static/scripts/bootstrap.bundle.js

+9-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/static/scripts/bootstrap.css

+22-31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/static/scripts/datatables.css

+13-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
*
55
* To rebuild or modify this file with the latest versions of the included
66
* software please visit:
7-
* https://datatables.net/download/#bs5/dt-2.0.0
7+
* https://datatables.net/download/#bs5/dt-2.0.7
88
*
99
* Included libraries:
10-
* DataTables 2.0.0
10+
* DataTables 2.0.7
1111
*/
1212

1313
@charset "UTF-8";
@@ -347,7 +347,7 @@ table.table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) > * {
347347
box-shadow: none;
348348
}
349349
table.table.dataTable > :not(caption) > * > * {
350-
background-color: transparent;
350+
background-color: var(--bs-table-bg);
351351
}
352352
table.table.dataTable > tbody > tr {
353353
background-color: transparent;
@@ -463,10 +463,18 @@ div.dt-scroll-foot > .dt-scroll-footInner > table > tfoot > tr:first-child {
463463
justify-content: center !important;
464464
}
465465
}
466-
table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) {
466+
table.dataTable.table-sm > thead > tr th.dt-orderable-asc, table.dataTable.table-sm > thead > tr th.dt-orderable-desc, table.dataTable.table-sm > thead > tr th.dt-ordering-asc, table.dataTable.table-sm > thead > tr th.dt-ordering-desc,
467+
table.dataTable.table-sm > thead > tr td.dt-orderable-asc,
468+
table.dataTable.table-sm > thead > tr td.dt-orderable-desc,
469+
table.dataTable.table-sm > thead > tr td.dt-ordering-asc,
470+
table.dataTable.table-sm > thead > tr td.dt-ordering-desc {
467471
padding-right: 20px;
468472
}
469-
table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled):before, table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled):after {
473+
table.dataTable.table-sm > thead > tr th.dt-orderable-asc span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-orderable-desc span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-ordering-asc span.dt-column-order, table.dataTable.table-sm > thead > tr th.dt-ordering-desc span.dt-column-order,
474+
table.dataTable.table-sm > thead > tr td.dt-orderable-asc span.dt-column-order,
475+
table.dataTable.table-sm > thead > tr td.dt-orderable-desc span.dt-column-order,
476+
table.dataTable.table-sm > thead > tr td.dt-ordering-asc span.dt-column-order,
477+
table.dataTable.table-sm > thead > tr td.dt-ordering-desc span.dt-column-order {
470478
right: 5px;
471479
}
472480

0 commit comments

Comments
 (0)