luci-base: ui.js: gracefully handle failing confirm calls on rollback

Do not abort the poll loop if some confirm request attempts fail, which
might happen when the device starts rolling back its configuration.

Before that fix, the rollback information dialog offering an unchecked
apply was not reliably presented in such situations.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2022-05-05 23:31:21 +02:00
parent f2fa59e89a
commit b6797821b8

View file

@ -4508,7 +4508,7 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ {
method: 'post',
timeout: L.env.apply_timeout * 1000,
query: { sid: L.env.sessionid, token: L.env.token }
}).then(call);
}).then(call, call.bind(null, { status: 0 }, null, 0));
}, delay);
};