From 9623e875113adad1fcbae7370e043db040462f2a Mon Sep 17 00:00:00 2001 From: Vadim Iskuchekov Date: Tue, 16 Sep 2025 09:24:32 +0200 Subject: =?UTF-8?q?feat:=20Simple=20periodic=20traffic=20reset=20(for=20In?= =?UTF-8?q?bounds)=20=E2=80=93=20daily=20|=20weekly=20|=20monthly=20=20(#3?= =?UTF-8?q?407)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add periodic traffic reset feature model and ui with localization support * Remove periodic traffic reset fields from client * fix: add periodicTrafficReset field to inbound data structure * feat: implement periodic traffic reset job and integrate with cron scheduler * feat: enhance periodic traffic reset functionality with scheduling and inbound filtering * refactor: rename periodicTrafficReset to trafficReset and add lastTrafficResetTime field * feat: add periodic client traffic reset job and schedule tasks * Update web/job/periodic_traffic_reset_job.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update web/job/periodic_client_traffic_reset_job.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update web/service/inbound.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: rename periodicTrafficReset to trafficReset and add lastTrafficResetTime * feat: add last traffic reset time display and update logic in inbound service * fix: correct log message for completed periodic traffic reset * refactor: update traffic reset fields in Inbound model and remove unused client traffic reset job * refactor: remove unused traffic reset logic and clean up client model fields * cleanup comments * fix --- web/html/form/inbound.html | 24 ++++++++++++++++++++++++ web/html/inbounds.html | 12 ++++++++++++ 2 files changed, 36 insertions(+) (limited to 'web/html') diff --git a/web/html/form/inbound.html b/web/html/form/inbound.html index 69f5fbb3..ca4dc66a 100644 --- a/web/html/form/inbound.html +++ b/web/html/form/inbound.html @@ -44,6 +44,30 @@ + + + + {{ i18n "pages.inbounds.periodicTrafficReset.never" }} + {{ i18n "pages.inbounds.periodicTrafficReset.daily" }} + {{ i18n "pages.inbounds.periodicTrafficReset.weekly" }} + {{ i18n "pages.inbounds.periodicTrafficReset.monthly" }} + + + @@ -951,6 +957,8 @@ remark: dbInbound.remark + " - Cloned", enable: dbInbound.enable, expiryTime: dbInbound.expiryTime, + trafficReset: dbInbound.trafficReset, + lastTrafficResetTime: dbInbound.lastTrafficResetTime, listen: '', port: RandomUtil.randomInteger(10000, 60000), @@ -995,6 +1003,8 @@ remark: dbInbound.remark, enable: dbInbound.enable, expiryTime: dbInbound.expiryTime, + trafficReset: dbInbound.trafficReset, + lastTrafficResetTime: dbInbound.lastTrafficResetTime, listen: inbound.listen, port: inbound.port, @@ -1018,6 +1028,8 @@ remark: dbInbound.remark, enable: dbInbound.enable, expiryTime: dbInbound.expiryTime, + trafficReset: dbInbound.trafficReset, + lastTrafficResetTime: dbInbound.lastTrafficResetTime, listen: inbound.listen, port: inbound.port, -- cgit v1.2.3