Change Visual metaconsole, simplify criteria tiquet: 2010
This commit is contained in:
parent
f43698bfe7
commit
c8e48dcbe3
|
@ -8135,25 +8135,25 @@ function reporting_get_agents_by_status ($data, $graph_width = 250, $graph_heigh
|
||||||
|
|
||||||
$agent_data = array();
|
$agent_data = array();
|
||||||
$agent_data[0] = html_print_image('images/agent_critical.png', true, array('title' => __('Agents critical')));
|
$agent_data[0] = html_print_image('images/agent_critical.png', true, array('title' => __('Agents critical')));
|
||||||
$agent_data[1] = "<a style='color: #FC4444;' href='" . $links['agents_critical'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FC4444;'>".format_numeric($data['agent_critical'])."</span></b></a>";
|
$agent_data[1] = "<a style='color: #FC4444;' href='" . $links['agents_critical'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FC4444;'>".$data["agent_critical"] <= 0 ? '-' : format_numeric($data['agent_critical'])."</span></b></a>";
|
||||||
|
|
||||||
$agent_data[2] = html_print_image('images/agent_warning.png', true, array('title' => __('Agents warning')));
|
$agent_data[2] = html_print_image('images/agent_warning.png', true, array('title' => __('Agents warning')));
|
||||||
$agent_data[3] = "<a style='color: #FAD403;' href='" . $links['agents_warning'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FAD403;'>".format_numeric($data['agent_warning'])."</span></b></a>";
|
$agent_data[3] = "<a style='color: #FAD403;' href='" . $links['agents_warning'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FAD403;'>".$data["agent_warning"] <= 0 ? '-' : format_numeric($data['agent_warning'])."</span></b></a>";
|
||||||
|
|
||||||
$table_agent->data[] = $agent_data;
|
$table_agent->data[] = $agent_data;
|
||||||
|
|
||||||
$agent_data = array();
|
$agent_data = array();
|
||||||
$agent_data[0] = html_print_image('images/agent_ok.png', true, array('title' => __('Agents ok')));
|
$agent_data[0] = html_print_image('images/agent_ok.png', true, array('title' => __('Agents ok')));
|
||||||
$agent_data[1] = "<a style='color: #80BA27;' href='" . $links['agents_ok'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #80BA27;'>".format_numeric($data['agent_ok'])."</span></b></a>";
|
$agent_data[1] = "<a style='color: #80BA27;' href='" . $links['agents_ok'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #80BA27;'>".$data["agent_ok"] <= 0 ? '-' : format_numeric($data['agent_ok'])."</span></b></a>";
|
||||||
|
|
||||||
$agent_data[2] = html_print_image('images/agent_unknown.png', true, array('title' => __('Agents unknown')));
|
$agent_data[2] = html_print_image('images/agent_unknown.png', true, array('title' => __('Agents unknown')));
|
||||||
$agent_data[3] = "<a style='color: #B2B2B2;' href='" . $links['agents_unknown'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #B2B2B2;'>".format_numeric($data['agent_unknown'])."</span></b></a>";
|
$agent_data[3] = "<a style='color: #B2B2B2;' href='" . $links['agents_unknown'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #B2B2B2;'>".$data["agent_unknown"] <= 0 ? '-' : format_numeric($data['agent_unknown'])."</span></b></a>";
|
||||||
|
|
||||||
$table_agent->data[] = $agent_data;
|
$table_agent->data[] = $agent_data;
|
||||||
|
|
||||||
$agent_data = array();
|
$agent_data = array();
|
||||||
$agent_data[0] = html_print_image('images/agent_notinit.png', true, array('title' => __('Agents not init')));
|
$agent_data[0] = html_print_image('images/agent_notinit.png', true, array('title' => __('Agents not init')));
|
||||||
$agent_data[1] = "<a style='color: #5BB6E5;' href='" . $links['agents_not_init'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #5BB6E5;'>".format_numeric($data['agent_not_init'])."</span></b></a>";
|
$agent_data[1] = "<a style='color: #5BB6E5;' href='" . $links['agents_not_init'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #5BB6E5;'>".$data["agent_not_init"] <= 0 ? '-' : format_numeric($data['agent_not_init'])."</span></b></a>";
|
||||||
|
|
||||||
$agent_data[2] = "";
|
$agent_data[2] = "";
|
||||||
$agent_data[3] = "";
|
$agent_data[3] = "";
|
||||||
|
@ -8210,7 +8210,7 @@ function reporting_get_total_servers ($num_servers) {
|
||||||
|
|
||||||
$node_data = array();
|
$node_data = array();
|
||||||
$node_data[0] = html_print_image('images/server_export.png', true, array('title' => __('Nodes')));
|
$node_data[0] = html_print_image('images/server_export.png', true, array('title' => __('Nodes')));
|
||||||
$node_data[1] = "<b><span style='font-size: 12pt; font-weight: bold; color: black;'>".format_numeric($num_servers)."</span></b>";
|
$node_data[1] = "<b><span style='font-size: 12pt; font-weight: bold; color: black;'>".$num_servers <= 0 ? '-' : format_numeric($num_servers)."</span></b>";
|
||||||
$table_node->data[] = $node_data;
|
$table_node->data[] = $node_data;
|
||||||
|
|
||||||
if (!defined('METACONSOLE')){
|
if (!defined('METACONSOLE')){
|
||||||
|
@ -8244,19 +8244,19 @@ function reporting_get_events ($data, $links = false) {
|
||||||
$table_events->style[0] = "background-color:#FC4444";
|
$table_events->style[0] = "background-color:#FC4444";
|
||||||
$table_events->data[0][0] = html_print_image('images/module_event_critical.png', true, array('title' => __('Critical events')));
|
$table_events->data[0][0] = html_print_image('images/module_event_critical.png', true, array('title' => __('Critical events')));
|
||||||
$table_events->data[0][0] .= " " .
|
$table_events->data[0][0] .= " " .
|
||||||
"<a style='color:#FFF; font-size: 12pt; font-weight: bold;" . $style . "' href='" . $links['critical'] . "'>" . format_numeric($data['critical'])."</a>";
|
"<a style='color:#FFF; font-size: 12pt; font-weight: bold;" . $style . "' href='" . $links['critical'] . "'>" .$data['critical'] <= 0 ? '-' : format_numeric($data['critical'])."</a>";
|
||||||
$table_events->style[1] = "background-color:#FAD403";
|
$table_events->style[1] = "background-color:#FAD403";
|
||||||
$table_events->data[0][1] = html_print_image('images/module_event_warning.png', true, array('title' => __('Warning events')));
|
$table_events->data[0][1] = html_print_image('images/module_event_warning.png', true, array('title' => __('Warning events')));
|
||||||
$table_events->data[0][1] .= " " .
|
$table_events->data[0][1] .= " " .
|
||||||
"<a style='color:#FFF; font-size: 12pt; font-weight: bold;" . $style . "' href='" . $links['warning'] . "'>" . format_numeric($data['warning'])."</a>";
|
"<a style='color:#FFF; font-size: 12pt; font-weight: bold;" . $style . "' href='" . $links['warning'] . "'>" .$data['warning'] <= 0 ? '-' : format_numeric($data['warning'])."</a>";
|
||||||
$table_events->style[2] = "background-color:#80BA27";
|
$table_events->style[2] = "background-color:#80BA27";
|
||||||
$table_events->data[0][2] = html_print_image('images/module_event_ok.png', true, array('title' => __('OK events')));
|
$table_events->data[0][2] = html_print_image('images/module_event_ok.png', true, array('title' => __('OK events')));
|
||||||
$table_events->data[0][2] .= " " .
|
$table_events->data[0][2] .= " " .
|
||||||
"<a style='color:#FFF; font-size: 12pt; font-weight: bold;" . $style . "' href='" . $links['normal'] . "'>" . format_numeric($data['normal'])."</a>";
|
"<a style='color:#FFF; font-size: 12pt; font-weight: bold;" . $style . "' href='" . $links['normal'] . "'>" .$data['normal'] <= 0 ? '-' : format_numeric($data['normal'])."</a>";
|
||||||
$table_events->style[3] = "background-color:#B2B2B2";
|
$table_events->style[3] = "background-color:#B2B2B2";
|
||||||
$table_events->data[0][3] = html_print_image('images/module_event_unknown.png', true, array('title' => __('Unknown events')));
|
$table_events->data[0][3] = html_print_image('images/module_event_unknown.png', true, array('title' => __('Unknown events')));
|
||||||
$table_events->data[0][3] .= " " .
|
$table_events->data[0][3] .= " " .
|
||||||
"<a style='color:#FFF; font-size: 12pt; font-weight: bold;" . $style . "' href='" . $links['unknown'] . "'>" . format_numeric($data['unknown'])."</a>";
|
"<a style='color:#FFF; font-size: 12pt; font-weight: bold;" . $style . "' href='" . $links['unknown'] . "'>" .$data['unknown'] <= 0 ? '-' : format_numeric($data['unknown'])."</a>";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$table_events->data[0][0] = html_print_image('images/module_critical.png', true, array('title' => __('Critical events')));
|
$table_events->data[0][0] = html_print_image('images/module_critical.png', true, array('title' => __('Critical events')));
|
||||||
|
|
Loading…
Reference in New Issue