openwisp / openwisp-firmware-upgrader

Firmware upgrade solution for OpenWRT with possibility to add support for other embedded OSes. Provides features like automatic retry for network failures, mass upgrades, REST API and more.
http://openwisp.org
Other
50 stars 58 forks source link

[feature:UI] Show upgrade progress in real time in the UI #224

Open nemesifier opened 1 year ago

nemesifier commented 1 year ago

Right now, when starting firmware upgrade operations, whether for specific devices through the use of the Device Firmware tab, or whether performing a mass upgrade, it is necessary to reload the page to see advancement in the progress, as even our README clarifies (this means we will also have to update the README once this new feature is completed).

With this effort we want to the UI of firmware upgrader operations to work like the one we have in commands on OpenWISP Controller, where the output and result of the command is automatically added to the UI via websocket without the need of reloading the page.

Ideally we should try to reuse and imitate the logic in OpenWISP Controller as much as possible and keep the two consistent. However, in the OpenWISP project we religiously adhere to the DRY principle, therefore duplicating code which can be shared between the two modules will not be acceptable (although duplicating code in the initial iterations and then clean up in the subsequent iterations is ok), this means that a good solution will likely need to make changes in the Controller module in order to allow sharing any relevant logic which would be used by the Firmware Upgrader module.

In the mass upgrade operation feature we will likely have to pay attention to efficiency and scalability to avoid implementing a solution that does not scale well with a high number of devices.

We will need some basic Selenium tests for this feature to make sure it's always working also after future changes we may do, look in other modules like OpenWISP Controller or OpenWISP Utils to find example of Selenium tests.

jihacshnu commented 1 year ago

Sir, I can contribute to your problem.