update
This commit is contained in:
1 parent
0690285147
commit
5618cd2738
154 files changed
+5021
-3161
No files matched your search
@@ -359,7 +359,7 @@ func (h *DashboardHandler) GetRecentReleases(c *gin.Context) {
|
||||
// @Success 200 {object} model.Response{data=[]model.MetricData}
|
||||
// @Router /dashboard/metrics [get]
|
||||
func (h *DashboardHandler) GetMetrics(c *gin.Context) {
|
||||
hours := 6 // 默认6小时,减少扫描行数
|
||||
hours := 6 // 默认6小时,减少扫描行数
|
||||
if hv := c.Query("hours"); hv != "" {
|
||||
if parsed, err := strconv.Atoi(hv); err == nil && parsed > 0 && parsed <= 168 {
|
||||
hours = parsed
|
||||
|
||||
Reference in new issue
Block a user