From 20280f5f88cd4ab3cf381a3b722e4fd7a46b35a4 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 13 Apr 2015 15:05:41 +0200 Subject: [PATCH 01/18] Fixed visual list of servers in administrations servers (cherry picked from commit cc03dcd127c1309def0784e2e884c22515a2fb52) --- pandora_console/godmode/servers/servers.build_table.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index 34aa45c9bd..da2cfffe1b 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -161,6 +161,10 @@ if ($tiny) { unset($table->head[7]); unset($table->head[8]); } - -ui_toggle(html_print_table ($table,true), __('Tactical server information')); +if ($tiny) { + ui_toggle(html_print_table ($table,true), __('Tactical server information')); +} +else{ + html_print_table ($table); +} ?> From f3de8d5bc85d24810b02d4b80abaaf7abf3d824c Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 14 Apr 2015 09:36:41 +0200 Subject: [PATCH 02/18] Changed visual of tactical view --- pandora_console/include/functions_events.php | 56 ++++++++++--------- .../include/functions_reporting.php | 18 +++--- .../operation/agentes/tactical.php | 17 +++++- 3 files changed, 53 insertions(+), 38 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index a0704e6061..6e664f153b 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -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 = '
'; $out .= $events_table; - if ($agent_id != 0) { - $out .= ''; - $out .= '
'; - $out .= '
- ' . - __('Events -by module-') . - '' . - graph_event_module (180, 100, $event['id_agente']) . '
'; - $out .= '
'; + if (!$tactical_view) { + if ($agent_id != 0) { + $out .= '
'; + $out .= '
'; + $out .= '
+ ' . + __('Events -by module-') . + '' . + graph_event_module (180, 100, $event['id_agente']) . '
'; + $out .= '
'; + } + else { + $out .= '
'; + $out .= '
'; + $out .= '
+ ' . + __('Event graph') . + '' . + grafico_eventos_total("", 180, 60) . '
'; + $out .= '
+ ' . + __('Event graph by agent') . + '' . + grafico_eventos_grupo(180, 60) . '
'; + $out .= '
'; + } } - else { - $out .= '
'; - $out .= '
'; - $out .= '
- ' . - __('Event graph') . - '' . - grafico_eventos_total("", 180, 60) . '
'; - $out .= '
- ' . - __('Event graph by agent') . - '' . - grafico_eventos_grupo(180, 60) . '
'; - $out .= '
'; - } - $out .= '
'; unset ($table); diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 4ea953ce9a..88a49692b6 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -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] = '' . format_numeric($server_performance ["total_modules"]) . ''; $tdata[2] = '' . format_numeric($server_performance ["total_modules_rate"], 2) . ''; @@ -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] = '' . format_numeric($server_performance ["total_local_modules"]) . ''; $tdata[2] = '' . @@ -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] = '' . format_numeric($server_performance ["total_remote_modules"]) . ''; $tdata[2] = '' . format_numeric($server_performance ["remote_modules_rate"], 2) . ''; @@ -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] = '' . format_numeric($server_performance ["total_network_modules"]) . ''; $tdata[2] = '' . @@ -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] = '' . format_numeric($server_performance ["total_plugin_modules"]) . ''; $tdata[2] = '' . format_numeric($server_performance ["plugin_modules_rate"], 2) . ''; @@ -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] = '' . format_numeric($server_performance ["total_prediction_modules"]) . ''; $tdata[2] = '' . format_numeric($server_performance ["prediction_modules_rate"], 2) . ''; @@ -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] = '' . format_numeric($server_performance ["total_wmi_modules"]) . ''; $tdata[2] = '' . format_numeric($server_performance ["wmi_modules_rate"], 2) . ''; @@ -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] = '' . format_numeric($server_performance ["total_web_modules"]) . ''; @@ -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] = '' . format_numeric($system_events) . ''; diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index 8f45c86cec..4c0ec73ab1 100644 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -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 .= '
'; + $out .= '
+ ' . + __('Event graph') . + '' . + grafico_eventos_total("", 180, 80) . '
'; + $out .="
"; + $out .= '
+ ' . + __('Event graph by agent') . + '' . + grafico_eventos_grupo(180, 80) . '
'; + $out .= '
'; +echo $out; echo ''; echo ''; From 50f15dc5076acd2301563552506f7c0fa101832f Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 14 Apr 2015 09:37:28 +0200 Subject: [PATCH 03/18] Fixed errors php in menu --- pandora_console/include/functions_menu.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 03e0705cc1..248208be7d 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -32,6 +32,7 @@ function menu_print_menu (&$menu) { $sec = (string) get_parameter ('sec'); $sec2 = (string) get_parameter ('sec2'); + $menu_selected = false; $allsec2 = explode('sec2=', $_SERVER['REQUEST_URI']); if (isset($allsec2[1])) { @@ -206,7 +207,7 @@ function menu_print_menu (&$menu) { //This is an external link $submenu_output .= '
  • '; - if (isset ($sub["type"]) && $sub["subtype"] == "nolink") { + if (isset ($sub["subtype"]) && $sub["subtype"] == "nolink") { $submenu_output .= '
    '; } else @@ -321,7 +322,8 @@ function menu_print_menu (&$menu) { if (isset($sub2['title'])) $sub_title = $sub2['title']; - + else + $sub_title = ''; $submenu2_list .= '
  • '; $submenu2_list .= '
    '. $sub2["text"].'
  • '; From b8dd9705f1f8a77cdc8e0e597d8a255182aaeb3d Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 14 Apr 2015 09:56:04 +0200 Subject: [PATCH 04/18] Fixed style when option of submenu is selected --- pandora_console/include/functions_menu.php | 4 ++-- pandora_console/include/styles/menu.css | 22 ++++++---------------- pandora_console/include/styles/pandora.css | 4 ---- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 248208be7d..f7eb096a4a 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -324,8 +324,8 @@ function menu_print_menu (&$menu) { $sub_title = $sub2['title']; else $sub_title = ''; - $submenu2_list .= '
  • '; - $submenu2_list .= '
    '. + $submenu2_list .= '
  • '; + $submenu2_list .= '
    '. $sub2["text"].'
  • '; $sub_title = ''; } diff --git a/pandora_console/include/styles/menu.css b/pandora_console/include/styles/menu.css index 525f0bcdd0..572cffae6f 100644 --- a/pandora_console/include/styles/menu.css +++ b/pandora_console/include/styles/menu.css @@ -81,36 +81,30 @@ li:hover ul { display: block; } min-height: 35px !important; height: 35px; width: 160px; + font-weight: normal !important; } - -.submenu li a { - #background-color: #222; - #border-style: none; - #border-color: #666; +.sub_subMenu.selected{ + font-weight: bold !important; } .submenu2 li a { - #background-color: #222; margin-left: 0px; padding-left: 0px; display:block; } -.submenu2 li a:hover { - #background-color: #111 !important; -} - .menu li img.toggle { visibility: hidden; float:right; /* Positions it back where it should be */ border-left: 1px; } + .menu li.has_submenu > a > div { background: url(../../images/arrow.png) no-repeat 90% 50%; z-index: 1; /* Positions it on top of the rest */ } -.menu li.has_submenu .flecha{ +.menu li.has_submenu .flecha { background: url(../../images/arrow.png) no-repeat 90% 50%; z-index: 1; /* Positions it on top of the rest */ } @@ -119,14 +113,10 @@ li:hover ul { display: block; } background-color: #E4E4E4 !important; } -.submenu_not_selected a, .submenu2_not_selected a { +.menu li.submenu_not_selected a, .menu li.submenu2_not_selected a { font-weight: normal !important; } -.menu li.submenu_selected a { - font-weight: bold; -} - .submenu_selected { margin-bottom: 0px !important; box-shadow: inset 4px 0 #80BA27 !important; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 0e88ac4e68..ecc87ba860 100755 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -2259,10 +2259,6 @@ li.links a:hover { background-color: #222222 !important; } -.menu li.submenu_selected a { - font-weight: bold; -} - .operation { background-color: #333 !important; } From 1a612ff3a8f09ea42e5b1216b7534119f638de12 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 14 Apr 2015 09:56:49 +0200 Subject: [PATCH 05/18] Changed style in tactical view --- pandora_console/operation/agentes/tactical.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index 4c0ec73ab1..d1d28564a6 100644 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -246,13 +246,13 @@ $out .= ''; + grafico_eventos_total("", 250, 80) . ''; $out .="
    "; $out .= '
    ' . __('Event graph by agent') . '' . - grafico_eventos_grupo(180, 80) . '
    '; + grafico_eventos_grupo(250, 80) . ''; $out .= '
    '; echo $out; From 7cb8e9dd16c7140d9e4bc419434146e3487e8b44 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 14 Apr 2015 10:12:13 +0200 Subject: [PATCH 06/18] Changed visual to tree view --- pandora_console/include/styles/tree.css | 2 +- pandora_console/operation/tree.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/styles/tree.css b/pandora_console/include/styles/tree.css index e9eb0863bc..0e28a26f97 100644 --- a/pandora_console/include/styles/tree.css +++ b/pandora_console/include/styles/tree.css @@ -155,7 +155,7 @@ div.tree-table-cell.tree-table-cell-tree { div.tree-table-cell.tree-table-cell-detail { padding-left: 10px; - width: 350px; + width: 550px; } div.tree-element-detail-closed { diff --git a/pandora_console/operation/tree.php b/pandora_console/operation/tree.php index 12a69aed64..a26cf387bb 100755 --- a/pandora_console/operation/tree.php +++ b/pandora_console/operation/tree.php @@ -126,6 +126,7 @@ else{ $table = new StdClass(); $table->width = "100%"; +$table->class='databox filters'; $table->data = array(); $table->rowspan = array(); From 2d9168ac8fc6c5eababa7dd7d4e6d4ca3905cfef Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 15 Apr 2015 09:45:13 +0200 Subject: [PATCH 07/18] Changed styles from views in nodo --- pandora_console/extensions/module_groups.php | 34 +++++++------- .../extensions/realtime_graphs.php | 21 +++++---- pandora_console/general/logon_ok.php | 6 +-- .../godmode/agentes/agent_template.php | 2 +- .../godmode/agentes/module_manager.php | 4 +- .../godmode/alerts/alert_list.list.php | 2 +- .../godmode/servers/servers.build_table.php | 14 +++--- pandora_console/include/constants.php | 10 ++--- pandora_console/include/functions_events.php | 15 ++++--- pandora_console/include/functions_graph.php | 20 +++++---- pandora_console/include/functions_ui.php | 2 +- pandora_console/include/styles/pandora.css | 44 ++++++++++++++----- .../operation/agentes/alerts_status.php | 2 +- .../operation/agentes/custom_fields.php | 4 +- .../agentes/estado_generalagente.php | 8 ++-- .../operation/agentes/gis_view.php | 5 +-- pandora_console/operation/agentes/graphs.php | 20 +++------ .../operation/agentes/group_view.php | 4 +- .../operation/agentes/tactical.php | 9 ++-- 19 files changed, 125 insertions(+), 101 deletions(-) diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index aade3cac02..60f72ae20d 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -178,7 +178,10 @@ function mainModuleGroups() { if (!empty($agentGroups) && !empty($modelGroups)) { array_walk($modelGroups, 'translate'); //Translate all head titles to language is set + $table = null; + $table->headstyle[] = "width: 20%"; foreach ($modelGroups as $i => $n) { + $table->headstyle[] = "width: 7%"; $modelGroups[$i] = ui_print_truncate_text($n, GENERIC_SIZE_TEXT); } @@ -186,12 +189,11 @@ function mainModuleGroups() { array_unshift($head, ' '); //Metaobject use in html_print_table - $table = null; - $table->align[0] = 'right'; //Align to right the first column. + $table->align[0] = 'left'; //Align to left the first column. $table->style[0] = 'color: #ffffff; '. - 'background-color: #373737; font-weight: bolder; padding-right: 10px;'; + 'background-color: #373737; font-weight: bolder; padding-right: 10px; width:20%; '; $table->head = $head; - $table->width = '98%'; + $table->width = '100%'; //The content of table $tableData = array(); @@ -247,29 +249,29 @@ function mainModuleGroups() { else { if ($fired) { - $color = '#ffa300'; //Orange when the cell for this model group and agent has at least one alert fired. + $color = '#FFA631'; //Orange when the cell for this model group and agent has at least one alert fired. } else if (array_key_exists(1, $states)) { - $color = '#cc0000'; //Red when the cell for this model group and agent has at least one module in critical state and the rest in any state. + $color = '#FC4444'; //Red when the cell for this model group and agent has at least one module in critical state and the rest in any state. $font_color = '#ffffff'; } elseif (array_key_exists(2, $states)) { - $color = '#fce94f'; //Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state. + $color = '#FAD403'; //Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state. } elseif (array_key_exists(3, $states)) { - $color = '#babdb6'; //Grey when the cell for this model group and agent has at least one module in unknown state and the rest in any state. + $color = '#B2B2B2 '; //Grey when the cell for this model group and agent has at least one module in unknown state and the rest in any state. } elseif (array_key_exists(0, $states)) { - $color = '#8ae234'; //Green when the cell for this model group and agent has OK state all modules. + $color = '#80BA27'; //Green when the cell for this model group and agent has OK state all modules. } elseif (array_key_exists(5, $states)) { - $color = '#729fcf'; // Blue when the cell for this module group and all modules have not init value. + $color = '#5BB6E5'; // Blue when the cell for this module group and all modules have not init value. } - $alinkStart = ''; + $alinkStart = ''; $alinkEnd = ''; } @@ -284,13 +286,13 @@ function mainModuleGroups() { array_push($tableData,$row); } $table->data = $tableData; - echo "
    "; + echo "
    "; html_print_table($table); echo "
    "; - echo "
    "; + echo "
    "; - echo ""; + echo "
    "; echo ""; echo ""; echo ""; diff --git a/pandora_console/extensions/realtime_graphs.php b/pandora_console/extensions/realtime_graphs.php index 49729935fd..0cf679ead1 100644 --- a/pandora_console/extensions/realtime_graphs.php +++ b/pandora_console/extensions/realtime_graphs.php @@ -42,9 +42,9 @@ function pandora_realtime_graphs () { $canvas .= ''; echo $canvas; - $table->width = '99%'; + $table->width = '100%'; $table->id = 'table-form'; - $table->class = 'databox'; + $table->class = 'databox filters'; $table->style = array (); $table->style[0] = 'font-weight: bold;'; $table->style[1] = 'font-weight: bold;'; @@ -62,7 +62,7 @@ function pandora_realtime_graphs () { $graph = get_parameter('graph', 'cpu_load'); $refresh = get_parameter('refresh', '1000'); - $data['graph'] = __('Graph') . '
    ' . html_print_select ($graph_fields, 'graph', $graph, '', '', 0, true); + $data['graph'] = __('Graph') . '  ' . html_print_select ($graph_fields, 'graph', $graph, '', '', 0, true); $data['reset'] = html_print_button(__('Clear graph'), 'reset', false, 'clearGraph()', 'class="sub delete"', true); $refresh_fields[1000] = human_time_description_raw(1, true, 'large'); @@ -70,8 +70,8 @@ function pandora_realtime_graphs () { $refresh_fields[10000] = human_time_description_raw(10, true, 'large'); $refresh_fields[30000] = human_time_description_raw(30, true, 'large'); - $data['refresh'] = __('Refresh interval') . '
    ' . html_print_select ($refresh_fields, 'refresh', $refresh, '', '', 0, true); - $data['incremental'] = __('Incremental') . '
    ' . html_print_checkbox ('incremental', 1, 0, true); + $data['refresh'] = __('Refresh interval') . '  ' . html_print_select ($refresh_fields, 'refresh', $refresh, '', '', 0, true); + $data['incremental'] = __('Incremental') . '  ' . html_print_checkbox ('incremental', 1, 0, true); $table->data[] = $data; @@ -85,10 +85,10 @@ function pandora_realtime_graphs () { $data = array(); - $data['snmp_address'] = __('Target IP') . '
    ' . html_print_input_text ('ip_target', $snmp_address, '', 50, 255, true); + $data['snmp_address'] = __('Target IP') . '  ' . html_print_input_text ('ip_target', $snmp_address, '', 50, 255, true); $table->colspan[1]['snmp_address'] = 2; - $data['snmp_community'] = __('Community') . '
    ' . html_print_input_text ('snmp_community', $snmp_community, '', 50, 255, true); + $data['snmp_community'] = __('Community') . '  ' . html_print_input_text ('snmp_community', $snmp_community, '', 50, 255, true); $table->colspan[1]['snmp_community'] = 2; $table->data[] = $data; @@ -99,12 +99,11 @@ function pandora_realtime_graphs () { $snmp_versions['2c'] = '2c'; $data = array(); - $data['snmp_oid'] = __('OID') . '
    ' . html_print_input_text ('snmp_oid', $snmp_oid, '', 100, 255, true); - $data['snmp_oid'] .= html_print_button (__('SNMP walk'), 'snmp_walk', false, 'snmpBrowserWindow()', 'class="sub next"', true); + $data['snmp_oid'] = __('OID') . '  ' . html_print_input_text ('snmp_oid', $snmp_oid, '', 100, 255, true); $table->colspan[2]['snmp_oid'] = 2; - $data['snmp_ver'] = __('Version') . '
    ' . html_print_select ($snmp_versions, 'snmp_version', $snmp_ver, '', '', 0, true); - + $data['snmp_ver'] = __('Version') . '  ' . html_print_select ($snmp_versions, 'snmp_version', $snmp_ver, '', '', 0, true); + $data['snmp_ver'] .= '  ' . html_print_button (__('SNMP walk'), 'snmp_walk', false, 'snmpBrowserWindow()', 'class="sub next"', true); $table->colspan[2]['snmp_ver'] = 2; $table->data[] = $data; diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index 46a85c96eb..40a1210cc1 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -39,7 +39,7 @@ if (tags_has_user_acl_tags()) {
    " . __('Legend') . "
    " . __("Orange cell when the module group and agent have at least one alarm fired.") . "
    " . __("Red cell when the module group and agent have at least one module in critical status and the others in any status") . "
    - -
    + cellspacing = 4; $table->head = array (); $table->data = array (); - $table->style[0] = 'text-align:center;'; + $table->headstyle[0] = 'text-align:center;'; $table->width = "100%"; $table->head[0] = '' . __('Pandora FMS Overview') . ''; $table->head_colspan[0] = 4; @@ -103,7 +103,7 @@ if (tags_has_user_acl_tags()) { + data)) { unset ($table); } else { - echo '
    No modules
    '; + ui_print_empty_data ( __('No modules') ) ; } ?> diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index 3c3a40ae6d..e2772e28d3 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -126,7 +126,7 @@ if (($policy_page) || (isset($agent))) { echo "
    "; echo ""; -echo '
    '; +echo '
    '; echo ""; echo "".__("Get more modules in Pandora FMS Library").""; echo ""; @@ -478,7 +478,7 @@ $total_modules = db_get_value_sql($sql_total_modules); $total_modules = isset ($total_modules) ? $total_modules : 0; if ($modules === false) { - echo "
    " . __('No available data to show') . "
    "; + ui_print_empty_data ( __('No available data to show') ); return; } diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php index c3f5e1fef9..8100675159 100644 --- a/pandora_console/godmode/alerts/alert_list.list.php +++ b/pandora_console/godmode/alerts/alert_list.list.php @@ -674,7 +674,7 @@ if (isset($data)) { html_print_table ($table); } else { - echo "
    " . __('No alerts defined') . "
    "; + ui_print_empty_data ( __('No alerts defined') ); } // Create alert button diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index da2cfffe1b..cddbd8813f 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -38,6 +38,7 @@ if ($servers === false) { } $table->width = '100%'; +$table->class = 'databox data'; $table->size = array (); $table->style = array (); @@ -46,10 +47,12 @@ $table->style[0] = 'font-weight: bold'; $table->align = array (); $table->align[1] = 'center'; $table->align[3] = 'center'; -$table->align[4] = 'center'; -$table->align[5] = 'center'; $table->align[8] = 'center'; +$table->headstyle[1] = 'text-align:center'; +$table->headstyle[3] = 'text-align:center'; +$table->headstyle[8] = 'text-align:center'; + //$table->title = __('Tactical server information'); $table->titleclass = 'tabletitle'; $table->titlestyle = 'text-transform:uppercase;'; @@ -74,7 +77,7 @@ $table->data = array (); foreach ($servers as $server) { $data = array (); - + $table->cellclass[][3] = "progress_bar"; $data[0] = '' . $server['name'] . ''; @@ -100,12 +103,12 @@ foreach ($servers as $server) { $data[5] = 'N/A'; break; case "export": - $data[3] = progress_bar($server["load"], 60, 20, $server["lag_txt"], 0); + $data[3] = progress_bar($server["load"], 100, 10, $server["lag_txt"], 0); $data[4] = $server["modules"] . " ".__('of')." ". $server["modules_total"]; $data[5] = 'N/A'; break; default: - $data[3] = progress_bar($server["load"], 60, 20, $server["lag_txt"], 0); + $data[3] = progress_bar($server["load"], 100, 10, $server["lag_txt"], 0); $data[4] = $server["modules"] . " ".__('of')." ". $server["modules_total"]; $data[5] = '' . $server["lag_txt"] . ''; @@ -153,6 +156,7 @@ foreach ($servers as $server) { unset($data[8]); } array_push ($table->data, $data); + } if ($tiny) { diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index a265450a5a..a13d5ed194 100755 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -120,13 +120,13 @@ switch ($config["dbtype"]) { /* Color constants */ -define('COL_CRITICAL', '#f85858'); -define('COL_WARNING', '#ffea59'); +define('COL_CRITICAL', '#FC4444'); +define('COL_WARNING', '#FAD403'); define('COL_WARNING_DARK', '#FFB900'); -define('COL_NORMAL', '#6EB432'); +define('COL_NORMAL', '#80BA27'); define('COL_NOTINIT', '#3BA0FF'); -define('COL_UNKNOWN', '#AAAAAA'); -define('COL_ALERTFIRED', '#FF8800'); +define('COL_UNKNOWN', '#B2B2B2'); +define('COL_ALERTFIRED', '#FFA631'); define('COL_MINOR', '#F099A2'); define('COL_MAJOR', '#C97A4A'); define('COL_INFORMATIONAL', '#E4E4E4'); diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 6e664f153b..bba8d14fb0 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -857,10 +857,10 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret } else { $table->id = 'latest_events_table'; - $table->cellpadding = 4; - $table->cellspacing = 4; + $table->cellpadding = 0; + $table->cellspacing = 0; $table->width = $width; - $table->class = "databox"; + $table->class = "databox data"; if (!$tactical_view) $table->title = __('Latest events'); $table->titleclass = 'tabletitle'; @@ -953,7 +953,7 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret $data[2] = events_print_type_img ($event["event_type"], true); /* Event text */ - $data[3] = ui_print_string_substr (io_safe_output($event["evento"]), 75, true, '9'); + $data[3] = ui_print_string_substr (io_safe_output($event["evento"]), 75, true, '7.5'); if($agent_id == 0) { if ($event["id_agente"] > 0) { @@ -961,7 +961,8 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret // Get class name, for the link color... $myclass = get_priority_class ($event["criticity"]); - $data[4] = "".agents_get_name ($event["id_agente"]). ""; + $data[4] = "". + agents_get_name ($event["id_agente"]). ""; // ui_print_agent_name ($event["id_agente"], true, 25, '', true); // for System or SNMP generated alerts @@ -975,7 +976,7 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret } // Timestamp - $data[5] = ui_print_timestamp ($event["timestamp"], true, array('style' => 'font-size: 8px')); + $data[5] = ui_print_timestamp ($event["timestamp"], true, array('style' => 'font-size: 7.5pt; letter-spacing: 0.3pt;')); $class = get_priority_class ($event["criticity"]); $cell_classes[3] = $cell_classes[4] = $cell_classes[5] = $class; @@ -985,7 +986,7 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret } $events_table = html_print_table ($table, true); - $out = '
    '; + $out = '
    '; $out .= $events_table; if (!$tactical_view) { diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index c07af3b298..f28fbc493d 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -2337,7 +2337,7 @@ function graph_events_validated($width = 300, $height = 200, $url = "", $meta = * @param bool if the graph required is or not for metaconsole * @param bool if the graph required is or not for history table */ -function grafico_eventos_grupo ($width = 300, $height = 200, $url = "", $meta = false, $history = false) { +function grafico_eventos_grupo ($width = 300, $height = 200, $url = "", $meta = false, $history = false, $noWaterMark = true) { global $config; global $graphic_type; @@ -2459,9 +2459,10 @@ function grafico_eventos_grupo ($width = 300, $height = 200, $url = "", $meta = // Sort the data arsort($data); - - $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); + if ($noWaterMark) { + $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", + 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); + } return pie3d_graph($config['flash_charts'], $data, $width, $height, __('Other'), '', $water_mark, @@ -2534,7 +2535,7 @@ function grafico_eventos_agente ($width = 300, $height = 200, $result = false, $ * * @param string filter Filter for query in DB */ -function grafico_eventos_total($filter = "", $width = 320, $height = 200) { +function grafico_eventos_total($filter = "", $width = 320, $height = 200, $noWaterMark = true) { global $config; global $graphic_type; @@ -2591,10 +2592,11 @@ function grafico_eventos_total($filter = "", $width = 320, $height = 200) { break; } } - - $water_mark = array( - 'file' => $config['homedir'] . "/images/logo_vertical_water.png", - 'url' => ui_get_full_url("/images/logo_vertical_water.png", false, false, false)); + if ($noWaterMark) { + $water_mark = array( + 'file' => $config['homedir'] . "/images/logo_vertical_water.png", + 'url' => ui_get_full_url("/images/logo_vertical_water.png", false, false, false)); + } return pie3d_graph($config['flash_charts'], $data, $width, $height, __('Other'), '', $water_mark, diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 15f3ec2b6b..d240cb2c81 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -931,7 +931,7 @@ function ui_print_string_substr ($string, $cutoff = 16, $return = false, $fontsi $font_size_mod = ""; if ($fontsize > 0) { - $font_size_mod = "style='font-size: ".$fontsize."px'"; + $font_size_mod = "style='font-size: ".$fontsize."pt'"; } $string = ''.mb_substr ($string2, 0, $cutoff, "UTF-8").$string3.''; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index ecc87ba860..74bde03aa3 100755 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -315,7 +315,7 @@ div#menu { width: 45px; float: left; height: 828px; - z-index: 999; + z-index: 2000; position: absolute; } @@ -613,12 +613,6 @@ input:-webkit-autofill { /* END OF LOGIN STYLES */ /***********************/ -label { - display: block; - padding-top: 4px; - font-weight: bold; - text-align: left; -} th > label { padding-top: 7px; } @@ -665,6 +659,7 @@ input.target, input.search, input.copy, input.add, input.graph, input.percentile, input.binary, input.camera, input.config, input.cancel, input.default, input.filter, input.pdf { padding-right: 30px; + margin-top: 15px; height: 23px; } @@ -1316,6 +1311,11 @@ span.rmess, span.nrmess { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; + padding-bottom: 5px; + +} +.databox_color{ + padding-top: 5px; } table.databox { @@ -1335,8 +1335,10 @@ table.databox { } .databox th { - padding: 5px 7px; + padding: 9px 7px; + font-weight: normal; color: #fff; + padding-left: 10px; } .databox th * { @@ -1723,7 +1725,7 @@ form#filter_form { } ul.action_list { margin: 0; - list-style: none inside url(../../images/arrow.png); + list-style: none inside circle; } ul.action_list li div { margin-left: 15px; @@ -2456,7 +2458,7 @@ input.search_input { margin-top: 8px !important; } -a>img, td>img, td>input, td>span { +a>img, td>input, td>span { vertical-align: middle; } @@ -2853,8 +2855,23 @@ table#policy_modules td * { } .databox.data td{ - padding-left: 5px; - border: 1px solid #E2E2E2; + padding-left: 10px; + border: 1px solid #EFEFEF; +} + +.databox .search{ + margin-top: 0px; +} + +.databox.data td.progress_bar img{ + border: 3px solid #000; + border-radius: 100px; +} + +.databox td{ + padding-left: 10px; + padding-top: 7px; + padding-bottom: 7px; } .difference{ @@ -2909,6 +2926,9 @@ table#policy_modules td * { .databox.filters td{ padding: 10px; } +.databox_color td{ + padding-left: 10px; +} .godmode, .menu_icon ul li{ background-color: #222; diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index cbf1b1b781..aa917a4dec 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -574,7 +574,7 @@ if (!empty ($table->data)) { echo ''; } else { - echo '
    '.__('No alerts found').'
    '; + ui_print_empty_data ( __('No alerts found') ); } //strict user hidden diff --git a/pandora_console/operation/agentes/custom_fields.php b/pandora_console/operation/agentes/custom_fields.php index c5dca3565f..c1b23265c2 100644 --- a/pandora_console/operation/agentes/custom_fields.php +++ b/pandora_console/operation/agentes/custom_fields.php @@ -49,15 +49,17 @@ else { if ($fields === false) { $fields = array(); - echo "
    ". __("No fields defined"). "
    "; + ui_print_empty_data ( __("No fields defined") ); } else { $table->width = '100%'; $table->class = 'databox data'; $table->head = array (); $table->head[0] = __('Field'); + $table->size[0] = "20%"; $table->head[1] = __('Display on front') . ui_print_help_tip (__('The fields with display on front enabled will be displayed into the agent details'), true); + $table->size[1] = "10%"; $table->head[2] = __('Description'); $table->align = array (); $table->align[1] = 'center'; diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index e3b776deed..1fe7cf476f 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -100,7 +100,7 @@ $table_agent->cellstyle[count($table_agent->data)][2] = $status_img = agents_detail_view_status_img ($agent["critical_count"], $agent["warning_count"], $agent["unknown_count"], $agent["total_count"], $agent["notinit_count"]); -$data[5] = $status_img; +$data[2] .= "  " .$status_img; $table_agent->data[] = $data; $table_agent->rowclass[] = ''; @@ -492,13 +492,13 @@ $table->style = array_fill(0, 3, 'vertical-align: top;'); $data = array(); $data[0] = html_print_table($table_agent, true); $data[0] .= - ' + '
    ' . - '' . + '
    ' . '
    ' . __('Events (24h)') . '
    ' . + '

    ' . graph_graphic_agentevents ($id_agente, 450, 15, SECONDS_1DAY, '', true) . - '
    '; // ACCESS RATE GRAPH diff --git a/pandora_console/operation/agentes/gis_view.php b/pandora_console/operation/agentes/gis_view.php index 28c33cc5d7..e96cc42f96 100644 --- a/pandora_console/operation/agentes/gis_view.php +++ b/pandora_console/operation/agentes/gis_view.php @@ -49,7 +49,7 @@ foreach ($_GET as $key => $value) { echo "
    "; /* Map with the current position */ -echo "
    "; +echo "
    "; if (!gis_get_agent_map($id_agente, "500px", "100%", true, true, $period)) { ui_print_error_message(__("There is no default map. Please go to the setup for to set a default map.")); @@ -125,8 +125,7 @@ $result = db_get_all_rows_sql ($sql, true); if ($result === false) { - echo "
    " . - __('This agent doesn\'t have any GIS data.') . "
    "; + ui_print_empty_data( __('This agent doesn\'t have any GIS data.') ); } else { ui_pagination ($countData, false) ; diff --git a/pandora_console/operation/agentes/graphs.php b/pandora_console/operation/agentes/graphs.php index 35e94c148b..a42704673f 100644 --- a/pandora_console/operation/agentes/graphs.php +++ b/pandora_console/operation/agentes/graphs.php @@ -106,17 +106,12 @@ if (empty($modules)) { } $table = null; -$table->width = '98%'; +$table->width = '100%'; $table->style[0] = 'font-weight: bolder; text-align: right;'; $table->style[1] = ''; $table->style[2] = 'font-weight: bolder; text-align: right;'; -$table->valign[0] = 'top'; -$table->valign[1] = 'top'; -$table->valign[2] = 'top'; -$table->valign[3] = 'top'; - $table->rowspan[0][0] = 6; $table->rowspan[0][1] = 6; @@ -174,7 +169,11 @@ else $date = $utime; if ($combined) { - echo "

    " . __('Combined graph') . '

    '; + + echo "
    " . __('Combined graph') . '  '; + html_print_button(__('Save as custom graph'), 'save_custom_graph', + false, 'save_custom_graph();', 'class="sub add" style="margin:0px"'); + echo "
    "; custom_graphs_print(0, $height, @@ -186,11 +185,6 @@ if ($combined) { false, 'white', $modules); - - echo "
    "; - html_print_button(__('Save as custom graph'), 'save_custom_graph', - false, 'save_custom_graph();', 'class="sub save"'); - echo "
    "; } else { foreach ($modules as $id_module) { @@ -220,7 +214,7 @@ echo "
    "; //Dialog to save the custom graph echo "