/** * Process screen. * * @return CDiv (screen inside container) */ public function get() { global $page; // rewrite page file $page['file'] = $this->pageFile; $item = new CUIWidget('hat_syssum', make_system_status(array('groupids' => null, 'hostids' => null, 'maintenance' => null, 'severity' => null, 'limit' => null, 'extAck' => 0, 'screenid' => $this->screenid))); $item->setHeader(_('Status of Zabbix'), SPACE); $item->setFooter(_s('Updated: %s', zbx_date2str(_('H:i:s')))); return $this->getOutput($item); }
$lastiss->setFooter(new CDiv(SPACE, 'textwhite', 'hat_lastiss_footer')); $rightColumn[] = $lastiss; // web monitoring $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");
$link = 'groupid=' . $group['groupid'] . '&hostid=' . $templateid . '&switch_node=' . id2nodeid($templateid); $caption = make_decoration($template['name'], $search); if (isset($rw_templates[$templateid])) { $template_link = new CLink($caption, 'templates.php?form=update&' . '&templateid=' . $templateid . '&switch_node=' . id2nodeid($templateid)); $applications_link = array(new CLink(_('Applications'), 'applications.php?' . $link), ' (' . $template['applications'] . ')'); $items_link = array(new CLink(_('Items'), 'items.php?filter_set=1&' . $link), ' (' . $template['items'] . ')'); $triggers_link = array(new CLink(_('Triggers'), 'triggers.php?' . $link), ' (' . $template['triggers'] . ')'); $graphs_link = array(new CLink(_('Graphs'), 'graphs.php?' . $link), ' (' . $template['graphs'] . ')'); $screensLink = array(new CLink(_('Screens'), 'screenconf.php?templateid=' . $templateid), ' (' . $template['screens'] . ')'); $discoveryLink = array(new CLink(_('Discovery'), 'host_discovery.php?' . $link), ' (' . $template['discoveries'] . ')'); $httpTestsLink = array(new CLink(_('Web'), 'httpconf.php?' . $link), ' (' . $template['httpTests'] . ')'); } else { $template_link = new CSpan($caption); $applications_link = _('Applications') . ' (' . $template['applications'] . ')'; $items_link = _('Items') . ' (' . $template['items'] . ')'; $triggers_link = _('Triggers') . ' (' . $template['triggers'] . ')'; $graphs_link = _('Graphs') . ' (' . $template['graphs'] . ')'; $screensLink = _('Screens') . ' (' . $template['screens'] . ')'; $discoveryLink = _('Discovery') . ' (' . $template['discoveries'] . ')'; $httpTestsLink = _('Web') . ' (' . $template['httpTests'] . ')'; } $table->addRow(array(get_node_name_by_elid($templateid, true), $template_link, $applications_link, $items_link, $triggers_link, $graphs_link, $screensLink, $discoveryLink, $httpTestsLink)); } $wdgt_templates = new CUIWidget('search_templates', $table, CProfile::get('web.search.hats.search_templates.state', true)); $wdgt_templates->setHeader(_('Templates'), SPACE); $wdgt_templates->setFooter(_s('Displaying %1$s of %2$s found', $viewCount, $overalCount)); $searchWidget->addItem(new CDiv($wdgt_templates)); } //---------------- $searchWidget->show(); require_once dirname(__FILE__) . '/include/page_footer.php';