Exemplo n.º 1
0
/*
** 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';
$page['title'] = _('Step of scenario');
$page['file'] = 'popup_httpstep.php';
define('ZBX_PAGE_NO_MENU', 1);
require_once dirname(__FILE__) . '/include/page_header.php';
// VAR	TYPE	OPTIONAL	FLAGS	VALIDATION	EXCEPTION
$fields = array('dstfrm' => array(T_ZBX_STR, O_MAND, P_SYS, NOT_EMPTY, null), 'stepid' => array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0, 65535), null), 'list_name' => array(T_ZBX_STR, O_OPT, P_SYS, NOT_EMPTY, '(isset({add}) || isset({update})) && isset({stepid})'), 'name' => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY . KEY_PARAM(), 'isset({add}) || isset({update})', _('Name')), 'url' => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({add}) || isset({update})', _('URL')), 'posts' => array(T_ZBX_STR, O_OPT, null, null, null), 'variables' => array(T_ZBX_STR, O_OPT, null, null, 'isset({add}) || isset({update})'), 'headers' => array(T_ZBX_STR, O_OPT, null, null, 'isset({add}) || isset({update})'), 'retrieve_mode' => array(T_ZBX_STR, O_OPT, null, null, null), 'follow_redirects' => array(T_ZBX_STR, O_OPT, null, null, null), 'timeout' => array(T_ZBX_INT, O_OPT, null, BETWEEN(0, 65535), 'isset({add}) || isset({update})', _('Timeout')), 'required' => array(T_ZBX_STR, O_OPT, null, null, null), 'status_codes' => array(T_ZBX_STR, O_OPT, null, null, 'isset({add}) || isset({update})'), 'templated' => array(T_ZBX_STR, O_OPT, null, null, null), 'old_name' => array(T_ZBX_STR, O_OPT, null, null, null), 'steps_names' => array(T_ZBX_STR, O_OPT, null, null, null), 'add' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'update' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'form' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'form_refresh' => array(T_ZBX_INT, O_OPT, null, null, null));
check_fields($fields);
// render view
$httpPopupView = new CView('configuration.httpconf.popup');
$httpPopupView->render();
$httpPopupView->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
Exemplo n.º 2
0
** 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/hosts.inc.php';
require_once 'include/httptest.inc.php';
require_once 'include/forms.inc.php';
$page['title'] = "S_CONFIGURATION_OF_WEB_MONITORING";
$page['file'] = 'httpconf.php';
$page['hist_arg'] = array('groupid', 'hostid');
include_once 'include/page_header.php';
//		VAR			TYPE	OPTIONAL FLAGS	VALIDATION	EXCEPTION
$fields = array('applications' => array(T_ZBX_INT, O_OPT, null, DB_ID, null), 'applicationid' => array(T_ZBX_INT, O_OPT, null, DB_ID, null), 'close' => array(T_ZBX_INT, O_OPT, null, IN('1'), null), 'open' => array(T_ZBX_INT, O_OPT, null, IN('1'), null), 'groupid' => array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null), 'hostid' => array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, 'isset({form})||isset({save})'), 'httptestid' => array(T_ZBX_INT, O_NO, P_SYS, DB_ID, '(isset({form})&&({form}=="update"))'), 'application' => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({save})'), 'name' => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY . KEY_PARAM(), 'isset({save})'), 'delay' => array(T_ZBX_INT, O_OPT, null, BETWEEN(0, 86400), 'isset({save})'), 'status' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), 'isset({save})'), 'agent' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'macros' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'steps' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'new_httpstep' => array(T_ZBX_STR, O_OPT, null, null, null), 'move_up' => array(T_ZBX_INT, O_OPT, P_ACT, BETWEEN(0, 65534), null), 'move_down' => array(T_ZBX_INT, O_OPT, P_ACT, BETWEEN(0, 65534), null), 'sel_step' => array(T_ZBX_INT, O_OPT, null, BETWEEN(0, 65534), null), 'group_httptestid' => array(T_ZBX_INT, O_OPT, null, DB_ID, null), 'showdisabled' => array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), null), 'go' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, NULL, NULL), 'clone' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'save' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'delete' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'del_sel_step' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'cancel' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'form' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'form_refresh' => array(T_ZBX_INT, O_OPT, null, null, null));
$_REQUEST['showdisabled'] = get_request('showdisabled', get_profile('web.httpconf.showdisabled', 0));
check_fields($fields);
validate_sort_and_sortorder('wt.name', ZBX_SORT_UP);
$_REQUEST['go'] = get_request('go', 'none');
$showdisabled = get_request('showdisabled', 0);
$params = array();
$options = array('only_current_node', 'not_proxy_hosts');
foreach ($options as $option) {
    $params[$option] = 1;
}
$PAGE_GROUPS = get_viewed_groups(PERM_READ_WRITE, $params);
$PAGE_HOSTS = get_viewed_hosts(PERM_READ_WRITE, $PAGE_GROUPS['selected'], $params);
//SDI($_REQUEST['groupid'].' : '.$_REQUEST['hostid']);
validate_group_with_host($PAGE_GROUPS, $PAGE_HOSTS);
$available_groups = $PAGE_GROUPS['groupids'];
Exemplo n.º 3
0
**
** 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/triggers.inc.php";
require_once "include/forms.inc.php";
$dstfrm = get_request("dstfrm", 0);
// destination form
$page["title"] = "S_STEP_OF_SCENARIO";
$page["file"] = "popup_httpstep.php";
define('ZBX_PAGE_NO_MENU', 1);
include_once "include/page_header.php";
//		VAR			TYPE	OPTIONAL FLAGS	VALIDATION	EXCEPTION
$fields = array("dstfrm" => array(T_ZBX_STR, O_MAND, P_SYS, NOT_EMPTY, null), "stepid" => array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0, 65535), null), "list_name" => array(T_ZBX_STR, O_OPT, P_SYS, NOT_EMPTY, 'isset({save})&&isset({stepid})'), "name" => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY . KEY_PARAM(), 'isset({save})'), "url" => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({save})'), "posts" => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), "timeout" => array(T_ZBX_INT, O_OPT, null, BETWEEN(0, 65535), 'isset({save})'), "required" => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), "status_codes" => array(T_ZBX_INT_RANGE, O_OPT, null, null, 'isset({save})'), "add" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), "save" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), "form" => array(T_ZBX_STR, O_OPT, P_SYS, null, null), "form_refresh" => array(T_ZBX_STR, O_OPT, null, null, null));
check_fields($fields);
?>
<script language="JavaScript" type="text/javascript">
<!--

function add_var_to_opener_obj(obj,name,value)
{
        new_variable = window.opener.document.createElement('input');
        new_variable.type = 'hidden';
        new_variable.name = name;
        new_variable.value = value;

        obj.appendChild(new_variable);
}
Exemplo n.º 4
0
/*
** Zabbix
** Copyright (C) 2001-2013 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';
$page['title'] = _('Step of scenario');
$page['file'] = 'popup_httpstep.php';
define('ZBX_PAGE_NO_MENU', 1);
require_once dirname(__FILE__) . '/include/page_header.php';
// VAR	TYPE	OPTIONAL	FLAGS	VALIDATION	EXCEPTION
$fields = array('dstfrm' => array(T_ZBX_STR, O_MAND, P_SYS, NOT_EMPTY, null), 'stepid' => array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0, 65535), null), 'list_name' => array(T_ZBX_STR, O_OPT, P_SYS, NOT_EMPTY, 'isset({save})&&isset({stepid})'), 'name' => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY . KEY_PARAM(), 'isset({save})', _('Name')), 'url' => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({save})', _('URL')), 'posts' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'variables' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'timeout' => array(T_ZBX_INT, O_OPT, null, BETWEEN(0, 65535), 'isset({save})', _('Timeout')), 'required' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'status_codes' => array(T_ZBX_INT_RANGE, O_OPT, null, null, 'isset({save})'), 'templated' => array(T_ZBX_STR, O_OPT, null, null, null), 'old_name' => array(T_ZBX_STR, O_OPT, null, null, null), 'steps_names' => array(T_ZBX_STR, O_OPT, null, null, null), 'save' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'form' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'form_refresh' => array(T_ZBX_STR, O_OPT, null, null, null));
check_fields($fields);
// render view
$httpPopupView = new CView('configuration.httpconf.popup');
$httpPopupView->render();
$httpPopupView->show();
require_once dirname(__FILE__) . '/include/page_footer.php';