|
@@ -72,7 +72,7 @@ class CmtsInterfaceAdmin extends BaseAdmin
|
|
|
->add('cmtsDeviceId', 'string', array('template' => 'StatsBundle:CmtsInterface:base_list_field_cmts.html.twig'))
|
|
|
->add('index')
|
|
|
->addIdentifier('name')
|
|
|
- ->add('jsonExtraData', 'string', array('template' => 'StatsBundle:CmtsInterface:interface_field_extra_data.html.twig'))
|
|
|
+ ->add('jsonExtraData', 'string', array('template' => 'StatsBundle:CmtsInterface:field_extra_data.html.twig'))
|
|
|
->add('signal','string', array('template' => 'StatsBundle:CmtsInterface:interface_field_signal.html.twig'))
|
|
|
->add('microreflection','string', array('template' => 'StatsBundle:CmtsInterface:interface_field_microreflection.html.twig'))
|
|
|
->add('utilization','string', array('template' => 'StatsBundle:CmtsInterface:interface_field_utilization.html.twig'))
|
|
@@ -96,12 +96,12 @@ class CmtsInterfaceAdmin extends BaseAdmin
|
|
|
*/
|
|
|
protected function configureShowFields(ShowMapper $showMapper)
|
|
|
{
|
|
|
- /* $ponPort = $this->getSubject();
|
|
|
- $oltDeviceId = $ponPort->getOltDeviceId();
|
|
|
- $deviceServer = $ponPort->getDeviceServer();
|
|
|
+ $interface = $this->getSubject();
|
|
|
+ $cmtsDeviceId = $interface->getCmtsDeviceId();
|
|
|
+ $deviceServer = $interface->getDeviceServer();
|
|
|
|
|
|
$em = $this->get("doctrine.orm.entity_manager");
|
|
|
- $q = $em->getRepository("StatsBundle:Onu")->createQueryBuilder('o');
|
|
|
+ /* $q = $em->getRepository("StatsBundle:Cablemodem")->createQueryBuilder('o');
|
|
|
$onus = $q->where($q->expr()->like('o.ponPort', ':ponPort'))
|
|
|
->andWhere('o.oltDeviceId = :oltDeviceId')
|
|
|
->andWhere('o.deviceServer = :deviceServer')
|
|
@@ -131,23 +131,21 @@ class CmtsInterfaceAdmin extends BaseAdmin
|
|
|
|
|
|
ksort($_onus);
|
|
|
|
|
|
- $this->parameters = array('onus' => $_onus);
|
|
|
+ $this->parameters = array('onus' => $_onus); */
|
|
|
|
|
|
- $olt = $em->getRepository("StatsBundle:device")->findOneBy(array('deviceId' => $oltDeviceId, 'deviceServer'=>$deviceServer, 'deviceType' => 'FTTHBundle\Entity\OLT'));
|
|
|
- if($olt) {
|
|
|
- $data = $olt->jsonExtraData();
|
|
|
- $oltName = null;
|
|
|
- if(isset($data['name'])) $oltName = $data['name'];
|
|
|
+ $cmts = $em->getRepository("StatsBundle:device")->findOneBy(array('deviceId' => $cmtsDeviceId, 'deviceServer'=>$deviceServer, 'deviceType' => 'CablemodemBundle\Entity\CMTS'));
|
|
|
+ if($cmts) {
|
|
|
+ $data = $cmts->jsonExtraData();
|
|
|
+ $cmtsName = null;
|
|
|
+ if(isset($data['name'])) $cmtsName = $data['name'];
|
|
|
}
|
|
|
|
|
|
$showMapper
|
|
|
- ->add('oltDeviceId', 'string', array('template' => 'StatsBundle:Onu:base_show_field_olt.html.twig','oltName' => $oltName))
|
|
|
- ->add('ponPort')
|
|
|
- ->add('txPower', 'string', array('template' => 'StatsBundle:Onu:base_show_field_tx.html.twig'))
|
|
|
- ->add('voltage', 'string', array('template' => 'StatsBundle:Onu:base_show_field_voltage.html.twig'))
|
|
|
- ->add('temperature', 'string', array('template' => 'StatsBundle:Onu:base_show_field_temperature.html.twig'))
|
|
|
- ->add('biasCurrent')
|
|
|
- ; */
|
|
|
+ ->add('cmtsDeviceId', 'string', array('template' => 'StatsBundle:CmtsInterface:base_show_field_cmts.html.twig','cmtsName' => $cmtsName))
|
|
|
+ ->add('index')
|
|
|
+ ->add('name')
|
|
|
+ ->add('jsonExtraData', 'string', array('template' => 'StatsBundle:CmtsInterface:field_extra_data.html.twig', 'extend' => 'base_show_field.html.twig'))
|
|
|
+ ;
|
|
|
}
|
|
|
|
|
|
/**
|