Skip to content

Commit

Permalink
Merge branch 'devel' into feat/avoid-window-open
Browse files Browse the repository at this point in the history
  • Loading branch information
DL6ER authored Dec 21, 2021
2 parents 5923ac1 + 2f52ab3 commit fc1b2c5
Show file tree
Hide file tree
Showing 17 changed files with 267 additions and 174 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Change PHP version
run: |
sudo update-alternatives --set php /usr/bin/php8.0
sudo update-alternatives --set phar /usr/bin/phar8.0
sudo update-alternatives --set phpdbg /usr/bin/phpdbg8.0
sudo update-alternatives --set php-cgi /usr/bin/php-cgi8.0
sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.0
php -version
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
Expand Down
20 changes: 12 additions & 8 deletions auditlog.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
<div class="box-body">
<div class="table-responsive">
<table class="table table-bordered">
<tbody>
<thead>
<tr>
<th>Domain</th>
<th>Hits</th>
<th>Actions</th>
<th>Domain</th>
<th>Hits</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
Expand All @@ -51,12 +53,14 @@
<div class="box-body">
<div class="table-responsive">
<table class="table table-bordered">
<tbody>
<thead>
<tr>
<th>Domain</th>
<th>Hits</th>
<th>Actions</th>
<th>Domain</th>
<th>Hits</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
Expand Down
2 changes: 2 additions & 0 deletions db_graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
require "scripts/pi-hole/php/header.php";
?>
<!-- Sourceing CSS colors from stylesheet to be used in JS code -->
<span class="queries-permitted"></span>
<span class="queries-blocked"></span>
<span class="graphs-grid"></span>
<span class="graphs-ticks"></span>

Expand Down
30 changes: 18 additions & 12 deletions db_lists.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,14 @@
<div class="box-body">
<div class="table-responsive">
<table class="table table-bordered">
<tbody>
<thead>
<tr>
<th>Domain</th>
<th>Hits</th>
<th>Frequency</th>
<th>Domain</th>
<th>Hits</th>
<th>Frequency</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
Expand All @@ -92,12 +94,14 @@
<div class="box-body">
<div class="table-responsive">
<table class="table table-bordered">
<tbody>
<thead>
<tr>
<th>Domain</th>
<th>Hits</th>
<th>Frequency</th>
<th>Domain</th>
<th>Hits</th>
<th>Frequency</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
Expand All @@ -119,12 +123,14 @@
<div class="box-body">
<div class="table-responsive">
<table class="table table-bordered">
<tbody>
<thead>
<tr>
<th>Client</th>
<th>Requests</th>
<th>Frequency</th>
<th>Client</th>
<th>Requests</th>
<th>Frequency</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
Expand Down
40 changes: 24 additions & 16 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,14 @@ function getinterval()
<div class="box-body">
<div class="table-responsive">
<table class="table table-bordered">
<tbody>
<thead>
<tr>
<th>Domain</th>
<th>Hits</th>
<th>Frequency</th>
<th>Domain</th>
<th>Hits</th>
<th>Frequency</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
Expand All @@ -215,12 +217,14 @@ function getinterval()
<div class="box-body">
<div class="table-responsive">
<table class="table table-bordered">
<tbody>
<thead>
<tr>
<th>Domain</th>
<th>Hits</th>
<th>Frequency</th>
<th>Domain</th>
<th>Hits</th>
<th>Frequency</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
Expand All @@ -244,12 +248,14 @@ function getinterval()
<div class="box-body">
<div class="table-responsive">
<table class="table table-bordered">
<tbody>
<thead>
<tr>
<th>Client</th>
<th>Requests</th>
<th>Frequency</th>
<th>Client</th>
<th>Requests</th>
<th>Frequency</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
Expand All @@ -272,12 +278,14 @@ function getinterval()
<div class="box-body">
<div class="table-responsive">
<table class="table table-bordered">
<tbody>
<thead>
<tr>
<th>Client</th>
<th>Requests</th>
<th>Frequency</th>
<th>Client</th>
<th>Requests</th>
<th>Frequency</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
Expand Down
60 changes: 36 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"autoprefixer": "^10.4.0",
"eslint-plugin-compat": "^4.0.0",
"postcss": "^8.3.11",
"postcss-cli": "^9.0.2",
"postcss-cli": "^9.1.0",
"prettier": "2.5.0",
"xo": "^0.46.4"
},
Expand Down
4 changes: 2 additions & 2 deletions scripts/pi-hole/js/db_graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ function updateQueriesOverTime() {

$(function () {
var ctx = document.getElementById("queryOverTimeChart").getContext("2d");
var blockedColor = "#999";
var permittedColor = "#00a65a";
var blockedColor = $(".queries-blocked").css("background-color");
var permittedColor = $(".queries-permitted").css("background-color");
var gridColor = $(".graphs-grid").css("background-color");
var ticksColor = $(".graphs-ticks").css("color");

Expand Down
48 changes: 15 additions & 33 deletions scripts/pi-hole/js/db_lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,11 @@ function updateTopClientsChart() {

percentage = (data.top_sources[client] / sum) * 100;
clienttable.append(
"<tr> <td>" +
clientname +
"</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> '
"<tr> " +
utils.addTD(clientname) +
utils.addTD(data.top_sources[client]) +
utils.addTD(utils.colorBar(percentage, sum, "progress-bar-blue")) +
"</tr> "
);
}
}
Expand Down Expand Up @@ -132,17 +126,11 @@ function updateTopDomainsChart() {

percentage = (data.top_domains[domain] / sum) * 100;
domaintable.append(
"<tr> <td>" +
domain +
"</td> <td>" +
data.top_domains[domain] +
'</td> <td> <div class="progress progress-sm" title="' +
percentage.toFixed(1) +
"% of " +
sum +
'"> <div class="progress-bar queries-permitted" style="width: ' +
percentage +
'%"></div> </div> </td> </tr> '
"<tr> " +
utils.addTD(domain) +
utils.addTD(data.top_domains[domain]) +
utils.addTD(utils.colorBar(percentage, sum, "queries-permitted")) +
"</tr> "
);
}
}
Expand Down Expand Up @@ -179,17 +167,11 @@ function updateTopAdsChart() {

percentage = (data.top_ads[ad] / sum) * 100;
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 queries-blocked" style="width: ' +
percentage +
'%"></div> </div> </td> </tr> '
"<tr> " +
utils.addTD(ad) +
utils.addTD(data.top_ads[ad]) +
utils.addTD(utils.colorBar(percentage, sum, "queries-blocked")) +
"</tr> "
);
}
}
Expand Down
Loading

0 comments on commit fc1b2c5

Please sign in to comment.