mgr/dashboard: remove settins.py module and refactor MODULE_OPTIONS
It's no longer necessary, creates lots of unnecessary CLI commands and overrides some existing/better behaviours. Anything identified that is positive, it should be moved to mgr_module level (or mgr_utils) so that other modules can benefit from it.
Perhaps a possibility would be to replace MODULE_OPTIONS with a class that provides better functionality and encapsulates code:
It might bring some extra features:
MODULE_OPTIONS = ModuleOptions([ Option('foo', int) ]) ... self.MODULE_OPTIONS['foo'] = 'bar' print(self.MODULE_OPTIONS['foo']) >>> 'bar'
- If option
runtimeis False, the value is fetched at the beginning and cached since then.
- Provide mypy/typing hints/generics.