mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Merge branch 'devel' into release/3.2
This commit is contained in:
@@ -134,6 +134,7 @@ if(strlen($showing) > 0)
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<label><input type="checkbox" id="autofilter" checked="true"> Apply filtering on click on Type, Domain, and Clients</label><br/>
|
||||
<button type="button" id="resetButton" hidden="true">Clear Filters</button>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@@ -182,7 +182,7 @@ $(document).ready(function() {
|
||||
title: function(tooltipItem, data) {
|
||||
var label = tooltipItem[0].xLabel;
|
||||
var time = new Date(label);
|
||||
var date = time.getFullYear()+"-"+padNumber(time.getMonth())+"-"+padNumber(time.getDate());
|
||||
var date = time.getFullYear()+"-"+padNumber(time.getMonth()+1)+"-"+padNumber(time.getDate());
|
||||
var h = time.getHours();
|
||||
var m = time.getMinutes();
|
||||
var from = padNumber(h)+":"+padNumber(m)+":00";
|
||||
|
||||
@@ -96,6 +96,10 @@ function handleAjaxError( xhr, textStatus, error ) {
|
||||
tableApi.draw();
|
||||
}
|
||||
|
||||
function autofilter(){
|
||||
return document.getElementById("autofilter").checked;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
var status;
|
||||
|
||||
@@ -189,24 +193,24 @@ $(document).ready(function() {
|
||||
"initComplete": function () {
|
||||
var api = this.api();
|
||||
// Query type IPv4 / IPv6
|
||||
api.$("td:eq(1)").click( function () { api.search( this.innerHTML ).draw(); $("#resetButton").show(); } );
|
||||
api.$("td:eq(1)").click( function () { if(autofilter()){ api.search( this.innerHTML ).draw(); $("#resetButton").show(); }});
|
||||
api.$("td:eq(1)").hover(
|
||||
function () { this.title="Click to show only "+this.innerHTML+" queries"; this.style.color="#72afd2"; },
|
||||
function () { this.style.color=""; }
|
||||
function () { this.title="Click to show only "+this.innerHTML+" queries"; this.style.color="#72afd2" },
|
||||
function () { this.style.color="" }
|
||||
);
|
||||
api.$("td:eq(1)").css("cursor","pointer");
|
||||
// Domain
|
||||
api.$("td:eq(2)").click( function () { api.search( this.innerHTML ).draw(); $("#resetButton").show(); } );
|
||||
api.$("td:eq(2)").click( function () { if(autofilter()){ api.search( this.innerHTML ).draw(); $("#resetButton").show(); }});
|
||||
api.$("td:eq(2)").hover(
|
||||
function () { this.title="Click to show only queries with domain "+this.innerHTML; this.style.color="#72afd2"; },
|
||||
function () { this.style.color=""; }
|
||||
function () { this.title="Click to show only queries with domain "+this.innerHTML; this.style.color="#72afd2" },
|
||||
function () { this.style.color="" }
|
||||
);
|
||||
api.$("td:eq(2)").css("cursor","pointer");
|
||||
// Client
|
||||
api.$("td:eq(3)").click( function () { api.search( this.innerHTML ).draw(); $("#resetButton").show(); } );
|
||||
api.$("td:eq(3)").click( function () { if(autofilter()){ api.search( this.innerHTML ).draw(); $("#resetButton").show(); }});
|
||||
api.$("td:eq(3)").hover(
|
||||
function () { this.title="Click to show only queries made by "+this.innerHTML; this.style.color="#72afd2"; },
|
||||
function () { this.style.color=""; }
|
||||
function () { this.title="Click to show only queries made by "+this.innerHTML; this.style.color="#72afd2" },
|
||||
function () { this.style.color="" }
|
||||
);
|
||||
api.$("td:eq(3)").css("cursor","pointer");
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<!-- /.content-wrapper -->
|
||||
<footer class="main-footer">
|
||||
<!-- Version Infos -->
|
||||
<div class="pull-right hidden-xs hidden-sm<?php if(isset($core_commit) || isset($web_commit)) { ?> hidden-md<?php } ?>">
|
||||
<div class="pull-right hidden-xs hidden-sm<?php if(isset($core_commit) || isset($web_commit) || isset($FTL_commit)) { ?> hidden-md<?php } ?>">
|
||||
<b>Pi-hole Version </b> <?php
|
||||
echo $core_current;
|
||||
if(isset($core_commit)) { echo " (".$core_branch.", ".$core_commit.")"; }
|
||||
@@ -59,6 +59,7 @@
|
||||
if($web_update){ ?> <a class="alert-link lookatme" href="https://github.com/pi-hole/AdminLTE/releases" target="_blank">(Update available!)</a><?php } ?>
|
||||
<b>FTL Version </b> <?php
|
||||
echo $FTL_current;
|
||||
if(isset($FTL_commit)) { echo " (".$FTL_branch.", ".$FTL_commit.")"; }
|
||||
if($FTL_update){ ?> <a class="alert-link lookatme" href="https://github.com/pi-hole/FTL/releases" target="_blank">(Update available!)</a><?php } ?>
|
||||
</div>
|
||||
<div style="display: inline-block"><strong><a href="https://pi-hole.net/donate" target="_blank"><i class="fa fa-heart"></i> Donate</a></strong> if you found this useful.</div>
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
* 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. */ ?>
|
||||
* Please see LICENSE file for your rights under this license. */
|
||||
|
||||
<?php
|
||||
require "scripts/pi-hole/php/auth.php";
|
||||
require "scripts/pi-hole/php/password.php";
|
||||
|
||||
|
||||
@@ -122,7 +122,8 @@ function isinserverlist($addr) {
|
||||
"Level3" => ["v4_1" => "4.2.2.1", "v4_2" => "4.2.2.2"],
|
||||
"Norton" => ["v4_1" => "199.85.126.10", "v4_2" => "199.85.127.10"],
|
||||
"Comodo" => ["v4_1" => "8.26.56.26", "v4_2" => "8.20.247.20"],
|
||||
"DNS.WATCH" => ["v4_1" => "84.200.69.80", "v4_2" => "84.200.70.40", "v6_1" => "2001:1608:10:25:0:0:1c04:b12f", "v6_2" => "2001:1608:10:25:0:0:9249:d69b"]
|
||||
"DNS.WATCH" => ["v4_1" => "84.200.69.80", "v4_2" => "84.200.70.40", "v6_1" => "2001:1608:10:25:0:0:1c04:b12f", "v6_2" => "2001:1608:10:25:0:0:9249:d69b"],
|
||||
"Quad9" => ["v4_1" => "9.9.9.9", "v6_1" => "2620:fe::fe"]
|
||||
];
|
||||
|
||||
$adlist = [];
|
||||
|
||||
@@ -42,8 +42,15 @@ else
|
||||
$web_current = explode("-",$versions[1])[0];
|
||||
}
|
||||
|
||||
/********** Get Pi-hole FTL version (not a git repository) **********/
|
||||
$FTL_current = $versions[2];
|
||||
/********** Get Pi-hole FTL (not a git repository) **********/
|
||||
$FTL_branch = $branches[2];
|
||||
if($FTL_branch !== "master") {
|
||||
$FTL_current = "vDev";
|
||||
$FTL_commit = $versions[2];
|
||||
}
|
||||
else {
|
||||
$FTL_current = explode("-",$versions[2])[0];
|
||||
}
|
||||
|
||||
// Get data from GitHub
|
||||
$core_latest = $GitHubversions[0];
|
||||
@@ -77,7 +84,15 @@ else
|
||||
// FTL version comparison
|
||||
// This logic allows the local core version to be newer than the upstream version
|
||||
// The update indicator is only shown if the upstream version is NEWER
|
||||
$FTL_update = (version_compare($FTL_current, $FTL_latest) < 0);
|
||||
if($FTL_current !== "vDev")
|
||||
{
|
||||
$FTL_update = (version_compare($FTL_current, $FTL_latest) < 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
$FTL_update = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
+7
-7
@@ -10,11 +10,6 @@ require "scripts/pi-hole/php/savesettings.php";
|
||||
// Reread ini file as things might have been changed
|
||||
$setupVars = parse_ini_file("/etc/pihole/setupVars.conf");
|
||||
|
||||
function command_exist($cmd)
|
||||
{
|
||||
return !empty(shell_exec(sprintf("which %s", escapeshellarg($cmd))));
|
||||
}
|
||||
|
||||
?>
|
||||
<style type="text/css">
|
||||
.tooltip-inner {
|
||||
@@ -227,8 +222,8 @@ if (isset($setupVars["API_PRIVACY_MODE"])) {
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (in_array($_GET['tab'], array("sysadmin", "blocklists", "dns", "piholedhcp", "api", "teleporter"))) {
|
||||
<?php
|
||||
if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists", "dns", "piholedhcp", "api", "teleporter"))) {
|
||||
$tab = $_GET['tab'];
|
||||
} else {
|
||||
$tab = "sysadmin";
|
||||
@@ -1182,6 +1177,11 @@ if (in_array($_GET['tab'], array("sysadmin", "blocklists", "dns", "piholedhcp",
|
||||
<button type="button" class="btn btn-danger confirm-reboot form-control">Restart system</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form role="form" method="post" id="flushlogsform">
|
||||
<input type="hidden" name="field" value="flushlogs">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
</form>
|
||||
<form role="form" method="post" id="disablelogsform">
|
||||
<input type="hidden" name="field" value="Logging">
|
||||
<input type="hidden" name="action" value="Disable">
|
||||
|
||||
Reference in New Issue
Block a user