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
|
||||
}, {
|
||||
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: '删除确认',
|
||||
|
|
|
@ -4,6 +4,7 @@ module.exports = function (app) {
|
|||
app.use(proxy('/api/', {
|
||||
target: 'http://localhost:8000',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
pathRewrite: {
|
||||
'^/api': ''
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue