-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/sw 300 software update refresh issue #1447
base: rc/beta
Are you sure you want to change the base?
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
@@ -1,5 +1,7 @@ | |||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.