mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 09:38:13 -05:00
fix init
This commit is contained in:
parent
1824fb86cd
commit
41d68e5051
@ -64,6 +64,9 @@ func (r *AlertRule) Enabled() bool {
|
|||||||
// Snapshot 对传入的Server进行该报警规则下所有type的检查 返回每项检查结果
|
// Snapshot 对传入的Server进行该报警规则下所有type的检查 返回每项检查结果
|
||||||
func (r *AlertRule) Snapshot(cycleTransferStats *CycleTransferStats, server *Server, db *gorm.DB, role uint8) []bool {
|
func (r *AlertRule) Snapshot(cycleTransferStats *CycleTransferStats, server *Server, db *gorm.DB, role uint8) []bool {
|
||||||
point := make([]bool, len(r.Rules))
|
point := make([]bool, len(r.Rules))
|
||||||
|
for i := range point {
|
||||||
|
point[i] = true
|
||||||
|
}
|
||||||
|
|
||||||
if r.UserID != server.UserID && role != RoleAdmin {
|
if r.UserID != server.UserID && role != RoleAdmin {
|
||||||
return point
|
return point
|
||||||
|
Loading…
Reference in New Issue
Block a user