From 875fa43915bb42e0709a1fb0b9c748918bcf8809 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Date: Mon, 20 Apr 2026 07:53:53 +0530 Subject: [PATCH 1/8] RDKB-64534 [OneStack][XB10] MTA Line details needs to be fixed as per product in UI for residential gateway --- source/Styles/xb3/jst/mta_Line_Status.jst | 24 ++++++++--------- source/Styles/xb3/jst/qos.jst | 27 +++++++++---------- .../Styles/xb3/jst/voice_quality_metrics.jst | 7 +---- 3 files changed, 25 insertions(+), 33 deletions(-) diff --git a/source/Styles/xb3/jst/mta_Line_Status.jst b/source/Styles/xb3/jst/mta_Line_Status.jst index 07697b9..ccdc859 100644 --- a/source/Styles/xb3/jst/mta_Line_Status.jst +++ b/source/Styles/xb3/jst/mta_Line_Status.jst @@ -33,9 +33,6 @@ $(document).ready(function() { }); -

Router > Connection > MTA > Line Status

@@ -47,16 +44,17 @@ $(document).ready(function() {

MTA Line Status

-
- Line 1 Status: - -
- 1) { ?> -
- Line 2 Status: - -
- + '); + echo('Line ' + $i + ' Status:'); + echo('' + $status + ''); + echo('
'); + } + ?> diff --git a/source/Styles/xb3/jst/qos.jst b/source/Styles/xb3/jst/qos.jst index 05d9684..59d3fc0 100644 --- a/source/Styles/xb3/jst/qos.jst +++ b/source/Styles/xb3/jst/qos.jst @@ -140,20 +140,19 @@ function set_config(jsConfig) CallP State Loop Current - - 1 - - - - - 1) { ?> - - 2 - - - - - + '); + echo('' + $i + ''); + echo(''+ getStr("Device.X_CISCO_COM_MTA.LineTable.$i.CALLP.LCState") +''); + echo(''+ getStr("Device.X_CISCO_COM_MTA.LineTable.$i.CALLP.CallPState") +''); + echo(''+ getStr("Device.X_CISCO_COM_MTA.LineTable.$i.CALLP.LoopCurrent") +''); + echo(''); + } + ?>
diff --git a/source/Styles/xb3/jst/voice_quality_metrics.jst b/source/Styles/xb3/jst/voice_quality_metrics.jst index a7790f5..ec8895e 100644 --- a/source/Styles/xb3/jst/voice_quality_metrics.jst +++ b/source/Styles/xb3/jst/voice_quality_metrics.jst @@ -102,9 +102,6 @@ $(document).ready(function() { }); }); -

Router > Connection > Voice Quality Metrics

@@ -121,9 +118,7 @@ $(document).ready(function() { Call Number From 3031959b1635ad64937ed7a3e9929c6b391f1ea0 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Date: Fri, 24 Apr 2026 18:44:26 +0530 Subject: [PATCH 2/8] RDKB-64534 MTA Line details needs to be fixed as per product in UI for residential gateway --- source/Styles/xb3/jst/voice_quality_metrics.jst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Styles/xb3/jst/voice_quality_metrics.jst b/source/Styles/xb3/jst/voice_quality_metrics.jst index ec8895e..d875079 100644 --- a/source/Styles/xb3/jst/voice_quality_metrics.jst +++ b/source/Styles/xb3/jst/voice_quality_metrics.jst @@ -118,7 +118,10 @@ $(document).ready(function() { Call Number From b91d44233b72fea66b50beabe52581d7fbabeb71 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Date: Mon, 4 May 2026 10:40:09 +0530 Subject: [PATCH 3/8] RDKB-64534 [OneStack][XB10] MTA Line details needs to be fixed as per product in UI for residential gateway --- .../ajaxSet_mta_Line_Diagnostics.jst | 111 +++++---- source/Styles/xb3/jst/locale/global.js | 19 +- .../Styles/xb3/jst/mta_Line_Diagnostics.jst | 210 +++++------------- source/Styles/xb3/jst/mta_Line_Status.jst | 2 +- source/Styles/xb3/jst/qos.jst | 1 - .../Styles/xb3/jst/voice_quality_metrics.jst | 2 +- 6 files changed, 134 insertions(+), 211 deletions(-) diff --git a/source/Styles/xb3/jst/actionHandler/ajaxSet_mta_Line_Diagnostics.jst b/source/Styles/xb3/jst/actionHandler/ajaxSet_mta_Line_Diagnostics.jst index 1a626ec..3d2ff6d 100644 --- a/source/Styles/xb3/jst/actionHandler/ajaxSet_mta_Line_Diagnostics.jst +++ b/source/Styles/xb3/jst/actionHandler/ajaxSet_mta_Line_Diagnostics.jst @@ -22,60 +22,75 @@ if ($_SESSION["loginuser"] == "" || $_SESSION["loginuser"] == false || (!isset($ echo( ''); exit(0); } -function TransEmpty($v) -{ - return (""==$v) ? "Failed" : $v; -} +var $LineTableNumberOfEntries = getStr("Device.X_CISCO_COM_MTA.LineTableNumberOfEntries"); var $arConfig = {}; if (isset($_GET['get_statusx'])) { - $line1hook = getStr("Device.X_CISCO_COM_MTA.LineTable.1.Status"); - $line2hook = getStr("Device.X_CISCO_COM_MTA.LineTable.2.Status"); - $linexhook = "On-Hook"; - sleep(2); - if ("Off-Hook"==$line1hook || "Off-Hook"==$line2hook){ - $linexhook = "Off-Hook"; + $linexhook = "On-Hook"; + for ($i = 1; $i <= $LineTableNumberOfEntries; $i++) { + $lineHook = getStr("Device.X_CISCO_COM_MTA.LineTable.$i.Status"); + if ($lineHook === "Off-Hook") { + $linexhook = "Off-Hook"; + break; // no need to check further + } } - // $linexhook = "Off-Hook"; - $arConfig = {'linexhook':$linexhook}/*p2j-array*/; -} -else if (isset($_GET['get_status1'])) -{ - $line1hook = getStr("Device.X_CISCO_COM_MTA.LineTable.1.Status"); sleep(2); - // $line1hook = "On-Hook"; - $arConfig = {'line1hook':$line1hook}/*p2j-array*/; -} -else if (isset($_GET['get_status2'])) -{ - $line2hook = getStr("Device.X_CISCO_COM_MTA.LineTable.2.Status"); - sleep(2); - // $line2hook = "Off-Hook"; - $arConfig = {'line2hook':$line2hook}/*p2j-array*/; -} -else if (isset($_GET['start_diagnostics1'])) -{ - setStr("Device.X_CISCO_COM_MTA.LineTable.1.TriggerDiagnostics", "true", true); - LogStr( " : webui_event:MTA_line1_diag" ); - sleep(15); - $line1hp = getStr("Device.X_CISCO_COM_MTA.LineTable.1.HazardousPotential"); - $line1femf = getStr("Device.X_CISCO_COM_MTA.LineTable.1.ForeignEMF"); - $line1rf = getStr("Device.X_CISCO_COM_MTA.LineTable.1.ResistiveFaults"); - $line1roh = getStr("Device.X_CISCO_COM_MTA.LineTable.1.ReceiverOffHook"); - $line1re = getStr("Device.X_CISCO_COM_MTA.LineTable.1.RingerEquivalency"); - $arConfig = {'line1hp':$line1hp, 'line1femf':$line1femf, 'line1rf':$line1rf, 'line1roh':$line1roh, 'line1re':$line1re}/*p2j-array*/; + $arConfig = {'linexhook':$linexhook}/*p2j-array*/; } -else if (isset($_GET['start_diagnostics2'])) -{ - setStr("Device.X_CISCO_COM_MTA.LineTable.2.TriggerDiagnostics", "true", true); - LogStr( " : webui_event:MTA_line2_diag" ); - sleep(15); - $line2hp = getStr("Device.X_CISCO_COM_MTA.LineTable.2.HazardousPotential"); - $line2femf = getStr("Device.X_CISCO_COM_MTA.LineTable.2.ForeignEMF"); - $line2rf = getStr("Device.X_CISCO_COM_MTA.LineTable.2.ResistiveFaults"); - $line2roh = getStr("Device.X_CISCO_COM_MTA.LineTable.2.ReceiverOffHook"); - $line2re = getStr("Device.X_CISCO_COM_MTA.LineTable.2.RingerEquivalency"); - $arConfig = {'line2hp':$line2hp, 'line2femf':$line2femf, 'line2rf':$line2rf, 'line2roh':$line2roh, 'line2re':$line2re}/*p2j-array*/; +else { + $line = null; + $action = null; + + /* Detect action and line number dynamically */ + foreach ($_GET as $key => $value) { + if (preg_match('/^(get_status|start_diagnostics)([1-8])$/', $key, $matches)) { + $action = $matches[1]; // get_status or start_diagnostics + $line = (int)$matches[2]; + break; + } + } + + if ($line !== null && $action !== null) { + + /* ===== GET STATUS ===== */ + if ($action === "get_status") { + + $linehook = getStr("Device.X_CISCO_COM_MTA.LineTable.$line.Status"); + sleep(2); + + $arConfig = array( + "line{$line}hook" => $linehook + ); /*p2j-array*/ + } + + /* ===== START DIAGNOSTICS ===== */ + else if ($action === "start_diagnostics") { + + setStr( + "Device.X_CISCO_COM_MTA.LineTable.$line.TriggerDiagnostics", + "true", + true + ); + + LogStr(" : webui_event:MTA_line{$line}_diag"); + + sleep(15); + + $hp = getStr("Device.X_CISCO_COM_MTA.LineTable.$line.HazardousPotential"); + $femf = getStr("Device.X_CISCO_COM_MTA.LineTable.$line.ForeignEMF"); + $rf = getStr("Device.X_CISCO_COM_MTA.LineTable.$line.ResistiveFaults"); + $roh = getStr("Device.X_CISCO_COM_MTA.LineTable.$line.ReceiverOffHook"); + $re = getStr("Device.X_CISCO_COM_MTA.LineTable.$line.RingerEquivalency"); + + $arConfig = array( + "line{$line}hp" => $hp, + "line{$line}femf" => $femf, + "line{$line}rf" => $rf, + "line{$line}roh" => $roh, + "line{$line}re" => $re + ); /*p2j-array*/ + } + } } header("Content-Type: application/json"); $jsConfig = json_encode($arConfig); diff --git a/source/Styles/xb3/jst/locale/global.js b/source/Styles/xb3/jst/locale/global.js index 77946af..b439ffe 100755 --- a/source/Styles/xb3/jst/locale/global.js +++ b/source/Styles/xb3/jst/locale/global.js @@ -643,22 +643,31 @@ $("#mocadiagmess17").text($.i18n("MoCA Network Diagram")); $("#refresh").prop("value", $.i18n('Refresh')); $("#mtalinhead").text($.i18n("Gateway > Connection > MTA > Line Diagnostics")); $("#mtalintip1").text($.i18n("Information related to the MTA Line Diagnostics.")); -$("#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^='mtalinmess3']").text($.i18n("Foreign EMF:")); $("[id^='mtalinmess4']").text($.i18n("Receiver Off Hook:")); $("[id^='mtalinmess5']").text($.i18n("Ringer Equivalency:")); $("#start_diagnostics1,#start_diagnostics2").prop("value", $.i18n('Start Diagnostics')); -$("#mtalinmess6").text($.i18n("MTA Line 2 Diagnostics")); -$("#mtalinmess6").text($.i18n("MTA Line 2 Diagnostics")); -$("#mtalinmess6").text($.i18n("MTA Line 2 Diagnostics")); -$("#mtalinmess6").text($.i18n("MTA Line 2 Diagnostics")); +$("#mtalinediag1").text($.i18n("MTA Line 1 Diagnostics")); +$("#mtalinediag2").text($.i18n("MTA Line 2 Diagnostics")); +$("#mtalinediag3").text($.i18n("MTA Line 3 Diagnostics")); +$("#mtalinediag4").text($.i18n("MTA Line 4 Diagnostics")); +$("#mtalinediag5").text($.i18n("MTA Line 5 Diagnostics")); +$("#mtalinediag6").text($.i18n("MTA Line 6 Diagnostics")); +$("#mtalinediag7").text($.i18n("MTA Line 7 Diagnostics")); +$("#mtalinediag8").text($.i18n("MTA Line 8 Diagnostics")); $("#mtalinstathead").text($.i18n("Gateway > Connection > MTA > Line Status")); $("#mtalinstattip1").text($.i18n("Information related to the MTA Line Status.")); $("#mtalinstatmess1").text($.i18n("MTA Line Status")); $("#mtalinstatmess2").text($.i18n("Line 1 Status:")); $("#mtalinstatmess3").text($.i18n("Line 2 Status:")); +$("#mtalinstatmess4").text($.i18n("Line 3 Status:")); +$("#mtalinstatmess5").text($.i18n("Line 4 Status:")); +$("#mtalinstatmess6").text($.i18n("Line 5 Status:")); +$("#mtalinstatmess7").text($.i18n("Line 6 Status:")); +$("#mtalinstatmess8").text($.i18n("Line 7 Status:")); +$("#mtalinstatmess9").text($.i18n("Line 8 Status:")); $("#mtasiplogmess1").text($.i18n("MTA SIP Packet Log")); $("#mtasiploghead").text($.i18n("Gateway > Connection > MTA >SIP Packet Log")); $("#mtasiplogtip1").text($.i18n("Information related to the SIP Packet Log.")); diff --git a/source/Styles/xb3/jst/mta_Line_Diagnostics.jst b/source/Styles/xb3/jst/mta_Line_Diagnostics.jst index 4275e75..7f89b42 100644 --- a/source/Styles/xb3/jst/mta_Line_Diagnostics.jst +++ b/source/Styles/xb3/jst/mta_Line_Diagnostics.jst @@ -32,129 +32,61 @@ $(document).ready(function() { gateway.page.init("Gateway > Connection > MTA > Line Diagnostics", "nav-mta-line-diagnostics"); - var token = ""; - $("#start_diagnostics1").click(function(){ - var isTest1 = true; - document.getElementById('line1hp').value = "InProgress"; - document.getElementById('line1femf').value = "InProgress"; - document.getElementById('line1rf').value = "InProgress"; - document.getElementById('line1roh').value = "InProgress"; - document.getElementById('line1re').value = "InProgress"; + + $("[id^='start_diagnostics']").on("click", function () { + const line = this.id.replace("start_diagnostics", ""); // 1–8 + + if (line < 1 || line > 8) return; + + // Set all fields to InProgress + ["hp", "femf", "rf", "roh", "re"].forEach(function (item) { + document.getElementById("line" + line + item).value = "InProgress"; + }); + jProgress($.i18n("Check telephony line status, please wait..."), 60); + $.get( "actionHandler/ajaxSet_mta_Line_Diagnostics.jst", - {"get_status1":"true"}, - function(msg) - { + { "get_status"+line: "true" }, + function (msg) { jHide(); - if ("Off-Hook" == msg.line1hook){ + + if (msg["line"+line+"hook"] === "Off-Hook") { jConfirm( - $.i18n("Phone is Off-Hook, do you want to start the test anyway?") - ,$.i18n("Are you sure?") - , function(ret){ - if(ret){ - jProgress($.i18n("This may take several seconds."), 60); - $.get( - "actionHandler/ajaxSet_mta_Line_Diagnostics.jst", - {"start_diagnostics1":"true"}, - function(msg) - { - document.getElementById('line1hp').value = msg.line1hp; - document.getElementById('line1femf').value = msg.line1femf; - document.getElementById('line1rf').value = msg.line1rf; - document.getElementById('line1roh').value = msg.line1roh; - document.getElementById('line1re').value = msg.line1re; - jHide(); - }, - "json" - ); + $.i18n("Phone is Off-Hook, do you want to start the test anyway?"), + $.i18n("Are you sure?"), + function (ret) { + if (ret) { + startDiagnostics(line); + } } - }); - } - else{ - jProgress($.i18n("This may take several seconds..."), 60); - $.get( - "actionHandler/ajaxSet_mta_Line_Diagnostics.jst", - {"start_diagnostics1":"true"}, - function(msg) - { - document.getElementById('line1hp').value = msg.line1hp; - document.getElementById('line1femf').value = msg.line1femf; - document.getElementById('line1rf').value = msg.line1rf; - document.getElementById('line1roh').value = msg.line1roh; - document.getElementById('line1re').value = msg.line1re; - jHide(); - }, - "json" ); + } else { + startDiagnostics(line); } }, - "json" + "json" ); }); - $("#start_diagnostics2").click(function(){ - document.getElementById('line2hp').value = "InProgress"; - document.getElementById('line2femf').value = "InProgress"; - document.getElementById('line2rf').value = "InProgress"; - document.getElementById('line2roh').value = "InProgress"; - document.getElementById('line2re').value = "InProgress"; - jProgress($.i18n("Check telephony line status, please wait..."), 60); + + function startDiagnostics(line) { + jProgress($.i18n("This may take several seconds..."), 60); + $.get( "actionHandler/ajaxSet_mta_Line_Diagnostics.jst", - {"get_status2":"true"}, - function(msg) - { + { "start_diagnostics"+line: "true" }, + function (msg) { + ["hp", "femf", "rf", "roh", "re"].forEach(function (item) { + document.getElementById("line" + line + item).value = + msg["line" + line + item]; + }); jHide(); - if ("Off-Hook" == msg.line2hook){ - jConfirm( - $.i18n("Phone is Off-Hook, do you want to start the test anyway?") - , $.i18n("Are you sure?") - , function(ret){ - if(ret){ - jProgress($.i18n("This may take several seconds..."), 60); - $.get( - "actionHandler/ajaxSet_mta_Line_Diagnostics.jst", - {"start_diagnostics2":"true"}, - function(msg) - { - document.getElementById('line2hp').value = msg.line2hp; - document.getElementById('line2femf').value = msg.line2femf; - document.getElementById('line2rf').value = msg.line2rf; - document.getElementById('line2roh').value = msg.line2roh; - document.getElementById('line2re').value = msg.line2re; - jHide(); - }, - "json" - ); - } - }); - } - else{ - jProgress($.i18n("This may take several seconds..."), 60); - $.get( - "actionHandler/ajaxSet_mta_Line_Diagnostics.jst", - {"start_diagnostics2":"true"}, - function(msg) - { - document.getElementById('line2hp').value = msg.line2hp; - document.getElementById('line2femf').value = msg.line2femf; - document.getElementById('line2rf').value = msg.line2rf; - document.getElementById('line2roh').value = msg.line2roh; - document.getElementById('line2re').value = msg.line2re; - jHide(); - }, - "json" - ); - } }, - "json" + "json" ); - }); + } }); -

Router > Connection > MTA > Line Diagnostics

@@ -164,75 +96,43 @@ $(document).ready(function() {

Information related to the MTA Line Diagnostics.

+
- -

MTA Line 1 Diagnostics

+ +

MTA Line Diagnostics

-Hazardous Potential: - - -
-
-
Foreign EMF:
- - -
-
-
Resistive Faults:
- - -
-
-
Receiver Off Hook:
- - -
-
-
Ringer Equivalency:
- - -
-
- -
- -
- 1) { ?> -
- - - -

MTA Line 2 Diagnostics

-
-
Hazardous Potential:
- - + Hazardous Potential: + +
Foreign EMF:
- - + +
Resistive Faults:
- - + +
Receiver Off Hook:
- - + +
Ringer Equivalency:
- - + +
- +
diff --git a/source/Styles/xb3/jst/mta_Line_Status.jst b/source/Styles/xb3/jst/mta_Line_Status.jst index ccdc859..bf4acbf 100644 --- a/source/Styles/xb3/jst/mta_Line_Status.jst +++ b/source/Styles/xb3/jst/mta_Line_Status.jst @@ -50,7 +50,7 @@ $(document).ready(function() { var $status = getStr("Device.X_CISCO_COM_MTA.LineTable." + $i + ".Status"); var $rowClass = ($i % 2 == 0) ? "form-row odd" : "form-row"; echo('
'); - echo('Line ' + $i + ' Status:'); + echo('Line ' + $i + ' Status:'); echo('' + $status + ''); echo('
'); } diff --git a/source/Styles/xb3/jst/qos.jst b/source/Styles/xb3/jst/qos.jst index 59d3fc0..24b1c7a 100644 --- a/source/Styles/xb3/jst/qos.jst +++ b/source/Styles/xb3/jst/qos.jst @@ -143,7 +143,6 @@ function set_config(jsConfig) '); echo('' + $i + ''); diff --git a/source/Styles/xb3/jst/voice_quality_metrics.jst b/source/Styles/xb3/jst/voice_quality_metrics.jst index d875079..791cffa 100644 --- a/source/Styles/xb3/jst/voice_quality_metrics.jst +++ b/source/Styles/xb3/jst/voice_quality_metrics.jst @@ -33,7 +33,7 @@ if (isset($_GET['line'])) //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']) && $_GET['line'] >= 1 && $_GET['line'] <= getStr("Device.X_CISCO_COM_MTA.LineTableNumberOfEntries")) && ((preg_match('/^(50|[1234][0-9]|[1-9])$/', $_GET['call'])) || $_GET['call'] == 'all' || $_GET['call'] == 'table') && ($_GET['action'] == 'display' || $_GET['action'] == 'clear_line' || $_GET['action'] == 'clear_all') ){ From e7303dd3dfe485c24cb80f42ae250ec4ee876997 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Date: Tue, 5 May 2026 10:26:51 +0530 Subject: [PATCH 4/8] RDKB-64534 mta_Line_Diagnostics.jst --- .../ajaxSet_mta_Line_Diagnostics.jst | 56 ++++++++++--------- .../Styles/xb3/jst/mta_Line_Diagnostics.jst | 6 +- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/source/Styles/xb3/jst/actionHandler/ajaxSet_mta_Line_Diagnostics.jst b/source/Styles/xb3/jst/actionHandler/ajaxSet_mta_Line_Diagnostics.jst index 3d2ff6d..1da2028 100644 --- a/source/Styles/xb3/jst/actionHandler/ajaxSet_mta_Line_Diagnostics.jst +++ b/source/Styles/xb3/jst/actionHandler/ajaxSet_mta_Line_Diagnostics.jst @@ -28,7 +28,7 @@ if (isset($_GET['get_statusx'])) { $linexhook = "On-Hook"; for ($i = 1; $i <= $LineTableNumberOfEntries; $i++) { - $lineHook = getStr("Device.X_CISCO_COM_MTA.LineTable.$i.Status"); + $lineHook = getStr("Device.X_CISCO_COM_MTA.LineTable."+$i+".Status"); if ($lineHook === "Off-Hook") { $linexhook = "Off-Hook"; break; // no need to check further @@ -41,54 +41,56 @@ else { $line = null; $action = null; - /* Detect action and line number dynamically */ - foreach ($_GET as $key => $value) { - if (preg_match('/^(get_status|start_diagnostics)([1-8])$/', $key, $matches)) { - $action = $matches[1]; // get_status or start_diagnostics - $line = (int)$matches[2]; - break; + /* Detect line number */ + for($key in $_GET) { + if ($key.startsWith("get_status")) { + $line = $key.slice("get_status".length); + $action = "get_status"; + } else if ($key.startsWith("start_diagnostics")) { + $line = $key.slice("start_diagnostics".length); + $action = "start_diagnostics"; } } if ($line !== null && $action !== null) { /* ===== GET STATUS ===== */ - if ($action === "get_status") { + if ($action == "get_status") { - $linehook = getStr("Device.X_CISCO_COM_MTA.LineTable.$line.Status"); + $linehook = getStr("Device.X_CISCO_COM_MTA.LineTable."+$line+".Status"); sleep(2); - $arConfig = array( - "line{$line}hook" => $linehook - ); /*p2j-array*/ + $arConfig = { + ["line" + $line + "hook"]: $linehook + }/*p2j-array*/; } /* ===== START DIAGNOSTICS ===== */ - else if ($action === "start_diagnostics") { + else if ($action == "start_diagnostics") { setStr( - "Device.X_CISCO_COM_MTA.LineTable.$line.TriggerDiagnostics", + "Device.X_CISCO_COM_MTA.LineTable."+$line+".TriggerDiagnostics", "true", true ); - LogStr(" : webui_event:MTA_line{$line}_diag"); + LogStr(" : webui_event:MTA_line"+$line+"_diag"); sleep(15); - $hp = getStr("Device.X_CISCO_COM_MTA.LineTable.$line.HazardousPotential"); - $femf = getStr("Device.X_CISCO_COM_MTA.LineTable.$line.ForeignEMF"); - $rf = getStr("Device.X_CISCO_COM_MTA.LineTable.$line.ResistiveFaults"); - $roh = getStr("Device.X_CISCO_COM_MTA.LineTable.$line.ReceiverOffHook"); - $re = getStr("Device.X_CISCO_COM_MTA.LineTable.$line.RingerEquivalency"); + $hp = getStr("Device.X_CISCO_COM_MTA.LineTable."+$line+".HazardousPotential"); + $femf = getStr("Device.X_CISCO_COM_MTA.LineTable."+$line+".ForeignEMF"); + $rf = getStr("Device.X_CISCO_COM_MTA.LineTable."+$line+".ResistiveFaults"); + $roh = getStr("Device.X_CISCO_COM_MTA.LineTable."+$line+".ReceiverOffHook"); + $re = getStr("Device.X_CISCO_COM_MTA.LineTable."+$line+".RingerEquivalency"); - $arConfig = array( - "line{$line}hp" => $hp, - "line{$line}femf" => $femf, - "line{$line}rf" => $rf, - "line{$line}roh" => $roh, - "line{$line}re" => $re - ); /*p2j-array*/ + $arConfig = { + ["line"+$line+"hp"] : $hp, + ["line"+$line+"femf"] : $femf, + ["line"+$line+"rf"] : $rf, + ["line"+$line+"roh"] : $roh, + ["line"+$line+"re"] : $re + }; /*p2j-array*/ } } } diff --git a/source/Styles/xb3/jst/mta_Line_Diagnostics.jst b/source/Styles/xb3/jst/mta_Line_Diagnostics.jst index 7f89b42..3ad6185 100644 --- a/source/Styles/xb3/jst/mta_Line_Diagnostics.jst +++ b/source/Styles/xb3/jst/mta_Line_Diagnostics.jst @@ -47,7 +47,7 @@ $(document).ready(function() { $.get( "actionHandler/ajaxSet_mta_Line_Diagnostics.jst", - { "get_status"+line: "true" }, + { ["get_status"+line]: "true" }, function (msg) { jHide(); @@ -74,7 +74,7 @@ $(document).ready(function() { $.get( "actionHandler/ajaxSet_mta_Line_Diagnostics.jst", - { "start_diagnostics"+line: "true" }, + { ["start_diagnostics"+line]: "true" }, function (msg) { ["hp", "femf", "rf", "roh", "re"].forEach(function (item) { document.getElementById("line" + line + item).value = @@ -98,7 +98,7 @@ $(document).ready(function() {
From 3c47975c0ecd2005a6d00050369a803b8bd4d103 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Reddy B <57708013+pavankumar464@users.noreply.github.com> Date: Tue, 5 May 2026 10:37:02 +0530 Subject: [PATCH 5/8] Potential fix for pull request finding compares $_GET['line'] (string) against getStr("...LineTableNumberOfEntries") Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- source/Styles/xb3/jst/voice_quality_metrics.jst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Styles/xb3/jst/voice_quality_metrics.jst b/source/Styles/xb3/jst/voice_quality_metrics.jst index 791cffa..08977f7 100644 --- a/source/Styles/xb3/jst/voice_quality_metrics.jst +++ b/source/Styles/xb3/jst/voice_quality_metrics.jst @@ -33,7 +33,7 @@ if (isset($_GET['line'])) //line only 1, 2 are allowed //call only 1, 50 are allowed //action only display, clear_line, clear_all are allowed - if ((isset($_GET['line']) && $_GET['line'] >= 1 && $_GET['line'] <= getStr("Device.X_CISCO_COM_MTA.LineTableNumberOfEntries")) && + 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') && ($_GET['action'] == 'display' || $_GET['action'] == 'clear_line' || $_GET['action'] == 'clear_all') ){ From 99b6cb299c809244cea1ae75a04cb28d63a5c959 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Reddy B <57708013+pavankumar464@users.noreply.github.com> Date: Tue, 5 May 2026 10:37:48 +0530 Subject: [PATCH 6/8] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- source/Styles/xb3/jst/qos.jst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Styles/xb3/jst/qos.jst b/source/Styles/xb3/jst/qos.jst index 24b1c7a..3728f21 100644 --- a/source/Styles/xb3/jst/qos.jst +++ b/source/Styles/xb3/jst/qos.jst @@ -146,9 +146,9 @@ function set_config(jsConfig) var $rowClass = ($i % 2 == 0) ? "odd" : ""; echo(''); echo('' + $i + ''); - echo(''+ getStr("Device.X_CISCO_COM_MTA.LineTable.$i.CALLP.LCState") +''); - echo(''+ getStr("Device.X_CISCO_COM_MTA.LineTable.$i.CALLP.CallPState") +''); - echo(''+ getStr("Device.X_CISCO_COM_MTA.LineTable.$i.CALLP.LoopCurrent") +''); + echo(''+ getStr("Device.X_CISCO_COM_MTA.LineTable."+$i+".CALLP.LCState") +''); + echo(''+ getStr("Device.X_CISCO_COM_MTA.LineTable."+$i+".CALLP.CallPState") +''); + echo(''+ getStr("Device.X_CISCO_COM_MTA.LineTable."+$i+".CALLP.LoopCurrent") +''); echo(''); } ?> From 702632f3a725c12d61753a83f2cb5c05976664c5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 May 2026 05:08:01 +0000 Subject: [PATCH 7/8] RDKB-64534 Fix voice_quality_metrics.jst: dynamic msg_no_data elements 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> --- source/Styles/xb3/jst/voice_quality_metrics.jst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/Styles/xb3/jst/voice_quality_metrics.jst b/source/Styles/xb3/jst/voice_quality_metrics.jst index 08977f7..21c8b33 100644 --- a/source/Styles/xb3/jst/voice_quality_metrics.jst +++ b/source/Styles/xb3/jst/voice_quality_metrics.jst @@ -145,8 +145,10 @@ $(document).ready(function() { - - +
There is no data to display for Line '+$m+'.
'); + ?>
Date: Tue, 5 May 2026 14:24:19 +0530 Subject: [PATCH 8/8] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- source/Styles/xb3/jst/locale/global.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Styles/xb3/jst/locale/global.js b/source/Styles/xb3/jst/locale/global.js index b439ffe..cd45f4e 100755 --- a/source/Styles/xb3/jst/locale/global.js +++ b/source/Styles/xb3/jst/locale/global.js @@ -644,11 +644,11 @@ $("#refresh").prop("value", $.i18n('Refresh')); $("#mtalinhead").text($.i18n("Gateway > Connection > MTA > Line Diagnostics")); $("#mtalintip1").text($.i18n("Information related to the MTA Line 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")); $("[id^='mtalinmess3']").text($.i18n("Foreign EMF:")); $("[id^='mtalinmess4']").text($.i18n("Receiver Off Hook:")); $("[id^='mtalinmess5']").text($.i18n("Ringer Equivalency:")); -$("#start_diagnostics1,#start_diagnostics2").prop("value", $.i18n('Start Diagnostics')); +$("[id^='start_diagnostics']").prop("value", $.i18n('Start Diagnostics')); $("#mtalinediag1").text($.i18n("MTA Line 1 Diagnostics")); $("#mtalinediag2").text($.i18n("MTA Line 2 Diagnostics")); $("#mtalinediag3").text($.i18n("MTA Line 3 Diagnostics"));