Beispiel #1
0
$fields = array('type' => array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), NULL), 'search' => array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), 'favobj' => array(T_ZBX_STR, O_OPT, P_ACT, NULL, NULL), 'favid' => array(T_ZBX_STR, O_OPT, P_ACT, NOT_EMPTY, 'isset({favobj})'), 'favcnt' => array(T_ZBX_INT, O_OPT, null, null, NULL), 'action' => array(T_ZBX_STR, O_OPT, P_ACT, IN("'add','remove'"), NULL), 'state' => array(T_ZBX_INT, O_OPT, P_ACT, NOT_EMPTY, 'isset({favobj}) && ("hat"=={favobj})'));
check_fields($fields);
// ACTION /////////////////////////////////////////////////////////////////////////////
if (isset($_REQUEST['favobj'])) {
    $_REQUEST['pmasterid'] = get_request('pmasterid', 'mainpage');
    if ('hat' == $_REQUEST['favobj']) {
        update_profile('web.dashboard.hats.' . $_REQUEST['favid'] . '.state', $_REQUEST['state'], PROFILE_TYPE_INT);
    }
    if ('refresh' == $_REQUEST['favobj']) {
        switch ($_REQUEST['favid']) {
            case 'hat_syssum':
                $syssum = make_system_summary();
                $syssum->show();
                break;
            case 'hat_stszbx':
                $stszbx = make_status_of_zbx();
                $stszbx->show();
                break;
        }
    }
}
if (PAGE_TYPE_JS == $page['type'] || PAGE_TYPE_HTML_BLOCK == $page['type']) {
    exit;
}
$admin = uint_in_array($USER_DETAILS['type'], array(USER_TYPE_ZABBIX_ADMIN, USER_TYPE_SUPER_ADMIN));
$rows_per_page = $USER_DETAILS['rows_per_page'];
$search_wdgt = new CWidget('search_wdgt');
$search = get_request('search', '');
// Header
if (zbx_empty($search)) {
    $search = 'Search pattern is empty';
<?php

/*
** Zabbix
** Copyright (C) 2001-2014 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** 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.
**
** This program 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 this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
**/
require_once dirname(__FILE__) . '/include/config.inc.php';
require_once dirname(__FILE__) . '/include/blocks.inc.php';
$page['title'] = _('Status of Zabbix');
$page['file'] = 'report1.php';
$page['hist_arg'] = array();
require_once dirname(__FILE__) . '/include/page_header.php';
$reportWidget = new CWidget();
$reportWidget->addPageHeader(_('STATUS OF ZABBIX'));
$reportWidget->addItem(make_status_of_zbx());
$reportWidget->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
<?php

/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** 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.
**
** This program 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 this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
$table = make_status_of_zbx();
$output = ['header' => _('Status of Zabbix'), 'body' => (new CDiv([getMessages(), $table]))->toString(), 'footer' => (new CListItem(_s('Updated: %s', zbx_date2str(TIME_FORMAT_SECONDS))))->toString()];
if ($data['user']['debug_mode'] == GROUP_DEBUG_MODE_ENABLED) {
    CProfiler::getInstance()->stop();
    $output['debug'] = CProfiler::getInstance()->make()->toString();
}
echo (new CJson())->encode($output);
Beispiel #4
0
/*
** ZABBIX
** Copyright (C) 2000-2008 SIA Zabbix
**
** This program is free software; you can redistribute it and/or modify
** 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.
**
** This program 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 this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
require_once "include/config.inc.php";
require_once "include/blocks.inc.php";
$page["title"] = "S_STATUS_OF_ZABBIX";
$page["file"] = "report1.php";
$page['hist_arg'] = array();
include_once "include/page_header.php";
//		VAR			TYPE	OPTIONAL FLAGS	VALIDATION	EXCEPTION
$fields = array();
check_fields($fields);
show_table_header(S_STATUS_OF_ZABBIX_BIG);
$status = make_status_of_zbx();
$status->show();
include_once "include/page_footer.php";
Beispiel #5
0
/*
 * Actions
 */
// get fresh widget data
if (hasRequest('widgetRefresh')) {
    switch (getRequest('widgetRefresh')) {
        case WIDGET_SYSTEM_STATUS:
            $widget = make_system_status($dashboardConfig);
            $widget->show();
            break;
        case WIDGET_HOST_STATUS:
            $widget = make_hoststat_summary($dashboardConfig);
            $widget->show();
            break;
        case WIDGET_ZABBIX_STATUS:
            $widget = make_status_of_zbx();
            $widget->show();
            break;
        case WIDGET_LAST_ISSUES:
            $widget = make_latest_issues($dashboardConfig);
            $widget->show();
            break;
        case WIDGET_WEB_OVERVIEW:
            $widget = make_webmon_overview($dashboardConfig);
            $widget->show();
            break;
        case WIDGET_DISCOVERY_STATUS:
            $widget = make_discovery_status();
            $widget->show();
            break;
    }
Beispiel #6
0
**
** This program is free software; you can redistribute it and/or modify
** 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.
**
** This program 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 this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
require_once 'include/config.inc.php';
require_once 'include/blocks.inc.php';
$page['title'] = "S_STATUS_OF_ZABBIX";
$page['file'] = 'report1.php';
$page['hist_arg'] = array();
include_once 'include/page_header.php';
//		VAR			TYPE	OPTIONAL FLAGS	VALIDATION	EXCEPTION
$fields = array();
check_fields($fields);
$rprt_wdgt = new CWidget();
$rprt_wdgt->addPageHeader(S_STATUS_OF_ZABBIX_BIG);
$rprt_wdgt->addHeader(S_REPORT_BIG);
$rprt_wdgt->addItem(BR());
$rprt_wdgt->addItem(make_status_of_zbx());
$rprt_wdgt->show();
include_once 'include/page_footer.php';
<?php

/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** 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.
**
** This program 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 this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
**/
require_once dirname(__FILE__) . '/../../include/blocks.inc.php';
$widget = (new CWidget())->setTitle(_('Status of Zabbix'))->addItem(make_status_of_zbx())->show();