Add authenticated Gateway system updates with rollback
This commit is contained in:
1 parent
198b1d7b78
commit
4e35a3a557
9 files changed
+423
-1
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user