diff --git a/web/html/xui/index.html b/web/html/xui/index.html
index a8fb958d..d9106a51 100644
--- a/web/html/xui/index.html
+++ b/web/html/xui/index.html
@@ -94,12 +94,16 @@
{{ i18n "pages.index.xrayStatus" }}:
[[ status.xray.state ]]
-
-
- [[ line ]]
+
+ Error in running xray-core
+ {{ i18n "pages.index.logs" }}
+
+
+ [[ line ]]
-
+
{{ i18n "pages.index.stopXray" }}
{{ i18n "pages.index.restartXray" }}
{{ i18n "pages.index.xraySwitch" }}
@@ -252,7 +256,7 @@
- logModal.visible = false" @cancel="() => logModal.visible = false"
:class="themeSwitcher.currentTheme"
width="800px"
@@ -285,7 +289,7 @@
-
+ Reload
-
+
{
+ let [data, message] = log.split(" - ",2);
+ const parts = data.split(" ")
+ if(index>0) formattedLogs += '
';
+
+ if (parts.length === 3) {
+ const d = parts[0];
+ const t = parts[1];
+ const level = parts[2];
+ const levelIndex = levels.indexOf(level,levels) || 4;
+
+ //formattedLogs += `${index + 1}.`;
+ formattedLogs += `${d} ${t} `;
+ formattedLogs += `${level}`;
+ } else {
+ const levelIndex = levels.indexOf(data,levels) || 4;
+ formattedLogs += `${data}`;
+ }
+
+ if(message){
+ if(message.startsWith("XRAY:"))
+ message = "XRAY: " + message.substring(5);
+ else
+ message = "X-UI: " + message;
+ }
+
+ formattedLogs += message ? ' - ' + message : '';
+ });
+
+ return formattedLogs;
},
hide() {
this.visible = false;
@@ -530,13 +571,14 @@
}
},
async openLogs(){
- this.loading(true);
+ logModal.loading = true;
const msg = await HttpUtil.post('server/logs/'+logModal.rows,{level: logModal.level, syslog: logModal.syslog});
- this.loading(false);
if (!msg.success) {
return;
}
logModal.show(msg.obj);
+ await PromiseUtil.sleep(500);
+ logModal.loading = false;
},
async openConfig() {
this.loading(true);