FreePBX / ucp

Module of FreePBX (User Control Panel) :: The user control panel is a way for users to control call handling and personal settings from a web browser.
http://www.freepbx.org
GNU Affero General Public License v3.0
4 stars 18 forks source link

Fixed 44. The issue of UCP attempts connection to node server even when it is disabled. #13

Closed ArunbalanNV closed 8 months ago

ArunbalanNV commented 8 months ago

Current Behavior:

image

At present, the module operates as follows:

The NODEJSENABLED value applies to the backend server only during UCP module installation. This means that enabling or disabling the node server for UCP requires setting the NODEJSENABLED value from the advanced settings page and then performing a module install. For the frontend to take action on the updated value of NODEJSENABLED , a page reload is necessary.

Issue Description:

The issue arises when the UCP attempts to connect to the UCP node server even when it's disabled, but only under specific conditions. This occurs when the UI is initially loaded with the NODEJSENABLED value set to 'yes', and later it's changed to 'no'.

Expected Behavior:

Following the provided steps in the Current Behavior session should prevent the specified error. But normally, users anticipate an immediate effect on the already loaded page when the value in the advanced settings is altered. For a smoother user experience, immediate reflection is preferred, at least for the transition of node js server configuration value from enabled to disabled

Solution:

To address this, a client-side check has been added to display a warning only if the NODEJSENABLED value is enabled in the advanced settings.