mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 02:38:28 +00:00
Use pretty URLs when possible
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
8
index.lp
8
index.lp
@@ -22,7 +22,7 @@ mg.include('scripts/lua/header_authenticated.lp','r')
|
||||
<div class="icon">
|
||||
<i class="fas fa-globe-americas"></i>
|
||||
</div>
|
||||
<a href="network.lp" class="small-box-footer" title="" id="total_clients">
|
||||
<a href="network" class="small-box-footer" title="" id="total_clients">
|
||||
<span id="active_clients">-</span> active clients <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
@@ -38,7 +38,7 @@ mg.include('scripts/lua/header_authenticated.lp','r')
|
||||
<div class="icon">
|
||||
<i class="fas fa-hand-paper"></i>
|
||||
</div>
|
||||
<a href="queries.lp?upstream=blocklist" class="small-box-footer" title="">
|
||||
<a href="queries?upstream=blocklist" class="small-box-footer" title="">
|
||||
List blocked queries <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
@@ -54,7 +54,7 @@ mg.include('scripts/lua/header_authenticated.lp','r')
|
||||
<div class="icon">
|
||||
<i class="fas fa-chart-pie"></i>
|
||||
</div>
|
||||
<a href="queries.lp" class="small-box-footer" title="">
|
||||
<a href="queries" class="small-box-footer" title="">
|
||||
List all queries <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
@@ -70,7 +70,7 @@ mg.include('scripts/lua/header_authenticated.lp','r')
|
||||
<div class="icon">
|
||||
<i class="fas fa-list-alt"></i>
|
||||
</div>
|
||||
<a href="groups-lists.lp" class="small-box-footer" title="">
|
||||
<a href="groups-lists" class="small-box-footer" title="">
|
||||
Manage lists <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -97,11 +97,11 @@ const htmlLegendPlugin = {
|
||||
|
||||
textLink.addEventListener("click", () => {
|
||||
if (chart.canvas.id === "queryTypePieChart") {
|
||||
globalThis.location.href = "queries.lp?type=" + item.text;
|
||||
globalThis.location.href = "queries?type=" + item.text;
|
||||
} else if (chart.canvas.id === "forwardDestinationPieChart") {
|
||||
// Encode the forward destination as it may contain an "#" character
|
||||
const upstream = encodeURIComponent(upstreams[item.text]);
|
||||
globalThis.location.href = "queries.lp?upstream=" + upstream;
|
||||
globalThis.location.href = "queries?upstream=" + upstream;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ $(function () {
|
||||
});
|
||||
|
||||
// Do we want to start updating immediately?
|
||||
// gravity.lp?go
|
||||
// gravity?go
|
||||
var searchString = globalThis.location.search.substring(1);
|
||||
if (searchString.indexOf("go") !== -1) {
|
||||
$("#gravityBtn").prop("disabled", true);
|
||||
|
||||
@@ -305,7 +305,7 @@ function updateTopClientsTable(blocked) {
|
||||
let clientname = client.name;
|
||||
if (clientname.length === 0) clientname = client.ip;
|
||||
url =
|
||||
'<a href="queries.lp?client_ip=' +
|
||||
'<a href="queries?client_ip=' +
|
||||
encodeURIComponent(client.ip) +
|
||||
(blocked ? "&upstream=blocklist" : "") +
|
||||
'">' +
|
||||
@@ -366,7 +366,7 @@ function updateTopDomainsTable(blocked) {
|
||||
// Substitute "." for empty domain lookups
|
||||
urlText = domain === "" ? "." : domain;
|
||||
url =
|
||||
'<a href="queries.lp?domain=' +
|
||||
'<a href="queries?domain=' +
|
||||
domain +
|
||||
(blocked ? "&upstream=blocklist" : "&upstream=permitted") +
|
||||
'">' +
|
||||
@@ -797,7 +797,7 @@ $(function () {
|
||||
//get value by index
|
||||
var from = label / 1000 - 300;
|
||||
var until = label / 1000 + 300;
|
||||
globalThis.location.href = "queries.lp?from=" + from + "&until=" + until;
|
||||
globalThis.location.href = "queries?from=" + from + "&until=" + until;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -820,7 +820,7 @@ $(function () {
|
||||
//get value by index
|
||||
var from = label / 1000 - 300;
|
||||
var until = label / 1000 + 300;
|
||||
globalThis.location.href = "queries.lp?from=" + from + "&until=" + until;
|
||||
globalThis.location.href = "queries?from=" + from + "&until=" + until;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -16,7 +16,7 @@ function redirect() {
|
||||
|
||||
// If DNS failure: send to Pi-hole diagnosis messages page
|
||||
if ($("#dns-failure-label").is(":visible")) {
|
||||
target = "messages.lp";
|
||||
target = "messages";
|
||||
}
|
||||
|
||||
// Redirect to target
|
||||
|
||||
@@ -163,7 +163,7 @@ $(function () {
|
||||
|
||||
// Only add IPs to the table if we have not reached the maximum
|
||||
if (index < MAXIPDISPLAY) {
|
||||
ips.push('<a href="queries.lp?client_ip=' + ip.ip + '">' + iptext + "</a>");
|
||||
ips.push('<a href="queries?client_ip=' + ip.ip + '">' + iptext + "</a>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ function doSearch() {
|
||||
for (const domain of res.domains) {
|
||||
const color = domain.type === "deny" ? "red" : "green";
|
||||
result +=
|
||||
" - <a href='groups-domains.lp?domainid=" +
|
||||
" - <a href='groups-domains?domainid=" +
|
||||
domain.id +
|
||||
"' target='_blank'><strong>" +
|
||||
utils.escapeHtml(domain.domain) +
|
||||
@@ -118,7 +118,7 @@ function doSearch() {
|
||||
const list = grouped[listId][0];
|
||||
const color = list.type === "block" ? "red" : "green";
|
||||
result +=
|
||||
" - <a href='groups-lists.lp?listid=" +
|
||||
" - <a href='groups-lists?listid=" +
|
||||
list.id +
|
||||
"' target='_blank'>" +
|
||||
utils.escapeHtml(list.address) +
|
||||
|
||||
Reference in New Issue
Block a user