$widget->show(); break; case WIDGET_HOST_STATUS: $widget = make_hoststat_summary($dashboardConfig); $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');
$syssum->show(); break; case 'hat_hoststat': $hoststat = make_hoststat_summary($dashconf); $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();
if ('refresh' == $_REQUEST['favobj']) { switch ($_REQUEST['favid']) { case 'hat_syssum': $syssum = make_system_summary(); $syssum->show(); break; case 'hat_stszbx': $stszbx = make_status_of_zbx(); $stszbx->show(); break; case 'hat_lastiss': $lastiss = make_latest_issues(); $lastiss->show(); break; case 'hat_webovr': $webovr = make_webmon_overview(); $webovr->show(); break; case 'hat_dscvry': $dscvry = make_discovery_status(); $dscvry->show(); break; } } if ('set_rf_rate' == $_REQUEST['favobj']) { if (str_in_array($_REQUEST['favid'], array('hat_syssum', 'hat_stszbx', 'hat_lastiss', 'hat_webovr', 'hat_dscvry'))) { update_profile('web.dahsboard.rf_rate.' . $_REQUEST['favid'], $_REQUEST['favcnt'], PROFILE_TYPE_INT); $_REQUEST['favcnt'] = get_profile('web.dahsboard.rf_rate.' . $_REQUEST['favid'], 60); $script = get_update_doll_script('mainpage', $_REQUEST['favid'], 'frequency', $_REQUEST['favcnt']); $script .= get_update_doll_script('mainpage', $_REQUEST['favid'], 'stopDoll'); $script .= get_update_doll_script('mainpage', $_REQUEST['favid'], 'startDoll');