From 01a1b8801d8b889c63013586ce207c999d2d239c Mon Sep 17 00:00:00 2001 From: remittor Date: Sat, 31 Jan 2026 13:12:27 +0300 Subject: [PATCH] luci: service: Stop update status when modal dialog active --- .../htdocs/luci-static/resources/view/zapret2/service.js | 4 ++++ .../htdocs/luci-static/resources/view/zapret2/tools.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/luci-app-zapret2/htdocs/luci-static/resources/view/zapret2/service.js b/luci-app-zapret2/htdocs/luci-static/resources/view/zapret2/service.js index 0b738c7..908a764 100644 --- a/luci-app-zapret2/htdocs/luci-static/resources/view/zapret2/service.js +++ b/luci-app-zapret2/htdocs/luci-static/resources/view/zapret2/service.js @@ -175,6 +175,10 @@ return view.extend({ statusPoll: function() { + if (tools.isModalActive()) { + this.POLL.running = false; + return; // not update page when any modal dialog is active + } this.getAppStatus().then( L.bind(this.setAppStatus, this) ); diff --git a/luci-app-zapret2/htdocs/luci-static/resources/view/zapret2/tools.js b/luci-app-zapret2/htdocs/luci-static/resources/view/zapret2/tools.js index 7c0a00d..3aa0926 100644 --- a/luci-app-zapret2/htdocs/luci-static/resources/view/zapret2/tools.js +++ b/luci-app-zapret2/htdocs/luci-static/resources/view/zapret2/tools.js @@ -761,6 +761,11 @@ return baseclass.extend({ }, }), + isModalActive: function() + { + return document.body.classList.contains('modal-overlay-active'); + }, + execAndRead: async function({ cmd = [ ], log = '', logArea = null, callback = null, ctx = null, hiderow = [ ], rpc_timeout = 5, rpc_root = false } = {}) { function appendLog(msg, end = '\n')