Devices:
* OLT ONT Mac-Adressen Anzeige * Performancesteigerung Serviceports Bugfixing: * Kundenanzeige nun auch bei Datatables Link * Uptime wird nun korrekt angezeigt * Textuelle Korrekturen
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user