RDKB-66345 Disable 160MHz if DFS at boot up is false - #83
Conversation
|
📋 PR Format Reminder
Expected: |
There was a problem hiding this comment.
Pull request overview
This PR updates the XB3 wireless configuration UI to honor the RFC flag Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.DFSatBootUp.Enable by preventing users from selecting 160MHz channel bandwidth when DFS-at-boot is disabled.
Changes:
- Reads the DFS-at-boot RFC flag and exposes it to client-side logic.
- Disables the 160MHz (bandwidth) radio option when DFS-at-boot is
"false"(in multiple UI variants). - Applies the same restriction during channel-selection changes and (partially) during initial page load.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| source/Styles/xb3/jst/wireless_network_configuration.jst | Adds DFS-at-boot flag and disables 160MHz bandwidth option based on it. |
| source/Styles/xb3/jst/wireless_network_configuration_resi.jst | Same DFS-at-boot restriction applied to residential variant. |
| source/Styles/xb3/jst/wireless_network_configuration_onestack.jst | Applies DFS-at-boot restriction in the OneStack configuration UI flow. |
| source/Styles/xb3/jst/wireless_network_configuration_edit_onestack.jst | Applies DFS-at-boot restriction in the OneStack edit flow. |
Suppressed comments (2)
source/Styles/xb3/jst/wireless_network_configuration.jst:838
$dfsBootis referenced in the initial page-load bandwidth enable/disable block, but it is only assigned inside the#channel_number1change handler. If the user doesn’t change the channel after page load,$dfsBootwill beundefinedhere and the DFS-at-boot restriction won’t be applied.
$('[name="channel_bandwidth1"]').prop("disabled", false);
if ($dfsBoot == "false") {
$("#channel_bandwidth3").prop("disabled", true);
}
source/Styles/xb3/jst/wireless_network_configuration_resi.jst:744
$dfsBootis referenced in the initial page-load bandwidth enable/disable block, but it is only assigned inside the#channel_number1change handler. If the user doesn’t change the channel after page load,$dfsBootwill beundefinedhere and the DFS-at-boot restriction won’t be applied.
else{
$('[name="channel_bandwidth1"]').prop("disabled", false);
if ($dfsBoot == "false") {
$("#channel_bandwidth3").prop("disabled", true);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (8)
source/Styles/xb3/jst/wireless_network_configuration.jst:838
- On initial page load,
$dfsBootis referenced in the DFS-at-boot restriction check but is only assigned inside the#channel_number1change handler. This means 160MHz may not be disabled at load time when DFS-at-boot is false.
else{
$('[name="channel_bandwidth1"]').prop("disabled", false);
if (("<?% echo( $DFS_Support1);?>" == "true") && $dfsBoot == "false") {
$("#channel_bandwidth3").prop("disabled", true);
source/Styles/xb3/jst/wireless_network_configuration_onestack.jst:927
- The DFS-at-boot restriction is only applied inside the
#channel_number1change handler, but that handler is never triggered on page load. As a result, 160MHz can remain enabled initially even when DFS-at-boot is false.
$dfsBoot= '<?% echo($dfsAtBootup); ?>';
var isDfsPlatformSupported = ("<?% echo( $DFS_Support1);?>" == "true");
if ("165" == $(this).val()){
$('[name="channel_bandwidth1"]:not([value="20MHz"])').prop("disabled", true);
}
source/Styles/xb3/jst/wireless_network_configuration_edit_onestack.jst:693
- When disabling the 160MHz option, the code does not clear it if it is currently selected, which can leave an invalid disabled-but-checked state.
if (isDfsPlatformSupported && $dfsBoot == "false") {
$("#channel_bandwidth3").prop("disabled", true);
}
source/Styles/xb3/jst/wireless_network_configuration.jst:826
- When disabling the 160MHz radio option, the code only disables the input but does not handle the case where 160MHz is currently selected. A disabled-but-checked radio can still drive downstream logic (e.g., channel filtering) and can result in an invalid effective configuration.
This issue also appears on line 834 of the same file.
if (isDfsPlatformSupported && $dfsBoot == "false") {
$("#channel_bandwidth3").prop("disabled", true);
}
source/Styles/xb3/jst/wireless_network_configuration_resi.jst:746
- On initial page load,
$dfsBootis referenced in the DFS-at-boot restriction check but is only assigned inside the#channel_number1change handler. This can leave 160MHz enabled at load time even when DFS-at-boot is false.
else{
$('[name="channel_bandwidth1"]').prop("disabled", false);
if (("<?% echo( $DFS_Support1);?>" == "true") && $dfsBoot == "false") {
$("#channel_bandwidth3").prop("disabled", true);
}
source/Styles/xb3/jst/wireless_network_configuration_resi.jst:732
- When disabling the 160MHz option, the code does not clear it if it is currently selected. This can leave a disabled-but-checked radio which still affects channel filtering logic.
if (isDfsPlatformSupported && $dfsBoot == "false") {
$("#channel_bandwidth3").prop("disabled", true);
}
source/Styles/xb3/jst/wireless_network_configuration_onestack.jst:937
- When disabling the 160MHz option, the code does not clear it if it is currently selected, which can leave a disabled-but-checked radio state.
if (isDfsPlatformSupported && $dfsBoot == "false") {
$("#channel_bandwidth3").prop("disabled", true);
}
source/Styles/xb3/jst/wireless_network_configuration_edit_onestack.jst:681
$dfsBootis referenced in the#channel_numberchange handler, but it is only initialized later in the ready() block. Because this handler is immediately invoked via.trigger("change"), the first run evaluates the DFS-at-boot condition with$dfsBootundefined.
This issue also appears on line 691 of the same file.
$("#channel_number").change(function() {
var isDfsPlatformSupported = ("<?% echo( $DFS_Support1); ?>" == "true");
if ("165" == $(this).val()){
$('[name="channel_bandwidth1"]:not([value="20MHz"])').prop("disabled", true);
is triggered by User Story RDKB-12829