mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
f204b71707
* Remove double click handler * ~Today~ Over Last 24 Hours * Rename Top Advertisers to Top Blocked Domains * percentage should be a float instead of an integer * Define $over_time as array. Fixes #501 * Add hover/hit radius for Forward Destinations over Time graph * Add custom callback for tooltips and disable legend for Forward Destinations over Time graph * Remove legend, add tooltips and increase hit/hover radius for Query Types over Time graph. Fixes #502 * Don't hide detailed graphs on small screens any longer * 🌮 is the new :shipit: squirrel * revise wording on main page shorter text to fit in one line on smaller screens * Show warning in browser when fopen() failed * open links in new tab * open links in new tab * Update header.php * select 'Login' in Navbar when showing loginpage using the same term as it is already used to show up the loginpage (in line 565) * set the mainbox wider on smaller screens solves issue of overlapping text with loginbutton when using smaller screens * also fix overlapping loginpage on footerbar * remove border on logo * add link feedback (on hover) * sessiontimer in bold letters * use AdminLTE function to toggle dropdown-menu AdminLTE has already an implemented function to toggle the user menu. So there is no need to use an own script in footer.js Benefit: The dropdown-menu closes if you click on a blank Place * align donate-url with url in footerbar * remove function to open user menu AdminLTE has already an implemented function to toggle the user menu. So there is no need to use an own script in footer.js Benefit: The dropdown-menu closes if you click on a blank Place * Update LICENSE of the project to EUPL v1.2 * Major overhaul of update checker - checks only every 30 minutes to reduce number of GitHub API requests * Add version info to dropdown menu (top right) for viewing on small screens. Addresses #333 partially * Fix typo * footer.php: improve and clean up move animation-stylesheet to pi-hole.css (Have you noticed that there is even a text- and text-shadow animation set, but for webkit-browsers only) added <!-- Version Infos --> correct continuous hide of version info (AdminLTEs classed widths as `xs` > `sm` > `md` > `lg`) display Donate-text alwas in one line (do not wrap in between when version info string gets very long) * pi-hole.css: pasted animation stylesheet and improved the text-shadow-animation to work correctly with and without -webkit-prefix (for me this wasn't working until now) * header.php: some corrections & improvements pull dropdown-menu always to right side changed <!-- Update alerts --> to <!-- Version Infos --> (just like it is in footer) hide version infos in dropdown-menu if it gets shown in footer repaired update-urls, they also should open up in new tab & gets underlined on hover `background:none` is needed because AdminLTE adds dark bg on hover to links when using it on smallscreen (xs) * Minor change to make the dashboard's javascript compatible with escaped characters (like apostrophe) in client names * Add the same for the top domains * ... and Top Ads * Minor change to comments * footer.php: edited as discussed * header.php: edited as discussed * Update queryads.js * Update list.js * queryads.js: codacy fixes * list.js: codacy fixes * list.js: small correction * queryads.js: small correction * Be able to interpret status 5 * Sort list entries (black-/whitelist) alphabetically before creating the table * queryads.js: Update* * removed double comment and updated code to center and separate the buttons on small screens, like in my last screenshot. * list.js: update* updated code to center and separate the buttons on small screens, like in my last screenshot.
226 lines
6.5 KiB
PHP
226 lines
6.5 KiB
PHP
<?php /*
|
|
* Pi-hole: A black hole for Internet advertisements
|
|
* (c) 2017 Pi-hole, LLC (https://pi-hole.net)
|
|
* 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. */
|
|
$indexpage = true;
|
|
require "scripts/pi-hole/php/header.php";
|
|
?>
|
|
<!-- Small boxes (Stat box) -->
|
|
<div class="row">
|
|
<div class="col-lg-3 col-xs-12">
|
|
<!-- small box -->
|
|
<div class="small-box bg-aqua">
|
|
<div class="inner">
|
|
<h3 class="statistic" id="ads_blocked_today">---</h3>
|
|
<p>Queries Blocked Last 24 Hours</p>
|
|
</div>
|
|
<div class="icon">
|
|
<i class="ion ion-android-hand"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ./col -->
|
|
<div class="col-lg-3 col-xs-12">
|
|
<!-- small box -->
|
|
<div class="small-box bg-green">
|
|
<div class="inner">
|
|
<h3 class="statistic" id="dns_queries_today">---</h3>
|
|
<p>Queries Last 24 Hours</p>
|
|
</div>
|
|
<div class="icon">
|
|
<i class="ion ion-earth"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ./col -->
|
|
<div class="col-lg-3 col-xs-12">
|
|
<!-- small box -->
|
|
<div class="small-box bg-yellow">
|
|
<div class="inner">
|
|
<h3 class="statistic" id="ads_percentage_today">---</h3>
|
|
<p>Queries Blocked Last 24 Hours</p>
|
|
</div>
|
|
<div class="icon">
|
|
<i class="ion ion-pie-graph"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ./col -->
|
|
<div class="col-lg-3 col-xs-12">
|
|
<!-- small box -->
|
|
<div class="small-box bg-red">
|
|
<div class="inner">
|
|
<h3 class="statistic" id="domains_being_blocked">---</h3>
|
|
<p>Domains on Blocklists</p>
|
|
</div>
|
|
<div class="icon">
|
|
<i class="ion ion-ios-list"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ./col -->
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="box" id="queries-over-time">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">Queries over last 24 hours</h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<div class="chart">
|
|
<canvas id="queryOverTimeChart" width="800" height="250"></canvas>
|
|
</div>
|
|
</div>
|
|
<div class="overlay">
|
|
<i class="fa fa-refresh fa-spin"></i>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
// If the user is logged in, then we show the more detailed index page.
|
|
// Even if we would include them here anyhow, there would be nothing to
|
|
// show since the API will respect the privacy of the user if he defines
|
|
// a password
|
|
if($auth){ ?>
|
|
<div class="row">
|
|
<div class="col-md-12 col-lg-6">
|
|
<div class="box" id="query-types">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">Query Types over Time</h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<div class="chart">
|
|
<canvas id="queryTypeChart" width="400" height="150"></canvas>
|
|
</div>
|
|
</div>
|
|
<div class="overlay">
|
|
<i class="fa fa-refresh fa-spin"></i>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12 col-lg-6">
|
|
<div class="box" id="forward-destinations">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">Forward Destinations over Time</h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<div class="chart">
|
|
<canvas id="forwardDestinationChart" width="400" height="150"></canvas>
|
|
</div>
|
|
</div>
|
|
<div class="overlay">
|
|
<i class="fa fa-refresh fa-spin"></i>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
if($boxedlayout)
|
|
{
|
|
$tablelayout = "col-md-6";
|
|
}
|
|
else
|
|
{
|
|
$tablelayout = "col-md-6 col-lg-4";
|
|
}
|
|
?>
|
|
<div class="row">
|
|
<div class="<?php echo $tablelayout; ?>">
|
|
<div class="box" id="domain-frequency">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">Top Domains</h3>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body">
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered">
|
|
<tbody>
|
|
<tr>
|
|
<th>Domain</th>
|
|
<th>Hits</th>
|
|
<th>Frequency</th>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="overlay">
|
|
<i class="fa fa-refresh fa-spin"></i>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
<!-- /.box -->
|
|
</div>
|
|
<!-- /.col -->
|
|
<div class="<?php echo $tablelayout; ?>">
|
|
<div class="box" id="ad-frequency">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">Top Blocked Domains</h3>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body">
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered">
|
|
<tbody>
|
|
<tr>
|
|
<th>Domain</th>
|
|
<th>Hits</th>
|
|
<th>Frequency</th>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="overlay">
|
|
<i class="fa fa-refresh fa-spin"></i>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
<!-- /.box -->
|
|
</div>
|
|
<!-- /.col -->
|
|
<div class="<?php echo $tablelayout; ?>">
|
|
<div class="box" id="client-frequency">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">Top Clients</h3>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body">
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered">
|
|
<tbody>
|
|
<tr>
|
|
<th>Client</th>
|
|
<th>Requests</th>
|
|
<th>Frequency</th>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="overlay">
|
|
<i class="fa fa-refresh fa-spin"></i>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
<!-- /.box -->
|
|
</div>
|
|
<!-- /.col -->
|
|
</div>
|
|
<!-- /.row -->
|
|
<?php } ?>
|
|
<?php
|
|
require "scripts/pi-hole/php/footer.php";
|
|
?>
|
|
|
|
<script src="scripts/pi-hole/js/index.js"></script>
|