From 68228305f8252b42be6d2d17c08cf22bfe0384cd Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Mon, 26 Dec 2022 18:32:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BD=91=E7=AB=99=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BD=91=E7=AB=99=E7=9B=AE=E5=BD=95TAB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/dto/response/website.go | 1 + backend/app/service/website.go | 1 + frontend/src/api/interface/website.ts | 1 + frontend/src/lang/modules/zh.ts | 8 +++ .../website/website/config/basic/index.vue | 12 +++-- .../website/config/basic/limit-conn/index.vue | 3 +- .../website/config/basic/other/index.vue | 3 +- .../config/basic/site-folder/index.vue | 50 +++++++++++++++++++ 8 files changed, 72 insertions(+), 7 deletions(-) create mode 100644 frontend/src/views/website/website/config/basic/site-folder/index.vue diff --git a/backend/app/dto/response/website.go b/backend/app/dto/response/website.go index f8da1e74e..4a5b95ca9 100644 --- a/backend/app/dto/response/website.go +++ b/backend/app/dto/response/website.go @@ -8,6 +8,7 @@ type WebsiteDTO struct { model.Website ErrorLogPath string `json:"errorLogPath"` AccessLogPath string `json:"accessLogPath"` + SitePath string `json:"sitePath"` } type WebsitePreInstallCheck struct { diff --git a/backend/app/service/website.go b/backend/app/service/website.go index 0c95bd6d2..c9d64ac18 100644 --- a/backend/app/service/website.go +++ b/backend/app/service/website.go @@ -273,6 +273,7 @@ func (w WebsiteService) GetWebsite(id uint) (response.WebsiteDTO, error) { sitePath := path.Join(constant.AppInstallDir, constant.AppNginx, nginxInstall.Name, "www", "sites", website.Alias) res.ErrorLogPath = path.Join(sitePath, "log", "error.log") res.AccessLogPath = path.Join(sitePath, "log", "access.log") + res.SitePath = sitePath return res, nil } diff --git a/frontend/src/api/interface/website.ts b/frontend/src/api/interface/website.ts index 656b1350d..ee570dd08 100644 --- a/frontend/src/api/interface/website.ts +++ b/frontend/src/api/interface/website.ts @@ -18,6 +18,7 @@ export namespace Website { export interface WebsiteDTO extends Website { errorLogPath: string; accessLogPath: string; + sitePath: string; } export interface NewAppInstall { diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 22045f558..e3a038375 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -910,6 +910,14 @@ export default { accessLog: '网站日志', stopHelper: '停止站点后将无法正常访问,用户访问会显示当前站点停止页面,是否继续操作?', startHelper: '启用站点后,用户可以正常访问网站内容,是否继续操作?', + sitePath: '网站目录', + siteAlias: '网站代号', + primaryPath: '主目录', + folderTitle: '网站主目录主要包含四个文件夹', + wafFolder: '防火墙规则', + indexFolder: '静态网站root目录', + logFoler: '网站日志', + sslFolder: '网站证书', }, nginx: { serverNamesHashBucketSizeHelper: '服务器名字的hash表大小', diff --git a/frontend/src/views/website/website/config/basic/index.vue b/frontend/src/views/website/website/config/basic/index.vue index 630de2d69..074ee4f69 100644 --- a/frontend/src/views/website/website/config/basic/index.vue +++ b/frontend/src/views/website/website/config/basic/index.vue @@ -3,17 +3,20 @@ + + + - + - + - + - + @@ -26,6 +29,7 @@ import Default from './default-doc/index.vue'; import LimitConn from './limit-conn/index.vue'; import Other from './other/index.vue'; import HTTPS from './https/index.vue'; +import SitePath from './site-folder/index.vue'; const props = defineProps({ id: { diff --git a/frontend/src/views/website/website/config/basic/limit-conn/index.vue b/frontend/src/views/website/website/config/basic/limit-conn/index.vue index 8fb5fe908..7c320dbdb 100644 --- a/frontend/src/views/website/website/config/basic/limit-conn/index.vue +++ b/frontend/src/views/website/website/config/basic/limit-conn/index.vue @@ -95,12 +95,13 @@ const limitRules = [ { key: i18n.global.t('website.videoSite'), values: [150, 4, 1024] }, ]; -let ruleKey = limitRules[0].key; +let ruleKey = ref(''); const search = (scopeReq: Website.NginxScopeReq) => { loading.value = true; GetNginxConfig(scopeReq) .then((res) => { + ruleKey.value = limitRules[0].key; if (res.data) { enable.value = res.data.enable; if (res.data.enable == false) { diff --git a/frontend/src/views/website/website/config/basic/other/index.vue b/frontend/src/views/website/website/config/basic/other/index.vue index 9bbf2425b..c06a740da 100644 --- a/frontend/src/views/website/website/config/basic/other/index.vue +++ b/frontend/src/views/website/website/config/basic/other/index.vue @@ -1,6 +1,6 @@