diff options
| author | MHSanaei <33454419+MHSanaei@users.noreply.github.com> | 2023-03-27 19:42:45 +0300 |
|---|---|---|
| committer | MHSanaei <33454419+MHSanaei@users.noreply.github.com> | 2023-03-27 19:42:45 +0300 |
| commit | 88744d92b3677b33f0b6265bacb7805aeab856e6 (patch) | |
| tree | 1d587245fba54c7ed87f4b4ea5d678cc378ffb8e /web/html/xui/inbounds.html | |
| parent | 7b38d02ff035fc34699740d14807b4d2b8a36d06 (diff) | |
new feature - reset traffic all inbound
Diffstat (limited to 'web/html/xui/inbounds.html')
| -rw-r--r-- | web/html/xui/inbounds.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 9fd663f7..90250869 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -52,6 +52,7 @@ <div slot="title"> <a-button type="primary" icon="plus" @click="openAddInbound">{{ i18n "pages.inbounds.addInbound" }}</a-button> <a-button type="primary" icon="export" @click="exportAllLinks">{{ i18n "pages.inbounds.export" }}</a-button> + <a-button type="primary" icon="reload" @click="resetAllTraffic">{{ i18n "pages.inbounds.resetAllTraffic" }}</a-button> </div> <a-input v-model.lazy="searchKey" placeholder="{{ i18n "search" }}" autofocus style="max-width: 300px"></a-input> <a-table :columns="columns" :row-key="dbInbound => dbInbound.id" @@ -501,6 +502,22 @@ }, }); }, + resetAllTraffic() { + this.$confirm({ + title: '{{ i18n "pages.inbounds.resetAllTrafficTitle"}}', + content: '{{ i18n "pages.inbounds.resetAllTrafficContent"}}', + okText: '{{ i18n "pages.inbounds.resetAllTrafficOkText"}}', + cancelText: '{{ i18n "pages.inbounds.resetAllTrafficCancelText"}}', + onOk: async () => { + for (const dbInbound of this.dbInbounds) { + const inbound = dbInbound.toInbound(); + dbInbound.up = 0; + dbInbound.down = 0; + this.updateInbound(inbound, dbInbound); + } + }, + }); + }, delInbound(dbInboundId) { this.$confirm({ title: '{{ i18n "pages.inbounds.deleteInbound"}}', |
