diff options
| author | Ho3ein <ho3ein.sanaei@gmail.com> | 2023-06-16 17:55:33 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-16 17:55:33 +0300 |
| commit | 5188d516e3a13e0cf4c04f8af653007983b16cb5 (patch) | |
| tree | 7b2ab0097680e00cf74eb8467dddf3598eda7ba1 /web/html/xui | |
| parent | 97925eeebe30c2f70bad6b6c240728034638842f (diff) | |
new - loglevel (#612)
Diffstat (limited to 'web/html/xui')
| -rw-r--r-- | web/html/xui/index.html | 23 | ||||
| -rw-r--r-- | web/html/xui/settings.html | 4 |
2 files changed, 20 insertions, 7 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; diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index 745959a2..abcacada 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -116,7 +116,7 @@ style="width: 100%" > <a-select-option :value="l.value" :label="l.value" v-for="l in supportLangs"> - <span role="img" aria-label="l.name" v-text="l.icon"></span> + <span role="img" :aria-label="l.name" v-text="l.icon"></span> <span v-text="l.name"></span> </a-select-option> </a-select> @@ -386,7 +386,7 @@ style="width: 100%" > <a-select-option :value="l.value" :label="l.value" v-for="l in supportLangs"> - <span role="img" aria-label="l.name" v-text="l.icon"></span> + <span role="img" :aria-label="l.name" v-text="l.icon"></span> <span v-text="l.name"></span> </a-select-option> </a-select> |
