Mcat12
fef0e9d2d0
Change ListPage tests to use toExist instead of toHaveLength
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-05-12 14:38:00 -07:00
Mcat12
ab6455d48b
Allow an Alert to be non-dismissible and use it in DomainList
...
Also improved DomainList tests.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-05-12 14:37:57 -07:00
Mcat12
3f3bed566e
Bring list folder coverage to 100% by adding/improving ListPage tests
...
Also used `jest.spyOn` where possible to avoid directly manipulating
the component's methods.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-05-12 14:37:54 -07:00
Mcat12
bd9b47b4eb
Rename ListPage's event handler props to onX
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-05-12 14:37:50 -07:00
Mark Drobnak
355339fdb8
Merge pull request #178 from pi-hole/feature/dhcp-rapid-commit
...
Add DHCP rapid commit checkbox
2019-05-12 17:08:04 -04:00
Mark Drobnak
046dbfdda3
Merge branch 'development' into feature/dhcp-rapid-commit
2019-05-12 17:04:10 -04:00
Mcat12
591999f629
Set DHCP rapid commit default to true
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-05-12 14:01:19 -07:00
Mark Drobnak
35add81eb4
Merge pull request #176 from pi-hole/tweak/more-tests
...
Improve util test coverage
2019-05-12 16:53:33 -04:00
Mark Drobnak
8222a9c55f
Merge branch 'development' into tweak/more-tests
2019-05-12 16:49:35 -04:00
Mark Drobnak
63ada8abdc
Merge branch 'development' into feature/dhcp-rapid-commit
2019-05-12 16:32:39 -04:00
Mark Drobnak
3565d71b7d
Merge pull request #179 from pi-hole/tweak/version-0.1.0
...
This aligns the version with the API, so both components start at the
same version. The reason it was 1.0.0 was due to basing the project on
CoreUI, which used 1.0.0-alpha.6 as the version.
Signed-off-by: Mcat12 <mark.drobnak@gmail.com >
2019-05-12 16:31:28 -04:00
Mcat12
b0e14d4cbb
Reset version to 0.1.0
...
This aligns the version with the API, so both components start at the
same version. The reason it was 1.0.0 was due to basing the project on
CoreUI, which used 1.0.0-alpha.6 as the version.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-05-12 13:14:18 -07:00
Mcat12
49ef4d902a
Add DHCP rapid commit checkbox
...
Requires pi-hole/api#139
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-05-04 15:20:40 -07:00
pralor
6a9b88fd49
New Crowdin translations ( #170 )
2019-05-01 19:34:20 -04:00
Mcat12
0a565b9259
Fix languages.json import error when running tests
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-14 15:50:47 -07:00
Mcat12
9326988168
Add tests for getBasePath
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-14 15:33:54 -07:00
Mcat12
a942e83132
Fix issues caused by merge conflicts
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-14 15:26:49 -07:00
Mcat12
d68530a4ea
Merge branch 'development' into tweak/more-tests
...
# Conflicts:
# src/util/CancelablePromise.tsx
# src/util/http.tsx
2019-04-14 15:21:39 -07:00
Mark Drobnak
3c2dd921f1
Merge pull request #175 from pi-hole/fix/ip-address-port-validation
...
Require `:` between IP address and ports instead of `#`
2019-04-14 14:53:42 -04:00
Mark Drobnak
66dd6221fc
Merge branch 'development' into fix/ip-address-port-validation
2019-04-14 14:51:44 -04:00
Mark Drobnak
9b9685716e
Merge pull request #173 from pi-hole/feature/relative-paths
...
Use relative paths when loading resources, and use injected base path
2019-04-14 14:51:29 -04:00
Mcat12
cc044e9a64
Add i18n test
...
Now the util folder has 100% coverage.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-13 20:07:31 -07:00
Mcat12
c9f69815fd
Add tests for ApiClient
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-13 18:28:14 -07:00
Mcat12
2189c1410f
Add more tests for HttpClient
...
This brings the http.tsx file up to 100% coverage.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-13 16:47:47 -07:00
Mcat12
209d0bab62
Consolidate and improve response handling in HttpClient
...
The `catch(convertJSON)` call was in practice just rethrowing the error.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-13 16:47:11 -07:00
Mcat12
8253c68586
Fix development API path always using fakeAPI
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-13 16:45:22 -07:00
Mcat12
2f72c9a2b8
Add tests for paramsToString and timeRangeToParams
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-12 18:06:40 -07:00
Mcat12
4e81f16ece
Improve type-safety in HttpClient and CancelablePromise
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-11 22:12:43 -07:00
Mcat12
3f54f321a8
Convert http methods and api methods into classes
...
This will make it easier to test them.
Some other included changes:
- Added/fixed return types on some API methods and their usages.
- Added tests for convertJSON, checkForErrors, and urlFor.
- Added apiPath to the config. This stores the API's base path.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-11 21:43:46 -07:00
Mcat12
f79316e235
Add tests for checkIfLoggedOut
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-10 20:46:44 -07:00
Mcat12
e31ed2f1af
Move graph utils to new file and add tests
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-09 21:08:15 -07:00
Mcat12
fde34be4a3
Move cancelable promises to new file and add tests
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-09 20:55:02 -07:00
Mcat12
cf4affc230
Fix description in license of API service tests
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-09 20:06:12 -07:00
Mcat12
13722eaf9c
Add tests for Result classes
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-09 20:05:51 -07:00
Mcat12
22e1498efb
Require : between IP address and ports instead of #
...
The API requires `:` and is how ports are commonly associated with IP
addresses. The only reason `#` was used was to more easily insert it
into dnsmasq's config (when PHP and Bash were used for the API).
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-08 19:11:24 -07:00
Mcat12
80462ba3b6
Use relative paths when loading resources, and use injected base path
...
The API will inject a base path via the `<base>` element when serving
the web interface. This will be used as the base path for resolving
relative paths.
These changes allow the web interface to be hosted on any path.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-04-06 16:58:16 -07:00
Mark Drobnak
e80e4282c6
Merge pull request #172 from pi-hole/tweak/list-hostname-validation
...
Allow the lists to have hostnames instead of just domains
2019-03-29 12:25:05 -04:00
Mcat12
0144a6cce1
Note that hostnames can be added to lists
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-03-28 20:01:31 -07:00
Mcat12
97a34ba9c9
Allow the lists to have hostnames instead of just domains
...
See pi-hole/api#124
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-03-27 21:31:03 -07:00
Mark Drobnak
14d8f9c382
Merge pull request #171 from pi-hole/fix/double-authenticate
...
Fix sending the authentication request twice on the login screen
2019-03-27 20:24:02 -04:00
Mcat12
15b30bd3d2
Fix sending the authentication request twice on the login screen
...
If you click "Enter" on your keyboard, it will fire off a form submitted
event which will run the authentication code. However, it will run the
authentication again with a possibly password due to the key down event
handler. This event handler is no longer needed because we have the form
submit handler.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-03-26 22:46:41 -07:00
Mark Drobnak
e5549915e7
Merge pull request #169 from pi-hole/fix/mobile-long-term-stats
...
Add time range selector to dashboard when in mobile view
2019-03-23 19:55:56 -04:00
Mcat12
0135c90912
Add time range selector to dashboard when in mobile view
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-03-22 19:25:49 -07:00
Mark Drobnak
da88961501
Merge pull request #163 from pi-hole/fix/long-term-fake-data
...
Add fake data for long term stats
2019-03-21 21:58:56 -04:00
Mark Drobnak
2dec6599b0
Merge branch 'development' into fix/long-term-fake-data
2019-03-21 21:57:47 -04:00
pralor
0e4ae1d764
New Crowdin translations ( #162 )
...
Signed-off-by: Mark Drobnak <mark.drobnak@gmail.com >
2019-03-21 21:47:06 -04:00
Mcat12
dc39724aaf
Add fake data for long term stats
...
The fake data suite has been expanded to cover the long term stats
endpoints.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2019-03-18 20:02:22 -07: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