Changed visual of tactical view

This commit is contained in:
m-lopez-f 2015-04-14 09:36:41 +02:00
parent bdbb2f3700
commit f3de8d5bc8
3 changed files with 53 additions and 38 deletions

View File

@ -815,7 +815,7 @@ function events_create_event ($event, $id_group, $id_agent, $status = 0,
*
* @return string HTML with table element
*/
function events_print_event_table ($filter = "", $limit = 10, $width = 440, $return = false, $agent_id = 0) {
function events_print_event_table ($filter = "", $limit = 10, $width = 440, $return = false, $agent_id = 0, $tactical_view = false) {
global $config;
if ($agent_id == 0) {
@ -861,7 +861,8 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret
$table->cellspacing = 4;
$table->width = $width;
$table->class = "databox";
$table->title = __('Latest events');
if (!$tactical_view)
$table->title = __('Latest events');
$table->titleclass = 'tabletitle';
$table->titlestyle = 'text-transform:uppercase;';
$table->headclass = array ();
@ -987,32 +988,33 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret
$out = '<table width="98%"><tr><td style="width: 90%; padding-right: 10px; vertical-align: top; padding-top: 0px;">';
$out .= $events_table;
if ($agent_id != 0) {
$out .= '</td><td style="width: 200px; vertical-align: top;">';
$out .= '<table cellpadding=0 cellspacing=0 class="databox"><tr><td>';
$out .= '<fieldset class="databox tactical_set">
<legend>' .
__('Events -by module-') .
'</legend>' .
graph_event_module (180, 100, $event['id_agente']) . '</fieldset>';
$out .= '</td></tr></table>';
if (!$tactical_view) {
if ($agent_id != 0) {
$out .= '</td><td style="width: 200px; vertical-align: top;">';
$out .= '<table cellpadding=0 cellspacing=0 class="databox"><tr><td>';
$out .= '<fieldset class="databox tactical_set">
<legend>' .
__('Events -by module-') .
'</legend>' .
graph_event_module (180, 100, $event['id_agente']) . '</fieldset>';
$out .= '</td></tr></table>';
}
else {
$out .= '</td><td style="width: 200px; vertical-align: top;">';
$out .= '<table cellpadding=0 cellspacing=0 class="databox"><tr><td>';
$out .= '<fieldset class="databox tactical_set">
<legend>' .
__('Event graph') .
'</legend>' .
grafico_eventos_total("", 180, 60) . '</fieldset>';
$out .= '<fieldset class="databox tactical_set">
<legend>' .
__('Event graph by agent') .
'</legend>' .
grafico_eventos_grupo(180, 60) . '</fieldset>';
$out .= '</td></tr></table>';
}
}
else {
$out .= '</td><td style="width: 200px; vertical-align: top;">';
$out .= '<table cellpadding=0 cellspacing=0 class="databox"><tr><td>';
$out .= '<fieldset class="databox tactical_set">
<legend>' .
__('Event graph') .
'</legend>' .
grafico_eventos_total("", 180, 60) . '</fieldset>';
$out .= '<fieldset class="databox tactical_set">
<legend>' .
__('Event graph by agent') .
'</legend>' .
grafico_eventos_grupo(180, 60) . '</fieldset>';
$out .= '</td></tr></table>';
}
$out .= '</td></tr></table>';
unset ($table);

View File

@ -1288,7 +1288,7 @@ function reporting_get_stats_servers($tiny = true) {
$table_srv->style[1] = $table_srv->style[3] = 'text-align: left; padding: 5px;';
$tdata = array();
$tdata[0] = html_print_image('images/module.png', true, array('title' => __('Total running modules'), 'width' => '25px'));
$tdata[0] = html_print_image('images/module.png', true, array('title' => __('Total running modules'), ));
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_modules"]) . '</span>';
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["total_modules_rate"], 2) . '</span>';
@ -1304,7 +1304,7 @@ function reporting_get_stats_servers($tiny = true) {
$table_srv->data[] = $tdata;
$tdata = array();
$tdata[0] = html_print_image('images/database.png', true, array('title' => __('Local modules'), 'width' => '25px'));
$tdata[0] = html_print_image('images/database.png', true, array('title' => __('Local modules')));
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_local_modules"]) . '</span>';
$tdata[2] = '<span class="med_data">' .
@ -1316,7 +1316,7 @@ function reporting_get_stats_servers($tiny = true) {
if ($tiny) {
$tdata = array();
$tdata[0] = html_print_image('images/network.png', true, array('title' => __('Remote modules'), 'width' => '25px'));
$tdata[0] = html_print_image('images/network.png', true, array('title' => __('Remote modules')));
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_remote_modules"]) . '</span>';
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["remote_modules_rate"], 2) . '</span>';
@ -1328,7 +1328,7 @@ function reporting_get_stats_servers($tiny = true) {
else {
if (isset($server_performance ["total_network_modules"])) {
$tdata = array();
$tdata[0] = html_print_image('images/network.png', true, array('title' => __('Network modules'), 'width' => '25px'));
$tdata[0] = html_print_image('images/network.png', true, array('title' => __('Network modules')));
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_network_modules"]) . '</span>';
$tdata[2] = '<span class="med_data">' .
@ -1342,7 +1342,7 @@ function reporting_get_stats_servers($tiny = true) {
if (isset($server_performance ["total_plugin_modules"])) {
$tdata = array();
$tdata[0] = html_print_image('images/plugin.png', true, array('title' => __('Plugin modules'), 'width' => '25px'));
$tdata[0] = html_print_image('images/plugin.png', true, array('title' => __('Plugin modules')));
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_plugin_modules"]) . '</span>';
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["plugin_modules_rate"], 2) . '</span>';
@ -1354,7 +1354,7 @@ function reporting_get_stats_servers($tiny = true) {
if (isset($server_performance ["total_prediction_modules"])) {
$tdata = array();
$tdata[0] = html_print_image('images/chart_bar.png', true, array('title' => __('Prediction modules'), 'width' => '25px'));
$tdata[0] = html_print_image('images/chart_bar.png', true, array('title' => __('Prediction modules')));
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_prediction_modules"]) . '</span>';
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["prediction_modules_rate"], 2) . '</span>';
@ -1366,7 +1366,7 @@ function reporting_get_stats_servers($tiny = true) {
if (isset($server_performance ["total_wmi_modules"])) {
$tdata = array();
$tdata[0] = html_print_image('images/wmi.png', true, array('title' => __('WMI modules'), 'width' => '25px'));
$tdata[0] = html_print_image('images/wmi.png', true, array('title' => __('WMI modules')));
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_wmi_modules"]) . '</span>';
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["wmi_modules_rate"], 2) . '</span>';
@ -1378,7 +1378,7 @@ function reporting_get_stats_servers($tiny = true) {
if (isset($server_performance ["total_web_modules"])) {
$tdata = array();
$tdata[0] = html_print_image('images/world.png', true, array('title' => __('Web modules'), 'width' => '25px'));
$tdata[0] = html_print_image('images/world.png', true, array('title' => __('Web modules')));
$tdata[1] = '<span class="big_data">' .
format_numeric($server_performance ["total_web_modules"]) .
'</span>';
@ -1417,7 +1417,7 @@ function reporting_get_stats_servers($tiny = true) {
$tdata = array();
$tdata[0] = html_print_image('images/lightning_go.png', true,
array('title' => __('Total events'), 'width' => '25px'));
array('title' => __('Total events')));
$tdata[1] = '<span class="big_data">' .
format_numeric($system_events) . '</span>';

View File

@ -229,7 +229,7 @@ if (!empty($acltags)) {
$tags_condition = tags_get_acl_tags_event_condition($acltags, false, $user_strict);
if (!empty($tags_condition)) {
$events = events_print_event_table ("estado<>1 AND ($tags_condition)", 10, "100%",true);
$events = events_print_event_table ("estado<>1 AND ($tags_condition)", 10, "100%",true,false,true);
ui_toggle($events, __('Latest events'));
}
}
@ -241,7 +241,20 @@ if ($is_admin) {
$tiny = true;
require($config['homedir'] . '/godmode/servers/servers.build_table.php');
}
$out .= '<table cellpadding=0 cellspacing=0 class="databox" style="margin-top:15px;" width=100%><tr><td>';
$out .= '<fieldset class="databox tactical_set">
<legend>' .
__('Event graph') .
'</legend>' .
grafico_eventos_total("", 180, 80) . '</fieldset>';
$out .="</td><td>";
$out .= '<fieldset class="databox tactical_set">
<legend>' .
__('Event graph by agent') .
'</legend>' .
grafico_eventos_grupo(180, 80) . '</fieldset>';
$out .= '</td></tr></table>';
echo $out;
echo '</td>';
echo '</tr></table>';