1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 00:09:16 +08:00

fix: 解决安装应用过程中出现的状态异常问题 (#4156)

This commit is contained in:
zhengkunwang 2024-03-11 20:34:08 +08:00 committed by GitHub
parent f9f68a975c
commit 0b66be7a3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
18 changed files with 309 additions and 253 deletions

View File

@ -749,8 +749,10 @@ func syncAppInstallStatus(appInstall *model.AppInstall) error {
switch {
case count == 0:
appInstall.Status = constant.Error
appInstall.Message = buserr.WithName("ErrContainerNotFound", strings.Join(containerNames, ",")).Error()
if appInstall.Status != constant.Error {
appInstall.Status = constant.SyncErr
appInstall.Message = buserr.WithName("ErrContainerNotFound", strings.Join(containerNames, ",")).Error()
}
case exitedCount == total:
appInstall.Status = constant.Stopped
case runningCount == total:

View File

@ -13,6 +13,7 @@ const (
Syncing = "Syncing"
SyncSuccess = "SyncSuccess"
Paused = "Paused"
SyncErr = "SyncErr"
ContainerPrefix = "1Panel-"

View File

@ -169,4 +169,6 @@ ErrBanAction: "Setting failed, the current {{ .name }} service is unavailable, p
#waf
ErrScope: "Modification of this configuration is not supported"
ErrStateChange: "State modification failed"
ErrStateChange: "State modification failed"
ErrRuleExist: "Rule is Exist"
ErrRuleNotExist: "Rule is not Exist"

View File

@ -171,3 +171,5 @@ ErrBanAction: "設置失敗,當前 {{ .name }} 服務不可用,請檢查後
#waf
ErrScope: "不支援修改此配置"
ErrStateChange: "狀態修改失敗"
ErrRuleExist: "規則名稱已存在"
ErrRuleNotExist: "規則不存在"

View File

@ -169,4 +169,6 @@ ErrBanAction: "设置失败,当前 {{ .name }} 服务不可用,请检查后
#waf
ErrScope: "不支持修改此配置"
ErrStateChange: "状态修改失败"
ErrStateChange: "状态修改失败"
ErrRuleExist: "规则名称已存在"
ErrRuleNotExist: "规则不存在"

View File

@ -126,6 +126,21 @@ func (f FileOp) SaveFile(dst string, content string, mode fs.FileMode) error {
return nil
}
func (f FileOp) SaveFileWithByte(dst string, content []byte, mode fs.FileMode) error {
if !f.Stat(path.Dir(dst)) {
_ = f.CreateDir(path.Dir(dst), mode.Perm())
}
file, err := f.Fs.OpenFile(dst, os.O_RDWR|os.O_CREATE|os.O_TRUNC, mode)
if err != nil {
return err
}
defer file.Close()
write := bufio.NewWriter(file)
_, _ = write.Write(content)
write.Flush()
return nil
}
func (f FileOp) ChownR(dst string, uid string, gid string, sub bool) error {
cmdStr := fmt.Sprintf(`chown %s:%s "%s"`, uid, gid, dst)
if sub {

View File

@ -18,7 +18,7 @@
"echarts": "^5.3.0",
"echarts-liquidfill": "^3.1.0",
"element-plus": "^2.6.0",
"fit2cloud-ui-plus": "^1.0.9",
"fit2cloud-ui-plus": "^1.1.3",
"js-base64": "^3.7.2",
"js-md5": "^0.7.3",
"md-editor-v3": "^2.7.2",
@ -5282,9 +5282,9 @@
}
},
"node_modules/fit2cloud-ui-plus": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/fit2cloud-ui-plus/-/fit2cloud-ui-plus-1.0.9.tgz",
"integrity": "sha512-hsXJyR21RG07C/ghx1iQPzNoh6OE6uJvICeNY+8p5El4MG2Ji0j//gGKERdJwyH6H6MFkupMiPW7Z8uflnpSxw==",
"version": "1.1.3",
"resolved": "https://registry.npmmirror.com/fit2cloud-ui-plus/-/fit2cloud-ui-plus-1.1.3.tgz",
"integrity": "sha512-Zxp3gyzNxdsfQ6UjX8p1jmO5c++WU4l4A3OnLDseWqbuB1StR2sMfwg/Lh1yrmjBGHE5jLV5EttDcK+P/2LiIQ==",
"dependencies": {
"@element-plus/icons-vue": "^1.1.4",
"element-plus": "^2.3.3",

View File

@ -30,7 +30,7 @@
"echarts": "^5.3.0",
"echarts-liquidfill": "^3.1.0",
"element-plus": "^2.6.0",
"fit2cloud-ui-plus": "^1.0.9",
"fit2cloud-ui-plus": "^1.1.3",
"js-base64": "^3.7.2",
"js-md5": "^0.7.3",
"md-editor-v3": "^2.7.2",

View File

@ -36,7 +36,7 @@ const getType = (status: string) => {
case 'removing':
return 'warning';
default:
return 'info';
return 'primary';
}
};

View File

@ -51,6 +51,7 @@ const message = {
uninstall: 'Uninstall',
fullscreen: 'Fullscreen',
quitFullscreen: 'Quit Fullscreen',
update: 'Edit',
},
search: {
timeStart: 'Time start',
@ -246,6 +247,7 @@ const message = {
ready: 'normal',
applying: 'Applying',
applyerror: 'Failure',
syncerr: 'Error',
},
units: {
second: 'Second',
@ -2144,125 +2146,132 @@ const message = {
statusCode: 'Status code',
manage: 'Management',
},
xpack: {
name: 'Professional Edition',
waf: {
name: 'WAF',
blackWhite: 'black and white list',
globalSetting: 'Global Setting',
websiteSetting: 'Website Settings',
blockRecords: 'Block records',
world: 'world',
china: 'China',
intercept: 'interception',
request: 'request',
count4xx: '4xx quantity',
count5xx: '5xx quantity',
todayStatus: 'Today Status',
reqMap: 'Request map (30 days)',
resource: 'source',
count: 'Quantity',
hight: 'high',
low: 'low',
reqCount: 'Number of requests',
interceptCount: 'Interception number',
requestTrends: 'Request Trends (7 days)',
interceptTrends: 'Intercept Trends (7 days)',
whiteList: 'whitelist',
blackList: 'blacklist',
ipBlackListHelper: 'IPs in the blacklist cannot access the website',
ipWhiteListHelper: 'IPs in the whitelist are not restricted by any rules',
uaBlackListHelper: 'Requests carrying User-Agent in the blacklist will be intercepted',
uaWhiteListHelper: 'Requests carrying User-Agent in the whitelist are not restricted by any rules',
urlBlackListHelper: 'Requests for URLs in the blacklist will be intercepted',
urlWhiteListHelper: 'Requests for URLs in the whitelist are not restricted by any rules',
ccHelper:
'If any website has been requested more than {1} times in {0} seconds, this IP will be blocked for {2} seconds',
blockTime: 'Block time',
attackHelper:
'The cumulative interception exceeds {1} times within {0} seconds, block this IP for {2} seconds',
notFoundHelper:
'The cumulative request returned 404 more than {1} times within {0} seconds, block this IP for {2} seconds',
frequencyLimit: 'frequency limit',
regionLimit: 'region limit',
defaultRule: 'Default rule',
accessFrequencyLmit: 'Access frequency limit',
attackLimit: 'Attack frequency limit',
notFoundLimit: '404 frequency limit',
urlLimit: 'URL frequency limit',
urlLimitHelper: 'Set access frequency for a single URL',
sqliDefense: 'SQL injection defense',
sqliHelper: 'Identify SQL injection in requests and intercept',
xssHelper: 'Identify XSS in the request and intercept it',
xssDefense: 'XSS Defense',
uaDefense: 'Malicious User-Agent Rule',
uaHelper: 'Contains common malicious crawler rules',
argsDefense: 'Malicious parameter rules',
argsHelper: 'Prohibit malicious parameters in requests',
cookieDefense: 'Malicious Cookie Rule',
cookieHelper: 'Prohibit malicious cookies from being carried in requests',
headerDefense: 'Malicious Header Rule',
headerHelper: 'Prohibit requests from containing malicious headers',
httpRule: 'HTTP request method rules',
httpHelper: 'Restrict the request method type of the website',
geoRule: 'Regional access restrictions',
geoHelper: 'Restrict access to your website from certain regions',
ipLocation: 'IP home location',
action: 'action',
ruleType: 'attack type',
ipHelper: 'Please enter IP',
attackLog: 'Attack Log',
},
monitor: {
name: 'Website Monitoring',
},
tamper: {
tamperHelper1:
'One-click deployment type of website, it is recommended to enable the application directory anti-tampering function;',
tamperHelper2:
'If the website cannot be used normally or backup and restore fail after enabling the anti-tampering function, please disable the anti-tampering function first;',
tamperHelper3:
'Enabling tamper-proofing will restrict reading, writing, deleting, permission, and owner modification operations of protected files under non-excluded directories. Please choose carefully when setting [Exclude Directory] and [Protect].',
op: 'Operation',
create: 'Create',
file: 'File',
tamperPath: 'Protection Directory',
tamperPathEdit: 'Modify Path',
log: 'Intercept Logs',
totalProtect: 'Total Protection',
todayProtect: 'Todays Protection',
addRule: 'Add Rule',
ignore: 'Exclude Directory',
ignoreHelper: 'One per line, e.g., \ntmp\n./tmp',
ignoreHelper1: 'Add folder names or specific paths to ignore',
ignoreHelper2: 'To ignore specific folders, use relative paths starting with ./',
protect: 'Protect',
protectHelper: 'One per line, e.g., \npng\n./test.css',
protectHelper1: 'Specify file names, suffixes, or specific files for protection',
protectHelper2: 'To protect specific files, use relative paths starting with ./',
enableHelper:
'The anti-tampering function of website {0} is about to be enabled to enhance website security. Do you want to continue?',
disableHelper:
'The anti-tampering function of website {0} is about to be disabled. Do you want to continue?',
},
setting: {
setting: 'Interface Settings',
title: 'Panel Description',
titleHelper:
'Will be displayed on the user login page (e.g., Linux Server Operation and Maintenance Management Panel)',
logo: 'Logo',
logoHelper:
'Will be displayed on the top left of the management page when the menu is collapsed (recommended image size: 82px*82px)',
logoWithText: 'Logo (with text)',
logoWithTextHelper:
'Will be displayed on the top left of the management page when the menu is expanded (recommended image size: 185px*55px)',
favicon: 'Website Icon',
faviconHelper: 'Website icon (recommended image size: 16px*16px)',
reUpload: 'Re-upload',
supportType: 'Only jpg/png/jpeg files are allowed!',
setDefault: 'Restore Default',
reset: 'Reset',
},
},
xpack: {
name: 'Professional',
waf: {
name: 'WAF',
blackWhite: 'black and white list',
globalSetting: 'Global Setting',
websiteSetting: 'Website Settings',
blockRecords: 'Block records',
world: 'world',
china: 'China',
intercept: 'interception',
request: 'request',
count4xx: '4xx quantity',
count5xx: '5xx quantity',
todayStatus: 'Today Status',
reqMap: 'Request map (30 days)',
resource: 'source',
count: 'Quantity',
hight: 'high',
low: 'low',
reqCount: 'Number of requests',
interceptCount: 'Interception number',
requestTrends: 'Request Trends (7 days)',
interceptTrends: 'Intercept Trends (7 days)',
whiteList: 'whitelist',
blackList: 'blacklist',
ipBlackListHelper: 'IPs in the blacklist cannot access the website',
ipWhiteListHelper: 'IPs in the whitelist are not restricted by any rules',
uaBlackListHelper: 'Requests carrying User-Agent in the blacklist will be intercepted',
uaWhiteListHelper: 'Requests carrying User-Agent in the whitelist are not restricted by any rules',
urlBlackListHelper: 'Requests for URLs in the blacklist will be intercepted',
urlWhiteListHelper: 'Requests for URLs in the whitelist are not restricted by any rules',
ccHelper:
'If any website has been requested more than {1} times in {0} seconds, this IP will be blocked for {2} seconds',
blockTime: 'Block time',
attackHelper:
'The cumulative interception exceeds {1} times within {0} seconds, block this IP for {2} seconds',
notFoundHelper:
'The cumulative request returned 404 more than {1} times within {0} seconds, block this IP for {2} seconds',
frequencyLimit: 'frequency limit',
regionLimit: 'region limit',
defaultRule: 'Default rule',
accessFrequencyLmit: 'Access frequency limit',
attackLimit: 'Attack frequency limit',
notFoundLimit: '404 frequency limit',
urlLimit: 'URL frequency limit',
urlLimitHelper: 'Set access frequency for a single URL',
sqliDefense: 'SQL injection defense',
sqliHelper: 'Identify SQL injection in requests and intercept',
xssHelper: 'Identify XSS in the request and intercept it',
xssDefense: 'XSS Defense',
uaDefense: 'Malicious User-Agent Rule',
uaHelper: 'Contains common malicious crawler rules',
argsDefense: 'Malicious parameter rules',
argsHelper: 'Prohibit malicious parameters in requests',
cookieDefense: 'Malicious Cookie Rule',
cookieHelper: 'Prohibit malicious cookies from being carried in requests',
headerDefense: 'Malicious Header Rule',
headerHelper: 'Prohibit requests from containing malicious headers',
httpRule: 'HTTP request method rules',
httpHelper: 'Restrict the request method type of the website',
geoRule: 'Regional access restrictions',
geoHelper: 'Restrict access to your website from certain regions',
ipLocation: 'IP home location',
action: 'action',
ruleType: 'attack type',
ipHelper: 'Please enter IP',
attackLog: 'Attack Log',
rule: 'Rule',
ipArr: 'IPV4 range',
ipStart: 'Start IP',
ipEnd: 'End IP',
ipv4: 'IPV4',
ipv6: 'IPV6',
},
monitor: {
name: 'Website Monitor',
},
tamper: {
tamper: 'Tamper',
tamperHelper1:
'One-click deployment type of website, it is recommended to enable the application directory anti-tampering function;',
tamperHelper2:
'If the website cannot be used normally or backup and restore fail after enabling the anti-tampering function, please disable the anti-tampering function first;',
tamperHelper3:
'Enabling tamper-proofing will restrict reading, writing, deleting, permission, and owner modification operations of protected files under non-excluded directories. Please choose carefully when setting [Exclude Directory] and [Protect].',
op: 'Operation',
create: 'Create',
file: 'File',
tamperPath: 'Protection Directory',
tamperPathEdit: 'Modify Path',
log: 'Intercept Logs',
totalProtect: 'Total Protection',
todayProtect: 'Todays Protection',
addRule: 'Add Rule',
ignore: 'Exclude Directory',
ignoreHelper: 'One per line, e.g., \ntmp\n./tmp',
ignoreHelper1: 'Add folder names or specific paths to ignore',
ignoreHelper2: 'To ignore specific folders, use relative paths starting with ./',
protect: 'Protect',
protectHelper: 'One per line, e.g., \npng\n./test.css',
protectHelper1: 'Specify file names, suffixes, or specific files for protection',
protectHelper2: 'To protect specific files, use relative paths starting with ./',
enableHelper:
'The anti-tampering function of website {0} is about to be enabled to enhance website security. Do you want to continue?',
disableHelper:
'The anti-tampering function of website {0} is about to be disabled. Do you want to continue?',
},
setting: {
setting: 'Interface Settings',
title: 'Panel Description',
titleHelper:
'Will be displayed on the user login page (e.g., Linux Server Operation and Maintenance Management Panel)',
logo: 'Logo',
logoHelper:
'Will be displayed on the top left of the management page when the menu is collapsed (recommended image size: 82px*82px)',
logoWithText: 'Logo (with text)',
logoWithTextHelper:
'Will be displayed on the top left of the management page when the menu is expanded (recommended image size: 185px*55px)',
favicon: 'Website Icon',
faviconHelper: 'Website icon (recommended image size: 16px*16px)',
reUpload: 'Re-upload',
supportType: 'Only jpg/png/jpeg files are allowed!',
setDefault: 'Restore Default',
reset: 'Reset',
},
},
};

View File

@ -51,6 +51,7 @@ const message = {
uninstall: '卸載',
fullscreen: '全屏',
quitFullscreen: '退出全屏',
update: '編輯',
},
search: {
timeStart: '開始時間',
@ -244,6 +245,7 @@ const message = {
ready: '正常',
applying: '申請中',
applyerror: '失敗',
syncerr: '失敗',
},
units: {
second: '秒',
@ -2002,115 +2004,122 @@ const message = {
statusCode: '狀態碼',
manage: '管理',
},
xpack: {
name: '專業版',
waf: {
name: 'WAF',
blackWhite: '黑白名單',
globalSetting: '全域設定',
websiteSetting: '網站設定',
blockRecords: '封鎖記錄',
world: '世界',
china: '中國',
intercept: '攔截',
request: '請求',
count4xx: '4xx 數量',
count5xx: '5xx 數量',
todayStatus: '今日狀態',
reqMap: '請求地圖30',
resource: '來源',
count: '數量',
hight: '高',
low: '低',
reqCount: '請求數',
interceptCount: '攔截數',
requestTrends: '請求趨勢7',
interceptTrends: '攔截趨勢7',
whiteList: '白名單',
blackList: '黑名單',
ipBlackListHelper: '黑名單中的 IP 無法存取網站',
ipWhiteListHelper: '白名單中的 IP 不受任何規則限制',
uaBlackListHelper: '攜帶黑名單中的 User-Agent 的請求將被攔截',
uaWhiteListHelper: '攜帶白名單中的 User-Agent 的請求不受任何規則限制',
urlBlackListHelper: '請求黑名單中的 URL 將被攔截',
urlWhiteListHelper: '請求白名單中的 URL 請求不受任何規則限制',
ccHelper: '{0} 秒內累積請求任意網站超過 {1} 封鎖此 IP {2} ',
blockTime: '封鎖時間',
attackHelper: '{0} 秒內累計攔截超過 {1} 封鎖此 IP {2} ',
notFoundHelper: '{0} 秒內累計請求回傳 404 超過 {1} 封鎖此 IP {2} ',
frequencyLimit: '頻率限制',
regionLimit: '地區限制',
defaultRule: '預設規則',
accessFrequencyLmit: '存取頻率限制',
attackLimit: '攻擊頻率限制',
notFoundLimit: '404 頻率限制',
urlLimit: 'URL 頻率限制',
urlLimitHelper: '為單一 URL 設定存取頻率',
sqliDefense: 'SQL 注入防禦',
sqliHelper: '辨識請求中的 SQL 注入並攔截',
xssHelper: '辨識請求中的 XSS 並攔截',
xssDefense: 'XSS 防禦',
uaDefense: '惡意 User-Agent 規則',
uaHelper: '包含常見的惡意爬蟲規則',
argsDefense: '惡意參數規則',
argsHelper: '在禁止請求中攜帶惡意參數',
cookieDefense: '惡意 Cookie 規則',
cookieHelper: '禁止請求中攜帶惡意 Cookie',
headerDefense: '惡意 Header 規則',
headerHelper: '禁止請求中攜帶惡意 Header',
httpRule: 'HTTP 請求方法規則',
httpHelper: '限制網站的請求方法類型',
geoRule: '地區存取限制',
geoHelper: '限制某些地區造訪你的網站',
ipLocation: 'IP 歸屬地',
action: '動作',
ruleType: '攻擊類型',
ipHelper: '請輸入 IP',
attackLog: '攻擊日誌',
},
monitor: {
name: '網站監控',
},
tamper: {
tamperHelper1: '一鍵部署類型的網站建議啟用應用目錄防篡改功能',
tamperHelper2: '如果在啟用防篡改功能後出現網站無法正常使用或備份恢復失敗的情況請先關閉防篡改功能',
tamperHelper3:
'啟用防篡改將限制非排除目錄下受保護文件的讀寫刪除權限和所有者修改操作請在設定 [排除目錄] [保護] 時謹慎選擇',
op: '操作',
create: '創建',
file: '文件',
tamperPath: '防護目錄',
tamperPathEdit: '修改路徑',
log: '攔截日誌',
totalProtect: '總防護',
todayProtect: '今日防護',
addRule: '添加規則',
ignore: '排除目錄',
ignoreHelper: '一行一個 \ntmp\n./tmp',
ignoreHelper1: '添加要忽略的文件夾名或特定路徑',
ignoreHelper2: '要忽略特定文件夾請使用以 ./ 開頭的相對路徑',
protect: '保護',
protectHelper: '一行一個 \npng\n./test.css',
protectHelper1: '可指定文件名後綴名或特定文件進行保護',
protectHelper2: '要保護特定文件請使用以 ./ 開頭的相對路徑',
enableHelper: '即將啟用 {0} 網站的防窜改功能以提升網站安全性是否繼續',
disableHelper: '即將關閉 {0} 網站的防窜改功能是否繼續',
},
setting: {
setting: '界面設置',
title: '面板描述',
titleHelper: '將會顯示在使用者登錄頁面 (: Linux 伺服器運維管理面板)',
logo: 'Logo',
logoHelper: '將會顯示在菜單收縮時管理頁面左上方 (建議圖片大小為: 82px*82px)',
logoWithText: 'Logo (帶文字)',
logoWithTextHelper: '將會顯示在菜單展開時管理頁面左上方 (建議圖片大小為: 185px*55px)',
favicon: '網站圖標',
faviconHelper: '網站圖標 (建議圖片大小為: 16px*16px)',
reUpload: '重新上傳',
supportType: '只能上傳 jpg/png/jpeg 檔案!',
setDefault: '恢復默認',
reset: '重置',
},
},
xpack: {
name: '專業版',
waf: {
name: 'WAF',
blackWhite: '黑白名單',
globalSetting: '全域設定',
websiteSetting: '網站設定',
blockRecords: '封鎖記錄',
world: '世界',
china: '中國',
intercept: '攔截',
request: '請求',
count4xx: '4xx 數量',
count5xx: '5xx 數量',
todayStatus: '今日狀態',
reqMap: '請求地圖30',
resource: '來源',
count: '數量',
hight: '高',
low: '低',
reqCount: '請求數',
interceptCount: '攔截數',
requestTrends: '請求趨勢7',
interceptTrends: '攔截趨勢7',
whiteList: '白名單',
blackList: '黑名單',
ipBlackListHelper: '黑名單中的 IP 無法存取網站',
ipWhiteListHelper: '白名單中的 IP 不受任何規則限制',
uaBlackListHelper: '攜帶黑名單中的 User-Agent 的請求將被攔截',
uaWhiteListHelper: '攜帶白名單中的 User-Agent 的請求不受任何規則限制',
urlBlackListHelper: '請求黑名單中的 URL 將被攔截',
urlWhiteListHelper: '請求白名單中的 URL 請求不受任何規則限制',
ccHelper: '{0} 秒內累積請求任意網站超過 {1} 封鎖此 IP {2} ',
blockTime: '封鎖時間',
attackHelper: '{0} 秒內累計攔截超過 {1} 封鎖此 IP {2} ',
notFoundHelper: '{0} 秒內累計請求回傳 404 超過 {1} 封鎖此 IP {2} ',
frequencyLimit: '頻率限制',
regionLimit: '地區限制',
defaultRule: '預設規則',
accessFrequencyLmit: '存取頻率限制',
attackLimit: '攻擊頻率限制',
notFoundLimit: '404 頻率限制',
urlLimit: 'URL 頻率限制',
urlLimitHelper: '為單一 URL 設定存取頻率',
sqliDefense: 'SQL 注入防禦',
sqliHelper: '辨識請求中的 SQL 注入並攔截',
xssHelper: '辨識請求中的 XSS 並攔截',
xssDefense: 'XSS 防禦',
uaDefense: '惡意 User-Agent 規則',
uaHelper: '包含常見的惡意爬蟲規則',
argsDefense: '惡意參數規則',
argsHelper: '在禁止請求中攜帶惡意參數',
cookieDefense: '惡意 Cookie 規則',
cookieHelper: '禁止請求中攜帶惡意 Cookie',
headerDefense: '惡意 Header 規則',
headerHelper: '禁止請求中攜帶惡意 Header',
httpRule: 'HTTP 請求方法規則',
httpHelper: '限制網站的請求方法類型',
geoRule: '地區存取限制',
geoHelper: '限制某些地區造訪你的網站',
ipLocation: 'IP 歸屬地',
action: '動作',
ruleType: '攻擊類型',
ipHelper: '請輸入 IP',
attackLog: '攻擊日誌',
rule: '規則',
ipArr: 'IPV4 範圍',
ipStart: '起始 IP',
ipEnd: '結束 IP',
ipv4: 'IPV4',
ipv6: 'IPV6',
},
monitor: {
name: '網站監控',
},
tamper: {
tamper: '防篡改',
tamperHelper1: '一鍵部署類型的網站建議啟用應用目錄防篡改功能',
tamperHelper2: '如果在啟用防篡改功能後出現網站無法正常使用或備份恢復失敗的情況請先關閉防篡改功能',
tamperHelper3:
'啟用防篡改將限制非排除目錄下受保護文件的讀寫刪除權限和所有者修改操作請在設定 [排除目錄] [保護] 時謹慎選擇',
op: '操作',
create: '創建',
file: '文件',
tamperPath: '防護目錄',
tamperPathEdit: '修改路徑',
log: '攔截日誌',
totalProtect: '總防護',
todayProtect: '今日防護',
addRule: '添加規則',
ignore: '排除目錄',
ignoreHelper: '一行一個 \ntmp\n./tmp',
ignoreHelper1: '添加要忽略的文件夾名或特定路徑',
ignoreHelper2: '要忽略特定文件夾請使用以 ./ 開頭的相對路徑',
protect: '保護',
protectHelper: '一行一個 \npng\n./test.css',
protectHelper1: '可指定文件名後綴名或特定文件進行保護',
protectHelper2: '要保護特定文件請使用以 ./ 開頭的相對路徑',
enableHelper: '即將啟用 {0} 網站的防窜改功能以提升網站安全性是否繼續',
disableHelper: '即將關閉 {0} 網站的防窜改功能是否繼續',
},
setting: {
setting: '界面設置',
title: '面板描述',
titleHelper: '將會顯示在使用者登錄頁面 (: Linux 伺服器運維管理面板)',
logo: 'Logo',
logoHelper: '將會顯示在菜單收縮時管理頁面左上方 (建議圖片大小為: 82px*82px)',
logoWithText: 'Logo (帶文字)',
logoWithTextHelper: '將會顯示在菜單展開時管理頁面左上方 (建議圖片大小為: 185px*55px)',
favicon: '網站圖標',
faviconHelper: '網站圖標 (建議圖片大小為: 16px*16px)',
reUpload: '重新上傳',
supportType: '只能上傳 jpg/png/jpeg 檔案!',
setDefault: '恢復默認',
reset: '重置',
},
},
};

View File

@ -51,6 +51,7 @@ const message = {
uninstall: '卸载',
fullscreen: '全屏',
quitFullscreen: '退出全屏',
update: '编辑',
},
search: {
timeStart: '开始时间',
@ -244,6 +245,7 @@ const message = {
ready: '正常',
applying: '申请中',
applyerror: '失败',
syncerr: '失败',
},
units: {
second: '秒',
@ -2068,6 +2070,12 @@ const message = {
ruleType: '攻击类型',
ipHelper: '请输入 IP',
attackLog: '攻击日志',
rule: '规则',
ipArr: 'IPV4 范围',
ipStart: '起始 IP',
ipEnd: '结束 IP',
ipv4: 'IPV4',
ipv6: 'IPV6',
},
monitor: {
name: '网站监控',

View File

@ -418,3 +418,11 @@ html {
.p-w-200 {
width: 200px !important;
}
.p-ml-20 {
margin-left: 20px !important;
}
.p-mt-20 {
margin-top: 20px !important;
}

View File

@ -160,9 +160,6 @@ html {
.el-dialog {
.el-dialog__header {
padding: 15px 20px;
margin: 0;
border-bottom: 1px solid #f0f0f0;
.el-dialog__title {
font-size: 17px;
}

View File

@ -195,7 +195,7 @@
</div>
</template>
</el-table-column>
<el-table-column :label="$t('container.related')" min-width="200">
<el-table-column :label="$t('container.related')" min-width="200" prop="appName">
<template #default="{ row }">
<div>
<el-tooltip
@ -288,6 +288,7 @@
:buttons="buttons"
:label="$t('commons.table.operate')"
:fixed="mobile ? false : 'right'"
prop="operate"
/>
</ComplexTable>
</template>

View File

@ -1,6 +1,6 @@
<template>
<div v-if="recordShow" v-loading="loading">
<div class="app-status" style="margin-top: 20px">
<div class="app-status p-mt-20">
<el-card>
<div>
<el-popover
@ -17,7 +17,7 @@
</el-tag>
</template>
</el-popover>
<el-tag v-if="dialogData.rowData.name.length < 15" style="float: left" effect="dark" type="success">
<el-tag v-if="dialogData.rowData.name.length < 15" class="float-left" effect="dark" type="success">
{{ $t('cronjob.' + dialogData.rowData.type) }} - {{ dialogData.rowData.name }}
</el-tag>
@ -73,7 +73,7 @@
></el-date-picker>
</el-col>
<el-col :span="16">
<el-select @change="search()" v-model="searchInfo.status">
<el-select @change="search()" v-model="searchInfo.status" class="p-w-200">
<template #prefix>{{ $t('commons.table.status') }}</template>
<el-option :label="$t('commons.table.all')" value="" />
<el-option :label="$t('commons.status.success')" value="Success" />

View File

@ -8,24 +8,24 @@
@opened="onOpen"
:top="'5vh'"
>
<el-form :inline="true" :model="config">
<el-form :inline="true" :model="config" class="mt-1.5">
<el-form-item :label="$t('file.theme')">
<el-select v-model="config.theme" @change="changeTheme()">
<el-select v-model="config.theme" @change="changeTheme()" class="p-w-200">
<el-option v-for="item in themes" :key="item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<el-form-item :label="$t('file.language')">
<el-select v-model="config.language" @change="changeLanguage()">
<el-select v-model="config.language" @change="changeLanguage()" class="p-w-200">
<el-option v-for="lang in Languages" :key="lang.label" :value="lang.label" :label="lang.label" />
</el-select>
</el-form-item>
<el-form-item :label="$t('file.eol')">
<el-select v-model="config.eol" @change="changeEOL()">
<el-select v-model="config.eol" @change="changeEOL()" class="p-w-200">
<el-option v-for="eol in eols" :key="eol.label" :value="eol.value" :label="eol.label" />
</el-select>
</el-form-item>
<el-form-item :label="$t('file.wordWrap')">
<el-select v-model="config.wordWrap" @change="changeWarp()">
<el-select v-model="config.wordWrap" @change="changeWarp()" class="p-w-200">
<el-option :label="$t('commons.button.enable')" value="on"></el-option>
<el-option :label="$t('commons.button.disable')" value="off"></el-option>
</el-select>

View File

@ -15,7 +15,7 @@
</el-button>
</el-col>
<el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
<div class="flx-align-center">
<div class="flex justify-end">
<TableSetting @search="search()" />
<TableSearch @search="search()" v-model:searchName="searchIP" />
</div>
@ -25,14 +25,14 @@
<template #search>
<div class="flx-align-center">
<el-select v-model="searchStatus" @change="search()" clearable>
<el-select v-model="searchStatus" @change="search()" clearable class="p-w-200">
<template #prefix>{{ $t('commons.table.status') }}</template>
<el-option :label="$t('commons.table.all')" value=""></el-option>
<el-option :label="$t('commons.status.success')" value="Success"></el-option>
<el-option :label="$t('commons.status.failed')" value="Failed"></el-option>
</el-select>
<el-button type="primary" plain @click="onClean()" style="margin-left: 10px">
<el-button type="primary" plain @click="onClean()" class="ml-2.5">
{{ $t('logs.deleteLogs') }}
</el-button>
</div>