mirror of https://github.com/openspug/spug
A web update
parent
d1d642fba7
commit
605ef9a214
|
@ -35,15 +35,22 @@ class ComTable extends React.Component {
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
}, {
|
}, {
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
width: 200,
|
||||||
render: info => (
|
render: info => (
|
||||||
<span>
|
<span>
|
||||||
<LinkButton onClick={() => store.showForm(info)}>编辑</LinkButton>
|
<LinkButton onClick={() => store.showForm(info)}>编辑</LinkButton>
|
||||||
<Divider type="vertical"/>
|
<Divider type="vertical"/>
|
||||||
<LinkButton onClick={() => this.handleDelete(info)}>删除</LinkButton>
|
<LinkButton onClick={() => this.handleDelete(info)}>删除</LinkButton>
|
||||||
|
<Divider type="vertical"/>
|
||||||
|
<LinkButton onClick={() => this.handleConsole(info)}>Console</LinkButton>
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
handleConsole = (info) => {
|
||||||
|
window.open(`/api/host/ssh/${info.id}/?x-token=${localStorage.getItem('token')}`)
|
||||||
|
};
|
||||||
|
|
||||||
handleDelete = (text) => {
|
handleDelete = (text) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '删除确认',
|
title: '删除确认',
|
||||||
|
|
|
@ -4,6 +4,7 @@ module.exports = function (app) {
|
||||||
app.use(proxy('/api/', {
|
app.use(proxy('/api/', {
|
||||||
target: 'http://localhost:8000',
|
target: 'http://localhost:8000',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
ws: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/api': ''
|
'^/api': ''
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue