mirror of https://github.com/openspug/spug
U 增加构建权限管理
parent
edc2328a20
commit
12e57bbb26
|
@ -65,15 +65,15 @@ function ComTable() {
|
||||||
<Table.Column hide title="构建人" dataIndex="created_by_user"/>
|
<Table.Column hide title="构建人" dataIndex="created_by_user"/>
|
||||||
<Table.Column width={100} title="状态"
|
<Table.Column width={100} title="状态"
|
||||||
render={info => <Tag color={statusColorMap[info.status]}>{info.status_alias}</Tag>}/>
|
render={info => <Tag color={statusColorMap[info.status]}>{info.status_alias}</Tag>}/>
|
||||||
{hasPermission('config.env.edit|config.env.del') && (
|
{hasPermission('deploy.repository.detail|deploy.repository.build|deploy.repository.log') && (
|
||||||
<Table.Column width={180} title="操作" render={info => (
|
<Table.Column width={180} title="操作" render={info => (
|
||||||
<Action>
|
<Action>
|
||||||
<Action.Button auth="config.env.edit" onClick={() => store.showDetail(info)}>详情</Action.Button>
|
<Action.Button auth="deploy.repository.detail" onClick={() => store.showDetail(info)}>详情</Action.Button>
|
||||||
<Action.Button
|
<Action.Button
|
||||||
auth="config.env.del"
|
auth="deploy.repository.build"
|
||||||
loading={loading === info.id}
|
loading={loading === info.id}
|
||||||
onClick={() => handleRebuild(info)}>构建</Action.Button>
|
onClick={() => handleRebuild(info)}>构建</Action.Button>
|
||||||
<Action.Button auth="config.env.del" onClick={() => store.showConsole(info)}>日志</Action.Button>
|
<Action.Button auth="deploy.repository.log" onClick={() => store.showConsole(info)}>日志</Action.Button>
|
||||||
</Action>
|
</Action>
|
||||||
)}/>
|
)}/>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -22,7 +22,7 @@ export default observer(function () {
|
||||||
if (!appStore.records.length) appStore.fetchRecords()
|
if (!appStore.records.length) appStore.fetchRecords()
|
||||||
}, [])
|
}, [])
|
||||||
return (
|
return (
|
||||||
<AuthDiv auth="config.env.view">
|
<AuthDiv auth="deploy.repository.view">
|
||||||
<Breadcrumb>
|
<Breadcrumb>
|
||||||
<Breadcrumb.Item>首页</Breadcrumb.Item>
|
<Breadcrumb.Item>首页</Breadcrumb.Item>
|
||||||
<Breadcrumb.Item>应用发布</Breadcrumb.Item>
|
<Breadcrumb.Item>应用发布</Breadcrumb.Item>
|
||||||
|
|
|
@ -65,6 +65,15 @@ export default [{
|
||||||
{key: 'del', label: '删除应用'},
|
{key: 'del', label: '删除应用'},
|
||||||
{key: 'config', label: '查看配置'},
|
{key: 'config', label: '查看配置'},
|
||||||
]
|
]
|
||||||
|
}, {
|
||||||
|
key: 'repository',
|
||||||
|
label: '构建仓库',
|
||||||
|
perms: [
|
||||||
|
{key: 'view', label: '查看构建'},
|
||||||
|
{key: 'detail', label: '构建详情'},
|
||||||
|
{key: 'build', label: '构建仓库'},
|
||||||
|
{key: 'log', label: '构建日志'},
|
||||||
|
]
|
||||||
},{
|
},{
|
||||||
key: 'request',
|
key: 'request',
|
||||||
label: '发布申请',
|
label: '发布申请',
|
||||||
|
|
|
@ -59,7 +59,7 @@ export default [
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: <FlagOutlined/>, title: '应用发布', auth: 'deploy.app.view|deploy.request.view', child: [
|
icon: <FlagOutlined/>, title: '应用发布', auth: 'deploy.app.view|deploy.repository.view|deploy.request.view', child: [
|
||||||
{title: '应用管理', auth: 'deploy.app.view', path: '/deploy/app', component: DeployApp},
|
{title: '应用管理', auth: 'deploy.app.view', path: '/deploy/app', component: DeployApp},
|
||||||
{title: '构建仓库', auth: 'deploy.repository.view', path: '/deploy/repository', component: DeployRepository},
|
{title: '构建仓库', auth: 'deploy.repository.view', path: '/deploy/repository', component: DeployRepository},
|
||||||
{title: '发布申请', auth: 'deploy.request.view', path: '/deploy/request', component: DeployRequest},
|
{title: '发布申请', auth: 'deploy.request.view', path: '/deploy/request', component: DeployRequest},
|
||||||
|
|
Loading…
Reference in New Issue