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
diff options
context:
space:
mode:
authorHo3ein <ho3ein.sanaei@gmail.com>2023-06-16 17:55:33 +0300
committerGitHub <noreply@github.com>2023-06-16 17:55:33 +0300
commit5188d516e3a13e0cf4c04f8af653007983b16cb5 (patch)
tree7b2ab0097680e00cf74eb8467dddf3598eda7ba1 /web/html/xui/index.html
parent97925eeebe30c2f70bad6b6c240728034638842f (diff)
new - loglevel (#612)
Diffstat (limited to 'web/html/xui/index.html')
-rw-r--r--web/html/xui/index.html23
1 files changed, 18 insertions, 5 deletions
diff --git a/web/html/xui/index.html b/web/html/xui/index.html
index 989aa286..236ab010 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(20)">{{ i18n "pages.index.logs" }}</a-tag>
+ <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="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)"
+ @change="openLogs(logModal.rows, logModal.logLevel)"
:dropdown-class-name="themeSwitcher.darkCardClass">
<a-select-option value="10">10</a-select-option>
<a-select-option value="20">20</a-select-option>
@@ -261,8 +261,20 @@
<a-select-option value="100">100</a-select-option>
</a-select>
</a-form-item>
+ <a-form-item label="Log Level">
+ <a-select v-model="logModal.logLevel"
+ style="width: 120px"
+ @change="openLogs(logModal.rows, logModal.logLevel)"
+ :dropdown-class-name="themeSwitcher.darkCardClass">
+ <a-select-option value="debug">Debug</a-select-option>
+ <a-select-option value="info">Info</a-select-option>
+ <a-select-option value="notice">Notice</a-select-option>
+ <a-select-option value="warning">Warning</a-select-option>
+ <a-select-option value="err">Error</a-select-option>
+ </a-select>
+ </a-form-item>
<a-form-item>
- <button class="ant-btn ant-btn-primary" @click="openLogs(logModal.rows)"><a-icon type="sync"></a-icon> Reload</button>
+ <button class="ant-btn ant-btn-primary" @click="openLogs(logModal.rows, logModal.logLevel)"><a-icon type="sync"></a-icon> Reload</button>
</a-form-item>
<a-form-item>
<a-button type="primary" style="margin-bottom: 10px;"
@@ -397,6 +409,7 @@
visible: false,
logs: '',
rows: 20,
+ logLevel: 'info',
show(logs, rows) {
this.visible = true;
this.rows = rows;
@@ -501,9 +514,9 @@
return;
}
},
- async openLogs(rows) {
+ async openLogs(rows, logLevel) {
this.loading(true);
- const msg = await HttpUtil.post('server/logs/' + rows);
+ const msg = await HttpUtil.post('server/logs/' + rows, { logLevel: `${logLevel}` });
this.loading(false);
if (!msg.success) {
return;