mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
v5.18.1 (#2493)
This commit is contained in:
@@ -21,7 +21,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3.2.0
|
||||
uses: actions/checkout@v3.3.0
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout repository
|
||||
uses: actions/checkout@v3.2.0
|
||||
uses: actions/checkout@v3.3.0
|
||||
-
|
||||
name: Spell-Checking
|
||||
uses: codespell-project/actions-codespell@master
|
||||
|
||||
@@ -9,6 +9,6 @@ jobs:
|
||||
name: editorconfig-checker
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3.2.0
|
||||
- uses: actions/checkout@v3.3.0
|
||||
- uses: editorconfig-checker/action-editorconfig-checker@main
|
||||
- run: editorconfig-checker
|
||||
|
||||
@@ -18,4 +18,4 @@ jobs:
|
||||
dirtyLabel: "Merge Conflicts"
|
||||
repoToken: "${{ secrets.GITHUB_TOKEN }}"
|
||||
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
|
||||
commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."
|
||||
commentOnClean: "Conflicts have been resolved."
|
||||
|
||||
@@ -6,7 +6,7 @@ jobs:
|
||||
name: PHP-CS-Fixer
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3.2.0
|
||||
- uses: actions/checkout@v3.3.0
|
||||
- name: PHP-CS-Fixer
|
||||
uses: docker://oskarstark/php-cs-fixer-ga
|
||||
with:
|
||||
|
||||
@@ -8,7 +8,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3.2.0
|
||||
- uses: actions/checkout@v3.3.0
|
||||
|
||||
- name: Install composer
|
||||
uses: php-actions/composer@v6
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
issues: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v6.0.1
|
||||
- uses: actions/stale@v7.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 30
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
name: Syncing branches
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.2.0
|
||||
uses: actions/checkout@v3.3.0
|
||||
- name: Opening pull request
|
||||
run: gh pr create -B devel -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal'
|
||||
env:
|
||||
|
||||
@@ -19,10 +19,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3.2.0
|
||||
uses: actions/checkout@v3.3.0
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3.5.1
|
||||
uses: actions/setup-node@v3.6.0
|
||||
with:
|
||||
node-version: "16.x"
|
||||
cache: npm
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<script src="scripts/pi-hole/js/auditlog.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/auditlog.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/pi-hole/js/customcname.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/customcname.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
Generated
+15
-16
@@ -4,24 +4,24 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "ba7e1b2ae29157ca9224ed7c390d5b78",
|
||||
"content-hash": "6b761e5cfc801bc1942ad8d0d675ddb9",
|
||||
"packages": [
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "1.9.4",
|
||||
"version": "1.9.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "2a4847df6047b30af28854ed9dc95304cdb56ae5"
|
||||
"reference": "60f3d68481eef216199eae7a2603cd5fe124d464"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/d03bccee595e2146b7c9d174486b84f4dc61b0f2",
|
||||
"reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/60f3d68481eef216199eae7a2603cd5fe124d464",
|
||||
"reference": "60f3d68481eef216199eae7a2603cd5fe124d464",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1|^8.0"
|
||||
"php": "^7.2|^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpstan/phpstan-shim": "*"
|
||||
@@ -31,11 +31,6 @@
|
||||
"phpstan.phar"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "0.12-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
@@ -46,9 +41,13 @@
|
||||
"MIT"
|
||||
],
|
||||
"description": "PHPStan - PHP Static Analysis Tool",
|
||||
"keywords": [
|
||||
"dev",
|
||||
"static analysis"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||
"source": "https://github.com/phpstan/phpstan/tree/0.12.58"
|
||||
"source": "https://github.com/phpstan/phpstan/tree/1.9.11"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -56,15 +55,15 @@
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://www.patreon.com/phpstan",
|
||||
"type": "patreon"
|
||||
"url": "https://github.com/phpstan",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-11-29T13:32:03+00:00"
|
||||
"time": "2023-01-12T14:04:13+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
@@ -77,5 +76,5 @@
|
||||
"php": ">=5.4"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.0.0"
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
||||
|
||||
+2
-2
@@ -75,8 +75,8 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/vendor/daterangepicker.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/db_graph.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/daterangepicker.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/db_graph.js'); ?>"></script>
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
?>
|
||||
|
||||
+2
-2
@@ -145,8 +145,8 @@ if ($boxedlayout) {
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="scripts/vendor/daterangepicker.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/db_lists.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/daterangepicker.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/db_lists.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
+3
-3
@@ -207,9 +207,9 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
<script src="scripts/pi-hole/js/ip-address-sorting.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/daterangepicker.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/db_queries.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/ip-address-sorting.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/daterangepicker.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/db_queries.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
@@ -36,7 +36,7 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
<button type="button" id="debugBtn" class="btn btn-lg btn-primary btn-block">Generate debug log</button>
|
||||
<pre id="output" style="width: 100%; height: 100%;" hidden></pre>
|
||||
|
||||
<script src="scripts/pi-hole/js/debug.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/debug.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
+2
-2
@@ -83,8 +83,8 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/pi-hole/js/ip-address-sorting.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/customdns.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/ip-address-sorting.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/customdns.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
<button type="button" id="gravityBtn" class="btn btn-lg btn-primary btn-block">Update</button>
|
||||
<pre id="output" style="width: 100%; height: 100%;" hidden></pre>
|
||||
|
||||
<script src="scripts/pi-hole/js/gravity.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/gravity.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
+3
-3
@@ -83,9 +83,9 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/vendor/bootstrap-select.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/bootstrap-toggle.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/groups-adlists.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/bootstrap-select.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/bootstrap-toggle.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/groups-adlists.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
+4
-4
@@ -91,10 +91,10 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/vendor/bootstrap-select.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/bootstrap-toggle.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/ip-address-sorting.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/groups-clients.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/bootstrap-select.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/bootstrap-toggle.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/ip-address-sorting.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/groups-clients.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
+3
-3
@@ -148,9 +148,9 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/vendor/bootstrap-select.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/bootstrap-toggle.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/groups-domains.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/bootstrap-select.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/bootstrap-toggle.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/groups-domains.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
+3
-3
@@ -80,9 +80,9 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/vendor/bootstrap-select.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/bootstrap-toggle.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/groups.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/bootstrap-select.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/bootstrap-toggle.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/groups.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
@@ -286,7 +286,7 @@ require_once 'scripts/pi-hole/php/gravity.php';
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<script src="scripts/pi-hole/js/index.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/index.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
@@ -42,6 +42,8 @@ require 'scripts/pi-hole/php/header.php';
|
||||
<form action="" id="loginform" method="post">
|
||||
<div class="form-group login-options has-feedback<?php if ($wrongpassword) { ?> has-error<?php } ?>">
|
||||
<div class="pwd-field">
|
||||
<!-- hidden username input field to help password managers to autfill the password -->
|
||||
<input type="text" id="username" value="pi.hole" autocomplete="username" hidden>
|
||||
<input type="password" id="loginpw" name="pw" class="form-control" placeholder="Password" spellcheck="false" autocomplete="current-password" autofocus>
|
||||
<span class="fa fa-key form-control-feedback"></span>
|
||||
</div>
|
||||
@@ -93,6 +95,6 @@ require 'scripts/pi-hole/php/header.php';
|
||||
<strong><a href="https://pi-hole.net/donate/" rel="noopener" target="_blank"><i class="fa fa-heart text-red"></i> Donate</a></strong> if you found this useful.
|
||||
</div>
|
||||
</div>
|
||||
<script src="scripts/pi-hole/js/footer.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/footer.js'); ?>"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/pi-hole/js/messages.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/messages.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
+2
-2
@@ -66,8 +66,8 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
|
||||
<script src="scripts/pi-hole/js/ip-address-sorting.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/network.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/ip-address-sorting.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/network.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
Generated
+4357
-1922
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -26,9 +26,9 @@
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.4.13",
|
||||
"eslint-plugin-compat": "^4.0.2",
|
||||
"postcss": "^8.4.20",
|
||||
"postcss": "^8.4.21",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"prettier": "2.8.1",
|
||||
"prettier": "2.8.3",
|
||||
"xo": "^0.53.1"
|
||||
},
|
||||
"browserslist": [
|
||||
|
||||
+2
-2
@@ -151,8 +151,8 @@ if (strlen($showing) > 0) {
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
<script src="scripts/pi-hole/js/ip-address-sorting.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/queries.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/ip-address-sorting.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/queries.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
+8
-2
@@ -17,7 +17,7 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<div class="box-header">
|
||||
<!-- domain-search-block - Single search field mobile/desktop -->
|
||||
<div id="domain-search-block" class="input-group">
|
||||
<input id="domain" type="url" class="form-control" placeholder="Domain to look for (example.com or sub.example.com)" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off">
|
||||
@@ -27,7 +27,13 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
<button type="button" id="btnSearchExact" class="btn btn-default">Search exact match</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<!-- /domain-search-block -->
|
||||
<div id="limitbox-block">
|
||||
<input type="checkbox" id="show-all">
|
||||
<label for="show-all"><strong>Show unlimited results.</strong> <br class="hidden-md hidden-lg">This can be very slow if too many domains are returned. <span class="text-red">Use with caution</span>.</label></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,7 +41,7 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
|
||||
<pre id="output" style="width: 100%; height: 100%;" hidden></pre>
|
||||
|
||||
<script src="scripts/pi-hole/js/queryads.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/queryads.js'); ?>"></script>
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
?>
|
||||
|
||||
@@ -6,56 +6,39 @@
|
||||
* Please see LICENSE file for your rights under this license. */
|
||||
|
||||
var exact = "";
|
||||
|
||||
function quietfilter(ta, data) {
|
||||
var lines = data.split("\n");
|
||||
for (var i = 0; i < lines.length; i++) {
|
||||
if (lines[i].indexOf("results") !== -1 && lines[i].indexOf("0 results") === -1) {
|
||||
var shortstring = lines[i].replace("::: /etc/pihole/", "");
|
||||
// Remove "(x results)"
|
||||
shortstring = shortstring.replace(/\(.*/, "");
|
||||
ta.append(shortstring + "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
var showAll = "";
|
||||
|
||||
function eventsource() {
|
||||
var ta = $("#output");
|
||||
// process with the current visible domain input field
|
||||
var domain = $("input[id^='domain']:visible").val().trim();
|
||||
var q = $("#quiet");
|
||||
var domain = $("input[id^='domain']:visible").val().trim().toLowerCase();
|
||||
var unlimited = $("#show-all").is(":checked");
|
||||
|
||||
if (domain.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var quiet = false;
|
||||
if (q.val() === "yes") {
|
||||
quiet = true;
|
||||
exact = "exact";
|
||||
if (unlimited === true) {
|
||||
showAll = "&showall";
|
||||
}
|
||||
|
||||
var queryURL = "scripts/pi-hole/php/queryads.php?domain=" + domain + exact + showAll;
|
||||
|
||||
// IE does not support EventSource - load whole content at once
|
||||
if (typeof EventSource !== "function") {
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: "scripts/pi-hole/php/queryads.php?domain=" + domain.toLowerCase() + "&" + exact + "&IE",
|
||||
url: queryURL + "&IE",
|
||||
async: false,
|
||||
}).done(function (data) {
|
||||
ta.show();
|
||||
ta.empty();
|
||||
if (!quiet) {
|
||||
ta.append(data);
|
||||
} else {
|
||||
quietfilter(ta, data);
|
||||
}
|
||||
ta.append(data);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var source = new EventSource(
|
||||
"scripts/pi-hole/php/queryads.php?domain=" + domain.toLowerCase() + "&" + exact
|
||||
);
|
||||
var source = new EventSource(queryURL);
|
||||
|
||||
// Reset and show field
|
||||
ta.empty();
|
||||
@@ -64,11 +47,7 @@ function eventsource() {
|
||||
source.addEventListener(
|
||||
"message",
|
||||
function (e) {
|
||||
if (!quiet) {
|
||||
ta.append(e.data);
|
||||
} else {
|
||||
quietfilter(ta, e.data);
|
||||
}
|
||||
ta.append(e.data);
|
||||
},
|
||||
false
|
||||
);
|
||||
@@ -82,8 +61,9 @@ function eventsource() {
|
||||
false
|
||||
);
|
||||
|
||||
// Reset exact variable
|
||||
// Reset option variables
|
||||
exact = "";
|
||||
showAll = "";
|
||||
}
|
||||
|
||||
// Handle enter key
|
||||
@@ -100,7 +80,7 @@ $("button[id^='btnSearch']").on("click", function () {
|
||||
exact = "";
|
||||
|
||||
if (this.id.match("^btnSearchExact")) {
|
||||
exact = "exact";
|
||||
exact = "&exact";
|
||||
}
|
||||
|
||||
eventsource();
|
||||
|
||||
@@ -102,6 +102,6 @@ if (isset($core_commit) || isset($web_commit) || isset($FTL_commit)) {
|
||||
|
||||
</div>
|
||||
<!-- ./wrapper -->
|
||||
<script src="scripts/pi-hole/js/footer.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/footer.js'); ?>"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -111,6 +111,19 @@ function checkfile($filename)
|
||||
return '/dev/null';
|
||||
}
|
||||
|
||||
// Avoid browser caching old versions of a file, using the last modification time
|
||||
// Receive the file URL (without "/admin/");
|
||||
// Return the string containin URL + "?v=xxx", where xxx is the last modified time of the file.
|
||||
function fileversion($url)
|
||||
{
|
||||
$filename = $_SERVER['DOCUMENT_ROOT'].'/admin/'.$url;
|
||||
if (file_exists($filename)) {
|
||||
$ver = filemtime($filename);
|
||||
}
|
||||
|
||||
return $url.'?v='.$ver;
|
||||
}
|
||||
|
||||
// Credit: http://php.net/manual/en/function.hash-equals.php#119576
|
||||
if (!function_exists('hash_equals')) {
|
||||
function hash_equals($known_string, $user_string)
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<?php
|
||||
$scriptname = basename($_SERVER['SCRIPT_FILENAME']);
|
||||
$hostname = gethostname() ? gethostname() : '';
|
||||
|
||||
// Create cache busting version
|
||||
$cacheVer = filemtime(__FILE__);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
@@ -53,49 +50,49 @@ $cacheVer = filemtime(__FILE__);
|
||||
|
||||
<!-- Theme fonts -->
|
||||
<?php if ($theme == 'lcars') { ?>
|
||||
<link rel="stylesheet" href="style/vendor/fonts/ubuntu-mono/ubuntu-mono.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="style/vendor/fonts/antonio/antonio.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/vendor/fonts/ubuntu-mono/ubuntu-mono.css'); ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/vendor/fonts/antonio/antonio.css'); ?>">
|
||||
<?php } else { ?>
|
||||
<link rel="stylesheet" href="style/vendor/SourceSansPro/SourceSansPro.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/vendor/SourceSansPro/SourceSansPro.css'); ?>">
|
||||
<?php } ?>
|
||||
|
||||
<!-- Common styles -->
|
||||
<link rel="stylesheet" href="style/vendor/bootstrap/css/bootstrap.min.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/vendor/bootstrap/css/bootstrap.min.css'); ?>">
|
||||
<?php if ($auth) { ?>
|
||||
<link rel="stylesheet" href="style/vendor/datatables.min.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="style/vendor/datatables_extensions.min.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="style/vendor/daterangepicker.min.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/vendor/datatables.min.css'); ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/vendor/datatables_extensions.min.css'); ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/vendor/daterangepicker.min.css'); ?>">
|
||||
<?php } ?>
|
||||
<link rel="stylesheet" href="style/vendor/AdminLTE.min.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="style/vendor/select2.min.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/vendor/AdminLTE.min.css'); ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/vendor/select2.min.css'); ?>">
|
||||
|
||||
<?php if (in_array($scriptname, array('groups.php', 'groups-adlists.php', 'groups-clients.php', 'groups-domains.php'))) { ?>
|
||||
<!-- Group management styles -->
|
||||
<link rel="stylesheet" href="style/vendor/animate.min.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="style/vendor/bootstrap-select.min.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="style/vendor/bootstrap-toggle.min.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/vendor/animate.min.css'); ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/vendor/bootstrap-select.min.css'); ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/vendor/bootstrap-toggle.min.css'); ?>">
|
||||
<?php } ?>
|
||||
|
||||
<!-- Theme styles -->
|
||||
<link rel="stylesheet" href="style/pi-hole.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="style/themes/<?php echo $theme; ?>.css?v=<?php echo $cacheVer; ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/pi-hole.css'); ?>">
|
||||
<link rel="stylesheet" href="<?php echo fileversion('style/themes/'.$theme.'.css'); ?>">
|
||||
|
||||
<noscript><link rel="stylesheet" href="style/vendor/js-warn.css?v=<?php echo $cacheVer; ?>"></noscript>
|
||||
<noscript><link rel="stylesheet" href="<?php echo fileversion('style/vendor/js-warn.css'); ?>"></noscript>
|
||||
|
||||
<!-- scripts -->
|
||||
<script src="scripts/vendor/jquery.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="style/vendor/bootstrap/js/bootstrap.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/adminlte.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/bootstrap-notify.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/jquery.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('style/vendor/bootstrap/js/bootstrap.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/adminlte.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/bootstrap-notify.min.js'); ?>"></script>
|
||||
<?php if ($auth) { ?>
|
||||
<script src="scripts/vendor/select2.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/datatables.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/datatables.select.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/datatables.buttons.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/moment.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/chart.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/vendor/chartjs-adapter-moment.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/select2.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/datatables.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/datatables.select.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/datatables.buttons.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/moment.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/chart.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/chartjs-adapter-moment.js'); ?>"></script>
|
||||
<?php } ?>
|
||||
<script src="style/vendor/font-awesome/js/all.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/utils.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('style/vendor/font-awesome/js/all.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/utils.js'); ?>"></script>
|
||||
</head>
|
||||
|
||||
@@ -22,13 +22,18 @@ ob_implicit_flush(true);
|
||||
header('Content-Type: text/event-stream');
|
||||
header('Cache-Control: no-cache');
|
||||
|
||||
function echoEvent($datatext)
|
||||
function echoEvent($datatext, $url = '')
|
||||
{
|
||||
if (!isset($_GET['IE'])) {
|
||||
echo 'data:'.implode("\ndata:", explode("\n", $datatext))."\n\n";
|
||||
$txt = 'data:'.implode("\ndata:", explode("\n", $datatext))."\n\n";
|
||||
} else {
|
||||
echo $datatext;
|
||||
$txt = $datatext;
|
||||
}
|
||||
|
||||
$txt = str_replace('This can be overridden using the -all option', 'Select the checkbox to remove the limitation', $txt);
|
||||
$txt = str_replace($url, '<strong class="text-blue">'.$url.'</strong>', $txt);
|
||||
|
||||
echo $txt;
|
||||
}
|
||||
|
||||
// Test if domain is set
|
||||
@@ -37,7 +42,7 @@ if (isset($_GET['domain'])) {
|
||||
// Convert domain name to IDNA ASCII form for international domains
|
||||
$url = convertUnicodeToIDNA($_GET['domain']);
|
||||
if (!validDomain($url)) {
|
||||
echoEvent(htmlentities($url).' is an invalid domain!');
|
||||
echoEvent(htmlentities($url).' is an invalid domain!', $url);
|
||||
|
||||
exit;
|
||||
}
|
||||
@@ -47,15 +52,16 @@ if (isset($_GET['domain'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$options = '';
|
||||
if (isset($_GET['exact'])) {
|
||||
$exact = '-exact';
|
||||
} elseif (isset($_GET['bp'])) {
|
||||
$exact = '-bp';
|
||||
} else {
|
||||
$exact = '';
|
||||
$options .= ' -exact';
|
||||
}
|
||||
|
||||
$proc = popen('sudo pihole -q -adlist '.$url.' '.$exact, 'r');
|
||||
while (!feof($proc)) {
|
||||
echoEvent(fread($proc, 4096));
|
||||
if (isset($_GET['showall'])) {
|
||||
$options .= ' -all';
|
||||
}
|
||||
|
||||
$proc = popen('sudo pihole -q '.$url.$options, 'r');
|
||||
while (!feof($proc)) {
|
||||
echoEvent(fread($proc, 4096), $url);
|
||||
}
|
||||
|
||||
+2
-2
@@ -1462,8 +1462,8 @@ if (isset($piholeFTLConf['RATE_LIMIT'])) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/vendor/jquery.confirm.min.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="scripts/pi-hole/js/settings.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/vendor/jquery.confirm.min.js'); ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/settings.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
+2
-3
@@ -530,11 +530,10 @@ td.details-control {
|
||||
margin: 5px 0;
|
||||
}
|
||||
#domain-search-block .input-group-btn {
|
||||
margin: 5px 0;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
#domain-search-block .input-group-btn button {
|
||||
margin: 0 2px;
|
||||
margin: 0 5px 0 0;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,6 +504,16 @@ div.dataTables_wrapper div.dataTables_length select {
|
||||
color: #bec5cb;
|
||||
border: 1px solid #3d444b;
|
||||
}
|
||||
|
||||
/*** Overwrite chrome's input field auto-filling ***/
|
||||
input:-webkit-autofill,
|
||||
input:-webkit-autofill:focus,
|
||||
textarea:-webkit-autofill,
|
||||
select:-webkit-autofill {
|
||||
-webkit-text-fill-color: #bec5cb !important;
|
||||
-webkit-box-shadow: 0 0 0px 1000px #353c42 inset;
|
||||
transition: background-color 1s ease-in-out 0s;
|
||||
}
|
||||
.form-control[disabled],
|
||||
.form-control[readonly],
|
||||
fieldset[disabled] .form-control {
|
||||
|
||||
@@ -56,11 +56,15 @@ table {
|
||||
color: #b2aba1;
|
||||
opacity: 0.5 !important;
|
||||
}
|
||||
|
||||
/*** Overwrite chrome's input field auto-filling ***/
|
||||
input:-webkit-autofill,
|
||||
input:-webkit-autofill:focus,
|
||||
textarea:-webkit-autofill,
|
||||
select:-webkit-autofill {
|
||||
background-color: #555b00 !important;
|
||||
color: #e8e6e3 !important;
|
||||
-webkit-text-fill-color: #b2aba1 !important;
|
||||
-webkit-box-shadow: 0 0 0px 1000px #181a1b inset;
|
||||
transition: background-color 1s ease-in-out 0s;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
background-color: #202324;
|
||||
|
||||
@@ -291,3 +291,13 @@ td.highlight {
|
||||
border-color: #337ab7;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/*** Overwrite chrome's input field auto-filling ***/
|
||||
input:-webkit-autofill,
|
||||
input:-webkit-autofill:focus,
|
||||
textarea:-webkit-autofill,
|
||||
select:-webkit-autofill {
|
||||
-webkit-text-fill-color: #666 !important;
|
||||
-webkit-box-shadow: 0 0 0px 1000px #fff inset;
|
||||
transition: background-color 1s ease-in-out 0s;
|
||||
}
|
||||
|
||||
+40
-1
@@ -285,6 +285,16 @@ div.dataTables_wrapper div.dataTables_length select {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/*** Overwrite chrome's input field auto-filling ***/
|
||||
input:-webkit-autofill,
|
||||
input:-webkit-autofill:focus,
|
||||
textarea:-webkit-autofill,
|
||||
select:-webkit-autofill {
|
||||
-webkit-text-fill-color: #fff !important;
|
||||
-webkit-box-shadow: 0 0 0px 1000px #000 inset;
|
||||
transition: background-color 1s ease-in-out 0s;
|
||||
}
|
||||
|
||||
input.form-control,
|
||||
textarea.form-control {
|
||||
border-radius: 8px;
|
||||
@@ -504,7 +514,36 @@ p.login-box-msg,
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
z-index: 1050;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder:active,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder:focus {
|
||||
color: #6c7c8c;
|
||||
}
|
||||
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder:hover {
|
||||
color: #456;
|
||||
}
|
||||
|
||||
.bootstrap-select.bs-container .dropdown-menu {
|
||||
border-radius: 12px;
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
.bootstrap-select.bs-container .dropdown-menu.open {
|
||||
filter: invert(0.88) hue-rotate(180deg);
|
||||
}
|
||||
|
||||
/*** Set .dropdown-toggle width to fill the whole table cell ***/
|
||||
@media screen and (min-width: 661px) and (max-width: 767px), screen and (min-width: 960px) {
|
||||
.bootstrap-select.fit-width {
|
||||
width: 100% !important;
|
||||
}
|
||||
.bootstrap-select .dropdown-toggle .filter-option {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.main-header li.user-header {
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
<label for="chk2">Automatic scrolling on update</label>
|
||||
</div>
|
||||
|
||||
<script src="scripts/pi-hole/js/taillog-FTL.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/taillog-FTL.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ require 'scripts/pi-hole/php/header_authenticated.php';
|
||||
<label for="chk2">Automatic scrolling on update</label>
|
||||
</div>
|
||||
|
||||
<script src="scripts/pi-hole/js/taillog.js?v=<?php echo $cacheVer; ?>"></script>
|
||||
<script src="<?php echo fileversion('scripts/pi-hole/js/taillog.js'); ?>"></script>
|
||||
|
||||
<?php
|
||||
require 'scripts/pi-hole/php/footer.php';
|
||||
|
||||
Reference in New Issue
Block a user