|
|
@@ -1,4 +1,5 @@
|
|
|
<?php
|
|
|
+
|
|
|
/*
|
|
|
* @version $Id: prototype.class.php 234 2019-12-12 14:34:31Z yllen $
|
|
|
-------------------------------------------------------------------------
|
|
|
@@ -21,7 +22,7 @@
|
|
|
|
|
|
@package archires
|
|
|
@author Nelly Mahu-Lasson, Xavier Caillaud
|
|
|
- @copyright Copyright (c) 2016-2018 Archires plugin team
|
|
|
+ @copyright Copyright (c) 2016-2021 Archires plugin team
|
|
|
@license AGPL License 3.0 or (at your option) any later version
|
|
|
http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
|
@link https://forge.glpi-project.org/projects/archires
|
|
|
@@ -39,7 +40,7 @@ class PluginArchiresPrototype extends CommonDBTM {
|
|
|
|
|
|
|
|
|
private static function dotIt($engine, $graph, $format) {
|
|
|
-
|
|
|
+ toolbox::logdebug("dans doIt");
|
|
|
$out = '';
|
|
|
$Path = realpath(GLPI_PLUGIN_DOC_DIR."/archires");
|
|
|
$graph_name = tempnam($Path, "txt");
|
|
|
@@ -355,7 +356,8 @@ class PluginArchiresPrototype extends CommonDBTM {
|
|
|
$graph .= "<<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
|
|
|
|
|
|
//img
|
|
|
- $graph .= "<tr><td><img src=\"".realpath(GLPI_ROOT)."/plugins/archires/".$image_name. "\"/>".
|
|
|
+ $srcimage = 'realpath(Plugin::getWebDir("archires")."/".$image_name';
|
|
|
+ $graph .= "<tr><td><img src=".$srcimage."/>".
|
|
|
"</td></tr>";
|
|
|
|
|
|
$graph .= "<tr><td> </td></tr><tr><td>".$device["name"];
|
|
|
@@ -499,7 +501,8 @@ class PluginArchiresPrototype extends CommonDBTM {
|
|
|
if ($format!='svg') {
|
|
|
$graph .= "<tr><td><img src= '../pics/socket.png' /></td></tr>";
|
|
|
} else {
|
|
|
- $graph .= "<tr><td><img src=\"".realpath(GLPI_ROOT)."/plugins/archires/pics/socket.png\"/>".
|
|
|
+ $srcimag = 'realpath(Plugin::getWebDir("archires")."/pics/socket.png"';
|
|
|
+ $graph .= "<tr><td><img src=\'".$srcimag."'/>".
|
|
|
"</td></tr>";
|
|
|
}
|
|
|
$graph .= "<tr><td HREF=\"".$url_ports.$ID2."\" tooltip=\"".$name2;
|
|
|
@@ -565,7 +568,7 @@ class PluginArchiresPrototype extends CommonDBTM {
|
|
|
echo "</div>";
|
|
|
|
|
|
if (isset($ID) && !empty($ID)) {
|
|
|
- echo "<img src='".$CFG_GLPI["root_doc"]."/plugins/archires/front/archires.map.php?id=".$ID.
|
|
|
+ echo "<img src='".Plugin::getWebDir('archires')."/front/archires.map.php?id=".$ID.
|
|
|
"&querytype=".$querytype."&plugin_archires_views_id=".$plugin_archires_views_id.
|
|
|
"' alt='' usemap='#G'>";
|
|
|
echo $graph->createGraph("cmapx", $item, $plugin_archires_views_id);
|