diff --git a/luci-app-zapret/htdocs/luci-static/resources/view/zapret/service.js b/luci-app-zapret/htdocs/luci-static/resources/view/zapret/service.js index 7ee4a13..2873b85 100644 --- a/luci-app-zapret/htdocs/luci-static/resources/view/zapret/service.js +++ b/luci-app-zapret/htdocs/luci-static/resources/view/zapret/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-zapret/htdocs/luci-static/resources/view/zapret/tools.js b/luci-app-zapret/htdocs/luci-static/resources/view/zapret/tools.js index 0f01e45..997a779 100644 --- a/luci-app-zapret/htdocs/luci-static/resources/view/zapret/tools.js +++ b/luci-app-zapret/htdocs/luci-static/resources/view/zapret/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')