diff options
author | zeripath <art27@cantab.net> | 2020-07-05 20:38:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-05 22:38:03 +0300 |
commit | 217647f33170d469ed392e3284cc1149047c1b74 (patch) | |
tree | 44b06b44d2872b90f873eb3ac7cca6e8e0e6494c /routers | |
parent | 0d03fbf2ca4d1110c913647cb6906a7d51e46db8 (diff) | |
download | gitea-217647f33170d469ed392e3284cc1149047c1b74.tar.gz gitea-217647f33170d469ed392e3284cc1149047c1b74.zip |
Multiple small admin dashboard fixes (#12153)
* Remove spurious spacing between Maintenance Operations and its table on dashboard
* Prevent (EXTRA string) comments in Task headers
* Redirect tasks started from monitor page back to monitor
* Fix #12107 - redirects from process cancel should use AppSubUrl
* When wrapping queues set the name correctly
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/admin/admin.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go index 7595f4929d..e48e416258 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -153,8 +153,11 @@ func DashboardPost(ctx *context.Context, form auth.AdminDashboardForm) { ctx.Flash.Error(ctx.Tr("admin.dashboard.task.unknown", form.Op)) } } - - ctx.Redirect(setting.AppSubURL + "/admin") + if form.From == "monitor" { + ctx.Redirect(setting.AppSubURL + "/admin/monitor") + } else { + ctx.Redirect(setting.AppSubURL + "/admin") + } } // SendTestMail send test mail to confirm mail service is OK @@ -331,7 +334,7 @@ func MonitorCancel(ctx *context.Context) { pid := ctx.ParamsInt64("pid") process.GetManager().Cancel(pid) ctx.JSON(200, map[string]interface{}{ - "redirect": ctx.Repo.RepoLink + "/admin/monitor", + "redirect": setting.AppSubURL + "/admin/monitor", }) } |