Commit Graph
497 Commits
Author SHA1 Message Date
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
Mark Drobnak 2d352b6bde Merge branch 'development' into development 2018-10-19 12:36:11 -04:00
Slava Bezgachev eebddf449f Rolled the handlechange function to original
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-19 09:44:00 +06:00
Slava Bezgachev e27cc4235e Altered the validation functions a little for clarity
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-19 09:40:02 +06:00
Slava Bezgachev 1be9944f57 updated file header text for tests
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-19 09:33:43 +06:00
Slava Bezgachev c78f3f626b Updated as per the code review
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-19 09:27:17 +06:00
Slava Bezgachev d59130a413 Fixed the tests. Changed simulating button clicks to simulating a form submission. Tests should pass now
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-18 22:22:27 +06:00
Slava Bezgachev 4dbdbfb357 Made the changes, now to fix the broken tests
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-18 22:09:48 +06:00
Slava Bezgachev 858bc5bec9 Changed <div> to <form>, allows for "native" press Enter to submit
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-18 21:56:46 +06:00
Slava Bezgachev c5e178f986 Boy am I bad with regex. Fixed tests, seems ok for now
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-18 21:48:34 +06:00
Slava Bezgachev 359477f67b Adding fairly comprehensive tests, some still need fixing
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-18 21:36:13 +06:00
Slava Bezgachev eac8cbdf03 Added first version of the validate functions, now to test them
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-18 20:35:44 +06:00
Slava Bezgachev 790ed513b8 FIxed typos and errors, moved validate to separate file
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-18 20:09:36 +06:00
Slava Bezgachev 4f5c2cea24 Changed the problematic a tag for a button tag, as suggested by react-scripts. Had to add some custom styles
Signed-off-by: Slava Bezgachev <bezgachev@gmail.com>
2018-10-18 19:48:20 +06:00