mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-21 21:33:08 +01:00
Fix itny bugs
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use App\Exceptions\SpeedtestFailureException;
|
||||||
use App\Helpers\SpeedtestHelper;
|
use App\Helpers\SpeedtestHelper;
|
||||||
use App\Interfaces\SpeedtestProvider;
|
use App\Interfaces\SpeedtestProvider;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
@@ -45,9 +46,9 @@ class SpeedtestCommand extends Command
|
|||||||
{
|
{
|
||||||
$this->info('Running speedtest, this might take a while...');
|
$this->info('Running speedtest, this might take a while...');
|
||||||
|
|
||||||
|
try {
|
||||||
$results = $this->speedtestProvider->run(false, false);
|
$results = $this->speedtestProvider->run(false, false);
|
||||||
|
} catch (SpeedtestFailureException $e) {
|
||||||
if (!is_object($results)) {
|
|
||||||
$this->error('Something went wrong running the speedtest.');
|
$this->error('Something went wrong running the speedtest.');
|
||||||
exit();
|
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));
|
}, "Delete")))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null));
|
||||||
} else {
|
} 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"
|
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"
|
}), 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"], {
|
||||||
})), /*#__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"], {
|
|
||||||
variant: "danger",
|
variant: "danger",
|
||||||
onClick: function onClick() {
|
onClick: function onClick() {
|
||||||
_this2["delete"](e.id);
|
_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 {
|
} else {
|
||||||
return (
|
return (
|
||||||
<tr>
|
<tr>
|
||||||
<td>{e.id}</td>
|
{fields.visible.map((e, i) => {
|
||||||
<td>{new Date(e.created_at).toLocaleString()}</td>
|
console.log(e);
|
||||||
<td><span className="ti-close text-danger"></span></td>
|
if(e.name === 'created_at') {
|
||||||
<td><span className="ti-close text-danger"></span></td>
|
return <td key={i}>{new Date(e.value).toLocaleString()}</td>
|
||||||
<td><span className="ti-close text-danger"></span></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><Button variant="danger" onClick={() => { this.delete(e.id) }}>Delete</Button></td>
|
||||||
|
:
|
||||||
|
<td></td>
|
||||||
|
}
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user