A web update

pull/22/head
雷二猛 2019-12-12 11:38:36 +08:00
parent d1d642fba7
commit 605ef9a214
2 changed files with 8 additions and 0 deletions

View File

@ -35,15 +35,22 @@ class ComTable extends React.Component {
ellipsis: true
}, {
title: '操作',
width: 200,
render: info => (
<span>
<LinkButton onClick={() => store.showForm(info)}>编辑</LinkButton>
<Divider type="vertical"/>
<LinkButton onClick={() => this.handleDelete(info)}>删除</LinkButton>
<Divider type="vertical"/>
<LinkButton onClick={() => this.handleConsole(info)}>Console</LinkButton>
</span>
)
}];
handleConsole = (info) => {
window.open(`/api/host/ssh/${info.id}/?x-token=${localStorage.getItem('token')}`)
};
handleDelete = (text) => {
Modal.confirm({
title: '删除确认',

View File

@ -4,6 +4,7 @@ module.exports = function (app) {
app.use(proxy('/api/', {
target: 'http://localhost:8000',
changeOrigin: true,
ws: true,
pathRewrite: {
'^/api': ''
}