You can integrate Itop with fusioninventory-glpi, just follow the Method 2 of this documentation
https://sourceforge.net/apps/mediawiki/itop/index.php?title=Integrating_iTop_with_OCSInventory
and modify the Method by :
public function DisplayBareRelations(WebPage $oPage, $bEditMode = false) { parent::DisplayBareRelations($oPage, $bEditMode); if (!$bEditMode) { // Check if the server exists in GLPI define('GLPI_SERVER', 'glpi.dom.org'); // Host DB Server define('GLPI_DB_USER', 'login'); // User to connect to the GLPI DB Server define('GLPI_DB_PWD', 'passwd'); // Password to connect to the GLPI DB Server define('GLPI_DB_NAME', 'glpi'); // Name of the GLPI database $sName = $this->Get('name'); $link = mysql_connect(GLPI_SERVER, GLPI_DB_USER, GLPI_DB_PWD, true /* Make sure it's a new link */); if (!$link) { echo "Could not connect to GLPI..."; return; } if (mysql_select_db(GLPI_DB_NAME, $link )) { $sSQL = "SELECT c.id FROM glpi_computers c, glpi_domains d WHERE c.domains_id = d.id and CONCAT(c.name,'.',d.name) = '$sName'"; $result = mysql_query($sSQL, $link); if (!$result) { echo "<p>Could not successfully run query ($sSQL) from DB: " . mysql_error()."</p>\n"; return; } if (mysql_num_rows($result) == 0) { return; } // We're expecting just one row, let's read it $row = mysql_fetch_assoc($result); $id = $row["id"]; $oPage->SetCurrentTab('FusionInventory'); $oPage->add('<div id="Fusioninventory" style="width:100%;height:500px;"><iframe style="border:0;padding:0;margin:0;width:100%;height:500px;overflow:auto" src="http://glpi.dom.org/front/computer.form.php?id='.$id.'"></iframe></div>'); } else { //echo "Could not select DB: ".GLPI_DB_NAME; } mysql_close($link); } }
and don't forget to modify GLPI_* variables and URL access to GLPI web site.
Log in to post a comment.
You can integrate Itop with fusioninventory-glpi, just follow the Method 2 of this documentation
https://sourceforge.net/apps/mediawiki/itop/index.php?title=Integrating_iTop_with_OCSInventory
and modify the Method by :
and don't forget to modify GLPI_* variables and URL access to GLPI web site.