Add authenticated Gateway system updates with rollback

This commit is contained in:
jhartworks committed 2026-11-24 13:46:40 +01:00
1 parent 198b1d7b78
commit 4e35a3a557
9 files changed
+423 -1

No files matched your search

+2
View File
@@ -67,6 +67,7 @@ async function boot() {
await loadData();
if (!can('view_dashboard')) state.view = can('view_trends') ? 'trends' : can('manage_sources') ? 'points' : 'system';
if (can('manage_gateway') && new URLSearchParams(location.search).has('network-confirm')) state.view = 'system';
if (state.user?.user?.role === 'admin' && sessionStorage.getItem(updateReturnKey)) state.view = 'system';
renderShell();
}
@@ -404,6 +405,7 @@ function bindView(view) {
document.querySelectorAll('[data-remove-serial-port]').forEach(button => button.addEventListener('click', removeSerialPort));
}
if (view === 'system') {
if (state.user?.user?.role === 'admin') bindSystemUpdate();
document.querySelector('#password-form')?.addEventListener('submit', submitPassword);
bindInstallationSettings();
bindMqttTopicTemplateSettings();