Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
Nightingale
提交
964d50b4
N
Nightingale
项目概览
jobily
/
Nightingale
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
Nightingale
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
964d50b4
编写于
12月 10, 2021
作者:
U
Ulric Qin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add perm function in routers
上级
d2cb48a2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
86 addition
and
60 deletion
+86
-60
docker/initsql/a-n9e.sql
docker/initsql/a-n9e.sql
+30
-4
src/webapi/router/router.go
src/webapi/router/router.go
+56
-56
未找到文件。
docker/initsql/a-n9e.sql
浏览文件 @
964d50b4
...
@@ -78,25 +78,51 @@ CREATE TABLE `role_operation`(
...
@@ -78,25 +78,51 @@ CREATE TABLE `role_operation`(
-- Admin is special, who has no concrete operation but can do anything.
-- Admin is special, who has no concrete operation but can do anything.
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Guest'
,
'/metric/explorer'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Guest'
,
'/metric/explorer'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Guest'
,
'/object/explorer'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Guest'
,
'/object/explorer'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Guest'
,
'/dashboards'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Guest'
,
'/help/version'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Guest'
,
'/help/version'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Guest'
,
'/help/contact'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Guest'
,
'/help/contact'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/metric/explorer'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/metric/explorer'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/object/explorer'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/object/explorer'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/dashboards'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/help/version'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/help/contact'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/users'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/users'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/user-groups'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/user-groups'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/user-groups/add'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/user-groups/put'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/user-groups/del'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/busi-groups'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/busi-groups'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/busi-groups/add'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/busi-groups/put'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/busi-groups/del'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/targets'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/targets'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/targets/add'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/targets/put'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/targets/del'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/dashboards'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/dashboards/add'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/dashboards/put'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/dashboards/del'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-rules'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-rules'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-rules/add'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-rules/put'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-rules/del'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-mutes'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-mutes'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-mutes/add'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-mutes/del'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-subscribes'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-subscribes'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-subscribes/add'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-subscribes/put'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-subscribes/del'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-cur-events'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-cur-events'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-cur-events/del'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-his-events'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/alert-his-events'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/job-tpls'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/job-tpls'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/job-tpls/add'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/job-tpls/put'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/job-tpls/del'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/job-tasks'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/job-tasks'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/help/version'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/job-tasks/add'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/help/contact'
);
insert
into
`role_operation`
(
role_name
,
operation
)
values
(
'Standard'
,
'/job-tasks/put'
);
-- for alert_rule | collect_rule | mute | dashboard grouping
-- for alert_rule | collect_rule | mute | dashboard grouping
CREATE
TABLE
`busi_group`
(
CREATE
TABLE
`busi_group`
(
...
...
src/webapi/router/router.go
浏览文件 @
964d50b4
...
@@ -127,7 +127,7 @@ func configRoute(r *gin.Engine, version string) {
...
@@ -127,7 +127,7 @@ func configRoute(r *gin.Engine, version string) {
pages
.
PUT
(
"/self/profile"
,
jwtAuth
(),
user
(),
selfProfilePut
)
pages
.
PUT
(
"/self/profile"
,
jwtAuth
(),
user
(),
selfProfilePut
)
pages
.
PUT
(
"/self/password"
,
jwtAuth
(),
user
(),
selfPasswordPut
)
pages
.
PUT
(
"/self/password"
,
jwtAuth
(),
user
(),
selfPasswordPut
)
pages
.
GET
(
"/users"
,
jwtAuth
(),
user
(),
userGets
)
pages
.
GET
(
"/users"
,
jwtAuth
(),
user
(),
perm
(
"/users"
),
userGets
)
pages
.
POST
(
"/users"
,
jwtAuth
(),
admin
(),
userAddPost
)
pages
.
POST
(
"/users"
,
jwtAuth
(),
admin
(),
userAddPost
)
pages
.
GET
(
"/user/:id/profile"
,
jwtAuth
(),
userProfileGet
)
pages
.
GET
(
"/user/:id/profile"
,
jwtAuth
(),
userProfileGet
)
pages
.
PUT
(
"/user/:id/profile"
,
jwtAuth
(),
admin
(),
userProfilePut
)
pages
.
PUT
(
"/user/:id/profile"
,
jwtAuth
(),
admin
(),
userProfilePut
)
...
@@ -135,39 +135,39 @@ func configRoute(r *gin.Engine, version string) {
...
@@ -135,39 +135,39 @@ func configRoute(r *gin.Engine, version string) {
pages
.
DELETE
(
"/user/:id"
,
jwtAuth
(),
admin
(),
userDel
)
pages
.
DELETE
(
"/user/:id"
,
jwtAuth
(),
admin
(),
userDel
)
pages
.
GET
(
"/user-groups"
,
jwtAuth
(),
user
(),
userGroupGets
)
pages
.
GET
(
"/user-groups"
,
jwtAuth
(),
user
(),
userGroupGets
)
pages
.
POST
(
"/user-groups"
,
jwtAuth
(),
user
(),
perm
(
"/user-groups"
),
userGroupAdd
)
pages
.
POST
(
"/user-groups"
,
jwtAuth
(),
user
(),
perm
(
"/user-groups
/add
"
),
userGroupAdd
)
pages
.
GET
(
"/user-group/:id"
,
jwtAuth
(),
user
(),
userGroupGet
)
pages
.
GET
(
"/user-group/:id"
,
jwtAuth
(),
user
(),
userGroupGet
)
pages
.
PUT
(
"/user-group/:id"
,
jwtAuth
(),
user
(),
userGroupWrite
(),
userGroupPut
)
pages
.
PUT
(
"/user-group/:id"
,
jwtAuth
(),
user
(),
perm
(
"/user-groups/put"
),
userGroupWrite
(),
userGroupPut
)
pages
.
DELETE
(
"/user-group/:id"
,
jwtAuth
(),
user
(),
userGroupWrite
(),
userGroupDel
)
pages
.
DELETE
(
"/user-group/:id"
,
jwtAuth
(),
user
(),
perm
(
"/user-groups/del"
),
userGroupWrite
(),
userGroupDel
)
pages
.
POST
(
"/user-group/:id/members"
,
jwtAuth
(),
user
(),
userGroupWrite
(),
userGroupMemberAdd
)
pages
.
POST
(
"/user-group/:id/members"
,
jwtAuth
(),
user
(),
perm
(
"/user-groups/put"
),
userGroupWrite
(),
userGroupMemberAdd
)
pages
.
DELETE
(
"/user-group/:id/members"
,
jwtAuth
(),
user
(),
userGroupWrite
(),
userGroupMemberDel
)
pages
.
DELETE
(
"/user-group/:id/members"
,
jwtAuth
(),
user
(),
perm
(
"/user-groups/put"
),
userGroupWrite
(),
userGroupMemberDel
)
pages
.
GET
(
"/user-group/:id/perm/:perm"
,
jwtAuth
(),
user
(),
checkBusiGroupPerm
)
pages
.
GET
(
"/busi-groups"
,
jwtAuth
(),
user
(),
busiGroupGets
)
pages
.
GET
(
"/busi-groups"
,
jwtAuth
(),
user
(),
busiGroupGets
)
pages
.
POST
(
"/busi-groups"
,
jwtAuth
(),
user
(),
perm
(
"/busi-groups"
),
busiGroupAdd
)
pages
.
POST
(
"/busi-groups"
,
jwtAuth
(),
user
(),
perm
(
"/busi-groups
/add
"
),
busiGroupAdd
)
pages
.
GET
(
"/busi-groups/alertings"
,
jwtAuth
(),
busiGroupAlertingsGets
)
pages
.
GET
(
"/busi-groups/alertings"
,
jwtAuth
(),
busiGroupAlertingsGets
)
pages
.
GET
(
"/busi-group/:id"
,
jwtAuth
(),
user
(),
bgro
(),
busiGroupGet
)
pages
.
GET
(
"/busi-group/:id"
,
jwtAuth
(),
user
(),
bgro
(),
busiGroupGet
)
pages
.
PUT
(
"/busi-group/:id"
,
jwtAuth
(),
user
(),
bgrw
(),
busiGroupPut
)
pages
.
PUT
(
"/busi-group/:id"
,
jwtAuth
(),
user
(),
perm
(
"/busi-groups/put"
),
bgrw
(),
busiGroupPut
)
pages
.
POST
(
"/busi-group/:id/members"
,
jwtAuth
(),
user
(),
bgrw
(),
busiGroupMemberAdd
)
pages
.
POST
(
"/busi-group/:id/members"
,
jwtAuth
(),
user
(),
perm
(
"/busi-groups/put"
),
bgrw
(),
busiGroupMemberAdd
)
pages
.
DELETE
(
"/busi-group/:id/members"
,
jwtAuth
(),
user
(),
bgrw
(),
busiGroupMemberDel
)
pages
.
DELETE
(
"/busi-group/:id/members"
,
jwtAuth
(),
user
(),
perm
(
"/busi-groups/put"
),
bgrw
(),
busiGroupMemberDel
)
pages
.
DELETE
(
"/busi-group/:id"
,
jwtAuth
(),
user
(),
bgrw
(),
busiGroupDel
)
pages
.
DELETE
(
"/busi-group/:id"
,
jwtAuth
(),
user
(),
perm
(
"/busi-groups/del"
),
bgrw
(),
busiGroupDel
)
pages
.
GET
(
"/busi-group/:id/perm/:perm"
,
jwtAuth
(),
user
(),
checkBusiGroupPerm
)
pages
.
GET
(
"/targets"
,
jwtAuth
(),
user
(),
targetGets
)
pages
.
DELETE
(
"/targets"
,
jwtAuth
(),
user
(),
targetDel
)
pages
.
GET
(
"/targets"
,
jwtAuth
(),
user
(),
perm
(
"/targets"
),
targetGets
)
pages
.
GET
(
"/targets/tags"
,
jwtAuth
(),
user
(),
targetGetTags
)
pages
.
DELETE
(
"/targets"
,
jwtAuth
(),
user
(),
perm
(
"/targets/del"
),
targetDel
)
pages
.
POST
(
"/targets/tags"
,
jwtAuth
(),
user
(),
targetBindTags
)
pages
.
GET
(
"/targets/tags"
,
jwtAuth
(),
user
(),
perm
(
"/targets"
),
targetGetTags
)
pages
.
DELETE
(
"/targets/tags"
,
jwtAuth
(),
user
(),
targetUnbindTags
)
pages
.
POST
(
"/targets/tags"
,
jwtAuth
(),
user
(),
perm
(
"/targets/put"
),
targetBindTags
)
pages
.
PUT
(
"/targets/note"
,
jwtAuth
(),
user
(),
targetUpdateNote
)
pages
.
DELETE
(
"/targets/tags"
,
jwtAuth
(),
user
(),
perm
(
"/targets/put"
),
targetUnbindTags
)
pages
.
PUT
(
"/targets/bgid"
,
jwtAuth
(),
user
(),
targetUpdateBgid
)
pages
.
PUT
(
"/targets/note"
,
jwtAuth
(),
user
(),
perm
(
"/targets/put"
),
targetUpdateNote
)
pages
.
PUT
(
"/targets/bgid"
,
jwtAuth
(),
user
(),
perm
(
"/targets/put"
),
targetUpdateBgid
)
pages
.
GET
(
"/busi-group/:id/dashboards"
,
jwtAuth
(),
user
(),
bgro
(),
dashboardGets
)
pages
.
POST
(
"/busi-group/:id/dashboards"
,
jwtAuth
(),
user
(),
bgrw
(),
dashboardAdd
)
pages
.
GET
(
"/busi-group/:id/dashboards"
,
jwtAuth
(),
user
(),
perm
(
"/dashboards"
),
bgro
(),
dashboardGets
)
pages
.
POST
(
"/busi-group/:id/dashboards/export"
,
jwtAuth
(),
user
(),
bgro
(),
dashboardExport
)
pages
.
POST
(
"/busi-group/:id/dashboards"
,
jwtAuth
(),
user
(),
perm
(
"/dashboards/add"
),
bgrw
(),
dashboardAdd
)
pages
.
POST
(
"/busi-group/:id/dashboards/import"
,
jwtAuth
(),
user
(),
bgrw
(),
dashboardImport
)
pages
.
POST
(
"/busi-group/:id/dashboards/export"
,
jwtAuth
(),
user
(),
perm
(
"/dashboards"
),
bgro
(),
dashboardExport
)
pages
.
POST
(
"/busi-group/:id/dashboard/:did/clone"
,
jwtAuth
(),
user
(),
bgrw
(),
dashboardClone
)
pages
.
POST
(
"/busi-group/:id/dashboards/import"
,
jwtAuth
(),
user
(),
perm
(
"/dashboards/add"
),
bgrw
(),
dashboardImport
)
pages
.
GET
(
"/busi-group/:id/dashboard/:did"
,
jwtAuth
(),
user
(),
bgro
(),
dashboardGet
)
pages
.
POST
(
"/busi-group/:id/dashboard/:did/clone"
,
jwtAuth
(),
user
(),
perm
(
"/dashboards/add"
),
bgrw
(),
dashboardClone
)
pages
.
PUT
(
"/busi-group/:id/dashboard/:did"
,
jwtAuth
(),
user
(),
bgrw
(),
dashboardPut
)
pages
.
GET
(
"/busi-group/:id/dashboard/:did"
,
jwtAuth
(),
user
(),
perm
(
"/dashboards"
),
bgro
(),
dashboardGet
)
pages
.
DELETE
(
"/busi-group/:id/dashboard/:did"
,
jwtAuth
(),
user
(),
bgrw
(),
dashboardDel
)
pages
.
PUT
(
"/busi-group/:id/dashboard/:did"
,
jwtAuth
(),
user
(),
perm
(
"/dashboards/put"
),
bgrw
(),
dashboardPut
)
pages
.
DELETE
(
"/busi-group/:id/dashboard/:did"
,
jwtAuth
(),
user
(),
perm
(
"/dashboards/del"
),
bgrw
(),
dashboardDel
)
pages
.
GET
(
"/busi-group/:id/chart-groups"
,
jwtAuth
(),
user
(),
bgro
(),
chartGroupGets
)
pages
.
GET
(
"/busi-group/:id/chart-groups"
,
jwtAuth
(),
user
(),
bgro
(),
chartGroupGets
)
pages
.
POST
(
"/busi-group/:id/chart-groups"
,
jwtAuth
(),
user
(),
bgrw
(),
chartGroupAdd
)
pages
.
POST
(
"/busi-group/:id/chart-groups"
,
jwtAuth
(),
user
(),
bgrw
(),
chartGroupAdd
)
...
@@ -182,22 +182,22 @@ func configRoute(r *gin.Engine, version string) {
...
@@ -182,22 +182,22 @@ func configRoute(r *gin.Engine, version string) {
pages
.
GET
(
"/share-charts"
,
chartShareGets
)
pages
.
GET
(
"/share-charts"
,
chartShareGets
)
pages
.
POST
(
"/share-charts"
,
jwtAuth
(),
chartShareAdd
)
pages
.
POST
(
"/share-charts"
,
jwtAuth
(),
chartShareAdd
)
pages
.
GET
(
"/busi-group/:id/alert-rules"
,
jwtAuth
(),
user
(),
alertRuleGets
)
pages
.
GET
(
"/busi-group/:id/alert-rules"
,
jwtAuth
(),
user
(),
perm
(
"/alert-rules"
),
alertRuleGets
)
pages
.
POST
(
"/busi-group/:id/alert-rules"
,
jwtAuth
(),
user
(),
bgrw
(),
alertRuleAdd
)
pages
.
POST
(
"/busi-group/:id/alert-rules"
,
jwtAuth
(),
user
(),
perm
(
"/alert-rules/add"
),
bgrw
(),
alertRuleAdd
)
pages
.
DELETE
(
"/busi-group/:id/alert-rules"
,
jwtAuth
(),
user
(),
bgrw
(),
alertRuleDel
)
pages
.
DELETE
(
"/busi-group/:id/alert-rules"
,
jwtAuth
(),
user
(),
perm
(
"/alert-rules/del"
),
bgrw
(),
alertRuleDel
)
pages
.
PUT
(
"/busi-group/:id/alert-rules/fields"
,
jwtAuth
(),
user
(),
bgrw
(),
alertRulePutFields
)
pages
.
PUT
(
"/busi-group/:id/alert-rules/fields"
,
jwtAuth
(),
user
(),
perm
(
"/alert-rules/put"
),
bgrw
(),
alertRulePutFields
)
pages
.
PUT
(
"/busi-group/:id/alert-rule/:arid"
,
jwtAuth
(),
user
(),
bgrw
(),
alertRulePut
)
pages
.
PUT
(
"/busi-group/:id/alert-rule/:arid"
,
jwtAuth
(),
user
(),
perm
(
"/alert-rules/put"
),
bgrw
(),
alertRulePut
)
pages
.
GET
(
"/alert-rule/:arid"
,
jwtAuth
(),
user
(),
alertRuleGet
)
pages
.
GET
(
"/alert-rule/:arid"
,
jwtAuth
(),
user
(),
perm
(
"/alert-rules"
),
alertRuleGet
)
pages
.
GET
(
"/busi-group/:id/alert-mutes"
,
jwtAuth
(),
user
(),
bgro
(),
alertMuteGets
)
pages
.
GET
(
"/busi-group/:id/alert-mutes"
,
jwtAuth
(),
user
(),
perm
(
"/alert-mutes"
),
bgro
(),
alertMuteGets
)
pages
.
POST
(
"/busi-group/:id/alert-mutes"
,
jwtAuth
(),
user
(),
bgrw
(),
alertMuteAdd
)
pages
.
POST
(
"/busi-group/:id/alert-mutes"
,
jwtAuth
(),
user
(),
perm
(
"/alert-mutes/add"
),
bgrw
(),
alertMuteAdd
)
pages
.
DELETE
(
"/busi-group/:id/alert-mutes"
,
jwtAuth
(),
user
(),
bgrw
(),
alertMuteDel
)
pages
.
DELETE
(
"/busi-group/:id/alert-mutes"
,
jwtAuth
(),
user
(),
perm
(
"/alert-mutes/del"
),
bgrw
(),
alertMuteDel
)
pages
.
GET
(
"/busi-group/:id/alert-subscribes"
,
jwtAuth
(),
user
(),
bgro
(),
alertSubscribeGets
)
pages
.
GET
(
"/busi-group/:id/alert-subscribes"
,
jwtAuth
(),
user
(),
perm
(
"/alert-subscribes"
),
bgro
(),
alertSubscribeGets
)
pages
.
GET
(
"/alert-subscribe/:sid"
,
jwtAuth
(),
user
(),
alertSubscribeGet
)
pages
.
GET
(
"/alert-subscribe/:sid"
,
jwtAuth
(),
user
(),
perm
(
"/alert-subscribes"
),
alertSubscribeGet
)
pages
.
POST
(
"/busi-group/:id/alert-subscribes"
,
jwtAuth
(),
user
(),
bgrw
(),
alertSubscribeAdd
)
pages
.
POST
(
"/busi-group/:id/alert-subscribes"
,
jwtAuth
(),
user
(),
perm
(
"/alert-subscribes/add"
),
bgrw
(),
alertSubscribeAdd
)
pages
.
PUT
(
"/busi-group/:id/alert-subscribes"
,
jwtAuth
(),
user
(),
bgrw
(),
alertSubscribePut
)
pages
.
PUT
(
"/busi-group/:id/alert-subscribes"
,
jwtAuth
(),
user
(),
perm
(
"/alert-subscribes/put"
),
bgrw
(),
alertSubscribePut
)
pages
.
DELETE
(
"/busi-group/:id/alert-subscribes"
,
jwtAuth
(),
user
(),
bgrw
(),
alertSubscribeDel
)
pages
.
DELETE
(
"/busi-group/:id/alert-subscribes"
,
jwtAuth
(),
user
(),
perm
(
"/alert-subscribes/del"
),
bgrw
(),
alertSubscribeDel
)
// pages.GET("/busi-group/:id/collect-rules", jwtAuth(), user(), bgro(), collectRuleGets)
// pages.GET("/busi-group/:id/collect-rules", jwtAuth(), user(), bgro(), collectRuleGets)
// pages.POST("/busi-group/:id/collect-rules", jwtAuth(), user(), bgrw(), collectRuleAdd)
// pages.POST("/busi-group/:id/collect-rules", jwtAuth(), user(), bgrw(), collectRuleAdd)
...
@@ -207,7 +207,7 @@ func configRoute(r *gin.Engine, version string) {
...
@@ -207,7 +207,7 @@ func configRoute(r *gin.Engine, version string) {
pages
.
GET
(
"/busi-group/:id/alert-his-events"
,
jwtAuth
(),
user
(),
bgro
(),
alertHisEventGets
)
pages
.
GET
(
"/busi-group/:id/alert-his-events"
,
jwtAuth
(),
user
(),
bgro
(),
alertHisEventGets
)
pages
.
GET
(
"/busi-group/:id/alert-cur-events"
,
jwtAuth
(),
user
(),
bgro
(),
alertCurEventGets
)
pages
.
GET
(
"/busi-group/:id/alert-cur-events"
,
jwtAuth
(),
user
(),
bgro
(),
alertCurEventGets
)
pages
.
DELETE
(
"/busi-group/:id/alert-cur-events"
,
jwtAuth
(),
user
(),
bgrw
(),
alertCurEventDel
)
pages
.
DELETE
(
"/busi-group/:id/alert-cur-events"
,
jwtAuth
(),
user
(),
perm
(
"/alert-cur-events/del"
),
bgrw
(),
alertCurEventDel
)
if
config
.
C
.
AnonymousAccess
.
AlertDetail
{
if
config
.
C
.
AnonymousAccess
.
AlertDetail
{
pages
.
GET
(
"/alert-cur-event/:eid"
,
alertCurEventGet
)
pages
.
GET
(
"/alert-cur-event/:eid"
,
alertCurEventGet
)
...
@@ -217,18 +217,18 @@ func configRoute(r *gin.Engine, version string) {
...
@@ -217,18 +217,18 @@ func configRoute(r *gin.Engine, version string) {
pages
.
GET
(
"/alert-his-event/:eid"
,
jwtAuth
(),
alertHisEventGet
)
pages
.
GET
(
"/alert-his-event/:eid"
,
jwtAuth
(),
alertHisEventGet
)
}
}
pages
.
GET
(
"/busi-group/:id/task-tpls"
,
jwtAuth
(),
user
(),
bgro
(),
taskTplGets
)
pages
.
GET
(
"/busi-group/:id/task-tpls"
,
jwtAuth
(),
user
(),
perm
(
"/job-tpls"
),
bgro
(),
taskTplGets
)
pages
.
POST
(
"/busi-group/:id/task-tpls"
,
jwtAuth
(),
user
(),
bgrw
(),
taskTplAdd
)
pages
.
POST
(
"/busi-group/:id/task-tpls"
,
jwtAuth
(),
user
(),
perm
(
"/job-tpls/add"
),
bgrw
(),
taskTplAdd
)
pages
.
DELETE
(
"/busi-group/:id/task-tpl/:tid"
,
jwtAuth
(),
user
(),
bgrw
(),
taskTplDel
)
pages
.
DELETE
(
"/busi-group/:id/task-tpl/:tid"
,
jwtAuth
(),
user
(),
perm
(
"/job-tpls/del"
),
bgrw
(),
taskTplDel
)
pages
.
POST
(
"/busi-group/:id/task-tpls/tags"
,
jwtAuth
(),
user
(),
bgrw
(),
taskTplBindTags
)
pages
.
POST
(
"/busi-group/:id/task-tpls/tags"
,
jwtAuth
(),
user
(),
perm
(
"/job-tpls/put"
),
bgrw
(),
taskTplBindTags
)
pages
.
DELETE
(
"/busi-group/:id/task-tpls/tags"
,
jwtAuth
(),
user
(),
bgrw
(),
taskTplUnbindTags
)
pages
.
DELETE
(
"/busi-group/:id/task-tpls/tags"
,
jwtAuth
(),
user
(),
perm
(
"/job-tpls/put"
),
bgrw
(),
taskTplUnbindTags
)
pages
.
GET
(
"/busi-group/:id/task-tpl/:tid"
,
jwtAuth
(),
user
(),
bgro
(),
taskTplGet
)
pages
.
GET
(
"/busi-group/:id/task-tpl/:tid"
,
jwtAuth
(),
user
(),
perm
(
"/job-tpls"
),
bgro
(),
taskTplGet
)
pages
.
PUT
(
"/busi-group/:id/task-tpl/:tid"
,
jwtAuth
(),
user
(),
bgrw
(),
taskTplPut
)
pages
.
PUT
(
"/busi-group/:id/task-tpl/:tid"
,
jwtAuth
(),
user
(),
perm
(
"/job-tpls/put"
),
bgrw
(),
taskTplPut
)
pages
.
GET
(
"/busi-group/:id/tasks"
,
jwtAuth
(),
user
(),
bgro
(),
taskGets
)
pages
.
GET
(
"/busi-group/:id/tasks"
,
jwtAuth
(),
user
(),
perm
(
"/job-tasks"
),
bgro
(),
taskGets
)
pages
.
POST
(
"/busi-group/:id/tasks"
,
jwtAuth
(),
user
(),
bgrw
(),
taskAdd
)
pages
.
POST
(
"/busi-group/:id/tasks"
,
jwtAuth
(),
user
(),
perm
(
"/job-tasks/add"
),
bgrw
(),
taskAdd
)
pages
.
GET
(
"/busi-group/:id/task/*url"
,
jwtAuth
(),
user
(),
bgro
(),
taskProxy
)
pages
.
GET
(
"/busi-group/:id/task/*url"
,
jwtAuth
(),
user
(),
perm
(
"/job-tasks"
),
bgro
(),
taskProxy
)
pages
.
PUT
(
"/busi-group/:id/task/*url"
,
jwtAuth
(),
user
(),
bgrw
(),
taskProxy
)
pages
.
PUT
(
"/busi-group/:id/task/*url"
,
jwtAuth
(),
user
(),
perm
(
"/job-tasks/put"
),
bgrw
(),
taskProxy
)
}
}
service
:=
r
.
Group
(
"/v1/n9e"
,
gin
.
BasicAuth
(
config
.
C
.
BasicAuth
))
service
:=
r
.
Group
(
"/v1/n9e"
,
gin
.
BasicAuth
(
config
.
C
.
BasicAuth
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录