} $param_filters["assets"] = array(); if (empty($param_filters['user'])) { if (is_array($assets_filters["assets"]['host'])) { foreach ($assets_filters["assets"]['host'] as $k => $v) { $param_filters["assets"][$k] = $v['ip']; } } if (is_array($assets_filters["assets"]['net'])) { foreach ($assets_filters["assets"]['net'] as $k => $v) { $param_filters["assets"][$k] = $v['ip']; } } } $operator = $chart_info['type'] != '' ? $chart_info['type'] : 'max'; $list = Incident::get_list_filtered($conn, $param_filters["assets"], " AND incident.status = 'Open'", $param_filters["user"]); if (is_array($list) && !empty($list)) { $min = 10; $max = 0; $avg = 0; foreach ($list as $t) { if ($t->get_priority() < $min) { $min = $t->get_priority(); } if ($t->get_priority() > $max) { $max = $t->get_priority(); } $avg += $t->get_priority(); } switch ($operator) { case 'min':
* Public License can be found in `/usr/share/common-licenses/GPL-2'. * * Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt ****************************************************************************/ require_once 'classes/Host.inc'; require_once 'classes/Util.inc'; if ($host != 'any') { $host_ip2ulong = Host::ip2ulong($host); if ($date_from != '' && $date_to != '') { $date_from = preg_match("/^\\d+\\-\\d+\\-\\d+\$/", $date_from) ? $date_from . " 00:00:00" : $date_from; $date_to = preg_match("/^\\d+\\-\\d+\\-\\d+\$/", $date_to) ? $date_to . " 23:59:59" : $date_to; $tzc = Util::get_tzc(); $date_filter = "AND (convert_tz(date,'+00:00','{$tzc}') BETWEEN '{$date_from}' AND '{$date_to}')"; } $where = "AND status='open' {$date_filter} ORDER BY date DESC"; $incident_list2 = Incident::get_list_filtered($conn, $host_ip2ulong, $where); $tick_num = count($incident_list2); } else { $where = "AND status='open' ORDER BY date DESC"; $incident_list2 = Incident::search($conn, array("status" => "Open"), "priority", "DESC", 1, 6); $tick_num = count($incident_list2); } $i_date = "-"; $i_maxprio = 0; $i_maxprio_id = 1; ?> <script type="text/javascript">$("#pbar").progressBar(75);$("#progressText").html('<?php echo gettext("Loading"); ?> <strong><?php