0.3.14
This commit is contained in:
parent
fa0703870a
commit
9d8d4c2a39
@ -1983,6 +1983,7 @@ var $qls;
|
|||||||
// Generate port name(s)
|
// Generate port name(s)
|
||||||
$objName = '';
|
$objName = '';
|
||||||
$selected = false;
|
$selected = false;
|
||||||
|
$populated = false;
|
||||||
foreach($connectionSide as $port) {
|
foreach($connectionSide as $port) {
|
||||||
|
|
||||||
$objID = $port['objID'];
|
$objID = $port['objID'];
|
||||||
@ -1990,6 +1991,10 @@ var $qls;
|
|||||||
$objDepth = $port['objDepth'];
|
$objDepth = $port['objDepth'];
|
||||||
$objPort = $port['objPort'];
|
$objPort = $port['objPort'];
|
||||||
$selected = ($port['selected'] == true) ? true : $selected;
|
$selected = ($port['selected'] == true) ? true : $selected;
|
||||||
|
$cableLength = $port['length'];
|
||||||
|
$mediaTypeID = $port['mediaTypeID'];
|
||||||
|
$connectorTypeID = $port['connectorTypeID'];
|
||||||
|
$populated = (isset($this->populatedPortArray[$objID][$objFace][$objDepth][$objPort])) ? true : $populated;
|
||||||
|
|
||||||
$objName .= $this->generateObjectPortName($objID, $objFace, $objDepth, $objPort).'<br>';
|
$objName .= $this->generateObjectPortName($objID, $objFace, $objDepth, $objPort).'<br>';
|
||||||
}
|
}
|
||||||
@ -1998,20 +2003,44 @@ var $qls;
|
|||||||
$htmlPort = $this->wrapObject($objID, $objName, $selected, $trunkPairID);
|
$htmlPort = $this->wrapObject($objID, $objName, $selected, $trunkPairID);
|
||||||
|
|
||||||
// Gather connector data
|
// Gather connector data
|
||||||
|
if($connectorTypeID) {
|
||||||
|
$portTypeName = $this->connectorTypeValueArray[$connectorTypeID]['name'];
|
||||||
|
} else {
|
||||||
$obj = $this->objectArray[$objID];
|
$obj = $this->objectArray[$objID];
|
||||||
$objTemplateID = $obj['template_id'];
|
$objTemplateID = $obj['template_id'];
|
||||||
$objCompatibility = $this->compatibilityArray[$objTemplateID][$objFace][$objDepth];
|
$objCompatibility = $this->compatibilityArray[$objTemplateID][$objFace][$objDepth];
|
||||||
$portTypeID = $objCompatibility['portType'];
|
$portTypeID = $objCompatibility['portType'];
|
||||||
$portTypeName = $this->portTypeValueArray[$portTypeID]['name'];
|
$portTypeName = $this->portTypeValueArray[$portTypeID]['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Determine if this port is connected to another
|
||||||
|
if($connectionIndex == 1) {
|
||||||
|
$connected = (count($connection[0])) ? true : false;
|
||||||
|
} else {
|
||||||
|
$connected = (count($connection[1])) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($connected or $populated) {
|
||||||
// Compile connector div
|
// Compile connector div
|
||||||
$htmlConnector = '<div title="'.$portTypeName.'" class="port '.$portTypeName.'" data-connection-pair-id='.$connectionPairID.'></div>';
|
$htmlConnector = '<div title="'.$portTypeName.'" class="port '.$portTypeName.'" data-connection-pair-id='.$connectionPairID.'></div>';
|
||||||
|
|
||||||
|
// Gather cable data
|
||||||
|
if($mediaTypeID) {
|
||||||
|
$mediaTypeName = $this->mediaTypeValueArray[$mediaTypeID]['name'];
|
||||||
|
} else {
|
||||||
|
$obj = $this->objectArray[$objID];
|
||||||
|
$objTemplateID = $obj['template_id'];
|
||||||
|
$objCompatibility = $this->compatibilityArray[$objTemplateID][$objFace][$objDepth];
|
||||||
$mediaTypeID = $objCompatibility['mediaType'];
|
$mediaTypeID = $objCompatibility['mediaType'];
|
||||||
$mediaTypeName = $this->mediaTypeValueArray[$mediaTypeID]['name'];
|
$mediaTypeName = $this->mediaTypeValueArray[$mediaTypeID]['name'];
|
||||||
$cableLength = 0;
|
}
|
||||||
|
|
||||||
|
// Compile cable div
|
||||||
$htmlCable = '<div style="width:100%;text-align:left;" title="'.$mediaTypeName.'" class="cable '.$mediaTypeName.' adjacent">'.$cableLength.'<br>'.$mediaTypeName.'</div>';
|
$htmlCable = '<div style="width:100%;text-align:left;" title="'.$mediaTypeName.'" class="cable '.$mediaTypeName.' adjacent">'.$cableLength.'<br>'.$mediaTypeName.'</div>';
|
||||||
|
} else {
|
||||||
|
$htmlConnector = '';
|
||||||
|
$htmlCable = '';
|
||||||
|
}
|
||||||
|
|
||||||
$htmlPathFull .= '<tr>';
|
$htmlPathFull .= '<tr>';
|
||||||
$htmlPathFull .= '<td>'.$htmlPort.'</td>';
|
$htmlPathFull .= '<td>'.$htmlPort.'</td>';
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
$pathArray = array();
|
$pathArray = array();
|
||||||
|
|
||||||
if($connectorCode39) {
|
if($connectorCode39) {
|
||||||
$connectorID2 = base_convert($connectorCode39, 36, 10);
|
$managedCableID = base_convert($connectorCode39, 36, 10);
|
||||||
$rootCable2 = $qls->App->inventoryByIDArray[$connectorID2];
|
$rootCable2 = $qls->App->inventoryByIDArray[$managedCableID];
|
||||||
|
|
||||||
$objID2 = $rootCable2['local_object_id'];
|
$objID2 = $rootCable2['local_object_id'];
|
||||||
$objFace2 = $rootCable2['local_object_face'];
|
$objFace2 = $rootCable2['local_object_face'];
|
||||||
@ -135,13 +135,31 @@ function crawlTrunk(&$qls, $portSet) {
|
|||||||
|
|
||||||
function crawlConn(&$qls, $selected, $objID, $objFace, $objDepth, $objPort, &$connSet=array(array(),array()), $connSetID=0) {
|
function crawlConn(&$qls, $selected, $objID, $objFace, $objDepth, $objPort, &$connSet=array(array(),array()), $connSetID=0) {
|
||||||
|
|
||||||
|
$managedCableID = (isset($qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort])) ? $qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort][0]['localEndID'] : 0;
|
||||||
|
if($managedCableID != 0) {
|
||||||
|
$managedCable = $qls->App->inventoryByIDArray[$managedCableID];
|
||||||
|
$managedCableMediaTypeID = $managedCable['mediaType'];
|
||||||
|
$managedCableLength = $managedCable['length'];
|
||||||
|
$includeUnit = true;
|
||||||
|
$length = $qls->App->calculateCableLength($managedCableMediaTypeID, $managedCableLength, $includeUnit);
|
||||||
|
$mediaTypeID = $managedCable['mediaType'];
|
||||||
|
$connectorTypeID = $managedCable['localConnector'];
|
||||||
|
} else {
|
||||||
|
$length = 'Unk. Length';
|
||||||
|
$mediaTypeID = false;
|
||||||
|
$connectorTypeID = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Store port details
|
// Store port details
|
||||||
$workingArray = array(
|
$workingArray = array(
|
||||||
'objID' => $objID,
|
'objID' => $objID,
|
||||||
'objFace' => $objFace,
|
'objFace' => $objFace,
|
||||||
'objDepth' => $objDepth,
|
'objDepth' => $objDepth,
|
||||||
'objPort' => $objPort,
|
'objPort' => $objPort,
|
||||||
'selected' => $selected
|
'selected' => $selected,
|
||||||
|
'length' => $length,
|
||||||
|
'mediaTypeID' => $mediaTypeID,
|
||||||
|
'connectorTypeID' => $connectorTypeID
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add port info to connection set
|
// Add port info to connection set
|
||||||
@ -162,6 +180,7 @@ function crawlConn(&$qls, $selected, $objID, $objFace, $objDepth, $objPort, &$co
|
|||||||
$remoteObjFace = $connection['face'];
|
$remoteObjFace = $connection['face'];
|
||||||
$remoteObjDepth = $connection['depth'];
|
$remoteObjDepth = $connection['depth'];
|
||||||
$remoteObjPort = $connection['port'];
|
$remoteObjPort = $connection['port'];
|
||||||
|
$managedCableID = $connection['localEndID'];
|
||||||
|
|
||||||
// Verify this node has not been visited already
|
// Verify this node has not been visited already
|
||||||
$alreadySeen = false;
|
$alreadySeen = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user