mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/relayd: hook isSubsystemDirty() to bootgrid loaded event to fix grid loading issue (#4811)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user