diff --git a/agent/app/api/v2/host_tool.go b/agent/app/api/v2/host_tool.go
index ec181051d443..24f977ef23e0 100644
--- a/agent/app/api/v2/host_tool.go
+++ b/agent/app/api/v2/host_tool.go
@@ -95,28 +95,6 @@ func (b *BaseApi) OperateToolConfig(c *gin.Context) {
helper.SuccessWithData(c, config)
}
-// @Tags Host tool
-// @Summary Get tool logs
-// @Accept json
-// @Param request body request.HostToolLogReq true "request"
-// @Success 200 {string} logContent
-// @Security ApiKeyAuth
-// @Security Timestamp
-// @Router /hosts/tool/log [post]
-func (b *BaseApi) GetToolLog(c *gin.Context) {
- var req request.HostToolLogReq
- if err := helper.CheckBindAndValidate(&req, c); err != nil {
- return
- }
-
- logContent, err := hostToolService.GetToolLog(req)
- if err != nil {
- helper.InternalServer(c, err)
- return
- }
- helper.SuccessWithData(c, logContent)
-}
-
// @Tags Host tool
// @Summary Create Supervisor process
// @Accept json
diff --git a/agent/app/service/file.go b/agent/app/service/file.go
index 06f40fd55c9c..be22cba27b81 100644
--- a/agent/app/service/file.go
+++ b/agent/app/service/file.go
@@ -8,6 +8,7 @@ import (
"github.com/1Panel-dev/1Panel/agent/app/task"
"github.com/1Panel-dev/1Panel/agent/i18n"
"github.com/1Panel-dev/1Panel/agent/utils/convert"
+ "github.com/1Panel-dev/1Panel/agent/utils/ini_conf"
"io"
"io/fs"
"os"
@@ -566,6 +567,13 @@ func (f *FileService) ReadLogByLine(req request.FileReadByLineReq) (*response.Fi
return nil, err
}
logFilePath = php.GetSlowLogPath()
+ case constant.Supervisord:
+ configPath := "/etc/supervisord.conf"
+ pathSet, _ := settingRepo.Get(settingRepo.WithByKey(constant.SupervisorConfigPath))
+ if pathSet.ID != 0 || pathSet.Value != "" {
+ configPath = pathSet.Value
+ }
+ logFilePath, _ = ini_conf.GetIniValue(configPath, "supervisord", "logfile")
}
file, err := os.Open(logFilePath)
diff --git a/agent/app/service/host_tool.go b/agent/app/service/host_tool.go
index 6609e3581f85..f45a5d46611c 100644
--- a/agent/app/service/host_tool.go
+++ b/agent/app/service/host_tool.go
@@ -261,25 +261,6 @@ func (h *HostToolService) OperateToolConfig(req request.HostToolConfig) (*respon
return res, nil
}
-func (h *HostToolService) GetToolLog(req request.HostToolLogReq) (string, error) {
- fileOp := files.NewFileOp()
- logfilePath := ""
- switch req.Type {
- case constant.Supervisord:
- configPath := "/etc/supervisord.conf"
- pathSet, _ := settingRepo.Get(settingRepo.WithByKey(constant.SupervisorConfigPath))
- if pathSet.ID != 0 || pathSet.Value != "" {
- configPath = pathSet.Value
- }
- logfilePath, _ = ini_conf.GetIniValue(configPath, "supervisord", "logfile")
- }
- oldContent, err := fileOp.GetContent(logfilePath)
- if err != nil {
- return "", err
- }
- return string(oldContent), nil
-}
-
func (h *HostToolService) OperateSupervisorProcess(req request.SupervisorProcessConfig) error {
var (
supervisordDir = path.Join(global.Dir.DataDir, "tools", "supervisord")
diff --git a/agent/router/ro_host.go b/agent/router/ro_host.go
index 58efc6df99cc..7a5a845c23a0 100644
--- a/agent/router/ro_host.go
+++ b/agent/router/ro_host.go
@@ -47,7 +47,6 @@ func (s *HostRouter) InitRouter(Router *gin.RouterGroup) {
hostRouter.POST("/tool/init", baseApi.InitToolConfig)
hostRouter.POST("/tool/operate", baseApi.OperateTool)
hostRouter.POST("/tool/config", baseApi.OperateToolConfig)
- hostRouter.POST("/tool/log", baseApi.GetToolLog)
hostRouter.POST("/tool/supervisor/process", baseApi.OperateProcess)
hostRouter.GET("/tool/supervisor/process", baseApi.GetProcess)
hostRouter.POST("/tool/supervisor/process/file", baseApi.GetProcessFile)
diff --git a/frontend/package.json b/frontend/package.json
index 2cbc391cc690..cc81e36be6cf 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -27,7 +27,6 @@
"@codemirror/legacy-modes": "^6.5.1",
"@codemirror/theme-one-dark": "^6.1.3",
"@element-plus/icons-vue": "^1.1.4",
- "@highlightjs/vue-plugin": "^2.1.0",
"@vue-office/docx": "^1.6.2",
"@vue-office/excel": "^1.7.8",
"@vueuse/core": "^8.9.4",
diff --git a/frontend/src/components/log/hightlight-log/index.vue b/frontend/src/components/log/hightlight-log/index.vue
deleted file mode 100644
index 98d77124f5db..000000000000
--- a/frontend/src/components/log/hightlight-log/index.vue
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index bfdee20f5979..017f3bba6893 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -6,8 +6,6 @@ import '@/styles/common.scss';
import '@/assets/iconfont/iconfont.css';
import '@/assets/iconfont/iconfont.js';
import '@/styles/style.css';
-import 'highlight.js/styles/atom-one-dark.css';
-import 'highlight.js/lib/common';
const styleModule = import.meta.glob('xpack/styles/index.scss');
for (const path in styleModule) {
@@ -23,12 +21,10 @@ import Components from '@/components';
import ElementPlus from 'element-plus';
import Fit2CloudPlus from 'fit2cloud-ui-plus';
import * as Icons from '@element-plus/icons-vue';
-import hljsVuePlugin from '@highlightjs/vue-plugin';
import directives from '@/directives/index';
const app = createApp(App);
-app.use(hljsVuePlugin);
app.component('SvgIcon', SvgIcon);
app.use(ElementPlus);
app.use(Fit2CloudPlus, { locale: i18n.global.messages.value[localStorage.getItem('lang') || 'zh'] });
diff --git a/frontend/src/views/toolbox/supervisor/config/index.vue b/frontend/src/views/toolbox/supervisor/config/index.vue
index 4f073080cb97..7de801af7fe8 100644
--- a/frontend/src/views/toolbox/supervisor/config/index.vue
+++ b/frontend/src/views/toolbox/supervisor/config/index.vue
@@ -13,7 +13,12 @@
-
+
+
+
@@ -22,7 +27,7 @@