$refresh_menu = get_icon('menu', array('menu' => 'hat_webovr')); $web_mon = new CUIWidget('hat_webovr', new CSpan(_('Loading...'), 'textcolorstyles'), CProfile::get('web.dashboard.hats.hat_webovr.state', 1)); $web_mon->setHeader(_('Web monitoring'), array($refresh_menu)); $web_mon->setFooter(new CDiv(SPACE, 'textwhite', 'hat_webovr_footer')); $rightColumn[] = $web_mon; // discovery info $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' => CProfile::get('web.dashboard.rf_rate.hat_dscvry', 60)); $refresh_menu = get_icon('menu', array('menu' => 'hat_dscvry')); $dcvr_mon = new CUIWidget('hat_dscvry', new CSpan(_('Loading...'), 'textcolorstyles'), CProfile::get('web.dashboard.hats.hat_dscvry.state', 1)); $dcvr_mon->setHeader(_('Discovery status'), array($refresh_menu)); $dcvr_mon->setFooter(new CDiv(SPACE, 'textwhite', 'hat_dscvry_footer')); $rightColumn[] = $dcvr_mon; } add_doll_objects($refresh_tab); $dashboardTable = new CTable(); $dashboardTable->addRow(array(new CDiv($leftColumn, 'column'), new CDiv($rightColumn, 'column'), new CDiv(null, 'column')), 'top'); $dashboardWidget->addItem($dashboardTable); $dashboardWidget->show(); // activating blinking zbx_add_post_js('jqBlink.blink();'); ?> <script type="text/javascript"> //<!--<![CDATA[ function addPopupValues(list) { if (!isset('object', list)) { throw("Error hash attribute 'list' doesn't contain 'object' index"); return false; } if ('undefined' == typeof(Ajax)) {
if (!empty($this->data['screen'])) { // append groups to form if (!empty($this->data['page_groups'])) { $groupsComboBox = new CComboBox('groupid', $this->data['page_groups']['selected'], 'javascript: submit();'); foreach ($this->data['page_groups']['groups'] as $groupid => $name) { $groupsComboBox->addItem($groupid, get_node_name_by_elid($groupid, null, ': ') . $name); } $slideForm->addItem(array(SPACE . _('Group') . SPACE, $groupsComboBox)); } // append hosts to form if (!empty($this->data['page_hosts'])) { $this->data['page_hosts']['hosts']['0'] = _('Default'); $hostsComboBox = new CComboBox('hostid', $this->data['page_hosts']['selected'], 'javascript: submit();'); foreach ($this->data['page_hosts']['hosts'] as $hostid => $name) { $hostsComboBox->addItem($hostid, get_node_name_by_elid($hostid, null, ': ') . $name); } $slideForm->addItem(array(SPACE . _('Host') . SPACE, $hostsComboBox)); } $scrollDiv = new CDiv(); $scrollDiv->setAttribute('id', 'scrollbar_cntr'); $slideWidget->addFlicker($scrollDiv, CProfile::get('web.slides.filter.state', 1)); $slideWidget->addFlicker(BR(), CProfile::get('web.slides.filter.state', 1)); // js menu insert_js('var page_menu=' . zbx_jsvalue($this->data['menu']) . ";\n" . 'var page_submenu=' . zbx_jsvalue($this->data['submenu']) . ";\n"); add_doll_objects(array(array('id' => 'hat_slides', 'frequency' => $this->data['element']['delay'] * $this->data['refresh_multiplier'], 'url' => 'slides.php?elementid=' . $this->data['elementid'] . url_param('groupid') . url_param('hostid'), 'params' => array('lastupdate' => time())))); $slideWidget->addItem(new CSpan(_('Loading...'), 'textcolorstyles')); } else { $slideWidget->addItem(new CTableInfo(_('No slides defined.'))); } } return $slideWidget;