static function get_all_server_search_json() { $arr_server_objs = server_actions::get_all_server(); foreach ($arr_server_objs as $server) { $data[$server->server_id]['info_string'] = $server->hostname; } return json_encode($data); }
#error_reporting(E_ALL); ini_set('display_errors', '1'); include "./includes/templates/header.php"; include "./includes/templates/top_header.php"; include_once "./includes/classes/class_server.php"; include_once "./includes/classes/class_server_actions.php"; include_once "./includes/classes/class_instance.php"; include_once "./includes/classes/class_instance_actions.php"; include_once "./includes/classes/class_parameter.php"; include_once "./includes/classes/class_parameter_actions.php"; # Generating instance objects $arr_server_objs = server_actions::get_all_server(); ?> <script type="text/javascript"> var instance_search_objs = <?php echo server_actions::get_all_server_search_json(); ?> ; </script> <div id="bottom-header"> <div class="container clearfix"> <h1 id="bh_h1">FRA monitor</h1> <div id="target_menu_div"> <ul id="target_menu"> </ul> </div> <input onkeyup="instant_search_instances(this.value);" class="prod_db_search" type="text" placeholder="Search all databases ..."> </div> <div style="clear: both;"></div> </div>
session_start(); # Database Settings $_SESSION['db_host'] = "localhost"; $_SESSION['db_user'] = "******"; $_SESSION['db_password'] = "******"; $_SESSION['db_database'] = "oraparacollect"; #$db = mysqli_connect($_SESSION['db_host'], $_SESSION['db_user'], $_SESSION['db_password'], $_SESSION['db_database']); test commnect include_once "../classes/class_server.php"; include_once "../classes/class_server_actions.php"; include_once "../classes/class_instance.php"; include_once "../classes/class_instance_actions.php"; include_once "../classes/class_parameter.php"; include_once "../classes/class_parameter_actions.php"; include_once "../classes/class_notification.php"; # Generating instance objects $arr_server_objs = server_actions::get_all_server(); # FRA Monitor Notification foreach ($arr_server_objs as $server) { if ($server->get_fra_assigned_percentage() >= 100) { if (notification::check_fra_notification_flag($server->server_id) == false) { notification::send_fra_notification($server, $GLOBALS['config']['fra_notification_mail']); notification::add_fra_notification_flag($server->server_id); } } else { notification::drop_fra_notification_flag($server->server_id); } } # Switchover Notificaiton $so_data_arr = parameter_actions::get_all_switchover_as_array(); foreach ($so_data_arr as $time => $switchover) { if (notification::check_switchover_flag($time, $switchover['rz1_db_id'], $switchover['rz2_db_id']) == false) {