示例#1
0
    exit;
}
//--------
if (!check_right_on_trigger_by_triggerid(PERM_READ_ONLY, $_REQUEST["triggerid"])) {
    access_deny();
}
$trigger_data = DBfetch(DBselect('SELECT h.host, t.* ' . ' FROM hosts h, items i, functions f, triggers t ' . ' WHERE i.itemid=f.itemid ' . ' AND f.triggerid=t.triggerid ' . ' AND t.triggerid=' . $_REQUEST["triggerid"] . ' AND h.hostid=i.hostid ' . ' AND ' . DBin_node('t.triggerid')));
$p_elements = array();
//Header
$trigger_data['exp_expr'] = explode_exp($trigger_data["expression"], 1);
$trigger_data['exp_desc'] = expand_trigger_description_by_data($trigger_data);
$text = array(S_EVENTS_BIG . ': "' . $trigger_data['exp_desc'] . '"');
$url = '?fullscreen=' . ($_REQUEST['fullscreen'] ? '0' : '1') . url_param('triggerid') . url_param('eventid');
$fs_icon = new CDiv(SPACE, 'fullscreen');
$fs_icon->addOption('title', $_REQUEST['fullscreen'] ? S_NORMAL . ' ' . S_VIEW : S_FULLSCREEN);
$fs_icon->addAction('onclick', new CScript("javascript: document.location = '" . $url . "';"));
//-------
$left_tab = new CTable();
$left_tab->setCellPadding(3);
$left_tab->setCellSpacing(3);
$left_tab->addOption('border', 0);
$left_tab->addRow(create_hat(S_EVENT . SPACE . S_SOURCE . SPACE . S_DETAILS, make_trigger_details($_REQUEST['triggerid'], $trigger_data), null, 'hat_triggerdetails'));
$left_tab->addRow(create_hat(S_EVENT_DETAILS, make_event_details($_REQUEST['eventid']), null, 'hat_eventdetails'));
$right_tab = new CTable();
$right_tab->setCellPadding(3);
$right_tab->setCellSpacing(3);
$right_tab->addOption('border', 0);
$right_tab->addRow(create_hat(S_ACKNOWLEDGES, make_acktab_by_eventid($_REQUEST['eventid']), null, 'hat_eventack', get_profile('web.tr_events.hats.hat_eventack.state', 1)));
$right_tab->addRow(create_hat(S_MESSAGE_ACTIONS, get_action_msgs_for_event($_REQUEST['eventid']), null, 'hat_eventactionmsgs', get_profile('web.tr_events.hats.hat_eventactionmsgs.state', 1)));
$right_tab->addRow(create_hat(S_COMMAND_ACTIONS, get_action_cmds_for_event($_REQUEST['eventid']), null, 'hat_eventactioncmds', get_profile('web.tr_events.hats.hat_eventactioncmds.state', 1)));
$right_tab->addRow(create_hat(S_EVENTS . SPACE . S_LIST . SPACE . '[' . S_LAST . ' 20]', make_small_eventlist($_REQUEST['triggerid'], $trigger_data), null, 'hat_eventlist', get_profile('web.tr_events.hats.hat_eventlist.state', 1)));
示例#2
0
 foreach ($sub_menus as $label => $sub_menu) {
     $sub_menu_row = array();
     foreach ($sub_menu as $id => $sub_page) {
         if (empty($sub_page['menu_text'])) {
             $sub_page['menu_text'] = SPACE;
         }
         $sub_menu_item = new CLink($sub_page['menu_text'], $sub_page['menu_url'], $sub_page['class'] . ' nowrap');
         if ($sub_page['selected']) {
             $sub_menu_item = new CSpan($sub_menu_item, 'active nowrap');
         }
         $sub_menu_row[] = $sub_menu_item;
         $sub_menu_row[] = new CSpan(SPACE . ' | ' . SPACE, 'divider');
     }
     $sub_menu_div = new CDiv($sub_menu_row);
     $sub_menu_div->setAttribute('id', 'sub_' . $label);
     $sub_menu_div->addAction('onmouseover', 'javascript: MMenu.submenu_mouseOver();');
     $sub_menu_div->addAction('onmouseout', 'javascript: MMenu.mouseOut();');
     if (isset($page['menu']) && $page['menu'] == $label) {
         $menu_selected = true;
         $sub_menu_div->setAttribute('style', 'display: block;');
         insert_js('MMenu.def_label = ' . zbx_jsvalue($label));
     } else {
         $sub_menu_div->setAttribute('style', 'display: none;');
     }
     $menu_divs[] = $sub_menu_div;
 }
 $sub_menu_div = new CDiv(SPACE);
 $sub_menu_div->setAttribute('id', 'sub_empty');
 $sub_menu_div->setAttribute('style', 'display: ' . ($menu_selected ? 'none;' : 'block;'));
 $menu_divs[] = $sub_menu_div;
 $search_form = new CForm('search.php');
示例#3
0
$menu = array();
$submenu = array();
// js menu arrays
make_refresh_menu('mainpage', 'hat_slides', get_profile('web.slides.rf_rate.hat_slides', $element['delay'], null, $elementid), array('elementid' => $elementid), $menu, $submenu);
insert_js('var page_menu=' . zbx_jsvalue($menu) . ";\n" . 'var page_submenu=' . zbx_jsvalue($submenu) . ";\n");
// --------------
$tab = new CTable();
$tab->setCellPadding(0);
$tab->setCellSpacing(0);
$tab->setAttribute('border', 0);
$tab->setAttribute('width', '100%');
// Refresh tab
$refresh_tab = array(array('id' => 'hat_slides', 'frequency' => get_profile('web.slides.rf_rate.hat_slides', $element['delay'], null, $elementid), 'url' => 'slides.php?elementid=' . $elementid . url_param('stime') . url_param('period') . url_param('groupid') . url_param('hostid'), 'params' => array('lastupdate' => time())));
add_doll_objects($refresh_tab);
$refresh_icon = new CDiv(SPACE, 'iconmenu');
$refresh_icon->addAction('onclick', 'javascript: create_page_menu(event,"hat_slides");');
$refresh_icon->setAttribute('title', S_MENU);
if (isset($elementid)) {
    $effectiveperiod = navigation_bar_calc();
    if (2 != $_REQUEST['fullscreen']) {
        $stime = time() - 31536000;
        // ~1year
        $bstime = time() - $effectiveperiod;
        if (isset($_REQUEST['stime'])) {
            $bstime = $_REQUEST['stime'];
            $bstime = mktime(substr($bstime, 8, 2), substr($bstime, 10, 2), 0, substr($bstime, 4, 2), substr($bstime, 6, 2), substr($bstime, 0, 4));
        }
        zbx_add_post_js('onload_update_scroll("iframe",0,' . $effectiveperiod . ',' . $stime . ',0,' . $bstime . ');');
    }
    $element = get_slideshow($elementid, 0, $effectiveperiod);
} else {
示例#4
0
文件: charts.php 项目: rennhak/zabbix
        $icon = new CDiv(SPACE, 'iconminus');
        $icon->addOption('title', S_REMOVE_FROM . ' ' . S_FAVORITES);
        $icon->addAction('onclick', new CScript("javascript: rm4favorites('graphid','" . $_REQUEST['graphid'] . "',0);"));
    } else {
        $icon = new CDiv(SPACE, 'iconplus');
        $icon->addOption('title', S_ADD_TO . ' ' . S_FAVORITES);
        $icon->addAction('onclick', new CScript("javascript: add2favorites('graphid','" . $_REQUEST['graphid'] . "');"));
    }
    $icon->addOption('id', 'addrm_fav');
    $url = '?graphid=' . $_REQUEST['graphid'] . ($_REQUEST['fullscreen'] ? '' : '&fullscreen=1');
    $fs_icon = new CDiv(SPACE, 'fullscreen');
    $fs_icon->addOption('title', $_REQUEST['fullscreen'] ? S_NORMAL . ' ' . S_VIEW : S_FULLSCREEN);
    $fs_icon->addAction('onclick', new CScript("javascript: document.location = '" . $url . "';"));
    $rst_icon = new CDiv(SPACE, 'iconreset');
    $rst_icon->addOption('title', S_RESET);
    $rst_icon->addAction('onclick', new CScript("javascript: graphload(SCROLL_BAR.dom_graphs, " . (time() + 100000000) . ", 3600, false);"));
}
$charts_hat = create_hat(S_GRAPHS_BIG, $p_elements, array($icon, $rst_icon, $fs_icon), 'hat_charts', get_profile('web.charts.hats.hat_charts.state', 1));
$charts_hat->show();
if ($_REQUEST['graphid'] > 0) {
    // NAV BAR
    $stime = get_min_itemclock_by_graphid($_REQUEST['graphid']);
    $stime = is_null($stime) ? 0 : $stime;
    $bstime = time() - $effectiveperiod;
    if (isset($_REQUEST['stime'])) {
        $bstime = $_REQUEST['stime'];
        $bstime = mktime(substr($bstime, 8, 2), substr($bstime, 10, 2), 0, substr($bstime, 4, 2), substr($bstime, 6, 2), substr($bstime, 0, 4));
    }
    $script = 'scrollinit(0,' . $effectiveperiod . ',' . $stime . ',0,' . $bstime . '); showgraphmenu("graph");';
    if ($graphtype == GRAPH_TYPE_NORMAL || $graphtype == GRAPH_TYPE_STACKED) {
        $script .= 'graph_zoom_init("' . $dom_graph_id . '",' . $bstime . ',' . $effectiveperiod . ',ZBX_G_WIDTH,' . $graph_height . ',true);';
示例#5
0
foreach ($PAGE_GROUPS['groups'] as $groupid => $name) {
    $cmbGroups->addItem($groupid, get_node_name_by_elid($groupid) . $name);
}
foreach ($PAGE_HOSTS['hosts'] as $hostid => $name) {
    $cmbHosts->addItem($hostid, get_node_name_by_elid($hostid) . $name);
}
$r_form->addItem(array(S_GROUP . SPACE, $cmbGroups));
$r_form->addItem(array(SPACE . S_HOST . SPACE, $cmbHosts));
$r_form->addVar('fullscreen', $_REQUEST['fullscreen']);
$url = 'tr_status.php' . ($_REQUEST['fullscreen'] ? '' : '?fullscreen=1');
$fs_icon = new CDiv(SPACE, 'fullscreen');
$fs_icon->setAttribute('title', $_REQUEST['fullscreen'] ? S_NORMAL . ' ' . S_VIEW : S_FULLSCREEN);
$fs_icon->addAction('onclick', new CScript("javascript: document.location = '" . $url . "';"));
$mute_icon = new CDiv(SPACE, $mute ? 'iconmute' : 'iconsound');
$mute_icon->setAttribute('title', S_SOUND . ' ' . S_ON . '/' . S_OFF);
$mute_icon->addAction('onclick', new CScript("javascript: switch_mute(this);"));
$tr_numrows = new CSpan(null, 'info');
$tr_numrows->setAttribute('name', 'tr_numrows');
$tr_info = array(S_TRIGGERS, new CSpan(SPACE . SPACE . '|' . SPACE . SPACE, 'divider'), S_FOUND . ': ', $tr_numrows, SPACE . SPACE . SPACE . S_UPDATED . ': ', new CSpan(date(S_DATE_FORMAT_YMDHMS), 'info'));
$trigg_wdgt->addHeader(S_STATUS_OF_TRIGGERS_BIG, array($mute_icon, $fs_icon));
$trigg_wdgt->addHeader($tr_info, $r_form);
/************************* FILTER **************************/
/***********************************************************/
$filterForm = new CFormTable();
//,'tr_status.php?filter_set=1','POST',null,'sform');
$filterForm->setAttribute('name', 'zbx_filter');
$filterForm->setAttribute('id', 'zbx_filter');
$filterForm->setMethod('post');
$filterForm->addVar('fullscreen', $_REQUEST['fullscreen']);
$filterForm->addVar('groupid', $_REQUEST['groupid']);
$filterForm->addVar('hostid', $_REQUEST['hostid']);
示例#6
0
function create_filter($col_l, $col_r, $items, $id = 'zbx_filter', $state = 1)
{
    if (isset($_REQUEST['print'])) {
        $state = 0;
    }
    $table = new CTable();
    $table->addOption('width', '100%');
    $table->setCellPadding(0);
    $table->setCellSpacing(0);
    $table->addOption('border', 0);
    $icon = new CDiv(SPACE, $state ? 'filteropened' : 'filterclosed');
    $icon->addAction('onclick', new CScript("javascript: change_filter_state(this,'" . $id . "');"));
    $icon->addOption('title', S_MAXIMIZE . '/' . S_MINIMIZE);
    $icon->addAction('id', 'filter_icon');
    $td_icon = new CCol($icon);
    $td_icon->addOption('valign', 'bottom');
    $icons_row = array($td_icon, SPACE);
    $icons_row[] = $col_l;
    $icon_tab = new CTable();
    $icon_tab->setCellSpacing(0);
    $icon_tab->setCellPadding(0);
    $icon_tab->addRow($icons_row);
    $table->addRow(get_thin_table_header($icon_tab, $col_r));
    $div = new CDiv($items);
    $div->addOption('id', $id);
    if (!$state) {
        $div->addOption('style', 'display: none;');
    }
    $tab = new CTable();
    $tab->addRow($div);
    //		$table->addRow($tab);
    $table->addRow($div);
    return $table;
}
示例#7
0
function show_messages($bool = TRUE, $okmsg = NULL, $errmsg = NULL)
{
    global $page, $ZBX_MESSAGES;
    if (!defined('PAGE_HEADER_LOADED')) {
        return;
    }
    if (!isset($page["type"])) {
        $page["type"] = PAGE_TYPE_HTML;
    }
    $message = array();
    $width = 0;
    $height = 0;
    $img_space = null;
    if (!$bool && !is_null($errmsg)) {
        $msg = 'ERROR: ' . $errmsg;
    } else {
        if ($bool && !is_null($okmsg)) {
            $msg = $okmsg;
        }
    }
    if (isset($msg)) {
        switch ($page['type']) {
            case PAGE_TYPE_IMAGE:
                array_push($message, array('text' => $msg, 'color' => !$bool ? array('R' => 255, 'G' => 0, 'B' => 0) : array('R' => 34, 'G' => 51, 'B' => 68), 'font' => 2));
                $width = max($width, ImageFontWidth(2) * strlen($msg) + 1);
                $height += imagefontheight(2) + 1;
                break;
            case PAGE_TYPE_XML:
                echo htmlspecialchars($msg) . "\n";
                break;
            case PAGE_TYPE_HTML:
            default:
                $msg_tab = new CTable($msg, $bool ? 'msgok' : 'msgerr');
                $msg_tab->setCellPadding(0);
                $msg_tab->setCellSpacing(0);
                $msg_col = new CCol(bold($msg), 'msg_main msg');
                $msg_col->addOption('id', 'page_msg');
                $msg_details = SPACE;
                if (isset($ZBX_MESSAGES) && !empty($ZBX_MESSAGES)) {
                    $msg_details = new CDiv(array(S_DETAILS), 'pointer');
                    $msg_details->addAction('onclick', new CScript("javascript: ShowHide('msg_messages', IE?'block':'table');"));
                    $msg_details->addOption('title', S_MAXIMIZE . '/' . S_MINIMIZE);
                }
                $msg_tab->addRow(array(new CCol($msg_details, 'clr'), $msg_col));
                $msg_tab->Show();
                $img_space = new CImg('images/general/tree/zero.gif', 'space', '100', '2');
                break;
        }
    }
    if (isset($ZBX_MESSAGES)) {
        if ($page['type'] == PAGE_TYPE_IMAGE) {
            $msg_font = 2;
            foreach ($ZBX_MESSAGES as $msg) {
                if ($msg['type'] == 'error') {
                    array_push($message, array('text' => $msg['message'], 'color' => array('R' => 255, 'G' => 55, 'B' => 55), 'font' => $msg_font));
                } else {
                    array_push($message, array('text' => $msg['message'], 'color' => array('R' => 155, 'G' => 155, 'B' => 55), 'font' => $msg_font));
                }
                $width = max($width, imagefontwidth($msg_font) * strlen($msg['message']) + 1);
                $height += imagefontheight($msg_font) + 1;
            }
        } else {
            if ($page['type'] == PAGE_TYPE_XML) {
                foreach ($ZBX_MESSAGES as $msg) {
                    echo '[' . $msg['type'] . '] ' . $msg['message'] . "\n";
                }
            } else {
                $lst_error = new CList(null, 'messages');
                foreach ($ZBX_MESSAGES as $msg) {
                    $lst_error->addItem($msg['message'], $msg['type']);
                    $bool = $bool && 'error' != strtolower($msg['type']);
                }
                //message scroll if needed
                $msg_show = 6;
                $msg_count = count($ZBX_MESSAGES);
                if ($msg_count > $msg_show) {
                    $msg_count = $msg_show;
                    $msg_count = $msg_count * 16;
                    $lst_error->addOption('style', 'height: ' . $msg_count . 'px;');
                }
                $tab = new CTable(null, $bool ? 'msgok' : 'msgerr');
                $tab->setCellPadding(0);
                $tab->setCellSpacing(0);
                $tab->addOption('id', 'msg_messages');
                $tab->addOption('style', 'width: 100%;');
                if (isset($msg_tab) && $bool) {
                    $tab->addOption('style', 'display: none;');
                }
                $tab->addRow(new CCol($lst_error, 'msg'));
                $tab->Show();
                //---
            }
        }
        $ZBX_MESSAGES = null;
    }
    if (!is_null($img_space)) {
        print unpack_object($img_space);
    }
    if ($page['type'] == PAGE_TYPE_IMAGE && count($message) > 0) {
        $width += 2;
        $height += 2;
        $canvas = imagecreate($width, $height);
        imagefilledrectangle($canvas, 0, 0, $width, $height, imagecolorallocate($canvas, 255, 255, 255));
        foreach ($message as $id => $msg) {
            $message[$id]['y'] = 1 + (isset($previd) ? $message[$previd]['y'] + $message[$previd]['h'] : 0);
            $message[$id]['h'] = imagefontheight($msg['font']);
            imagestring($canvas, $msg['font'], 1, $message[$id]['y'], $msg['text'], imagecolorallocate($canvas, $msg['color']['R'], $msg['color']['G'], $msg['color']['B']));
            $previd = $id;
        }
        imageOut($canvas);
        imagedestroy($canvas);
    }
}
示例#8
0
function create_hat($caption, $items, $addicons = null, $id = null, $state = null)
{
    if (is_null($id)) {
        list($usec, $sec) = explode(' ', microtime());
        $id = 'hat_' . (int) ($sec % 10) . (int) ($usec * 1000);
    }
    $td_l = new CCol(SPACE);
    $td_l->setAttribute('width', '100%');
    $icons_row = array($td_l);
    if (!is_null($addicons)) {
        if (!is_array($addicons)) {
            $addicons = array($addicons);
        }
        foreach ($addicons as $value) {
            $icons_row[] = $value;
        }
    }
    if (!is_null($state)) {
        $icon = new CDiv(SPACE, $state ? 'arrowup' : 'arrowdown');
        $icon->setAttribute('id', $id . '_icon');
        $icon->addAction('onclick', new CScript("javascript: change_hat_state(this,'" . $id . "');"));
        $icon->setAttribute('title', S_SHOW . '/' . S_HIDE);
        $icons_row[] = $icon;
    } else {
        $state = true;
    }
    $icon_tab = new CTable();
    $icon_tab->setAttribute('width', '100%');
    $icon_tab->addRow($icons_row);
    $table = new CTable();
    $table->setAttribute('width', '100%');
    $table->setCellPadding(0);
    $table->setCellSpacing(0);
    $table->addRow(get_table_header($caption, $icon_tab));
    $div = new CDiv($items);
    $div->setAttribute('id', $id);
    if (!$state) {
        $div->setAttribute('style', 'display: none;');
    }
    $table->addRow($div);
    return $table;
}
示例#9
0
 public function get()
 {
     $widget = new CTable();
     $widget->setAttribute('width', '100%');
     $widget->setCellPadding(0);
     $widget->setCellSpacing(0);
     foreach ($this->headers as $num => $header) {
         $right_tab = null;
         if (!is_null($header['right']) || !is_null($this->state)) {
             $td_l = new CCol(SPACE);
             $td_l->setAttribute('width', '100%');
             $right_row = array($td_l);
             if (!is_null($header['right'])) {
                 foreach ($header['right'] as $num => $r_item) {
                     $right_row[] = new CCol($r_item);
                 }
             }
             if (!is_null($this->state)) {
                 $icon = new CDiv(SPACE, $this->state ? 'arrowup' : 'arrowdown');
                 $icon->setAttribute('id', $this->domid . '_icon');
                 $icon->setAttribute('title', S_SHOW . '/' . S_HIDE);
                 $icon->addAction('onclick', new CScript("javascript: change_hat_state(this,'" . $this->domid . "');"));
                 $right_row[] = new CCol($icon);
             }
             $right_tab = new CTable(null, 'textwhite');
             $right_tab->setAttribute('width', '100%');
             $right_tab->addRow($right_row);
         }
         $header_tab = new CTable(null, 'nowrap');
         $header_tab->setAttribute('width', '100%');
         //			$header_tab->setAttribute('border','1');
         $header_tab->setCellPadding(0);
         $header_tab->setCellSpacing(0);
         $header_tab->addRow($this->createHeader($header['left'], $right_tab));
         $widget->addRow($header_tab);
     }
     if (is_null($this->state)) {
         $this->state = true;
     }
     if (!empty($this->flicker)) {
         $flicker_domid = 'flicker_' . $this->domid;
         $flicker_tab = new CTable();
         $flicker_tab->setAttribute('width', '100%');
         $flicker_tab->setCellPadding(0);
         $flicker_tab->setCellSpacing(0);
         $flicker_tab->setAttribute('border', 0);
         $div = new CDiv($this->flicker);
         $div->setAttribute('id', $flicker_domid);
         if (!$this->flicker_state) {
             $div->setAttribute('style', 'display: none;');
         }
         $flicker_tab->addRow($div);
         $icon_l = new CDiv(SPACE . SPACE, $this->flicker_state ? 'dbl_arrow_up' : 'dbl_arrow_down');
         $icon_l->setAttribute('title', S_MAXIMIZE . '/' . S_MINIMIZE);
         $icon_l->setAttribute('id', 'flicker_icon_l');
         $icon_r = new CDiv(SPACE . SPACE, $this->flicker_state ? 'dbl_arrow_up' : 'dbl_arrow_down');
         $icon_r->setAttribute('title', S_MAXIMIZE . '/' . S_MINIMIZE);
         $icon_r->setAttribute('id', 'flicker_icon_r');
         $icons_row = new CTable(null, 'whitetext');
         $icons_row->addRow(array($icon_l, SPACE, S_FILTER, SPACE, $icon_r));
         $thin_tab = $this->createFlicker($icons_row);
         $thin_tab->setAttribute('id', 'filter_icon');
         $thin_tab->addAction('onclick', new CScript("javascript: change_flicker_state('" . $flicker_domid . "');"));
         $flicker_tab->addRow($thin_tab, 'textcolorstyles link pointer');
         $widget->addRow($flicker_tab);
     }
     $div = new CDiv($this->body);
     $div->setAttribute('id', $this->domid);
     if (!$this->state) {
         $div->setAttribute('style', 'display: none;');
     }
     $widget->addRow($div);
     return $widget;
 }
示例#10
0
        echo $main_header . SBR;
    }
    $_REQUEST['period'] = get_request('period', get_profile('web.item.graph.period', ZBX_PERIOD_DEFAULT, PROFILE_TYPE_INT, $_REQUEST['itemid']));
    if ($_REQUEST['period'] >= ZBX_MIN_PERIOD) {
        update_profile('web.item.graph.period', $_REQUEST['period'], PROFILE_TYPE_INT, $_REQUEST['itemid']);
    }
    $l_header = array(new CLink($item_data['host'], 'latest.php?hostid=' . $item_data['hostid']), ': ', item_description($item_data));
    if ('showgraph' == $_REQUEST['action']) {
        if (infavorites('web.favorite.graphids', $_REQUEST['itemid'], 'itemid')) {
            $icon = new CDiv(SPACE, 'iconminus');
            $icon->setAttribute('title', S_REMOVE_FROM . ' ' . S_FAVOURITES);
            $icon->addAction('onclick', new CScript("javascript: rm4favorites('itemid','" . $_REQUEST['itemid'] . "',0);"));
        } else {
            $icon = new CDiv(SPACE, 'iconplus');
            $icon->setAttribute('title', S_ADD_TO . ' ' . S_FAVOURITES);
            $icon->addAction('onclick', new CScript("javascript: add2favorites('itemid','" . $_REQUEST['itemid'] . "');"));
        }
        $icon->setAttribute('id', 'addrm_fav');
        $icon_tab = new CTable();
        $icon_tab->addRow(array($icon, SPACE, $l_header));
        $l_header = $icon_tab;
    }
}
unset($item_data);
$to_save_request = null;
if (!isset($_REQUEST['plaintext']) && $_REQUEST['fullscreen'] == 0) {
    if ($item_type == ITEM_VALUE_TYPE_LOG) {
        $l_header = new CForm();
        $l_header->setName('loglist');
        $l_header->setMethod('get');
        $l_header->addVar('action', $_REQUEST['action']);
示例#11
0
$refresh_menu->addAction('onclick', 'javascript: create_page_menu(event,"hat_stszbx");');
$refresh_menu->addOption('title', S_MENU);
$right_tab->addRow(create_hat(S_STATUS_OF_ZABBIX, new CSpan(S_LOADING_P, 'textcolorstyles'), array($refresh_menu), 'hat_stszbx', get_profile('web.dashboard.hats.hat_stszbx.state', 1)));
$refresh_menu = new CDiv(SPACE, 'iconmenu');
$refresh_menu->addAction('onclick', 'javascript: create_page_menu(event,"hat_lastiss");');
$refresh_menu->addOption('title', S_MENU);
$right_tab->addRow(create_hat(S_LAST_20_ISSUES, new CSpan(S_LOADING_P, 'textcolorstyles'), array($refresh_menu), 'hat_lastiss', get_profile('web.dashboard.hats.hat_lastiss.state', 1)));
$refresh_menu = new CDiv(SPACE, 'iconmenu');
$refresh_menu->addAction('onclick', 'javascript: create_page_menu(event,"hat_webovr");');
$refresh_menu->addOption('title', S_MENU);
$right_tab->addRow(create_hat(S_WEB_MONITORING, new CSpan(S_LOADING_P, 'textcolorstyles'), array($refresh_menu), 'hat_webovr', get_profile('web.dashboard.hats.hat_webovr.state', 1)));
$drules = DBfetch(DBselect('SELECT COUNT(d.druleid) as cnt FROM drules d WHERE ' . DBin_node('d.druleid') . ' AND d.status=' . DRULE_STATUS_ACTIVE));
if ($drules['cnt'] > 0 && check_right_on_discovery(PERM_READ_ONLY)) {
    $refresh_tab[] = array('id' => 'hat_dscvry', 'frequency' => get_profile('web.dahsboard.rf_rate.hat_dscvry', 60));
    $refresh_menu = new CDiv(SPACE, 'iconmenu');
    $refresh_menu->addAction('onclick', 'javascript: create_page_menu(event,"hat_dscvry");');
    $refresh_menu->addOption('title', S_MENU);
    $right_tab->addRow(create_hat(S_DISCOVERY_STATUS, new CSpan(S_LOADING_P, 'textcolorstyles'), array($refresh_menu), 'hat_dscvry', get_profile('web.dashboard.hats.hat_dscvry.state', 1)));
}
add_doll_objects($refresh_tab);
/*		
	$right_tab->addRow(create_hat(
			S_GRAPH,
			null,//make_webmon_overview(),
			null,
			'hat_custom',
			get_profile('web.dashboard.hats.hat_custom.state',1)
		));
*/
$td_l = new CCol($left_tab);
$td_l->addOption('valign', 'top');