diff options
| author | surbiks <43953720+surbiks@users.noreply.github.com> | 2024-02-07 10:55:31 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-07 10:55:31 +0300 |
| commit | 13de2c6ca0d9101d247a81aa06dddbf338441703 (patch) | |
| tree | f1310e123568c42425790c33fdc67dd6eedf5b3e /web/html/xui/xray.html | |
| parent | 6cf29d5145bea39f731410e15472606223e0d7c0 (diff) | |
add outbound traffic reset (#1767)
Diffstat (limited to 'web/html/xui/xray.html')
| -rw-r--r-- | web/html/xui/xray.html | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index a144c766..871631e0 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -385,11 +385,13 @@ <a-tab-pane key="tpl-3" tab='{{ i18n "pages.xray.Outbounds"}}' style="padding-top: 20px;" force-render="true"> <a-row> <a-col :xs="12" :sm="12" :lg="12"> - <a-button type="primary" icon="plus" @click="addOutbound()" style="margin-bottom: 10px;">{{ i18n "pages.xray.outbound.addOutbound" }}</a-button> + <a-button type="primary" icon="plus" @click="addOutbound()" style="margin-bottom: 10px;">{{ i18n + "pages.xray.outbound.addOutbound" }}</a-button> <a-button type="primary" @click="showWarp()" style="margin-bottom: 10px;">WARP</a-button> </a-col> <a-col :xs="12" :sm="12" :lg="12" style="text-align: right;"> - <a-icon type="sync" :spin="refreshing" @click="refreshOutboundTraffic()" style="margin: 0 5px;"/> + <a-icon type="sync" :spin="refreshing" @click="refreshOutboundTraffic()" style="margin: 0 5px;"></a-icon> + <a-icon type="retweet" @click="resetOutboundTraffic(-1)"></a-icon> </a-col> </a-row> <a-table :columns="outboundColumns" bordered @@ -408,6 +410,11 @@ <a-icon type="edit"></a-icon> {{ i18n "edit" }} </a-menu-item> + <a-menu-item @click="resetOutboundTraffic(index)"> + <span> + <a-icon type="retweet"></a-icon> {{ i18n "pages.inbounds.resetTraffic"}} + </span> + </a-menu-item> <a-menu-item @click="deleteOutbound(index)"> <span style="color: #FF4D4F"> <a-icon type="delete"></a-icon> {{ i18n "delete"}} @@ -947,6 +954,16 @@ this.refreshing = false; } }, + async resetOutboundTraffic(index) { + let tag = "-alltags-"; + if (index >= 0) { + tag = this.outboundData[index].tag ? this.outboundData[index].tag : "" + } + const msg = await HttpUtil.post("/panel/xray/resetOutboundsTraffic", { tag: tag }); + if (msg.success) { + await this.refreshOutboundTraffic(); + } + }, addBalancer() { balancerModal.show({ title: '{{ i18n "pages.xray.balancer.addBalancer"}}', |
