@@ -356,7 +348,6 @@ if ($devices->power != "0.0") {
| Datum/Uhrzeit |
|
-
@@ -366,8 +357,7 @@ if ($devices->power != "0.0") {
$configid = $config->id;
if ($configfileCleartext && $configfileCompressed) :
$configLinks = '
- TXT /
+ TXT /
XML';
elseif ($configfileCleartext || $configfileCompressed) :
$configLinks = '
@@ -411,8 +401,6 @@ if ($devices->power != "0.0") {
-
-
@@ -427,8 +415,6 @@ if ($devices->power != "0.0") {
Kunde |
Stat. |
Serial |
-
-
|
@@ -462,7 +448,7 @@ if ($devices->power != "0.0") {
-
AllgemeinAllgemein
power != "0.0") {
/ N/A
-
-
-
-
| RX-Pegel OLT |
power != "0.0") {
|
+
MAC-Adressen
+
+
+
+
Service Ports
@@ -603,8 +600,6 @@ if ($devices->power != "0.0") {
| Status |
Downstream |
Upstream |
-
-
@@ -737,7 +732,7 @@ if ($devices->power != "0.0") {
` + customername + ` |
` + status + ` |
- ` + ont['serial'] + ` |
+ ` + ont['serial'] + ` |
`);
@@ -837,8 +832,10 @@ if ($devices->power != "0.0") {
table.draw();
}
+ }).fail(function (jqxhr, textStatus, error) {
+ window.location.href = "Dashboard";
+ console.log("Request Failed: " + err);
});
- ;
});
@@ -897,9 +894,7 @@ if ($devices->power != "0.0") {
$(this).html('');
$(this).data('shown', '1');
var oltport = $(this).data('oltport');
- // $('#olt-body').append(`
- //
- //
`);
+
$('#olt-body').append(`` + $('#olt-port-table').html() + `
`);
$("#ont-line-table .sp-port-lines").each(function (index) {
@@ -908,27 +903,30 @@ if ($devices->power != "0.0") {
}
});
-
-
$('#olt-body').append(`
| ONT's |
-
-
+
+
| ONT ID |
-
Stat. |
Type |
Serial |
Distance |
-
Eth |
Eth Spd/Dpx |
-
`);
+
+
`);
$.getJSON("https://= $_SERVER['SERVER_NAME']; ?>/Device/api?do=getoltinfo&ip== $devices->ip; ?>&portid=" + thisspan.data('portid'), {})
.done(function (data) {
+ if (typeof data.success === 'undefined') {
+ console.log('logged out');
+ // window.location.href = "/";
+
+ }
+
$.each(data.data[0]['ont'], function (o, ont) {
var status;
if (ont.status == "1") {
@@ -966,6 +964,12 @@ if ($devices->power != "0.0") {
}).done(function (data) {
$.getJSON("https://= $_SERVER['SERVER_NAME']; ?>/Device/api?do=getoltinfo&ip== $devices->ip; ?>&portid=" + thisspan.data('portid') + "&adv=ext", {}).done(function (data) {
+ if (typeof data.success === 'undefined') {
+ console.log('logged out');
+ // window.location.href = "/";
+
+ }
+
if (thisspan.data('portid') == $('#ont-table').data('portid')) {
$.each(data.data, function (o, ont) {
var eth = ont['eth'];
@@ -996,6 +1000,9 @@ if ($devices->power != "0.0") {
});
+ }).fail(function (jqxhr, textStatus, error) {
+ window.location.href = "Dashboard";
+ console.log("Request Failed: " + err);
});
}
});
@@ -1004,6 +1011,8 @@ if ($devices->power != "0.0") {
$('.ont-refresh-span').html('
');
$('.sp-splitter-count-show').addClass('noclick');
$.getJSON("https://= $_SERVER['SERVER_NAME']; ?>/Device/api?do=getoltinfo&ip== $devices->ip; ?>&portid=" + thisspan.data('portid') + "&adv=ext", {}).done(function (data) {
+
+
if (thisspan.data('portid') == $('#ont-table').data('portid')) {
$.each(data.data, function (o, ont) {
var eth = ont['eth'];
@@ -1033,7 +1042,11 @@ if ($devices->power != "0.0") {
$('.ont-refresh-span').html('
');
$('.ont-refresh').show();
$('.sp-splitter-count-show').removeClass('noclick');
+ }).fail(function (jqxhr, textStatus, error) {
+ window.location.href = "Dashboard";
+ console.log("Request Failed: " + err);
});
+ ;
});
@@ -1054,19 +1067,23 @@ if ($devices->power != "0.0") {
customername = "N/A";
customerid = "N/A";
}
-
+ $('#ont-macadresses').empty();
$('.ont-line-stat').text('N/A');
$('#ont-detail-kd').text(customername);
$('#ont-detail-lastofflinecause').attr('data-original-title', '');
- $('#ont-deteil-spinner').show();
+ $('#ont-detail-spinner').show();
$('#ont-detail-refresh').hide();
$('#ont-serviceports').empty();
$('#ont-detail-refresh').data('portid', button.data('portid'));
$('#ont-detail-refresh').data('port', button.data('port'));
$('#ont-detail-refresh').data('ontid', button.data('ontid'));
- $('#ont-detail-refresh').data('snr', button.data('snr'));
+ $('#ont-detail-mac-refresh').data('snr', button.data('snr'));
+ $('#ont-detail-mac-refresh').data('portid', button.data('portid'));
+ $('#ont-detail-mac-refresh').data('port', button.data('port'));
+ $('#ont-detail-mac-refresh').data('ontid', button.data('ontid'));
+ $('#ont-detail-mac-refresh').data('snr', button.data('snr'));
$.getJSON("https://= $_SERVER['SERVER_NAME']; ?>/Device/api?do=getontinfo&ip== $devices->ip; ?>&portid=" + button.data('portid') + "&ont=" + button.data('port') + '-' + button.data('ontid'), {}).done(function (data) {
$.each(data.data.linestat, function (o, ont) {
@@ -1105,12 +1122,51 @@ if ($devices->power != "0.0") {
});
}
- $('#ont-deteil-spinner').hide();
+ $('#ont-detail-spinner').hide();
$('#ont-detail-refresh').show();
+ }).fail(function (jqxhr, textStatus, error) {
+ window.location.href = "Dashboard";
+ console.log("Request Failed: " + err);
});
+ ;
});
+ $("body").on("click", "#ont-detail-mac-refresh", function () {
+ $('#ont-detail-mac-spinner').show();
+ $('#ont-detail-mac-refresh').hide();
+ var button = $('#ont-detail-mac-refresh');
+ $('#ont-macadresses').empty();
+ $('#ont-macadresses-nomac').remove();
+ $.getJSON("https://= $_SERVER['SERVER_NAME']; ?>/Device/api?do=getontinfomac&ip== $devices->ip; ?>&portid=" + button.data('portid') + "&ont=" + button.data('port') + '-' + button.data('ontid'), {}).done(function (data) {
+ if (typeof data.data !== 'undefined' && data.data.length > 0) {
+ $('#ont-macadresses').html(`
+
+ | Mac |
+ Vlan |
+
+`);
+ $.each(data.data, function (o, mac) {
+ $('#ont-macadresses').append(`
+ | ` + mac.mac + ` |
+ ` + mac.vlan + ` |
+
`);
+ });
+ } else {
+ $('#ont-macadresses').append(`
+ | Keine Mac-Adressen verfügbar |
+
+
`);
+ }
+ $('#ont-detail-mac-spinner').hide();
+ $('#ont-detail-mac-refresh').show();
+ }).fail(function (jqxhr, textStatus, error) {
+ window.location.href = "Dashboard";
+ });
+ ;
+ });
+
+
$("body").on("click", "#ont-detail-refresh", function () {
let customername;
let customerid;
@@ -1131,8 +1187,8 @@ if ($devices->power != "0.0") {
$('.ont-line-stat').text('N/A');
$('#ont-detail-kd').text(customername);
$('#ont-detail-lastofflinecause').attr('data-original-title', '');
-
- $('#ont-deteil-spinner').show();
+ $('#ont-macadresses').empty();
+ $('#ont-detail-spinner').show();
$('#ont-detail-refresh').hide();
$('#ont-serviceports').empty();
$('#ont-detail-refresh').data('portid', button.data('portid'));
@@ -1169,21 +1225,19 @@ if ($devices->power != "0.0") {
` + operstatus + ` |
` + ont.traficdescrx + ` |
` + ont.traficdesctx + ` |
-
`)
});
}
-
- $('#ont-deteil-spinner').hide();
+ $('#ont-detail-spinner').hide();
$('#ont-detail-refresh').show();
+ }).fail(function (jqxhr, textStatus, error) {
+ window.location.href = "Dashboard";
});
-
+ ;
});
$('[data-toggle="tooltip"]').tooltip()
-
-
});
diff --git a/application/Device/DeviceController.php b/application/Device/DeviceController.php
index cbd143567..8c54f89e2 100644
--- a/application/Device/DeviceController.php
+++ b/application/Device/DeviceController.php
@@ -251,6 +251,9 @@ class DeviceController extends mfBaseController
case "getontinfo":
$return = $this->getontInfo($ip, $portid, $ont);
break;
+ case "getontinfomac":
+ $return = $this->getontInfoMac($ip, $portid, $ont);
+ break;
case "changeoltsplitter":
$return = $this->changeoltSplitter($id, $portid, $ports);
break;
@@ -325,6 +328,16 @@ class DeviceController extends mfBaseController
$r = $this->request;
$id = $r->id;
$getOntInfo = DeviceModel::getontInfo($ip, $portid, $ont);
+
+ echo json_encode($getOntInfo);
+ exit;
+ }
+
+ private function getontInfoMac($ip, $portid, $ont)
+ {
+ $r = $this->request;
+ $id = $r->id;
+ $getOntInfo = DeviceModel::getontInfoMac($ip, $portid, $ont);
echo json_encode($getOntInfo);
exit;
}
diff --git a/application/Device/DeviceModel.php b/application/Device/DeviceModel.php
index 967ebed09..a76572dd6 100644
--- a/application/Device/DeviceModel.php
+++ b/application/Device/DeviceModel.php
@@ -320,7 +320,34 @@ WHERE `item_id` = '55'";
endif;
return json_decode($response);
}
+ public static function getontInfoMac($ip, $portid = '', $ont = '')
+ {
+ $portid = "/" . $portid;
+ $ont = "/mac/" . $ont;
+ $url = TT_MBI_API_URL . TT_MBI_API_VERSION . '/deviceoltinfo/' . $ip . $portid . $ont;
+ $response = "";
+ if (TT_MBI_API_ENABLE) :
+ $curl = curl_init();
+ curl_setopt_array($curl, array(
+ CURLOPT_URL => $url,
+ CURLOPT_RETURNTRANSFER => true,
+ CURLOPT_ENCODING => '',
+ CURLOPT_MAXREDIRS => 10,
+ CURLOPT_SSL_VERIFYHOST => false,
+ CURLOPT_SSL_VERIFYPEER => false,
+ CURLOPT_TIMEOUT => 0,
+ CURLOPT_FOLLOWLOCATION => true,
+ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
+ CURLOPT_CUSTOMREQUEST => 'GET',
+ CURLOPT_HTTPHEADER => array(
+ 'Authorization: Bearer ' . TT_MBI_API_KEY),
+ ));
+ $response = curl_exec($curl);
+ curl_close($curl);
+ endif;
+ return json_decode($response);
+ }
public static function changeoltSplitter($id, $portid, $ports)
{