Commit Graph
510 Commits
Author SHA1 Message Date
Mcat12 ef39aff53d Update translations for new settings strings
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-08 23:04:53 -05:00
Mcat12 eadde4ddc5 Show progress and result of saving DHCP settings
The submit button is disabled while the settings are being processed.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-08 22:53:59 -05:00
Mcat12 6177dcc9ae Add default argument for onClick in Alert
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-08 22:50:47 -05:00
Mcat12 87627a1d30 Add api-errors to the list of translation tags, and update translations
The threshold for downloading languages has been lowered to 70%.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-08 22:19:33 -05:00
Mcat12 042d468a04 Translate API errors
The API errors are translated based off of the error key. If the error
was a JavaScript error (Error type), then the message should already
be translated.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-08 16:37:53 -05:00
Mcat12 1c2d881ae1 Send a DHCP settings update request when DHCP settings are applied
If an error is returned, it is shown at the top of the form.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-08 15:53:00 -05:00
Mcat12 aadadca1b2 Add updateDHCPInfo to the api endpoints
Required adding a `put` method for making PUT requests

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-08 15:50:06 -05:00
Mcat12 07c37b2a8a Handle API errors better by handling rejected promises from fetch
Some statuses (such as 500) are returned as rejected promises by fetch.
These responses are now caught and handled as normal API responses
(checking for errors later). If fetch returns an Error, that is kept as
a rejected promise.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-08 15:48:54 -05:00
Mcat12 8c39914f46 Don't refresh DHCP settings after page load
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-08 12:10:44 -05:00
Mark Drobnak 256d747ae4 Merge pull request #104 from pi-hole/feature/allow-empty-dhcp-setting
Allow empty DHCP settings if DHCP is not enabled
2018-11-05 17:12:49 -05:00
Mcat12 a6874f202b Allow empty DHCP settings if DHCP is not enabled
Previously you could put any values in the DHCP settings if it was
disabled. Now you must have either valid settings or empty settings when
DHCP is disabled. This avoids sending arbitrary setting strings to the
API.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-05 16:49:23 -05:00
Mark Drobnak 4a414c50e1 Merge pull request #97 from miro1091/footer-dev
Dont Show Versions In Footer
2018-11-05 13:22:32 -05:00
Mcat12 aa669330cf Update Translations
This adds the "Update Available" text, among other updates.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-05 13:18:28 -05:00
Mark Drobnak fe7284fa97 Merge branch 'development' into footer-dev 2018-11-05 13:07:44 -05:00
Mark Drobnak c8d3db377b Merge pull request #103 from pi-hole/feature/network-settings
DHCP Settings
2018-11-05 13:06:44 -05:00
Mcat12 7d64bb33f8 Make sure IPv4 addresses can not contain segments greater than 255
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-05 12:59:52 -05:00
Mcat12 1895b106ff Rename isStrictPositiveNumber to isPositiveNumber
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-05 12:39:19 -05:00
Mcat12 bc8e38cfce Add validation to DHCP settings
The button is not yet rigged to save the settings, but it is only
enabled if all of the settings are valid.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-05 12:01:22 -05:00
Mcat12 e51f210335 Don't use arbitrary strings for loading and error states in settings
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-05 11:59:59 -05:00
Mcat12 bc12f17e1e Add isValidIpv4
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-05 11:54:52 -05:00
Mcat12 cd53df4b96 Fix margins on checkboxes
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-05 11:47:17 -05:00
Mcat12 395989b8ef Rename isStrictNumeric to isStrictPositiveNumber and fix edge case
It would return true for an empty string.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-05 11:45:33 -05:00
mledecky1091 854cb4b3d8 footer updates
Signed-off-by: mledecky1091 <marekmatej.firma@gmail.com>
2018-11-01 08:25:35 +01:00
Mcat12 29a169b190 Run the formatter
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-10-30 23:15:46 -04:00
Mcat12 2896baf075 Use a form grid for DHCP settings
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-10-30 23:14:41 -04:00
Mcat12 71a4308800 Disable DHCP settings when DHCP is not enabled
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-10-30 23:14:37 -04:00
Mcat12 d8e0b26511 Convert DHCPInfo into a simple form setup
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-10-30 23:14:34 -04:00
Mcat12 1a5181fce0 Remove <Fragment> from NetworkInfo
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-10-30 23:14:14 -04:00
Mark Drobnak 51ba581d93 Merge pull request #98 from pi-hole/fix/domain-input-empty
Don't handle empty input in DomainInput
2018-10-26 01:42:37 -04:00
Mcat12 438e8bf890 Reformat DomainInput
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-10-26 01:31:24 -04:00
Mcat12 7fddc47d44 Don't handle empty input in DomainInput
The test was broken when the component changed to use a form, because
simply clicking the button didn't activate the handler.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-10-26 01:30:20 -04:00
Mark Drobnak 1836a32683 Merge pull request #94 from bgalek/invalid_regex_blocked
Validate Regex Input in Regex Blacklist
2018-10-26 01:00:47 -04:00
Bartosz Galek 0cfaa5e79e #85 regex valdation added
Signed-off-by: Bartosz Galek <bartosz.galek@allegro.pl>
2018-10-25 17:19:51 +02:00
Mark Drobnak df123cf109 Merge pull request #95 from pi-hole/ci/formatter
Use a Formatter for Consistent Code Style
2018-10-21 15:24:00 -04:00
Mcat12 ba3901dc6e Fix error caused by formatter in QueryLog
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-10-21 15:20:21 -04:00
Mcat12 1dcdd23f02 Add Prettier and format code
Formatting is checked in CI

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-10-21 15:12:48 -04:00
Mark Drobnak 434f8e6daa Merge pull request #92 from slavabez/validate-feature
Validate Input for Whitelist and Blacklist (Exact)
2018-10-21 13:06:07 -04:00
Mcat12 33092a038f Update translations
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-10-21 12:48:41 -04:00
Mcat12 bc773c3dce Make the validation error a ListPage prop
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-10-21 12:48:37 -04:00
Slava Bezgachev bb55832012 Merge pull request #1 from slavabez/merge-me
Merge remote-tracking branch 'origin/development' into domain-validat…
2018-10-21 22:40:50 +06:00
Slava Bezgachev e3c7e3ea33 Merge remote-tracking branch 'origin/development' into domain-validate-feature 2018-10-21 22:38:20 +06:00
Mark Drobnak 966d2b91c4 Merge branch 'development' into validate-feature 2018-10-21 12:22:55 -04:00
Slava Bezgachev 8eff1d562a Added development branches version of package-lock, fingers crossed tests pass
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-21 22:02:23 +06:00
Slava Bezgachev 7842ba6754 Moved isValid function higher to be a prop of ListPage to allow for more flexible usage
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-21 21:46:27 +06:00
Slava Bezgachev b7f8aad6d8 Renamed validationFunction to isValid
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-21 11:43:14 +06:00
Slava Bezgachev 113ffa7ba2 Removed redundant parameter
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-20 10:22:03 +06:00
Slava Bezgachev eef8ca8415 Slight refactor
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-20 10:19:28 +06:00
Slava Bezgachev da0f429bd0 Forgot to change the string
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-20 10:16:54 +06:00
Slava Bezgachev 31ac0396b2 Added reviewed changes
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-20 10:16:17 +06:00
Mark Drobnak a9d9d3a978 Merge pull request #89 from slavabez/development
Upgraded react-scripts to v2, removed npm vulnerabilities
2018-10-19 12:38:06 -04:00