コード例 #1
0
   static function methodDashboard($params, $protocol) {
      $response = array();

      if (!isset($params['view'])) {
         return $response;
      }

      $pm = new PluginMonitoringDisplay();
      if ($params['view'] == 'Hosts') {
         return $pm->displayHostsCounters(0);
      } else {
         return $pm->displayCounters($params['view'], 0);
      }
   }
コード例 #2
0
ファイル: hook.php プロジェクト: RubichonL/glpi_monitoring
function plugin_headings_monitoring_dashboadservicecatalog($item)
{
    $pmServicescatalog = new PluginMonitoringServicescatalog();
    $pmDisplay = new PluginMonitoringDisplay();
    $pmDisplay->displayCounters("Businessrules");
    $pmServicescatalog->showBAChecks();
}
コード例 #3
0
 static function methodDashboard($params, $protocol)
 {
     $array = array();
     if (!isset($params['view'])) {
         return array();
     }
     $pm = new PluginMonitoringDisplay();
     $array = $pm->displayCounters($params['view'], 0);
     return $array;
 }
コード例 #4
0
 function view($id, $config = 0)
 {
     global $DB, $CFG_GLPI;
     $pmDisplayview = new PluginMonitoringDisplayview();
     $pmDisplayview->getFromDB($id);
     if ($config == '1') {
         $this->addItem($id);
         echo "<div id='updatecoordonates'></div>";
     } else {
         if (!is_null($pmDisplayview->fields['counter'])) {
             $pmDisplay = new PluginMonitoringDisplay();
             $pmDisplay->displayCounters($pmDisplayview->fields['counter']);
         }
     }
     echo "<table class='tab_cadre_fixe' id='test'>";
     echo "<tr class='tab_bg_1'>";
     echo "<th>";
     echo $pmDisplayview->fields['name'];
     echo "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td height='1000' id='panel'>";
     $query = "SELECT * FROM `glpi_plugin_monitoring_displayviews_items`\n         WHERE `plugin_monitoring_displayviews_id`='" . $id . "'";
     $result = $DB->query($query);
     $a_items = array();
     while ($data = $DB->fetch_array($result)) {
         $this->displayItem($data, $config);
         $a_items[] = "item" . $data['id'];
     }
     echo "<script type='text/javascript'>\nExt.onReady(function() {\n\n  //Simple 'border layout' panel to house both grids\n  var displayPanel = new Ext.Panel({\n    width    : 950,\n    height   : 1000,\n    layout: 'absolute',\n    renderTo : 'panel',\n    items    : [\n      " . implode(",", $a_items) . "\n    ]\n  });\n\n});\n</script>";
     echo "</td>";
     echo "</tr>";
     echo "</table>";
     echo "<br/>";
 }
コード例 #5
0
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

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 General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file: David DURIEUX
// Purpose of file:
// ----------------------------------------------------------------------
// Direct access to file
if (strpos($_SERVER['PHP_SELF'], "updateCounter.php")) {
    include "../../../inc/includes.php";
    header("Content-Type: text/html; charset=UTF-8");
    Html::header_nocache();
}
session_write_close();
if (!defined('GLPI_ROOT')) {
    die("Can not acces directly to this file");
}
Session::checkLoginUser();
$pmDisplay = new PluginMonitoringDisplay();
$pmDisplay->displayCounters($_GET['type']);
Html::ajaxFooter();
コード例 #6
0
include GLPI_ROOT . "/inc/includes.php";
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
if (!isset($_POST["id"])) {
    exit;
}
$pmDisplay = new PluginMonitoringDisplay();
$pmBusinessrule = new PluginMonitoringBusinessrule();
$pmDisplayview = new PluginMonitoringDisplayview();
$a_views = $pmDisplayview->getViews();
switch ($_REQUEST['glpi_tab']) {
    case -1:
        break;
    case 1:
        $pmServicescatalog = new PluginMonitoringServicescatalog();
        $pmDisplay->displayCounters("Businessrules");
        $pmServicescatalog->showBAChecks();
        break;
    case 2:
        $pmComponentscatalog = new PluginMonitoringComponentscatalog();
        $pmDisplay->displayCounters("Componentscatalog");
        $pmComponentscatalog->showChecks();
        break;
    case 3:
        $pmDisplay->displayCounters("Ressources");
        // Manage search
        $_GET = $_SESSION['plugin_monitoring']['service'];
        if (isset($_GET['reset'])) {
            unset($_SESSION['glpisearch']['PluginMonitoringService']);
        }
        if (isset($_GET['glpi_tab'])) {
コード例 #7
0
ファイル: updateCounter.php プロジェクト: geldarr/hack-space
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

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 General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file: David DURIEUX
// Purpose of file:
// ----------------------------------------------------------------------
// Direct access to file
if (strpos($_SERVER['PHP_SELF'], "updateCounter.php")) {
    include "../../../inc/includes.php";
    header("Content-Type: text/html; charset=UTF-8");
    Html::header_nocache();
}
if (!defined('GLPI_ROOT')) {
    die("Can not acces directly to this file");
}
Session::checkLoginUser();
$pmDisplay = new PluginMonitoringDisplay();
$pmDisplay->displayCounters($_POST['type']);