Skip to content

Commit

Permalink
Merge branch 'alpha' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
henrywhitaker3 committed Apr 10, 2021
2 parents dd87160 + 76e21bf commit cb5abcf
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 89 deletions.
7 changes: 4 additions & 3 deletions app/Console/Commands/SpeedtestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Console\Commands;

use App\Exceptions\SpeedtestFailureException;
use App\Helpers\SpeedtestHelper;
use App\Interfaces\SpeedtestProvider;
use Illuminate\Console\Command;
Expand Down Expand Up @@ -45,9 +46,9 @@ public function handle()
{
$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();
}
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
71 changes: 1 addition & 70 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 20 additions & 8 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}]);
Expand Down
25 changes: 18 additions & 7 deletions resources/js/components/Graphics/TableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -134,12 +134,23 @@ export default class TableRow extends Component {
} else {
return (
<tr>
<td>{e.id}</td>
<td>{new Date(e.created_at).toLocaleString()}</td>
<td><span className="ti-close text-danger"></span></td>
<td><span className="ti-close text-danger"></span></td>
<td><span className="ti-close text-danger"></span></td>
<td><Button variant="danger" onClick={() => { this.delete(e.id) }}>Delete</Button></td>
{fields.visible.map((e, i) => {
console.log(e);
if(e.name === 'created_at') {
return <td key={i}>{new Date(e.value).toLocaleString()}</td>
} else if (e.name === 'id') {
return <td key={i}>{e.value}</td>
}

return (
<td key={i}><span className="ti-close text-danger"></span></td>
);
})}
{(window.config.auth && window.authenticated) || !window.config.auth ?
<td><Button variant="danger" onClick={() => { this.delete(e.id) }}>Delete</Button></td>
:
<td></td>
}
</tr>
);
}
Expand Down

0 comments on commit cb5abcf

Please sign in to comment.