Skip to content

Commit

Permalink
Added delete button for failed tests
Browse files Browse the repository at this point in the history
Re #556
  • Loading branch information
henrywhitaker3 committed Apr 10, 2021
1 parent d91a5ef commit 0b593e6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
6 changes: 6 additions & 0 deletions changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"1.11.1": [
{
"description": "Add option to delete failed tests.",
"link": ""
}
],
"1.11.0": [
{
"description": "Upgrade to Laravel 8.",
Expand Down
14 changes: 12 additions & 2 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -135429,6 +135429,8 @@ var TableRow = /*#__PURE__*/function (_Component) {
}
});

_this.props.refresh();

_this.toggleShow();
});

Expand Down Expand Up @@ -135475,7 +135477,12 @@ var TableRow = /*#__PURE__*/function (_Component) {
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("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")));
}
}
}]);
Expand Down Expand Up @@ -135631,6 +135638,8 @@ var TestsTable = /*#__PURE__*/function (_Component) {
}, {
key: "render",
value: function render() {
var _this2 = this;

var page = this.state.page;
var lastPage = this.state.lastPage;
var data = this.state.data;
Expand Down Expand Up @@ -135659,7 +135668,8 @@ var TestsTable = /*#__PURE__*/function (_Component) {
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("thead", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "ID"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Time"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Download (Mbit/s)"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Upload (Mbit/s)"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Ping (ms)"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "More"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tbody", null, data.map(function (e, i) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TableRow__WEBPACK_IMPORTED_MODULE_4__["default"], {
key: e.id,
data: e
data: e,
refresh: _this2.getData
});
}))))), page < lastPage && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_3__["Row"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_3__["Col"], {
sm: {
Expand Down
3 changes: 2 additions & 1 deletion resources/js/components/Graphics/TableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default class TableRow extends Component {
}
})

this.props.refresh();
this.toggleShow();
}

Expand Down Expand Up @@ -90,7 +91,7 @@ export default class TableRow extends Component {
<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></td>
<td><Button variant="danger" onClick={() => { this.delete(e.id) }}>Delete</Button></td>
</tr>
);
}
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/Graphics/TestsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default class TestsTable extends Component {
<tbody>
{data.map((e,i) => {
return (
<TableRow key={e.id} data={e} />
<TableRow key={e.id} data={e} refresh={this.getData} />
);
})}
</tbody>
Expand Down

0 comments on commit 0b593e6

Please sign in to comment.