🐛 fix(alertData): 旧数据保留尾部而不是头部
This commit is contained in:
		
							parent
							
								
									feb9e8d2d6
								
							
						
					
					
						commit
						b03d330073
					
				@ -150,8 +150,8 @@ func checkStatus() {
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			// 清理旧数据
 | 
								// 清理旧数据
 | 
				
			||||||
			if max > 0 && max <= len(alertsStore[alerts[j].ID][server.ID]) {
 | 
								if max > 0 && max < len(alertsStore[alerts[j].ID][server.ID]) {
 | 
				
			||||||
				alertsStore[alerts[j].ID][server.ID] = alertsStore[alerts[j].ID][server.ID][max:]
 | 
									alertsStore[alerts[j].ID][server.ID] = alertsStore[alerts[j].ID][server.ID][len(alertsStore[alerts[j].ID][server.ID])-max:]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user