diff --git a/app/Console/Commands/SpeedtestCommand.php b/app/Console/Commands/SpeedtestCommand.php index 11f06553..547165e3 100644 --- a/app/Console/Commands/SpeedtestCommand.php +++ b/app/Console/Commands/SpeedtestCommand.php @@ -2,6 +2,7 @@ namespace App\Console\Commands; +use App\Exceptions\SpeedtestFailureException; use App\Helpers\SpeedtestHelper; use App\Interfaces\SpeedtestProvider; use Illuminate\Console\Command; @@ -45,9 +46,9 @@ class SpeedtestCommand extends Command { $this->info('Running speedtest, this might take a while...'); - $results = $this->speedtestProvider->run(false, false); - - if (!is_object($results)) { + try { + $results = $this->speedtestProvider->run(false, false); + } catch (SpeedtestFailureException $e) { $this->error('Something went wrong running the speedtest.'); exit(); } diff --git a/composer.json b/composer.json index 8f1c9eca..eacdb52c 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,6 @@ "brianium/paratest": "^6.2", "facade/ignition": "^2.3.6", "fzaninotto/faker": "^1.9.1", - "itsgoingd/clockwork": "^5.0", "mockery/mockery": "^1.3.1", "nunomaduro/collision": "^5.3", "nunomaduro/larastan": "^0.7.0", diff --git a/composer.lock b/composer.lock index bf6ff109..b16ed50e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "102adc5121f97ad3ad15009f410fb8fa", + "content-hash": "2c905613bf401a9978baa23d1a80b710", "packages": [ { "name": "asm89/stack-cors", @@ -6850,75 +6850,6 @@ }, "time": "2020-07-09T08:09:16+00:00" }, - { - "name": "itsgoingd/clockwork", - "version": "v5.0.6", - "source": { - "type": "git", - "url": "https://github.com/itsgoingd/clockwork.git", - "reference": "1de3f9f9fc22217aa024f79ecbdf0fde418fc0a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/itsgoingd/clockwork/zipball/1de3f9f9fc22217aa024f79ecbdf0fde418fc0a1", - "reference": "1de3f9f9fc22217aa024f79ecbdf0fde418fc0a1", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": ">=5.6", - "psr/log": "1.*" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Clockwork\\Support\\Laravel\\ClockworkServiceProvider" - ], - "aliases": { - "Clockwork": "Clockwork\\Support\\Laravel\\Facade" - } - } - }, - "autoload": { - "psr-4": { - "Clockwork\\": "Clockwork/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "itsgoingd", - "email": "itsgoingd@luzer.sk", - "homepage": "https://twitter.com/itsgoingd" - } - ], - "description": "php dev tools in your browser", - "homepage": "https://underground.works/clockwork", - "keywords": [ - "Devtools", - "debugging", - "laravel", - "logging", - "lumen", - "profiling", - "slim" - ], - "support": { - "issues": "https://github.com/itsgoingd/clockwork/issues", - "source": "https://github.com/itsgoingd/clockwork/tree/v5.0.6" - }, - "funding": [ - { - "url": "https://github.com/itsgoingd", - "type": "github" - } - ], - "time": "2020-12-27T00:18:25+00:00" - }, { "name": "justinrainbow/json-schema", "version": "5.2.10", diff --git a/public/js/app.js b/public/js/app.js index 00986d83..24d6b2cc 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -146804,18 +146804,30 @@ var TableRow = /*#__PURE__*/function (_Component) { } }, "Delete")))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null)); } else { - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, e.id), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, new Date(e.created_at).toLocaleString()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { - className: "ti-close text-danger" - })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { - className: "ti-close text-danger" - })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { - className: "ti-close text-danger" - })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Button"], { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, fields.visible.map(function (e, i) { + console.log(e); + + if (e.name === 'created_at') { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", { + key: i + }, new Date(e.value).toLocaleString()); + } else if (e.name === 'id') { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", { + key: i + }, e.value); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", { + key: i + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { + className: "ti-close text-danger" + })); + }), window.config.auth && window.authenticated || !window.config.auth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Button"], { variant: "danger", onClick: function onClick() { _this2["delete"](e.id); } - }, "Delete"))); + }, "Delete")) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null)); } } }]); diff --git a/resources/js/components/Graphics/TableRow.js b/resources/js/components/Graphics/TableRow.js index 4e1f9d44..1b172d8e 100644 --- a/resources/js/components/Graphics/TableRow.js +++ b/resources/js/components/Graphics/TableRow.js @@ -28,7 +28,7 @@ export default class TableRow extends Component { } delete = (id) => { - var url = 'api/speedtest/delete/' + id; + var url = 'api/speedtest/delete/' + id + '?token=' + window.token; Axios.delete(url) .then((resp) => { @@ -134,12 +134,23 @@ export default class TableRow extends Component { } else { return (