static function board()
 {
     global $DB;
     // Computers
     $query = "SELECT * FROM `glpi_plugin_fusioninventory_inventorycomputercomputers`" . " LEFT JOIN `glpi_computers` " . "    ON (`glpi_plugin_fusioninventory_inventorycomputercomputers`.`id`=`glpi_computers`.`id` " . "       AND `glpi_computers`.`is_deleted`='0')" . " WHERE `glpi_computers`.`id` IS NOT NULL";
     $result = $DB->query($query);
     $fusionComputers = $DB->numrows($result);
     $allComputers = countElementsInTable('glpi_computers', "`is_deleted`='0' AND `is_template`='0'");
     $dataComputer = array();
     $dataComputer[] = array('key' => 'FusionInventory computers : ' . $fusionComputers, 'y' => $fusionComputers, 'color' => '#3dff7d');
     $dataComputer[] = array('key' => 'Other computers : ' . ($allComputers - $fusionComputers), 'y' => $allComputers - $fusionComputers, 'color' => "#dedede");
     // SNMP
     $networkequipment = countElementsInTable('glpi_plugin_fusioninventory_networkequipments');
     $printer = countElementsInTable('glpi_plugin_fusioninventory_printers');
     $dataSNMP = array();
     $dataSNMP[] = array('key' => 'NetworkEquipments (SNMP) : ' . $networkequipment, 'y' => $networkequipment, 'color' => '#3d94ff');
     $dataSNMP[] = array('key' => 'Printers (SNMP) : ' . $printer, 'y' => $printer, 'color' => '#3dff7d');
     // switches ports
     $allSwitchesPortSNMP = countElementsInTable('glpi_plugin_fusioninventory_networkports');
     $query = "SELECT `glpi_networkports`.`id` FROM `glpi_networkports`\n              LEFT JOIN `glpi_plugin_fusioninventory_networkports`\n                 ON `glpi_plugin_fusioninventory_networkports`.`networkports_id` = `glpi_networkports`.`id`\n              LEFT JOIN glpi_networkports_networkports\n                  ON (`networkports_id_1`=`glpi_networkports`.`id`\n                     OR `networkports_id_2`=`glpi_networkports`.`id`)\n              WHERE `glpi_plugin_fusioninventory_networkports`.`id` IS NOT NULL\n                  AND `glpi_networkports_networkports`.`id` IS NOT NULL";
     $result = $DB->query($query);
     $networkPortsLinked = $DB->numrows($result);
     $dataPortL = array();
     $dataPortL[] = array('key' => 'SNMP switch network ports linked : ' . $networkPortsLinked, 'y' => $networkPortsLinked, 'color' => '#3dff7d');
     $dataPortL[] = array('key' => 'SNMP switch network ports not linked : ' . ($allSwitchesPortSNMP - $networkPortsLinked), 'y' => $allSwitchesPortSNMP - $networkPortsLinked, 'color' => '#dedede');
     // Ports connected at last SNMP inventory
     $networkPortsConnected = countElementsInTable('glpi_plugin_fusioninventory_networkports', "`ifstatus`='1' OR `ifstatus`='up'");
     $dataPortC = array();
     $dataPortC[] = array('key' => 'Ports connected : ' . $networkPortsConnected, 'y' => $networkPortsConnected, 'color' => '#3dff7d');
     $dataPortC[] = array('key' => 'Ports not connected : ' . ($allSwitchesPortSNMP - $networkPortsConnected), 'y' => $allSwitchesPortSNMP - $networkPortsConnected, 'color' => '#dedede');
     // Number of computer inventories in last hour, 6 hours, 24 hours
     $dataInventory = PluginFusioninventoryInventoryComputerStat::getLastHours();
     // Deploy
     $query = "SELECT `plugin_fusioninventory_tasks_id` FROM glpi_plugin_fusioninventory_taskjobs" . " WHERE method LIKE '%deploy%'" . " GROUP BY `plugin_fusioninventory_tasks_id`";
     $result = $DB->query($query);
     $a_tasks = array();
     while ($data = $DB->fetch_array($result)) {
         $a_tasks[] = $data['plugin_fusioninventory_tasks_id'];
     }
     $pfTask = new PluginFusioninventoryTask();
     $data = $pfTask->getJoblogs($a_tasks);
     $dataDeploy = array();
     $dataDeploy[0] = array('key' => 'Prepared and waiting', 'y' => 0, 'color' => '#efefef');
     $dataDeploy[1] = array('key' => 'Running', 'y' => 0, 'color' => '#aaaaff');
     $dataDeploy[2] = array('key' => 'Successfull', 'y' => 0, 'color' => '#aaffaa');
     $dataDeploy[3] = array('key' => 'In error', 'y' => 0, 'color' => '#ff0000');
     foreach ($data['tasks'] as $lev1) {
         foreach ($lev1['jobs'] as $lev2) {
             foreach ($lev2['targets'] as $lev3) {
                 $dataDeploy[2]['y'] += count($lev3['counters']['agents_success']);
                 $dataDeploy[3]['y'] += count($lev3['counters']['agents_error']);
                 $dataDeploy[0]['y'] += count($lev3['counters']['agents_prepared']);
                 $dataDeploy[1]['y'] += count($lev3['counters']['agents_running']);
             }
         }
     }
     for ($k = 0; $k < 4; $k++) {
         $dataDeploy[$k]['key'] .= " : " . $dataDeploy[$k]['y'];
     }
     echo "<table align='center'>";
     echo "<tr height='280'>";
     echo "<td width='380'>";
     self::showChart('computers', $dataComputer);
     echo "</td>";
     echo "<td width='380'>";
     $title = __('Number of computer inventories of last hours', 'fusioninventory');
     $title = '';
     self::showChartBar('nbinventory', $dataInventory, $title);
     echo "</td>";
     echo "<td width='380'>";
     self::showChart('deploy', $dataDeploy, __('Deployment', 'fusioninventory'));
     echo "</td>";
     echo "</tr>";
     echo "<tr height='280'>";
     echo "<td>";
     self::showChart('snmp', $dataSNMP);
     echo "</td>";
     echo "<td>";
     self::showChart('ports', $dataPortL);
     echo "</td>";
     echo "<td>";
     self::showChart('portsconnected', $dataPortC);
     echo "</td>";
     echo "</tr>";
     echo "</table>";
 }