mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
Move all files from /scripts/pi-hole/ to /scripts/
Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
73
scripts/lua/footer.lp
Normal file
73
scripts/lua/footer.lp
Normal file
@@ -0,0 +1,73 @@
|
||||
<? --[[
|
||||
* 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.
|
||||
* ]]--
|
||||
|
||||
-- Iterate over the array mg.request_info.http_headers and check if there is an 'X-Forwarded-For' header
|
||||
x_forwarded_for = ""
|
||||
for k,v in pairs(mg.request_info.http_headers) do
|
||||
if k:lower() == "x-forwarded-for" then
|
||||
x_forwarded_for = mg.base64_encode(v)
|
||||
break
|
||||
end
|
||||
end
|
||||
?>
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- Modal for custom disable time -->
|
||||
<div class="modal fade" id="customDisableModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
||||
<div class="modal-dialog modal-sm" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">Custom disable timeout</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="input-group">
|
||||
<input id="customTimeout" class="form-control" type="number" value="60">
|
||||
<div class="input-group-btn" data-toggle="buttons">
|
||||
<label class="btn btn-default">
|
||||
<input id="selSec" type="radio"> Secs
|
||||
</label>
|
||||
<label id="btnMins" class="btn btn-default active">
|
||||
<input id="selMin" type="radio"> Mins
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" id="pihole-disable-custom" class="btn btn-primary" data-dismiss="modal">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /.content-wrapper -->
|
||||
|
||||
<footer class="main-footer">
|
||||
<div class="row row-centered text-center">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<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>
|
||||
|
||||
<div class="row row-centered text-center version-info">
|
||||
<div class="col-xs-12 col-sm-12 col-md-10">
|
||||
<ul class="list-inline" id="versions"></ul>
|
||||
<p style="margin: 15px 0 0;" id="update-hint"></p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
<!-- ./wrapper -->
|
||||
<script src="<?=pihole.fileversion('scripts/js/footer.js')?>"></script>
|
||||
|
||||
<div id="advanced-info-data" style="display: none;" data-starttime="<?=starttime?>" data-endtime="<?=mg.time(true)?>" data-client-ip="<?=mg.request_info.remote_addr?>" data-tls="<?=tostring(is_secure)?>" data-xff="<?=x_forwarded_for?>"></div>
|
||||
</body>
|
||||
</html>
|
||||
125
scripts/lua/header.lp
Normal file
125
scripts/lua/header.lp
Normal file
@@ -0,0 +1,125 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
* 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.
|
||||
-->
|
||||
<?
|
||||
starttime = mg.time(true)
|
||||
hostname = pihole.hostname()
|
||||
webhome = pihole.webhome()
|
||||
|
||||
-- Get name of script by matching whatever is after the last "/" in the URI
|
||||
scriptname = mg.request_info.request_uri:match(webhome.."(.*)$")
|
||||
-- Fall back to "index.lp" if no match is found (e.g. when accessing the root)
|
||||
if scriptname == nil or string.len(scriptname) == 0 then scriptname = "index.lp" end
|
||||
|
||||
-- Boolean check if string starts with a given prefix
|
||||
function startsWith(text, prefix)
|
||||
return text:find(prefix, 1, true) == 1
|
||||
end
|
||||
|
||||
-- Function returning GET parameter value (or nil if not set)
|
||||
function GET(name)
|
||||
return mg.request_info.query_string:match(name.."=([^&]*)")
|
||||
-- mg.get_var(mg.request_info.query_string, "REQUEST_URI")
|
||||
end
|
||||
|
||||
-- Function checking if val is in tab
|
||||
function in_array (val, tab)
|
||||
for index, value in ipairs(tab) do
|
||||
if value == val then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
-- Connection is considered secure if running natively on HTTPS
|
||||
is_secure = mg.request_info.https
|
||||
|
||||
-- Variable to check if user is already authenticated
|
||||
is_authenticated = mg.request_info.is_authenticated
|
||||
|
||||
?>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- Usually browsers proactively perform domain name resolution on links that the user may choose to follow. We disable DNS prefetching here -->
|
||||
<meta http-equiv="x-dns-prefetch-control" content="off">
|
||||
<meta http-equiv="cache-control" content="max-age=60,private">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>Pi-hole <?=hostname?></title>
|
||||
|
||||
<meta name="csrf-token" content="<?=mg.request_info.csrf_token?>">
|
||||
|
||||
<link rel="apple-touch-icon" href="<?=pihole.webhome()?>img/favicons/apple-touch-icon.png" sizes="180x180">
|
||||
<link rel="icon" href="<?=pihole.webhome()?>img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
|
||||
<link rel="icon" href="<?=pihole.webhome()?>img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
|
||||
<link rel="manifest" href="<?=pihole.webhome()?>img/favicons/manifest.json">
|
||||
<? theme = pihole.webtheme() ?>
|
||||
<link rel="mask-icon" href="<?=pihole.webhome()?>img/favicons/safari-pinned-tab.svg" color="<?=theme.color?>">
|
||||
<link rel="shortcut icon" href="<?=pihole.webhome()?>img/favicons/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="<?=theme.color?>">
|
||||
<meta name="msapplication-TileImage" content="<?=pihole.webhome()?>img/favicons/mstile-150x150.png">
|
||||
|
||||
<!-- Theme styles -->
|
||||
<meta name="theme-color" content="<?=theme.color?>">
|
||||
|
||||
<? if theme.dark then ?>
|
||||
<style>
|
||||
html { background-color: #000; }
|
||||
</style>
|
||||
<? end ?>
|
||||
<script src="<?=pihole.fileversion('vendor/nprogress/nprogress.min.js')?>"></script>
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/nprogress/nprogress.min.css')?>">
|
||||
|
||||
<!-- Theme fonts -->
|
||||
<? if theme.name == 'lcars' then ?>
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/fonts/ubuntu-mono/ubuntu-mono.css')?>">
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/fonts/antonio/antonio.css')?>">
|
||||
<? else ?>
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/fonts/SourceSansPro/SourceSansPro.css')?>">
|
||||
<? end ?>
|
||||
|
||||
<!-- Common styles -->
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/bootstrap/css/bootstrap.min.css')?>">
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/animate/animate.min.css')?>">
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/bstreeview/bstreeview.min.css')?>">
|
||||
<?
|
||||
if startsWith(scriptname, 'groups') then
|
||||
-- Group management styles
|
||||
?>
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/bootstrap-select/bootstrap-select.min.css')?>">
|
||||
<? end ?>
|
||||
<? if is_authenticated then ?>
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/datatables/datatables.min.css')?>">
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/datatables-buttons/datatables.buttons.min.css')?>">
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/datatables-select/datatables.select.min.css')?>">
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/daterangepicker/daterangepicker.min.css')?>">
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/bootstrap-toggle/bootstrap-toggle.min.css')?>">
|
||||
<? end ?>
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/select2/select2.min.css')?>">
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/adminLTE/AdminLTE.min.css')?>">
|
||||
|
||||
<!-- Theme styles -->
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('style/pi-hole.css')?>">
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('style/themes/'..theme.name..'.css')?>">
|
||||
|
||||
<noscript><link rel="stylesheet" href="<?=pihole.fileversion('vendor/js-warn/js-warn.css')?>"></noscript>
|
||||
|
||||
<!-- scripts -->
|
||||
<script src="<?=pihole.fileversion('vendor/jquery/jquery.min.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/bootstrap/js/bootstrap.min.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/adminLTE/adminlte.min.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/bootstrap-notify/bootstrap-notify.min.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/font-awesome/font-awesome.min.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('scripts/js/utils.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/waitMe/waitMe.min.js')?>"></script>
|
||||
<link rel="stylesheet" href="<?=pihole.fileversion('vendor/waitMe/waitMe.min.css')?>">
|
||||
103
scripts/lua/header_authenticated.lp
Normal file
103
scripts/lua/header_authenticated.lp
Normal file
@@ -0,0 +1,103 @@
|
||||
<?
|
||||
--[[
|
||||
* 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.
|
||||
]]--
|
||||
mg.include('header.lp','r')
|
||||
?>
|
||||
<script src="<?=pihole.fileversion('scripts/js/logout.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/select2/select2.min.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/datatables/datatables.min.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/datatables-select/datatables.select.min.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/datatables-buttons/datatables.buttons.min.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/chartjs/chart.umd.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/chartjs-plugin-deferred/chartjs-plugin-deferred.min.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/moment/moment.min.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/chartjs-adapter-moment/chartjs-adapter-moment.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/hammer/hammer.min.js')?>"></script> <!-- Needed for chartjs-plugin-zoom --->
|
||||
<script src="<?=pihole.fileversion('vendor/chartjs-plugin-zoom/chartjs-plugin-zoom.min.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('vendor/bstreeview/bstreeview.min.js')?>"></script>
|
||||
</head>
|
||||
<body class="<?=theme.name?> hold-transition sidebar-mini <? if pihole.boxedlayout() then ?>layout-boxed<? end ?> logged-in">
|
||||
<noscript>
|
||||
<!-- JS Warning -->
|
||||
<div>
|
||||
<input type="checkbox" id="js-hide">
|
||||
<div class="js-warn" id="js-warn-exit"><h1>JavaScript Is Disabled</h1><p>JavaScript is required for the site to function.</p>
|
||||
<p>To learn how to enable JavaScript click <a href="https://www.enable-javascript.com/" rel="noopener" target="_blank">here</a></p><label for="js-hide">Close</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /JS Warning -->
|
||||
</noscript>
|
||||
|
||||
<!-- Send token to JS -->
|
||||
<div id="enableTimer" hidden></div>
|
||||
<div class="wrapper">
|
||||
<header class="main-header">
|
||||
<!-- Logo -->
|
||||
<a href="<?=pihole.webhome()?>" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini">P<strong>h</strong></span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg">Pi-<strong>hole</strong></span>
|
||||
</a>
|
||||
<!-- Header Navbar: style can be found in header.less -->
|
||||
<nav class="navbar navbar-static-top">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle-svg" data-toggle="push-menu" role="button">
|
||||
<i aria-hidden="true" class="fa fa-angle-double-left"></i>
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="warning-count hidden" id="top-warning-count"></span>
|
||||
</a>
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<li<? if string.len(hostname) == 0 then ?> class="hidden"<? end ?>>
|
||||
<p class="navbar-text">
|
||||
<span class="hidden-xs">hostname:</span>
|
||||
<code><?=hostname?></code>
|
||||
</p>
|
||||
</li>
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fa fa-bars"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header">
|
||||
<img class="logo-img" src="<?=pihole.webhome()?>img/logo.svg" alt="Pi-hole Logo" style="border: 0" width="90" height="90">
|
||||
<p>
|
||||
Open Source Ad Blocker
|
||||
</p>
|
||||
</li>
|
||||
<!-- Menu Body -->
|
||||
<li class="user-body" id="advanced-info" style="display:none;"></li>
|
||||
<!-- Menu Footer -->
|
||||
<li class="user-footer">
|
||||
<a class="btn-link" href="https://pi-hole.net/" rel="noopener" target="_blank">
|
||||
<svg class="svg-inline--fa fa-fw menu-icon" style="height: 1.25em"><use xlink:href="<?=pihole.webhome()?>img/pihole_icon.svg#pihole-svg-logo"/></svg>
|
||||
Pi-hole Website
|
||||
</a>
|
||||
<hr>
|
||||
<a class="btn-link" href="https://docs.pi-hole.net/" rel="noopener" target="_blank"><i class="fa-fw menu-icon fa-regular fa-circle-question"></i> Documentation</a>
|
||||
<a class="btn-link" href="https://discourse.pi-hole.net/" rel="noopener" target="_blank"><i class="fa-fw menu-icon fab fa-discourse"></i> Pi-hole Forum</a>
|
||||
<a class="btn-link" href="https://github.com/pi-hole" rel="noopener" target="_blank"><i class="fa-fw menu-icon fab fa-github"></i> GitHub</a>
|
||||
<a class="btn-link" href="https://discourse.pi-hole.net/c/announcements/5" rel="noopener" target="_blank"><i class="fa-fw menu-icon fa-solid fa-rocket"></i> Pi-hole Releases</a>
|
||||
<? if pihole.needLogin() then ?>
|
||||
<a class="btn-link" href="#" id="logout-button"><i class="fa-fw menu-icon fa-solid fa-arrow-right-from-bracket"></i> Log out</a>
|
||||
<? end ?>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<? mg.include('sidebar.lp', 'r') ?>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
13
scripts/lua/settings_header.lp
Normal file
13
scripts/lua/settings_header.lp
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Title -->
|
||||
<div class="page-header flex-header">
|
||||
<h1><?= PageTitle ?></h1>
|
||||
<div class="settings-selector">
|
||||
<? if scriptname ~= 'settings/all' then
|
||||
-- Show the level selector, except in All Settings page
|
||||
?>
|
||||
<input type="checkbox" id="expert-settings">
|
||||
<? else ?>
|
||||
<input type="checkbox" id="only-changed">
|
||||
<? end ?>
|
||||
</div>
|
||||
</div>
|
||||
261
scripts/lua/sidebar.lp
Normal file
261
scripts/lua/sidebar.lp
Normal file
@@ -0,0 +1,261 @@
|
||||
<? --[[
|
||||
* 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.
|
||||
*/ ]]-- ?>
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="main-sidebar">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- Sidebar user panel -->
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img class="logo-img" src="<?=webhome?>img/logo.svg" alt="Pi-hole logo">
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>Status</p>
|
||||
<span id="status"></span><br/>
|
||||
<span id="query_frequency"></span><br/>
|
||||
<span id="cpu"></span><br/>
|
||||
<span id="memory"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
<ul class="sidebar-menu" data-widget="tree">
|
||||
<li class="header text-uppercase">Main</li>
|
||||
<!-- Home Page -->
|
||||
<li class="menu-main<? if scriptname == 'index' or scriptname == 'index.lp' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>">
|
||||
<i class="fa fa-fw menu-icon fa-home"></i> <span>Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Query Log -->
|
||||
<li class="menu-analysis<? if scriptname == 'queries' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>queries">
|
||||
<i class="fa fa-fw menu-icon fa-file-alt"></i> <span>Query Log</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="header text-uppercase">Group Management</li>
|
||||
<!-- Group Management -->
|
||||
<li class="menu-group<? if scriptname == 'groups' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>groups">
|
||||
<i class="fa fa-fw menu-icon fa-user-friends"></i> <span>Groups
|
||||
<span class="pull-right-container">
|
||||
<span class="label label-primary pull-right" id="num_groups" title="Number of defined groups"></span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-group<? if scriptname == 'groups/clients' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>groups/clients">
|
||||
<i class="fa fa-fw menu-icon fa-laptop"></i> <span>Clients
|
||||
<span class="pull-right-container">
|
||||
<span class="label label-primary pull-right" id="num_clients" title="Number of defined clients"></span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-group<? if scriptname == 'groups/domains' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>groups/domains">
|
||||
<i class="fa fa-fw menu-icon fa-list"></i> <span>Domains
|
||||
<span class="pull-right-container">
|
||||
<span class="label bg-red pull-right" id="num_denied" title="Number of deny rules (domains and regex)"></span>
|
||||
<span class="label bg-green pull-right" id="num_allowed" title="Number of allow rules (domains and regex)"></span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-group<? if scriptname == 'groups/lists' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>groups/lists">
|
||||
<i class="fa fa-fw menu-icon fa-shield-alt"></i> <span>Lists
|
||||
<span class="pull-right-container">
|
||||
<span class="label bg-blue pull-right" id="num_lists" title="Number of subscribed lists"></span>
|
||||
<span class="label bg-yellow pull-right" id="num_gravity" title="Total number of domains subscribed by your Pi-hole"></span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="header text-uppercase">DNS Control</li>
|
||||
<!-- Local DNS Records -->
|
||||
<!-- Enable/Disable Blocking -->
|
||||
<li id="pihole-disable" class="menu-dns treeview">
|
||||
<a href="<?=webhome?>#">
|
||||
<i class="fa fa-fw menu-icon fa-stop"></i> <span>Disable Blocking <span id="flip-status-disable"></span></span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li>
|
||||
<a href="<?=webhome?>#" id="pihole-disable-indefinitely">
|
||||
<i class="fa fa-fw menu-icon fa-infinity"></i> Indefinitely
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?=webhome?>#" id="pihole-disable-10s">
|
||||
<i class="fa fa-fw menu-icon fa-clock"></i> For 10 seconds
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?=webhome?>#" id="pihole-disable-30s">
|
||||
<i class="fa fa-fw menu-icon fa-clock"></i> For 30 seconds
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?=webhome?>#" id="pihole-disable-5m">
|
||||
<i class="fa fa-fw menu-icon fas fa-clock"></i> For 5 minutes
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?=webhome?>#" id="pihole-disable-cst" data-toggle="modal" data-target="#customDisableModal">
|
||||
<i class="fa fa-fw menu-icon fa-user-clock"></i> Custom time
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- <a href="<?=webhome?>#" id="flip-status"><i class="fa fa-stop"></i> <span>Disable</span></a> -->
|
||||
</li>
|
||||
<li id="pihole-enable" class="menu-dns treeview" style="display: none;">
|
||||
<a href="<?=webhome?>#">
|
||||
<i class="fa fa-fw menu-icon fa-play"></i>
|
||||
<span id="enableLabel">Enable Blocking
|
||||
<span id="flip-status-enable"></span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="header text-uppercase">System</li>
|
||||
<!-- Settings -->
|
||||
<li class="menu-system treeview <? if startsWith(scriptname, 'settings/') then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>#">
|
||||
<i class="fa fa-fw menu-icon fa-cogs"></i> <span>Settings</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="<? if scriptname == 'settings/system' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>settings/system">
|
||||
<i class="fa-fw menu-icon fa-solid fa-circle-info"></i> <span>System</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<? if scriptname == 'settings/dns' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>settings/dns">
|
||||
<i class="fa-fw menu-icon fa-solid fa-book-atlas"></i> <span>DNS</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<? if scriptname == 'settings/dhcp' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>settings/dhcp">
|
||||
<i class="fa-fw menu-icon fa-solid fa-sitemap"></i> <span>DHCP</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<? if scriptname == 'settings/api' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>settings/api">
|
||||
<i class="fa-fw menu-icon fa-solid fa-window-restore"></i> <span>Web interface / API</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<? if scriptname == 'settings/privacy' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>settings/privacy">
|
||||
<i class="fa-fw menu-icon fa-solid fa-binoculars"></i> <span>Privacy</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<? if scriptname == 'settings/teleporter' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>settings/teleporter">
|
||||
<i class="fa-fw menu-icon fa-solid fa-file-export"></i> <span>Teleporter</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<? if scriptname == 'settings/dnsrecords' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>settings/dnsrecords">
|
||||
<i class="fa-fw menu-icon fa-solid fa-address-book"></i> <span>Local DNS Records</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<? if scriptname == 'settings/all' then ?> active<? end ?> settings-level-expert">
|
||||
<a href="<?=webhome?>settings/all">
|
||||
<i class="fa-fw menu-icon fa-solid fa-pen-to-square"></i> <span>All settings</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- Tools -->
|
||||
<li class="menu-system treeview<? if in_array(scriptname, {'messages', 'gravity', 'search', 'taillog', 'interfaces', 'network'}) then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>#">
|
||||
<i class="fa fa-fw menu-icon fa-tools"></i> <span>Tools</span>
|
||||
<span class="warning-count hidden"></span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<!-- Pi-hole diagnosis -->
|
||||
<li class="<? if scriptname == 'messages' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>messages">
|
||||
<i class="fa fa-fw menu-icon fa-file-medical-alt"></i> <span>Pi-hole diagnosis</span>
|
||||
<span class="pull-right-container warning-count hidden"></span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Tail log files -->
|
||||
<li class="treeview <? if scriptname == 'taillog' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>#">
|
||||
<i class="fa-fw menu-icon fa-solid fa-list-ul"></i> <span>Tail log files</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<!-- Tail pihole.log -->
|
||||
<li class="<? if scriptname == 'taillog' and GET("file") == "dnsmasq" then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>taillog?file=dnsmasq">
|
||||
<i class="fa-fw menu-icon fa-solid fa-list-ul"></i> pihole.log
|
||||
</a>
|
||||
</li>
|
||||
<!-- Tail FTL.log -->
|
||||
<li class="<? if scriptname == 'taillog' and GET("file") == "ftl" then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>taillog?file=ftl">
|
||||
<i class="fa-fw menu-icon fa-solid fa-list-ul"></i> FTL.log
|
||||
</a>
|
||||
</li>
|
||||
<!-- Tail webserver.log -->
|
||||
<li class="<? if scriptname == 'taillog' and GET("file") == "webserver" then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>taillog?file=webserver">
|
||||
<i class="fa-fw menu-icon fa-solid fa-list-ul"></i> webserver.log
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- Run gravity.sh -->
|
||||
<li class="<? if scriptname == 'gravity' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>gravity">
|
||||
<i class="fa fa-fw menu-icon fa-arrow-circle-down"></i> <span>Update Gravity</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Query Lists -->
|
||||
<li class="<? if scriptname == 'search' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>search">
|
||||
<i class="fa fa-fw menu-icon fa-search"></i> <span>Search Lists</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Interfaces -->
|
||||
<li class="<? if scriptname == 'interfaces' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>interfaces">
|
||||
<i class="fa fa-fw menu-icon fa-wifi"></i> <span>Interfaces</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Network -->
|
||||
<li class="<? if scriptname == 'network' then ?> active<? end ?>">
|
||||
<a href="<?=webhome?>network">
|
||||
<i class="fa fa-fw menu-icon fa-network-wired"></i> <span>Network</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<!-- Donate button -->
|
||||
<li class="header text-uppercase">Donate</li>
|
||||
<li class="menu-donate">
|
||||
<a href="https://pi-hole.net/donate/" target="_blank">
|
||||
<i class="fas fa-fw menu-icon fa-donate"></i> <span>Donate</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
Reference in New Issue
Block a user