Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeemIP - IPAddress object - CIs pointing to this IP - IPDevices missing #15

Open
jbostoen opened this issue Feb 15, 2017 · 1 comment
Open

Comments

@jbostoen
Copy link
Owner

This would require changes in _ipaddress.class.inc.php.
We won't do that. The tab with CI's pointing to this object, is generated in a PHP-file, not an XML.

Accomplishing it would be:

Find:

				$iNbPCs = 0;
				if  (MetaModel::IsValidClass('PC'))
				{
					if (MetaModel::IsValidAttCode('PC', 'ipaddress_id'))
					{
					$oPCSearch = DBObjectSearch::FromOQL("SELECT PC WHERE ipaddress_id = $iKey");
					$oPCSet = new CMDBObjectSet($oPCSearch);
					$iNbPCs = $oPCSet->Count();
					$iNbCIs += $iNbPCs;
					}
				}

Add:

				/*JB START*/
				$iNbIPDevices = 0;
				if  (MetaModel::IsValidClass('IPDevice'))
				{
					if (MetaModel::IsValidAttCode('IPDevice', 'managementip_id'))
					{
					$oIPDevicesSearch = DBObjectSearch::FromOQL("SELECT IPDevice WHERE managementip_id = $iKey");
					$oIPDevicesSet = new CMDBObjectSet($oIPDevicesSearch);
					$iNbIPDevices = $oIPDevicesSet->Count();
					$iNbCIs += $iNbIPDevices;
					}
				}
				/*JB END*/

Find:

					if ($iNbPCs != 0)
					{
						$oBlock = DisplayBlock::FromObjectSet($oPCSet, 'list');
						$oBlock->Display($oPage, 'pc_id', array('menu' => false));
					}

Add:

					/* JB START */
					if ($iNbIPDevices != 0)
					{
						$oBlock = DisplayBlock::FromObjectSet($oIPDevicesSet, 'list');
						$oBlock->Display($oPage, 'ipdev_id', array('menu' => false));
					}
					/* JB END */
@jbostoen jbostoen changed the title TeemIP - IP Adress object - CI's pointing to this IP TeemIP - IP Adress object - CIs pointing to this IP Feb 17, 2017
@jbostoen jbostoen changed the title TeemIP - IP Adress object - CIs pointing to this IP TeemIP - IP Adress object - CIs pointing to this IP - IPDevices missing Feb 17, 2017
@jbostoen
Copy link
Owner Author

See #16 IP Devices - IP Phones should link ConnectableCIs instead of Network Devices

Should be fixed if IPDevices become a subclass of Network Devices (and incorrectly of DataCenter Devices).

@jbostoen jbostoen changed the title TeemIP - IP Adress object - CIs pointing to this IP - IPDevices missing TeemIP - IPAddress object - CIs pointing to this IP - IPDevices missing Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant