static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getID() > 0) { if ($tabnum == 0) { PluginMonitoringServicegraph::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; }
function plugin_headings_monitoring_resources($item) { $pmService = new PluginMonitoringService(); $pmService->manageServices(get_class($item), $item->fields['id']); $pmHostconfig = new PluginMonitoringHostconfig(); $pmHostconfig->showForm($item->getID(), get_class($item)); }
(at your option) any later version. Plugin Monitoring for GLPI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with Monitoring. If not, see <http://www.gnu.org/licenses/>. ------------------------------------------------------------------------ @package Plugin Monitoring for GLPI @author David Durieux @co-author @comment @copyright Copyright (c) 2011-2013 Plugin Monitoring for GLPI 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.indepnet.net/projects/monitoring/ @since 2013 ------------------------------------------------------------------------ */ include "../../../inc/includes.php"; Session::checkCentralAccess(); Html::header(__('Monitoring', 'monitoring'), $_SERVER["PHP_SELF"], "plugins", "monitoring", "display"); PluginMonitoringServicegraph::loadLib(); $pmService = new PluginMonitoringService(); $pmService->manageServices($_GET['itemtype'], $_GET['items_id']); Html::footer();
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; }