Compare commits

..

304 Commits

Author SHA1 Message Date
dependabot-preview[bot]
f6bb77ce71 Upgrade to GitHub-native Dependabot 2021-04-28 22:18:14 +00:00
Henry Whitaker
2ed811e949 Merge pull request #520 from henrywhitaker3/dev 2021-03-07 11:03:27 +00:00
Henry Whitaker
99d80ed235 Merge pull request #517 from henrywhitaker3/alpha 2021-03-07 09:14:04 +00:00
Henry Whitaker
9541117125 Update phpunit xml 2021-03-07 09:10:49 +00:00
Henry Whitaker
db7e307b20 workflow update 2021-03-07 09:02:29 +00:00
Henry Whitaker
e90619b536 Add php version 2021-03-07 09:00:13 +00:00
Henry Whitaker
fa58ab0168 again 2021-03-07 08:58:31 +00:00
Henry Whitaker
c98ddc74c1 Just nuked it this time 2021-03-07 08:53:37 +00:00
Henry Whitaker
2d6e00f51b Fix the fucking lock file 2021-03-07 08:50:25 +00:00
Henry Whitaker
744f045ccf Update stuff 2021-03-07 08:48:35 +00:00
Henry Whitaker
56e3b15e75 Merge pull request #516 from henrywhitaker3/dependabot/composer/dev/facade/ignition-2.5.14 2021-03-07 08:40:33 +00:00
Henry Whitaker
8468ffc022 Merge branch 'alpha' into dependabot/composer/dev/facade/ignition-2.5.14 2021-03-07 08:40:26 +00:00
Henry Whitaker
7fece6fd89 Merge pull request #514 from henrywhitaker3/dependabot/npm_and_yarn/dev/react-bootstrap-1.5.1
Bump react-bootstrap from 1.4.0 to 1.5.1
2021-03-07 08:38:51 +00:00
Henry Whitaker
c5c3a54809 Merge pull request #513 from henrywhitaker3/dependabot/composer/dev/laravel/tinker-2.6.1 2021-03-07 08:38:36 +00:00
Henry Whitaker
2837f9f031 Merge branch 'alpha' into dependabot/composer/dev/laravel/tinker-2.6.1 2021-03-07 08:38:22 +00:00
Henry Whitaker
d1efe9a166 Merge pull request #508 from henrywhitaker3/dependabot/composer/dev/mockery/mockery-1.4.3
Bump mockery/mockery from 1.4.2 to 1.4.3
2021-03-07 08:36:48 +00:00
Henry Whitaker
be2c70605e Merge pull request #506 from henrywhitaker3/dependabot/npm_and_yarn/dev/babel/plugin-proposal-class-properties-7.13.0
Bump @babel/plugin-proposal-class-properties from 7.12.1 to 7.13.0
2021-03-07 08:36:34 +00:00
Henry Whitaker
e21ce23bbe Merge pull request #505 from henrywhitaker3/dependabot/npm_and_yarn/dev/lodash-4.17.21
Bump lodash from 4.17.20 to 4.17.21
2021-03-07 08:36:18 +00:00
Henry Whitaker
6b7bbf089f Merge pull request #503 from henrywhitaker3/dependabot/npm_and_yarn/dev/sass-1.32.8 2021-03-07 08:36:02 +00:00
Henry Whitaker
cee8a887ef Merge branch 'alpha' into dependabot/npm_and_yarn/dev/sass-1.32.8 2021-03-07 08:35:56 +00:00
Henry Whitaker
dcd3381259 Merge pull request #490 from henrywhitaker3/dependabot/npm_and_yarn/dev/babel/preset-react-7.12.13 2021-03-07 08:34:59 +00:00
Henry Whitaker
dab973dbf8 Merge branch 'alpha' into dependabot/npm_and_yarn/dev/babel/preset-react-7.12.13 2021-03-07 08:34:52 +00:00
Henry Whitaker
0c23b16164 Merge pull request #488 from henrywhitaker3/dependabot/composer/dev/phpunit/phpunit-9.5.2 2021-03-07 08:34:14 +00:00
Henry Whitaker
02f76ca617 Merge branch 'alpha' into dependabot/composer/dev/phpunit/phpunit-9.5.2 2021-03-07 08:34:08 +00:00
Henry Whitaker
11fb44b789 Merge pull request #486 from henrywhitaker3/dependabot/composer/laravel/framework-7.30.4
Bump laravel/framework from 7.30.0 to 7.30.4
2021-03-07 08:32:57 +00:00
Henry Whitaker
715dac7828 Merge pull request #484 from henrywhitaker3/dependabot/composer/dev/laravel/framework-7.30.4
[Security] Bump laravel/framework from 7.30.0 to 7.30.4
2021-03-07 08:32:44 +00:00
Henry Whitaker
9b4a0afda0 Merge pull request #482 from henrywhitaker3/dependabot/npm_and_yarn/dev/react-toastify-7.0.3
Bump react-toastify from 6.2.0 to 7.0.3
2021-03-07 08:32:24 +00:00
Henry Whitaker
da8e7f409c Merge pull request #481 from henrywhitaker3/dependabot/composer/dev/nunomaduro/larastan-0.7.0 2021-03-07 08:32:04 +00:00
Henry Whitaker
676df45ae9 Merge branch 'alpha' into dependabot/composer/dev/nunomaduro/larastan-0.7.0 2021-03-07 08:31:57 +00:00
Henry Whitaker
2f8d12dba1 Merge pull request #474 from henrywhitaker3/dependabot/composer/dev/laravel/slack-notification-channel-2.3.1
Bump laravel/slack-notification-channel from 2.3.0 to 2.3.1
2021-03-07 08:30:51 +00:00
Henry Whitaker
4929d0efac Merge pull request #472 from henrywhitaker3/dependabot/composer/dev/nunomaduro/collision-5.3.0
Bump nunomaduro/collision from 4.3.0 to 5.3.0
2021-03-07 08:30:37 +00:00
Henry Whitaker
bee655dd8f Merge pull request #466 from henrywhitaker3/dependabot/npm_and_yarn/dev/bootstrap-4.6.0
Bump bootstrap from 4.5.3 to 4.6.0
2021-03-07 08:30:21 +00:00
Henry Whitaker
32bcde92bb Merge pull request #455 from henrywhitaker3/dependabot/npm_and_yarn/dev/sass-loader-10.1.1
Bump sass-loader from 10.1.0 to 10.1.1
2021-03-07 08:30:04 +00:00
Henry Whitaker
f412dc70e6 Merge pull request #446 from henrywhitaker3/dependabot/npm_and_yarn/dev/react-and-react-dom-17.0.1
Bump react and react-dom
2021-03-07 08:29:44 +00:00
Henry Whitaker
681fc8fbed Merge pull request #427 from henrywhitaker3/dependabot/npm_and_yarn/dev/axios-0.21.1 2021-03-07 08:29:27 +00:00
Henry Whitaker
a81adebe62 Merge pull request #445 from henrywhitaker3/dependabot/npm_and_yarn/axios-0.21.1
Bump axios from 0.21.0 to 0.21.1
2021-03-07 08:28:57 +00:00
Henry Whitaker
1ae66474f3 Merge pull request #443 from patrickclery/patch-1 2021-03-07 08:25:50 +00:00
dependabot-preview[bot]
dd158c7c83 Bump facade/ignition from 2.5.3 to 2.5.14
Bumps [facade/ignition](https://github.com/facade/ignition) from 2.5.3 to 2.5.14.
- [Release notes](https://github.com/facade/ignition/releases)
- [Changelog](https://github.com/facade/ignition/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facade/ignition/compare/2.5.3...2.5.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-05 06:01:28 +00:00
dependabot-preview[bot]
fd70dc6cb8 Bump react-bootstrap from 1.4.0 to 1.5.1
Bumps [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) from 1.4.0 to 1.5.1.
- [Release notes](https://github.com/react-bootstrap/react-bootstrap/releases)
- [Changelog](https://github.com/react-bootstrap/react-bootstrap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-bootstrap/react-bootstrap/compare/v1.4.0...v1.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-03 07:24:51 +00:00
dependabot-preview[bot]
77576f6537 Bump laravel/tinker from 2.5.0 to 2.6.1
Bumps [laravel/tinker](https://github.com/laravel/tinker) from 2.5.0 to 2.6.1.
- [Release notes](https://github.com/laravel/tinker/releases)
- [Changelog](https://github.com/laravel/tinker/blob/2.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/tinker/compare/v2.5.0...v2.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-03 05:56:06 +00:00
dependabot-preview[bot]
f41039ce78 Bump mockery/mockery from 1.4.2 to 1.4.3
Bumps [mockery/mockery](https://github.com/mockery/mockery) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/mockery/mockery/releases)
- [Changelog](https://github.com/mockery/mockery/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mockery/mockery/compare/1.4.2...1.4.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-25 06:04:29 +00:00
dependabot-preview[bot]
2ada8a22a9 Bump @babel/plugin-proposal-class-properties from 7.12.1 to 7.13.0
Bumps [@babel/plugin-proposal-class-properties](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-class-properties) from 7.12.1 to 7.13.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.0/packages/babel-plugin-proposal-class-properties)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-23 09:15:14 +00:00
dependabot-preview[bot]
52a91af086 Bump lodash from 4.17.20 to 4.17.21
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-22 07:58:12 +00:00
dependabot-preview[bot]
af66d17ba4 Bump sass from 1.30.0 to 1.32.8
Bumps [sass](https://github.com/sass/dart-sass) from 1.30.0 to 1.32.8.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.30.0...1.32.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-19 07:35:13 +00:00
dependabot-preview[bot]
dd27802e0f Bump @babel/preset-react from 7.12.10 to 7.12.13
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.12.10 to 7.12.13.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.13/packages/babel-preset-react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-03 10:04:38 +00:00
dependabot-preview[bot]
3444b8be18 Bump phpunit/phpunit from 8.5.13 to 9.5.2
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.5.13 to 9.5.2.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.5.13...9.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-03 06:55:01 +00:00
dependabot[bot]
043fd42b9a Bump laravel/framework from 7.30.0 to 7.30.4
Bumps [laravel/framework](https://github.com/laravel/framework) from 7.30.0 to 7.30.4.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/8.x/CHANGELOG-6.x.md)
- [Commits](https://github.com/laravel/framework/compare/v7.30.0...v7.30.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-02 17:47:13 +00:00
dependabot-preview[bot]
eeec6ae26c [Security] Bump laravel/framework from 7.30.0 to 7.30.4
Bumps [laravel/framework](https://github.com/laravel/framework) from 7.30.0 to 7.30.4. **This update includes security fixes.**
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/8.x/CHANGELOG-6.x.md)
- [Commits](https://github.com/laravel/framework/compare/v7.30.0...v7.30.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-02 10:10:43 +00:00
dependabot-preview[bot]
05d276fca0 Bump react-toastify from 6.2.0 to 7.0.3
Bumps [react-toastify](https://github.com/fkhadra/react-toastify) from 6.2.0 to 7.0.3.
- [Release notes](https://github.com/fkhadra/react-toastify/releases)
- [Commits](https://github.com/fkhadra/react-toastify/compare/v6.2.0...v7.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-02 07:19:48 +00:00
dependabot-preview[bot]
f5f378e8c3 Bump nunomaduro/larastan from 0.6.11 to 0.7.0
Bumps [nunomaduro/larastan](https://github.com/nunomaduro/larastan) from 0.6.11 to 0.7.0.
- [Release notes](https://github.com/nunomaduro/larastan/releases)
- [Changelog](https://github.com/nunomaduro/larastan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nunomaduro/larastan/compare/v0.6.11...v0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-02 05:53:39 +00:00
dependabot-preview[bot]
2f8137db0e Bump laravel/slack-notification-channel from 2.3.0 to 2.3.1
Bumps [laravel/slack-notification-channel](https://github.com/laravel/slack-notification-channel) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/laravel/slack-notification-channel/releases)
- [Changelog](https://github.com/laravel/slack-notification-channel/blob/2.0/CHANGELOG.md)
- [Commits](https://github.com/laravel/slack-notification-channel/compare/v2.3.0...v2.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-27 06:20:40 +00:00
dependabot-preview[bot]
95dbbc96b6 Bump nunomaduro/collision from 4.3.0 to 5.3.0
Bumps [nunomaduro/collision](https://github.com/nunomaduro/collision) from 4.3.0 to 5.3.0.
- [Release notes](https://github.com/nunomaduro/collision/releases)
- [Changelog](https://github.com/nunomaduro/collision/blob/stable/CHANGELOG.md)
- [Commits](https://github.com/nunomaduro/collision/compare/v4.3.0...v5.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-26 06:15:10 +00:00
dependabot-preview[bot]
3d44da1f87 Bump bootstrap from 4.5.3 to 4.6.0
Bumps [bootstrap](https://github.com/twbs/bootstrap) from 4.5.3 to 4.6.0.
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v4.5.3...v4.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-20 09:11:58 +00:00
dependabot-preview[bot]
4e8b46f786 Bump sass-loader from 10.1.0 to 10.1.1
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 10.1.0 to 10.1.1.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v10.1.0...v10.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-12 07:42:18 +00:00
dependabot-preview[bot]
f110704a7a Bump react and react-dom
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) and [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom). These dependencies needed to be updated together.

Updates `react` from 16.14.0 to 17.0.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v17.0.1/packages/react)

Updates `react-dom` from 16.14.0 to 17.0.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v17.0.1/packages/react-dom)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-06 08:47:15 +00:00
dependabot[bot]
73517f92f7 Bump axios from 0.21.0 to 0.21.1
Bumps [axios](https://github.com/axios/axios) from 0.21.0 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.21.0...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-05 23:58:42 +00:00
Patrick Clery
ea9e5c1a52 ✏️ Fix typos. 2021-01-04 03:46:18 -05:00
dependabot-preview[bot]
ad36edc749 Bump axios from 0.21.0 to 0.21.1
Bumps [axios](https://github.com/axios/axios) from 0.21.0 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.21.0...v0.21.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-22 07:40:46 +00:00
Henry Whitaker
1467bee847 Fix bug with numer inputs having incorrect min/max 2020-12-20 01:23:45 +00:00
Henry Whitaker
67eec58d74 Merge pull request #422 from henrywhitaker3/alpha 2020-12-20 01:11:38 +00:00
Henry Whitaker
752ef06626 Make schedule enabled a checkbox 2020-12-20 00:58:20 +00:00
Henry Whitaker
feffc0023f Update composer lock 2020-12-20 00:37:33 +00:00
Henry Whitaker
f918288728 Merge pull request #416 from henrywhitaker3/dependabot/composer/dev/fzaninotto/faker-1.9.2
Bump fzaninotto/faker from 1.9.1 to 1.9.2
2020-12-20 00:33:09 +00:00
Henry Whitaker
b74e69314a Merge pull request #417 from henrywhitaker3/dependabot/npm_and_yarn/dev/csv-file-validator-1.10.1 2020-12-20 00:32:53 +00:00
Henry Whitaker
44c6c256c0 Added in support for custom healthchecks server 2020-12-20 00:19:46 +00:00
Henry Whitaker
fde30602b0 Updated changelog 2020-12-20 00:09:54 +00:00
Henry Whitaker
a7652af2ba Changes from SPA to MPA 2020-12-20 00:09:18 +00:00
Henry Whitaker
95325db128 Added setting for app name 2020-12-19 23:55:49 +00:00
Henry Whitaker
46d13fd08a Add setting to enable/disable schedule 2020-12-19 21:47:27 +00:00
Henry Whitaker
1637e66bef Started building the general settings tab 2020-12-19 20:13:53 +00:00
Henry Whitaker
71e132e513 Added in navbar and settings route 2020-12-19 18:50:14 +00:00
dependabot-preview[bot]
21ed016d25 Bump csv-file-validator from 1.8.0 to 1.10.1
Bumps [csv-file-validator](https://github.com/shystruk/csv-file-validator) from 1.8.0 to 1.10.1.
- [Release notes](https://github.com/shystruk/csv-file-validator/releases)
- [Commits](https://github.com/shystruk/csv-file-validator/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-14 09:22:17 +00:00
dependabot-preview[bot]
8bc6975b69 Bump fzaninotto/faker from 1.9.1 to 1.9.2
Bumps [fzaninotto/faker](https://github.com/fzaninotto/Faker) from 1.9.1 to 1.9.2.
- [Release notes](https://github.com/fzaninotto/Faker/releases)
- [Changelog](https://github.com/fzaninotto/Faker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fzaninotto/Faker/compare/v1.9.1...v1.9.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-14 08:32:24 +00:00
Henry Whitaker
5a0f5a2b3c Merge pull request #415 from henrywhitaker3/alpha 2020-12-13 16:42:37 +00:00
Henry Whitaker
17b72b91d0 Merge pull request #413 from henrywhitaker3/dev 2020-12-13 16:39:58 +00:00
Henry Whitaker
0910bbb757 Fixed integrations config being empty 2020-12-13 16:29:05 +00:00
Henry Whitaker
e9de226c7a Revert "Load integrations config with db data"
This reverts commit 10137a602a.
2020-12-13 16:28:10 +00:00
Henry Whitaker
10137a602a Load integrations config with db data 2020-12-13 16:26:54 +00:00
Henry Whitaker
342e87b08d Merge pull request #411 from henrywhitaker3/alpha 2020-12-13 15:51:39 +00:00
Henry Whitaker
100cc1d768 Updated changelog 2020-12-13 15:47:17 +00:00
Henry Whitaker
2d1af61fb1 Merge pull request #375 from henrywhitaker3/dependabot/npm_and_yarn/dev/react-dom-16.14.0
Bump react-dom from 16.13.1 to 16.14.0
2020-12-13 15:40:53 +00:00
Henry Whitaker
41a3bb3b5b Merge pull request #376 from henrywhitaker3/dependabot/npm_and_yarn/dev/react-bootstrap-1.4.0 2020-12-13 15:40:37 +00:00
Henry Whitaker
365acda11c Merge branch 'alpha' into dependabot/npm_and_yarn/dev/react-bootstrap-1.4.0 2020-12-13 15:40:29 +00:00
Henry Whitaker
2df827b722 Merge pull request #378 from henrywhitaker3/dependabot/npm_and_yarn/dev/react-chartjs-2-2.11.1
Bump react-chartjs-2 from 2.10.0 to 2.11.1
2020-12-13 15:39:55 +00:00
Henry Whitaker
48839a0aa3 Merge pull request #379 from henrywhitaker3/dependabot/npm_and_yarn/dev/axios-0.21.0 2020-12-13 15:39:38 +00:00
Henry Whitaker
05e856799a Merge branch 'alpha' into dependabot/npm_and_yarn/dev/axios-0.21.0 2020-12-13 15:39:13 +00:00
Henry Whitaker
2a243d251c Merge pull request #381 from henrywhitaker3/dependabot/composer/dev/laravel/slack-notification-channel-2.3.0
Bump laravel/slack-notification-channel from 2.2.0 to 2.3.0
2020-12-13 15:38:36 +00:00
Henry Whitaker
73999eba53 Merge pull request #382 from henrywhitaker3/dependabot/composer/dev/laravel/tinker-2.5.0 2020-12-13 15:38:06 +00:00
Henry Whitaker
24a2c0e7df Merge branch 'alpha' into dependabot/composer/dev/laravel/tinker-2.5.0 2020-12-13 15:37:58 +00:00
Henry Whitaker
c18b334128 Merge pull request #385 from henrywhitaker3/dependabot/npm_and_yarn/dev/sass-loader-10.1.0 2020-12-13 15:37:07 +00:00
Henry Whitaker
e479e828bb Merge branch 'alpha' into dependabot/npm_and_yarn/dev/sass-loader-10.1.0 2020-12-13 15:37:00 +00:00
Henry Whitaker
f9b6f99a05 Merge pull request #395 from henrywhitaker3/dependabot/composer/dev/tymon/jwt-auth-1.0.2
Bump tymon/jwt-auth from 1.0.1 to 1.0.2
2020-12-13 15:36:14 +00:00
Henry Whitaker
d577954660 Merge pull request #396 from henrywhitaker3/dependabot/composer/dev/phpunit/phpunit-8.5.13
Bump phpunit/phpunit from 8.5.8 to 8.5.13
2020-12-13 15:35:55 +00:00
Henry Whitaker
cf5bafe586 Merge pull request #397 from henrywhitaker3/dependabot/composer/dev/laravel/framework-7.30.0
Bump laravel/framework from 7.28.4 to 7.30.0
2020-12-13 15:35:37 +00:00
Henry Whitaker
7eb668a892 Merge pull request #398 from henrywhitaker3/dependabot/npm_and_yarn/dev/cross-env-7.0.3
Bump cross-env from 7.0.2 to 7.0.3
2020-12-13 15:35:16 +00:00
Henry Whitaker
bc28094e67 Merge pull request #400 from henrywhitaker3/dependabot/composer/dev/laravel-notification-channels/telegram-0.5.1
Bump laravel-notification-channels/telegram from 0.5.0 to 0.5.1
2020-12-13 15:34:53 +00:00
Henry Whitaker
326b0edbac Merge pull request #401 from henrywhitaker3/dependabot/npm_and_yarn/dev/sass-1.30.0
Bump sass from 1.29.0 to 1.30.0
2020-12-13 15:34:33 +00:00
Henry Whitaker
eb1ec516b9 Merge pull request #403 from henrywhitaker3/dependabot/composer/dev/nunomaduro/larastan-0.6.11
Bump nunomaduro/larastan from 0.6.9 to 0.6.11
2020-12-13 15:34:13 +00:00
Henry Whitaker
33c61071d4 Merge pull request #405 from henrywhitaker3/dependabot/composer/dev/barryvdh/laravel-ide-helper-2.8.2
Bump barryvdh/laravel-ide-helper from 2.8.1 to 2.8.2
2020-12-13 15:33:53 +00:00
Henry Whitaker
6306824351 Merge pull request #406 from henrywhitaker3/dependabot/npm_and_yarn/dev/react-toastify-6.2.0
Bump react-toastify from 6.0.9 to 6.2.0
2020-12-13 15:33:32 +00:00
Henry Whitaker
47cbce56a9 Merge pull request #407 from henrywhitaker3/dependabot/npm_and_yarn/dev/babel/preset-react-7.12.10 2020-12-13 15:33:10 +00:00
Henry Whitaker
f8387e4f4b Merge pull request #410 from henrywhitaker3/dependabot/npm_and_yarn/ini-1.3.8 2020-12-13 15:31:59 +00:00
dependabot[bot]
353b381f25 Bump ini from 1.3.5 to 1.3.8
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-12 13:25:54 +00:00
dependabot-preview[bot]
065bc45d11 Bump @babel/preset-react from 7.12.5 to 7.12.10
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.12.5 to 7.12.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.10/packages/babel-preset-react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-10 07:19:01 +00:00
dependabot-preview[bot]
4d78eff393 Bump react-toastify from 6.0.9 to 6.2.0
Bumps [react-toastify](https://github.com/fkhadra/react-toastify) from 6.0.9 to 6.2.0.
- [Release notes](https://github.com/fkhadra/react-toastify/releases)
- [Commits](https://github.com/fkhadra/react-toastify/compare/v6.0.9...v6.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-09 07:33:20 +00:00
dependabot-preview[bot]
14ba9e092f Bump barryvdh/laravel-ide-helper from 2.8.1 to 2.8.2
Bumps [barryvdh/laravel-ide-helper](https://github.com/barryvdh/laravel-ide-helper) from 2.8.1 to 2.8.2.
- [Release notes](https://github.com/barryvdh/laravel-ide-helper/releases)
- [Changelog](https://github.com/barryvdh/laravel-ide-helper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/barryvdh/laravel-ide-helper/compare/v2.8.1...v2.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-09 06:55:33 +00:00
dependabot-preview[bot]
628b0fdbea Bump nunomaduro/larastan from 0.6.9 to 0.6.11
Bumps [nunomaduro/larastan](https://github.com/nunomaduro/larastan) from 0.6.9 to 0.6.11.
- [Release notes](https://github.com/nunomaduro/larastan/releases)
- [Changelog](https://github.com/nunomaduro/larastan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nunomaduro/larastan/compare/v0.6.9...v0.6.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-08 07:43:30 +00:00
dependabot-preview[bot]
2cb31d52a7 Bump sass from 1.29.0 to 1.30.0
Bumps [sass](https://github.com/sass/dart-sass) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.29.0...1.30.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-07 07:52:28 +00:00
dependabot-preview[bot]
8b8c3ae801 Bump laravel-notification-channels/telegram from 0.5.0 to 0.5.1
Bumps [laravel-notification-channels/telegram](https://github.com/laravel-notification-channels/telegram) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/laravel-notification-channels/telegram/releases)
- [Changelog](https://github.com/laravel-notification-channels/telegram/blob/master/CHANGELOG.md)
- [Commits](https://github.com/laravel-notification-channels/telegram/compare/0.5.0...0.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-07 06:37:30 +00:00
dependabot-preview[bot]
846942929e Bump cross-env from 7.0.2 to 7.0.3
Bumps [cross-env](https://github.com/kentcdodds/cross-env) from 7.0.2 to 7.0.3.
- [Release notes](https://github.com/kentcdodds/cross-env/releases)
- [Changelog](https://github.com/kentcdodds/cross-env/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kentcdodds/cross-env/compare/v7.0.2...v7.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-02 07:37:25 +00:00
dependabot-preview[bot]
8e151c9ce5 Bump laravel/framework from 7.28.4 to 7.30.0
Bumps [laravel/framework](https://github.com/laravel/framework) from 7.28.4 to 7.30.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/8.x/CHANGELOG-6.x.md)
- [Commits](https://github.com/laravel/framework/compare/v7.28.4...v7.30.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-02 07:36:53 +00:00
dependabot-preview[bot]
a568d83dbc Bump phpunit/phpunit from 8.5.8 to 8.5.13
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 8.5.8 to 8.5.13.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/8.5.8...8.5.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-01 07:04:20 +00:00
dependabot-preview[bot]
dcf94b6a4b Bump tymon/jwt-auth from 1.0.1 to 1.0.2
Bumps [tymon/jwt-auth](https://github.com/tymondesigns/jwt-auth) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/tymondesigns/jwt-auth/releases)
- [Commits](https://github.com/tymondesigns/jwt-auth/compare/1.0.1...1.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-30 07:59:01 +00:00
dependabot-preview[bot]
47ecb7d58c Bump sass-loader from 10.0.5 to 10.1.0
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 10.0.5 to 10.1.0.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v10.0.5...v10.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-12 07:41:29 +00:00
dependabot-preview[bot]
4e61e0fccb Bump laravel/tinker from 2.4.2 to 2.5.0
Bumps [laravel/tinker](https://github.com/laravel/tinker) from 2.4.2 to 2.5.0.
- [Release notes](https://github.com/laravel/tinker/releases)
- [Changelog](https://github.com/laravel/tinker/blob/2.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/tinker/compare/v2.4.2...v2.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 10:19:06 +00:00
dependabot-preview[bot]
59a4a25bed Bump laravel/slack-notification-channel from 2.2.0 to 2.3.0
Bumps [laravel/slack-notification-channel](https://github.com/laravel/slack-notification-channel) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/laravel/slack-notification-channel/releases)
- [Changelog](https://github.com/laravel/slack-notification-channel/blob/2.0/CHANGELOG.md)
- [Commits](https://github.com/laravel/slack-notification-channel/compare/v2.2.0...v2.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 10:17:41 +00:00
dependabot-preview[bot]
0e60bf195f Bump axios from 0.20.0 to 0.21.0
Bumps [axios](https://github.com/axios/axios) from 0.20.0 to 0.21.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.20.0...v0.21.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 08:04:11 +00:00
dependabot-preview[bot]
2b57d6c244 Bump react-chartjs-2 from 2.10.0 to 2.11.1
Bumps [react-chartjs-2](https://github.com/reactchartjs/react-chartjs-2) from 2.10.0 to 2.11.1.
- [Release notes](https://github.com/reactchartjs/react-chartjs-2/releases)
- [Commits](https://github.com/reactchartjs/react-chartjs-2/compare/2.10.0...2.11.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 08:02:32 +00:00
dependabot-preview[bot]
8f846bd4fe Bump react-bootstrap from 1.3.0 to 1.4.0
Bumps [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/react-bootstrap/react-bootstrap/releases)
- [Changelog](https://github.com/react-bootstrap/react-bootstrap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-bootstrap/react-bootstrap/compare/v1.3.0...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 08:00:03 +00:00
dependabot-preview[bot]
081eac4f1e Bump react-dom from 16.13.1 to 16.14.0
Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) from 16.13.1 to 16.14.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v16.14.0/packages/react-dom)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 07:58:31 +00:00
Henry Whitaker
7071d0ac4c Merge pull request #373 from henrywhitaker3/alpha
Changed to daily logging
2020-11-07 15:49:26 +00:00
Henry Whitaker
87aba591c0 Changed to daily logging 2020-11-07 15:48:37 +00:00
Henry Whitaker
5e5e9d8992 Merge pull request #371 from henrywhitaker3/alpha 2020-11-07 15:18:11 +00:00
Henry Whitaker
d16889f406 Updated dependencies 2020-11-07 15:11:11 +00:00
Henry Whitaker
5d0020a707 Merge pull request #353 from henrywhitaker3/dependabot/npm_and_yarn/dev/resolve-url-loader-3.1.2
Bump resolve-url-loader from 3.1.1 to 3.1.2
2020-11-07 15:02:38 +00:00
Henry Whitaker
e9d8f4754b Merge branch 'alpha' into dependabot/npm_and_yarn/dev/resolve-url-loader-3.1.2 2020-11-07 15:02:32 +00:00
Henry Whitaker
18439da15a Merge pull request #349 from henrywhitaker3/dependabot/npm_and_yarn/dev/babel/plugin-proposal-class-properties-7.12.1 2020-11-07 15:01:54 +00:00
Henry Whitaker
2919c9fb9b Merge branch 'alpha' into dependabot/npm_and_yarn/dev/babel/plugin-proposal-class-properties-7.12.1 2020-11-07 15:01:45 +00:00
Henry Whitaker
3097c244de Merge pull request #318 from henrywhitaker3/dependabot/composer/dev/doctrine/dbal-2.10.4
Bump doctrine/dbal from 2.10.3 to 2.10.4
2020-11-07 15:00:51 +00:00
Henry Whitaker
6c64613628 Merge pull request #332 from henrywhitaker3/dependabot/npm_and_yarn/dev/react-toastify-6.0.9
Bump react-toastify from 6.0.8 to 6.0.9
2020-11-07 15:00:37 +00:00
Henry Whitaker
2e39a238e7 Merge pull request #364 from henrywhitaker3/dependabot/npm_and_yarn/dev/sass-loader-10.0.5 2020-11-07 15:00:01 +00:00
Henry Whitaker
8e003017bd Merge pull request #333 from henrywhitaker3/dependabot/composer/dev/laravel/framework-7.28.4 2020-11-07 14:59:44 +00:00
Henry Whitaker
9190385f93 Merge branch 'alpha' into dependabot/composer/dev/laravel/framework-7.28.4 2020-11-07 14:59:30 +00:00
Henry Whitaker
226e2c42a7 Merge pull request #340 from henrywhitaker3/dependabot/composer/dev/guzzlehttp/guzzle-7.2.0
Bump guzzlehttp/guzzle from 7.0.1 to 7.2.0
2020-11-07 14:57:55 +00:00
Henry Whitaker
c55baae478 Merge pull request #342 from henrywhitaker3/dependabot/composer/dev/dragonmantank/cron-expression-2.3.1
Bump dragonmantank/cron-expression from 2.3.0 to 2.3.1
2020-11-07 14:57:39 +00:00
Henry Whitaker
7654da9559 Merge pull request #343 from henrywhitaker3/dependabot/npm_and_yarn/dev/bootstrap-4.5.3
Bump bootstrap from 4.5.2 to 4.5.3
2020-11-07 14:57:23 +00:00
Henry Whitaker
7922955217 Merge pull request #344 from henrywhitaker3/dependabot/composer/dev/facade/ignition-2.4.1 2020-11-07 14:57:06 +00:00
Henry Whitaker
c90b40a96f Merge branch 'alpha' into dependabot/composer/dev/facade/ignition-2.4.1 2020-11-07 14:56:58 +00:00
dependabot-preview[bot]
72ff3317fa Bump @babel/plugin-proposal-class-properties from 7.10.4 to 7.12.1
Bumps [@babel/plugin-proposal-class-properties](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-class-properties) from 7.10.4 to 7.12.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.1/packages/babel-plugin-proposal-class-properties)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-07 14:56:51 +00:00
dependabot-preview[bot]
b00db26910 Bump resolve-url-loader from 3.1.1 to 3.1.2
Bumps [resolve-url-loader](https://github.com/bholloway/resolve-url-loader) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/bholloway/resolve-url-loader/releases)
- [Commits](https://github.com/bholloway/resolve-url-loader/compare/3.1.1...3.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-07 14:56:31 +00:00
Henry Whitaker
b31252a7b3 Merge pull request #345 from henrywhitaker3/dependabot/npm_and_yarn/dev/react-16.14.0
Bump react from 16.13.1 to 16.14.0
2020-11-07 14:55:18 +00:00
Henry Whitaker
a836967445 Merge pull request #351 from henrywhitaker3/dependabot/npm_and_yarn/dev/chart.js-2.9.4
Bump chart.js from 2.9.3 to 2.9.4
2020-11-07 14:54:21 +00:00
Henry Whitaker
ced5a2e7a4 Merge pull request #356 from henrywhitaker3/dependabot/composer/dev/fideloper/proxy-4.4.1
Bump fideloper/proxy from 4.4.0 to 4.4.1
2020-11-07 14:53:37 +00:00
Henry Whitaker
270abea478 Merge pull request #357 from henrywhitaker3/dependabot/composer/dev/fruitcake/laravel-cors-2.0.3
Bump fruitcake/laravel-cors from 2.0.2 to 2.0.3
2020-11-07 14:53:21 +00:00
Henry Whitaker
efc9b29360 Merge pull request #361 from henrywhitaker3/dependabot/composer/dev/nunomaduro/collision-4.3.0
Bump nunomaduro/collision from 4.2.0 to 4.3.0
2020-11-07 14:53:04 +00:00
Henry Whitaker
b9d289c9d2 Merge pull request #363 from henrywhitaker3/dependabot/composer/dev/nunomaduro/larastan-0.6.9
Bump nunomaduro/larastan from 0.6.4 to 0.6.9
2020-11-07 14:52:46 +00:00
Henry Whitaker
1562e13e19 Merge branch 'alpha' into dependabot/npm_and_yarn/dev/sass-loader-10.0.5 2020-11-07 14:52:15 +00:00
Henry Whitaker
0b00ba2304 Merge pull request #365 from henrywhitaker3/dependabot/npm_and_yarn/dev/babel/preset-react-7.12.5
Bump @babel/preset-react from 7.10.4 to 7.12.5
2020-11-07 14:51:19 +00:00
Henry Whitaker
5f5b731fbe Merge pull request #366 from henrywhitaker3/dependabot/composer/dev/laravel/ui-2.5.0
Bump laravel/ui from 2.3.0 to 2.5.0
2020-11-07 14:51:00 +00:00
Henry Whitaker
dd7df0df81 Merge pull request #367 from henrywhitaker3/dependabot/npm_and_yarn/dev/sass-1.29.0
Bump sass from 1.26.10 to 1.29.0
2020-11-07 14:50:37 +00:00
Henry Whitaker
0e454f8143 Merge pull request #369 from henrywhitaker3/dependabot/npm_and_yarn/dev/laravel-mix-5.0.9 2020-11-07 14:49:27 +00:00
dependabot-preview[bot]
f61be56f2e Bump laravel-mix from 5.0.5 to 5.0.9
Bumps [laravel-mix](https://github.com/JeffreyWay/laravel-mix) from 5.0.5 to 5.0.9.
- [Release notes](https://github.com/JeffreyWay/laravel-mix/releases)
- [Changelog](https://github.com/JeffreyWay/laravel-mix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JeffreyWay/laravel-mix/compare/v5.0.5...v5.0.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-06 07:40:50 +00:00
dependabot-preview[bot]
f33af5fc41 Bump sass from 1.26.10 to 1.29.0
Bumps [sass](https://github.com/sass/dart-sass) from 1.26.10 to 1.29.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.26.10...1.29.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-05 07:51:28 +00:00
dependabot-preview[bot]
861d354d15 Bump laravel/ui from 2.3.0 to 2.5.0
Bumps [laravel/ui](https://github.com/laravel/ui) from 2.3.0 to 2.5.0.
- [Release notes](https://github.com/laravel/ui/releases)
- [Changelog](https://github.com/laravel/ui/blob/v2.5.0/CHANGELOG.md)
- [Commits](https://github.com/laravel/ui/compare/v2.3.0...v2.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-04 10:48:49 +00:00
dependabot-preview[bot]
07b419801c Bump @babel/preset-react from 7.10.4 to 7.12.5
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.10.4 to 7.12.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.5/packages/babel-preset-react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-04 07:28:45 +00:00
dependabot-preview[bot]
be2be4583c Bump sass-loader from 10.0.2 to 10.0.5
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 10.0.2 to 10.0.5.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v10.0.2...v10.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-03 07:50:01 +00:00
dependabot-preview[bot]
b05168ac6f Bump nunomaduro/larastan from 0.6.4 to 0.6.9
Bumps [nunomaduro/larastan](https://github.com/nunomaduro/larastan) from 0.6.4 to 0.6.9.
- [Release notes](https://github.com/nunomaduro/larastan/releases)
- [Changelog](https://github.com/nunomaduro/larastan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nunomaduro/larastan/compare/v0.6.4...v0.6.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-02 09:44:54 +00:00
dependabot-preview[bot]
c70e7a26c4 Bump nunomaduro/collision from 4.2.0 to 4.3.0
Bumps [nunomaduro/collision](https://github.com/nunomaduro/collision) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/nunomaduro/collision/releases)
- [Changelog](https://github.com/nunomaduro/collision/blob/v4.3.0/CHANGELOG.md)
- [Commits](https://github.com/nunomaduro/collision/compare/v4.2.0...v4.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-30 09:38:47 +00:00
dependabot-preview[bot]
daf9975853 Bump fruitcake/laravel-cors from 2.0.2 to 2.0.3
Bumps [fruitcake/laravel-cors](https://github.com/fruitcake/laravel-cors) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/fruitcake/laravel-cors/releases)
- [Changelog](https://github.com/fruitcake/laravel-cors/blob/master/changelog.md)
- [Commits](https://github.com/fruitcake/laravel-cors/compare/v2.0.2...v2.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-23 09:14:04 +00:00
dependabot-preview[bot]
7a03c64ceb Bump fideloper/proxy from 4.4.0 to 4.4.1
Bumps [fideloper/proxy](https://github.com/fideloper/TrustedProxy) from 4.4.0 to 4.4.1.
- [Release notes](https://github.com/fideloper/TrustedProxy/releases)
- [Commits](https://github.com/fideloper/TrustedProxy/compare/4.4.0...4.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-23 09:12:36 +00:00
dependabot-preview[bot]
29a0b3d0a1 Bump chart.js from 2.9.3 to 2.9.4
Bumps [chart.js](https://github.com/chartjs/Chart.js) from 2.9.3 to 2.9.4.
- [Release notes](https://github.com/chartjs/Chart.js/releases)
- [Commits](https://github.com/chartjs/Chart.js/compare/v2.9.3...v2.9.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-19 16:24:45 +00:00
dependabot-preview[bot]
1c09d39b1e Bump react from 16.13.1 to 16.14.0
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 16.13.1 to 16.14.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v16.14.0/packages/react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-15 10:02:53 +00:00
dependabot-preview[bot]
439c6322f2 Bump facade/ignition from 2.3.7 to 2.4.1
Bumps [facade/ignition](https://github.com/facade/ignition) from 2.3.7 to 2.4.1.
- [Release notes](https://github.com/facade/ignition/releases)
- [Changelog](https://github.com/facade/ignition/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facade/ignition/compare/2.3.7...2.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-15 09:24:12 +00:00
dependabot-preview[bot]
d093a89829 Bump bootstrap from 4.5.2 to 4.5.3
Bumps [bootstrap](https://github.com/twbs/bootstrap) from 4.5.2 to 4.5.3.
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v4.5.2...v4.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-14 02:51:17 +00:00
dependabot-preview[bot]
6ffd59485a Bump dragonmantank/cron-expression from 2.3.0 to 2.3.1
Bumps [dragonmantank/cron-expression](https://github.com/dragonmantank/cron-expression) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/dragonmantank/cron-expression/releases)
- [Changelog](https://github.com/dragonmantank/cron-expression/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dragonmantank/cron-expression/compare/v2.3.0...v2.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-13 08:41:44 +00:00
dependabot-preview[bot]
7dd7cdda8c Bump guzzlehttp/guzzle from 7.0.1 to 7.2.0
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.0.1 to 7.2.0.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.0.1...7.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-12 10:39:41 +00:00
dependabot-preview[bot]
15e4537ea6 Bump laravel/framework from 7.28.1 to 7.28.4
Bumps [laravel/framework](https://github.com/laravel/framework) from 7.28.1 to 7.28.4.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/8.x/CHANGELOG-7.x.md)
- [Commits](https://github.com/laravel/framework/compare/v7.28.1...v7.28.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-07 09:52:23 +00:00
dependabot-preview[bot]
4403cf161c Bump react-toastify from 6.0.8 to 6.0.9
Bumps [react-toastify](https://github.com/fkhadra/react-toastify) from 6.0.8 to 6.0.9.
- [Release notes](https://github.com/fkhadra/react-toastify/releases)
- [Commits](https://github.com/fkhadra/react-toastify/compare/v6.0.8...v6.0.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-07 07:44:27 +00:00
dependabot-preview[bot]
7a950b838a Bump doctrine/dbal from 2.10.3 to 2.10.4
Bumps [doctrine/dbal](https://github.com/doctrine/dbal) from 2.10.3 to 2.10.4.
- [Release notes](https://github.com/doctrine/dbal/releases)
- [Commits](https://github.com/doctrine/dbal/compare/2.10.3...2.10.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 09:17:49 +00:00
Henry Whitaker
21d3aea934 Merge pull request #317 from henrywhitaker3/alpha
Fixed min setting bug
2020-09-11 01:26:35 +01:00
Henry Whitaker
342d3fabf4 Fixed min setting bug 2020-09-11 01:23:25 +01:00
Henry Whitaker
4b95cb12ef Merge pull request #315 from henrywhitaker3/alpha 2020-09-11 01:09:34 +01:00
Henry Whitaker
8ff87c2e7a Updated tests 2020-09-11 01:02:24 +01:00
Henry Whitaker
149c69ce64 Merge remote-tracking branch 'origin/alpha' into alpha 2020-09-11 00:56:59 +01:00
Henry Whitaker
933291c5fc Merge pull request #303 from henrywhitaker3/dependabot/npm_and_yarn/dev/sass-loader-10.0.2
Bump sass-loader from 10.0.1 to 10.0.2
2020-09-11 00:56:48 +01:00
Henry Whitaker
29c36d88e2 Merge pull request #304 from henrywhitaker3/dependabot/composer/dev/fruitcake/laravel-cors-2.0.2
Bump fruitcake/laravel-cors from 2.0.1 to 2.0.2
2020-09-11 00:55:57 +01:00
Henry Whitaker
4b167af50e Merge pull request #305 from henrywhitaker3/dependabot/composer/dev/facade/ignition-2.3.7 2020-09-11 00:55:30 +01:00
Henry Whitaker
7d0ea79798 Merge pull request #306 from henrywhitaker3/dependabot/composer/dev/laravel-notification-channels/telegram-0.5.0
Bump laravel-notification-channels/telegram from 0.4.1 to 0.5.0
2020-09-11 00:55:13 +01:00
Henry Whitaker
375eab288d Merge pull request #307 from henrywhitaker3/dependabot/composer/dev/barryvdh/laravel-ide-helper-2.8.1
Bump barryvdh/laravel-ide-helper from 2.8.0 to 2.8.1
2020-09-11 00:54:54 +01:00
Henry Whitaker
8e2ddd974a Merge pull request #311 from henrywhitaker3/dependabot/composer/dev/tymon/jwt-auth-1.0.1
Bump tymon/jwt-auth from 1.0.0 to 1.0.1
2020-09-11 00:54:34 +01:00
Henry Whitaker
d78c3e2669 Merge pull request #313 from henrywhitaker3/dependabot/composer/dev/laravel/framework-7.28.1
Bump laravel/framework from 7.27.0 to 7.28.1
2020-09-11 00:53:38 +01:00
Henry Whitaker
a83d4e363b Merge pull request #314 from henrywhitaker3/dependabot/composer/dev/laravel/ui-2.3.0
Bump laravel/ui from 2.2.0 to 2.3.0
2020-09-11 00:53:18 +01:00
Henry Whitaker
334623454d Added General settings section & min value on widgets 2020-09-11 00:51:27 +01:00
dependabot-preview[bot]
a7aa3e7885 Bump laravel/ui from 2.2.0 to 2.3.0
Bumps [laravel/ui](https://github.com/laravel/ui) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/laravel/ui/releases)
- [Changelog](https://github.com/laravel/ui/blob/2.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/ui/compare/v2.2.0...v2.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-10 08:54:23 +00:00
dependabot-preview[bot]
2e1022c116 Bump laravel/framework from 7.27.0 to 7.28.1
Bumps [laravel/framework](https://github.com/laravel/framework) from 7.27.0 to 7.28.1.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/8.x/CHANGELOG-7.x.md)
- [Commits](https://github.com/laravel/framework/compare/v7.27.0...v7.28.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-10 08:51:58 +00:00
dependabot-preview[bot]
355d38acb7 Bump tymon/jwt-auth from 1.0.0 to 1.0.1
Bumps [tymon/jwt-auth](https://github.com/tymondesigns/jwt-auth) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/tymondesigns/jwt-auth/releases)
- [Commits](https://github.com/tymondesigns/jwt-auth/compare/1.0.0...1.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-09 09:25:14 +00:00
dependabot-preview[bot]
1e9887ac46 Bump barryvdh/laravel-ide-helper from 2.8.0 to 2.8.1
Bumps [barryvdh/laravel-ide-helper](https://github.com/barryvdh/laravel-ide-helper) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/barryvdh/laravel-ide-helper/releases)
- [Changelog](https://github.com/barryvdh/laravel-ide-helper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/barryvdh/laravel-ide-helper/compare/v2.8.0...v2.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 08:27:04 +00:00
dependabot-preview[bot]
8538dd231f Bump laravel-notification-channels/telegram from 0.4.1 to 0.5.0
Bumps [laravel-notification-channels/telegram](https://github.com/laravel-notification-channels/telegram) from 0.4.1 to 0.5.0.
- [Release notes](https://github.com/laravel-notification-channels/telegram/releases)
- [Changelog](https://github.com/laravel-notification-channels/telegram/blob/master/CHANGELOG.md)
- [Commits](https://github.com/laravel-notification-channels/telegram/compare/0.4.1...0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 08:24:37 +00:00
dependabot-preview[bot]
5793140e89 Bump facade/ignition from 2.3.6 to 2.3.7
Bumps [facade/ignition](https://github.com/facade/ignition) from 2.3.6 to 2.3.7.
- [Release notes](https://github.com/facade/ignition/releases)
- [Changelog](https://github.com/facade/ignition/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facade/ignition/compare/2.3.6...2.3.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 08:23:14 +00:00
dependabot-preview[bot]
56ecff1a09 Bump fruitcake/laravel-cors from 2.0.1 to 2.0.2
Bumps [fruitcake/laravel-cors](https://github.com/fruitcake/laravel-cors) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/fruitcake/laravel-cors/releases)
- [Changelog](https://github.com/fruitcake/laravel-cors/blob/master/changelog.md)
- [Commits](https://github.com/fruitcake/laravel-cors/compare/v2.0.1...v2.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 08:21:46 +00:00
dependabot-preview[bot]
eff8f92016 Bump sass-loader from 10.0.1 to 10.0.2
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 10.0.1 to 10.0.2.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v10.0.1...v10.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-07 16:29:12 +00:00
Henry Whitaker
0b8c633a75 Merge pull request #300 from henrywhitaker3/dev 2020-09-05 01:17:57 +01:00
Henry Whitaker
8ae4bc602c Merge pull request #299 from henrywhitaker3/alpha 2020-09-05 01:11:47 +01:00
Henry Whitaker
9028ffb7cd Updated changelog 2020-09-05 01:06:11 +01:00
Henry Whitaker
62fde8fb2a Merge remote-tracking branch 'origin/alpha' into alpha 2020-09-05 01:00:16 +01:00
Henry Whitaker
601d46915c Clear cache on restore 2020-09-05 00:58:04 +01:00
Henry Whitaker
751acff32c Updated demo link 2020-09-05 00:57:55 +01:00
Henry Whitaker
4e133e97c7 Merge pull request #289 from henrywhitaker3/dependabot/npm_and_yarn/dev/sass-loader-10.0.1
Bump sass-loader from 9.0.3 to 10.0.1
2020-09-05 00:57:25 +01:00
Henry Whitaker
61a85ced34 Merge pull request #291 from henrywhitaker3/dependabot/composer/dev/laravel/framework-7.27.0
Bump laravel/framework from 7.26.0 to 7.27.0
2020-09-05 00:56:59 +01:00
Henry Whitaker
aa37a50f57 Merge pull request #292 from henrywhitaker3/dependabot/composer/dev/doctrine/dbal-2.10.3
Bump doctrine/dbal from 2.10.2 to 2.10.3
2020-09-05 00:56:43 +01:00
Henry Whitaker
99ac0b008c Merge pull request #293 from henrywhitaker3/dependabot/composer/dev/symfony/http-kernel-5.1.5
[Security] Bump symfony/http-kernel from 5.1.3 to 5.1.5
2020-09-05 00:56:25 +01:00
Henry Whitaker
b4147ce57a Merge pull request #295 from henrywhitaker3/dependabot/composer/dev/nunomaduro/larastan-0.6.4 2020-09-05 00:55:55 +01:00
dependabot-preview[bot]
80b80811aa Bump nunomaduro/larastan from 0.6.2 to 0.6.4
Bumps [nunomaduro/larastan](https://github.com/nunomaduro/larastan) from 0.6.2 to 0.6.4.
- [Release notes](https://github.com/nunomaduro/larastan/releases)
- [Changelog](https://github.com/nunomaduro/larastan/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nunomaduro/larastan/compare/v0.6.2...v0.6.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-03 11:05:31 +00:00
dependabot-preview[bot]
2d8bc7d71f [Security] Bump symfony/http-kernel from 5.1.3 to 5.1.5
Bumps [symfony/http-kernel](https://github.com/symfony/http-kernel) from 5.1.3 to 5.1.5. **This update includes a security fix.**
- [Release notes](https://github.com/symfony/http-kernel/releases)
- [Changelog](https://github.com/symfony/http-kernel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-kernel/compare/v5.1.3...v5.1.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-02 14:24:38 +00:00
dependabot-preview[bot]
a036ed7c8f Bump doctrine/dbal from 2.10.2 to 2.10.3
Bumps [doctrine/dbal](https://github.com/doctrine/dbal) from 2.10.2 to 2.10.3.
- [Release notes](https://github.com/doctrine/dbal/releases)
- [Commits](https://github.com/doctrine/dbal/compare/2.10.2...2.10.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-02 08:50:31 +00:00
dependabot-preview[bot]
01b097b4d3 Bump laravel/framework from 7.26.0 to 7.27.0
Bumps [laravel/framework](https://github.com/laravel/framework) from 7.26.0 to 7.27.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/7.x/CHANGELOG-7.x.md)
- [Commits](https://github.com/laravel/framework/compare/v7.26.0...v7.27.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-02 08:48:43 +00:00
dependabot-preview[bot]
a6326f6d98 Bump sass-loader from 9.0.3 to 10.0.1
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 9.0.3 to 10.0.1.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v9.0.3...v10.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-31 17:11:09 +00:00
Henry Whitaker
ef34238043 Update README.md 2020-08-30 19:00:55 +01:00
Henry Whitaker
212c7a99bf Update README.md 2020-08-30 19:00:31 +01:00
Henry Whitaker
8e556250aa Merge pull request #286 from henrywhitaker3/alpha 2020-08-28 20:40:27 +01:00
Henry Whitaker
87fc35c1c5 Updated changelog 2020-08-28 20:36:03 +01:00
Henry Whitaker
b6fca4e1a7 Merge pull request #281 from henrywhitaker3/dependabot/composer/dev/laravel/framework-7.26.0
Bump laravel/framework from 7.25.0 to 7.26.0
2020-08-28 20:33:59 +01:00
Henry Whitaker
ae40f503e2 Merge pull request #282 from henrywhitaker3/dependabot/composer/dev/laravel/ui-2.2.0
Bump laravel/ui from 2.1.0 to 2.2.0
2020-08-28 20:33:36 +01:00
Henry Whitaker
61da652b82 Merge pull request #283 from henrywhitaker3/dependabot/composer/dev/laravel/slack-notification-channel-2.2.0 2020-08-28 20:32:20 +01:00
Henry Whitaker
ec56337b99 Added toggle to show failed tests on graph
re #285
2020-08-28 20:31:32 +01:00
Henry Whitaker
0ed4674c3f Merge pull request #284 from henrywhitaker3/alpha
updated README.md
2020-08-27 00:31:54 +01:00
Henry Whitaker
dd56a667cd updated README.md 2020-08-27 00:31:26 +01:00
Henry Whitaker
3dc494b02e Update README.md 2020-08-27 00:30:31 +01:00
dependabot-preview[bot]
35a1de7333 Bump laravel/slack-notification-channel from 2.1.0 to 2.2.0
Bumps [laravel/slack-notification-channel](https://github.com/laravel/slack-notification-channel) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/laravel/slack-notification-channel/releases)
- [Changelog](https://github.com/laravel/slack-notification-channel/blob/2.0/CHANGELOG.md)
- [Commits](https://github.com/laravel/slack-notification-channel/compare/v2.1.0...v2.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-26 09:06:43 +00:00
dependabot-preview[bot]
f6de728265 Bump laravel/ui from 2.1.0 to 2.2.0
Bumps [laravel/ui](https://github.com/laravel/ui) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/laravel/ui/releases)
- [Changelog](https://github.com/laravel/ui/blob/2.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/ui/compare/v2.1.0...v2.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-26 09:05:15 +00:00
dependabot-preview[bot]
d6da8962eb Bump laravel/framework from 7.25.0 to 7.26.0
Bumps [laravel/framework](https://github.com/laravel/framework) from 7.25.0 to 7.26.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/7.x/CHANGELOG-7.x.md)
- [Commits](https://github.com/laravel/framework/compare/v7.25.0...v7.26.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-26 09:04:10 +00:00
Henry Whitaker
db12f8cfee Merge pull request #279 from henrywhitaker3/alpha
Final v1.9.4
2020-08-25 22:02:19 +01:00
Henry Whitaker
9b8c764b0d Added more tests and fixed changelog 2020-08-25 21:54:39 +01:00
Henry Whitaker
7999867f50 Merge pull request #277 from henrywhitaker3/alpha
Minor updates
2020-08-25 21:34:25 +01:00
Henry Whitaker
1fcdd5bb1d Updated changelog 2020-08-25 21:23:06 +01:00
Henry Whitaker
900ecb2218 Updated workflows
Moved secrets into env vars instead of directly using them in cli
2020-08-25 19:20:05 +01:00
Henry Whitaker
7da1d3d760 Moved int config loading into helper 2020-08-25 19:08:32 +01:00
Henry Whitaker
0eff685277 Added some tests for listeners and updated workflows with secrets 2020-08-25 19:01:48 +01:00
Henry Whitaker
94e4919b44 Added unit tests for helpers and tests for commands 2020-08-25 18:26:21 +01:00
Henry Whitaker
1e4604d975 Merge pull request #275 from henrywhitaker3/alpha
Updated dependencies
2020-08-25 00:57:04 +01:00
Henry Whitaker
b30ec477f4 Updated changelog 2020-08-25 00:53:55 +01:00
Henry Whitaker
13a00d43bf Merge pull request #274 from henrywhitaker3/dependabot/composer/dev/henrywhitaker3/healthchecks-io-1.0.2
Bump henrywhitaker3/healthchecks-io from 1.0.1 to 1.0.2
2020-08-25 00:50:01 +01:00
Henry Whitaker
2d779e50b0 Merge pull request #267 from henrywhitaker3/dependabot/npm_and_yarn/dev/laravel-mix-5.0.5
Bump laravel-mix from 5.0.4 to 5.0.5
2020-08-25 00:48:09 +01:00
Henry Whitaker
322ef98608 Merge pull request #266 from henrywhitaker3/dependabot/npm_and_yarn/dev/axios-0.20.0
Bump axios from 0.19.2 to 0.20.0
2020-08-25 00:47:48 +01:00
dependabot-preview[bot]
cc2e4ae91d Bump henrywhitaker3/healthchecks-io from 1.0.1 to 1.0.2
Bumps [henrywhitaker3/healthchecks-io](https://github.com/henrywhitaker3/PHP-healthchecks.io) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/henrywhitaker3/PHP-healthchecks.io/releases)
- [Changelog](https://github.com/henrywhitaker3/PHP-healthchecks.io/blob/master/CHANGELOG.md)
- [Commits](https://github.com/henrywhitaker3/PHP-healthchecks.io/compare/v1.0.1...v1.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 10:13:37 +00:00
Henry Whitaker
7ab788e61d Merge pull request #272 from henrywhitaker3/alpha
Auth bugfix
2020-08-21 23:48:26 +01:00
Henry Whitaker
da34c723a3 Security fix
Previous commit would add auth token to each 'btn-get' settings type. Have moved this to explicitly including the token in settings definitions so a token doesn't ever get sent to external  URLs
2020-08-21 23:42:57 +01:00
Henry Whitaker
e7c3dcd369 Auth bigfixes
Couldn't test notifications when auth was enabled
2020-08-21 23:39:46 +01:00
Henry Whitaker
0d80c198af Merge pull request #270 from henrywhitaker3/alpha
Added conditional notifications
2020-08-21 23:21:11 +01:00
Henry Whitaker
41f4e9667f Updated changelog 2020-08-21 23:16:33 +01:00
Henry Whitaker
f93c801f27 npm 2020-08-21 23:15:41 +01:00
Henry Whitaker
30657a07e8 Added telegram notifications 2020-08-21 23:14:41 +01:00
Henry Whitaker
6e712cbbdc Refactor threshold error msg messages into helper 2020-08-21 23:14:28 +01:00
Henry Whitaker
375ecf650c Added conditional notifications
- Absolute values
- Percentage threshold
2020-08-21 22:56:38 +01:00
Henry Whitaker
a15d633322 Fixed bug with healthchecks facade causing speedtest job to fail 2020-08-21 22:55:57 +01:00
Henry Whitaker
ef485b2909 Merge pull request #268 from henrywhitaker3/alpha
Added optional authentication
2020-08-21 18:21:34 +01:00
Henry Whitaker
79a85fdba9 Fixed some bugs
- Didn't add token to URL for settings
- Auth collapse wouldn't hide
2020-08-21 18:20:15 +01:00
Henry Whitaker
a49979daae Updated readme 2020-08-21 17:50:59 +01:00
Henry Whitaker
053138093c Updated changelog 2020-08-21 17:32:55 +01:00
Henry Whitaker
e10b4dccde Added optional authentication 2020-08-21 17:31:43 +01:00
dependabot-preview[bot]
2fbfe6f48e Bump laravel-mix from 5.0.4 to 5.0.5
Bumps [laravel-mix](https://github.com/JeffreyWay/laravel-mix) from 5.0.4 to 5.0.5.
- [Release notes](https://github.com/JeffreyWay/laravel-mix/releases)
- [Commits](https://github.com/JeffreyWay/laravel-mix/compare/v5.0.4...v5.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-21 15:18:04 +00:00
dependabot-preview[bot]
f3043baa5a Bump axios from 0.19.2 to 0.20.0
Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.20.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.19.2...v0.20.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-21 15:17:20 +00:00
Henry Whitaker
c1f44fe733 Merge pull request #262 from henrywhitaker3/alpha
Update
2020-08-15 17:27:09 +01:00
Henry Whitaker
cd87a902a7 Updated IntegServProv to check DB exists first 2020-08-15 17:21:14 +01:00
Henry Whitaker
71101f71eb Merge pull request #261 from henrywhitaker3/alpha
Minor updates
2020-08-15 16:49:57 +01:00
Henry Whitaker
5a56b80322 Merge branch 'master' into alpha 2020-08-15 16:45:19 +01:00
Henry Whitaker
4173321ce5 Merge branch 'master' into alpha 2020-08-15 16:42:52 +01:00
Henry Whitaker
de8884b550 Update stable workflow 2020-08-15 16:31:25 +01:00
Henry Whitaker
4bc002ef6c Update workflow again 2020-08-15 16:29:25 +01:00
Henry Whitaker
ed50a05415 Update workflow 2020-08-15 16:26:32 +01:00
Henry Whitaker
603c306107 Change margin on text in settings modal 2020-08-15 16:26:24 +01:00
Henry Whitaker
49a0f9087e Merge pull request #260 from henrywhitaker3/dependabot/npm_and_yarn/dev/lodash-4.17.20
Bump lodash from 4.17.19 to 4.17.20
2020-08-15 16:15:59 +01:00
Henry Whitaker
640a62eed7 Added check for db migration when loading IntegrationServiceProvider 2020-08-15 15:44:13 +01:00
Henry Whitaker
dc2ee05344 Updated changelog 2020-08-15 15:38:28 +01:00
Henry Whitaker
30ead5e82a Added UI for testing healthchecks
Also added close button on settings modals and test more info modals
2020-08-15 15:38:20 +01:00
Henry Whitaker
532837621f Added controller endpoints for testing healthchecks settings 2020-08-15 15:36:02 +01:00
Henry Whitaker
ad60f19a53 Moved job over to facade 2020-08-15 15:06:07 +01:00
Henry Whitaker
92544142a9 Integrations backend changes
- facade for healthchecks
- integrations config
2020-08-15 14:52:00 +01:00
dependabot-preview[bot]
08926d19ab Bump lodash from 4.17.19 to 4.17.20
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.20.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.20)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-14 07:43:04 +00:00
Henry Whitaker
2a9f9e7c55 Merge pull request #258 from henrywhitaker3/alpha
healthchecks io tweaks
2020-08-12 14:22:01 +01:00
Henry Whitaker
a73e058ab1 Made healthchecks settings modal auto close 2020-08-12 14:18:30 +01:00
Henry Whitaker
1a8f4d3139 Merge pull request #257 from henrywhitaker3/alpha
Added healthchecks.io int
2020-08-12 14:09:48 +01:00
Henry Whitaker
f32fcf8256 Added healthchecks.io int 2020-08-12 14:07:47 +01:00
Henry Whitaker
6ab2ae9e53 Merge pull request #255 from henrywhitaker3/alpha
Updated dependencies
2020-08-12 13:21:39 +01:00
Henry Whitaker
33169be746 Update changelog 2020-08-12 13:19:33 +01:00
Henry Whitaker
7dccdb3c1f Merge pull request #253 from henrywhitaker3/dependabot/composer/dev/laravel/tinker-2.4.2
Bump laravel/tinker from 2.4.1 to 2.4.2
2020-08-12 13:15:17 +01:00
Henry Whitaker
f0cd810f43 Merge pull request #252 from henrywhitaker3/dependabot/composer/dev/laravel/framework-7.25.0
Bump laravel/framework from 7.23.2 to 7.25.0
2020-08-12 13:14:55 +01:00
Henry Whitaker
5aee6dae70 Merge pull request #254 from henrywhitaker3/dependabot/composer/dev/mockery/mockery-1.3.3
Bump mockery/mockery from 1.3.2 to 1.3.3
2020-08-12 13:14:18 +01:00
Henry Whitaker
c4a26624e6 Merge pull request #251 from henrywhitaker3/dependabot/composer/dev/facade/ignition-2.3.6
Bump facade/ignition from 2.3.5 to 2.3.6
2020-08-12 13:13:52 +01:00
dependabot-preview[bot]
372086bc8e Bump mockery/mockery from 1.3.2 to 1.3.3
Bumps [mockery/mockery](https://github.com/mockery/mockery) from 1.3.2 to 1.3.3.
- [Release notes](https://github.com/mockery/mockery/releases)
- [Changelog](https://github.com/mockery/mockery/blob/1.3.3/CHANGELOG.md)
- [Commits](https://github.com/mockery/mockery/compare/1.3.2...1.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-12 08:21:09 +00:00
dependabot-preview[bot]
b8a3a0e72e Bump laravel/tinker from 2.4.1 to 2.4.2
Bumps [laravel/tinker](https://github.com/laravel/tinker) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/laravel/tinker/releases)
- [Changelog](https://github.com/laravel/tinker/blob/2.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/tinker/compare/v2.4.1...v2.4.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-12 08:19:36 +00:00
dependabot-preview[bot]
1a688ebe69 Bump laravel/framework from 7.23.2 to 7.25.0
Bumps [laravel/framework](https://github.com/laravel/framework) from 7.23.2 to 7.25.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/7.x/CHANGELOG-6.x.md)
- [Commits](https://github.com/laravel/framework/compare/v7.23.2...v7.25.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-12 08:18:32 +00:00
dependabot-preview[bot]
3102e9e7ab Bump facade/ignition from 2.3.5 to 2.3.6
Bumps [facade/ignition](https://github.com/facade/ignition) from 2.3.5 to 2.3.6.
- [Release notes](https://github.com/facade/ignition/releases)
- [Changelog](https://github.com/facade/ignition/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facade/ignition/compare/2.3.5...2.3.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-11 08:58:20 +00:00
Henry Whitaker
97bf5bc4af Merge pull request #249 from henrywhitaker3/alpha
Updated backup functions
2020-08-09 01:25:46 +01:00
Henry Whitaker
2a4f70c70e Updated backuphelper
Re #247
2020-08-09 01:14:44 +01:00
Henry Whitaker
2d805e3936 Fixed issue with widgets not updating
Wouldn't refresh when successful->failed test or failed->successful
2020-08-08 23:33:23 +01:00
Henry Whitaker
6cccefa21f Merge pull request #245 from henrywhitaker3/alpha
Updated to v1.7.17
2020-08-08 23:32:21 +01:00
Henry Whitaker
f0e2d28d8b Updated dependencies 2020-08-08 23:10:59 +01:00
Henry Whitaker
8a8c608bd0 Merge pull request #241 from henrywhitaker3/dependabot/npm_and_yarn/dev/sass-loader-9.0.3
Bump sass-loader from 9.0.2 to 9.0.3
2020-08-08 23:05:13 +01:00
Henry Whitaker
c8fdb13f45 Merge pull request #242 from henrywhitaker3/dependabot/npm_and_yarn/dev/bootstrap-4.5.2
Bump bootstrap from 4.5.0 to 4.5.2
2020-08-08 23:04:48 +01:00
Henry Whitaker
0e1b69f96f Merge pull request #243 from henrywhitaker3/dependabot/composer/dev/laravel/framework-7.23.2
[Security] Bump laravel/framework from 7.22.4 to 7.23.2
2020-08-08 23:04:22 +01:00
Henry Whitaker
f5b14cdf99 Merge branch 'alpha' into dependabot/composer/dev/laravel/framework-7.23.2 2020-08-08 23:03:55 +01:00
dependabot-preview[bot]
05bed7b831 Bump laravel/framework from 7.22.4 to 7.23.2
Bumps [laravel/framework](https://github.com/laravel/framework) from 7.22.4 to 7.23.2.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/7.x/CHANGELOG-7.x.md)
- [Commits](https://github.com/laravel/framework/compare/v7.22.4...v7.23.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-07 08:26:28 +00:00
dependabot-preview[bot]
2526f9596b Bump bootstrap from 4.5.0 to 4.5.2
Bumps [bootstrap](https://github.com/twbs/bootstrap) from 4.5.0 to 4.5.2.
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v4.5.0...v4.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-07 07:28:51 +00:00
dependabot-preview[bot]
e2967ac1dd Bump sass-loader from 9.0.2 to 9.0.3
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 9.0.2 to 9.0.3.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v9.0.2...v9.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-06 07:32:47 +00:00
Henry Whitaker
7a62b113bf Fixed errors picked up by larastan 2020-08-03 16:22:07 +01:00
Henry Whitaker
4b8b4ccfa3 Added larastan 2020-08-03 16:21:47 +01:00
Henry Whitaker
9f6fcb7439 Merge pull request #236 from henrywhitaker3/alpha
Updated dependencies
2020-08-03 14:15:22 +01:00
Henry Whitaker
33bbe14100 Updated dependencies 2020-08-03 14:13:08 +01:00
Henry Whitaker
2541a371fb Merge pull request #225 from henrywhitaker3/dependabot/composer/dev/facade/ignition-2.3.5
Bump facade/ignition from 2.3.4 to 2.3.5
2020-08-03 14:10:16 +01:00
Henry Whitaker
f38e60346a Merge pull request #221 from henrywhitaker3/dependabot/npm_and_yarn/dev/react-chartjs-2-2.10.0
Bump react-chartjs-2 from 2.9.0 to 2.10.0
2020-08-03 14:09:52 +01:00
Henry Whitaker
f8c46dc047 Merge remote-tracking branch 'origin/master' into alpha 2020-08-03 13:07:13 +01:00
dependabot-preview[bot]
7e3bc8724f Bump facade/ignition from 2.3.4 to 2.3.5
Bumps [facade/ignition](https://github.com/facade/ignition) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/facade/ignition/releases)
- [Changelog](https://github.com/facade/ignition/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facade/ignition/compare/2.3.4...2.3.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-03 08:53:00 +00:00
dependabot-preview[bot]
4617213073 Bump react-chartjs-2 from 2.9.0 to 2.10.0
Bumps [react-chartjs-2](https://github.com/jerairrest/react-chartjs-2) from 2.9.0 to 2.10.0.
- [Release notes](https://github.com/jerairrest/react-chartjs-2/releases)
- [Commits](https://github.com/jerairrest/react-chartjs-2/compare/2.9.0...2.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-03 08:30:09 +00:00
137 changed files with 159805 additions and 4273 deletions

79
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,79 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
target-branch: dev
ignore:
- dependency-name: laravel/framework
versions:
- 7.30.3
- 8.36.2
- 8.37.0
- 8.38.0
- dependency-name: doctrine/dbal
versions:
- 2.13.0
- 3.0.0
- dependency-name: phpunit/phpunit
versions:
- 9.5.1
- 9.5.3
- dependency-name: facade/ignition
versions:
- 2.5.10
- 2.5.11
- 2.5.12
- 2.5.13
- 2.5.9
- dependency-name: laravel/tinker
versions:
- 2.6.0
- dependency-name: nunomaduro/collision
versions:
- 5.3.0
- dependency-name: nunomaduro/larastan
versions:
- 0.6.13
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
target-branch: dev
ignore:
- dependency-name: chart.js
versions:
- 3.1.0
- 3.1.1
- dependency-name: laravel-mix
versions:
- 6.0.16
- dependency-name: y18n
versions:
- 4.0.1
- 4.0.2
- dependency-name: react-dom
versions:
- 17.0.2
- dependency-name: react
versions:
- 17.0.2
- dependency-name: react-bootstrap
versions:
- 1.4.3
- 1.5.0
- dependency-name: sass
versions:
- 1.32.5
- 1.32.6
- 1.32.7
- dependency-name: "@babel/plugin-proposal-class-properties"
versions:
- 7.12.13
- dependency-name: react-toastify
versions:
- 7.0.1
- 7.0.2

View File

@@ -10,9 +10,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@b7d1d9c9a92d8d8463ce36d7f60da34d461724f8
with:
php-version: '7.4'
- uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Update .env with secrets
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
HEALTHCHECKS_UUID: ${{ secrets.HEALTHCHECKS_UUID }}
run: |
echo SLACK_WEBHOOK=$SLACK_WEBHOOK >> .env
echo TELEGRAM_BOT_TOKEN=$TELEGRAM_BOT_TOKEN >> .env
echo TELEGRAM_CHAT_ID=$TELEGRAM_CHAT_ID >> .env
echo HEALTHCHECKS_UUID=$HEALTHCHECKS_UUID >> .env
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Create Database

View File

@@ -10,9 +10,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@b7d1d9c9a92d8d8463ce36d7f60da34d461724f8
with:
php-version: '7.4'
- uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Update .env with secrets
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
HEALTHCHECKS_UUID: ${{ secrets.HEALTHCHECKS_UUID }}
run: |
echo SLACK_WEBHOOK=$SLACK_WEBHOOK >> .env
echo TELEGRAM_BOT_TOKEN=$TELEGRAM_BOT_TOKEN >> .env
echo TELEGRAM_CHAT_ID=$TELEGRAM_CHAT_ID >> .env
echo HEALTHCHECKS_UUID=$HEALTHCHECKS_UUID >> .env
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Create Database

View File

@@ -10,9 +10,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@b7d1d9c9a92d8d8463ce36d7f60da34d461724f8
with:
php-version: '7.4'
- uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Update .env with secrets
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
HEALTHCHECKS_UUID: ${{ secrets.HEALTHCHECKS_UUID }}
run: |
echo SLACK_WEBHOOK=$SLACK_WEBHOOK >> .env
echo TELEGRAM_BOT_TOKEN=$TELEGRAM_BOT_TOKEN >> .env
echo TELEGRAM_CHAT_ID=$TELEGRAM_CHAT_ID >> .env
echo HEALTHCHECKS_UUID=$HEALTHCHECKS_UUID >> .env
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Create Database

1
.gitignore vendored
View File

@@ -16,3 +16,4 @@ yarn-error.log
_ide_helper.php
.idea
.config
reports/

View File

@@ -1,9 +1,11 @@
# Speedtest Tracker
[![Docker pulls](https://img.shields.io/docker/pulls/henrywhitaker3/speedtest-tracker?style=flat-square)](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Stable?label=master&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Dev?label=dev&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![last_commit](https://img.shields.io/github/last-commit/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [![issues](https://img.shields.io/github/issues/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [![commit_freq](https://img.shields.io/github/commit-activity/m/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) ![version](https://img.shields.io/badge/version-v1.7.15-success?style=flat-square) [![license](https://img.shields.io/github/license/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE)
[![Docker pulls](https://img.shields.io/docker/pulls/henrywhitaker3/speedtest-tracker?style=flat-square)](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Stable?label=master&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Dev?label=dev&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![last_commit](https://img.shields.io/github/last-commit/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [![issues](https://img.shields.io/github/issues/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [![commit_freq](https://img.shields.io/github/commit-activity/m/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) ![version](https://img.shields.io/badge/version-v1.10.4-success?style=flat-square) [![license](https://img.shields.io/github/license/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE)
This program runs a speedtest check every hour and graphs the results. The back-end is written in [Laravel](https://laravel.com/) and the front-end uses [React](https://reactjs.org/). It uses the [Ookla's speedtest cli](https://www.speedtest.net/apps/cli) package to get the data and uses [Chart.js](https://www.chartjs.org/) to plot the results.
A demo can be found [here](https://speedtest.henrywhitaker.com)
Disclaimer: You will need to accept Ookla's EULA and privacy agreements in order to use this container.
![speedtest](https://user-images.githubusercontent.com/36062479/78822484-a82b8300-79ca-11ea-8525-fdeae496a0bd.gif)
@@ -14,6 +16,7 @@ Disclaimer: You will need to accept Ookla's EULA and privacy agreements in order
- Graph of previous speedtests going back x days
- Backup/restore data in JSON/CSV format
- Slack/Discord/Telegram notifications
- [healthchecks.io](https://healthchecks.io) integration
- Organizr integration
## Installation & Setup
@@ -80,7 +83,21 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e TELEGRAM_CHAT_ID` | Optional. Telegram chat ID. |
| `-e PUID` | Optional. Supply a local user ID for volume permissions |
| `-e PGID` | Optional. Supply a local group ID for volume permissions |
| `-e AUTH` | Optional. Set to 'true' to enable authentication for the app |
### Authentication
Authentication is optional. When enabled, unauthenticated users will only be able to see the graphs and tests table. To be able to queue a new speedtest, backup/restore data and update instance settings you will need to log in. To enable authentication, pass the `AUTH=true` environment variable in docker or run `php artisan speedtest:auth --enable` for manual installs (same command with `--disable` to turn it off).
The default credentials are:
| Field | Function |
| --- | --- |
| username | admin@admin.com |
| password | password |
After enabling, you should change the password through the web UI.
### Manual Install
For manual installtions, please follow the instrucitons [here](https://github.com/henrywhitaker3/Speedtest-Tracker/wiki/Manual-Installation).
For manual installations, please follow the instructions [here](https://github.com/henrywhitaker3/Speedtest-Tracker/wiki/Manual-Installation).

View File

@@ -34,7 +34,7 @@ class AcceptEULACommand extends Command
/**
* Execute the console command.
*
* @return int
* @return void
*/
public function handle()
{

View File

@@ -0,0 +1,59 @@
<?php
namespace App\Console\Commands;
use App\Helpers\SettingsHelper;
use Illuminate\Console\Command;
class AuthenticationCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'speedtest:auth {--enable} {--disable}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Toggle authentication for the app';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$opts = $this->options();
if($opts['enable'] === true && $opts['disable'] === true) {
$this->warn('Please specify only ONE of --enable and --disable');
} else if($opts['enable'] === false && $opts['disable'] === false) {
$this->warn('You need to specify either --enable OR --disable');
} else {
if($opts['enable'] === true) {
$this->info('Enabling authentication');
SettingsHelper::set('auth', true);
}
if($opts['disable'] === true) {
$this->info('Disabling authentication');
SettingsHelper::set('auth', false);
}
}
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace App\Console\Commands;
use App\Auth\LoginSession;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Log;
class ClearOldSessionsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'speedtest:clear-sessions';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Clear expired sessions from database';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$now = Carbon::now()->timestamp;
$sessions = LoginSession::where('expires', '<=', $now)
->delete();
$this->info('Invalidated expired sessions');
}
}

View File

@@ -34,7 +34,7 @@ class ClearQueueCommand extends Command
/**
* Execute the console command.
*
* @return int
* @return void
*/
public function handle()
{

View File

@@ -34,7 +34,7 @@ class GetConfig extends Command
/**
* Execute the console command.
*
* @return int
* @return void
*/
public function handle()
{

View File

@@ -34,7 +34,7 @@ class SetSlackWebhook extends Command
/**
* Execute the console command.
*
* @return int
* @return void
*/
public function handle()
{

View File

@@ -36,7 +36,7 @@ class SetTelegramOptions extends Command
/**
* Execute the console command.
*
* @return int
* @return void
*/
public function handle()
{

View File

@@ -34,7 +34,7 @@ class SpeedtestCommand extends Command
/**
* Runs a speedtest synchroonously and displays the results..
*
* @return null
* @return void
*/
public function handle()
{

View File

@@ -35,7 +35,7 @@ class SpeedtestLatestCommand extends Command
/**
* Prints the latest speedtest values.
*
* @return null
* @return void
*/
public function handle()
{

View File

@@ -33,7 +33,7 @@ class SpeedtestVersionCommand extends Command
/**
* Execute the console command.
*
* @return mixed
* @return void
*/
public function handle()
{

View File

@@ -34,7 +34,7 @@ class TestNotification extends Command
/**
* Execute the console command.
*
* @return int
* @return void
*/
public function handle()
{

View File

@@ -28,8 +28,11 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
$schedule->job(new SpeedtestJob)->cron(SettingsHelper::get('schedule')['value']);
if ((bool)SettingsHelper::get('schedule_enabled')->value) {
$schedule->job(new SpeedtestJob(true, config('integrations')))->cron(SettingsHelper::get('schedule')['value']);
}
$schedule->command('speedtest:overview')->cron('0 ' . SettingsHelper::get('speedtest_overview_time')->value . ' * * *');
$schedule->command('speedtest:clear-sessions')->everyMinute();
}
/**
@@ -39,7 +42,7 @@ class Kernel extends ConsoleKernel
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}

View File

@@ -15,6 +15,8 @@ class SpeedtestCompleteEvent
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $speedtest;
/**
* Create a new event instance.
*

View File

@@ -0,0 +1,13 @@
<?php
namespace App\Facades;
use Illuminate\Support\Facades\Facade;
class HealthchecksFacade extends Facade
{
protected static function getFacadeAccessor()
{
return 'healthcheck';
}
}

View File

@@ -3,6 +3,7 @@
namespace App\Helpers;
use App\Speedtest;
use Cache;
use DateTime;
use Exception;
use Illuminate\Support\Facades\Log;
@@ -26,13 +27,13 @@ class BackupHelper {
case 'csv':
$data = Speedtest::get();
$csv = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix() . $name . '.csv';
$csv = storage_path() . '/app/' . $name . '.csv';
$name = $name . '.csv';
$handle = fopen($csv, 'w+');
fputcsv($handle, array('id', 'ping', 'download', 'upload', 'created_at', 'updated_at'));
fputcsv($handle, array('id', 'ping', 'download', 'upload', 'server_id', 'server_name', 'server_host', 'url', 'scheduled', 'failed', 'created_at', 'updated_at'));
foreach($data as $d) {
fputcsv($handle, array($d->id, $d->ping, $d->download, $d->upload, $d->created_at, $d->updated_at));
fputcsv($handle, BackupHelper::createCSVBackupArray($d));
}
fclose($handle);
@@ -55,29 +56,32 @@ class BackupHelper {
*
* @param array|string $array Backup data
* @param string $format json|csv
* @return boolean
* @return bool
*/
public static function restore($array, $format)
{
Cache::flush();
if($format == 'json') {
foreach($array as $test) {
try {
$st = Speedtest::create([
'ping' => $test['ping'],
'download' => $test['download'],
'upload' => $test['upload'],
'created_at' => $test['created_at'],
]);
$data = BackupHelper::backupJSONToArray($test);
if($data === false) {
continue;
}
Speedtest::create($data);
} catch(Exception $e) {
Log::error($e);
continue;
}
}
return true;
} else if($format == 'csv') {
$csv = explode(PHP_EOL, $array);
$headers = 'id,ping,download,upload,created_at,updated_at';
if($csv[0] != $headers) {
Log::error('Incorrect CSV format');
$headers = BackupHelper::validateCSV($csv[0]);
if($headers === false) {
return false;
}
@@ -85,14 +89,14 @@ class BackupHelper {
$csv = array_values($csv);
for($i = 0; $i < sizeof($csv); $i++) {
$e = explode(',', $csv[$i]);
$data = BackupHelper::backupCSVToArray($csv[$i]);
if($data === false) {
continue;
}
try {
$st = Speedtest::create([
'ping' => $e[1],
'download' => $e[2],
'upload' => $e[3],
'created_at' => substr($e[4], 1, -1),
]);
Speedtest::create($data);
} catch(Exception $e) {
Log::error($e);
continue;
@@ -101,5 +105,182 @@ class BackupHelper {
return true;
}
return false;
}
/**
* Validate a CSV file passed for restore
*
* @param String $csv The line containing the CSV headers
* @return bool|string
*/
public static function validateCSV(String $csv)
{
$headers = [
'old' => 'id,ping,download,upload,created_at,updated_at',
'new' => 'id,ping,download,upload,server_id,server_name,server_host,url,scheduled,failed,created_at,updated_at',
];
$backupHeaders = null;
foreach($headers as $key => $h) {
if($csv == $h) {
$backupHeaders = $key;
}
}
if($backupHeaders === null) {
Log::info('Incorrect CSV format');
return false;
}
return $backupHeaders;
}
/**
* Return an array from the raw CSV data
*
* @param String $line The line of CSV data
* @param String $header The type of backup header
* @return array|bool
*/
public static function backupCSVToArray(String $line, String $header = 'new')
{
$basic = explode(',', $line);
if($header == 'old') {
$array = [
'ping' => $basic[1],
'download' => $basic[2],
'upload' => $basic[3],
'created_at' => substr($basic[4], 1, -1),
];
}
if($header == 'new') {
$array = [
'ping' => $basic[1],
'download' => $basic[2],
'upload' => $basic[3],
'server_id' => $basic[4],
'server_name' => $basic[5],
'server_host' => $basic[6],
'url' => $basic[7],
'scheduled' => $basic[8],
'failed' => $basic[9],
'created_at' => substr($basic[10], 1, -1),
];
}
if(!isset($array)) {
return false;
}
return BackupHelper::cleanRestoreDataArray($array);
}
/**
* Clean an array, setting values with '' to null
*
* @param array $array
* @return array
*/
public static function cleanRestoreDataArray(array $array)
{
foreach($array as $key => $val) {
if($val === '') {
$array[$key] = null;
}
}
return $array;
}
/**
* Return an array from the JSON data
*
* @param array $json json_decoded data
* @return array|bool
*/
public static function backupJSONToArray($json)
{
$required = [
'ping',
'upload',
'download',
'created_at',
];
$extras = [
'server_id',
'server_name',
'server_host',
'url',
'failed',
'scheduled'
];
$array = [];
foreach($required as $req) {
if(!array_key_exists($req, $json)) {
return false;
}
$val = $json[$req];
if($val === '') {
$val = null;
}
$array[$req] = $val;
}
foreach($extras as $extra) {
if(array_key_exists($extra, $json)) {
$val = $json[$extra];
if($val === '') {
$val = null;
}
$array[$extra] = $val;
}
}
return $array;
}
/**
* Return an array to store in CSV
*
* @param Speedtest $test
* @return array
*/
public static function createCSVBackupArray(Speedtest $test)
{
$data = [
$test->id,
$test->ping,
$test->download,
$test->upload,
$test->server_id,
$test->server_name,
$test->server_host,
$test->url,
$test->scheduled,
$test->failed,
$test->created_at,
$test->updated_at
];
foreach($data as $key => $val) {
if(strpos($val, ',') !== false) {
$val = str_replace(',', ' -', $val);
}
$data[$key] = $val;
}
return $data;
}
}

View File

@@ -0,0 +1,67 @@
<?php
namespace App\Helpers;
class NotificationsHelper {
/**
* Parse $errors and format message
*
* @param array $errors
* @return String
*/
public static function formatPercentageThresholdMessage(array $errors)
{
$msg = NotificationsHelper::thresholdMessageStart($errors);
$msg = $msg . 'exceeded the percentage threshold';
return $msg;
}
/**
* Parse $errors and format message
*
* @param array $errors
* @return String
*/
public static function formatAbsoluteThresholdMessage(array $errors)
{
$msg = NotificationsHelper::thresholdMessageStart($errors);
$msg = $msg . 'exceeded the absolute threshold';
return $msg;
}
/**
* Iterate through errors to format message
*
* @param array $errors
* @return String
*/
public static function thresholdMessageStart(array $errors)
{
$msg = 'For the latest speedtest, the ';
for($i = 0; $i < sizeof($errors); $i++) {
$key = $errors[$i];
$msg = $msg . $key;
if(sizeof($errors) > 1 && $i < (sizeof($errors) - 1)) {
$msg = $msg . ', ';
}
}
if($msg[-1] != '') {
$msg = $msg . ' ';
}
if(sizeof($errors) > 1) {
$msg = $msg . 'values ';
} else {
$msg = $msg . 'value ';
}
return $msg;
}
}

View File

@@ -4,23 +4,25 @@ namespace App\Helpers;
use App\Events\TestNotificationEvent;
use App\Setting;
use Cache;
use Carbon\Carbon;
class SettingsHelper {
class SettingsHelper
{
/**
* Get a Setting object by name
*
* @param String $name The name field in the setting table
* @return \App\Setting|boolean $name The Setting object. Returns false if no mathcing obj.
* @return \App\Setting|bool|array $name The Setting object. Returns false if no mathcing obj.
*/
public static function get(String $name)
{
$name = Setting::where('name', $name)->get();
if(sizeof($name) == 0) {
if (sizeof($name) == 0) {
return false;
} else if(sizeof($name) == 1) {
} else if (sizeof($name) == 1) {
return $name[0];
} else {
$name = $name->keyBy('name');
@@ -32,18 +34,18 @@ class SettingsHelper {
* Create / update value for Setting object.
*
* @param String $name Name of setting
* @param String $value Value of setting
* @param String|bool $value Value of setting
* @return \App\Setting
*/
public static function set(String $name, $value)
{
$setting = SettingsHelper::get($name);
if($value === false) {
if ($value === false) {
$value = "0";
}
if($setting !== false) {
if ($setting !== false) {
$setting->value = $value;
$setting->save();
} else {
@@ -53,6 +55,10 @@ class SettingsHelper {
]);
}
if ($name == 'show_failed_tests_on_graph') {
Cache::flush();
}
return $setting;
}
@@ -64,13 +70,13 @@ class SettingsHelper {
public static function getBase()
{
$base = env('BASE_PATH', '/');
if($base == '') {
if ($base == '') {
$base = '/';
} else {
if($base[0] != '/') {
if ($base[0] != '/') {
$base = '/' . $base;
}
if($base[-1] != '/') {
if ($base[-1] != '/') {
$base = $base . '/';
}
}
@@ -85,12 +91,17 @@ class SettingsHelper {
*/
public static function settingIsEditable(string $key)
{
// Manual override for app_name
if ($key === 'app_name') {
return true;
}
$results = [];
// Try exact key
$val = exec('echo $' . $key);
if($val == "") {
if ($val == "") {
array_push($results, true);
} else {
array_push($results, false);
@@ -99,25 +110,25 @@ class SettingsHelper {
// Try key all caps
$val = exec('echo $' . strtoupper($key));
if($val == "") {
if ($val == "") {
array_push($results, true);
} else {
array_push($results, false);
}
if(env($key, false) == false) {
if (env($key, false) == false) {
array_push($results, true);
} else {
array_push($results, false);
}
if(env(strtoupper($key), false) == false) {
if (env(strtoupper($key), false) == false) {
array_push($results, true);
} else {
array_push($results, false);
}
if(in_array(false, $results)) {
if (in_array(false, $results)) {
return false;
}
@@ -133,6 +144,12 @@ class SettingsHelper {
{
return [
'base' => SettingsHelper::getBase(),
'name' => SettingsHelper::get('app_name')->value,
'widgets' => [
'show_average' => (bool)SettingsHelper::get('show_average')->value,
'show_max' => (bool)SettingsHelper::get('show_max')->value,
'show_min' => (bool)SettingsHelper::get('show_min')->value,
],
'graphs' => [
'download_upload_graph_enabled' => SettingsHelper::get('download_upload_graph_enabled'),
'download_upload_graph_width' => SettingsHelper::get('download_upload_graph_width'),
@@ -145,7 +162,8 @@ class SettingsHelper {
'slack_webhook' => SettingsHelper::settingIsEditable('slack_webhook'),
'telegram_bot_token' => SettingsHelper::settingIsEditable('telegram_bot_token'),
'telegram_chat_id' => SettingsHelper::settingIsEditable('telegram_chat_id'),
]
],
'auth' => (bool)SettingsHelper::get('auth')->value
];
}
@@ -153,20 +171,43 @@ class SettingsHelper {
* Send test notification to agents
*
* @param boolean|string $agent
* @return void
* @return bool
*/
public static function testNotification($agent = true)
{
$agents = [ 'slack', 'telegram' ];
$agents = ['slack', 'telegram'];
if($agent === true) {
if ($agent === true) {
event(new TestNotificationEvent($agents));
return true;
}
if(in_array($agent, $agents)) {
event(new TestNotificationEvent([ $agent ]));
if (in_array($agent, $agents)) {
event(new TestNotificationEvent([$agent]));
return true;
}
return false;
}
public static function loadIntegrationConfig()
{
$settings = [
'healthchecks_enabled' => (bool)SettingsHelper::get('healthchecks_enabled')->value,
'healthchecks_uuid' => SettingsHelper::get('healthchecks_uuid')->value,
'slack_webhook' => SettingsHelper::get('slack_webhook')->value,
'telegram_bot_token' => SettingsHelper::get('telegram_bot_token')->value,
'telegram_chat_id' => SettingsHelper::get('telegram_chat_id')->value,
];
foreach ($settings as $key => $value) {
$key = 'integrations.' . $key;
if ($value === "") {
$value = null;
}
config()->set([$key => $value]);
}
}
}

View File

@@ -5,10 +5,12 @@ namespace App\Helpers;
use App\Speedtest;
use Carbon\Carbon;
use Exception;
use Henrywhitaker3\Healthchecks\Healthchecks;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use InvalidArgumentException;
use JsonException;
class SpeedtestHelper {
@@ -17,7 +19,7 @@ class SpeedtestHelper {
* Runs/processes speedtest output to created a Speedtest object
*
* @param boolean|string $output If false, new speedtest runs. If anything else, will try to parse as JSON for speedtest results.
* @return \App\Speedtest|boolean
* @return \App\Speedtest|bool
*/
public static function runSpeedtest($output = false, $scheduled = true)
{
@@ -51,7 +53,7 @@ class SpeedtestHelper {
$test = false;
}
if(!$test) {
if($test == false) {
Speedtest::create([
'ping' => 0,
'upload' => 0,
@@ -59,9 +61,7 @@ class SpeedtestHelper {
'failed' => true,
'scheduled' => $scheduled,
]);
}
if(!isset($test) || $test == false) {
return false;
}
@@ -142,14 +142,14 @@ class SpeedtestHelper {
/**
* Parses network speeds and return converted to Mbps
*
* @param array $input
* @param string $input
* @return array
*/
public static function parseUnits($input)
{
$input = explode(' ', $input);
$val = $input[0];
$val = (float)$input[0];
$unit = explode('/', $input[1])[0];
switch($unit) {
@@ -228,7 +228,7 @@ class SpeedtestHelper {
$range = [
Carbon::today()
];
for($i = 0; $i < $days; $i++) {
for($i = 0; $i < ($days - 1); $i++) {
$prev = end($range);
$new = $prev->copy()->subDays(1);
array_push($range, $new);
@@ -256,15 +256,19 @@ class SpeedtestHelper {
/**
* Create a backup of the SQLite database
*
* @return boolean
* @return null|boolean
*/
public static function dbBackup()
{
if(env('DB_CONNECTION') === 'sqlite') {
if(env('DB_DATABASE') !== null) {
$current = env('DB_DATABASE');
if(File::copy($current, $current . '.bak')) {
return true;
try {
if(File::copy($current, $current . '.bak')) {
return true;
}
}catch(Exception $e) {
return false;
}
}
@@ -277,30 +281,97 @@ class SpeedtestHelper {
/**
* Delete all speedtests from the database
*
* @return boolean|string
* @return array
*/
public static function deleteAll()
{
Cache::flush();
if(SpeedtestHelper::dbBackup() !== false) {
if(sizeof(Speedtest::whereNotNull('id')->get()) > 0) {
if(Speedtest::whereNotNull('id')->delete()) {
return [
'success' => true,
];
}
SpeedtestHelper::dbBackup();
if(sizeof(Speedtest::whereNotNull('id')->get()) > 0) {
if(Speedtest::whereNotNull('id')->delete()) {
return [
'success' => true,
];
}
return [
'success' => true,
];
}
return [
'success' => false,
'msg' => 'There was an error backing up the database. No speedtests have been deleted.'
'success' => true,
];
}
/**
* Work out if a test is lower than the threshold for historic tests
*
* @param String $type
* @param Speedtest $test
* @return array
*/
public static function testIsLowerThanThreshold(String $type, Speedtest $test)
{
if($type == 'percentage') {
$avg = Speedtest::select(DB::raw('AVG(ping) as ping, AVG(download) as download, AVG(upload) as upload'))
->where('failed', false)
->get()
->toArray()[0];
$threshold = SettingsHelper::get('threshold_alert_percentage')->value;
if($threshold == '') {
return [];
}
$errors = [];
foreach($avg as $key => $value) {
if($key == 'ping') {
$threshold = (float)$value * (1 + ( $threshold / 100 ));
if($test->$key > $threshold) {
array_push($errors, $key);
}
} else {
$threshold = (float)$value * (1 - ( $threshold / 100 ));
if($test->$key < $threshold) {
array_push($errors, $key);
}
}
}
return $errors;
}
if($type == 'absolute') {
$thresholds = [
'download' => SettingsHelper::get('threshold_alert_absolute_download')->value,
'upload' => SettingsHelper::get('threshold_alert_absolute_upload')->value,
'ping' => SettingsHelper::get('threshold_alert_absolute_ping')->value,
];
$errors = [];
foreach($thresholds as $key => $value) {
if($value == '') {
continue;
}
if($key == 'ping') {
if($test->$key > $value) {
array_push($errors, $key);
}
} else {
if($test->$key < $value) {
array_push($errors, $key);
}
}
}
return $errors;
}
throw new InvalidArgumentException();
}
}

View File

@@ -13,38 +13,52 @@ class UpdateHelper {
/**
* URL of updates
*
* @var string
* @var string|bool
*/
public $url;
/**
* Current app version number
*
* @var string
* @var string|bool
*/
public $currentVersion;
/**
* Latest app version number
*
* @var string|bool
*/
public $latestVersion;
/**
* Username of GitHub repo
*
* @var string
* @var string|bool
*/
public $user;
/**
* Name of GitHub repo
*
* @var string
* @var string|bool
*/
public $repo;
/**
* Branch of GitHub repo
*
* @var string
* @var string|bool
*/
public $branch;
/**
* Store download
*
* @var string|null
*/
public $download;
function __construct() {
$this->currentVersion = config('speedtest.version');
$this->user = config('speedtest.user');
@@ -87,7 +101,7 @@ class UpdateHelper {
/**
* Gets the latest version number from GitHub
*
* @return array [ repo, branch, version ]
* @return array|bool [ repo, branch, version ]
*/
public function checkLatestVersion()
{
@@ -256,7 +270,6 @@ class UpdateHelper {
$zip->open($backupZip, ZipArchive::CREATE | ZipArchive::OVERWRITE);
// Create recursive directory iterator
/** @var SplFileInfo[] $files */
$files = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($rootPath),
RecursiveIteratorIterator::LEAVES_ONLY

View File

@@ -8,11 +8,14 @@ use App\Helpers\EmailVerificationHelper;
use Illuminate\Support\Facades\Auth;
use App\Http\Controllers\Controller;
use App\LoginSession;
use App\Rules\CurrentPasswordMatches;
use App\User;
use DateTime;
use Hash;
use Illuminate\Support\Facades\Request as RequestFacade;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Log;
use Ramsey\Uuid\Uuid;
class AuthController extends Controller
@@ -164,6 +167,10 @@ class AuthController extends Controller
[ 'expires', '>', time() ]
])->get();
$sessions = $sessions->map(function ($item) {
return collect($item)->forget(['token']);
});
return response()->json([
'method' => 'get auth sessions',
'response' => $sessions
@@ -211,4 +218,36 @@ class AuthController extends Controller
'success' => true,
], 200);
}
public function changePassword(Request $request)
{
$rules = [
'currentPassword' => [ 'string', 'required', new CurrentPasswordMatches() ],
'newPassword' => [ 'required', 'string', 'confirmed', 'min:8' ],
'logoutDevices' => [ 'required', 'bool' ]
];
$validator = Validator::make($request->all(), $rules);
if($validator->fails()) {
return response()->json([
'method' => 'reset password',
'success' => false,
'error' => $validator->errors()
], 403);
}
$user = Auth::user();
$user->password = $request->newPassword;
$user->save();
if($request->logoutDevices == true) {
AuthLoginSession::where('user_id', $user->id)->update([ 'active' => false ]);
}
return response()->json([
'method' => 'reset password',
'success' => true
], 200);
}
}

View File

@@ -3,19 +3,28 @@
namespace App\Http\Controllers;
use App\Helpers\BackupHelper;
use App\Helpers\SettingsHelper;
use DateTime;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
use Illuminate\Http\JsonResponse;
class BackupController extends Controller
{
public function __construct()
{
if((bool)SettingsHelper::get('auth')->value === true) {
$this->middleware('auth:api');
}
}
/**
* Get backup of speedtests
*
* @param Request $request
* @return file
* @return mixed|JsonResponse
*/
public function backup(Request $request)
{
@@ -36,7 +45,7 @@ class BackupController extends Controller
* Retore from a backup
*
* @param Request $request
* @return Response
* @return JsonResponse
*/
public function restore(Request $request)
{

View File

@@ -0,0 +1,84 @@
<?php
namespace App\Http\Controllers;
use App\Helpers\SettingsHelper;
use Exception;
use Healthcheck;
use Henrywhitaker3\Healthchecks\Exceptions\HealthchecksUuidNotFoundException;
use Henrywhitaker3\Healthchecks\Healthchecks;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use Ramsey\Uuid\Exception\InvalidUuidStringException;
class IntegrationsController extends Controller
{
public function __construct()
{
if((bool)SettingsHelper::get('auth')->value === true) {
$this->middleware('auth:api');
}
}
/**
* Test the healthchecks config
*
* @return JsonResponse
*/
public function testHealthchecks(String $method)
{
$methodResp = 'test healthchecks \'' . $method . '\' endpoint';
try {
// SettingsHelper::loadIntegrationConfig();
if($method == 'success') {
Healthcheck::success();
}
if($method == 'fail') {
Healthcheck::fail();
}
if($method == 'start') {
Healthcheck::start();
}
return response()->json([
'method' => $methodResp,
'success' => true
], 200);
} catch(InvalidUuidStringException $e) {
return response()->json([
'method' => $methodResp,
'success' => false,
'error' => 'Invalid UUID'
], 422);
} catch(HealthchecksUuidNotFoundException $e) {
return response()->json([
'method' => $methodResp,
'success' => false,
'error' => 'UUID not found'
], 404);
} catch(Exception $e) {
return response()->json([
'method' => $methodResp,
'success' => false,
'error' => $e->getMessage()
], 422);
}
}
/**
* Trigger a test of all notification agents
*
* @return JsonResponse
*/
public function testNotification()
{
SettingsHelper::testNotification();
return response()->json([
'method' => 'test notification agents'
], 200);
}
}

View File

@@ -8,14 +8,23 @@ use App\Setting;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Collection;
class SettingsController extends Controller
{
public function __construct()
{
if ((bool)SettingsHelper::get('auth')->value === true) {
$this->middleware('auth:api')
->except(['config']);
}
}
/**
* Return all settings
*
* @return array
* @return Collection
*/
public function index()
{
@@ -37,26 +46,26 @@ class SettingsController extends Controller
* Store/update a setting
*
* @param Request $request
* @return Response
* @return JsonResponse
*/
public function store(Request $request)
{
$rule = [
'name' => [ 'required', 'string', 'min:1' ],
'name' => ['required', 'string', 'min:1'],
];
if($request->name == 'schedule') {
$rule['value'] = [ 'required', new Cron ];
if ($request->name == 'schedule') {
$rule['value'] = ['required', new Cron];
}
$validator = Validator::make($request->all(), $rule);
if($validator->fails()) {
if ($validator->fails()) {
return response()->json([
'method' => 'Store a setting',
'error' => $validator->errors()
], 422);
}
if(!isset($request->value)) {
if (!isset($request->value)) {
$request->value = '';
}
@@ -72,17 +81,17 @@ class SettingsController extends Controller
* Bulk store/update a setting
*
* @param Request $request
* @return Response
* @return JsonResponse
*/
public function bulkStore(Request $request)
{
$rule = [
'data' => [ 'array', 'required' ],
'data.*.name' => [ 'string', 'required' ],
'data' => ['array', 'required'],
'data.*.name' => ['string', 'required'],
];
$validator = Validator::make($request->all(), $rule);
if($validator->fails()) {
if ($validator->fails()) {
return response()->json([
'method' => 'Bulk store a setting',
'error' => $validator->errors()
@@ -90,14 +99,14 @@ class SettingsController extends Controller
}
$settings = [];
foreach($request->data as $d) {
if(!isset($d['value']) || $d['value'] == null) {
$d['value'] = '';
foreach ($request->data as $d) {
if (!isset($d['value']) || $d['value'] == null) {
$d['value'] = '';
}
if($d['name'] == 'speedtest_overview_time') {
$ok = [ '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23' ];
if(!in_array($d['value'], $ok)) {
if ($d['name'] == 'speedtest_overview_time') {
$ok = ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23'];
if (!in_array($d['value'], $ok)) {
return response()->json([
'method' => 'Bulk store a setting',
'error' => 'Invalid speedtest_overview_time value'
@@ -107,9 +116,9 @@ class SettingsController extends Controller
$setting = SettingsHelper::get($d['name']);
if($setting == false) {
if ($setting == false) {
$setting = SettingsHelper::set($d['name'], $d['value']);
} else if(SettingsHelper::settingIsEditable($setting->name)) {
} else if (SettingsHelper::settingIsEditable($setting->name)) {
$setting = SettingsHelper::set($d['name'], $d['value']);
} else {
continue;
@@ -133,13 +142,4 @@ class SettingsController extends Controller
{
return SettingsHelper::getConfig();
}
public function testNotification()
{
SettingsHelper::testNotification();
return response()->json([
'method' => 'test notificaiton agents'
], 200);
}
}

View File

@@ -2,6 +2,7 @@
namespace App\Http\Controllers;
use App\Helpers\SettingsHelper;
use App\Helpers\SpeedtestHelper;
use App\Jobs\SpeedtestJob;
use App\Speedtest;
@@ -11,19 +12,27 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
use Illuminate\Http\JsonResponse;
class SpeedtestController extends Controller
{
public function __construct()
{
if ((bool)SettingsHelper::get('auth')->value === true) {
$this->middleware('auth:api')
->only(['run', 'delete', 'deleteAll']);
}
}
/**
* Returns paginated list of speedtests
*
* @return Response
* @return JsonResponse
*/
public function index()
{
$data = Speedtest::orderBy('created_at', 'desc')
->paginate();
->paginate();
return response()->json([
'method' => 'index of speedtests',
@@ -35,17 +44,17 @@ class SpeedtestController extends Controller
* Returns speedtest going back 'x' days
*
* @param int $days
* @return void
* @return JsonResponse
*/
public function time($days)
{
$rule = [
'days' => [ 'required', 'integer' ],
'days' => ['required', 'integer'],
];
$validator = Validator::make([ 'days' => $days ], $rule);
$validator = Validator::make(['days' => $days], $rule);
if($validator->fails()) {
if ($validator->fails()) {
return response()->json([
'method' => 'get speedtests in last x days',
'error' => $validator->errors(),
@@ -54,10 +63,18 @@ class SpeedtestController extends Controller
$ttl = Carbon::now()->addDays(1);
$data = Cache::remember('speedtest-days-' . $days, $ttl, function () use ($days) {
$showFailed = (bool)SettingsHelper::get('show_failed_tests_on_graph')->value;
if ($showFailed === true) {
return Speedtest::where('created_at', '>=', Carbon::now()->subDays($days))
->orderBy('created_at', 'asc')
->get();
}
return Speedtest::where('created_at', '>=', Carbon::now()->subDays($days))
->where('failed', false)
->orderBy('created_at', 'asc')
->get();
->where('failed', false)
->orderBy('created_at', 'asc')
->get();
});
return response()->json([
@@ -71,17 +88,17 @@ class SpeedtestController extends Controller
* Returns speedtest failure rate going back 'x' days
*
* @param int $days
* @return void
* @return JsonResponse
*/
public function fail($days)
{
$rule = [
'days' => [ 'required', 'integer' ],
'days' => ['required', 'integer'],
];
$validator = Validator::make([ 'days' => $days ], $rule);
$validator = Validator::make(['days' => $days], $rule);
if($validator->fails()) {
if ($validator->fails()) {
return response()->json([
'method' => 'get speedtests in last x days',
'error' => $validator->errors(),
@@ -100,25 +117,43 @@ class SpeedtestController extends Controller
/**
* Return latest speedtest
*
* @return Response
* @return JsonResponse
*/
public function latest()
{
$data = SpeedtestHelper::latest();
$avg = Speedtest::select(DB::raw('AVG(ping) as ping, AVG(download) as download, AVG(upload) as upload'))
->where('failed', false)
->get();
$max = Speedtest::select(DB::raw('MAX(ping) as ping, MAX(download) as download, MAX(upload) as upload'))
->where('failed', false)
->get();
if($data) {
return response()->json([
'method' => 'get latest speedtest',
'data' => $data,
'average' => $avg[0],
'max' => $max[0],
], 200);
$response = [
'method' => 'get latest speedtest',
'data' => $data,
];
if (SettingsHelper::get('show_average')) {
$avg = Speedtest::select(DB::raw('AVG(ping) as ping, AVG(download) as download, AVG(upload) as upload'))
->where('failed', false)
->first()
->toArray();
$response['average'] = $avg;
}
if (SettingsHelper::get('show_max')) {
$max = Speedtest::select(DB::raw('MAX(ping) as ping, MAX(download) as download, MAX(upload) as upload'))
->where('failed', false)
->first()
->toArray();
$response['maximum'] = $max;
}
if (SettingsHelper::get('show_min')) {
$min = Speedtest::select(DB::raw('MIN(ping) as ping, MIN(download) as download, MIN(upload) as upload'))
->where('failed', false)
->first()
->toArray();
$response['minimum'] = $min;
}
if ($data) {
return response()->json($response, 200);
} else {
return response()->json([
'method' => 'get latest speedtest',
@@ -130,17 +165,18 @@ class SpeedtestController extends Controller
/**
* Queue a new speedtest
*
* @return Response
* @return JsonResponse
*/
public function run()
{
try {
$data = SpeedtestJob::dispatch(false);
SettingsHelper::loadIntegrationConfig();
$data = SpeedtestJob::dispatch(false, config('integrations'));
return response()->json([
'method' => 'run speedtest',
'data' => 'a new speedtest has been added to the queue'
], 200);
} catch(Exception $e) {
} catch (Exception $e) {
return response()->json([
'method' => 'run speedtest',
'error' => $e
@@ -151,13 +187,13 @@ class SpeedtestController extends Controller
/**
* Delete all speedtests from db
*
* @return Response
* @return JsonResponse
*/
public function deleteAll()
{
$ret = SpeedtestHelper::deleteAll();
if($ret['success']) {
if ($ret['success']) {
return response()->json([
'method' => 'delete all speedtests from the database',
'success' => true
@@ -175,7 +211,7 @@ class SpeedtestController extends Controller
* Delete a specific speedtest from the database
*
* @param Speedtest $speedtest
* @return boolean
* @return JsonResponse
*/
public function delete(Speedtest $speedtest)
{

View File

@@ -2,17 +2,25 @@
namespace App\Http\Controllers;
use App\Helpers\SettingsHelper;
use Exception;
use Updater;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
class UpdateController extends Controller
{
public function __construct()
{
if((bool)SettingsHelper::get('auth')->value === true) {
$this->middleware('auth:api');
}
}
/**
* Check for new update
*
* @return Response
* @return JsonResponse
*/
public function checkForUpdate()
{
@@ -25,7 +33,7 @@ class UpdateController extends Controller
/**
* Download new update
*
* @return Response
* @return JsonResponse
*/
public function downloadUpdate()
{
@@ -47,7 +55,7 @@ class UpdateController extends Controller
/**
* Trigger update extraction
*
* @return Response
* @return JsonResponse
*/
public function extractUpdate()
{
@@ -69,22 +77,22 @@ class UpdateController extends Controller
/**
* Trigger update file move
*
* @return Response
* @return JsonResponse
*/
public function moveUpdate()
{
$cp = Updater::updateFiles();
Updater::updateFiles();
return response()->json([
'method' => 'copy latest version',
'success' => $cp,
'success' => null,
], 200);
}
/**
* Get local changelog
*
* @return Response
* @return JsonResponse
*/
public function changelog()
{

View File

@@ -17,5 +17,7 @@ class Authenticate extends Middleware
if (! $request->expectsJson()) {
return route('auth.login');
}
return null;
}
}

View File

@@ -4,7 +4,11 @@ namespace App\Jobs;
use App\Events\SpeedtestCompleteEvent;
use App\Events\SpeedtestFailedEvent;
use App\Helpers\SettingsHelper;
use App\Helpers\SpeedtestHelper;
use Exception;
use Healthcheck;
use Henrywhitaker3\Healthchecks\Healthchecks;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
@@ -16,16 +20,29 @@ class SpeedtestJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Scheduled bool
*
* @var bool
*/
private $scheduled;
/**
* Integrations config array
*
* @var array
*/
private $config;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($scheduled = true)
public function __construct($scheduled = true, $config = [])
{
$this->scheduled = $scheduled;
$this->config = $config;
}
/**
@@ -35,13 +52,50 @@ class SpeedtestJob implements ShouldQueue
*/
public function handle()
{
if ($this->config['healthchecks_enabled'] === true) {
$this->healthcheck('start');
}
$output = SpeedtestHelper::output();
$speedtest = SpeedtestHelper::runSpeedtest($output, $this->scheduled);
if($speedtest == false) {
if ($speedtest == false) {
if ($this->config['healthchecks_enabled'] === true) {
$this->healthcheck('fail');
}
event(new SpeedtestFailedEvent());
} else {
if ($this->config['healthchecks_enabled'] === true) {
$this->healthcheck('success');
}
event(new SpeedtestCompleteEvent($speedtest));
}
return $speedtest;
}
/**
* Wrapper to reduce duplication of try/catch for hc
*
* @param String $method
* @return void
*/
private function healthcheck(String $method)
{
try {
$hc = new Healthchecks(SettingsHelper::get('healthchecks_uuid')->value, SettingsHelper::get('healthchecks_server_url')->value);
if ($method === 'start') {
$hc->start();
}
if ($method === 'success') {
$hc->success();
}
if ($method === 'fail') {
$hc->fail();
}
} catch (Exception $e) {
Log::error($e->getMessage());
}
}
}

View File

@@ -3,8 +3,13 @@
namespace App\Listeners;
use App\Helpers\SettingsHelper;
use App\Helpers\SpeedtestHelper;
use App\Notifications\SpeedtestAbsoluteThresholdNotificationSlack;
use App\Notifications\SpeedtestAbsoluteThresholdTelegram;
use App\Notifications\SpeedtestCompleteSlack;
use App\Notifications\SpeedtestCompleteTelegram;
use App\Notifications\SpeedtestPercentageThresholdNotificationSlack;
use App\Notifications\SpeedtestPercentageThresholdTelegram;
use Exception;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
@@ -32,9 +37,63 @@ class SpeedtestCompleteListener
*/
public function handle($event)
{
if((bool)SettingsHelper::get('threshold_alert_percentage_notifications')->value == true) {
$data = $event->speedtest;
$errors = SpeedtestHelper::testIsLowerThanThreshold('percentage', $data);
if(sizeof($errors) > 0) {
if(SettingsHelper::get('slack_webhook')->value) {
try {
Notification::route('slack', SettingsHelper::get('slack_webhook')->value)
->notify(new SpeedtestPercentageThresholdNotificationSlack($errors));
} catch(Exception $e) {
Log::notice('Your sleck webhook is invalid');
Log::notice($e);
}
}
if(SettingsHelper::get('telegram_bot_token')->value == true && SettingsHelper::get('telegram_chat_id')->value == true) {
try {
config([ 'services.telegram-bot-api' => [ 'token' => SettingsHelper::get('telegram_bot_token')->value ] ]);
Notification::route(TelegramChannel::class, SettingsHelper::get('telegram_chat_id')->value)
->notify(new SpeedtestPercentageThresholdTelegram($errors));
} catch(Exception $e) {
Log::notice('Your telegram settings are invalid');
Log::notice($e);
}
}
}
}
if((bool)SettingsHelper::get('threshold_alert_absolute_notifications')->value == true) {
$data = $event->speedtest;
$errors = SpeedtestHelper::testIsLowerThanThreshold('absolute', $data);
if(sizeof($errors) > 0) {
if(SettingsHelper::get('slack_webhook')->value) {
try {
Notification::route('slack', SettingsHelper::get('slack_webhook')->value)
->notify(new SpeedtestAbsoluteThresholdNotificationSlack($errors));
} catch(Exception $e) {
Log::notice('Your sleck webhook is invalid');
Log::notice($e);
}
}
if(SettingsHelper::get('telegram_bot_token')->value == true && SettingsHelper::get('telegram_chat_id')->value == true) {
try {
config([ 'services.telegram-bot-api' => [ 'token' => SettingsHelper::get('telegram_bot_token')->value ] ]);
Notification::route(TelegramChannel::class, SettingsHelper::get('telegram_chat_id')->value)
->notify(new SpeedtestAbsoluteThresholdTelegram($errors));
} catch(Exception $e) {
Log::notice('Your telegram settings are invalid');
Log::notice($e);
}
}
}
}
if(SettingsHelper::get('speedtest_notifications')->value == true) {
$data = $event->speedtest;
if(SettingsHelper::get('slack_webhook')) {
if(SettingsHelper::get('slack_webhook')->value) {
try {
Notification::route('slack', SettingsHelper::get('slack_webhook')->value)
->notify(new SpeedtestCompleteSlack($data));

View File

@@ -10,6 +10,7 @@ use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Notification;
use NotificationChannels\Telegram\TelegramChannel;
class SpeedtestFailedListener
{

View File

@@ -0,0 +1,57 @@
<?php
namespace App\Notifications;
use App\Helpers\NotificationsHelper;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
class SpeedtestAbsoluteThresholdNotificationSlack extends Notification
{
use Queueable;
protected $errors;
/**
* Create a new notification instance.
*
* @param array $errors
* @return void
*/
public function __construct(array $errors)
{
$this->errors = $errors;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['slack'];
}
/**
* Format slack notification
*
* @param mixed $notifiable
* @return SlackMessage
*/
public function toSlack($notifiable)
{
$msg = NotificationsHelper::formatAbsoluteThresholdMessage($this->errors);
return (new SlackMessage)
->warning()
->attachment(function ($attachment) use ($msg) {
$attachment->title('Speedtest absolute threshold error')
->content($msg);
});
}
}

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Notifications;
use App\Helpers\NotificationsHelper;
use App\Helpers\SettingsHelper;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use NotificationChannels\Telegram\TelegramChannel;
use NotificationChannels\Telegram\TelegramMessage;
class SpeedtestAbsoluteThresholdTelegram extends Notification
{
use Queueable;
private $errors;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($errors)
{
$this->errors = $errors;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [
TelegramChannel::class
];
}
/**
* Format telegram notification
*
* @param mixed $notifiable
* @return TelegramMessage
*/
public function toTelegram($notifiable)
{
$msg = NotificationsHelper::formatAbsoluteThresholdMessage($this->errors);
return TelegramMessage::create()
->to(SettingsHelper::get('telegram_chat_id')->value)
->content($msg)
->options(['parse_mode' => 'Markdown']);
}
}

View File

@@ -14,6 +14,8 @@ class SpeedtestCompleteTelegram extends Notification
{
use Queueable;
public $speedtest;
/**
* Create a new notification instance.
*

View File

@@ -12,6 +12,8 @@ class SpeedtestOverviewSlack extends Notification
{
use Queueable;
public $data;
/**
* Create a new notification instance.
*

View File

@@ -14,6 +14,8 @@ class SpeedtestOverviewTelegram extends Notification
{
use Queueable;
public $data;
/**
* Create a new notification instance.
*

View File

@@ -0,0 +1,57 @@
<?php
namespace App\Notifications;
use App\Helpers\NotificationsHelper;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Messages\SlackMessage;
use Illuminate\Notifications\Notification;
class SpeedtestPercentageThresholdNotificationSlack extends Notification
{
use Queueable;
protected $errors;
/**
* Create a new notification instance.
*
* @param array $errors
* @return void
*/
public function __construct(array $errors)
{
$this->errors = $errors;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['slack'];
}
/**
* Format slack notification
*
* @param mixed $notifiable
* @return SlackMessage
*/
public function toSlack($notifiable)
{
$msg = NotificationsHelper::formatPercentageThresholdMessage($this->errors);
return (new SlackMessage)
->warning()
->attachment(function ($attachment) use ($msg) {
$attachment->title('Speedtest percentage threshold error')
->content($msg);
});
}
}

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Notifications;
use App\Helpers\NotificationsHelper;
use App\Helpers\SettingsHelper;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use NotificationChannels\Telegram\TelegramChannel;
use NotificationChannels\Telegram\TelegramMessage;
class SpeedtestPercentageThresholdTelegram extends Notification
{
use Queueable;
private $errors;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($errors)
{
$this->errors = $errors;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [
TelegramChannel::class
];
}
/**
* Format telegram notification
*
* @param mixed $notifiable
* @return TelegramMessage
*/
public function toTelegram($notifiable)
{
$msg = NotificationsHelper::formatAbsoluteThresholdMessage($this->errors);
return TelegramMessage::create()
->to(SettingsHelper::get('telegram_chat_id')->value)
->content($msg)
->options(['parse_mode' => 'Markdown']);
}
}

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Providers;
use App\Helpers\SettingsHelper;
use Exception;
use File;
use Henrywhitaker3\Healthchecks\Healthchecks;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;
use Ramsey\Uuid\Exception\InvalidUuidStringException;
use Schema;
/**
* This class updates the integrations.php config with the relevant values
* from the databse.
*/
class IntegrationsServiceProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
if (File::exists(env('DB_DATABASE'))) {
if (Schema::hasTable('settings')) {
$setting = SettingsHelper::get('healthchecks_uuid');
if ($setting !== false) {
try {
SettingsHelper::loadIntegrationConfig();
App::bind('healthcheck', function () use ($setting) {
return new Healthchecks($setting->value, SettingsHelper::get('healthchecks_server_url')->value);
});
} catch (InvalidUuidStringException $e) {
Log::error('Invalid healthchecks UUID');
} catch (Exception $e) {
Log::error($e->getMessage());
}
}
}
}
}
}

View File

@@ -0,0 +1,41 @@
<?php
namespace App\Rules;
use Hash;
use Illuminate\Contracts\Validation\Rule;
class CurrentPasswordMatches implements Rule
{
/**
* Create a new rule instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Determine if the validation rule passes.
*
* @param string $attribute
* @param mixed $value
* @return bool
*/
public function passes($attribute, $value)
{
return Hash::check($value, auth()->user()->password);
}
/**
* Get the validation error message.
*
* @return string
*/
public function message()
{
return 'The current password doesn\'t match.';
}
}

View File

@@ -78,7 +78,7 @@ class User extends Authenticatable implements JWTSubject
/**
* Returns a user's login sessions
*
* @return array
* @return mixed
*/
public function sessions()
{

View File

@@ -1,4 +1,172 @@
{
"1.10.4": [
{
"description": "Updated dependencies.",
"link": ""
}
],
"1.10.3": [
{
"description": "Moved stuff into pages.",
"link": ""
}
],
"1.10.2": [
{
"description": "Added option to disable scheduled tests.",
"link": ""
}
],
"1.10.1": [
{
"description": "Fixed integrations config being empty causing healthchecks to not run on scheduled tests.",
"link": ""
}
],
"1.10.0": [
{
"description": "Added automated build for ARM.",
"link": ""
},
{
"description": "Updated dependencies.",
"link": ""
}
],
"1.9.10": [
{
"description": "Laravel will now log into daily files and logs will only be kept for 7 days.",
"link": ""
}
],
"1.9.9": [
{
"description": "Updated dependencies.",
"link": ""
}
],
"1.9.8": [
{
"description": "Fixed bug with minimum display setting.",
"link": ""
}
],
"1.9.7": [
{
"description": "Added option to display minimum values on the top widgets.",
"link": ""
},
{
"description": "New general settings section.",
"link": ""
},
{
"description": "Updated dependencies.",
"link": ""
}
],
"1.9.6": [
{
"description": "Clear the cache on restore.",
"link": ""
},
{
"description": "Updated dependencies.",
"link": ""
}
],
"1.9.5": [
{
"description": "Added toggle to show failed tests on graphs.",
"link": ""
},
{
"description": "Updated dependencies.",
"link": ""
}
],
"1.9.4": [
{
"description": "Changed integration config loading.",
"link": ""
},
{
"description": "Added more tests.",
"link": ""
}
],
"1.9.3": [
{
"description": "Updated dependencies.",
"link": ""
}
],
"1.9.2": [
{
"description": "Authentication bugfixes.",
"link": ""
}
],
"1.9.1": [
{
"description": "Added conditional notifications.",
"link": ""
}
],
"1.9.0": [
{
"description": "Added optional authentication.",
"link": ""
}
],
"1.8.1": [
{
"description": "Added healthchecks.io test buttons.",
"link": ""
},
{
"description": "Added close buttons to modals.",
"link": ""
},
{
"description": "Back-end config handling changes.",
"link": ""
}
],
"1.8.0": [
{
"description": "Added healthchecks.io integration.",
"link": ""
}
],
"1.7.19": [
{
"description": "Updated dependencies.",
"link": ""
}
],
"1.7.18": [
{
"description": "Fixed issue with widgets not updating when switching between failed/successful tests.",
"link": ""
},
{
"description": "Updated backup/restore functions to reflect new DB fields.",
"link": ""
}
],
"1.7.17": [
{
"description": "Updated dependencies.",
"link": ""
}
],
"1.7.16": [
{
"description": "Updated dependencies.",
"link": ""
}
],
"1.7.15": [
{
"description": "Updates for manual installs.",

View File

@@ -14,7 +14,8 @@
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0",
"laravel-notification-channels/telegram": "^0.4.0",
"henrywhitaker3/healthchecks-io": "^1.0",
"laravel-notification-channels/telegram": "^0.5.0",
"laravel/framework": "^7.0",
"laravel/slack-notification-channel": "^2.0",
"laravel/tinker": "^2.0",
@@ -22,11 +23,13 @@
"tymon/jwt-auth": "^1.0"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.8",
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
"phpunit/phpunit": "^9.5",
"nunomaduro/larastan": "^0.7.0",
"nunomaduro/collision": "^5.3"
},
"config": {
"optimize-autoloader": true,

4261
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -178,6 +178,11 @@ return [
App\Providers\RouteServiceProvider::class,
App\Providers\UpdaterServiceProvider::class,
/*
* Custom providers...
*/
App\Providers\IntegrationsServiceProvider::class,
],
/*
@@ -230,6 +235,7 @@ return [
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Updater' => App\Facades\UpdaterFacade::class,
'Healthcheck' => App\Facades\HealthchecksFacade::class,
],
];

59
config/integrations.php Normal file
View File

@@ -0,0 +1,59 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Healthchecks enabled
|--------------------------------------------------------------------------
|
| This option defines whether healthchecks integrations are enabled
|
*/
'healthchecks_enabled' => false,
/*
|--------------------------------------------------------------------------
| Healthchecks UUID
|--------------------------------------------------------------------------
|
| This option defines the UUID for healthchecks
|
*/
'healthchecks_uuid' => null,
/*
|--------------------------------------------------------------------------
| Slack webhook
|--------------------------------------------------------------------------
|
| This option defines the slack webhook url
|
*/
'slack_webhook' => null,
/*
|--------------------------------------------------------------------------
| Telegram bot token
|--------------------------------------------------------------------------
|
| This option defines the telegram bot token
|
*/
'telegram_bot_token' => null,
/*
|--------------------------------------------------------------------------
| Telegram chat id
|--------------------------------------------------------------------------
|
| This option defines the telegram chat id
|
*/
'telegram_chat_id' => null,
];

View File

@@ -37,7 +37,7 @@ return [
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'channels' => ['daily'],
'ignore_exceptions' => false,
],
@@ -51,7 +51,7 @@ return [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 14,
'days' => 7,
],
'slack' => [

View File

@@ -7,7 +7,7 @@ return [
|--------------------------------------------------------------------------
*/
'version' => '1.7.15',
'version' => '1.10.4',
/*
|--------------------------------------------------------------------------

View File

@@ -0,0 +1,47 @@
<?php
use App\Helpers\SettingsHelper;
use App\Setting;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddHealthchecksSettings extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!SettingsHelper::get('healthchecks_enabled')) {
Setting::create([
'name' => 'healthchecks_enabled',
'value' => false,
'description' => 'Enable the healthchecks.io integration for speedtests.'
]);
}
if(!SettingsHelper::get('healthchecks_uuid')) {
Setting::create([
'name' => 'healthchecks_uuid',
'value' => '',
'description' => ''
]);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Setting::whereIn('name', [
'healthchecks_enabled',
'healthchecks_uuid',
])->delete();
}
}

View File

@@ -0,0 +1,38 @@
<?php
use App\Helpers\SettingsHelper;
use App\Setting;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddAuthenticationSettings extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!SettingsHelper::get('auth')) {
Setting::create([
'name' => 'auth',
'value' => false,
'description' => 'Enable authentication.'
]);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Setting::whereIn('name', [
'auth',
])->delete();
}
}

View File

@@ -0,0 +1,83 @@
<?php
use App\Helpers\SettingsHelper;
use App\Setting;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddConditionalNotificationsSettings extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!SettingsHelper::get('threshold_alert_percentage_notifications')) {
Setting::create([
'name' => 'threshold_alert_percentage_notifications',
'value' => false,
'description' => 'Enable/disable theshold percentage notifications'
]);
}
if(!SettingsHelper::get('threshold_alert_percentage')) {
Setting::create([
'name' => 'threshold_alert_percentage',
'value' => 15,
'description' => 'When any value of a speedtest is x percent lower than the average, a notification will be sent.'
]);
}
if(!SettingsHelper::get('threshold_alert_absolute_notifications')) {
Setting::create([
'name' => 'threshold_alert_absolute_notifications',
'value' => false,
'description' => 'Enable/disable absolute theshold notifications'
]);
}
if(!SettingsHelper::get('threshold_alert_absolute_download')) {
Setting::create([
'name' => 'threshold_alert_absolute_download',
'value' => '',
'description' => 'When the download is lower than this value, a notification will be sent. Leave blank to disable'
]);
}
if(!SettingsHelper::get('threshold_alert_absolute_upload')) {
Setting::create([
'name' => 'threshold_alert_absolute_upload',
'value' => '',
'description' => 'When the upload is lower than this value, a notification will be sent. Leave blank to disable'
]);
}
if(!SettingsHelper::get('threshold_alert_absolute_ping')) {
Setting::create([
'name' => 'threshold_alert_absolute_ping',
'value' => '',
'description' => 'When the ping is higher than this value, a notification will be sent. Leave blank to disable'
]);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Setting::whereIn('name', [
'threshold_alert_percentage',
'threshold_alert_absolute_download',
'threshold_alert_absolute_upload',
'threshold_alert_absolute_ping',
'threshold_alert_percentage_notifications',
'threshold_alert_absolute_notifications'
])->delete();
}
}

View File

@@ -0,0 +1,38 @@
<?php
use App\Helpers\SettingsHelper;
use App\Setting;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddShowFailedTestsSetting extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!SettingsHelper::get('show_failed_tests_on_graph')) {
Setting::create([
'name' => 'show_failed_tests_on_graph',
'value' => true,
'description' => 'If enabled, failed tests will appear on the graphs as 0.'
]);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Setting::whereIn('name', [
'show_failed_tests_on_graph',
])->delete();
}
}

View File

@@ -0,0 +1,56 @@
<?php
use App\Helpers\SettingsHelper;
use App\Setting;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddWidgetCardSettings extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (!SettingsHelper::get('show_average')) {
Setting::create([
'name' => 'show_average',
'value' => true,
'description' => 'If enabled, the average value for speedtests will be shown in the widgets.'
]);
}
if (!SettingsHelper::get('show_max')) {
Setting::create([
'name' => 'show_max',
'value' => true,
'description' => 'If enabled, the maximum value for speedtests will be shown in the widgets.'
]);
}
if (!SettingsHelper::get('show_min')) {
Setting::create([
'name' => 'show_min',
'value' => true,
'description' => 'If enabled, the minimum value for speedtests will be shown in the widgets.'
]);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Setting::whereIn('name', [
'show_average',
'show_max',
'show_min',
])->delete();
}
}

View File

@@ -0,0 +1,38 @@
<?php
use App\Helpers\SettingsHelper;
use App\Setting;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddScheduleEnabledSetting extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (!SettingsHelper::get('schedule_enabled')) {
Setting::create([
'name' => 'schedule_enabled',
'value' => true,
'description' => 'Enable/disable the schedule worker'
]);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Setting::whereIn('name', [
'schedule_enabled',
])->delete();
}
}

View File

@@ -0,0 +1,38 @@
<?php
use App\Helpers\SettingsHelper;
use App\Setting;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddAppNameSetting extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (!SettingsHelper::get('app_name')) {
Setting::create([
'name' => 'app_name',
'value' => 'Speedtest Tracker',
'description' => 'Set a custom app name'
]);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Setting::whereIn('name', [
'app_name',
])->delete();
}
}

View File

@@ -0,0 +1,38 @@
<?php
use App\Helpers\SettingsHelper;
use App\Setting;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddCustomHealthchecksSetting extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (!SettingsHelper::get('healthchecks_server_url')) {
Setting::create([
'name' => 'healthchecks_server_url',
'value' => 'https://hc-ping.com/',
'description' => 'The URL of the healthchecks.io server. Change this to use a self-hosted server.'
]);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Setting::whereIn('name', [
'healthchecks_server_url',
])->delete();
}
}

3938
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -10,28 +10,29 @@
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"@babel/preset-react": "^7.10.4",
"axios": "^0.19",
"bootstrap": "^4.5.0",
"axios": "^0.21",
"@babel/preset-react": "^7.12.13",
"bootstrap": "^4.6.0",
"cross-env": "^7.0",
"jquery": "^3.5",
"laravel-mix": "^5.0.1",
"lodash": "^4.17.19",
"laravel-mix": "^5.0.9",
"lodash": "^4.17.21",
"popper.js": "^1.12",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"resolve-url-loader": "^3.1.0",
"sass": "^1.26.10",
"sass-loader": "^9.0.2"
"react": "^17.0.1",
"react-dom": "^17.0.1",
"resolve-url-loader": "^3.1.2",
"sass": "^1.32.8",
"sass-loader": "^10.1.1"
},
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.10.4",
"chart.js": "^2.9.3",
"csv-file-validator": "^1.8.0",
"react-bootstrap": "^1.3.0",
"react-chartjs-2": "^2.9.0",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"chart.js": "^2.9.4",
"csv-file-validator": "^1.10.1",
"js-cookie": "^2.2.1",
"react-bootstrap": "^1.5.1",
"react-chartjs-2": "^2.11.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-toastify": "^6.0.8"
"react-toastify": "^7.0.3"
}
}

17
phpstan.neon Normal file
View File

@@ -0,0 +1,17 @@
includes:
- ./vendor/nunomaduro/larastan/extension.neon
parameters:
paths:
- app
# The level 8 is the highest level
level: 5
ignoreErrors:
excludes_analyse:
- ./*/*/FileToBeExcluded.php
checkMissingIterableValueType: false

View File

@@ -1,29 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true">
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
</whitelist>
</filter>
<php>
<server name="APP_ENV" value="testing"/>
<server name="BCRYPT_ROUNDS" value="4"/>
<server name="CACHE_DRIVER" value="array"/>
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
<server name="MAIL_MAILER" value="array"/>
<server name="QUEUE_CONNECTION" value="sync"/>
<server name="SESSION_DRIVER" value="array"/>
</php>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./app</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
</testsuites>
<php>
<server name="APP_ENV" value="testing"/>
<server name="BCRYPT_ROUNDS" value="4"/>
<server name="CACHE_DRIVER" value="array"/>
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
<server name="MAIL_MAILER" value="array"/>
<server name="QUEUE_CONNECTION" value="sync"/>
<server name="SESSION_DRIVER" value="array"/>
</php>
</phpunit>

10950
public/css/app.css vendored

File diff suppressed because one or more lines are too long

138415
public/js/app.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -12,9 +12,9 @@ License: MIT
*/
/*!
* Bootstrap v4.5.0 (https://getbootstrap.com/)
* Bootstrap v4.5.3 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
/*!
@@ -24,12 +24,20 @@ License: MIT
*/
/*!
* Chart.js v2.9.3
* Chart.js v2.9.4
* https://www.chartjs.org
* (c) 2019 Chart.js Contributors
* (c) 2020 Chart.js Contributors
* Released under the MIT License
*/
/*!
* JavaScript Cookie v2.2.1
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/
/*!
* Sizzle CSS Selector Engine v2.3.5
* https://sizzlejs.com/
@@ -73,15 +81,6 @@ License: MIT
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
@@ -91,7 +90,16 @@ License: MIT
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
/** @license React v16.14.0
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.14.0
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -124,3 +132,7 @@ License: MIT
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
//! moment.js
//! moment.js locale configuration

View File

@@ -0,0 +1,70 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Row, Col} from 'react-bootstrap';
import SessionsTable from './SessionsTable';
import ResetPassword from './ResetPassword';
export default class Authentication extends Component {
constructor(props) {
super(props)
this.state = {
showCollapse: false,
showModal: false
}
}
toggleCollapse = () => {
if(this.state.showCollapse) {
this.setState({
showCollapse: false
});
} else {
this.setState({
showCollapse: true
});
}
}
toggleModal = () => {
if(this.state.showModal) {
this.setState({
showModal: false
});
} else {
this.setState({
showModal: true
});
}
}
render() {
var showCollapse = this.state.showCollapse;
var showModal = this.state.showModal;
if( (window.config.auth == true && window.authenticated == true)) {
return (
<div>
<Row>
<Col sm={{ span: 12 }} className="text-center">
<ResetPassword />
</Col>
</Row>
<Row>
<Col sm={{ span: 12 }} className="text-center">
<SessionsTable />
</Col>
</Row>
</div>
);
} else {
return (
<></>
);
}
}
}
if (document.getElementById('Authentication')) {
ReactDOM.render(<Authentication />, document.getElementById('Authentication'));
}

View File

@@ -0,0 +1,111 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Container, Row, Col, Collapse, Button, Modal, Form } from 'react-bootstrap';
import SessionsTable from './SessionsTable';
import Axios from 'axios';
import { toast } from 'react-toastify';
export default class ResetPassword extends Component {
constructor(props) {
super(props)
this.state = {
showModal: false,
currentPassword: '',
newPassword: '',
newPasswordConfirmation: '',
logoutDevices: false
}
}
toggleModal = () => {
if(this.state.showModal) {
this.setState({
showModal: false
});
} else {
this.setState({
showModal: true
});
}
}
updateTextField = (e) => {
this.setState({
[e.target.id]: e.target.value
})
}
updateCheckbox = (e) => {
this.setState({
[e.target.id]: e.target.checked
});
}
changePassword = (e) => {
e.preventDefault();
var data = {
currentPassword: this.state.currentPassword,
newPassword: this.state.newPassword,
newPassword_confirmation: this.state.newPasswordConfirmation,
logoutDevices: this.state.logoutDevices
}
var url = 'api/auth/change-password?token=' + window.token;
Axios.post(url, data)
.then((resp) => {
toast.success('Password updated');
this.toggleModal();
if(this.state.logoutDevices == true) {
location.reload(true);
}
})
.catch((err) => {
if(err.response) {
for(var key in err.response.data.error) {
toast.error(err.response.data.error[key][0]);
}
}
})
}
render() {
var showModal = this.state.showModal;
return (
<div>
<Button variant="primary" onClick={this.toggleModal} className="mb-3">Change password</Button>
<Modal show={showModal} onHide={this.toggleModal}>
<Modal.Header closeButton>
<Modal.Title>Change password</Modal.Title>
</Modal.Header>
<Modal.Body>
<Form onSubmit={this.changePassword}>
<Form.Group controlId="currentPassword">
<Form.Label>Current password</Form.Label>
<Form.Control type="password" onInput={this.updateTextField} required />
</Form.Group>
<Form.Group controlId="newPassword">
<Form.Label>New Password</Form.Label>
<Form.Control type="password" onInput={this.updateTextField} required />
</Form.Group>
<Form.Group controlId="newPasswordConfirmation">
<Form.Label>Confirm New Password</Form.Label>
<Form.Control type="password" onInput={this.updateTextField} required />
</Form.Group>
<Button variant="primary" type="submit" className="d-inline-block">Change password</Button>
<Form.Group controlId="logoutDevices" className="d-inline-block ml-2">
<Form.Check type="checkbox" label="Log everywhere out" onInput={this.updateCheckbox} />
</Form.Group>
</Form>
</Modal.Body>
</Modal>
</div>
);
}
}
if (document.getElementById('ResetPassword')) {
ReactDOM.render(<ResetPassword />, document.getElementById('ResetPassword'));
}

View File

@@ -0,0 +1,67 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Container, Row, Col, Table } from 'react-bootstrap';
import Axios from 'axios';
export default class SessionsTable extends Component {
constructor(props) {
super(props)
this.state = {
sessions: []
}
}
componentDidMount() {
this.getSessions();
}
getSessions = () => {
var url = 'api/auth/sessions?token=' + window.token;
Axios.get(url)
.then((resp) => {
this.setState({
sessions: resp.data.response
})
})
}
render() {
var sessions = this.state.sessions;
return (
<Container className="mb-4">
<Row>
<Col sm={{ span: 12 }} className="mb-3 text-center">
<h5>Login Sessions</h5>
<Table responsive>
<thead>
<tr>
<th>IP</th>
<th>Expires</th>
<th>Created at</th>
</tr>
</thead>
<tbody>
{sessions.map((e,i) => {
return(
<tr key={i}>
<td>{e.ip}</td>
<td>{new Date(e.expires * 1000).toLocaleDateString() + ' ' + new Date(e.expires * 1000).toLocaleTimeString()}</td>
<td>{e.created_at}</td>
</tr>
)
})}
</tbody>
</Table>
</Col>
</Row>
</Container>
);
}
}
if (document.getElementById('SessionsTable')) {
ReactDOM.render(<SessionsTable />, document.getElementById('SessionsTable'));
}

View File

@@ -6,7 +6,7 @@ import Axios from 'axios';
export default class Backup extends Component {
backup = (format) => {
var url = 'api/backup?format=' + format;
var url = 'api/backup?format=' + format + '&token=' + window.token;
toast.info('Your backup has started downloading...');

View File

@@ -16,11 +16,13 @@ export default class Changelog extends Component {
}
componentDidMount = () => {
this.getChangelog();
if( (window.config.auth == true && window.authenticated == true) || window.config.auth == false) {
this.getChangelog();
}
}
getChangelog = () => {
Axios.get('api/update/changelog')
Axios.get('api/update/changelog?token=' + window.token)
.then((resp) => {
this.setState({
changelog: resp.data.data,

View File

@@ -8,21 +8,27 @@ import Restore from './Restore';
export default class DataRow extends Component {
render() {
return (
<Container className="mb-4">
<Row>
<Col sm={{ span: 12 }} className="text-center">
<p>Use these buttons to backup/restore your data</p>
</Col>
</Row>
<Row>
<Col sm={{ span: 12 }} className="text-center">
<Backup />
<Restore />
</Col>
</Row>
</Container>
);
if( (window.config.auth == true && window.authenticated == true) || window.config.auth == false) {
return (
<Container className="mb-4">
<Row>
<Col sm={{ span: 12 }} className="text-center">
<p>Use these buttons to backup/restore your data</p>
</Col>
</Row>
<Row>
<Col sm={{ span: 12 }} className="text-center">
<Backup />
<Restore />
</Col>
</Row>
</Container>
);
} else {
return (
<></>
)
}
}
}

View File

@@ -75,6 +75,36 @@ export default class Restore extends Component {
inputName: 'created_at',
required: false,
},
{
name: "server_id",
inputName: 'server_id',
required: false,
},
{
name: "server_name",
inputName: 'server_name',
required: false,
},
{
name: "server_host",
inputName: 'server_host',
required: false,
},
{
name: "url",
inputName: 'url',
required: false,
},
{
name: "scheduled",
inputName: 'scheduled',
required: false,
},
{
name: "failed",
inputName: 'failed',
required: false,
},
{
name: "updated_at",
inputName: 'updated_at',
@@ -118,7 +148,7 @@ export default class Restore extends Component {
uploadFile = () => {
var data = { data: this.state.data, format: this.state.format };
var url = 'api/restore';
var url = 'api/restore?token=' + window.token;
Axios.post(url, data)
.then((resp) => {

View File

@@ -37,6 +37,10 @@ export default class HistoryGraph extends Component {
});
}
componentWillUnmount() {
clearInterval(this.state.interval);
}
getDLULPing = (days) => {
var url = 'api/speedtest/time/' + days;
@@ -205,7 +209,6 @@ export default class HistoryGraph extends Component {
failData.datasets[1].data.push(fail);
failData.labels.push(new Date(e.date).toLocaleString([], {year: '2-digit', month:'2-digit', day:'2-digit'}));
})
console.log(failData);
this.setState({
failData: failData,

View File

@@ -26,6 +26,10 @@ export default class LatestResults extends Component {
});
}
componentWillUnmount() {
clearInterval(this.state.interval);
}
getData = () => {
var url = 'api/speedtest/latest';
@@ -45,7 +49,7 @@ export default class LatestResults extends Component {
}
newScan = () => {
var url = 'api/speedtest/run';
var url = 'api/speedtest/run?token=' + window.token;
Axios.get(url)
.then((resp) => {
@@ -78,25 +82,47 @@ export default class LatestResults extends Component {
</Container>
);
} else if(data === false) {
return (
<Container fluid>
<Row>
<Col sm={{ span: 12 }} className="text-center">
<div>
<Button variant="primary" onClick={this.newScan}>Start your first test!</Button>
</div>
</Col>
</Row>
</Container>
);
if( (window.config.auth == true && window.authenticated == true) || window.config.auth == false) {
return (
<Container fluid>
<Row>
<Col sm={{ span: 12 }} className="text-center">
<div>
<Button variant="primary" onClick={this.newScan}>Start your first test!</Button>
</div>
</Col>
</Row>
</Container>
);
} else if(window.config.auth == true && window.authenticated == false) {
return (
<Container fluid>
<Row>
<Col sm={{ span: 12 }} className="text-center">
<div>
<p>Please login to run the first test</p>
</div>
</Col>
</Row>
</Container>
);
}
} else {
return (
<Container fluid>
<Row>
<Col sm={{ span: 12 }} className="text-center mb-2">
<div>
<Button className="d-inline-block mx-3 mb-2" variant="primary" onClick={this.newScan}>Test again</Button>
<p className="text-muted mb-0 d-inline-block">Last test performed at: {new Date(data.data.created_at).toLocaleString()}</p>
{(window.config.auth == true && window.authenticated == true) || window.config.auth == false ?
<div>
<Button className="d-inline-block mx-3 mb-2" variant="primary" onClick={this.newScan}>Test again</Button>
<p className="text-muted mb-0 d-inline-block">Last test performed at: {new Date(data.data.created_at).toLocaleString()}</p>
</div>
:
<div>
<p className="text-muted mb-0 d-inline-block">Last test performed at: {new Date(data.data.created_at).toLocaleString()}</p>
</div>
}
</div>
</Col>
</Row>
@@ -109,9 +135,7 @@ export default class LatestResults extends Component {
>
<Widget
title="Ping"
value={parseFloat(data.data.ping).toFixed(1)}
avg={parseFloat(data.average.ping).toFixed(1)}
max={parseFloat(data.max.ping).toFixed(1)}
data={data}
failed={data.data.failed}
unit="ms"
icon="ping"
@@ -125,9 +149,7 @@ export default class LatestResults extends Component {
>
<Widget
title="Download"
value={parseFloat(data.data.download).toFixed(1)}
avg={parseFloat(data.average.download).toFixed(1)}
max={parseFloat(data.max.download).toFixed(1)}
data={data}
failed={data.data.failed}
unit="Mbit/s"
icon="dl"
@@ -141,9 +163,7 @@ export default class LatestResults extends Component {
>
<Widget
title="Upload"
value={parseFloat(data.data.upload).toFixed(1)}
avg={parseFloat(data.average.upload).toFixed(1)}
max={parseFloat(data.max.upload).toFixed(1)}
data={data}
failed={data.data.failed}
unit="Mbit/s"
icon="ul"

View File

@@ -62,7 +62,7 @@ export default class TableRow extends Component {
<td>
<span onClick={this.toggleShow} className="ti-arrow-top-right mouse"></span>
<Modal show={show} onHide={this.toggleShow}>
<Modal.Header>
<Modal.Header closeButton>
<Modal.Title>More info</Modal.Title>
</Modal.Header>
<Modal.Body className="text-center">

View File

@@ -26,6 +26,10 @@ export default class TestsTable extends Component {
});
}
componentWillUnmount() {
clearInterval(this.state.interval);
}
getData = (page = this.state.page, refresh = true) => {
var url = 'api/speedtest/?page=' + page;
@@ -83,59 +87,48 @@ export default class TestsTable extends Component {
if(data.length > 0) {
return (
<Container className="mb-4 mt-4" fluid>
<Row>
<Col sm={{ span: 12 }} className="mb-3 text-center">
<div className="mouse" aria-controls="testsTable" onClick={this.toggleCollapse} aria-expanded={show}>
<h4 className="d-inline mr-2">All tests</h4>
{(show) ?
<span className="ti-angle-up"></span>
:
<span className="ti-angle-down"></span>
}
</div>
{(show) &&
<div className="my-1">
<div>
<Container className="mb-4 mt-4 px-5">
<Row>
<Col sm={{ span: 12 }} className="mb-3 text-center">
<div>
<h4 className="d-inline mr-2">All tests</h4>
<span className="text-muted">Auto refresh: {(refresh) ? 'On' : 'Off'}</span>
</div>
}
</Col>
</Row>
<Collapse in={show}>
<div>
</Col>
</Row>
<Row>
<Col sm={{ span: 12 }} id="testsTable">
<Table responsive>
<thead>
<tr>
<th>ID</th>
<th>Time</th>
<th>Download (Mbit/s)</th>
<th>Upload (Mbit/s)</th>
<th>Ping (ms)</th>
<th>More</th>
</tr>
</thead>
<tbody>
{data.map((e,i) => {
return (
<TableRow key={e.id} data={e} />
);
})}
</tbody>
</Table>
</Col>
</Row>
{page < lastPage &&
<Row>
<Col sm={{ span: 12 }} id="testsTable">
<Table responsive>
<thead>
<tr>
<th>ID</th>
<th>Time</th>
<th>Download (Mbit/s)</th>
<th>Upload (Mbit/s)</th>
<th>Ping (ms)</th>
<th>More</th>
</tr>
</thead>
<tbody>
{data.map((e,i) => {
return (
<TableRow key={e.id} data={e} />
);
})}
</tbody>
</Table>
<Col sm={{ span: 12 }} className="text-center">
<Button variant="primary" onClick={this.getMoreData}>Show more</Button>
</Col>
</Row>
{page < lastPage &&
<Row>
<Col sm={{ span: 12 }} className="text-center">
<Button variant="primary" onClick={this.getMoreData}>Show more</Button>
</Col>
</Row>
}
</div>
</Collapse>
</Container>
}
</Container>
</div>
);
} else {
return (

View File

@@ -8,37 +8,88 @@ export default class Widget extends Component {
this.state = {
title: this.props.title,
value: this.props.value,
unit: this.props.unit,
icon: this.props.icon,
avg: this.props.avg,
max: this.props.max,
failed: this.props.failed,
data: this.props.data
}
}
parseData(title, data) {
var returnData = {};
if(title == 'Ping') {
returnData.value = parseFloat(data.data.ping).toFixed(1);
if(window.config.widgets.show_average) {
returnData.avg = parseFloat(data.average.ping).toFixed(1);
}
if(window.config.widgets.show_max) {
returnData.max = parseFloat(data.maximum.ping).toFixed(1);
}
if(window.config.widgets.show_min) {
returnData.min = parseFloat(data.minimum.ping).toFixed(1);
}
}
if(title == 'Upload') {
returnData.value = parseFloat(data.data.upload).toFixed(1);
if(window.config.widgets.show_average) {
returnData.avg = parseFloat(data.average.upload).toFixed(1);
}
if(window.config.widgets.show_max) {
returnData.max = parseFloat(data.maximum.upload).toFixed(1);
}
if(window.config.widgets.show_min) {
returnData.min = parseFloat(data.minimum.upload).toFixed(1);
}
}
if(title == 'Download') {
returnData.value = parseFloat(data.data.download).toFixed(1);
if(window.config.widgets.show_average) {
returnData.avg = parseFloat(data.average.download).toFixed(1);
}
if(window.config.widgets.show_max) {
returnData.max = parseFloat(data.maximum.download).toFixed(1);
}
if(window.config.widgets.show_min) {
returnData.min = parseFloat(data.minimum.download).toFixed(1);
}
}
return returnData;
}
componentDidUpdate = () => {
if(this.props.title != this.state.title || this.props.value != this.state.value || this.props.unit != this.state.unit || this.props.icon != this.state.icon || this.props.avg != this.state.avg || this.props.max != this.state.max) {
if(this.props.title != this.state.title || this.props.data != this.state.data || this.props.unit != this.state.unit || this.props.icon != this.state.icon || this.props.failed != this.state.failed) {
this.setState({
title: this.props.title,
value: this.props.value,
unit: this.props.unit,
icon: this.props.icon,
avg: this.props.avg,
max: this.props.max
failed: this.props.failed,
data: this.props.data
});
}
}
render() {
var title = this.state.title;
var value = this.state.value;
var unit = this.state.unit;
var icon = this.state.icon;
var max = this.state.max;
var avg = this.state.avg;
var failed = Boolean(Number(this.state.failed));
var data = this.parseData(title, this.state.data);
switch(icon) {
case 'ping':
icon = <span className="ti-pulse icon text-success"></span>;
@@ -62,17 +113,30 @@ export default class Widget extends Component {
</div>
<div className="text-truncate">
<h3 className="d-inline">{(!failed) ? value : <span className="ti-close text-danger"></span> }</h3>
<h3 className="d-inline">{(!failed) ? data.value : <span className="ti-close text-danger"></span> }</h3>
<p className="d-inline ml-2">{unit} (current)</p>
</div>
<div className="text-muted text-truncate">
<h5 className="d-inline">{avg}</h5>
<p className="d-inline ml-2">{unit} (average)</p>
</div>
<div className="text-muted text-truncate">
<h5 className="d-inline">{max}</h5>
<p className="d-inline ml-2">{unit} (maximum)</p>
</div>
{window.config.widgets.show_average &&
<div className="text-muted text-truncate">
<h5 className="d-inline">{data.avg}</h5>
<p className="d-inline ml-2">{unit} (average)</p>
</div>
}
{window.config.widgets.show_max &&
<div className="text-muted text-truncate">
<h5 className="d-inline">{data.max}</h5>
<p className="d-inline ml-2">{unit} (maximum)</p>
</div>
}
{window.config.widgets.show_min &&
<div className="text-muted text-truncate">
<h5 className="d-inline">{data.min}</h5>
<p className="d-inline ml-2">{unit} (minimum)</p>
</div>
}
</div>
</div>
</Card.Body>

View File

@@ -5,19 +5,22 @@ import LatestResults from '../Graphics/LatestResults';
import Footer from './Footer';
import DataRow from '../Data/DataRow';
import TestsTable from '../Graphics/TestsTable';
import Settings from '../Settings/Settings';
import Login from '../Login';
import Authentication from '../Authentication/Authentication';
import Navbar from '../Navbar';
export default class HomePage extends Component {
render() {
return (
<div>
<Navbar />
<div className="my-4">
{(window.config.auth == true && window.authenticated == false) &&
<Login />
}
<LatestResults />
<HistoryGraph />
<TestsTable />
<Settings />
<DataRow />
</div>
<Footer />
</div>

View File

@@ -1,10 +1,11 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Container, Row, Form, Toast } from 'react-bootstrap';
import { Container, Row, Form, Toast, Modal } from 'react-bootstrap';
import { Col } from 'react-bootstrap';
import { Button } from 'react-bootstrap';
import Axios from 'axios';
import { toast } from 'react-toastify';
import Cookies from 'js-cookie';
export default class Login extends Component {
constructor(props) {
@@ -12,59 +13,78 @@ export default class Login extends Component {
this.state = {
loginEmailInput: '',
loginPasswordInput: '',
toast: null,
loginPasswordInput: ''
}
}
updateTextField = (e) => {
this.setState({
[e.target.id]: e.target.value
})
}
login = (e) => {
e.preventDefault();
var data = {
email: this.state.loginEmailInput,
password: this.state.loginPasswordInput
};
var url = 'api/auth/login';
}
var url = 'api/auth/login';
Axios.post(url, data)
.then((resp) => {
var token = resp.data;
this.props.setToken(token);
var token = resp.data.access_token;
var expires = (resp.data.expires_in / 60) / 24;
Cookies.set('auth', token, { expires: expires })
window.location.reload(true);
})
.catch((err) => {
toast.error('Something went wrong. Please try again.')
});
toast.error('Something went wrong logging in.');
})
}
updateTextField = (e) => {
this.setState({
[e.target.id]: e.target.value
});
toggleShow = () => {
if(this.state.show) {
this.setState({
show: false
})
} else {
this.setState({
show: true
})
}
}
render() {
var error = this.state.error;
var show = this.state.show;
return (
<Container>
<Row className="fullscreen align-items-center">
<Row>
<Col
lg={{ span: 4, offset: 4 }}
md={{ span: 6, offset: 3 }}
sm={{ span: 10, offset: 1 }}
xs={{ span: 12 }}
className="pb-2 text-center"
>
<Form onSubmit={this.login}>
<Form.Group controlId="loginEmailInput">
<Form.Label>Email address</Form.Label>
<Form.Control type="email" placeholder="admin@admin.com" onInput={this.updateTextField} required />
</Form.Group>
<Form.Group controlId="loginPasswordInput">
<Form.Label>Password</Form.Label>
<Form.Control type="password" onInput={this.updateTextField} required />
</Form.Group>
<Button variant="primary" type="submit">Login</Button>
</Form>
<Button variant="primary" onClick={this.toggleShow}>Login</Button>
<Modal show={show} onHide={this.toggleShow}>
<Modal.Header closeButton>
<Modal.Title>Login</Modal.Title>
</Modal.Header>
<Modal.Body>
<Form onSubmit={this.login}>
<Form.Group controlId="loginEmailInput">
<Form.Label>Email address</Form.Label>
<Form.Control type="email" placeholder="admin@admin.com" onInput={this.updateTextField} required />
</Form.Group>
<Form.Group controlId="loginPasswordInput">
<Form.Label>Password</Form.Label>
<Form.Control type="password" onInput={this.updateTextField} required />
</Form.Group>
<Button variant="primary" type="submit">Login</Button>
</Form>
</Modal.Body>
</Modal>
</Col>
</Row>
</Container>

View File

@@ -1,19 +1,77 @@
import React, { Component } from 'react';
import {Nav, Navbar as BootstrapNavbar, NavLink as BootstrapNavLink} from 'react-bootstrap';
import ReactDOM from 'react-dom';
import { Link, NavLink } from 'react-router-dom';
export default class Navbar extends Component {
constructor(props) {
super(props)
this.state = {
brand: {
name: window.config.name,
url: window.config.base
},
}
}
generatePagesArray() {
var pages = [
{
name: 'Home',
url: window.config.base,
authRequired: false
},
{
name: 'All Tests',
url: window.config.base + 'speedtests',
authRequired: false
},
{
name: 'Settings',
url: window.config.base + 'settings',
authRequired: true
},
]
return pages;
}
generateLinks = () => {
var pages = this.generatePagesArray();
return pages.map(page => {
if(
page.authRequired === false ||
(
page.authRequired === true &&
window.config.auth &&
window.authenticated
) ||
(
page.authRequired === true &&
window.config.auth === false
)
) {
return <BootstrapNavLink key={page.url} as={NavLink} to={page.url}>{page.name}</BootstrapNavLink>;
}
});
}
render() {
var brand = this.state.brand;
var pages = this.generateLinks();
return (
<div>
</div>
<BootstrapNavbar variant="dark" bg="dark" expand="sm">
<BootstrapNavbar.Brand as={Link} to={brand.url}><img style={{width: '15%'}} src={window.config.base + 'files/icons/fav/android-icon-192x192.png'} /> {brand.name}</BootstrapNavbar.Brand>
<BootstrapNavbar.Toggle aria-controls="basic-navbar-nav" />
<BootstrapNavbar.Collapse id="basic-navbar-nav">
<Nav className="ml-auto">
{pages}
</Nav>
</BootstrapNavbar.Collapse>
</BootstrapNavbar>
);
}
}

View File

@@ -1,77 +0,0 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Card, Form, Button } from 'react-bootstrap';
import Axios from 'axios';
import { toast } from 'react-toastify';
export default class Setting extends Component {
constructor(props) {
super(props)
this.state = {
name: this.props.name,
value: this.props.value,
description: this.props.description,
}
}
ucfirst(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
update = () => {
var url = 'api/settings';
var data = {
name: this.state.name,
value: this.state.value
};
Axios.post(url, data)
.then((resp) => {
toast.success(this.ucfirst(this.state.name) + ' updated');
})
.catch((err) => {
if(err.response.status == 422) {
var errors = err.response.data.error;
for(var key in errors) {
var error = errors[key];
toast.error(error[0])
}
} else {
toast.error('Something went wrong')
}
})
}
updateValue = (e) => {
this.setState({
value: e.target.value
});
}
render() {
var name = this.state.name;
var value = this.state.value;
var description = this.state.description;
return (
<Card className="m-2 setting-card">
<Card.Body className="d-flex align-items-center">
<div>
<h4>{this.ucfirst(name)}</h4>
<div dangerouslySetInnerHTML={{ __html: description}} />
<Form.Group controlId={name}>
<Form.Label>{this.ucfirst(name)}</Form.Label>
<Form.Control type="text" label={name} defaultValue={value} onInput={this.updateValue} />
</Form.Group>
<Button variant="primary" onClick={this.update}>Save</Button>
</div>
</Card.Body>
</Card>
);
}
}
if (document.getElementById('Setting')) {
ReactDOM.render(<Setting />, document.getElementById('Setting'));
}

View File

@@ -1,263 +0,0 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Card, Form, Button, Modal, Row, Col } from 'react-bootstrap';
import Axios from 'axios';
import { toast } from 'react-toastify';
import SettingsModalCard from '../Settings/SettingsModalCard';
export default class SettingWithModal extends Component {
constructor(props) {
super(props)
this.state = {
title: this.props.title,
description: this.props.description,
settings: this.props.settings,
show: false,
autoClose: this.props.autoClose
}
}
ucfirst(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
update = () => {
var url = 'api/settings/bulk';
var data = [];
var settings = this.state.settings;
settings.forEach(e => {
if(e.type !== 'button-get') {
var res = {
name: e.obj.name,
value: e.obj.value
};
data.push(res);
}
});
data = {
data: data
};
Axios.post(url, data)
.then((resp) => {
toast.success(this.state.title + ' updated');
if(this.state.autoClose) {
this.toggleShow();
}
})
.catch((err) => {
if(err.response.status == 422) {
toast.error('Your input was invalid');
} else {
toast.error('Something went wrong')
}
})
}
updateValue = (e) => {
var name = e.target.id;
if(e.target.type == 'checkbox') {
var val = e.target.checked;
} else {
var val = e.target.value;
}
var settings = this.state.settings;
var i = 0;
settings.forEach(ele => {
if(ele.obj.name == name) {
ele.obj.value = val;
}
settings[i] = ele;
i++;
});
this.setState({
settings: settings
});
}
toggleShow = () => {
var show = this.state.show;
if(show) {
this.setState({
show: false
});
} else {
this.setState({
show: true
});
}
}
render() {
var title = this.state.title;
var description = this.state.description;
var show = this.state.show;
var settings = this.state.settings;
return (
<>
<SettingsModalCard title={title} description={description} toggleShow={this.toggleShow} />
<Modal show={show} onHide={this.toggleShow}>
<Modal.Header>
<Modal.Title>{title}</Modal.Title>
</Modal.Header>
<Modal.Body>
{settings.map((e,i) => {
var name = e.obj.name.split('_');
name[0] = this.ucfirst(name[0]);
name = name.join(' ');
if(e.obj.description == null || e.obj.description == '') {
var sm = { span: 12 };
var md = { span: 12 };
} else {
var sm = { span: 12 };
var md = { span: 6 };
}
var readonly = false;
if(window.config.editable[e.obj.name] == false) {
readonly = true;
}
if(e.type == 'info') {
return (
<Row key={e.obj.id} className="d-flex align-items-center">
<Col md={md} sm={sm}>
<p>{e.obj.content}</p>
</Col>
</Row>
)
} else if(e.type == 'checkbox') {
return (
<Row key={e.obj.id} className="d-flex align-items-center">
<Col md={md} sm={sm}>
<Form.Group controlId={e.obj.name}>
{readonly ?
<>
<Form.Check type="checkbox" disabled label={name} defaultChecked={Boolean(Number(e.obj.value))} onInput={this.updateValue} />
<Form.Text className="text-muted">This setting is defined as an env variable and is not editable.</Form.Text>
</>
:
<Form.Check type="checkbox" label={name} defaultChecked={Boolean(Number(e.obj.value))} onInput={this.updateValue} />
}
</Form.Group>
</Col>
{e.description == null &&
<Col md={md} sm={sm}>
<p>{e.obj.description}</p>
</Col>
}
</Row>
);
} else if(e.type == 'number') {
return (
<Row key={e.obj.id}>
<Col md={md} sm={sm}>
<Form.Group controlId={e.obj.name}>
<Form.Label>{name}</Form.Label>
{readonly ?
<>
<Form.Control type="number" disabled min={e.min} max={e.max} defaultValue={e.obj.value} onInput={this.updateValue} />
<Form.Text className="text-muted">This setting is defined as an env variable and is not editable.</Form.Text>
</>
:
<Form.Control type="number" min={e.min} max={e.max} defaultValue={e.obj.value} onInput={this.updateValue} />
}
</Form.Group>
</Col>
{e.description == null &&
<Col md={md} sm={sm}>
<p>{e.obj.description}</p>
</Col>
}
</Row>
);
} else if(e.type == 'text') {
return (
<Row key={e.obj.id}>
<Col md={md} sm={sm}>
<Form.Group controlId={e.obj.name}>
<Form.Label>{name}</Form.Label>
{readonly ?
<>
<Form.Control type="text" disabled defaultValue={e.obj.value} onInput={this.updateValue} />
<Form.Text className="text-muted">This setting is defined as an env variable and is not editable.</Form.Text>
</>
:
<Form.Control type="text" defaultValue={e.obj.value} onInput={this.updateValue} />
}
</Form.Group>
</Col>
{e.description == null &&
<Col md={md} sm={sm}>
<p>{e.obj.description}</p>
</Col>
}
</Row>
);
} else if(e.type == 'select') {
return (
<Row key={e.obj.id}>
<Col md={md} sm={sm}>
<Form.Group controlId={e.obj.name}>
<Form.Label>{name}</Form.Label>
{readonly ?
<>
<Form.Control as="select" disabled defaultValue={e.obj.value} onInput={this.updateValue}>
{e.options.map((e,i) => {
return (
<option key={i} value={e.value}>{e.name}</option>
)
})}
</Form.Control>
<Form.Text className="text-muted">This setting is defined as an env variable and is not editable.</Form.Text>
</>
:
<Form.Control as="select" defaultValue={e.obj.value} onInput={this.updateValue}>
{e.options.map((e,i) => {
return (
<option key={i} value={e.value}>{e.name}</option>
)
})}
</Form.Control>
}
</Form.Group>
</Col>
{e.description == null &&
<Col md={md} sm={sm}>
<p>{e.obj.description}</p>
</Col>
}
</Row>
)
} else if(e.type == 'button-get') {
return (
<Row key={e.obj.id}>
<Col md={md} sm={sm}>
<p>{name}</p>
<Button onClick={() => { Axios.get(e.url) }} >{name}</Button>
</Col>
{e.description == null &&
<Col md={md} sm={sm}>
<p>{e.obj.description}</p>
</Col>
}
</Row>
)
}
})}
<Button variant="primary" type="submit" onClick={this.update} >Save</Button>
</Modal.Body>
</Modal>
</>
);
}
}
if (document.getElementById('Setting')) {
ReactDOM.render(<Setting />, document.getElementById('Setting'));
}

View File

@@ -1,213 +0,0 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Modal, Container, Row, Col, Collapse } from 'react-bootstrap';
import Loader from '../Loader';
import Axios from 'axios';
import Setting from './Setting';
import SettingWithModal from './SettingWithModal';
import ResetSettings from './ResetSettings';
export default class Settings extends Component {
constructor(props) {
super(props)
this.state = {
show: false,
loading: true,
data: [],
}
}
componentDidMount = () => {
this.getData();
}
toggleShow = () => {
if(this.state.show) {
var show = false;
} else {
var show = true;
}
this.setState({
show: show
});
}
getData = () => {
var url = 'api/settings/';
Axios.get(url)
.then((resp) => {
this.setState({
loading: false,
data: resp.data
});
})
.catch((err) => {
if(err.response) {
}
})
}
buildSettingsCards = () => {
var e = this.state.data;
return (
<Row>
<Col lg={{ span: 4 }} md={{ span: 6 }} sm={{ span: 12 }}>
<Setting name={e.schedule.name} value={e.schedule.value} description={e.schedule.description} />
</Col>
<Col lg={{ span: 4 }} md={{ span: 6 }} sm={{ span: 12 }}>
<Setting name={e.server.name} value={e.server.value} description={e.server.description} />
</Col>
<Col lg={{ span: 4 }} md={{ span: 6 }} sm={{ span: 12 }}>
<SettingWithModal title="Graph settings" description="Control settings for the graphs." autoClose={true} settings={[
{
obj: e.download_upload_graph_enabled,
type: 'checkbox'
},
{
obj: e.download_upload_graph_width,
type: 'select',
options: [
{
name: 'Full-width',
'value': 12
},
{
name: 'Half-width',
'value': 6
}
],
},
{
obj: e.ping_graph_enabled,
type: 'checkbox'
},
{
obj: e.ping_graph_width,
type: 'select',
options: [
{
name: 'Full-width',
'value': 12
},
{
name: 'Half-width',
'value': 6
}
],
},
{
obj: e.failure_graph_enabled,
type: 'checkbox'
},
{
obj: e.failure_graph_width,
type: 'select',
options: [
{
name: 'Full-width',
'value': 12
},
{
name: 'Half-width',
'value': 6
}
],
}
]} />
</Col>
<Col lg={{ span: 4 }} md={{ span: 6 }} sm={{ span: 12 }}>
<SettingWithModal title="Notification settings" description="Control which types of notifications the server sends." autoClose={false} settings={[
{
obj: e.slack_webhook,
type: 'text'
},
{
obj: e.telegram_bot_token,
type: 'text'
},
{
obj: e.telegram_chat_id,
type: 'text'
},
{
obj: {
id: (Math.floor(Math.random() * 10000) + 1),
name: "Test notifications",
description: "After saving your updated notification settings, use this to check your settings are correct."
},
type: 'button-get',
url: 'api/settings/test-notification'
},
{
obj: e.speedtest_notifications,
type: 'checkbox'
},
{
obj: e.speedtest_overview_notification,
type: 'checkbox'
},
{
obj: e.speedtest_overview_time,
type: 'number',
min: 0,
max: 23
}
]} />
</Col>
<Col lg={{ span: 4 }} md={{ span: 6 }} sm={{ span: 12 }}>
<ResetSettings />
</Col>
</Row>
)
}
render() {
var show = this.state.show;
var loading = this.state.loading;
var data = this.state.data;
if(!loading) {
var cards = this.buildSettingsCards();
}
return (
<div>
<Container className="my-4">
<Row>
<Col sm={{ span: 12 }} className="mb-3 text-center">
<div className="mouse" onClick={this.toggleShow}>
<h4 className="mb-0 mr-2 d-inline">Settings</h4>
{(show) ?
<span className="ti-angle-up"></span>
:
<span className="ti-angle-down"></span>
}
</div>
</Col>
</Row>
<Collapse in={show}>
<div>
<Row>
<Col sm={{ span: 12 }}>
{loading ?
<Loader small />
:
cards
}
</Col>
</Row>
</div>
</Collapse>
</Container>
</div>
);
}
}
if (document.getElementById('Settings')) {
ReactDOM.render(<Settings />, document.getElementById('Settings'));
}

View File

@@ -0,0 +1,282 @@
import Axios from 'axios';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Footer from '../Home/Footer';
import Loader from '../Loader';
import Navbar from '../Navbar';
import SettingsTabs from './SettingsTabs';
export default class SettingsIndex extends Component {
constructor(props) {
super(props)
this.state = {
data: null,
loading: true,
}
}
getData = () => {
var url = 'api/settings/?token=' + window.token;
Axios.get(url)
.then((resp) => {
this.setState({
data: this.sortSettings(resp.data),
loading: false,
});
})
.catch((err) => {
//
})
}
sortSettings = (data) => {
return {
General: [
{
obj: data.app_name,
type: 'text',
},
{
obj: data.schedule_enabled,
type: 'checkbox',
},
{
obj: data.schedule,
type: 'text',
},
{
obj: data.server,
type: 'text',
},
{
obj: data.show_average,
type: 'checkbox',
},
{
obj: data.show_max,
type: 'checkbox',
},
{
obj: data.show_min,
type: 'checkbox',
}
],
Graphs: [
{
obj: data.download_upload_graph_enabled,
type: 'checkbox',
hideDescription: true
},
{
obj: data.download_upload_graph_width,
type: 'select',
options: [
{
name: 'Full-width',
'value': 12
},
{
name: 'Half-width',
'value': 6
}
],
},
{
obj: data.ping_graph_enabled,
type: 'checkbox',
hideDescription: true
},
{
obj: data.ping_graph_width,
type: 'select',
options: [
{
name: 'Full-width',
'value': 12
},
{
name: 'Half-width',
'value': 6
}
],
},
{
obj: data.failure_graph_enabled,
type: 'checkbox',
hideDescription: true
},
{
obj: data.failure_graph_width,
type: 'select',
options: [
{
name: 'Full-width',
'value': 12
},
{
name: 'Half-width',
'value': 6
}
],
},
{
obj: data.show_failed_tests_on_graph,
type: 'checkbox',
},
],
Notifications: [
{
obj: data.slack_webhook,
type: 'text'
},
{
obj: data.telegram_bot_token,
type: 'text'
},
{
obj: data.telegram_chat_id,
type: 'text'
},
{
type: 'btn-get',
url: 'api/settings/test-notification?token=' + window.token,
btnType: 'primary',
obj: {
id: (Math.floor(Math.random() * 10000) + 1),
name: 'Test notifications',
description: 'After saving your updated notification settings, use this to check your settings are correct.'
}
},
{
obj: data.speedtest_notifications,
type: 'checkbox'
},
{
obj: data.speedtest_overview_notification,
type: 'checkbox'
},
{
obj: data.speedtest_overview_time,
type: 'number',
min: 0,
max: 23,
},
// Add handling for title stuff
{
obj: data.threshold_alert_percentage,
type: 'number',
min: 0,
max: 100
},
{
obj: data.threshold_alert_absolute_notifications,
type: 'checkbox'
},
{
obj: data.threshold_alert_absolute_download,
type: 'number'
},
{
obj: data.threshold_alert_absolute_upload,
type: 'number'
},
{
obj: data.threshold_alert_absolute_ping,
type: 'number'
},
],
healthchecks: [
{
obj: data.healthchecks_enabled,
type: 'checkbox'
},
{
obj: data.healthchecks_server_url,
type: 'text'
},
{
obj: data.healthchecks_uuid,
type: 'text'
},
{
obj: {
id: (Math.floor(Math.random() * 10000) + 1),
name: "Test healthchecks.io integration",
description: ""
},
},
{
obj: {
id: (Math.floor(Math.random() * 10000) + 1),
name: "Start",
description: ""
},
type: 'btn-get',
url: 'api/settings/test-healthchecks/start?token=' + window.token,
btnType: 'outline-success',
inline: true,
earlyReturn: true,
classes: 'mr-2'
},
{
obj: {
id: (Math.floor(Math.random() * 10000) + 1),
name: "Success",
description: ""
},
type: 'btn-get',
url: 'api/settings/test-healthchecks/success?token=' + window.token,
btnType: 'success',
text: 'Success',
inline: true,
earlyReturn: true,
classes: 'mr-2'
},
{
obj: {
id: (Math.floor(Math.random() * 10000) + 1),
name: "Fail",
description: ""
},
type: 'btn-get',
url: 'api/settings/test-healthchecks/fail?token=' + window.token,
btnType: 'danger',
text: 'Fail',
inline: true,
earlyReturn: true,
classes: 'mr-2'
},
]
};
}
componentDidMount() {
this.getData();
}
render() {
var data = this.state.data;
var loading = this.state.loading;
return (
<div>
<Navbar />
<div className="container my-5">
{loading ?
<Loader />
:
<SettingsTabs data={data} />
}
</div>
<Footer />
</div>
);
}
}
if (document.getElementById('settingsIndex')) {
ReactDOM.render(<SettingsIndex />, document.getElementById('settingsIndex'));
}

View File

@@ -0,0 +1,185 @@
import React, { Component } from 'react';
import { Form } from 'react-bootstrap';
import ReactDOM from 'react-dom';
export default class SettingsInput extends Component {
constructor(props) {
super(props)
this.state = {
type: this.props.type,
name: this.props.name,
displayName: (this.props.name) ? this.formatName(this.props.name) : '',
value: (this.props.value) ? this.props.value : '',
classes: this.props.classes,
id: this.props.id,
label: (this.props.label) ? this.props.label : false,
readonly: true,
description: (this.props.description) ? this.props.description : false,
options: this.props.options ? this.props.options : [],
hideDescription: this.props.hideDescription ? true : false,
min: this.props.min ? this.props.min : null,
max: this.props.max ? this.props.max : null,
url: this.props.url,
inline: this.props.inline ? 'd-inline-block' : 'd-block',
btnType: this.props.btnType,
earlyReturn: this.props.earlyReturn ? true : false,
}
}
componentDidMount() {
this.setState({
readonly: this.isReadOnly()
});
}
formatName(name) {
name = name.split('_').join(' ');
return name.charAt(0).toUpperCase() + name.slice(1);
}
handleInput = (evt) => {
var val = evt.target.value;
if(this.state.type === 'checkbox') {
val = evt.target.checked;
}
this.props.handler(
this.state.name,
val
);
this.setState({
value: val
});
}
isReadOnly = () => {
if(window.config.editable[this.state.name] == false) {
return true;
}
return false;
}
generateNumberInput(disabled) {
return <Form.Control
name={this.state.name}
type={this.state.type}
defaultValue={this.state.value}
disabled={disabled}
min={this.state.min}
max={this.state.max}
onInput={this.handleInput} />
}
generateSelectInput(disabled) {
return (
<Form.Control
as="select"
name={this.state.name}
type={this.state.type}
defaultValue={this.state.value}
disabled={disabled}
onInput={this.handleInput}
>
{this.state.options.map((option,i) => {
return <option key={i} value={option.value}>{option.name}</option>
})}
</Form.Control>
);
}
generateCheckboxInput(disabled) {
return <Form.Control
custom
className="ml-2"
name={this.state.name}
type={this.state.type}
defaultChecked={this.state.value}
disabled={disabled}
onInput={this.handleInput} />
}
generateTextInput(disabled) {
return <Form.Control
name={this.state.name}
type={this.state.type}
defaultValue={this.state.value}
disabled={disabled}
onInput={this.handleInput} />
}
generateButtonGetInput() {
var url = this.state.url;
return (
<button
type="button"
className={"btn btn-" + this.state.btnType + ' ' + this.state.inline + ' ' + this.state.classes}
onClick={() => {
window.axios.get(url)
}}
>{this.state.displayName}</button>
);
}
generateInput = () => {
var disabled = (this.state.readonly) ? true : false;
var input = null;
if(this.state.type === 'number') {
input = this.generateNumberInput(disabled);
}
if(this.state.type === 'select') {
input = this.generateSelectInput(disabled);
}
if(this.state.type === 'checkbox') {
input = this.generateCheckboxInput(disabled);
}
if(this.state.type === 'text') {
input = this.generateTextInput(disabled);
}
if(this.state.type === 'btn-get') {
input = this.generateButtonGetInput();
}
if(this.state.earlyReturn) {
return input;
}
return (
<Form.Group controlId={this.state.id}>
{this.state.label &&
<Form.Label style={{fontSize: '1.25rem'}}>{this.formatName(this.state.name)}</Form.Label>
}
{input}
{this.state.description && !this.state.hideDescription &&
<p className="mt-1 text-muted" dangerouslySetInnerHTML={{ __html: this.state.description }}></p>
}
{this.state.readonly &&
<Form.Text className="text-muted">This setting is defined as an env variable and is not editable.</Form.Text>
}
</Form.Group>
);
}
render() {
var input = this.generateInput();
return input;
}
}
if (document.getElementById('SettingsInput')) {
ReactDOM.render(<SettingsInput />, document.getElementById('SettingsInput'));
}

View File

@@ -1,37 +0,0 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Card, Button } from 'react-bootstrap';
export default class SettingsModalCard extends Component {
constructor(props) {
super(props)
this.state = {
title: this.props.title,
description: this.props.description,
toggleShow: this.props.toggleShow,
}
}
render() {
var title = this.state.title;
var description = this.state.description;
var toggleShow = this.state.toggleShow;
return (
<Card className="m-2 setting-card">
<Card.Body className="d-flex align-items-center">
<div>
<h4>{title}</h4>
<p>{description}</p>
<Button variant="primary" onClick={toggleShow}>Edit</Button>
</div>
</Card.Body>
</Card>
);
}
}
if (document.getElementById('SettingModalCard')) {
ReactDOM.render(<SettingsModalCard />, document.getElementById('SettingModalCard'));
}

View File

@@ -0,0 +1,177 @@
import Axios from 'axios';
import React, { Component } from 'react';
import { Nav, Tab, Tabs } from 'react-bootstrap';
import ReactDOM from 'react-dom';
import { toast } from 'react-toastify';
import SettingsInput from './SettingsInput';
import ResetSettings from './tabs/ResetSettings';
import BackupSettings from './tabs/BackupSettings';
import GeneralSettings from './tabs/GeneralSettings';
import GraphsSettings from './tabs/GraphsSettings';
import HealthchecksSettings from './tabs/HealthchecksSettings';
import NotificationsSettings from './tabs/NotificationsSettings';
import Authentication from '../Authentication/Authentication';
export default class SettingsTabs extends Component {
constructor(props) {
super(props)
this.state = {
tab: "General",
data: this.props.data
}
}
generateTabs = () => {
var tabs = [
'General',
'Graphs',
'Notifications',
'healthchecks.io',
'Reset',
'Backup/Restore',
];
if(window.config.auth) {
tabs.push('Authentication');
}
return tabs.map((tab) => {
return <Tab key={tab} eventKey={tab} title={tab} />
});
}
switchTab = (tab) => {
this.setState({
tab: tab
});
}
save = (settings, name) => {
var url = 'api/settings/bulk?token=' + window.token;
var data = [];
settings.forEach(e => {
if(e.type !== 'btn-get') {
var res = {
name: e.obj.name,
value: e.obj.value
};
data.push(res);
}
});
data = {
data: data
};
Axios.post(url, data)
.then((resp) => {
toast.success(name + ' settings updated');
Axios.get('api/settings/config')
.then((resp) => {
window.config = resp.data;
})
})
.catch((err) => {
if(err.response.status == 422) {
toast.error('Your input was invalid');
} else {
toast.error('Something went wrong')
}
})
}
generateInputs = (settings, handler) => {
return settings.map((setting) => {
return <SettingsInput
key={setting.obj.id}
name={setting.obj.name}
id={setting.obj.id}
type={setting.type}
value={setting.obj.value}
description={setting.obj.description}
handler={handler}
label={setting.obj.name}
description={setting.obj.description}
options={setting.type == 'select' ? setting.options : []}
hideDescription={setting.hideDescription ? setting.hideDescription : false}
min={setting.min ? setting.min : false}
max={setting.max ? setting.max : false}
btnType={setting.btnType}
inline={setting.inline}
url={setting.url}
earlyReturn={setting.earlyReturn ? true : false}
classes={setting.classes ? setting.classes : ''}
/>
})
}
getTabContent = () => {
var data = this.state.data;
switch(this.state.tab) {
case 'General':
return <GeneralSettings
data={data.General}
generateInputs={this.generateInputs}
save={this.save} />
case 'Graphs':
return <GraphsSettings
data={data.Graphs}
generateInputs={this.generateInputs}
save={this.save} />
case 'Notifications':
return <NotificationsSettings
data={data.Notifications}
generateInputs={this.generateInputs}
save={this.save} />
case 'healthchecks.io':
return <HealthchecksSettings
data={data.healthchecks}
generateInputs={this.generateInputs}
save={this.save} />
case 'Reset':
return <ResetSettings
data={data.healthchecks}
generateInputs={this.generateInputs}
save={this.save} />
case 'Backup/Restore':
return <BackupSettings
data={data.healthchecks}
generateInputs={this.generateInputs}
save={this.save} />
case 'Authentication':
return <Authentication
data={data.healthchecks}
generateInputs={this.generateInputs}
save={this.save} />
}
}
render() {
var tabs = this.generateTabs();
var activeTab = this.state.tab;
var tabContent = this.getTabContent();
return (
<div>
<Tabs
variant="tabs"
onSelect={(tab) => { this.switchTab(tab) }}
activeKey={activeTab}
>
{tabs}
</Tabs>
<div className="mt-3">
{tabContent}
</div>
</div>
);
}
}
if (document.getElementById('settingsTabs')) {
ReactDOM.render(<SettingsTabs />, document.getElementById('settingsTabs'));
}

View File

@@ -0,0 +1,26 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Modal, Button, Tab } from 'react-bootstrap';
import Axios from 'axios';
import DataRow from '../../Data/DataRow';
export default class BackupSettings extends Component {
constructor(props) {
super(props)
this.state = {
}
}
render() {
return (
<Tab.Content>
<DataRow />
</Tab.Content>
);
}
}
if (document.getElementById('BackupSettings')) {
ReactDOM.render(<BackupSettings />, document.getElementById('BackupSettings'));
}

View File

@@ -0,0 +1,46 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Modal, Button, Tab } from 'react-bootstrap';
import Axios from 'axios';
export default class GeneralSettings extends Component {
constructor(props) {
super(props)
this.state = {
data: this.props.data
}
}
inputHandler = (name, val) => {
var settings = this.state.data;
var i = 0;
settings.forEach(ele => {
if(ele.obj.name == name) {
ele.obj.value = val;
}
settings[i] = ele;
i++;
});
this.setState({
data: settings
});
}
render() {
var settings = this.props.generateInputs(this.state.data, this.inputHandler);
return (
<Tab.Content>
{settings}
<div className="mt-3">
<button className="btn btn-primary" onClick={() => { this.props.save(this.state.data, 'General') }}>Save</button>
</div>
</Tab.Content>
);
}
}
if (document.getElementById('GeneralSettings')) {
ReactDOM.render(<GeneralSettings />, document.getElementById('GeneralSettings'));
}

View File

@@ -0,0 +1,48 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Modal, Button, Tab } from 'react-bootstrap';
import Axios from 'axios';
import { toast } from 'react-toastify';
import SettingsInput from '../SettingsInput';
export default class GraphsSettings extends Component {
constructor(props) {
super(props)
this.state = {
data: this.props.data
}
}
inputHandler = (name, val) => {
var settings = this.state.data;
var i = 0;
settings.forEach(ele => {
if(ele.obj.name == name) {
ele.obj.value = val;
}
settings[i] = ele;
i++;
});
this.setState({
data: settings
});
}
render() {
var settings = this.props.generateInputs(this.state.data, this.inputHandler);
return (
<Tab.Content>
{settings}
<div className="mt-3">
<button className="btn btn-primary" onClick={() => { this.props.save(this.state.data, 'General') }}>Save</button>
</div>
</Tab.Content>
);
}
}
if (document.getElementById('GraphsSettings')) {
ReactDOM.render(<GraphsSettings />, document.getElementById('GraphsSettings'));
}

View File

@@ -0,0 +1,48 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Modal, Button, Tab } from 'react-bootstrap';
import Axios from 'axios';
import { toast } from 'react-toastify';
import SettingsInput from '../SettingsInput';
export default class HealthchecksSettings extends Component {
constructor(props) {
super(props)
this.state = {
data: this.props.data
}
}
inputHandler = (name, val) => {
var settings = this.state.data;
var i = 0;
settings.forEach(ele => {
if(ele.obj.name == name) {
ele.obj.value = val;
}
settings[i] = ele;
i++;
});
this.setState({
data: settings
});
}
render() {
var settings = this.props.generateInputs(this.state.data, this.inputHandler);
return (
<Tab.Content>
{settings}
<div className="mt-3">
<button className="btn btn-primary" onClick={() => { this.props.save(this.state.data, 'healthchecks.io') }}>Save</button>
</div>
</Tab.Content>
);
}
}
if (document.getElementById('HealthchecksSettings')) {
ReactDOM.render(<HealthchecksSettings />, document.getElementById('HealthchecksSettings'));
}

View File

@@ -0,0 +1,46 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Modal, Button, Tab } from 'react-bootstrap';
import Axios from 'axios';
export default class NotificationsSettings extends Component {
constructor(props) {
super(props)
this.state = {
data: this.props.data
}
}
inputHandler = (name, val) => {
var settings = this.state.data;
var i = 0;
settings.forEach(ele => {
if(ele.obj.name == name) {
ele.obj.value = val;
}
settings[i] = ele;
i++;
});
this.setState({
data: settings
});
}
render() {
var settings = this.props.generateInputs(this.state.data, this.inputHandler);
return (
<Tab.Content>
{settings}
<div className="mt-3">
<button className="btn btn-primary" onClick={() => { this.props.save(this.state.data, 'Notifications') }}>Save</button>
</div>
</Tab.Content>
);
}
}
if (document.getElementById('NotificationsSettings')) {
ReactDOM.render(<NotificationsSettings />, document.getElementById('NotificationsSettings'));
}

View File

@@ -1,7 +1,6 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Modal, Button } from 'react-bootstrap';
import SettingsModalCard from './SettingsModalCard';
import { Button } from 'react-bootstrap';
import Axios from 'axios';
import { toast } from 'react-toastify';
@@ -10,15 +9,6 @@ export default class ResetSettings extends Component {
super(props)
this.state = {
show: false,
}
}
toggleShow = () => {
if(this.state.show) {
this.setState({ show: false });
} else {
this.setState({ show:true });
}
}
@@ -45,17 +35,9 @@ export default class ResetSettings extends Component {
return (
<>
<SettingsModalCard title={title} description="Bulk delete speedtests from the database." toggleShow={this.toggleShow} />
<Modal show={show} onHide={this.toggleShow}>
<Modal.Header>
<Modal.Title>{title}</Modal.Title>
</Modal.Header>
<Modal.Body>
<h4>Clear all speedtests</h4>
<p className="text-muted">If using SQLite, a backup of the database will be stored in the location of the current database.</p>
<Button onClick={this.deleteAll} variant="danger">Delete all</Button>
</Modal.Body>
</Modal>
<h4>Clear all speedtests</h4>
<p className="text-muted">If using SQLite, a backup of the database will be stored in the location of the current database.</p>
<Button onClick={this.deleteAll} variant="danger">Delete all</Button>
</>
);
}

View File

@@ -0,0 +1,29 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import TestsTable from './Graphics/TestsTable';
import Footer from './Home/Footer';
import Navbar from './Navbar';
export default class SpeedtestsPage extends Component {
constructor(props) {
super(props)
this.state = {
}
}
render() {
return (
<div>
<Navbar />
<TestsTable />
<Footer />
</div>
);
}
}
if (document.getElementById('SpeedtestsPage')) {
ReactDOM.render(<SpeedtestsPage />, document.getElementById('SpeedtestsPage'));
}

54
resources/js/index.js vendored
View File

@@ -4,10 +4,12 @@ import { BrowserRouter, Switch, Route, Redirect, useHistory } from 'react-router
import Axios from 'axios';
import ErrorPage from './components/ErrorPage';
import Loader from './components/Loader';
import Login from './components/Login';
import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import HomePage from './components/Home/HomePage';
import Cookies from 'js-cookie';
import SettingsIndex from './components/Settings/SettingsIndex';
import SpeedtestsPage from './components/SpeedtestsPage';
export default class Index extends Component {
constructor(props) {
@@ -15,7 +17,7 @@ export default class Index extends Component {
this.state = {
loading: true,
redirect: false
redirect: false,
}
}
@@ -29,10 +31,38 @@ export default class Index extends Component {
Axios.get(url)
.then((resp) => {
window.config = resp.data;
this.setState({
loading: false,
redirect: true,
});
if(window.config.auth === true) {
var authCookie = Cookies.get('auth');
if(authCookie == undefined) {
window.authenticated = false;
this.setState({
loading: false,
redirect: true,
});
} else {
var url = 'api/auth/me?token=' + authCookie;
Axios.get(url)
.then((resp) => {
window.authenticated = true;
window.token = authCookie;
})
.catch((err) => {
Cookies.remove('auth');
window.authenticated = false;
})
.finally(() => {
this.setState({
loading: false,
redirect: true,
});
})
}
} else {
this.setState({
loading: false,
redirect: true,
});
}
})
}
@@ -56,6 +86,18 @@ export default class Index extends Component {
<HomePage />
</div>
)} />
<Route exact path={window.config.base + 'speedtests'} render={(props) => (
<div>
<SpeedtestsPage />
</div>
)} />
<Route exact path={window.config.base + 'settings'} render={(props) => (
<div>
<SettingsIndex />
</div>
)} />
<Route exact path={window.config.base + "error/:code"} render={(props) => ( <ErrorPage code={props.match.params.code} /> )} />
<Route render={(props) => (<ErrorPage code="404" />)} />
</Switch>

View File

@@ -2,6 +2,7 @@
use App\Helpers\SpeedtestHelper;
use App\Http\Controllers\SpeedtestController;
use App\Speedtest;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
@@ -70,7 +71,9 @@ Route::group([
], function () {
Route::get('/config', 'SettingsController@config')
->name('settings.config');
Route::get('/test-notification', 'SettingsController@testNotification')
Route::get('/test-notification', 'IntegrationsController@testNotification')
->name('settings.test_notification');
Route::get('/test-healthchecks/{method}', 'IntegrationsController@testHealthchecks')
->name('settings.test_notification');
Route::get('/', 'SettingsController@index')
->name('settings.index');
@@ -81,3 +84,29 @@ Route::group([
Route::post('/bulk', 'SettingsController@bulkStore')
->name('settings.bulk.update');
});
Route::group(
[
'middleware' => 'api',
'prefix' => 'auth'
],
function ($router) {
Route::post('register', 'AuthController@register')->name('auth.register');
Route::post('login', 'AuthController@login')->middleware('throttle:60,1')->name('auth.login');
Route::get('logout', 'AuthController@logout')->name('auth.logout');
Route::get('refresh', 'AuthController@refresh')->middleware('throttle:60,1')->name('auth.refresh');
Route::get('me', 'AuthController@me')->middleware('session_active')->name('auth.me');
Route::post('change-password', 'AuthController@changePassword')->middleware('session_active')->name('auth.change_password');
Route::group(
[
'middleware' => ['api', 'session_active'],
'prefix' => 'sessions'
],
function($router) {
Route::get('/', 'AuthController@getSessions')->name('auth.sessions.all');
Route::delete('/{id}', 'AuthController@deleteSession')->name('auth.sessions.delete');
}
);
}
);

View File

@@ -16,20 +16,20 @@ use Illuminate\Support\Facades\Route;
|
*/
Route::get(SettingsHelper::getBase() . 'files/{path?}', function($file) {
Route::get(SettingsHelper::getBase() . 'files/{path?}', function ($file) {
$fileP = explode('?', $file)[0];
$fileP = public_path() . '/' . $fileP;
if(file_exists($fileP)) {
if (file_exists($fileP)) {
$contents = File::get($fileP);
$mime = \GuzzleHttp\Psr7\mimetype_from_filename($fileP);
return Response::make(File::get($fileP), 200, [ 'Content-type' => $mime ]);
return Response::make(File::get($fileP), 200, ['Content-type' => $mime]);
} else {
abort(404);
}
})->where('path', '.*')
->name('files');
->name('files');
Route::get('/{path?}', function() {
return view('app', [ 'title' => 'Speedtest Tracker' ]);
Route::get('/{path?}', function () {
return view('app', ['title' => SettingsHelper::get('app_name')->value]);
})->where('path', '^((?!\/api\/).)*$')
->name('react');
->name('react');

Some files were not shown because too many files have changed in this diff Show More