Move web interface to its own package

Create clusterio/web_ui package and move all of the web interface files
to it in order to be able to share the interface components with
plugins.
This commit is contained in:
Hornwitser committed 2020-10-28 19:22:14 +01:00
1 parent eee4c69575
commit 690e566556
32 files changed
+46 -27

No files matched your search

@@ -0,0 +1,36 @@
import React, { Component } from "react";
import { Card } from "antd";
import { listSlaves, listInstances, listUsers, createUser } from "../../util/wslink";
import DataTable from "../../components/data-table";
export class UsersTable extends Component {
navigate(url) {
this.props.history.push(url);
}
render() {
return <Card>
<h2>Slaves</h2>
<DataTable
AddRecord={{
fields: [{
dataIndex: "name",
title: "Name",
}],
insert: async args => {
let response = await createUser({name: args.name});
console.log("Created user",response);
},
}}
DataFunction={listUsers}
TableProps={{
onRow: (record, rowIndex) => ({
onClick: event => {
this.navigate(`/users/${record.name}/view`);
},
}),
}}
/>
</Card>;
}
}