mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-03-21 10:05:49 +00:00
fix warning when there is no access.log
after this if limitip is 0 and there is no access.log on xray config you don't see this warning access.log doesn't exist in your config.json ------------- better view on ip log ------------- update dependencies
This commit is contained in:
@@ -121,18 +121,21 @@
|
||||
},
|
||||
methods: {
|
||||
async getDBClientIps(email) {
|
||||
try {
|
||||
const msg = await HttpUtil.post(`/panel/inbound/clientIps/${email}`);
|
||||
if (!msg.success) {
|
||||
document.getElementById("clientIPs").value = msg.obj;
|
||||
return;
|
||||
}
|
||||
const ips = Array.isArray(msg.obj) ? msg.obj.join(",\n") : msg.obj;
|
||||
document.getElementById("clientIPs").value = ips;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
document.getElementById("clientIPs").value = 'An error occurred while making the request';
|
||||
const msg = await HttpUtil.post(`/panel/inbound/clientIps/${email}`);
|
||||
if (!msg.success) {
|
||||
document.getElementById("clientIPs").value = msg.obj;
|
||||
return;
|
||||
}
|
||||
let ips = msg.obj;
|
||||
if (typeof ips === 'string' && ips.startsWith('[') && ips.endsWith(']')) {
|
||||
try {
|
||||
ips = JSON.parse(ips);
|
||||
ips = Array.isArray(ips) ? ips.join("\n") : ips;
|
||||
} catch (e) {
|
||||
console.error('Error parsing JSON:', e);
|
||||
}
|
||||
}
|
||||
document.getElementById("clientIPs").value = ips;
|
||||
},
|
||||
async clearDBClientIps(email) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user