mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Merge branch 'devel' into elegantize-custom_time_modal
This commit is contained in:
+1
-1
@@ -35,4 +35,4 @@ groups:
|
||||
- master
|
||||
required: 4
|
||||
teams:
|
||||
- admin
|
||||
- approvers
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ $token = $_SESSION['token'];
|
||||
<div class="col-md-12">
|
||||
<div class="box" id="recent-queries">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Recent Queries <?php echo $showing; ?></h3>
|
||||
<h3 class="box-title">Recent Queries</h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
|
||||
@@ -11,7 +11,7 @@ $list = $_GET['l'];
|
||||
|
||||
if($list !== "white" && $list !== "black"){
|
||||
echo "Invalid list parameter";
|
||||
require "footer.php";
|
||||
require "scripts/pi-hole/php/footer.php";
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ function updateTopClientsChart() {
|
||||
var url = clientname;
|
||||
percentage = data.top_sources[client] / sum * 100.0;
|
||||
clienttable.append("<tr> <td>" + url +
|
||||
"</td> <td>" + data.top_sources[client] + "</td> <td> <div class=\"progress progress-sm\" title=\""+percentage.toFixed(1)+"% of " + data.dns_queries_today + "\"> <div class=\"progress-bar progress-bar-blue\" style=\"width: " +
|
||||
"</td> <td>" + data.top_sources[client] + "</td> <td> <div class=\"progress progress-sm\" title=\""+percentage.toFixed(1)+"% of " + sum + "\"> <div class=\"progress-bar progress-bar-blue\" style=\"width: " +
|
||||
percentage + "%\"></div> </div> </td> </tr> ");
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ function updateTopDomainsChart() {
|
||||
|
||||
percentage = data.top_domains[domain] / sum * 100.0;
|
||||
domaintable.append("<tr> <td>" + domain +
|
||||
"</td> <td>" + data.top_domains[domain] + "</td> <td> <div class=\"progress progress-sm\" title=\""+percentage.toFixed(1)+"% of " + data.dns_queries_today + "\"> <div class=\"progress-bar progress-bar-blue\" style=\"width: " +
|
||||
"</td> <td>" + data.top_domains[domain] + "</td> <td> <div class=\"progress progress-sm\" title=\""+percentage.toFixed(1)+"% of " + sum + "\"> <div class=\"progress-bar progress-bar-blue\" style=\"width: " +
|
||||
percentage + "%\"></div> </div> </td> </tr> ");
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ function updateTopAdsChart() {
|
||||
}
|
||||
|
||||
percentage = data.top_ads[ad] / sum * 100.0;
|
||||
adtable.append("<tr> <td>" + ad + "</td> <td>" + data.top_ads[ad] + "</td> <td> <div class=\"progress progress-sm\" title=\""+percentage.toFixed(1)+"% of " + data.dns_queries_today + "\"> <div class=\"progress-bar progress-bar-blue\" style=\"width: " + percentage + "%\"></div> </div> </td> </tr> ");
|
||||
adtable.append("<tr> <td>" + ad + "</td> <td>" + data.top_ads[ad] + "</td> <td> <div class=\"progress progress-sm\" title=\""+percentage.toFixed(1)+"% of " + sum + "\"> <div class=\"progress-bar progress-bar-blue\" style=\"width: " + percentage + "%\"></div> </div> </td> </tr> ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -143,8 +143,7 @@ function add(arg) {
|
||||
method: "post",
|
||||
data: {"domain":domain.val(), "list":locallistType, "token":token},
|
||||
success: function(response) {
|
||||
if (response.indexOf("not a valid argument") >= 0 ||
|
||||
response.indexOf("is not a valid domain") >= 0) {
|
||||
if (response.indexOf("] Pi-hole blocking is ") === -1) {
|
||||
alFailure.show();
|
||||
err.html(response);
|
||||
alFailure.delay(4000).fadeOut(2000, function() {
|
||||
|
||||
@@ -119,7 +119,7 @@ function check_csrf($token) {
|
||||
|
||||
function check_domain() {
|
||||
if(isset($_POST['domain'])){
|
||||
$domains = explode(" ",$_POST['domain']);
|
||||
$domains = preg_split('\s+', $_POST['domain']);
|
||||
foreach($domains as $domain)
|
||||
{
|
||||
$validDomain = is_valid_domain_name($domain);
|
||||
|
||||
@@ -420,10 +420,10 @@ if($auth) {
|
||||
</li>
|
||||
<li class="treeview<?php if($scriptname === "db_queries.php" || $scriptname === "db_lists.php" || $scriptname === "db_graph.php"){ ?> active<?php } ?>">
|
||||
<a href="#">
|
||||
<i class="fa fa-clock-o"></i> <span>Long term data</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-down pull-right" style="padding-right: 5px;"></i>
|
||||
</span>
|
||||
<i class="fa fa-clock-o"></i> <span>Long term data</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li<?php if($scriptname === "db_graph.php"){ ?> class="active"<?php } ?>>
|
||||
@@ -459,10 +459,10 @@ if($auth) {
|
||||
|
||||
<li id="pihole-disable" class="treeview"<?php if ($pistatus == "0") { ?> hidden="true"<?php } ?>>
|
||||
<a href="#">
|
||||
<i class="fa fa-stop"></i> <span>Disable</span> <span id="flip-status-disable"></span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-down pull-right" style="padding-right: 5px;"></i>
|
||||
</span>
|
||||
<i class="fa fa-stop"></i> <span>Disable</span> <span id="flip-status-disable"></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li>
|
||||
@@ -499,10 +499,10 @@ if($auth) {
|
||||
<!-- Tools -->
|
||||
<li class="treeview <?php if(in_array($scriptname, array("gravity.php", "queryads.php", "auditlog.php", "taillog.php", "taillog-FTL.php", "debug.php"))){ ?>active<?php } ?>">
|
||||
<a href="#">
|
||||
<i class="fa fa-folder"></i> <span>Tools</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-down pull-right" style="padding-right: 5px;"></i>
|
||||
</span>
|
||||
<i class="fa fa-folder"></i> <span>Tools</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<!-- Run gravity.sh -->
|
||||
|
||||
@@ -42,14 +42,14 @@ $FTL_current = exec("pihole-FTL version");
|
||||
$versionfile = "../versions";
|
||||
|
||||
$check_version = false;
|
||||
$date = date_create();
|
||||
$timestamp = date_timestamp_get($date);
|
||||
|
||||
// Check version if version buffer file does not exist
|
||||
if(is_readable($versionfile))
|
||||
{
|
||||
// Obtain latest time stamp from buffer file
|
||||
$versions = explode(",",file_get_contents($versionfile));
|
||||
$date = date_create();
|
||||
$timestamp = date_timestamp_get($date);
|
||||
|
||||
// Is last check for updates older than 30 minutes?
|
||||
if($timestamp >= intval($versions[0]) + 1800)
|
||||
|
||||
@@ -34,3 +34,9 @@ a.lookatme {
|
||||
-webkit-animation-iteration-count: infinite;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
#all-queries {
|
||||
table-layout: fixed;
|
||||
}
|
||||
#all-queries tbody {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user