From 65c2d091940287f8b4934633bdd6b827d9a15a8b Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 23 Feb 2023 16:47:51 +0100 Subject: [PATCH] Icons added --- .../include/functions_reporting.php | 73 ++++++++------- pandora_console/include/functions_servers.php | 92 +++++++++---------- 2 files changed, 87 insertions(+), 78 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index d036239063..e54527e463 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -11965,7 +11965,7 @@ function reporting_get_stats_alerts($data, $links=false) $table_al = html_get_predefined_table(); $tdata = []; - $tdata[0] = html_print_image('images/bell.png', true, ['title' => __('Defined alerts'), 'class' => 'invert_filter'], false, false, false, true); + $tdata[0] = html_print_image('images/alert@svg.svg', true, ['title' => __('Defined alerts'), 'class' => 'main_menu_icon invert_filter'], false, false, false, true); $tdata[1] = $data['monitor_alerts'] <= 0 ? '-' : $data['monitor_alerts']; $tdata[1] = ''.$tdata[1].''; @@ -11976,10 +11976,19 @@ function reporting_get_stats_alerts($data, $links=false) */ if ($data['monitor_alerts'] > $data['total_agents'] && !enterprise_installed()) { - $tdata[2] = "
"; + $tdata[2] = "
"; } - $tdata[3] = html_print_image( + $tdata[3] = html_print_div( + [ + 'title' => __('Fired alerts'), + 'style' => 'background-color: '.COL_CRITICAL, + 'class' => 'alert_background_state main_menu_icon invert_filter', + ], + true + ); + /* + html_print_image( 'images/bell_error.png', true, [ @@ -11990,7 +11999,7 @@ function reporting_get_stats_alerts($data, $links=false) false, false, true - ); + );*/ $tdata[4] = $data['monitor_alerts_fired'] <= 0 ? '-' : $data['monitor_alerts_fired']; $tdata[4] = ''.$tdata[4].''; $table_al->rowclass[] = ''; @@ -12041,29 +12050,29 @@ function reporting_get_stats_modules_status($data, $graph_width=250, $graph_heig $table_mbs = html_get_predefined_table(); $tdata = []; - $tdata[0] = html_print_image('images/module_critical.png', true, ['title' => __('Monitor critical')], false, false, false, true); + $tdata[0] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_CRITICAL, 'title' => __('Monitor critical')], true); $tdata[1] = $data['monitor_critical'] <= 0 ? '-' : $data['monitor_critical']; $tdata[1] = ''.$tdata[1].''; - $tdata[2] = html_print_image('images/module_warning.png', true, ['title' => __('Monitor warning')], false, false, false, true); + $tdata[2] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_WARNING_DARK, 'title' => __('Monitor warning')], true); $tdata[3] = $data['monitor_warning'] <= 0 ? '-' : $data['monitor_warning']; $tdata[3] = ''.$tdata[3].''; $table_mbs->rowclass[] = ''; $table_mbs->data[] = $tdata; $tdata = []; - $tdata[0] = html_print_image('images/module_ok.png', true, ['title' => __('Monitor normal')], false, false, false, true); + $tdata[0] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_NORMAL, 'title' => __('Monitor normal')], true); $tdata[1] = $data['monitor_ok'] <= 0 ? '-' : $data['monitor_ok']; $tdata[1] = ''.$tdata[1].''; - $tdata[2] = html_print_image('images/module_unknown.png', true, ['title' => __('Monitor unknown')], false, false, false, true); + $tdata[2] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_UNKNOWN, 'title' => __('Monitor unknown')], true); $tdata[3] = $data['monitor_unknown'] <= 0 ? '-' : $data['monitor_unknown']; $tdata[3] = ''.$tdata[3].''; $table_mbs->rowclass[] = ''; $table_mbs->data[] = $tdata; $tdata = []; - $tdata[0] = html_print_image('images/module_notinit.png', true, ['title' => __('Monitor not init')], false, false, false, true); + $tdata[0] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_NOTINIT, 'title' => __('Monitor not init')], true); $tdata[1] = $data['monitor_not_init'] <= 0 ? '-' : $data['monitor_not_init']; $tdata[1] = ''.$tdata[1].''; @@ -12122,7 +12131,7 @@ function reporting_get_stats_agents_monitors($data) $table_am = html_get_predefined_table(); $tdata = []; - $tdata[0] = html_print_image('images/agent.png', true, ['title' => __('Total agents'), 'class' => 'invert_filter'], false, false, false, true); + $tdata[0] = html_print_image('images/agents@svg.svg', true, ['title' => __('Total agents'), 'class' => 'invert_filter main_menu_icon'], false, false, false, true); $tdata[1] = $data['total_agents'] <= 0 ? '-' : $data['total_agents']; $tdata[1] = ''.$tdata[1].''; @@ -12133,10 +12142,10 @@ function reporting_get_stats_agents_monitors($data) */ if ($data['total_agents'] > 500 && !enterprise_installed()) { - $tdata[2] = "
"; + $tdata[2] = "
"; } - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Monitor checks'), 'class' => 'invert_filter'], false, false, false, true); + $tdata[3] = html_print_image('images/modules@svg.svg', true, ['title' => __('Monitor checks'), 'class' => 'main_menu_icon invert_filter'], false, false, false, true); $tdata[4] = $data['monitor_total'] <= 0 ? '-' : $data['monitor_total']; $tdata[4] = ''.$tdata[4].''; @@ -12147,7 +12156,7 @@ function reporting_get_stats_agents_monitors($data) */ if ($data['total_agents']) { if (($data['monitor_total'] / $data['total_agents'] > 100) && !enterprise_installed()) { - $tdata[5] = "
"; + $tdata[5] = "
"; } } @@ -12177,7 +12186,7 @@ function reporting_get_stats_users($data) $table_us = html_get_predefined_table(); $tdata = []; - $tdata[0] = html_print_image('images/user.png', true, ['title' => __('Defined users'), 'class' => 'invert_filter']); + $tdata[0] = html_print_image('images/user.svg', true, ['title' => __('Defined users'), 'class' => 'main_menu_icon invert_filter']); $user_is_admin = users_is_admin(); $users = []; @@ -14453,10 +14462,10 @@ function reporting_get_stats_servers() $table_srv->style[1] = $table_srv->style[3] = 'text-align: left; padding: 5px;'; $tdata = []; - $tdata[0] = html_print_image('images/module.png', true, ['title' => __('Total running modules'), 'class' => 'invert_filter']); + $tdata[0] = html_print_image('images/modules@svg.svg', true, ['title' => __('Total running modules'), 'class' => 'main_menu_icon invert_filter']); $tdata[1] = ''.format_numeric($server_performance['total_modules']).''; $tdata[2] = ''.format_numeric($server_performance['total_modules_rate'], 2).''; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec '; + $tdata[3] = html_print_image('images/modules@svg.svg', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'main_menu_icon invert_filter']).'/sec '; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; @@ -14468,25 +14477,25 @@ function reporting_get_stats_servers() $table_srv->data[] = $tdata; $tdata = []; - $tdata[0] = html_print_image('images/database.png', true, ['title' => __('Local modules'), 'class' => 'invert_filter']); + $tdata[0] = html_print_image('images/data-server@svg.svg', true, ['title' => __('Local modules'), 'class' => 'main_menu_icon invert_filter']); $tdata[1] = ''.format_numeric($server_performance['total_local_modules']).''; $tdata[2] = ''.format_numeric($server_performance['local_modules_rate'], 2).''; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec '; + $tdata[3] = html_print_image('images/modules@svg.svg', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'main_menu_icon invert_filter']).'/sec '; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; if (isset($server_performance['total_network_modules'])) { $tdata = []; - $tdata[0] = html_print_image('images/network.png', true, ['title' => __('Network modules'), 'class' => 'invert_filter']); + $tdata[0] = html_print_image('images/network@svg.svg', true, ['title' => __('Network modules'), 'class' => 'main_menu_icon invert_filter']); $tdata[1] = ''.format_numeric($server_performance['total_network_modules']).''; $tdata[2] = ''.format_numeric($server_performance['network_modules_rate'], 2).''; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec '; + $tdata[3] = html_print_image('images/modules@svg.svg', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'main_menu_icon invert_filter']).'/sec '; if ($server_performance['total_remote_modules'] > 10000 && !enterprise_installed()) { - $tdata[4] = "
"; + $tdata[4] = "
"; } else { $tdata[4] = ' '; } @@ -14497,11 +14506,11 @@ function reporting_get_stats_servers() if (isset($server_performance['total_plugin_modules'])) { $tdata = []; - $tdata[0] = html_print_image('images/plugin.png', true, ['title' => __('Plugin modules'), 'class' => 'invert_filter']); + $tdata[0] = html_print_image('images/plugins@svg.svg', true, ['title' => __('Plugin modules'), 'class' => 'main_menu_icon invert_filter']); $tdata[1] = ''.format_numeric($server_performance['total_plugin_modules']).''; $tdata[2] = ''.format_numeric($server_performance['plugin_modules_rate'], 2).''; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec '; + $tdata[3] = html_print_image('images/modules@svg.svg', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'main_menu_icon invert_filter']).'/sec '; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; @@ -14509,11 +14518,11 @@ function reporting_get_stats_servers() if (isset($server_performance['total_prediction_modules'])) { $tdata = []; - $tdata[0] = html_print_image('images/chart_bar.png', true, ['title' => __('Prediction modules'), 'class' => 'invert_filter']); + $tdata[0] = html_print_image('images/prediction@svg.svg', true, ['title' => __('Prediction modules'), 'class' => 'main_menu_icon invert_filter']); $tdata[1] = ''.format_numeric($server_performance['total_prediction_modules']).''; $tdata[2] = ''.format_numeric($server_performance['prediction_modules_rate'], 2).''; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec '; + $tdata[3] = html_print_image('images/modules@svg.svg', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'main_menu_icon invert_filter']).'/sec '; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; @@ -14521,11 +14530,11 @@ function reporting_get_stats_servers() if (isset($server_performance['total_wmi_modules'])) { $tdata = []; - $tdata[0] = html_print_image('images/wmi.png', true, ['title' => __('WMI modules'), 'class' => 'invert_filter']); + $tdata[0] = html_print_image('images/WMI@svg.svg', true, ['title' => __('WMI modules'), 'class' => 'main_menu_icon invert_filter']); $tdata[1] = ''.format_numeric($server_performance['total_wmi_modules']).''; $tdata[2] = ''.format_numeric($server_performance['wmi_modules_rate'], 2).''; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec '; + $tdata[3] = html_print_image('images/modules@svg.svg', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'main_menu_icon invert_filter']).'/sec '; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; @@ -14533,11 +14542,11 @@ function reporting_get_stats_servers() if (isset($server_performance['total_web_modules'])) { $tdata = []; - $tdata[0] = html_print_image('images/world.png', true, ['title' => __('Web modules'), 'class' => 'invert_filter']); + $tdata[0] = html_print_image('images/web-analisys-data@svg.svg', true, ['title' => __('Web modules'), 'class' => 'main_menu_icon invert_filter']); $tdata[1] = ''.format_numeric($server_performance['total_web_modules']).''; $tdata[2] = ''.format_numeric($server_performance['web_modules_rate'], 2).''; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec '; + $tdata[3] = html_print_image('images/modules@svg.svg', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'main_menu_icon invert_filter']).'/sec '; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; @@ -14551,17 +14560,17 @@ function reporting_get_stats_servers() $tdata = []; $tdata[0] = html_print_image( - 'images/lightning_go.png', + 'images/event.svg', true, [ 'title' => __('Total events'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $tdata[1] = ''.html_print_image('images/spinner.gif', true).''; if (isset($system_events) && $system_events > 50000 && !enterprise_installed()) { - $tdata[2] = "
"; + $tdata[2] = "
"; } else { $tdata[3] = ' '; } diff --git a/pandora_console/include/functions_servers.php b/pandora_console/include/functions_servers.php index 1346c992f1..649df85725 100644 --- a/pandora_console/include/functions_servers.php +++ b/pandora_console/include/functions_servers.php @@ -550,11 +550,11 @@ function servers_get_info($id_server=-1) switch ($server['server_type']) { case SERVER_TYPE_DATA: $server['img'] = html_print_image( - 'images/database.png', + 'images/data-server@svg.svg', true, [ 'title' => __('Data server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'data'; @@ -563,11 +563,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_NETWORK: $server['img'] = html_print_image( - 'images/network.png', + 'images/network-server@os.svg', true, [ 'title' => __('Network server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'network'; @@ -576,11 +576,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_SNMP: $server['img'] = html_print_image( - 'images/snmp.png', + 'images/snmp-trap@svg.svg', true, [ 'title' => __('SNMP Trap server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'snmp'; @@ -589,11 +589,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_DISCOVERY: $server['img'] = html_print_image( - 'images/recon.png', + 'images/rrs@svg.svg', true, [ 'title' => __('Discovery server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'recon'; @@ -602,11 +602,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_PLUGIN: $server['img'] = html_print_image( - 'images/plugin.png', + 'images/plugins@svg.svg', true, [ 'title' => __('Plugin server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'plugin'; @@ -615,11 +615,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_PREDICTION: $server['img'] = html_print_image( - 'images/chart_bar.png', + 'images/prediction@svg.svg', true, [ 'title' => __('Prediction server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'prediction'; @@ -628,11 +628,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_WMI: $server['img'] = html_print_image( - 'images/wmi.png', + 'images/WMI@svg.svg', true, [ 'title' => __('WMI server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'wmi'; @@ -641,11 +641,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_EXPORT: $server['img'] = html_print_image( - 'images/server_export.png', + 'images/server-export@svg.svg', true, [ 'title' => __('Export server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'export'; @@ -654,11 +654,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_INVENTORY: $server['img'] = html_print_image( - 'images/page_white_text.png', + 'images/hardware-software-component@svg.svg', true, [ 'title' => __('Inventory server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'inventory'; @@ -667,11 +667,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_WEB: $server['img'] = html_print_image( - 'images/world.png', + 'images/server-web@svg.svg', true, [ 'title' => __('Web server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'web'; @@ -680,11 +680,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_EVENT: $server['img'] = html_print_image( - 'images/lightning_go.png', + 'images/server-events@svg.svg', true, [ 'title' => __('Event server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'event'; @@ -693,11 +693,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_CORRELATION: $server['img'] = html_print_image( - 'images/lightning_go.png', + 'images/server-events@svg.svg', true, [ 'title' => __('Correlation server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'correlation'; @@ -706,11 +706,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_ENTERPRISE_ICMP: $server['img'] = html_print_image( - 'images/network.png', + 'images/network@svg.svg', true, [ 'title' => __('Enterprise ICMP server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'enterprise icmp'; @@ -719,11 +719,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_ENTERPRISE_SNMP: $server['img'] = html_print_image( - 'images/network.png', + 'images/network@svg.svg', true, [ 'title' => __('Enterprise SNMP server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'enterprise snmp'; @@ -732,11 +732,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_ENTERPRISE_SATELLITE: $server['img'] = html_print_image( - 'images/satellite.png', + 'images/satellite@os.svg', true, [ 'title' => __('Enterprise Satellite server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'enterprise satellite'; @@ -745,11 +745,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_ENTERPRISE_TRANSACTIONAL: $server['img'] = html_print_image( - 'images/transactional_map.png', + 'images/server-transactions@svg.svg', true, [ 'title' => __('Enterprise Transactional server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'enterprise transactional'; @@ -758,11 +758,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_MAINFRAME: $server['img'] = html_print_image( - 'images/mainframe.png', + 'images/mainframe@os.svg', true, [ 'title' => __('Mainframe server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'mainframe'; @@ -775,7 +775,7 @@ function servers_get_info($id_server=-1) true, [ 'title' => __('Sync server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'sync'; @@ -784,11 +784,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_WUX: $server['img'] = html_print_image( - 'images/icono-wux.png', + 'images/wux@svg.svg', true, [ 'title' => __('Wux server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'wux'; @@ -797,11 +797,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_SYSLOG: $server['img'] = html_print_image( - 'images/syslog.png', + 'images/logs@svg.svg', true, [ 'title' => __('Log server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'syslog'; @@ -810,11 +810,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_NCM: $server['img'] = html_print_image( - 'images/book_edit.png', + 'images/custom-input@svg.svg', true, [ 'title' => __('NCM server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'ncm'; @@ -827,7 +827,7 @@ function servers_get_info($id_server=-1) true, [ 'title' => __('Autoprovision server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'autoprovision'; @@ -836,11 +836,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_MIGRATION: $server['img'] = html_print_image( - 'images/migration.png', + 'images/server-export@svg.svg', true, [ 'title' => __('Migration server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'migration'; @@ -849,11 +849,11 @@ function servers_get_info($id_server=-1) case SERVER_TYPE_ALERT: $server['img'] = html_print_image( - 'images/alerts_extern.png', + 'images/alert@svg.svg', true, [ 'title' => __('Alert server'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $server['type'] = 'alert';