Skip to content
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

[feature] Add way to see version of OpenWISP modules enabled and installed #273

Closed
nemesifier opened this issue Jan 14, 2022 · 2 comments · Fixed by #363
Closed

[feature] Add way to see version of OpenWISP modules enabled and installed #273

nemesifier opened this issue Jan 14, 2022 · 2 comments · Fixed by #363

Comments

@nemesifier
Copy link
Member

This will need a bit of thought and discussion before we can proceed.

We need a way to display the current OpenWISP version in the UI, however, right now there isn't really an OpenWISP version we can read, but every module has its own version, so maybe we could show the version of each OpenWISP module in use (but how can we dynamically determine the modules in use?).

We could have a system information page in which we show this information along other info (maybe we could show the underlying operating system).

@nemesifier nemesifier added this to To do (general) in OpenWISP Contributor's Board via automation Jan 14, 2022
@nemesifier
Copy link
Member Author

We need a general version, the versions of the modules and some libraries that are important (we can define these).
Would be cool to have a way to show any custom module as well.
If we have a definition of what is an OW module we can do it, eg: add a special variable in the project __init__.py.

@atb00ker atb00ker moved this from To do (general) to To do (Python & Django) in OpenWISP Contributor's Board Jan 31, 2022
@nemesifier
Copy link
Member Author

I think we can consider an openwisp module any python packages starting with openwisp-.
We can then show, additionally and if available, the versions of the following python packages:

  • netjsonconfig
  • netdiff

We can also show a general version number taken from the django project's __init__.py file (eg __openwisp_version__), this being optional (we will set it in ansible-openwisp2 and docker-openwisp).

The logic which fetches these version numbers must be pure python and will be called by a the UI.
The function shall return a list, starting with the general version number and the rest of the openwisp modules in alphabetical order.
The modules which are named with openwisp-, shall be listed only if they're listed in INSTALLED_APPS (watch out as the name is slightly different, eg: openwisp-controller is the name of the python package but internally in the python code is referred as openwisp_controller.config. so the code must be smart enough to figure this out.
Let's prepare another function which also returns a list with the output of the following commands:

  • uname -v (OS version)
  • uname -r (kernel version)
  • uname -i (hardware platform)

We shall then add:

  • a page which shows these version numbers, the modules first and the OS later
  • a menu item with an info icon at the bottom of the menu named "System info"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant