RDKB-64534 [OneStack][XB10] MTA Line details needs to be fixed as per product in UI for residential gateway#119
RDKB-64534 [OneStack][XB10] MTA Line details needs to be fixed as per product in UI for residential gateway#119pavankumar464 wants to merge 9 commits intodevelopfrom
Conversation
… product in UI for residential gateway
…r residential gateway
There was a problem hiding this comment.
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.
… product in UI for residential gateway
There was a problem hiding this comment.
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.
compares $_GET['line'] (string) against getStr("...LineTableNumberOfEntries")
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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>
There was a problem hiding this comment.
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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.
| //line only 1, 2 are allowed | ||
| //call only 1, 50 are allowed | ||
| //action only display, clear_line, clear_all are allowed | ||
| if (($_GET['line'] == '1' || $_GET['line'] == '2') && | ||
| if ((isset($_GET['line']) && Number($_GET['line']) >= 1 && Number($_GET['line']) <= Number(getStr("Device.X_CISCO_COM_MTA.LineTableNumberOfEntries"))) && | ||
| ((preg_match('/^(50|[1234][0-9]|[1-9])$/', $_GET['call'])) || $_GET['call'] == 'all' || $_GET['call'] == 'table') && |
| 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>'); |
| $("#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")); |
| for($key in $_GET) { | ||
| if ($key.startsWith("get_status")) { | ||
| $line = $key.slice("get_status".length); | ||
| $action = "get_status"; | ||
| } else if ($key.startsWith("start_diagnostics")) { |
| 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 | ||
| ); |
| $linehook = getStr("Device.X_CISCO_COM_MTA.LineTable."+$line+".Status"); | ||
| sleep(2); | ||
|
|
||
| $arConfig = { | ||
| ["line" + $line + "hook"]: $linehook | ||
| }/*p2j-array*/; | ||
| } |
| $("[id^='start_diagnostics']").on("click", function () { | ||
| const line = this.id.replace("start_diagnostics", ""); // 1–8 | ||
|
|
||
| if (line < 1 || line > 8) return; |
| $arConfig = { | ||
| ["line"+$line+"hp"] : $hp, | ||
| ["line"+$line+"femf"] : $femf, | ||
| ["line"+$line+"rf"] : $rf, | ||
| ["line"+$line+"roh"] : $roh, | ||
| ["line"+$line+"re"] : $re | ||
| }; /*p2j-array*/ |
No description provided.