luci: service: Stop update status when modal dialog active

This commit is contained in:
remittor
2026-01-31 13:13:30 +03:00
parent 57a85c8a68
commit c5ecd94b9b
2 changed files with 9 additions and 0 deletions

View File

@@ -175,6 +175,10 @@ return view.extend({
statusPoll: function() statusPoll: function()
{ {
if (tools.isModalActive()) {
this.POLL.running = false;
return; // not update page when any modal dialog is active
}
this.getAppStatus().then( this.getAppStatus().then(
L.bind(this.setAppStatus, this) L.bind(this.setAppStatus, this)
); );

View File

@@ -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 } = {}) execAndRead: async function({ cmd = [ ], log = '', logArea = null, callback = null, ctx = null, hiderow = [ ], rpc_timeout = 5, rpc_root = false } = {})
{ {
function appendLog(msg, end = '\n') function appendLog(msg, end = '\n')