mirror of https://github.com/openspug/spug
U 增加主机web终端权限管理
parent
12e57bbb26
commit
7ec8132b03
|
@ -62,7 +62,7 @@ function ComTable() {
|
||||||
type="primary"
|
type="primary"
|
||||||
icon={<PlusOutlined/>}
|
icon={<PlusOutlined/>}
|
||||||
onClick={() => store.showForm()}>新建</AuthButton>,
|
onClick={() => store.showForm()}>新建</AuthButton>,
|
||||||
<AuthFragment auth="host.host.add">
|
<AuthFragment auth="host.host.import">
|
||||||
<Dropdown overlay={(
|
<Dropdown overlay={(
|
||||||
<Menu onClick={handleImport}>
|
<Menu onClick={handleImport}>
|
||||||
<Menu.Item key="excel">
|
<Menu.Item key="excel">
|
||||||
|
|
|
@ -7,7 +7,7 @@ import React from 'react';
|
||||||
import { observer } from 'mobx-react';
|
import { observer } from 'mobx-react';
|
||||||
import { Row, Col, Button } from 'antd';
|
import { Row, Col, Button } from 'antd';
|
||||||
import { CodeOutlined } from '@ant-design/icons';
|
import { CodeOutlined } from '@ant-design/icons';
|
||||||
import { AuthDiv, Breadcrumb } from 'components';
|
import { AuthDiv, Breadcrumb, AuthButton } from 'components';
|
||||||
import Group from './Group';
|
import Group from './Group';
|
||||||
import ComTable from './Table';
|
import ComTable from './Table';
|
||||||
import ComForm from './Form';
|
import ComForm from './Form';
|
||||||
|
@ -24,7 +24,7 @@ export default observer(function () {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AuthDiv auth="host.host.view">
|
<AuthDiv auth="host.host.view">
|
||||||
<Breadcrumb extra={<Button type="primary" icon={<CodeOutlined/>} onClick={openTerminal}>Web 终端</Button>}>
|
<Breadcrumb extra={<AuthButton auth="host.host.console" type="primary" icon={<CodeOutlined/>} onClick={openTerminal}>Web 终端</AuthButton>}>
|
||||||
<Breadcrumb.Item>首页</Breadcrumb.Item>
|
<Breadcrumb.Item>首页</Breadcrumb.Item>
|
||||||
<Breadcrumb.Item>主机管理</Breadcrumb.Item>
|
<Breadcrumb.Item>主机管理</Breadcrumb.Item>
|
||||||
</Breadcrumb>
|
</Breadcrumb>
|
||||||
|
|
|
@ -22,9 +22,10 @@ export default [{
|
||||||
perms: [
|
perms: [
|
||||||
{key: 'view', label: '查看主机'},
|
{key: 'view', label: '查看主机'},
|
||||||
{key: 'add', label: '新建主机'},
|
{key: 'add', label: '新建主机'},
|
||||||
|
{key: 'import', label: '批量导入'},
|
||||||
{key: 'edit', label: '编辑主机'},
|
{key: 'edit', label: '编辑主机'},
|
||||||
{key: 'del', label: '删除主机'},
|
{key: 'del', label: '删除主机'},
|
||||||
{key: 'console', label: 'Console'},
|
{key: 'console', label: 'Web终端'},
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
key: 'console',
|
key: 'console',
|
||||||
|
|
Loading…
Reference in New Issue