diff --git a/Layout/default/Device/Detail.php b/Layout/default/Device/Detail.php
index afa91e9b1..84bb8bc26 100644
--- a/Layout/default/Device/Detail.php
+++ b/Layout/default/Device/Detail.php
@@ -711,7 +711,7 @@ foreach ($devicesall as $deviceall) {
-devicetype->devicemanufactor->config_backup > count()):
+devicetype->devicemanufactor->config_backup):
$year = date("Y", time());
$month = date("n", time());
@@ -883,7 +883,7 @@ foreach ($devicesall as $deviceall) {
customername = "N/A";
customerid = "N/A";
}
- let orderPort = item['portshort'] + `/` + o;
+ let orderPort = item['portshort'] + `/` + ont.id;
let parts = orderPort.split('/');
let formattedParts = parts.map(num => {
let number = parseInt(num, 10);
@@ -894,12 +894,12 @@ foreach ($devicesall as $deviceall) {
$('#datatable tbody').append(`
- | ` + item['portshort'] + `/` + o + ` |
+ ` + item['portshort'] + `/` + ont.id + ` |
` + customerid + ` |
` + customername + ` |
` + status + ` |
- ` + ont['serial'] + ` |
+ ` + ont['serial'] + ` |
`);
}
@@ -1146,11 +1146,11 @@ foreach ($devicesall as $deviceall) {
status = ''
}
$('#ont-table-body').append(`
- | ` + o + ` |
+ ` + ont.id + ` |
` + status + ` |
|
- ` + ont['serial'] + ` |
+ ` + ont['serial'] + ` |
` + ont['len'] + ` (m) |
|
@@ -1182,6 +1182,7 @@ foreach ($devicesall as $deviceall) {
}
if (thisspan.data('portid') == $('#ont-table').data('portid')) {
+ var countont=0;
$.each(data.data, function (o, ont) {
var eth = ont['eth'];
var rx = (ont['rx'] - 10000) / 100;
@@ -1199,12 +1200,13 @@ foreach ($devicesall as $deviceall) {
} else {
eth = ''
}
-
- $('#ont-table .ont-eth').eq(o).html(eth);
- $('#ont-table .ont-ethspeed').eq(o).html(ont['ethspeed']);
- $('#ont-table .ont-ethdpx').eq(o).html(ont['ethdpx']);
- $('#ont-table .ont-rxtx').eq(o).text(rxdez + "/" + txdez);
- $('#ont-table .ont-equip').eq(o).text(ont['equip']);
+ console.log(countont);
+ $('#ont-table .ont-eth').eq(countont).html(eth);
+ $('#ont-table .ont-ethspeed').eq(countont).html(ont['ethspeed']);
+ $('#ont-table .ont-ethdpx').eq(countont).html(ont['ethdpx']);
+ $('#ont-table .ont-rxtx').eq(countont).text(rxdez + "/" + txdez);
+ $('#ont-table .ont-equip').eq(countont).text(ont['equip']);
+ countont++;
});
}
$('.ont-refresh').show();