From 48243e18bcca91354ce64cbc48c9ecdef49ef324 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Fri, 15 Jun 2018 23:49:26 -0400 Subject: [PATCH 01/13] Add QueryTypesChart Signed-off-by: Mcat12 --- make-fake-data.js | 25 ++++++ src/components/QueryTypesChart.js | 123 ++++++++++++++++++++++++++++++ src/utils.js | 3 + src/views/Dashboard.js | 6 ++ 4 files changed, 157 insertions(+) create mode 100644 src/components/QueryTypesChart.js diff --git a/make-fake-data.js b/make-fake-data.js index 54ef4e6..a41d5ad 100644 --- a/make-fake-data.js +++ b/make-fake-data.js @@ -72,6 +72,30 @@ function summary() { }; } +function queryTypes() { + const data = []; + const total = faker.random.number(); + const names = [ + "A (IPv4)", + "AAAA (IPv6)", + "ANY", + "SRV", + "SOA", + "PTR", + "TXT" + ]; + const step = total / names.length; + + for(const name of names) { + data.push({ + name, + percent: step / total + }); + } + + return data; +} + function topList(length, max, fakeData) { const result = []; const numbers = []; @@ -197,6 +221,7 @@ write("public/fakeAPI/stats/overTime/history", historyOverTime(144)); write("public/fakeAPI/stats/overTime/clients", clientsOverTime(144, 5)); write("public/fakeAPI/stats/summary", summary()); write("public/fakeAPI/stats/history", history(5000)); +write("public/fakeAPI/stats/query_types", queryTypes()); write("public/fakeAPI/stats/top_blocked", topBlocked(10)); write("public/fakeAPI/stats/top_domains", topDomains(10)); write("public/fakeAPI/stats/top_clients", topClients(10)); diff --git a/src/components/QueryTypesChart.js b/src/components/QueryTypesChart.js new file mode 100644 index 0000000..5c91c16 --- /dev/null +++ b/src/components/QueryTypesChart.js @@ -0,0 +1,123 @@ +/* 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. +* +* Web Interface +* Query Types Chart component +* +* This file is copyright under the latest version of the EUPL. +* Please see LICENSE file for your rights under this license. */ + +import React, { Component } from 'react'; +import { Doughnut } from 'react-chartjs-2'; +import { translate } from 'react-i18next'; +import { makeCancelable, api, ignoreCancel } from "../utils"; + +class QueryTypesChart extends Component { + state = { + loading: true, + data: [], + colors: [], + labels: [] + }; + + updateChart = () => { + this.updateHandler = makeCancelable(api.getQueryTypes(), { repeat: this.updateChart, interval: 10 * 1000 }); + this.updateHandler.promise.then(queryTypes => { + const colors = [ + "#20a8d8", + "#f86c6b", + "#4dbd74", + "#f8cb00", + "#263238", + "#63c2de", + "#b0bec5" + ]; + const data = []; + const labels = []; + const usedColors = []; + + // Fill in dataset metadata + let i = 0; + for(let queryType of queryTypes) { + data.push(queryType.percent); + labels.push(queryType.name); + usedColors.push( + // If we ran out of colors, make a random one + i < colors.length + ? colors[i] + : '#' + parseInt("" + Math.random() * 0xffffff, 10).toString(16) + ); + + i++; + } + + this.setState({ + loading: false, + data, + colors: usedColors, + labels + }) + }).catch(ignoreCancel); + }; + + componentDidMount() { + this.updateChart(); + } + + componentWillUnmount() { + this.updateHandler.cancel(); + } + + render() { + const { t } = this.props; + + const options = { + legend: { + display: true, + position: "right" + }, + tooltips: { + enabled: true, + callbacks: { + title: () => t("Query Types"), + label: (tooltipItems, data) => { + const dataset = data.datasets[tooltipItems.datasetIndex]; + const label = data.labels[tooltipItems.index]; + return label + ": " + dataset.data[tooltipItems.index].toFixed(1) + "%"; + } + } + } + }; + + return ( +
+
+ {t("Query Types")} +
+
+ +
+ { + this.state.loading + ? +
+ +
+ : + null + } +
+ ); + } +} + +export default translate("dashboard")(QueryTypesChart); diff --git a/src/utils.js b/src/utils.js index 9f707ea..67033bc 100644 --- a/src/utils.js +++ b/src/utils.js @@ -75,6 +75,9 @@ export const api = { getClientsGraph() { return api.get("stats/overTime/clients") }, + getQueryTypes() { + return api.get("stats/query_types") + }, getTopDomains() { return api.get("stats/top_domains"); }, diff --git a/src/views/Dashboard.js b/src/views/Dashboard.js index 7bb144f..3e3f2f6 100644 --- a/src/views/Dashboard.js +++ b/src/views/Dashboard.js @@ -12,6 +12,7 @@ import React, { Fragment } from 'react'; import SummaryStats from '../components/SummaryStats'; import QueriesGraph from '../components/QueriesGraph'; import ClientsGraph from '../components/ClientsGraph'; +import QueryTypesChart from "../components/QueryTypesChart"; import TopDomains from '../components/TopDomains'; import TopBlocked from '../components/TopBlocked'; import TopClients from '../components/TopClients'; @@ -25,6 +26,11 @@ export default () => ( api.loggedIn ? +
+
+ +
+
From b5e1350b0fd4aaebfbb7ead4436c0fb6bc1566d8 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 16 Jun 2018 15:09:08 -0400 Subject: [PATCH 02/13] Stop updating the status on component unmount Signed-off-by: Mcat12 --- src/components/StatusBadge.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/StatusBadge.js b/src/components/StatusBadge.js index d8a7656..b116007 100644 --- a/src/components/StatusBadge.js +++ b/src/components/StatusBadge.js @@ -23,6 +23,10 @@ class StatusBadge extends Component { this.updateStatus(); } + componentWillUnmount() { + this.updateHandler.cancel(); + } + render() { const { t } = this.props; From fd3abdbc35102f062be526e72cf7c86405e78415 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 16 Jun 2018 15:09:54 -0400 Subject: [PATCH 03/13] Pad random color to be 6 hex characters Signed-off-by: Mcat12 --- src/components/ClientsGraph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ClientsGraph.js b/src/components/ClientsGraph.js index 55b279d..cb3d69c 100644 --- a/src/components/ClientsGraph.js +++ b/src/components/ClientsGraph.js @@ -56,7 +56,7 @@ class ClientsGraph extends Component { // If we ran out of colors, make a random one backgroundColor: i < colors.length ? colors[i] - : '#' + parseInt("" + Math.random() * 0xffffff, 10).toString(16), + : '#' + parseInt("" + Math.random() * 0xffffff, 10).toString(16).padStart(6, "0"), pointRadius: 0, pointHitRadius: 5, pointHoverRadius: 5, From 5a720fda0f88f106a2efef0eff03b3950efc6a04 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 16 Jun 2018 15:10:18 -0400 Subject: [PATCH 04/13] Add forward destinations to fake data Signed-off-by: Mcat12 --- make-fake-data.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/make-fake-data.js b/make-fake-data.js index a41d5ad..2fb90ec 100644 --- a/make-fake-data.js +++ b/make-fake-data.js @@ -96,6 +96,27 @@ function queryTypes() { return data; } +function forwardDestinations(length) { + const totalQueries = faker.random.number(); + const destinations = []; + const numbers = []; + const names = unique(faker.internet.domainName, length); + const ipAddrs = unique(faker.internet.ip, length); + + for(let i = 0; i < length; i++) + numbers.push(faker.random.number({ max: totalQueries })); + + for(let i = 0; i < length; i++) { + destinations.push({ + name: names[i], + ip: ipAddrs[i], + percent: numbers[i] / totalQueries + }); + } + + return destinations; +} + function topList(length, max, fakeData) { const result = []; const numbers = []; @@ -222,6 +243,7 @@ write("public/fakeAPI/stats/overTime/clients", clientsOverTime(144, 5)); write("public/fakeAPI/stats/summary", summary()); write("public/fakeAPI/stats/history", history(5000)); write("public/fakeAPI/stats/query_types", queryTypes()); +write("public/fakeAPI/stats/forward_destinations", forwardDestinations(30)); write("public/fakeAPI/stats/top_blocked", topBlocked(10)); write("public/fakeAPI/stats/top_domains", topDomains(10)); write("public/fakeAPI/stats/top_clients", topClients(10)); From b82f58f89bccf80c8f2479ff47b208d78ca2365d Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 16 Jun 2018 15:10:38 -0400 Subject: [PATCH 05/13] Add forward destinations to the API handler Signed-off-by: Mcat12 --- src/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils.js b/src/utils.js index 67033bc..af5b246 100644 --- a/src/utils.js +++ b/src/utils.js @@ -78,6 +78,9 @@ export const api = { getQueryTypes() { return api.get("stats/query_types") }, + getForwardDestinations() { + return api.get("stats/forward_destinations") + }, getTopDomains() { return api.get("stats/top_domains"); }, From c138620df395d43b7785a75e1918714cb43689dd Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 16 Jun 2018 15:11:16 -0400 Subject: [PATCH 06/13] Only update Query Types once every 10 minutes Signed-off-by: Mcat12 --- src/components/QueryTypesChart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/QueryTypesChart.js b/src/components/QueryTypesChart.js index 5c91c16..7440fbe 100644 --- a/src/components/QueryTypesChart.js +++ b/src/components/QueryTypesChart.js @@ -22,7 +22,7 @@ class QueryTypesChart extends Component { }; updateChart = () => { - this.updateHandler = makeCancelable(api.getQueryTypes(), { repeat: this.updateChart, interval: 10 * 1000 }); + this.updateHandler = makeCancelable(api.getQueryTypes(), { repeat: this.updateChart, interval: 10 * 60 * 1000 }); this.updateHandler.promise.then(queryTypes => { const colors = [ "#20a8d8", From b4b4f125bf9628ade07360cb68c9b4c5dfc659ca Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 16 Jun 2018 15:11:40 -0400 Subject: [PATCH 07/13] Resize Query Types Signed-off-by: Mcat12 --- src/components/QueryTypesChart.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/QueryTypesChart.js b/src/components/QueryTypesChart.js index 7440fbe..7f256bc 100644 --- a/src/components/QueryTypesChart.js +++ b/src/components/QueryTypesChart.js @@ -87,7 +87,8 @@ class QueryTypesChart extends Component { return label + ": " + dataset.data[tooltipItems.index].toFixed(1) + "%"; } } - } + }, + maintainAspectRatio: false }; return ( @@ -96,7 +97,7 @@ class QueryTypesChart extends Component { {t("Query Types")}
- Date: Sat, 16 Jun 2018 15:12:16 -0400 Subject: [PATCH 08/13] Add ForwardDestinationsChart Signed-off-by: Mcat12 --- scss/_custom.scss | 53 +++++-- src/components/ForwardDestinationsChart.js | 157 +++++++++++++++++++++ src/views/Dashboard.js | 4 + 3 files changed, 199 insertions(+), 15 deletions(-) create mode 100644 src/components/ForwardDestinationsChart.js diff --git a/scss/_custom.scss b/scss/_custom.scss index 25545ee..b41a440 100644 --- a/scss/_custom.scss +++ b/scss/_custom.scss @@ -58,21 +58,44 @@ } .chartjs-tooltip { - opacity: 1; - position: absolute; - background: rgba(0, 0, 0, .7); - color: white; - border-radius: 3px; - -webkit-transition: all .1s ease; - transition: all .1s ease; - pointer-events: none; - -webkit-transform: translate(-50%, 0); - transform: translate(-50%, 0); + opacity: 1; + position: absolute; + background: rgba(0, 0, 0, .7); + color: white; + border-radius: 3px; + -webkit-transition: all .1s ease; + transition: all .1s ease; + pointer-events: none; + -webkit-transform: translate(-50%, 0); + transform: translate(-50%, 0); } .chartjs-tooltip-key { - display: inline-block; - width: 20px; - height: 10px; - margin-right: 10px; -} \ No newline at end of file + display: inline-block; + width: 20px; + height: 10px; + margin-right: 10px; +} + +.chart-legend { + height: 250px; + overflow: auto; + margin: auto; + list-style-type: none; +} + +.chart-legend li { + display: inherit; + cursor: pointer; + text-align: left; +} + +.chart-legend li span { + width: 20px; + height: 12px; + margin-right: 5px; +} + +.strike { + text-decoration: line-through !important; +} diff --git a/src/components/ForwardDestinationsChart.js b/src/components/ForwardDestinationsChart.js new file mode 100644 index 0000000..9964822 --- /dev/null +++ b/src/components/ForwardDestinationsChart.js @@ -0,0 +1,157 @@ +/* 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. +* +* Web Interface +* Forward Destinations Chart component +* +* This file is copyright under the latest version of the EUPL. +* Please see LICENSE file for your rights under this license. */ + +import React, { Component } from 'react'; +import { Doughnut } from 'react-chartjs-2'; +import { translate } from 'react-i18next'; +import { makeCancelable, api, ignoreCancel } from "../utils"; + +class ForwardDestinationsChart extends Component { + state = { + loading: true, + data: [], + colors: [], + labels: [] + }; + + constructor(props) { + super(props); + this.chartRef = React.createRef(); + } + + updateChart = () => { + this.updateHandler = makeCancelable( + api.getForwardDestinations(), + { repeat: this.updateChart, interval: 10 * 60 * 1000 } + ); + this.updateHandler.promise.then(forwardDestinations => { + const colors = [ + "#20a8d8", + "#f86c6b", + "#4dbd74", + "#f8cb00", + "#263238", + "#63c2de", + "#b0bec5" + ]; + const data = []; + const labels = []; + const usedColors = []; + + // Fill in dataset metadata + let i = 0; + for(let destination of forwardDestinations) { + data.push(destination.percent); + labels.push(destination.name); + usedColors.push( + // If we ran out of colors, make a random one + i < colors.length + ? colors[i] + : '#' + parseInt("" + Math.random() * 0xffffff, 10).toString(16).padStart(6, "0") + ); + + i++; + } + + this.setState({ + loading: false, + data, + colors: usedColors, + labels + }) + }).catch(ignoreCancel); + }; + + handleClick = (e, index) => { + const chart = this.chartRef.current.chartInstance; + chart.legend.options.onClick.call(chart, e, chart.legend.legendItems[index]); + this.forceUpdate(); + }; + + componentDidMount() { + this.updateChart(); + } + + componentWillUnmount() { + this.updateHandler.cancel(); + } + + render() { + const { t } = this.props; + + const options = { + legend: { display: false }, + tooltips: { + enabled: true, + callbacks: { + title: () => t("Queries Answered By"), + label: (tooltipItems, data) => { + const dataset = data.datasets[tooltipItems.datasetIndex]; + const label = data.labels[tooltipItems.index]; + return label + ": " + dataset.data[tooltipItems.index].toFixed(1) + "%"; + } + } + }, + maintainAspectRatio: false + }; + + const meta = this.chartRef.current !== null + ? this.chartRef.current.chartInstance.getDatasetMeta(0).data + : this.state.data.map(() => ({ hidden: false })); + + return ( +
+
+ {t("Queries Answered By")} +
+
+
+ +
+
+
    + { + this.state.labels + .map((label, i) => [label, this.state.colors[i]]) + .map(([label, color], i) => ( +
  • this.handleClick(e, i)}> + + {label} +
  • + )) + } +
+
+
+ { + this.state.loading + ? +
+ +
+ : + null + } +
+ ); + } +} + +export default translate("dashboard")(ForwardDestinationsChart); diff --git a/src/views/Dashboard.js b/src/views/Dashboard.js index 3e3f2f6..c8fe108 100644 --- a/src/views/Dashboard.js +++ b/src/views/Dashboard.js @@ -13,6 +13,7 @@ import SummaryStats from '../components/SummaryStats'; import QueriesGraph from '../components/QueriesGraph'; import ClientsGraph from '../components/ClientsGraph'; import QueryTypesChart from "../components/QueryTypesChart"; +import ForwardDestinationsChart from "../components/ForwardDestinationsChart"; import TopDomains from '../components/TopDomains'; import TopBlocked from '../components/TopBlocked'; import TopClients from '../components/TopClients'; @@ -30,6 +31,9 @@ export default () => (
+
+ +
From cf13c743f568e268621adbf3f316a5142241c1f5 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 16 Jun 2018 15:15:38 -0400 Subject: [PATCH 09/13] Add more comments to ForwardDestinationsChart Signed-off-by: Mcat12 --- src/components/ForwardDestinationsChart.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/ForwardDestinationsChart.js b/src/components/ForwardDestinationsChart.js index 9964822..fcd54f6 100644 --- a/src/components/ForwardDestinationsChart.js +++ b/src/components/ForwardDestinationsChart.js @@ -70,8 +70,11 @@ class ForwardDestinationsChart extends Component { }; handleClick = (e, index) => { + // Hide the destination by clicking on the internal legend item const chart = this.chartRef.current.chartInstance; chart.legend.options.onClick.call(chart, e, chart.legend.legendItems[index]); + + // Cause an update so the external legend gets updated this.forceUpdate(); }; @@ -102,6 +105,8 @@ class ForwardDestinationsChart extends Component { maintainAspectRatio: false }; + // Get the metadata for the items, so we know if they are hidden or not. + // If the chart has not been created yet, make some fake metadata. const meta = this.chartRef.current !== null ? this.chartRef.current.chartInstance.getDatasetMeta(0).data : this.state.data.map(() => ({ hidden: false })); @@ -126,7 +131,9 @@ class ForwardDestinationsChart extends Component {
    { this.state.labels + // Zip label and color together .map((label, i) => [label, this.state.colors[i]]) + // Create the list items .map(([label, color], i) => (
  • Date: Sat, 16 Jun 2018 15:19:38 -0400 Subject: [PATCH 10/13] Reduce number of forward destinations in fake data from debug levels Signed-off-by: Mcat12 --- make-fake-data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make-fake-data.js b/make-fake-data.js index 2fb90ec..52721ef 100644 --- a/make-fake-data.js +++ b/make-fake-data.js @@ -243,7 +243,7 @@ write("public/fakeAPI/stats/overTime/clients", clientsOverTime(144, 5)); write("public/fakeAPI/stats/summary", summary()); write("public/fakeAPI/stats/history", history(5000)); write("public/fakeAPI/stats/query_types", queryTypes()); -write("public/fakeAPI/stats/forward_destinations", forwardDestinations(30)); +write("public/fakeAPI/stats/forward_destinations", forwardDestinations(3)); write("public/fakeAPI/stats/top_blocked", topBlocked(10)); write("public/fakeAPI/stats/top_domains", topDomains(10)); write("public/fakeAPI/stats/top_clients", topClients(10)); From 9dff491becfc3a8ce055b328988d43afacc2593d Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 16 Jun 2018 15:21:15 -0400 Subject: [PATCH 11/13] Update legend styling Centers the color with the text. Signed-off-by: Mcat12 --- scss/_custom.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/scss/_custom.scss b/scss/_custom.scss index b41a440..d9c68d7 100644 --- a/scss/_custom.scss +++ b/scss/_custom.scss @@ -94,6 +94,7 @@ width: 20px; height: 12px; margin-right: 5px; + top: 5px; } .strike { From 06b164ca065a3d3d64f37397f76bb14da598804e Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 16 Jun 2018 15:36:33 -0400 Subject: [PATCH 12/13] Use the destination IP address if the name is not available Signed-off-by: Mcat12 --- src/components/ForwardDestinationsChart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ForwardDestinationsChart.js b/src/components/ForwardDestinationsChart.js index fcd54f6..11641c5 100644 --- a/src/components/ForwardDestinationsChart.js +++ b/src/components/ForwardDestinationsChart.js @@ -49,7 +49,7 @@ class ForwardDestinationsChart extends Component { let i = 0; for(let destination of forwardDestinations) { data.push(destination.percent); - labels.push(destination.name); + labels.push(destination.name.length !== 0 ? destination.name : destination.ip); usedColors.push( // If we ran out of colors, make a random one i < colors.length From 4f4c3e552bf504efac261064ead1fe54b556bc98 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sun, 17 Jun 2018 12:49:50 -0400 Subject: [PATCH 13/13] Rename Forward Destinations chart to Queries Answered By Destination Also updated translations. Signed-off-by: Mcat12 --- public/i18n/en/dashboard.json | 3 ++- public/i18n/es/dashboard.json | 4 +++- public/i18n/nl/common.json | 15 --------------- public/i18n/nl/dashboard.json | 17 ----------------- public/i18n/nl/footer.json | 5 ----- public/i18n/nl/lists.json | 12 ------------ public/i18n/nl/location.json | 10 ---------- public/i18n/nl/login.json | 7 ------- public/i18n/nl/query-log.json | 6 ------ src/components/ForwardDestinationsChart.js | 2 +- 10 files changed, 6 insertions(+), 75 deletions(-) delete mode 100644 public/i18n/nl/common.json delete mode 100644 public/i18n/nl/dashboard.json delete mode 100644 public/i18n/nl/footer.json delete mode 100644 public/i18n/nl/lists.json delete mode 100644 public/i18n/nl/location.json delete mode 100644 public/i18n/nl/login.json delete mode 100644 public/i18n/nl/query-log.json diff --git a/public/i18n/en/dashboard.json b/public/i18n/en/dashboard.json index 12d768d..31be4b0 100644 --- a/public/i18n/en/dashboard.json +++ b/public/i18n/en/dashboard.json @@ -18,5 +18,6 @@ "Client activity from {{from}} to {{to}}": "Client activity from {{from}} to {{to}}", "{{percent}}% of {{total}}": "{{percent}}% of {{total}}", "No Clients Found": "No Clients Found", - "No Domains Found": "No Domains Found" + "No Domains Found": "No Domains Found", + "Queries Answered By Destination": "Queries Answered By Destination" } \ No newline at end of file diff --git a/public/i18n/es/dashboard.json b/public/i18n/es/dashboard.json index 9df6258..a8fa408 100644 --- a/public/i18n/es/dashboard.json +++ b/public/i18n/es/dashboard.json @@ -16,5 +16,7 @@ "Total Queries": "Peticiones totales", "Blocked Queries": "Bloqueadas", "Client activity from {{from}} to {{to}}": "Actividad del cliente {{from}} a {{to}}", - "{{percent}}% of {{total}}": "{{percent}}% de {{total}}" + "{{percent}}% of {{total}}": "{{percent}}% de {{total}}", + "No Clients Found": "No se han encontrado clientes", + "No Domains Found": "No se han encontrado Dominios" } \ No newline at end of file diff --git a/public/i18n/nl/common.json b/public/i18n/nl/common.json deleted file mode 100644 index 156c19b..0000000 --- a/public/i18n/nl/common.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "Status": "toestand", - "Donate": "schenken", - "Domain": "Domein", - "Hits": "Hits", - "Frequency": "Frequentie", - "Client": "Cliënt", - "Requests": "verzoeken", - "Add": "Toevoegen", - "Time": "Tijd", - "Type": "Type", - "Action": "Actie", - "Enabled": "Activeren", - "Disabled": "Deactiveren" -} \ No newline at end of file diff --git a/public/i18n/nl/dashboard.json b/public/i18n/nl/dashboard.json deleted file mode 100644 index 1f78b42..0000000 --- a/public/i18n/nl/dashboard.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Domains On Blocklist": "Domeinen op blacklist", - "Query Types": "Query Types", - "Forward Destinations": "forward bestemmingen", - "Top Permitted Domains": "Top Domeinen", - "Top Blocked Domains": "Top Adverteerders", - "Top Clients": "Top Cliënten", - "Total Queries ({{count}} clients)": "", - "Total Queries ({{count}} clients)_plural": "", - "Queries Blocked": "Geblokkeerde querys", - "Percent Blocked": "Procent geblokkeerd", - "Queries Over Last 24 Hours": "Queries over de laatste 24 uur", - "Queries Answered By": "Querys beantword door", - "Queries from {{from}} to {{to}}": "Querys van naar", - "Total Queries": "Totaal aantal querys", - "Blocked Queries": "Geblokkeerde querys" -} \ No newline at end of file diff --git a/public/i18n/nl/footer.json b/public/i18n/nl/footer.json deleted file mode 100644 index 4aace06..0000000 --- a/public/i18n/nl/footer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "if you found this useful": "Als u dit nuttig vond", - "Core Version": "Pi-hole Version", - "Web Version": "Web Interface Version" -} \ No newline at end of file diff --git a/public/i18n/nl/lists.json b/public/i18n/nl/lists.json deleted file mode 100644 index 3c08a11..0000000 --- a/public/i18n/nl/lists.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Adding {{domain}}...": "Het toevoegen aan de", - "Successfully added {{domain}}": "Toegevoegd aan de lijst", - "Failed to add {{domain}}": "Verzuimde", - "Note: Whitelisting a subdomain of a wildcard blocked domain is not possible.": "Opgelet: Het whitelisten van een subdomein of wildcard van een geblokkeerd domein is niet mogelijk.", - "Note: Only the domain and subdomains of the blocked domain will be blocked.": "Opgelost: Alleen het domein en subdomein van het domein zullen worden geblokkeerd.", - "Add a domain (example.com or sub.example.com)": "Voeg domein toe (example.com of sub.example.com)", - "{{domain}} is already added": "is reeds toegevoegd", - "Failed to remove {{domain}}": "Mislukt om te verwijderen", - "There are no domains in this list": "Er zijn geen domeinen in deze lijst", - "Input a regular expression": "Voer een reguliere expressie in" -} \ No newline at end of file diff --git a/public/i18n/nl/location.json b/public/i18n/nl/location.json deleted file mode 100644 index b08650a..0000000 --- a/public/i18n/nl/location.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Query Log": "Query Log", - "Whitelist": "whitelist", - "Blacklist": "blacklist", - "Dashboard": "Dashboard", - "Exact": "Exact", - "Login": "Login", - "Logout": "Uitloggen", - "Regex": "Reguliere expressie" -} \ No newline at end of file diff --git a/public/i18n/nl/login.json b/public/i18n/nl/login.json deleted file mode 100644 index a23880a..0000000 --- a/public/i18n/nl/login.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Password": "Wachtwoord", - "Sign in to start your session": "Log in om uw sessie te starten", - "Log in": "Log in", - "Forgot Password": "Wachtwoord vergeten", - "Wrong Password!": "Foutief wachtwoord!" -} \ No newline at end of file diff --git a/public/i18n/nl/query-log.json b/public/i18n/nl/query-log.json deleted file mode 100644 index 96f561c..0000000 --- a/public/i18n/nl/query-log.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Blocked": "Geblokkeerd", - "Allowed (forwarded)": "Toegestaan (doorgestuurd)", - "Blocked (regex)": "Geblokkeerd (reguliere expressie)", - "Blocked (blacklist)": "Geblokkeerd (blacklist)" -} \ No newline at end of file diff --git a/src/components/ForwardDestinationsChart.js b/src/components/ForwardDestinationsChart.js index 11641c5..34b623f 100644 --- a/src/components/ForwardDestinationsChart.js +++ b/src/components/ForwardDestinationsChart.js @@ -94,7 +94,7 @@ class ForwardDestinationsChart extends Component { tooltips: { enabled: true, callbacks: { - title: () => t("Queries Answered By"), + title: () => t("Queries Answered By Destination"), label: (tooltipItems, data) => { const dataset = data.datasets[tooltipItems.datasetIndex]; const label = data.labels[tooltipItems.index];