net/relayd: hook isSubsystemDirty() to bootgrid loaded event to fix grid loading issue (#4811)

This commit is contained in:
Monviech
2025-07-14 15:48:26 +02:00
committed by GitHub
parent 9af5e18bce
commit a914b6214e
@@ -43,16 +43,6 @@
});
}
/**
* chain std_bootgrid_reload from opnsense_bootgrid_plugin.js
* to get the isSubsystemDirty state on "UIBootgrid" changes
*/
var opn_std_bootgrid_reload = std_bootgrid_reload;
std_bootgrid_reload = function(gridId) {
opn_std_bootgrid_reload(gridId);
isSubsystemDirty();
};
/**
* apply changes and reload relayd
*/
@@ -128,6 +118,11 @@
endpoints['toggle'] = '/api/relayd/settings/toggle/' + element + '/';
}
$("#grid-" + element).UIBootgrid(endpoints);
// get the isSubsystemDirty state on "UIBootgrid" changes
$("#grid-" + element).on("loaded.rs.jquery.bootgrid", function () {
isSubsystemDirty();
});
});
// show/hide options depending on other options