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
Mcat12
d09fbe8284
Support refreshing on GitHub Pages
...
GitHub Pages does not support client-side routing, so when a user is on
`/whitelist` and refreshes, they get a 404 because there is no
`whitelist` file on the server. This is fixed by adding a custom 404
page which handles redirecting to index.html with the original path.
Credit for this goes to https://github.com/rafrex/spa-github-pages
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-02-16 12:21:52 -08:00
Mcat12
e5c820ced0
Update the build system to automatically update languages.json
...
The `languages.json` file is regenerated whenever the web interface is
started or built. This PR also updates the language list with the
languages added by #145 .
See #148
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-02-15 19:12:45 -08:00
Mark Drobnak
4eb60085f5
Merge pull request #147 from pi-hole/fix/circle-ci-crowdin-builds
...
Prevent CircleCI from building on Crowdin branches
2019-02-15 00:54:24 -05:00
Dan Schaper
6c1a710724
Merge branch 'development' into fix/circle-ci-crowdin-builds
2019-02-14 21:50:33 -08:00
Mcat12
a4a5bd07e4
Prevent CircleCI from building on Crowdin branches
...
Crowdin pushes a commit for every localization file change, which
triggers a build each time (there are a LOT of commits). The changes on
the branch are just the localization files, so no build is required.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-02-14 21:48:50 -08:00
Mark Drobnak
f471cd6d9f
Merge pull request #145 from pi-hole/l10n_development
...
New Crowdin translations
2019-02-14 23:00:02 -05:00
pralor
9f211be34c
New translations settings.json (Croatian)
...
Signed-off-by: pralor <pralor-bot@pi-hole.net >
2019-02-14 06:13:16 -06:00
pralor
d54a99f5e7
New translations common.json (Dutch)
...
Signed-off-by: pralor <pralor-bot@pi-hole.net >
2019-02-14 06:13:15 -06:00
pralor
a2330fca56
New translations dashboard.json (Dutch)
...
Signed-off-by: pralor <pralor-bot@pi-hole.net >
2019-02-14 06:13:14 -06:00
pralor
51c435872b
New translations footer.json (Dutch)
...
Signed-off-by: pralor <pralor-bot@pi-hole.net >
2019-02-14 06:13:13 -06:00
pralor
c5c7f0c07f
New translations lists.json (Dutch)
...
Signed-off-by: pralor <pralor-bot@pi-hole.net >
2019-02-14 06:13:12 -06:00
pralor
364261964e
New translations location.json (Dutch)
...
Signed-off-by: pralor <pralor-bot@pi-hole.net >
2019-02-14 06:13:11 -06:00
pralor
311d677c06
New translations login.json (Dutch)
...
Signed-off-by: pralor <pralor-bot@pi-hole.net >
2019-02-14 06:13:10 -06:00
pralor
ab69fb7d3e
New translations preferences.json (Dutch)
...
Signed-off-by: pralor <pralor-bot@pi-hole.net >
2019-02-14 06:13:09 -06:00
pralor
e3ad7f2b04
New translations query-log.json (Dutch)
...
Signed-off-by: pralor <pralor-bot@pi-hole.net >
2019-02-14 06:13:08 -06:00
pralor
83960fc478
New translations settings.json (Dutch)
...
Signed-off-by: pralor <pralor-bot@pi-hole.net >
2019-02-14 06:13:07 -06:00
pralor
99533cf7b9
New translations api-errors.json (Polish)
...
Signed-off-by: pralor <pralor-bot@pi-hole.net >
2019-02-14 06:13:06 -06:00
pralor
0712b48955
New translations common.json (Polish)
...
Signed-off-by: pralor <pralor-bot@pi-hole.net >
2019-02-14 06:13:05 -06:00