Ver código fonte

更新心跳权限

maxiaoshan 3 anos atrás
pai
commit
3b66d237c5
2 arquivos alterados com 1 adições e 6 exclusões
  1. 0 5
      src/front/spider.go
  2. 1 1
      src/web/templates/head.html

+ 0 - 5
src/front/spider.go

@@ -1273,11 +1273,6 @@ func (f *Front) LuaList() {
 
 //心跳监控
 func (f *Front) Heart() {
-	auth := qu.IntAll(f.GetSession("auth"))
-	if auth != role_admin {
-		f.ServeJson("没有权限!")
-		return
-	}
 	if f.Method() == "POST" {
 		event, _ := f.GetInteger("event")
 		start, _ := f.GetInteger("start")

+ 1 - 1
src/web/templates/head.html

@@ -559,7 +559,6 @@
       <li data="index_pcdr"><a href="/center/importdata"><i class="glyphicon glyphicon-import"></i> <span>爬虫导入</span></a></li>
       <li data="index_site"><a href="/center/site/sitelist"><i class="glyphicon glyphicon-home"></i> <span>站点列表</span></a></li>
       <li data="index_pcqy"><a href="/center/luamove"><i class="glyphicon glyphicon-move"></i> <span>爬虫迁移管理</span></a></li>
-      <li data="index_heart"><a href="/center/heart"><i class="fa fa-heartbeat"></i> <span>心跳监控</span></a></li>
 		{{else if eq (session "auth") 2}}
 			<li data="index"><a href="/center"><i class="glyphicon glyphicon-eye-open"></i> <span>爬虫审核</span></a></li>
 			<li data="index_rwsh"><a href="/center/task/audit"><i class="glyphicon glyphicon glyphicon-tasks"></i> <span>任务审核</span></a></li>
@@ -567,6 +566,7 @@
 			<li data="index"><a href="/center"><i class="glyphicon glyphicon-eye-open"></i> <span>爬虫列表</span></a></li>
 			<li data="index_rwlb"><a href="/center/mytask"><i class="glyphicon glyphicon-tasks"></i> <span>任务列表</span></a></li>
 		{{end}}
+     <li data="index_heart"><a href="/center/heart"><i class="fa fa-heartbeat"></i> <span>心跳监控</span></a></li>
     <li data="index_errlua"><a href="/center/errorLua"><i class="fa fa-warning"></i> <span>错误爬虫管理</span></a></li>
     <li data="index_errdata"><a href="/center/errorData"><i class="glyphicon glyphicon-exclamation-sign"></i> <span>错误信息管理</span></a></li>
 		<li data="index_wtgl"><a href="/center/managerQues"><i class="glyphicon glyphicon-question-sign"></i> <span>问题管理</span></a></li>