Skip to content

Commit

Permalink
Merge branch 'devel' into fix/v6_2
Browse files Browse the repository at this point in the history
  • Loading branch information
DL6ER committed Nov 20, 2021
2 parents 0c00ea9 + 753d1c9 commit 3822f53
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 15 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The Web interface is enabled by default when you install Pi-hole.

There are several ways to [access the dashboard](https://discourse.pi-hole.net/t/how-do-i-access-pi-holes-dashboard-admin-interface/3168):

1. `http://<IP_ADDPRESS_OF_YOUR_PI_HOLE>/admin/`
1. `http://<IP_ADDRESS_OF_YOUR_PI_HOLE>/admin/`
2. `http:/pi.hole/admin/` (when using Pi-hole as your DNS server)
3. `http://pi.hole/` (when using Pi-hole as your DNS server)

Expand All @@ -46,7 +46,7 @@ Once logged in (forgot your password?), you can view your network stats to see t

## Pi-hole is free, but powered by your support

There are many reoccurring costs involved with maintaining free, open source, and privacy respecting software; expenses which [our volunteer developers](https://github.com/orgs/pi-hole/people) pitch in to cover out-of-pocket. This is just one example of how strongly we feel about our software, as well as the importance of keeping it maintained.
There are many reoccurring costs involved with maintaining free, open source, and privacy-respecting software; expenses which [our volunteer developers](https://github.com/orgs/pi-hole/people) pitch in to cover out-of-pocket. This is just one example of how strongly we feel about our software, as well as the importance of keeping it maintained.

Make no mistake: **your support is absolutely vital to help keep us innovating!**

Expand All @@ -73,7 +73,7 @@ If you'd rather not [donate](https://pi-hole.net/donate/) (_which is okay!_), th

We welcome _everyone_ to contribute to issue reports, suggest new features, and create pull requests.

If you have something to add - anything from a typo through to a whole new feature, we're happy to check it out! Just make sure to fill out our template when submitting your request; the questions that it asks will help the volunteers quickly understand what you're aiming to achieve.
If you have something to add - anything from a typo through to a whole new feature - we're happy to check it out! Just make sure to fill out our template when submitting your request; the questions that it asks will help the volunteers quickly understand what you're aiming to achieve.

### Presentations about Pi-hole

Expand Down
32 changes: 20 additions & 12 deletions scripts/pi-hole/js/db_graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ var interval = 0;

var dateformat = "MMMM Do YYYY, HH:mm";

// get the database min timestamp
var mintimestamp;
$.getJSON("api_db.php?getMinTimestamp", function (ts) {
mintimestamp = ts.mintimestamp * 1000 || 0; // return the timestamp in milliseconds or zero (in case of NaN)
});

$(function () {
$("#querytime").daterangepicker(
{
Expand All @@ -38,7 +44,7 @@ $(function () {
moment().subtract(1, "month").endOf("month"),
],
"This Year": [moment().startOf("year"), moment()],
"All Time": [moment(0), moment()],
"All Time": [moment(mintimestamp), moment()],
},
opens: "center",
showDropdowns: true,
Expand Down Expand Up @@ -69,19 +75,21 @@ function updateQueriesOverTime() {
// Default displaying axis scaling
timeLineChart.options.scales.xAxes[0].time.unit = "hour";

if (num * interval >= 6 * 29 * 24 * 60 * 60) {
// If the requested data is more than 3 months, set ticks interval to quarterly
// Xaxis scaling based on selected daterange
if (num * interval > 4 * 365 * 24 * 60 * 60) {
// If the requested data is more than 4 years, set ticks interval to year
timeLineChart.options.scales.xAxes[0].time.unit = "year";
} else if (num * interval >= 366 * 24 * 60 * 60) {
// If the requested data is more than 1 year, set ticks interval to quarter
timeLineChart.options.scales.xAxes[0].time.unit = "quarter";
} else if (num * interval >= 3 * 29 * 24 * 60 * 60) {
} else if (num * interval >= 92 * 24 * 60 * 60) {
// If the requested data is more than 3 months, set ticks interval to months
timeLineChart.options.scales.xAxes[0].time.unit = "month";
}

if (num * interval >= 29 * 24 * 60 * 60) {
// If the requested data is more than 1 month, set ticks interval to weeks
} else if (num * interval >= 31 * 24 * 60 * 60) {
// If the requested data is 1 month or more, set ticks interval to weeks
timeLineChart.options.scales.xAxes[0].time.unit = "week";
} else if (num * interval >= 6 * 24 * 60 * 60) {
// If the requested data is more than 1 week, set ticks interval to days
} else if (num * interval > 3 * 24 * 60 * 60) {
// If the requested data is more than 3 days (72 hours), set ticks interval to days
timeLineChart.options.scales.xAxes[0].time.unit = "day";
}

Expand Down Expand Up @@ -286,8 +294,8 @@ $(function () {
day: "MMM DD",
week: "MMM DD",
month: "MMM",
quarter: "MMM",
year: "YYYY MMM",
quarter: "YYYY MMM",
year: "YYYY",
},
},
},
Expand Down
5 changes: 5 additions & 0 deletions scripts/pi-hole/js/groups-adlists.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ function initTable() {
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-adlists-table");

// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID column
data.columns[0].visible = false;
// Apply loaded state to table
Expand Down
5 changes: 5 additions & 0 deletions scripts/pi-hole/js/groups-clients.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ function initTable() {
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-clients-table");

// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID column
data.columns[0].visible = false;
// Apply loaded state to table
Expand Down
5 changes: 5 additions & 0 deletions scripts/pi-hole/js/groups-domains.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ function initTable() {
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-domains-table");

// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID column
data.columns[0].visible = false;
// Show group assignment column only on full page
Expand Down
5 changes: 5 additions & 0 deletions scripts/pi-hole/js/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ $(function () {
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-table");

// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID column
data.columns[0].visible = false;
// Apply loaded state to table
Expand Down
7 changes: 7 additions & 0 deletions scripts/pi-hole/js/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ function renderMessage(data, type, row) {
" seconds)"
);

case "DNSMASQ_WARN":
return "Warning in <code>dnsmasq</code> core:<pre>" + row.message + "</pre>";

default:
return "Unknown message type<pre>" + JSON.stringify(row) + "</pre>";
}
Expand Down Expand Up @@ -153,6 +156,10 @@ $(function () {
},
stateLoadCallback: function () {
var data = utils.stateLoadCallback("messages-table");
// Return if not available
if (data === null) {
return null;
}

// Reset visibility of ID and blob columns
var hiddenCols = [0, 4, 5, 6, 7, 8];
Expand Down
5 changes: 5 additions & 0 deletions style/pi-hole.css
Original file line number Diff line number Diff line change
Expand Up @@ -406,3 +406,8 @@ td.details-control {
border-radius: 3px;
}
}

/* Fix the icon position (login password field) */
.form-control-feedback {
right: 12px;
}

0 comments on commit 3822f53

Please sign in to comment.