From 008c369a9b1aced26b74b32e6c85541d00fd0511 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Thu, 26 Dec 2024 10:18:47 +0800 Subject: [PATCH] feat(task): fix Issue Where Task Logs Continue Periodic Requests After Being Opened (#7567) --- core/constant/common.go | 9 +++++---- frontend/src/api/modules/log.ts | 2 +- frontend/src/components/log-file/index.vue | 23 ++++++++++------------ frontend/src/components/task-log/index.vue | 5 +++++ 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/core/constant/common.go b/core/constant/common.go index 19154d166..31994d0ad 100644 --- a/core/constant/common.go +++ b/core/constant/common.go @@ -45,7 +45,7 @@ var WebUrlMap = map[string]struct{}{ "/apps/all": {}, "/apps/installed": {}, "/apps/upgrade": {}, - "apps/setting": {}, + "/apps/setting": {}, "/containers": {}, "/containers/container": {}, @@ -56,7 +56,7 @@ var WebUrlMap = map[string]struct{}{ "/containers/compose": {}, "/containers/template": {}, "/containers/setting": {}, - "containers/dashboard": {}, + "/containers/dashboard": {}, "/cronjobs": {}, @@ -88,6 +88,7 @@ var WebUrlMap = map[string]struct{}{ "/logs/website": {}, "/logs/system": {}, "/logs/ssh": {}, + "/logs/task": {}, "/settings": {}, "/settings/panel": {}, @@ -134,8 +135,8 @@ var WebUrlMap = map[string]struct{}{ "/xpack/alert/log": {}, "/xpack/alert/setting": {}, "/xpack/setting": {}, - "xpack/node": {}, - "xpack/waf/stat": {}, + "/xpack/node": {}, + "/xpack/waf/stat": {}, } var DynamicRoutes = []string{ diff --git a/frontend/src/api/modules/log.ts b/frontend/src/api/modules/log.ts index 5ba843a69..cd7808097 100644 --- a/frontend/src/api/modules/log.ts +++ b/frontend/src/api/modules/log.ts @@ -26,5 +26,5 @@ export const searchTasks = (req: Log.SearchTaskReq) => { }; export const countExecutingTask = () => { - return http.get(`/tasks/executing/count`); + return http.get(`/logs/tasks/executing/count`); }; diff --git a/frontend/src/components/log-file/index.vue b/frontend/src/components/log-file/index.vue index 45e13ea65..e4b3254e0 100644 --- a/frontend/src/components/log-file/index.vue +++ b/frontend/src/components/log-file/index.vue @@ -1,5 +1,5 @@