From 04f1722cceac48a82462207ee79d0bf1cdd86a7b Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Wed, 9 Apr 2025 18:27:56 +0800 Subject: [PATCH] feat(monitor): add websites list display for monitor (#8361) --- core/init/router/router.go | 3 --- frontend/.env | 13 ------------- frontend/.env.development | 9 --------- frontend/.env.production | 9 --------- frontend/src/lang/modules/en.ts | 1 + frontend/src/lang/modules/ja.ts | 1 + frontend/src/lang/modules/ko.ts | 1 + frontend/src/lang/modules/ms.ts | 1 + frontend/src/lang/modules/pt-br.ts | 1 + frontend/src/lang/modules/ru.ts | 1 + frontend/src/lang/modules/zh-Hant.ts | 1 + frontend/src/lang/modules/zh.ts | 1 + 12 files changed, 8 insertions(+), 34 deletions(-) diff --git a/core/init/router/router.go b/core/init/router/router.go index 1426d396f..1c9bc1666 100644 --- a/core/init/router/router.go +++ b/core/init/router/router.go @@ -27,9 +27,6 @@ func setWebStatic(rootRouter *gin.RouterGroup) { rootRouter.StaticFS("/public", http.FS(web.Favicon)) rootRouter.StaticFS("/favicon.ico", http.FS(web.Favicon)) rootRouter.Static("/api/v2/images", path.Join(global.CONF.Base.InstallDir, "1panel/uploads/theme")) - rootRouter.Use(func(c *gin.Context) { - c.Next() - }) rootRouter.GET("/assets/*filepath", func(c *gin.Context) { c.Writer.Header().Set("Cache-Control", fmt.Sprintf("private, max-age=%d", 3600)) staticServer := http.FileServer(http.FS(web.Assets)) diff --git a/frontend/.env b/frontend/.env index ade102399..8e79839fe 100644 --- a/frontend/.env +++ b/frontend/.env @@ -1,20 +1,7 @@ -# title VITE_GLOB_APP_TITLE = '1Panel' - -# port VITE_PORT = 4004 - -# open 运行 npm run dev 时自动打开浏览器 VITE_OPEN = false - -# 是否生成包预览文件 VITE_REPORT = false - -# 是否开启gzip压缩 VITE_BUILD_GZIP = false - -# 是否删除生产环境 console VITE_DROP_CONSOLE = true - - PANEL_XPACK = false \ No newline at end of file diff --git a/frontend/.env.development b/frontend/.env.development index 50cf7bfce..fe459a35d 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -1,15 +1,6 @@ -# 本地环境 NODE_ENV = 'development' - -# 本地环境接口地址 VITE_API_URL = '/api/v2' - -# 是否生成包预览文件 VITE_REPORT = false - -# 是否开启gzip压缩 VITE_BUILD_GZIP = false - VITE_DROP_CONSOLE = true - PANEL_XPACK = true \ No newline at end of file diff --git a/frontend/.env.production b/frontend/.env.production index 415e22c7f..2bfdfd788 100644 --- a/frontend/.env.production +++ b/frontend/.env.production @@ -1,15 +1,6 @@ -# 线上环境 NODE_ENV = "production" - -# 线上环境接口地址 VITE_API_URL = '/api/v2' - -# 是否生成包预览文件 VITE_REPORT = true - -# 是否开启gzip压缩 VITE_BUILD_GZIP = false - VITE_DROP_CONSOLE = true - PANEL_XPACK = true diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 009162993..7ebc42561 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -3100,6 +3100,7 @@ const message = { logSaveSize: 'Maximum Log Save Size', logSaveSizeHelper: 'This is the log save size for a single website', '360se': '360 Security Browser', + websites: 'Website List', }, tamper: { tamper: 'Website Tamper Protection', diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts index 1e1236513..b80de88cc 100644 --- a/frontend/src/lang/modules/ja.ts +++ b/frontend/src/lang/modules/ja.ts @@ -2956,6 +2956,7 @@ const message = { logSaveSize: '最大ログ保存サイズ', logSaveSizeHelper: 'これは単一ウェブサイトのログ保存サイズです', '360se': '360 セキュリティブラウザ', + websites: 'ウェブサイトリスト', }, tamper: { tamper: 'ウェブサイトの改ざん防止', diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts index 780993a2c..81040a1fe 100644 --- a/frontend/src/lang/modules/ko.ts +++ b/frontend/src/lang/modules/ko.ts @@ -2912,6 +2912,7 @@ const message = { logSaveSize: '최대 로그 저장 크기', logSaveSizeHelper: '이것은 단일 웹사이트의 로그 저장 크기입니다', '360se': '360 보안 브라우저', + websites: '웹사이트 목록', }, tamper: { tamper: '웹사이트 변조 방지', diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts index deba48aac..b3a0bdb4d 100644 --- a/frontend/src/lang/modules/ms.ts +++ b/frontend/src/lang/modules/ms.ts @@ -3024,6 +3024,7 @@ const message = { logSaveSize: 'Saiz Simpanan Log Maksimum', logSaveSizeHelper: 'Ini adalah saiz simpanan log untuk satu laman web', '360se': '360 Pelayar Keselamatan', + websites: 'Senarai Laman Web', }, tamper: { tamper: 'Perlindungan daripada peng篡改 laman web', diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts index 64e9dea80..2a1d6ce5c 100644 --- a/frontend/src/lang/modules/pt-br.ts +++ b/frontend/src/lang/modules/pt-br.ts @@ -3025,6 +3025,7 @@ const message = { logSaveSize: 'Tamanho Máximo de Salvamento de Log', logSaveSizeHelper: 'Este é o tamanho de salvamento de log para um único site', '360se': 'Navegador de Segurança 360', + websites: 'Lista de Sites', }, tamper: { tamper: 'Proteção contra adulteração do site', diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts index a4abf34e8..6618a3f7b 100644 --- a/frontend/src/lang/modules/ru.ts +++ b/frontend/src/lang/modules/ru.ts @@ -3018,6 +3018,7 @@ const message = { logSaveSize: 'Максимальный размер сохранения логов', logSaveSizeHelper: 'Это размер сохранения логов для одного сайта', '360se': '360 Secure Browser', + websites: 'Список веб-сайтов', }, tamper: { tamper: 'Защита от подделки сайта', diff --git a/frontend/src/lang/modules/zh-Hant.ts b/frontend/src/lang/modules/zh-Hant.ts index 921ab2d75..4a42ea6e3 100644 --- a/frontend/src/lang/modules/zh-Hant.ts +++ b/frontend/src/lang/modules/zh-Hant.ts @@ -2877,6 +2877,7 @@ const message = { logSaveSize: '最大日誌保存大小', logSaveSizeHelper: '此處為單個網站的日誌保存大小', '360se': '360 安全瀏覽器', + websites: '網站列表', }, tamper: { tamper: '網站防篡改', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 22615b232..82d3d2e04 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -2861,6 +2861,7 @@ const message = { logSaveSize: '最大日志保存大小', logSaveSizeHelper: '此处为单个网站的日志保存大小', '360se': '360 安全浏览器', + websites: '网站列表', }, tamper: { tamper: '网站防篡改',