diff --git a/backend/app/api/v1/monitor.go b/backend/app/api/v1/monitor.go index 72351f1c5..0f7a6e767 100644 --- a/backend/app/api/v1/monitor.go +++ b/backend/app/api/v1/monitor.go @@ -95,15 +95,15 @@ func (b *BaseApi) LoadMonitor(c *gin.Context) { // @Router /hosts/monitor/clean [post] // @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"清空监控数据","formatEN":"clean monitor datas"} func (b *BaseApi) CleanMonitor(c *gin.Context) { - if err := global.DB.Exec("DELETE FROM monitor_bases").Error; err != nil { + if err := global.MonitorDB.Exec("DELETE FROM monitor_bases").Error; err != nil { helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) return } - if err := global.DB.Exec("DELETE FROM monitor_ios").Error; err != nil { + if err := global.MonitorDB.Exec("DELETE FROM monitor_ios").Error; err != nil { helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) return } - if err := global.DB.Exec("DELETE FROM monitor_networks").Error; err != nil { + if err := global.MonitorDB.Exec("DELETE FROM monitor_networks").Error; err != nil { helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) return } diff --git a/frontend/src/views/setting/panel/hidemenu/index.vue b/frontend/src/views/setting/panel/hidemenu/index.vue index da48d8b7d..d8bce5a8a 100644 --- a/frontend/src/views/setting/panel/hidemenu/index.vue +++ b/frontend/src/views/setting/panel/hidemenu/index.vue @@ -39,9 +39,9 @@