Commit Graph
893 Commits
Author SHA1 Message Date
pralor 0e4ae1d764 New Crowdin translations (#162)
Signed-off-by: Mark Drobnak <mark.drobnak@gmail.com>
2019-03-21 21:47:06 -04:00
Mark Drobnak 6fd2f61189 Merge pull request #161 from pi-hole/fix/query-log-debounce
Load new pages in the Query Log faster
2019-03-18 21:00:51 -04:00
Mark Drobnak f2017f80eb Merge branch 'development' into fix/query-log-debounce 2019-03-18 20:51:26 -04:00
Mark Drobnak 8f26379b9c Merge pull request #160 from pi-hole/feature/dashboard-database-stats
Long Term Data Support in the Dashboard
2019-03-18 20:51:16 -04:00
Mcat12 b7c71ec304 Load new pages in the Query Log faster
Previously each time data needed to be fetched for the query log, it was
debounced for 350ms. This includes fetching new pages when the user
clicks "Next", which causes unnecessary slowdowns. The actual time it
takes to fetch a new page is usually around 20ms, but when it's
debounced it takes 370ms.

The logic is that if the filters have not changed, then don't debounce
the call. The debounce mechanism is only there to prevent multiple calls
when the filters are in flux (user is typing in the search box).

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 20:37:46 -07:00
Mcat12 5b7438eb98 Use a loading indicator in the range name of the graphs when loading
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 19:09:37 -07:00
Mcat12 d8fd902fc0 Show loading state on dashboard when fetching different time range
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 19:03:53 -07:00
Mcat12 740405a08c Only show the long term stats selector when logged in
The API does not allow long term stats lookups when not logged in.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:45:15 -07:00
Mcat12 f9fcb65e3b Add long term stats support to the top clients table
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:45:12 -07:00
Mcat12 3c22ec87cb Add long term stats support to the top blocked domains table
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:45:09 -07:00
Mcat12 eeb9aa9165 Add long term stats support to the top domains table
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:45:06 -07:00
Mcat12 efa07d3f81 Add long term stats support to the upstreams chart
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:45:03 -07:00
Mcat12 10a331e254 Add long term stats support to the query types chart
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:45:01 -07:00
Mcat12 f71367e2a0 Add long term stats support to the clients graph
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:44:58 -07:00
Mcat12 0e56c12c31 Add long term stats support to the queries graph
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:44:55 -07:00
Mcat12 b56f7fe64d Fix dateRanges to only calculate dates once
This fixes preconfigured dates showing up as custom.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:44:51 -07:00
Mcat12 6c20227957 Use TimeRangeSelector in the Query Log
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:44:48 -07:00
Mcat12 66afbae21d Add support for not showing the label in TimeRangeSelector
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:44:45 -07:00
Mcat12 4142d98ff3 Localize dateRanges and move to separate file
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:44:42 -07:00
Mcat12 b88df8d10d Add time range selector to dashboard and integrate summary stats
The time range selector shows the currently selected time range (uses
the label for predefined ranges).

The summary stats will change to using the database call when the
time range is not "Last 24 Hours". Also, when using the database call it
will only make the call once instead of updating periodically.

The date ranges were taken from the Query Log, so it has also been
updated to default to the last 24 hours. This makes more sense than
using "Today", as it now matches the dashboard's default range.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-17 18:44:08 -07:00
Mcat12 8a2fe4b399 Fix TimeRangeContext not propagating value updates
It needs the provider to re-render to update. This is a good place to
start using React Hooks:
https://reactjs.org/docs/hooks-intro.html

React has been updated to 16.8 so we can use Hooks.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-16 13:09:35 -07:00
Mcat12 154ed626ae Add TimeRangeContext
This will be used by the dashboard to control the time range of stats
to pull from the database.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-12 20:18:43 -07:00
Mcat12 2b092ed3b0 Refactor context code into separate files and add more documentation
If the preferences context fails to load the preferences, it now checks
cache again for the freshest preference data.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-12 19:52:11 -07:00
Mark Drobnak 4157e19cdb Merge pull request #159 from pi-hole/tweak/crowdin-pr-checks
Re-enable builds on Crowdin branches and fix DCO email issue
2019-03-12 21:55:10 -04:00
Mcat12 78452d62fe Re-enable builds on Crowdin branches and fix DCO email issue
Crowdin synchronization has been limited to run once every three hours,
so it is safe to re-enable CI builds. Pralor's GitHub email will be used
for the DCO sign-off, as DCO bot doesn't like the pi-hole.net address.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-12 17:57:28 -07:00
pralor b3b1bb7c1b New Crowdin translations (#146)
* New translations api-errors.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations common.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations dashboard.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations location.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations login.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Bulgarian)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations dashboard.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations footer.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations lists.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations location.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations login.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations query-log.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Romanian)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations lists.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations location.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations footer.json (Slovenian)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations lists.json (Slovenian)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations common.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations location.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations common.json (Turkish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Turkish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations common.json (Turkish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations location.json (Turkish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Turkish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Turkish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations common.json (Turkish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations dashboard.json (Turkish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations lists.json (Turkish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations login.json (Turkish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Turkish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations query-log.json (Turkish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Italian)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations common.json (Italian)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations location.json (Italian)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations login.json (Italian)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Italian)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations query-log.json (Italian)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Italian)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations location.json (Italian)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations common.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations dashboard.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations dashboard.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations footer.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations lists.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations location.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations login.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations query-log.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations lists.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations query-log.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Greek)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations footer.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations lists.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations common.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations dashboard.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations lists.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations login.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations query-log.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (French)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (French)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (French)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations common.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations location.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations query-log.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations common.json (French)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations location.json (French)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations settings.json (Spanish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations api-errors.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations common.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations dashboard.json (Catalan)
Signed-off-by: pralor <pralor-bot@pi-hole.net>

* New translations preferences.json (Swedish)
Signed-off-by: pralor <pralor-bot@pi-hole.net>
2019-03-12 00:01:23 -04:00
Mark Drobnak 98b7716ab8 Merge pull request #156 from pi-hole/tweak/type-tweaks
Tweaks to type usage
2019-03-02 13:35:59 -05:00
Mark Drobnak e2b7c6f19a Merge branch 'development' into tweak/type-tweaks 2019-03-02 13:22:40 -05:00
Mark Drobnak 8eb48e49d7 Merge pull request #157 from pi-hole/feature/cache-web-preferences
Cache the web interface preferences in local storage
2019-03-02 13:22:23 -05:00
Mark Drobnak 2d1029ddd7 Merge branch 'development' into feature/cache-web-preferences 2019-03-02 13:18:38 -05:00
Mark Drobnak fb5dd7689d Merge pull request #158 from pi-hole/tweak/security-update
Update dependencies according to npm audit
2019-03-02 13:18:16 -05:00
Mcat12 320463f728 Update dependencies according to npm audit
Before this PR:
> found 688 vulnerabilities (64 low, 623 moderate, 1 high)

After this PR:
> found 64 low severity vulnerabilities

The remaining vulnerabilities require a create-react-app update, which
is tracked here: facebook/create-react-app#6443

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-01 21:57:34 -08:00
Mcat12 563ac8acc8 Cache the web interface preferences in local storage
As part of this change, updating the language with i18n was moved from
`PreferenceSettings` into a new `LanguageApplier` component. Also, the
alert message translation process in `PreferenceSettings` was
refactored. A new dev dependency, `jest-localstorage-mock`, was added to
help test the preferences cache implementation.

See #155

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-01 21:18:10 -08:00
Mcat12 ce177ba4ca Use optional parameters when possible
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-01 19:42:59 -08:00
Mcat12 10d6570d50 Specify language type when mapping languages in PreferenceSettings
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-03-01 19:38:23 -08:00
Mark Drobnak 34af02547a Merge pull request #149 from pi-hole/feature/crowdin-languages-json-support
Update the build system to automatically update languages.json
2019-02-28 16:35:18 -05:00
Mark Drobnak 21b60f71a1 Merge branch 'development' into feature/crowdin-languages-json-support 2019-02-28 16:33:45 -05:00
Mark Drobnak 4afaeafcc7 Merge pull request #152 from pi-hole/tweak/readme-instructions
Add "Real Data" section to readme, and recommend start-fake at first
2019-02-28 16:33:34 -05:00
Mark Drobnak d717f6d93a Merge branch 'development' into feature/crowdin-languages-json-support 2019-02-28 12:27:28 -05:00
Mark Drobnak 8f6597d45b Merge branch 'development' into tweak/readme-instructions 2019-02-28 12:26:57 -05:00
Mark Drobnak 65ac18a4dd Merge pull request #154 from pi-hole/feature/docker
Use a custom docker build container
2019-02-23 03:19:56 -05:00
Mcat12 249393d2f4 Use a custom docker build container
The docker container is based off of `node:8`, and includes ghr for
GitHub Releases.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-02-22 19:56:41 -08:00
Mark Drobnak 964c4656f8 Merge branch 'development' into tweak/readme-instructions 2019-02-21 23:56:06 -05:00
Mark Drobnak cfc82dea77 Merge pull request #151 from pi-hole/tweak/dnssec-unknown-and-fake-history
Use orange for unknown DNSSEC status, and improve history fake data
2019-02-21 23:09:28 -05:00
Mcat12 376d0f6b73 Add "Real Data" section to readme, and recommend start-fake at first
The instructions now recommend running the `start-fake` target, as most
people will not have their settings configured for running with a real
API.

A new section, similar to the fake data section, has been added to talk
about testing with data from a real API instance.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-02-19 19:31:21 -08:00
Mcat12 f7a14becdc Add languages.json to the gitignore
It is generated as part of the build, so it does not need to be tracked
in the repository.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-02-19 19:20:05 -08:00
Mark Drobnak 2f8a899c7e Merge branch 'development' into tweak/dnssec-unknown-and-fake-history 2019-02-19 22:14:06 -05:00
Mcat12 7228282c4b Add comments to identify the DNSSEC status each color is mapped to
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-02-19 19:13:33 -08:00
Mcat12 8e23ae5396 Use orange for unknown DNSSEC status, and improve history fake data
pi-hole/AdminLTE#909 changes DNSSEC Unknown to use orange instead of
red.

The fake data would only show certain values if `Math.random` returned
exactly 1. This was changed so the values would have a better chance of
getting shown.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-02-17 10:31:11 -08:00
Mark Drobnak 2e67020e1b Merge pull request #150 from pi-hole/fix/github-pages-routing
Support refreshing on GitHub Pages
2019-02-16 15:42:15 -05:00