mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
fix - Ensure logs are not null in show method #1763
This commit is contained in:
parent
182710b86c
commit
6cf29d5145
2 changed files with 5 additions and 5 deletions
|
@ -440,8 +440,8 @@
|
|||
loading: false,
|
||||
show(logs) {
|
||||
this.visible = true;
|
||||
this.logs = logs;
|
||||
this.formattedLogs = logs.length > 0 ? this.formatLogs(logs) : "No Record...";
|
||||
this.logs = logs || [];
|
||||
this.formattedLogs = this.logs.length > 0 ? this.formatLogs(this.logs) : "No Record...";
|
||||
},
|
||||
formatLogs(logs) {
|
||||
let formattedLogs = '';
|
||||
|
|
|
@ -88,7 +88,7 @@ func (j *CheckClientIpJob) checkFail2BanInstalled() {
|
|||
|
||||
err := exec.Command(cmd, args...).Run()
|
||||
if err != nil {
|
||||
logger.Warning("fail2ban is not installed. IP limiting may not work properly.")
|
||||
logger.Error("fail2ban is not installed. IP limiting may not work properly.")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,12 +96,12 @@ func (j *CheckClientIpJob) processLogFile() {
|
|||
accessLogPath := xray.GetAccessLogPath()
|
||||
|
||||
if accessLogPath == "none" {
|
||||
logger.Warning("Access log is set to 'none' check your Xray Configs")
|
||||
logger.Error("Access log is set to 'none' check your Xray Configs")
|
||||
return
|
||||
}
|
||||
|
||||
if accessLogPath == "" {
|
||||
logger.Warning("Access log doesn't exist in your Xray Configs")
|
||||
logger.Error("Access log doesn't exist in your Xray Configs")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue