$hoststat->show(); break; case 'hat_stszbx': $stszbx = make_status_of_zbx(); $stszbx->show(); break; case 'hat_lastiss': $lastiss = make_latest_issues($dashconf); $lastiss->show(); break; case 'hat_webovr': $webovr = make_webmon_overview($dashconf); $webovr->show(); break; case 'hat_dscvry': $dscvry = make_discovery_status(); $dscvry->show(); break; } } } if ($_REQUEST['favobj'] == 'set_rf_rate') { if (str_in_array($_REQUEST['favref'], array('hat_syssum', 'hat_stszbx', 'hat_lastiss', 'hat_webovr', 'hat_dscvry', 'hat_hoststat'))) { CProfile::update('web.dashboard.rf_rate.' . $_REQUEST['favref'], $_REQUEST['favcnt'], PROFILE_TYPE_INT); $_REQUEST['favcnt'] = CProfile::get('web.dashboard.rf_rate.' . $_REQUEST['favref'], 60); echo get_update_doll_script('mainpage', $_REQUEST['favref'], 'frequency', $_REQUEST['favcnt']) . get_update_doll_script('mainpage', $_REQUEST['favref'], 'stopDoll') . get_update_doll_script('mainpage', $_REQUEST['favref'], 'startDoll'); $menu = array(); $submenu = array(); make_refresh_menu('mainpage', $_REQUEST['favref'], $_REQUEST['favcnt'], null, $menu, $submenu); echo 'page_menu["menu_' . $_REQUEST['favref'] . '"] = ' . zbx_jsvalue($menu['menu_' . $_REQUEST['favref']]) . ';'; }
$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; } } if (hasRequest('widgetName')) { $widgetName = getRequest('widgetName'); $widgets = array(WIDGET_SYSTEM_STATUS, WIDGET_ZABBIX_STATUS, WIDGET_LAST_ISSUES, WIDGET_WEB_OVERVIEW, WIDGET_DISCOVERY_STATUS, WIDGET_HOST_STATUS, WIDGET_FAVOURITE_GRAPHS, WIDGET_FAVOURITE_MAPS, WIDGET_FAVOURITE_SCREENS); if (in_array($widgetName, $widgets)) { // refresh rate if (hasRequest('widgetRefreshRate')) { $widgetRefreshRate = getRequest('widgetRefreshRate'); CProfile::update('web.dashboard.widget.' . $widgetName . '.rf_rate', $widgetRefreshRate, PROFILE_TYPE_INT); echo 'PMasters["dashboard"].dolls["' . $widgetName . '"].frequency(' . CJs::encodeJson($widgetRefreshRate) . ');' . "\n" . 'PMasters["dashboard"].dolls["' . $widgetName . '"].restartDoll();'; } // widget state