Implement webpack build for web interface

Set up webpack for the master server's web interface and fix the issues
from the imported interface source files.  The .jsx files in
package/master/web are bundled together into package/master/static and
served by the master server via express.
This commit is contained in:
Hornwitser committed 2020-09-28 04:23:45 +02:00
1 parent 2382f4bbdc
commit 701ff87bcd
25 files changed
+219 -191

No files matched your search

+6 -17
View File
@@ -1,17 +1,6 @@
import React, { Component } from "react"
import { Card, Table, Button, List, Popover, Select, Divider, Input, Form, Col, Row, Checkbox, Space, Transfer } from "antd"
import { Card, Button, Popover, Select, Transfer } from "antd";
import {
listSlaves,
listInstances,
startInstance,
stopInstance,
setInstanceOutputSubscriptions,
deleteInstance,
assignInstance,
createSave,
getInstanceConfig,
setInstanceConfigField,
sendRcon,
deleteUser,
listUsers,
listRoles,
@@ -19,7 +8,7 @@ import {
} from "../../util/wslink"
import DataTable from "../../components/data-table"
import notify from "../../util/notify"
import { DeleteOutlined, EditOutlined, PlusOutlined } from "@ant-design/icons"
import DeleteOutlined from "@ant-design/icons/DeleteOutlined"
const { Option } = Select
@@ -29,15 +18,15 @@ export class UserView extends Component {
this.state = {
user: {}
}
this.messagesEndRef = React.createRef();
}
messagesEndRef = React.createRef()
navigate(url) {
this.props.history.push(url);
}
async componentDidMount() {
await this.getData()
}
getData = async () => {
async getData() {
let name = this.props.match.params.id
let users = await listUsers()
@@ -48,7 +37,7 @@ export class UserView extends Component {
roles,
})
}
handleChange = async targetKeys => {
async handleChange(targetKeys) {
this.setState({
user: {
...this.state.user,
@@ -73,7 +62,7 @@ export class UserView extends Component {
showSearch
filterOption={(inputValue, option) => option.name.toLowerCase().indexOf(inputValue.toLowerCase()) > -1}
targetKeys={user.roles}
onChange={this.handleChange}
onChange={this.handleChange.bind(this)}
render={item => item.name}
/>
<Popover
@@ -1,5 +1,5 @@
import React, { Component } from "react"
import { Card, Table } from "antd"
import { Card } from "antd"
import { listSlaves, listInstances, listUsers, createUser } from "../../util/wslink"
import DataTable from "../../components/data-table"