Actions
Refactor #19464
closedMove Dashboard::Manager out of app/registries/ to permit autoloading
Description
Dashbaord::Manager has always been excluded from autoloading as it kept a list of known widgets in a class variable. In #10927, it was moved to app/registries/ to preserve this status and keep it from being autoloaded.
It is possible to rewrite this class in an autoload-friendly manner, where the list of builtin widgets is hardcoded inside the class and then the total list of default widgets is retrieved from Foreman::Plugin when required, instead of plugins appending to the dashboard class variable.
This would:
- Allow the source file to be kept in app/services/, easier for people to find
- Allow the class to be reloaded in development, so changes to builtin widgets are immediately visible
- Allow initialisation to be removed from config/initializers/, speeding up the application load time
- Make the class more testable, by removing modifications to class variables
Updated by Dominic Cleal over 7 years ago
- Related to Bug #10927: Resetting dashboard to default widgets adds no widgets added
Updated by The Foreman Bot over 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4506 added
Updated by Dominic Cleal over 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset d3f474050ae0b1f3866b68dc14b3f984db2d03c0.
Updated by Marek Hulán almost 7 years ago
- Translation missing: en.field_release set to 240
Actions