🔊 v0.3.0 计划任务(定期备份等场景)

This commit is contained in:
naiba
2021-01-19 09:59:04 +08:00
parent f20a501ab4
commit d7a3ba607b
24 changed files with 417 additions and 38 deletions

View File

@@ -24,6 +24,7 @@ func (mp *memberPage) serve() {
}))
mr.GET("/server", mp.server)
mr.GET("/monitor", mp.monitor)
mr.GET("/cron", mp.cron)
mr.GET("/notification", mp.notification)
mr.GET("/setting", mp.setting)
}
@@ -46,6 +47,15 @@ func (mp *memberPage) monitor(c *gin.Context) {
}))
}
func (mp *memberPage) cron(c *gin.Context) {
var crons []model.Cron
dao.DB.Find(&crons)
c.HTML(http.StatusOK, "dashboard/cron", mygin.CommonEnvironment(c, gin.H{
"Title": "计划任务",
"Crons": crons,
}))
}
func (mp *memberPage) notification(c *gin.Context) {
var nf []model.Notification
dao.DB.Find(&nf)