Fixed non interactive status graphs
This commit is contained in:
parent
6a71b9a359
commit
ff58a171e9
|
@ -7787,6 +7787,10 @@ function reporting_get_stats_modules_status($data, $graph_width = 250, $graph_he
|
|||
$urls['monitor_not_init'] = $links['monitor_not_init'];
|
||||
}
|
||||
|
||||
// Fixed width non interactive charts
|
||||
$status_chart_width = $config["flash_charts"] == false
|
||||
? 100 : $graph_width;
|
||||
|
||||
// Modules by status table
|
||||
$table_mbs = html_get_predefined_table();
|
||||
|
||||
|
@ -7826,7 +7830,7 @@ function reporting_get_stats_modules_status($data, $graph_width = 250, $graph_he
|
|||
$table_mbs->colspan[count($table_mbs->data)][0] = 4;
|
||||
$table_mbs->cellstyle[count($table_mbs->data)][0] = 'text-align: center;';
|
||||
$tdata[0] = '<div id="outter_status_pie" style="height: ' . $graph_height . 'px">' .
|
||||
'<div id="status_pie" style="margin: auto; width: ' . $graph_width . 'px;">' .
|
||||
'<div id="status_pie" style="margin: auto; width: ' . $status_chart_width . 'px;">' .
|
||||
graph_agent_status(false, $graph_width, $graph_height, true, true, $data_agents) .
|
||||
'</div></div>';
|
||||
$table_mbs->rowclass[] = '';
|
||||
|
|
|
@ -2874,7 +2874,16 @@ function reporting_get_stats_summary($data, $graph_width, $graph_height) {
|
|||
$table_sum->cellstyle[count($table_sum->data)][2] = 'text-align: center;';
|
||||
|
||||
if ($data["monitor_checks"] > 0) {
|
||||
$tdata[0] = '<div style="margin: auto; width: ' . $graph_width . 'px;">' . graph_agent_status (false, $graph_width, $graph_height, true, true) . '</div>';
|
||||
// Fixed width non interactive charts
|
||||
$status_chart_width = $config["flash_charts"] == false
|
||||
? 100 : $graph_width;
|
||||
|
||||
$tdata[0] =
|
||||
'<div style="margin: auto; width: ' . $graph_width . 'px;">' .
|
||||
'<div id="status_pie" style="margin: auto; width: ' . $graph_width . '">' .
|
||||
graph_agent_status (false, $graph_width, $graph_height, true, true) .
|
||||
'</div>' .
|
||||
'</div>';
|
||||
}
|
||||
else {
|
||||
$tdata[2] = html_print_image('images/image_problem_area_small.png', true, array('width' => $graph_width));
|
||||
|
|
|
@ -195,10 +195,16 @@ class Agent {
|
|||
$ui->contentGridAddCell($html, 'agent_details');
|
||||
|
||||
ob_start();
|
||||
|
||||
// Fixed width non interactive charts
|
||||
$status_chart_width = $config["flash_charts"] == false ? 100 : 160;
|
||||
$graph_width = $config["flash_charts"] == false ? 200 : 160;
|
||||
|
||||
$html = '<div class="agent_graphs">';
|
||||
$html .= "<b>" . __('Modules by status') . "</b>";
|
||||
$html .= graph_agent_status ($this->id, 160, 160, true);
|
||||
$html .= '<div id="status_pie" style="margin: auto; width: ' . $status_chart_width . 'px;">';
|
||||
$html .= graph_agent_status ($this->id, $graph_width, 160, true);
|
||||
$html .= '</div>';
|
||||
$graph_js = ob_get_clean();
|
||||
$html = $graph_js . $html;
|
||||
|
||||
|
|
|
@ -136,8 +136,14 @@ $data = array();
|
|||
//$data[0] = reporting_tiny_stats ($agent, true, 'agent', '<div style="height: 5px;"></div>');
|
||||
//$table_agent->rowspan[count($table_agent->data)][0] = 6;
|
||||
|
||||
// Fixed width non interactive charts
|
||||
$status_chart_width = $config["flash_charts"] == false ? 100 : 150;
|
||||
$graph_width = $config["flash_charts"] == false ? 200 : 150;
|
||||
|
||||
$data[0] = '<div style="margin: 0 auto 6px auto; width: 150px;">';
|
||||
$data[0] .= graph_agent_status ($id_agente, 150, 120, true);
|
||||
$data[0] .= '<div id="status_pie" style="margin: auto; width: ' . $status_chart_width . 'px;">';
|
||||
$data[0] .= graph_agent_status ($id_agente, $graph_width, 120, true);
|
||||
$data[0] .= '</div>';
|
||||
$data[0] .= '<br>' . reporting_tiny_stats ($agent, true);
|
||||
$data[0] .= ui_print_help_tip(__('Agent statuses are re-calculated by the server, they are not shown in real time.'), true);
|
||||
$data[0] .= '</div>';
|
||||
|
|
Loading…
Reference in New Issue