Skip to content

RDKB-64534 [OneStack][XB10] MTA Line details needs to be fixed as per product in UI for residential gateway#119

Open
pavankumar464 wants to merge 10 commits intodevelopfrom
bug/RDKB-64534
Open

RDKB-64534 [OneStack][XB10] MTA Line details needs to be fixed as per product in UI for residential gateway#119
pavankumar464 wants to merge 10 commits intodevelopfrom
bug/RDKB-64534

Conversation

@pavankumar464
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 29, 2026 02:40
@pavankumar464 pavankumar464 requested review from a team as code owners April 29, 2026 02:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the XB3 web UI templates to render MTA/voice line details based on the device-reported number of line entries, instead of being hard-coded for only 1–2 lines (targeting residential gateway product variants like XB10).

Changes:

  • Generate the “Line Number” dropdown options dynamically in voice_quality_metrics.jst.
  • Render CALLP/QoS per-line table rows dynamically in qos.jst.
  • Render MTA Line Status per-line rows dynamically in mta_Line_Status.jst.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
source/Styles/xb3/jst/voice_quality_metrics.jst Dynamically populates the line-number selector based on LineTableNumberOfEntries.
source/Styles/xb3/jst/qos.jst Replaces hard-coded line 1/2 rows with a loop over all line entries.
source/Styles/xb3/jst/mta_Line_Status.jst Replaces hard-coded line 1/2 status blocks with a loop over all line entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/Styles/xb3/jst/qos.jst Outdated
Comment thread source/Styles/xb3/jst/qos.jst Outdated
Comment thread source/Styles/xb3/jst/mta_Line_Status.jst Outdated
Comment thread source/Styles/xb3/jst/voice_quality_metrics.jst
Copilot AI review requested due to automatic review settings May 5, 2026 04:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/Styles/xb3/jst/voice_quality_metrics.jst Outdated
Comment thread source/Styles/xb3/jst/qos.jst Outdated
Comment thread source/Styles/xb3/jst/mta_Line_Status.jst Outdated
Comment thread source/Styles/xb3/jst/mta_Line_Diagnostics.jst
Comment thread source/Styles/xb3/jst/locale/global.js
Comment thread source/Styles/xb3/jst/actionHandler/ajaxSet_mta_Line_Diagnostics.jst Outdated
Comment thread source/Styles/xb3/jst/actionHandler/ajaxSet_mta_Line_Diagnostics.jst Outdated
compares $_GET['line'] (string) against getStr("...LineTableNumberOfEntries")

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 5, 2026 05:07
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…s and numeric line validation

Agent-Logs-Url: https://github.com/rdkcentral/webui/sessions/a1f497b4-bc28-469d-acde-49047bf774e4

Co-authored-by: pavankumar464 <57708013+pavankumar464@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/Styles/xb3/jst/voice_quality_metrics.jst
Comment thread source/Styles/xb3/jst/voice_quality_metrics.jst
Comment thread source/Styles/xb3/jst/mta_Line_Status.jst Outdated
Comment thread source/Styles/xb3/jst/mta_Line_Diagnostics.jst Outdated
Comment thread source/Styles/xb3/jst/locale/global.js Outdated
Comment thread source/Styles/xb3/jst/actionHandler/ajaxSet_mta_Line_Diagnostics.jst Outdated
Comment thread source/Styles/xb3/jst/actionHandler/ajaxSet_mta_Line_Diagnostics.jst Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 5, 2026 08:54
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/Styles/xb3/jst/voice_quality_metrics.jst Outdated
var $status = getStr("Device.X_CISCO_COM_MTA.LineTable." + $i + ".Status");
var $rowClass = ($i % 2 == 0) ? "form-row odd" : "form-row";
echo('<div class="' + $rowClass + '">');
echo('<span class="readonlyLabel" id="mtalinstatmess' + $i + '">Line ' + $i + ' Status:</span>');
Comment thread source/Styles/xb3/jst/locale/global.js Outdated
$("#mtalinmess1").text($.i18n("MTA Line 1 Diagnostics"));
$("[id^='mtalinmess2']").text($.i18n("Hazardous Potential:"));
$("#line1hp,#line1hp,#line1femf,#line1rf,#line1roh,#line1re,#line2hp,#line2femf,#line2rf,#line2roh,#line2re").text($.i18n("Not Started"));
$("[id^='line'][id$='hp'],[id^='line'][id$='femf'],[id^='line'][id$='rf'],[id^='line'][id$='roh'],[id^='line'][id$='re']").text($.i18n("Not Started"));
Comment on lines +45 to +49
for($key in $_GET) {
if ($key.startsWith("get_status")) {
$line = $key.slice("get_status".length);
$action = "get_status";
} else if ($key.startsWith("start_diagnostics")) {
Comment on lines +55 to +75
if ($line !== null && $action !== null) {

/* ===== GET STATUS ===== */
if ($action == "get_status") {

$linehook = getStr("Device.X_CISCO_COM_MTA.LineTable."+$line+".Status");
sleep(2);

$arConfig = {
["line" + $line + "hook"]: $linehook
}/*p2j-array*/;
}

/* ===== START DIAGNOSTICS ===== */
else if ($action == "start_diagnostics") {

setStr(
"Device.X_CISCO_COM_MTA.LineTable."+$line+".TriggerDiagnostics",
"true",
true
);
Comment on lines +60 to +66
$linehook = getStr("Device.X_CISCO_COM_MTA.LineTable."+$line+".Status");
sleep(2);

$arConfig = {
["line" + $line + "hook"]: $linehook
}/*p2j-array*/;
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already applied in commit d2047b6. Both the get_status response (line 65) and start_diagnostics response (lines 81–85) now use ES5 bracket assignment ($arConfig["line"+$line+"hook"] = $linehook) instead of ES6 computed property name object literals.

Comment on lines +36 to +39
$("[id^='start_diagnostics']").on("click", function () {
const line = this.id.replace("start_diagnostics", ""); // 1–8

if (line < 1 || line > 8) return;
Comment on lines +87 to +93
$arConfig = {
["line"+$line+"hp"] : $hp,
["line"+$line+"femf"] : $femf,
["line"+$line+"rf"] : $rf,
["line"+$line+"roh"] : $roh,
["line"+$line+"re"] : $re
}; /*p2j-array*/
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in commit d2047b6. All ES6 computed property names replaced with ES5 bracket assignment ($arConfig["line"+$line+"hp"] = ...), and the for($key in $_GET) + startsWith() pattern replaced with an explicit isset() loop over line indices that is fully ES5-compatible. Additional related fixes in the same commit: hard-coded > 8 guard in mta_Line_Diagnostics.jst replaced with server-rendered voiceLines, duplicate mtalinstatmess1 ID in mta_Line_Status.jst fixed with +1 offset, .text() changed to .val() for textareas in locale/global.js, and integer-only regex validation added to voice_quality_metrics.jst.

…d int validation

Agent-Logs-Url: https://github.com/rdkcentral/webui/sessions/e3dfd3e0-6ed8-4baf-bbea-fda32f9bcbb3

Co-authored-by: pavankumar464 <57708013+pavankumar464@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants