Пример #1
0
   static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) {

      switch ($item->getType()) {
         case 'Central' :
            $pmDisplay = new PluginMonitoringDisplay();
            // $pmDisplay->showCounters('Ressources');
            $pmDisplay->showResourcesBoard();
            //$pmDisplay->showResourcesBoard('', $perfdatas);
            return true;

      }
      return true;
   }
if (isset($_GET['reset'])) {
    unset($_SESSION['glpisearch']['PluginMonitoringService']);
}
if (isset($_GET['glpi_tab'])) {
    unset($_GET['glpi_tab']);
}
//Search::manageGetValues("PluginMonitoringService");
//$_GET = Search::prepareDatasForSearch("PluginMonitoringService", $_GET);
if (isset($_GET['hidesearch'])) {
    echo "<table class='tab_cadre_fixe'>";
    echo "<tr class='tab_bg_1'>";
    echo "<th>";
    echo "<a onClick='\$(\"#searchformservices\").toggle();'>\n      <img src='" . $CFG_GLPI["root_doc"] . "/pics/deplier_down.png' />&nbsp;\n         " . __('Display search form', 'monitoring') . "\n      &nbsp;<img src='" . $CFG_GLPI["root_doc"] . "/pics/deplier_down.png' /></a>";
    echo "</th>";
    echo "</tr>";
    echo "</table>";
    echo "<div style='display: none;' id='searchformservices'>";
}
Search::showGenericSearch("PluginMonitoringService", $params);
if (isset($_GET['hidesearch'])) {
    echo "</div>";
}
$perfdatas = false;
if (isset($_GET['perfdatas'])) {
    $perfdatas = true;
}
$pmDisplay->showResourcesBoard('', $perfdatas, $params);
if (isset($_SESSION['glpisearch']['PluginMonitoringService']['reset'])) {
    unset($_SESSION['glpisearch']['PluginMonitoringService']['reset']);
}
Html::footer();
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     switch ($item->getType()) {
         case 'Central':
             $pmDisplay = new PluginMonitoringDisplay();
             // $pmDisplay->showCounters('Ressources');
             $params = Search::manageParams("PluginMonitoringService", array());
             $params['itemtype'] = 'PluginMonitoringService';
             $pmDisplay->showResourcesBoard('', true, $params);
             //$pmDisplay->showResourcesBoard('', $perfdatas);
             return true;
     }
     return true;
 }