'Processors', 'url' => generate_url(['page' => 'device', 'device' => $device['device_id'], 'tab' => 'health', 'metric' => 'processor']), 'icon' => $config['icon']['processor'], ]; echo generate_box_open($box_args); $graph_array = []; $graph_array['height'] = "100"; $graph_array['width'] = "512"; $graph_array['to'] = $config['time']['now']; $graph_array['device'] = $device['device_id']; $graph_array['type'] = (isset($device['graphs']['ucd_ss_cpu']) ? 'device_ucd_ss_cpu' : 'device_processor'); $graph_array['from'] = $config['time']['day']; $graph_array['legend'] = "no"; $graph = generate_graph_tag($graph_array); $link_array = $graph_array; $link_array['page'] = "graphs"; unset($link_array['height'], $link_array['width']); $graph_link = generate_url($link_array); $link = generate_url(['page' => 'device', 'device' => $device['device_id'], 'tab' => 'health', 'metric' => 'processor']); $graph_array['width'] = "210"; $overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - Processor Usage"); //echo(overlib_link($graph_link, $graph, $overlib_content, NULL)); $graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = 'ffffff00'; # the 00 at the end makes the area transparent. $graph_array['style'][] = 'margin-top: -6px'; $minigraph = generate_graph_tag($graph_array); echo(''); echo(''); foreach ($processors as $text_descr => $proc) { $percent = round($proc['usage'] / $proc['count']); $background = get_percentage_colours($percent); $graph_colour = str_replace("#", "", $row_colour); $graph_array = []; $graph_array['height'] = "100"; $graph_array['width'] = "210"; $graph_array['to'] = $config['time']['now']; $graph_array['device'] = $device['device_id']; $graph_array['id'] = $proc['id']; if (is_array($proc['id'])) { $graph_array['type'] = "multi-processor_usage"; } else { $graph_array['type'] = $graph_type; } $graph_array['from'] = $config['time']['day']; $graph_array['legend'] = "no"; $link_array = $graph_array; $link_array['page'] = "graphs"; unset($link_array['height'], $link_array['width'], $link_array['legend']); $link = generate_url($link_array); $overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $text_descr); $graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = 'ffffff00'; # the 00 at the end makes the area transparent. // $graph_array['style'][] = 'margin-top: -6px'; $count_button = ($proc['count'] > 1 ? ' ' . $proc['count'] . '' : ''); echo(''); } echo("
'); echo(overlib_link($graph_link, $graph, $overlib_content, NULL)); echo('
' . generate_entity_link('processor', $proc, $text_descr) . '' . $count_button . ' ' . overlib_link($link, print_percentage_bar(200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content) . '
"); echo generate_box_close(); } // EOF