static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) { switch ($item->getType()) { case 'Central' : $pmDisplay = new PluginMonitoringDisplay(); // $pmDisplay->showHostsCounters("Hosts", 1, 1); $pmDisplay->showHostsBoard(); return true; } if ($item->getID() > 0) { if ($tabnum == 0) { PluginMonitoringToolbox::loadLib(); $pmService = new PluginMonitoringService(); $pmService->manageServices(get_class($item), $item->fields['id']); $pmHostconfig = new PluginMonitoringHostconfig(); $pmHostconfig->showForm($item->getID(), get_class($item)); } else if ($tabnum == 1) { $pmService = new PluginMonitoringService(); $pmService->showGraphsByHost(get_class($item), $item->fields['id']); } } return true; }
unset($_SESSION['glpisearch']['PluginMonitoringHost']); } if (isset($_GET['glpi_tab'])) { unset($_GET['glpi_tab']); } if (isset($_GET['hidesearch'])) { echo "<table class='tab_cadre_fixe'>"; echo "<tr class='tab_bg_1'>"; echo "<th>"; echo "<a onClick='$(\"#searchformhosts\").toggle();'> <img src='".$CFG_GLPI["root_doc"]."/pics/deplier_down.png' /> ".__('Display search form', 'monitoring')." <img src='".$CFG_GLPI["root_doc"]."/pics/deplier_down.png' /></a>"; echo "</th>"; echo "</tr>"; echo "</table>"; echo "<div style='display: none;' id='searchformhosts'>"; } Search::showGenericSearch("PluginMonitoringHost", $params); if (isset($_GET['hidesearch'])) { echo "</div>"; } $pmDisplay->showHostsBoard($params); if (isset($_SESSION['glpisearch']['PluginMonitoringHost']['reset'])) { unset($_SESSION['glpisearch']['PluginMonitoringHost']['reset']); } Html::footer(); ?>