Finish linting web interface

Fix remaining linter errors detected in web interface code.
This commit is contained in:
Hornwitser committed 2020-09-28 05:52:31 +02:00
1 parent 03b7d22ba6
commit bccc89fa0b
16 files changed
+201 -187

No files matched your search

+8 -12
View File
@@ -4,12 +4,10 @@ import { listSlaves, listInstances, listUsers, createUser } from "../../util/wsl
import DataTable from "../../components/data-table";
export class UsersTable extends Component {
constructor(props) {
super(props);
}
navigate(url) {
this.props.history.push(url);
}
render() {
return <Card>
<h2>Slaves</h2>
@@ -17,22 +15,20 @@ export class UsersTable extends Component {
AddRecord={{
fields: [{
dataIndex: "name",
title: "Name"
title: "Name",
}],
insert: async args => {
let response = await createUser({name: args.name});
console.log("Created user",response);
}
},
}}
DataFunction={listUsers}
TableProps={{
onRow: (record, rowIndex) => {
return {
onClick: event => {
this.navigate(`/users/${record.name}/view`);
}
};
}
onRow: (record, rowIndex) => ({
onClick: event => {
this.navigate(`/users/${record.name}/view`);
},
}),
}}
/>
</Card>;