mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-21 13:23:04 +01:00
Fix itny bugs
This commit is contained in:
@@ -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...');
|
||||
|
||||
try {
|
||||
$results = $this->speedtestProvider->run(false, false);
|
||||
|
||||
if (!is_object($results)) {
|
||||
} catch (SpeedtestFailureException $e) {
|
||||
$this->error('Something went wrong running the speedtest.');
|
||||
exit();
|
||||
}
|
||||
|
||||
26
public/js/app.js
vendored
26
public/js/app.js
vendored
@@ -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", {
|
||||
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"
|
||||
})), /*#__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"], {
|
||||
}));
|
||||
}), 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));
|
||||
}
|
||||
}
|
||||
}]);
|
||||
|
||||
21
resources/js/components/Graphics/TableRow.js
vendored
21
resources/js/components/Graphics/TableRow.js
vendored
@@ -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>
|
||||
{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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user