Bugfix/sw 300 software update refresh issue#1447
Conversation
…m util.device_info
…ell as event payload
…t of all plugins versions instead of only the mrBeamPlugin version alone
| <script lang="javascript"> | ||
| var BEAMOS_VERSION = "{{ beamosVersionNumber }}"; | ||
| // PLUGINS_VERSIONS is set by single quotes since "pluginVersions" is returning a JSON dump which will break with double quotes | ||
| var PLUGINS_VERSIONS = '{{ plugins_versions }}'; |
There was a problem hiding this comment.
Instead of using quotes you could try to use some of flask filters to make it easier. They seem to be pretty powerful.
Here is an example that would match this needs using tojson and safe https://stackoverflow.com/questions/24719592/sending-data-as-json-object-from-python-to-javascript-with-jinja
You would also need to remove the json.dumps call on the initialisation.
| software_info = None | ||
|
|
||
| try: | ||
| plugin_info = self._plugin._plugin_manager.get_plugin_info("softwareupdate") |
There was a problem hiding this comment.
this is softwareupdate_plugin_info right?
This is also the only place where we need the plugin... I don't think we need to store a reference to the plugin from the DeviceInfo. It seems like to initialise this class we need to pass any plugin to it... Doesn't feel like it belongs here... If we need the softwareupdate info I think we should directly pass it in the constructor.
Another flag that shows that this is smelly is that we are directly calling the _plugin_manager which is a private variable which means it shouldn't be used outside of its own class.
No description provided.