Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web/html
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-07-31 19:41:47 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-07-31 19:41:47 +0300
commitbf971911d50b26492fc27b4f904026ee73c0c918 (patch)
tree3bb247ea7cc44b22bdcd4c3fef7a72a1e4d07daf /web/html
parentc46ced0c4c57bd9e243bca1b068017aa8a97f4b0 (diff)
log level & syslog
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/xui/index.html27
1 files changed, 15 insertions, 12 deletions
diff --git a/web/html/xui/index.html b/web/html/xui/index.html
index 236ab010..0942b0ad 100644
--- a/web/html/xui/index.html
+++ b/web/html/xui/index.html
@@ -86,7 +86,7 @@
<a-col :sm="24" :md="12">
<a-card hoverable :class="themeSwitcher.darkCardClass">
{{ i18n "menu.link" }}:
- <a-tag color="blue" style="cursor: pointer;" @click="openLogs(logModal.rows, logModal.logLevel)">{{ i18n "pages.index.logs" }}</a-tag>
+ <a-tag color="blue" style="cursor: pointer;" @click="openLogs()">{{ i18n "pages.index.logs" }}</a-tag>
<a-tag color="blue" style="cursor: pointer;" @click="openConfig">{{ i18n "pages.index.config" }}</a-tag>
<a-tag color="blue" style="cursor: pointer;" @click="openBackup">{{ i18n "pages.index.backup" }}</a-tag>
</a-card>
@@ -253,7 +253,7 @@
<a-form-item label="Count">
<a-select v-model="logModal.rows"
style="width: 80px"
- @change="openLogs(logModal.rows, logModal.logLevel)"
+ @change="openLogs()"
:dropdown-class-name="themeSwitcher.darkCardClass">
<a-select-option value="10">10</a-select-option>
<a-select-option value="20">20</a-select-option>
@@ -262,9 +262,9 @@
</a-select>
</a-form-item>
<a-form-item label="Log Level">
- <a-select v-model="logModal.logLevel"
+ <a-select v-model="logModal.level"
style="width: 120px"
- @change="openLogs(logModal.rows, logModal.logLevel)"
+ @change="openLogs()"
:dropdown-class-name="themeSwitcher.darkCardClass">
<a-select-option value="debug">Debug</a-select-option>
<a-select-option value="info">Info</a-select-option>
@@ -273,8 +273,11 @@
<a-select-option value="err">Error</a-select-option>
</a-select>
</a-form-item>
+ <a-form-item label="SysLog">
+ <a-checkbox v-model="logModal.syslog" @change="openLogs()"></a-checkbox>
+ </a-form-item>
<a-form-item>
- <button class="ant-btn ant-btn-primary" @click="openLogs(logModal.rows, logModal.logLevel)"><a-icon type="sync"></a-icon> Reload</button>
+ <button class="ant-btn ant-btn-primary" @click="openLogs()"><a-icon type="sync"></a-icon> Reload</button>
</a-form-item>
<a-form-item>
<a-button type="primary" style="margin-bottom: 10px;"
@@ -409,11 +412,11 @@
visible: false,
logs: '',
rows: 20,
- logLevel: 'info',
- show(logs, rows) {
+ level: 'info',
+ syslog: false,
+ show(logs) {
this.visible = true;
- this.rows = rows;
- this.logs = logs.join("\n");
+ this.logs = logs? logs.join("\n"): "No Record...";
},
hide() {
this.visible = false;
@@ -514,14 +517,14 @@
return;
}
},
- async openLogs(rows, logLevel) {
+ async openLogs(){
this.loading(true);
- const msg = await HttpUtil.post('server/logs/' + rows, { logLevel: `${logLevel}` });
+ 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, rows);
+ logModal.show(msg.obj);
},
async openConfig() {
this.loading(true);