Esempio n. 1
0
             $links[] = Menu::get_menu_url("../incidents/index.php?type={$event_type}&status=not_closed", 'analysis', 'tickets', 'tickets');
             $i++;
         }
         if (is_array($links)) {
             $links = "'" . implode("','", $links) . "'";
         }
         $event_types = array_keys($ticket_by_type_per_month);
         $legend_text = array_keys($ticket_by_type_per_month[$event_types[0]]);
     }
     break;
 case 'ticketsByPriority':
     $type_graph = 'pie';
     $colors = null;
     $legend = empty($_GET['legend']) ? "w" : GET('legend');
     $temp_colors = array("0" => "#FFFEAF", "1" => "#FFFD00", "2" => "#FFE200", "3" => "#FFCE00", "4" => "#FFB900", "5" => "#FFA500", "6" => "#FF8C00", "7" => "#FF7700", "8" => "#DA0000", "9" => "#BB0000", "10" => "#8B0000");
     $list = Incident::incidents_by_priority($conn);
     if (is_array($list) && !empty($list)) {
         foreach ($list as $priority => $v) {
             if ($v > 0) {
                 $data[] = "['" . _("Priority") . " " . $priority . "'," . $v . "]";
                 $colors[$temp_colors[$priority]] = $temp_colors[$priority];
                 $links[] = Menu::get_menu_url("../incidents/index.php?priority=" . Incident::get_priority_string($priority) . "&status=not_closed", 'analysis', 'tickets', 'tickets');
             }
         }
         if (is_array($data)) {
             $data = implode(",", $data);
             $colors = "'" . implode("','", $colors) . "'";
             $links = "'" . implode("','", $links) . "'";
         }
     } else {
         $data = "['" . _("No tickets") . "',0]";
Esempio n. 2
0
         if ($days > 6) {
             $days = 6;
         }
         @$ttl_groups[$days]++;
     }
     $data = array_values($ttl_groups);
     foreach ($data as $dy) {
         $link = Menu::get_menu_url("/ossim/incidents/index.php?status=Closed&hmenu=Tickets&smenu=Tickets", 'analysis', 'tickets');
         $links[] = $link;
     }
     $label = array(Util::html_entities2utf8(_("1 Day")), Util::html_entities2utf8(_("2 Days")), Util::html_entities2utf8(_("3 Days")), Util::html_entities2utf8(_("4 Days")), Util::html_entities2utf8(_("5 Days")), Util::html_entities2utf8(_("6+ Days")));
     $serie = 'Amount of Tickets';
     $colors = get_widget_colors(count($data));
     break;
 case 'ticketsByPriority':
     $list = Incident::incidents_by_priority($conn, $param_filters["assets"], $param_filters["user"]);
     if (is_array($list) && !empty($list)) {
         foreach ($list as $priority => $v) {
             if ($v > 0) {
                 $data[] = $v;
                 $label[] = _("Priority") . " " . $priority;
                 $link = Menu::get_menu_url("/ossim/incidents/index.php?priority=" . Incident::get_priority_string($priority) . "&status=not_closed&hmenu=Tickets&smenu=Tickets", 'analysis', 'tickets');
                 $links[] = $link;
             }
         }
     }
     $serie = 'Amount of Tickets';
     $colors = get_widget_colors(count($data));
     break;
 case 'ticketTags':
     $ticket_by_tags = Incident::incidents_by_tag($conn, $param_filters["assets"], $param_filters["user"]);