0.3.12
This commit is contained in:
parent
7b50c60b78
commit
49dec8d17b
@ -2029,12 +2029,16 @@ var $qls;
|
||||
|
||||
case 'object':
|
||||
|
||||
$objID = $object['data']['id'];
|
||||
$objFace = $object['data']['face'];
|
||||
$objDepth = $object['data']['depth'];
|
||||
$objPort = $object['data']['port'];
|
||||
$selected = $object['data']['selected'];
|
||||
$objName = $this->generateObjectPortName($objID, $objFace, $objDepth, $objPort);
|
||||
$objName = '';
|
||||
foreach($object['data'] as $item) {
|
||||
$objID = $item['id'];
|
||||
$objFace = $item['face'];
|
||||
$objDepth = $item['depth'];
|
||||
$objPort = $item['port'];
|
||||
$selected = $item['selected'];
|
||||
$objName .= $this->generateObjectPortName($objID, $objFace, $objDepth, $objPort).'<br>';
|
||||
}
|
||||
|
||||
$objBox = $this->wrapObject($objID, $objName, $selected);
|
||||
|
||||
// Wrap in <td> and add to row array
|
||||
|
||||
@ -56,12 +56,13 @@ for($x=0; $x<2; $x++){
|
||||
$workingArray = array(
|
||||
'type' => 'object',
|
||||
'data' => array(
|
||||
array(
|
||||
'id' => $objID,
|
||||
'face' => $objFace,
|
||||
'depth' => $objDepth,
|
||||
'port' => $objPort,
|
||||
'selected' => $selected
|
||||
)
|
||||
))
|
||||
);
|
||||
if($x == 0) {
|
||||
array_push($path, $workingArray);
|
||||
@ -71,62 +72,72 @@ for($x=0; $x<2; $x++){
|
||||
|
||||
// Connection
|
||||
if(isset($qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort])) {
|
||||
$objectWorkingArray = array(
|
||||
'type' => 'object',
|
||||
'data' => array()
|
||||
);
|
||||
foreach($qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort] as $index => $inventory) {
|
||||
|
||||
$inventory = $qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort];
|
||||
$inventoryID = $inventory['rowID'];
|
||||
$localAttrPrefix = $inventory['localAttrPrefix'];
|
||||
$remoteAttrPrefix = $inventory['remoteAttrPrefix'];
|
||||
$connection = $qls->App->inventoryAllArray[$inventoryID];
|
||||
$mediaTypeID = $connection['mediaType'];
|
||||
$length = $connection['length'];
|
||||
$includeUnit = true;
|
||||
$length = $qls->App->calculateCableLength($mediaTypeID, $length, $includeUnit);
|
||||
|
||||
// Local Connection
|
||||
$workingArray = array(
|
||||
$connector1WorkingArray = array(
|
||||
'type' => 'connector',
|
||||
'data' => array(
|
||||
'code39' => $connection[$localAttrPrefix.'_code39'],
|
||||
'connectorType' => $connection[$localAttrPrefix.'_connector']
|
||||
)
|
||||
);
|
||||
/*
|
||||
if($x == 0) {
|
||||
array_push($path, $workingArray);
|
||||
} else {
|
||||
array_unshift($path, $workingArray);
|
||||
}
|
||||
*/
|
||||
|
||||
// Cable
|
||||
$workingArray = array(
|
||||
$mediaTypeID = $connection['mediaType'];
|
||||
$length = $connection['length'];
|
||||
$includeUnit = true;
|
||||
$length = $qls->App->calculateCableLength($mediaTypeID, $length, $includeUnit);
|
||||
$cableWorkingArray = array(
|
||||
'type' => 'cable',
|
||||
'data' => array(
|
||||
'mediaTypeID' => $mediaTypeID,
|
||||
'length' => $length
|
||||
)
|
||||
);
|
||||
/*
|
||||
if($x == 0) {
|
||||
array_push($path, $workingArray);
|
||||
} else {
|
||||
array_unshift($path, $workingArray);
|
||||
}
|
||||
*/
|
||||
|
||||
// Remote Connection
|
||||
$workingArray = array(
|
||||
$connector2WorkingArray = array(
|
||||
'type' => 'connector',
|
||||
'data' => array(
|
||||
'code39' => $connection[$remoteAttrPrefix.'_code39'],
|
||||
'connectorType' => $connection[$remoteAttrPrefix.'_connector']
|
||||
)
|
||||
);
|
||||
/*
|
||||
if($x == 0) {
|
||||
array_push($path, $workingArray);
|
||||
} else {
|
||||
array_unshift($path, $workingArray);
|
||||
}
|
||||
*/
|
||||
|
||||
// Object
|
||||
if($connection[$remoteAttrPrefix.'_object_id'] != 0) {
|
||||
|
||||
|
||||
$objID = $connection[$remoteAttrPrefix.'_object_id'];
|
||||
$objFace = $connection[$remoteAttrPrefix.'_object_face'];
|
||||
$objDepth = $connection[$remoteAttrPrefix.'_object_depth'];
|
||||
@ -134,19 +145,12 @@ for($x=0; $x<2; $x++){
|
||||
|
||||
// Remote Object
|
||||
$workingArray = array(
|
||||
'type' => 'object',
|
||||
'data' => array(
|
||||
'id' => $objID,
|
||||
'face' => $objFace,
|
||||
'depth' => $objDepth,
|
||||
'port' => $objPort
|
||||
)
|
||||
);
|
||||
if($x == 0) {
|
||||
array_push($path, $workingArray);
|
||||
} else {
|
||||
array_unshift($path, $workingArray);
|
||||
}
|
||||
array_push($objectWorkingArray['data'], $workingArray);
|
||||
|
||||
$isTrunked = false;
|
||||
if(isset($qls->App->peerArray[$objID][$objFace][$objDepth])) {
|
||||
@ -164,15 +168,17 @@ for($x=0; $x<2; $x++){
|
||||
$objDepth = $peer['peerDepth'];
|
||||
|
||||
// Trunk
|
||||
$workingArray = array(
|
||||
$trunkWorkingArray = array(
|
||||
'type' => 'trunk',
|
||||
'data' => array()
|
||||
);
|
||||
/*
|
||||
if($x == 0) {
|
||||
array_push($path, $workingArray);
|
||||
} else {
|
||||
array_unshift($path, $workingArray);
|
||||
}
|
||||
*/
|
||||
} else {
|
||||
|
||||
// No trunk peer found
|
||||
@ -183,7 +189,24 @@ for($x=0; $x<2; $x++){
|
||||
// No connected object
|
||||
$objID = 0;
|
||||
}
|
||||
|
||||
}
|
||||
if($x == 0) {
|
||||
array_push($path, $connector1WorkingArray);
|
||||
array_push($path, $cableWorkingArray);
|
||||
array_push($path, $connector2WorkingArray);
|
||||
array_push($path, $objectWorkingArray);
|
||||
if($isTrunked) {
|
||||
array_push($path, $trunkWorkingArray);
|
||||
}
|
||||
} else {
|
||||
array_unshift($path, $connector1WorkingArray);
|
||||
array_unshift($path, $cableWorkingArray);
|
||||
array_unshift($path, $connector2WorkingArray);
|
||||
array_unshift($path, $objectWorkingArray);
|
||||
if($isTrunked) {
|
||||
array_unshift($path, $trunkWorkingArray);
|
||||
}
|
||||
}
|
||||
|
||||
} else if(isset($qls->App-> populatedPortArray[$objID][$objFace][$objDepth][$objPort])) {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user