From dec77331486cf75aa82337f41ee5d9c9be11956f Mon Sep 17 00:00:00 2001 From: marcos Date: Wed, 12 Feb 2020 11:47:43 +0100 Subject: [PATCH 001/113] add discovery_app_microsoft_sql_serve on task list --- .../godmode/wizards/DiscoveryTaskList.class.php | 16 +++++++++++++++- pandora_console/include/constants.php | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index da6f4e572e..d2bd3ac065 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -375,7 +375,7 @@ class DiscoveryTaskList extends Wizard // Status. $table->headstyle[5] .= 'min-width: 100px; width: 100px;'; // Task type. - $table->headstyle[6] .= 'min-width: 200px; width: 150px;'; + $table->headstyle[6] .= 'min-width: 200px; width: 250px;'; // Progress. $table->headstyle[7] .= 'min-width: 150px; width: 150px;'; // Updated at. @@ -564,6 +564,16 @@ class DiscoveryTaskList extends Wizard $data[6] .= __('Discovery.Agent.Deployment'); break; + case DISCOVERY_APP_MICROSOFT_SQL_SERVER: + // Discovery Applications Oracle. + $data[6] = html_print_image( + 'images/network.png', + true, + ['title' => __('Discovery Applications Microsoft SQL Server')] + ).'  '; + $data[6] .= __('Discovery.App.Microsoft SQL Server'); + break; + case DISCOVERY_HOSTDEVICES: default: if ($task['id_recon_script'] == 0) { @@ -621,6 +631,7 @@ class DiscoveryTaskList extends Wizard && $task['type'] != DISCOVERY_APP_MYSQL && $task['type'] != DISCOVERY_APP_ORACLE && $task['type'] != DISCOVERY_CLOUD_AWS_RDS + && $task['type'] != DISCOVERY_APP_MICROSOFT_SQL_SERVER ) { if (check_acl($config['id_user'], 0, 'MR')) { $data[9] .= ''; @@ -763,6 +774,9 @@ class DiscoveryTaskList extends Wizard case DISCOVERY_APP_MYSQL: return 'wiz=app&mode=mysql&page=0'; + case DISCOVERY_APP_MICROSOFT_SQL_SERVER: + return 'wiz=app&mode=MicrosoftSQLServer&page=0'; + case DISCOVERY_APP_ORACLE: return 'wiz=app&mode=oracle&page=0'; diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 1f0764bfaf..de3c4599fe 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -591,6 +591,8 @@ define('DISCOVERY_CLOUD_AWS_RDS', 7); define('DISCOVERY_CLOUD_AZURE_COMPUTE', 8); define('DISCOVERY_DEPLOY_AGENTS', 9); define('DISCOVERY_APP_SAP', 10); +define('DISCOVERY_APP_MICROSOFT_SQL_SERVER', 11); + // Discovery types matching definition. From 85f512db5c46f5733060ea8cfb0f48077a7cc01e Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 18 Feb 2020 16:43:36 +0100 Subject: [PATCH 002/113] mssql driver settings --- pandora_server/conf/pandora_server.conf.new | 3 +++ pandora_server/lib/PandoraFMS/Config.pm | 4 ++++ pandora_server/lib/PandoraFMS/Recon/Base.pm | 13 +++++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index af335694d5..1007c5e610 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -140,6 +140,9 @@ discoveryserver 1 # Discovery SAP utils (PANDORA FMS ENTERPRISE ONLY) # sap_utils /usr/share/pandora_server/util/recon_scripts/SAP +# Discovery Microsoft SQL ODBC driver (PANDORA FMS ENTERPRISE ONLY) +# mssql_driver ODBC Driver 17 for SQL Server + # pluginserver : 1 or 0. Set to 1 to activate plugin server with this setup pluginserver 1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 7b7e6c50f1..a3436da038 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -332,6 +332,7 @@ sub pandora_load_config { $pa_config->{"dynamic_updates"} = 5; # 7.0 $pa_config->{"dynamic_warning"} = 25; # 7.0 $pa_config->{"dynamic_constant"} = 10; # 7.0 + $pa_config->{"mssql_driver"} = undef; # 745 # Internal MTA for alerts, each server need its own config. $pa_config->{"mta_address"} = ''; # Introduced on 2.0 @@ -1180,6 +1181,9 @@ sub pandora_load_config { elsif ($parametro =~ m/^dynamic_constant\s+([0-9]*)/i) { $pa_config->{'dynamic_constant'}= clean_blank($1); } + elsif ($parametro =~ m/^mssql_driver\s+(.*)/i) { + $pa_config->{'mssql_driver'}= clean_blank($1); + } elsif ($parametro =~ m/^logstash_host\s+(.*)/i) { $pa_config->{'logstash_host'}= clean_blank($1); diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index ce6048a6f9..918ce95a8f 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -35,6 +35,7 @@ use constant { DISCOVERY_CLOUD_AZURE_COMPUTE => 8, DISCOVERY_DEPLOY_AGENTS => 9, DISCOVERY_APP_SAP => 10, + DISCOVERY_APP_MICROSOFT_SQL_SERVER => 11, }; # $DEVNULL @@ -1577,6 +1578,8 @@ sub app_scan($) { $type = 'MySQL'; } elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE) { $type = 'Oracle'; + } elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_MICROSOFT_SQL_SERVER) { + $type = 'MSSQL'; } elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) { $type = 'SAP'; } else { @@ -1659,13 +1662,13 @@ sub app_scan($) { # Scan connected obj. if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL - || $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE) { - + || $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE + || $self->{'task_data'}->{'type'} == DISCOVERY_APP_MICROSOFT_SQL_SERVER + ) { # Database. $results = $self->database_scan($type, $obj, $global_percent, \@targets); } elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) { - # SAP scan $results = $obj->scan(); @@ -1766,7 +1769,9 @@ sub scan($) { if (defined($self->{'task_data'})) { if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL || $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE - || $self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) { + || $self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP + || $self->{'task_data'}->{'type'} == DISCOVERY_APP_MICROSOFT_SQL_SERVER + ) { # Application scan. $self->call('message', "Scanning application ...", 6); return $self->app_scan(); From 188fa62849dc8caf868c316ef7e252e46c950687 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 17 Jun 2020 14:20:15 +0200 Subject: [PATCH 003/113] Minor fixes --- pandora_server/lib/PandoraFMS/Recon/Base.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 9089a0c6c0..73922496f3 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -1798,7 +1798,7 @@ sub app_scan($) { if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL || $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE || $self->{'task_data'}->{'type'} == DISCOVERY_APP_DB2 - || $self->{'task_data'}->{'type'} == DISCOVERY_APP_MICROSOFT_SQL_SERVER) + || $self->{'task_data'}->{'type'} == DISCOVERY_APP_MICROSOFT_SQL_SERVER ) { # Database. From 90b9ace749a3f4fcaabacf15e4c69de9988c96f3 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Fri, 4 Dec 2020 13:41:06 +0100 Subject: [PATCH 004/113] added number limitation for operation of adding agents to policy in metaconsole --- pandora_console/include/constants.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 66b784d712..a186e656cf 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -476,6 +476,8 @@ define('MODULE_LINKED', 1); define('MODULE_PENDING_UNLINK', 10); define('MODULE_PENDING_LINK', 11); +define('POLICY_ADD_MAX_AGENTS', 200); + // EVENTS. define('EVENTS_GOING_UNKNOWN', 'going_unknown'); define('EVENTS_UNKNOWN', 'unknown'); From c4eb3dd088cd1d03c6b3cc486bc6d52cdcd8ebe6 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Mon, 14 Dec 2020 10:52:12 +0100 Subject: [PATCH 005/113] Added log on deleting tgraph_source data in pandora_db --- pandora_server/util/pandora_db.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index fc72c2f4ff..07498b6e2d 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -404,8 +404,10 @@ sub pandora_purgedb ($$) { } # Delete old tgraph_source data + log_message ('PURGE', 'Deleting old tgraph_source data.'); db_do ($dbh,"DELETE FROM tgraph_source WHERE id_graph NOT IN (SELECT id_graph FROM tgraph)"); + # Delete network traffic old data. log_message ('PURGE', 'Deleting old network matrix data.'); if ($conf->{'_delete_old_network_matrix'} > 0) { From 430457b30a5fa73f29a957d5da364e1254079d1b Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 15 Dec 2020 13:12:00 +0100 Subject: [PATCH 006/113] Deleted logstash references --- pandora_console/include/class/ConsoleSupervisor.php | 2 -- pandora_server/conf/pandora_server.conf.new | 4 ---- pandora_server/lib/PandoraFMS/Config.pm | 11 ----------- 3 files changed, 17 deletions(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 2d14003ba2..5bfd50624b 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -658,7 +658,6 @@ class ConsoleSupervisor case 'NOTIF.PANDORADB.HISTORICAL': case 'NOTIF.HISTORYDB.MR': case 'NOTIF.EXT.ELASTICSEARCH': - case 'NOTIF.EXT.LOGSTASH': case 'NOTIF.METACONSOLE.DB_CONNECTION': case 'NOTIF.DOWNTIME': case 'NOTIF.UPDATEMANAGER.REGISTRATION': @@ -1790,7 +1789,6 @@ class ConsoleSupervisor { global $config; - // Cannot check logstash, configuration is only available from server. // Cannot check selenium, configuration is only available from server. if (isset($config['log_collector']) && $config['log_collector'] == 1 diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index ed561e2909..a951508b5d 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -668,10 +668,6 @@ syslog_max 65535 # Address # sync_address -# Target LogStash server, to allow Dataserver and SyslogServer store log information in ElasticSearch -#logstash_host ip -#logstash_port 10514 - # Pandora FMS Database HA Tool execution interval in seconds (PANDORA FMS ENTERPRISE ONLY). ha_interval 30 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index f20ed49263..8e6a389c77 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -518,10 +518,6 @@ sub pandora_load_config { $pa_config->{"warmup_unknown_interval"} = 300; # 6.1 $pa_config->{"warmup_unknown_on"} = 1; # 6.1 - # Logstash - $pa_config->{"logstash_host"} = ''; - $pa_config->{"logstash_port"} = 0; - $pa_config->{"wuxserver"} = 1; # 7.0 $pa_config->{"wux_host"} = undef; # 7.0 $pa_config->{"wux_port"} = 4444; # 7.0 @@ -1192,13 +1188,6 @@ sub pandora_load_config { elsif ($parametro =~ m/^dynamic_constant\s+([0-9]*)/i) { $pa_config->{'dynamic_constant'}= clean_blank($1); } - - elsif ($parametro =~ m/^logstash_host\s+(.*)/i) { - $pa_config->{'logstash_host'}= clean_blank($1); - } - elsif ($parametro =~ m/^logstash_port\s+([0-9]*)/i) { - $pa_config->{'logstash_port'}= clean_blank($1); - } elsif ($parametro =~ m/^wuxserver\s+([0-1]*)/i) { $pa_config->{"wuxserver"} = clean_blank($1); } From 010dc65dd4f1b89f1f982035f0c7b0bca2825ce1 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Wed, 16 Dec 2020 14:09:54 +0100 Subject: [PATCH 007/113] WIP: Backup upload --- pandora_console/godmode/menu.php | 3 + pandora_console/godmode/setup/setup.php | 15 ++ .../godmode/setup/setup_net_tools.php | 36 +++++ .../include/class/NetTools.class.php | 147 ++++++++++++++++++ 4 files changed, 201 insertions(+) create mode 100644 pandora_console/godmode/setup/setup_net_tools.php create mode 100644 pandora_console/include/class/NetTools.class.php diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index ddea5fcafd..b71e44ea54 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -351,6 +351,9 @@ if (check_acl($config['id_user'], 0, 'PM')) { $sub2['godmode/setup/setup&section=websocket_engine']['text'] = __('Websocket Engine'); $sub2['godmode/setup/setup&section=websocket_engine']['refr'] = 0; + $sub2['godmode/setup/setup&section=nettools']['text'] = __('Network Tools'); + $sub2['godmode/setup/setup&section=nettools']['refr'] = 0; + if ($config['activate_gis']) { $sub2['godmode/setup/setup&section=gis']['text'] = __('Map conections GIS'); } diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 9e4fb13a9c..7bfa1709f4 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -145,6 +145,11 @@ $buttons['websocket_engine'] = [ 'text' => ''.html_print_image('images/websocket_small.png', true, ['title' => __('Websocket engine')]).'', ]; +$buttons['nettools'] = [ + 'active' => false, + 'text' => ''.html_print_image('images/nettool.png', true, ['title' => __('Websocket engine')]).'', +]; + if ($config['activate_gis']) { $buttons['gis'] = [ 'active' => false, @@ -220,6 +225,12 @@ switch ($section) { $help_header = 'quickshell_settings'; break; + case 'nettools': + $buttons['nettools']['active'] = true; + $subpage = ' » '.__('Network Tools'); + $help_header = 'Network_Tools'; + break; + case 'enterprise': $buttons['enterprise']['active'] = true; $subpage = ' » '.__('Enterprise'); @@ -292,6 +303,10 @@ switch ($section) { include_once $config['homedir'].'/godmode/setup/setup_websocket_engine.php'; break; + case 'nettools': + include_once $config['homedir'].'/godmode/setup/setup_net_tools.php'; + break; + default: enterprise_hook('setup_enterprise_select_tab', [$section]); break; diff --git a/pandora_console/godmode/setup/setup_net_tools.php b/pandora_console/godmode/setup/setup_net_tools.php new file mode 100644 index 0000000000..9f5c88fb8a --- /dev/null +++ b/pandora_console/godmode/setup/setup_net_tools.php @@ -0,0 +1,36 @@ +width = '100%'; + + $table->data = []; + + $table->data[0][0] = __('Traceroute path'); + $table->data[0][1] = html_print_input_text('traceroute_path', $traceroute_path, '', 40, 255, true); + + $table->data[1][0] = __('Ping path'); + $table->data[1][1] = html_print_input_text('ping_path', $ping_path, '', 40, 255, true); + + $table->data[2][0] = __('Nmap path'); + $table->data[2][1] = html_print_input_text('nmap_path', $nmap_path, '', 40, 255, true); + + $table->data[3][0] = __('Dig path'); + $table->data[3][1] = html_print_input_text('dig_path', $dig_path, '', 40, 255, true); + + $table->data[4][0] = __('Snmpget path'); + $table->data[4][1] = html_print_input_text('snmpget_path', $snmpget_path, '', 40, 255, true); + + echo '
'; + echo '
'; + echo ''.__('Options').''; + html_print_input_hidden('update_traceroute', 1); + html_print_table($table); + echo '
'; + + echo '
'; + html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"'); + echo '
'; + echo '
'; + } + + +} From 6da8f33e2010a1317ab2a25d6bfab3bcf63b844f Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Wed, 16 Dec 2020 14:26:32 +0100 Subject: [PATCH 008/113] WIP --- .../godmode/setup/setup_net_tools.php | 3 +- .../include/class/NetTools.class.php | 29 ++++++++++++------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/pandora_console/godmode/setup/setup_net_tools.php b/pandora_console/godmode/setup/setup_net_tools.php index 9f5c88fb8a..0f1b246626 100644 --- a/pandora_console/godmode/setup/setup_net_tools.php +++ b/pandora_console/godmode/setup/setup_net_tools.php @@ -32,5 +32,4 @@ global $config; require_once $config['homedir'].'/include/functions.php'; // Require needed class. -// require_once $config['homedir'].'/include/class/NetTools.class.php'; -hd('MIS HUEVOS EN VINAGRETA'); +require_once $config['homedir'].'/include/class/NetTools.class.php'; diff --git a/pandora_console/include/class/NetTools.class.php b/pandora_console/include/class/NetTools.class.php index 1bed9fc0bf..aeac561c7b 100644 --- a/pandora_console/include/class/NetTools.class.php +++ b/pandora_console/include/class/NetTools.class.php @@ -44,7 +44,7 @@ class NetTools extends HTML */ public function __construct() { - + echo 'Estoy funcionando'; } @@ -130,17 +130,24 @@ class NetTools extends HTML $table->data[4][0] = __('Snmpget path'); $table->data[4][1] = html_print_input_text('snmpget_path', $snmpget_path, '', 40, 255, true); - echo '
'; - echo '
'; - echo ''.__('Options').''; - html_print_input_hidden('update_traceroute', 1); - html_print_table($table); - echo '
'; + $form = ''; + $form .= '
'; + $form .= ''.__('Options').''; + $form .= html_print_input_hidden('update_traceroute', 1, true); + $form .= html_print_table($table); + $form .= '
'; + $form .= html_print_div( + [ + 'id' => '', + 'class' => 'action-buttons', + 'style' => 'width: 100%', + 'content' => html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"'), + ] + ); - echo '
'; - html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"'); - echo '
'; - echo '
'; + $form .= ''; + + echo $form; } From 959fbd4764fed0fabb406312d5982284056b38cb Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 17 Dec 2020 13:04:21 +0100 Subject: [PATCH 009/113] WIP: Backup upload --- .../godmode/setup/setup_net_tools.php | 13 + .../include/class/NetTools.class.php | 557 ++++++++++++++++-- .../operation/agentes/net_tools.php | 48 ++ .../operation/agentes/ver_agente.php | 17 +- 4 files changed, 585 insertions(+), 50 deletions(-) create mode 100644 pandora_console/operation/agentes/net_tools.php diff --git a/pandora_console/godmode/setup/setup_net_tools.php b/pandora_console/godmode/setup/setup_net_tools.php index 0f1b246626..4dafb6e39c 100644 --- a/pandora_console/godmode/setup/setup_net_tools.php +++ b/pandora_console/godmode/setup/setup_net_tools.php @@ -33,3 +33,16 @@ require_once $config['homedir'].'/include/functions.php'; // Require needed class. require_once $config['homedir'].'/include/class/NetTools.class.php'; + +// Control call flow for debug window. +try { + // User access and validation is being processed on class constructor. + $obj = new NetTools('setup'); +} catch (Exception $e) { + echo '[NetTools]'.$e->getMessage(); + + // Stop this execution, but continue 'globally'. + return; +} + +$obj->run(); diff --git a/pandora_console/include/class/NetTools.class.php b/pandora_console/include/class/NetTools.class.php index aeac561c7b..1e3e3343dd 100644 --- a/pandora_console/include/class/NetTools.class.php +++ b/pandora_console/include/class/NetTools.class.php @@ -40,56 +40,98 @@ class NetTools extends HTML /** - * Class constructor + * Undocumented function + * + * @param string $origin Origin of the request. */ - public function __construct() + public function __construct(string $origin) { - echo 'Estoy funcionando'; + global $config; + + // Check if the user can access here. + check_login(); + // Setting the origin. + $this->origin = $origin; + + if ($this->origin === 'agent') { + if (check_acl($config['id_user'], 0, 'AR') === false) { + db_pandora_audit( + 'ACL Violation', + 'Trying to access Agent Management' + ); + include 'general/noaccess.php'; + return; + } + + // Capture needed parameter for agent form. + $this->operation = get_parameter('operation', 0); + $this->community = get_parameter('community', 'public'); + $this->ip = get_parameter('select_ips'); + $this->snmp_version = get_parameter('select_version'); + + // Show form. + $this->id_agente = get_parameter('id_agente', 0); + + // Capture needed parameters for agent executions. + } else if ($this->origin === 'setup') { + if (check_acl($config['id_user'], 0, 'PM') === false) { + db_pandora_audit( + 'ACL Violation', + 'Trying to access Profile Management' + ); + include 'general/noaccess.php'; + return; + } + + // Capture needed parameters for setup form. + $this->updatePaths = (bool) get_parameter('update_paths', 0); + // Capture paths. + $this->pathTraceroute = (string) get_parameter('traceroute_path'); + $this->pathPing = (string) get_parameter('ping_path'); + $this->pathNmap = (string) get_parameter('nmap_path'); + $this->pathDig = (string) get_parameter('dig_path'); + $this->pathSnmpget = (string) get_parameter('snmpget_path'); + } + + return $this; + } /** - * Add option. + * Undocumented function * * @return void */ - function godmode_net_tools() + public function run() { - global $config; - - check_login(); - - if (! check_acl($config['id_user'], 0, 'PM')) { - db_pandora_audit( - 'ACL Violation', - 'Trying to access Profile Management' - ); - include 'general/noaccess.php'; - return; + if ($this->origin === 'agent') { + // Print tool form. + $this->agentNetToolsForm(); + } else if ($this->origin === 'setup') { + // Print setup form. + $this->setupNetToolsForm(); } - ui_print_page_header( - __('Config Network Tools'), - '', - false, - 'network_tools_tab' - ); + // Anyway, load JS. + $this->loadJS(); + } - $update_traceroute = (bool) get_parameter('update_traceroute', 0); - $traceroute_path = (string) get_parameter('traceroute_path', ''); - $ping_path = (string) get_parameter('ping_path', ''); - $nmap_path = (string) get_parameter('nmap_path', ''); - $dig_path = (string) get_parameter('dig_path', ''); - $snmpget_path = (string) get_parameter('snmpget_path', ''); - - if ($update_traceroute) { + /** + * Print the form for setup the network tools. + * + * @return void + */ + private function setupNetToolsForm() + { + if ($this->updatePaths === true) { $network_tools_config = []; - $network_tools_config['traceroute_path'] = $traceroute_path; - $network_tools_config['ping_path'] = $ping_path; - $network_tools_config['nmap_path'] = $nmap_path; - $network_tools_config['dig_path'] = $dig_path; - $network_tools_config['snmpget_path'] = $snmpget_path; + $network_tools_config['traceroute_path'] = $this->pathTraceroute; + $network_tools_config['ping_path'] = $this->pathPing; + $network_tools_config['nmap_path'] = $this->pathNmap; + $network_tools_config['dig_path'] = $this->pathDig; + $network_tools_config['snmpget_path'] = $this->pathSnmpget; $result = config_update_value('network_tools_config', json_encode($network_tools_config)); @@ -102,47 +144,50 @@ class NetTools extends HTML if (isset($config['network_tools_config'])) { $network_tools_config_output = io_safe_output($config['network_tools_config']); $network_tools_config = json_decode($network_tools_config_output, true); - $traceroute_path = $network_tools_config['traceroute_path']; - $ping_path = $network_tools_config['ping_path']; - $nmap_path = $network_tools_config['nmap_path']; - $dig_path = $network_tools_config['dig_path']; - $snmpget_path = $network_tools_config['snmpget_path']; + // Setting paths. + $this->pathTraceroute = $network_tools_config['traceroute_path']; + $this->pathPing = $network_tools_config['ping_path']; + $this->pathNmap = $network_tools_config['nmap_path']; + $this->pathDig = $network_tools_config['dig_path']; + $this->pathSnmpget = $network_tools_config['snmpget_path']; } } + // Make the table for show the form. $table = new stdClass(); $table->width = '100%'; $table->data = []; $table->data[0][0] = __('Traceroute path'); - $table->data[0][1] = html_print_input_text('traceroute_path', $traceroute_path, '', 40, 255, true); + $table->data[0][1] = html_print_input_text('traceroute_path', $this->pathTraceroute, '', 40, 255, true); $table->data[1][0] = __('Ping path'); - $table->data[1][1] = html_print_input_text('ping_path', $ping_path, '', 40, 255, true); + $table->data[1][1] = html_print_input_text('ping_path', $this->pathPing, '', 40, 255, true); $table->data[2][0] = __('Nmap path'); - $table->data[2][1] = html_print_input_text('nmap_path', $nmap_path, '', 40, 255, true); + $table->data[2][1] = html_print_input_text('nmap_path', $this->pathNmap, '', 40, 255, true); $table->data[3][0] = __('Dig path'); - $table->data[3][1] = html_print_input_text('dig_path', $dig_path, '', 40, 255, true); + $table->data[3][1] = html_print_input_text('dig_path', $this->pathDig, '', 40, 255, true); $table->data[4][0] = __('Snmpget path'); - $table->data[4][1] = html_print_input_text('snmpget_path', $snmpget_path, '', 40, 255, true); + $table->data[4][1] = html_print_input_text('snmpget_path', $this->pathSnmpget, '', 40, 255, true); $form = '
'; $form .= '
'; $form .= ''.__('Options').''; - $form .= html_print_input_hidden('update_traceroute', 1, true); - $form .= html_print_table($table); + $form .= html_print_input_hidden('update_paths', 1, true); + $form .= html_print_table($table, true); $form .= '
'; $form .= html_print_div( [ 'id' => '', 'class' => 'action-buttons', 'style' => 'width: 100%', - 'content' => html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"'), - ] + 'content' => html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"', true), + ], + true ); $form .= '
'; @@ -151,4 +196,418 @@ class NetTools extends HTML } + /** + * Print the form for use the network tools. + * + * @return void + */ + private function agentNetToolsForm() + { + $principal_ip = db_get_sql( + sprintf( + 'SELECT direccion FROM tagente WHERE id_agente = %d', + $this->id_agente + ) + ); + + $list_address = db_get_all_rows_sql( + sprintf( + 'SELECT id_a FROM taddress_agent WHERE id_agent = %d', + $this->id_agente + ) + ); + foreach ($list_address as $address) { + $ids[] = join(',', $address); + } + + $ips = db_get_all_rows_sql( + sprintf( + 'SELECT ip FROM taddress WHERE id_a IN (%s)', + join(',', $ids) + ) + ); + + // Must be an a IP at least for work. + if (empty($ips) === true) { + html_print_div( + [ + 'class' => 'error', + 'style' => 'margin-top:5px', + 'content' => __('The agent hasn\'t got IP'), + ] + ); + return; + } + + // Make the data for show in table. + $ipsSelect = array_reduce( + $ips, + function ($carry, $item) { + $carry[$item['ip']] = $item['ip']; + return $carry; + } + ); + + // Form table. + $table = new StdClass(); + $table->class = 'databox filters w100p'; + $table->id = 'netToolTable'; + + $table->data = []; + + $table->data[0][0] = __('Operation'); + + $table->data[0][1] = html_print_select( + [ + 1 => __('Traceroute'), + 2 => __('Ping host & Latency'), + 3 => __('SNMP Interface status'), + 4 => __('Basic TCP Port Scan'), + 5 => __('DiG/Whois Lookup'), + ], + 'operation', + $this->operation, + 'mostrarColumns(this.value)', + __('Please select'), + 0, + true + ); + + $table->data[0][2] = __('IP Adress'); + $table->data[0][3] = html_print_select( + $ipsSelect, + 'select_ips', + $principal_ip, + '', + '', + 0, + true + ); + + $table->cellclass[0][4] = 'snmpcolumn'; + $table->data[0][4] = __('SNMP Version'); + $table->data[0][4] .= ' '; + $table->data[0][4] .= html_print_select( + [ + '1' => 'v1', + '2c' => 'v2c', + ], + 'select_version', + $this->snmp_version, + '', + '', + 0, + true + ); + + $table->cellclass[0][5] = 'snmpcolumn'; + $table->data[0][5] = __('SNMP Community'); + $table->data[0][5] .= ' '; + $table->data[0][5] .= html_print_input_text( + 'community', + $this->community, + '', + 50, + 255, + true + ); + + $table->data[0][6] = ""; + + // Output string. + $output = ''; + $output .= "
"; + $output .= html_print_table($table, true); + $output .= '
'; + + html_print_div( + [ + 'class' => '', + 'style' => 'width: 100%', + 'content' => $output, + ] + ); + + if ($this->operation === true) { + // Execute form. + $executionResult = $this->netToolsExecution($this->operation, $this->ip, $this->community, $this->snmp_version); + echo $executionResult; + } + + echo ''; + + } + + + /** + * Searchs for command. + * + * @param string $command Command. + * + * @return string Path. + */ + private function whereIsTheCommand($command) + { + global $config; + + if (isset($config['network_tools_config'])) { + $network_tools_config = json_decode($config['network_tools_config'], true); + $traceroute_path = $network_tools_config['traceroute_path']; + $ping_path = $network_tools_config['ping_path']; + $nmap_path = $network_tools_config['nmap_path']; + $dig_path = $network_tools_config['dig_path']; + $snmpget_path = $network_tools_config['snmpget_path']; + + switch ($command) { + case 'traceroute': + if (!empty($traceroute_path)) { + return $traceroute_path; + } + break; + + case 'ping': + if (!empty($ping_path)) { + return $ping_path; + } + break; + + case 'nmap': + if (!empty($nmap_path)) { + return $nmap_path; + } + break; + + case 'dig': + if (!empty($dig_path)) { + return $dig_path; + } + break; + + case 'snmpget': + if (!empty($snmpget_path)) { + return $snmpget_path; + } + break; + + default: + return null; + } + } + + ob_start(); + system('whereis '.$command); + $output = ob_get_clean(); + $result = explode(':', $output); + $result = trim($result[1]); + + if (empty($result)) { + return null; + } + + $result = explode(' ', $result); + $fullpath = trim($result[0]); + + if (! file_exists($fullpath)) { + return null; + } + + return $fullpath; + } + + + /** + * Execute net tools action. + * + * @param integer $operation Operation. + * @param string $ip Ip. + * @param string $community Community. + * @param string $snmp_version SNMP version. + * + * @return string String formed result of execution. + */ + public function netToolsExecution(int $operation, string $ip, string $community, string $snmp_version) + { + $output = ''; + + if (!validate_address($ip)) { + $output .= ui_print_error_message( + __('The ip or dns name entered cannot be resolved'), + '', + true + ); + } else { + switch ($operation) { + case 1: + $traceroute = $this->whereIsTheCommand('traceroute'); + if (empty($traceroute)) { + ui_print_error_message(__('Traceroute executable does not exist.')); + } else { + echo '

'.__('Traceroute to ').$ip.'

'; + echo '
';
+                        echo system($traceroute.' '.$ip);
+                        echo '
'; + } + break; + + case 2: + $ping = $this->whereIsTheCommand('ping'); + if (empty($ping)) { + ui_print_error_message(__('Ping executable does not exist.')); + } else { + echo '

'.__('Ping to %s', $ip).'

'; + echo '
';
+                        echo system($ping.' -c 5 '.$ip);
+                        echo '
'; + } + break; + + case 4: + $nmap = $this->whereIsTheCommand('nmap'); + if (empty($nmap)) { + ui_print_error_message(__('Nmap executable does not exist.')); + } else { + echo '

'.__('Basic TCP Scan on ').$ip.'

'; + echo '
';
+                        echo system($nmap.' -F '.$ip);
+                        echo '
'; + } + break; + + case 5: + echo '

'.__('Domain and IP information for ').$ip.'

'; + + $dig = $this->whereIsTheCommand('dig'); + if (empty($dig)) { + ui_print_error_message(__('Dig executable does not exist.')); + } else { + echo '
';
+                        echo system('dig '.$ip);
+                        echo '
'; + } + + $whois = $this->whereIsTheCommand('whois'); + if (empty($whois)) { + ui_print_error_message(__('Whois executable does not exist.')); + } else { + echo '
';
+                        echo system('whois '.$ip);
+                        echo '
'; + } + break; + + case 3: + $snmp_obj = [ + 'ip_target' => $ip, + 'snmp_version' => $snmp_version, + 'snmp_community' => $community, + 'format' => '-Oqn', + ]; + + $snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.3.0'; + $result = get_h_snmpwalk($snmp_obj); + echo '

'.__('SNMP information for ').$ip.'

'; + echo '

'.__('Uptime').'

'; + echo '
';
+                    if (empty($result)) {
+                        ui_print_error_message(__('Target unreachable.'));
+                        break;
+                    } else {
+                        echo array_pop($result);
+                    }
+
+                    echo '
'; + echo '

'.__('Device info').'

'; + echo '
';
+                    $snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.1.0';
+                    $result = get_h_snmpwalk($snmp_obj);
+                    if (empty($result)) {
+                        ui_print_error_message(__('Target unreachable.'));
+                        break;
+                    } else {
+                        echo array_pop($result);
+                    }
+
+                    echo '
'; + + echo '

Interface Information

'; + + $table = new StdClass(); + $table->class = 'databox'; + $table->head = []; + $table->head[] = __('Interface'); + $table->head[] = __('Status'); + + $i = 0; + + $base_oid = '.1.3.6.1.2.1.2.2.1'; + $idx_oids = '.1'; + $names_oids = '.2'; + $status_oids = '.8'; + + $snmp_obj['base_oid'] = $base_oid.$idx_oids; + $idx = get_h_snmpwalk($snmp_obj); + + $snmp_obj['base_oid'] = $base_oid.$names_oids; + $names = get_h_snmpwalk($snmp_obj); + + $snmp_obj['base_oid'] = $base_oid.$status_oids; + $statuses = get_h_snmpwalk($snmp_obj); + + foreach ($idx as $k => $v) { + $index = str_replace($base_oid.$idx_oids, '', $k); + $name = $names[$base_oid.$names_oids.$index]; + + $status = $statuses[$base_oid.$status_oids.$index]; + + $table->data[$i][0] = $name; + $table->data[$i++][1] = $status; + } + + html_print_table($table); + break; + + default: + // Ignore. + break; + } + } + + return $output; + + } + + + /** + * Load the JS and attach + * + * @return string Formed script string. + */ + private function loadJS() + { + $str = ''; + ob_start(); + ?> + + getMessage(); + + // Stop this execution, but continue 'globally'. + return; +} + +$obj->run(); diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index df5146711c..72b4ee4389 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -1351,6 +1351,13 @@ if ($is_sap) { $saptab = ''; } +// Network Tools tab. +$nettools['text'] = ''.html_print_image('images/nettool.png', true, ['title' => __('Network Tools')]).''; +if ($tab == 'nettools') { + $nettools['active'] = true; +} else { + $nettools['active'] = false; +} $onheader = [ 'manage' => $managetab, @@ -1366,7 +1373,7 @@ $onheader = [ 'wux_console' => $wux_console_tab, 'url_route_analyzer' => $url_route_analyzer_tab, 'sap_view' => $saptab, - + 'nettools' => $nettools, ]; // Added after it exists @@ -1536,6 +1543,10 @@ switch ($tab) { $tab_name = 'SAP View'; break; + case 'nettools': + $tab_name = 'Net Tools'; + break; + default: $tab_name = ''; $help_header = ''; @@ -1656,6 +1667,10 @@ switch ($tab) { include 'general/sap_view.php'; break; + case 'nettools': + include 'net_tools.php'; + break; + case 'extension': $found = false; foreach ($config['extensions'] as $extension) { From 7d5f4f8f65471067158ecee39de787f4f3f14c9c Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 17 Dec 2020 16:51:05 +0100 Subject: [PATCH 010/113] WIP: Backup upload --- pandora_console/godmode/setup/setup.php | 2 +- .../include/class/NetTools.class.php | 330 ++++++++++-------- pandora_console/include/constants.php | 7 + 3 files changed, 189 insertions(+), 150 deletions(-) diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 7bfa1709f4..7fae0afa3b 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -147,7 +147,7 @@ $buttons['websocket_engine'] = [ $buttons['nettools'] = [ 'active' => false, - 'text' => ''.html_print_image('images/nettool.png', true, ['title' => __('Websocket engine')]).'', + 'text' => ''.html_print_image('images/nettool.png', true, ['title' => __('Network Tools')]).'', ]; if ($config['activate_gis']) { diff --git a/pandora_console/include/class/NetTools.class.php b/pandora_console/include/class/NetTools.class.php index 1e3e3343dd..779ddca25e 100644 --- a/pandora_console/include/class/NetTools.class.php +++ b/pandora_console/include/class/NetTools.class.php @@ -40,7 +40,7 @@ class NetTools extends HTML /** - * Undocumented function + * Constructor. * * @param string $origin Origin of the request. */ @@ -64,15 +64,11 @@ class NetTools extends HTML } // Capture needed parameter for agent form. - $this->operation = get_parameter('operation', 0); - $this->community = get_parameter('community', 'public'); - $this->ip = get_parameter('select_ips'); - $this->snmp_version = get_parameter('select_version'); - - // Show form. - $this->id_agente = get_parameter('id_agente', 0); - - // Capture needed parameters for agent executions. + $this->id_agente = (int) get_parameter('id_agente', 0); + $this->operation = (int) get_parameter('operation', 0); + $this->community = (string) get_parameter('community', 'public'); + $this->ip = (string) get_parameter('select_ips'); + $this->snmp_version = (string) get_parameter('select_version'); } else if ($this->origin === 'setup') { if (check_acl($config['id_user'], 0, 'PM') === false) { db_pandora_audit( @@ -99,7 +95,7 @@ class NetTools extends HTML /** - * Undocumented function + * Run action. * * @return void */ @@ -133,7 +129,10 @@ class NetTools extends HTML $network_tools_config['dig_path'] = $this->pathDig; $network_tools_config['snmpget_path'] = $this->pathSnmpget; - $result = config_update_value('network_tools_config', json_encode($network_tools_config)); + $result = config_update_value( + 'network_tools_config', + json_encode($network_tools_config) + ); ui_print_result_message( $result, @@ -259,11 +258,11 @@ class NetTools extends HTML $table->data[0][1] = html_print_select( [ - 1 => __('Traceroute'), - 2 => __('Ping host & Latency'), - 3 => __('SNMP Interface status'), - 4 => __('Basic TCP Port Scan'), - 5 => __('DiG/Whois Lookup'), + COMMAND_TRACEROUTE => __('Traceroute'), + COMMAND_PING => __('Ping host & Latency'), + COMMAND_SNMP => __('SNMP Interface status'), + COMMAND_NMAP => __('Basic TCP Port Scan'), + COMMAND_DIGWHOIS => __('DiG/Whois Lookup'), ], 'operation', $this->operation, @@ -316,7 +315,7 @@ class NetTools extends HTML // Output string. $output = ''; - $output .= "
"; + $output .= ''; $output .= html_print_table($table, true); $output .= '
'; @@ -328,14 +327,10 @@ class NetTools extends HTML ] ); - if ($this->operation === true) { + if ($this->operation !== 0) { // Execute form. - $executionResult = $this->netToolsExecution($this->operation, $this->ip, $this->community, $this->snmp_version); - echo $executionResult; + echo $this->netToolsExecution($this->operation, $this->ip, $this->community, $this->snmp_version); } - - echo ''; - } @@ -346,45 +341,45 @@ class NetTools extends HTML * * @return string Path. */ - private function whereIsTheCommand($command) + private function whereIsTheCommand(string $command) { global $config; if (isset($config['network_tools_config'])) { - $network_tools_config = json_decode($config['network_tools_config'], true); + $network_tools_config = json_decode(io_safe_output($config['network_tools_config']), true); $traceroute_path = $network_tools_config['traceroute_path']; - $ping_path = $network_tools_config['ping_path']; - $nmap_path = $network_tools_config['nmap_path']; - $dig_path = $network_tools_config['dig_path']; - $snmpget_path = $network_tools_config['snmpget_path']; + $ping_path = $network_tools_config['ping_path']; + $nmap_path = $network_tools_config['nmap_path']; + $dig_path = $network_tools_config['dig_path']; + $snmpget_path = $network_tools_config['snmpget_path']; switch ($command) { case 'traceroute': - if (!empty($traceroute_path)) { + if (empty($traceroute_path) === false) { return $traceroute_path; } break; case 'ping': - if (!empty($ping_path)) { + if (empty($ping_path) === false) { return $ping_path; } break; case 'nmap': - if (!empty($nmap_path)) { + if (empty($nmap_path) === false) { return $nmap_path; } break; case 'dig': - if (!empty($dig_path)) { + if (empty($dig_path) === false) { return $dig_path; } break; case 'snmpget': - if (!empty($snmpget_path)) { + if (empty($snmpget_path) === false) { return $snmpget_path; } break; @@ -415,6 +410,44 @@ class NetTools extends HTML } + /** + * Create the output for show. + * + * @param string $command Command for execute. + * @param string $caption Description of the execution. + * + * @return void + */ + private function performExecution(string $command='', string $caption='') + { + $output = ''; + + try { + // If caption is not added, don't show anything. + if (empty($caption) === false) { + $output .= sprintf('

%s

', $caption); + } + + $output .= '
';
+
+            // Only perform an execution if command is passed. Avoid errors.
+            if (empty($command) === false) {
+                ob_start();
+                system($command);
+                $output .= ob_get_clean();
+            } else {
+                $output .= __('No command for perform');
+            }
+
+            $output .= '
'; + } catch (\Throwable $th) { + $output = __('Something went wrong while perform the execution. Please check the configuration.'); + } + + echo $output; + } + + /** * Execute net tools action. * @@ -429,146 +462,145 @@ class NetTools extends HTML { $output = ''; - if (!validate_address($ip)) { + if (validate_address($ip) === false) { $output .= ui_print_error_message( __('The ip or dns name entered cannot be resolved'), '', true ); } else { - switch ($operation) { - case 1: - $traceroute = $this->whereIsTheCommand('traceroute'); - if (empty($traceroute)) { - ui_print_error_message(__('Traceroute executable does not exist.')); - } else { - echo '

'.__('Traceroute to ').$ip.'

'; - echo '
';
-                        echo system($traceroute.' '.$ip);
-                        echo '
'; - } - break; + if ($operation === COMMAND_SNMP) { + $snmp_obj = [ + 'ip_target' => $ip, + 'snmp_version' => $snmp_version, + 'snmp_community' => $community, + 'format' => '-Oqn', + ]; - case 2: - $ping = $this->whereIsTheCommand('ping'); - if (empty($ping)) { - ui_print_error_message(__('Ping executable does not exist.')); - } else { - echo '

'.__('Ping to %s', $ip).'

'; - echo '
';
-                        echo system($ping.' -c 5 '.$ip);
-                        echo '
'; - } - break; + echo '

'.__('SNMP information for ').$ip.'

'; - case 4: - $nmap = $this->whereIsTheCommand('nmap'); - if (empty($nmap)) { - ui_print_error_message(__('Nmap executable does not exist.')); - } else { - echo '

'.__('Basic TCP Scan on ').$ip.'

'; - echo '
';
-                        echo system($nmap.' -F '.$ip);
-                        echo '
'; - } - break; - - case 5: - echo '

'.__('Domain and IP information for ').$ip.'

'; - - $dig = $this->whereIsTheCommand('dig'); - if (empty($dig)) { - ui_print_error_message(__('Dig executable does not exist.')); - } else { - echo '
';
-                        echo system('dig '.$ip);
-                        echo '
'; - } - - $whois = $this->whereIsTheCommand('whois'); - if (empty($whois)) { - ui_print_error_message(__('Whois executable does not exist.')); - } else { - echo '
';
-                        echo system('whois '.$ip);
-                        echo '
'; - } - break; - - case 3: - $snmp_obj = [ - 'ip_target' => $ip, - 'snmp_version' => $snmp_version, - 'snmp_community' => $community, - 'format' => '-Oqn', - ]; - - $snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.3.0'; - $result = get_h_snmpwalk($snmp_obj); - echo '

'.__('SNMP information for ').$ip.'

'; + $snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.3.0'; + $result = get_h_snmpwalk($snmp_obj); + if (empty($result) === true) { + ui_print_error_message(__('Target unreachable.')); + return null; + } else { echo '

'.__('Uptime').'

'; echo '
';
-                    if (empty($result)) {
-                        ui_print_error_message(__('Target unreachable.'));
-                        break;
-                    } else {
-                        echo array_pop($result);
-                    }
-
+                    echo array_pop($result);
                     echo '
'; + } + + $snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.1.0'; + $result = get_h_snmpwalk($snmp_obj); + if (empty($result) === true) { + ui_print_error_message(__('Target unreachable.')); + return null; + } else { echo '

'.__('Device info').'

'; echo '
';
-                    $snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.1.0';
-                    $result = get_h_snmpwalk($snmp_obj);
-                    if (empty($result)) {
-                        ui_print_error_message(__('Target unreachable.'));
-                        break;
-                    } else {
-                        echo array_pop($result);
-                    }
-
+                    echo array_pop($result);
                     echo '
'; + } - echo '

Interface Information

'; + echo '

Interface Information

'; - $table = new StdClass(); - $table->class = 'databox'; - $table->head = []; - $table->head[] = __('Interface'); - $table->head[] = __('Status'); + $table = new StdClass(); + $table->class = 'databox'; + $table->head = []; + $table->head[] = __('Interface'); + $table->head[] = __('Status'); - $i = 0; + $i = 0; - $base_oid = '.1.3.6.1.2.1.2.2.1'; - $idx_oids = '.1'; - $names_oids = '.2'; - $status_oids = '.8'; + $base_oid = '.1.3.6.1.2.1.2.2.1'; + $idx_oids = '.1'; + $names_oids = '.2'; + $status_oids = '.8'; - $snmp_obj['base_oid'] = $base_oid.$idx_oids; - $idx = get_h_snmpwalk($snmp_obj); + $snmp_obj['base_oid'] = $base_oid.$idx_oids; + $idx = get_h_snmpwalk($snmp_obj); - $snmp_obj['base_oid'] = $base_oid.$names_oids; - $names = get_h_snmpwalk($snmp_obj); + $snmp_obj['base_oid'] = $base_oid.$names_oids; + $names = get_h_snmpwalk($snmp_obj); - $snmp_obj['base_oid'] = $base_oid.$status_oids; - $statuses = get_h_snmpwalk($snmp_obj); + $snmp_obj['base_oid'] = $base_oid.$status_oids; + $statuses = get_h_snmpwalk($snmp_obj); - foreach ($idx as $k => $v) { - $index = str_replace($base_oid.$idx_oids, '', $k); - $name = $names[$base_oid.$names_oids.$index]; + foreach ($idx as $k => $v) { + $index = str_replace($base_oid.$idx_oids, '', $k); + $name = $names[$base_oid.$names_oids.$index]; - $status = $statuses[$base_oid.$status_oids.$index]; + $status = $statuses[$base_oid.$status_oids.$index]; - $table->data[$i][0] = $name; - $table->data[$i++][1] = $status; - } + $table->data[$i][0] = $name; + $table->data[$i++][1] = $status; + } - html_print_table($table); - break; + html_print_table($table); + } else if ($operation === COMMAND_DIGWHOIS) { + echo '

'.__('Domain and IP information for ').$ip.'

'; - default: - // Ignore. - break; + // Dig execution. + $dig = $this->whereIsTheCommand('dig'); + if (empty($dig) === true) { + ui_print_error_message(__('Dig executable does not exist.')); + } else { + $this->performExecution($dig); + } + + // Whois execution. + $whois = $this->whereIsTheCommand('whois'); + if (empty($whois) === true) { + ui_print_error_message(__('Whois executable does not exist.')); + } else { + $this->performExecution($whois); + } + + return; + } else { + switch ($operation) { + case COMMAND_TRACEROUTE: + $command = $this->whereIsTheCommand('traceroute'); + if (empty($command) === true) { + ui_print_error_message(__('Traceroute executable does not exist.')); + return; + } else { + $stringCommand = __('Traceroute to %s', $ip); + $executeCommand = sprintf('%s %s', $command, $ip); + } + break; + + case COMMAND_PING: + $command = $this->whereIsTheCommand('ping'); + if (empty($command) === true) { + ui_print_error_message(__('Ping executable does not exist.')); + return; + } else { + $stringCommand = __('Ping to %s', $ip); + $executeCommand = sprintf('%s -c 5 %s', $command, $ip); + } + break; + + case COMMAND_NMAP: + $command = $this->whereIsTheCommand('nmap'); + if (empty($command) === true) { + ui_print_error_message(__('Nmap executable does not exist.')); + return; + } else { + $stringCommand = __('Basic TCP Scan on %s', $ip); + $executeCommand = sprintf('%s -F %s', $command, $ip); + } + break; + + default: + // Nothing to do. + $stringCommand = ''; + $executeCommand = ''; + break; + } + + $this->performExecution($executeCommand, $stringCommand); } } diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 54f4c286f2..d8dfa770f2 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -747,3 +747,10 @@ define('MODULE_TYPE_REMOTE_CMD_PROC', 35); define('MODULE_TYPE_REMOTE_CMD_STRING', 36); define('MODULE_TYPE_REMOTE_CMD_INC', 37); define('MODULE_TYPE_KEEP_ALIVE', 100); + +// Commands for network tools. +define('COMMAND_TRACEROUTE', 1); +define('COMMAND_PING', 2); +define('COMMAND_SNMP', 3); +define('COMMAND_NMAP', 4); +define('COMMAND_DIGWHOIS', 5); From daa6e47768da779b257246719c0fe6183b631cc0 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 17 Dec 2020 19:33:10 +0100 Subject: [PATCH 011/113] Changes ended --- pandora_console/include/class/NetTools.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/class/NetTools.class.php b/pandora_console/include/class/NetTools.class.php index 779ddca25e..e519019158 100644 --- a/pandora_console/include/class/NetTools.class.php +++ b/pandora_console/include/class/NetTools.class.php @@ -121,6 +121,8 @@ class NetTools extends HTML */ private function setupNetToolsForm() { + global $config; + if ($this->updatePaths === true) { $network_tools_config = []; $network_tools_config['traceroute_path'] = $this->pathTraceroute; @@ -140,7 +142,7 @@ class NetTools extends HTML __('Set the paths.') ); } else { - if (isset($config['network_tools_config'])) { + if (isset($config['network_tools_config']) === true) { $network_tools_config_output = io_safe_output($config['network_tools_config']); $network_tools_config = json_decode($network_tools_config_output, true); // Setting paths. @@ -345,7 +347,7 @@ class NetTools extends HTML { global $config; - if (isset($config['network_tools_config'])) { + if (isset($config['network_tools_config']) === true) { $network_tools_config = json_decode(io_safe_output($config['network_tools_config']), true); $traceroute_path = $network_tools_config['traceroute_path']; $ping_path = $network_tools_config['ping_path']; @@ -395,14 +397,14 @@ class NetTools extends HTML $result = explode(':', $output); $result = trim($result[1]); - if (empty($result)) { + if (empty($result) === true) { return null; } $result = explode(' ', $result); $fullpath = trim($result[0]); - if (! file_exists($fullpath)) { + if (file_exists($fullpath) === false) { return null; } From 5f0d686034a7be45d5250910bbce7e8c243cfded Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Fri, 18 Dec 2020 12:31:44 +0100 Subject: [PATCH 012/113] Changed Network Tools for External Tools --- pandora_console/extensions/net_tools.php | 506 ------------------ ...net_tools.php => setup_external_tools.php} | 8 +- ...ools.class.php => ExternalTools.class.php} | 99 +++- pandora_console/include/constants.php | 2 +- pandora_console/include/styles/pandora.css | 7 + .../{net_tools.php => external_tools.php} | 10 +- .../operation/agentes/ver_agente.php | 20 +- 7 files changed, 113 insertions(+), 539 deletions(-) delete mode 100644 pandora_console/extensions/net_tools.php rename pandora_console/godmode/setup/{setup_net_tools.php => setup_external_tools.php} (89%) rename pandora_console/include/class/{NetTools.class.php => ExternalTools.class.php} (87%) rename pandora_console/operation/agentes/{net_tools.php => external_tools.php} (86%) diff --git a/pandora_console/extensions/net_tools.php b/pandora_console/extensions/net_tools.php deleted file mode 100644 index b23c5b1fe0..0000000000 --- a/pandora_console/extensions/net_tools.php +++ /dev/null @@ -1,506 +0,0 @@ -'.__('Traceroute to ').$ip.''; - echo '
';
-                    echo system($traceroute.' '.$ip);
-                    echo '
'; - } - break; - - case 2: - $ping = whereis_the_command('ping'); - if (empty($ping)) { - ui_print_error_message(__('Ping executable does not exist.')); - } else { - echo '

'.__('Ping to %s', $ip).'

'; - echo '
';
-                    echo system($ping.' -c 5 '.$ip);
-                    echo '
'; - } - break; - - case 4: - $nmap = whereis_the_command('nmap'); - if (empty($nmap)) { - ui_print_error_message(__('Nmap executable does not exist.')); - } else { - echo '

'.__('Basic TCP Scan on ').$ip.'

'; - echo '
';
-                    echo system($nmap.' -F '.$ip);
-                    echo '
'; - } - break; - - case 5: - echo '

'.__('Domain and IP information for ').$ip.'

'; - - $dig = whereis_the_command('dig'); - if (empty($dig)) { - ui_print_error_message(__('Dig executable does not exist.')); - } else { - echo '
';
-                    echo system('dig '.$ip);
-                    echo '
'; - } - - $whois = whereis_the_command('whois'); - if (empty($whois)) { - ui_print_error_message(__('Whois executable does not exist.')); - } else { - echo '
';
-                    echo system('whois '.$ip);
-                    echo '
'; - } - break; - - case 3: - $snmp_obj = [ - 'ip_target' => $ip, - 'snmp_version' => $snmp_version, - 'snmp_community' => $community, - 'format' => '-Oqn', - ]; - - $snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.3.0'; - $result = get_h_snmpwalk($snmp_obj); - echo '

'.__('SNMP information for ').$ip.'

'; - echo '

'.__('Uptime').'

'; - echo '
';
-                if (empty($result)) {
-                    ui_print_error_message(__('Target unreachable.'));
-                    break;
-                } else {
-                    echo array_pop($result);
-                }
-
-                echo '
'; - echo '

'.__('Device info').'

'; - echo '
';
-                $snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.1.0';
-                $result = get_h_snmpwalk($snmp_obj);
-                if (empty($result)) {
-                    ui_print_error_message(__('Target unreachable.'));
-                    break;
-                } else {
-                    echo array_pop($result);
-                }
-
-                echo '
'; - - echo '

Interface Information

'; - - $table = new StdClass(); - $table->class = 'databox'; - $table->head = []; - $table->head[] = __('Interface'); - $table->head[] = __('Status'); - - $i = 0; - - $base_oid = '.1.3.6.1.2.1.2.2.1'; - $idx_oids = '.1'; - $names_oids = '.2'; - $status_oids = '.8'; - - $snmp_obj['base_oid'] = $base_oid.$idx_oids; - $idx = get_h_snmpwalk($snmp_obj); - - $snmp_obj['base_oid'] = $base_oid.$names_oids; - $names = get_h_snmpwalk($snmp_obj); - - $snmp_obj['base_oid'] = $base_oid.$status_oids; - $statuses = get_h_snmpwalk($snmp_obj); - - foreach ($idx as $k => $v) { - $index = str_replace($base_oid.$idx_oids, '', $k); - $name = $names[$base_oid.$names_oids.$index]; - - $status = $statuses[$base_oid.$status_oids.$index]; - - $table->data[$i][0] = $name; - $table->data[$i++][1] = $status; - } - - html_print_table($table); - break; - - default: - // Ignore. - break; - } - } - -} - - -/** - * Main function. - * - * @return void - */ -function main_net_tools() -{ - $operation = get_parameter('operation', 0); - $community = get_parameter('community', 'public'); - $ip = get_parameter('select_ips'); - $snmp_version = get_parameter('select_version'); - - // Show form. - $id_agente = get_parameter('id_agente', 0); - $principal_ip = db_get_sql( - sprintf( - 'SELECT direccion FROM tagente WHERE id_agente = %d', - $id_agente - ) - ); - - $list_address = db_get_all_rows_sql( - sprintf( - 'SELECT id_a FROM taddress_agent WHERE id_agent = %d', - $id_agente - ) - ); - foreach ($list_address as $address) { - $ids[] = join(',', $address); - } - - $ips = db_get_all_rows_sql( - sprintf( - 'SELECT ip FROM taddress WHERE id_a IN (%s)', - join(',', $ids) - ) - ); - - if ($ips == '') { - echo "
".__('The agent hasn\'t got IP').'
'; - return; - } - - // Javascript. - ?> - - '; - echo "
"; - echo ""; - echo ''; - echo ''; - echo "'; - echo '
'; - echo __('Operation'); - echo ''; - - html_print_select( - [ - 1 => __('Traceroute'), - 2 => __('Ping host & Latency'), - 3 => __('SNMP Interface status'), - 4 => __('Basic TCP Port Scan'), - 5 => __('DiG/Whois Lookup'), - ], - 'operation', - $operation, - 'mostrarColumns(this.value)', - __('Please select') - ); - - echo ''; - echo __('IP address'); - echo ''; - - $ips_for_select = array_reduce( - $ips, - function ($carry, $item) { - $carry[$item['ip']] = $item['ip']; - return $carry; - } - ); - - html_print_select( - $ips_for_select, - 'select_ips', - $principal_ip - ); - echo '"; - echo __('SNMP Version'); - html_print_select( - [ - '1' => 'v1', - '2c' => 'v2c', - ], - 'select_version', - $snmp_version - ); - echo ''; - echo __('SNMP Community').' '; - html_print_input_text('community', $community); - echo ''; - echo ""; - echo '
'; - echo '
'; - - if ($operation) { - // Execute form. - net_tools_execute($operation, $ip, $community, $snmp_version); - } - - echo ''; -} - - -/** - * Add option. - * - * @return void - */ -function godmode_net_tools() -{ - global $config; - - check_login(); - - if (! check_acl($config['id_user'], 0, 'PM')) { - db_pandora_audit( - 'ACL Violation', - 'Trying to access Profile Management' - ); - include 'general/noaccess.php'; - return; - } - - ui_print_page_header( - __('Config Network Tools'), - '', - false, - 'network_tools_tab' - ); - - $update_traceroute = (bool) get_parameter('update_traceroute', 0); - - $traceroute_path = (string) get_parameter('traceroute_path', ''); - $ping_path = (string) get_parameter('ping_path', ''); - $nmap_path = (string) get_parameter('nmap_path', ''); - $dig_path = (string) get_parameter('dig_path', ''); - $snmpget_path = (string) get_parameter('snmpget_path', ''); - - if ($update_traceroute) { - $network_tools_config = []; - $network_tools_config['traceroute_path'] = $traceroute_path; - $network_tools_config['ping_path'] = $ping_path; - $network_tools_config['nmap_path'] = $nmap_path; - $network_tools_config['dig_path'] = $dig_path; - $network_tools_config['snmpget_path'] = $snmpget_path; - - $result = config_update_value('network_tools_config', json_encode($network_tools_config)); - - ui_print_result_message( - $result, - __('Set the paths.'), - __('Set the paths.') - ); - } else { - if (isset($config['network_tools_config'])) { - $network_tools_config_output = io_safe_output($config['network_tools_config']); - $network_tools_config = json_decode($network_tools_config_output, true); - $traceroute_path = $network_tools_config['traceroute_path']; - $ping_path = $network_tools_config['ping_path']; - $nmap_path = $network_tools_config['nmap_path']; - $dig_path = $network_tools_config['dig_path']; - $snmpget_path = $network_tools_config['snmpget_path']; - } - } - - $table = null; - $table->width = '100%'; - - $table->data = []; - - $table->data[0][0] = __('Traceroute path'); - $table->data[0][1] = html_print_input_text('traceroute_path', $traceroute_path, '', 40, 255, true); - - $table->data[1][0] = __('Ping path'); - $table->data[1][1] = html_print_input_text('ping_path', $ping_path, '', 40, 255, true); - - $table->data[2][0] = __('Nmap path'); - $table->data[2][1] = html_print_input_text('nmap_path', $nmap_path, '', 40, 255, true); - - $table->data[3][0] = __('Dig path'); - $table->data[3][1] = html_print_input_text('dig_path', $dig_path, '', 40, 255, true); - - $table->data[4][0] = __('Snmpget path'); - $table->data[4][1] = html_print_input_text('snmpget_path', $snmpget_path, '', 40, 255, true); - - echo '
'; - echo '
'; - echo ''.__('Options').''; - html_print_input_hidden('update_traceroute', 1); - html_print_table($table); - echo '
'; - - echo '
'; - html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"'); - echo '
'; - echo '
'; -} - - -extensions_add_godmode_menu_option(__('Config Network Tools'), 'PM'); -extensions_add_godmode_function('godmode_net_tools'); diff --git a/pandora_console/godmode/setup/setup_net_tools.php b/pandora_console/godmode/setup/setup_external_tools.php similarity index 89% rename from pandora_console/godmode/setup/setup_net_tools.php rename to pandora_console/godmode/setup/setup_external_tools.php index 4dafb6e39c..30bdd6b188 100644 --- a/pandora_console/godmode/setup/setup_net_tools.php +++ b/pandora_console/godmode/setup/setup_external_tools.php @@ -1,6 +1,6 @@ getMessage(); + echo '[ExternalTools]'.$e->getMessage(); // Stop this execution, but continue 'globally'. return; diff --git a/pandora_console/include/class/NetTools.class.php b/pandora_console/include/class/ExternalTools.class.php similarity index 87% rename from pandora_console/include/class/NetTools.class.php rename to pandora_console/include/class/ExternalTools.class.php index e519019158..97b644a11f 100644 --- a/pandora_console/include/class/NetTools.class.php +++ b/pandora_console/include/class/ExternalTools.class.php @@ -1,6 +1,6 @@ updatePaths = (bool) get_parameter('update_paths', 0); + // Capture paths. $this->pathTraceroute = (string) get_parameter('traceroute_path'); $this->pathPing = (string) get_parameter('ping_path'); @@ -103,10 +104,10 @@ class NetTools extends HTML { if ($this->origin === 'agent') { // Print tool form. - $this->agentNetToolsForm(); + $this->agentExternalToolsForm(); } else if ($this->origin === 'setup') { // Print setup form. - $this->setupNetToolsForm(); + $this->setupExternalToolsForm(); } // Anyway, load JS. @@ -115,11 +116,11 @@ class NetTools extends HTML /** - * Print the form for setup the network tools. + * Print the form for setup the external tools. * * @return void */ - private function setupNetToolsForm() + private function setupExternalToolsForm() { global $config; @@ -151,6 +152,7 @@ class NetTools extends HTML $this->pathNmap = $network_tools_config['nmap_path']; $this->pathDig = $network_tools_config['dig_path']; $this->pathSnmpget = $network_tools_config['snmpget_path']; + $this->pathCustomComm = ($network_tools_config['custom_command'] ?? ['a' => 'a']); } } @@ -175,6 +177,70 @@ class NetTools extends HTML $table->data[4][0] = __('Snmpget path'); $table->data[4][1] = html_print_input_text('snmpget_path', $this->pathSnmpget, '', 40, 255, true); + $table->data[5][0] = html_print_div( + [ + 'class' => 'title_custom_commands bolder float-left', + 'content' => __('Custom commands') + ], + true + ); + + $table->data[5][0] .= html_print_div( + [ + 'id' => 'add_button_custom_command', + 'content' => html_print_image( + 'images/add.png', + true, + ['title' => __('Add new custom command') ] + ) + ], + true + ); + + $table->data[6][0] = __('Command'); + $table->data[6][1] = __('Parameters'); + + $i = 0; + $iRow = 6; + foreach ($this->pathCustomComm as $command) { + $i++; + $iRow++; + + // Fill the fields. + $customCommand = ($command['custom_command'] ?? ''); + $customParams = ($command['custom_params'] ?? ''); + // Attach the fields. + $table->rowid[$iRow] = 'custom_row_'.$i; + $table->data[$iRow][0] = html_print_input_text( + 'command_custom_'.$i, + $customCommand, + '', + 40, + 255, + true + ); + $table->data[$iRow][1] = html_print_input_text( + 'params_custom_'.$i, + $customParams, + '', + 40, + 255, + true + ); + $table->data[$iRow][2] = html_print_div( + [ + 'id' => 'delete_custom_'.$i, + 'class' => '', + 'content' => html_print_image( + 'images/delete.png', + true, + ['title' => __('Delete this custom command') ] + ) + ], + true + ); + } + $form = '
'; $form .= '
'; $form .= ''.__('Options').''; @@ -198,11 +264,11 @@ class NetTools extends HTML /** - * Print the form for use the network tools. + * Print the form for use the external tools. * * @return void */ - private function agentNetToolsForm() + private function agentExternalToolsForm() { $principal_ip = db_get_sql( sprintf( @@ -252,7 +318,7 @@ class NetTools extends HTML // Form table. $table = new StdClass(); $table->class = 'databox filters w100p'; - $table->id = 'netToolTable'; + $table->id = 'externalToolTable'; $table->data = []; @@ -331,7 +397,7 @@ class NetTools extends HTML if ($this->operation !== 0) { // Execute form. - echo $this->netToolsExecution($this->operation, $this->ip, $this->community, $this->snmp_version); + echo $this->externalToolsExecution($this->operation, $this->ip, $this->community, $this->snmp_version); } } @@ -451,7 +517,7 @@ class NetTools extends HTML /** - * Execute net tools action. + * Execute external tools action. * * @param integer $operation Operation. * @param string $ip Ip. @@ -460,7 +526,7 @@ class NetTools extends HTML * * @return string String formed result of execution. */ - public function netToolsExecution(int $operation, string $ip, string $community, string $snmp_version) + public function externalToolsExecution(int $operation, string $ip, string $community, string $snmp_version) { $output = ''; @@ -623,6 +689,13 @@ class NetTools extends HTML ?> - -= 0) { - // -1 = All - $filter .= sprintf(' AND estado = %d', $estado); -} - -$grupo = (int) get_parameter('grupo', 0); -if ($grupo > 0) { - $filter .= sprintf(' AND id_grupo = %d', $grupo); - if (check_acl($config['id_user'], $grupo, 'IM') == 0) { - db_pandora_audit('ACL Forbidden', 'User tried to read incidents from group without access'); - include 'general/noaccess.php'; - exit; - } -} - -$prioridad = (int) get_parameter('prioridad', -1); -if ($prioridad != -1) { - // -1 = All - $filter .= sprintf(' AND prioridad = %d', $prioridad); -} - -$agent_search = (int) get_parameter('agent_search'); -if ($agent_search != 0) { - $filter .= sprintf(' AND id_agent = %d', $agent_search); -} - -$offset = (int) get_parameter('offset', 0); -$groups = users_get_groups($config['id_user'], 'IR'); - -// Select incidencts where the user has access to ($groups from -// get_user_groups), array_keys for the id, implode to pass to SQL -switch ($config['dbtype']) { - case 'mysql': - $sql = 'SELECT * FROM tincidencia WHERE - id_grupo IN ('.implode(',', array_keys($groups)).')'.$filter.' - ORDER BY actualizacion DESC LIMIT '.$offset.','.$config['block_size']; - $count_sql = 'SELECT count(*) FROM tincidencia WHERE - id_grupo IN ('.implode(',', array_keys($groups)).')'.$filter.' - ORDER BY actualizacion DESC'; - $total_sql = 'SELECT count(*) FROM tincidencia WHERE - id_grupo IN ('.implode(',', array_keys($groups)).') - ORDER BY actualizacion DESC'; - break; - - case 'postgresql': - case 'oracle': - $set = []; - $set['limit'] = $config['block_size']; - $set['offset'] = $offset; - $sql = 'SELECT * FROM tincidencia WHERE - id_grupo IN ('.implode(',', array_keys($groups)).')'.$filter.' - ORDER BY actualizacion DESC'; - $sql = oracle_recode_query($sql, $set); - $count_sql = 'SELECT count(*) FROM tincidencia WHERE - id_grupo IN ('.implode(',', array_keys($groups)).')'.$filter; - $total_sql = 'SELECT count(*) FROM tincidencia WHERE - id_grupo IN ('.implode(',', array_keys($groups)).')'; - break; -} - -$result = db_get_all_rows_sql($sql); -$count = db_get_value_sql($count_sql); -$count_total = db_get_value_sql($total_sql); - -if (empty($result)) { - $result = []; - $count = 0; -} - -if ($count_total >= 1) { - echo ''; - - echo ' -

'.__('Filter').'

'; - - $fields = incidents_get_status(); - echo ''.__('Incidents:').''.'  '; - html_print_select($fields, 'estado', $estado, 'javascript:this.form.submit();', __('All incidents'), -1, false, false, false, 'w155'); - - // Legend - echo '

'.__('Status').'

'; - foreach (incidents_get_status() as $id => $str) { - incidents_print_status_img($id); - echo ' - '.$str.'
'; - } - - echo '

'.__('Priority').'

'; - foreach (incidents_get_priorities() as $id => $str) { - incidents_print_priority_img($id); - echo ' - '.$str.'
'; - } - - echo '
'; - - $fields = incidents_get_priorities(); - - echo ''.__('Priorities:').''.'  '; - html_print_select($fields, 'prioridad', $prioridad, 'javascript:this.form.submit();', __('All priorities'), -1, false, false, false, 'w155'); - - echo '
'; - - echo ''.__('Users:').''.'  '; - html_print_select(users_get_info(), 'usuario', $usuario, 'javascript:this.form.submit();', __('All users'), '', false, false, false, 'w155'); - - echo '
'; - - $agents_incidents = agents_get_agents(false, ['id_agente', 'nombre']); - - if ($agents_incidents === false) { - $agents_incidents = []; - } - - $result_agent_incidents = []; - foreach ($agents_incidents as $agent_incident) { - $result_agent_incidents[$agent_incident['id_agente']] = $agent_incident['nombre']; - } - - echo ''.__('Agents:').''.'  '; - html_print_select( - $result_agent_incidents, - 'agent_search', - $agent_search, - 'javascript:this.form.submit();', - __('All agents'), - '', - false, - false, - false, - 'w155' - ); - - echo '
'; - - echo ''.__('Groups:').''.'  '; - echo '
'; - html_print_select_groups($config['id_user'], 'IR', true, 'grupo', $grupo, 'javascript:this.form.submit();', '', '', false, false, false, 'w155'); - echo '
'; - - // echo "    "; - echo '
'; - - echo ''.__('Free text:').''.ui_print_help_tip( - __('Search by incident name or description, list matches.'), - true - ).'  '; - html_print_input_text('texto', $texto, '', 45); - echo ' '; - html_print_input_image('submit', 'images/zoom.png', __('Search'), 'padding:0;', false, ['alt' => __('Search')]); - - echo '
'; - echo ''; -} - -if ($count_total < 1) { - include_once $config['homedir'].'/general/first_task/incidents.php'; -} else { - // TOTAL incidents - $url = 'index.php?sec=workspace&sec2=operation/incidents/incident'; - - $estado = -1; - - // add form filter values for group, priority, state, and search fields: user and text - if ($grupo != -1) { - $url .= '&grupo='.$grupo; - } - - if ($prioridad != -1) { - $url .= '&prioridad='.$prioridad; - } - - if ($estado != -1) { - $url .= '&estado='.$estado; - } - - if ($usuario != '') { - $url .= '&usuario='.$usuario; - } - - if ($texto != '') { - $url .= '&texto='.$texto; - } - - // Show pagination - ui_pagination($count, $url, $offset, 0, false); - // ($count + $offset) it's real count of incidents because it's use LIMIT $offset in query. - echo '
'; - - // Show headers - $table->width = '100%'; - $table->class = 'info_table'; - $table->cellpadding = 0; - $table->cellspacing = 0; - $table->head = []; - $table->data = []; - $table->size = []; - $table->align = []; - - $table->head[0] = html_print_checkbox('all_action', 0, false, true, false); - $table->head[1] = __('ID'); - $table->head[2] = __('Status'); - $table->head[3] = __('Incident'); - $table->head[4] = __('Priority'); - $table->head[5] = __('Group'); - $table->head[6] = __('Updated'); - $table->head[7] = __('Source'); - $table->head[8] = __('Owner'); - - $table->size[0] = '20px'; - - $table->align[0] = 'left'; - $table->align[2] = 'left'; - $table->align[4] = 'left'; - $table->align[5] = 'left'; - - $rowPair = true; - $iterator = 0; - foreach ($result as $row) { - if ($rowPair) { - $table->rowclass[$iterator] = 'rowPair'; - } else { - $table->rowclass[$iterator] = 'rowOdd'; - } - - $rowPair = !$rowPair; - $iterator++; - - $data = []; - - if (check_acl($config['id_user'], $row['id_grupo'], 'IM') || $config['id_user'] == $row['id_usuario'] || $config['id_user'] == $row['id_creator']) { - $data[0] = html_print_checkbox('id_inc[]', $row['id_incidencia'], false, true); - } else { - $data[0] = ''; - } - - $data[1] = ''.$row['id_incidencia'].''; - $attach = incidents_get_attach($row['id_incidencia']); - - if (!empty($attach)) { - $data[1] .= '  '.html_print_image('images/attachment.png', true, ['style' => 'align:middle;']); - } - - $data[2] = incidents_print_status_img($row['estado'], true); - $data[3] = ''.ui_print_truncate_text(io_safe_output($row['titulo']), 'item_title').''; - $data[4] = incidents_print_priority_img($row['prioridad'], true); - $data[5] = ui_print_group_icon($row['id_grupo'], true); - $data[6] = ui_print_timestamp($row['actualizacion'], true); - $data[7] = $row['origen']; - if (empty($row['id_usuario'])) { - $data[8] = 'SYSTEM'; - } else { - $data[8] = ui_print_username($row['id_usuario'], true); - } - - array_push($table->data, $data); - } - - echo '
'; - html_print_table($table); - echo '
'; - if (check_acl($config['id_user'], 0, 'IW')) { - html_print_submit_button(__('Delete incidents'), 'delete_btn', false, 'class="sub delete" style="margin-right: 5px;"'); - } - - if (check_acl($config['id_user'], 0, 'IM')) { - html_print_submit_button(__('Become owner'), 'own_btn', false, 'class="sub upd"'); - } - - echo '
'; - echo '
'; - unset($table); - if (check_acl($config['id_user'], 0, 'IW')) { - echo '
'; - echo '
'; - html_print_submit_button(__('Create incident'), 'crt', false, 'class="sub next"'); - echo '
'; - echo '
'; - } -} - - -echo '
 
'; diff --git a/pandora_console/operation/incidents/incident_detail.php b/pandora_console/operation/incidents/incident_detail.php deleted file mode 100755 index 70288d29bf..0000000000 --- a/pandora_console/operation/incidents/incident_detail.php +++ /dev/null @@ -1,532 +0,0 @@ -'); - $filesize = io_safe_input($_FILES['userfile']['size']); - - // The following is if you have clamavlib installed - // (php5-clamavlib) and enabled in php.ini - // http://www.howtoforge.com/scan_viruses_with_php_clamavlib - if (extension_loaded('clamav')) { - cl_setlimits(5, 1000, 200, 0, 10485760); - $malware = cl_scanfile($_FILES['file']['tmp_name']); - if ($malware) { - $error = 'Malware detected: '.$malware.'
ClamAV version: '.clam_get_version(); - die($error); - // On malware, we die because it's not good to handle it - } - } - - $sql = sprintf( - "INSERT INTO tattachment (id_incidencia, id_usuario, filename, description, size) - VALUES (%d, '%s', '%s', '%s', %d)", - $id_inc, - $config['id_user'], - $filename, - $description, - $filesize - ); - - $id_attachment = db_process_sql($sql, 'insert_id'); - - // Copy file to directory and change name - if ($id_attachment !== false) { - $nombre_archivo = $config['attachment_store'].'/pand'.$id_attachment.'_'.$_FILES['userfile']['name']; - - - $zip = new ZipArchive; - - if ($zip->open($nombre_archivo.'.zip', ZIPARCHIVE::CREATE) === true) { - $zip->addFile($_FILES['userfile']['tmp_name'], io_safe_output($filename)); - $zip->close(); - } - - - // $result = copy ($_FILES['userfile']['tmp_name'], $nombre_archivo); - } else { - ui_print_error_message(__('File could not be saved due to database error')); - $result = false; - } - - if ($result !== false) { - unlink($_FILES['userfile']['tmp_name']); - incidents_process_touch($id_inc); - } else { - db_process_sql('DELETE FROM tattachment WHERE id_attachment = '.$id_attachment); - } - - ui_print_result_message( - $result, - __('File uploaded'), - __('File could not be uploaded') - ); - } -} //end if -// Create incident from event... read event data -else if (isset($_GET['insert_form'])) { - $titulo = ''; - $descripcion = ''; - $origen = ''; - $prioridad = 0; - $id_grupo = 0; - $estado = 0; - $texto = ''; - $usuario = $config['id_user']; - $id_creator = $config['id_user']; - $id_grupo = 0; - $id_agent = 0; - - if (isset($_GET['from_event'])) { - $event = get_parameter('from_event'); - $texto = io_safe_output(events_get_description($event)); - $titulo = ui_print_truncate_text(events_get_description($event), 'description', false, true, false); - $id_grupo = events_get_group($event); - $origen = 'Pandora FMS Event'; - $id_agent = db_get_value('id_agente', 'tevento', 'id_evento', $event); - unset($event); - } - - $prioridad = 0; -} else { - db_pandora_audit('HACK', 'Trying to get to incident details in an unusual way'); - include 'general/noaccess.php'; - exit; -} - - - -// ******************************************************************************************************** -// ******************************************************************************************************** -// Show the form -// ******************************************************************************************************** -// This is for the pretty slide down attachment form -echo ""; - -if (isset($id_inc)) { - // If $id_inc is set (when $_GET["id"] is set, not $_GET["insert_form"] - ui_print_page_header(__('Incident details').' #'.$id_inc, 'images/book_edit.png', false, '', false, ''); - echo '
'; - echo ''; -} else { - ui_print_page_header(__('Create incident'), 'images/book_edit.png', false, '', false, ''); - echo ''; -} - -echo ''; -echo ' - - - '; - -echo ' - - - - - '; - -echo ' - - - - - '; - -echo ' - - '; -echo ''; - -echo ''; -echo ''; -echo ''; -echo ''; -echo '
'.__('Incident').''; - -if ((check_acl($config['id_user'], $id_grupo, 'IM') == 1) - or ($usuario == $config['id_user']) -) { - html_print_input_text('titulo', $titulo, '', 70); -} else { - html_print_input_text_extended('titulo', $titulo, '', '', 70, '', false, '', 'readonly'); -} - -echo '
'.__('Opened at').''.date($config['date_format'], $inicio).''.__('Updated at').''.date($config['date_format'], $actualizacion).'
'.__('Owner').''; - -if ((check_acl($config['id_user'], $id_grupo, 'IM') == 1) or ($usuario == $config['id_user'])) { - html_print_select(users_get_info(), 'usuario_form', $usuario, '', 'SYSTEM', '', false, false, true, 'w135'); -} else { - html_print_select(users_get_info(), 'usuario_form', $usuario, '', 'SYSTEM', '', false, false, true, 'w135', true); -} - -echo ''.__('Status').''; - -if ((check_acl($config['id_user'], $id_grupo, 'IM') == 1) or ($usuario == $config['id_user'])) { - html_print_select(incidents_get_status(), 'estado_form', $estado, '', '', '', false, false, false, 'w135'); -} else { - html_print_select(incidents_get_status(), 'estado_form', $estado, '', '', '', false, false, false, 'w135', true); -} - -echo '
'.__('Source').''; - -$fields = []; -$return = db_get_all_rows_sql('SELECT origen FROM torigen ORDER BY origen'); -if ($return === false) { - $return[0] = $estado; - // Something must be displayed -} - -foreach ($return as $row) { - $fields[$row['origen']] = $row['origen']; -} - -// Only owner could change source or user with Incident management privileges -if ((check_acl($config['id_user'], $id_grupo, 'IM') == 1) or ($usuario == $config['id_user'])) { - html_print_select($fields, 'origen_form', $origen, '', '', '', false, false, false, 'w135'); -} else { - html_print_select($fields, 'origen_form', $origen, '', '', '', false, false, false, 'w135', true); -} - -echo ''.__('Group').''; - -// Group combo -echo '
'; -if ((check_acl($config['id_user'], $id_grupo, 'IM') == 1) or ($usuario == $config['id_user'])) { - html_print_select_groups($config['id_user'], 'IR', true, 'grupo_form', $id_grupo, '', '', '', false, false, false, 'w135'); -} else { - html_print_select_groups($config['id_user'], 'IR', true, 'grupo_form', $id_grupo, '', '', '', false, false, true, 'w135', true); -} - -echo '
'; -echo '
'.__('Priority').''; - -if ((check_acl($config['id_user'], $id_grupo, 'IM') == 1) or ($usuario == $config['id_user'])) { - html_print_select(incidents_get_priorities(), 'prioridad_form', $prioridad, '', '', '', false, false, false, 'w135'); -} else { - html_print_select(incidents_get_priorities(), 'prioridad_form', $prioridad, '', '', '', false, false, false, 'w135', true); -} - -echo ''.__('Creator').''; -if (empty($id_creator)) { - echo 'SYSTEM'; -} else { - echo $id_creator.' ('.get_user_fullname($id_creator).')'; -} - -$agents_incidents = agents_get_agents(false, ['id_agente', 'nombre']); - -if ($agents_incidents === false) { - $agents_incidents = []; -} - -foreach ($agents_incidents as $agent_incident) { - $result_agent_incidents[$agent_incident['id_agente']] = $agent_incident['nombre']; -} - -echo '
'.__('Agent').''; -$params = []; -$params['show_helptip'] = true; -$params['input_name'] = 'agent'; -$params['value'] = db_get_value('alias', 'tagente', 'id_agente', $id_agent); -$params['print_hidden_input_idagent'] = true; -$params['hidden_input_idagent_value'] = $id_agent; -$params['hidden_input_idagent_name'] = 'id_agent'; -ui_print_agent_autocomplete_input($params); -echo '
'; - -if ((check_acl($config['id_user'], $id_grupo, 'IM') == 1) or ($usuario == $config['id_user'])) { - html_print_textarea('descripcion', 15, 80, $texto, 'style="height:200px;"'); -} else { - html_print_textarea('descripcion', 15, 80, $texto, 'style="height:200px;" disabled'); -} - -echo '
'; - -// Only if user is the used who opened incident or (s)he is admin -if (isset($id_inc) and ((check_acl($config['id_user'], $id_grupo, 'IM') == 1) or ($usuario == $config['id_user']))) { - html_print_submit_button(__('Update incident'), 'accion', false, 'class="sub upd"'); -} else if (check_acl($config['id_user'], $id_grupo, 'IW')) { - html_print_submit_button(__('Create'), 'accion', false, 'class="sub wand"'); -} else { - html_print_submit_button(__('Submit'), 'accion', true, 'class="sub upd"'); -} - -echo '
'; - -// If we're actually working on an incident -if (isset($id_inc)) { - // ****************************************************************** - // Notes - // ****************************************************************** - echo '
'; - echo '

'.__('Add note').'

'; - - echo ' - - -
'; - - $result = incidents_get_notes($id_inc); - - $table->cellpadding = 4; - $table->cellspacing = 4; - $table->class = 'databox'; - $table->width = '98%'; - $table->data = []; - $table->head = []; - - foreach ($result as $row) { - $data = []; - $data[0] = html_print_image('images/page_white_text.png', true, ['border' => '0']); - $data[1] = __('Author').': '.ui_print_username($row['id_usuario'], true).' ('.ui_print_timestamp($row['timestamp'], true).')'; - array_push($table->data, $data); - - $data = []; - $data[0] = ''; - if ((check_acl($config['id_user'], $id_grupo, 'IM') == 1) or ($row['id_usuario'] == $config['id_user'])) { - $data[0] .= html_print_input_image('delete_nota', 'images/cross.png', $row['id_nota'], 'border:0px;" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;', true); - } - - $data[1] = $row['nota']; - array_push($table->data, $data); - } - - if (!empty($table->data)) { - echo '

'.__('Notes attached to incident').'

'; - echo '
'; - html_print_table($table); - echo '
'; - } - - unset($table); - - - // ****************************************************************** - // Files attached to this incident - // ****************************************************************** - $result = incidents_get_attach($id_inc); - - $table->cellpadding = 4; - $table->cellspacing = 4; - $table->class = 'databox'; - $table->width = '98%'; - $table->head = []; - $table->data = []; - - $table->head[0] = __('Filename'); - $table->head[1] = __('Description'); - $table->head[2] = __('Size'); - $table->head[3] = __('Delete'); - - $table->align[2] = 'center'; - $table->align[3] = 'center'; - - foreach ($result as $row) { - if (file_exists($config['homedir'].'/attachment/pand'.$row['id_attachment'].'_'.io_safe_output($row['filename']).'.zip')) { - $url = 'attachment/pand'.$row['id_attachment'].'_'.io_safe_output($row['filename']).'.zip'; - } else { - $url = 'attachment/pand'.$row['id_attachment'].'_'.io_safe_output($row['filename']); - } - - $data[0] = html_print_image('images/disk.png', true, ['border' => '0', 'align' => 'top']).'  '.$row['filename'].''; - $data[1] = $row['description']; - $data[2] = format_for_graph($row['size']).'B'; - if ((check_acl($config['id_user'], $id_grupo, 'IM') == 1) or ($usuario == $config['id_user'])) { - $data[3] = html_print_input_image('delete_file', 'images/cross.png', $row['id_attachment'], 'border:0px;" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;', true); - } else { - $data[3] = ''; - } - - array_push($table->data, $data); - } - - if (!empty($table->data)) { - echo '

'.__('Attached files').'

'; - echo '
'; - html_print_table($table); - echo '
'; - } - - unset($table); - - // ****************************************************************** - // Upload control - // ****************************************************************** - // Upload control - if ((check_acl($config['id_user'], $id_grupo, 'IW') == 1)) { - echo ''; - - echo '

'.__('Add attachment').'

'; - echo ' - - - -
'.__('Filename').'
'.__('Description').'
'; - } -} diff --git a/pandora_console/operation/incidents/incident_statistics.php b/pandora_console/operation/incidents/incident_statistics.php index 7cabe749d7..af1867264f 100755 --- a/pandora_console/operation/incidents/incident_statistics.php +++ b/pandora_console/operation/incidents/incident_statistics.php @@ -26,6 +26,11 @@ if (! check_acl($config['id_user'], 0, 'IR') && ! check_acl($config['id_user'], ui_print_page_header(__('Incidents').' » '.__('Statistics'), 'images/book_edit.png', false, '', false, ''); +if (!$config['integria_enabled']) { + ui_print_error_message(__('In order to access ticket management system, integration with Integria IMS must be enabled and properly configured')); + exit; +} + echo '

'.__('Incidents by status').'

'; echo graph_incidents_status(); @@ -39,7 +44,4 @@ echo graphic_incident_group(); echo '

'.__('Incidents by user').'

'; echo graphic_incident_user(); -echo '

'.__('Incidents by source').'

'; -echo graphic_incident_source(); - echo '
'; diff --git a/pandora_console/operation/incidents/list_integriaims_incidents.php b/pandora_console/operation/incidents/list_integriaims_incidents.php index f18fb31566..7dd39c44ea 100644 --- a/pandora_console/operation/incidents/list_integriaims_incidents.php +++ b/pandora_console/operation/incidents/list_integriaims_incidents.php @@ -38,7 +38,7 @@ ui_print_page_header( // Check if Integria integration enabled. if ($config['integria_enabled'] == 0) { - ui_print_error_message(__('Integria integration must be enabled in Pandora setup')); + ui_print_error_message(__('In order to access ticket management system, integration with Integria IMS must be enabled and properly configured')); return; } diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 87a3da3af1..d1256ae7e1 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -500,9 +500,8 @@ if (check_acl($config['id_user'], 0, 'IR') ]; $sub2 = []; - $sub2['operation/incidents/incident']['text'] = __('List of Incidents'); - $sub2[$sec2sub]['text'] = __('Statistics'); - $sub2['operation/incidents/list_integriaims_incidents']['text'] = __('Integria IMS Tickets'); + $sub2[$sec2sub]['text'] = __('Integria IMS statistics'); + $sub2['operation/incidents/list_integriaims_incidents']['text'] = __('Integria IMS ticket list'); $sub[$sec2]['sub2'] = $sub2; $sec2 = $temp_sec2; diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index cffa235f04..ba5820ee9d 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -44,8 +44,6 @@ Exported Functions: =item * C -=item * C - =item * C =item * C @@ -161,6 +159,9 @@ use LWP::Simple; use IO::Socket::INET6; use LWP::UserAgent; use HTTP::Request::Common; +use URI::URL; +use LWP::UserAgent; +use JSON; # For IPv6 support in Net::HTTP. BEGIN { @@ -179,7 +180,6 @@ our @EXPORT = qw( pandora_create_agent pandora_create_alert_command pandora_create_group - pandora_create_incident pandora_create_module pandora_create_module_from_hash pandora_create_module_from_network_component @@ -254,6 +254,8 @@ our @EXPORT = qw( pandora_self_monitoring pandora_sample_agent pandora_process_policy_queue + pandora_sync_agents_integria + pandora_get_integria_ticket_types subst_alert_macros subst_column_macros locate_agent @@ -1564,6 +1566,12 @@ sub pandora_execute_action ($$$$$$$$$;$) { # Integria IMS Ticket } elsif ($clean_name eq "Integria IMS Ticket") { + my $config_integria_enabled = pandora_get_tconfig_token ($dbh, 'integria_enabled', ''); + + if (!$config_integria_enabled) { + return; + } + my $config_api_path = pandora_get_tconfig_token ($dbh, 'integria_hostname', ''); my $config_api_pass = pandora_get_tconfig_token ($dbh, 'integria_api_pass', ''); my $config_integria_user = pandora_get_tconfig_token ($dbh, 'integria_user', ''); @@ -1575,6 +1583,9 @@ sub pandora_execute_action ($$$$$$$$$;$) { $field5 = subst_alert_macros ($field5, \%macros, $pa_config, $dbh, $agent, $module, $alert); $field6 = subst_alert_macros ($field6, \%macros, $pa_config, $dbh, $agent, $module, $alert); $field7 = subst_alert_macros ($field7, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field8 = subst_alert_macros ($field8, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field9 = subst_alert_macros ($field9, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field10 = subst_alert_macros ($field10, \%macros, $pa_config, $dbh, $agent, $module, $alert); # Field 1 (Integria IMS API path) my $api_path = $config_api_path . "/integria/include/api.php"; @@ -1627,7 +1638,18 @@ sub pandora_execute_action ($$$$$$$$$;$) { # Field 7 (Ticket description); my $ticket_description = safe_output($field7); - pandora_create_integria_ticket($pa_config, $api_path, $api_pass, $integria_user, $integria_user_pass, $ticket_name, $ticket_group_id, $ticket_priority, $ticket_owner, $ticket_type, $ticket_status, $ticket_description); + my $create_wu_on_close_recovery = 0; + + if ($alert_mode == RECOVERED_ALERT && $action->{'create_wu_integria'} == '1') { + $create_wu_on_close_recovery = 1; + } + + # Ticket type custom fields + my $ticket_custom_field1 = $field8; + my $ticket_custom_field2 = $field9; + my $ticket_custom_field3 = $field10; + + pandora_create_integria_ticket($pa_config, $api_path, $api_pass, $integria_user, $integria_user_pass, $agent->{'nombre'}, $agent->{'alias'}, $agent->{'id_os'}, $agent->{'direccion'}, $agent->{'id_agente'}, $agent->{'id_grupo'}, $ticket_name, $ticket_group_id, $ticket_priority, $ticket_owner, $ticket_type, $ticket_status, $ticket_description, $create_wu_on_close_recovery, $ticket_custom_field1, $ticket_custom_field2, $ticket_custom_field3); # Generate notification } elsif ($clean_name eq "Generate Notification") { @@ -3040,27 +3062,6 @@ sub pandora_module_keep_alive ($$$$$) { } } -########################################################################## -=head2 C<< pandora_create_incident (I<$pa_config>, I<$dbh>, I<$title>, I<$text>, I<$priority>, I<$status>, I<$origin>, I<$id_group>) >> - -Create an internal Pandora incident. - -=cut -########################################################################## -sub pandora_create_incident ($$$$$$$$;$) { - my ($pa_config, $dbh, $title, $text, - $priority, $status, $origin, $id_group, $owner) = @_; - - logger($pa_config, "Creating incident '$text' source '$origin'.", 8); - - # Initialize default parameters - $owner = '' unless defined ($owner); - - db_do($dbh, 'INSERT INTO tincidencia (inicio, titulo, descripcion, origen, estado, prioridad, id_grupo, id_usuario) - VALUES (NOW(), ?, ?, ?, ?, ?, ?, ?)', $title, $text, $origin, $status, $priority, $id_group, $owner); -} - - ########################################################################## =head2 C<< pandora_audit (I<$pa_config>, I<$description>, I<$name>, I<$action>, I<$dbh>) >> @@ -6213,30 +6214,51 @@ sub pandora_edit_custom_graph ($$$$$$$$$$$) { return $res; } -sub pandora_create_integria_ticket ($$$$$$$$$$$) { - my ($pa_config,$api_path,$api_pass,$integria_user,$user_pass,$ticket_name,$ticket_group_id,$ticket_priority,$ticket_owner,$ticket_type,$ticket_status,$ticket_description) = @_; +sub pandora_create_integria_ticket ($$$$$$$$$$$$$$$$$$$$$$) { + my ($pa_config,$api_path,$api_pass,$integria_user,$user_pass,$agent_name,$agent_alias,$agent_os,$agent_addr,$agent_id,$agent_group,$ticket_name,$ticket_group_id,$ticket_priority,$ticket_owner,$ticket_type,$ticket_status,$ticket_description, $create_wu_on_close_recovery, $ticket_custom_field1, $ticket_custom_field2, $ticket_custom_field3) = @_; + + use URI::URL; + use URI::Escape; + use HTML::Entities; my $data_ticket; my $call_api; - $data_ticket = $ticket_name . + my $uri = URI->new($api_path); + + if ($uri->scheme eq "") { + $api_path = "http://" . $api_path; + } + + my $ticket_create_wu = 0; + + if ($create_wu_on_close_recovery == 1 && $ticket_status eq '7') { + $ticket_create_wu = 1; + } + + $data_ticket = $agent_name . + "|;|" . uri_escape(decode_entities($agent_alias)) . + "|;|" . $agent_os . + "|;|" . $agent_addr . + "|;|" . $agent_id . + "|;|" . $agent_group . + "|;|" . $ticket_name . "|;|" . $ticket_group_id . "|;|" . $ticket_priority . "|;|" . $ticket_description . - "|;|" . "|;|" . $ticket_type . - "|;|" . "|;|" . $ticket_owner . - "|;|" . "|;|" . $ticket_status . - "|;|" . - "|;|"; - + "|;|" . $ticket_create_wu . + "|;|" . $ticket_custom_field1 . + "|;|" . $ticket_custom_field2 . + "|;|" . $ticket_custom_field3; + $call_api = $api_path . '?' . 'user=' . $integria_user . '&' . 'user_pass=' . $user_pass . '&' . 'pass=' . $api_pass . '&' . - 'op=create_incident&' . + 'op=create_pandora_ticket&' . 'params=' . $data_ticket .'&' . 'token=|;|'; @@ -6250,6 +6272,86 @@ sub pandora_create_integria_ticket ($$$$$$$$$$$) { } } +sub pandora_sync_agents_integria ($) { + my ($dbh) = @_; + + my $config_integria_enabled = pandora_get_tconfig_token ($dbh, 'integria_enabled', ''); + + if (!$config_integria_enabled) { + return; + } + + my $config_api_path = pandora_get_tconfig_token ($dbh, 'integria_hostname', ''); + my $config_api_pass = pandora_get_tconfig_token ($dbh, 'integria_api_pass', ''); + my $config_integria_user = pandora_get_tconfig_token ($dbh, 'integria_user', ''); + my $config_integria_user_pass = pandora_get_tconfig_token ($dbh, 'integria_pass', ''); + + my $api_path = $config_api_path . "/integria/include/api.php"; + + my @agents_string = ''; + my @agents = get_db_rows ($dbh, 'SELECT * FROM tagente'); + + my @agents_array = (); + my $agents_string = ''; + + foreach my $agent (@agents) { + push @agents_array, $agent->{'nombre'} . + "|;|" . + $agent->{'alias'} . + "|;|" . + $agent->{'id_os'} . + "|;|" . + $agent->{'direccion'} . + "|;|" . + $agent->{'id_grupo'}; + } + + my $ua = LWP::UserAgent->new(); + my $response = $ua->post( $api_path, { + 'user' => $config_integria_user, + 'user_pass' => $config_integria_user_pass, + 'pass' => $config_api_pass, + 'op' => 'sync_pandora_agents_inventory', + 'params[]' => [@agents_array], + 'token' => '|;|' + }); + + my $content = $response->decoded_content(); + + if (defined $content && is_numeric($content) && $content ne "-1") { + return $content; + } + else { + return 0; + } +} + +sub pandora_get_integria_ticket_types($) { + my ($dbh) = @_; + + my $config_api_path = pandora_get_tconfig_token ($dbh, 'integria_hostname', ''); + my $config_api_pass = pandora_get_tconfig_token ($dbh, 'integria_api_pass', ''); + my $config_integria_user = pandora_get_tconfig_token ($dbh, 'integria_user', ''); + my $config_integria_user_pass = pandora_get_tconfig_token ($dbh, 'integria_pass', ''); + + my $api_path = $config_api_path . "/integria/include/api.php"; + + my $call_api = $api_path . '?' . + 'user=' . $config_integria_user . '&' . + 'user_pass=' . $config_integria_user_pass . '&' . + 'pass=' . $config_api_pass . '&' . + 'op=get_types&' . + 'return_type=json'; + + my $content = get($call_api); + + my @decoded_json; + @decoded_json = @{decode_json($content)} if (defined $content && $content ne ""); + + return @decoded_json; + +} + ########################################################################## =head2 C<< pandora_input_password (I<$pa_config>, I<$password>) >> diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index af5663158c..4b58381ce9 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -1086,6 +1086,39 @@ if ($lock == 0 && $conf{'_force'} == 0) { # Main pandoradb_main(\%conf, $dbh, $history_dbh); +# history_dbh is unset in pandoradb_main if not in use. +if (defined($history_dbh)) { + log_message('', " [>] DB Tool running on historical database.\n"); + my $h_conf = pandoradb_load_history_conf($history_dbh); + + # Keep base settings. + $h_conf->{'_onlypurge'} = $conf{'_onlypurge'}; + + # Re-launch maintenance process for historical database. + pandoradb_main( + $h_conf, + $history_dbh, + undef + ); + +} + +# Keep integrity between PandoraFMS agents and IntegriaIMS inventory objects. +pandora_sync_agents_integria($dbh); + +# Get Integria IMS ticket types for alert commands. +my @types = pandora_get_integria_ticket_types($dbh); + +if (scalar(@types) != 0) { + my $query_string = ''; + foreach my $type (@types) { + $query_string .= $type->{'id'} . ',' . $type->{'name'} . ';'; + } + + db_do($dbh, "UPDATE talert_commands SET fields_descriptions='[\"Ticket title\",\"Ticket group ID\",\"Ticket priority\",\"Ticket owner\",\"Ticket type\",\"Ticket status\",\"Ticket description\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\"]' WHERE name=\"Integria IMS Ticket\""); + db_do($dbh, "UPDATE talert_commands SET fields_values='[\"\", \"\", \"\",\"\",\"" . $query_string . "\",\"\",\"\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\", \"_integria_type_custom_field_\"]' WHERE name=\"Integria IMS Ticket\""); +} + # Release the lock if ($lock == 1) { db_release_lock ($dbh, 'pandora_db'); diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 4a2ff349d0..6b13b697fc 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -202,8 +202,6 @@ sub help_screen{ help_screen_line('--validate_event_id', '', 'Validate event given a event id'); help_screen_line('--get_event_info', '[]', 'Show info about a event given a event id'); help_screen_line('--add_event_comment', ' ', 'Add event\'s comment'); - print "\nINCIDENTS:\n\n" unless $param ne ''; - help_screen_line('--create_incident', " <description> <origin> <status> <priority 0 for Informative, \n\t 1 for Low, 2 for Medium, 3 for Serious, 4 for Very serious or 5 for Maintenance>\n\t <group> [<owner>]", 'Create incidents'); print "\nPOLICIES:\n\n" unless $param ne ''; help_screen_line('--apply_policy', '<id_policy> [<id_agent> <name(boolean)> <id_server>]', 'Force apply a policy in an agent'); help_screen_line('--apply_all_policies', '', 'Force apply to all the policies'); @@ -4364,21 +4362,6 @@ sub cli_add_event_comment() { pandora_update_event_from_hash ($update, 'id_evento', $id_event, $dbh); } -############################################################################## -# Create incident. -# Related option: --create_incident -############################################################################## - -sub cli_create_incident() { - my ($title, $description, $origin, $status, $priority, $group_name, $owner) = @ARGV[2..8]; - - my $id_group = get_group_id($dbh,$group_name); - exist_check($id_group,'group',$group_name); - - pandora_create_incident ($conf, $dbh, $title, $description, $priority, $status, $origin, $id_group, $owner); - print_log "[INFO] Creating incident '$title'\n\n"; -} - ############################################################################## # Delete data. # Related option: --delete_data @@ -7392,10 +7375,6 @@ sub pandora_manage_main ($$$) { param_check($ltotal, 3); cli_add_event_comment(); } - elsif ($param eq '--create_incident') { - param_check($ltotal, 7, 1); - cli_create_incident(); - } elsif ($param eq '--delete_data') { param_check($ltotal, 4, 2); cli_delete_data($ltotal); diff --git a/pandora_server/util/recon_scripts/wmi-recon.pl b/pandora_server/util/recon_scripts/wmi-recon.pl index 53bb697b0d..513a5ac08a 100755 --- a/pandora_server/util/recon_scripts/wmi-recon.pl +++ b/pandora_server/util/recon_scripts/wmi-recon.pl @@ -136,13 +136,6 @@ sub recon_scan($$) { # Mark the recon task as done. update_recon_task ($DBH, $task->{'id_rt'}, -1); - - # Create an incident. - if (defined($ADDED_HOSTS[0]) && $task->{'create_incident'} == 1) { - my $text = "At " . strftime ("%Y-%m-%d %H:%M:%S", localtime()) . " (". scalar(@ADDED_HOSTS) . ") new hosts were detected by Pandora FMS WMI Recon Script running on [" . $CONF{'servername'} . "_Recon]. This incident has been automatically created following instructions for this recon task [" . $task->{'id_group'} . "].\n\n"; - $text .= "\n\nThis is the list of IP addresses found: \n\n" . join(',', @ADDED_HOSTS); - pandora_create_incident (\%CONF, $DBH, "[RECON] New hosts detected", $text, 0, 0, 'Pandora FMS Recon Server', $task->{'id_group'}); - } } ########################################################################## @@ -369,6 +362,5 @@ die("Error retrieving recon task ID $TASK_ID\n") unless defined($task); # Scan! $task->{'subnet'} = $NETWORKS; $task->{'id_group'} = $GROUP_ID; -$task->{'create_incident'} = $CREATE_INCIDENT; recon_scan($task, \&wmi_scan); From ab68bcf1d6f5ddbcf64fba08d99115c33b6ddb39 Mon Sep 17 00:00:00 2001 From: "rafael.ameijeiras" <rafael.ameijeiras@artica.es> Date: Thu, 4 Mar 2021 12:13:16 +0100 Subject: [PATCH 044/113] adding permissions to apache group --- pandora_server/pandora_server_installer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 9c1c2f0c06..bd5dae4aae 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -313,7 +313,7 @@ install () { mkdir $DESTDIR$PANDORA_SPOOL/data_in/commands 2> /dev/null chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/commands mkdir -p $DESTDIR$PANDORA_LOG 2> /dev/null - chown -R pandora $DESTDIR$PANDORA_LOG 2> /dev/null + chown -R pandora:apache $DESTDIR$PANDORA_LOG 2> /dev/null chmod 2774 $DESTDIR$PANDORA_LOG 2> /dev/null echo "Giving proper permission to /var/spool/pandora" From b117bbfd7e10314e2a586624181206693d4cb67f Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" <alejandro.campos@artica.es> Date: Thu, 4 Mar 2021 16:27:14 +0100 Subject: [PATCH 045/113] Refactored downtime editor --- .../agentes/planned_downtime.editor.php | 879 +++++++++--------- 1 file changed, 452 insertions(+), 427 deletions(-) diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php index 662ff019bb..e9d2720508 100644 --- a/pandora_console/godmode/agentes/planned_downtime.editor.php +++ b/pandora_console/godmode/agentes/planned_downtime.editor.php @@ -70,6 +70,7 @@ ui_print_page_header( // Recursion group filter. $recursion = get_parameter('recursion', $_POST['recursion']); + // Initialize data. $id_group = (int) get_parameter('id_group'); $name = (string) get_parameter('name'); @@ -142,144 +143,9 @@ $user_groups_ad = array_keys( users_get_groups($config['id_user'], $access) ); -// Check AD permission on downtime. -$downtime_group = db_get_value( - 'id_group', - 'tplanned_downtime', - 'id', - $id_downtime -); - -if ($id_downtime > 0) { - if (!check_acl_restricted_all($config['id_user'], $downtime_group, 'AW') - && !check_acl_restricted_all($config['id_user'], $downtime_group, 'AD') - ) { - db_pandora_audit( - 'ACL Violation', - 'Trying to access downtime scheduler' - ); - include 'general/noaccess.php'; - return; - } -} - // INSERT A NEW DOWNTIME_AGENT ASSOCIATION. if ($insert_downtime_agent === 1) { - if ($downtime_group === false - || !in_array($downtime_group, $user_groups_ad) - ) { - db_pandora_audit( - 'ACL Violation', - 'Trying to access downtime scheduler' - ); - include 'general/noaccess.php'; - return; - } - - $agents = (array) get_parameter('id_agents'); - $module_names = (array) get_parameter('module'); - - $all_modules = ($modules_selection_mode === 'all' && (empty($module_names) || (int) $modules[0] === 0)); - $all_common_modules = ($modules_selection_mode === 'common' && (empty($module_names) || (int) $modules[0] === 0)); - - if ($all_common_modules === true) { - $module_names = explode(',', get_parameter('all_common_modules')); - } - - // 'Is running' check. - $is_running = (bool) db_get_value( - 'executed', - 'tplanned_downtime', - 'id', - $id_downtime - ); - if ($is_running) { - ui_print_error_message( - __('This elements cannot be modified while the downtime is being executed') - ); - } else { - // If is selected 'Any', get all the agents. - if (count($agents) === 1 && (int) $agents[0] === -2) { - $all_agents = get_parameter('all_agents'); - $agents = explode(',', $all_agents); - } - - foreach ($agents as $agent_id) { - // Check module belongs to the agent. - if ($modules_selection_mode == 'all' && $all_modules === false) { - $check = false; - foreach ($module_names as $module_name) { - $check_module = modules_get_agentmodule_id( - $module_name, - $agent_id - ); - if (!empty($check_module)) { - $check = true; - } - } - - if (!$check) { - continue; - } - } - - // Check AD permission on agent. - $agent_group = db_get_value( - 'id_grupo', - 'tagente', - 'id_agente', - $agent_id - ); - - if ($agent_group === false - || !in_array($agent_group, $user_groups_ad) - ) { - continue; - } - - $values = [ - 'id_downtime' => $id_downtime, - 'id_agent' => $agent_id, - 'all_modules' => $all_modules, - ]; - $result = db_process_sql_insert( - 'tplanned_downtime_agents', - $values - ); - - if ($result && !$all_modules) { - foreach ($module_names as $module_name) { - $module = modules_get_agentmodule_id( - $module_name, - $agent_id - ); - - if (empty($module)) { - continue; - } - - $values = [ - 'id_downtime' => $id_downtime, - 'id_agent' => $agent_id, - 'id_agent_module' => $module['id_agente_modulo'], - ]; - $result = db_process_sql_insert( - 'tplanned_downtime_modules', - $values - ); - - if ($result) { - $values = ['id_user' => $config['id_user']]; - $result = db_process_sql_update( - 'tplanned_downtime', - $values, - ['id' => $id_downtime] - ); - } - } - } - } - } + insert_downtime_agent($id_downtime, $user_groups_ad); } // DELETE A DOWNTIME_AGENT ASSOCIATION. @@ -485,10 +351,6 @@ if ($create_downtime || $update_downtime) { 'date_to' => $datetime_to, 'id_user' => $config['id_user'], ]; - } else if ($is_running) { - ui_print_error_message( - __('Cannot be modified while the downtime is being executed') - ); } else { $values = [ 'name' => $name, @@ -519,12 +381,18 @@ if ($create_downtime || $update_downtime) { } } - if (!empty($values)) { - $result = db_process_sql_update( - 'tplanned_downtime', - $values, - ['id' => $id_downtime] + if ($is_running) { + ui_print_error_message( + __('Cannot be modified while the downtime is being executed') ); + } else { + if (!empty($values)) { + $result = db_process_sql_update( + 'tplanned_downtime', + $values, + ['id' => $id_downtime] + ); + } } } @@ -537,6 +405,9 @@ if ($create_downtime || $update_downtime) { } else { if ($create_downtime && $name && !$check) { $id_downtime = $result; + + insert_downtime_agent($id_downtime, $user_groups_ad); + ui_print_success_message(__('Successfully created')); } else if ($update_downtime && $name) { ui_print_success_message(__('Successfully updated')); @@ -579,8 +450,8 @@ if ($id_downtime > 0) { case 'postgresql': $columns_str = implode(',', $columns); $sql = "SELECT $columns_str - FROM tplanned_downtime - WHERE id = $id_downtime"; + FROM tplanned_downtime + WHERE id = $id_downtime"; break; case 'oracle': @@ -602,8 +473,8 @@ if ($id_downtime > 0) { $columns_str = implode(',', $columns); $sql = "SELECT $columns_str - FROM tplanned_downtime - WHERE id = $id_downtime"; + FROM tplanned_downtime + WHERE id = $id_downtime"; break; } @@ -667,20 +538,11 @@ $table->data[0][1] = html_print_input_text( true, $disabled_in_execution ); - -$return_all_group = false; - -if (users_can_manage_group_all('AW') === true - || users_can_manage_group_all('AD') === true -) { - $return_all_group = true; -} - $table->data[1][0] = __('Group'); $table->data[1][1] = '<div class="w250px">'.html_print_select_groups( false, $access, - $return_all_group, + true, 'id_group', $id_group, '', @@ -745,23 +607,23 @@ $days = array_combine(range(1, 31), range(1, 31)); $table->data[5][0] = __('Configure the time').' '; ; $table->data[5][1] = " - <div id='once_time' style='display: none;'> - <table> - <tr> - <td>".__('From:').'</td> - <td>'.html_print_input_text('once_date_from', $once_date_from, '', 10, 10, true, $disabled_in_execution).html_print_input_text('once_time_from', $once_time_from, '', 9, 9, true, $disabled_in_execution).'</td> - </tr> - <tr> - <td>'.__('To:').'</td> - <td>'.html_print_input_text('once_date_to', $once_date_to, '', 10, 10, true).html_print_input_text('once_time_to', $once_time_to, '', 9, 9, true)."</td> - </tr> - </table> - </div> - <div id='periodically_time' style='display: none;'> - <table> - <tr><td>".ui_get_using_system_timezone_warning().'</td></tr> - <tr> - <td>'.__('Type Periodicity:').' '.html_print_select( + <div id='once_time' style='display: none;'> + <table> + <tr> + <td>".__('From:').'</td> + <td>'.html_print_input_text('once_date_from', $once_date_from, '', 10, 10, true, $disabled_in_execution).html_print_input_text('once_time_from', $once_time_from, '', 9, 9, true, $disabled_in_execution).'</td> + </tr> + <tr> + <td>'.__('To:').'</td> + <td>'.html_print_input_text('once_date_to', $once_date_to, '', 10, 10, true).html_print_input_text('once_time_to', $once_time_to, '', 9, 9, true)."</td> + </tr> + </table> + </div> + <div id='periodically_time' style='display: none;'> + <table> + <tr><td>".ui_get_using_system_timezone_warning().'</td></tr> + <tr> + <td>'.__('Type Periodicity:').' '.html_print_select( [ 'weekly' => __('Weekly'), 'monthly' => __('Monthly'), @@ -777,24 +639,24 @@ $table->data[5][1] = " '', $disabled_in_execution )."</td> - </tr> - <tr> - <td colspan='2'> - <table id='weekly_item' style='display: none;'> - <tr> - <td>".__('Mon').html_print_checkbox('monday', 1, $monday, true, $disabled_in_execution).'</td> - <td>'.__('Tue').html_print_checkbox('tuesday', 1, $tuesday, true, $disabled_in_execution).'</td> - <td>'.__('Wed').html_print_checkbox('wednesday', 1, $wednesday, true, $disabled_in_execution).'</td> - <td>'.__('Thu').html_print_checkbox('thursday', 1, $thursday, true, $disabled_in_execution).'</td> - <td>'.__('Fri').html_print_checkbox('friday', 1, $friday, true, $disabled_in_execution).'</td> - <td>'.__('Sat').html_print_checkbox('saturday', 1, $saturday, true, $disabled_in_execution).'</td> - <td>'.__('Sun').html_print_checkbox('sunday', 1, $sunday, true, $disabled_in_execution)."</td> - </tr> - </table> - <table id='monthly_item' style='display: none;'> - <tr> - <td>".__('From day:').'</td> - <td>'.html_print_select( + </tr> + <tr> + <td colspan='2'> + <table id='weekly_item' style='display: none;'> + <tr> + <td>".__('Mon').html_print_checkbox('monday', 1, $monday, true, $disabled_in_execution).'</td> + <td>'.__('Tue').html_print_checkbox('tuesday', 1, $tuesday, true, $disabled_in_execution).'</td> + <td>'.__('Wed').html_print_checkbox('wednesday', 1, $wednesday, true, $disabled_in_execution).'</td> + <td>'.__('Thu').html_print_checkbox('thursday', 1, $thursday, true, $disabled_in_execution).'</td> + <td>'.__('Fri').html_print_checkbox('friday', 1, $friday, true, $disabled_in_execution).'</td> + <td>'.__('Sat').html_print_checkbox('saturday', 1, $saturday, true, $disabled_in_execution).'</td> + <td>'.__('Sun').html_print_checkbox('sunday', 1, $sunday, true, $disabled_in_execution)."</td> + </tr> + </table> + <table id='monthly_item' style='display: none;'> + <tr> + <td>".__('From day:').'</td> + <td>'.html_print_select( $days, 'periodically_day_from', $periodically_day_from, @@ -807,8 +669,8 @@ $table->data[5][1] = " '', $disabled_in_execution ).'</td> - <td>'.__('To day:').'</td> - <td>'.html_print_select( + <td>'.__('To day:').'</td> + <td>'.html_print_select( $days, 'periodically_day_to', $periodically_day_to, @@ -821,13 +683,13 @@ $table->data[5][1] = " '', $disabled_in_execution ).'</td> - <td>'.ui_print_help_tip(__('The end day must be higher than the start day'), true).'</td> - </tr> - </table> - <table> - <tr> - <td>'.__('From hour:').'</td> - <td>'.html_print_input_text( + <td>'.ui_print_help_tip(__('The end day must be higher than the start day'), true).'</td> + </tr> + </table> + <table> + <tr> + <td>'.__('From hour:').'</td> + <td>'.html_print_input_text( 'periodically_time_from', $periodically_time_from, '', @@ -839,8 +701,8 @@ $table->data[5][1] = " __('The end time must be higher than the start time'), true ).'</td> - <td>'.__('To hour:').'</td> - <td>'.html_print_input_text( + <td>'.__('To hour:').'</td> + <td>'.html_print_input_text( 'periodically_time_to', $periodically_time_to, '', @@ -852,23 +714,135 @@ $table->data[5][1] = " __('The end time must be higher than the start time'), true ).'</td> - </tr> - </table> - </td> - </tr> - </table> - </div>'; - -echo '<form method="POST" action="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor">'; + </tr> + </table> + </td> + </tr> + </table> + </div>'; if ($id_downtime > 0) { - echo '<table width=100% border=0 cellpadding=4 >'; - echo "<tr><td width=75% valign='top'>"; + echo "<form method=post action='index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&insert_downtime_agent=1&id_downtime=$id_downtime'>"; +} else { + echo '<form method="POST" action="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor">'; } // Editor form. html_print_table($table); +echo "<td valign=top style='width:300px;padding-left:20px;'>"; + +$filter_group = (int) get_parameter('filter_group', 0); + +// User AD groups to str for the filter. +$id_groups_str = implode(',', $user_groups_ad); + +if (empty($id_groups_str)) { + // Restrictive filter on error. This will filter all the downtimes. + $id_groups_str = '-1'; +} + +$filter_cond = ''; +if ($filter_group > 0) { + if ($recursion) { + $rg = groups_get_children_ids($filter_group, true); + $filter_cond .= ' AND id_grupo IN ('; + + $i = 0; + $len = count($rg); + + foreach ($rg as $key) { + if ($i == ($len - 1)) { + $filter_cond .= $key.')'; + } else { + $i++; + $filter_cond .= $key.','; + } + } + } else { + $filter_cond = " AND id_grupo = $filter_group "; + } +} + +$agents = get_planned_downtime_agents_list($id_downtime, $filter_cond, $id_groups_str); + +$disabled_add_button = false; +if (empty($agents) || $disabled_in_execution) { + $disabled_add_button = true; +} + +// Show available agents to include into downtime +$table = new StdClass(); +$table->class = 'databox filters'; +$table->width = '100%'; +$table->data = []; + +$table->data[0][0] = __('Group filter'); +$table->data[0][1] = html_print_select_groups(false, $access, true, 'filter_group', $filter_group, '', '', '', true, false, true, '', false, 'min-width:180px;margin-right:15px;'); +$table->data[0][2] = __('Recursion').'  '.html_print_checkbox('recursion', 1, $recursion, true, false, ''); + +$table->data[1][0] = __('Available agents'); +$table->data[1][1] = html_print_select($agents, 'id_agents[]', -1, '', _('Any'), -2, true, true, true, '', false, 'width: 180px;'); + + +if ($type_downtime != 'quiet') { + echo '<div id="available_modules_selection_mode" style="padding-top:20px;display: none;">'; +} else { + echo '<div id="available_modules_selection_mode" style="padding-top:20px">'; +} + +$table->data[2][1] = html_print_select( + [ + 'common' => __('Show common modules'), + 'all' => __('Show all modules'), + ], + 'modules_selection_mode', + 'common', + false, + '', + '', + true, + false, + true, + '', + false, + 'min-width:180px;' +); + +echo '</div>'; + +$table->data[3][0] = __('Available modules:').ui_print_help_tip( + __('Only for type Quiet for downtimes.'), + true +); + +if ($type_downtime != 'quiet') { + echo '<div id="available_modules" style="display: none;">'; +} else { + echo '<div id="available_modules" style="">'; +} + +$table->data[3][1] = html_print_select( + [], + 'module[]', + '', + '', + '', + 0, + true, + true, + true, + '', + false, + 'width: 180px;' +); +echo '</div>'; + +// Print agent table. +html_print_table($table); + +echo '<br /><br /><br />'; + html_print_input_hidden('id_agent', $id_agent); echo '<div class="action-buttons" style="width: 100%">'; if ($id_downtime > 0) { @@ -891,215 +865,97 @@ if ($id_downtime > 0) { } echo '</div>'; +html_print_input_hidden('all_agents', implode(',', array_keys($agents))); +html_print_input_hidden('all_common_modules', ''); echo '</form>'; -if ($id_downtime > 0) { - echo "<td valign=top style='width:300px;padding-left:20px;'>"; +// Start Overview of existing planned downtime. +echo '<h4>'.__('Agents planned for this downtime').':</h4>'; - $filter_group = (int) get_parameter('filter_group', 0); +// User the $id_groups_str built before. +$sql = sprintf( + 'SELECT ta.nombre, tpda.id, + ta.id_os, ta.id_agente, ta.id_grupo, + ta.ultimo_contacto, tpda.all_modules + FROM tagente ta + INNER JOIN tplanned_downtime_agents tpda + ON ta.id_agente = tpda.id_agent + AND tpda.id_downtime = %d + WHERE ta.id_grupo IN (%s)', + $id_downtime, + $id_groups_str +); +$downtimes_agents = db_get_all_rows_sql($sql); - // User AD groups to str for the filter. - $id_groups_str = implode(',', $user_groups_ad); +if (empty($downtimes_agents)) { + echo '<div class="nf">'.__('There are no agents').'</div>'; +} else { + $table = new stdClass(); + $table->id = 'list'; + $table->class = 'databox data'; + $table->width = '100%'; + $table->data = []; + $table->head = []; + $table->head[0] = __('Name'); + $table->head[1] = __('Group'); + $table->head[2] = __('OS'); + $table->head[3] = __('Last contact'); + $table->head['count_modules'] = __('Modules'); - if (empty($id_groups_str)) { - // Restrictive filter on error. This will filter all the downtimes. - $id_groups_str = '-1'; + if (!$running) { + $table->head[5] = __('Actions'); + $table->align[5] = 'center'; + $table->size[5] = '5%'; } - $filter_cond = ''; - if ($filter_group > 0) { - if ($recursion) { - $rg = groups_get_children_ids($filter_group, true); - $filter_cond .= ' AND id_grupo IN ('; + foreach ($downtimes_agents as $downtime_agent) { + $data = []; - $i = 0; - $len = count($rg); + $alias = db_get_value( + 'alias', + 'tagente', + 'id_agente', + $downtime_agent['id_agente'] + ); + $data[0] = $alias; - foreach ($rg as $key) { - if ($i == ($len - 1)) { - $filter_cond .= $key.')'; - } else { - $i++; - $filter_cond .= $key.','; - } - } + $data[1] = db_get_sql( + 'SELECT nombre + FROM tgrupo + WHERE id_grupo = '.$downtime_agent['id_grupo'] + ); + + $data[2] = ui_print_os_icon($downtime_agent['id_os'], true, true); + + $data[3] = $downtime_agent['ultimo_contacto']; + + if ($type_downtime == 'disable_agents_alerts') { + $data['count_modules'] = __('All alerts'); + } else if ($type_downtime == 'disable_agents') { + $data['count_modules'] = __('Entire agent'); } else { - $filter_cond = " AND id_grupo = $filter_group "; + if ($downtime_agent['all_modules']) { + $data['count_modules'] = __('All modules'); + } else { + $data['count_modules'] = __('Some modules'); + } } - } - - $agents = get_planned_downtime_agents_list($id_downtime, $filter_cond, $id_groups_str); - - $disabled_add_button = false; - if (empty($agents) || $disabled_in_execution) { - $disabled_add_button = true; - } - - echo "<form method=post action='index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&id_downtime=$id_downtime'>"; - html_print_select_groups(false, $access, true, 'filter_group', $filter_group, '', '', '', false, false, true, '', false, 'min-width:180px;margin-right:15px;'); - - html_print_checkbox('recursion', 1, $recursion, false, false, ''); - echo __('Recursion').' '; - echo '<br /><br />'; - html_print_submit_button(__('Filter by group'), '', false, 'class="sub next"', false); - echo '</form>'; - // Show available agents to include into downtime - echo '<h4>'.__('Available agents').':</h4>'; - echo "<form method=post action='index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&insert_downtime_agent=1&id_downtime=$id_downtime'>"; - html_print_input_hidden('all_agents', implode(',', array_keys($agents))); - echo html_print_select($agents, 'id_agents[]', -1, '', _('Any'), -2, false, true, true, '', false, 'width: 180px;'); - - if ($type_downtime != 'quiet') { - echo '<div id="available_modules_selection_mode" style="padding-top:20px;display: none;">'; - } else { - echo '<div id="available_modules_selection_mode" style="padding-top:20px">'; - } - - html_print_input_hidden('all_common_modules', ''); - echo html_print_select( - [ - 'common' => __('Show common modules'), - 'all' => __('Show all modules'), - ], - 'modules_selection_mode', - 'common', - false, - '', - '', - true, - false, - true, - '', - false, - 'min-width:180px;' - ); - echo '</div>'; - - echo '<h4>'.__('Available modules:').ui_print_help_tip( - __('Only for type Quiet for downtimes.'), - true - ).'</h4>'; - - if ($type_downtime != 'quiet') { - echo '<div id="available_modules" style="display: none;">'; - } else { - echo '<div id="available_modules" style="">'; - } - - echo html_print_select( - [], - 'module[]', - '', - '', - '', - 0, - false, - true, - true, - '', - false, - 'width: 180px;' - ); - echo '</div>'; - echo '<br /><br /><br />'; - html_print_submit_button( - __('Add'), - 'add_item', - $disabled_add_button, - 'class="sub next"', - false - ); - echo '</form>'; - echo '</table>'; - - // Start Overview of existing planned downtime. - echo '<h4>'.__('Agents planned for this downtime').':</h4>'; - - // User the $id_groups_str built before. - $sql = sprintf( - 'SELECT ta.nombre, tpda.id, - ta.id_os, ta.id_agente, ta.id_grupo, - ta.ultimo_contacto, tpda.all_modules - FROM tagente ta - INNER JOIN tplanned_downtime_agents tpda - ON ta.id_agente = tpda.id_agent - AND tpda.id_downtime = %d - WHERE ta.id_grupo IN (%s)', - $id_downtime, - $id_groups_str - ); - $downtimes_agents = db_get_all_rows_sql($sql); - - if (empty($downtimes_agents)) { - echo '<div class="nf">'.__('There are no agents').'</div>'; - } else { - $table = new stdClass(); - $table->id = 'list'; - $table->class = 'databox data'; - $table->width = '100%'; - $table->data = []; - $table->head = []; - $table->head[0] = __('Name'); - $table->head[1] = __('Group'); - $table->head[2] = __('OS'); - $table->head[3] = __('Last contact'); - $table->head['count_modules'] = __('Modules'); if (!$running) { - $table->head[5] = __('Actions'); - $table->align[5] = 'center'; - $table->size[5] = '5%'; - } - - foreach ($downtimes_agents as $downtime_agent) { - $data = []; - - $alias = db_get_value( - 'alias', - 'tagente', - 'id_agente', - $downtime_agent['id_agente'] - ); - $data[0] = $alias; - - $data[1] = db_get_sql( - 'SELECT nombre - FROM tgrupo - WHERE id_grupo = '.$downtime_agent['id_grupo'] - ); - - $data[2] = ui_print_os_icon($downtime_agent['id_os'], true, true); - - $data[3] = $downtime_agent['ultimo_contacto']; - - if ($type_downtime == 'disable_agents_alerts') { - $data['count_modules'] = __('All alerts'); - } else if ($type_downtime == 'disable_agents') { - $data['count_modules'] = __('Entire agent'); - } else { - if ($downtime_agent['all_modules']) { - $data['count_modules'] = __('All modules'); - } else { - $data['count_modules'] = __('Some modules'); - } + $data[5] = ''; + if ($type_downtime != 'disable_agents_alerts' + && $type_downtime != 'disable_agents' + ) { + $data[5] = '<a href="javascript:show_editor_module('.$downtime_agent['id_agente'].');">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Delete')]).'</a>'; } - if (!$running) { - $data[5] = ''; - if ($type_downtime != 'disable_agents_alerts' - && $type_downtime != 'disable_agents' - ) { - $data[5] = '<a href="javascript:show_editor_module('.$downtime_agent['id_agente'].');">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Delete')]).'</a>'; - } - - $data[5] .= '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&id_agent='.$downtime_agent['id_agente'].'&delete_downtime_agent=1&id_downtime_agent='.$downtime_agent['id'].'&id_downtime='.$id_downtime.'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete')]).'</a>'; - } - - $table->data['agent_'.$downtime_agent['id_agente']] = $data; + $data[5] .= '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&id_agent='.$downtime_agent['id_agente'].'&delete_downtime_agent=1&id_downtime_agent='.$downtime_agent['id'].'&id_downtime='.$id_downtime.'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete')]).'</a>'; } - html_print_table($table); + $table->data['agent_'.$downtime_agent['id_agente']] = $data; } + + html_print_table($table); } $table = new stdClass(); @@ -1125,20 +981,20 @@ $table->data['module'][1] = '<h4>'.__('Modules').'</h4>'; // List of modules, empty, it is populated by javascript. $table->data['module'][1] = " - <table cellspacing='4' cellpadding='4' border='0' width='100%' - id='modules_in_agent' class='databox_color'> - <thead> - <tr> - <th scope='col' class='header c0'>".__('Module')."</th> - <th scope='col' class='header c1'>".__('Action')."</th> - </tr> - </thead> - <tbody> - <tr class='datos' id='template' style='display: none;'> - <td class='name_module' style=''></td> - <td class='cell_delete_button' style='text-align: right; width:10%;' id=''>".'<a class="link_delete" - onclick="if(!confirm(\''.__('Are you sure?').'\')) return false;" - href="">'.html_print_image( + <table cellspacing='4' cellpadding='4' border='0' width='100%' + id='modules_in_agent' class='databox_color'> + <thead> + <tr> + <th scope='col' class='header c0'>".__('Module')."</th> + <th scope='col' class='header c1'>".__('Action')."</th> + </tr> + </thead> + <tbody> + <tr class='datos' id='template' style='display: none;'> + <td class='name_module' style=''></td> + <td class='cell_delete_button' style='text-align: right; width:10%;' id=''>".'<a class="link_delete" + onclick="if(!confirm(\''.__('Are you sure?').'\')) return false;" + href="">'.html_print_image( 'images/cross.png', true, [ @@ -1146,9 +1002,9 @@ $table->data['module'][1] = " 'alt' => __('Delete'), ] ).'</a>'."</td> - </tr> - <tr class='datos2' id='add_modules_row'> - <td class='datos2' style='' id=''>".__('Add Module:').' '.html_print_select( + </tr> + <tr class='datos2' id='add_modules_row'> + <td class='datos2' style='' id=''>".__('Add Module:').' '.html_print_select( [], 'modules', '', @@ -1157,16 +1013,16 @@ $table->data['module'][1] = " 0, true )."</td> - <td class='datos2 button_cell' style='text-align: right; width:10%;' id=''>".'<div id="add_button_div">'.'<a class="add_button" href="">'.html_print_image( + <td class='datos2 button_cell' style='text-align: right; width:10%;' id=''>".'<div id="add_button_div">'.'<a class="add_button" href="">'.html_print_image( 'images/add.png', true, [ 'border' => '0', - 'alt' => __('Add'), + 'alt' => __('Add444'), ] ).'</a>'.'</div>'."<div id='spinner_add' style='display: none;'>".html_print_image('images/spinner.gif', true).'</div>'.'</td> - </tr> - </tbody></table>'; + </tr> + </tbody></table>'; echo "<div style='display: none;'>"; html_print_table($table); @@ -1193,10 +1049,141 @@ echo '</div>'; ui_include_time_picker(); ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/'); +// Auxiliary function for downtime agent creation. +function insert_downtime_agent($id_downtime, $user_groups_ad) +{ + // Check AD permission on downtime. + $downtime_group = db_get_value( + 'id_group', + 'tplanned_downtime', + 'id', + $id_downtime + ); + + if ($downtime_group === false + || !in_array($downtime_group, $user_groups_ad) + ) { + db_pandora_audit( + 'ACL Violation', + 'Trying to access downtime scheduler' + ); + include 'general/noaccess.php'; + return; + } + + $agents = (array) get_parameter('id_agents'); + $module_names = (array) get_parameter('module'); + $modules_selection_mode = (string) get_parameter('modules_selection_mode'); + + $all_modules = ($modules_selection_mode === 'all' && (empty($module_names) || (string) $module_names[0] === '0')); + $all_common_modules = ($modules_selection_mode === 'common' && (empty($module_names) || (string) $module_names[0] === '0')); + + if ($all_common_modules === true) { + $module_names = explode(',', get_parameter('all_common_modules')); + } + + // 'Is running' check. + $is_running = (bool) db_get_value( + 'executed', + 'tplanned_downtime', + 'id', + $id_downtime + ); + if ($is_running) { + ui_print_error_message( + __('This elements cannot be modified while the downtime is being executed') + ); + } else { + // If is selected 'Any', get all the agents. + if (count($agents) === 1 && (int) $agents[0] === -2) { + $all_agents = get_parameter('all_agents'); + $agents = explode(',', $all_agents); + } + + foreach ($agents as $agent_id) { + // Check module belongs to the agent. + if ($modules_selection_mode == 'all' && $all_modules === false) { + $check = false; + foreach ($module_names as $module_name) { + $check_module = modules_get_agentmodule_id( + $module_name, + $agent_id + ); + if (!empty($check_module)) { + $check = true; + } + } + + if (!$check) { + continue; + } + } + + // Check AD permission on agent. + $agent_group = db_get_value( + 'id_grupo', + 'tagente', + 'id_agente', + $agent_id + ); + + if ($agent_group === false + || !in_array($agent_group, $user_groups_ad) + ) { + continue; + } + + $values = [ + 'id_downtime' => $id_downtime, + 'id_agent' => $agent_id, + 'all_modules' => $all_modules, + ]; + $result = db_process_sql_insert( + 'tplanned_downtime_agents', + $values + ); + + if ($result && !$all_modules) { + foreach ($module_names as $module_name) { + $module = modules_get_agentmodule_id( + $module_name, + $agent_id + ); + + if (empty($module)) { + continue; + } + + $values = [ + 'id_downtime' => $id_downtime, + 'id_agent' => $agent_id, + 'id_agent_module' => $module['id_agente_modulo'], + ]; + $result = db_process_sql_insert( + 'tplanned_downtime_modules', + $values + ); + + if ($result) { + $values = ['id_user' => $config['id_user']]; + $result = db_process_sql_update( + 'tplanned_downtime', + $values, + ['id' => $id_downtime] + ); + } + } + } + } + } +} + + ?> <script language="javascript" type="text/javascript"> var id_downtime = <?php echo $id_downtime; ?>; var action_in_progress = false; + var recursion = false; function change_type_downtime() { switch ($("#type_downtime").val()) { @@ -1509,5 +1496,43 @@ ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript } // Disable datepickers when it has readonly attribute $('input.hasDatepicker[readonly]').disable(); + + $("#checkbox-recursion").click(function() { + recursion = this.checked; + $("#filter_group").trigger("change"); + }); + + // Change agent selector based on group. + $("#filter_group").change(function() { + jQuery.post ("ajax.php", + {"page": "operation/agentes/ver_agente", + "get_agents_group_json": 1, + "id_group": this.value, + "privilege": "AW", + "keys_prefix": "_", + "recursion": recursion, + }, + function (data, status) { + $("#id_agents").empty(); + $("#module").html(''); + + option_any = $("<option></option>") + .attr ("value", -2) + .html ("Any"); + $("#id_agents").append (option_any); + + jQuery.each (data, function (id, value) { + // Remove keys_prefix from the index + id = id.substring(1); + + option = $("<option></option>") + .attr ("value", value["id_agente"]) + .html (value["alias"]); + $("#id_agents").append (option); + }); + }, + "json" + ); + }); }); </script> From f445ddc9eaa011ccdfcd8507991da1356e6f8994 Mon Sep 17 00:00:00 2001 From: Luis Calvo <luis.calvo@artica.es> Date: Fri, 5 Mar 2021 14:11:08 +0100 Subject: [PATCH 046/113] Fixed refresh auto hide on visual c --- pandora_console/operation/visual_console/view.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/operation/visual_console/view.php b/pandora_console/operation/visual_console/view.php index 7e39f2c856..169238db6b 100644 --- a/pandora_console/operation/visual_console/view.php +++ b/pandora_console/operation/visual_console/view.php @@ -422,6 +422,8 @@ ui_require_css_file('form'); var props = <?php echo (string) $visualConsole; ?>; var items = <?php echo '['.implode($visualConsoleItems, ',').']'; ?>; var baseUrl = "<?php echo ui_get_full_url('/', false, false, false); ?>"; + var controls = document.getElementById('vc-controls'); + autoHideElement(controls, 1000); var handleUpdate = function (prevProps, newProps) { if (!newProps) return; From f1dd0503336e8886ca910c81c090871cf19c1f4d Mon Sep 17 00:00:00 2001 From: Jose Gonzalez <jose.gonzalez@artica.es> Date: Tue, 9 Mar 2021 15:19:28 +0100 Subject: [PATCH 047/113] Solve deleted files --- .../extras/delete_files/delete_files.txt | 60 ++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt index 8964458b93..37acef8382 100644 --- a/pandora_console/extras/delete_files/delete_files.txt +++ b/pandora_console/extras/delete_files/delete_files.txt @@ -1,5 +1,6 @@ operation/servers/recon_view.php operation/users/webchat.php +operation/events/event_statistics.php include/javascript/webchat.js attachment/pandora_chat.log.json.txt attachment/pandora_chat.user_list.json.txt @@ -14,4 +15,61 @@ enterprise/godmode/reporting/cluster_view.php enterprise/include/ajax/clustermap.php enterprise/include/functions_clustermap.php enterprise/include/functions_clusters.php -enterprise/include/javascript/ClusterMapController.js \ No newline at end of file +enterprise/include/javascript/ClusterMapController.js +enterprise/extensions/ipam/ipam_supernet_network.php +enterprise/extensions/ipam/ipam_vlan_wizard.php +enterprise/extensions/ipam/sql +enterprise/extensions/ipam/sql/ipam_mr_1.sql +enterprise/extensions/ipam/sql/ipam_mr_2.sql +enterprise/extensions/ipam/sql/ipam.sql +enterprise/extensions/ipam/css +enterprise/extensions/ipam/css/ipam.css +enterprise/extensions/ipam/ipam_ajax.php +enterprise/extensions/ipam/ipam_vlan_network.php +enterprise/extensions/ipam/ipam_supernet_config.php +enterprise/extensions/ipam/ipam_list.php +enterprise/extensions/ipam/ipam_excel.php +enterprise/extensions/ipam/ipam_massive.php +enterprise/extensions/ipam/ipam_editor.php +enterprise/extensions/ipam/recon_script +enterprise/extensions/ipam/recon_script/readme +enterprise/extensions/ipam/ipam_network.php +enterprise/extensions/ipam/ipam_calculator.php +enterprise/extensions/ipam/ipam_vlan_config.php +enterprise/extensions/ipam/images +enterprise/extensions/ipam/images/red_host_agent.png +enterprise/extensions/ipam/images/lil_green_host_alert.png +enterprise/extensions/ipam/images/lil_red_host_alert.png +enterprise/extensions/ipam/images/lil_red_host_agent.png +enterprise/extensions/ipam/images/green_host_dotted.png +enterprise/extensions/ipam/images/red_host.png +enterprise/extensions/ipam/images/red_host_alert.png +enterprise/extensions/ipam/images/not_host.png +enterprise/extensions/ipam/images/lil_green_host_agent_alert.png +enterprise/extensions/ipam/images/ball_alive.png +enterprise/extensions/ipam/images/lil_green_host_agent.png +enterprise/extensions/ipam/images/ball_notalive.png +enterprise/extensions/ipam/images/green_host_agent_alert.png +enterprise/extensions/ipam/images/green_host_agent.png +enterprise/extensions/ipam/images/lil_red_host.png +enterprise/extensions/ipam/images/green_host_alert.png +enterprise/extensions/ipam/images/lil_not_host.png +enterprise/extensions/ipam/images/green_host.png +enterprise/extensions/ipam/images/lil_green_host.png +enterprise/extensions/ipam/images/lil_red_host_agent_alert.png +enterprise/extensions/ipam/images/lil_green_host_dotted.png +enterprise/extensions/ipam/images/red_host_agent_alert.png +enterprise/extensions/ipam/ipam_supernet_map.php +enterprise/extensions/ipam/include +enterprise/extensions/ipam/include/functions_ipam.php +enterprise/extensions/ipam/include/ajax +enterprise/extensions/ipam/include/ajax/ipam_ajax.php +enterprise/extensions/ipam/include/javascript +enterprise/extensions/ipam/include/javascript/ipam.js +enterprise/extensions/ipam/include/javascript/IpamMapController.js +enterprise/extensions/ipam/ipam_action.php +enterprise/extensions/ipam.php +enterprise/extensions/ipam +enterprise/extensions/disabled/visual_console_manager.php +enterprise/extensions/visual_console_manager.php +pandora_console/extensions/net_tools.php \ No newline at end of file From 5913313baeb9c5d9c89bdd7764b023fda2973208 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" <alejandro.campos@artica.es> Date: Wed, 10 Mar 2021 10:28:27 +0100 Subject: [PATCH 048/113] Increased number of possible custom fields for Integria action --- .../godmode/alerts/configure_alert_action.php | 56 +++++++------------ .../godmode/setup/setup_integria.php | 6 +- pandora_console/pandoradb.sql | 1 + pandora_server/lib/PandoraFMS/Core.pm | 38 +++++++++++-- pandora_server/util/pandora_db.pl | 4 +- 5 files changed, 60 insertions(+), 45 deletions(-) diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index f3dfc35250..3719e1100c 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -388,32 +388,23 @@ $(document).ready (function () { function ajax_get_integria_custom_fields(ticket_type_id, values, recovery_values) { var values = values || []; var recovery_values = recovery_values || []; + var max_macro_fields = <?php echo $config['max_macro_fields']; ?>; if (ticket_type_id === null || ticket_type_id === '' || (Array.isArray(values) && values.length === 0 && Array.isArray(recovery_values) && recovery_values.length === 0)) { - $('[name=field8_value\\[\\]').val(''); - $('[name=field9_value\\[\\]').val(''); - $('[name=field10_value\\[\\]').val(''); - $('[name=field8_recovery_value\\[\\]').val(''); - $('[name=field9_recovery_value\\[\\]').val(''); - $('[name=field10_recovery_value\\[\\]').val(''); + for (var i=8; i <= max_macro_fields; i++) { + $('[name=field'+i+'_value\\[\\]').val(''); + $('[name=field'+i+'_recovery_value\\[\\]').val(''); + } } // On ticket type change, hide all table rows and inputs corresponding to custom fields, regardless of what its type is. - $('[name=field8_value\\[\\]').hide(); - $('[name=field9_value\\[\\]').hide(); - $('[name=field10_value\\[\\]').hide(); - $('[name=field8_recovery_value\\[\\]').hide(); - $('[name=field9_recovery_value\\[\\]').hide(); - $('[name=field10_recovery_value\\[\\]').hide(); - $('#table_macros-field8').hide(); - $('#table_macros-field9').hide(); - $('#table_macros-field10').hide(); - $('[name=field8_value_container').hide(); - $('[name=field9_value_container').hide(); - $('[name=field10_value_container').hide(); - $('[name=field8_recovery_value_container').hide(); - $('[name=field9_recovery_value_container').hide(); - $('[name=field10_recovery_value_container').hide(); + for (var i=8; i <= max_macro_fields; i++) { + $('[name=field'+i+'_value\\[\\]').hide(); + $('[name=field'+i+'_recovery_value\\[\\]').hide(); + $('#table_macros-field'+i).hide(); + $('[name=field'+i+'_value_container').hide(); + $('[name=field'+i+'_recovery_value_container').hide(); + } jQuery.post( "ajax.php", @@ -689,23 +680,16 @@ $(document).ready (function () { // Ad-hoc solution for Integria IMS command: get Integia IMS Ticket custom fields only when this command is selected and we selected a ticket type to retrieve fields from. // Check command by name since it is unvariable in any case, unlike its ID. if ($("#id_command option:selected").text() === "Integria IMS Ticket") { + var max_macro_fields = <?php echo $config['max_macro_fields']; ?>; // At start hide all rows and inputs corresponding to custom fields, regardless of what its type is. - $('[name=field8_value\\[\\]').hide(); - $('[name=field9_value\\[\\]').hide(); - $('[name=field10_value\\[\\]').hide(); - $('[name=field8_recovery_value\\[\\]').hide(); - $('[name=field9_recovery_value\\[\\]').hide(); - $('[name=field10_recovery_value\\[\\]').hide(); - $('#table_macros-field8').hide(); - $('#table_macros-field9').hide(); - $('#table_macros-field10').hide(); - $('[name=field8_value_container').hide(); - $('[name=field9_value_container').hide(); - $('[name=field10_value_container').hide(); - $('[name=field8_recovery_value_container').hide(); - $('[name=field9_recovery_value_container').hide(); - $('[name=field10_recovery_value_container').hide(); + for (var i=8; i <= max_macro_fields; i++) { + $('[name=field'+i+'_value\\[\\]').hide(); + $('[name=field'+i+'_recovery_value\\[\\]').hide(); + $('#table_macros-field'+i).hide(); + $('[name=field'+i+'_value_container').hide(); + $('[name=field'+i+'_recovery_value_container').hide(); + } if ($('#field5_value').val() !== '') { ajax_get_integria_custom_fields($('#field5_value').val(), integria_custom_fields_values, integria_custom_fields_rvalues); diff --git a/pandora_console/godmode/setup/setup_integria.php b/pandora_console/godmode/setup/setup_integria.php index 4d649d3e3a..058ad0dc0a 100644 --- a/pandora_console/godmode/setup/setup_integria.php +++ b/pandora_console/godmode/setup/setup_integria.php @@ -105,8 +105,8 @@ if (get_parameter('update_config', 0) == 1) { 'command' => io_safe_input('Internal type'), 'internal' => 1, 'description' => io_safe_input('Create a ticket in Integria IMS'), - 'fields_descriptions' => '["'.io_safe_input('Ticket title').'","'.io_safe_input('Ticket group ID').'","'.io_safe_input('Ticket priority').'","'.io_safe_input('Ticket owner').'","'.io_safe_input('Ticket type').'","'.io_safe_input('Ticket status').'","'.io_safe_input('Ticket description').'","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_"]', - 'fields_values' => '["", "", "","","'.$types_string.'","","","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_"]', + 'fields_descriptions' => '["'.io_safe_input('Ticket title').'","'.io_safe_input('Ticket group ID').'","'.io_safe_input('Ticket priority').'","'.io_safe_input('Ticket owner').'","'.io_safe_input('Ticket type').'","'.io_safe_input('Ticket status').'","'.io_safe_input('Ticket description').'","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_"]', + 'fields_values' => '["", "", "","","'.$types_string.'","","","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_"]', ] ); @@ -136,7 +136,7 @@ if (get_parameter('update_config', 0) == 1) { $sql_update_command_values = sprintf( ' UPDATE talert_commands - SET fields_values = \'["","","","","%s","","","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_"]\' + SET fields_values = \'["","","","","%s","","","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_","_integria_type_custom_field_"]\' WHERE name="%s"', $types_string, io_safe_input('Integria IMS Ticket') diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 771b2e99fc..f704147e3a 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -441,6 +441,7 @@ CREATE TABLE IF NOT EXISTS `talert_actions` ( `field19_recovery` text NOT NULL, `field20_recovery` text NOT NULL, `previous_name` text, + `create_wu_integria` tinyint(1) default NULL, PRIMARY KEY (`id`), FOREIGN KEY (`id_alert_command`) REFERENCES talert_commands(`id`) ON DELETE CASCADE ON UPDATE CASCADE diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index ba5820ee9d..0fb017103b 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1586,6 +1586,16 @@ sub pandora_execute_action ($$$$$$$$$;$) { $field8 = subst_alert_macros ($field8, \%macros, $pa_config, $dbh, $agent, $module, $alert); $field9 = subst_alert_macros ($field9, \%macros, $pa_config, $dbh, $agent, $module, $alert); $field10 = subst_alert_macros ($field10, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field11 = subst_alert_macros ($field11, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field12 = subst_alert_macros ($field12, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field13 = subst_alert_macros ($field13, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field14 = subst_alert_macros ($field14, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field15 = subst_alert_macros ($field15, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field16 = subst_alert_macros ($field16, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field17 = subst_alert_macros ($field17, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field18 = subst_alert_macros ($field18, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field19 = subst_alert_macros ($field19, \%macros, $pa_config, $dbh, $agent, $module, $alert); + $field20 = subst_alert_macros ($field20, \%macros, $pa_config, $dbh, $agent, $module, $alert); # Field 1 (Integria IMS API path) my $api_path = $config_api_path . "/integria/include/api.php"; @@ -1648,8 +1658,18 @@ sub pandora_execute_action ($$$$$$$$$;$) { my $ticket_custom_field1 = $field8; my $ticket_custom_field2 = $field9; my $ticket_custom_field3 = $field10; + my $ticket_custom_field4 = $field11; + my $ticket_custom_field5 = $field12; + my $ticket_custom_field6 = $field13; + my $ticket_custom_field7 = $field14; + my $ticket_custom_field8 = $field15; + my $ticket_custom_field9 = $field16; + my $ticket_custom_field10 = $field17; + my $ticket_custom_field11 = $field18; + my $ticket_custom_field12 = $field19; + my $ticket_custom_field13 = $field20; - pandora_create_integria_ticket($pa_config, $api_path, $api_pass, $integria_user, $integria_user_pass, $agent->{'nombre'}, $agent->{'alias'}, $agent->{'id_os'}, $agent->{'direccion'}, $agent->{'id_agente'}, $agent->{'id_grupo'}, $ticket_name, $ticket_group_id, $ticket_priority, $ticket_owner, $ticket_type, $ticket_status, $ticket_description, $create_wu_on_close_recovery, $ticket_custom_field1, $ticket_custom_field2, $ticket_custom_field3); + pandora_create_integria_ticket($pa_config, $api_path, $api_pass, $integria_user, $integria_user_pass, $agent->{'nombre'}, $agent->{'alias'}, $agent->{'id_os'}, $agent->{'direccion'}, $agent->{'id_agente'}, $agent->{'id_grupo'}, $ticket_name, $ticket_group_id, $ticket_priority, $ticket_owner, $ticket_type, $ticket_status, $ticket_description, $create_wu_on_close_recovery, $ticket_custom_field1, $ticket_custom_field2, $ticket_custom_field3, $ticket_custom_field4, $ticket_custom_field5, $ticket_custom_field6, $ticket_custom_field7, $ticket_custom_field8, $ticket_custom_field9, $ticket_custom_field10, $ticket_custom_field11, $ticket_custom_field12, $ticket_custom_field13); # Generate notification } elsif ($clean_name eq "Generate Notification") { @@ -6214,8 +6234,8 @@ sub pandora_edit_custom_graph ($$$$$$$$$$$) { return $res; } -sub pandora_create_integria_ticket ($$$$$$$$$$$$$$$$$$$$$$) { - my ($pa_config,$api_path,$api_pass,$integria_user,$user_pass,$agent_name,$agent_alias,$agent_os,$agent_addr,$agent_id,$agent_group,$ticket_name,$ticket_group_id,$ticket_priority,$ticket_owner,$ticket_type,$ticket_status,$ticket_description, $create_wu_on_close_recovery, $ticket_custom_field1, $ticket_custom_field2, $ticket_custom_field3) = @_; +sub pandora_create_integria_ticket ($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$) { + my ($pa_config,$api_path,$api_pass,$integria_user,$user_pass,$agent_name,$agent_alias,$agent_os,$agent_addr,$agent_id,$agent_group,$ticket_name,$ticket_group_id,$ticket_priority,$ticket_owner,$ticket_type,$ticket_status,$ticket_description, $create_wu_on_close_recovery, $ticket_custom_field1, $ticket_custom_field2, $ticket_custom_field3, $ticket_custom_field4, $ticket_custom_field5, $ticket_custom_field6, $ticket_custom_field7, $ticket_custom_field8, $ticket_custom_field9, $ticket_custom_field10, $ticket_custom_field11, $ticket_custom_field12, $ticket_custom_field13) = @_; use URI::URL; use URI::Escape; @@ -6252,7 +6272,17 @@ sub pandora_create_integria_ticket ($$$$$$$$$$$$$$$$$$$$$$) { "|;|" . $ticket_create_wu . "|;|" . $ticket_custom_field1 . "|;|" . $ticket_custom_field2 . - "|;|" . $ticket_custom_field3; + "|;|" . $ticket_custom_field3 . + "|;|" . $ticket_custom_field4 . + "|;|" . $ticket_custom_field5 . + "|;|" . $ticket_custom_field6 . + "|;|" . $ticket_custom_field7 . + "|;|" . $ticket_custom_field8 . + "|;|" . $ticket_custom_field9 . + "|;|" . $ticket_custom_field10 . + "|;|" . $ticket_custom_field11 . + "|;|" . $ticket_custom_field12 . + "|;|" . $ticket_custom_field13; $call_api = $api_path . '?' . 'user=' . $integria_user . '&' . diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 4b58381ce9..6d248d9320 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -1115,8 +1115,8 @@ if (scalar(@types) != 0) { $query_string .= $type->{'id'} . ',' . $type->{'name'} . ';'; } - db_do($dbh, "UPDATE talert_commands SET fields_descriptions='[\"Ticket title\",\"Ticket group ID\",\"Ticket priority\",\"Ticket owner\",\"Ticket type\",\"Ticket status\",\"Ticket description\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\"]' WHERE name=\"Integria IMS Ticket\""); - db_do($dbh, "UPDATE talert_commands SET fields_values='[\"\", \"\", \"\",\"\",\"" . $query_string . "\",\"\",\"\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\", \"_integria_type_custom_field_\"]' WHERE name=\"Integria IMS Ticket\""); + db_do($dbh, "UPDATE talert_commands SET fields_descriptions='[\"Ticket title\",\"Ticket group ID\",\"Ticket priority\",\"Ticket owner\",\"Ticket type\",\"Ticket status\",\"Ticket description\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\"]' WHERE name=\"Integria IMS Ticket\""); + db_do($dbh, "UPDATE talert_commands SET fields_values='[\"\", \"\", \"\",\"\",\"" . $query_string . "\",\"\",\"\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\",\"_integria_type_custom_field_\"]' WHERE name=\"Integria IMS Ticket\""); } # Release the lock From 5c3b5d2be04ceb36054569ab97a0050c42cf1225 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" <alejandro.campos@artica.es> Date: Wed, 10 Mar 2021 13:02:17 +0100 Subject: [PATCH 049/113] minor fixes in scheduled downtime setup --- .../godmode/agentes/planned_downtime.editor.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php index e9d2720508..0c2d06993e 100644 --- a/pandora_console/godmode/agentes/planned_downtime.editor.php +++ b/pandora_console/godmode/agentes/planned_downtime.editor.php @@ -382,9 +382,7 @@ if ($create_downtime || $update_downtime) { } if ($is_running) { - ui_print_error_message( - __('Cannot be modified while the downtime is being executed') - ); + $result = false; } else { if (!empty($values)) { $result = db_process_sql_update( @@ -1444,6 +1442,8 @@ function insert_downtime_agent($id_downtime, $user_groups_ad) } $(document).ready (function () { + populate_agents_selector(); + $("#id_agents").change(agent_changed_by_multiple_agents); $("#modules_selection_mode").change(agent_changed_by_multiple_agents); @@ -1504,10 +1504,14 @@ function insert_downtime_agent($id_downtime, $user_groups_ad) // Change agent selector based on group. $("#filter_group").change(function() { + populate_agents_selector(); + }); + + function populate_agents_selector() { jQuery.post ("ajax.php", {"page": "operation/agentes/ver_agente", "get_agents_group_json": 1, - "id_group": this.value, + "id_group": $("#filter_group").val(), "privilege": "AW", "keys_prefix": "_", "recursion": recursion, @@ -1533,6 +1537,6 @@ function insert_downtime_agent($id_downtime, $user_groups_ad) }, "json" ); - }); + } }); </script> From 2d4577b23b9b7e3d909c55175490308fe06e0cc4 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez <jose.gonzalez@artica.es> Date: Wed, 10 Mar 2021 13:58:56 +0100 Subject: [PATCH 050/113] Cleaned -v and -q options --- pandora_server/lib/PandoraFMS/Config.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index ea378b623e..71f2c70ce1 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -44,8 +44,8 @@ our @EXPORT = qw( ); # version: Defines actual version of Pandora Server for this module only -my $pandora_version = "7.0NG.751"; -my $pandora_build = "210120"; +my $pandora_version = "7.0NG.752"; +my $pandora_build = "210310"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash @@ -827,7 +827,7 @@ sub pandora_load_config { } elsif ($parametro =~ m/^verbosity\s+([0-9]*)/i) { if ($pa_config->{"verbosity"} == 0) { - $pa_config->{"verbosity"} = clean_blank($1); + $pa_config->{"verbosity"} = clean_blank($1); } } elsif ($parametro =~ m/^server_threshold\s+([0-9]*)/i) { From d86bfa8e7a7b93f7d7622a69cde057f3a7f6a32d Mon Sep 17 00:00:00 2001 From: Jose Gonzalez <jose.gonzalez@artica.es> Date: Wed, 10 Mar 2021 14:00:29 +0100 Subject: [PATCH 051/113] Updated --- pandora_server/lib/PandoraFMS/Config.pm | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 71f2c70ce1..cd8407115a 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -60,11 +60,9 @@ my %pa_config; sub help_screen { print "\nSyntax: \n\n pandora_server [ options ] < fullpathname to configuration file > \n\n"; print "Following options are optional : \n"; - print " -v : Verbose mode activated. Writes more information in the logfile \n"; print " -d : Debug mode activated. Writes extensive information in the logfile \n"; print " -D : Daemon mode (runs in background)\n"; print " -P <file> : Store PID to file.\n"; - print " -q : Quiet startup \n"; print " -S <install|uninstall|run>: Manage the win32 service.\n"; print " -h : This screen. Shows a little help screen \n"; print " \n"; @@ -103,18 +101,12 @@ sub pandora_init { if (($parametro =~ m/-h\z/i ) || ($parametro =~ m/help\z/i )) { help_screen(); } - elsif ($parametro =~ m/-v\z/i) { - $pa_config->{"verbosity"}=5; - } elsif ($parametro =~ m/^-P\z/i) { $pa_config->{'PID'}= clean_blank($ARGV[$ax+1]); } elsif ($parametro =~ m/-d\z/) { $pa_config->{"verbosity"}=10; } - elsif ($parametro =~ m/-q\z/) { - $pa_config->{"quiet"}=1; - } elsif ($parametro =~ m/-D\z/) { $pa_config->{"daemon"}=1; } @@ -827,7 +819,7 @@ sub pandora_load_config { } elsif ($parametro =~ m/^verbosity\s+([0-9]*)/i) { if ($pa_config->{"verbosity"} == 0) { - $pa_config->{"verbosity"} = clean_blank($1); + $pa_config->{"verbosity"} = clean_blank($1); } } elsif ($parametro =~ m/^server_threshold\s+([0-9]*)/i) { From 92d654763fc27aca6cc6154fe59112e870a3897c Mon Sep 17 00:00:00 2001 From: Jose Gonzalez <jose.gonzalez@artica.es> Date: Wed, 10 Mar 2021 16:20:45 +0100 Subject: [PATCH 052/113] Fixed some issues --- .../godmode/setup/setup_general.php | 111 ---------- .../godmode/setup/setup_visuals.php | 10 - .../include/class/ExternalTools.class.php | 189 +++++++++++++++--- 3 files changed, 163 insertions(+), 147 deletions(-) diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index 9c9e5baad2..e897506b3b 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -27,32 +27,6 @@ */ // File begin. - - -/** - * Return sounds path. - * - * @return string Path. - */ -function get_sounds() -{ - global $config; - - $return = []; - - $files = scandir($config['homedir'].'/include/sounds'); - - foreach ($files as $file) { - if (strstr($file, 'wav') !== false) { - $return['include/sounds/'.$file] = $file; - } - } - - return $return; -} - - -// Begin. global $config; @@ -345,73 +319,6 @@ $table->data[$i++][1] .= '  '.html_print_select( true ); -$sounds = get_sounds(); -$table->data[$i][0] = __('Sound for Alert fired'); -$table->data[$i][1] = html_print_select( - $sounds, - 'sound_alert', - $config['sound_alert'], - 'replaySound(\'alert\');', - '', - '', - true -); -$table->data[$i][1] .= ' <a href="javascript: toggleButton(\'alert\');">'.html_print_image( - 'images/control_play_col.png', - true, - [ - 'id' => 'button_sound_alert', - 'style' => 'vertical-align: middle;', - 'width' => '16', - 'title' => __('Play sound'), - ] -).'</a>'; -$table->data[$i++][1] .= '<div id="layer_sound_alert"></div>'; - -$table->data[$i][0] = __('Sound for Monitor critical'); -$table->data[$i][1] = html_print_select( - $sounds, - 'sound_critical', - $config['sound_critical'], - 'replaySound(\'critical\');', - '', - '', - true -); -$table->data[$i][1] .= ' <a href="javascript: toggleButton(\'critical\');">'.html_print_image( - 'images/control_play_col.png', - true, - [ - 'id' => 'button_sound_critical', - 'style' => 'vertical-align: middle;', - 'width' => '16', - 'title' => __('Play sound'), - ] -).'</a>'; -$table->data[$i++][1] .= '<div id="layer_sound_critical"></div>'; - -$table->data[$i][0] = __('Sound for Monitor warning'); -$table->data[$i][1] = html_print_select( - $sounds, - 'sound_warning', - $config['sound_warning'], - 'replaySound(\'warning\');', - '', - '', - true -); -$table->data[$i][1] .= ' <a href="javascript: toggleButton(\'warning\');">'.html_print_image( - 'images/control_play_col.png', - true, - [ - 'id' => 'button_sound_warning', - 'style' => 'vertical-align: middle;', - 'width' => '16', - 'title' => __('Play sound'), - ] -).'</a>'; -$table->data[$i++][1] .= '<div id="layer_sound_warning"></div>'; - $table->data[$i][0] = __('Public URL'); $table->data[$i++][1] = html_print_input_text( 'public_url', @@ -767,24 +674,6 @@ echo '<legend>'.__('Mail configuration').'</legend>'; ?> <script type="text/javascript"> -function toggleButton(type) { - if ($("#button_sound_" + type).attr('src') == 'images/control_pause_col.png') { - $("#button_sound_" + type).attr('src', 'images/control_play_col.png'); - $('#layer_sound_' + type).html(""); - } - else { - $("#button_sound_" + type).attr('src', 'images/control_pause_col.png'); - $('#layer_sound_' + type).html("<audio src='" + $("#sound_" + type).val() + "' autoplay='true' hidden='true' loop='true'>"); - } -} - -function replaySound(type) { - if ($("#button_sound_" + type).attr('src') == 'images/control_pause_col.png') { - $('#layer_sound_' + type).html(""); - $('#layer_sound_' + type).html("<audio src='" + $("#sound_" + type).val() + "' autoplay='true' hidden='true' loop='true'>"); - } -} - function show_timezone () { zone = $("#zone").val(); $.ajax({ diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index fdd49d1e1c..9067755c1f 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -1301,16 +1301,6 @@ $row++; $table_other->size[3] = '12%'; $table_other->data = []; - $table_other->data[$row][0] = __('Custom graphviz directory'); - $table_other->data[$row][1] = html_print_input_text( - 'graphviz_bin_dir', - $config['graphviz_bin_dir'], - '', - 25, - 255, - true - ); - $row++; $table_other->data[$row][0] = __('Networkmap max width'); diff --git a/pandora_console/include/class/ExternalTools.class.php b/pandora_console/include/class/ExternalTools.class.php index 675b6341d1..23232aed10 100644 --- a/pandora_console/include/class/ExternalTools.class.php +++ b/pandora_console/include/class/ExternalTools.class.php @@ -138,6 +138,9 @@ class ExternalTools extends HTML { global $config; + $i = 0; + $sounds = $this->get_sounds(); + if ($this->updatePaths === true) { $external_tools_config = []; $external_tools_config['traceroute_path'] = $this->pathTraceroute; @@ -181,30 +184,123 @@ class ExternalTools extends HTML $table->data = []; - $table->data[0][0] = __('Traceroute path'); - $table->data[0][1] = html_print_input_text('traceroute_path', $this->pathTraceroute, '', 40, 255, true); + $table->data[$i][0] = __('Sound for Alert fired'); + $table->data[$i][1] = html_print_select( + $sounds, + 'sound_alert', + $config['sound_alert'], + 'replaySound(\'alert\');', + '', + '', + true + ); + $table->data[$i][1] .= html_print_anchor( + [ + 'href' => 'javascript:toggleButton(\'alert\')', + 'content' => html_print_image( + 'images/control_play_col.png', + true, + [ + 'id' => 'button_sound_warning', + 'style' => 'vertical-align: middle;', + 'width' => '16', + 'title' => __('Play sound'), + ] + ), + ], + true + ); + $table->data[$i++][1] .= '<div id="layer_sound_alert"></div>'; - $table->data[1][0] = __('Ping path'); - $table->data[1][1] = html_print_input_text('ping_path', $this->pathPing, '', 40, 255, true); + $table->data[$i][0] = __('Sound for Monitor critical'); + $table->data[$i][1] = html_print_select( + $sounds, + 'sound_critical', + $config['sound_critical'], + 'replaySound(\'critical\');', + '', + '', + true + ); + $table->data[$i][1] .= html_print_anchor( + [ + 'href' => 'javascript:toggleButton(\'critical\')', + 'content' => html_print_image( + 'images/control_play_col.png', + true, + [ + 'id' => 'button_sound_warning', + 'style' => 'vertical-align: middle;', + 'width' => '16', + 'title' => __('Play sound'), + ] + ), + ], + true + ); + $table->data[$i++][1] .= '<div id="layer_sound_critical"></div>'; - $table->data[2][0] = __('Nmap path'); - $table->data[2][1] = html_print_input_text('nmap_path', $this->pathNmap, '', 40, 255, true); + $table->data[$i][0] = __('Sound for Monitor warning'); + $table->data[$i][1] = html_print_select( + $sounds, + 'sound_warning', + $config['sound_warning'], + 'replaySound(\'warning\');', + '', + '', + true + ); + $table->data[$i][1] .= html_print_anchor( + [ + 'href' => 'javascript:toggleButton(\'warning\')', + 'content' => html_print_image( + 'images/control_play_col.png', + true, + [ + 'id' => 'button_sound_warning', + 'style' => 'vertical-align: middle;', + 'width' => '16', + 'title' => __('Play sound'), + ] + ), + ], + true + ); + $table->data[$i++][1] .= '<div id="layer_sound_warning"></div>'; - $table->data[3][0] = __('Dig path'); - $table->data[3][1] = html_print_input_text('dig_path', $this->pathDig, '', 40, 255, true); + $table->data[$i][0] = __('Custom graphviz directory'); + $table->data[$i++][1] = html_print_input_text( + 'graphviz_bin_dir', + $config['graphviz_bin_dir'], + '', + 25, + 255, + true + ); - $table->data[4][0] = __('Snmpget path'); - $table->data[4][1] = html_print_input_text('snmpget_path', $this->pathSnmpget, '', 40, 255, true); + $table->data[$i][0] = __('Traceroute path'); + $table->data[$i++][1] = html_print_input_text('traceroute_path', $this->pathTraceroute, '', 40, 255, true); - $table->data[5][0] = html_print_div( + $table->data[$i][0] = __('Ping path'); + $table->data[$i++][1] = html_print_input_text('ping_path', $this->pathPing, '', 40, 255, true); + + $table->data[$i][0] = __('Nmap path'); + $table->data[$i++][1] = html_print_input_text('nmap_path', $this->pathNmap, '', 40, 255, true); + + $table->data[$i][0] = __('Dig path'); + $table->data[$i++][1] = html_print_input_text('dig_path', $this->pathDig, '', 40, 255, true); + + $table->data[$i][0] = __('Snmpget path'); + $table->data[$i++][1] = html_print_input_text('snmpget_path', $this->pathSnmpget, '', 40, 255, true); + + $table->data[$i][0] = html_print_div( [ 'class' => 'title_custom_commands bolder float-left', 'content' => __('Custom commands'), ], true ); - - $table->data[5][0] .= html_print_div( + $table->data[$i++][0] .= html_print_div( [ 'id' => 'add_button_custom_command', 'content' => html_print_image( @@ -220,30 +316,30 @@ class ExternalTools extends HTML true ); - $table->data[6][0] = __('Command'); - $table->data[6][1] = __('Parameters').ui_print_help_tip(__('Adding `_address_` macro will use agent\'s IP when perform the execution'), true); + $table->data[$i][0] = __('Command'); + $table->data[$i++][1] = __('Parameters').ui_print_help_tip(__('Adding `_address_` macro will use agent\'s IP when perform the execution'), true); - $i = 1; - $iRow = 7; + $y = 1; + $iRow = $i; if (empty($this->pathCustomComm) === true) { - $table->rowid[$iRow] = 'custom_row_'.$i; + $table->rowid[$iRow] = 'custom_row_'.$y; - $table->data[$iRow][0] = $this->customCommandPair('command', $i); - $table->data[$iRow][1] = $this->customCommandPair('params', $i); - $table->data[$iRow][2] = $this->customCommandPair('delete', $i); + $table->data[$iRow][0] = $this->customCommandPair('command', $y); + $table->data[$iRow][1] = $this->customCommandPair('params', $y); + $table->data[$iRow][2] = $this->customCommandPair('delete', $y); } else { foreach ($this->pathCustomComm as $command) { // Fill the fields. $customCommand = ($command['command_custom'] ?? ''); $customParams = ($command['params_custom'] ?? ''); // Attach the fields. - $table->rowid[$iRow] = 'custom_row_'.$i; - $table->data[$iRow][0] = $this->customCommandPair('command', $i, $customCommand); - $table->data[$iRow][1] = $this->customCommandPair('params', $i, $customParams); - $table->data[$iRow][2] = $this->customCommandPair('delete', $i); + $table->rowid[$iRow] = 'custom_row_'.$y; + $table->data[$iRow][0] = $this->customCommandPair('command', $y, $customCommand); + $table->data[$iRow][1] = $this->customCommandPair('params', $y, $customParams); + $table->data[$iRow][2] = $this->customCommandPair('delete', $y); // Add another command. - $i++; + $y++; $iRow++; } } @@ -771,6 +867,29 @@ class ExternalTools extends HTML } + /** + * Return sounds path. + * + * @return string Path. + */ + private function get_sounds() + { + global $config; + + $return = []; + + $files = scandir($config['homedir'].'/include/sounds'); + + foreach ($files as $file) { + if (strstr($file, 'wav') !== false) { + $return['include/sounds/'.$file] = $file; + } + } + + return $return; + } + + /** * Load the JS and attach * @@ -859,6 +978,24 @@ class ExternalTools extends HTML $('.snmpcolumn').hide(); } } + + function toggleButton(type) { + if ($("#button_sound_" + type).attr('src') == 'images/control_pause_col.png') { + $("#button_sound_" + type).attr('src', 'images/control_play_col.png'); + $('#layer_sound_' + type).html(""); + } + else { + $("#button_sound_" + type).attr('src', 'images/control_pause_col.png'); + $('#layer_sound_' + type).html("<audio src='" + $("#sound_" + type).val() + "' autoplay='true' hidden='true' loop='true'>"); + } + } + + function replaySound(type) { + if ($("#button_sound_" + type).attr('src') == 'images/control_pause_col.png') { + $('#layer_sound_' + type).html(""); + $('#layer_sound_' + type).html("<audio src='" + $("#sound_" + type).val() + "' autoplay='true' hidden='true' loop='true'>"); + } + } </script> <?php // Get the JS script. From cf1c460a9d5d00c277319f5e7fc960e7469837bd Mon Sep 17 00:00:00 2001 From: Jose Gonzalez <jose.gonzalez@artica.es> Date: Thu, 11 Mar 2021 09:12:53 +0100 Subject: [PATCH 053/113] Fixed all issues --- .../include/class/ExternalTools.class.php | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/class/ExternalTools.class.php b/pandora_console/include/class/ExternalTools.class.php index 23232aed10..403cd72fa6 100644 --- a/pandora_console/include/class/ExternalTools.class.php +++ b/pandora_console/include/class/ExternalTools.class.php @@ -149,19 +149,35 @@ class ExternalTools extends HTML $external_tools_config['dig_path'] = $this->pathDig; $external_tools_config['snmpget_path'] = $this->pathSnmpget; + $otherParameters = []; + $otherParameters['sound_alert'] = (string) get_parameter('sound_alert'); + $otherParameters['sound_critical'] = (string) get_parameter('sound_critical'); + $otherParameters['sound_warning'] = (string) get_parameter('sound_warning'); + $otherParameters['graphviz_bin_dir'] = (string) get_parameter('graphviz_bin_dir'); + if (empty($this->pathCustomComm) === false) { $external_tools_config['custom_commands'] = $this->pathCustomComm; } - $result = config_update_value( - 'external_tools_config', - json_encode($external_tools_config) - ); + foreach ($otherParameters as $keyParam => $valueParam) { + $result = config_update_value($keyParam, $valueParam); + + if ($result === false) { + break; + } + } + + if ($result === true) { + $result = config_update_value( + 'external_tools_config', + json_encode($external_tools_config) + ); + } ui_print_result_message( - $result, - __('Set the paths.'), - __('Set the paths.') + ($result), + __('Changes successfully saved.'), + __('Changes not saved.') ); } else { if (isset($config['external_tools_config']) === true) { From ba997dd13fb372865b5483d500be5f8f0ba88c38 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez <jose.gonzalez@artica.es> Date: Thu, 11 Mar 2021 14:49:39 +0100 Subject: [PATCH 054/113] Fixed --- pandora_console/general/register.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_console/general/register.php b/pandora_console/general/register.php index 9147a0e016..c01f8bc445 100644 --- a/pandora_console/general/register.php +++ b/pandora_console/general/register.php @@ -257,7 +257,11 @@ if (!$double_auth_enabled && $config['2FA_all_users'] != '' //document.location.reload(); } }) - .show(); </script> + .show(); + // Don't allow close the dialog with X button + $('.ui-dialog-titlebar-close').css('display', 'none'); + + </script> <?php echo '</div>'; } From 54fc2e89d3d387489510fab9787e24034bf78c64 Mon Sep 17 00:00:00 2001 From: daniel <daniel.barbero@artica.es> Date: Thu, 11 Mar 2021 14:22:28 +0000 Subject: [PATCH 055/113] new report histogram --- .../reporting_builder.item_editor.php | 23 +++++++++++++++---- .../godmode/reporting/reporting_builder.php | 2 ++ .../include/functions_reporting.php | 3 ++- .../include/functions_reporting_html.php | 19 +++++++++++++++ pandora_console/include/functions_reports.php | 4 ++++ 5 files changed, 46 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index e90acee5cb..53d60df9fe 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -343,6 +343,7 @@ switch ($action) { $failover_type = $item['failover_type']; break; + case 'histogram_data': case 'module_histogram_graph': $description = $item['description']; $period = $item['period']; @@ -550,9 +551,18 @@ switch ($action) { $show_summary_group = $style['show_summary_group']; - $filter_event_severity = json_decode($style['filter_event_severity'], true); - $filter_event_status = json_decode($style['filter_event_status'], true); - $filter_event_type = json_decode($style['filter_event_type'], true); + $filter_event_severity = json_decode( + $style['filter_event_severity'], + true + ); + $filter_event_status = json_decode( + $style['filter_event_status'], + true + ); + $filter_event_type = json_decode( + $style['filter_event_type'], + true + ); $event_graph_by_user_validator = $style['event_graph_by_user_validator']; $event_graph_by_criticity = $style['event_graph_by_criticity']; @@ -561,7 +571,6 @@ switch ($action) { $filter_search = $style['event_filter_search']; $filter_exclude = $style['event_filter_exclude']; - break; case 'event_report_group': @@ -799,6 +808,7 @@ switch ($action) { case 'database_serialized': case 'last_value': case 'monitor_report': + case 'histogram_data': case 'min_value': case 'max_value': case 'avg_value': @@ -4136,6 +4146,7 @@ $(document).ready (function () { case 'max_value': case 'min_value': case 'monitor_report': + case 'histogram_data': case 'database_serialized': case 'last_value': case 'sumatory': @@ -4189,6 +4200,7 @@ $(document).ready (function () { case 'prediction_date': case 'projection_graph': case 'monitor_report': + case 'histogram_data': case 'module_histogram_graph': case 'avg_value': case 'max_value': @@ -4274,6 +4286,7 @@ $(document).ready (function () { case 'max_value': case 'min_value': case 'monitor_report': + case 'histogram_data': case 'database_serialized': case 'last_value': case 'sumatory': @@ -4322,6 +4335,7 @@ $(document).ready (function () { case 'prediction_date': case 'projection_graph': case 'monitor_report': + case 'histogram_data': case 'module_histogram_graph': case 'avg_value': case 'max_value': @@ -5337,6 +5351,7 @@ function chooseType() { $("#row_summary").show(); break; + case 'histogram_data': case 'module_histogram_graph': $("#row_description").show(); $("#row_period").show(); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 6f77f643ec..887b3c7750 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -2061,6 +2061,7 @@ switch ($action) { break; case 'module_histogram_graph': + case 'histogram_data': case 'agent_configuration': case 'alert_report_agent': case 'alert_report_module': @@ -2694,6 +2695,7 @@ switch ($action) { break; case 'module_histogram_graph': + case 'histogram_data': case 'agent_configuration': case 'alert_report_agent': case 'alert_report_module': diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 80f0801493..f72ff94b43 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -842,6 +842,7 @@ function reporting_make_reporting_data( ); break; + case 'histogram_data': case 'module_histogram_graph': $report['contents'][] = reporting_module_histogram_graph( $report, @@ -13624,7 +13625,7 @@ function reporting_module_histogram_graph($report, $content, $pdf=0) $urlImage = ui_get_full_url(false, true, false, false); - $return['type'] = 'module_histogram_graph'; + $return['type'] = $content['type']; $ttl = 1; if ($pdf) { diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 8f27e19933..4d02b482e8 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -43,6 +43,21 @@ require_once $config['homedir'].'/include/functions_ui.php'; require_once $config['homedir'].'/include/functions_netflow.php'; +/** + * Header function. + * + * @param object $table Table. + * @param boolean $mini Mini. + * @param string $title Title. + * @param string $subtitle Subtitle. + * @param integer $period Period. + * @param string $date Date. + * @param string $from From. + * @param string $to To. + * @param string $label Label. + * + * @return void + */ function reporting_html_header( &$table, $mini, @@ -411,6 +426,10 @@ function reporting_html_print_report($report, $mini=false, $report_info=1) $mini ); break; + + case 'histogram_data': + reporting_enterprise_html_histogram_data($table, $item, $mini); + break; } if ($item['type'] == 'agent_module') { diff --git a/pandora_console/include/functions_reports.php b/pandora_console/include/functions_reports.php index d142b418e5..192940c8ed 100755 --- a/pandora_console/include/functions_reports.php +++ b/pandora_console/include/functions_reports.php @@ -754,6 +754,10 @@ function reports_get_report_types($template=false, $not_editor=false) 'optgroup' => __('Modules'), 'name' => __('Last value'), ]; + $types['histogram_data'] = [ + 'optgroup' => __('Modules'), + 'name' => __('Histogram'), + ]; $types['general'] = [ 'optgroup' => __('Grouped'), From d8a628b1c43aaee30f91e039713c64bd2f10bc1a Mon Sep 17 00:00:00 2001 From: Marcos Alconada <marcos.alconada@artica.es> Date: Thu, 11 Mar 2021 14:40:23 +0000 Subject: [PATCH 056/113] Ent 6781 revision de estilos visuales y eliminacion de sistemas skins --- pandora_console/extensions/agents_modules.php | 57 +- pandora_console/extensions/api_checker.php | 8 +- pandora_console/extensions/db_status.php | 2 +- pandora_console/extensions/dbmanager.php | 4 +- .../extensions/disabled/matrix_events.php | 11 +- .../extensions/extension_uploader.php | 2 +- pandora_console/extensions/files_repo.php | 37 +- .../extensions/files_repo/files_repo_form.php | 4 +- .../extensions/files_repo/files_repo_list.php | 69 +- pandora_console/extensions/insert_data.php | 4 +- pandora_console/extensions/module_groups.php | 12 +- pandora_console/extensions/net_tools.php | 4 +- pandora_console/extensions/pandora_logs.php | 4 +- .../extensions/realtime_graphs.php | 4 +- .../realtime_graphs/realtime_graphs.css | 2 + .../extensions/users_connected.php | 2 +- pandora_console/general/alert_enterprise.php | 8 +- .../general/first_task/HA_cluster_builder.php | 6 +- .../general/first_task/cluster_builder.php | 2 +- pandora_console/general/header.php | 59 +- pandora_console/general/login_help_dialog.php | 52 +- pandora_console/general/login_page.php | 13 +- pandora_console/general/logon_failed.php | 4 +- pandora_console/general/news_dialog.php | 16 +- pandora_console/general/noaccess2.php | 9 +- pandora_console/general/pandora_help.php | 24 +- pandora_console/general/php7_message.php | 18 +- pandora_console/general/register.php | 2 +- pandora_console/general/ui/agents_list.php | 2 +- pandora_console/godmode/admin_access_logs.php | 17 +- .../godmode/agentes/agent_conf_gis.php | 10 +- .../godmode/agentes/agent_incidents.php | 2 +- .../godmode/agentes/agent_manager.php | 42 +- .../godmode/agentes/agent_template.php | 10 +- .../godmode/agentes/configurar_agente.php | 127 +- .../godmode/agentes/configure_field.php | 16 +- .../godmode/agentes/fields_manager.php | 12 +- .../godmode/agentes/modificar_agente.php | 240 +- .../godmode/agentes/module_manager.php | 48 +- .../agentes/module_manager_editor_common.php | 98 +- .../agentes/module_manager_editor_network.php | 6 +- .../agentes/module_manager_editor_plugin.php | 2 +- .../module_manager_editor_prediction.php | 2 +- .../agentes/planned_downtime.editor.php | 75 +- .../godmode/agentes/planned_downtime.list.php | 14 +- .../agentes/status_monitor_custom_fields.php | 6 +- .../godmode/alerts/alert_actions.php | 6 +- .../godmode/alerts/alert_commands.php | 38 +- .../godmode/alerts/alert_list.builder.php | 12 +- .../godmode/alerts/alert_list.list.php | 220 +- pandora_console/godmode/alerts/alert_list.php | 4 +- .../godmode/alerts/alert_special_days.php | 28 +- .../godmode/alerts/alert_templates.php | 4 +- pandora_console/godmode/alerts/alert_view.php | 34 +- .../godmode/alerts/configure_alert_action.php | 2 +- .../alerts/configure_alert_special_days.php | 66 +- .../alerts/configure_alert_template.php | 10 +- pandora_console/godmode/category/category.php | 44 +- .../godmode/category/edit_category.php | 24 +- .../godmode/events/custom_events.php | 2 +- .../godmode/events/event_filter.php | 19 +- .../godmode/events/event_responses.editor.php | 20 +- .../godmode/events/event_responses.list.php | 27 +- pandora_console/godmode/events/events.php | 36 +- pandora_console/godmode/extensions.php | 11 +- .../godmode/gis_maps/configure_gis_map.php | 55 +- .../godmode/groups/configure_group.php | 6 +- .../godmode/groups/configure_modu_group.php | 2 +- pandora_console/godmode/groups/group_list.php | 7 +- .../godmode/massive/massive_add_alerts.php | 2 +- .../godmode/massive/massive_delete_alerts.php | 2 +- .../massive/massive_delete_modules.php | 12 +- .../godmode/massive/massive_edit_agents.php | 30 +- .../godmode/massive/massive_edit_modules.php | 16 +- .../godmode/massive/massive_operations.php | 207 +- .../module_library/module_library_view.php | 8 +- .../godmode/modules/manage_nc_groups.php | 6 +- .../modules/manage_network_components.php | 50 +- .../manage_network_components_form_common.php | 15 +- .../manage_network_components_form_wizard.php | 8 +- .../modules/manage_network_templates.php | 20 +- .../modules/manage_network_templates_form.php | 10 +- .../godmode/modules/module_list.php | 2 +- pandora_console/godmode/netflow/nf_edit.php | 6 +- .../godmode/netflow/nf_edit_form.php | 4 +- .../godmode/netflow/nf_item_list.php | 19 +- .../godmode/reporting/create_container.php | 57 +- .../reporting/graph_builder.graph_editor.php | 19 +- .../godmode/reporting/graph_builder.main.php | 14 +- .../godmode/reporting/graph_builder.php | 39 +- .../godmode/reporting/graph_container.php | 28 +- pandora_console/godmode/reporting/graphs.php | 89 +- .../godmode/reporting/map_builder.php | 76 +- .../reporting_builder.item_editor.php | 564 ++-- .../reporting_builder.list_items.php | 71 +- .../godmode/reporting/reporting_builder.php | 66 +- .../reporting/visual_console_builder.data.php | 12 +- .../visual_console_builder.editor.php | 12 +- .../visual_console_builder.elements.php | 73 +- .../reporting/visual_console_builder.php | 16 +- .../visual_console_builder.wizard.php | 10 +- .../reporting/visual_console_favorite.php | 45 +- .../godmode/servers/modificar_server.php | 6 +- pandora_console/godmode/servers/plugin.php | 112 +- .../godmode/servers/servers.build_table.php | 28 +- pandora_console/godmode/setup/gis.php | 2 +- pandora_console/godmode/setup/gis_step_2.php | 256 +- pandora_console/godmode/setup/license.php | 4 +- pandora_console/godmode/setup/links.php | 10 +- pandora_console/godmode/setup/news.php | 6 +- pandora_console/godmode/setup/os.list.php | 2 +- pandora_console/godmode/setup/os.php | 18 +- pandora_console/godmode/setup/setup.php | 100 +- .../godmode/setup/setup_ehorus.php | 12 +- .../godmode/setup/setup_general.php | 24 +- .../godmode/setup/setup_integria.php | 12 +- .../godmode/setup/setup_netflow.php | 2 +- .../godmode/setup/setup_visuals.php | 57 +- .../godmode/setup/setup_websocket_engine.php | 2 +- pandora_console/godmode/setup/snmp_wizard.php | 4 +- .../godmode/snmpconsole/snmp_alert.php | 40 +- .../godmode/snmpconsole/snmp_filters.php | 22 +- pandora_console/godmode/tag/edit_tag.php | 33 +- pandora_console/godmode/tag/tag.php | 45 +- .../update_manager/update_manager.offline.php | 2 +- .../update_manager/update_manager.online.php | 20 +- .../godmode/update_manager/update_manager.php | 6 +- .../godmode/users/configure_profile.php | 20 +- .../godmode/users/configure_user.php | 217 +- .../godmode/users/profile_list.php | 42 +- pandora_console/godmode/users/user_list.php | 66 +- .../wizards/DiscoveryTaskList.class.php | 106 +- .../godmode/wizards/HostDevices.class.php | 2 +- pandora_console/images/eye.png | Bin 569 -> 521 bytes .../images/{ => menu}/builder.menu_gray.png | Bin .../images/{ => menu}/builder.menu_white.png | Bin .../{ => menu}/extensions.menu_gray.png | Bin .../{ => menu}/extensions.menu_white.png | Bin .../images/{ => menu}/gm_alerts.menu_gray.png | Bin .../{ => menu}/gm_alerts.menu_white.png | Bin .../{ => menu}/gm_configuration.menu_gray.png | Bin .../gm_configuration.menu_white.png | Bin .../images/{ => menu}/gm_discovery.menu.png | Bin .../{ => menu}/gm_discovery.menu_white.png | Bin .../images/{ => menu}/gm_events.menu_gray.png | Bin .../{ => menu}/gm_events.menu_white.png | Bin .../{ => menu}/gm_library.menu_gray.png | Bin .../{ => menu}/gm_library.menu_white.png | Bin .../{ => menu}/gm_resources.menu_gray.png | Bin .../{ => menu}/gm_resources.menu_white.png | Bin .../{ => menu}/gm_servers.menu_gray.png | Bin .../{ => menu}/gm_servers.menu_white.png | Bin .../images/{ => menu}/gm_setup.menu_gray.png | Bin .../images/{ => menu}/gm_setup.menu_white.png | Bin .../images/{ => menu}/gm_users.menu_gray.png | Bin .../images/{ => menu}/gm_users.menu_white.png | Bin .../images/{ => menu}/links.menu_gray.png | Bin .../images/{ => menu}/links.menu_white.png | Bin .../images/{ => menu}/op_events.menu_gray.png | Bin .../{ => menu}/op_events.menu_white.png | Bin .../{ => menu}/op_monitoring.menu_gray.png | Bin .../{ => menu}/op_monitoring.menu_white.png | Bin .../{ => menu}/op_network.menu_gray.png | Bin .../{ => menu}/op_network.menu_white.png | Bin .../{ => menu}/op_reporting.menu_gray.png | Bin .../{ => menu}/op_reporting.menu_white.png | Bin .../{ => menu}/op_workspace.menu_gray.png | Bin .../{ => menu}/op_workspace.menu_white.png | Bin .../{ => menu}/um_messages.menu_gray.png | Bin .../{ => menu}/um_messages.menu_white.png | Bin pandora_console/images/operation.png | Bin 521 -> 569 bytes pandora_console/images/user.png | Bin 0 -> 443 bytes .../include/ajax/alert_list.ajax.php | 12 +- .../include/ajax/custom_fields.php | 2 +- pandora_console/include/ajax/events.php | 113 +- pandora_console/include/ajax/graph.ajax.php | 10 +- pandora_console/include/ajax/module.php | 32 +- .../include/ajax/rolling_release.ajax.php | 24 +- .../include/ajax/snmp_browser.ajax.php | 30 +- pandora_console/include/ajax/tree.ajax.php | 2 +- pandora_console/include/auth/ldap.php | 2 +- pandora_console/include/auth/mysql.php | 2 +- .../include/class/AgentWizard.class.php | 40 +- .../include/class/AgentsAlerts.class.php | 10 +- .../include/class/ConfigPEN.class.php | 16 +- .../include/class/ConsoleSupervisor.php | 10 +- .../include/class/CredentialStore.class.php | 8 +- .../include/class/CustomNetScan.class.php | 17 +- .../include/class/Diagnostics.class.php | 7 +- pandora_console/include/class/HTML.class.php | 18 +- .../include/class/HelpFeedBack.class.php | 2 +- .../class/ManageNetScanScripts.class.php | 23 +- .../include/class/ModuleTemplates.class.php | 53 +- .../include/class/NetworkMap.class.php | 36 +- .../include/class/TreeService.class.php | 16 +- .../include/class/WelcomeWindow.class.php | 13 +- pandora_console/include/functions_agents.php | 16 +- pandora_console/include/functions_clippy.php | 2 +- .../include/functions_container.php | 33 +- pandora_console/include/functions_cron.php | 84 +- pandora_console/include/functions_events.php | 93 +- .../include/functions_filemanager.php | 36 +- pandora_console/include/functions_gis.php | 2 +- pandora_console/include/functions_graph.php | 2 +- pandora_console/include/functions_html.php | 61 +- .../include/functions_integriaims.php | 6 +- pandora_console/include/functions_menu.php | 8 +- pandora_console/include/functions_modules.php | 9 +- pandora_console/include/functions_netflow.php | 10 +- pandora_console/include/functions_network.php | 2 +- .../include/functions_notifications.php | 2 + pandora_console/include/functions_profile.php | 2 +- .../include/functions_reporting.php | 93 +- .../include/functions_reporting_html.php | 118 +- pandora_console/include/functions_servers.php | 144 +- .../include/functions_snmp_browser.php | 112 +- .../include/functions_treeview.php | 40 +- pandora_console/include/functions_ui.php | 86 +- .../include/functions_update_manager.php | 76 +- .../include/functions_visual_map.php | 100 +- .../include/functions_visual_map_editor.php | 200 +- .../include/graphs/flot/pandora.flot.js | 1 + .../include/graphs/functions_d3.php | 2 +- .../include/graphs/functions_flot.php | 26 +- .../include/help/clippy/homepage.php | 4 +- .../help/en/help_ad_advanced_permision.php | 24 +- .../include/help/en/help_agent_status.php | 2 +- .../help/en/help_cascade_protection.php | 6 +- .../help/en/help_configure_gis_map.php | 4 +- .../help/en/help_context_module_unknow.php | 2 +- pandora_console/include/help/en/help_cron.php | 2 +- .../include/help/en/help_eventview.php | 13 +- pandora_console/include/help/en/help_ipam.php | 28 +- .../include/help/en/help_module_macros.php | 20 +- .../include/help/en/help_profile.php | 4 +- .../help_visual_console_editor_editor_tab.php | 2 +- .../include/help/en/help_wux_console.php | 94 +- .../include/help/es/help_agent_status.php | 2 +- .../help/es/help_cascade_protection.php | 6 +- .../help/es/help_configure_gis_map.php | 4 +- pandora_console/include/help/es/help_cron.php | 2 +- .../include/help/es/help_eventview.php | 13 +- pandora_console/include/help/es/help_ipam.php | 28 +- .../include/help/es/help_module_macros.php | 20 +- .../include/help/es/help_profile.php | 4 +- .../include/help/es/help_wux_console.php | 94 +- .../help/ja/help_ad_advanced_permision.php | 2 +- .../include/help/ja/help_agent_status.php | 2 +- .../help/ja/help_cascade_protection.php | 6 +- .../help/ja/help_configure_gis_map.php | 4 +- .../help/ja/help_context_module_unknow.php | 2 +- pandora_console/include/help/ja/help_cron.php | 2 +- .../include/help/ja/help_eventview.php | 8 +- pandora_console/include/help/ja/help_ipam.php | 28 +- .../include/help/ja/help_profile.php | 4 +- .../help_visual_console_editor_editor_tab.php | 2 +- .../include/javascript/module_library.js | 4 +- .../include/javascript/pandora_events.js | 6 +- .../include/javascript/pandora_modules.js | 4 +- .../include/javascript/pandora_ui.js | 1 + .../include/javascript/tree/TreeController.js | 6 +- .../lib/Dashboard/Widgets/agent_module.php | 6 +- .../include/lib/Dashboard/Widgets/example.php | 6 +- .../lib/Dashboard/Widgets/groups_status.php | 12 +- .../lib/Dashboard/Widgets/monitor_health.php | 2 +- .../include/lib/Dashboard/Widgets/reports.php | 2 +- .../Dashboard/Widgets/system_group_status.php | 8 +- .../lib/Dashboard/Widgets/tree_view.php | 2 +- .../lib/Dashboard/Widgets/wux_transaction.php | 6 +- .../models/VisualConsole/Items/Group.php | 8 +- .../rest-api/models/VisualConsole/View.php | 4 +- pandora_console/include/styles/first_task.css | 1 - .../include/styles/js/jquery.contextMenu.css | 1 + pandora_console/include/styles/menu.css | 80 +- .../include/styles/module_library.css | 6 +- pandora_console/include/styles/pandora.css | 2698 +++++++++++++++-- .../include/styles/pandora_black.css | 448 ++- .../include/styles/pandora_green_old.css | 185 -- .../include/styles/select2_dark.min.css | 652 ++++ pandora_console/index.php | 6 +- pandora_console/log/.console.log.swp | Bin 0 -> 28672 bytes .../mobile/include/functions_web.php | 6 +- pandora_console/mobile/include/ui.class.php | 2 +- pandora_console/mobile/include/user.class.php | 4 +- pandora_console/mobile/operation/agent.php | 6 +- pandora_console/mobile/operation/agents.php | 30 +- pandora_console/mobile/operation/alerts.php | 2 +- pandora_console/mobile/operation/events.php | 22 +- pandora_console/mobile/operation/groups.php | 2 +- .../mobile/operation/module_graph.php | 6 +- pandora_console/mobile/operation/modules.php | 23 +- pandora_console/mobile/operation/tactical.php | 2 +- .../mobile/operation/visualmap.php | 2 +- .../mobile/operation/visualmaps.php | 2 +- .../operation/agentes/agent_fields.php | 2 +- .../agentes/alerts_status.functions.php | 6 +- .../operation/agentes/alerts_status.php | 4 +- .../operation/agentes/custom_fields.php | 4 +- .../operation/agentes/datos_agente.php | 8 +- pandora_console/operation/agentes/ehorus.php | 4 +- .../operation/agentes/estado_agente.php | 59 +- .../agentes/estado_generalagente.php | 90 +- .../operation/agentes/estado_monitores.php | 25 +- .../operation/agentes/exportdata.php | 26 +- .../operation/agentes/gis_view.php | 6 +- pandora_console/operation/agentes/graphs.php | 23 +- .../operation/agentes/group_view.php | 148 +- .../agentes/interface_traffic_graph_win.php | 13 +- .../operation/agentes/log_sources_status.php | 4 +- .../operation/agentes/networkmap.dinamic.php | 19 +- .../operation/agentes/pandora_networkmap.php | 16 +- .../agentes/pandora_networkmap.view.php | 23 +- .../operation/agentes/realtime_win.php | 2 +- .../operation/agentes/snapshot_view.php | 10 +- .../operation/agentes/stat_win.php | 8 +- .../operation/agentes/status_events.php | 2 +- .../operation/agentes/status_monitor.php | 34 +- .../operation/agentes/tactical.php | 8 +- .../operation/agentes/ver_agente.php | 205 +- .../operation/events/events.build_table.php | 45 +- pandora_console/operation/events/events.php | 145 +- .../operation/events/events_list.php | 24 +- .../operation/events/sound_events.php | 27 +- pandora_console/operation/gis_maps/ajax.php | 6 +- .../operation/gis_maps/gis_map.php | 2 +- .../operation/gis_maps/public_console.php | 4 +- .../operation/gis_maps/render_view.php | 12 +- .../configure_integriaims_incident.php | 2 +- .../dashboard_detail_integriaims_incident.php | 8 +- .../operation/incidents/incident.php | 14 +- .../operation/incidents/incident_detail.php | 12 +- .../incidents/list_integriaims_incidents.php | 12 +- .../operation/messages/message_edit.php | 15 +- .../operation/messages/message_list.php | 33 +- .../operation/netflow/nf_live_view.php | 26 +- .../operation/network/network_report.php | 6 +- .../operation/network/network_usage_map.php | 2 +- .../operation/reporting/graph_viewer.php | 61 +- .../operation/reporting/reporting_viewer.php | 55 +- pandora_console/operation/search_agents.php | 12 +- pandora_console/operation/search_helps.php | 2 +- pandora_console/operation/search_main.php | 14 +- pandora_console/operation/search_results.php | 2 +- .../operation/servers/recon_view.php | 10 +- .../operation/snmpconsole/snmp_browser.php | 10 +- .../operation/snmpconsole/snmp_statistics.php | 36 +- .../operation/snmpconsole/snmp_view.php | 97 +- pandora_console/operation/system_alert.php | 4 +- pandora_console/operation/tree.php | 36 +- pandora_console/operation/users/user_edit.php | 12 +- .../operation/users/user_edit_header.php | 14 +- .../users/user_edit_notifications.php | 2 +- .../visual_console/legacy_public_view.php | 6 +- .../operation/visual_console/legacy_view.php | 52 +- .../operation/visual_console/public_view.php | 4 +- .../operation/visual_console/pure_ajax.php | 48 +- .../operation/visual_console/view.php | 49 +- .../vendor/mpdf/mpdf/src/OtlDump.php | 4 +- .../Swift/Plugins/Reporters/HtmlReporter.php | 4 +- pandora_console/views/dashboard/header.php | 45 +- pandora_console/views/dashboard/layout.php | 8 +- pandora_console/views/dashboard/list.php | 12 +- pandora_console/views/dashboard/slides.php | 5 +- .../intel_dcm/extensions/intel_dcm_setup.php | 23 +- pandora_server/util/styles_backup.sh | 24 + 365 files changed, 9571 insertions(+), 3520 deletions(-) mode change 100644 => 100755 pandora_console/images/eye.png rename pandora_console/images/{ => menu}/builder.menu_gray.png (100%) rename pandora_console/images/{ => menu}/builder.menu_white.png (100%) rename pandora_console/images/{ => menu}/extensions.menu_gray.png (100%) rename pandora_console/images/{ => menu}/extensions.menu_white.png (100%) rename pandora_console/images/{ => menu}/gm_alerts.menu_gray.png (100%) rename pandora_console/images/{ => menu}/gm_alerts.menu_white.png (100%) rename pandora_console/images/{ => menu}/gm_configuration.menu_gray.png (100%) rename pandora_console/images/{ => menu}/gm_configuration.menu_white.png (100%) rename pandora_console/images/{ => menu}/gm_discovery.menu.png (100%) rename pandora_console/images/{ => menu}/gm_discovery.menu_white.png (100%) rename pandora_console/images/{ => menu}/gm_events.menu_gray.png (100%) rename pandora_console/images/{ => menu}/gm_events.menu_white.png (100%) rename pandora_console/images/{ => menu}/gm_library.menu_gray.png (100%) rename pandora_console/images/{ => menu}/gm_library.menu_white.png (100%) rename pandora_console/images/{ => menu}/gm_resources.menu_gray.png (100%) rename pandora_console/images/{ => menu}/gm_resources.menu_white.png (100%) rename pandora_console/images/{ => menu}/gm_servers.menu_gray.png (100%) rename pandora_console/images/{ => menu}/gm_servers.menu_white.png (100%) rename pandora_console/images/{ => menu}/gm_setup.menu_gray.png (100%) rename pandora_console/images/{ => menu}/gm_setup.menu_white.png (100%) rename pandora_console/images/{ => menu}/gm_users.menu_gray.png (100%) rename pandora_console/images/{ => menu}/gm_users.menu_white.png (100%) rename pandora_console/images/{ => menu}/links.menu_gray.png (100%) rename pandora_console/images/{ => menu}/links.menu_white.png (100%) rename pandora_console/images/{ => menu}/op_events.menu_gray.png (100%) rename pandora_console/images/{ => menu}/op_events.menu_white.png (100%) rename pandora_console/images/{ => menu}/op_monitoring.menu_gray.png (100%) rename pandora_console/images/{ => menu}/op_monitoring.menu_white.png (100%) rename pandora_console/images/{ => menu}/op_network.menu_gray.png (100%) rename pandora_console/images/{ => menu}/op_network.menu_white.png (100%) rename pandora_console/images/{ => menu}/op_reporting.menu_gray.png (100%) rename pandora_console/images/{ => menu}/op_reporting.menu_white.png (100%) rename pandora_console/images/{ => menu}/op_workspace.menu_gray.png (100%) rename pandora_console/images/{ => menu}/op_workspace.menu_white.png (100%) rename pandora_console/images/{ => menu}/um_messages.menu_gray.png (100%) rename pandora_console/images/{ => menu}/um_messages.menu_white.png (100%) mode change 100755 => 100644 pandora_console/images/operation.png create mode 100644 pandora_console/images/user.png delete mode 100644 pandora_console/include/styles/pandora_green_old.css create mode 100644 pandora_console/include/styles/select2_dark.min.css create mode 100644 pandora_console/log/.console.log.swp create mode 100644 pandora_server/util/styles_backup.sh diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 72b9ddb2f9..a1483862f1 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -360,14 +360,14 @@ function mainAgentsModules() $fullscreen['text'] = '<a href="index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&pure=1& offset='.$offset.'&group_id='.$group_id.'&modulegroup='.$modulegroup.'&refresh='.$refr.'&full_modules_selected='.$full_modules.' - &full_agents_id='.$full_agents.'&selection_agent_module='.$selection_a_m.'">'.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode')]).'</a>'; + &full_agents_id='.$full_agents.'&selection_agent_module='.$selection_a_m.'">'.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode'), 'class' => 'invert_filter']).'</a>'; } else if ($full_modules_selected[0] && $full_agents_id[0]) { $full_modules = urlencode(implode(';', $full_modules_selected)); $full_agents = urlencode(implode(';', $full_agents_id)); $fullscreen['text'] = '<a href="index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&pure=1& offset='.$offset.'&group_id='.$group_id.'&modulegroup='.$modulegroup.'&refresh='.$refr.'&full_modules_selected='.$full_modules.' - &full_agents_id='.$full_agents.'&selection_agent_module='.$selection_a_m.'">'.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode')]).'</a>'; + &full_agents_id='.$full_agents.'&selection_agent_module='.$selection_a_m.'">'.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode'), 'class' => 'invert_filter']).'</a>'; } else { $fullscreen['text'] = '<a href="index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&pure=1& offset='.$offset.'&group_id='.$group_id.'&modulegroup='.$modulegroup.'&refresh='.$refr.'">'.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode')]).'</a>'; @@ -437,15 +437,15 @@ function mainAgentsModules() // Header. ui_print_page_header( __('Agents/Modules'), - 'images/module_mc.png', + 'images/module.png', false, '', false, $updated_time ); - echo '<table style="width:100%;">'; + echo '<table class="w100p">'; echo '<tr>'; - echo "<td> <span style='float: right;'>".$fullscreen['text'].'</span> </td>'; + echo "<td> <span class='float-right'>".$fullscreen['text'].'</span> </td>'; echo '</tr>'; echo '</table>'; } else { @@ -461,7 +461,7 @@ function mainAgentsModules() } // Floating menu - Start. - echo '<div id="vc-controls" style="z-index: 999">'; + echo '<div id="vc-controls" class="zindex999">'; echo '<div id="menu_tab">'; echo '<ul class="mn">'; @@ -469,14 +469,21 @@ function mainAgentsModules() // Quit fullscreen. echo '<li class="nomn">'; echo '<a target="_top" href="'.$url.'">'; - echo html_print_image('images/normal_screen.png', true, ['title' => __('Back to normal mode')]); + echo html_print_image( + 'images/normal_screen.png', + true, + [ + 'title' => __('Back to normal mode'), + 'class' => 'invert_filter', + ] + ); echo '</a>'; echo '</li>'; // Countdown. echo '<li class="nomn">'; echo '<div class="vc-refr">'; - echo '<div class="vc-countdown style="display: inline;"></div>'; + echo '<div class="vc-countdown inline_line"></div>'; echo '<div id="vc-refr-form">'; echo __('Refresh').':'; echo html_print_select( @@ -511,8 +518,8 @@ function mainAgentsModules() } if ($config['pure'] != 1) { - $show_filters = '<form method="post" action="'.ui_get_url_refresh(['offset' => $offset, 'hor_offset' => $offset, 'group_id' => $group_id, 'modulegroup' => $modulegroup]).'" style="width:100%;">'; - $show_filters .= '<table class="white_table" cellpadding="0" cellspacing="0" border="0" style="width:100%; border:none;">'; + $show_filters = '<form method="post" action="'.ui_get_url_refresh(['offset' => $offset, 'hor_offset' => $offset, 'group_id' => $group_id, 'modulegroup' => $modulegroup]).'" class="w100p">'; + $show_filters .= '<table class="white_table w100p no-border" cellpadding="0" cellspacing="0" border="0">'; $show_filters .= '<tr>'; $show_filters .= '<td>'.$filter_groups_label.'</td>'; $show_filters .= '<td>'.$filter_groups.'   '.$filter_recursion_label.$filter_recursion.'</td>'; @@ -530,7 +537,7 @@ function mainAgentsModules() $show_filters .= '<td>'.$filter_modules.'</td>'; $show_filters .= '</tr>'; $show_filters .= '<tr>'; - $show_filters .= "<td colspan=6 ><span style='float: right; padding-right: 20px;'>".$filter_update.'</span></td>'; + $show_filters .= "<td colspan=6 ><span class='right pdd_r_20px'>".$filter_update.'</span></td>'; $show_filters .= '</tr>'; $show_filters .= '</table>'; $show_filters .= '</form>'; @@ -675,15 +682,15 @@ function mainAgentsModules() return; } - echo '<table cellpadding="4" cellspacing="4" border="0" style="width:100%;" class="agents_modules_table">'; + echo '<table cellpadding="4" cellspacing="4" border="0" class="agents_modules_table w100p">'; echo '<tr>'; - echo "<th width='140px' style='text-align: right !important; padding-right:13px;'>".__('Agents').' / '.__('Modules').'</th>'; + echo "<th width='140px' class='right pdd_r_10px'>".__('Agents').' / '.__('Modules').'</th>'; if ($hor_offset > 0) { $new_hor_offset = ($hor_offset - $block); - echo "<th width='20px' style='vertical-align: middle; text-align: center;' rowspan='".($nagents + 1)."'><a href='index.php?".'extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&refr=0&save_serialize=1&selection_a_m='.$selection_a_m.'&hor_offset='.$new_hor_offset.'&offset='.$offset."'>".html_print_image( + echo "<th width='20px' class='vertical_middle center' rowspan='".($nagents + 1)."'><a href='index.php?".'extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&refr=0&save_serialize=1&selection_a_m='.$selection_a_m.'&hor_offset='.$new_hor_offset.'&offset='.$offset."'>".html_print_image( 'images/arrow_left_green.png', true, ['title' => __('Previous modules')] @@ -701,15 +708,15 @@ function mainAgentsModules() $text = ui_print_truncate_text(io_safe_output($module['name']), 'module_small'); echo '<th align="center" width="20px" id="th_module_r_'.$nmodules.'" class="th_class_module_r"> - <div style="width: 30px;"> - <div id="div_module_r_'.$nmodules.'" style="display: none;padding-left:10px" class="rotate_text_module">'.$text.'</div> + <div class="w30px"> + <div id="div_module_r_'.$nmodules.'" class="rotate_text_module invisible padding-lft-10">'.$text.'</div> </div> </th>'; } if (($hor_offset + $block) < $nmodules) { $new_hor_offset = ($hor_offset + $block); - echo "<th width='20px' style='vertical-align: middle; text-align: center;' rowspan='".($nagents + 1)."'><a href='index.php?".'extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&save_serialize=1&selection_a_m='.$selection_a_m.'&hor_offset='.$new_hor_offset.'&offset='.$offset."'>".html_print_image( + echo "<th width='20px' class='vertical_middle center' rowspan='".($nagents + 1)."'><a href='index.php?".'extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&save_serialize=1&selection_a_m='.$selection_a_m.'&hor_offset='.$new_hor_offset.'&offset='.$offset."'>".html_print_image( 'images/arrow_right_green.png', true, ['title' => __('More modules')] @@ -767,7 +774,7 @@ function mainAgentsModules() break; } - echo "<tr style='height: 25px;'>"; + echo "<tr class='height_25px'>"; echo "<td class='$rowcolor'> <a class='$rowcolor' href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$agent['id_agente']."'>".$alias['alias'].'</a></td>'; @@ -787,7 +794,7 @@ function mainAgentsModules() foreach ($module['id'] as $module_id) { if (!$match && array_key_exists($module_id, $agent_modules)) { $status = modules_get_agentmodule_status($module_id); - echo "<td style='text-align: center;'>"; + echo "<td class='center'>"; $win_handle = dechex(crc32($module_id.$module['name'])); $graph_type = return_graphtype(modules_get_agentmodule_type($module_id)); $link = "winopeng_var('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&'.'id='.$module_id.'&'.'refresh='.SECONDS_10MINUTES."', 'day_".$win_handle."', 800, 480)"; @@ -844,18 +851,18 @@ function mainAgentsModules() echo '</table>'; $show_legend = "<div class='legend_white'>"; - $show_legend .= "<div style='display: flex;align-items: center;'> + $show_legend .= "<div class='center flex'> <div class='legend_square_simple'><div style='background-color: ".COL_ALERTFIRED.";'></div></div>".__('Orange cell when the module has fired alerts').'</div>'; - $show_legend .= "<div style='display: flex;align-items: center;'> + $show_legend .= "<div class='center flex'> <div class='legend_square_simple'><div style='background-color: ".COL_CRITICAL.";'></div></div>".__('Red cell when the module has a critical status').' </div>'; - $show_legend .= "<div style='display: flex;align-items: center;'> + $show_legend .= "<div class='center flex'> <div class='legend_square_simple'><div style='background-color: ".COL_WARNING.";'></div></div>".__('Yellow cell when the module has a warning status').'</div>'; - $show_legend .= "<div style='display: flex;align-items: center;'> + $show_legend .= "<div class='center flex'> <div class='legend_square_simple'><div style='background-color: ".COL_NORMAL.";'></div></div>".__('Green cell when the module has a normal status').'</div>'; - $show_legend .= "<div style='display: flex;align-items: center;'> + $show_legend .= "<div class='center flex'> <div class='legend_square_simple'><div style='background-color: ".COL_UNKNOWN.";'></div></div>".__('Grey cell when the module has an unknown status').'</div>'; - $show_legend .= "<div style='display: flex;align-items: center;'> + $show_legend .= "<div class='center flex'> <div class='legend_square_simple'><div style='background-color: ".COL_NOTINIT.";'></div></div>".__("Cell turns blue when the module is in 'not initialize' status").'</div>'; $show_legend .= '</div>'; ui_toggle($show_legend, __('Legend')); diff --git a/pandora_console/extensions/api_checker.php b/pandora_console/extensions/api_checker.php index af92d17875..14aa4c8191 100755 --- a/pandora_console/extensions/api_checker.php +++ b/pandora_console/extensions/api_checker.php @@ -187,7 +187,7 @@ function extension_api_checker() $row = []; $row[] = __('Raw URL'); - $row[] = html_print_input_text('url', $url, '', 150, 2048, true); + $row[] = html_print_input_text('url', $url, '', 50, 2048, true); $table3->data[] = $row; echo "<form method='post'>"; @@ -200,9 +200,7 @@ function extension_api_checker() echo '<legend>'.__('Call parameters').' '.ui_print_help_tip(__('Action: get Operation: module_last_value id: 63'), true).'</legend>'; html_print_table($table2); echo '</fieldset>'; - echo "<div style='text-align: right;'>"; - html_print_input_hidden('api_execute', 1); - html_print_submit_button(__('Call'), 'submit', false, 'class="sub next"'); + echo "<div class='right'>"; echo '</div>'; echo '</form>'; @@ -212,7 +210,7 @@ function extension_api_checker() html_print_table($table3); echo '</fieldset>'; - echo "<div style='text-align: right;'>"; + echo "<div class='right'>"; html_print_input_hidden('api_execute', 1); html_print_submit_button(__('Call'), 'submit', false, 'class="sub next"'); echo '</div>'; diff --git a/pandora_console/extensions/db_status.php b/pandora_console/extensions/db_status.php index 09bf7b9672..d55294f3a6 100755 --- a/pandora_console/extensions/db_status.php +++ b/pandora_console/extensions/db_status.php @@ -67,7 +67,7 @@ function extension_db_status() html_print_table($table); echo '</fieldset>'; - echo "<div style='text-align: right;'>"; + echo "<div class='right'>"; html_print_input_hidden('db_status_execute', 1); html_print_submit_button(__('Execute Test'), 'submit', false, 'class="sub next"'); echo '</div>'; diff --git a/pandora_console/extensions/dbmanager.php b/pandora_console/extensions/dbmanager.php index 416c208a04..7d32b730e5 100644 --- a/pandora_console/extensions/dbmanager.php +++ b/pandora_console/extensions/dbmanager.php @@ -119,7 +119,7 @@ function dbmgr_extension_main() echo "<form method='post' action=''>"; html_print_textarea('sql', 5, 50, html_entity_decode($sql, ENT_QUOTES)); echo '<br />'; - echo '<div class="action-buttons" style="width: 100%">'; + echo '<div class="action-buttons w100p">'; echo '<br />'; html_print_submit_button(__('Execute SQL'), '', false, 'class="sub next"'); echo '</div>'; @@ -156,7 +156,7 @@ function dbmgr_extension_main() return; } - echo "<div style='overflow: auto;'>"; + echo "<div class='overflow'>"; $table = new stdClass(); $table->width = '100%'; $table->class = 'info_table'; diff --git a/pandora_console/extensions/disabled/matrix_events.php b/pandora_console/extensions/disabled/matrix_events.php index b89f58a96c..2f8d815684 100644 --- a/pandora_console/extensions/disabled/matrix_events.php +++ b/pandora_console/extensions/disabled/matrix_events.php @@ -25,12 +25,19 @@ function load_matrix_console() if (! $pure) { $title_menu = __('Matrix events'); - $fullscreen['text'] = '<a href="index.php?extension_in_menu=eventos&sec=extensions&sec2=extensions/matrix_events&pure=1">'.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode')]).'</a>'; + $fullscreen['text'] = '<a href="index.php?extension_in_menu=eventos&sec=extensions&sec2=extensions/matrix_events&pure=1">'.html_print_image( + 'images/full_screen.png', + true, + [ + 'title' => __('Full screen mode'), + 'class' => 'invert_filter', + ] + ).'</a>'; $onheader = ['fullscreen' => $fullscreen]; ui_print_page_header($title_menu, 'images/op_monitoring.png', false, '', false, $onheader); } - echo '<canvas id="matrix-terminal" style="display:block;"></canvas>'; + echo '<canvas id="matrix-terminal" class="visible"></canvas>'; ?> <script language="javascript" type="text/javascript"> diff --git a/pandora_console/extensions/extension_uploader.php b/pandora_console/extensions/extension_uploader.php index 6a52399694..4df1c25bd1 100644 --- a/pandora_console/extensions/extension_uploader.php +++ b/pandora_console/extensions/extension_uploader.php @@ -84,7 +84,7 @@ function extension_uploader_extensions() echo "<form method='post' enctype='multipart/form-data'>"; html_print_table($table); - echo "<div style='text-align: right; width: ".$table->width."'>"; + echo "<div class='right' style='width: ".$table->width."'>"; html_print_input_hidden('upload', 1); html_print_submit_button(__('Upload'), 'submit', false, 'class="sub add"'); echo '</div>'; diff --git a/pandora_console/extensions/files_repo.php b/pandora_console/extensions/files_repo.php index 2e929539c2..d0edb1f591 100644 --- a/pandora_console/extensions/files_repo.php +++ b/pandora_console/extensions/files_repo.php @@ -111,25 +111,25 @@ function pandora_files_repo_godmode() return; } - // Header tabs - $godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/setup.png', true, ['title' => __('Administration view')]).'</a>'; + // Header tabs. + $godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/setup.png', true, ['title' => __('Administration view'), 'class' => 'invert_filter']).'</a>'; $godmode['godmode'] = 1; $godmode['active'] = 1; - $operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/operation.png', true, ['title' => __('Operation view')]).'</a>'; + $operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/eye_show.png', true, ['title' => __('Operation view'), 'class' => 'invert_filter']).'</a>'; $operation['operation'] = 1; $onheader = [ 'godmode' => $godmode, 'operation' => $operation, ]; - // Header + // Header. ui_print_page_header(__('Files repository manager'), 'images/extensions.png', false, '', true, $onheader); $full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/'; include_once $full_extensions_dir.'files_repo/functions_files_repo.php'; - // Directory files_repo check + // Directory files_repo check. if (!files_repo_check_directory(true)) { return; } @@ -139,19 +139,19 @@ function pandora_files_repo_godmode() $server_content_length = $_SERVER['CONTENT_LENGTH']; } - // Check for an anoying error that causes the $_POST and $_FILES arrays - // were empty if the file is larger than the post_max_size + // Check for an anoying error that causes the $_POST and $_FILES arrays. + // were empty if the file is larger than the post_max_size. if (intval($server_content_length) > 0 && empty($_POST)) { ui_print_error_message(__('The file exceeds the maximum size')); } - // GET and POST parameters + // GET and POST parameters. $file_id = (int) get_parameter('file_id'); $add_file = (bool) get_parameter('add_file'); $update_file = (bool) get_parameter('update_file'); $delete_file = (bool) get_parameter('delete'); - // File add or update + // File add or update. if ($add_file || ($update_file && $file_id > 0)) { $groups = get_parameter('groups', []); $public = (bool) get_parameter('public'); @@ -174,7 +174,7 @@ function pandora_files_repo_godmode() } } - // File delete + // File delete. if ($delete_file && $file_id > 0) { $result = files_repo_delete_file($file_id); if ($result !== -1) { @@ -184,10 +184,10 @@ function pandora_files_repo_godmode() $file_id = 0; } - // FORM + // FORM. include $full_extensions_dir.'files_repo/files_repo_form.php'; if (!$file_id) { - // LIST + // LIST. $manage = true; include $full_extensions_dir.'files_repo/files_repo_list.php'; } @@ -198,13 +198,13 @@ function pandora_files_repo_operation() { global $config; - // Header tabs + // Header tabs. $onheader = []; if (check_acl($config['id_user'], 0, 'PM')) { - $godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/setup.png', true, ['title' => __('Administration view')]).'</a>'; + $godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/setup.png', true, ['title' => __('Administration view'), 'class' => 'invert_filter']).'</a>'; $godmode['godmode'] = 1; - $operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/operation.png', true, ['title' => __('Operation view')]).'</a>'; + $operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/eye_show.png', true, ['title' => __('Operation view'), 'class' => 'invert_filter']).'</a>'; $operation['operation'] = 1; $operation['active'] = 1; @@ -214,18 +214,18 @@ function pandora_files_repo_operation() ]; } - // Header + // Header. ui_print_page_header(__('Files repository'), 'images/extensions.png', false, '', false, $onheader); $full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/'; include_once $full_extensions_dir.'files_repo/functions_files_repo.php'; - // Directory files_repo check + // Directory files_repo check. if (!files_repo_check_directory(true)) { return; } - // LIST + // LIST. $full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/'; include $full_extensions_dir.'files_repo/files_repo_list.php'; @@ -237,5 +237,4 @@ extensions_add_main_function('pandora_files_repo_operation'); extensions_add_godmode_menu_option(__('Files repository manager'), 'PM', null, null, 'v1r1'); extensions_add_godmode_function('pandora_files_repo_godmode'); -// pandora_files_repo_uninstall(); pandora_files_repo_install(); diff --git a/pandora_console/extensions/files_repo/files_repo_form.php b/pandora_console/extensions/files_repo/files_repo_form.php index 3f3c57b5bc..a78606c271 100644 --- a/pandora_console/extensions/files_repo/files_repo_form.php +++ b/pandora_console/extensions/files_repo/files_repo_form.php @@ -82,7 +82,7 @@ $table->colspan[][1] = 3; $row = []; $row[0] = __('Description'); $row[0] .= ui_print_help_tip(__('Only 200 characters are permitted'), true); -$row[1] = html_print_textarea('description', 3, 20, $file['description'], 'style="min-height: 40px; max-height: 40px; width: 98%;"', true); +$row[1] = html_print_textarea('description', 3, 20, $file['description'], 'class="file_repo_description"', true); $table->data[] = $row; $table->colspan[][1] = 3; @@ -90,7 +90,7 @@ $table->colspan[][1] = 3; $row = []; // Public checkbox $checkbox = html_print_checkbox('public', 1, (bool) !empty($file['hash']), true); -$style = 'style="padding: 2px 10px; display: inline-block;"'; +$style = 'class="inline padding-2-10"'; $row[0] = __('File'); if ($file_id > 0) { diff --git a/pandora_console/extensions/files_repo/files_repo_list.php b/pandora_console/extensions/files_repo/files_repo_list.php index bc20fce6ab..1be6934eff 100644 --- a/pandora_console/extensions/files_repo/files_repo_list.php +++ b/pandora_console/extensions/files_repo/files_repo_list.php @@ -16,6 +16,8 @@ global $config; $full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/'; require_once $full_extensions_dir.'files_repo/functions_files_repo.php'; + + $offset = (int) get_parameter('offset'); $filter = []; $filter['limit'] = $config['block_size']; @@ -61,19 +63,34 @@ if (!empty($files)) { $data = []; // Prepare the filename for the get_file.php script - $document_root = str_replace('\\', '/', io_safe_output($_SERVER['DOCUMENT_ROOT'])); - $file['location'] = str_replace('\\', '/', io_safe_output($file['location'])); + $document_root = str_replace( + '\\', + '/', + io_safe_output($_SERVER['DOCUMENT_ROOT']) + ); + $file['location'] = str_replace( + '\\', + '/', + io_safe_output($file['location']) + ); $relative_path = str_replace($document_root, '', $file['location']); $file_name = explode('/', $file['location']); $file_decoded = $file_name[(count($file_name) - 1)]; $file_path = base64_encode($file_decoded); $hash = md5($file_path.$config['dbpass']); - $url = ui_get_full_url('include/get_file.php?file='.urlencode($file_path).'&hash='.$hash); + $url = ui_get_full_url( + 'include/get_file.php?file='.urlencode($file_path).'&hash='.$hash + ); $date_format = ($config['date_format']) ? io_safe_output($config['date_format']) : 'F j, Y - H:m'; $data[0] = "<a href=\"$url\" target=\"_blank\">".$file['name'].'</a>'; // Name - $data[1] = ui_print_truncate_text($file['description'], 'description', true, true); + $data[1] = ui_print_truncate_text( + $file['description'], + 'description', + true, + true + ); // Description $data[2] = ui_format_filesize($file['size']); // Size @@ -83,30 +100,58 @@ if (!empty($files)) { $data[4] = ''; $table->cellclass[][4] = 'action_buttons'; if (!empty($file['hash'])) { - $public_url = ui_get_full_url(EXTENSIONS_DIR.'/files_repo/files_repo_get_file.php?file='.$file['hash']); + $public_url = ui_get_full_url( + EXTENSIONS_DIR.'/files_repo/files_repo_get_file.php?file='.$file['hash'] + ); $message = __('Copy to clipboard').': Ctrl+C -> Enter'; $action = "window.prompt('$message', '$public_url');"; $data[4] .= "<a href=\"javascript:;\" onclick=\"$action\">"; - $data[4] .= html_print_image('images/world.png', true, ['title' => __('Public link')]); + $data[4] .= html_print_image( + 'images/world.png', + true, + ['title' => __('Public link')] + ); // Public link image $data[4] .= '</a> '; } $data[4] .= "<a href=\"$url\" target=\"_blank\">"; - $data[4] .= html_print_image('images/download.png', true, ['title' => __('Download'), 'style' => 'padding:3px' ]); + $data[4] .= html_print_image( + 'images/download.png', + true, + [ + 'title' => __('Download'), + 'style' => 'padding:3px', + ] + ); // Download image $data[4] .= '</a>'; if ($manage) { - $config_url = ui_get_full_url("index.php?sec=godmode/extensions&sec2=extensions/files_repo&file_id=$file_id"); - $data[4] .= " <a href=\"$config_url\">"; - $data[4] .= html_print_image('images/config.png', true, ['title' => __('Edit')]); + $config_url = ui_get_full_url( + 'index.php?sec=godmode/extensions&sec2=extensions/files_repo&file_id='.$file_id + ); + $data[4] .= '<a href=\"$config_url\">'; + $data[4] .= html_print_image( + 'images/config.png', + true, + ['title' => __('Edit')] + ); // Edit image $data[4] .= '</a>'; - $delete_url = ui_get_full_url("index.php?sec=godmode/extensions&sec2=extensions/files_repo&delete=1&file_id=$file_id"); + $delete_url = ui_get_full_url( + 'index.php?sec=godmode/extensions&sec2=extensions/files_repo&delete=1&file_id='.$file_id + ); $data[4] .= " <a href=\"$delete_url\" onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\">"; - $data[4] .= html_print_image('images/cross.png', true, ['title' => __('Delete')]); + $data[4] .= html_print_image( + 'images/cross.png', + true, + [ + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] + ); // Delete image $data[4] .= '</a>'; } diff --git a/pandora_console/extensions/insert_data.php b/pandora_console/extensions/insert_data.php index f3fedfde1c..d6b54cdb11 100644 --- a/pandora_console/extensions/insert_data.php +++ b/pandora_console/extensions/insert_data.php @@ -137,7 +137,7 @@ function mainInsertData() } } - echo '<div class="notify" style="margin-bottom:15px;">'; + echo '<div class="notify mrg_btt_15">'; echo sprintf( __('Please check that the directory "%s" is writeable by the apache user. <br /><br />The CSV file format is date;value<newline>date;value<newline>... The date in CSV is in format Y/m/d H:i:s.'), $config['remote_config'] @@ -200,7 +200,7 @@ function mainInsertData() html_print_table($table); - echo "<div style='text-align: right; width: ".$table->width."'>"; + echo "<div class='right' style='width: ".$table->width."'>"; html_print_input_hidden('save', 1); html_print_submit_button(__('Save'), 'submit', ($id_agent === ''), 'class="sub next"'); echo '</div>'; diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index 5b8f86bde8..a56c4d80b4 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -254,7 +254,7 @@ function mainModuleGroups() '' ); - echo "<table cellpadding='4' cellspacing='4' class='databox filters' width='100%' style='font-weight: bold; margin-bottom: 10px;'> + echo "<table cellpadding='4' cellspacing='4' class='databox filters bolder margin-bottom-10' width='100%'> <tr>"; echo "<form method='post' action='index.php?sec=view&sec2=extensions/module_groups'>"; @@ -336,7 +336,7 @@ function mainModuleGroups() } $data[$i][$j] = "<div style='".$cell_style.'background:'.$color.";'>"; - $data[$i][$j] .= "<a class='info_cell' rel='$rel' href='$url' style='color:white;font-size: 18px;'>"; + $data[$i][$j] .= "<a class='info_cell white font_18px' rel='$rel' href='$url'>"; $data[$i][$j] .= $array_data[$key][$k]['total_count']; $data[$i][$j] .= '</a></div>'; } else { @@ -349,7 +349,7 @@ function mainModuleGroups() } } else { foreach ($value['gm'] as $k => $v) { - $data[$i][$j] = "<div style='background:".$background_color."; min-width: 60px;max-width:5%;overflow:hidden; margin-left: auto; margin-right: auto; text-align: center; padding: 5px;padding-bottom:10px;font-size: 18px;line-height:25px;'>"; + $data[$i][$j] = "<div class='module_gm_groups' style='background:".$background_color."'>"; $data[$i][$j] .= 0; $data[$i][$j] .= '</div>'; $j++; @@ -365,15 +365,15 @@ function mainModuleGroups() ui_pagination($counter); - echo "<div style='width:100%; overflow-x:auto;'>"; + echo "<div class='w100p' style='overflow-x:auto;'>"; html_print_table($table); echo '</div>'; ui_pagination($counter); - echo "<div class='legend_basic' style='width: 98.6%'>"; + echo "<div class='legend_basic w99p'>"; echo '<table >'; - echo "<tr><td colspan='2' style='padding-bottom: 10px;'><b>".__('Legend').'</b></td></tr>'; + echo "<tr><td colspan='2' class='pdd_b_10px'><b>".__('Legend').'</b></td></tr>'; echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_ALERTFIRED.";'></div></td><td>".__('Orange cell when the module group and agent have at least one alarm fired.').'</td></tr>'; echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_CRITICAL.";'></div></td><td>".__('Red cell when the module group and agent have at least one module in critical status and the others in any status').'</td></tr>'; echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_WARNING.";'></div></td><td>".__('Yellow cell when the module group and agent have at least one in warning status and the others in grey or green status').'</td></tr>'; diff --git a/pandora_console/extensions/net_tools.php b/pandora_console/extensions/net_tools.php index 2a85a45293..47874f78f5 100644 --- a/pandora_console/extensions/net_tools.php +++ b/pandora_console/extensions/net_tools.php @@ -317,7 +317,7 @@ function main_net_tools() ); if ($ips == '') { - echo "<div class='error' style='margin-top:5px'>".__('The agent hasn\'t got IP').'</div>'; + echo "<div class='error mrgn_top_5'>".__('The agent hasn\'t got IP').'</div>'; return; } @@ -392,7 +392,7 @@ function main_net_tools() echo __('SNMP Community').' '; html_print_input_text('community', $community); echo '</td><td>'; - echo "<input style='margin:0px;' name=submit type=submit class='sub next' value='".__('Execute')."'>"; + echo "<input name=submit type=submit class='sub next mrgn_0px' value='".__('Execute')."'>"; echo '</td>'; echo '</tr></table>'; echo '</form>'; diff --git a/pandora_console/extensions/pandora_logs.php b/pandora_console/extensions/pandora_logs.php index 4d7c322144..420d2bc6c1 100644 --- a/pandora_console/extensions/pandora_logs.php +++ b/pandora_console/extensions/pandora_logs.php @@ -36,14 +36,14 @@ function view_logfile($file_name) } else if ($file_size > ($config['max_log_size'] * 1000)) { $data = file_get_contents($file_name, false, null, ($file_size - ($config['max_log_size'] * 1000))); echo "<h2>$file_name (".format_numeric(filesize($file_name) / 1024).' KB) '.ui_print_help_tip(__('The folder /var/log/pandora must have pandora:apache and its content too.'), true).' </h2>'; - echo "<textarea style='width: 98%; float:right; height: 200px; margin-bottom:20px;' name='$file_name'>"; + echo "<textarea class='pandora_logs' name='$file_name'>"; echo '... '; echo $data; echo '</textarea><br><br>'; } else { $data = file_get_contents($file_name); echo "<h2>$file_name (".format_numeric(filesize($file_name) / 1024).' KB) '.ui_print_help_tip(__('The folder /var/log/pandora must have pandora:apache and its content too.'), true).' </h2>'; - echo "<textarea style='width: 98%; float:right; height: 200px; margin-bottom:20px;' name='$file_name'>"; + echo "<textarea class='pandora_logs' name='$file_name'>"; echo $data; echo '</textarea><br><br>'; } diff --git a/pandora_console/extensions/realtime_graphs.php b/pandora_console/extensions/realtime_graphs.php index 2047ec96ad..86fcfc4f0e 100644 --- a/pandora_console/extensions/realtime_graphs.php +++ b/pandora_console/extensions/realtime_graphs.php @@ -207,7 +207,7 @@ function pandora_realtime_graphs() 'reset', false, 'javascript:realtimeGraphs.clearGraph();', - 'class="sub delete" style="margin-top:0px;"', + 'class="sub delete mgn_tp_0" ', true ); $table->data[] = $data; @@ -230,7 +230,7 @@ function pandora_realtime_graphs() 'custom_action', urlencode( base64_encode( - ' <a href="javascript:realtimeGraphs.setOID();"><img src="'.ui_get_full_url('images').'/input_filter.disabled.png" title="'.__('Use this OID').'" style="vertical-align: middle;"></img></a>' + ' <a href="javascript:realtimeGraphs.setOID();"><img src="'.ui_get_full_url('images').'/input_filter.disabled.png" title="'.__('Use this OID').'" class="vertical_middle"></img></a>' ) ), false diff --git a/pandora_console/extensions/realtime_graphs/realtime_graphs.css b/pandora_console/extensions/realtime_graphs/realtime_graphs.css index 2219c6152a..a5dfa19975 100644 --- a/pandora_console/extensions/realtime_graphs/realtime_graphs.css +++ b/pandora_console/extensions/realtime_graphs/realtime_graphs.css @@ -12,4 +12,6 @@ #graph_container { width: 800px; margin: 20px auto; + background-color: white; + border-radius: 3px; } diff --git a/pandora_console/extensions/users_connected.php b/pandora_console/extensions/users_connected.php index 715a8d48db..884285dd28 100644 --- a/pandora_console/extensions/users_connected.php +++ b/pandora_console/extensions/users_connected.php @@ -30,7 +30,7 @@ function users_extension_main_god($god=true) if ($god) { $image = 'images/gm_users.png'; } else { - $image = 'images/op_workspace.png'; + $image = 'images/user.png'; } // Header diff --git a/pandora_console/general/alert_enterprise.php b/pandora_console/general/alert_enterprise.php index 0335ef76be..8946b5e1f8 100644 --- a/pandora_console/general/alert_enterprise.php +++ b/pandora_console/general/alert_enterprise.php @@ -29,7 +29,7 @@ if (check_login()) { } echo "</span> -<img class='modalclosex cerrar' src='".$config['homeurl']."images/icono_cerrar.png'> +<img class='modalclosex cerrar' src='".$config['homeurl'].'images/icono_cerrar.png'."'> </div> <div class='modalcontent'> @@ -105,7 +105,7 @@ if (check_login()) { echo __( "This is the online help for %s console. This help is -in best cases- just a brief contextual help, not intented to teach you how to use %s. Official documentation of %s is about 900 pages, and you probably don't need to read it entirely, but sure, you should download it and take a look.<br><br> - <a href='%s' target='_blanck' class='pandora_green_text' style='font-size: 10pt; text-decoration: underline;'>Download the official documentation</a>", + <a href='%s' target='_blanck' class='pandora_green_text font_10 underline'>Download the official documentation</a>", get_product_name(), get_product_name(), get_product_name(), @@ -136,7 +136,7 @@ if (check_login()) { case 'modulemodal': echo __( "The community version doesn't have the ability to define your own library of local modules, or distribute it to remote agents. You need to make those changes individually on each agent which is possible by using external tools and time and effort. Nor can it distribute local plugins, or have access to the library of enterprise plugins to monitor applications such as VMWare, RHEV or Informix between others. The Enterprise version will have all this, plus the ability to distribute and manage your own local modules on your systems, individually or through policies. - <br><br><img style='width:105px' src='".$config['homeurl']."images/logo_oracle.png'><img style='width:105px' src='".$config['homeurl']."images/logo_citrix.png'><img style='width:105px' src='".$config['homeurl']."images/logo_sap.png'><img style='width:105px' src='".$config['homeurl']."images/logo_exchange.png'><br><br><span style='font-style:italic;'>* Todos los logotipos pertenecen a marcas registradas</span>" + <br><br><img class='w105px' src='".$config['homeurl'].'images/logo_oracle.png'."'><img class='w105px' src='".$config['homeurl'].'images/logo_citrix.png'."'><img class='w105px' src='".$config['homeurl'].'images/logo_sap.png'."'><img class='w105px' src='".$config['homeurl'].'images/logo_exchange.png'."'><br><br><span class='italic'>* Todos los logotipos pertenecen a marcas registradas</span>" ); break; @@ -192,7 +192,7 @@ if (check_login()) { echo " </div> -<div style='float:right;width:100%;height:30px;'> +<div class='right height_30px'> </div> <div class='modalokbutton cerrar'> <span class='modalokbuttontext'>OK</span> diff --git a/pandora_console/general/first_task/HA_cluster_builder.php b/pandora_console/general/first_task/HA_cluster_builder.php index 0d767c5daf..530ed75893 100644 --- a/pandora_console/general/first_task/HA_cluster_builder.php +++ b/pandora_console/general/first_task/HA_cluster_builder.php @@ -53,10 +53,10 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no HA clus <?php if (check_acl($config['id_user'], 0, 'PM')) { - echo "<div id='create_master_window' style='display:none;'></div>"; - echo "<div id='msg' style='display:none;'></div>"; + echo "<div id='create_master_window' class='invisible'></div>"; + echo "<div id='msg' class='invisible'></div>"; ?> - <input style="margin-bottom:20px;" onclick="show_create_ha_cluster();" type="submit" class="button_task" value="<?php echo __('Add new node'); ?>" /> + <input onclick="show_create_ha_cluster();" type="submit" class="button_task ui_toggle" value="<?php echo __('Add new node'); ?>" /> <?php } ?> diff --git a/pandora_console/general/first_task/cluster_builder.php b/pandora_console/general/first_task/cluster_builder.php index f2bee5e687..7cae5f3a3b 100644 --- a/pandora_console/general/first_task/cluster_builder.php +++ b/pandora_console/general/first_task/cluster_builder.php @@ -53,7 +53,7 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no cluster ?> <form action='index.php?sec=estado&sec2=enterprise/operation/cluster/cluster&op=new' method="post"> - <input style="margin-bottom:20px;" type="submit" class="button_task" value="<?php echo __('Create Cluster'); ?>" /> + <input type="submit" class="button_task ui_toggle" value="<?php echo __('Create Cluster'); ?>" /> </form> <?php diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 1f573749e7..a451633079 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -21,7 +21,8 @@ ui_require_css_file('order_interpreter'); // Check permissions // Global errors/warnings checking. - config_check(); +config_check(); + if ($config['menu_type'] == 'classic') { @@ -76,9 +77,9 @@ if ($config['menu_type'] == 'classic') { if ($check_minor_release_available) { if (users_is_admin($config['id_user'])) { if ($config['language'] == 'es') { - set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. <a style="font-size:8pt;font-style:italic;" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Actualizacion#Versi.C3.B3n_7.0NG_.28_Rolling_Release_.29">'.__('Sobre actualización de revisión menor').'</a>', 'Revisión/es menor/es disponible/s'); + set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. <a id="aviable_updates" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Actualizacion#Versi.C3.B3n_7.0NG_.28_Rolling_Release_.29">'.__('Sobre actualización de revisión menor').'</a>', 'Revisión/es menor/es disponible/s'); } else { - set_pandora_error_for_header('There are one or more minor releases waiting for update. <a style="font-size:8pt;font-style:italic;" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Anexo_Upgrade#Version_7.0NG_.28_Rolling_Release_.29">'.__('About minor release update').'</a>', 'minor release/s available'); + set_pandora_error_for_header('There are one or more minor releases waiting for update. <a id="aviable_updates" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Anexo_Upgrade#Version_7.0NG_.28_Rolling_Release_.29">'.__('About minor release update').'</a>', 'minor release/s available'); } } } @@ -97,8 +98,8 @@ if ($config['menu_type'] == 'classic') { if ($acl_head_search) { // Search bar. - $search_bar = '<form autocomplete="off" method="get" style="display: inline;" name="quicksearch" action="">'; - '<input autocomplete="false" name="hidden" type="text" style="display:none;">'; + $search_bar = '<form autocomplete="off" method="get" class="display_in" name="quicksearch" action="">'; + '<input autocomplete="false" name="hidden" type="text" class="invisible">'; if (!isset($config['search_keywords'])) { $search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = true; </script>'; } else { @@ -256,7 +257,7 @@ if ($config['menu_type'] == 'classic') { $ignored_params['refr'] = ''; $values = get_refresh_time_array(); - $autorefresh_additional = '<span id="combo_refr" style="display: none;">'; + $autorefresh_additional = '<span id="combo_refr" class="invisible">'; $autorefresh_additional .= html_print_select( $values, 'ref', @@ -292,7 +293,15 @@ if ($config['menu_type'] == 'classic') { $autorefresh_link_close = '</a>'; $display_counter = 'display:block'; } else { - $autorefresh_img = html_print_image('images/header_refresh_disabled_gray.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]); + $autorefresh_img = html_print_image( + 'images/header_refresh_disabled_gray.png', + true, + [ + 'class' => 'bot autorefresh_disabled invert_filter', + 'alt' => 'lightning', + 'title' => __('Disabled autorefresh'), + ] + ); $ignored_params['refr'] = false; @@ -307,7 +316,7 @@ if ($config['menu_type'] == 'classic') { 'images/header_refresh_disabled_gray.png', true, [ - 'class' => 'bot autorefresh_disabled', + 'class' => 'bot autorefresh_disabled invert_filter', 'alt' => 'lightning', 'title' => __('Disabled autorefresh'), ] @@ -339,10 +348,10 @@ if ($config['menu_type'] == 'classic') { // Button for feedback pandora. if (enterprise_installed()) { $header_feedback = '<div id="feedback-icon-header">'; - $header_feedback .= '<div id="modal-feedback-form" style="display:none;"></div>'; - $header_feedback .= '<div id="msg-header" style="display: none"></div>'; + $header_feedback .= '<div id="modal-feedback-form" class="invisible"></div>'; + $header_feedback .= '<div id="msg-header" class="invisible"></div>'; $header_feedback .= html_print_image( - '/images/feedback-header.png', + 'images/feedback-header.png', true, [ 'title' => __('Feedback'), @@ -364,13 +373,29 @@ if ($config['menu_type'] == 'classic') { $header_support = '<div id="header_support">'; $header_support .= '<a href="'.ui_get_full_external_url($header_support_link).'" target="_blank">'; - $header_support .= html_print_image('/images/header_support.png', true, ['title' => __('Go to support'), 'class' => 'bot', 'alt' => 'user']); + $header_support .= html_print_image( + 'images/header_support.png', + true, + [ + 'title' => __('Go to support'), + 'class' => 'bot invert_filter', + 'alt' => 'user', + ] + ); $header_support .= '</a></div>'; // Documentation. $header_docu = '<div id="header_docu">'; $header_docu .= '<a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank">'; - $header_docu .= html_print_image('/images/header_docu.png', true, ['title' => __('Go to documentation'), 'class' => 'bot', 'alt' => 'user']); + $header_docu .= html_print_image( + 'images/header_docu.png', + true, + [ + 'title' => __('Go to documentation'), + 'class' => 'bot invert_filter', + 'alt' => 'user', + ] + ); $header_docu .= '</a></div>'; @@ -397,7 +422,7 @@ if ($config['menu_type'] == 'classic') { ); } - $header_user = '<div id="header_user"><a href="index.php?sec=workspace&sec2=operation/users/user_edit">'.$header_user.'<span> ('.$config['id_user'].')</span></a></div>'; + $header_user = '<div id="header_user"><a href="index.php?sec=workspace&sec2=operation/users/user_edit">'.$header_user.'<span id="user_name_header"> ('.$config['id_user'].')</span></a></div>'; // Logout. $header_logout = '<div id="header_logout"><a class="white" href="'.ui_get_full_url('index.php?bye=bye').'">'; @@ -406,7 +431,7 @@ if ($config['menu_type'] == 'classic') { true, [ 'alt' => __('Logout'), - 'class' => 'bot', + 'class' => 'bot invert_filter', 'title' => __('Logout'), ] ); @@ -421,10 +446,10 @@ if ($config['menu_type'] == 'classic') { <!-- Notifications content wrapper--> -<div id='notification-content' style='display:none;' /></div> +<div id='notification-content' class='invisible'/></div> <!-- Old style div wrapper --> -<div id="alert_messages" style="display: none"></div> +<div id="alert_messages" class="invisible"></div> <script type="text/javascript"> /* <![CDATA[ */ diff --git a/pandora_console/general/login_help_dialog.php b/pandora_console/general/login_help_dialog.php index 22f62aabbc..f41f7df213 100644 --- a/pandora_console/general/login_help_dialog.php +++ b/pandora_console/general/login_help_dialog.php @@ -18,6 +18,8 @@ global $config; + + if (is_ajax()) { $skip_login_help = get_parameter('skip_login_help', 0); @@ -34,9 +36,9 @@ if (is_ajax()) { } // Prints help dialog information -echo '<div id="login_help_dialog" title="'.__('Welcome to %s', get_product_name()).'" style="">'; +echo '<div id="login_help_dialog" title="'.__('Welcome to %s', get_product_name()).'" >'; - echo '<div style="font-size: 10pt; margin: 20px;">'; + echo '<div id="help_dialog">'; echo __( "If this is your first time using %s, we suggest a few links that'll help you learn more about the software. Monitoring can be overwhelming, but take your time to learn how to harness the power of %s!", get_product_name(), @@ -44,11 +46,11 @@ echo '<div id="login_help_dialog" title="'.__('Welcome to %s', get_product_name( ); echo '</div>'; - echo '<div style="">'; - echo '<table cellspacing=0 cellpadding=0 style="border:1px solid #FFF; width:100%; height: 100%">'; + echo '<div>'; + echo '<table cellspacing=0 cellpadding=0 class="border_solid_white w100p h100p">'; echo '<tr>'; - echo '<td style="border:1px solid #FFF; text-align:center;">'; - echo '<a href="'.ui_get_full_url(false).'general/pandora_help.php?id=main_help" target="_blank" style="text-decoration:none;">'.html_print_image( + echo '<td class="border_solid_white center">'; + echo '<a href="'.ui_get_full_url(false).'general/pandora_help.php?id=main_help" target="_blank" class="no_decoration">'.html_print_image( 'images/online_help.png', true, [ @@ -56,12 +58,12 @@ echo '<div id="login_help_dialog" title="'.__('Welcome to %s', get_product_name( 'border' => 0, ] ).'</a>'; - echo '<br style="margin-bottom: 40px;" />'; - echo '<a style="font-size: 9pt;" href="'.ui_get_full_url(false).'general/pandora_help.php?id=main_help" target="_blank">'.__('Online help').'</a>'; + echo '<br id="br_mb_40" />'; + echo '<a class="font_9pt" href="'.ui_get_full_url(false).'general/pandora_help.php?id=main_help" target="_blank">'.__('Online help').'</a>'; echo '</td>'; - echo '<td style="border:1px solid #FFF; text-align:center;">'; - echo '<a href="http://pandorafms.com/" target="_blank" style="text-decoration:none;">'.html_print_image( + echo '<td class="border_solid_white center">'; + echo '<a href="http://pandorafms.com/" target="_blank" class="no_decoration">'.html_print_image( 'images/enterprise_version.png', true, [ @@ -69,12 +71,12 @@ echo '<div id="login_help_dialog" title="'.__('Welcome to %s', get_product_name( 'border' => 0, ] ).'</a>'; - echo '<br style="margin-bottom: 40px;" />'; - echo '<a style="font-size: 9pt;" href="http://pandorafms.com/" target="_blank">'.__('Enterprise version').'</a>'; + echo '<br id="br_mb_40" />'; + echo '<a class="font_9pt" href="http://pandorafms.com/" target="_blank">'.__('Enterprise version').'</a>'; echo '</td>'; - echo '<td style="border:1px solid #FFF; text-align:center;">'; - echo '<a href="https://pandorafms.com/forums" target="_blank" style="text-decoration:none;">'.html_print_image( + echo '<td class="border_solid_white center">'; + echo '<a href="https://pandorafms.com/forums" target="_blank" class="no_decoration">'.html_print_image( 'images/support.png', true, [ @@ -82,12 +84,12 @@ echo '<div id="login_help_dialog" title="'.__('Welcome to %s', get_product_name( 'border' => 0, ] ).'</a>'; - echo '<br style="margin-bottom: 40px;" />'; - echo '<a style="font-size: 9pt;" href="https://pandorafms.com/forums" target="_blank">'.__('Support').' / '.__('Forums').'</a>'; + echo '<br id="br_mb_40" />'; + echo '<a class="font_9pt" href="https://pandorafms.com/forums" target="_blank">'.__('Support').' / '.__('Forums').'</a>'; echo '</td>'; - echo '<td style="border:1px solid #FFF; text-align:center;">'; - echo '<a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank" style="text-decoration:none;">'.html_print_image( + echo '<td class="border_solid_white center">'; + echo '<a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank" class="no_decoration">'.html_print_image( 'images/documentation.png', true, [ @@ -95,20 +97,20 @@ echo '<div id="login_help_dialog" title="'.__('Welcome to %s', get_product_name( 'border' => 0, ] ).'</a>'; - echo '<br style="margin-bottom: 40px;" />'; - echo '<a style="font-size: 9pt;"href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank">'.__('Documentation').'</span></a>'; + echo '<br id="br_mb_40" />'; + echo '<a clas="font_9pt" href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank">'.__('Documentation').'</span></a>'; echo '</td>'; echo '</tr>'; echo '</table>'; echo '</div>'; - echo '<div style="position:absolute; margin: 0 auto; top: 240px; right: 10px; border: 1px solid #FFF; width: 570px">'; - echo '<div style="float: left; margin-top: 3px; margin-left: 0px; width: 80%; text-align: left;">'; + echo '<div class="absolute help_dialog_login" ">'; + echo '<div class="skip_help_login">'; html_print_checkbox('skip_login_help', 1, false, false, false, 'cursor: \'pointer\''); - echo ' <span style="font-size: 12px;">'.__("Click here to don't show again this message").'</span>'; + echo ' <span class="font_12pt">'.__("Click here to don't show again this message").'</span>'; echo '</div>'; - echo '<div style="float: right; width: 20%;">'; - html_print_submit_button('Ok', 'hide-login-help', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok" style="width:100px;"'); + echo '<div class="float-right w20p">'; + html_print_submit_button('Ok', 'hide-login-help', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok w100p"'); echo '</div>'; echo '</div>'; diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index 9238810636..9629bb8c75 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -17,6 +17,10 @@ if (isset($config['homedir'])) { $homedir = ''; } +global $config; + + + ui_require_css_file('login', 'include/styles/', true); require_once __DIR__.'/../include/functions_ui.php'; @@ -197,9 +201,6 @@ if (is_metaconsole() === true) { } else { html_print_image(ui_get_full_url('images/custom_logo_login/').$config['custom_logo_login'], false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true); } - - // I comment this in case in the future we put a logo without text. - // echo "<br><span style='font-size:120%;color:white;top:10px;position:relative;'>Community edition</span>";. } echo '</a></div>'; @@ -214,7 +215,7 @@ switch ($login_screen) { } if ($config['auth'] == 'saml') { - echo '<div id="log_nick" class="login_nick" style="display: none;">'; + echo '<div id="log_nick" class="login_nick invisible" >'; html_print_input_text_extended( 'nick', '', @@ -228,7 +229,7 @@ switch ($login_screen) { ); echo '</div>'; - echo '<div id="log_pass" class="login_pass" style="display: none;">'; + echo '<div id="log_pass" class="login_pass invisible">'; html_print_input_text_extended( 'pass', '', @@ -244,7 +245,7 @@ switch ($login_screen) { ); echo '</div>'; - echo '<div id="log_button" class="login_button" style="display: none;">'; + echo '<div id="log_button" class="login_button invisible">'; html_print_submit_button(__('Login as admin'), 'login_button', false, 'class="next_login"'); echo '</div>'; diff --git a/pandora_console/general/logon_failed.php b/pandora_console/general/logon_failed.php index 915e7a9934..541ae7ea87 100644 --- a/pandora_console/general/logon_failed.php +++ b/pandora_console/general/logon_failed.php @@ -15,9 +15,9 @@ <div class='databox' id='login'> <div id='login_f' class='databox'> - <h1 id="log_f" style='margin-top: 0px;' class="error"><?php echo __('Authentication error'); ?></h1> + <h1 id="log_f" class="error mgn_tp_0"><?php echo __('Authentication error'); ?></h1> - <div style='width: 350px'> + <div class='w350px'> <a href="index.php"><img src="images/pandora_logo.png" border="0"></a><br> <?php echo $pandora_version; ?> </div> diff --git a/pandora_console/general/news_dialog.php b/pandora_console/general/news_dialog.php index b874fa0e92..82986e2c89 100644 --- a/pandora_console/general/news_dialog.php +++ b/pandora_console/general/news_dialog.php @@ -38,17 +38,17 @@ if (!empty($news)) { } // Prints news dialog template -echo '<div id="news_dialog" title="" style="display: none;">'; +echo '<div id="news_dialog" class="invisible">'; - echo '<div style="position:absolute; top:30px; left: 10px; text-align: left; right:0%; height:70px; min-width:560px; width: 95%; margin: 0 auto; line-height: 19px;">'; - echo '<span style="display: block; height: 260px; overflow: auto; text-align: justify; padding: 5px 15px 4px 10px; background: #ECECEC; border-radius: 4px;" id="new_text"></span>'; - echo '<span style="font-size: 12px; display: block; margin-top: 20px;" id="new_author"></span>'; - echo '<span style="font-size: 12px; display: block; font-style: italic;" id="new_timestamp"></span>'; + echo '<div class="parent_new_dialog_tmplt">'; + echo '<span id="new_text"></span>'; + echo '<span id="new_author"></span>'; + echo '<span id="new_timestamp"></span>'; echo '</div>'; - echo '<div style="position:absolute; margin: 0 auto; top: 340px; right: 10px; width: 570px">'; - echo '<div style="float: right; width: 20%;">'; - html_print_submit_button('Ok', 'hide-news-help', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok" style="width:100px;"'); + echo '<div id="div_btn_new_dialog">'; + echo '<div class="float-right w20p">'; + html_print_submit_button('Ok', 'hide-news-help', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok w100px";"'); echo '</div>'; echo '</div>'; diff --git a/pandora_console/general/noaccess2.php b/pandora_console/general/noaccess2.php index 21065fe6cf..062d95d649 100644 --- a/pandora_console/general/noaccess2.php +++ b/pandora_console/general/noaccess2.php @@ -11,6 +11,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +global $config; if (file_exists('images/grafico_llave.png')) { ui_print_page_header(__('You don\'t have access to this page'), '', false, '', true); } else { @@ -18,17 +19,17 @@ if (file_exists('images/grafico_llave.png')) { } ?> -<div id="noaccess" style="width: 500px; height:180px;"> - <div id="noaccess-title" style=" height: 20px; width: 98%;"><?php echo __('Access to this page is restricted'); ?></div> +<div id="noaccess"> + <div id="noaccess-title"><?php echo __('Access to this page is restricted'); ?></div> <div> - <div id="noaccess-image" style="width: 15%;"> + <div id="noaccess-image"> <?php if (file_exists('images/grafico_llave.png')) { echo html_print_image('images/grafico_llave.png', true, ['alt' => __('No access')]); } ?> </div> - <div id="noaccess-text" style="width: 70%;"> + <div id="noaccess-text"> <?php echo __( 'Access to this page is restricted to authorized users only, please contact system administrator if you need assistance. <br/> <br/> diff --git a/pandora_console/general/pandora_help.php b/pandora_console/general/pandora_help.php index 34cfb0aa3e..9d0a5e79d6 100644 --- a/pandora_console/general/pandora_help.php +++ b/pandora_console/general/pandora_help.php @@ -18,7 +18,7 @@ require_once '../include/config.php'; require_once '../include/functions.php'; require_once '../include/functions_html.php'; ?> -<html style="height:100%; margin-top: 25px; margin-left: 15px; margin-right: 15px; background-color: #333;"><head><title> +<html class="help_pname"><head><title> <?php echo __('%s help system', get_product_name()); ?> @@ -26,7 +26,7 @@ echo __('%s help system', get_product_name()); <meta http-equiv="content-type" content="text/html; charset=utf-8"> </head> <?php echo '<link rel="stylesheet" href="../include/styles/'.$config['style'].'.css" type="text/css">'; ?> -<body style="height: 100%;background-color: #333"> +<body class="height_100p bg_333"> <?php $id = get_parameter('id'); $id_user = get_parameter('id_user'); @@ -59,30 +59,30 @@ foreach ($files as $file) { $logo = ui_get_custom_header_logo(true); if (! $id || ! file_exists($help_file)) { - echo '<div id="main_help" style="background-color: #fff;text-align:center; padding-top: 15px; padding-bottom: 15px; ">'; + echo '<div id="main_help">'; if (!is_metaconsole()) { echo html_print_image($logo, true, ['border' => '0']); } echo '</div>'; - echo '<div style="font-family: verdana, arial; font-size: 11px; text-align:left; background-color: #fff;">'; - echo '<div style="font-size: 12px; background-color: #fff; ;border:0px;" class="databox">'; - echo '<HR style="margin-top: 0px;">'; - echo '<h1 style="padding-left: 30px">'; + echo '<div id="parent_dic">'; + echo '<div class="databox bg-white font_12px no_border">'; + echo '<hr class="mgn_tp_0">'; + echo '<h1 class="pdd_l_30px">'; echo __('Help system error'); echo '</h1>'; - echo "<div style='text-align: center; background-color: #fff'>"; + echo "<div class='center bg-white'>"; echo '</div>'; - echo '<div class="msg" style="padding-left: 30px;padding-right: 30px;padding-bottom: 15px;">'.__("%s help system has been called with a help reference that currently don't exist. There is no help content to show.", get_product_name()).'</div></div></div>'; + echo '<div class="msg msg_pandora_help">'.__("%s help system has been called with a help reference that currently don't exist. There is no help content to show.", get_product_name()).'</div></div></div>'; echo '<br /><br />'; - echo '<div style="text-align: center; padding: 5px; font-family: verdana, arial; font-size: 11px;">'; + echo '<div id="footer_help">'; include 'footer.php'; return; } // Show help -echo '<div id="main_help_new" style="background-color: #fff">'; +echo '<div id="main_help_new">'; if (!empty($config['enterprise_installed']) && is_metaconsole()) { echo '<img src="'.$config['homeurl'].$logo.'">'; } else { @@ -90,7 +90,7 @@ if (!empty($config['enterprise_installed']) && is_metaconsole()) { } echo '</div>'; -echo '<div id="main_help_new_content" style="height: auto ! important;overfloat: auto;">'; +echo '<div id="main_help_new_content">'; ob_start(); require_once $help_file; $help = ob_get_contents(); diff --git a/pandora_console/general/php7_message.php b/pandora_console/general/php7_message.php index 1d009d3e30..9f5bfbf7fd 100644 --- a/pandora_console/general/php7_message.php +++ b/pandora_console/general/php7_message.php @@ -25,19 +25,19 @@ if ($config['language'] == 'es') { } // Prints help dialog information -echo '<div id="login_help_dialog" title="PHP UPDATE REQUIRED" style="display: none;">'; - echo '<div style="width:70%; font-size: 10pt; margin: 20px; float:left">'; - echo "<p><b style='font-size: 10pt;'>".__('For a correct operation of PandoraFMS, PHP must be updated to version 7.0 or higher.').'</b></p>'; - echo "<p style='font-size: 10pt;'><b>".__('Otherwise, functionalities will be lost.').'</b></p>'; +echo '<div id="login_help_dialog" title="PHP UPDATE REQUIRED" class="invisible">'; + echo '<div class="login_help_dialog">'; + echo "<p><b class='font_10'>".__('For a correct operation of PandoraFMS, PHP must be updated to version 7.0 or higher.').'</b></p>'; + echo "<p class='font_10'><b>".__('Otherwise, functionalities will be lost.').'</b></p>'; echo '<ul>'; - echo "<li style='padding:5px;'>".__('Report download in PDF format').'</li>'; - echo "<li style='padding:5px;'>".__('Emails Sending').'</li>'; - echo "<li style='padding:5px;'>".__('Metaconsole Collections').'</li>'; - echo "<li style='padding:5px;'>".'...'.'</li>'; + echo "<li class='pdd_5px'>".__('Report download in PDF format').'</li>'; + echo "<li class='pdd_5px'>".__('Emails Sending').'</li>'; + echo "<li class='pdd_5px'>".__('Metaconsole Collections').'</li>'; + echo "<li class='pdd_5px'>".'...'.'</li>'; echo '</ul>'; echo '<p><a target="blank" href="'.$url_help.'"><b>'.__('Access Help').'</b></a></p>'; echo '</div>'; - echo "<div style='margin-top: 80px;'>"; + echo "<div class='mrg_top_80'>"; echo html_print_image('images/icono_warning_mr.png', true, ['alt' => __('Warning php version'), 'border' => 0]); echo '</div>'; echo '</div>'; diff --git a/pandora_console/general/register.php b/pandora_console/general/register.php index 9f90e7ad39..9a71a97631 100644 --- a/pandora_console/general/register.php +++ b/pandora_console/general/register.php @@ -192,7 +192,7 @@ if (!$double_auth_enabled && $config['2FA_all_users'] != '' && $config['2Fa_auth'] != '1' && $config['double_auth_enabled'] ) { - echo '<div id="doble_auth_window" style="display: none"; >'; + echo '<div id="doble_auth_window" class="invisible"; >'; ?> <script type="text/javascript"> var userID = "<?php echo $config['id_user']; ?>"; diff --git a/pandora_console/general/ui/agents_list.php b/pandora_console/general/ui/agents_list.php index 8dcfeaaaed..deaafe1bc8 100644 --- a/pandora_console/general/ui/agents_list.php +++ b/pandora_console/general/ui/agents_list.php @@ -142,7 +142,7 @@ unset($filter['offset']); if (! is_ajax()) { echo '<div id="agents_loading" class="loading invisible">'; - echo html_print_image('images/spinner.png', true); + echo html_print_image('images/spinner.gif', true); echo __('Loading').'…'; echo '</div>'; } diff --git a/pandora_console/godmode/admin_access_logs.php b/pandora_console/godmode/admin_access_logs.php index 53923b3ee8..f635e945c3 100644 --- a/pandora_console/godmode/admin_access_logs.php +++ b/pandora_console/godmode/admin_access_logs.php @@ -35,8 +35,21 @@ $filter_ip = (string) get_parameter('filter_ip'); $filter_query = '&filter_type='.$filter_type.'&filter_user='.$filter_user.'&filter_text='.$filter_text.'&filter_period='.$filter_period.'&filter_ip='.$filter_ip; -$csv_url = ui_get_full_url(false, false, false, false).'index.php?sec=gextensions&sec2=godmode/audit_log_csv'.$filter_query; -$csv_img = html_print_image('images/csv_mc.png', true, ['title' => __('Export to CSV')]); +$csv_url = ui_get_full_url( + false, + false, + false, + false +).'index.php?sec=gextensions&sec2=godmode/audit_log_csv'.$filter_query; +$csv_img = html_print_image( + 'images/csv.png', + true, + [ + 'title' => __( + 'Export to CSV' + ),'class' => 'invert_filter', + ] +); $header_buttons = [ 'csv' => [ 'active' => false, diff --git a/pandora_console/godmode/agentes/agent_conf_gis.php b/pandora_console/godmode/agentes/agent_conf_gis.php index 260a220ad3..1b083e160f 100644 --- a/pandora_console/godmode/agentes/agent_conf_gis.php +++ b/pandora_console/godmode/agentes/agent_conf_gis.php @@ -22,7 +22,7 @@ require_once 'include/functions_agents.php'; ui_require_javascript_file('openlayers.pandora'); -echo "<div style='margin-bottom: 10px;'></div>"; +echo "<div class='margin-bottom-10'></div>"; $agentData = gis_get_data_last_position_agent($id_agente); $updateGisData = db_get_value('update_gis_data', 'tagente', 'id_agente', $id_agente); @@ -32,7 +32,7 @@ $agent_name = agents_get_name($id_agente); $agent_name = md5($agent_name); // Map with the current position -echo '<div id="'.$agent_name.'_agent_map" style="border:1px solid black; width:100%; height: 30em;"></div>'; +echo '<div id="'.$agent_name.'_agent_map" class="agent_map"></div>'; if (!gis_get_agent_map($id_agente, '500px', '100%', false)) { ui_print_error_message(__('There is no default map. Please go to the setup for to set a default map.')); @@ -122,15 +122,15 @@ $table->data[2][1] = html_print_input_text_extended( ); $table->data[2][2] = __('Ignore new GIS data:'); -$table->data[2][3] = __('Yes').' '.html_print_radio_button_extended('update_gis_data', 0, '', $updateGisData, false, '', 'style="margin-right: 40px;"', true); -$table->data[2][3] .= __('No').' '.html_print_radio_button_extended('update_gis_data', 1, '', $updateGisData, false, '', 'style="margin-right: 40px;"', true); +$table->data[2][3] = __('Yes').' '.html_print_radio_button_extended('update_gis_data', 0, '', $updateGisData, false, '', 'class="mrgn_right_40px"', true); +$table->data[2][3] .= __('No').' '.html_print_radio_button_extended('update_gis_data', 1, '', $updateGisData, false, '', 'class="mrgn_right_40px"', true); $url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente; echo "<form method='post' action='".$url."' onsubmit ='return validateFormFields();'>"; html_print_input_hidden('update_gis', 1); html_print_table($table); -echo '<div class="action-buttons" style="width: '.$table->width.'; float: left;">'; +echo '<div class="action-buttons float-left" style="width: '.$table->width.';">'; html_print_submit_button(__('Update'), '', false, 'class="sub upd"'); echo '</div>'; echo '</form>'; diff --git a/pandora_console/godmode/agentes/agent_incidents.php b/pandora_console/godmode/agentes/agent_incidents.php index c144cdfdcd..1cd03ca41f 100644 --- a/pandora_console/godmode/agentes/agent_incidents.php +++ b/pandora_console/godmode/agentes/agent_incidents.php @@ -139,4 +139,4 @@ echo '</div>'; unset($table); echo '<br><br>'; -echo '<div style="clear:both"> </div>'; +echo '<div id="both"> </div>'; diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index fafac5bcde..326dde3207 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -147,6 +147,8 @@ if (is_ajax()) { return; } + + ui_require_javascript_file('openlayers.pandora'); $new_agent = (empty($id_agente)) ? true : false; @@ -207,11 +209,11 @@ $custom_id_div .= html_print_input_text( if (!$new_agent && $alias != '') { $table_agent_name = '<div class="label_select"><p class="input_label">'.__('Agent name').'</p>'; $table_agent_name .= '<div class="label_select_parent">'; - $table_agent_name .= '<div class="label_select_child_left" style="width: 60%;">'.html_print_input_text('agente', $nombre_agente, '', 50, 100, true).'</div>'; - $table_agent_name .= '<div class="label_select_child_right agent_options_agent_name" style="width: 70%;">'; + $table_agent_name .= '<div class="label_select_child_left w60p">'.html_print_input_text('agente', $nombre_agente, '', 50, 100, true).'</div>'; + $table_agent_name .= '<div class="label_select_child_right agent_options_agent_name w70p">'; if ($id_agente) { - $table_agent_name .= '<label>'.__('ID').'</label><input style="width: 50%;" type="text" readonly value="'.$id_agente.'" />'; + $table_agent_name .= '<label>'.__('ID').'</label><input class="w50p" type="text" readonly value="'.$id_agente.'" />'; $table_agent_name .= '<a href="index.php?sec=gagente&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'">'; $table_agent_name .= html_print_image( 'images/zoom.png', @@ -219,6 +221,7 @@ if (!$new_agent && $alias != '') { [ 'border' => 0, 'title' => __('Agent detail'), + 'class' => 'invert_filter', ] ); $table_agent_name .= '</a>'; @@ -228,7 +231,14 @@ if (!$new_agent && $alias != '') { // Delete link from here. if (!is_central_policies_on_node()) { - $table_agent_name .= "<a onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\" href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente=".$id_agente."&search=&offset=0&sort_field=&sort=none'>".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).'</a>'; + $table_agent_name .= "<a onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\" href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente=".$id_agente."&search=&offset=0&sort_field=&sort=none'>".html_print_image( + 'images/cross.png', + true, + [ + 'title' => __('Delete agent'), + 'class' => 'invert_filter', + ] + ).'</a>'; } // Remote configuration available. @@ -245,6 +255,7 @@ if (!$new_agent && $alias != '') { [ 'border' => 0, 'title' => __('This agent can be remotely configured'), + 'class' => 'invert_filter', ] ); $table_agent_name .= '</a>'; @@ -578,6 +589,7 @@ if (enterprise_installed()) { [ 'title' => __('Delete remote configuration file'), 'style' => 'vertical-align: middle;', + 'class' => 'invert_filter', ] ).'</a>'; $table_adv_remote .= '</a>'; @@ -736,11 +748,11 @@ $table_adv_agent_icon = '<div class="label_select"><p class="input_label">'.__(' if ($icon_path == '') { $display_icons = 'none'; // Hack to show no icon. Use any given image to fix not found image errors. - $path_without = 'images/spinner.png'; - $path_default = 'images/spinner.png'; - $path_ok = 'images/spinner.png'; - $path_bad = 'images/spinner.png'; - $path_warning = 'images/spinner.png'; + $path_without = 'images/spinner.gif'; + $path_default = 'images/spinner.gif'; + $path_ok = 'images/spinner.gif'; + $path_bad = 'images/spinner.gif'; + $path_warning = 'images/spinner.gif'; } else { $display_icons = ''; $path_without = $path.$icon_path.'.default.png'; @@ -794,7 +806,7 @@ if ($config['activate_gis']) { if (enterprise_installed()) { $advanced_div = '<div class="secondary_groups_list">'; } else { - $advanced_div = '<div class="secondary_groups_list" style="display: none">'; + $advanced_div = '<div class="secondary_groups_list invisible" >'; } // General display distribution. @@ -913,7 +925,7 @@ foreach ($fields as $field) { 2, 65, $custom_value, - 'style="min-height: 30px;"', + 'class="min-height-30px', true ); } @@ -988,18 +1000,18 @@ if (enterprise_installed()) { ); } - echo '<div class="action-buttons" style="display: flex; justify-content: flex-end; align-items: center; width: '.$table->width.'">'; + echo '<div class="action-buttons agent_manager" style="width: '.$table->width.'">'; echo '</div>'; } -echo '<div class="action-buttons" style="display: flex; justify-content: flex-end; align-items: center; width: '.$table->width.'">'; +echo '<div class="action-buttons agent_manager" style="width: '.$table->width.'">'; // The context help about the learning mode. if ($modo == 0) { - echo "<span id='modules_not_learning_mode_context_help' style='padding-right:8px;'>"; + echo "<span id='modules_not_learning_mode_context_help pdd_r_10px' '>"; } else { - echo "<span id='modules_not_learning_mode_context_help' style='display: none;'>"; + echo "<span id='modules_not_learning_mode_context_help invisible'>"; } echo clippy_context_help('modules_not_learning_mode'); diff --git a/pandora_console/godmode/agentes/agent_template.php b/pandora_console/godmode/agentes/agent_template.php index 3bece62da2..20edd4e555 100644 --- a/pandora_console/godmode/agentes/agent_template.php +++ b/pandora_console/godmode/agentes/agent_template.php @@ -179,11 +179,11 @@ foreach ($nps as $row) { } echo '<table width="100%" cellpadding="0" cellspacing="0" class="databox filters" >'; -echo "<tr><td class='datos' style='width:50%'>"; +echo "<tr><td class='datos w50p'>"; html_print_select($select, 'template_id', '', '', '', 0, false, false, true, '', false, 'max-width: 200px !important'); echo '</td>'; echo '<td class="datos">'; -html_print_submit_button(__('Assign'), 'crt', false, 'class="sub next" style="margin-top:0px;"'); +html_print_submit_button(__('Assign'), 'crt', false, 'class="sub next mgn_tp_0"'); echo '</td>'; echo '</tr>'; echo '</form>'; @@ -246,7 +246,7 @@ foreach ($result as $row) { $data[0] = '<span>'.$row['nombre']; if ($row['id_tipo_modulo'] > 0) { - $data[1] = html_print_image('images/'.modules_show_icon_type($row['id_tipo_modulo']), true, ['border' => '0']); + $data[1] = html_print_image('images/'.modules_show_icon_type($row['id_tipo_modulo']), true, ['border' => '0', 'class' => 'invert_filter']); } else { $data[1] = ''; } @@ -254,8 +254,8 @@ foreach ($result as $row) { $data[2] = mb_substr($row['descripcion'], 0, 60); $table->cellclass[][3] = 'action_buttons'; - $data[3] = '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'&delete_module='.$row['id_agente_modulo'].'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete'), 'onclick' => "if (!confirm('".__('Are you sure?')."')) return false;"]).'</a>'; - $data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$row['id_agente_modulo'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update')]).'</a>'; + $data[3] = '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'&delete_module='.$row['id_agente_modulo'].'">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter', 'border' => '0', 'alt' => __('Delete'), 'onclick' => "if (!confirm('".__('Are you sure?')."')) return false;"]).'</a>'; + $data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$row['id_agente_modulo'].'">'.html_print_image('images/config.png', true, ['class' => 'invert_filter', 'border' => '0', 'alt' => __('Update')]).'</a>'; array_push($table->data, $data); } diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index df233fd8fd..d5de778514 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -366,7 +366,14 @@ $img_style = [ if ($id_agente) { // View tab. - $viewtab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'">'.html_print_image('images/operation.png', true, ['title' => __('View')]).'</a>'; + $viewtab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'">'.html_print_image( + 'images/operation.png', + true, + [ + 'title' => __('View'), + 'class' => 'invert_filter', + ] + ).'</a>'; if ($tab == 'view') { $viewtab['active'] = true; @@ -377,7 +384,14 @@ if ($id_agente) { $viewtab['operation'] = 1; // Main tab. - $maintab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente='.$id_agente.'">'.html_print_image('images/gm_setup.png', true, ['title' => __('Setup')]).'</a>'; + $maintab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente='.$id_agente.'">'.html_print_image( + 'images/gm_setup.png', + true, + [ + 'title' => __('Setup'), + 'class' => 'invert_filter', + ] + ).'</a>'; if ($tab == 'main') { $maintab['active'] = true; } else { @@ -385,7 +399,14 @@ if ($id_agente) { } // Module tab. - $moduletab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente.'">'.html_print_image('images/gm_modules.png', true, ['title' => __('Modules')]).'</a>'; + $moduletab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente.'">'.html_print_image( + 'images/module.png', + true, + [ + 'title' => __('Modules'), + 'class' => 'invert_filter', + ] + ).'</a>'; if ($tab == 'module') { $moduletab['active'] = true; @@ -394,7 +415,14 @@ if ($id_agente) { } // Alert tab. - $alerttab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&id_agente='.$id_agente.'">'.html_print_image('images/gm_alerts.png', true, ['title' => __('Alerts')]).'</a>'; + $alerttab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&id_agente='.$id_agente.'">'.html_print_image( + 'images/bell.png', + true, + [ + 'title' => __('Alerts'), + 'class' => 'invert_filter', + ] + ).'</a>'; if ($tab == 'alert') { $alerttab['active'] = true; @@ -403,7 +431,14 @@ if ($id_agente) { } // Template tab. - $templatetab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'">'.html_print_image('images/templates.png', true, ['title' => __('Module templates')]).'</a>'; + $templatetab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'">'.html_print_image( + 'images/templates.png', + true, + [ + 'title' => __('Module templates'), + 'class' => 'invert_filter', + ] + ).'</a>'; if ($tab == 'template') { $templatetab['active'] = true; @@ -446,7 +481,14 @@ if ($id_agente) { } // Group tab. - $grouptab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&ag_group='.$group.'">'.html_print_image('images/group.png', true, [ 'title' => __('Group')]).'</a>'; + $grouptab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&ag_group='.$group.'">'.html_print_image( + 'images/group.png', + true, + [ + 'title' => __('Group'), + 'class' => 'invert_filter', + ] + ).'</a>'; $grouptab['active'] = false; @@ -454,7 +496,14 @@ if ($id_agente) { // GIS tab. if ($config['activate_gis']) { - $gistab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente.'">'.html_print_image('images/gm_gis.png', true, [ 'title' => __('GIS data')]).'</a>'; + $gistab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente.'">'.html_print_image( + 'images/gm_gis.png', + true, + [ + 'title' => __('GIS data'), + 'class' => 'invert_filter', + ] + ).'</a>'; if ($tab == 'gis') { $gistab['active'] = true; @@ -464,18 +513,46 @@ if ($id_agente) { } // Agent wizard tab. - $agent_wizard['text'] = '<a href="javascript:" class="agent_wizard_tab">'.html_print_image('images/wand_agent.png', true, [ 'title' => __('Agent wizard')]).'</a>'; + $agent_wizard['text'] = '<a href="javascript:" class="agent_wizard_tab">'.html_print_image( + 'images/wand_agent.png', + true, + [ + 'title' => __('Agent wizard'), + 'class' => 'invert_filter', + ] + ).'</a>'; // Hidden subtab layer. - $agent_wizard['sub_menu'] = '<ul class="mn subsubmenu" style="display:none; float:none;">'; - $agent_wizard['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">'; - $agent_wizard['sub_menu'] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_explorer&id_agente='.$id_agente.'">'.html_print_image('images/wand_snmp.png', true, [ 'title' => __('SNMP Wizard')]).'</a>'; + $agent_wizard['sub_menu'] = '<ul class="mn subsubmenu invisible float-none">'; + $agent_wizard['sub_menu'] .= '<li class="nomn tab_godmode center">'; + $agent_wizard['sub_menu'] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_explorer&id_agente='.$id_agente.'">'.html_print_image( + 'images/wand_snmp.png', + true, + [ + 'title' => __('SNMP Wizard'), + 'class' => 'invert_filter', + ] + ).'</a>'; $agent_wizard['sub_menu'] .= '</li>'; - $agent_wizard['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">'; - $agent_wizard['sub_menu'] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_interfaces_explorer&id_agente='.$id_agente.'">'.html_print_image('images/wand_interfaces.png', true, [ 'title' => __('SNMP Interfaces wizard')]).'</a>'; + $agent_wizard['sub_menu'] .= '<li class="nomn tab_godmode center">'; + $agent_wizard['sub_menu'] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_interfaces_explorer&id_agente='.$id_agente.'">'.html_print_image( + 'images/wand_interfaces.png', + true, + [ + 'title' => __('SNMP Interfaces wizard'), + 'class' => 'invert_filter', + ] + ).'</a>'; $agent_wizard['sub_menu'] .= '</li>'; - $agent_wizard['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">'; - $agent_wizard['sub_menu'] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=wmi_explorer&id_agente='.$id_agente.'">'.html_print_image('images/wand_wmi.png', true, [ 'title' => __('WMI Wizard')]).'</a>'; + $agent_wizard['sub_menu'] .= '<li class="nomn tab_godmode center" >'; + $agent_wizard['sub_menu'] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=wmi_explorer&id_agente='.$id_agente.'">'.html_print_image( + 'images/wand_wmi.png', + true, + [ + 'title' => __('WMI Wizard'), + 'class' => 'invert_filter', + ] + ).'</a>'; $agent_wizard['sub_menu'] .= '</li>'; $agent_wizard['sub_menu'] .= '</ul>'; @@ -491,7 +568,14 @@ if ($id_agente) { // Incident tab. if ($total_incidents > 0) { - $incidenttab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=incident&id_agente='.$id_agente.'">'.html_print_image('images/book_edit.png', true, ['title' => __('Incidents')]).'</a>'; + $incidenttab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=incident&id_agente='.$id_agente.'">'.html_print_image( + 'images/book_edit.png', + true, + [ + 'title' => __('Incidents'), + 'class' => 'invert_filter', + ] + ).'</a>'; if ($tab == 'incident') { $incidenttab['active'] = true; @@ -509,7 +593,10 @@ if ($id_agente) { $remote_configuration_tab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=remote_configuration&id_agente='.$id_agente.'&disk_conf='.$agent_md5.'">'.html_print_image( 'images/remote_configuration.png', true, - ['title' => __('Remote configuration')] + [ + 'title' => __('Remote configuration'), + 'class' => 'invert_filter', + ] ).'</a>'; if ($tab == 'remote_configuration') { $remote_configuration_tab['active'] = true; @@ -725,7 +812,7 @@ if ($id_agente) { // Create agent. ui_print_page_header( __('Agent manager'), - 'images/bricks.png', + 'images/agent.png', false, 'create_agent', true, @@ -2402,7 +2489,7 @@ switch ($tab) { width: 600, title: 'Changing the module name of a satellite agent', open: function(){ - $('#dialog').html('<br><table><tr><td><img src="images/icono-warning-triangulo.png" style="float:left;margin-left:25px;"></td><td><p style="float:right;font-style:nunito;font-size:11pt;margin-right:50px;margin-left:40px;"><span style="font-weight:bold;font-size:12pt;">Warning</span> <br>The names of the modules of a satellite should not be altered manually. Unless you are absolutely certain of the process, do not alter these names.</p></td></tr></table>'); + $('#dialog').html('<br><table><tr><td><img src="images/icono-warning-triangulo.png" class="float-left mrgn_lft_25px"></td><td><p id="p_configurar_agente" ><span class="font_bold font_12pt">Warning</span> <br>The names of the modules of a satellite should not be altered manually. Unless you are absolutely certain of the process, do not alter these names.</p></td></tr></table>'); }, buttons: [{ text: "Ok", @@ -2436,7 +2523,7 @@ switch ($tab) { width: 650, title: 'Changing snmp module name', open: function(){ - $('#dialog').html('<br><table><tr><td><img src="images/icono-warning-triangulo.png" style="float:left;margin-left:25px;margin-top:30px;"></td><td><p style="float:right;font-style:nunito;font-size:11pt;margin-right:50px;margin-left:40px;"><span style="font-weight:bold;font-size:12pt;">Warning</span> <br> If you change the name of this module, various features associated with this module, such as network maps, interface graphs or other network modules, may no longer work. If you are not completely sure of the process, please do not change the name of the module. </p></td></tr></table>'); + $('#dialog').html('<br><table><tr><td><img src="images/icono-warning-triangulo.png" class="warning_triangulo"></td><td><p id="p_configurar_agente"><span class="font_bold font_12pt">Warning</span> <br> If you change the name of this module, various features associated with this module, such as network maps, interface graphs or other network modules, may no longer work. If you are not completely sure of the process, please do not change the name of the module. </p></td></tr></table>'); }, buttons: [{ text: "Ok", diff --git a/pandora_console/godmode/agentes/configure_field.php b/pandora_console/godmode/agentes/configure_field.php index 0978f3654b..4a6b086d63 100755 --- a/pandora_console/godmode/agentes/configure_field.php +++ b/pandora_console/godmode/agentes/configure_field.php @@ -49,20 +49,20 @@ $table->style[2] = 'font-weight: bold'; $table->style[4] = 'font-weight: bold'; $table->style[6] = 'font-weight: bold'; -echo "<div id='message_set_password' title='".__('Agent Custom Fields Information')."' style='display:none;'>"; -echo "<p style='text-align: center;font-weight: bold;'>".__('You cannot set the Password type until you clear the combo values and click on update button.').'</p>'; +echo "<div id='message_set_password' title='".__('Agent Custom Fields Information')."' class='invisible'>"; +echo "<p class='center bolder'>".__('You cannot set the Password type until you clear the combo values and click on update button.').'</p>'; echo '</div>'; -echo "<div id='message_set_combo' title='".__('Agent Custom Fields Information')."' style='display:none;'>"; -echo "<p style='text-align: center;font-weight: bold;'>".__('You cannot unset the enable combo until you clear the combo values and click on update.').'</p>'; +echo "<div id='message_set_combo' title='".__('Agent Custom Fields Information')."' class='invisible'>"; +echo "<p class='center bolder'>".__('You cannot unset the enable combo until you clear the combo values and click on update.').'</p>'; echo '</div>'; -echo "<div id='message_no_set_password' title='".__('Agent Custom Fields Information')."' style='display:none;'>"; -echo "<p style='text-align: center;font-weight: bold;'>".__('If you select Enabled combo the Password type will be disabled.').'</p>'; +echo "<div id='message_no_set_password' title='".__('Agent Custom Fields Information')."' class='invisible'>"; +echo "<p class='center bolder'>".__('If you select Enabled combo the Password type will be disabled.').'</p>'; echo '</div>'; -echo "<div id='message_no_set_combo' title='".__('Agent Custom Fields Information')."' style='display:none;'>"; -echo "<p style='text-align: center;font-weight: bold;'>".__('If you select Passord type the Enabled combo will be disabled.').'</p>'; +echo "<div id='message_no_set_combo' title='".__('Agent Custom Fields Information')."' class='invisible'>"; +echo "<p class='center bolder'>".__('If you select Passord type the Enabled combo will be disabled.').'</p>'; echo '</div>'; diff --git a/pandora_console/godmode/agentes/fields_manager.php b/pandora_console/godmode/agentes/fields_manager.php index da6b192dd5..3fd8db3849 100644 --- a/pandora_console/godmode/agentes/fields_manager.php +++ b/pandora_console/godmode/agentes/fields_manager.php @@ -141,14 +141,18 @@ foreach ($fields as $field) { $data[1] = '<b>'.$field['name'].'</b>'; if ($field['display_on_front']) { - $data[2] = html_print_image('images/tick.png', true); + $data[2] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']); } else { - $data[2] = html_print_image('images/icono_stop.png', true, ['style' => 'width:21px;height:21px;']); + $data[2] = html_print_image( + 'images/icono_stop.png', + true, + ['style' => 'width:21px;height:21px;'] + ); } $table->cellclass[][3] = 'action_buttons'; - $data[3] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configure_field&id_field='.$field['id_field'].'">'.html_print_image('images/config.png', true, ['alt' => __('Edit'), 'title' => __('Edit'), 'border' => '0']).'</a>'; - $data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete'), 'border' => '0']).'</a>'; + $data[3] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configure_field&id_field='.$field['id_field'].'">'.html_print_image('images/config.png', true, ['alt' => __('Edit'), 'title' => __('Edit'), 'border' => '0', 'class' => 'invert_filter']).'</a>'; + $data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete'), 'border' => '0', 'class' => 'invert_filter']).'</a>'; array_push($table->data, $data); } diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 430a3bf2a7..909930a4e0 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -32,7 +32,16 @@ if (($ag_group == -1) && ($group_id != 0)) { $ag_group = $group_id; } -if (! check_acl($config['id_user'], 0, 'AW') && ! check_acl($config['id_user'], 0, 'AD')) { +if (! check_acl( + $config['id_user'], + 0, + 'AW' +) && ! check_acl( + $config['id_user'], + 0, + 'AD' +) +) { db_pandora_audit( 'ACL Violation', 'Trying to access agent manager' @@ -51,7 +60,14 @@ $search = get_parameter('search', ''); $tab = 'view'; // Setup tab. -$viewtab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente">'.html_print_image('images/operation.png', true, ['title' => __('View')]).'</a>'; +$viewtab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente">'.html_print_image( + 'images/eye_show.png', + true, + [ + 'title' => __('View'), + 'class' => 'invert_filter', + ] +).'</a>'; $viewtab['operation'] = true; @@ -60,10 +76,19 @@ $viewtab['active'] = false; $onheader = ['view' => $viewtab]; // Header. -ui_print_page_header(__('Agents defined in %s', get_product_name()), 'images/agent_mc.png', false, '', true, $onheader); +ui_print_page_header( + __('Agents defined in %s', get_product_name()), + 'images/agent.png', + false, + '', + true, + $onheader +); if (is_central_policies_on_node()) { - ui_print_warning_message(__('This node is configured with centralized mode. To delete an agent go to metaconsole.')); + ui_print_warning_message( + __('This node is configured with centralized mode. To delete an agent go to metaconsole.') + ); } // Perform actions. @@ -72,9 +97,13 @@ $enable_agent = (int) get_parameter('enable_agent'); $disable_agent = (int) get_parameter('disable_agent'); if ($disable_agent != 0) { - $server_name = db_get_row_sql('select server_name from tagente where id_agente = '.$disable_agent); + $server_name = db_get_row_sql( + 'select server_name from tagente where id_agente = '.$disable_agent + ); } else if ($enable_agent != 0) { - $server_name = db_get_row_sql('select server_name from tagente where id_agente = '.$enable_agent); + $server_name = db_get_row_sql( + 'select server_name from tagente where id_agente = '.$enable_agent + ); } @@ -100,32 +129,68 @@ if ($agent_to_delete) { exit; } - ui_print_result_message($result, __('Success deleted agent.'), __('Could not be deleted.')); + ui_print_result_message( + $result, + __('Success deleted agent.'), + __('Could not be deleted.') + ); if (enterprise_installed()) { // Check if the remote config file still exist. if (isset($config['remote_config'])) { - enterprise_include_once('include/functions_config_agents.php'); - if (enterprise_hook('config_agents_has_remote_configuration', [$id_agente])) { - ui_print_error_message(__('Maybe the files conf or md5 could not be deleted')); + enterprise_include_once( + 'include/functions_config_agents.php' + ); + if (enterprise_hook( + 'config_agents_has_remote_configuration', + [$id_agente] + ) + ) { + ui_print_error_message( + __('Maybe the files conf or md5 could not be deleted') + ); } } } } if ($enable_agent) { - $result = db_process_sql_update('tagente', ['disabled' => 0], ['id_agente' => $enable_agent]); + $result = db_process_sql_update( + 'tagente', + ['disabled' => 0], + ['id_agente' => $enable_agent] + ); $alias = io_safe_output(agents_get_alias($enable_agent)); if ($result) { // Update the agent from the metaconsole cache. enterprise_include_once('include/functions_agents.php'); $values = ['disabled' => 0]; - enterprise_hook('agent_update_from_cache', [$enable_agent, $values, $server_name]); - enterprise_hook('config_agents_update_config_token', [$enable_agent, 'standby', 0]); - db_pandora_audit('Agent management', 'Enable '.$alias); + enterprise_hook( + 'agent_update_from_cache', + [ + $enable_agent, + $values, + $server_name, + ] + ); + enterprise_hook( + 'config_agents_update_config_token', + [ + $enable_agent, + 'standby', + 0, + ] + ); + db_pandora_audit( + 'Agent management', + 'Enable '.$alias + ); } else { - db_pandora_audit('Agent management', 'Fail to enable '.$alias); + db_pandora_audit( + 'Agent management', + 'Fail to enable '.$alias + ); } ui_print_result_message( @@ -143,12 +208,32 @@ if ($disable_agent) { // Update the agent from the metaconsole cache. enterprise_include_once('include/functions_agents.php'); $values = ['disabled' => 1]; - enterprise_hook('agent_update_from_cache', [$disable_agent, $values, $server_name]); - enterprise_hook('config_agents_update_config_token', [$disable_agent, 'standby', 1]); + enterprise_hook( + 'agent_update_from_cache', + [ + $disable_agent, + $values, + $server_name, + ] + ); + enterprise_hook( + 'config_agents_update_config_token', + [ + $disable_agent, + 'standby', + 1, + ] + ); - db_pandora_audit('Agent management', 'Disable '.$alias); + db_pandora_audit( + 'Agent management', + 'Disable '.$alias + ); } else { - db_pandora_audit('Agent management', 'Fail to disable '.$alias); + db_pandora_audit( + 'Agent management', + 'Fail to disable '.$alias + ); } ui_print_result_message( @@ -158,7 +243,7 @@ if ($disable_agent) { ); } -echo "<table cellpadding='4' cellspacing='4' class='databox filters' width='100%' style='font-weight: bold; margin-bottom: 10px;'> +echo "<table cellpadding='4' cellspacing='4' class='databox filters font_bold margin-bottom-10' width='100%'> <tr>"; echo "<form method='post' action='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'>"; @@ -167,14 +252,33 @@ echo '<td>'; echo __('Group').' '; $own_info = get_user_info($config['id_user']); -if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AR') && !check_acl($config['id_user'], 0, 'AW')) { +if (!$own_info['is_admin'] && !check_acl( + $config['id_user'], + 0, + 'AR' +) && !check_acl($config['id_user'], 0, 'AW') +) { $return_all_group = false; } else { $return_all_group = true; } echo '<div class="w250px inline">'; -html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false); +html_print_select_groups( + false, + 'AR', + $return_all_group, + 'ag_group', + $ag_group, + 'this.form.submit();', + '', + 0, + false, + false, + true, + '', + false +); echo '</div>'; echo '<td>'; echo __('Show Agents').' '; @@ -183,14 +287,21 @@ $fields = [ 1 => __('Only disabled'), 0 => __('Only enabled'), ]; -html_print_select($fields, 'disabled', $disabled, 'this.form.submit()'); +html_print_select( + $fields, + 'disabled', + $disabled, + 'this.form.submit()' +); echo '</td>'; echo '<td>'; echo __('Operative System').' '; -$pre_fields = db_get_all_rows_sql('select distinct(tagente.id_os),tconfig_os.name from tagente,tconfig_os where tagente.id_os = tconfig_os.id_os'); +$pre_fields = db_get_all_rows_sql( + 'select distinct(tagente.id_os),tconfig_os.name from tagente,tconfig_os where tagente.id_os = tconfig_os.id_os' +); $fields = []; foreach ($pre_fields as $key => $value) { @@ -203,13 +314,23 @@ echo '</td>'; echo '<td>'; echo __('Recursion').' '; -html_print_checkbox('recursion', 1, $recursion, false, false, 'this.form.submit()'); +html_print_checkbox( + 'recursion', + 1, + $recursion, + false, + false, + 'this.form.submit()' +); echo '</td><td>'; echo __('Search').' '; html_print_input_text('search', $search, '', 12); -echo ui_print_help_tip(__('Search filter by alias, name, description, IP address or custom fields content'), true); +echo ui_print_help_tip( + __('Search filter by alias, name, description, IP address or custom fields content'), + true +); echo '</td><td>'; echo "<input name='srcbutton' type='submit' class='sub search' value='".__('Search')."'>"; @@ -495,7 +616,7 @@ if ($agents !== false) { echo '<th>'.__('Type').'</th>'; echo '<th>'.__('Group').ui_get_sorting_arrows($url_up_group, $url_down_group, $selectGroupUp, $selectGroupDown).'</th>'; echo '<th>'.__('Description').'</th>'; - echo "<th style='text-align:left'>".__('Actions').'</th>'; + echo "<th class='context_help_body'>".__('Actions').'</th>'; echo '</tr></thead>'; $color = 1; @@ -503,16 +624,35 @@ if ($agents !== false) { $iterator = 0; foreach ($agents as $agent) { // Begin Update tagente.remote 0/1 with remote agent function return. - if (enterprise_hook('config_agents_has_remote_configuration', [$agent['id_agente']])) { - db_process_sql_update('tagente', ['remote' => 1], 'id_agente = '.$agent['id_agente'].''); + if (enterprise_hook( + 'config_agents_has_remote_configuration', + [$agent['id_agente']] + ) + ) { + db_process_sql_update( + 'tagente', + ['remote' => 1], + 'id_agente = '.$agent['id_agente'].'' + ); } else { db_process_sql_update('tagente', ['remote' => 0], 'id_agente = '.$agent['id_agente'].''); } // End Update tagente.remote 0/1 with remote agent function return. - $all_groups = agents_get_all_groups_agent($agent['id_agente'], $agent['id_grupo']); - $check_aw = check_acl_one_of_groups($config['id_user'], $all_groups, 'AW'); - $check_ad = check_acl_one_of_groups($config['id_user'], $all_groups, 'AD'); + $all_groups = agents_get_all_groups_agent( + $agent['id_agente'], + $agent['id_grupo'] + ); + $check_aw = check_acl_one_of_groups( + $config['id_user'], + $all_groups, + 'AW' + ); + $check_ad = check_acl_one_of_groups( + $config['id_user'], + $all_groups, + 'AD' + ); $cluster = db_get_row_sql('select id from tcluster where id_agent = '.$agent['id_agente']); @@ -593,16 +733,28 @@ if ($agents !== false) { if ($agent['quiet']) { echo ' '; - html_print_image('images/dot_blue.png', false, ['border' => '0', 'title' => __('Quiet'), 'alt' => '']); + html_print_image( + 'images/dot_blue.png', + false, + [ + 'border' => '0', + 'title' => __('Quiet'), + 'alt' => '', + ] + ); } if ($in_planned_downtime) { - ui_print_help_tip(__('Agent in planned downtime'), false, 'images/minireloj-16.png'); + ui_print_help_tip( + __('Agent in planned downtime'), + false, + $config['image']['minireloj_16'] + ); echo '</em>'; } - echo '</span><div class="left actions" style="visibility: hidden; clear: left">'; + echo '</span><div class="left actions clear_left">'; if ($check_aw) { if ($agent['id_os'] == CLUSTER_OS_ID) { if (enterprise_installed()) { @@ -664,7 +816,15 @@ if ($agents !== false) { enterprise_include_once('include/functions_config_agents.php'); if (enterprise_hook('config_agents_has_remote_configuration', [$agent['id_agente']])) { echo "<a href='index.php?".'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'tab=remote_configuration&'.'id_agente='.$agent['id_agente']."&disk_conf=1'>"; - echo html_print_image('images/application_edit.png', true, ['align' => 'middle', 'title' => __('Edit remote config')]); + echo html_print_image( + 'images/application_edit.png', + true, + [ + 'align' => 'middle', + 'title' => __('Edit remote config'), + 'class' => 'invert_filter', + ] + ); echo '</a>'; } } @@ -702,7 +862,7 @@ if ($agents !== false) { $offsetArg = $offset; } - echo "<td class='$tdcolor action_buttons' align='left' style='width:7%' valign='middle'>"; + echo "<td class='$tdcolor action_buttons' align='left' width=7% valign='middle'>"; if ($agent['disabled']) { echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente& @@ -724,7 +884,7 @@ if ($agents !== false) { echo ' onClick="if (!confirm(\' '.__('You are going to disable a cluster agent. Are you sure?').'\')) return false;">'; } - echo html_print_image('images/lightbulb.png', true, ['alt' => __('Disable agent'), 'title' => __('Disable agent')]).'</a>'; + echo html_print_image('images/lightbulb.png', true, ['alt' => __('Disable agent'), 'title' => __('Disable agent'), 'class' => 'invert_filter']).'</a>'; } if ($check_aw && !is_central_policies_on_node()) { @@ -737,7 +897,7 @@ if ($agents !== false) { echo ' onClick="if (!confirm(\' '.__('WARNING! - You are going to delete a cluster agent. Are you sure?').'\')) return false;">'; } - echo html_print_image('images/cross.png', true, ['border' => '0']).'</a>'; + echo html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter']).'</a>'; } echo '</td>'; @@ -752,7 +912,7 @@ if ($agents !== false) { if (check_acl($config['id_user'], 0, 'AW')) { // Create agent button. - echo '<div style="text-align: right;">'; + echo '<div class="action-buttons">'; echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">'; html_print_submit_button( __('Create agent'), diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index 1d900b192d..91c6395b96 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -45,7 +45,7 @@ if (!isset($policy_page)) { echo '<form id="create_module_type" method="post" action="'.$url.'">'; echo '<table width="100%" cellpadding="2" cellspacing="2" class="databox filters" >'; -echo "<tr><td class='datos' style='width:20%; font-weight: bold;'>"; +echo "<tr><td class='datos bolder w20p'>"; echo __('Search').' '.html_print_input_text( 'search_string', $search_string, @@ -63,10 +63,10 @@ if (($policy_page) || (isset($agent))) { } echo '</td>'; -echo "<td class='datos' style='width:10%'>"; +echo "<td class='datos w10p'>"; html_print_submit_button(__('Filter'), 'filter', false, 'class="sub search"'); echo '</td>'; -echo "<td class='datos' style='width:10%'></td>"; +echo "<td class='datos w10p'></td>"; echo '</form>'; // Check if there is at least one server of each type available to assign that // kind of modules. If not, do not show server type in combo. @@ -162,7 +162,7 @@ if (($policy_page) || (isset($agent))) { // Create module/type combo. echo '<form id="create_module_type" method="post" action="'.$url.'">'; if (!$policy_page) { - echo '<td class="datos" style="font-weight: bold; width:20%;">'; + echo '<td class="datos w20p bolder">'; echo __('Show in hierachy mode'); if ($checked == 'true') { $checked = true; @@ -181,7 +181,7 @@ if (($policy_page) || (isset($agent))) { echo '</td>'; } - echo '<td class="datos" style="font-weight: bold; width:20%;">'; + echo '<td class="datos w20p bolder">'; echo __('<p>Type</p>'); html_print_select( $modules, @@ -199,7 +199,7 @@ if (($policy_page) || (isset($agent))) { ); html_print_input_hidden('edit_module', 1); echo '</td>'; - echo '<td class="datos" style="width:10%;">'; + echo '<td class="datos w10p">'; echo '<input align="right" name="updbutton" type="submit" class="sub next" value="'.__('Create').'">'; echo '</td>'; echo '</tr>'; @@ -210,9 +210,9 @@ if (($policy_page) || (isset($agent))) { echo '</table>'; if (!$config['disable_help']) { - echo '<div style="text-align: right; width: 100%;padding-top:10px;padding-bottom:10px">'; + echo '<div class="disable_help">'; echo '<strong>'; - echo "<a style='color: #373737;' target='_blank' href='http://pandorafms.com/Library/Library/'>".__('Get more modules on Monitoring Library').'</a>'; + echo "<a class='color-black-grey' target='_blank' href='http://pandorafms.com/Library/Library/'>".__('Get more modules on Monitoring Library').'</a>'; echo '</strong>'; echo '</div>'; } @@ -899,7 +899,10 @@ foreach ($modules as $module) { $data[0] .= html_print_image( 'images/icono_escuadra.png', true, - ['style' => 'padding-bottom: inherit;'] + [ + 'style' => 'padding-bottom: inherit;', + 'class' => 'invert_filter', + ] ).'  '; } @@ -968,7 +971,7 @@ foreach ($modules as $module) { $img = 'images/policies_brick.png'; $title = '('.__('Adopted').') '.$policyInfo['name_policy']; } else { - $img = 'images/policies.png'; + $img = 'images/policies_mc.png'; $title = $policyInfo['name_policy']; } } else { @@ -1078,6 +1081,7 @@ foreach ($modules as $module) { [ 'alt' => __('Disable module'), 'title' => __('Disable module'), + 'class' => 'invert_filter', ] ).'</a>'; } @@ -1088,7 +1092,10 @@ foreach ($modules as $module) { $data[8] .= html_print_image( 'images/copy.png', true, - ['title' => __('Duplicate')] + [ + 'title' => __('Duplicate'), + 'class' => 'invert_filter', + ] ); $data[8] .= '</a> '; @@ -1097,9 +1104,12 @@ foreach ($modules as $module) { if ($numericModules[$type] === true) { $data[8] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&fix_module='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; $data[8] .= html_print_image( - 'images/chart_curve.png', + 'images/chart.png', true, - ['title' => __('Normalize')] + [ + 'title' => __('Normalize'), + 'class' => 'invert_filter', + ] ); $data[8] .= '</a>'; } @@ -1119,9 +1129,12 @@ foreach ($modules as $module) { $data[8] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_components&create_network_from_module=1&id_agente='.$id_agente.'&create_module_from='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; $data[8] .= html_print_image( - 'images/network.png', + 'images/op_network.png', true, - ['title' => __('Create network component')] + [ + 'title' => __('Create network component'), + 'class' => 'invert_filter', + ] ); $data[8] .= '</a> '; } else { @@ -1141,7 +1154,10 @@ foreach ($modules as $module) { $data[9] .= html_print_image( 'images/cross.png', true, - ['title' => __('Delete')] + [ + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] ); $data[9] .= '</a> '; } diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index 508cdb14f7..feeba60aa9 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -19,7 +19,7 @@ require_once $config['homedir'].'/include/graphs/functions_d3.php'; include_javascript_d3(); -function prepend_table_simple($row, $id=false) +global $config;function prepend_table_simple($row, $id=false) { global $table_simple; @@ -119,7 +119,7 @@ function add_component_selection($id_network_component_type) ); $data[1] .= '</span>'; $data[1] .= ' <span id="component_loading" class="invisible">'; - $data[1] .= html_print_image('images/spinner.png', true); + $data[1] .= html_print_image('images/spinner.gif', true); $data[1] .= '</span>'; $table_simple->colspan['module_component'][1] = 3; @@ -210,7 +210,10 @@ if (!empty($id_agent_module) && isset($id_agente)) { $table_simple->data[0][1] .= html_print_image( 'images/cross.png', true, - ['title' => __('Delete module')] + [ + 'title' => __('Delete module'), + 'class' => 'invert_filter', + ] ); $table_simple->data[0][1] .= '</a> '; } @@ -635,7 +638,14 @@ $table_advanced->data[3][1] = html_print_extended_select_for_time( $classdisabledBecauseInPolicy, $disabledBecauseInPolicy ); -$table_advanced->data[3][1] .= '<a onclick=advanced_option_dynamic()>'.html_print_image('images/cog.png', true, ['title' => __('Advanced options Dynamic Threshold')]).'</a>'; +$table_advanced->data[3][1] .= '<a onclick=advanced_option_dynamic()>'.html_print_image( + 'images/cog.png', + true, + [ + 'title' => __('Advanced options Dynamic Threshold'), + 'class' => 'invert_filter', + ] +).'</a>'; $table_advanced->cellclass[3][2] = 'hide_dinamic'; $table_advanced->cellclass[3][3] = 'hide_dinamic'; @@ -717,6 +727,10 @@ $table_advanced->colspan[4][4] = 3; // FF stands for Flip-flop. +$table_advanced->colspan[5][1] = 5; +$table_advanced->cellclass[5][1] = 'font_bold'; + + $table_advanced->data[5][0] = __('FF threshold').' '; $table_advanced->data[5][1] .= __('Keep counters'); @@ -933,10 +947,24 @@ if (!tags_has_user_acl_tags($config['id_user'])) { } } -$table_advanced->data[7][2] = html_print_image('images/darrowright.png', true, ['id' => 'right', 'title' => __('Add tags to module')]); -// html_print_input_image ('add', 'images/darrowright.png', 1, '', true, array ('title' => __('Add tags to module'))); -$table_advanced->data[7][2] .= '<br><br><br><br>'.html_print_image('images/darrowleft.png', true, ['id' => 'left', 'title' => __('Delete tags to module')]); -// html_print_input_image ('add', 'images/darrowleft.png', 1, '', true, array ('title' => __('Delete tags to module'))); +$table_advanced->data[7][2] = html_print_image( + 'images/darrowright.png', + true, + [ + 'id' => 'right', + 'title' => __('Add tags to module'), + 'class' => 'invert_filter', + ] +); +$table_advanced->data[7][2] .= '<br><br><br><br>'.html_print_image( + 'images/darrowleft.png', + true, + [ + 'id' => 'left', + 'title' => __('Delete tags to module'), + 'class' => 'invert_filter', + ] +); $table_advanced->data[7][3] = '<b>'.__('Tags selected').'</b>'; $table_advanced->data[7][4] = html_print_select_from_sql( "SELECT a.id_tag, name @@ -1002,7 +1030,7 @@ $table_advanced->data[8][3] = __('Cascade Protection Services'); $table_advanced->colspan[8][4] = 3; $table_advanced->data[8][4] = html_print_select($cps_array, 'cps_module', $cps_module, '', '', 0, true, false, true, '', $disabledBecauseInPolicy); -$textarea_custom_style = ' style="min-height: 0px;"'; +$textarea_custom_style = ' class="min-height-0px"'; $table_advanced->data[9][0] = __('Description'); $table_advanced->colspan[9][1] = 6; @@ -1128,7 +1156,7 @@ $table_macros->data = []; $table_macros->style = []; $table_macros->style[0] = 'font-weight: bold;'; $table_macros->style[2] = 'font-weight: bold;'; -$table_macros->style[5] = 'width: 10px'; +$table_macros->style[5] = 'font-weight: bold;'; $table_macros->colspan = []; $macro_count = 0; @@ -1140,7 +1168,7 @@ if (isset($module_macros)) { $table_macros->data[$macro_count][2] = __('Value'); $table_macros->data[$macro_count][3] = html_print_input_text('module_macro_values[]', $macro_value, '', 50, 60, true, $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy); if (!$disabledBecauseInPolicy) { - $table_macros->data[$macro_count][4] = '<a href="javascript: delete_macro('.$macro_count.');">'.html_print_image('images/cross.png', true).'</a>'; + $table_macros->data[$macro_count][4] = '<a href="javascript: delete_macro('.$macro_count.');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>'; } $macro_count++; @@ -1149,7 +1177,7 @@ if (isset($module_macros)) { } if (!$disabledBecauseInPolicy) { - $table_macros->data[$macro_count][0] = '<span>'.__('Custom macros').'</span> <a href="javascript:add_macro();">'.html_print_image('images/add.png', true).'</a>'; + $table_macros->data[$macro_count][0] = '<span>'.__('Custom macros').'</span> <a href="javascript:add_macro();">'.html_print_image('images/add.png', true, ['class' => 'invert_filter']).'</a>'; $table_macros->colspan[$macro_count][0] = 5; } @@ -1211,7 +1239,7 @@ $table_new_relations->data[0][6] = html_print_button( 'class="sub add"', true ); -$table_new_relations->data[0][6] .= "  <div id='add_relation_status' style='display: inline;'></div>"; +$table_new_relations->data[0][6] .= "  <div id='add_relation_status' class='inline_line'></div>"; // Relationship list. $table_relations = new stdClass(); @@ -1237,14 +1265,23 @@ $table_relations->data[-1][0] = ''; $table_relations->data[-1][1] = ''; $table_relations->data[-1][2] = ''; $table_relations->data[-1][3] = '<a id="disable_updates_button" class="alpha50" href="">'; -$table_relations->data[-1][3] .= html_print_image('images/lock.png', true).'</a>'; +$table_relations->data[-1][3] .= html_print_image( + 'images/lock_mc.png', + true +).'</a>'; $table_relations->data[-1][4] = '<a id="delete_relation_button" href="">'; -$table_relations->data[-1][4] .= html_print_image('images/cross.png', true).'</a>'; +$table_relations->data[-1][4] .= html_print_image( + 'images/cross.png', + true, + ['class' => 'invert_filter'] +).'</a>'; $relations_count = 0; if ($id_agent_module) { - $module_relations = modules_get_relations(['id_module' => $id_agent_module]); + $module_relations = modules_get_relations( + ['id_module' => $id_agent_module] + ); if (!$module_relations) { $module_relations = []; @@ -1280,13 +1317,28 @@ if ($id_agent_module) { // Agent name. $table_relations->data[$relations_count][0] = $agent_name; // Module name. - $table_relations->data[$relations_count][1] = "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente=".$agent_id.'&tab=module&edit_module=1&id_agent_module='.$module_id."'>".ui_print_truncate_text($module_name, 'module_medium', true, true, true, '[…]').'</a>'; + $table_relations->data[$relations_count][1] = "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente=".$agent_id.'&tab=module&edit_module=1&id_agent_module='.$module_id."'>".ui_print_truncate_text( + $module_name, + 'module_medium', + true, + true, + true, + '[…]' + ).'</a>'; // Type. $table_relations->data[$relations_count][2] = ($module_relation['type'] === 'direct') ? __('Direct') : __('Failover'); // Lock relationship updates. - $table_relations->data[$relations_count][3] = '<a id="disable_updates_button" class="'.$disabled_update_class.'"href="javascript: change_lock_relation('.$relations_count.', '.$module_relation['id'].');">'.html_print_image('images/lock.png', true).'</a>'; + $table_relations->data[$relations_count][3] = '<a id="disable_updates_button" class="'.$disabled_update_class.'"href="javascript: change_lock_relation('.$relations_count.', '.$module_relation['id'].');">'.html_print_image( + 'images/lock_mc.png', + true, + ['class' => 'invert_filter'] + ).'</a>'; // Delete relationship. - $table_relations->data[$relations_count][4] = '<a id="delete_relation_button" href="javascript: delete_relation('.$relations_count.', '.$module_relation['id'].');">'.html_print_image('images/cross.png', true).'</a>'; + $table_relations->data[$relations_count][4] = '<a id="delete_relation_button" href="javascript: delete_relation('.$relations_count.', '.$module_relation['id'].');">'.html_print_image( + 'images/cross.png', + true, + ['class' => 'invert_filter'] + ).'</a>'; $relations_count++; } } @@ -1711,14 +1763,14 @@ function add_new_relation () { '<td id="module_relations-' + relationsCount + '-0"><b>' + agent_b_name + '</b></td>' + '<td id="module_relations-' + relationsCount + '-1">' + module_b_name + '</td>' + '<td id="module_relations-' + relationsCount + '-2">' + relation_type + '</td>' + - '<td id="module_relations-' + relationsCount + '-3" style="width: 10%; text-align: center;">' + + '<td id="module_relations-' + relationsCount + '-3" class="w10p center">' + '<a id="disable_updates_button" class="alpha50" href="javascript: change_lock_relation(' + relationsCount + ', ' + data + ');">' + - '<?php echo html_print_image('images/lock.png', true); ?>' + + '<?php echo html_print_image('images/lock_mc.png', true, ['class' => 'invert_filter']); ?>' + '</a>' + '</td>' + - '<td id="module_relations-' + relationsCount + '-4" style="width: 10%; text-align: center;">' + + '<td id="module_relations-' + relationsCount + '-4" class="w10p center">' + '<a id="delete_relation_button" href="javascript: delete_relation(' + relationsCount + ', ' + data + ');">' + - '<?php echo html_print_image('images/cross.png', true); ?>' + + '<?php echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']); ?>' + '</a>' + '</td>' + '</tr>'; diff --git a/pandora_console/godmode/agentes/module_manager_editor_network.php b/pandora_console/godmode/agentes/module_manager_editor_network.php index 72e32ea301..be00db6518 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_network.php +++ b/pandora_console/godmode/agentes/module_manager_editor_network.php @@ -40,7 +40,7 @@ html_print_input_hidden( 'custom_action', urlencode( base64_encode( - ' <a href="javascript:setOID()"><img src="'.ui_get_full_url('images').'/input_filter.disabled.png" title="'.__('Use this OID').'" style="vertical-align: middle;"></img></a>' + ' <a href="javascript:setOID()"><img src="'.ui_get_full_url('images').'/input_filter.disabled.png" title="'.__('Use this OID').'" class="vertical_middle"></img></a>' ) ), false @@ -225,7 +225,7 @@ push_table_simple($data, 'snmp_1'); $data = []; $data[0] = __('SNMP OID'); -$data[1] = '<span class="left"; style="width: 50%">'; +$data[1] = '<span class="left w50p">'; $data[1] .= html_print_input_text( 'snmp_oid', $snmp_oid, @@ -261,7 +261,7 @@ $data[1] .= html_print_image( ] ); $data[1] .= '</span>'; -$data[1] .= '</span><span class="right" style="width: 50%; text-align: right">'; +$data[1] .= '</span><span class="right w50p right">'; $data[1] .= html_print_button( __('SNMP walk'), 'snmp_walk', diff --git a/pandora_console/godmode/agentes/module_manager_editor_plugin.php b/pandora_console/godmode/agentes/module_manager_editor_plugin.php index 257bed40b2..62bac54340 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_plugin.php +++ b/pandora_console/godmode/agentes/module_manager_editor_plugin.php @@ -71,7 +71,7 @@ if (!empty($id_plugin)) { $preload = ''; } -$data[2] = '<span style="font-weight: normal;" id="plugin_description">'.$preload.'</span>'; +$data[2] = '<span class="normal" id="plugin_description">'.$preload.'</span>'; push_table_simple($data, 'plugin_1'); diff --git a/pandora_console/godmode/agentes/module_manager_editor_prediction.php b/pandora_console/godmode/agentes/module_manager_editor_prediction.php index dc7c639592..7c319fa531 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_prediction.php +++ b/pandora_console/godmode/agentes/module_manager_editor_prediction.php @@ -108,7 +108,7 @@ if ($module_service_synthetic_selector !== ENTERPRISE_NOT_HOOK) { $data[0] = ''; } -$data[1] = '<div id="module_data" style="top:1em; float:left; width:50%;">'; +$data[1] = '<div id="module_data" class="w50p float-left top-1em">'; $data[1] .= html_print_label(__('Agent'), 'agent_name', true).'<br/>'; // Get module and agent of the target prediction module diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php index 662ff019bb..e2c645a414 100644 --- a/pandora_console/godmode/agentes/planned_downtime.editor.php +++ b/pandora_console/godmode/agentes/planned_downtime.editor.php @@ -29,6 +29,8 @@ global $config; + + check_login(); $agent_d = check_acl($config['id_user'], 0, 'AD'); @@ -53,7 +55,10 @@ $buttons = [ 'text' => "<a href='index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list'>".html_print_image( 'images/list.png', true, - ['title' => __('List')] + [ + 'title' => __('List'), + 'class' => 'invert_filter', + ] ).'</a>', ]; @@ -745,7 +750,7 @@ $days = array_combine(range(1, 31), range(1, 31)); $table->data[5][0] = __('Configure the time').' '; ; $table->data[5][1] = " - <div id='once_time' style='display: none;'> + <div id='once_time' class='invisible'> <table> <tr> <td>".__('From:').'</td> @@ -757,7 +762,7 @@ $table->data[5][1] = " </tr> </table> </div> - <div id='periodically_time' style='display: none;'> + <div id='periodically_time' class='invisible'> <table> <tr><td>".ui_get_using_system_timezone_warning().'</td></tr> <tr> @@ -780,7 +785,7 @@ $table->data[5][1] = " </tr> <tr> <td colspan='2'> - <table id='weekly_item' style='display: none;'> + <table id='weekly_item' class='invisible'> <tr> <td>".__('Mon').html_print_checkbox('monday', 1, $monday, true, $disabled_in_execution).'</td> <td>'.__('Tue').html_print_checkbox('tuesday', 1, $tuesday, true, $disabled_in_execution).'</td> @@ -791,7 +796,7 @@ $table->data[5][1] = " <td>'.__('Sun').html_print_checkbox('sunday', 1, $sunday, true, $disabled_in_execution)."</td> </tr> </table> - <table id='monthly_item' style='display: none;'> + <table id='monthly_item' class='invisible'> <tr> <td>".__('From day:').'</td> <td>'.html_print_select( @@ -870,7 +875,7 @@ if ($id_downtime > 0) { html_print_table($table); html_print_input_hidden('id_agent', $id_agent); -echo '<div class="action-buttons" style="width: 100%">'; +echo '<div class="action-buttons w100p" >'; if ($id_downtime > 0) { html_print_input_hidden('update_downtime', 1); html_print_input_hidden('id_downtime', $id_downtime); @@ -894,7 +899,7 @@ echo '</div>'; echo '</form>'; if ($id_downtime > 0) { - echo "<td valign=top style='width:300px;padding-left:20px;'>"; + echo "<td valign=top class='w300px pdd_l_20px'>"; $filter_group = (int) get_parameter('filter_group', 0); @@ -950,9 +955,9 @@ if ($id_downtime > 0) { echo html_print_select($agents, 'id_agents[]', -1, '', _('Any'), -2, false, true, true, '', false, 'width: 180px;'); if ($type_downtime != 'quiet') { - echo '<div id="available_modules_selection_mode" style="padding-top:20px;display: none;">'; + echo '<div id="available_modules_selection_mode" class="invisible pdd_l_20px">'; } else { - echo '<div id="available_modules_selection_mode" style="padding-top:20px">'; + echo '<div id="available_modules_selection_mode" class="pdd_l_20px">'; } html_print_input_hidden('all_common_modules', ''); @@ -981,9 +986,9 @@ if ($id_downtime > 0) { ).'</h4>'; if ($type_downtime != 'quiet') { - echo '<div id="available_modules" style="display: none;">'; + echo '<div id="available_modules" class="invisible">'; } else { - echo '<div id="available_modules" style="">'; + echo '<div id="available_modules" >'; } echo html_print_select( @@ -1089,10 +1094,25 @@ if ($id_downtime > 0) { if ($type_downtime != 'disable_agents_alerts' && $type_downtime != 'disable_agents' ) { - $data[5] = '<a href="javascript:show_editor_module('.$downtime_agent['id_agente'].');">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Delete')]).'</a>'; + $data[5] = '<a href="javascript:show_editor_module('.$downtime_agent['id_agente'].');">'.html_print_image( + 'images/config.png', + true, + [ + 'border' => '0', + 'alt' => __('Delete'), + ] + ).'</a>'; } - $data[5] .= '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&id_agent='.$downtime_agent['id_agente'].'&delete_downtime_agent=1&id_downtime_agent='.$downtime_agent['id'].'&id_downtime='.$id_downtime.'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete')]).'</a>'; + $data[5] .= '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&id_agent='.$downtime_agent['id_agente'].'&delete_downtime_agent=1&id_downtime_agent='.$downtime_agent['id'].'&id_downtime='.$id_downtime.'">'.html_print_image( + 'images/cross.png', + true, + [ + 'border' => '0', + 'alt' => __('Delete'), + 'class' => 'invert_filter', + ] + ).'</a>'; } $table->data['agent_'.$downtime_agent['id_agente']] = $data; @@ -1110,7 +1130,7 @@ $table->style[0] = 'text-align: center;'; $table->data = []; $table->data['loading'] = []; $table->data['loading'][0] = html_print_image('images/spinner.gif', true); -echo "<div style='display: none;'>"; +echo "<div class='invisible'>"; html_print_table($table); echo '</div>'; @@ -1134,9 +1154,9 @@ $table->data['module'][1] = " </tr> </thead> <tbody> - <tr class='datos' id='template' style='display: none;'> - <td class='name_module' style=''></td> - <td class='cell_delete_button' style='text-align: right; width:10%;' id=''>".'<a class="link_delete" + <tr class='datos' id='template' class='invisible'> + <td class='name_module'></td> + <td class='cell_delete_button right w10p' id=''>".'<a class="link_delete" onclick="if(!confirm(\''.__('Are you sure?').'\')) return false;" href="">'.html_print_image( 'images/cross.png', @@ -1144,11 +1164,12 @@ $table->data['module'][1] = " [ 'border' => '0', 'alt' => __('Delete'), + 'class' => 'invert_filter', ] ).'</a>'."</td> </tr> <tr class='datos2' id='add_modules_row'> - <td class='datos2' style='' id=''>".__('Add Module:').' '.html_print_select( + <td class='datos2'id=''>".__('Add Module:').' '.html_print_select( [], 'modules', '', @@ -1157,36 +1178,40 @@ $table->data['module'][1] = " 0, true )."</td> - <td class='datos2 button_cell' style='text-align: right; width:10%;' id=''>".'<div id="add_button_div">'.'<a class="add_button" href="">'.html_print_image( + <td class='datos2 button_cell right w10p' id=''>".'<div id="add_button_div">'.'<a class="add_button" href="">'.html_print_image( 'images/add.png', true, [ 'border' => '0', 'alt' => __('Add'), + 'class' => 'invert_filter', ] -).'</a>'.'</div>'."<div id='spinner_add' style='display: none;'>".html_print_image('images/spinner.gif', true).'</div>'.'</td> +).'</a>'.'</div>'."<div id='spinner_add' class='invisible'>".html_print_image( + 'images/spinner.gif', + true +).'</div>'.'</td> </tr> </tbody></table>'; -echo "<div style='display: none;'>"; +echo "<div class='invisible'>"; html_print_table($table); echo '</div>'; -echo "<div style='display: none;'>"; +echo "<div class='invisible'>"; echo "<div id='spinner_template'>"; html_print_image('images/spinner.gif'); echo '</div>'; echo '</div>'; -echo "<div id='some_modules_text' style='display: none;'>"; +echo "<div id='some_modules_text' class='invisible'>"; echo __('Some modules'); echo '</div>'; -echo "<div id='some_modules_text' style='display: none;'>"; +echo "<div id='some_modules_text' class='invisible'>"; echo __('Some modules'); echo '</div>'; -echo "<div id='all_modules_text' style='display: none;'>"; +echo "<div id='all_modules_text' class='invisible'>"; echo __('All modules'); echo '</div>'; diff --git a/pandora_console/godmode/agentes/planned_downtime.list.php b/pandora_console/godmode/agentes/planned_downtime.list.php index f2ff00f87e..4d9d0d9069 100755 --- a/pandora_console/godmode/agentes/planned_downtime.list.php +++ b/pandora_console/godmode/agentes/planned_downtime.list.php @@ -364,12 +364,12 @@ else if (!$downtimes) { // Info message. echo '<div class="nf">'.__('No planned downtime').'</div>'; - echo '<div class="action-buttons" style="width: 100%">'; + echo '<div class="action-buttons w100p" >'; // Create button. if ($write_permisson) { echo ' '; - echo '<form method="post" action="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor" style="display: inline;">'; + echo '<form method="post" class="display_in" action="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor">'; html_print_submit_button(__('Create'), 'create', false, 'class="sub next"'); echo '</form>'; } @@ -493,9 +493,9 @@ else { || check_acl_restricted_all($config['id_user'], $downtime['id_group'], 'AD') ) { // Edit. - $data['edit'] = '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&edit_downtime=1&id_downtime='.$downtime['id'].'">'.html_print_image('images/config.png', true, ['title' => __('Update')]).'</a>'; + $data['edit'] = '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&edit_downtime=1&id_downtime='.$downtime['id'].'">'.html_print_image('images/config.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>'; // Delete. - $data['delete'] = '<a id="delete_downtime" href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list'.'&delete_downtime=1&id_downtime='.$downtime['id'].'&'.$filter_params_str.'">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]); + $data['delete'] = '<a id="delete_downtime" href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list'.'&delete_downtime=1&id_downtime='.$downtime['id'].'&'.$filter_params_str.'">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']); } else { $data['edit'] = ''; $data['delete'] = ''; @@ -505,7 +505,7 @@ else { || check_acl_restricted_all($config['id_user'], $downtime['id_group'], 'AD') ) { // Edit. - $data['edit'] = '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&edit_downtime=1&id_downtime='.$downtime['id'].'">'.html_print_image('images/config.png', true, ['title' => __('Update')]).'</a>'; + $data['edit'] = '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&edit_downtime=1&id_downtime='.$downtime['id'].'">'.html_print_image('images/config.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>'; // Delete. $data['delete'] = __('N/A'); } else { @@ -539,7 +539,7 @@ else { echo '<div class="action-buttons" style="width: '.$table->width.'">'; // CSV export button. - echo '<div style="display: inline;">'; + echo '<div class="display_in">'; html_print_button( __('Export to CSV'), 'csv_export', @@ -552,7 +552,7 @@ else { // Create button. if ($write_permisson) { echo ' '; - echo '<form method="post" action="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor" style="display: inline;">'; + echo '<form method="post" action="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor" class="display_in" >'; html_print_submit_button(__('Create'), 'create', false, 'class="sub next"'); echo '</form>'; } diff --git a/pandora_console/godmode/agentes/status_monitor_custom_fields.php b/pandora_console/godmode/agentes/status_monitor_custom_fields.php index cb0259a2f6..aadc0516bb 100644 --- a/pandora_console/godmode/agentes/status_monitor_custom_fields.php +++ b/pandora_console/godmode/agentes/status_monitor_custom_fields.php @@ -27,6 +27,8 @@ if (! check_acl($config['id_user'], 0, 'AR') return; } + + $update = get_parameter('upd_button', ''); $default = (int) get_parameter('default', 0); @@ -169,6 +171,7 @@ $table->data[1][1] = '<a href="javascript:">'.html_print_image( [ 'id' => 'right', 'title' => __('Add fields to select'), + 'class' => 'invert_filter', ] ).'</a>'; $table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image( @@ -177,6 +180,7 @@ $table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image( [ 'id' => 'left', 'title' => __('Delete fields to select'), + 'class' => 'invert_filter', ] ).'</a>'; @@ -235,7 +239,7 @@ $(document).ready (function () { if(selected_fields_total === current_fields_size){ display_confirm_dialog( - "<?php echo '<span style=text-transform:none;font-size:9.5pt;>'.__('There must be at least one custom field. Timestamp will be set by default').'</span>'; ?>", + "<?php echo '<span class="transform_none">'.__('There must be at least one custom field. Timestamp will be set by default').'</span>'; ?>", "<?php echo __('Confirm'); ?>", "<?php echo __('Cancel'); ?>", function () { diff --git a/pandora_console/godmode/alerts/alert_actions.php b/pandora_console/godmode/alerts/alert_actions.php index c6d298ff20..cdff3dbe2b 100644 --- a/pandora_console/godmode/alerts/alert_actions.php +++ b/pandora_console/godmode/alerts/alert_actions.php @@ -36,6 +36,8 @@ enterprise_include_once('meta/include/functions_alerts_meta.php'); check_login(); + + enterprise_hook('open_meta_frame'); if (! check_acl($config['id_user'], 0, 'LM')) { @@ -429,9 +431,9 @@ foreach ($actions as $action) { $text_confirm = __('Are you sure?'); $data[3] = '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_actions" - onClick="copy_action('.$id_action.',\''.$text_confirm.'\');">'.html_print_image('images/copy.png', true).'</a>'; + onClick="copy_action('.$id_action.',\''.$text_confirm.'\');">'.html_print_image('images/copy.png', true, ['class' => 'invert_filter']).'</a>'; $data[4] = '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_actions" - onClick="delete_action('.$id_action.',\''.$text_confirm.'\');">'.html_print_image('images/cross.png', true).'</a>'; + onClick="delete_action('.$id_action.',\''.$text_confirm.'\');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>'; } array_push($table->data, $data); diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php index 20a84f0dc1..0c53937dc5 100644 --- a/pandora_console/godmode/alerts/alert_commands.php +++ b/pandora_console/godmode/alerts/alert_commands.php @@ -96,9 +96,15 @@ if (is_ajax()) { if (!empty($field_description)) { // If the value is 5, this because severity in snmp alerts is not permit to show. if (($i > 5) && ($command['id'] == 3)) { - $fdesc = $field_description.' <br><span style="font-size:xx-small; font-weight:normal;">'.sprintf(__('Field %s'), ($i - 1)).'</span>'; + $fdesc = $field_description.' <br><span class="normal xx-small">'.sprintf( + __('Field %s'), + ($i - 1) + ).'</span>'; } else { - $fdesc = $field_description.' <br><span style="font-size:xx-small; font-weight:normal;">'.sprintf(__('Field %s'), $i).'</span>'; + $fdesc = $field_description.' <br><span class="normal xx-small">'.sprintf( + __('Field %s'), + $i + ).'</span>'; } // If the field is the number one, print the help message. @@ -131,7 +137,7 @@ if (is_ajax()) { $field_value = io_safe_output($field_value); // HTML type. if (preg_match('/^_html_editor_$/i', $field_value)) { - $editor_type_chkbx = '<div style="padding: 4px 0px;"><b><small>'; + $editor_type_chkbx = '<div id="command_div"><b><small>'; $editor_type_chkbx .= __('Basic'); $editor_type_chkbx .= ui_print_help_tip( __('For sending emails, text must be HTML format, if you want to use plain text, type it between the following labels: <pre></pre>'), @@ -172,7 +178,7 @@ if (is_ajax()) { $is_central_policies_on_node ); - $editor_type_chkbx = '<div style="padding: 4px 0px;"><b><small>'; + $editor_type_chkbx = '<div id="command_div"><b><small>'; $editor_type_chkbx .= __('Basic').'  '; $editor_type_chkbx .= html_print_radio_button_extended( 'editor_type_recovery_value_'.$i, @@ -209,7 +215,7 @@ if (is_ajax()) { $is_central_policies_on_node ); } else if (preg_match('/^_content_type_$/i', $field_value)) { - $editor_type_chkbx = '<div style="padding: 4px 0px;"><b><small>'; + $editor_type_chkbx = '<div id="command_div"><b><small>'; $editor_type_chkbx .= __('Text/plain'); $editor_type_chkbx .= ui_print_help_tip( __('For sending emails only text plain'), @@ -240,7 +246,7 @@ if (is_ajax()) { $editor_type_chkbx .= '</small></b></div>'; $ffield = $editor_type_chkbx; - $editor_type_chkbx = '<div style="padding: 4px 0px;"><b><small>'; + $editor_type_chkbx = '<div id="command_div"><b><small>'; $editor_type_chkbx .= __('Text/plain'); $editor_type_chkbx .= ui_print_help_tip( __('For sending emails only text plain'), @@ -324,7 +330,7 @@ if (is_ajax()) { 1, 1, $fv[0], - 'style="min-height:40px; '.$style.'" class="fields"', + 'style="'.$style.'" class="fields min-height-40px"', true, '', $is_central_policies_on_node @@ -334,7 +340,7 @@ if (is_ajax()) { 1, 1, $fv[0], - 'style="min-height:40px; '.$style.'" class="fields_recovery', + 'style="'.$style.'" class="fields_recovery min-height-40px', true, '', $is_central_policies_on_node @@ -347,7 +353,7 @@ if (is_ajax()) { 1, 1, '', - 'style="min-height:40px; '.$style.'" class="fields"', + 'style="'.$style.'" class="fields min-height-40px"', true, '', $is_central_policies_on_node @@ -357,7 +363,7 @@ if (is_ajax()) { 1, 1, '', - 'style="min-height:40px; '.$style.'" class="fields_recovery"', + 'style="'.$style.'" class="fields_recovery min-height-40px"', true, '', $is_central_policies_on_node @@ -370,7 +376,7 @@ if (is_ajax()) { $fields_rows[$i] = ''; } else { $fields_rows[$i] = '<tr id="table_macros-field'.$i.'" class="datos">'; - $fields_rows[$i] .= '<td style="font-weight:bold;width:20%" class="datos">'.$fdesc.'</td>'; + $fields_rows[$i] .= '<td class="datos bolder w20p">'.$fdesc.'</td>'; $fields_rows[$i] .= '<td class="datos">'.$ffield.'</td>'; if ($get_recovery_fields) { $fields_rows[$i] .= '<td class="datos recovery_col">'.$rfield.'</td>'; @@ -561,7 +567,7 @@ if ($commands === false) { foreach ($commands as $command) { $data = []; - $data['name'] = '<span style="font-size: 7.5pt">'; + $data['name'] = '<span>'; // (IMPORTANT, DO NOT CHANGE!) only users with permissions over "All" group have access to edition of commands belonging to "All" group. if (!$command['internal'] && check_acl_restricted_all($config['id_user'], $command['id_group'], 'PM')) { @@ -590,12 +596,12 @@ foreach ($commands as $command) { $table->cellclass[]['action'] = 'action_buttons'; // (IMPORTANT, DO NOT CHANGE!) only users with permissions over "All" group have access to edition of commands belonging to "All" group. - if ($is_central_policies_on_node === false && !$command['internal'] && check_acl_restricted_all($config['id_user'], $command['id_group'], 'PM')) { - $data['action'] = '<span style="display: inline-flex">'; + if ($is_central_policies_on_node === false && !$command['internal'] && check_acl_restricted_all($config['id_user'], $command['id_group'], 'LM')) { + $data['action'] = '<span class="inline_flex">'; $data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&copy_command=1&id='.$command['id'].'&pure='.$pure.'" - onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/copy.png', true).'</a>'; + onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/copy.png', true, ['class' => 'invert_filter']).'</a>'; $data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&delete_command=1&id='.$command['id'].'&pure='.$pure.'" - onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a>'; + onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>'; $data['action'] .= '</span>'; } diff --git a/pandora_console/godmode/alerts/alert_list.builder.php b/pandora_console/godmode/alerts/alert_list.builder.php index 4fa89805ce..73f22f8151 100644 --- a/pandora_console/godmode/alerts/alert_list.builder.php +++ b/pandora_console/godmode/alerts/alert_list.builder.php @@ -90,7 +90,7 @@ $table->data[0][1] = html_print_select( $table->data[0][1] .= ' <span id="latest_value" class="invisible">'.__('Latest value').': '; $table->data[0][1] .= '<span id="value"> </span></span>'; $table->data[0][1] .= ' <span id="module_loading" class="invisible">'; -$table->data[0][1] .= html_print_image('images/spinner.png', true).'</span>'; +$table->data[0][1] .= html_print_image('images/spinner.gif', true).'</span>'; $table->data[1][0] = __('Actions'); @@ -124,8 +124,8 @@ $table->data[1][1] .= html_print_input_text('fires_max', '', '', 4, 10, true); $table->data[1][1] .= '</span>'; if (check_acl($config['id_user'], 0, 'LM')) { $table->data[1][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_action&pure='.$pure.'">'; - $table->data[1][1] .= html_print_image('images/add.png', true); - $table->data[1][1] .= '<span style="margin-left:0.5em;">'.__('Create Action').'</span>'; + $table->data[1][1] .= html_print_image('images/add.png', true, ['class' => 'invert_filter']); + $table->data[1][1] .= '<span class="mrgn_lft_05em">'.__('Create Action').'</span>'; $table->data[1][1] .= '</a>'; } @@ -157,8 +157,8 @@ if ($own_info['is_admin']) { $table->data[2][1] .= ' <a class="template_details invisible" href="#">'.html_print_image('images/zoom.png', true, ['class' => 'img_help']).'</a>'; if (check_acl($config['id_user'], 0, 'LM')) { $table->data[2][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template&pure='.$pure.'">'; - $table->data[2][1] .= html_print_image('images/add.png', true); - $table->data[2][1] .= '<span style="margin-left:0.5em;">'.__('Create Template').'</span>'; + $table->data[2][1] .= html_print_image('images/add.png', true, ['class' => 'invert_filter']); + $table->data[2][1] .= '<span class=""mrgn_lft_05em>'.__('Create Template').'</span>'; $table->data[2][1] .= '</a>'; } @@ -190,7 +190,7 @@ if ($own_info['is_admin']) { if (!isset($step)) { if ($id_cluster) { - echo "<input onclick='window.location.replace(\"index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_view&id=".$id_cluster."\");' type=button style='float:right;margin-left:20px;' name='store' class='sub upd' value='".__('Finish and view cluster')."'>"; + echo "<input onclick='window.location.replace(\"index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_view&id=".$id_cluster."\");' type=button name='store' class='sub upd right mrgn_lft_20px' value='".__('Finish and view cluster')."'>"; } html_print_submit_button(__('Add alert'), 'add', false, 'class="sub wand"'); diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php index 5f25b79a10..6c6e6f66b3 100644 --- a/pandora_console/godmode/alerts/alert_list.list.php +++ b/pandora_console/godmode/alerts/alert_list.list.php @@ -50,9 +50,9 @@ if ($id_agente) { // Table for filter controls $form_filter = '<form method="post" action="index.php?sec='.$sec.'&sec2='.$sec2.'&refr='.((int) get_parameter('refr', 0)).'&pure='.$config['pure'].'">'; $form_filter .= "<input type='hidden' name='search' value='1' />"; -$form_filter .= '<table style="width: 100%;" cellpadding="0" cellspacing="0" class="databox filters">'; +$form_filter .= '<table cellpadding="0" cellspacing="0" class="databox filters w100p">'; $form_filter .= '<tr>'; -$form_filter .= "<td style='font-weight: bold;'>".__('Template name').'</td><td>'; +$form_filter .= "<td class='bolder''>".__('Template name').'</td><td>'; $form_filter .= html_print_input_text('template_name', $templateName, '', 12, 255, true); $form_filter .= '</td>'; $temp = agents_get_agents(); @@ -65,7 +65,7 @@ if ($temp) { } } -$form_filter .= "<td style='font-weight: bold;'>".__('Agents').'</td><td>'; +$form_filter .= "<td class='bolder''>".__('Agents').'</td><td>'; $params = []; $params['return'] = true; @@ -80,7 +80,7 @@ $form_filter .= ui_print_agent_autocomplete_input($params); $form_filter .= '</td>'; -$form_filter .= "<td style='font-weight: bold;'>".__('Module name').'</td><td>'; +$form_filter .= "<td class='bolder''>".__('Module name').'</td><td>'; $form_filter .= html_print_input_text('module_name', $moduleName, '', 12, 255, true); $form_filter .= '</td>'; $form_filter .= '</tr>'; @@ -111,19 +111,19 @@ if (is_array($temp)) { } } -$form_filter .= "<td style='font-weight: bold;'>".__('Actions').'</td><td>'; +$form_filter .= "<td class='bolder''>".__('Actions').'</td><td>'; $form_filter .= html_print_select($arrayActions, 'action_id', $actionID, '', __('All'), -1, true); $form_filter .= '</td>'; -$form_filter .= "<td style='font-weight: bold;'>".__('Field content').'</td><td>'; +$form_filter .= "<td class='bolder''>".__('Field content').'</td><td>'; $form_filter .= html_print_input_text('field_content', $fieldContent, '', 12, 255, true); $form_filter .= '</td>'; -$form_filter .= "<td style='font-weight: bold;'>".__('Priority').'</td><td>'; +$form_filter .= "<td class='bolder''>".__('Priority').'</td><td>'; $form_filter .= html_print_select(get_priorities(), 'priority', $priority, '', __('All'), -1, true); -$form_filter .= "</td style='font-weight: bold;'>"; +$form_filter .= "</td class='bolder''>"; $form_filter .= '</tr>'; $form_filter .= '<tr>'; -$form_filter .= "<td style='font-weight: bold;'>".__('Status').'</td><td>'; +$form_filter .= "<td class='bolder'>".__('Status').'</td><td>'; $ed_list = []; $alert_status_filter = []; $alert_status_filter['all_enabled'] = __('All (Enabled)'); @@ -132,13 +132,13 @@ $alert_status_filter['fired'] = __('Fired'); $alert_status_filter['notfired'] = __('Not fired'); $alert_status_filter['disabled'] = __('Disabled'); $form_filter .= html_print_select($alert_status_filter, 'status_alert', $status_alert, '', '', '', true); -$form_filter .= "</td><td style='font-weight: bold;'>".__('Standby').'</td><td>'; +$form_filter .= "</td><td class='bolder'>".__('Standby').'</td><td>'; $sb_list = []; $sb_list[1] = __('Standby on'); $sb_list[0] = __('Standby off'); $form_filter .= html_print_select($sb_list, 'standby', $standby, '', __('All'), -1, true); $form_filter .= '</td>'; -$form_filter .= "</td><td style='font-weight: bold;'>".__('Group').'</td><td>'; +$form_filter .= "</td><td class='bolder''>".__('Group').'</td><td>'; $own_info = get_user_info($config['id_user']); if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AR') && !check_acl($config['id_user'], 0, 'AW')) { $return_all_group = false; @@ -158,7 +158,7 @@ if (defined('METACONSOLE')) { $form_filter .= '</table>'; } else { $form_filter .= '</table>'; - $form_filter .= "<div style='text-align:right; height:100%;'>"; + $form_filter .= "<div class='right height_100p'>"; $form_filter .= html_print_submit_button(__('Update'), '', false, 'class="sub upd"', true); $form_filter .= '</div>'; } @@ -528,7 +528,7 @@ foreach ($simple_alerts as $alert) { $data[0] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab='.$main_tab.'&id_agente='.$id_agent.'">'; if ($alert['disabled']) { - $data[0] .= '<span style="font-style: italic; color: #aaaaaa;">'; + $data[0] .= '<span class="italic_a">'; } $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent); @@ -579,7 +579,14 @@ foreach ($simple_alerts as $alert) { ); $data[2] .= ' <a class="template_details" href="'.ui_get_full_url(false, false, false, false).'ajax.php?page=godmode/alerts/alert_templates&get_template_tooltip=1&id_template='.$alert['id_alert_template'].'">'; - $data[2] .= html_print_image('images/zoom.png', true, ['id' => 'template-details-'.$alert['id_alert_template'], 'class' => 'img_help action_button_img']); + $data[2] .= html_print_image( + 'images/zoom.png', + true, + [ + 'id' => 'template-details-'.$alert['id_alert_template'], + 'class' => 'img_help action_button_img invert_filter', + ] + ); $data[2] .= '</a> '; if (check_acl($config['id_user'], $template_group, 'LW') || check_acl($config['id_user'], $template_group, 'LM')) { @@ -588,7 +595,7 @@ foreach ($simple_alerts as $alert) { $actions = alerts_get_alert_agent_module_actions($alert['id']); - $data[3] = "<table style='width:100%;'>"; + $data[3] = "<table class='w100p'>"; // Get and show default actions for this alert $default_action = db_get_sql( 'SELECT id_alert_action @@ -603,12 +610,12 @@ foreach ($simple_alerts as $alert) { } foreach ($actions as $action_id => $action) { - $data[3] .= '<tr style="display: grid; grid-template-columns: 1fr 1fr; align-items: center;">'; + $data[3] .= '<tr class="alert_action_list">'; $data[3] .= '<td>'; - $data[3] .= '<ul class="action_list" style="display:inline;">'; - $data[3] .= '<li style="display:inline;">'; + $data[3] .= '<ul class="action_list inline_line">'; + $data[3] .= '<li class="inline_line">'; if ($alert['disabled']) { - $data[3] .= '<font class="action_name" style="font-style: italic; color: #aaaaaa;">'; + $data[3] .= '<font class="action_name italic_a">'; } else { $data[3] .= '<font class="action_name">'; } @@ -642,12 +649,11 @@ foreach ($simple_alerts as $alert) { $data[3] .= '</td>'; - $data[3] .= '<td style=" display: flex; align-items: center;">'; + $data[3] .= '<td class="flex_center">'; $data[3] .= ui_print_help_tip(__('The default actions will be executed every time that the alert is fired and no other action is executed'), true); // Is possible manage actions if have LW permissions in the agent group of the alert module if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW')) { - // ~ $data[2] .= '<form method="post" action="' . $url . '" class="delete_link" style="display: inline; vertical-align: -50%;">'; - $data[3] .= '<form method="post" action="'.$url.'" class="delete_link" style="display: inline;">'; + $data[3] .= '<form method="post" action="'.$url.'" class="delete_link display_in">'; $data[3] .= html_print_input_image( 'delete', 'images/cross.png', @@ -656,7 +662,7 @@ foreach ($simple_alerts as $alert) { true, [ 'title' => __('Delete action'), - 'class' => 'action_button_img', + 'class' => 'action_button_img invert_filter', ] ); $data[3] .= html_print_input_hidden('delete_action', 1, true); @@ -671,7 +677,7 @@ foreach ($simple_alerts as $alert) { true, [ 'title' => __('Update action'), - 'class' => 'action_button_img', + 'class' => 'action_button_img invert_filter', 'onclick' => 'show_display_update_action(\''.$action['id'].'\',\''.$alert['id'].'\',\''.$alert['id_agent_module'].'\',\''.$action_id.'\',\''.$alert['id_agent_module'].'\')', ] ); @@ -682,7 +688,7 @@ foreach ($simple_alerts as $alert) { $data[3] .= '</tr>'; } - $data[3] .= '<div id="update_action-div" style="display:none;text-align:left">'; + $data[3] .= '<div id="update_action-div" class="invisible left">'; $data[3] .= '</div>'; $data[3] .= '</table>'; // Is possible manage actions if have LW permissions in the agent group of the alert module @@ -700,15 +706,15 @@ foreach ($simple_alerts as $alert) { $actions = alerts_get_alert_actions_filter(true, 'id_group IN ('.$filter_groups.')'); } - $data[3] .= '<div id="add_action-div-'.$alert['id'].'" style="display:none;text-align:left">'; + $data[3] .= '<div id="add_action-div-'.$alert['id'].'" class="invisible left">'; $data[3] .= '<form id="add_action_form-'.$alert['id'].'" method="post">'; - $data[3] .= '<table class="databox_color" style="width:100%">'; + $data[3] .= '<table class="databox_color w100p">'; $data[3] .= html_print_input_hidden('add_action', 1, true); $data[3] .= html_print_input_hidden('id_alert_module', $alert['id'], true); if (! $id_agente) { $data[3] .= '<tr class="datos2">'; - $data[3] .= '<td class="datos2" style="font-weight:bold;padding:6px;">'; + $data[3] .= '<td class="datos2 bolder pdd_6px">'; $data[3] .= __('Agent'); $data[3] .= '</td>'; $data[3] .= '<td class="datos">'; @@ -718,7 +724,7 @@ foreach ($simple_alerts as $alert) { } $data[3] .= '<tr class="datos">'; - $data[3] .= '<td class="datos" style="font-weight:bold;padding:6px;">'; + $data[3] .= '<td class="datos bolder pdd_6px">'; $data[3] .= __('Module'); $data[3] .= '</td>'; $data[3] .= '<td class="datos">'; @@ -726,7 +732,7 @@ foreach ($simple_alerts as $alert) { $data[3] .= '</td>'; $data[3] .= '</tr>'; $data[3] .= '<tr class="datos2">'; - $data[3] .= '<td class="datos2" style="font-weight:bold;padding:6px;">'; + $data[3] .= '<td class="datos2 bolder pdd_6px">'; $data[3] .= __('Action'); $data[3] .= '</td>'; $data[3] .= '<td class="datos2">'; @@ -734,7 +740,7 @@ foreach ($simple_alerts as $alert) { $data[3] .= '</td>'; $data[3] .= '</tr>'; $data[3] .= '<tr class="datos">'; - $data[3] .= '<td class="datos" style="font-weight:bold;padding:6px;">'; + $data[3] .= '<td class="datos bolder pdd_6px">'; $data[3] .= __('Number of alerts match from'); $data[3] .= '</td>'; $data[3] .= '<td class="datos">'; @@ -758,7 +764,7 @@ foreach ($simple_alerts as $alert) { $data[3] .= '</td>'; $data[3] .= '</tr>'; $data[3] .= '<tr class="datos2">'; - $data[3] .= '<td class="datos2" style="font-weight:bold;padding:6px;">'; + $data[3] .= '<td class="datos2 bolder pdd_6px">'; $data[3] .= __('Threshold'); $data[3] .= '</td>'; $data[3] .= '<td class="datos2">'; @@ -782,7 +788,13 @@ foreach ($simple_alerts as $alert) { $data[3] .= '</td>'; $data[3] .= '</tr>'; $data[3] .= '</table>'; - $data[3] .= html_print_submit_button(__('Add'), 'addbutton', false, ['class' => 'sub next', 'style' => 'float:right'], true); + $data[3] .= html_print_submit_button( + __('Add'), + 'addbutton', + false, + ['class' => 'sub next right'], + true + ); $data[3] .= '</form>'; $data[3] .= '</div>'; } @@ -791,12 +803,24 @@ foreach ($simple_alerts as $alert) { 1 => 'action_buttons', 4 => 'action_buttons', ]; - $data[4] = '<form class="disable_alert_form" action="'.$url.'" method="post" style="display: inline;">'; + $data[4] = '<form class="disable_alert_form display_in" action="'.$url.'" method="post" >'; if ($alert['disabled']) { - $data[4] .= html_print_input_image('enable', 'images/lightbulb_off.png', 1, 'padding:0px', true); + $data[4] .= html_print_input_image( + 'enable', + 'images/lightbulb_off.png', + 1, + 'padding:0px', + true + ); $data[4] .= html_print_input_hidden('enable_alert', 1, true); } else { - $data[4] .= html_print_input_image('disable', 'images/lightbulb.png', 1, 'padding:0px;', true); + $data[4] .= html_print_input_image( + 'disable', + 'images/lightbulb.png', + 1, + 'padding:0px;', + true + ); $data[4] .= html_print_input_hidden('disable_alert', 1, true); } @@ -805,12 +829,26 @@ foreach ($simple_alerts as $alert) { // To manage alert is necessary LW permissions in the agent group if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW')) { - $data[4] .= '<form class="standby_alert_form" action="'.$url.'" method="post" style="display: inline;">'; + $data[4] .= '<form class="standby_alert_form display_in" action="'.$url.'" method="post">'; if (!$alert['standby']) { - $data[4] .= html_print_input_image('standby_off', 'images/bell.png', 1, 'padding:0px;', true); + $data[4] .= html_print_input_image( + 'standby_off', + 'images/bell.png', + 1, + 'padding:0px;', + true, + ['class' => 'invert_filter'] + ); $data[4] .= html_print_input_hidden('standbyon_alert', 1, true); } else { - $data[4] .= html_print_input_image('standby_on', 'images/bell_pause.png', 1, 'padding:0px;', true); + $data[4] .= html_print_input_image( + 'standby_on', + 'images/bell_pause.png', + 1, + 'padding:0px;', + true, + ['class' => 'invert_filter'] + ); $data[4] .= html_print_input_hidden('standbyoff_alert', 1, true); } @@ -825,7 +863,7 @@ foreach ($simple_alerts as $alert) { if ($policyInfo === false) { $data[1] .= ''; } else { - $img = 'images/policies.png'; + $img = 'images/policies_mc.png'; $data[1] .= '  <a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&pure='.$pure.'&id='.$policyInfo['id'].'">'.html_print_image($img, true, ['title' => $policyInfo['name']]).'</a>'; } @@ -834,7 +872,7 @@ foreach ($simple_alerts as $alert) { // To manage alert is necessary LW permissions in the agent group if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW')) { - $data[4] .= '<form class="delete_alert_form" action="'.$url.'" method="post" style="display: inline;">'; + $data[4] .= '<form class="delete_alert_form display_in" action="'.$url.'" method="post" >'; $is_cluster = (bool) get_parameter('id_cluster'); if (!$is_cluster) { if ($alert['disabled']) { @@ -845,20 +883,20 @@ foreach ($simple_alerts as $alert) { ); } else { $data[4] .= '<a href="javascript:show_add_action(\''.$alert['id'].'\');">'; - $data[4] .= html_print_image('images/add.png', true, ['title' => __('Add action')]); + $data[4] .= html_print_image('images/add.png', true, ['title' => __('Add action'), 'class' => 'invert_filter']); $data[4] .= '</a>'; } } - $data[4] .= html_print_input_image('delete', 'images/cross.png', 1, '', true, ['title' => __('Delete')]); + $data[4] .= html_print_input_image('delete', 'images/cross.png', 1, '', true, ['title' => __('Delete'), 'class' => 'invert_filter']); $data[4] .= html_print_input_hidden('delete_alert', 1, true); $data[4] .= html_print_input_hidden('id_alert', $alert['id'], true); $data[4] .= '</form>'; if ($is_cluster) { - $data[4] .= '<form class="view_alert_form" method="post" style="display: inline;">'; + $data[4] .= '<form class="view_alert_form display_in" method="post">'; - $data[4] .= html_print_input_image('update', 'images/builder.png', 1, '', true, ['title' => __('Update')]); + $data[4] .= html_print_input_image('update', 'images/builder.png', 1, '', true, ['title' => __('Update'), 'class' => 'invert_filter']); $data[4] .= html_print_input_hidden('upd_alert', 1, true); $data[4] .= html_print_input_hidden('id_alert', $alert['id'], true); @@ -867,8 +905,8 @@ foreach ($simple_alerts as $alert) { } if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LM')) { - $data[4] .= '<form class="view_alert_form" method="post" style="display: inline;" action="index.php?sec=galertas&sec2=godmode/alerts/alert_view">'; - $data[4] .= html_print_input_image('view_alert', 'images/eye.png', 1, '', true, ['title' => __('View alert advanced details')]); + $data[4] .= '<form class="view_alert_form display_in" method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_view">'; + $data[4] .= html_print_input_image('view_alert', 'images/operation.png', 1, '', true, ['title' => __('View alert advanced details'), 'class' => 'invert_filter']); $data[4] .= html_print_input_hidden('id_alert', $alert['id'], true); $data[4] .= '</form>'; } @@ -943,37 +981,109 @@ if (! $id_agente) { $("input[name=disable]").attr ("title", "<?php echo __('Disable'); ?>") .hover (function () { - $(this).attr ("src", <?php echo '"'.html_print_image('images/lightbulb_off.png', true, false, true).'"'; ?> ); + $(this).attr ("src", + <?php + echo '"'.html_print_image( + 'images/lightbulb_off.png', + true, + false, + true + ).'"'; + ?> + ); }, function () { - $(this).attr ("src", <?php echo '"'.html_print_image('images/lightbulb.png', true, false, true).'"'; ?> ); + $(this).attr ("src", + <?php + echo '"'.html_print_image( + 'images/lightbulb.png', + true, + ['class' => 'invert_filter'], + true + ).'"'; + ?> + ); } ); $("input[name=enable]").attr ("title", "<?php echo __('Enable'); ?>") .hover (function () { - $(this).attr ("src", <?php echo '"'.html_print_image('images/lightbulb.png', true, false, true).'"'; ?> ); + $(this).attr ("src", + <?php + echo '"'.html_print_image( + 'images/lightbulb.png', + true, + ['class' => 'invert_filter'], + true + ).'"'; + ?> + ); }, function () { - $(this).attr ("src", <?php echo '"'.html_print_image('images/lightbulb_off.png', true, false, true).'"'; ?> ); + $(this).attr ("src", + <?php + echo '"'.html_print_image( + 'images/lightbulb_off.png', + true, + false, + true + ).'"'; + ?> + ); } ); $("input[name=standby_on]").attr ("title", "<?php echo __('Set off standby'); ?>") .hover (function () { - $(this).attr ("src", <?php echo '"'.html_print_image('images/bell.png', true, false, true).'"'; ?> ); + $(this).attr ("src", + <?php + echo '"'.html_print_image( + 'images/bell.png', + true, + ['class' => 'invert_filter'], + true + ).'"'; + ?> + ); }, function () { - $(this).attr ("src", <?php echo '"'.html_print_image('images/bell_pause.png', true, false, true).'"'; ?> ); + $(this).attr ("src", + <?php + echo '"'.html_print_image( + 'images/bell_pause.png', + true, + ['class' => 'invert_filter'], + true + ).'"'; + ?> + ); } ); $("input[name=standby_off]").attr ("title", "<?php echo __('Set standby'); ?>") .hover (function () { - $(this).attr ("src", <?php echo '"'.html_print_image('images/bell_pause.png', true, false, true).'"'; ?> ); + $(this).attr ("src", + <?php + echo '"'.html_print_image( + 'images/bell_pause.png', + true, + ['class' => 'invert_filter'], + true + ).'"'; + ?> + ); }, function () { - $(this).attr ("src", <?php echo '"'.html_print_image('images/bell.png', true, false, true).'"'; ?> ); + $(this).attr ("src", + <?php + echo '"'.html_print_image( + 'images/bell.png', + true, + ['class' => 'invert_filter'], + true + ).'"'; + ?> + ); } ); diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index 6402fa638b..36db141b02 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -434,11 +434,11 @@ if ($id_agente) { $buttons = [ 'list' => [ 'active' => false, - 'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('List alerts')]).'</a>', + 'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('List alerts'), 'class' => 'invert_filter']).'</a>', ], 'builder' => [ 'active' => false, - 'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">'.html_print_image('images/pen.png', true, ['title' => __('Builder alert')]).'</a>', + 'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">'.html_print_image('images/pencil.png', true, ['title' => __('Builder alert'), 'class' => 'invert_filter']).'</a>', ], ]; diff --git a/pandora_console/godmode/alerts/alert_special_days.php b/pandora_console/godmode/alerts/alert_special_days.php index 9f0dbffd4a..7a29f7758b 100644 --- a/pandora_console/godmode/alerts/alert_special_days.php +++ b/pandora_console/godmode/alerts/alert_special_days.php @@ -270,8 +270,8 @@ if ($delete_special_day) { } -echo "<table cellpadding='4' cellspacing='4' class='databox upload' width='100% -' style='font-weight: bold; margin-bottom: 10px;'><tr>"; +echo "<table cellpadding='4' cellspacing='4' class='databox upload bolder margin-bottom-10' width='100% +'><tr>"; echo "<form method='post' enctype='multipart/form-data' action='index.php?sec=gagente&sec2=godmode/alerts/alert_special_days'>"; echo '<td>'; echo __('iCalendar(.ics) file').' '; @@ -329,12 +329,12 @@ if ($display_range) { $html .= '"><< </a>'; } - $html .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_special_days&display_range='.$display_range.'" style="font-weight: bold;">['.$display_range.']</a>'; + $html .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_special_days&display_range='.$display_range.'" class="bolder">['.$display_range.']</a>'; $html .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_special_days&display_range='; $html .= ($display_range + 1); $html .= '"> >></a>'; } else { - $html .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_special_days" style="font-weight: bold;">['.__('Default').']</a>  '; + $html .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_special_days" class="bolder">['.__('Default').']</a>  '; $html .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_special_days&display_range='; $html .= ($this_year - 1); $html .= '"><< </a>'; @@ -472,7 +472,7 @@ for ($month = 1; $month <= 12; $month++) { if ($special_days != '') { foreach ($special_days as $special_day) { - $cal_table->data[$cal_line][$week] .= '<div style="font-size: 18px;'; + $cal_table->data[$cal_line][$week] .= '<div class="font_18px" style="'; if ($special_day['same_day'] == 'sunday' || $special_day['same_day'] == 'saturday') { $cal_table->data[$cal_line][$week] .= 'color: red;'; } @@ -525,10 +525,18 @@ for ($month = 1; $month <= 12; $month++) { if ($special_day['id_group'] || ($can_manage_group_all && $special_day['id_group'] == 0)) { $cal_table->data[$cal_line][$week] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_special_days&id='.$special_day['id'].'" title='; $cal_table->data[$cal_line][$week] .= __('Edit'); - $cal_table->data[$cal_line][$week] .= '>'.html_print_image('images/wrench_orange.png', true).'</a>  '; + $cal_table->data[$cal_line][$week] .= '>'.html_print_image( + 'images/config.png', + true, + ['class' => 'invert_filter'] + ).'</a>  '; $cal_table->data[$cal_line][$week] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_special_days&delete_special_day=1&id='.$special_day['id'].'"onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;" title='; $cal_table->data[$cal_line][$week] .= __('Remove'); - $cal_table->data[$cal_line][$week] .= '>'.html_print_image('images/cross.png', true).'</a>'; + $cal_table->data[$cal_line][$week] .= '>'.html_print_image( + 'images/cross.png', + true, + ['class' => 'invert_filter'] + ).'</a>'; ; } @@ -542,7 +550,11 @@ for ($month = 1; $month <= 12; $month++) { $cal_table->data[$cal_line][$week] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_special_days&create_special_day=1&date='.$date.'" title='; $cal_table->data[$cal_line][$week] .= __('Create'); - $cal_table->data[$cal_line][$week] .= '>'.html_print_image('images/plus.png', true).'</a>'; + $cal_table->data[$cal_line][$week] .= '>'.html_print_image( + 'images/add.png', + true, + ['class' => 'invert_filter'] + ).'</a>'; if ($week == 6) { $cal_line++; diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php index f38682617a..6763e7f6e5 100644 --- a/pandora_console/godmode/alerts/alert_templates.php +++ b/pandora_console/godmode/alerts/alert_templates.php @@ -414,7 +414,7 @@ foreach ($templates as $template) { && check_acl_restricted_all($config['id_user'], $template['id_group'], 'LM') ) { $table->cellclass[][4] = 'action_buttons'; - $data[4] = '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/configure_alert_template&pure='.$pure.'" style="display: inline; float: left">'; + $data[4] = '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/configure_alert_template&pure='.$pure.'" class="float-left inline_line">'; $data[4] .= html_print_input_hidden('duplicate_template', 1, true); $data[4] .= html_print_input_hidden('source_id', $template['id'], true); $data[4] .= html_print_input_image( @@ -427,7 +427,7 @@ foreach ($templates as $template) { ); $data[4] .= '</form> '; - $data[4] .= '<form method="post" style="display: inline; float: right" onsubmit="if (!confirm(\''.__('Are you sure?').'\')) return false;">'; + $data[4] .= '<form method="post" class="float-right inline_line" onsubmit="if (!confirm(\''.__('Are you sure?').'\')) return false;">'; $data[4] .= html_print_input_hidden('delete_template', 1, true); $data[4] .= html_print_input_hidden('id', $template['id'], true); $data[4] .= html_print_input_image( diff --git a/pandora_console/godmode/alerts/alert_view.php b/pandora_console/godmode/alerts/alert_view.php index e9ee2e4bea..d6bbaa5d32 100644 --- a/pandora_console/godmode/alerts/alert_view.php +++ b/pandora_console/godmode/alerts/alert_view.php @@ -58,11 +58,11 @@ $table_details->style[0] = 'font-weight: bold;'; $data = []; $data[0] = __('List alerts'); -$data[1] = '<a style=" font-size: 7pt;" href="index.php?sec=galertas&sec2=godmode/alerts/alert_list" title="'.__('List alerts').'"><b><span style=" font-size: 7pt;">'.__('List alerts').'</span></b></a>'; +$data[1] = '<a class="size_7pt" href="index.php?sec=galertas&sec2=godmode/alerts/alert_list" title="'.__('List alerts').'"><b><span>'.__('List alerts').'</span></b></a>'; $table_details->data[] = $data; $data[0] = __('Agent'); -$data[1] = '<a style=" font-size: 7pt;" href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent.'" title="'.$agent_alias.'"><b><span style=" font-size: 7pt;">'.$agent_alias.'</span></b></a>'; +$data[1] = '<a class="size_7pt" href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent.'" title="'.$agent_alias.'"><b><span>'.$agent_alias.'</span></b></a>'; $table_details->data[] = $data; $data[0] = __('Module'); @@ -89,13 +89,17 @@ if ($alert['times_fired'] > 0) { } $data[0] = __('Status'); -$data[1] = '<span style="margin-right: 5px;">'.ui_print_status_image($status, $title, true).'</span>'.$title; +$data[1] = '<span class="mrg_r_5px">'.ui_print_status_image( + $status, + $title, + true +).'</span>'.$title; $table_details->data[] = $data; $priorities = get_priorities(); $data[0] = __('Priority'); -$data[1] = '<span style="width: 20px; height: 10px; margin-right: 5px; display: inline-block;" title="'.$priorities[$template['priority']].'" class="'.get_priority_class($template['priority']).'"> </span>'.$priorities[$template['priority']]; +$data[1] = '<span title="'.$priorities[$template['priority']].'" class="'.get_priority_class($template['priority']).' span_priority"> </span>'.$priorities[$template['priority']]; $table_details->data[] = $data; $data[0] = __('Stand by'); @@ -107,7 +111,7 @@ if (enterprise_installed() && $alert['id_policy_alerts'] != 0) { if ($policyInfo === false) { $policy = __('N/A'); } else { - $img = 'images/policies.png'; + $img = 'images/policies_mc.png'; $policy = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id='.$policyInfo['id'].'">'.html_print_image($img, true, ['title' => $policyInfo['name']]).'</a>'; } @@ -343,7 +347,7 @@ $table->head = []; $table->data = []; $table->styleTable = 'text-align: center;'; -echo '<div class="firing_action_all" style="width: 100%;">'; +echo '<div class="firing_action_all w100p" >'; $table->head[0] = __('Actions'); $table->style[0] = 'font-weight: bold; text-align: left;'; @@ -418,7 +422,7 @@ $modes = []; $modes['firing'] = __('Firing'); $modes['recovering'] = __('Recovering'); -$table->data[1][1] = '<div class="action_details" style="display: none;">'.__('Mode').'<br>'.html_print_select($modes, 'modes', 'firing', '', '', 0, true, false, false).'</div>'; +$table->data[1][1] = '<div class="action_details invisible" >'.__('Mode').'<br>'.html_print_select($modes, 'modes', 'firing', '', '', 0, true, false, false).'</div>'; html_print_table($table); unset($table); @@ -463,7 +467,10 @@ foreach ($actions as $kaction => $action) { $data[0] = '<b>'.$data[0].'</b><br>'; } - $data[0] .= '<br><span style="font-size: xx-small;font-style:italic;">('.sprintf(__('Field %s'), ($kdesc + 1)).')</span>'; + $data[0] .= '<br><span class="redi xx-small">('.sprintf( + __('Field %s'), + ($kdesc + 1) + ).')</span>'; $data[1] = $template[$field]; $data[2] = $action[$field]; $data[3] = $firing_fields[$kaction]['value'][$field] = empty($action[$field]) ? $template[$field] : $action[$field]; @@ -494,20 +501,20 @@ foreach ($actions as $kaction => $action) { $firing_fields[$kaction]['command_preview'] = $command_preview; } -echo '<div class="mode_table mode_table_firing action_details" style="width: 100%; display: none;">'; +echo '<div class="mode_table mode_table_firing action_details invisible w100p">'; html_print_table($table); unset($table); foreach ($actions as $kaction => $action) { - echo '<div class="firing_action firing_action_'.$kaction.'" style="display:none;">'; + echo '<div class="firing_action firing_action_'.$kaction.' invisible">'; ui_print_info_message(['title' => __('Command preview'), 'message' => $firing_fields[$kaction]['command_preview'], 'no_close' => true]); echo '</div>'; } echo '</div>'; // Firing table -echo '<div class="mode_table mode_table_recovering action_details" style="display: none; width: 100%;">'; +echo '<div class="mode_table mode_table_recovering action_details invisible w100p" >'; if ($template['recovery_notify'] == 0) { ui_print_info_message(['title' => __('Disabled'), 'message' => __('The alert recovering is disabled on this template.'), 'no_close' => true]); } else { @@ -541,7 +548,10 @@ if ($template['recovery_notify'] == 0) { $data[0] = '<b>'.$data[0].'</b><br>'; } - $data[0] .= '<br><span style="font-size: xx-small;font-style:italic;">('.sprintf(__('Field %s'), $fieldn).')</span>'; + $data[0] .= '<br><span class="redi xx-small">('.sprintf( + __('Field %s'), + $fieldn + ).')</span>'; $data[1] = $firing_fields[$kaction]['value'][$field]; $data[2] = $template[$field.'_recovery']; $data[3] = $firing_fields[$kaction][$field.'_recovery']; diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index 9fd12e0516..18454c86da 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -234,7 +234,7 @@ if ($is_central_policies_on_node === false $table->data[2][1] .= '</a>'; } -$table->data[2][1] .= '<div id="command_description" style=""></div>'; +$table->data[2][1] .= '<div id="command_description" ></div>'; $table->colspan[2][1] = 2; $table->data[3][0] = __('Threshold'); diff --git a/pandora_console/godmode/alerts/configure_alert_special_days.php b/pandora_console/godmode/alerts/configure_alert_special_days.php index 3941cab2b7..14d85afc1d 100644 --- a/pandora_console/godmode/alerts/configure_alert_special_days.php +++ b/pandora_console/godmode/alerts/configure_alert_special_days.php @@ -12,7 +12,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// Load global vars +// Load global vars. global $config; require_once 'include/functions_alerts.php'; @@ -51,8 +51,14 @@ if ($date == '') { $date = date('Y-m-d', get_system_time()); } -// Header -ui_print_page_header(__('Alerts').' » '.__('Configure special day'), 'images/gm_alerts.png', false, '', true); +// Header. +ui_print_page_header( + __('Alerts').' » '.__('Configure special day'), + 'images/gm_alerts.png', + false, + '', + true +); $table = new stdClass(); $table->width = '100%'; @@ -64,19 +70,44 @@ $table->size = []; $table->size[0] = '20%'; $table->data = []; $table->data[0][0] = __('Date'); -$table->data[0][1] = html_print_input_text('date', $date, '', 10, 10, true); -$table->data[0][1] .= html_print_image('images/calendar_view_day.png', true, ['alt' => 'calendar', 'onclick' => "scwShow(scwID('text-date'),this);"]); +$table->data[0][1] = html_print_input_text( + 'date', + $date, + '', + 10, + 10, + true +); +$table->data[0][1] .= html_print_image( + 'images/calendar_view_day.png', + true, + [ + 'alt' => 'calendar', + 'onclick' => "scwShow(scwID('text-date'),this);", + 'class' => 'invert_filter', + ] +); $table->data[1][0] = __('Group'); $groups = users_get_groups(); $own_info = get_user_info($config['id_user']); -// Only display group "All" if user is administrator or has "LM" privileges +// Only display group "All" if user is administrator or has "LM" privileges. if (users_can_manage_group_all('LM')) { $display_all_group = true; } else { $display_all_group = false; } -$table->data[1][1] = html_print_select_groups(false, 'LW', $display_all_group, 'id_group', $id_group, '', '', 0, true); +$table->data[1][1] = html_print_select_groups( + false, + 'LW', + $display_all_group, + 'id_group', + $id_group, + '', + '', + 0, + true +); $table->data[2][0] = __('Same day of the week'); $days = []; @@ -87,10 +118,27 @@ $days['thursday'] = __('Thursday'); $days['friday'] = __('Friday'); $days['saturday'] = __('Saturday'); $days['sunday'] = __('Sunday'); -$table->data[2][1] = html_print_select($days, 'same_day', $same_day, '', '', 0, true, false, false); +$table->data[2][1] = html_print_select( + $days, + 'same_day', + $same_day, + '', + '', + 0, + true, + false, + false +); $table->data[3][0] = __('Description'); -$table->data[3][1] = html_print_textarea('description', 10, 30, $description, '', true); +$table->data[3][1] = html_print_textarea( + 'description', + 10, + 30, + $description, + '', + true +); echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_special_days">'; html_print_table($table); diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php index 4f443c708e..cbfa4f0d8d 100644 --- a/pandora_console/godmode/alerts/configure_alert_template.php +++ b/pandora_console/godmode/alerts/configure_alert_template.php @@ -835,7 +835,7 @@ if ($step == 2) { '', $is_central_policies_on_node ); - $table->data[6][1] .= '<span id="matches_value" '.($show_matches ? '' : 'style="display: none"').'>'; + $table->data[6][1] .= '<span id="matches_value" '.($show_matches ? '' : 'class="invisible"').'>'; $table->data[6][1] .= ' '.html_print_checkbox('matches_value', 1, $matches, true); $table->data[6][1] .= html_print_label( __('Trigger when matches the value'), @@ -959,7 +959,7 @@ if ($step == 2) { // TinyMCE. // triggering fields. // Basic. - $table->data['field'.$i][1] = '<div style="padding: 4px 0px;"><b><small>'; + $table->data['field'.$i][1] = '<div id="command_div"><b><small>'; $table->data['field'.$i][1] .= __('Basic').'  '; $table->data['field'.$i][1] .= html_print_radio_button_extended( 'editor_type_value_'.$i, @@ -992,7 +992,7 @@ if ($step == 2) { 1, 1, isset($fields[$i]) ? $fields[$i] : '', - 'style="min-height:40px;" class="fields"', + 'class="fields" min-height-40px', true, '', $is_central_policies_on_node @@ -1000,7 +1000,7 @@ if ($step == 2) { // Recovery. // Basic. - $table->data['field'.$i][2] = '<div style="padding: 4px 0px;"><b><small>'; + $table->data['field'.$i][2] = '<div id="command_div"><b><small>'; $table->data['field'.$i][2] .= __('Basic').'  '; $table->data['field'.$i][2] .= html_print_radio_button_extended( 'editor_type_recovery_value_'.$i, @@ -1033,7 +1033,7 @@ if ($step == 2) { 1, 1, isset($fields_recovery[$i]) ? $fields_recovery[$i] : '', - 'style="min-height:40px" class="fields"', + 'class="fields min-height-40px"', true, '', $is_central_policies_on_node diff --git a/pandora_console/godmode/category/category.php b/pandora_console/godmode/category/category.php index b504ad0020..7285e402f6 100755 --- a/pandora_console/godmode/category/category.php +++ b/pandora_console/godmode/category/category.php @@ -38,14 +38,28 @@ if (defined('METACONSOLE')) { $buttons = [ 'list' => [ 'active' => false, - 'text' => '<a href="index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure'].'">'.html_print_image('images/list.png', true, ['title' => __('List categories')]).'</a>', + 'text' => '<a href="index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure'].'">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('List categories'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; } else { $buttons = [ 'list' => [ 'active' => false, - 'text' => '<a href="index.php?sec=galertas&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure'].'">'.html_print_image('images/list.png', true, ['title' => __('List categories')]).'</a>', + 'text' => '<a href="index.php?sec=galertas&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure'].'">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('List categories'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; } @@ -125,13 +139,29 @@ if (!empty($result)) { if (defined('METACONSOLE')) { $data[0] = "<a href='index.php?sec=advanced&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".$category['name'].'</a>'; - $data[1] = "<a href='index.php?sec=advanced&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".html_print_image('images/config.png', true, ['title' => 'Edit']).'</a>  '; - $data[1] .= '<a href="index.php?sec=advanced&sec2=godmode/category/category&delete_category='.$category['id'].'&pure='.(int) $config['pure'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image('images/cross.png', true, ['title' => 'Delete']).'</a>'; + $data[1] = "<a href='index.php?sec=advanced&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".html_print_image( + 'images/config.png', + true, + ['title' => 'Edit'] + ).'</a>  '; + $data[1] .= '<a href="index.php?sec=advanced&sec2=godmode/category/category&delete_category='.$category['id'].'&pure='.(int) $config['pure'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image( + 'images/cross.png', + true, + ['title' => 'Delete'] + ).'</a>'; } else { $data[0] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".$category['name'].'</a>'; $table->cellclass[][1] = 'action_buttons'; - $data[1] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".html_print_image('images/config.png', true, ['title' => 'Edit']).'</a>'; - $data[1] .= '<a href="index.php?sec=gmodules&sec2=godmode/category/category&delete_category='.$category['id'].'&pure='.(int) $config['pure'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image('images/cross.png', true, ['title' => 'Delete']).'</a>'; + $data[1] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".html_print_image( + 'images/config.png', + true, + ['title' => 'Edit'] + ).'</a>'; + $data[1] .= '<a href="index.php?sec=gmodules&sec2=godmode/category/category&delete_category='.$category['id'].'&pure='.(int) $config['pure'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image( + 'images/cross.png', + true, + ['title' => 'Delete'] + ).'</a>'; } array_push($table->data, $data); @@ -145,7 +175,7 @@ if (!empty($result)) { } // Form to add new categories or search categories -echo "<div style='width=100%; float:right;'>"; +echo "<div class='w100p right'>"; if (defined('METACONSOLE')) { echo '<form method="post" action="index.php?sec=advanced&sec2=godmode/category/edit_category&action=new&pure='.(int) $config['pure'].'">'; } else { diff --git a/pandora_console/godmode/category/edit_category.php b/pandora_console/godmode/category/edit_category.php index 0df7f7fafc..6278fb6dae 100755 --- a/pandora_console/godmode/category/edit_category.php +++ b/pandora_console/godmode/category/edit_category.php @@ -37,14 +37,28 @@ if (defined('METACONSOLE')) { $buttons = [ 'list' => [ 'active' => false, - 'text' => '<a href="index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure'].'">'.html_print_image('images/list.png', true, ['title' => __('List categories')]).'</a>', + 'text' => '<a href="index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure'].'">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('List categories'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; } else { $buttons = [ 'list' => [ 'active' => false, - 'text' => '<a href="index.php?sec=gmodules&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure'].'">'.html_print_image('images/list.png', true, ['title' => __('List categories')]).'</a>', + 'text' => '<a href="index.php?sec=gmodules&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure'].'">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('List categories'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; } @@ -120,9 +134,9 @@ else { echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/category/edit_category&action='.$action.'&id_category='.$id_category.'&pure='.(int) $config['pure'].'" enctype="multipart/form-data">'; if (!defined('METACONSOLE')) { - echo '<div align=left style="width: 100%" class="pandora_form">'; + echo '<div align=left class="pandora_form w100p">'; } else { - echo '<div align=left style="width: 100%" class="pandora_form">'; + echo '<div align=left class="pandora_form w100p">'; } echo "<table border=0 cellpadding=4 cellspacing=4 class='databox filters' width=100%>"; @@ -146,7 +160,7 @@ if (defined('METACONSOLE')) { } echo '<tr>'; - echo "<td style='font-weight: bold'>"; + echo "<td class='bolder'>"; html_print_label(__('Name'), 'name'); echo '</td>'; diff --git a/pandora_console/godmode/events/custom_events.php b/pandora_console/godmode/events/custom_events.php index 781345fed7..5bf137f1ea 100644 --- a/pandora_console/godmode/events/custom_events.php +++ b/pandora_console/godmode/events/custom_events.php @@ -198,7 +198,7 @@ $(document).ready (function () { if(selected_fields_total === current_fields_size){ display_confirm_dialog( - "<?php echo '<span style=text-transform:none;font-size:9.5pt;>'.__('There must be at least one custom field. Timestamp will be set by default').'</span>'; ?>", + "<?php echo '<span class=transform_none font_9pt>'.__('There must be at least one custom field. Timestamp will be set by default').'</span>'; ?>", "<?php echo __('Confirm'); ?>", "<?php echo __('Cancel'); ?>", function () { diff --git a/pandora_console/godmode/events/event_filter.php b/pandora_console/godmode/events/event_filter.php index 097fd577c8..07e87284ee 100644 --- a/pandora_console/godmode/events/event_filter.php +++ b/pandora_console/godmode/events/event_filter.php @@ -29,6 +29,8 @@ if (!$event_w && !$event_m) { return; } + + $delete = (bool) get_parameter('delete', 0); $multiple_delete = (bool) get_parameter('multiple_delete', 0); @@ -183,7 +185,14 @@ foreach ($filters as $filter) { || check_acl_restricted_all($config['id_user'], $filter['id_group'], 'EM') ) { $table->cellclass[][6] = 'action_buttons'; - $data[6] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'href='index.php?sec=geventos&sec2=godmode/events/events§ion=filter&delete=1&id=".$filter['id_filter'].'&offset=0&pure='.$config['pure']."'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'; + $data[6] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'href='index.php?sec=geventos&sec2=godmode/events/events§ion=filter&delete=1&id=".$filter['id_filter'].'&offset=0&pure='.$config['pure']."'>".html_print_image( + 'images/cross.png', + true, + [ + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] + ).'</a>'; } array_push($table->data, $data); @@ -194,9 +203,9 @@ if (isset($data)) { html_print_input_hidden('multiple_delete', 1); html_print_table($table); if (!is_metaconsole()) { - echo "<div style='padding-bottom: 20px; text-align: right;'>"; + echo "<div class='pdd_b_20px right'>"; } else { - echo "<div style='float:right; '>"; + echo "<div class='right'>"; } html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"'); @@ -207,9 +216,9 @@ if (isset($data)) { } if (!defined('METACONSOLE')) { - echo "<div style='padding-bottom: 20px; text-align: right; width:100%;'>"; + echo "<div class='pdd_b_20px right w100p'>"; } else { - echo "<div style='float:right; '>"; + echo "<div class='right'>"; } echo '<form method="post" action="index.php?sec=geventos&sec2=godmode/events/events§ion=edit_filter&pure='.$config['pure'].'">'; diff --git a/pandora_console/godmode/events/event_responses.editor.php b/pandora_console/godmode/events/event_responses.editor.php index 1f03b630bb..bc57f85b40 100644 --- a/pandora_console/godmode/events/event_responses.editor.php +++ b/pandora_console/godmode/events/event_responses.editor.php @@ -159,13 +159,13 @@ $data[3] = html_print_select($types, 'type', $event_response['type'], '', '', '' $table->data[3] = $data; $data = []; -$data[0] = '<span id="command_label" class="labels">'.__('Command').'</span><span id="url_label" style="display:none;" class="labels">'.__('URL').'</span>'.ui_print_help_icon('response_macros', true); +$data[0] = '<span id="command_label" class="labels">'.__('Command').'</span><span id="url_label" class="labels invisible">'.__('URL').'</span>'.ui_print_help_icon('response_macros', true); $data[1] = html_print_textarea( 'target', 3, 1, $event_response['target'], - 'style="min-height:initial;"', + 'class="mh_initial"', true ); @@ -187,23 +187,23 @@ if (enterprise_installed()) { } } -$data[2] = '<div id="server_to_exec_label" style="display:none;" class="labels">'.__('Server to execute command').'</div>'; -$data[3] = '<div id="server_to_exec_value" style="display:none;">'.html_print_select($servers_to_exec, 'server_to_exec', $event_response['server_to_exec'], '', '', '', true).'</div>'; +$data[2] = '<div id="server_to_exec_label" class="labels invisible">'.__('Server to execute command').'</div>'; +$data[3] = '<div id="server_to_exec_value" class="invisible" >'.html_print_select($servers_to_exec, 'server_to_exec', $event_response['server_to_exec'], '', '', '', true).'</div>'; $table->data[4] = $data; $data = []; -$data[0] = '<div id="command_timeout_label" style="display:none;" class="labels">'.__('Command timeout (s)'); -$data[1] = '<div id="command_timeout_value" style="display:none;">'.html_print_input_text('command_timeout', $event_response['command_timeout'], '', 4, 5, true); +$data[0] = '<div id="command_timeout_label" class="labels invisible">'.__('Command timeout (s)'); +$data[1] = '<div id="command_timeout_value" class="invisible">'.html_print_input_text('command_timeout', $event_response['command_timeout'], '', 4, 5, true); $table->data[5] = $data; if ($event_response_id == 0) { echo '<form method="post" action="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&mode=list&action=create_response&pure='.$config['pure'].'">'; html_print_table($table); if (!defined('METACONSOLE')) { - echo '<div style="width:100%;text-align:right;">'; + echo '<div class="w100p right">'; } else { - echo '<div style="width:100%;text-align:right;">'; + echo '<div class="w100p right">'; } html_print_submit_button(__('Create'), 'create_response_button', false, ['class' => 'sub next']); @@ -213,9 +213,9 @@ if ($event_response_id == 0) { echo '<form method="post" action="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&mode=list&action=update_response&pure='.$config['pure'].'">'; html_print_table($table); if (!defined('METACONSOLE')) { - echo '<div style="width:100%;text-align:right;">'; + echo '<div class="w100p right">'; } else { - echo '<div style="width:100%;text-align:right;">'; + echo '<div class="w100p right">'; } html_print_submit_button(__('Update'), 'update_response_button', false, ['class' => 'sub next']); diff --git a/pandora_console/godmode/events/event_responses.list.php b/pandora_console/godmode/events/event_responses.list.php index ea3e8c1aae..579317c534 100644 --- a/pandora_console/godmode/events/event_responses.list.php +++ b/pandora_console/godmode/events/event_responses.list.php @@ -64,16 +64,35 @@ foreach ($event_responses as $response) { $data[1] = $response['description']; $data[2] = ui_print_group_icon($response['id_group'], true); $table->cellclass[][3] = 'action_buttons'; - $data[3] = '<a href="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&action=delete_response&id_response='.$response['id'].'&pure='.$config['pure'].'">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'; - $data[3] .= '<a href="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&mode=editor&id_response='.$response['id'].'&pure='.$config['pure'].'">'.html_print_image('images/pencil.png', true, ['title' => __('Edit')]).'</a>'; + $data[3] = '<a href="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&action=delete_response&id_response='.$response['id'].'&pure='.$config['pure'].'">'.html_print_image( + 'images/cross.png', + true, + [ + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] + ).'</a>'; + $data[3] .= '<a href="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&mode=editor&id_response='.$response['id'].'&pure='.$config['pure'].'">'.html_print_image( + 'images/pencil.png', + true, + [ + 'title' => __('Edit'), + 'class' => 'invert_filter', + ] + ).'</a>'; $table->data[] = $data; } html_print_table($table); -echo '<div style="width:100%;text-align:right;">'; +echo '<div class="w100p right">'; echo '<form method="post" action="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&mode=editor&pure='.$config['pure'].'">'; -html_print_submit_button(__('Create response'), 'create_response_button', false, ['class' => 'sub next']); +html_print_submit_button( + __('Create response'), + 'create_response_button', + false, + ['class' => 'sub next'] +); echo '</form>'; echo '</div>'; diff --git a/pandora_console/godmode/events/events.php b/pandora_console/godmode/events/events.php index f214025d7c..f32c07ec43 100644 --- a/pandora_console/godmode/events/events.php +++ b/pandora_console/godmode/events/events.php @@ -34,25 +34,53 @@ $section = (string) get_parameter('section', 'filter'); if (check_acl($config['id_user'], 0, 'EW') || check_acl($config['id_user'], 0, 'EM')) { $buttons['view'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=eventos&sec2=operation/events/events&pure='.$config['pure'].'">'.html_print_image('images/events_list.png', true, ['title' => __('Event list')]).'</a>', + 'text' => '<a href="index.php?sec=eventos&sec2=operation/events/events&pure='.$config['pure'].'">'.html_print_image( + 'images/events_list.png', + true, + [ + 'title' => __('Event list'), + 'class' => 'invert_filter', + ] + ).'</a>', 'operation' => true, ]; $buttons['filter'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=eventos&sec2=godmode/events/events&section=filter&pure='.$config['pure'].'">'.html_print_image('images/filter_mc.png', true, ['title' => __('Filter list')]).'</a>', + 'text' => '<a href="index.php?sec=eventos&sec2=godmode/events/events&section=filter&pure='.$config['pure'].'">'.html_print_image( + 'images/filter_mc.png', + true, + [ + 'title' => __('Filter list'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; } if (check_acl($config['id_user'], 0, 'PM')) { $buttons['responses'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=eventos&sec2=godmode/events/events&section=responses&pure='.$config['pure'].'">'.html_print_image('images/event_responses.png', true, ['title' => __('Event responses')]).'</a>', + 'text' => '<a href="index.php?sec=eventos&sec2=godmode/events/events&section=responses&pure='.$config['pure'].'">'.html_print_image( + 'images/event_responses.png', + true, + [ + 'title' => __('Event responses'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; $buttons['fields'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=eventos&sec2=godmode/events/events&section=fields&pure='.$config['pure'].'">'.html_print_image('images/custom_columns.png', true, ['title' => __('Custom fields')]).'</a>', + 'text' => '<a href="index.php?sec=eventos&sec2=godmode/events/events&section=fields&pure='.$config['pure'].'">'.html_print_image( + 'images/custom_columns.png', + true, + [ + 'title' => __('Custom fields'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; } diff --git a/pandora_console/godmode/extensions.php b/pandora_console/godmode/extensions.php index eea6c6818f..6a46795322 100644 --- a/pandora_console/godmode/extensions.php +++ b/pandora_console/godmode/extensions.php @@ -13,6 +13,8 @@ // GNU General Public License for more details. check_login(); +global $config; + if (! check_acl($config['id_user'], 0, 'PM')) { db_pandora_audit( 'ACL Violation', @@ -144,11 +146,6 @@ $table->head[] = __('Login Function'); $table->head[] = __('Agent operation tab'); $table->head[] = __('Agent godmode tab'); $table->head[] = __('Operation'); -/* - $table->width = array(); - $table->width[] = '30%'; - $table->width[] = '30%'; -*/ $table->width = '100%'; $table->class = 'info_table'; @@ -174,7 +171,7 @@ foreach ($extensions as $file => $extension) { if (!$extension['enabled']) { $on = html_print_image('images/dot_green.disabled.png', true); $off = html_print_image('images/dot_red.disabled.png', true); - $data[] = '<i style="color: grey;">'.$file.'</i>'; + $data[] = '<i class="grey">'.$file.'</i>'; // Get version of this extensions if ($config['extensions'][$file]['operation_menu']) { @@ -259,7 +256,7 @@ foreach ($extensions as $file => $extension) { if (!$extension['enabled']) { $data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.disabled.png', true).'</a>'.' <a title="'.__('Enable').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&enabled='.$file.'" class="mn">'.html_print_image('images/lightbulb_off.png', true).'</a>'; } else { - $data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.png', true).'</a>'.' <a title="'.__('Disable').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&disabled='.$file.'" class="mn">'.html_print_image('images/lightbulb.png', true).'</a>'; + $data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>'.' <a title="'.__('Disable').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&disabled='.$file.'" class="mn">'.html_print_image('images/lightbulb.png', true).'</a>'; } } else { $data[] = ''; diff --git a/pandora_console/godmode/gis_maps/configure_gis_map.php b/pandora_console/godmode/gis_maps/configure_gis_map.php index fa1351082c..ecd8959a0c 100644 --- a/pandora_console/godmode/gis_maps/configure_gis_map.php +++ b/pandora_console/godmode/gis_maps/configure_gis_map.php @@ -267,7 +267,10 @@ $buttons['gis_maps_list'] = [ 'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image( 'images/list.png', true, - ['title' => __('GIS Maps list')] + [ + 'title' => __('GIS Maps list'), + 'class' => 'invert_filter', + ] ).'</a>', ]; if ($idMap) { @@ -276,7 +279,10 @@ if ($idMap) { 'text' => '<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.$idMap.'">'.html_print_image( 'images/op_gis.png', true, - ['title' => __('View GIS')] + [ + 'title' => __('View GIS'), + 'class' => 'invert_filter', + ] ).'</a>', ]; } @@ -448,13 +454,17 @@ foreach ($listConnectionTemp as $connectionTemp) { } $table->data[1][0] = __('Add Map connection').$iconError; -$table->data[1][1] = "<table style='padding:0px;' class='no-class' border='0' id='map_connection'> +$table->data[1][1] = "<table class='no-class' border='0' id='map_connection'> <tr> - <td style='padding:0px;' > + <td > ".html_print_select($listConnection, 'map_connection', '', '', '', '0', true)." </td> - <td style='padding:0px;' > - <a href='javascript: addConnectionMap();'>".html_print_image('images/add.png', true)."</a> + <td > + <a href='javascript: addConnectionMap();'>".html_print_image( + 'images/add.png', + true, + ['class' => 'invert_filter'] +)."</a> <input type='hidden' name='map_connection_list' value='' id='map_connection_list' /> <input type='hidden' name='layer_list' value='' id='layer_list' /> </td> @@ -526,10 +536,10 @@ $table->valign[1] = 'top'; $table->data = []; $table->data[0][0] = '<h4>'.__('List of layers').'</h4>'; -$table->data[0][1] = '<div style="text-align: right;">'.html_print_button(__('New layer'), 'new_layer', false, 'newLayer();', 'class="sub add"', true).'</div>'; +$table->data[0][1] = '<divclass="right">'.html_print_button(__('New layer'), 'new_layer', false, 'newLayer();', 'class="sub add"', true).'</div>'; $table->data[1][0] = '<table class="databox" border="0" cellpadding="4" cellspacing="4" id="list_layers"></table>'; -$table->data[1][1] = '<div id="form_layer" style="display: none;"> +$table->data[1][1] = '<div id="form_layer" class="invisible"> <table id="form_layer_table" class="" border="0" cellpadding="4" cellspacing="4"> <tr> <td>'.__('Layer name').':</td> @@ -653,7 +663,18 @@ echo '</form>'; <tr class="row_0"> <td><?php html_print_input_text('map_connection_name', $map_name, '', 20, 40, false, true); ?></td> <td><?php html_print_radio_button_extended('map_connection_default', '', '', true, false, 'changeDefaultConection(this.value)', ''); ?></td> - <td><a id="delete_row" href="none"><?php html_print_image('images/cross.png', false, ['alt' => '']); ?></a></td> + <td><a id="delete_row" href="none"> + <?php + html_print_image( + 'images/cross.png', + false, + [ + 'alt' => '', + 'class' => 'invert_filter', + ] + ); + ?> + </a></td> </tr> </tbody> </table> @@ -951,7 +972,15 @@ function getAgentRow (layerId, agentId, agentAlias) { var $deleteCol = $("<td />"); var $agentAlias = $("<span class=\"agent_alias\" data-agent-id=\"" + agentId + "\">" + agentAlias + "</span>"); - var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/cross.png', true); ?></a>'); + var $removeBtn = $('<a class="delete_row" href="javascript:;"> + <?php + echo html_print_image( + 'images/cross.png', + true, + ['class' => 'invert_filter'] + ); + ?> + </a>'); $removeBtn.click(function (event) { var $layerRow = $("tr#layer_row_" + layerId); @@ -1007,7 +1036,7 @@ function getGroupRow (layerId, groupId, groupName, agentId, agentAlias) { + "<i>" + agentAlias + "</i>" + ")" + "</span>"); - var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/cross.png', true); ?></a>'); + var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']); ?></a>'); $removeBtn.click(function (event) { var $layerRow = $("tr#layer_row_" + layerId); @@ -1085,8 +1114,8 @@ function getLayerRow (layerId, layerData) { var $layerName = $("<span class=\"layer_name\">" + layerData.name + "</span>"); var $sortUpBtn = $("<a class=\"up_arrow\" href=\"javascript:;\" />"); var $sortDownBtn = $("<a class=\"down_arrow\" href=\"javascript:;\" />"); - var $editBtn = $('<a class="edit_layer" href="javascript:;"><?php echo html_print_image('images/config.png', true); ?></a>'); - var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/cross.png', true); ?></a>'); + var $editBtn = $('<a class="edit_layer" href="javascript:;"><?php echo html_print_image('images/config.png', true, ['class' => 'invert_filter']); ?></a>'); + var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']); ?></a>'); $sortUpBtn.click(moveLayerRowUpOnClick); $sortDownBtn.click(moveLayerRowDownOnClick); diff --git a/pandora_console/godmode/groups/configure_group.php b/pandora_console/godmode/groups/configure_group.php index 019a981578..7b9b43ed41 100644 --- a/pandora_console/godmode/groups/configure_group.php +++ b/pandora_console/godmode/groups/configure_group.php @@ -66,7 +66,7 @@ if ($id_group) { ui_print_error_message(__('There was a problem loading group')); echo '</table>'; echo '</div>'; - echo '<div style="clear:both"> </div>'; + echo '<div id="both"> </div>'; echo '</div>'; echo '<div id="foot">'; include 'general/footer.php'; @@ -210,11 +210,11 @@ $table->data[$i][1] = html_print_input_text('description', $description, '', 60, $i++; $table->data[$i][0] = __('Contact').ui_print_help_tip(__('Contact information accessible through the _groupcontact_ macro'), true); -$table->data[$i][1] = html_print_textarea('contact', 4, 40, $contact, "style='min-height: 0px;'", true); +$table->data[$i][1] = html_print_textarea('contact', 4, 40, $contact, "class='min-height-0px'", true); $i++; $table->data[$i][0] = __('Other').ui_print_help_tip(__('Information accessible through the _group_other_ macro'), true); -$table->data[$i][1] = html_print_textarea('other', 4, 40, $other, "style='min-height: 0px;'", true); +$table->data[$i][1] = html_print_textarea('other', 4, 40, $other, "class='min-height-0px'", true); $i++; $isFunctionSkins = enterprise_include_once('include/functions_skins.php'); diff --git a/pandora_console/godmode/groups/configure_modu_group.php b/pandora_console/godmode/groups/configure_modu_group.php index 71503a6e74..95beb0d39d 100644 --- a/pandora_console/godmode/groups/configure_modu_group.php +++ b/pandora_console/godmode/groups/configure_modu_group.php @@ -46,7 +46,7 @@ if ($id_group) { ui_print_error_message(__('There was a problem loading group')); echo '</table>'; echo '</div>'; - echo '<div style="clear:both"> </div>'; + echo '<div id="both"> </div>'; echo '</div>'; echo '<div id="foot">'; include 'general/footer.php'; diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index 55f38b3e35..f1a0cd607e 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -291,6 +291,7 @@ $buttons['tree'] = [ true, [ 'title' => __('Tree Group view'), + 'class' => 'invert_filter', ] ).'</a>', ]; @@ -302,6 +303,7 @@ $buttons['groups'] = [ true, [ 'title' => __('Group view'), + 'class' => 'invert_filter', ] ).'</a>', ]; @@ -313,6 +315,7 @@ $buttons['credbox'] = [ true, [ 'title' => __('Credential Store'), + 'class' => 'invert_filter', ] ).'</a>', ]; @@ -679,7 +682,7 @@ if ($tab == 'tree') { } $form = "<form method='post' action=''>"; - $form .= "<table class='databox filters' width='100%' style='font-weight: bold;'>"; + $form .= "<table class='databox filters bolder' width='100%'>"; $form .= '<tr><td>'.__('Search').' '; $form .= html_print_input_text('search', $search, '', 100, 100, true); $form .= '</td><td>'; @@ -844,7 +847,7 @@ if ($tab == 'tree') { if (check_acl($config['id_user'], 0, 'PM')) { echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/groups/configure_group">'; - echo '<div class="action-buttons" style="width:100%;">'; + echo '<div class="action-buttons w100p">'; html_print_submit_button(__('Create group'), 'crt', false, 'class="sub next"'); echo '</div>'; echo '</form>'; diff --git a/pandora_console/godmode/massive/massive_add_alerts.php b/pandora_console/godmode/massive/massive_add_alerts.php index ce41df7ef6..6471421295 100755 --- a/pandora_console/godmode/massive/massive_add_alerts.php +++ b/pandora_console/godmode/massive/massive_add_alerts.php @@ -286,7 +286,7 @@ echo '</form>'; echo '<h3 class="error invisible" id="message"> </h3>'; // Hack to translate text "none" in PHP to javascript. -echo '<span id ="none_text" style="display: none;">'.__('None').'</span>'; +echo '<span id ="none_text" class="invisible">'.__('None').'</span>'; ui_require_jquery_file('form'); ui_require_jquery_file('pandora.controls'); diff --git a/pandora_console/godmode/massive/massive_delete_alerts.php b/pandora_console/godmode/massive/massive_delete_alerts.php index 14fcab0d5b..1e125acaa5 100755 --- a/pandora_console/godmode/massive/massive_delete_alerts.php +++ b/pandora_console/godmode/massive/massive_delete_alerts.php @@ -341,7 +341,7 @@ attachActionButton('delete', 'delete', $table->width); echo '</form>'; // Hack to translate text "none" in PHP to javascript -echo '<span id ="none_text" style="display: none;">'.__('None').'</span>'; +echo '<span id ="none_text" class="invisible">'.__('None').'</span>'; echo '<h3 class="error invisible" id="message"> </h3>'; diff --git a/pandora_console/godmode/massive/massive_delete_modules.php b/pandora_console/godmode/massive/massive_delete_modules.php index 4e0000ada2..44a2be7108 100755 --- a/pandora_console/godmode/massive/massive_delete_modules.php +++ b/pandora_console/godmode/massive/massive_delete_modules.php @@ -311,8 +311,8 @@ $table->style[0] = 'font-weight: bold'; $table->style[2] = 'font-weight: bold'; $table->data['selection_mode'][0] = __('Selection mode'); -$table->data['selection_mode'][1] = '<span style="width:110px;display:inline-block;">'.__('Select modules first ').'</span>'.html_print_radio_button_extended('selection_mode', 'modules', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true).'<br>'; -$table->data['selection_mode'][1] .= '<span style="width:110px;display:inline-block;">'.__('Select agents first ').'</span>'.html_print_radio_button_extended('selection_mode', 'agents', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true); +$table->data['selection_mode'][1] = '<span class="massive_span">'.__('Select modules first ').'</span>'.html_print_radio_button_extended('selection_mode', 'modules', '', $selection_mode, false, '', 'class="mrgn_right_40px"', true).'<br>'; +$table->data['selection_mode'][1] .= '<span class="massive_span">'.__('Select agents first ').'</span>'.html_print_radio_button_extended('selection_mode', 'agents', '', $selection_mode, false, '', 'class="mrgn_right_40px"', true); $table->rowclass['form_modules_1'] = 'select_modules_row'; $table->data['form_modules_1'][0] = __('Module type'); @@ -341,7 +341,7 @@ $table->data['form_modules_1'][3] = __('Select all modules of this type').' '.ht '', '', false, - 'style="margin-right: 40px;"', + 'class="mrgn_right_40px"', true, '' ); @@ -386,7 +386,7 @@ $table->data['form_agents_1'][3] = __('Select all modules of this group').' '.ht '', false, '', - 'style="margin-right: 40px;"', + 'class="mrgn_right_40px"', true ); @@ -586,8 +586,8 @@ echo '<h3 class="error invisible" id="message"> </h3>'; ui_require_jquery_file('form'); // Hack to translate text "none" in PHP to javascript -echo '<span id ="none_text" style="display: none;">'.__('None').'</span>'; -echo '<span id ="select_agent_first_text" style="display: none;">'.__('Please, select an agent first').'</span>'; +echo '<span id ="none_text" class="invisible">'.__('None').'</span>'; +echo '<span id ="select_agent_first_text" class="invisible">'.__('Please, select an agent first').'</span>'; // Load JS files. ui_require_javascript_file('pandora_modules'); diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 2e8be3342f..1a0326fd21 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -506,7 +506,7 @@ $id_os = 0; $server_name = 0; $description = ''; -echo '<div id="form_agents" style="display: none;">'; +echo '<div id="form_agents" class="invisible">'; $table = new StdClass(); $table->width = '100%'; @@ -668,26 +668,26 @@ $table->data[0][1] = html_print_input_text('custom_id', $custom_id, '', 16, 255, // Learn mode / Normal mode $table->data[1][0] = __('Module definition'); -$table->data[1][1] = __('No change').' '.html_print_radio_button_extended('mode', -1, '', $mode, false, '', 'style="margin-right: 40px;"', true); -$table->data[1][1] .= __('Learning mode').' '.html_print_radio_button_extended('mode', 1, '', $mode, false, '', 'style="margin-right: 40px;"', true); -$table->data[1][1] .= __('Normal mode').' '.html_print_radio_button_extended('mode', 0, '', $mode, false, '', 'style="margin-right: 40px;"', true); -$table->data[1][1] .= __('Autodisable mode').' '.html_print_radio_button_extended('mode', 2, '', $mode, false, '', 'style="margin-right: 40px;"', true); +$table->data[1][1] = __('No change').' '.html_print_radio_button_extended('mode', -1, '', $mode, false, '', 'class="mrgn_right_40px"', true); +$table->data[1][1] .= __('Learning mode').' '.html_print_radio_button_extended('mode', 1, '', $mode, false, '', 'class="mrgn_right_40px"', true); +$table->data[1][1] .= __('Normal mode').' '.html_print_radio_button_extended('mode', 0, '', $mode, false, '', 'class="mrgn_right_40px"', true); +$table->data[1][1] .= __('Autodisable mode').' '.html_print_radio_button_extended('mode', 2, '', $mode, false, '', 'class="mrgn_right_40px"', true); // Status (Disabled / Enabled) $table->data[2][0] = __('Status'); -$table->data[2][1] = __('No change').' '.html_print_radio_button_extended('disabled', -1, '', $disabled, false, '', 'style="margin-right: 40px;"', true); -$table->data[2][1] .= __('Disabled').' '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).' '.html_print_radio_button_extended('disabled', 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true); -$table->data[2][1] .= __('Active').' '.html_print_radio_button_extended('disabled', 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true); +$table->data[2][1] = __('No change').' '.html_print_radio_button_extended('disabled', -1, '', $disabled, false, '', 'class="mrgn_right_40px"', true); +$table->data[2][1] .= __('Disabled').' '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).' '.html_print_radio_button_extended('disabled', 1, '', $disabled, false, '', 'class="mrgn_right_40px"', true); +$table->data[2][1] .= __('Active').' '.html_print_radio_button_extended('disabled', 0, '', $disabled, false, '', 'class="mrgn_right_40px"', true); // Remote configuration $table->data[3][0] = __('Remote configuration'); // Delete remote configuration -$table->data[3][1] = '<div id="delete_configurations" style="display: none">'.__('Delete available remote configurations').' ('; +$table->data[3][1] = '<div id="delete_configurations" class="invisible">'.__('Delete available remote configurations').' ('; $table->data[3][1] .= '<span id="n_configurations"></span>'; -$table->data[3][1] .= ') '.html_print_checkbox_extended('delete_conf', 1, 0, false, '', 'style="margin-right: 40px;"', true).'</div>'; +$table->data[3][1] .= ') '.html_print_checkbox_extended('delete_conf', 1, 0, false, '', 'class="mrgn_right_40px"', true).'</div>'; -$table->data[3][1] .= '<div id="not_available_configurations" style="display: none"><em>'.__('Not available').'</em></div>'; +$table->data[3][1] .= '<div id="not_available_configurations" class="invisible"><em>'.__('Not available').'</em></div>'; $listIcons = gis_get_array_list_icons(); @@ -720,9 +720,9 @@ $table->data[4][1] = html_print_select($arraySelectIcon, 'icon_path', $icon_path if ($config['activate_gis']) { $table->data[5][0] = __('Ignore new GIS data:'); - $table->data[5][1] = __('No change').' '.html_print_radio_button_extended('update_gis_data', -1, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true); - $table->data[5][1] .= __('Yes').' '.html_print_radio_button_extended('update_gis_data', 0, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true); - $table->data[5][1] .= __('No').' '.html_print_radio_button_extended('update_gis_data', 1, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true); + $table->data[5][1] = __('No change').' '.html_print_radio_button_extended('update_gis_data', -1, '', $update_gis_data, false, '', 'class="mrgn_right_40px"', true); + $table->data[5][1] .= __('Yes').' '.html_print_radio_button_extended('update_gis_data', 0, '', $update_gis_data, false, '', 'class="mrgn_right_40px"', true); + $table->data[5][1] .= __('No').' '.html_print_radio_button_extended('update_gis_data', 1, '', $update_gis_data, false, '', 'class="mrgn_right_40px"', true); } $table->data[6][0] = __('Quiet'); @@ -815,7 +815,7 @@ foreach ($fields as $field) { true ); } else { - $data[1] = html_print_textarea('customvalue_'.$field['id_field'], 2, 65, $custom_value, 'style="min-height: 30px;"', true); + $data[1] = html_print_textarea('customvalue_'.$field['id_field'], 2, 65, $custom_value, 'class="mrgn_right_30px"', true); } if ($field['combo_values'] !== '') { diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index ce7fecf110..26d2eae73a 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -290,8 +290,8 @@ $table->width = '100%'; $table->data = []; $table->data['selection_mode'][0] = __('Selection mode'); -$table->data['selection_mode'][1] = '<span style="width:110px;display:inline-block;">'.__('Select modules first ').'</span>'.html_print_radio_button_extended('selection_mode', 'modules', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true).'<br>'; -$table->data['selection_mode'][1] .= '<span style="width:110px;display:inline-block;">'.__('Select agents first ').'</span>'.html_print_radio_button_extended('selection_mode', 'agents', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true); +$table->data['selection_mode'][1] = '<span class="massive_span">'.__('Select modules first ').'</span>'.html_print_radio_button_extended('selection_mode', 'modules', '', $selection_mode, false, '', 'class="mrgn_right_40px"', true).'<br>'; +$table->data['selection_mode'][1] .= '<span class="massive_span">'.__('Select agents first ').'</span>'.html_print_radio_button_extended('selection_mode', 'agents', '', $selection_mode, false, '', 'class="mrgn_right_40px"', true); $table->rowclass['form_modules_1'] = 'select_modules_row'; $table->data['form_modules_1'][0] = __('Module type'); @@ -316,7 +316,7 @@ $table->data['form_modules_1'][3] = __('Select all modules of this type').' '.ht '', '', false, - 'style="margin-right: 40px;"', + 'class="mrgn_right_40px"', true, '' ); @@ -363,7 +363,7 @@ $table->data['form_agents_1'][3] = __('Select all modules of this group').' '.ht '', false, '', - 'style="margin-right: 40px;"' + 'class="mrgn_right_40px"' ); $table->rowclass['form_modules_3'] = ''; @@ -1187,7 +1187,7 @@ $table->data['edit1'][1] = '<table width="100%">'; } $table->data['edit21'][1] = sprintf( - '<span style="font-weight: normal;" id="plugin_description">%s</span>', + '<span class="normal" id="plugin_description">%s</span>', $preload ); @@ -1200,8 +1200,8 @@ $table->data['edit1'][1] = '<table width="100%">'; echo '<h3 class="error invisible" id="message"> </h3>'; // Hack to translate text "none" in PHP to javascript. - echo '<span id ="none_text" style="display: none;">'.__('None').'</span>'; - echo '<span id ="select_agent_first_text" style="display: none;">'.__('Please, select an agent first').'</span>'; + echo '<span id ="none_text" class="invisible">'.__('None').'</span>'; + echo '<span id ="select_agent_first_text" class="invisible">'.__('Please, select an agent first').'</span>'; // Load JS files. ui_require_javascript_file('pandora_modules'); ui_require_jquery_file('pandora.controls'); @@ -1868,7 +1868,7 @@ function changePluginSelect() { jQuery.each (data['array'], function (i, macro) { if (macro['desc'] != '') { - $("#delete_table-edit21").after("<tr class='macro_field' id='delete_table-edit"+(80+parseInt(i))+"'><td style='font-weight:bold;'>"+macro['desc']+"<input type='hidden' name='desc"+macro['macro']+"' value='"+macro['desc']+"'></td><td><input type='text' name='"+macro['macro']+"'></td></tr>"); + $("#delete_table-edit21").after("<tr class='macro_field' id='delete_table-edit"+(80+parseInt(i))+"'><td class='bolder'>"+macro['desc']+"<input type='hidden' name='desc"+macro['macro']+"' value='"+macro['desc']+"'></td><td><input type='text' name='"+macro['macro']+"'></td></tr>"); } }); //Plugin text can be larger diff --git a/pandora_console/godmode/massive/massive_operations.php b/pandora_console/godmode/massive/massive_operations.php index e26380dd19..9857c7fa1f 100755 --- a/pandora_console/godmode/massive/massive_operations.php +++ b/pandora_console/godmode/massive/massive_operations.php @@ -213,139 +213,154 @@ if ($option == '') { $alertstab = [ 'text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts">'.html_print_image( - 'images/op_alerts.png', + 'images/bell.png', true, - ['title' => __('Alerts operations')] + [ + 'title' => __('Alerts operations'), + 'class' => 'invert_filter', + ] ).'</a>', 'active' => $tab == 'massive_alerts', ]; $userstab = [ 'text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_users">'.html_print_image( - 'images/op_workspace.png', + 'images/user.png', true, - ['title' => __('Users operations')] + [ + 'title' => __('Users operations'), + 'class' => 'invert_filter', + ] ).'</a>', 'active' => $tab == 'massive_users', ]; $agentstab = [ 'text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_agents">'.html_print_image( - 'images/bricks.png', + 'images/agent.png', true, - ['title' => __('Agents operations')] + [ + 'title' => __('Agents operations'), + 'class' => 'invert_filter', + ] ).'</a>', 'active' => $tab == 'massive_agents', ]; -$modulestab = [ - 'text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_modules">'.html_print_image( - 'images/brick.png', - true, - ['title' => __('Modules operations')] - ).'</a>', 'active' => $tab == 'massive_modules', -]; + $modulestab = [ + 'text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_modules">'.html_print_image( + 'images/module.png', + true, + [ + 'title' => __('Modules operations'), + 'class' => 'invert_filter', + ] + ).'</a>', 'active' => $tab == 'massive_modules', + ]; -$pluginstab = [ - 'text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_plugins">'.html_print_image( - 'images/plugin.png', - true, - ['title' => __('Plugins operations')] - ).'</a>', 'active' => $tab == 'massive_plugins', -]; + $pluginstab = [ + 'text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_plugins">'.html_print_image( + 'images/plugin.png', + true, + [ + 'title' => __('Plugins operations'), + 'class' => 'invert_filter', + ] + ).'</a>', 'active' => $tab == 'massive_plugins', + ]; -$policiestab = enterprise_hook('massive_policies_tab'); + $policiestab = enterprise_hook('massive_policies_tab'); -if ($policiestab == ENTERPRISE_NOT_HOOK) { - $policiestab = ''; -} + if ($policiestab == ENTERPRISE_NOT_HOOK) { + $policiestab = ''; + } -$snmptab = enterprise_hook('massive_snmp_tab'); + $snmptab = enterprise_hook('massive_snmp_tab'); -if ($snmptab == ENTERPRISE_NOT_HOOK) { - $snmptab = ''; -} + if ($snmptab == ENTERPRISE_NOT_HOOK) { + $snmptab = ''; + } -$satellitetab = enterprise_hook('massive_satellite_tab'); + $satellitetab = enterprise_hook('massive_satellite_tab'); -if ($satellitetab == ENTERPRISE_NOT_HOOK) { - $satellitetab = ''; -} + if ($satellitetab == ENTERPRISE_NOT_HOOK) { + $satellitetab = ''; + } -$servicestab = enterprise_hook('massive_services_tab'); + $servicestab = enterprise_hook('massive_services_tab'); -if ($servicestab == ENTERPRISE_NOT_HOOK) { - $servicestab = ''; -} + if ($servicestab == ENTERPRISE_NOT_HOOK) { + $servicestab = ''; + } -$onheader = []; -$onheader['massive_agents'] = $agentstab; -$onheader['massive_modules'] = $modulestab; -$onheader['massive_plugins'] = $pluginstab; -if (check_acl($config['id_user'], 0, 'UM')) { - $onheader['user_agents'] = $userstab; -} + $onheader = []; + $onheader['massive_agents'] = $agentstab; + $onheader['massive_modules'] = $modulestab; + $onheader['massive_plugins'] = $pluginstab; + if (check_acl($config['id_user'], 0, 'UM')) { + $onheader['user_agents'] = $userstab; + } -$onheader['massive_alerts'] = $alertstab; -$onheader['policies'] = $policiestab; -$onheader['snmp'] = $snmptab; -$onheader['satellite'] = $satellitetab; -$onheader['services'] = $servicestab; + $onheader['massive_alerts'] = $alertstab; + $onheader['policies'] = $policiestab; + $onheader['snmp'] = $snmptab; + $onheader['satellite'] = $satellitetab; + $onheader['services'] = $servicestab; -/* - Hello there! :) + /* + Hello there! :) - We added some of what seems to be "buggy" messages to the openSource version recently. This is not to force open-source users to move to the enterprise version, this is just to inform people using Pandora FMS open source that it requires skilled people to maintain and keep it running smoothly without professional support. This does not imply open-source version is limited in any way. If you check the recently added code, it contains only warnings and messages, no limitations except one: we removed the option to add custom logo in header. In the Update Manager section, it warns about the 'danger’ of applying automated updates without a proper backup, remembering in the process that the Enterprise version comes with a human-tested package. Maintaining an OpenSource version with more than 500 agents is not so easy, that's why someone using a Pandora with 8000 agents should consider asking for support. It's not a joke, we know of many setups with a huge number of agents, and we hate to hear that “its becoming unstable and slow” :( + We added some of what seems to be "buggy" messages to the openSource version recently. This is not to force open-source users to move to the enterprise version, this is just to inform people using Pandora FMS open source that it requires skilled people to maintain and keep it running smoothly without professional support. This does not imply open-source version is limited in any way. If you check the recently added code, it contains only warnings and messages, no limitations except one: we removed the option to add custom logo in header. In the Update Manager section, it warns about the 'danger’ of applying automated updates without a proper backup, remembering in the process that the Enterprise version comes with a human-tested package. Maintaining an OpenSource version with more than 500 agents is not so easy, that's why someone using a Pandora with 8000 agents should consider asking for support. It's not a joke, we know of many setups with a huge number of agents, and we hate to hear that “its becoming unstable and slow” :( - You can of course remove the warnings, that's why we include the source and do not use any kind of trick. And that's why we added here this comment, to let you know this does not reflect any change in our opensource mentality of does the last 14 years. + You can of course remove the warnings, that's why we include the source and do not use any kind of trick. And that's why we added here this comment, to let you know this does not reflect any change in our opensource mentality of does the last 14 years. -*/ + */ -ui_print_page_header( - __('Bulk operations').' » '.$options[$option], - 'images/gm_massive_operations.png', - false, - $help_header, - true, - $onheader, - false, - 'massivemodal' -); + ui_print_page_header( + __('Bulk operations').' » '.$options[$option], + 'images/gm_massive_operations.png', + false, + $help_header, + true, + $onheader, + false, + 'massivemodal' + ); -// Checks if the PHP configuration is correctly. -if ((get_cfg_var('max_execution_time') != 0) - || (get_cfg_var('max_input_time') != -1) -) { - echo '<div id="notify_conf" class="notify">'; - echo __('In order to perform massive operations, PHP needs a correct configuration in timeout parameters. Please, open your PHP configuration file (php.ini) for example: <i>sudo vi /etc/php5/apache2/php.ini;</i><br> And set your timeout parameters to a correct value: <br><i> max_execution_time = 0</i> and <i>max_input_time = -1</i>'); - echo '</div>'; -} + // Checks if the PHP configuration is correctly. + if ((get_cfg_var('max_execution_time') != 0) + || (get_cfg_var('max_input_time') != -1) + ) { + echo '<div id="notify_conf" class="notify">'; + echo __('In order to perform massive operations, PHP needs a correct configuration in timeout parameters. Please, open your PHP configuration file (php.ini) for example: <i>sudo vi /etc/php5/apache2/php.ini;</i><br> And set your timeout parameters to a correct value: <br><i> max_execution_time = 0</i> and <i>max_input_time = -1</i>'); + echo '</div>'; + } -if ($tab == 'massive_policies' && is_central_policies_on_node()) { - ui_print_warning_message(__('This node is configured with centralized mode. All policies information is read only. Go to metaconsole to manage it.')); - return; -} + if ($tab == 'massive_policies' && is_central_policies_on_node()) { + ui_print_warning_message(__('This node is configured with centralized mode. All policies information is read only. Go to metaconsole to manage it.')); + return; + } -// Catch all submit operations in this view to display Wait banner. -$submit_action = get_parameter('go'); -$submit_update = get_parameter('updbutton'); -$submit_del = get_parameter('del'); -$submit_template_disabled = get_parameter('id_alert_template_disabled'); -$submit_template_enabled = get_parameter('id_alert_template_enabled'); -$submit_template_not_standby = get_parameter('id_alert_template_not_standby'); -$submit_template_standby = get_parameter('id_alert_template_standby'); -$submit_add = get_parameter('crtbutton'); -// Waiting spinner. -ui_print_spinner(__('Loading')); -// Modal for show messages. -html_print_div( - [ - 'id' => 'massive_modal', - 'content' => '', - ] -); + // Catch all submit operations in this view to display Wait banner. + $submit_action = get_parameter('go'); + $submit_update = get_parameter('updbutton'); + $submit_del = get_parameter('del'); + $submit_template_disabled = get_parameter('id_alert_template_disabled'); + $submit_template_enabled = get_parameter('id_alert_template_enabled'); + $submit_template_not_standby = get_parameter('id_alert_template_not_standby'); + $submit_template_standby = get_parameter('id_alert_template_standby'); + $submit_add = get_parameter('crtbutton'); + // Waiting spinner. + ui_print_spinner(__('Loading')); + // Modal for show messages. + html_print_div( + [ + 'id' => 'massive_modal', + 'content' => '', + ] + ); -// Load common JS files. -ui_require_javascript_file('massive_operations'); + // Load common JS files. + ui_require_javascript_file('massive_operations'); -?> + ?> <script language="javascript" type="text/javascript"> /* <![CDATA[ */ diff --git a/pandora_console/godmode/module_library/module_library_view.php b/pandora_console/godmode/module_library/module_library_view.php index 439aa5719e..f69c7779fb 100644 --- a/pandora_console/godmode/module_library/module_library_view.php +++ b/pandora_console/godmode/module_library/module_library_view.php @@ -42,18 +42,18 @@ if (! check_acl($config['id_user'], 0, 'AR')) { if (check_acl($config['id_user'], 0, 'PM') && enterprise_installed()) { $buttons['setup'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=general&sec2=godmode/setup/setup&section=module_library">'.html_print_image('images/gm_setup.png', true, ['title' => __('Setup')]).'</a>', + 'text' => '<a href="index.php?sec=general&sec2=godmode/setup/setup&section=module_library">'.html_print_image('images/gm_setup.png', true, ['title' => __('Setup'), 'class' => 'invert_filter']).'</a>', ]; } $buttons['categories'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view&tab=categories">'.html_print_image('images/list.png', true, ['title' => __('Categories')]).'</a>', + 'text' => '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view&tab=categories">'.html_print_image('images/list.png', true, ['title' => __('Categories'), 'class' => 'invert_filter']).'</a>', ]; $buttons['view'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view">'.html_print_image('images/operation.png', true, ['title' => __('View')]).'</a>', + 'text' => '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view">'.html_print_image('images/eye_show.png', true, ['title' => __('View'), 'class' => 'invert_filter']).'</a>', ]; @@ -126,7 +126,7 @@ switch ($tab) { echo '</div>'; echo '<button name="view_all" class="sub next"> - <a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view&tab=categories">'.__('View all categories').'</a> + <a class="category_link"href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view&tab=categories">'.__('View all categories').'</a> </button>'; echo '</div>'; echo $sidebar_library; diff --git a/pandora_console/godmode/modules/manage_nc_groups.php b/pandora_console/godmode/modules/manage_nc_groups.php index 0b0d7afea5..6ee07af31c 100644 --- a/pandora_console/godmode/modules/manage_nc_groups.php +++ b/pandora_console/godmode/modules/manage_nc_groups.php @@ -264,7 +264,7 @@ foreach ($groups as $group) { $table->cellclass[][1] = 'action_buttons'; if (is_management_allowed() === true) { $data[1] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;' - href='index.php?sec=".$sec.'&sec2=godmode/modules/manage_nc_groups&delete=1&id='.$group['id_sg']."&offset=0'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'; + href='index.php?sec=".$sec.'&sec2=godmode/modules/manage_nc_groups&delete=1&id='.$group['id_sg']."&offset=0'>".html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'; } array_push($table->data, $data); @@ -279,7 +279,7 @@ if (isset($data)) { html_print_input_hidden('multiple_delete', 1); html_print_table($table); if (is_management_allowed() === true) { - echo "<div style='padding-left: 10px; float: right;'>"; + echo "<div class='pdd_l_10px float-right'>"; html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"'); echo '</div>'; } @@ -291,7 +291,7 @@ if (isset($data)) { if (is_management_allowed() === true) { echo '<form method="post" action='.$url.'>'; - echo '<div class="" style="float:right;">'; + echo '<div class="float-right">'; html_print_input_hidden('new', 1); html_print_submit_button(__('Create'), 'crt', false, 'class="sub next"'); echo '</div>'; diff --git a/pandora_console/godmode/modules/manage_network_components.php b/pandora_console/godmode/modules/manage_network_components.php index 2c6f0a7362..2594d4c023 100644 --- a/pandora_console/godmode/modules/manage_network_components.php +++ b/pandora_console/godmode/modules/manage_network_components.php @@ -811,9 +811,12 @@ foreach ($components as $component) { switch ($component['id_modulo']) { case MODULE_NETWORK: $data[1] .= html_print_image( - 'images/network.png', + 'images/op_network.png', true, - ['title' => __('Network module')] + [ + 'title' => __('Network module'), + 'class' => 'invert_filter', + ] ); break; @@ -821,7 +824,10 @@ foreach ($components as $component) { $data[1] .= html_print_image( 'images/wmi.png', true, - ['title' => __('WMI module')] + [ + 'title' => __('WMI module'), + 'class' => 'invert_filter', + ] ); break; @@ -829,7 +835,10 @@ foreach ($components as $component) { $data[1] .= html_print_image( 'images/plugin.png', true, - ['title' => __('Plug-in module')] + [ + 'title' => __('Plug-in module'), + 'class' => 'invert_filter', + ] ); break; @@ -837,7 +846,10 @@ foreach ($components as $component) { $data[1] .= html_print_image( 'images/wand.png', true, - ['title' => __('Wizard module')] + [ + 'title' => __('Wizard module'), + 'class' => 'invert_filter', + ] ); break; @@ -847,13 +859,29 @@ foreach ($components as $component) { } $data[2] = ui_print_moduletype_icon($component['type'], true); - $data[3] = "<span style='font-size: 8px'>".mb_strimwidth(io_safe_output($component['description']), 0, 60, '...').'</span>'; + $data[3] = "<span class='font_8px'>".mb_strimwidth(io_safe_output($component['description']), 0, 60, '...').'</span>'; $data[4] = network_components_get_group_name($component['id_group']); $data[5] = $component['max'].' / '.$component['min']; $table->cellclass[][6] = 'action_buttons'; - $data[6] = '<a style="display: inline; float: left" href="'.$url.'&search_id_group='.$search_id_group.'search_string='.$search_string.'&duplicate_network_component=1&source_id='.$component['id_nc'].'">'.html_print_image('images/copy.png', true, ['alt' => __('Duplicate'), 'title' => __('Duplicate')]).'</a>'; - $data[6] .= '<a href="'.$url.'&delete_component=1&id='.$component['id_nc'].'&search_id_group='.$search_id_group.'search_string='.$search_string.'" onclick="if (! confirm (\''.__('Are you sure?').'\')) return false" >'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>'; + $data[6] = '<a class="inline_line float-left" href="'.$url.'&search_id_group='.$search_id_group.'search_string='.$search_string.'&duplicate_network_component=1&source_id='.$component['id_nc'].'">'.html_print_image( + 'images/copy.png', + true, + [ + 'alt' => __('Duplicate'), + 'title' => __('Duplicate'), + 'class' => 'invert_filter', + ] + ).'</a>'; + $data[6] .= '<a href="'.$url.'&delete_component=1&id='.$component['id_nc'].'&search_id_group='.$search_id_group.'search_string='.$search_string.'" onclick="if (! confirm (\''.__('Are you sure?').'\')) return false" >'.html_print_image( + 'images/cross.png', + true, + [ + 'alt' => __('Delete'), + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] + ).'</a>'; array_push($table->data, $data); } @@ -872,7 +900,7 @@ if (isset($data)) { true, 'pagination-bottom' ); - echo "<div style='float: right; margin-left: 5px;'>"; + echo "<div id='btn_delete_5'>"; html_print_submit_button( __('Delete'), 'delete_btn', @@ -891,7 +919,7 @@ if (isset($data)) { } echo '<form method="post" action="'.$url.'">'; -echo '<div class="" style="float:right;">'; +echo '<div class="right">'; html_print_input_hidden('new_component', 1); html_print_select( [ @@ -911,7 +939,7 @@ html_print_submit_button( __('Create'), 'crt', false, - 'class="sub next" style="margin-left: 5px;"' + 'class="sub next mrgn_lft_5px"' ); echo '</div>'; echo '</form>'; diff --git a/pandora_console/godmode/modules/manage_network_components_form_common.php b/pandora_console/godmode/modules/manage_network_components_form_common.php index a5699e36fc..dde4b784d6 100644 --- a/pandora_console/godmode/modules/manage_network_components_form_common.php +++ b/pandora_console/godmode/modules/manage_network_components_form_common.php @@ -141,7 +141,14 @@ $table->data[2][3] = html_print_extended_select_for_time('module_interval', $mod $table->data[3][0] = __('Dynamic Interval'); $table->data[3][1] = html_print_extended_select_for_time('dynamic_interval', $dynamic_interval, '', 'None', '0', 10, true, 'width:150px', false); -$table->data[3][1] .= '<a onclick=advanced_option_dynamic()>'.html_print_image('images/cog.png', true, ['title' => __('Advanced options Dynamic Threshold')]).'</a>'; +$table->data[3][1] .= '<a onclick=advanced_option_dynamic()>'.html_print_image( + 'images/cog.png', + true, + [ + 'title' => __('Advanced options Dynamic Threshold'), + 'class' => 'invert_filter', + ] +).'</a>'; $table->data[3][2] = '<span><em>'.__('Dynamic Min. ').'</em>'; $table->data[3][2] .= html_print_input_text('dynamic_min', $dynamic_min, '', 10, 255, true); @@ -353,10 +360,8 @@ $table->data[$next_row][1] .= html_print_select_from_sql( 'width: 200px', '5' ); -$table->data[$next_row][2] = html_print_image('images/darrowright.png', true, ['id' => 'right', 'title' => __('Add tags to module')]); -// html_print_input_image ('add', 'images/darrowright.png', 1, '', true, array ('title' => __('Add tags to module'))); -$table->data[$next_row][2] .= '<br><br><br><br>'.html_print_image('images/darrowleft.png', true, ['id' => 'left', 'title' => __('Delete tags to module')]); -// html_print_input_image ('add', 'images/darrowleft.png', 1, '', true, array ('title' => __('Delete tags to module'))); +$table->data[$next_row][2] = html_print_image('images/darrowright.png', true, ['id' => 'right', 'title' => __('Add tags to module'), 'class' => 'invert_filter']); +$table->data[$next_row][2] .= '<br><br><br><br>'.html_print_image('images/darrowleft.png', true, ['id' => 'left', 'title' => __('Delete tags to module'), 'class' => 'invert_filter']); $table->data[$next_row][3] = '<b>'.__('Tags selected').'</b><br>'; $table->data[$next_row][3] .= html_print_select_from_sql( "SELECT name AS name1, name AS name2 diff --git a/pandora_console/godmode/modules/manage_network_components_form_wizard.php b/pandora_console/godmode/modules/manage_network_components_form_wizard.php index 0cc411e514..4ee77bafb5 100644 --- a/pandora_console/godmode/modules/manage_network_components_form_wizard.php +++ b/pandora_console/godmode/modules/manage_network_components_form_wizard.php @@ -59,7 +59,7 @@ function generateExtraFields($extra_fields, $protocol) } $data = []; - $data[0] = '<div style="text-align: right;">'.$extraFieldText.'</div>'; + $data[0] = '<div class="right">'.$extraFieldText.'</div>'; $data[1] = html_print_input_text_extended( 'extra_field_'.$protocol.'_'.$idField, $field, @@ -88,6 +88,7 @@ function generateExtraFields($extra_fields, $protocol) [ 'title' => __('Add a macro oid'), 'onclick' => 'manageComponentFields(\'add\', \'oid-list-'.$rowId.'\');', + 'class' => 'invert_filter', ] ), ], @@ -106,6 +107,7 @@ function generateExtraFields($extra_fields, $protocol) 'title' => __('Remove last macro oid'), 'onclick' => 'manageComponentFields(\'del\', \'oid-list-'.$rowId.'\');', 'style' => 'margin-left: 1em;', + 'class' => 'invert_filter', ] ), ], @@ -615,7 +617,7 @@ $table->style[0] = 'font-weight: bold;'; push_table_row($data, 'title-query-filters-wmiRow'); $data = []; -$data[0] = '<div style="text-align: right;">'.__('Scan').'</div>'; +$data[0] = '<div class="right">'.__('Scan').'</div>'; $data[1] = html_print_input_text_extended( 'query_filter_scan', $query_filter['scan'], @@ -633,7 +635,7 @@ push_table_row($data, 'query-filter-scan-wmiRow'); if ($execution_type == EXECUTION_TYPE_NETWORK) { $data = []; - $data[0] = '<div style="text-align: right;">'.__('Execution').'</div>'; + $data[0] = '<div class="right">'.__('Execution').'</div>'; $data[1] = html_print_input_text_extended( 'query_filter_execution', $query_filter['execution'], diff --git a/pandora_console/godmode/modules/manage_network_templates.php b/pandora_console/godmode/modules/manage_network_templates.php index 044c065c9c..9305bd6de1 100644 --- a/pandora_console/godmode/modules/manage_network_templates.php +++ b/pandora_console/godmode/modules/manage_network_templates.php @@ -233,7 +233,7 @@ $table->head[0] = html_print_checkbox('all_delete', 0, false, true, false); ; $table->head[1] = __('Name'); $table->head[2] = __('Description'); -$table->head[3] = '<span style="margin-right:7%;">'.__('Action').'</span>'; +$table->head[3] = '<span class="mrgn_right_7p">'.__('Action').'</span>'; $table->size = []; $table->size[0] = '20px'; $table->size[2] = '65%'; @@ -256,7 +256,10 @@ foreach ($result as $row) { $row['id_np'], '', true, - ['onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;'] + [ + 'onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;', + 'class' => 'invert_filter', + ] ); $data[3] .= html_print_input_image( 'export_profile', @@ -264,10 +267,13 @@ foreach ($result as $row) { $row['id_np'], '', true, - ['title' => 'Export to CSV'] + [ + 'title' => 'Export to CSV', + 'class' => 'invert_filter', + ] ); - $data[3] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&delete_profile=1&delete_profile='.$row['id_np'].'" '.'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'; - $data[3] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&export_profile='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV')]).'</a>'; + $data[3] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&delete_profile=1&delete_profile='.$row['id_np'].'" '.'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'; + $data[3] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&export_profile='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV'), 'class' => 'invert_filter']).'</a>'; array_push($table->data, $data); } @@ -278,7 +284,7 @@ if (!empty($table->data)) { ui_pagination($count_network_templates, false, $offset); html_print_table($table); ui_pagination($count_network_templates, false, $offset, 0, false, 'offset', true, 'pagination-bottom'); - echo "<div style='padding-left: 5px; float: right; '>"; + echo "<div class='pdd_l_5px right'>"; html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"'); echo '</div>'; echo '</form>'; @@ -287,7 +293,7 @@ if (!empty($table->data)) { } echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates_form">'; -echo '<div style="float:right;" class="">'; +echo '<div class="right">'; html_print_submit_button(__('Create'), 'crt', '', 'class="sub next"'); echo '</div></form>'; diff --git a/pandora_console/godmode/modules/manage_network_templates_form.php b/pandora_console/godmode/modules/manage_network_templates_form.php index 6f34209672..795e3c8c9b 100644 --- a/pandora_console/godmode/modules/manage_network_templates_form.php +++ b/pandora_console/godmode/modules/manage_network_templates_form.php @@ -161,7 +161,7 @@ echo '<tr><td class="datos2">'.'<b>'.__('Description').'</b>'.'</td>'; echo '<td class="datos2">'; html_print_textarea('description', 2, 60, $description); echo '</td></tr>'; -echo '<tr><td></td><td style="text-align:right;">'; +echo '<tr><td></td><td class="right">'; if ($id_np > 0) { html_print_submit_button(__('Update'), 'updbutton', false, 'class="sub upd"'); } else { @@ -245,7 +245,7 @@ if ($id_np > 0) { unset($table); - echo "<h4 style='margin-top:0px !important;'>".__('Add modules').'</h4>'; + echo "<h4 class='mrgn_top_0'>".__('Add modules').'</h4>'; unset($table); @@ -266,7 +266,7 @@ if ($id_np > 0) { $filter .= '</form>'; $group_filter = '<form name="filter_group" method="post" action="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates_form&id_np='.$id_np.'#filter">'; - $group_filter .= '<div style="width:540px"><a name="filter"></a>'; + $group_filter .= '<div class="width:540px"><a name="filter"></a>'; $result = db_get_all_rows_in_table('tnetwork_component_group', 'name'); if ($result === false) { $result = []; @@ -288,7 +288,7 @@ if ($id_np > 0) { $groups_compound[$row['id_sg']] .= $row['name']; } - $group_filter .= html_print_select($groups_compound, 'ncgroup', $ncgroup, 'javascript:this.form.submit();', __('Group').' - '.__('All'), -1, true, false, true, '" style="width:350px'); + $group_filter .= html_print_select($groups_compound, 'ncgroup', $ncgroup, 'javascript:this.form.submit();', __('Group').' - '.__('All'), -1, true, false, true, '" class="w350px'); $group_filter .= '</div></form>'; @@ -320,7 +320,7 @@ if ($id_np > 0) { } $components_select = '<form name="add_module" method="post" action="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates_form&id_np='.$id_np.'&add_module=1">'; - $components_select .= html_print_select($components, 'components[]', $id_nc, '', '', -1, true, true, false, '" style="width:350px'); + $components_select .= html_print_select($components, 'components[]', $id_nc, '', '', -1, true, true, false, '" clas="w350px'); $table->data[0][0] = __('Filter'); $table->data[0][1] = $filter; diff --git a/pandora_console/godmode/modules/module_list.php b/pandora_console/godmode/modules/module_list.php index 02c0d9def8..864ebe32c2 100644 --- a/pandora_console/godmode/modules/module_list.php +++ b/pandora_console/godmode/modules/module_list.php @@ -77,7 +77,7 @@ foreach ($rows as $row) { echo " <tr> - <td class='$tdcolor' align=''>".html_print_image('images/'.$row['icon'], true, ['border' => '0'])."</td> + <td class='$tdcolor' align=''>".html_print_image('images/'.$row['icon'], true, ['border' => '0', 'class' => 'invert_filter'])."</td> <td class='$tdcolor'> <b>".$row['id_tipo']." </b></td> diff --git a/pandora_console/godmode/netflow/nf_edit.php b/pandora_console/godmode/netflow/nf_edit.php index c907761a3d..51d999ef42 100644 --- a/pandora_console/godmode/netflow/nf_edit.php +++ b/pandora_console/godmode/netflow/nf_edit.php @@ -193,7 +193,7 @@ foreach ($filters as $filter) { if (check_acl_restricted_all($config['id_user'], $filter['id_group'], 'AW')) { $table->cellclass[][3] = 'action_buttons'; $data[3] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;' - href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&delete=1&id='.$filter['id_sg']."&offset=0&pure=$pure'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'; + href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&delete=1&id='.$filter['id_sg']."&offset=0&pure=$pure'>".html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'; } array_push($table->data, $data); @@ -203,7 +203,7 @@ if (isset($data)) { echo "<form method='post' action='".$config['homeurl']."index.php?sec=netf&sec2=godmode/netflow/nf_edit&pure=$pure'>"; html_print_input_hidden('multiple_delete', 1); html_print_table($table); - echo "<div style=' float: right;'>"; + echo "<div class='right'>"; html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"'); echo '</div>'; @@ -213,7 +213,7 @@ if (isset($data)) { } echo '<form method="post" action="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form&pure='.$pure.'">'; -echo "<div style='margin-right: 5px; float: right;'>"; +echo "<div class='mrgn_right_5px right'>"; html_print_submit_button(__('Create filter'), 'crt', false, 'class="sub wand"'); echo '</div>'; echo '</form>'; diff --git a/pandora_console/godmode/netflow/nf_edit_form.php b/pandora_console/godmode/netflow/nf_edit_form.php index 5fc9b9d0af..96bc06b87a 100644 --- a/pandora_console/godmode/netflow/nf_edit_form.php +++ b/pandora_console/godmode/netflow/nf_edit_form.php @@ -232,8 +232,8 @@ if ($advanced_filter != '') { } $table->data[2][0] = '<b>'.__('Filter:').'</b>'; -$table->data[2][1] = __('Normal').' '.html_print_radio_button_extended('filter_type', 0, '', $filter_type, false, 'displayNormalFilter();', 'style="margin-right: 40px;"', true); -$table->data[2][1] .= __('Advanced').' '.html_print_radio_button_extended('filter_type', 1, '', $filter_type, false, 'displayAdvancedFilter();', 'style="margin-right: 40px;"', true); +$table->data[2][1] = __('Normal').' '.html_print_radio_button_extended('filter_type', 0, '', $filter_type, false, 'displayNormalFilter();', 'class="mrgn_right_40px"', true); +$table->data[2][1] .= __('Advanced').' '.html_print_radio_button_extended('filter_type', 1, '', $filter_type, false, 'displayAdvancedFilter();', 'class="mrgn_right_40px"', true); $table->data[3][0] = __('Dst Ip').ui_print_help_tip(__('Destination IP. A comma separated list of destination ip. If we leave the field blank, will show all ip. Example filter by ip:<br>25.46.157.214,160.253.135.249'), true); $table->data[3][1] = html_print_input_text('ip_dst', $ip_dst, false, 40, 80, true); diff --git a/pandora_console/godmode/netflow/nf_item_list.php b/pandora_console/godmode/netflow/nf_item_list.php index 00f6818857..558cbb339c 100644 --- a/pandora_console/godmode/netflow/nf_item_list.php +++ b/pandora_console/godmode/netflow/nf_item_list.php @@ -43,7 +43,14 @@ $buttons['edit_report']['text'] = '<a href="'.$config['homeurl'].'index.php?sec= // Header if (! defined('METACONSOLE')) { - ui_print_page_header(__('Report items'), 'images/gm_netflow.png', false, '', true, $buttons); + ui_print_page_header( + __('Report items'), + 'images/gm_netflow.png', + false, + '', + true, + $buttons + ); } else { $nav_bar = [ [ @@ -222,9 +229,9 @@ $last_item = $item_max['id_rc']; foreach ($reports_item as $item) { $data = []; if (($item['id_rc'] == $first_item) && ($item['id_rc'] == $last_item)) { - $data[0] = '<span style="display: block; float: left; width: 16px;"> </span>'; + $data[0] = '<span class="list_block_float"> </span>'; } else if (($item['id_rc'] == $first_item) && ($item['id_rc'] != $last_item)) { - $data[0] = '<span style="display: block; float: left; width: 16px;"> </span>'; + $data[0] = '<span class="list_block_float"> </span>'; $data[0] .= '<a href="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=down&id_rc='.$item['id_rc'].'">'.html_print_image('images/down.png', true, ['title' => __('Move to down')]).'</a>'; } else if (($item['id_rc'] == $last_item) && ($item['id_rc'] != $first_item)) { $data[0] = '<a href="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=up&id_rc='.$item['id_rc'].'">'.html_print_image('images/up.png', true, ['title' => __('Move to up')]).'</a>'; @@ -262,7 +269,7 @@ foreach ($reports_item as $item) { } $data[5] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;' - href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&delete=1&id_rc='.$item['id_rc'].'&id='.$id."&offset=0'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $item['id_rc'], false, false, '', 'class="check_delete"', true); + href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&delete=1&id_rc='.$item['id_rc'].'&id='.$id."&offset=0'>".html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'.html_print_checkbox_extended('delete_multiple[]', $item['id_rc'], false, false, '', 'class="check_delete"', true); array_push($table->data, $data); } @@ -271,7 +278,7 @@ if (isset($data)) { echo '<form method="post" action="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$id.'">'; html_print_input_hidden('multiple_delete', 1); html_print_table($table); - echo "<div style='padding-bottom: 20px; text-align: right; width:".$table->width."'>"; + echo "<div class='right pdd_b_20px'style='width:".$table->width."'>"; html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"'); echo '</div>'; echo '</form>'; @@ -280,7 +287,7 @@ if (isset($data)) { } echo '<form method="post" action="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_report_item&id='.$id.'">'; -echo "<div style='padding-bottom: 20px; text-align: right; width:".$table->width."'>"; +echo "<div class='right pdd_b_20px' style='width:".$table->width."'>"; html_print_submit_button(__('Create item'), 'crt', false, 'class="sub wand"'); echo '</div>'; echo '</form>'; diff --git a/pandora_console/godmode/reporting/create_container.php b/pandora_console/godmode/reporting/create_container.php index 394231c227..f2661f86eb 100644 --- a/pandora_console/godmode/reporting/create_container.php +++ b/pandora_console/godmode/reporting/create_container.php @@ -173,7 +173,14 @@ if ($delete_item) { $buttons['graph_container'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">'.html_print_image('images/graph-container.png', true, ['title' => __('Graph container')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">'.html_print_image( + 'images/graph-container.png', + true, + [ + 'title' => __('Graph container'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; // Header. @@ -202,11 +209,11 @@ if ($edit_container) { } echo '<tr>'; -echo "<td class='datos' style='width: 12%;'><b>".__('Name').'</b></td>'; +echo "<td class='datos w10p'><b>".__('Name').'</b></td>'; if ($id_container === '1') { - echo "<td class='datos' style='width: 27%;'><input type='text' name='name' size='30' disabled='1'"; + echo "<td class='datos w30p'><input type='text' name='name' size='30' disabled='1'"; } else { - echo "<td class='datos' style='width: 27%;'><input type='text' name='name' size='30' "; + echo "<td class='datos w30p'><input type='text' name='name' size='30' "; } if ($edit_container) { @@ -221,7 +228,7 @@ if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) { $return_all_groups = false; } -echo "<td style='width: 12%;'><b>".__('Group').'</b></td><td>'; +echo "<td class='w10p'><b>".__('Group').'</b></td><td>'; echo '<div class="w250px">'; if ($id_container === '1') { echo html_print_select_groups($config['id_user'], '', $return_all_groups, 'container_id_group', $id_group, '', '', '', true, false, true, '', true); @@ -235,9 +242,9 @@ echo '</td></tr>'; echo '<tr>'; echo "<td class='datos2'><b>".__('Description').'</b></td>'; if ($id_container === '1') { - echo "<td class='datos2' colspan=3><textarea name='description' style='height:45px;' cols=95 rows=2 disabled>"; + echo "<td class='datos2' colspan=3><textarea name='description' class='height_45px' cols=95 rows=2 disabled>"; } else { - echo "<td class='datos2' colspan=3><textarea name='description' style='height:45px;' cols=95 rows=2>"; + echo "<td class='datos2' colspan=3><textarea name='description' class='height_45px' cols=95 rows=2>"; } if ($edit_container) { @@ -297,10 +304,10 @@ echo '</table>'; if ($edit_container) { if ($id_container !== '1') { - echo "<div style='width:100%'><input style='float:right;' type=submit name='store' disbaled class='sub upd' value='".__('Update')."'></div>"; + echo "<div class='w100p'><input type=submit name='store' disbaled class='sub upd right' value='".__('Update')."'></div>"; } } else { - echo "<div style='width:100%'><input style='float:right;' type=submit name='store' class='sub next' value='".__('Create')."'></div>"; + echo "<div class='w100p'><input type=submit name='store' class='sub next right' value='".__('Create')."'></div>"; } echo '</form>'; @@ -329,8 +336,8 @@ if ($edit_container) { $type_graphs[1] = __('Line'); $single_table = "<table width='100%' cellpadding=4 cellspacing=4>"; - $single_table .= "<tr id='row_time_lapse' style='' class='datos'>"; - $single_table .= "<td style='font-weight:bold;width: 13%;'>"; + $single_table .= "<tr id='row_time_lapse' class='datos'>"; + $single_table .= "<td class='bolder w10p'>"; $single_table .= __('Time lapse'); $single_table .= ui_print_help_tip(__('This is the interval or period of time with which the graph data will be obtained. For example, a week means data from a week ago from now. '), true); $single_table .= '</td>'; @@ -352,8 +359,8 @@ if ($edit_container) { $single_table .= '</td>'; $single_table .= '</tr>'; - $single_table .= "<tr id='row_agent' style='' class='datos'>"; - $single_table .= "<td style='font-weight:bold;width: 12%;'>"; + $single_table .= "<tr id='row_agent' class='datos'>"; + $single_table .= "<td class='bolder w10p'>"; $single_table .= __('Agent'); $single_table .= '</td>'; $single_table .= '<td>'; @@ -375,15 +382,15 @@ if ($edit_container) { $single_table .= '</td>'; $single_table .= '</tr>'; - $single_table .= "<tr id='row_module' style='' class='datos'>"; - $single_table .= "<td style='font-weight:bold;width: 12%;'>"; + $single_table .= "<tr id='row_module' class='datos'>"; + $single_table .= "<td class='bolder w10p'>"; $single_table .= __('Module'); $single_table .= '</td>'; $single_table .= '<td>'; if ($idAgent) { $single_table .= html_print_select_from_sql($sql_modules, 'id_agent_module', $idAgentModule, '', '', '0', true); } else { - $single_table .= "<select style='max-width: 180px' id='id_agent_module' name='id_agent_module' disabled='disabled'>"; + $single_table .= "<select class='maxw180px' id='id_agent_module' name='id_agent_module' disabled='disabled'>"; $single_table .= "<option value='0'>"; $single_table .= __('Select an Agent first'); $single_table .= '</option>'; @@ -393,8 +400,8 @@ if ($edit_container) { $single_table .= '</td>'; $single_table .= '</tr>'; - $single_table .= "<tr id='row_type_graphs' style='' class='datos'>"; - $single_table .= "<td style='font-weight:bold;'>"; + $single_table .= "<tr id='row_type_graphs' class='datos'>"; + $single_table .= "<td class='bolder'>"; $single_table .= __('Type of graph'); $single_table .= '</td>'; $single_table .= '<td>'; @@ -402,8 +409,8 @@ if ($edit_container) { $single_table .= '</td>'; $single_table .= '</tr>'; - $single_table .= "<tr id='row_fullscale' style='' class='datos'>"; - $single_table .= "<td style='font-weight:bold;'>"; + $single_table .= "<tr id='row_fullscale' class='datos'>"; + $single_table .= "<td class='bolder'>"; $single_table .= __('Show full scale graph (TIP)').ui_print_help_tip('This option may cause performance issues', true); $single_table .= '</td>'; $single_table .= '<td>'; @@ -414,8 +421,8 @@ if ($edit_container) { $single_table .= '<tr>'; $single_table .= '<td >'; $single_table .= '</td>'; - $single_table .= "<td style='float:right;'>"; - $single_table .= "<input style='float:right;' type=submit name='add_single' class='sub add' value='".__('Add item')."'>"; + $single_table .= "<td class='right'>"; + $single_table .= "<input type=submit name='add_single' class='sub add right' value='".__('Add item')."'>"; $single_table .= '</td>'; $single_table .= '</tr>'; $single_table .= '</table>'; @@ -468,7 +475,7 @@ if ($edit_container) { $data = []; $data[0] = ''; - $data[1] = "<input style='float:right;' type=submit name='add_custom' class='sub add' value='".__('Add item')."'>"; + $data[1] = "<input type=submit name='add_custom' class='sub add right' value='".__('Add item')."'>"; $table->data[] = $data; $table->rowclass[] = ''; @@ -563,7 +570,7 @@ if ($edit_container) { $data = []; $data[0] = ''; - $data[1] = "<input style='float:right;' type=submit name='add_dynamic' class='sub add' value='".__('Add item')."'>"; + $data[1] = "<input type=submit name='add_dynamic' class='sub add right' value='".__('Add item')."'>"; $table->data[] = $data; $table->rowclass[] = ''; @@ -648,7 +655,7 @@ if ($edit_container) { } $data[7] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/create_container&edit_container=1&delete_item=1&id_item='.$item['id_ci'].'&id='.$id_container.'" onClick="if (!confirm(\''.__('Are you sure?').'\')) - return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>'; + return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete'), 'class' => 'invert_filter']).'</a>'; array_push($table->data, $data); } diff --git a/pandora_console/godmode/reporting/graph_builder.graph_editor.php b/pandora_console/godmode/reporting/graph_builder.graph_editor.php index bae0f0d504..1d9b891b79 100644 --- a/pandora_console/godmode/reporting/graph_builder.graph_editor.php +++ b/pandora_console/godmode/reporting/graph_builder.graph_editor.php @@ -253,7 +253,7 @@ if ($count_module_array > 0) { echo '</tr></table>'; echo '</td>'; echo "<td class='$tdcolor' align=''>"; - echo "<a href='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&delete_module=1&id=".$id_graph.'&delete='.$idgs_array[$a]."'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'; + echo "<a href='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&delete_module=1&id=".$id_graph.'&delete='.$idgs_array[$a]."'>".html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'; echo '</td>'; @@ -326,7 +326,7 @@ echo '<br>'; // Configuration form. -echo '<span id ="none_text" style="display: none;">'.__('None').'</span>'; +echo '<span id ="none_text" class="invisible">'.__('None').'</span>'; echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&add_module=1&edit_graph=1&id=".$id_graph."'>"; echo "<table width='100%' cellpadding='4' cellpadding='4' class='databox filters'>"; @@ -345,11 +345,14 @@ echo "<td colspan='3'>".html_print_select_groups( true ).'</td>'; echo '</tr><tr>'; -echo "<td style='vertical-align: top;'>".__('Agents').ui_print_help_tip(__('If you select several agents, only the common modules will be displayed'), true).'</td>'; +echo "<td class='top'>".__('Agents').ui_print_help_tip( + __('If you select several agents, only the common modules will be displayed'), + true +).'</td>'; echo '<td></td>'; -echo "<td style='vertical-align: top;'>".__('Modules').'</td>'; +echo "<td class='top'>".__('Modules').'</td>'; echo '</tr><tr>'; -echo '<td style="width: 50%;">'.html_print_select( +echo '<td class="w50p">'.html_print_select( agents_get_group_agents(), 'id_agents[]', 0, @@ -363,8 +366,8 @@ echo '<td style="width: 50%;">'.html_print_select( false, '' ).'</td>'; -echo "<td style='width: 3em;vertical-align: center; text-align: center;'>".html_print_image('images/darrowright.png', true).'</td>'; -echo '<td style="width: 50%;">'.html_print_select( +echo '<td class="select_module_graph"></td>'; +echo '<td class="w50p">'.html_print_select( [], 'module[]', 0, @@ -388,7 +391,7 @@ echo '</td>'; echo '</tr><tr>'; echo "<td colspan='3' align='right'></td>"; echo '</tr></table>'; -echo "<div style='width:100%'><input style='float:right;' id='submit-add' type=submit name='store' class='sub add' value='".__('Add')."'></div></form>"; +echo "<div class='w100p'><input id='submit-add' type=submit name='store' class='sub add right' value='".__('Add')."'></div></form>"; ui_require_jquery_file('pandora.controls'); ui_require_jquery_file('ajaxqueue'); diff --git a/pandora_console/godmode/reporting/graph_builder.main.php b/pandora_console/godmode/reporting/graph_builder.main.php index 2bce9fcbb9..131fae5cfb 100644 --- a/pandora_console/godmode/reporting/graph_builder.main.php +++ b/pandora_console/godmode/reporting/graph_builder.main.php @@ -170,7 +170,7 @@ if (check_acl($config['id_user'], 0, 'RW')) { $output .= '</td></tr>'; $output .= '<tr>'; $output .= "<td class='datos2'><b>".__('Description').'</b></td>'; -$output .= "<td class='datos2' colspan=3><textarea name='description' style='height:45px;' cols=55 rows=2>"; +$output .= "<td class='datos2' colspan=3><textarea name='description' class='height_45px' cols=55 rows=2>"; if ($edit_graph) { $output .= $graphInTgraph['description']; } @@ -178,7 +178,7 @@ if ($edit_graph) { $output .= '</textarea>'; $output .= '</td></tr>'; if ($stacked == CUSTOM_GRAPH_GAUGE) { - $hidden = ' style="display:none;" '; + $hidden = ' class="invisible" '; } else { $hidden = ''; } @@ -198,7 +198,7 @@ $output .= html_print_extended_select_for_time( ); $output .= "</td><td class='datos2'>"; $output .= '<b>'.__('Type of graph').'</b></td>'; -$output .= "<td class='datos2'> <div style='float:left;display:inline-block'>"; +$output .= "<td class='datos2'> <div class='left inline'>"; require_once $config['homedir'].'/include/functions_graph.php'; @@ -284,12 +284,12 @@ $output .= '</tr>'; $output .= '</table>'; if ($edit_graph) { - $output .= "<div style='width:100%'>"; - $output .= "<input style='float:right;' type=submit name='store' class='sub upd' value='".__('Update')."'>"; + $output .= "<div class='w100p'>"; + $output .= "<input class='right' type=submit name='store' class='sub upd' value='".__('Update')."'>"; $output .= '</div>'; } else { - $output .= "<div style='width:100%'>"; - $output .= "<input style='float:right;' type=submit name='store' class='sub next' value='".__('Create')."'>"; + $output .= "<div class='w100p'>"; + $output .= "<input class='right' type=submit name='store' class='sub next' value='".__('Create')."'>"; $output .= '</div>'; } diff --git a/pandora_console/godmode/reporting/graph_builder.php b/pandora_console/godmode/reporting/graph_builder.php index 6b229a2112..79fdfde250 100644 --- a/pandora_console/godmode/reporting/graph_builder.php +++ b/pandora_console/godmode/reporting/graph_builder.php @@ -28,6 +28,8 @@ global $config; + + if (is_ajax()) { $search_agents = (bool) get_parameter('search_agents'); @@ -283,19 +285,48 @@ if ($edit_graph) { $buttons = [ 'graph_list' => [ 'active' => false, - 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs">'.html_print_image('images/list.png', true, ['title' => __('Graph list')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('Graph list'), + 'class' => 'invert_filter', + ] + ).'</a>', ], 'main' => [ 'active' => false, - 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=main&edit_graph=1&id='.$id_graph.'">'.html_print_image('images/chart.png', true, ['title' => __('Main data')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=main&edit_graph=1&id='.$id_graph.'">'.html_print_image( + 'images/chart.png', + true, + [ + 'title' => __('Main data'), + 'class' => 'invert_filter', + ] + ).'</a>', ], 'graph_editor' => [ 'active' => false, - 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id='.$id_graph.'">'.html_print_image('images/builder.png', true, ['title' => __('Graph editor')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id='.$id_graph.'">'.html_print_image( + 'images/builder.png', + true, + [ + 'title' => __('Graph editor'), + 'class' => 'invert_filter', + ] + ).'</a>', ], 'view' => [ 'active' => false, - 'text' => '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='.$id_graph.'">'.html_print_image('images/operation.png', true, ['title' => __('View graph')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='.$id_graph.'">'.html_print_image( + 'images/operation.png', + true, + [ + 'title' => __('View graph'), + 'class' => 'invert_filter', + + ] + ).'</a>', ], ]; diff --git a/pandora_console/godmode/reporting/graph_container.php b/pandora_console/godmode/reporting/graph_container.php index cd38209425..0c8e2a58a1 100644 --- a/pandora_console/godmode/reporting/graph_container.php +++ b/pandora_console/godmode/reporting/graph_container.php @@ -25,6 +25,8 @@ if (! check_acl($config['id_user'], 0, 'RR') || enterprise_installed() === false return; } + + $report_r = check_acl($config['id_user'], 0, 'RR'); $report_w = check_acl($config['id_user'], 0, 'RW'); $report_m = check_acl($config['id_user'], 0, 'RM'); @@ -52,7 +54,14 @@ $max_graph = $config['max_graph_container']; $buttons['graph_list'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs">'.html_print_image('images/list.png', true, ['title' => __('Graph list')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('Graph list'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; $enterpriseEnable = false; @@ -69,7 +78,14 @@ $subsection = reporting_enterprise_add_graph_template_subsection('', $buttons); $buttons['graph_container'] = [ 'active' => true, - 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">'.html_print_image('images/graph-container.png', true, ['title' => __('Graph container')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">'.html_print_image( + 'images/graph-container.png', + true, + [ + 'title' => __('Graph container'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; // Header ui_print_page_header(__('Graph container'), '', false, '', false, $buttons); @@ -79,9 +95,9 @@ $container = folder_get_folders(); $tree = folder_get_folders_tree_recursive($container); echo folder_togge_tree_folders($tree); if ($report_r && $report_w) { - echo "<div style='float: right;'>"; - echo '<form method="post" style="float:right;" action="index.php?sec=reporting&sec2=godmode/reporting/create_container">'; - html_print_submit_button(__('Create container'), 'create', false, 'class="sub next" style="margin-right:5px;margin-top: 15px;"'); + echo "<div class='right'>"; + echo '<form method="post" class="right" action="index.php?sec=reporting&sec2=godmode/reporting/create_container">'; + html_print_submit_button(__('Create container'), 'create', false, 'class="sub next mrgn_right_5px mrgn_top_15px"'); echo '</form>'; echo '</div>'; } @@ -101,7 +117,7 @@ if ($report_r && $report_w) { }, success: function(data) { $("#div_"+hash).remove(); - $("#tgl_div_"+hash).prepend("<div id='div_"+hash+"' class='graph_conteiner_inside' style='width: 99%;padding-left: 63px; padding-top: 7px;'>"+data+"</div>"); + $("#tgl_div_"+hash).prepend("<div id='div_"+hash+"' class='graph_conteiner_inside w99p pdd_l_36px ppd_t_7px'>"+data+"</div>"); if($('div[class *= graph]').length == 0 && $('div[class *= bullet]').length == 0 && $('div[id *= gauge_]').length == 0){ $("#div_"+hash).remove(); diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php index 4f08883ef9..856f251947 100644 --- a/pandora_console/godmode/reporting/graphs.php +++ b/pandora_console/godmode/reporting/graphs.php @@ -31,6 +31,8 @@ if (!$report_r && !$report_w && !$report_m) { return; } + + $access = ($report_r == true) ? 'RR' : (($report_w == true) ? 'RW' : (($report_m == true) ? 'RM' : 'RR')); $activeTab = get_parameter('tab', 'main'); @@ -42,7 +44,14 @@ if (enterprise_include_once('include/functions_reporting.php') !== ENTERPRISE_NO $buttons['graph_list'] = [ 'active' => true, - 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs">'.html_print_image('images/list.png', true, ['title' => __('Graph list')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('Graph list'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; if ($enterpriseEnable) { @@ -74,7 +83,14 @@ switch ($activeTab) { if ($enterpriseEnable) { $buttons['graph_container'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">'.html_print_image('images/graph-container.png', true, ['title' => __('Graphs containers')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">'.html_print_image( + 'images/graph-container.png', + true, + [ + 'title' => __('Graphs containers'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; } @@ -233,22 +249,6 @@ $table_aux = new stdClass(); $filter['metaconsole'] = 0; } - - /* - $reports = reports_get_reports( - $filter, - [ - 'name', - 'description', - 'id_graph', - 'id_group', - ], - $return_all_group, - $access, - $group, - false - );*/ - if ($id_group != null || $search != null) { $graphs = custom_graphs_search($id_group, $search); } @@ -294,7 +294,10 @@ $table_aux = new stdClass(); foreach ($result_graphs as $graph) { $data = []; - $data[0] = '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='.$graph['id_graph'].'">'.ui_print_truncate_text($graph['name'], 70).'</a>'; + $data[0] = '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='.$graph['id_graph'].'">'.ui_print_truncate_text( + $graph['name'], + 70 + ).'</a>'; $data[1] = ui_print_truncate_text($graph['description'], 70); @@ -303,18 +306,36 @@ $table_aux = new stdClass(); $data[4] = ''; $table->cellclass[][4] = 'action_buttons'; - if (check_acl_restricted_all($config['id_user'], $graph['id_group'], 'RM') - || check_acl_restricted_all($config['id_user'], $graph['id_group'], 'RW') - ) { - $data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.$graph['id_graph'].'">'.html_print_image('images/config.png', true).'</a>'; + if (($report_w || $report_m)) { + $data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.$graph['id_graph'].'">'.html_print_image( + 'images/config.png', + true, + ['class' => 'invert_filter'] + ).'</a>'; } $data[5] = ''; if (check_acl_restricted_all($config['id_user'], $graph['id_group'], 'RM')) { $data[4] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs&delete_graph=1&id='.$graph['id_graph'].'" onClick="if (!confirm(\''.__('Are you sure?').'\')) - return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>'; + return false;">'.html_print_image( + 'images/cross.png', + true, + [ + 'alt' => __('Delete'), + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] + ).'</a>'; - $data[5] .= html_print_checkbox_extended('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete" style="margin-left:2px;"', true); + $data[5] .= html_print_checkbox_extended( + 'delete_multiple[]', + $graph['id_graph'], + false, + false, + '', + 'class="check_deletemrgn_lft_2px"', + true + ); } array_push($table->data, $data); @@ -322,21 +343,21 @@ $table_aux = new stdClass(); if (!empty($result_graphs)) { - echo "<form method='post' style='' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>"; - html_print_input_hidden('multiple_delete', 1); - html_print_table($table); - ui_pagination(count($graphs), false, 0, 0, false, 'offset', true, 'pagination-bottom'); - echo "<div style='float: right;'>"; + echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>"; + html_print_input_hidden('multiple_delete', 1); + html_print_table($table); + ui_pagination(count($graphs), false, 0, 0, false, 'offset', true, 'pagination-bottom'); + echo "<div class='right'>"; html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"'); - echo '</div>'; + echo '</div>'; echo '</form>'; } - echo "<div style='float: right;'>"; + echo "<div class='right'>"; if ($report_w || $report_m) { - echo '<form method="post" style="float:right;" action="index.php?sec=reporting&sec2=godmode/reporting/graph_builder">'; - html_print_submit_button(__('Create graph'), 'create', false, 'class="sub next" style="margin-right:5px;"'); + echo '<form method="post" class="right" action="index.php?sec=reporting&sec2=godmode/reporting/graph_builder">'; + html_print_submit_button(__('Create graph'), 'create', false, 'class="sub next mrgn_right_5px"'); echo '</form>'; } diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php index f93bfc825d..0af0bdea4f 100644 --- a/pandora_console/godmode/reporting/map_builder.php +++ b/pandora_console/godmode/reporting/map_builder.php @@ -32,6 +32,8 @@ if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) { exit; } + + if (!$is_metaconsole) { $url_visual_console = 'index.php?sec=network&sec2=godmode/reporting/map_builder'; $url_visual_console_favorite = 'index.php?sec=network&sec2=godmode/reporting/visual_console_favorite'; @@ -52,23 +54,51 @@ if (defined('METACONSOLE')) { $buttons['visual_console'] = [ 'active' => true, - 'text' => '<a href="'.$url_visual_console.'">'.html_print_image('images/visual_console.png', true, ['title' => __('Visual Console List')]).'</a>', + 'text' => '<a href="'.$url_visual_console.'">'.html_print_image( + 'images/visual_console.png', + true, + [ + 'title' => __('Visual Console List'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; $buttons['visual_console_favorite'] = [ 'active' => false, - 'text' => '<a href="'.$url_visual_console_favorite.'">'.html_print_image('images/list.png', true, ['title' => __('Visual Favourite Console')]).'</a>', + 'text' => '<a href="'.$url_visual_console_favorite.'">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('Visual Favourite Console'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; if ($is_enterprise !== ENTERPRISE_NOT_HOOK && $vconsoles_manage) { $buttons['visual_console_template'] = [ 'active' => false, - 'text' => '<a href="'.$url_visual_console_template.'">'.html_print_image('images/templates.png', true, ['title' => __('Visual Console Template')]).'</a>', + 'text' => '<a href="'.$url_visual_console_template.'">'.html_print_image( + 'images/templates.png', + true, + [ + 'title' => __('Visual Console Template'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; $buttons['visual_console_template_wizard'] = [ 'active' => false, - 'text' => '<a href="'.$url_visual_console_template_wizard.'">'.html_print_image('images/wand.png', true, ['title' => __('Visual Console Template Wizard')]).'</a>', + 'text' => '<a href="'.$url_visual_console_template_wizard.'">'.html_print_image( + 'images/wand.png', + true, + [ + 'title' => __('Visual Console Template Wizard'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; } @@ -281,7 +311,7 @@ if ($ag_group > 0) { } } -echo "<table class='databox filters' width='100%' style='font-weight: bold; margin-bottom: 10px;'> +echo "<table class='databox filters bolder mrgn_btn_10px' width='100%'> <tr>"; if (!is_metaconsole()) { echo "<form method='post' @@ -291,12 +321,12 @@ if (!is_metaconsole()) { action='index.php?sec=screen&sec2=screens/screens&action=visualmap'>"; } -echo "<td style='width:33%;'>"; +echo "<td class='w33p'>"; echo __('Search').' '; html_print_input_text('search', $search, '', 50); echo '</td>'; -echo "<td style='width:25%;'>"; +echo "<td class='w25p'>"; echo __('Group').' '; $own_info = get_user_info($config['id_user']); @@ -309,11 +339,11 @@ if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'VR')) { echo '<div class="w250px inline">'; html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false); echo '</div>'; -echo "<td style='width:25%;'>"; +echo "<td class='w25p'>"; echo __('Group Recursion').' '; html_print_checkbox('recursion', 1, $recursion, false, false, 'this.form.submit()'); -echo "</td><td style='width:22%;'>"; +echo "</td><td class='w22p'>"; echo "<input name='search_visual_console' type='submit' class='sub search' value='".__('Search')."'>"; echo '</form>'; echo '</td>'; @@ -449,11 +479,27 @@ if (!$maps && !is_metaconsole()) { 3 => 'action_buttons', 4 => 'action_buttons', ]; - $data[3] = '<a class="copy_visualmap" href="index.php?sec=network&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&copy_layout=1">'.html_print_image('images/copy.png', true).'</a>'; - $data[4] = '<a class="delete_visualmap" href="index.php?sec=network&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&delete_layout=1" onclick="javascript: if (!confirm(\''.__('Are you sure?').'\n'.__('Delete').': '.$map['name'].'\')) return false;">'.html_print_image('images/cross.png', true).'</a>'; + $data[3] = '<a class="copy_visualmap" href="index.php?sec=network&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&copy_layout=1">'.html_print_image( + 'images/copy.png', + true, + ['class' => 'invert_filter'] + ).'</a>'; + $data[4] = '<a class="delete_visualmap" href="index.php?sec=network&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&delete_layout=1" onclick="javascript: if (!confirm(\''.__('Are you sure?').'\n'.__('Delete').': '.$map['name'].'\')) return false;">'.html_print_image( + 'images/cross.png', + true, + ['class' => 'invert_filter'] + ).'</a>'; } else { - $data[3] = '<a class="copy_visualmap" href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_layout='.$map['id'].'&copy_layout=1">'.html_print_image('images/copy.png', true).'</a>'; - $data[4] = '<a class="delete_visualmap" href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_layout='.$map['id'].'&delete_layout=1" onclick="javascript: if (!confirm(\''.__('Are you sure?').'\n'.__('Delete').': '.$map['name'].'\')) return false;">'.html_print_image('images/cross.png', true).'</a>'; + $data[3] = '<a class="copy_visualmap" href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_layout='.$map['id'].'&copy_layout=1">'.html_print_image( + 'images/copy.png', + true, + ['class' => 'invert_filter'] + ).'</a>'; + $data[4] = '<a class="delete_visualmap" href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_layout='.$map['id'].'&delete_layout=1" onclick="javascript: if (!confirm(\''.__('Are you sure?').'\n'.__('Delete').': '.$map['name'].'\')) return false;">'.html_print_image( + 'images/cross.png', + true, + ['class' => 'invert_filter'] + ).'</a>'; } } else { $data[3] = ''; @@ -469,9 +515,9 @@ if (!$maps && !is_metaconsole()) { if ($maps) { if (!is_metaconsole()) { - echo '<div class="action-buttons" style="width: 100%; text-align: right;">'; + echo '<div class="action-buttons w100p right">'; } else { - echo '<div class="" style="width: 100%; text-align: right;">'; + echo '<div class="w100p right">'; } } diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index e90acee5cb..4cc0c0af65 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -29,6 +29,7 @@ global $config; + require_once $config['homedir'].'/include/functions_custom_graphs.php'; require_once $config['homedir'].'/include/db/oracle.php'; @@ -832,7 +833,7 @@ html_print_input_hidden('id_item', $idItem); $class = 'databox filters'; ?> -<table style="" class="<?php echo $class; ?>" id="" border="0" cellpadding="4" cellspacing="4" width="100%"> +<table class="<?php echo $class; ?>" id="" border="0" cellpadding="4" cellspacing="4" width="100%"> <?php if (defined('METACONSOLE')) { echo '<thead> @@ -845,11 +846,11 @@ $class = 'databox filters'; } ?> <tbody> - <tr id="row_type" style="" class="datos"> - <td style="font-weight:bold; width: 220px;"> + <tr id="row_type" class="datos"> + <td class="bolder w220px"> <?php echo __('Type'); ?> </td> - <td style=""> + <td > <?php if ($action == 'new') { html_print_select(reports_get_report_types(false, true), 'type', $type, 'chooseType();', '', '', '', '', '', '', '', '', '', '', true, 'reportingmodal'); @@ -875,11 +876,11 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_name" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_name" class="datos"> + <td class="bolder"> <?php echo __('Name'); ?> </td> - <td style=""> + <td > <?php if ($name_from_template != '') { html_print_input_text( @@ -911,8 +912,8 @@ $class = 'databox filters'; ?> </td> </tr> - <tr id="row_netflow_filter" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Filter'); ?></td> + <tr id="row_netflow_filter" class="datos"> + <td class="bolder"><?php echo __('Filter'); ?></td> <td> <?php $own_info = get_user_info($config['id_user']); @@ -948,9 +949,9 @@ $class = 'databox filters'; ?> </td> </tr> - <tr id="row_description" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Description'); ?></td> - <td style=""> + <tr id="row_description" class="datos"> + <td class="bolder"><?php echo __('Description'); ?></td> + <td > <?php echo html_print_textarea('description', 3, 25, $description); ?> @@ -960,9 +961,9 @@ $class = 'databox filters'; <?php if ($meta) { ?> - <tr id="row_servers" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Server'); ?></td> - <td style=""> + <tr id="row_servers" class="datos"> + <td class="bolder"><?php echo __('Server'); ?></td> + <td > <?php html_print_select( $servers, @@ -979,13 +980,13 @@ $class = 'databox filters'; } ?> - <tr id="row_label" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_label" class="datos"> + <td class="bolder"> <?php echo __('Label'); ?> </td> - <td style=""> + <td > <?php echo html_print_input_text( 'label', @@ -1003,19 +1004,19 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_search" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_search" class="datos"> + <td class="bolder"> <?php echo __('Search'); ?> </td> - <td style=""> + <td > <?php html_print_input_text('search', $search, '', 40, 100); ?> </td> </tr> - <tr id="row_log_number" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_log_number" class="datos"> + <td class="bolder"> <?php echo __('Log number'); ui_print_help_tip( @@ -1023,15 +1024,15 @@ $class = 'databox filters'; ); ?> </td> - <td style=""> + <td > <?php echo "<input name='log_number' max='10000' min='1' size='10' type='number' value='".$log_number."'>"; ?> </td> </tr> - <tr id="row_period" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_period" class="datos"> + <td class="bolder"> <?php echo __('Time lapse'); ui_print_help_tip( @@ -1039,7 +1040,7 @@ $class = 'databox filters'; ); ?> </td> - <td style=""> + <td > <?php html_print_extended_select_for_time( 'period', @@ -1053,8 +1054,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_last_value" style="" class="datos"> - <td style="font-weight:bold;" class="datos"> + <tr id="row_last_value" class="datos"> + <td class="bolder" class="datos"> <?php echo __('Last value'); ui_print_help_tip( @@ -1062,7 +1063,7 @@ $class = 'databox filters'; ); ?> </td> - <td style=""> + <td > <?php html_print_checkbox_switch( 'last_value', @@ -1076,13 +1077,13 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_period1" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_period1" class="datos"> + <td class="bolder"> <?php echo __('Period'); ?> </td> - <td style=""> + <td > <?php html_print_extended_select_for_time( 'period1', @@ -1095,13 +1096,13 @@ $class = 'databox filters'; ?> </td> </tr> - <tr id="row_estimate" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_estimate" class="datos"> + <td class="bolder"> <?php echo __('Projection period'); ?> </td> - <td style=""> + <td > <?php html_print_extended_select_for_time( 'period2', @@ -1114,8 +1115,8 @@ $class = 'databox filters'; ?> </td> </tr> - <tr id="row_interval" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_interval" class="datos"> + <td class="bolder"> <?php echo __('Data range'); ?> @@ -1129,8 +1130,8 @@ $class = 'databox filters'; ?> </td> </tr> - <tr id="row_only_display_wrong" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Only display wrong SLAs'); ?></td> + <tr id="row_only_display_wrong" class="datos"> + <td class="bolder"><?php echo __('Only display wrong SLAs'); ?></td> <td> <?php html_print_checkbox_switch( @@ -1143,11 +1144,11 @@ $class = 'databox filters'; </tr> <tr id="row_current_month"> - <td style="font-weight:bold;"> + <td class="bolder"> <?php echo __('Current month'); ?> </td> - <td style="font-weight:bold;"> + <td class="bolder"> <?php html_print_checkbox_switch( 'current_month', @@ -1159,7 +1160,7 @@ $class = 'databox filters'; </tr> <tr id="row_working_time"> - <td style="font-weight:bold;"> + <td class="bolder"> <?php echo __('Working time'); ?> </td> <td> @@ -1167,7 +1168,7 @@ $class = 'databox filters'; <table border="0"> <tr> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Monday').'<br>'; html_print_checkbox_switch('monday', 1, $monday); @@ -1175,7 +1176,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Tuesday').'<br>'; html_print_checkbox_switch('tuesday', 1, $tuesday); @@ -1183,7 +1184,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Wednesday').'<br>'; html_print_checkbox_switch('wednesday', 1, $wednesday); @@ -1191,7 +1192,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Thursday').'<br>'; html_print_checkbox_switch('thursday', 1, $thursday); @@ -1199,7 +1200,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Friday').'<br>'; html_print_checkbox_switch('friday', 1, $friday); @@ -1207,7 +1208,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Saturday').'<br>'; html_print_checkbox_switch('saturday', 1, $saturday); @@ -1215,7 +1216,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Sunday').'<br>'; html_print_checkbox_switch('sunday', 1, $sunday); @@ -1279,9 +1280,9 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_group" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Group'); ?></td> - <td style=""> + <tr id="row_group" class="datos"> + <td class="bolder"><?php echo __('Group'); ?></td> + <td > <?php echo '<div class="w250px inline padding-right-2-imp">'; if (check_acl($config['id_user'], 0, 'RW')) { @@ -1315,9 +1316,9 @@ $class = 'databox filters'; ?> </td> </tr> - <tr id="row_source" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Source'); ?></td> - <td style=""> + <tr id="row_source" class="datos"> + <td class="bolder"><?php echo __('Source'); ?></td> + <td > <?php $agents = agents_get_group_agents($group); if ((empty($agents)) || $agents == -1) { @@ -1358,9 +1359,9 @@ $class = 'databox filters'; ?> </td> </tr> - <tr id="row_module_group" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Module group'); ?></td> - <td style=""> + <tr id="row_module_group" class="datos"> + <td class="bolder"><?php echo __('Module group'); ?></td> + <td > <?php html_print_select_from_sql( 'SELECT * FROM tmodule_group ORDER BY name', @@ -1373,9 +1374,9 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_agent" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Agent'); ?></td> - <td style=""> + <tr id="row_agent" class="datos"> + <td class="bolder"><?php echo __('Agent'); ?></td> + <td > <?php if ($meta) { $connection = metaconsole_get_connection($server_name); @@ -1428,13 +1429,13 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_module" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_module" class="datos"> + <td class="bolder"> <?php echo __('Module'); ?> </td> - <td style="max-width: 180px"> + <td class="mx180px"> <?php if ($idAgent) { $sql = 'SELECT id_agente_modulo, nombre @@ -1480,7 +1481,7 @@ $class = 'databox filters'; } } else { ?> - <select style="max-width: 180px" id="id_agent_module" name="id_agent_module" disabled="disabled"> + <select class="mx180px" id="id_agent_module" name="id_agent_module" disabled="disabled"> <option value="0"> <?php echo __('Select an Agent first'); ?> </option> @@ -1491,8 +1492,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="agents_row" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Agents'); ?></td> + <tr id="agents_row" class="datos"> + <td class="bolder"><?php echo __('Agents'); ?></td> <td> <?php if ($source) { @@ -1545,7 +1546,7 @@ $class = 'databox filters'; false, 'min-width: 180px' ); - echo "<span id='spinner_hack' style='display:none;'>".html_print_image( + echo "<span id='spinner_hack' class='invisible'>".html_print_image( 'images/spinner.gif', true ).'</span>'; @@ -1553,8 +1554,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="agents_modules_row" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Agents'); ?></td> + <tr id="agents_modules_row" class="datos"> + <td class="bolder"><?php echo __('Agents'); ?></td> <td> <?php $all_agent_log = agents_get_agents(false, ['id_agente', 'alias']); @@ -1595,8 +1596,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="select_agent_modules" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Show modules'); ?></td> + <tr id="select_agent_modules" class="datos"> + <td class="bolder"><?php echo __('Show modules'); ?></td> <td> <?php $selection = [ @@ -1622,8 +1623,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="modules_row" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Modules'); ?></td> + <tr id="modules_row" class="datos"> + <td class="bolder"><?php echo __('Modules'); ?></td> <td> <?php if (empty($id_agents) || $id_agents == null || $id_agents === 0) { @@ -1673,8 +1674,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_agent_multi" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Agents'); ?></td> + <tr id="row_agent_multi" class="datos"> + <td class="bolder"><?php echo __('Agents'); ?></td> <td> <?php $fields = []; @@ -1714,8 +1715,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_module_multi" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Modules'); ?></td> + <tr id="row_module_multi" class="datos"> + <td class="bolder"><?php echo __('Modules'); ?></td> <td> <?php html_print_select( @@ -1747,9 +1748,9 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_date" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Date'); ?></td> - <td style="max-width: 180px"> + <tr id="row_date" class="datos"> + <td class="bolder"><?php echo __('Date'); ?></td> + <td class="mx180px"> <?php $dates = enterprise_hook( 'inventory_get_dates', @@ -1783,9 +1784,9 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_custom_graph" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Custom graph'); ?></td> - <td style=""> + <tr id="row_custom_graph" class="datos"> + <td class="bolder"><?php echo __('Custom graph'); ?></td> + <td > <?php if ($meta) { $graphs = []; @@ -1822,11 +1823,11 @@ $class = 'databox filters'; ); } - $style_button_create_custom_graph = 'style="display: none;"'; + $style_button_create_custom_graph = 'class="invisible"'; $style_button_edit_custom_graph = ''; if (empty($idCustomGraph)) { $style_button_create_custom_graph = ''; - $style_button_edit_custom_graph = 'style="display: none;"'; + $style_button_edit_custom_graph = 'class="invisible"'; // Select the target server. if ($meta) { $metaconsole_connections = enterprise_hook( @@ -1847,14 +1848,14 @@ $class = 'databox filters'; // Print select combo with metaconsole servers. if (!empty($result_servers)) { - echo '<div id="meta_target_servers" style="display:none;">'; + echo '<div id="meta_target_servers" class="invisible">'; echo '    '.__('Target server').'  '; html_print_select($result_servers, 'meta_servers', '', '', __('None'), 0); echo '</div>'; } else { // If there are not metaconsole servers // don't allow to create new custom graphs. - $style_button_create_custom_graph = 'style="display: none;"'; + $style_button_create_custom_graph = 'class="invisible"'; } } } @@ -1879,9 +1880,9 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_text" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Text'); ?></td> - <td style=""> + <tr id="row_text" class="datos"> + <td class="bolder"><?php echo __('Text'); ?></td> + <td > <?php html_print_textarea( 'text', @@ -1893,13 +1894,13 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_custom" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_custom" class="datos"> + <td class="bolder"> <?php echo __('Custom SQL template'); ?> </td> - <td style=""> + <td > <?php html_print_select_from_sql( 'SELECT id, name FROM treport_custom_sql', @@ -1913,8 +1914,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_query" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_query" class="datos"> + <td class="bolder"> <?php echo __('SQL query').ui_print_help_tip( __('The entities of the fields that contain them must be included.'), @@ -1922,26 +1923,26 @@ $class = 'databox filters'; ); ?> </td> - <td style="" id="sql_entry"> + <td id="sql_entry"> <?php html_print_textarea('sql', 5, 25, $sql_query_report); ?> </td> - <td style="" id="sql_example"></td> + <td id="sql_example"></td> </tr> - <tr id="row_max_items" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Max items'); ?></td> - <td style=""> + <tr id="row_max_items" class="datos"> + <td class="bolder"><?php echo __('Max items'); ?></td> + <td > <?php html_print_input_text('max_items', $top_n_value, '', 7, 7); ?> </td> - <td style="" id="max_items_example"></td> + <td id="max_items_example"></td> </tr> - <tr id="row_header" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_header" class="datos"> + <td class="bolder"> <?php echo __('Serialized header').ui_print_help_tip( __('The separator character is |'), @@ -1949,7 +1950,7 @@ $class = 'databox filters'; ); ?> </td> - <td style=""> + <td > <?php html_print_input_text( 'header', @@ -1962,9 +1963,9 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_url" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('URL'); ?></td> - <td style=""> + <tr id="row_url" class="datos"> + <td class="bolder"><?php echo __('URL'); ?></td> + <td > <?php html_print_input_text( 'url', @@ -1974,11 +1975,11 @@ $class = 'databox filters'; 250 ); ?> - <span id="url_warning_text" class="error" style="display: none; font-weight: bold;"><?php echo __('Protocol must be specified in URL (e.g.: "https://")'); ?></span> + <span id="url_warning_text" class="error invisible bolder"><?php echo __('Protocol must be specified in URL (e.g.: "https://")'); ?></span> </td> </tr> - <tr id="row_field_separator" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_field_separator" class="datos"> + <td class="bolder"> <?php echo __('Field separator').ui_print_help_tip( __('Separator for different fields in the serialized text chain'), @@ -1986,7 +1987,7 @@ $class = 'databox filters'; ); ?> </td> - <td style=""> + <td > <?php html_print_input_text( 'field', @@ -1998,8 +1999,8 @@ $class = 'databox filters'; ?> </td> </tr> - <tr id="row_line_separator" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_line_separator" class="datos"> + <td class="bolder"> <?php echo __('Line separator').ui_print_help_tip( __('Separator in different lines (composed by fields) of the serialized text chain'), @@ -2007,7 +2008,7 @@ $class = 'databox filters'; ); ?> </td> - <td style=""> + <td > <?php html_print_input_text( 'line', @@ -2019,8 +2020,8 @@ $class = 'databox filters'; ?> </td> </tr> - <tr id="row_group_by_agent" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_group_by_agent" class="datos"> + <td class="bolder"> <?php echo __('Group by agent'); ?> @@ -2035,8 +2036,8 @@ $class = 'databox filters'; ?> </td> </tr> - <tr id="row_order_uptodown" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Order'); ?></td> + <tr id="row_order_uptodown" class="datos"> + <td class="bolder"><?php echo __('Order'); ?></td> <td> <?php echo __('Ascending'); @@ -2064,9 +2065,9 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_quantity" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Quantity (n)'); ?></td> - <td style=""> + <tr id="row_quantity" class="datos"> + <td class="bolder"><?php echo __('Quantity (n)'); ?></td> + <td > <?php html_print_input_text( 'quantity', @@ -2079,9 +2080,9 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_max_values" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Max. values'); ?></td> - <td style=""> + <tr id="row_max_values" class="datos"> + <td class="bolder"><?php echo __('Max. values'); ?></td> + <td > <?php html_print_input_text( 'max_values', @@ -2094,8 +2095,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_max_min_avg" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Display'); ?></td> + <tr id="row_max_min_avg" class="datos"> + <td class="bolder"><?php echo __('Display'); ?></td> <td> <?php echo __('Max'); @@ -2123,8 +2124,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_graph_render" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_graph_render" class="datos"> + <td class="bolder"> <?php echo __('Graph render'); ?> @@ -2146,8 +2147,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_fullscale" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_fullscale" class="datos"> + <td class="bolder"> <?php echo __('Full resolution graph (TIP)').ui_print_help_tip( __('TIP mode charts do not support average - maximum - minimum series, you can only enable TIP or average, maximum or minimum series'), @@ -2166,8 +2167,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_time_compare_overlapped" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_time_compare_overlapped" class="datos"> + <td class="bolder"> <?php echo __('Time compare (Overlapped)'); ?> @@ -2183,14 +2184,14 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_percentil" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Percentil'); ?></td> + <tr id="row_percentil" class="datos"> + <td class="bolder"><?php echo __('Percentil'); ?></td> <td><?php html_print_checkbox_switch('percentil', 1, $percentil); ?></td> </tr> - <tr id="row_exception_condition_value" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Value'); ?></td> - <td style=""> + <tr id="row_exception_condition_value" class="datos"> + <td class="bolder"><?php echo __('Value'); ?></td> + <td > <?php html_print_input_text( 'exception_condition_value', @@ -2203,8 +2204,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_exception_condition" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Condition'); ?></td> + <tr id="row_exception_condition" class="datos"> + <td class="bolder"><?php echo __('Condition'); ?></td> <td> <?php $list_exception_condition = [ @@ -2227,8 +2228,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_show_graph" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Show graph'); ?></td> + <tr id="row_show_graph" class="datos"> + <td class="bolder"><?php echo __('Show graph'); ?></td> <td> <?php html_print_select( @@ -2239,8 +2240,8 @@ $class = 'databox filters'; ?> </td> </tr> - <tr id="row_select_fields" style="" class="datos"> - <td style="font-weight:bold;margin-right:150px;"> + <tr id="row_select_fields" class="datos"> + <td class="bolder mrgn_right_150px"> <?php echo __('Select fields to show'); ?> @@ -2248,7 +2249,7 @@ $class = 'databox filters'; <td> <table border="0"> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Total time').'<br>'; html_print_checkbox_switch('total_time', 1, $total_time); @@ -2256,7 +2257,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Time failed').'<br>'; html_print_checkbox_switch('time_failed', 1, $time_failed); @@ -2264,7 +2265,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Time in OK status').'<br>'; html_print_checkbox_switch('time_in_ok_status', 1, $time_in_ok_status); @@ -2272,7 +2273,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Time in unknown status').'<br>'; html_print_checkbox_switch( @@ -2284,7 +2285,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Time of not initialized module').'<br>'; html_print_checkbox_switch( @@ -2296,7 +2297,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Time of downtime').'<br>'; html_print_checkbox_switch('time_of_downtime', 1, $time_of_downtime); @@ -2307,8 +2308,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_show_address_agent" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_show_address_agent" class="datos"> + <td class="bolder"> <?php echo __('Show address instead module name').ui_print_help_tip( __('Show the main address of agent.'), @@ -2327,8 +2328,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_show_resume" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_show_resume" class="datos"> + <td class="bolder"> <?php echo __('Show resume').ui_print_help_tip( __('Show a summary chart with max, min and average number of total modules at the end of the report and Checks.'), @@ -2347,16 +2348,16 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_select_fields2" style="" class="datos"> - <td style="font-weight:bold;margin-right:150px;"> + <tr id="row_select_fields2" class="datos"> + <td class="bolder mrgn_right_150px"> <?php - echo __('<p style= "margin-left:15px;">Select fields to show</p>'); + echo __('<p class= "mrgn_lft_15px">Select fields to show</p>'); ?> </td> <td> <table border="0"> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Total checks'); html_print_checkbox('total_checks', 1, $total_checks); @@ -2364,7 +2365,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Checks failed'); html_print_checkbox('checks_failed', 1, $checks_failed); @@ -2372,7 +2373,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Checks in OK status'); html_print_checkbox( @@ -2384,7 +2385,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Unknown checks'); html_print_checkbox('unknown_checks', 1, $unknown_checks); @@ -2395,16 +2396,16 @@ $class = 'databox filters'; </table> </td> </tr> - <tr id="row_select_fields3" style="" class="datos"> - <td style="font-weight:bold;margin-right:150px;"> + <tr id="row_select_fields3" class="datos"> + <td class="bolder mrgn_right_150px"> <?php - echo __('<p style= "margin-left:15px;">Select fields to show</p>'); + echo __('<p class="mrgn_lft_15px">Select fields to show</p>'); ?> </td> <td> <table border="0"> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Agent max value'); html_print_checkbox('agent_max_value', 1, $agent_max_value); @@ -2412,7 +2413,7 @@ $class = 'databox filters'; </p> </td> <td> - <p style="margin-right:30px;"> + <p class="mrgn_right_30px"> <?php echo __('Agent min values'); html_print_checkbox('agent_min_value', 1, $agent_min_value); @@ -2424,8 +2425,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_show_summary_group" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_show_summary_group" class="datos"> + <td class="bolder"> <?php echo __('Show Summary group'); ?> @@ -2441,8 +2442,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_event_severity" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Severity'); ?></td> + <tr id="row_event_severity" class="datos"> + <td class="bolder"><?php echo __('Severity'); ?></td> <td> <?php $valuesSeverity = get_priorities(); @@ -2468,8 +2469,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_event_type" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Event type'); ?></td> + <tr id="row_event_type" class="datos"> + <td class="bolder"><?php echo __('Event type'); ?></td> <td> <?php $event_types_select = get_event_types(); @@ -2495,8 +2496,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_event_status" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Event Status'); ?></td> + <tr id="row_event_status" class="datos"> + <td class="bolder"><?php echo __('Event Status'); ?></td> <td> <?php $fields = events_get_all_status(true); @@ -2522,8 +2523,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_extended_events" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_extended_events" class="datos"> + <td class="bolder"> <?php echo __('Include extended events'); ?> @@ -2539,8 +2540,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_event_graphs" style="" class="datos"> - <td style="font-weight:bold;"><?php echo __('Event graphs'); ?></td> + <tr id="row_event_graphs" class="datos"> + <td class="bolder"><?php echo __('Event graphs'); ?></td> <td> <span id="row_event_graph_by_agent"> <?php @@ -2585,8 +2586,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_historical_db_check" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_historical_db_check" class="datos"> + <td class="bolder"> <?php echo __('Query History Database').ui_print_help_tip( __('With the token enabled the query will affect the Historical Database, which may mean a small drop in performance.'), @@ -2594,15 +2595,15 @@ $class = 'databox filters'; ); ?> </td> - <td style=""> + <td > <?php html_print_checkbox_switch('historical_db_check', 1, $historical_db); ?> </td> </tr> - <tr id="row_dyn_height" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_dyn_height" class="datos"> + <td class="bolder"> <?php echo __('Height (dynamic graphs)'); ?> @@ -2620,8 +2621,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_show_in_same_row" style="" class="datos"> - <td style="font-weight:bold;" class="datos"> + <tr id="row_show_in_same_row" class="datos"> + <td class="bolder" class="datos"> <?php echo __('Show in the same row'); ui_print_help_tip( @@ -2629,7 +2630,7 @@ $class = 'databox filters'; ); ?> </td> - <td style=""> + <td > <?php html_print_checkbox_switch( 'show_in_same_row', @@ -2643,8 +2644,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_sort" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_sort" class="datos"> + <td class="bolder"> <?php echo __('Order').ui_print_help_tip( __('SLA items sorted by fulfillment value'), @@ -2666,8 +2667,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_priority_mode" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_priority_mode" class="datos"> + <td class="bolder"> <?php echo __('Priority mode'); ?> @@ -2675,7 +2676,7 @@ $class = 'databox filters'; <td> <?php echo __('Priority ok mode'); - echo '<span style="margin-left:5px;"></span>'; + echo '<span class="mrgn_lft_5px"></span>'; html_print_radio_button( 'priority_mode', REPORT_PRIORITY_MODE_OK, @@ -2684,10 +2685,10 @@ $class = 'databox filters'; '' ); - echo '<span style="margin:30px;"></span>'; + echo '<span class="mrgn_30px"></span>'; echo __('Priority unknown mode'); - echo '<span style="margin-left:5px;"></span>'; + echo '<span class="mrgn_lft_5px"></span>'; html_print_radio_button( 'priority_mode', REPORT_PRIORITY_MODE_UNKNOWN, @@ -2699,8 +2700,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_failover_mode" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_failover_mode" class="datos"> + <td class="bolder"> <?php echo __('Failover mode').ui_print_help_tip( __('SLA calculation must be performed taking into account the failover modules assigned to the primary module'), @@ -2719,8 +2720,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_failover_type" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_failover_type" class="datos"> + <td class="bolder"> <?php echo __('Failover type'); ?> @@ -2728,7 +2729,7 @@ $class = 'databox filters'; <td> <?php echo __('Failover normal'); - echo '<span style="margin-left:5px;"></span>'; + echo '<span class="mrgn_lft_5px"></span>'; html_print_radio_button( 'failover_type', REPORT_FAILOVER_TYPE_NORMAL, @@ -2737,10 +2738,10 @@ $class = 'databox filters'; '' ); - echo '<span style="margin:30px;"></span>'; + echo '<span class="mrgn_30px"></span>'; echo __('Failover simple'); - echo '<span style="margin-left:5px;"></span>'; + echo '<span class="mrgn_lft_5px"></span>'; html_print_radio_button( 'failover_type', REPORT_FAILOVER_TYPE_SIMPLE, @@ -2752,6 +2753,10 @@ $class = 'databox filters'; </td> </tr> +<<<<<<< HEAD + <tr id="row_filter_search" class="datos"> + <td class="bolder"><?php echo __('Free search'); ?></td> +======= <tr id="row_summary" style="" class="datos"> <td style="font-weight:bold;"> <?php @@ -2775,6 +2780,7 @@ $class = 'databox filters'; <tr id="row_filter_search" style="" class="datos"> <td style="font-weight:bold;"><?php echo __('Include filter'); ?></td> +>>>>>>> origin/develop <td> <?php html_print_input_text('filter_search', $filter_search); @@ -2792,19 +2798,19 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_lapse_calc" style="" class="datos advanced_elements"> - <td style="font-weight:bold;"> + <tr id="row_lapse_calc" class="datos advanced_elements"> + <td class="bolder"> <?php echo __('Calculate for custom intervals'); ?> </td> - <td style=""> + <td > <?php html_print_checkbox_switch('lapse_calc', 1, $lapse_calc); ?> </td> </tr> - <tr id="row_lapse" style="" class="datos advanced_elements"> - <td style="font-weight:bold;"> + <tr id="row_lapse" class="datos advanced_elements"> + <td class="bolder"> <?php echo __('Time lapse intervals'); ui_print_help_tip( @@ -2815,7 +2821,7 @@ $class = 'databox filters'; ); ?> </td> - <td style=""> + <td > <?php html_print_extended_select_for_time( 'lapse', @@ -2834,8 +2840,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_visual_format" style="" class="datos advanced_elements"> - <td style="font-weight:bold;" colspan="2"> + <tr id="row_visual_format" class="datos advanced_elements"> + <td class="bolder" colspan="2"> <?php if ($visual_format == 1) { $visual_format_table = true; @@ -2852,7 +2858,7 @@ $class = 'databox filters'; } echo __('Table only'); - echo '<span style="margin-left:10px;"></span>'; + echo '<span class="mrgn_lft_10px"></span>'; html_print_radio_button( 'visual_format', 1, @@ -2861,9 +2867,9 @@ $class = 'databox filters'; '', !$lapse_calc ); - echo '<span style="margin:30px;"></span>'; + echo '<span class="mrgn_30px"></span>'; echo __('Graph only'); - echo '<span style="margin-left:10px;"></span>'; + echo '<span class="mrgn_lft_10px"></span>'; html_print_radio_button( 'visual_format', 2, @@ -2872,9 +2878,9 @@ $class = 'databox filters'; '', !$lapse_calc ); - echo '<span style="margin:30px;"></span>'; + echo '<span class="mrgn_30px;"></span>'; echo __('Graph and table'); - echo '<span style="margin-left:10px;"></span>'; + echo '<span class="mrgn_lft_10px"></span>'; html_print_radio_button( 'visual_format', 3, @@ -2887,8 +2893,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_uncompressed_module" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_uncompressed_module" class="datos"> + <td class="bolder"> <?php echo __('Uncompress module').ui_print_help_tip( __('Use uncompressed module data.'), @@ -2896,15 +2902,15 @@ $class = 'databox filters'; ); ?> </td> - <td style=""> + <td > <?php html_print_checkbox_switch('uncompressed_module', 1, $item['uncompressed_module'], false, false, '', false); ?> </td> </tr> - <tr id="row_profiles_group" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_profiles_group" class="datos"> + <td class="bolder"> <?php echo __('Group'); ?> @@ -2934,13 +2940,13 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_users" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_users" class="datos"> + <td class="bolder"> <?php echo __('User'); ?> </td> - <td style=""> + <td > <?php $tmp_users = db_get_all_rows_filter('tusuario', [], 'id_user'); foreach ($tmp_users as $key => $user) { @@ -2980,8 +2986,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_select_by_group" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_select_by_group" class="datos"> + <td class="bolder"> <?php echo __('Select by group'); ?> @@ -2998,8 +3004,8 @@ $class = 'databox filters'; </td> </tr> - <tr id="row_landscape" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_landscape" class="datos"> + <td class="bolder"> <?php echo __('Show item in landscape format (only PDF)'); ?> @@ -3007,8 +3013,8 @@ $class = 'databox filters'; <td><?php html_print_checkbox_switch('landscape', 1, $landscape); ?></td> </tr> - <tr id="row_pagebreak" style="" class="datos"> - <td style="font-weight:bold;"> + <tr id="row_pagebreak" class="datos"> + <td class="bolder"> <?php echo __('Page break at the end of the item (only PDF)'); ?> @@ -3022,7 +3028,7 @@ $class = 'databox filters'; <?php print_SLA_list('100%', $action, $idItem); print_General_list('100%', $action, $idItem, $type); -echo '<div class="action-buttons" style="width: 100%">'; +echo '<div class="action-buttons w100p" >'; if ($action == 'new') { html_print_submit_button( __('Create item'), @@ -3143,7 +3149,7 @@ function print_SLA_list($width, $action, $idItem=null) switch ($action) { case 'new': ?> - <tr id="sla_template" style="" class="datos"> + <tr id="sla_template" class="datos"> <td colspan="6"> <?php echo __('Please save the SLA for start to add items in this list.'); @@ -3216,7 +3222,7 @@ function print_SLA_list($width, $action, $idItem=null) $server_name_element .= ' ('.$server_name.')'; } - echo '<tr id="sla_'.$item['id'].'" style="" class="datos">'; + echo '<tr id="sla_'.$item['id'].'" class="datos">'; echo '<td class="sla_list_agent_col">'; echo printSmallFont($nameAgent).$server_name_element; echo '</td>'; @@ -3263,9 +3269,9 @@ function print_SLA_list($width, $action, $idItem=null) echo '<td class="sla_list_sla_limit_col">'; echo $item_sla_limit; echo '</td>'; - echo '<td class="sla_list_action_col" style="text-align: center;">'; + echo '<td class="sla_list_action_col center">'; echo '<a href="javascript: deleteSLARow('.$item['id'].');">'; - echo html_print_image('images/cross.png', true); + echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']); echo '</a>'; echo '</td>'; echo '</tr>'; @@ -3279,7 +3285,7 @@ function print_SLA_list($width, $action, $idItem=null) echo '</tbody>'; ?> <tbody id="sla_template"> - <tr id="row" style="display: none;" class="datos"> + <tr id="row" class="datos invisible"> <td class="sla_list_agent_col agent_name"></td> <td class="sla_list_module_col module_name"></td> <?php @@ -3302,12 +3308,13 @@ function print_SLA_list($width, $action, $idItem=null) <td class="sla_list_sla_max_col sla_max"></td> <td class="sla_list_sla_limit_col sla_limit"></td> - <td class="sla_list_action_col" style="text-align: center;"> + <td class="sla_list_action_col center"> <a class="delete_button" href="javascript: deleteSLARow(0);"> <?php html_print_image( 'images/cross.png', - false + false, + ['class' => 'invert_filter'] ); ?> </a> @@ -3316,7 +3323,7 @@ function print_SLA_list($width, $action, $idItem=null) </tbody> <tbody> - <tr id="sla_form" style="" class="datos"> + <tr id="sla_form" class="datos"> <td class="sla_list_agent_col"> <input id="hidden-id_agent_sla" name="id_agent_sla" value="" type="hidden"> <input id="hidden-id_server" name="id_server" value="" type="hidden"> @@ -3339,7 +3346,7 @@ function print_SLA_list($width, $action, $idItem=null) ui_print_agent_autocomplete_input($params); ?> <td class="sla_list_module_col"> - <select id="id_agent_module_sla" name="id_agente_modulo_sla" disabled="disabled" style="max-width: 180px"> + <select id="id_agent_module_sla" name="id_agente_modulo_sla" disabled="disabled" class="mx180px"> <option value="0"> <?php echo __('Select an Agent first'); @@ -3375,7 +3382,7 @@ function print_SLA_list($width, $action, $idItem=null) ?> </td> <td class="sla_list_module_failover_col"> - <select id="id_agent_module_failover" name="id_agent_module_failover" disabled="disabled" style="max-width: 180px"> + <select id="id_agent_module_failover" name="id_agent_module_failover" disabled="disabled" class="mx180px"> <option value="0"> <?php echo __('Select an Agent first'); @@ -3448,12 +3455,13 @@ function print_SLA_list($width, $action, $idItem=null) <td class="sla_list_sla_limit_col"> <input name="sla_limit" id="text-sla_limit" size="10" maxlength="10" type="text"> </td> - <td class="sla_list_action_col" style="text-align: center;"> + <td class="sla_list_action_col center"> <a href="javascript: addSLARow();"> <?php html_print_image( 'images/disk.png', - false + false, + ['class' => 'invert_filter'] ); ?> </a> @@ -3469,7 +3477,7 @@ function print_SLA_list($width, $action, $idItem=null) } ?> </table> - <span style="display: none" id="module_sla_text"> + <span class="invisible" id="module_sla_text"> <?php echo __('Select an Agent first'); ?> </span> <?php @@ -3568,7 +3576,7 @@ function print_General_list($width, $action, $idItem=null, $type='general') switch ($action) { case 'new': ?> - <tr id="general_template" style="" class="datos"> + <tr id="general_template" class="datos"> <td colspan="4"> <?php echo __('Please save the report to start adding items into the list.'); @@ -3642,31 +3650,31 @@ function print_General_list($width, $action, $idItem=null, $type='general') if ($type == 'availability') { if ($failover_mode) { - echo '<tr id="general_'.$item['id'].'" style="" class="datos"> + echo '<tr id="general_'.$item['id'].'" class="datos"> <td>'.printSmallFont($nameAgent).$server_name_element.'</td> <td>'.printSmallFont($nameModule).'</td> <td>'.printSmallFont($nameAgentFailover).$server_name_element.'</td> <td>'.printSmallFont($nameModuleFailover).'</td> - <td style="text-align: center;"> - <a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/cross.png', true).'</a> + <td class="center"> + <a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a> </td> </tr>'; } else { - echo '<tr id="general_'.$item['id'].'" style="" class="datos"> + echo '<tr id="general_'.$item['id'].'" class="datos"> <td>'.printSmallFont($nameAgent).$server_name_element.'</td> <td>'.printSmallFont($nameModule).'</td> - <td style="text-align: center;"> - <a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/cross.png', true).'</a> + <td class="center"> + <a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a> </td> </tr>'; } } else { - echo '<tr id="general_'.$item['id'].'" style="" class="datos"> + echo '<tr id="general_'.$item['id'].'" class="datos"> <td>'.printSmallFont($nameAgent).$server_name_element.'</td> <td>'.printSmallFont($nameModule).'</td> <td>'.printSmallFont($operation[$item['operation']]).'</td> - <td style="text-align: center;"> - <a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/cross.png', true).'</a> + <td class="center"> + <a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a> </td> </tr>'; } @@ -3681,7 +3689,7 @@ function print_General_list($width, $action, $idItem=null, $type='general') ?> <tbody id="general_template"> - <tr id="row" style="display: none;" class="datos"> + <tr id="row" class="datos invisible"> <td class="agent_name"></td> <td class="module_name"></td> <?php @@ -3700,12 +3708,13 @@ function print_General_list($width, $action, $idItem=null, $type='general') <?php } ?> - <td style="text-align: center;"> + <td class="center"> <a class="delete_button" href="javascript: deleteGeneralRow(0);"> <?php html_print_image( 'images/cross.png', - false + false, + ['class' => 'invert_filter'] ); ?> </a> @@ -3714,7 +3723,7 @@ function print_General_list($width, $action, $idItem=null, $type='general') </tbody> <tbody> - <tr id="general_form" style="" class="datos"> + <tr id="general_form" class="datos"> <td> <input id="hidden-id_agent_general" name="id_agent_general" value="" type="hidden"> <input id="hidden-server_name_general" name="server_name_general" value="" type="hidden"> @@ -3738,7 +3747,7 @@ function print_General_list($width, $action, $idItem=null, $type='general') ?> </td> <td> - <select id="id_agent_module_general" name="id_agente_modulo_general" disabled="disabled" style="max-width: 180px"> + <select id="id_agent_module_general" name="id_agente_modulo_general" disabled="disabled" class="mx180px"> <option value="0"> <?php echo __('Select an Agent first'); @@ -3772,7 +3781,7 @@ function print_General_list($width, $action, $idItem=null, $type='general') ?> </td> <td class="sla_list_module_failover_col"> - <select id="id_agent_module_failover" name="id_agent_module_failover" disabled="disabled" style="max-width: 180px"> + <select id="id_agent_module_failover" name="id_agent_module_failover" disabled="disabled" class="mx180px"> <option value="0"> <?php echo __('Select an Agent first'); @@ -3806,12 +3815,13 @@ function print_General_list($width, $action, $idItem=null, $type='general') <?php } ?> - <td style="text-align: center;"> + <td class="center"> <a href="javascript: addGeneralRow();"> <?php html_print_image( 'images/disk.png', - false + false, + ['class' => 'invert_filter'] ); ?> </a> @@ -3827,43 +3837,43 @@ function print_General_list($width, $action, $idItem=null, $type='general') } ?> </table> - <span style="display: none" id="module_general_text"> + <span class="invisible" id="module_general_text"> <?php echo __('Select an Agent first'); ?> </span> <?php } -echo "<div id='message_no_name' title='".__('Item Editor Information')."' style='display:none;'>"; -echo "<p style='text-align: center;font-weight: bold;'>".__('Please select a name.').'</p>'; +echo "<div id='message_no_name' title='".__('Item Editor Information')."' class='invisible'>"; +echo "<p class='center bolder'>".__('Please select a name.').'</p>'; echo '</div>'; -echo "<div id='message_no_agent' title='".__('Item Editor Information')."' style='display:none;'>"; -echo "<p style='text-align: center;font-weight: bold;'>".__('Please select an agent.').'</p>'; +echo "<div id='message_no_agent' title='".__('Item Editor Information')."' class='invisible'>"; +echo "<p class='center bolder'>".__('Please select an agent.').'</p>'; echo '</div>'; -echo "<div id='message_no_module' title='".__('Item Editor Information')."' style='display:none;'>"; -echo "<p style='text-align: center;font-weight: bold;'>".__('Please select a module.').'</p>'; +echo "<div id='message_no_module' title='".__('Item Editor Information')."' class='invisible'>"; +echo "<p class='center bolder'>".__('Please select a module.').'</p>'; echo '</div>'; -echo "<div id='message_no_sql_query' title='".__('Item Editor Information')."' style='display:none;'>"; -echo "<p style='text-align: center;font-weight: bold;'>".__('Please insert a SQL query.').'</p>'; +echo "<div id='message_no_sql_query' title='".__('Item Editor Information')."' class='invisible'>"; +echo "<p class='center bolder'>".__('Please insert a SQL query.').'</p>'; echo '</div>'; -echo "<div id='message_no_url' title='".__('Item Editor Information')."' style='display:none;'>"; -echo "<p style='text-align: center;font-weight: bold;'>".__('Please insert a URL.').'</p>'; +echo "<div id='message_no_url' title='".__('Item Editor Information')."' class='invisible'>"; +echo "<p class='center bolder'>".__('Please insert a URL.').'</p>'; echo '</div>'; -echo "<div id='message_no_interval_option' title='".__('Item Editor Information')."' style='display:none;'>"; -echo "<p style='text-align: center;font-weight: bold;'>".__('Please checked a custom interval option.').'</p>'; +echo "<div id='message_no_interval_option' title='".__('Item Editor Information')."' class='invisible'>"; +echo "<p class='center bolder''>".__('Please checked a custom interval option.').'</p>'; echo '</div>'; -echo "<div id='message_no_user' title='".__('Item Editor Information')."' style='display:none;'>"; -echo "<p style='text-align: center;font-weight: bold;'>".__('Please select a user.').'</p>'; +echo "<div id='message_no_user' title='".__('Item Editor Information')."' class='invisible'>"; +echo "<p class='center bolder'>".__('Please select a user.').'</p>'; echo '</div>'; -echo "<div id='message_no_group' title='".__('Item Editor Information')."' style='display:none;'>"; -echo "<p style='text-align: center;font-weight: bold;'>".__('Please select a group.').'</p>'; +echo "<div id='message_no_group' title='".__('Item Editor Information')."' class='invisible'>"; +echo "<p class='center bolder'>".__('Please select a group.').'</p>'; echo '</div>'; ui_require_javascript_file( diff --git a/pandora_console/godmode/reporting/reporting_builder.list_items.php b/pandora_console/godmode/reporting/reporting_builder.list_items.php index d98a354554..64e5819b1e 100755 --- a/pandora_console/godmode/reporting/reporting_builder.list_items.php +++ b/pandora_console/godmode/reporting/reporting_builder.list_items.php @@ -371,18 +371,54 @@ if ($items) { $table->head[0] = '<span title="'.__('Position').'">'.__('P.').'</span>'; $table->head[1] = __('Type'); if (!$filterEnable) { - $table->head[1] .= ' <span class="sort_arrow"><a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=type&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_up, true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=type&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_down, true, ['title' => __('Descent')]).'</a></span>'; + $table->head[1] .= ' <span class="sort_arrow"><a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=type&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image( + $arrow_up, + true, + [ + 'title' => __('Ascendent'), + 'class' => 'invert_filter', + ] + ).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=type&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image( + $arrow_down, + true, + [ + 'title' => __('Descent'), + 'class' => 'invert_filter', + ] + ).'</a></span>'; } $table->head[2] = __('Agent'); if (!$filterEnable) { - $table->head[2] .= ' <span class="sort_arrow"><a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=agent&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_up, true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=agent&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_down, true, ['title' => __('Descent')]).'</a></span>'; + $table->head[2] .= ' <span class="sort_arrow"><a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=agent&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image( + $arrow_up, + true, + [ + 'title' => __('Ascendent'), + 'class' => 'invert_filter', + ] + ).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=agent&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image( + $arrow_down, + true, + [ + 'title' => __('Descent'), + 'class' => 'invert_filter', + ] + ).'</a></span>'; } $table->head[3] = __('Module'); if (!$filterEnable) { - $table->head[3] .= ' <span class="sort_arrow"><a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=module&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_up, true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=module&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_down, true, ['title' => __('Descent')]).'</a></span>'; + $table->head[3] .= ' <span class="sort_arrow"><a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=module&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image( + $arrow_up, + true, + ['title' => __('Ascendent')] + ).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=module&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image( + $arrow_down, + true, + ['title' => __('Descent')] + ).'</a></span>'; } $table->head[4] = __('Time lapse'); @@ -581,11 +617,26 @@ foreach ($items as $item) { if (check_acl($config['id_user'], $item['id_group'], 'RM')) { $table->cellclass[][6] = 'action_buttons'; - $row[6] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=edit&id_report='.$idReport.'&id_item='.$item['id_rc'].'">'.html_print_image('images/wrench_orange.png', true, ['title' => __('Edit')]).'</a>'; + $row[6] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=edit&id_report='.$idReport.'&id_item='.$item['id_rc'].'">'.html_print_image( + 'images/config.png', + true, + [ + 'title' => __('Edit'), + 'class' => 'invert_filter', + ] + ).'</a>'; $row[6] .= ' '; - $row[6] .= '<a onClick="if (!confirm (\'Are you sure?\')) return false;" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete&id_report='.$idReport.'&id_item='.$item['id_rc'].$urlFilter.'">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'; + $row[6] .= '<a onClick="if (!confirm (\'Are you sure?\')) return false;" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete&id_report='.$idReport.'&id_item='.$item['id_rc'].$urlFilter.'">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'; $row[6] .= ' '; - $row[6] .= html_print_checkbox_extended('delete_multiple[]', $item['id_rc'], false, false, '', 'class="check_delete"', true); + $row[6] .= html_print_checkbox_extended( + 'delete_multiple[]', + $item['id_rc'], + false, + false, + '', + 'class="check_delete"', + true + ); } $row[7] = ''; @@ -609,7 +660,7 @@ if (defined('METACONSOLE')) { ui_pagination($countItems, 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter); echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items&id_report=".$idReport."' method='post' onSubmit='return added_ids_deleted_items_to_hidden_input();'>"; - echo "<div style='text-align: right; width:100%'>"; + echo "<div class='right w100p'>"; if (check_acl($config['id_user'], 0, 'RM')) { html_print_input_hidden('ids_items_to_delete', ''); @@ -633,7 +684,7 @@ if (defined('METACONSOLE')) { echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items&id_report=".$idReport."' method='post' onSubmit='return added_ids_deleted_items_to_hidden_input();'>"; - echo "<div style='padding-bottom: 20px; text-align: right; width:100%'>"; + echo "<div class='pdd_b_20px right; w100p'>"; html_print_input_hidden('ids_items_to_delete', ''); html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"'); @@ -758,11 +809,11 @@ function check_all_checkboxes() { function toggleFormFilter() { if ($("#form_filter").css('display') == 'none') { - $("#image_form_filter").attr('src', <?php echo "'".html_print_image('images/up.png', true, false, true)."'"; ?> ); + $("#image_form_filter").attr('src', <?php echo "'".html_print_image('images/up.png', true, ['class' => 'invert_filter'], true)."'"; ?> ); $("#form_filter").css('display',''); } else { - $("#image_form_filter").attr('src', <?php echo "'".html_print_image('images/down.png', true, false, true)."'"; ?> ); + $("#image_form_filter").attr('src', <?php echo "'".html_print_image('images/down.png', true, ['class' => 'invert_filter'], true)."'"; ?> ); $("#form_filter").css('display','none'); } } diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 6f77f643ec..eedbad1b1e 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -141,6 +141,8 @@ require_once $config['homedir'].'/include/functions_reports.php'; enterprise_include('operation/reporting/custom_reporting.php'); enterprise_include_once('include/functions_metaconsole.php'); + + $enterpriseEnable = false; if (enterprise_include_once('include/functions_reporting.php') !== ENTERPRISE_NOT_HOOK) { $enterpriseEnable = true; @@ -515,7 +517,14 @@ switch ($action) { $buttons = [ 'list_reports' => [ 'active' => false, - 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">'.html_print_image('images/report_list.png', true, ['title' => __('Reports list')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">'.html_print_image( + 'images/report_list.png', + true, + [ + 'title' => __('Reports list'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; @@ -958,14 +967,20 @@ switch ($action) { $data[2] .= html_print_image( 'images/html.png', true, - ['title' => __('HTML view')] + [ + 'title' => __('HTML view'), + 'class' => 'invert_filter', + ] ); $data[2] .= '</a>'; $data[3] = '<a href="'.ui_get_full_url(false, false, false, false).'ajax.php?page='.$config['homedir'].'/operation/reporting/reporting_xml&id='.$report['id_report'].'">'; $data[3] .= html_print_image( 'images/xml.png', true, - ['title' => __('Export to XML')] + [ + 'title' => __('Export to XML'), + 'class' => 'invert_filter', + ] ); $data[3] .= '</a>'; // I chose ajax.php because it's supposed @@ -1060,7 +1075,7 @@ switch ($action) { } if ($edit) { - $data[$next] = '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&action=edit&pure='.$pure.'" style="display:inline">'; + $data[$next] = '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&action=edit&pure='.$pure.'" class="inline_line">'; $data[$next] .= html_print_input_image( 'edit', 'images/config.png', @@ -1078,14 +1093,17 @@ switch ($action) { } if ($delete) { - $data[$next] .= '<form method="post" style="display:inline;" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">'; + $data[$next] .= '<form method="post" class="inline_line" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">'; $data[$next] .= html_print_input_image( 'delete', 'images/cross.png', 1, 'margin-right: 10px;', true, - ['title' => __('Delete')] + [ + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] ); $data[$next] .= html_print_input_hidden( 'id_report', @@ -1155,9 +1173,9 @@ switch ($action) { ) { echo '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=main&action=new&pure='.$pure.'">'; if (defined('METACONSOLE')) { - echo '<div class="action-buttons" style="width: 100%; ">'; + echo '<div class="action-buttons w100p">'; } else { - echo '<div class="action-buttons" style="width: 100%;">'; + echo '<div class="action-buttons w100p">'; } html_print_submit_button( @@ -1168,7 +1186,7 @@ switch ($action) { ); echo '</form>'; - echo '<form style="display:inline;" id="massive_report_form" method="post" action="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=main&action=delete">'; + echo '<form class="inline_line" id="massive_report_form" method="post" action="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=main&action=delete">'; foreach ($reports as $report) { echo '<input class="massive_report_form_elements" id="hidden-id_report_'.$report['id_report'].'" name="id_report[]" type="hidden" disabled value="'.$report['id_report'].'">'; @@ -1179,7 +1197,7 @@ switch ($action) { __('Delete'), 'delete_btn', false, - 'class="sub delete" style="margin-left:5px;"' + 'class="sub delete" class="mrgn_lft_5px"' ); echo '</form>'; echo '</div>'; @@ -3102,7 +3120,7 @@ switch ($action) { $buttons = [ 'list_reports' => [ 'active' => false, - 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">'.html_print_image('images/report_list.png', true, ['title' => __('Reports list')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">'.html_print_image('images/report_list.png', true, ['title' => __('Reports list'), 'class' => 'invert_filter']).'</a>', ], ]; @@ -3174,19 +3192,26 @@ $urlB = 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder'; $buttons = [ 'list_reports' => [ 'active' => false, - 'text' => '<a href="'.$urlB.'&pure='.$pure.'">'.html_print_image('images/report_list.png', true, ['title' => __('Reports list')]).'</a>', + 'text' => '<a href="'.$urlB.'&pure='.$pure.'">'.html_print_image( + 'images/report_list.png', + true, + [ + 'title' => __('Reports list'), + 'class' => 'invert_filter', + ] + ).'</a>', ], 'main' => [ 'active' => false, - 'text' => '<a href="'.$urlB.'&tab=main&action=edit&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/op_reporting.png', true, ['title' => __('Main data')]).'</a>', + 'text' => '<a href="'.$urlB.'&tab=main&action=edit&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/op_reporting.png', true, ['title' => __('Main data'), 'class' => 'invert_filter']).'</a>', ], 'list_items' => [ 'active' => false, - 'text' => '<a href="'.$urlB.'&tab=list_items&action=edit&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('List items')]).'</a>', + 'text' => '<a href="'.$urlB.'&tab=list_items&action=edit&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('List items'), 'class' => 'invert_filter']).'</a>', ], 'item_editor' => [ 'active' => false, - 'text' => '<a href="'.$urlB.'&tab=item_editor&action=new&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/pen.png', true, ['title' => __('Item editor')]).'</a>', + 'text' => '<a href="'.$urlB.'&tab=item_editor&action=new&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/pencil.png', true, ['title' => __('Item editor'), 'class' => 'invert_filter']).'</a>', ], ]; @@ -3199,7 +3224,14 @@ if ($enterpriseEnable) { $buttons['view'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id='.$idReport.'&pure='.$pure.'">'.html_print_image('images/operation.png', true, ['title' => __('View report')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id='.$idReport.'&pure='.$pure.'">'.html_print_image( + 'images/operation.png', + true, + [ + 'title' => __('View report'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; $buttons[$activeTab]['active'] = true; @@ -3212,7 +3244,7 @@ if ($idReport != 0) { $buttons = [ 'main' => [ 'active' => true, - 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">'.html_print_image('images/report_list.png', true, ['title' => __('Reports list')]).'</a>', + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">'.html_print_image('images/report_list.png', true, ['title' => __('Reports list'), 'class' => 'invert_filter']).'</a>', ], ]; $textReportName = __('Create Custom Report'); diff --git a/pandora_console/godmode/reporting/visual_console_builder.data.php b/pandora_console/godmode/reporting/visual_console_builder.data.php index c6cfbd5bc0..7e2e488697 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.data.php +++ b/pandora_console/godmode/reporting/visual_console_builder.data.php @@ -116,20 +116,20 @@ $table->data[0][1] = html_print_input_text( $table->rowspan[0][2] = 6; if ($action == 'new') { - $table->data[0][2] = '<img id="imagen2" style="display:none;" + $table->data[0][2] = '<img id="imagen2" class="invisible" src="">'; - $table->data[0][2] .= '<img id="imagen" style="display:none;" + $table->data[0][2] .= '<img id="imagen" class="invisible" src="">'; } else { if (defined('METACONSOLE')) { - $table->data[0][2] = '<img id="imagen2" style="width:230px;" + $table->data[0][2] = '<img id="imagen2" src="../../images/console/background/'.$background.'">'; } else { - $table->data[0][2] = '<img id="imagen2" style="width:230px;" + $table->data[0][2] = '<img id="imagen2" src="images/console/background/'.$background.'">'; } - $table->data[0][2] .= '<img id="imagen" style="display:none;" + $table->data[0][2] .= '<img id="imagen" class="invisible" src="">'; } @@ -212,7 +212,7 @@ $table->data[5][1] = '<button id="modsize" $table->data[5][1] .= '<span class="opt" style="visibility:hidden;">'.html_print_input_text('width', $preimagew, '', 10, 10, true, false).' x '.html_print_input_text('height', $preimageh, '', 10, 10, true, false).'</span>'; $table->data[5][1] .= '<span class="opt" style="visibility:hidden;"> - <button id="getsize" style="margin-left:20px;" + <button id="getsize" class="margin_lft_20px" value="modsize">'.__('Get default image size').'</button></span>'; $table->data[6][0] = __('Favourite visual console'); diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.php b/pandora_console/godmode/reporting/visual_console_builder.editor.php index c92106b796..310efdfabc 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.php +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.php @@ -83,9 +83,9 @@ visual_map_editor_print_hack_translate_strings(); visual_map_editor_print_item_palette($visualConsole['id'], $background); if (!defined('METACONSOLE')) { - echo '<div id="frame_view" style="width: 100%; height: 500px; overflow: scroll; margin: 0 auto;">'; + echo '<div id="frame_view" class="frame_view_meta">'; } else { - echo '<div id="frame_view" style="overflow: auto; margin: 0px auto; padding: 5px; ">'; + echo '<div id="frame_view" class="frame_view_node">'; } echo '<div id="background" class="" style="top:0px; @@ -146,7 +146,7 @@ foreach ($layoutDatas as $layoutData) { ); } -echo "<img style='position: absolute; top: 0px; left: 0px;' id='background_img' src='".$metaconsole_hack.'images/console/background/'.$background."' width='100%' height='100%' />"; +echo "<img class='vc_bg_image' id='background_img' src='".$metaconsole_hack.'images/console/background/'.$background."' width='100%' height='100%' />"; echo '</div>'; echo '</div>'; @@ -164,11 +164,11 @@ html_print_input_hidden('message_size', __('Min allowed size is 1024x768')); // Loading dialog -echo "<div id='loading_in_progress_dialog' style='display: none; text-align: center;' title='".__('Action in progress')."'>".__('Loading in progress').'<br />'.html_print_image('images/spinner.gif', true).'</div>'; +echo "<div id='loading_in_progress_dialog' class='invisible center' title='".__('Action in progress')."'>".__('Loading in progress').'<br />'.html_print_image('images/spinner.gif', true).'</div>'; -echo "<div id='saving_in_progress_dialog' style='display: none; text-align: center;' title='".__('Action in progress')."'>".__('Saving in progress').'<br />'.html_print_image('images/spinner.gif', true).'</div>'; +echo "<div id='saving_in_progress_dialog' class='invisible center' title='".__('Action in progress')."'>".__('Saving in progress').'<br />'.html_print_image('images/spinner.gif', true).'</div>'; -echo "<div id='delete_in_progress_dialog' style='display: none; text-align: center;' title='".__('Action in progress')."'>".__('Deletion in progress').'<br />'.html_print_image('images/spinner.gif', true).'</div>'; +echo "<div id='delete_in_progress_dialog' class='invisible center' title='".__('Action in progress')."'>".__('Deletion in progress').'<br />'.html_print_image('images/spinner.gif', true).'</div>'; // CSS ui_require_css_file('color-picker', 'include/styles/js/'); diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php index f33befe4d0..780ef8b397 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.elements.php +++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php @@ -119,7 +119,14 @@ $table->head[5] .= '   <span title="'.__('Action').'">'.__('A.'). $table->size = []; $table->size['icon'] = '1%'; -$table->size[0] = '25%'; +$table->size[0] = '28%'; +$table->size[1] = ''; +$table->size[2] = '25%'; +$table->size[3] = '27%'; +$table->size[4] = '7%'; +$table->size[5] = '15%'; + + $table->align = []; if (!defined('METACONSOLE')) { @@ -141,9 +148,9 @@ $table->data = []; // Background $table->data[0]['icon'] = ''; -$table->data[0][0] = '<div style="display:none;">'.__('Background').'</div>'; -$table->data[0][1] = '<div style="display:none;">'.html_print_select($backgrounds_list, 'background', $visualConsole['background'], '', 'None', '', true, false, true, '', false, 'width: 120px;').'</div>'; -$table->data[0][2] = '<div style="display:none;">'.html_print_input_text('width', $visualConsole['width'], '', 3, 5, true).' x '.html_print_input_text('height', $visualConsole['height'], '', 3, 5, true).'</div>'; +$table->data[0][0] = '<div sclass="invisible">'.__('Background').'</div>'; +$table->data[0][1] = '<div sclass="invisible">'.html_print_select($backgrounds_list, 'background', $visualConsole['background'], '', 'None', '', true, false, true, '', false, 'width: 120px;').'</div>'; +$table->data[0][2] = '<div sclass="invisible">'.html_print_input_text('width', $visualConsole['width'], '', 3, 5, true).' x '.html_print_input_text('height', $visualConsole['height'], '', 3, 5, true).'</div>'; $table->data[0][3] = $table->data[0][4] = $table->data[0][5] = ''; $i = 1; @@ -169,9 +176,12 @@ foreach ($layoutDatas as $layoutData) { switch ($layoutData['type']) { case STATIC_GRAPH: $table->data[($i + 1)]['icon'] = html_print_image( - 'images/camera.png', + 'images/camera_mc.png', true, - ['title' => __('Static Image')] + [ + 'title' => __('Static Image'), + 'class' => 'invert_filter', + ] ); break; @@ -179,7 +189,10 @@ foreach ($layoutDatas as $layoutData) { $table->data[($i + 1)]['icon'] = html_print_image( 'images/chart_bar.png', true, - ['title' => __('Percentile Bar')] + [ + 'title' => __('Percentile Bar'), + 'class' => 'invert_filter', + ] ); break; @@ -195,7 +208,10 @@ foreach ($layoutDatas as $layoutData) { $table->data[($i + 1)]['icon'] = html_print_image( 'images/chart_curve.png', true, - ['title' => __('Module Graph')] + [ + 'title' => __('Module Graph'), + 'class' => 'invert_filter', + ] ); break; @@ -211,7 +227,10 @@ foreach ($layoutDatas as $layoutData) { $table->data[($i + 1)]['icon'] = html_print_image( 'images/binary.png', true, - ['title' => __('Simple Value')] + [ + 'title' => __('Simple Value'), + 'class' => 'invert_filter', + ] ); break; @@ -219,7 +238,10 @@ foreach ($layoutDatas as $layoutData) { $table->data[($i + 1)]['icon'] = html_print_image( 'images/binary.png', true, - ['title' => __('Simple Value (Process Max)')] + [ + 'title' => __('Simple Value (Process Max)'), + 'class' => 'invert_filter', + ] ); break; @@ -227,7 +249,10 @@ foreach ($layoutDatas as $layoutData) { $table->data[($i + 1)]['icon'] = html_print_image( 'images/binary.png', true, - ['title' => __('Simple Value (Process Min)')] + [ + 'title' => __('Simple Value (Process Min)'), + 'class' => 'invert_filter', + ] ); break; @@ -235,7 +260,10 @@ foreach ($layoutDatas as $layoutData) { $table->data[($i + 1)]['icon'] = html_print_image( 'images/binary.png', true, - ['title' => __('Simple Value (Process Avg)')] + [ + 'title' => __('Simple Value (Process Avg)'), + 'class' => 'invert_filter', + ] ); break; @@ -251,7 +279,10 @@ foreach ($layoutDatas as $layoutData) { $table->data[($i + 1)]['icon'] = html_print_image( 'images/photo.png', true, - ['title' => __('Icon')] + [ + 'title' => __('Icon'), + 'class' => 'invert_filter', + ] ); break; @@ -259,7 +290,10 @@ foreach ($layoutDatas as $layoutData) { $table->data[($i + 1)]['icon'] = html_print_image( 'images/box_item.png', true, - ['title' => __('Box')] + [ + 'title' => __('Box'), + 'class' => 'invert_filter', + ] ); break; @@ -276,7 +310,10 @@ foreach ($layoutDatas as $layoutData) { $table->data[($i + 1)]['icon'] = html_print_image( 'images/line_item.png', true, - ['title' => __('Line')] + [ + 'title' => __('Line'), + 'class' => 'invert_filter', + ] ); break; @@ -311,7 +348,7 @@ foreach ($layoutDatas as $layoutData) { break; default: - $table->data[($i + 1)][0] = '<span style="width: 150px; display: block;">'.html_print_input_hidden('label_'.$idLayoutData, $layoutData['label'], true).'<a href="javascript: show_dialog_label_editor('.$idLayoutData.');">'.__('Edit label').'</a>'.'</span>'; + $table->data[($i + 1)][0] = '<span class="w150px block">'.html_print_input_hidden('label_'.$idLayoutData, $layoutData['label'], true).'<a href="javascript: show_dialog_label_editor('.$idLayoutData.');">'.__('Edit label').'</a>'.'</span>'; break; } @@ -407,7 +444,7 @@ foreach ($layoutDatas as $layoutData) { $table->data[($i + 1)][5] = ''; $table->data[($i + 1)][5] .= html_print_checkbox('multiple_delete_items', $idLayoutData, false, true); - $table->data[($i + 1)][5] .= '<a href="'.$url_delete.'" '.'onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a>'; + $table->data[($i + 1)][5] .= '<a href="'.$url_delete.'" '.'onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>'; // Second row $table->data[($i + 2)]['icon'] = ''; @@ -698,7 +735,7 @@ echo '</form>'; // Trick for it have a traduct text for javascript. -echo '<span id="ip_text" style="display: none;">'.__('IP').'</span>'; +echo '<span id="ip_text" class="invisible">'.__('IP').'</span>'; ?> <div id="dialog_label_editor"> <input id="active_id_layout_data" type="hidden" /> diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index 78a445ae0b..26fb5e0912 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -757,42 +757,42 @@ $buttons = []; $buttons['consoles_list'] = [ 'active' => false, - 'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder&refr='.$refr.'">'.html_print_image('images/visual_console.png', true, ['title' => __('Visual consoles list')]).'</a>', + 'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder&refr='.$refr.'">'.html_print_image('images/visual_console.png', true, ['title' => __('Visual consoles list'), 'class' => 'invert_filter']).'</a>', ]; $buttons['public_link'] = [ 'active' => false, - 'text' => '<a href="'.ui_get_full_url('operation/visual_console/public_console.php?hash='.$hash.'&refr='.$refr.'&id_layout='.$idVisualConsole.'&id_user='.$config['id_user']).'">'.html_print_image('images/camera_mc.png', true, ['title' => __('Show link to public Visual Console')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('operation/visual_console/public_console.php?hash='.$hash.'&refr='.$refr.'&id_layout='.$idVisualConsole.'&id_user='.$config['id_user']).'">'.html_print_image('images/camera_mc.png', true, ['title' => __('Show link to public Visual Console'), 'class' => 'invert_filter']).'</a>', ]; $buttons['data'] = [ 'active' => false, - 'text' => '<a href="'.$url_base.$action.'&tab=data&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/op_reporting.png', true, ['title' => __('Main data')]).'</a>', + 'text' => '<a href="'.$url_base.$action.'&tab=data&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/op_reporting.png', true, ['title' => __('Main data'), 'class' => 'invert_filter']).'</a>', ]; $buttons['list_elements'] = [ 'active' => false, - 'text' => '<a href="'.$url_base.$action.'&tab=list_elements&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/list.png', true, ['title' => __('List elements')]).'</a>', + 'text' => '<a href="'.$url_base.$action.'&tab=list_elements&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/list.png', true, ['title' => __('List elements'), 'class' => 'invert_filter']).'</a>', ]; if (enterprise_installed()) { $buttons['wizard_services'] = [ 'active' => false, - 'text' => '<a href="'.$url_base.$action.'&tab=wizard_services&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/wand_services.png', true, ['title' => __('Services wizard')]).'</a>', + 'text' => '<a href="'.$url_base.$action.'&tab=wizard_services&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/wand_services.png', true, ['title' => __('Services wizard'), 'class' => 'invert_filter']).'</a>', ]; } $buttons['wizard'] = [ 'active' => false, - 'text' => '<a href="'.$url_base.$action.'&tab=wizard&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/wand.png', true, ['title' => __('Wizard')]).'</a>', + 'text' => '<a href="'.$url_base.$action.'&tab=wizard&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/wand.png', true, ['title' => __('Wizard'), 'class' => 'invert_filter']).'</a>', ]; if ($config['legacy_vc']) { $buttons['editor'] = [ 'active' => false, - 'text' => '<a href="'.$url_base.$action.'&tab=editor&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/builder.png', true, ['title' => __('Builder')]).'</a>', + 'text' => '<a href="'.$url_base.$action.'&tab=editor&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/builder.png', true, ['title' => __('Builder'), 'class' => 'invert_filter']).'</a>', ]; } $buttons['view'] = [ 'active' => false, - 'text' => '<a href="'.$url_view.'">'.html_print_image('images/operation.png', true, ['title' => __('View')]).'</a>', + 'text' => '<a href="'.$url_view.'">'.html_print_image('images/operation.png', true, ['title' => __('View'), 'class' => 'invert_filter']).'</a>', ]; if ($action == 'new' || $idVisualConsole === false) { diff --git a/pandora_console/godmode/reporting/visual_console_builder.wizard.php b/pandora_console/godmode/reporting/visual_console_builder.wizard.php index 634f35c20a..9185598c99 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.wizard.php +++ b/pandora_console/godmode/reporting/visual_console_builder.wizard.php @@ -449,7 +449,7 @@ $table->data['all_4'][1] = html_print_select( true, true ); -$table->data['all_4'][2] = ' <span style="vertical-align: top;">'.__('Modules').'</span>'; +$table->data['all_4'][2] = ' <span class="align-top">'.__('Modules').'</span>'; $table->data['all_4'][3] = html_print_select( [], 'module[]', @@ -535,7 +535,7 @@ if (is_metaconsole()) { } if (defined('METACONSOLE')) { - echo "<div class='title_tactical' style='margin-top: 15px; '>".__('Wizard').'</div>'; + echo "<div class='title_tactical mrgn_top_15px'>".__('Wizard').'</div>'; } html_print_table($table); @@ -553,9 +553,9 @@ echo '</div>'; echo '</form>'; // Trick for it have a traduct text for javascript. -echo '<span id="any_text" style="display: none;">'.__('Any').'</span>'; -echo '<span id="none_text" style="display: none;">'.__('None').'</span>'; -echo '<span id="loading_text" style="display: none;">'.__('Loading...').'</span>'; +echo '<span id="any_text" class="invisible">'.__('Any').'</span>'; +echo '<span id="none_text" class="invisible">'.__('None').'</span>'; +echo '<span id="loading_text" class="invisible">'.__('Loading...').'</span>'; ?> <script type="text/javascript"> diff --git a/pandora_console/godmode/reporting/visual_console_favorite.php b/pandora_console/godmode/reporting/visual_console_favorite.php index 76e14e5195..8bd58abf64 100644 --- a/pandora_console/godmode/reporting/visual_console_favorite.php +++ b/pandora_console/godmode/reporting/visual_console_favorite.php @@ -31,6 +31,7 @@ if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) { exit; } + if (!$is_metaconsole) { $url_visual_console = 'index.php?sec=network&sec2=godmode/reporting/map_builder'; $url_visual_console_favorite = 'index.php?sec=network&sec2=godmode/reporting/visual_console_favorite'; @@ -45,23 +46,51 @@ if (!$is_metaconsole) { $buttons['visual_console'] = [ 'active' => false, - 'text' => '<a href="'.$url_visual_console.'">'.html_print_image('images/visual_console.png', true, ['title' => __('Visual Console List')]).'</a>', + 'text' => '<a href="'.$url_visual_console.'">'.html_print_image( + 'images/visual_console.png', + true, + [ + 'title' => __('Visual Console List'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; $buttons['visual_console_favorite'] = [ 'active' => true, - 'text' => '<a href="'.$url_visual_console_favorite.'">'.html_print_image('images/list.png', true, ['title' => __('Visual Favourite Console')]).'</a>', + 'text' => '<a href="'.$url_visual_console_favorite.'">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('Visual Favourite Console'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; if ($is_enterprise !== ENTERPRISE_NOT_HOOK && $vconsoles_manage) { $buttons['visual_console_template'] = [ 'active' => false, - 'text' => '<a href="'.$url_visual_console_template.'">'.html_print_image('images/templates.png', true, ['title' => __('Visual Console Template')]).'</a>', + 'text' => '<a href="'.$url_visual_console_template.'">'.html_print_image( + 'images/templates.png', + true, + [ + 'title' => __('Visual Console Template'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; $buttons['visual_console_template_wizard'] = [ 'active' => false, - 'text' => '<a href="'.$url_visual_console_template_wizard.'">'.html_print_image('images/wand.png', true, ['title' => __('Visual Console Template Wizard')]).'</a>', + 'text' => '<a href="'.$url_visual_console_template_wizard.'">'.html_print_image( + 'images/wand.png', + true, + [ + 'title' => __('Visual Console Template Wizard'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; } @@ -152,7 +181,13 @@ if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AW')) { $filters['group'] = array_flip($ag_groups); } - $favorite_array = visual_map_get_user_layouts($config['id_user'], false, $filters, $returnAllGroups, true); + $favorite_array = visual_map_get_user_layouts( + $config['id_user'], + false, + $filters, + $returnAllGroups, + true + ); echo "<div id='is_favourite'>"; if ($favorite_array == false) { diff --git a/pandora_console/godmode/servers/modificar_server.php b/pandora_console/godmode/servers/modificar_server.php index 7907eecf90..cfbbf39017 100644 --- a/pandora_console/godmode/servers/modificar_server.php +++ b/pandora_console/godmode/servers/modificar_server.php @@ -94,7 +94,7 @@ if (isset($_GET['server'])) { html_print_table($table); - echo '<div class="action-buttons" style="width: 100%">'; + echo '<div class="action-buttons w100p">'; echo '<input type="submit" class="sub upd" value="'.__('Update').'">'; echo '</div>'; } else if (isset($_GET['server_remote'])) { @@ -242,10 +242,10 @@ function check_process (id_server) { parameters, function (data) { if (data['correct']) { - $("#check_exec_server img").attr("src", "images/dot_green.png"); + $("#check_exec_server img").attr("src", <?php echo 'images/dot_green.png'; ?>); } else { - $("#check_exec_server img").attr("src", "images/dot_red.png"); + $("#check_exec_server img").attr("src", <?php echo 'images/dot_red.png'; ?>); $("#check_error_message").empty(); $("#check_error_message").append("<span>" + data['message'] + "</span>"); } diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index 4b57c743a7..6acbffaece 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -158,13 +158,13 @@ if ($filemanager) { // echo "<a href='index.php?sec=gagente&sec2=enterprise/godmode/agentes/collections&action=file&id=" . $collection['id'] . "&directory=" . $relative_dir . "&hash2=" . $hash2 . "'>" . __('Back to file explorer') . "</a>"; echo "<form method='post' action='index.php?sec=gservers&sec2=godmode/servers/plugin&filemanager=1"."&update_file=1'>"; // html_print_input_hidden('location_file', $locationFile); - echo "<table style='width: 98%'>"; + echo "<table class='w98p'>"; echo '<tr>'; echo '<th>'.__('Edit').'</th>'; echo '</tr>'; echo '<tr>'; echo '<td>'; - echo "<textarea name='content_file' style='width: 100%; height: 400px;' >"; + echo "<textarea name='content_file' class='w100p height_400px' >"; echo $file; echo '</textarea>'; echo '</td>'; @@ -362,10 +362,6 @@ if (($create != '') || ($view != '')) { $table->colspan['plugin_desc'][1] = 3; $table->data['plugin_desc'] = $data; - // if (!defined("METACONSOLE")) { - // echo '<br>'; - // echo '<table class="databox" style="margin: 0 auto; width: 100%;"><tr><td>'; - // } $table->width = '100%'; $table->class = 'databox filters'; @@ -407,11 +403,11 @@ if (($create != '') || ($view != '')) { $data[0] = __('Plugin command').ui_print_help_tip(__('Specify interpreter and plugin path. The server needs permissions to run it.'), true); $data[1] = '<input type="text" name="form_execute" id="form_execute" class="command_component command_advanced_conf" size=100 value="'.$form_execute.'" '.$disabled.'>'; if ($locked) { - $data[1] .= html_print_image('images/lock.png', true, ['class' => 'command_advanced_conf lock']); + $data[1] .= html_print_image('images/lock_mc.png', true, ['class' => 'command_advanced_conf lock', 'class' => 'invert_filter']); } - $data[1] .= ' <a href="index.php?sec=gservers&sec2=godmode/servers/plugin&filemanager=1&id_plugin='.$form_id.'" style="vertical-align: bottom;">'; - $data[1] .= html_print_image('images/file.png', true, false, false, true); + $data[1] .= ' <a href="index.php?sec=gservers&sec2=godmode/servers/plugin&filemanager=1&id_plugin='.$form_id.'" class="bot">'; + $data[1] .= html_print_image('images/file.png', true, ['class' => 'invert_filter'], false, true); $data[1] .= '</a>'; $table->data['plugin_command'] = $data; @@ -419,14 +415,14 @@ if (($create != '') || ($view != '')) { $data[0] = __('Plug-in parameters'); $data[1] = '<input type="text" name="form_parameters" id="form_parameters" class="command_component command_advanced_conf" size=100 value="'.$parameters.'" '.$disabled.'>'; if ($locked) { - $data[1] .= html_print_image('images/lock.png', true, ['class' => 'command_advanced_conf lock']); + $data[1] .= html_print_image('images/lock_mc.png', true, ['class' => 'command_advanced_conf lock', 'class' => 'invert_filter']); } $table->data['plugin_parameters'] = $data; $data = []; $data[0] = __('Command preview'); - $data[1] = '<div id="command_preview" style="font-style:italic"></div>'; + $data[1] = '<div id="command_preview" class="italic"></div>'; $table->data['plugin_preview'] = $data; $table->width = '100%'; @@ -488,17 +484,17 @@ if (($create != '') || ($view != '')) { } $datam = []; - $datam[0] = __('Description')."<span style='font-weight: normal'> ($macro_name)</span>"; + $datam[0] = __('Description')."<span class='normal_weight'> ($macro_name)</span>"; $datam[0] .= html_print_input_hidden($macro_name_name, $macro_name, true); $datam[1] = html_print_input_text_extended($macro_desc_name, $macro_desc_value, 'text-'.$macro_desc_name, '', 30, 255, $locked, '', "class='command_macro'", true); if ($locked) { - $datam[1] .= html_print_image('images/lock.png', true, ['class' => 'command_macro lock']); + $datam[1] .= html_print_image('images/lock_mc.png', true, ['class' => 'command_macro lock', 'class' => 'invert_filter']); } - $datam[2] = __('Default value')."<span style='font-weight: normal'> ($macro_name)</span>"; + $datam[2] = __('Default value')."<span class='normal_weight'> ($macro_name)</span>"; $datam[3] = html_print_input_text_extended($macro_value_name, $macro_value_value, 'text-'.$macro_value_name, '', 30, 255, $locked, '', "class='command_component command_macro'", true); if ($locked) { - $datam[3] .= html_print_image('images/lock.png', true, ['class' => 'command_macro lock']); + $datam[3] .= html_print_image('images/lock_mc.png', true, ['class' => 'command_macro lock', 'class' => 'invert_filter']); } $table->data['plugin_'.$next_name_number] = $datam; @@ -508,8 +504,20 @@ if (($create != '') || ($view != '')) { $table->colspan['plugin_'.$next_name_number][1] = 3; $datam = []; - $datam[0] = __('Hide value').ui_print_help_tip(__('This field will show up as dots like a password'), true); - $datam[1] = html_print_checkbox_extended($macro_hide_value_name, 1, $macro_hide_value_value, 0, '', ['class' => 'command_macro'], true, 'checkbox-'.$macro_hide_value_name); + $datam[0] = __('Hide value').ui_print_help_tip( + __('This field will show up as dots like a password'), + true + ); + $datam[1] = html_print_checkbox_extended( + $macro_hide_value_name, + 1, + $macro_hide_value_value, + 0, + '', + ['class' => 'command_macro'], + true, + 'checkbox-'.$macro_hide_value_name + ); $table->data['plugin_'.$next_name_number] = $datam; $next_name_number++; @@ -517,12 +525,23 @@ if (($create != '') || ($view != '')) { $table->colspan['plugin_'.$next_name_number][1] = 3; $datam = []; - $datam[0] = __('Help')."<span style='font-weight: normal'> ($macro_name)</span><br><br><br>"; + $datam[0] = __('Help')."<span class='normal_weight'> ($macro_name)</span><br><br><br>"; $tadisabled = $locked === true ? ' disabled' : ''; - $datam[1] = html_print_textarea($macro_help_name, 6, 100, $macro_help_value, 'class="command_macro" style="width: 97%;"'.$tadisabled, true); + $datam[1] = html_print_textarea( + $macro_help_name, + 6, + 100, + $macro_help_value, + 'class="command_macro" class="w97p"'.$tadisabled, + true + ); if ($locked) { - $datam[1] .= html_print_image('images/lock.png', true, ['class' => 'command_macro lock']); + $datam[1] .= html_print_image( + 'images/lock_mc.png', + true, + ['class' => 'command_macro lock invert_filter'] + ); } $datam[1] .= '<br><br><br>'; @@ -534,9 +553,13 @@ if (($create != '') || ($view != '')) { // Add/Delete buttons $datam = []; - $datam[0] = '<a id="add_macro_btn" href="javascript:;">'.'<span style="font-weight: bold;">'.__('Add macro').'</span>'.' '.html_print_image('images/add.png', true).'</a>'; - $datam[0] .= '<div id="next_macro" style="display:none">'.$i.'</div>'; - $datam[0] .= '<div id="next_row" style="display:none">'.$next_name_number.'</div>'; + $datam[0] = '<a id="add_macro_btn" href="javascript:;">'.'<span class="bolder">'.__('Add macro').'</span>'.' '.html_print_image( + 'images/add.png', + true, + ['class' => 'invert_filter'] + ).'</a>'; + $datam[0] .= '<div id="next_macro" class="invisible">'.$i.'</div>'; + $datam[0] .= '<div id="next_row" class="invisible">'.$next_name_number.'</div>'; if (!$locked) { $delete_macro_style = ''; @@ -544,7 +567,7 @@ if (($create != '') || ($view != '')) { $delete_macro_style = 'display:none;'; } - $datam[2] = '<div id="delete_macro_button" style="'.$delete_macro_style.'">'.'<a href="javascript:;">'.'<span style="font-weight: bold;">'.__('Delete macro').'</span>'.' '.html_print_image('images/delete.png', true).'</a>'.'</div>'; + $datam[2] = '<div id="delete_macro_button" style="'.$delete_macro_style.'">'.'<a href="javascript:;">'.'<span class="bolder">'.__('Delete macro').'</span>'.' '.html_print_image('images/delete.png', true, ['class' => 'invert_filter']).'</a>'.'</div>'; $table->colspan['plugin_action'][0] = 2; $table->colspan['plugin_action'][2] = 2; @@ -592,13 +615,15 @@ if (($create != '') || ($view != '')) { $sec = 'advanced'; $management_allowed = is_management_allowed(); if (!$management_allowed) { - ui_print_warning_message(__('To manage plugin you must activate centralized management')); + ui_print_warning_message( + __('To manage plugin you must activate centralized management') + ); } if (!$config['metaconsole_deploy_plugin_server'] && $management_allowed) { $deploy_plugin_server = true; - echo '<div id="deploy_messages" style="display: none">'; + echo '<div id="deploy_messages" class="invisible">'; echo '<span>'.__('The previous configuration of plugins has been imported from the nodes. Please check that the definitions are correct.').'</br></br>'.'<b>'.__('Note:').'</b>'.__( 'These definitions will not be operational until you manually copy the files from the nodes to the atachment/plugin/ directory of the meta console.' @@ -983,7 +1008,7 @@ if (($create != '') || ($view != '')) { echo '<th>'.__('Type').'</th>'; echo '<th>'.__('Command').'</th>'; if ($management_allowed) { - echo "<th style='width: 120px;'>".'<span title="Operations">'.__('Op.').'</span>'.'</th>'; + echo "<th class='w120px'>".'<span title="Operations">'.__('Op.').'</span>'.'</th>'; } echo '</tr></thead>'; @@ -1036,14 +1061,35 @@ if (($create != '') || ($view != '')) { ); if (($components_using_plugin + $modules_using_plugin) > 0) { echo '<a href="javascript: show_locked_dialog('.$row['id'].', \''.$row['name'].'\');">'; - html_print_image('images/lock.png'); + html_print_image('images/lock_mc.png', false, ['class' => 'invert_filter']); echo '</a>'; } - echo "<a href='index.php?sec=$sec&sec2=godmode/servers/plugin&tab=$tab&view=".$row['id'].'&tab=plugins&pure='.$config['pure']."'>".html_print_image('images/config.png', true, ['title' => __('Edit')]).'</a>  '; - echo "<a href='index.php?sec=$sec&sec2=godmode/servers/plugin&tab=$tab&kill_plugin=".$row['id'].'&tab=plugins&pure='.$config['pure']."' onclick='javascript: if (!confirm(\"".__('All the modules that are using this plugin will be deleted').'. '.__('Are you sure?')."\")) return false;'>".html_print_image('images/cross.png', true, ['border' => '0']).'</a>'; + echo "<a href='index.php?sec=$sec&sec2=godmode/servers/plugin&tab=$tab&view=".$row['id'].'&tab=plugins&pure='.$config['pure']."'>".html_print_image( + 'images/config.png', + true, + [ + 'title' => __('Edit'), + 'class' => 'invert_filter', + ] + ).'</a>  '; + echo "<a href='index.php?sec=$sec&sec2=godmode/servers/plugin&tab=$tab&kill_plugin=".$row['id'].'&tab=plugins&pure='.$config['pure']."' onclick='javascript: if (!confirm(\"".__('All the modules that are using this plugin will be deleted').'. '.__('Are you sure?')."\")) return false;'>".html_print_image( + 'images/cross.png', + true, + [ + 'border' => '0', + 'class' => 'invert_filter', + ] + ).'</a>'; if (is_metaconsole()) { - echo "   <a href='index.php?sec=$sec&sec2=godmode/servers/plugin&tab=$tab&deploy_plugin=".$row['id'].'&tab=plugins&pure='.$config['pure']."'>".html_print_image('images/deploy.png', true, ['title' => __('Deploy'), 'width' => '21 px']).'</a>  '; + echo "   <a href='index.php?sec=$sec&sec2=godmode/servers/plugin&tab=$tab&deploy_plugin=".$row['id'].'&tab=plugins&pure='.$config['pure']."'>".html_print_image( + 'images/deploy.png', + true, + [ + 'title' => __('Deploy'), + 'width' => '21 px', + ] + ).'</a>  '; } echo '</td>'; @@ -1064,11 +1110,11 @@ if (($create != '') || ($view != '')) { echo "<form name=plugin method='post' action='index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&create=1&pure=".$config['pure']."'>"; echo "<input name='crtbutton' type='submit' class='sub next' value='".__('Add')."'>"; echo '</td></tr></table>'; - echo '<div id="deploy_messages" style="display: none">'; + echo '<div id="deploy_messages" class="invisible">'; } // The '%s' will be replaced in the javascript code of the function 'show_locked_dialog' - echo "<div id='dialog_locked' title='".__('List of modules and components created by "%s" ')."' style='display: none; text-align: left;'>"; + echo "<div id='dialog_locked' title='".__('List of modules and components created by "%s" ')."' class='invisible left'>"; echo '</div>'; enterprise_hook('close_meta_frame'); diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index d17d773b1d..4a7323fc8f 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -115,7 +115,7 @@ foreach ($servers as $server) { } // Type - $data[2] = '<span style="white-space:nowrap;">'.$server['img']; + $data[2] = '<span class="nowrap">'.$server['img']; if ($server['master'] == $master) { $data[2] .= ui_print_help_tip(__('This is a master server'), true); } @@ -124,7 +124,6 @@ foreach ($servers as $server) { $data[2] .= html_print_image('images/star.png', true, ['title' => __('Exec server enabled')]); } - // $data[2] .= '</span> <span style="font-size:8px;"> v' .. '</span>'; switch ($server['type']) { case 'snmp': case 'event': @@ -144,7 +143,7 @@ foreach ($servers as $server) { default: $data[3] = $server['version']; $data[4] = $server['modules'].' '.__('of').' '.$server['modules_total']; - $data[5] = '<span style="white-space:nowrap;">'.$server['lag_txt'].'</span>'; + $data[5] = '<span class="nowrap">'.$server['lag_txt'].'</span>'; break; } @@ -182,6 +181,8 @@ foreach ($servers as $server) { [ 'title' => __('Manage Discovery tasks'), 'style' => 'width:21px;height:21px;', + 'class' => 'invert_filter', + ] ); $data[8] .= '</a>'; @@ -192,7 +193,10 @@ foreach ($servers as $server) { $data[8] .= html_print_image( 'images/target.png', true, - ['title' => __('Reset module status and fired alert counts')] + [ + 'title' => __('Reset module status and fired alert counts'), + 'class' => 'invert_filter', + ] ); $data[8] .= '</a>'; } else if ($server['type'] == 'enterprise snmp') { @@ -200,7 +204,10 @@ foreach ($servers as $server) { $data[8] .= html_print_image( 'images/target.png', true, - ['title' => __('Claim back SNMP modules')] + [ + 'title' => __('Claim back SNMP modules'), + 'class' => 'invert_filter', + ] ); $data[8] .= '</a>'; } @@ -209,7 +216,10 @@ foreach ($servers as $server) { $data[8] .= html_print_image( 'images/config.png', true, - ['title' => __('Edit')] + [ + 'title' => __('Edit'), + 'class' => 'invert_filter', + ] ); $data[8] .= '</a>'; @@ -218,7 +228,10 @@ foreach ($servers as $server) { $data[8] .= html_print_image( 'images/remote_configuration.png', true, - ['title' => __('Remote configuration')] + [ + 'title' => __('Remote configuration'), + 'class' => 'invert_filter', + ] ); $data[8] .= '</a>'; $names_servers[$safe_server_name] = false; @@ -231,6 +244,7 @@ foreach ($servers as $server) { [ 'title' => __('Delete'), 'onclick' => "if (! confirm ('".__('Modules run by this server will stop working. Do you want to continue?')."')) return false", + 'class' => 'invert_filter', ] ); $data[8] .= '</a>'; diff --git a/pandora_console/godmode/setup/gis.php b/pandora_console/godmode/setup/gis.php index 859f5d90b8..9f8ed7eee0 100755 --- a/pandora_console/godmode/setup/gis.php +++ b/pandora_console/godmode/setup/gis.php @@ -80,7 +80,7 @@ if ($mapsConnections !== false) { '<a href="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2&action=edit_connection_map&id_connection_map='.$mapsConnection['id_tmap_connection'].'">'.$mapsConnection['conection_name'].'</a>', ui_print_group_icon($mapsConnection['group_id'], true), '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&section=gis&id_connection_map='.$mapsConnection['id_tmap_connection'].'&action=delete_connection" - onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a>', + onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>', ]; $table->cellclass[][2] = 'action_buttons'; } diff --git a/pandora_console/godmode/setup/gis_step_2.php b/pandora_console/godmode/setup/gis_step_2.php index cd429ff99b..ff1b110b1c 100644 --- a/pandora_console/godmode/setup/gis_step_2.php +++ b/pandora_console/godmode/setup/gis_step_2.php @@ -27,7 +27,14 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user require_once 'include/functions_gis.php'; $buttons['gis'] = [ - 'text' => '<a href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=gis').'">'.html_print_image('images/list.png', true, ['title' => __('GIS Maps connections')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=gis').'">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('GIS Maps connections'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; $action = get_parameter('action', 'create_connection_map'); @@ -272,84 +279,207 @@ if ($mapConnectionData != null) { } // Open Street Map Connection. -$optionsConnectionOSMTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">'.'<tr class="row_0">'.'<td>'.htmlentities(__('Tile Server URL'), ENT_QUOTES, 'UTF-8').':</td>'.'<td><input id="type" type="hidden" name="type" value="OSM" />'.html_print_input_text('url', $mapConnectionDataUrl, '', 45, 90, true).'</td>'.'</tr>'.'</table>'; +$optionsConnectionOSMTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">'.'<tr class="row_0">'.'<td>'.htmlentities( + __('Tile Server URL'), + ENT_QUOTES, + 'UTF-8' +).':</td>'.'<td><input id="type" type="hidden" name="type" value="OSM" />'.html_print_input_text( + 'url', + $mapConnectionDataUrl, + '', + 45, + 90, + true +).'</td>'.'</tr>'.'</table>'; -// Google Maps Connection. -$gmaps_types['G_PHYSICAL_MAP'] = __('Google Physical'); -$gmaps_types['G_HYBRID_MAP'] = __('Google Hybrid'); -$gmaps_types['G_SATELITE_MAP'] = __('Google Satelite'); -// TODO: Use label tags for the forms. -$optionsConnectionGmapTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="90%">'.'<tr class="row_0">'.'<td>'.__('Google Map Type').':</td>'.'<td><input id="type" type="hidden" name="type" value="Gmap" />'.trim(html_print_select($gmaps_types, 'gmap_type', $gmap_type, '', '', 0, true)).'</td>'.'</tr>'.'<tr class="row_2">'.'<td>'.__('Google Maps Key').':</td>'.'</tr>'.'<tr class="row_3">'.'<td colspan="2">'.html_print_input_text('gmap_key', $gmap_key, '', 90, 128, true).'</td>'.'</tr>'.'</table>'; -// Image Map Connection. -$optionsConnectionImageTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">'.'<tr class="row_0">'.'<td>'.__('Image URL').':</td>'.'<td colspan="3"><input id="type" type="hidden" name="type" value="Static_Image" />'.html_print_input_text('url', $mapConnectionDataUrl, '', 45, 90, true).'</td>'.'</tr>'.'<tr class="row_1">'.'<td colspan="4"><strong>'.__('Corners of the area of the image').':</strong></td>'.'</tr>'.'<tr class="row_2">'.'<td>'.__('Left').':</td>'.'<td>'.html_print_input_text('bb_left', $bb_left, '', 25, 25, true).'</td>'.'<td>'.__('Bottom').':</td>'.'<td>'.html_print_input_text('bb_bottom', $bb_bottom, '', 25, 25, true).'</td>'.'</tr>'.'<tr class="row_3">'.'<td>'.__('Right').':</td>'.'<td>'.html_print_input_text('bb_right', $bb_right, '', 25, 25, true).'</td>'.'<td>'.__('Top').':</td>'.'<td>'.html_print_input_text('bb_top', $bb_top, '', 25, 25, true).'</td>'.'</tr>'.'<tr class="row_4">'.'<td colspan="4"><strong>'.__('Image Size').':</strong></td>'.'</tr>'.'<tr class="row_5">'.'<td>'.__('Width').':</td>'.'<td>'.html_print_input_text('image_width', $image_width, '', 25, 25, true).'</td>'.'<td>'.__('Height').':</td>'.'<td>'.html_print_input_text('image_height', $image_height, '', 25, 25, true).'</td>'.'</tr>'.'</table>'; + // Google Maps Connection. + $gmaps_types['G_PHYSICAL_MAP'] = __('Google Physical'); + $gmaps_types['G_HYBRID_MAP'] = __('Google Hybrid'); + $gmaps_types['G_SATELITE_MAP'] = __('Google Satelite'); + // TODO: Use label tags for the forms. + $optionsConnectionGmapTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="90%">'.'<tr class="row_0">'.'<td>'.__('Google Map Type').':</td>'.'<td><input id="type" type="hidden" name="type" value="Gmap" />'.trim( + html_print_select( + $gmaps_types, + 'gmap_type', + $gmap_type, + '', + '', + 0, + true + ) + ).'</td>'.'</tr>'.'<tr class="row_2">'.'<td>'.__('Google Maps Key').':</td>'.'</tr>'.'<tr class="row_3">'.'<td colspan="2">'.html_print_input_text( + 'gmap_key', + $gmap_key, + '', + 90, + 128, + true + ).'</td>'.'</tr>'.'</table>'; + // Image Map Connection. + $optionsConnectionImageTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">'.'<tr class="row_0">'.'<td>'.__('Image URL').':</td>'.'<td colspan="3"><input id="type" type="hidden" name="type" value="Static_Image" />'.html_print_input_text( + 'url', + $mapConnectionDataUrl, + '', + 45, + 90, + true + ).'</td>'.'</tr>'.'<tr class="row_1">'.'<td colspan="4"><strong>'.__('Corners of the area of the image').':</strong></td>'.'</tr>'.'<tr class="row_2">'.'<td>'.__('Left').':</td>'.'<td>'.html_print_input_text( + 'bb_left', + $bb_left, + '', + 25, + 25, + true + ).'</td>'.'<td>'.__('Bottom').':</td>'.'<td>'.html_print_input_text( + 'bb_bottom', + $bb_bottom, + '', + 25, + 25, + true + ).'</td>'.'</tr>'.'<tr class="row_3">'.'<td>'.__('Right').':</td>'.'<td>'.html_print_input_text( + 'bb_right', + $bb_right, + '', + 25, + 25, + true + ).'</td>'.'<td>'.__('Top').':</td>'.'<td>'.html_print_input_text( + 'bb_top', + $bb_top, + '', + 25, + 25, + true + ).'</td>'.'</tr>'.'<tr class="row_4">'.'<td colspan="4"><strong>'.__('Image Size').':</strong></td>'.'</tr>'.'<tr class="row_5">'.'<td>'.__('Width').':</td>'.'<td>'.html_print_input_text('image_width', $image_width, '', 25, 25, true).'</td>'.'<td>'.__('Height').':</td>'.'<td>'.html_print_input_text('image_height', $image_height, '', 25, 25, true).'</td>'.'</tr>'.'</table>'; -// WMS Server Connection. -$optionsConnectionWMSTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">'.'<tr class="row_0">'.'<td>'.__('WMS Server URL').'</td>'.'<td>'.'<input id="type" type="hidden" name="type" value="WMS" />'.html_print_input_text('url', $mapConnectionDataUrl, '', 90, 255, true).'</td>'.'</tr>'.'<tr class="row_1">'.'<td>'.__('Layers').'</td>'.'<td>'.html_print_input_text('layers', $layers, '', 90, 255, true).'</td>'.'</tr>'.'</table>'; + // WMS Server Connection. + $optionsConnectionWMSTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">'.'<tr class="row_0">'.'<td>'.__('WMS Server URL').'</td>'.'<td>'.'<input id="type" type="hidden" name="type" value="WMS" />'.html_print_input_text('url', $mapConnectionDataUrl, '', 90, 255, true).'</td>'.'</tr>'.'<tr class="row_1">'.'<td>'.__('Layers').'</td>'.'<td>'.html_print_input_text('layers', $layers, '', 90, 255, true).'</td>'.'</tr>'.'</table>'; -if ($mapConnectionData != null) { - switch ($mapConnection_type) { - case 'OSM': - $optionsConnectionTypeTable = $optionsConnectionOSMTable; - break; + if ($mapConnectionData != null) { + switch ($mapConnection_type) { + case 'OSM': + $optionsConnectionTypeTable = $optionsConnectionOSMTable; + break; - case 'Gmap': - $optionsConnectionTypeTable = $optionsConnectionGmapTable; - break; + case 'Gmap': + $optionsConnectionTypeTable = $optionsConnectionGmapTable; + break; - case 'Static_Image': - $optionsConnectionTypeTable = $optionsConnectionImageTable; - break; + case 'Static_Image': + $optionsConnectionTypeTable = $optionsConnectionImageTable; + break; - case 'WMS': - $optionsConnectionTypeTable = $optionsConnectionWMSTable; - break; + case 'WMS': + $optionsConnectionTypeTable = $optionsConnectionWMSTable; + break; - default: - // Default. - break; + default: + // Default. + break; + } } -} -echo "<div id='form_map_connection_type'>".$optionsConnectionTypeTable.'</div>'; + echo "<div id='form_map_connection_type'>".$optionsConnectionTypeTable.'</div>'; -echo '<h4>'.__('Preview to select the center of the map and the default position of an agent without gis data').'</h4><br>'; -html_print_button(__('Load preview map'), 'button_refresh', false, 'refreshMapView();', 'class="sub"'); -echo '<br /><br />'; -echo "<div id='map' style='width: 300px; height: 300px; border: 1px solid black; float: left'></div>"; + echo '<h4>'.__('Preview to select the center of the map and the default position of an agent without gis data').'</h4><br>'; + html_print_button(__('Load preview map'), 'button_refresh', false, 'refreshMapView();', 'class="sub"'); + echo '<br /><br />'; + echo "<div id='map' class='map_gis_step2'></div>"; -$table->width = '60%'; -$table->data = []; + $table->width = '60%'; + $table->data = []; -// $table->colspan[0][3] = 3; -$table->data[0][0] = ''; -$table->data[0][1] = __('Map Center'); -$table->data[0][2] = __('Default position for agents without GIS data'); + // $table->colspan[0][3] = 3; + $table->data[0][0] = ''; + $table->data[0][1] = __('Map Center'); + $table->data[0][2] = __('Default position for agents without GIS data'); -$table->data[1][0] = __('Change in the map'); -$table->data[1][1] = html_print_radio_button_extended('radio_button', 1, '', 1, false, 'changeSetManualPosition(true, false)', '', true); -$table->data[1][2] = html_print_radio_button_extended('radio_button', 2, '', 0, false, 'changeSetManualPosition(false, true)', '', true); + $table->data[1][0] = __('Change in the map'); + $table->data[1][1] = html_print_radio_button_extended( + 'radio_button', + 1, + '', + 1, + false, + 'changeSetManualPosition(true, false)', + '', + true + ); + $table->data[1][2] = html_print_radio_button_extended( + 'radio_button', + 2, + '', + 0, + false, + 'changeSetManualPosition(false, true)', + '', + true + ); -$table->data[2][0] = __('Latitude'); -$table->data[2][1] = html_print_input_text('center_latitude', $mapConnection_centerLatitude, '', 10, 10, true); -$table->data[2][2] = html_print_input_text('default_latitude', $mapConnection_defaultLatitude, '', 10, 10, true); + $table->data[2][0] = __('Latitude'); + $table->data[2][1] = html_print_input_text( + 'center_latitude', + $mapConnection_centerLatitude, + '', + 10, + 10, + true + ); + $table->data[2][2] = html_print_input_text( + 'default_latitude', + $mapConnection_defaultLatitude, + '', + 10, + 10, + true + ); -$table->data[3][0] = __('Longitude'); -$table->data[3][1] = html_print_input_text('center_longitude', $mapConnection_centerLongitude, '', 10, 10, true); -$table->data[3][2] = html_print_input_text('default_longitude', $mapConnection_defaultLongitude, '', 10, 10, true); + $table->data[3][0] = __('Longitude'); + $table->data[3][1] = html_print_input_text( + 'center_longitude', + $mapConnection_centerLongitude, + '', + 10, + 10, + true + ); + $table->data[3][2] = html_print_input_text( + 'default_longitude', + $mapConnection_defaultLongitude, + '', + 10, + 10, + true + ); -$table->data[4][0] = __('Altitude'); -$table->data[4][1] = html_print_input_text('center_altitude', $mapConnection_centerAltitude, '', 10, 10, true); -$table->data[4][2] = html_print_input_text('default_altitude', $mapConnection_defaultAltitude, '', 10, 10, true); -html_print_table($table); + $table->data[4][0] = __('Altitude'); + $table->data[4][1] = html_print_input_text( + 'center_altitude', + $mapConnection_centerAltitude, + '', + 10, + 10, + true + ); + $table->data[4][2] = html_print_input_text( + 'default_altitude', + $mapConnection_defaultAltitude, + '', + 10, + 10, + true + ); + html_print_table($table); -echo '<div class="action-buttons" style="width: 90%; float: left;">'; -html_print_submit_button(__('Save'), '', false, 'class="sub save wand"'); -echo '</div>'; -echo '</form>'; + echo '<div class="action-buttons w90p left">'; + html_print_submit_button(__('Save'), '', false, 'class="sub save wand"'); + echo '</div>'; + echo '</form>'; -ui_require_javascript_file('OpenLayers/OpenLayers'); -ui_require_javascript_file('openlayers.pandora'); -?> + ui_require_javascript_file('OpenLayers/OpenLayers'); + ui_require_javascript_file('openlayers.pandora'); + ?> <script type="text/javascript"> var setCenter = true; var centerPoint = null; @@ -386,7 +516,7 @@ function changePoints(e) { center_longitude = $('input[name=center_longitude]').val(lonlat.lon); if (centerPoint == null) { - centerPoint = js_addPointExtent('temp_layer', '<?php echo __('Center'); ?>', lonlat.lon, lonlat.lat, 'images/dot_green.png', 11, 11, 'center', ''); + centerPoint = js_addPointExtent('temp_layer', '<?php echo __('Center'); ?>', lonlat.lon, lonlat.lat, <?php echo 'images/dot_green.png'; ?>, 11, 11, 'center', ''); } else { //return to no-standar the proyection for to move @@ -400,7 +530,7 @@ function changePoints(e) { center_longitude = $('input[name=default_longitude]').val(lonlat.lon); if (GISDefaultPositionPoint == null) { - GISDefaultPositionPoint = js_addPointExtent('temp_layer', '<?php echo __('Default'); ?>', lonlat.lon, lonlat.lat, 'images/dot_red.png', 11, 11, 'default', ''); + GISDefaultPositionPoint = js_addPointExtent('temp_layer', '<?php echo __('Default'); ?>', lonlat.lon, lonlat.lat, <?php echo 'images/dot_red.png'; ?>, 11, 11, 'default', ''); } else { //return to no-standar the proyection for to move diff --git a/pandora_console/godmode/setup/license.php b/pandora_console/godmode/setup/license.php index 97854f86cf..d16759ff84 100644 --- a/pandora_console/godmode/setup/license.php +++ b/pandora_console/godmode/setup/license.php @@ -105,7 +105,7 @@ if (is_metaconsole()) { $table->data = []; $table->data[0][0] = '<strong>'.__('Customer key').'</strong>'; -$table->data[0][1] = html_print_textarea('keys[customer_key]', 10, 255, $settings->customer_key, 'style="height:50px; width:450px;"', true); +$table->data[0][1] = html_print_textarea('keys[customer_key]', 10, 255, $settings->customer_key, 'class="height_50px w450px"', true); $table->data[1][0] = '<strong>'.__($license['expiry_caption']).'</strong>'; $table->data[1][1] = html_print_input_text('expires', $license['expiry_date'], '', 10, 255, true, true); @@ -157,7 +157,7 @@ if (is_metaconsole()) { if (enterprise_hook('print_activate_licence_dialog') == ENTERPRISE_NOT_HOOK) { echo '</form>'; - echo '<div id="code_license_dialog" style="display: none; text-align: left;" title="'.__('Request new license').'">'; + echo '<div id="code_license_dialog" class="invisible left" title="'.__('Request new license').'">'; echo '<div id="logo">'; html_print_image(ui_get_custom_header_logo(true)); echo '</div>'; diff --git a/pandora_console/godmode/setup/links.php b/pandora_console/godmode/setup/links.php index 975202c6f5..ffeeb7fb23 100644 --- a/pandora_console/godmode/setup/links.php +++ b/pandora_console/godmode/setup/links.php @@ -115,7 +115,7 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) { echo '</tr><tr> <td class="datos2">'.__('Link').'</td> <td class="datos2"> - <input type="text" name="link" size="150" value="'.$link.'"></td>'; + <input type="text" name="link" size="50" value="'.$link.'"></td>'; echo '</tr>'; echo '</table>'; echo "<table width='100%'>"; @@ -137,7 +137,7 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) { if (empty($rows)) { ui_print_info_message(['no_close' => true, 'message' => __("There isn't links") ]); } else { - echo "<table cellpadding='0' cellspacing='0' class='info_table' style='width:100%'>"; + echo "<table cellpadding='0' cellspacing='0' class='info_table w100p'>"; echo '<thead><tr>'; echo "<th width='180px'>".__('Link name').'</th>'; echo "<th width='10px'>".__('Delete').'</th>'; @@ -154,7 +154,11 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) { } echo "<tr><td class='$tdcolor'><b><a href='index.php?sec=gsetup&sec2=godmode/setup/links&form_edit=1&id_link=".$row['id_link']."'>".$row['name'].'</a></b></td>'; - echo '<td class="'.$tdcolor.' action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row['id_link'].'&borrar='.$row['id_link'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a></td></tr>'; + echo '<td class="'.$tdcolor.' action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row['id_link'].'&borrar='.$row['id_link'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image( + 'images/cross.png', + true, + ['class' => 'invert_filter'] + ).'</a></td></tr>'; } echo '</table>'; diff --git a/pandora_console/godmode/setup/news.php b/pandora_console/godmode/setup/news.php index dcabcf5285..52f7019dc4 100644 --- a/pandora_console/godmode/setup/news.php +++ b/pandora_console/godmode/setup/news.php @@ -189,10 +189,10 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) { $data[1] .= '</div>'; $data[2] = __('Modal screen').'<br>'; - $data[2] .= html_print_checkbox_extended('modal', 1, $modal, false, '', 'style="margin-top: 5px;margin-bottom: 7px;"', true); + $data[2] .= html_print_checkbox_extended('modal', 1, $modal, false, '', 'class="mrgn_top_5 mrg_btt_7"', true); $data[3] = __('Expire').'<br>'; - $data[3] .= html_print_checkbox_extended('expire', 1, $expire, false, '', 'style="margin-top: 5px;margin-bottom: 7px;"', true); + $data[3] .= html_print_checkbox_extended('expire', 1, $expire, false, '', 'class="mrgn_top_5 mrg_btt_7"', true); $data[4] = __('Expiration').'<br>'; $data[4] .= html_print_input_text('expire_date', $expire_date, '', 12, 10, true).' '; @@ -287,7 +287,7 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) { echo "<td class='$tdcolor'>".__('No').'</b></td>'; } - echo '<td class="'.$tdcolor.' action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a></td></tr>'; + echo '<td class="'.$tdcolor.' action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter']).'</a></td></tr>'; } echo '</table>'; diff --git a/pandora_console/godmode/setup/os.list.php b/pandora_console/godmode/setup/os.list.php index 7e82aff283..f060f94205 100644 --- a/pandora_console/godmode/setup/os.list.php +++ b/pandora_console/godmode/setup/os.list.php @@ -72,7 +72,7 @@ foreach ($osList as $os) { if (is_metaconsole()) { $data[] = '<a href="index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&action=delete&tab2=list&id_os='.$os['id_os'].'">'.html_print_image('images/cross.png', true).'</a>'; } else { - $data[] = '<a href="index.php?sec=gsetup&sec2=godmode/setup/os&action=delete&tab=list&id_os='.$os['id_os'].'">'.html_print_image('images/cross.png', true).'</a>'; + $data[] = '<a href="index.php?sec=gsetup&sec2=godmode/setup/os&action=delete&tab=list&id_os='.$os['id_os'].'">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>'; } } else { // The original icons of pandora don't delete. diff --git a/pandora_console/godmode/setup/os.php b/pandora_console/godmode/setup/os.php index 518a4956bf..44888465bf 100644 --- a/pandora_console/godmode/setup/os.php +++ b/pandora_console/godmode/setup/os.php @@ -159,11 +159,25 @@ switch ($action) { $buttons = [ 'list' => [ 'active' => false, - 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/setup/os&tab=list">'.html_print_image('images/list.png', true, ['title' => __('List OS')]).'</a>', + 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/setup/os&tab=list">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('List OS'), + 'class' => 'invert_filter', + ] + ).'</a>', ], 'builder' => [ 'active' => false, - 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/setup/os&tab=builder">'.html_print_image('images/builder.png', true, ['title' => __('Builder OS')]).'</a>', + 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/setup/os&tab=builder">'.html_print_image( + 'images/builder.png', + true, + [ + 'title' => __('Builder OS'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index e77d314f4c..1e3e5c79f0 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -86,7 +86,15 @@ $buttons = []; // Draws header. $buttons['general'] = [ 'active' => false, - 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=general').'">'.html_print_image('images/gm_setup.png', true, ['title' => __('General')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=general').'">'.html_print_image( + 'images/setup.png', + true, + [ + 'title' => __('General'), + 'class' => 'invert_filter', + + ] + ).'</a>', ]; if (enterprise_installed()) { @@ -95,60 +103,130 @@ if (enterprise_installed()) { $buttons['auth'] = [ 'active' => false, - 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=auth').'">'.html_print_image('images/key.png', true, ['title' => __('Authentication')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=auth').'">'.html_print_image( + 'images/key.png', + true, + [ + 'title' => __('Authentication'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; $buttons['perf'] = [ 'active' => false, - 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=perf').'">'.html_print_image('images/performance.png', true, ['title' => __('Performance')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=perf').'">'.html_print_image( + 'images/performance.png', + true, + [ + 'title' => __('Performance'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; $buttons['vis'] = [ 'active' => false, - 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=vis').'">'.html_print_image('images/chart.png', true, ['title' => __('Visual styles')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=vis').'">'.html_print_image( + 'images/chart.png', + true, + [ + 'title' => __('Visual styles'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; if (check_acl($config['id_user'], 0, 'AW')) { if ($config['activate_netflow']) { $buttons['net'] = [ 'active' => false, - 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=net').'">'.html_print_image('images/op_netflow.png', true, ['title' => __('Netflow')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=net').'">'.html_print_image( + 'images/op_netflow.png', + true, + [ + 'title' => __('Netflow'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; } } $buttons['integria'] = [ 'active' => false, - 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=integria').'">'.html_print_image('images/integria.png', true, ['title' => __('Integria IMS')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=integria').'">'.html_print_image( + 'images/integria.png', + true, + [ + 'title' => __('Integria IMS'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; $buttons['ehorus'] = [ 'active' => false, - 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=ehorus').'">'.html_print_image('images/ehorus/ehorus.png', true, ['title' => __('eHorus')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=ehorus').'">'.html_print_image( + 'images/ehorus/ehorus.png', + true, + [ + 'title' => __('eHorus'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; if (check_acl($config['id_user'], 0, 'PM') && enterprise_installed()) { $buttons['module_library'] = [ 'active' => false, - 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=module_library').'">'.html_print_image('images/library.png', true, ['title' => __('Module Library')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=module_library').'">'.html_print_image( + 'images/library.png', + true, + [ + 'title' => __('Module Library'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; } // FIXME: Not definitive icon $buttons['notifications'] = [ 'active' => false, - 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=notifications').'">'.html_print_image('images/alerts_template.png', true, ['title' => __('Notifications')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=notifications').'">'.html_print_image( + 'images/alerts_template.png', + true, + [ + 'title' => __('Notifications'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; $buttons['websocket_engine'] = [ 'active' => false, - 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=websocket_engine').'">'.html_print_image('images/websocket_small.png', true, ['title' => __('Websocket engine')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=websocket_engine').'">'.html_print_image( + 'images/websocket_small.png', + true, + [ + 'title' => __('Websocket engine'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; if ($config['activate_gis']) { $buttons['gis'] = [ 'active' => false, - 'text' => '<a href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=gis').'">'.html_print_image('images/gis_tab.png', true, ['title' => __('GIS Map connection')]).'</a>', + 'text' => '<a href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=gis').'">'.html_print_image( + 'images/gis_tab.png', + true, + [ + 'title' => __('GIS Map connection'), + 'class' => 'invert_filter', + ] + ).'</a>', ]; } diff --git a/pandora_console/godmode/setup/setup_ehorus.php b/pandora_console/godmode/setup/setup_ehorus.php index 819e780cb2..43acb09495 100644 --- a/pandora_console/godmode/setup/setup_ehorus.php +++ b/pandora_console/godmode/setup/setup_ehorus.php @@ -107,19 +107,19 @@ $table_remote->data['ehorus_req_timeout'] = $row; $row = []; $row['name'] = __('Test'); $row['control'] = html_print_button(__('Start'), 'test-ehorus', false, '', 'class="sub next"', true); -$row['control'] .= '<span id="test-ehorus-spinner" style="display:none;"> '.html_print_image('images/spinner.gif', true).'</span>'; -$row['control'] .= '<span id="test-ehorus-success" style="display:none;"> '.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>'; -$row['control'] .= '<span id="test-ehorus-failure" style="display:none;"> '.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>'; -$row['control'] .= ' <span id="test-ehorus-message" style="display:none;"></span>'; +$row['control'] .= '<span id="test-ehorus-spinner" class="invisible"> '.html_print_image('images/spinner.gif', true).'</span>'; +$row['control'] .= '<span id="test-ehorus-success" class="invisible"> '.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>'; +$row['control'] .= '<span id="test-ehorus-failure" class="invisible"> '.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>'; +$row['control'] .= ' <span id="test-ehorus-message" class="invisible"></span>'; $table_remote->data['ehorus_test'] = $row; // Print. -echo '<div style="text-align: center; padding-bottom: 20px;">'; +echo '<div class="center pdd_b_20px">'; echo '<a target="_blank" rel="noopener noreferrer" href="http://ehorus.com">'; html_print_image('include/ehorus/images/ehorus-logo-grey.png'); echo '</a>'; echo '<br />'; -echo '<div style="font-family: lato, "Helvetica Neue", Helvetica, Arial, sans-serif; color: #515151;">'; +echo '<div class="ehorus_title">'; echo __('Remote Management System'); echo '</div>'; echo '<a target="_blank" rel="noopener noreferrer" href="https://ehorus.com">'; diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index 9c9e5baad2..ad8e88194e 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -166,8 +166,8 @@ $table->data[$i++][1] = html_print_checkbox_switch( true ); -echo "<div id='dialog' title='".__('Enforce https Information')."' style='display:none;'>"; -echo "<p style='text-align: center;'>".__('If SSL is not properly configured you will lose access to ').get_product_name().__(' Console').'</p>'; +echo "<div id='dialog' title='".__('Enforce https Information')."' class='invisible'>"; +echo "<p class='center'>".__('If SSL is not properly configured you will lose access to ').get_product_name().__(' Console').'</p>'; echo '</div>'; $table->data[$i][0] = __('Enforce https'); @@ -229,7 +229,7 @@ $table->data[$i++][1] = html_print_textarea( 2, 25, $list_ACL_IPs_for_API, - 'style="height: 50px; width: 300px"', + 'class="height_50px w300px"', true ); @@ -324,7 +324,10 @@ $table->data[$i][1] = html_print_input_text_extended( $table->data[$i][1] .= '<a id="change_timezone">'.html_print_image( 'images/pencil.png', true, - ['title' => __('Change timezone')] + [ + 'title' => __('Change timezone'), + 'class' => 'invert_filter', + ] ).'</a>'; $table->data[$i][1] .= '  '.html_print_select( $zone_name, @@ -364,6 +367,7 @@ $table->data[$i][1] .= ' <a href="javascript: toggleButton(\'alert\');">'.html_p 'style' => 'vertical-align: middle;', 'width' => '16', 'title' => __('Play sound'), + 'class' => 'invert_filter', ] ).'</a>'; $table->data[$i++][1] .= '<div id="layer_sound_alert"></div>'; @@ -386,6 +390,7 @@ $table->data[$i][1] .= ' <a href="javascript: toggleButton(\'critical\');">'.htm 'style' => 'vertical-align: middle;', 'width' => '16', 'title' => __('Play sound'), + 'class' => 'invert_filter', ] ).'</a>'; $table->data[$i++][1] .= '<div id="layer_sound_critical"></div>'; @@ -408,6 +413,7 @@ $table->data[$i][1] .= ' <a href="javascript: toggleButton(\'warning\');">'.html 'style' => 'vertical-align: middle;', 'width' => '16', 'title' => __('Play sound'), + 'class' => 'invert_filter', ] ).'</a>'; $table->data[$i++][1] .= '<div id="layer_sound_warning"></div>'; @@ -432,8 +438,8 @@ $table->data[$i++][1] = html_print_switch( echo "<div id='force_public_url_dialog' title='".__( 'Enforce public URL usage information' -)."' style='display:none;'>"; -echo "<p style='text-align: center;'>".__('If public URL is not properly configured you will lose access to ').get_product_name().__(' Console').'</p>'; +)."' class='invisible'>"; +echo "<p class='center'>".__('If public URL is not properly configured you will lose access to ').get_product_name().__(' Console').'</p>'; echo '</div>'; $table->data[$i][0] = __('Public URL host exclusions'); @@ -442,7 +448,7 @@ $table->data[$i++][1] = html_print_textarea( 2, 25, $config['public_url_exclusions'], - 'style="height: 50px; width: 300px"', + 'class="height_50px w300px"', true ); @@ -759,9 +765,9 @@ echo '<legend>'.__('Mail configuration').'</legend>'; '', 'class="sub next"', true - ).'  <span id="email_test_sent_message" style="display:none;">Email sent</span><span id="email_test_failure_message" style="display:none;">Email could not be sent</span>'; + ).'  <span id="email_test_sent_message" class="invisible">Email sent</span><span id="email_test_failure_message" class=invisible">Email could not be sent</span>'; - echo '<div id="email_test_'.$id.'" title="'.__('Check mail configuration').'" style="display:none">'.html_print_table($table_mail_test, true).'</div>'; + echo '<div id="email_test_'.$id.'" title="'.__('Check mail configuration').'" class="invisible">'.html_print_table($table_mail_test, true).'</div>'; } diff --git a/pandora_console/godmode/setup/setup_integria.php b/pandora_console/godmode/setup/setup_integria.php index 10d1afe418..9dbd1ec521 100644 --- a/pandora_console/godmode/setup/setup_integria.php +++ b/pandora_console/godmode/setup/setup_integria.php @@ -493,19 +493,19 @@ $table_cr_settings->data['custom_response_incident_status'] = $row; $row = []; $row['name'] = __('Test'); $row['control'] = html_print_button(__('Start'), 'test-integria', false, '', 'class="sub next"', true); -$row['control'] .= '<span id="test-integria-spinner" style="display:none;"> '.html_print_image('images/spinner.gif', true).'</span>'; -$row['control'] .= '<span id="test-integria-success" style="display:none;"> '.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>'; -$row['control'] .= '<span id="test-integria-failure" style="display:none;"> '.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>'; -$row['control'] .= ' <span id="test-integria-message" style="display:none;"></span>'; +$row['control'] .= '<span id="test-integria-spinner" class="invisible"> '.html_print_image('images/spinner.gif', true).'</span>'; +$row['control'] .= '<span id="test-integria-success" class="invisible"> '.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>'; +$row['control'] .= '<span id="test-integria-failure" class="invisible"> '.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>'; +$row['control'] .= ' <span id="test-integria-message" class="invisible"></span>'; $table_remote->data['integria_test'] = $row; // Print. -echo '<div style="text-align: center; padding-bottom: 20px;">'; +echo '<div class="center pdd_b_20px">'; echo '<a target="_blank" rel="noopener noreferrer" href="http://integriaims.com">'; html_print_image('images/integria_logo.png'); echo '</a>'; echo '<br />'; -echo '<div style="font-family: lato, "Helvetica Neue", Helvetica, Arial, sans-serif; color: #515151;">'; +echo '<div clsas="integria_title">'; echo __('Integria IMS'); echo '</div>'; echo '<a target="_blank" rel="noopener noreferrer" href="https://integriaims.com">'; diff --git a/pandora_console/godmode/setup/setup_netflow.php b/pandora_console/godmode/setup/setup_netflow.php index 4b63197855..33ceb5295f 100644 --- a/pandora_console/godmode/setup/setup_netflow.php +++ b/pandora_console/godmode/setup/setup_netflow.php @@ -75,7 +75,7 @@ echo '<form id="netflow_setup" method="post">'; html_print_table($table); // Update button. -echo '<div class="action-buttons" style="width:100%;">'; +echo '<div class="action-buttons w100p">'; html_print_input_hidden('update_config', 1); html_print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"'); echo '</div></form>'; diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index fdd49d1e1c..a311a0f5ea 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -131,18 +131,6 @@ $table_styles->style[0] = 'font-weight: bold;'; $table_styles->size[0] = '50%'; $table_styles->data = []; -$table_styles->data[$row][0] = __('Style template'); -$table_styles->data[$row][1] = html_print_select( - themes_get_css(), - 'style', - $config['style'].'.css', - '', - '', - '', - true -); -$row++; - $table_styles->data[$row][0] = __('Status icon set'); $iconsets['default'] = __('Colors'); $iconsets['faces'] = __('Faces'); @@ -1243,7 +1231,7 @@ $row++; 5, 15, io_safe_output($config['custom_report_front_header']), - 'style="width: 90%; height: 300px !important;"', + 'class="w90p height_300px"', true ); @@ -1266,7 +1254,7 @@ $row++; 15, 15, $custom_report_front_firstpage, - 'style="width: 90%; height: 300px !important;"', + 'class="w90p height_300px"', true ); @@ -1279,7 +1267,7 @@ $row++; 5, 15, io_safe_output($config['custom_report_front_footer']), - 'style="width: 90%; height: 300px !important;"', + 'class="w90p height_300px""', true ); @@ -1479,11 +1467,42 @@ $row++; ]; $table_other->data[$row][0] = __('CSV divider'); if ($config['csv_divider'] != ';' && $config['csv_divider'] != ',' && $config['csv_divider'] != '|') { - $table_other->data[$row][1] = html_print_input_text('csv_divider', $config['csv_divider'], '', 20, 255, true); - $table_other->data[$row][1] .= '<a id="csv_divider_custom" onclick="javascript: edit_csv_divider();">'.html_print_image('images/default_list.png', true, ['id' => 'select']).'</a>'; + $table_other->data[$row][1] = html_print_input_text( + 'csv_divider', + $config['csv_divider'], + '', + 20, + 255, + true + ); + $table_other->data[$row][1] .= '<a id="csv_divider_custom" onclick="javascript: edit_csv_divider();">'.html_print_image( + 'images/list.png', + true, + [ + 'id' => 'select', + 'class' => 'invert_filter', + ] + ).'</a>'; } else { - $table_other->data[$row][1] = html_print_select($common_dividers, 'csv_divider', $config['csv_divider'], '', '', '', true, false, false); - $table_other->data[$row][1] .= '<a id="csv_divider_custom" onclick="javascript: edit_csv_divider();">'.html_print_image('images/pencil.png', true, ['id' => 'pencil']).'</a>'; + $table_other->data[$row][1] = html_print_select( + $common_dividers, + 'csv_divider', + $config['csv_divider'], + '', + '', + '', + true, + false, + false + ); + $table_other->data[$row][1] .= '<a id="csv_divider_custom" onclick="javascript: edit_csv_divider();">'.html_print_image( + 'images/pencil.png', + true, + [ + 'id' => 'pencil', + 'class' => 'invert_filter', + ] + ).'</a>'; } $row++; diff --git a/pandora_console/godmode/setup/setup_websocket_engine.php b/pandora_console/godmode/setup/setup_websocket_engine.php index b0cced60b3..0422000120 100644 --- a/pandora_console/godmode/setup/setup_websocket_engine.php +++ b/pandora_console/godmode/setup/setup_websocket_engine.php @@ -84,7 +84,7 @@ if (function_exists('quickShellSettings') === true) { quickShellSettings(); } -echo '<div class="action-buttons" style="width: 100%;">'; +echo '<div class="action-buttons w100p">'; html_print_submit_button( __('Update'), 'update_button', diff --git a/pandora_console/godmode/setup/snmp_wizard.php b/pandora_console/godmode/setup/snmp_wizard.php index 62a61ee64c..278ec2d065 100644 --- a/pandora_console/godmode/setup/snmp_wizard.php +++ b/pandora_console/godmode/setup/snmp_wizard.php @@ -97,7 +97,7 @@ $table->data['editor'] = [ 'oid' => html_print_input_text('oid_editor', '', '', 40, 255, true), 'description' => html_print_input_text('description_editor', '', '', 40, 255, true), 'post_process' => html_print_input_text('post_process_editor', '', '', 20, 255, true), - 'op' => '<img class="loading" src="images/spinner.gif" style="display: none;" />'.'<a class="button_save_snmp" href="javascript: save_translation();">'.html_print_image('images/save_mc.png', true, ['title' => __('Save')]).'</a>'.'<a class="button_update_snmp" href="javascript: update_snmp();" style="display: none;">'.html_print_image('images/update.png', true, ['title' => __('Update')]).'</a>'.'<a class="cancel_button_snmp" href="javascript: cancel_snmp();" style="display: none;">'.html_print_image('images/cancel.png', true, ['title' => __('Cancel')]).'</a>', + 'op' => '<img class="loading invisible" src="'.'images/spinner.gif'.'" />'.'<a class="button_save_snmp" href="javascript: save_translation();">'.html_print_image('images/save_mc.png', true, ['title' => __('Save')]).'</a>'.'<a class="button_update_snmp invisible" href="javascript: update_snmp();">'.html_print_image('images/update.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>'.'<a class="cancel_button_snmp invisible" href="javascript: cancel_snmp();">'.html_print_image('images/cancel.png', true, ['title' => __('Cancel')]).'</a>', ]; @@ -107,7 +107,7 @@ html_print_table($table); function cell_op($oid='') { - return '<img class="loading" src="images/spinner.gif" style="display: none;" />'.'<a class="button_edit_snmp" href="javascript: edit_snmp(\''.$oid.'\');">'.html_print_image('images/cog.png', true, ['title' => __('Edit')]).'</a>'.'<a class="delete_button_snmp" href="javascript: delete_snmp(\''.$oid.'\');">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'; + return '<img class="loading invisible" src="'.'images/spinner.gif'.'" />'.'<a class="button_edit_snmp" href="javascript: edit_snmp(\''.$oid.'\');">'.html_print_image('images/cog.png', true, ['class' => 'invert_filter', 'title' => __('Edit')]).'</a>'.'<a class="delete_button_snmp" href="javascript: delete_snmp(\''.$oid.'\');">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'; } diff --git a/pandora_console/godmode/snmpconsole/snmp_alert.php b/pandora_console/godmode/snmpconsole/snmp_alert.php index 7ede6706c6..046c8a9366 100755 --- a/pandora_console/godmode/snmpconsole/snmp_alert.php +++ b/pandora_console/godmode/snmpconsole/snmp_alert.php @@ -797,11 +797,11 @@ if ($create_alert || $update_alert) { } // SNMP alert filters - echo '<table cellpadding="0" cellspacing="0" width="100%" class="databox filter" style="font-weight: bold">'; + echo '<table cellpadding="0" cellspacing="0" width="100%" class="databox filter bolder">'; // Description echo '<tr>'.'<td class="datos" valign="top">'.__('Description').'</td>'.'<td class="datos">'; - html_print_textarea('description', 3, 2, $description, 'style="width:400px;"'); + html_print_textarea('description', 3, 2, $description, 'class="w400px"'); echo '</td>'.'</tr>'; // echo '<tr><td class="datos"><b>' . __('Alert filters') . ui_print_help_icon("snmp_alert_filters", true) . '</b></td></tr>'; @@ -814,7 +814,7 @@ if ($create_alert || $update_alert) { echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Custom Value/OID'); echo '</td><td class="datos">'; - html_print_textarea('custom_value', 2, 2, $custom_value, 'style="width:400px;"'); + html_print_textarea('custom_value', 2, 2, $custom_value, 'class="w400px"'); echo '</td></tr>'; @@ -1029,13 +1029,6 @@ if ($create_alert || $update_alert) { html_print_input_text('custom_oid_data_20', $custom_oid_data_20, '', 60); echo '</td></tr>'; - // Button - // echo '<tr><td></td><td align="right">'; - // End table - // echo "</td></tr></table>"; - // Alert configuration - // echo '<table cellpadding="4" cellspacing="4" width="98%" class="databox_color" style="border:1px solid #A9A9A9;">'; - // echo '<tr><td class="datos"><b>' . __('Alert configuration') . ui_print_help_icon("snmp_alert_configuration", true) . '</b></td></tr>'; // Alert fields $al = [ 'al_field1' => $al_field1, @@ -1095,8 +1088,8 @@ if ($create_alert || $update_alert) { $fields[SECONDS_1WEEK] = human_time_description_raw(SECONDS_1WEEK); $fields[-1] = __('Other value'); - html_print_select($fields, 'time_threshold', $time_threshold, '', '', '0', false, false, false, '" style="margin-right:60px'); - echo '<div id="div-time_other" style="display:none">'; + html_print_select($fields, 'time_threshold', $time_threshold, '', '', '0', false, false, false, '" class="mrgn_right_60px'); + echo '<div id="div-time_other" class="invisible">'; html_print_input_text('time_other', 0, '', 6); echo ' '.__('seconds').'</div></td></tr>'; @@ -1154,7 +1147,7 @@ if ($create_alert || $update_alert) { echo '</td></tr>'; echo '</table>'; - echo "<table style='width:100%'>"; + echo "<table class='w100p'>"; echo '<tr><td></td><td align="right">'; if ($id_as > 0) { html_print_submit_button(__('Update'), 'submit', false, 'class="sub upd"', false); @@ -1397,7 +1390,7 @@ if ($create_alert || $update_alert) { } if (check_acl_restricted_all($config['id_user'], $row['id_group'], 'LW')) { - $data[8] = '<a href="index.php?'.'sec=snmpconsole&'.'sec2=godmode/snmpconsole/snmp_alert&'.'duplicate_alert=1&'.'id_alert_snmp='.$row['id_as'].'">'.html_print_image('images/copy.png', true, ['alt' => __('Duplicate'), 'title' => __('Duplicate')]).'</a>'.'<a href="index.php?'.'sec=snmpconsole&'.'sec2=godmode/snmpconsole/snmp_alert&'.'update_alert=1&'.'id_alert_snmp='.$row['id_as'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update')]).'</a>'.'<a href="javascript:show_add_action_snmp(\''.$row['id_as'].'\');">'.html_print_image('images/add.png', true, ['title' => __('Add action')]).'</a>'.'<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&delete_alert='.$row['id_as'].'" onClick="javascript:return confirm(\''.__('Are you sure?').'\')">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete')]).'</a>'; + $data[8] = '<a href="index.php?'.'sec=snmpconsole&'.'sec2=godmode/snmpconsole/snmp_alert&'.'duplicate_alert=1&'.'id_alert_snmp='.$row['id_as'].'">'.html_print_image('images/copy.png', true, ['alt' => __('Duplicate'), 'title' => __('Duplicate'), 'class' => 'invert_filter']).'</a>'.'<a href="index.php?'.'sec=snmpconsole&'.'sec2=godmode/snmpconsole/snmp_alert&'.'update_alert=1&'.'id_alert_snmp='.$row['id_as'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update'), 'class' => 'invert_filter']).'</a>'.'<a href="javascript:show_add_action_snmp(\''.$row['id_as'].'\');">'.html_print_image('images/add.png', true, ['title' => __('Add action'), 'class' => 'invert_filter']).'</a>'.'<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&delete_alert='.$row['id_as'].'" onClick="javascript:return confirm(\''.__('Are you sure?').'\')">'.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter', 'alt' => __('Delete')]).'</a>'; $data[9] = html_print_checkbox_extended( @@ -1422,12 +1415,12 @@ if ($create_alert || $update_alert) { } // DIALOG ADD MORE ACTIONS - echo '<div id="add_action_snmp-div" style="display:none;text-align:left">'; + echo '<div id="add_action_snmp-div" class="invisible left">'; echo '<form id="add_action_form" method="post">'; - echo '<table class="databox_color" style="width:100%">'; + echo '<table class="databox_color w100p">'; echo '<tr>'; - echo '<td class="datos2" style="font-weight:bold;padding:6px;">'; + echo '<td class="datos2 bolder_6px">'; echo __('ID Alert SNMP'); echo '</td>'; echo '<td class="datos">'; @@ -1435,7 +1428,7 @@ if ($create_alert || $update_alert) { echo '</td>'; echo '</tr>'; echo '<tr class="datos2">'; - echo '<td class="datos2" style="font-weight:bold;padding:6px;">'; + echo '<td class="datos2 bolder_6px">'; echo __('Action'); echo '</td>'; echo '<td class="datos2">'; @@ -1503,7 +1496,10 @@ if ($create_alert || $update_alert) { for ($i = 1; $i <= $config['max_macro_fields']; $i++) { echo '<tr id="table_macros-field'.$i.'"><td class="datos" valign="top">'.html_print_image('images/spinner.gif', true); - echo '<td class="datos">'.html_print_image('images/spinner.gif', true); + echo '<td class="datos">'.html_print_image( + 'images/spinner.gif', + true + ); html_print_input_hidden('field'.$i.'_value', isset($al['al_field'.$i]) ? $al['al_field'.$i] : ''); echo '</td>'; echo '</tr>'; @@ -1523,20 +1519,20 @@ if ($create_alert || $update_alert) { ui_pagination($count, $url_pagination); - echo '<div style="float:right; margin-left: 10px;">'; + echo '<div class="right mrgn_lft_10px;">'; html_print_input_hidden('multiple_delete', 1); html_print_submit_button(__('Delete selected'), 'delete_button', false, 'class="sub delete"'); echo '</div>'; echo '</form>'; } - echo '<div style="float:right;">'; + echo '<div class="right">'; echo '<form name="agente" method="post" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert">'; html_print_input_hidden('create_alert', 1); html_print_submit_button(__('Create'), 'alert', false, 'class="sub next"'); echo '</form></div>'; - echo '<div style="margin-left: 30px; line-height: 17px; vertical-align: top; width:120px;">'; + echo '<div class="snmp_legend">'; echo '<h3>'.__('Legend').'</h3>'; foreach (get_priorities() as $num => $name) { echo '<span class="'.get_priority_class($num).'">'.$name.'</span>'; diff --git a/pandora_console/godmode/snmpconsole/snmp_filters.php b/pandora_console/godmode/snmpconsole/snmp_filters.php index 146acd20ee..8afefcf34f 100644 --- a/pandora_console/godmode/snmpconsole/snmp_filters.php +++ b/pandora_console/godmode/snmpconsole/snmp_filters.php @@ -199,7 +199,7 @@ if ($edit_filter > -2) { if ($j == 1) { $table->data[$j][1] .= ui_print_help_tip(__('This field contains a substring, could be part of a IP address, a numeric OID, or a plain substring').SEPARATOR_COLUMN, true); } else { - $table->data[$j][1] .= html_print_image('images/cross.png', true, ['id' => 'delete_filter_'.$f['id_snmp_filter'], 'alt' => __('Click to remove the filter')]); + $table->data[$j][1] .= html_print_image('images/cross.png', true, ['id' => 'delete_filter_'.$f['id_snmp_filter'], 'class' => 'invert_filter', 'alt' => __('Click to remove the filter')]); } $j++; @@ -225,7 +225,17 @@ if ($edit_filter > -2) { html_print_table($table); echo '<div class="action-buttons" style="width: '.$table->width.'">'; - html_print_image('images/add.png', false, ['id' => 'add_filter', 'alt' => __('Click to add new filter'), 'title' => __('Click to add new filter'), 'style' => 'float:left;']); + html_print_image( + 'images/add.png', + false, + [ + 'id' => 'add_filter', + 'alt' => __('Click to add new filter'), + 'title' => __('Click to add new filter'), + 'style' => 'float:left;', + 'class' => 'invert_filter', + ] + ); if ($edit_filter > -1) { html_print_submit_button(__('Update'), 'submit_button', false, 'class="sub upd"'); } else { @@ -267,7 +277,7 @@ if ($edit_filter > -2) { $data = []; $data[0] = '<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$r['id_snmp_filter'].'">'.$r['description'].'</a>'; $data[1] = $r['filter']; - $data[2] = '<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update')]).'</a>'.'  <a onclick="if (confirm(\''.__('Are you sure?').'\')) return true; else return false;" href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&delete_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete')]).'</a>'; + $data[2] = '<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update'), 'class' => 'invert_filter']).'</a>'.'  <a onclick="if (confirm(\''.__('Are you sure?').'\')) return true; else return false;" href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&delete_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete'), 'class' => 'invert_filter']).'</a>'; array_push($table->data, $data); } } else { @@ -278,7 +288,7 @@ if ($edit_filter > -2) { foreach ($row as $i => $r) { if ($ind2 == 0) { $compose_id = '<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$r['id_snmp_filter'].'">'.$r['description'].'</a>'; - $compose_action = '<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update')]).'</a>'.'  <a onclick="if (confirm(\''.__('Are you sure?').'\')) return true; else return false;" href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&delete_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete')]).'</a>'; + $compose_action = '<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update'), 'class' => 'invert_filter']).'</a>'.'  <a onclick="if (confirm(\''.__('Are you sure?').'\')) return true; else return false;" href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&delete_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete'), 'class' => 'invert_filter']).'</a>'; $ind2++; } @@ -300,7 +310,7 @@ if ($edit_filter > -2) { unset($table); - echo '<div style="text-align:right; width:100%">'; + echo '<div class="right w100p">'; echo '<form name="agente" method="post" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter=-1">'; html_print_submit_button(__('Create'), 'submit_button', false, 'class="sub next"'); echo '</form></div>'; @@ -314,7 +324,7 @@ if ($edit_filter > -2) { $(document).ready (function () { $('#add_filter').click(function(e) { - $('#filter_table').append('<tr id="filter_table-' + id + '" style="" class="datos"><td id="filter_table-' + id + '-0" style="" class="datos "></td><td id="filter_table-' + id + '-1" style="" class="datos "><input type="text" name="filter_' + id + '" value="" id="text-filter_' + id + '" size="60" maxlength="100"><img src="' + homeurl + 'images/cross.png" onclick="delete_this_row(' + id + ');" data-title="Click to delete the filter" data-use_title_for_force_title="1" class="forced_title" alt="Click to delete the filter"></td></tr>'); + $('#filter_table').append('<tr id="filter_table-' + id + '" class="datos"><td id="filter_table-' + id + '-0" class="datos "></td><td id="filter_table-' + id + '-1" class="datos "><input type="text" name="filter_' + id + '" value="" id="text-filter_' + id + '" size="60" maxlength="100"><img src="' + homeurl + 'images/cross.png" onclick="delete_this_row(' + id + ');" data-title="Click to delete the filter" data-use_title_for_force_title="1" class="forced_title" alt="Click to delete the filter"></td></tr>'); id++; diff --git a/pandora_console/godmode/tag/edit_tag.php b/pandora_console/godmode/tag/edit_tag.php index 712b23fbf2..bbf1aac06b 100644 --- a/pandora_console/godmode/tag/edit_tag.php +++ b/pandora_console/godmode/tag/edit_tag.php @@ -47,7 +47,14 @@ if (defined('METACONSOLE')) { $buttons = [ 'list' => [ 'active' => false, - 'text' => '<a href="index.php?sec='.$sec.'&sec2=advanced/component_management&tab=tags">'.html_print_image('images/list.png', true, ['title' => __('List tags')]).'</a>', + 'text' => '<a href="index.php?sec='.$sec.'&sec2=advanced/component_management&tab=tags">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('List tags'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; @@ -58,13 +65,27 @@ if (defined('METACONSOLE')) { $buttons = [ 'list' => [ 'active' => false, - 'text' => '<a href="index.php?sec='.$sec.'&sec2=godmode/tag/tag&tab=list">'.html_print_image('images/list.png', true, ['title' => __('List tags')]).'</a>', + 'text' => '<a href="index.php?sec='.$sec.'&sec2=godmode/tag/tag&tab=list">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('List tags'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; $buttons[$tab]['active'] = true; // Header - ui_print_page_header(__('Tags configuration'), 'images/tag.png', false, '', true, $buttons); + ui_print_page_header( + __('Tags configuration'), + 'images/tag.png', + false, + ['class' => 'invert_filter'], + true, + $buttons + ); } // Two actions can performed in this page: update and create tags @@ -153,16 +174,16 @@ else { // Create/Update tag form echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/tag/edit_tag&action='.$action.'&id_tag='.$id_tag.'" enctype="multipart/form-data">'; -echo '<div align=left style="width: 100%" class="pandora_form">'; +echo '<div align=left class="pandora_form w100p">'; echo "<table border=0 cellpadding=4 cellspacing=4 class='databox filters' width=100%>"; if (defined('METACONSOLE')) { if ($action == 'update') { - echo "<th colspan=8 style='text-align:center'>".__('Update Tag').'</th>'; + echo "<th colspan=8 class='center'>".__('Update Tag').'</th>'; } if ($action == 'new') { - echo "<th colspan=8 style='text-align:center'>".__('Create Tag').'</th>'; + echo "<th colspan=8 class='center'>".__('Create Tag').'</th>'; } } diff --git a/pandora_console/godmode/tag/tag.php b/pandora_console/godmode/tag/tag.php index a80c2b76bb..684df7ebfe 100644 --- a/pandora_console/godmode/tag/tag.php +++ b/pandora_console/godmode/tag/tag.php @@ -114,7 +114,14 @@ if (is_metaconsole()) { $buttons = [ 'list' => [ 'active' => false, - 'text' => '<a href="index.php?sec='.$sec.'&sec2=godmode/tag/tag&tab=list">'.html_print_image('images/list.png', true, ['title' => __('List tags')]).'</a>', + 'text' => '<a href="index.php?sec='.$sec.'&sec2=godmode/tag/tag&tab=list">'.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('List tags'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; @@ -251,7 +258,11 @@ if (!empty($result)) { // The tooltip needs a title on the item, don't delete the title $data[3] = '<a class="tag_details img_help" title="'.__('Tag details').'" - href="'.ui_get_full_url(false, false, false, false).'/ajax.php?page=godmode/tag/tag&get_tag_tooltip=1&id_tag='.$tag['id_tag'].'">'.html_print_image('images/zoom.png', true).'</a> '; + href="'.ui_get_full_url(false, false, false, false).'/ajax.php?page=godmode/tag/tag&get_tag_tooltip=1&id_tag='.$tag['id_tag'].'">'.html_print_image( + 'images/zoom.png', + true, + ['class' => 'invert_filter'] + ).'</a> '; $modules_count = 0; if (is_metaconsole() && !empty($servers)) { @@ -278,7 +289,11 @@ if (!empty($result)) { if ($email_large == $email_small) { $output = $email_large; } else { - $output = "<div title='".sprintf(__('Emails for the tag: %s'), $tag['name'])."' style='display: none;' class='email_large' id='email_large_".$tag['id_tag']."'>".$email_large.'</div>'.'<span id="value_'.$tag['id_tag'].'">'.$email_small.'</span> '."<a href='javascript: show_dialog(".$tag['id_tag'].")'>".html_print_image('images/rosette.png', true).''.'</a></span>'; + $output = "<div title='".sprintf(__('Emails for the tag: %s'), $tag['name'])."' class='email_large invisible' id='email_large_".$tag['id_tag']."'>".$email_large.'</div>'.'<span id="value_'.$tag['id_tag'].'">'.$email_small.'</span> '."<a href='javascript: show_dialog(".$tag['id_tag'].")'>".html_print_image( + 'images/rosette.png', + true, + ['class' => 'invert_filter'] + ).''.'</a></span>'; } $data[4] = $output; @@ -288,14 +303,32 @@ if (!empty($result)) { if ($phone_large == $phone_small) { $output = $phone_large; } else { - $output = "<div title='".sprintf(__('Phones for the tag: %s'), $tag['name'])."' style='display: none;' class='phone_large' id='phone_large_".$tag['id_tag']."'>".$phone_large.'</div>'.'<span id="value_'.$tag['id_tag'].'">'.$phone_small.'</span> '."<a href='javascript: show_phone_dialog(".$tag['id_tag'].")'>".html_print_image('images/rosette.png', true).''.'</a></span>'; + $output = "<div title='".sprintf(__('Phones for the tag: %s'), $tag['name'])."' class='phone_large invisible' id='phone_large_".$tag['id_tag']."'>".$phone_large.'</div>'.'<span id="value_'.$tag['id_tag'].'">'.$phone_small.'</span> '."<a href='javascript: show_phone_dialog(".$tag['id_tag'].")'>".html_print_image( + 'images/rosette.png', + true, + ['class' => 'invert_filter'] + ).''.'</a></span>'; } $data[5] = $output; $table->cellclass[][6] = 'action_buttons'; - $data[6] = "<a href='index.php?sec=".$sec.'&sec2=godmode/tag/edit_tag&action=update&id_tag='.$tag['id_tag']."'>".html_print_image('images/config.png', true, ['title' => 'Edit']).'</a>'; - $data[6] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/tag/tag&delete_tag='.$tag['id_tag'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image('images/cross.png', true, ['title' => 'Delete']).'</a>'; + $data[6] = "<a href='index.php?sec=".$sec.'&sec2=godmode/tag/edit_tag&action=update&id_tag='.$tag['id_tag']."'>".html_print_image( + 'images/config.png', + true, + [ + 'title' => 'Edit', + 'class' => 'invert_filter', + ] + ).'</a>'; + $data[6] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/tag/tag&delete_tag='.$tag['id_tag'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image( + 'images/cross.png', + true, + [ + 'title' => 'Delete', + 'class' => 'invert_filter', + ] + ).'</a>'; array_push($table->data, $data); } diff --git a/pandora_console/godmode/update_manager/update_manager.offline.php b/pandora_console/godmode/update_manager/update_manager.offline.php index 944ae75c1b..270e726b69 100644 --- a/pandora_console/godmode/update_manager/update_manager.offline.php +++ b/pandora_console/godmode/update_manager/update_manager.offline.php @@ -101,7 +101,7 @@ is not working on the metaconsole and there is no time to fix it --> : "http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Anexo_Upgrade#Version_7.0NG_.28_Rolling_Release_.29"; var text4_mr_file = "<?php echo __(' to this process'); ?>"; text4_mr_file += "<br><br>"; - text4_mr_file += "<a style=\"font-size:10pt;font-style:italic;\" target=\"blank\" href=\"" + docsUrl + "\">"; + text4_mr_file += "<a class=\"font_10 itali;\" target=\"blank\" href=\"" + docsUrl + "\">"; text4_mr_file += "<?php echo __('About minor release update'); ?>"; text4_mr_file += "</a>"; diff --git a/pandora_console/godmode/update_manager/update_manager.online.php b/pandora_console/godmode/update_manager/update_manager.online.php index b4af8863b8..029a37238e 100644 --- a/pandora_console/godmode/update_manager/update_manager.online.php +++ b/pandora_console/godmode/update_manager/update_manager.online.php @@ -132,29 +132,29 @@ if (update_manager_verify_registration() === false) { } if ($php_settings_fine >= $PHP_SETTINGS_REQUIRED) { - echo "<span class='loading' style='font-size:18pt;'>"; - echo "<img src='images/wait.gif' />"; + echo "<span class='loading font_18pt'>"; + echo "<img src='".'images/wait.gif'."' />"; echo '</span>'; } - echo '<p style="font-weight: 600;">'.__('The latest version of package installed is:').'</p>'; + echo '<p class="font_w600">'.__('The latest version of package installed is:').'</p>'; if ($open) { - echo '<div id="pkg_version" style="font-size:40pt;">'.$build_version.'</div>'; + echo '<div id="pkg_version" class="font_40pt">'.$build_version.'</div>'; } else { echo '<div id="pkg_version">'.$current_package.'</div>'; } - echo "<div class='checking_package' style='font-size:18pt;width:100%; display: none;'>"; + echo "<div class='checking_package font_18pt invisible w100p'>"; echo __('Checking for the newest package.'); echo '</div>'; - echo "<div class='downloading_package' style='font-size:18pt;width:100%; display: none;'>"; + echo "<div class='downloading_packagefont_18pt invisible w100p'>"; echo __('Downloading for the newest package.'); echo '</div>'; echo "<div class='content'></div>"; - echo "<div class='progressbar' style='display: none;'><img class='progressbar_img' src='' /></div>"; + echo "<div class='progressbar invisible'><img class='progressbar_img' src='' /></div>"; /* @@ -189,10 +189,10 @@ if (update_manager_verify_registration() === false) { if ($open) { echo "<div class='update_manager_open'> <div class='update_manager_warning'> - <div><img src='images/icono_info.png'></div> + <div><img src='".'images/icono_info.png'."'></div> <div><p>".__('WARNING: You are just one click away from an automated update. This may result in a damaged system, including loss of data and operativity. Check you have a recent backup. OpenSource updates are automatically created packages, and there is no WARRANTY or SUPPORT. If you need professional support and warranty, please upgrade to Enterprise Version.')."</p></div> </div> - <div style='text-align:center; margin-top:10px;'> + <div class='text_center mrgn_top_10px'> <a class='update_manager_button_open' href='https://pandorafms.com/pandora-fms-enterprise/' target='_blank'>About Enterprise</a> </div> </div>"; @@ -212,7 +212,7 @@ if (update_manager_verify_registration() === false) { var isopen = "<?php echo $open; ?>"; if(isopen){ $(document).ready(function() { - $('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" ); + $('body').append( "<div id='opacidad'></div>" ); jQuery.post ("ajax.php", { "page": "general/alert_enterprise", diff --git a/pandora_console/godmode/update_manager/update_manager.php b/pandora_console/godmode/update_manager/update_manager.php index 6a3ecf7aa6..46736ba461 100644 --- a/pandora_console/godmode/update_manager/update_manager.php +++ b/pandora_console/godmode/update_manager/update_manager.php @@ -32,19 +32,19 @@ $tab = get_parameter('tab', 'online'); $buttons['setup'] = [ 'active' => ($tab == 'setup') ? true : false, - 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options')]).'</a>', + 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options'), 'class' => 'invert_filter']).'</a>', ]; if (enterprise_installed()) { $buttons['offline'] = [ 'active' => ($tab == 'offline') ? true : false, - 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offline">'.html_print_image('images/box.png', true, ['title' => __('Offline update manager')]).'</a>', + 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offline">'.html_print_image('images/box.png', true, ['title' => __('Offline update manager'), 'class' => 'invert_filter']).'</a>', ]; } $buttons['online'] = [ 'active' => ($tab == 'online') ? true : false, - 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update manager')]).'</a>', + 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update manager'), 'class' => 'invert_filter']).'</a>', ]; diff --git a/pandora_console/godmode/users/configure_profile.php b/pandora_console/godmode/users/configure_profile.php index aef74fa22e..e41be191ea 100644 --- a/pandora_console/godmode/users/configure_profile.php +++ b/pandora_console/godmode/users/configure_profile.php @@ -37,11 +37,25 @@ if (!is_metaconsole()) { $buttons = [ 'user' => [ 'active' => false, - 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure='.$pure.'">'.html_print_image('images/gm_users.png', true, ['title' => __('User management')]).'</a>', + 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure='.$pure.'">'.html_print_image( + 'images/gm_users.png', + true, + [ + 'title' => __('User management'), + 'class' => 'invert_filter', + ] + ).'</a>', ], 'profile' => [ 'active' => false, - 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure='.$pure.'">'.html_print_image('images/profiles.png', true, ['title' => __('Profile management')]).'</a>', + 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure='.$pure.'">'.html_print_image( + 'images/profiles.png', + true, + [ + 'title' => __('Profile management'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; @@ -121,7 +135,7 @@ if ($id_profile || $new_profile) { if ($profile === false) { ui_print_error_message(__('There was a problem loading profile')).'</table>'; echo '</div>'; - echo '<div style="clear:both"> </div>'; + echo '<div id="both"> </div>'; echo '</div>'; echo '<div id="foot">'; include 'general/footer.php'; diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 6213048e19..2909620e3b 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -214,11 +214,25 @@ if ($meta) { $buttons = [ 'user' => [ 'active' => false, - 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure='.$pure.'">'.html_print_image('images/gm_users.png', true, ['title' => __('User management')]).'</a>', + 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure='.$pure.'">'.html_print_image( + 'images/user.png', + true, + [ + 'title' => __('User management'), + 'class' => 'invert_filter', + ] + ).'</a>', ], 'profile' => [ 'active' => false, - 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure='.$pure.'">'.html_print_image('images/profiles.png', true, ['title' => __('Profile management')]).'</a>', + 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure='.$pure.'">'.html_print_image( + 'images/profiles.png', + true, + [ + 'title' => __('Profile management'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; @@ -826,9 +840,17 @@ if (!$new_user) { } if (is_user_admin($id)) { - $avatar = html_print_image('images/people_1.png', true, ['class' => 'user_avatar']); + $avatar = html_print_image( + 'images/people_1.png', + true, + ['class' => 'user_avatar'] + ); } else { - $avatar = html_print_image('images/people_2.png', true, ['class' => 'user_avatar']); + $avatar = html_print_image( + 'images/people_2.png', + true, + ['class' => 'user_avatar'] + ); } $full_name = ' <div class="label_select_simple">'.html_print_input_text_extended( @@ -859,7 +881,10 @@ $language .= html_print_select_from_sql( ).'</div>'; -$timezone = '<div class="label_select"><p class="edit_user_labels">'.__('Timezone').ui_print_help_tip(__('The timezone must be that of the associated server.'), true).'</p>'; +$timezone = '<div class="label_select"><p class="edit_user_labels">'.__('Timezone').ui_print_help_tip( + __('The timezone must be that of the associated server.'), + true +).'</p>'; $timezone .= html_print_timezone_select('timezone', $user_info['timezone']).'</div>'; if ($config['user_can_update_password']) { @@ -917,7 +942,7 @@ if ($config['user_can_update_password']) { } $own_info = get_user_info($config['id_user']); -$global_profile = '<div class="label_select_simple user_global_profile" ><span class="input_label" style="margin:0;">'.__('Global Profile').'</span>'; +$global_profile = '<div class="label_select_simple user_global_profile" ><span class="input_label" class"mrgn_0px">'.__('Global Profile').'</span>'; $global_profile .= '<div class="switch_radio_button">'; if (users_is_admin()) { $global_profile .= html_print_radio_button_extended( @@ -960,7 +985,7 @@ $email = '<div class="label_select_simple">'.html_print_input_text_extended( $view_mode, '', [ - 'class' => 'input input_line email_icon_input', + 'class' => 'input input_line email_icon_input invert_filter', 'placeholder' => __('E-mail'), ], true @@ -1043,7 +1068,10 @@ $values = [ 0 => __('No'), ]; -$home_screen = '<div class="label_select"><p class="edit_user_labels">'.__('Home screen').ui_print_help_tip(__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1 to show agent detail view'), true).'</p>'; +$home_screen = '<div class="label_select"><p class="edit_user_labels">'.__('Home screen').ui_print_help_tip( + __('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1 to show agent detail view'), + true +).'</p>'; ; $values = [ 'Default' => __('Default'), @@ -1060,7 +1088,17 @@ if (!is_metaconsole()) { } -$home_screen .= html_print_select($values, 'section', io_safe_output($user_info['section']), 'show_data_section();', '', -1, true, false, false).'</div>'; +$home_screen .= html_print_select( + $values, + 'section', + io_safe_output($user_info['section']), + 'show_data_section();', + '', + -1, + true, + false, + false +).'</div>'; $dashboards = Manager::getDashboards(-1, -1); @@ -1086,14 +1124,41 @@ if ($layouts === false) { } } -$home_screen .= html_print_select($layouts_aux, 'visual_console', $user_info['data_section'], '', '', '', true); -$home_screen .= html_print_input_text('data_section', $user_info['data_section'], '', 60, 255, true, false); +$home_screen .= html_print_select( + $layouts_aux, + 'visual_console', + $user_info['data_section'], + '', + '', + '', + true +); +$home_screen .= html_print_input_text( + 'data_section', + $user_info['data_section'], + '', + 60, + 255, + true, + false +); $size_pagination = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Block size for pagination').'</p>'; -$size_pagination .= html_print_input_text('block_size', $user_info['block_size'], '', 5, 5, true).'</div>'; +$size_pagination .= html_print_input_text( + 'block_size', + $user_info['block_size'], + '', + 5, + 5, + true +).'</div>'; if ($id == $config['id_user']) { - $language .= html_print_input_hidden('quick_language_change', 1, true); + $language .= html_print_input_hidden( + 'quick_language_change', + 1, + true + ); } if (enterprise_installed() && defined('METACONSOLE')) { @@ -1122,12 +1187,33 @@ if (enterprise_installed() && defined('METACONSOLE')) { } $not_login = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Not Login').'</p>'; -$not_login .= ui_print_help_tip(__('The user with not login set only can access to API.'), true); -$not_login .= html_print_checkbox_switch('not_login', 1, $user_info['not_login'], true).'</div>'; +$not_login .= ui_print_help_tip( + __('The user with not login set only can access to API.'), + true +); +$not_login .= html_print_checkbox_switch( + 'not_login', + 1, + $user_info['not_login'], + true +).'</div>'; $session_time = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Session Time'); -$session_time .= ui_print_help_tip(__('This is defined in minutes, If you wish a permanent session should putting -1 in this field.'), true).'</p>'; -$session_time .= html_print_input_text('session_time', $user_info['session_time'], '', 5, 5, true.false, false, '', 'class="input_line_small"').'</div>'; +$session_time .= ui_print_help_tip( + __('This is defined in minutes, If you wish a permanent session should putting -1 in this field.'), + true +).'</p>'; +$session_time .= html_print_input_text( + 'session_time', + $user_info['session_time'], + '', + 5, + 5, + true.false, + false, + '', + 'class="input_line_small"' +).'</div>'; $event_filter_data = db_get_all_rows_sql('SELECT id_name, id_filter FROM tevent_filter'); if ($event_filter_data === false) { @@ -1141,7 +1227,17 @@ foreach ($event_filter_data as $filter) { } $default_event_filter = '<div class="label_select"><p class="edit_user_labels">'.__('Default event filter').'</p>'; -$default_event_filter .= html_print_select($event_filter, 'default_event_filter', $user_info['default_event_filter'], '', '', __('None'), true, false, false).'</div>'; +$default_event_filter .= html_print_select( + $event_filter, + 'default_event_filter', + $user_info['default_event_filter'], + '', + '', + __('None'), + true, + false, + false +).'</div>'; $newsletter = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Disabled newsletter').'</p>'; if ($user_info['middlename'] >= 0) { @@ -1159,12 +1255,31 @@ $newsletter .= html_print_checkbox_switch( if ($config['ehorus_user_level_conf']) { $ehorus = '<div class="label_select_simple"><p class="edit_user_labels">'.__('eHorus user access enabled').'</p>'; - $ehorus .= html_print_checkbox_switch('ehorus_user_level_enabled', 1, $user_info['ehorus_user_level_enabled'], true).'</div>'; + $ehorus .= html_print_checkbox_switch( + 'ehorus_user_level_enabled', + 1, + $user_info['ehorus_user_level_enabled'], + true + ).'</div>'; $ehorus .= '<div class="user_edit_ehorus_outer">'; $ehorus .= '<div class="label_select_simple user_edit_ehorus_inner"><p class="edit_user_labels">'.__('eHorus user').'</p>'; - $ehorus .= html_print_input_text('ehorus_user_level_user', $user_info['ehorus_user_level_user'], '', 15, 45, true).'</div>'; + $ehorus .= html_print_input_text( + 'ehorus_user_level_user', + $user_info['ehorus_user_level_user'], + '', + 15, + 45, + true + ).'</div>'; $ehorus .= '<div class="label_select_simple user_edit_ehorus_inner"><p class="edit_user_labels">'.__('eHorus password').'</p>'; - $ehorus .= html_print_input_password('ehorus_user_level_pass', io_output_password($user_info['ehorus_user_level_pass']), '', 15, 45, true).'</div>'; + $ehorus .= html_print_input_password( + 'ehorus_user_level_pass', + io_output_password($user_info['ehorus_user_level_pass']), + '', + 15, + 45, + true + ).'</div>'; $ehorus .= '</div>'; } @@ -1184,11 +1299,18 @@ if ($config['double_auth_enabled'] && check_acl($config['id_user'], 0, 'PM')) { } // Dialog. - $double_authentication .= '<div id="dialog-double_auth" style="display:none"><div id="dialog-double_auth-container"></div></div>'; + $double_authentication .= '<div id="dialog-double_auth" class="invisible"><div id="dialog-double_auth-container"></div></div>'; } if ($double_auth_enabled && $config['double_auth_enabled'] && $config['2FA_all_users'] != '') { - $double_authentication .= html_print_button(__('Show information'), 'show_info', false, 'javascript:show_double_auth_info();', '', true); + $double_authentication .= html_print_button( + __('Show information'), + 'show_info', + false, + 'javascript:show_double_auth_info();', + '', + true + ); } if (isset($double_authentication)) { @@ -1199,7 +1321,12 @@ if ($meta) { enterprise_include_once('include/functions_metaconsole.php'); $metaconsole_agents_manager = '<div class="label_select_simple" id="metaconsole_agents_manager_div"><p class="edit_user_labels">'.__('Enable agents managment').'</p>'; - $metaconsole_agents_manager .= html_print_checkbox_switch('metaconsole_agents_manager', 1, $user_info['metaconsole_agents_manager'], true).'</div>'; + $metaconsole_agents_manager .= html_print_checkbox_switch( + 'metaconsole_agents_manager', + 1, + $user_info['metaconsole_agents_manager'], + true + ).'</div>'; $metaconsole_assigned_server = '<div class="label_select" id="metaconsole_assigned_server_div"><p class="edit_user_labels">'.__('Assigned node').ui_print_help_tip(__('Server where the agents created of this user will be placed'), true).'</p>'; $servers = metaconsole_get_servers(); @@ -1211,7 +1338,12 @@ if ($meta) { $metaconsole_assigned_server .= html_print_select($servers_for_select, 'metaconsole_assigned_server', $user_info['metaconsole_assigned_server'], '', '', -1, true, false, false).'</div>'; $metaconsole_access_node = '<div class="label_select_simple" id="metaconsole_access_node_div"><p class="edit_user_labels">'.__('Enable node access').ui_print_help_tip(__('With this option enabled, the user will can access to nodes console'), true).'</p>'; - $metaconsole_access_node .= html_print_checkbox('metaconsole_access_node', 1, $user_info['metaconsole_access_node'], true).'</div>'; + $metaconsole_access_node .= html_print_checkbox( + 'metaconsole_access_node', + 1, + $user_info['metaconsole_access_node'], + true + ).'</div>'; } echo '<form id="user_profile_form" name="user_profile_form" method="post" autocomplete="off" action="#">'; @@ -1242,7 +1374,7 @@ if ($id != '' && !$is_err) { echo '<div id="user_form"> <div class="user_edit_first_row"> <div class="edit_user_info white_box">'.$div_user_info.'</div> - <div class="edit_user_autorefresh white_box"><p style="font-weight:bold;">Extra info</p>'.$email.$phone.$not_login.$session_time.'</div> + <div class="edit_user_autorefresh white_box"><p class="bolder">Extra info</p>'.$email.$phone.$not_login.$session_time.'</div> </div> <div class="user_edit_second_row white_box"> <div class="edit_user_options">'.$language.$access_or_pagination.$skin.$home_screen.$default_event_filter.$newsletter.$double_authentication.'</div> @@ -1251,7 +1383,7 @@ echo '<div id="user_form"> if (!is_metaconsole()) { echo '<div id="timezone-picker"> <img id="timezone-image" src="'.$local_file.'" width="'.$map_width.'" height="'.$map_height.'" usemap="#timezone-map" /> - <img class="timezone-pin" src="include/javascript/timezonepicker/images/pin.png" style="padding-top: 4px;" /> + <img class="timezone-pin" src="include/javascript/timezonepicker/images/pin.png" class="pdd_t_4px" /> <map name="timezone-map" id="timezone-map">'.$area_data_timezone_polys.$area_data_timezone_rects.'</map> </div>'; } else { @@ -1270,7 +1402,7 @@ if (!empty($ehorus)) { echo '</div>'; -echo '<div style="width: 100%" class="action-buttons">'; +echo '<div class="action-buttons w100p">'; if ($config['admin_can_add_user']) { html_print_csrf_hidden(); if ($new_user) { @@ -1291,12 +1423,22 @@ profile_print_profile_table($id); echo '<br />'; -echo '<div style="width: 100%" class="action-buttons">'; +echo '<div class="action-buttons w100p">'; if ($config['admin_can_add_user']) { if ($new_user) { - html_print_submit_button(__('Create'), 'crtbutton', false, 'class="sub wand" form="user_profile_form"'); + html_print_submit_button( + __('Create'), + 'crtbutton', + false, + 'class="sub wand" form="user_profile_form"' + ); } else { - html_print_submit_button(__('Update'), 'uptbutton', false, 'class="sub upd" form="user_profile_form"'); + html_print_submit_button( + __('Update'), + 'uptbutton', + false, + 'class="sub upd" form="user_profile_form"' + ); } } @@ -1306,7 +1448,17 @@ echo '</div>'; echo '</div>'; enterprise_hook('close_meta_frame'); -$delete_image = html_print_input_image('del', 'images/cross.png', 1, '', true, ['onclick' => 'delete_profile(event, this)']); +$delete_image = html_print_input_image( + 'del', + 'images/cross.png', + 1, + '', + true, + [ + 'onclick' => 'delete_profile(event, this)', + 'class' => 'invert_filter', + ] +); if (!is_metaconsole()) { ?> @@ -1706,7 +1858,6 @@ function show_double_auth_activation () { function show_double_auth_deactivation () { var userID = '<?php echo io_safe_output($id); ?>'; - console.log(userID); var $loadingSpinner = $("<img src=\"<?php echo $config['homeurl']; ?>/images/spinner.gif\" />"); var $dialogContainer = $("div#dialog-double_auth-container"); diff --git a/pandora_console/godmode/users/profile_list.php b/pandora_console/godmode/users/profile_list.php index af15e91859..bd66475968 100644 --- a/pandora_console/godmode/users/profile_list.php +++ b/pandora_console/godmode/users/profile_list.php @@ -41,11 +41,25 @@ if (!defined('METACONSOLE')) { $buttons = [ 'user' => [ 'active' => false, - 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure='.$pure.'">'.html_print_image('images/gm_users.png', true, ['title' => __('User management')]).'</a>', + 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure='.$pure.'">'.html_print_image( + 'images/gm_users.png', + true, + [ + 'title' => __('User management'), + 'class' => 'invert_filter', + ] + ).'</a>', ], 'profile' => [ 'active' => false, - 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure='.$pure.'">'.html_print_image('images/profiles.png', true, ['title' => __('Profile management')]).'</a>', + 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure='.$pure.'">'.html_print_image( + 'images/profiles.png', + true, + [ + 'title' => __('Profile management'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; @@ -333,7 +347,14 @@ if ($profiles === false) { $profiles = []; } -$img = html_print_image('images/ok.png', true, ['border' => 0]); +$img = html_print_image( + 'images/ok.png', + true, + [ + 'border' => 0, + 'class' => 'invert_filter', + ] +); foreach ($profiles as $profile) { $data['profiles'] = '<a href="index.php?sec='.$sec.'&sec2=godmode/users/configure_profile&id='.$profile['id_perfil'].'&pure='.$pure.'">'.$profile['name'].'</a>'; @@ -361,9 +382,20 @@ foreach ($profiles as $profile) { $data['VM'] = ($profile['vconsole_management'] ? $img : ''); $data['PM'] = ($profile['pandora_management'] ? $img : ''); $table->cellclass[]['operations'] = 'action_buttons'; - $data['operations'] = '<a href="index.php?sec='.$sec.'&sec2=godmode/users/configure_profile&id='.$profile['id_perfil'].'&pure='.$pure.'">'.html_print_image('images/config.png', true, ['title' => __('Edit')]).'</a>'; + $data['operations'] = '<a href="index.php?sec='.$sec.'&sec2=godmode/users/configure_profile&id='.$profile['id_perfil'].'&pure='.$pure.'">'.html_print_image( + 'images/config.png', + true, + [ + 'title' => __('Edit'), + 'class' => 'invert_filter', + ] + ).'</a>'; if (check_acl($config['id_user'], 0, 'PM') || users_is_admin()) { - $data['operations'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/users/profile_list&delete_profile=1&id='.$profile['id_perfil'].'&pure='.$pure.'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a>'; + $data['operations'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/users/profile_list&delete_profile=1&id='.$profile['id_perfil'].'&pure='.$pure.'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image( + 'images/cross.png', + true, + ['class' => 'invert_filter'] + ).'</a>'; } array_push($table->data, $data); diff --git a/pandora_console/godmode/users/user_list.php b/pandora_console/godmode/users/user_list.php index 5178cce690..5134ad0a0b 100644 --- a/pandora_console/godmode/users/user_list.php +++ b/pandora_console/godmode/users/user_list.php @@ -180,25 +180,53 @@ if (defined('METACONSOLE')) { $buttons = [ 'user' => [ 'active' => false, - 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure='.$pure.'">'.html_print_image('images/gm_users.png', true, ['title' => __('User management')]).'</a>', + 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure='.$pure.'">'.html_print_image( + 'images/gm_users.png', + true, + [ + 'title' => __('User management'), + 'class' => 'invert_filter', + ] + ).'</a>', ], 'profile' => [ 'active' => false, - 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure='.$pure.'">'.html_print_image('images/profiles.png', true, ['title' => __('Profile management')]).'</a>', + 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure='.$pure.'">'.html_print_image( + 'images/profiles.png', + true, + [ + 'title' => __('Profile management'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; } else { $buttons = [ 'user' => [ 'active' => false, - 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure='.$pure.'">'.html_print_image('images/gm_users.png', true, ['title' => __('User management')]).'</a>', + 'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure='.$pure.'">'.html_print_image( + 'images/gm_users.png', + true, + [ + 'title' => __('User management'), + 'class' => 'invert_filter', + ] + ).'</a>', ], ]; } $buttons[$tab]['active'] = true; - ui_print_page_header(__('User management').' » '.__('Users defined on %s', get_product_name()), 'images/gm_users.png', false, '', true, $buttons); + ui_print_page_header( + __('User management').' » '.__('Users defined on %s', get_product_name()), + 'images/gm_users.png', + false, + '', + true, + $buttons + ); $sec = 'gusuarios'; } @@ -535,7 +563,7 @@ foreach ($info as $user_id => $user_info) { $data[0] = $user_id; } - $data[1] = '<ul style="margin-top: 0 !important; margin-left: auto !important; padding-left: 10px !important; list-style-type: none !important;">'; + $data[1] = '<ul class="user_list_ul">'; $data[1] .= '<li>'.$user_info['fullname'].'</li>'; $data[1] .= '<li>'.$user_info['phone'].'</li>'; $data[1] .= '<li>'.$user_info['email'].'</li>'; @@ -549,6 +577,7 @@ foreach ($info as $user_id => $user_info) { [ 'alt' => __('Admin'), 'title' => __('Administrator'), + 'class' => 'invert_filter', ] ).' '; } else { @@ -559,26 +588,33 @@ foreach ($info as $user_id => $user_info) { if ($user_profiles !== false) { $total_profile = 0; - $data[4] .= '<div style="text-align: end;">'; + $data[4] .= '<div class="text_end">'; foreach ($user_profiles as $row) { if ($total_profile <= 5) { - $data[4] .= "<div style='float:left;'>"; + $data[4] .= "<div class='left'>"; $data[4] .= profile_get_name($row['id_perfil']); $data[4] .= ' / </div>'; - $data[4] .= "<div style='float:left; padding-left:5px;'>"; + $data[4] .= "<div class='left pdd_l_5px'>"; $data[4] .= groups_get_name($row['id_grupo'], true); $data[4] .= '</div>'; if ($total_profile == 0 && count($user_profiles) >= 5) { - $data[4] .= '<span onclick="showGroups()" style="padding-left: 15px;"> - '.html_print_image('images/input_zoom_gray.png', true, ['title' => __('Show')]).'</span>'; + $data[4] .= '<span onclick="showGroups()" class="pdd_l_15px"> + '.html_print_image( + 'images/zoom.png', + true, + [ + 'title' => __('Show'), + 'class' => 'invert_filter', + ] + ).'</span>'; } $data[4] .= '<br />'; $data[4] .= '<br />'; $data[4] .= '</div>'; } else { - $data[4] .= "<div id='groups_list' style='display:none;'>"; + $data[4] .= "<div id='groups_list' class='invisible'>"; $data[4] .= '<div >'; $data[4] .= profile_get_name($row['id_perfil']); $data[4] .= ' / '.groups_get_name($row['id_grupo'], true).'</div>'; @@ -604,17 +640,17 @@ foreach ($info as $user_id => $user_info) { if ($user_is_admin || $config['id_user'] == $user_info['id_user'] || isset($group_um[0]) || (!$user_info['is_admin'] && (!isset($user_info['edit']) || (isset($user_info['edit']) && $user_info['edit'])))) { if (!isset($user_info['not_delete'])) { if ($user_info['disabled'] == 0) { - $data[6] = '<a href="index.php?sec='.$sec.'&sec2=godmode/users/user_list&disable_user=1&pure='.$pure.'&id='.$user_info['id_user'].'">'.html_print_image('images/lightbulb.png', true, ['title' => __('Disable')]).'</a>'; + $data[6] = '<a href="index.php?sec='.$sec.'&sec2=godmode/users/user_list&disable_user=1&pure='.$pure.'&id='.$user_info['id_user'].'">'.html_print_image('images/lightbulb.png', true, ['title' => __('Disable'), 'class' => 'invert_filter']).'</a>'; } else { $data[6] = '<a href="index.php?sec='.$sec.'&sec2=godmode/users/user_list&disable_user=0&pure='.$pure.'&id='.$user_info['id_user'].'">'.html_print_image('images/lightbulb_off.png', true, ['title' => __('Enable')]).'</a>'; } } - $data[6] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/users/configure_user&pure='.$pure.'&id='.$user_id.'">'.html_print_image('images/config.png', true, ['title' => __('Edit')]).'</a>'; + $data[6] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/users/configure_user&pure='.$pure.'&id='.$user_id.'">'.html_print_image('images/config.png', true, ['title' => __('Edit'), 'class' => 'invert_filter']).'</a>'; if ($config['admin_can_delete_user'] && $user_info['id_user'] != $config['id_user'] && !isset($user_info['not_delete'])) { - $data[6] .= "<a href='index.php?sec=".$sec.'&sec2=godmode/users/user_list&user_del=1&pure='.$pure.'&delete_user='.$user_info['id_user']."'>".html_print_image('images/cross.png', true, ['title' => __('Delete'), 'onclick' => "if (! confirm ('".__('Deleting User').' '.$user_info['id_user'].'. '.__('Are you sure?')."')) return false"]).'</a>'; + $data[6] .= "<a href='index.php?sec=".$sec.'&sec2=godmode/users/user_list&user_del=1&pure='.$pure.'&delete_user='.$user_info['id_user']."'>".html_print_image('images/cross.png', true, ['class' => 'invert_filter', 'title' => __('Delete'), 'onclick' => "if (! confirm ('".__('Deleting User').' '.$user_info['id_user'].'. '.__('Are you sure?')."')) return false"]).'</a>'; if (defined('METACONSOLE')) { - $data[6] .= "<a href='index.php?sec=".$sec.'&sec2=godmode/users/user_list&user_del=1&pure='.$pure.'&delete_user='.$user_info['id_user']."&delete_all=1'>".html_print_image('images/cross_double.png', true, ['title' => __('Delete from all consoles'), 'onclick' => "if (! confirm ('".__('Deleting User %s from all consoles', $user_info['id_user']).'. '.__('Are you sure?')."')) return false"]).'</a>'; + $data[6] .= "<a href='index.php?sec=".$sec.'&sec2=godmode/users/user_list&user_del=1&pure='.$pure.'&delete_user='.$user_info['id_user']."&delete_all=1'>".html_print_image('images/cross_double.png', true, ['class' => 'invert_filter', 'title' => __('Delete from all consoles'), 'onclick' => "if (! confirm ('".__('Deleting User %s from all consoles', $user_info['id_user']).'. '.__('Are you sure?')."')) return false"]).'</a>'; } } else { $data[6] .= ''; diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 05d3b7f001..a62507b7b7 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -616,7 +616,14 @@ class DiscoveryTaskList extends HTML } $data[0] .= ');" >'; - $data[0] .= html_print_image('images/target.png', true, ['title' => __('Force')]); + $data[0] .= html_print_image( + 'images/target.png', + true, + [ + 'title' => __('Force'), + 'class' => 'invert_filter', + ] + ); $data[0] .= '</span>'; } } else if ($task['disabled'] == 2) { @@ -718,7 +725,10 @@ class DiscoveryTaskList extends HTML $data[6] = html_print_image( 'images/plugin.png', true, - ['title' => __('Discovery Cloud Azure Compute')] + [ + 'title' => __('Discovery Cloud Azure Compute'), + 'class' => 'invert_filter', + ] ).'  '; $data[6] .= __('Cloud.Azure.Compute'); break; @@ -728,7 +738,10 @@ class DiscoveryTaskList extends HTML $data[6] = html_print_image( 'images/plugin.png', true, - ['title' => __('Discovery Cloud AWS EC2')] + [ + 'title' => __('Discovery Cloud AWS EC2'), + 'class' => 'invert_filter', + ] ).'  '; $data[6] .= __('Cloud.AWS.EC2'); break; @@ -736,9 +749,12 @@ class DiscoveryTaskList extends HTML case DISCOVERY_CLOUD_AWS_RDS: // Discovery Cloud RDS. $data[6] = html_print_image( - 'images/network.png', + 'images/op_network.png', true, - ['title' => __('Discovery Cloud RDS')] + [ + 'title' => __('Discovery Cloud RDS'), + 'class' => 'invert_filter', + ] ).'  '; $data[6] .= __('Discovery.Cloud.Aws.RDS'); break; @@ -746,9 +762,12 @@ class DiscoveryTaskList extends HTML case DISCOVERY_APP_MYSQL: // Discovery Applications MySQL. $data[6] = html_print_image( - 'images/network.png', + 'images/op_network.png', true, - ['title' => __('Discovery Applications MySQL')] + [ + 'title' => __('Discovery Applications MySQL'), + 'class' => 'invert_filter', + ] ).'  '; $data[6] .= __('Discovery.App.MySQL'); break; @@ -756,9 +775,12 @@ class DiscoveryTaskList extends HTML case DISCOVERY_APP_ORACLE: // Discovery Applications Oracle. $data[6] = html_print_image( - 'images/network.png', + 'images/op_network.png', true, - ['title' => __('Discovery Applications Oracle')] + [ + 'title' => __('Discovery Applications Oracle'), + 'class' => 'invert_filter', + ] ).'  '; $data[6] .= __('Discovery.App.Oracle'); break; @@ -766,9 +788,12 @@ class DiscoveryTaskList extends HTML case DISCOVERY_APP_DB2: // Discovery Applications DB2. $data[6] = html_print_image( - 'images/network.png', + 'images/op_network.png', true, - ['title' => __('Discovery Applications DB2')] + [ + 'title' => __('Discovery Applications DB2'), + 'class' => 'invert_filter', + ] ).'  '; $data[6] .= __('Discovery.App.DB2'); break; @@ -789,16 +814,20 @@ class DiscoveryTaskList extends HTML if ($task['id_recon_script'] == 0) { // Discovery NetScan. $data[6] = html_print_image( - 'images/network.png', + 'images/op_network.png', true, - ['title' => __('Discovery NetScan')] + [ + 'title' => __('Discovery NetScan'), + 'class' => 'invert_filter', + ] ).'  '; $data[6] .= __('Discovery.NetScan'); } else { // APP or external script recon task. $data[6] = html_print_image( 'images/plugin.png', - true + true, + ['class' => 'invert_filter'] ).'  '; $data[6] .= $recon_script_name; } @@ -849,7 +878,10 @@ class DiscoveryTaskList extends HTML $data[9] .= html_print_image( 'images/expand.png', true, - ['title' => __('Review results')] + [ + 'title' => __('Review results'), + 'class' => 'invert_filter', + ] ); $data[9] .= '</a>'; } @@ -858,7 +890,10 @@ class DiscoveryTaskList extends HTML $data[9] .= html_print_image( 'images/eye.png', true, - ['title' => __('View summary')] + [ + 'title' => __('View summary'), + 'class' => 'invert_filter', + ] ); $data[9] .= '</a>'; } @@ -875,7 +910,10 @@ class DiscoveryTaskList extends HTML $data[9] .= html_print_image( 'images/dynamic_network_icon.png', true, - ['title' => __('View map')] + [ + 'title' => __('View map'), + 'class' => 'invert_filter', + ] ); $data[9] .= '</a>'; } @@ -896,14 +934,20 @@ class DiscoveryTaskList extends HTML ).'">'.html_print_image( 'images/config.png', true, - ['title' => __('Edit task')] + [ + 'title' => __('Edit task'), + 'class' => 'invert_filter', + ] ).'</a>'; $data[9] .= '<a href="'.ui_get_full_url( 'index.php?sec=gextensions&sec2=enterprise/tools/ipam/ipam&action=delete&id='.$tipam_task_id ).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image( 'images/cross.png', true, - ['title' => __('Delete task')] + [ + 'title' => __('Delete task'), + 'class' => 'invert_filter', + ] ).'</a>'; } else { // Check if is a H&D, Cloud or Application or IPAM. @@ -916,14 +960,20 @@ class DiscoveryTaskList extends HTML ).'">'.html_print_image( 'images/config.png', true, - ['title' => __('Edit task')] + [ + 'title' => __('Edit task'), + 'class' => 'invert_filter', + ] ).'</a>'; $data[9] .= '<a href="'.ui_get_full_url( 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&delete=1&task='.$task['id_rt'] ).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image( 'images/cross.png', true, - ['title' => __('Delete task')] + [ + 'title' => __('Delete task'), + 'class' => 'invert_filter', + ] ).'</a>'; } @@ -954,7 +1004,7 @@ class DiscoveryTaskList extends HTML $table->cellclass[][9] = 'action_buttons'; // Div neccesary for modal progress task. - echo '<div id="progress_task_'.$task['id_rt'].'" style="display:none"></div>'; + echo '<div id="progress_task_'.$task['id_rt'].'" class="invisible"></div>'; array_push($table->data, $data); } @@ -970,9 +1020,9 @@ class DiscoveryTaskList extends HTML ui_toggle($content, __('Server Tasks'), '', '', false); // Div neccesary for modal map task. - echo '<div id="map_task" style="display:none"></div>'; - echo '<div id="task_review" style="display:none"></div>'; - echo '<div id="msg" style="display:none"></div>'; + echo '<div id="map_task" class="invisible"></div>'; + echo '<div id="task_review" class="invisible"></div>'; + echo '<div id="msg" class="invisible"></div>'; echo '<input type="hidden" id="ajax-url" value="'.ui_get_full_url('ajax.php').'"/>'; echo '<input type="hidden" id="success-str" value="'.__('Success').'"/>'; echo '<input type="hidden" id="failed-str" value="'.__('Failed').'"/>'; @@ -1104,11 +1154,11 @@ class DiscoveryTaskList extends HTML */ private function progressTaskGraph($task) { - $result .= '<div style="display: flex;">'; + $result .= '<div class="flex">'; $result .= '<div class="subtitle">'; $result .= '<span>'._('Overall Progress').'</span>'; - $result .= '<div style="margin-top: 25px;">'; + $result .= '<div class="mrgn_top_25px">'; $result .= progress_circular_bar( $task['id_rt'], ($task['status'] < 0) ? 100 : $task['status'], @@ -1178,7 +1228,7 @@ class DiscoveryTaskList extends HTML $result .= '</span>'; - $result .= '<div style="margin-top: 25px;">'; + $result .= '<div class="mrgn_top_25px">'; $result .= progress_circular_bar( $task['id_rt'].'_detail', $task['stats']['c_network_percent'], diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php index a4a7fda26f..892556f3fb 100755 --- a/pandora_console/godmode/wizards/HostDevices.class.php +++ b/pandora_console/godmode/wizards/HostDevices.class.php @@ -793,7 +793,7 @@ class HostDevices extends Wizard 'return' => true, ], ], - '1' => '<div style="height: 50%; margin-bottom: 35px;">'.html_print_image('images/wizard/netscan_green.png', true, ['title' => __('Close')], false).'</div>', + '1' => '<div class="height_50p mrgn_btn_35px">'.html_print_image('images/wizard/netscan_green.png', true, ['title' => __('Close')], false).'</div>', '2' => [ 'label' => '<b>'.__('Interval').':</b>'.ui_print_help_tip( __('Manual interval means that it will be executed only On-demand'), diff --git a/pandora_console/images/eye.png b/pandora_console/images/eye.png old mode 100644 new mode 100755 index 52c38f3a2fd3c2d9b99581953a52fd9b364147cf..57f63bb0c858b587dc7278d91e4f54228f054c26 GIT binary patch delta 458 zcmV;*0X6=)1c?NYNq?(JL_t(|+G1cp0*oNS-rimSNWEu*3JM%Nc#shwfRI%&Fawpm zS5Q!pc=+()P9~tVAW-ljNCqH)a3Yw=|AAB^5Z8nF7zQH)fB+&MA)5^Xi9o!82`FFy zWITXcv;aumhid^!HsCcAAb?1B0GiSDP>=cp@du#&j_9sE4}YW#po;Q=SP>NFpb&xi z1jJ@UG8G&tKwJovn1JNv3qZah$!-P+paDea!Sx;*O&g)X<_PrA0gxOMRDl81r=W-h zN#sKl&VHcyevA}=6o#NM1u577#05aS0G6gdpg9SYG8O`H0F*xw*?sGg(iVtc0OCWF z7XwBD21+CVDSri!wLqs_pj|iu1lSObaV!A_O4<(4{Gbm_4Ic>wAhwVPh5CA^L7+Ge zge4^;HJ~`24=UGycmhzq5UZh3SKWsyWPoKfpm;wtHNg@QNWKv$*8r5e4~=@TdT3hy zz=Y&FWCIzX=@|qPptK_tgFrl*8V0D(?t{!i&qW4MuS3IZ2Nx62!pI&fb`a`Hkn8)A zvVtQloEh;%QUEl2!b(+`s~n(~K7a<pf}xvE0Zq}KSZJ0~9{>OV07*qoM6N<$g5#03 Ar2qf` delta 506 zcmV<W0R{ev1i1u|Nq^f(L_t(|+G1cp2ln>%0w9_R$~OQC{09gi3?&W>*Z@EPF+yd} z1E~){>~QelK}HnAfC7#{dI19=01!a95y(A2{2s<<f^rT3u>jn$$ZmuQGNSo$KFEn! z?EnZMMl2yx0I~z<{sZWWnV^aiK=uF?e1M8yfQex!27-DZ4u1qnHUMdPAbt<jxB#a! zfC|?GsQ@5;0K^JNYAygZ8WJ0D{V?YM1Q6Ll9{_bT&bS8!)qAKrA3y{605sZBLI9)) z<ZzJ0MrcBD02-ixu8;vJc>zf62bl;|0E&o4X!M~fgaVKW{m>M_08NTuz=GtF1X$Wc zO0$BvJOeXD0Ds9AK~PkqClrv?3ZO)SrrD5@m}HIYR)PQ^z-WRPaTEuj;7q`x9^~AK zK>s!nZ74LT4WOD6ftoj<$u~gr2MA06$`|4_6e({k04h!dB~l=JJ#roaB{NWT0p<2X z(_|wyS0ksS04Ti>O6LRd256!Yg!-TWDmM}47Hlp>Hgj|Vl3@(cTmeec_n|HhL~>O> zl-@{8n9fIvphjp=JU~j6{YXAyfaZ-rq{0e&?8EX3G(r^6qz*v6UJnfp7<d3R`~prx wNhopVqb0o$K!XJtsgc;BDJ32h$)IEi08_NFi*+bo#Q*>R07*qoM6N<$f=af)FaQ7m diff --git a/pandora_console/images/builder.menu_gray.png b/pandora_console/images/menu/builder.menu_gray.png similarity index 100% rename from pandora_console/images/builder.menu_gray.png rename to pandora_console/images/menu/builder.menu_gray.png diff --git a/pandora_console/images/builder.menu_white.png b/pandora_console/images/menu/builder.menu_white.png similarity index 100% rename from pandora_console/images/builder.menu_white.png rename to pandora_console/images/menu/builder.menu_white.png diff --git a/pandora_console/images/extensions.menu_gray.png b/pandora_console/images/menu/extensions.menu_gray.png similarity index 100% rename from pandora_console/images/extensions.menu_gray.png rename to pandora_console/images/menu/extensions.menu_gray.png diff --git a/pandora_console/images/extensions.menu_white.png b/pandora_console/images/menu/extensions.menu_white.png similarity index 100% rename from pandora_console/images/extensions.menu_white.png rename to pandora_console/images/menu/extensions.menu_white.png diff --git a/pandora_console/images/gm_alerts.menu_gray.png b/pandora_console/images/menu/gm_alerts.menu_gray.png similarity index 100% rename from pandora_console/images/gm_alerts.menu_gray.png rename to pandora_console/images/menu/gm_alerts.menu_gray.png diff --git a/pandora_console/images/gm_alerts.menu_white.png b/pandora_console/images/menu/gm_alerts.menu_white.png similarity index 100% rename from pandora_console/images/gm_alerts.menu_white.png rename to pandora_console/images/menu/gm_alerts.menu_white.png diff --git a/pandora_console/images/gm_configuration.menu_gray.png b/pandora_console/images/menu/gm_configuration.menu_gray.png similarity index 100% rename from pandora_console/images/gm_configuration.menu_gray.png rename to pandora_console/images/menu/gm_configuration.menu_gray.png diff --git a/pandora_console/images/gm_configuration.menu_white.png b/pandora_console/images/menu/gm_configuration.menu_white.png similarity index 100% rename from pandora_console/images/gm_configuration.menu_white.png rename to pandora_console/images/menu/gm_configuration.menu_white.png diff --git a/pandora_console/images/gm_discovery.menu.png b/pandora_console/images/menu/gm_discovery.menu.png similarity index 100% rename from pandora_console/images/gm_discovery.menu.png rename to pandora_console/images/menu/gm_discovery.menu.png diff --git a/pandora_console/images/gm_discovery.menu_white.png b/pandora_console/images/menu/gm_discovery.menu_white.png similarity index 100% rename from pandora_console/images/gm_discovery.menu_white.png rename to pandora_console/images/menu/gm_discovery.menu_white.png diff --git a/pandora_console/images/gm_events.menu_gray.png b/pandora_console/images/menu/gm_events.menu_gray.png similarity index 100% rename from pandora_console/images/gm_events.menu_gray.png rename to pandora_console/images/menu/gm_events.menu_gray.png diff --git a/pandora_console/images/gm_events.menu_white.png b/pandora_console/images/menu/gm_events.menu_white.png similarity index 100% rename from pandora_console/images/gm_events.menu_white.png rename to pandora_console/images/menu/gm_events.menu_white.png diff --git a/pandora_console/images/gm_library.menu_gray.png b/pandora_console/images/menu/gm_library.menu_gray.png similarity index 100% rename from pandora_console/images/gm_library.menu_gray.png rename to pandora_console/images/menu/gm_library.menu_gray.png diff --git a/pandora_console/images/gm_library.menu_white.png b/pandora_console/images/menu/gm_library.menu_white.png similarity index 100% rename from pandora_console/images/gm_library.menu_white.png rename to pandora_console/images/menu/gm_library.menu_white.png diff --git a/pandora_console/images/gm_resources.menu_gray.png b/pandora_console/images/menu/gm_resources.menu_gray.png similarity index 100% rename from pandora_console/images/gm_resources.menu_gray.png rename to pandora_console/images/menu/gm_resources.menu_gray.png diff --git a/pandora_console/images/gm_resources.menu_white.png b/pandora_console/images/menu/gm_resources.menu_white.png similarity index 100% rename from pandora_console/images/gm_resources.menu_white.png rename to pandora_console/images/menu/gm_resources.menu_white.png diff --git a/pandora_console/images/gm_servers.menu_gray.png b/pandora_console/images/menu/gm_servers.menu_gray.png similarity index 100% rename from pandora_console/images/gm_servers.menu_gray.png rename to pandora_console/images/menu/gm_servers.menu_gray.png diff --git a/pandora_console/images/gm_servers.menu_white.png b/pandora_console/images/menu/gm_servers.menu_white.png similarity index 100% rename from pandora_console/images/gm_servers.menu_white.png rename to pandora_console/images/menu/gm_servers.menu_white.png diff --git a/pandora_console/images/gm_setup.menu_gray.png b/pandora_console/images/menu/gm_setup.menu_gray.png similarity index 100% rename from pandora_console/images/gm_setup.menu_gray.png rename to pandora_console/images/menu/gm_setup.menu_gray.png diff --git a/pandora_console/images/gm_setup.menu_white.png b/pandora_console/images/menu/gm_setup.menu_white.png similarity index 100% rename from pandora_console/images/gm_setup.menu_white.png rename to pandora_console/images/menu/gm_setup.menu_white.png diff --git a/pandora_console/images/gm_users.menu_gray.png b/pandora_console/images/menu/gm_users.menu_gray.png similarity index 100% rename from pandora_console/images/gm_users.menu_gray.png rename to pandora_console/images/menu/gm_users.menu_gray.png diff --git a/pandora_console/images/gm_users.menu_white.png b/pandora_console/images/menu/gm_users.menu_white.png similarity index 100% rename from pandora_console/images/gm_users.menu_white.png rename to pandora_console/images/menu/gm_users.menu_white.png diff --git a/pandora_console/images/links.menu_gray.png b/pandora_console/images/menu/links.menu_gray.png similarity index 100% rename from pandora_console/images/links.menu_gray.png rename to pandora_console/images/menu/links.menu_gray.png diff --git a/pandora_console/images/links.menu_white.png b/pandora_console/images/menu/links.menu_white.png similarity index 100% rename from pandora_console/images/links.menu_white.png rename to pandora_console/images/menu/links.menu_white.png diff --git a/pandora_console/images/op_events.menu_gray.png b/pandora_console/images/menu/op_events.menu_gray.png similarity index 100% rename from pandora_console/images/op_events.menu_gray.png rename to pandora_console/images/menu/op_events.menu_gray.png diff --git a/pandora_console/images/op_events.menu_white.png b/pandora_console/images/menu/op_events.menu_white.png similarity index 100% rename from pandora_console/images/op_events.menu_white.png rename to pandora_console/images/menu/op_events.menu_white.png diff --git a/pandora_console/images/op_monitoring.menu_gray.png b/pandora_console/images/menu/op_monitoring.menu_gray.png similarity index 100% rename from pandora_console/images/op_monitoring.menu_gray.png rename to pandora_console/images/menu/op_monitoring.menu_gray.png diff --git a/pandora_console/images/op_monitoring.menu_white.png b/pandora_console/images/menu/op_monitoring.menu_white.png similarity index 100% rename from pandora_console/images/op_monitoring.menu_white.png rename to pandora_console/images/menu/op_monitoring.menu_white.png diff --git a/pandora_console/images/op_network.menu_gray.png b/pandora_console/images/menu/op_network.menu_gray.png similarity index 100% rename from pandora_console/images/op_network.menu_gray.png rename to pandora_console/images/menu/op_network.menu_gray.png diff --git a/pandora_console/images/op_network.menu_white.png b/pandora_console/images/menu/op_network.menu_white.png similarity index 100% rename from pandora_console/images/op_network.menu_white.png rename to pandora_console/images/menu/op_network.menu_white.png diff --git a/pandora_console/images/op_reporting.menu_gray.png b/pandora_console/images/menu/op_reporting.menu_gray.png similarity index 100% rename from pandora_console/images/op_reporting.menu_gray.png rename to pandora_console/images/menu/op_reporting.menu_gray.png diff --git a/pandora_console/images/op_reporting.menu_white.png b/pandora_console/images/menu/op_reporting.menu_white.png similarity index 100% rename from pandora_console/images/op_reporting.menu_white.png rename to pandora_console/images/menu/op_reporting.menu_white.png diff --git a/pandora_console/images/op_workspace.menu_gray.png b/pandora_console/images/menu/op_workspace.menu_gray.png similarity index 100% rename from pandora_console/images/op_workspace.menu_gray.png rename to pandora_console/images/menu/op_workspace.menu_gray.png diff --git a/pandora_console/images/op_workspace.menu_white.png b/pandora_console/images/menu/op_workspace.menu_white.png similarity index 100% rename from pandora_console/images/op_workspace.menu_white.png rename to pandora_console/images/menu/op_workspace.menu_white.png diff --git a/pandora_console/images/um_messages.menu_gray.png b/pandora_console/images/menu/um_messages.menu_gray.png similarity index 100% rename from pandora_console/images/um_messages.menu_gray.png rename to pandora_console/images/menu/um_messages.menu_gray.png diff --git a/pandora_console/images/um_messages.menu_white.png b/pandora_console/images/menu/um_messages.menu_white.png similarity index 100% rename from pandora_console/images/um_messages.menu_white.png rename to pandora_console/images/menu/um_messages.menu_white.png diff --git a/pandora_console/images/operation.png b/pandora_console/images/operation.png old mode 100755 new mode 100644 index 57f63bb0c858b587dc7278d91e4f54228f054c26..52c38f3a2fd3c2d9b99581953a52fd9b364147cf GIT binary patch delta 506 zcmV<W0R{ev1i1u|Nq^f(L_t(|+G1cp2ln>%0w9_R$~OQC{09gi3?&W>*Z@EPF+yd} z1E~){>~QelK}HnAfC7#{dI19=01!a95y(A2{2s<<f^rT3u>jn$$ZmuQGNSo$KFEn! z?EnZMMl2yx0I~z<{sZWWnV^aiK=uF?e1M8yfQex!27-DZ4u1qnHUMdPAbt<jxB#a! zfC|?GsQ@5;0K^JNYAygZ8WJ0D{V?YM1Q6Ll9{_bT&bS8!)qAKrA3y{605sZBLI9)) z<ZzJ0MrcBD02-ixu8;vJc>zf62bl;|0E&o4X!M~fgaVKW{m>M_08NTuz=GtF1X$Wc zO0$BvJOeXD0Ds9AK~PkqClrv?3ZO)SrrD5@m}HIYR)PQ^z-WRPaTEuj;7q`x9^~AK zK>s!nZ74LT4WOD6ftoj<$u~gr2MA06$`|4_6e({k04h!dB~l=JJ#roaB{NWT0p<2X z(_|wyS0ksS04Ti>O6LRd256!Yg!-TWDmM}47Hlp>Hgj|Vl3@(cTmeec_n|HhL~>O> zl-@{8n9fIvphjp=JU~j6{YXAyfaZ-rq{0e&?8EX3G(r^6qz*v6UJnfp7<d3R`~prx wNhopVqb0o$K!XJtsgc;BDJ32h$)IEi08_NFi*+bo#Q*>R07*qoM6N<$f=af)FaQ7m delta 458 zcmV;*0X6=)1c?NYNq?(JL_t(|+G1cp0*oNS-rimSNWEu*3JM%Nc#shwfRI%&Fawpm zS5Q!pc=+()P9~tVAW-ljNCqH)a3Yw=|AAB^5Z8nF7zQH)fB+&MA)5^Xi9o!82`FFy zWITXcv;aumhid^!HsCcAAb?1B0GiSDP>=cp@du#&j_9sE4}YW#po;Q=SP>NFpb&xi z1jJ@UG8G&tKwJovn1JNv3qZah$!-P+paDea!Sx;*O&g)X<_PrA0gxOMRDl81r=W-h zN#sKl&VHcyevA}=6o#NM1u577#05aS0G6gdpg9SYG8O`H0F*xw*?sGg(iVtc0OCWF z7XwBD21+CVDSri!wLqs_pj|iu1lSObaV!A_O4<(4{Gbm_4Ic>wAhwVPh5CA^L7+Ge zge4^;HJ~`24=UGycmhzq5UZh3SKWsyWPoKfpm;wtHNg@QNWKv$*8r5e4~=@TdT3hy zz=Y&FWCIzX=@|qPptK_tgFrl*8V0D(?t{!i&qW4MuS3IZ2Nx62!pI&fb`a`Hkn8)A zvVtQloEh;%QUEl2!b(+`s~n(~K7a<pf}xvE0Zq}KSZJ0~9{>OV07*qoM6N<$g5#03 Ar2qf` diff --git a/pandora_console/images/user.png b/pandora_console/images/user.png new file mode 100644 index 0000000000000000000000000000000000000000..84b3b01cacbedb908f434b51cc452644f992e186 GIT binary patch literal 443 zcmV;s0Yv_ZP)<h;3K|Lk000e1NJLTq000#L000#T1^@s7-Vl`l0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUzT}ebiRCwBAU_b}<_V(vNG!v9>02D|7 z2p|S*%KjrO0|S5nLXm~3z^V!;xt{?a00<!b2x`6qRwsb~Bf7xBg9jOzh&CS}fS9pZ zD4?LAupNjQA3l6|0k2}9qVFIIhy$P+4qy!lr~@B>90#Nufw&%I6N)dO3JrkNc`Qx^ zX;wrr87Kg9pCOvU4KRfu01!YF1$_Y!uSXYWL{rocqzaHjA6Hs1z-1G<!ayYU0;~$5 zN#Z?Ju^=b{fMV}q@+?T2V99SiF;+7W<HiL<DFg;ZA}HF><ONBN2!H@%W}pFJBoOri z(2zrqv;|Oak?vAZt^!gPSfmWlGY=_IbP$i+0g_z`Ed>36*b#^y0x<{Fpou`d5Qxix zuDu9!?F*v96j}f}5E(Cp!0?@b*Za`4??6Ii*Aom=psgS;ejvfn1H?v@B9R7z%B?_h l(kU#$U;t#<M5vFj0suq!Y-%(19Wej^002ovPDHLkV1nahn^^z= literal 0 HcmV?d00001 diff --git a/pandora_console/include/ajax/alert_list.ajax.php b/pandora_console/include/ajax/alert_list.ajax.php index 81313fc660..73971caa9c 100644 --- a/pandora_console/include/ajax/alert_list.ajax.php +++ b/pandora_console/include/ajax/alert_list.ajax.php @@ -423,7 +423,7 @@ if ($show_update_action_menu) { ); $data .= '<form id="update_action-'.$alert['id'].'" method="post">'; - $data .= '<table class="databox_color" style="width:100%">'; + $data .= '<table class="databox_color w100p">'; $data .= html_print_input_hidden( 'update_action', 1, @@ -436,7 +436,7 @@ if ($show_update_action_menu) { ); if (! $id_agente) { $data .= '<tr class="datos2">'; - $data .= '<td class="datos2" style="font-weight:bold;padding:6px;">'; + $data .= '<td class="datos2 bolder_6px">'; $data .= __('Agent').' '.ui_print_help_icon( 'alert_scalate', true, @@ -457,7 +457,7 @@ if ($show_update_action_menu) { } $data .= '<tr class="datos">'; - $data .= '<td class="datos" style="font-weight:bold;padding:6px;">'; + $data .= '<td class="datos bolder_6px">'; $data .= __('Module'); $data .= '</td>'; $data .= '<td class="datos">'; @@ -472,7 +472,7 @@ if ($show_update_action_menu) { $data .= '</td>'; $data .= '</tr>'; $data .= '<tr class="datos2">'; - $data .= '<td class="datos2" style="font-weight:bold;padding:6px;">'; + $data .= '<td class="datos2 bolder_6px">'; $data .= __('Action'); $data .= '</td>'; $data .= '<td class="datos2">'; @@ -493,7 +493,7 @@ if ($show_update_action_menu) { $data .= '</td>'; $data .= '</tr>'; $data .= '<tr class="datos">'; - $data .= '<td class="datos" style="font-weight:bold;padding:6px;">'; + $data .= '<td class="datos bolder_6px">'; $data .= __('Number of alerts match from'); $data .= '</td>'; $data .= '<td class="datos">'; @@ -517,7 +517,7 @@ if ($show_update_action_menu) { $data .= '</td>'; $data .= '</tr>'; $data .= '<tr class="datos2">'; - $data .= '<td class="datos2" style="font-weight:bold;padding:6px;">'; + $data .= '<td class="datos2 bolder_6px">'; $data .= __('Threshold'); $data .= '</td>'; $data .= '<td class="datos2">'; diff --git a/pandora_console/include/ajax/custom_fields.php b/pandora_console/include/ajax/custom_fields.php index ebaae3d945..8d07c98f36 100644 --- a/pandora_console/include/ajax/custom_fields.php +++ b/pandora_console/include/ajax/custom_fields.php @@ -537,7 +537,7 @@ if (check_login()) { $type_form = get_parameter('type_form', ''); if ($type_form == 'save') { - $tabs = '<div id="tabs" style="height:95%;">'; + $tabs = '<div id="tabs" class="height_95p">'; $tabs .= "<ul class='tab_save_filter'>"; $tabs .= '<li>'; $tabs .= "<a href='#extended_create_filter' id='link_create'>"; diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index b47a750e85..9476b41718 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -29,6 +29,7 @@ // Begin. global $config; + require_once 'include/functions_events.php'; require_once 'include/functions_agents.php'; require_once 'include/functions_ui.php'; @@ -670,7 +671,7 @@ if ($save_filter_modal) { __('Save filter'), 'save_filter', false, - 'class="sub upd" style="float:right;" onclick="save_new_filter();"', + 'class="sub upd float-right" onclick="save_new_filter();"', true ); echo '</div>'; @@ -1073,7 +1074,7 @@ if ($perform_event_response) { } if ($ret_val != 0) { - echo "<div style='text-align:left'>"; + echo "<div class='left'>"; echo __('Error executing response'); echo '</div><br>'; } @@ -1105,7 +1106,7 @@ if ($dialogue_event_response) { switch ($event_response['type']) { case 'command': if ($massive) { - echo "<div style='text-align:left'>"; + echo "<div class='left'>"; echo $prompt.sprintf( '(Event #'.$event_id.') '.__( 'Executing command: %s', @@ -1114,16 +1115,16 @@ if ($dialogue_event_response) { ); echo '</div><br>'; - echo "<div id='response_loading_command_".$out_iterator."' style='display:none'>"; + echo "<div id='response_loading_command_".$out_iterator."' class='invisible'>"; echo html_print_image( 'images/spinner.gif', true ); echo '</div>'; - echo "<br><div id='response_out_".$out_iterator."' style='text-align:left'></div>"; + echo "<br><div id='response_out_".$out_iterator."' class='invisible'></div>"; if ($end) { - echo "<br><div id='re_exec_command_".$out_iterator."' style='display:none;'>"; + echo "<br><div id='re_exec_command_".$out_iterator."' class='invisible'>"; html_print_button( __('Execute again'), 'btn_str', @@ -1131,7 +1132,7 @@ if ($dialogue_event_response) { 'execute_event_response(false);', "class='sub next'" ); - echo "<span id='execute_again_loading' style='display:none'>"; + echo "<span id='execute_again_loading' class='invisible'>"; echo html_print_image( 'images/spinner.gif', true @@ -1140,15 +1141,15 @@ if ($dialogue_event_response) { echo '</div>'; } } else { - echo "<div style='text-align:left'>"; + echo "<div class='left'>"; echo $prompt."Executing command: $command"; echo '</div><br>'; - echo "<div id='response_loading_command' style='display:none'>".html_print_image('images/spinner.gif', true).'</div>'; - echo "<br><div id='response_out' style='text-align:left'></div>"; + echo "<div id='response_loading_command' class='invisible'>".html_print_image('images/spinner.gif', true).'</div>'; + echo "<br><div id='response_out' class='left'></div>"; - echo "<br><div id='re_exec_command' style='display:none;'>"; + echo "<br><div id='re_exec_command' class='invisible'>"; html_print_button(__('Execute again'), 'btn_str', false, "perform_response({'target':'".$command."','event_id':".$event_id.",'server_id':".$server_id.'}, '.$response_id.');', "class='sub next'"); echo '</div>'; @@ -1157,7 +1158,7 @@ if ($dialogue_event_response) { case 'url': $command = str_replace('localhost', $_SERVER['SERVER_NAME'], $command); - echo "<iframe src='".$command."' id='divframe' style='width:100%;height:90%;'></iframe>"; + echo "<iframe src='".$command."' id='divframe' class='w100p height_90p'></iframe>"; break; default: @@ -1338,14 +1339,34 @@ if ($get_extended_event) { // Tabs. $tabs = "<ul class=''>"; - $tabs .= "<li><a href='#extended_event_general_page' id='link_general'>".html_print_image('images/lightning_go.png', true).'<span>'.__('General').'</span></a></li>'; + $tabs .= "<li><a href='#extended_event_general_page' id='link_general'>".html_print_image( + 'images/lightning_go.png', + true, + ['class' => 'invert_filter'] + ).'<span>'.__('General').'</span></a></li>'; if (events_has_extended_info($event['id_evento']) === true) { - $tabs .= "<li><a href='#extended_event_related_page' id='link_related'>".html_print_image('images/zoom.png', true).'<span>'.__('Related').'</span></a></li>'; + $tabs .= "<li><a href='#extended_event_related_page' id='link_related'>".html_print_image( + 'images/zoom.png', + true, + ['class' => 'invert_filter'] + ).'<span>'.__('Related').'</span></a></li>'; } - $tabs .= "<li><a href='#extended_event_details_page' id='link_details'>".html_print_image('images/zoom.png', true).'<span>'.__('Details').'</span></a></li>'; - $tabs .= "<li><a href='#extended_event_custom_fields_page' id='link_custom_fields'>".html_print_image('images/custom_field_col.png', true).'<span>'.__('Agent fields').'</span></a></li>'; - $tabs .= "<li><a href='#extended_event_comments_page' id='link_comments'>".html_print_image('images/pencil.png', true).'<span>'.__('Comments').'</span></a></li>'; + $tabs .= "<li><a href='#extended_event_details_page' id='link_details'>".html_print_image( + 'images/zoom.png', + true, + ['class' => 'invert_filter'] + ).'<span>'.__('Details').'</span></a></li>'; + $tabs .= "<li><a href='#extended_event_custom_fields_page' id='link_custom_fields'>".html_print_image( + 'images/custom_field_col.png', + true, + ['class' => 'invert_filter'] + ).'<span>'.__('Agent fields').'</span></a></li>'; + $tabs .= "<li><a href='#extended_event_comments_page' id='link_comments'>".html_print_image( + 'images/pencil.png', + true, + ['class' => 'invert_filter'] + ).'<span>'.__('Comments').'</span></a></li>'; if (!$readonly && ((tags_checks_event_acl( @@ -1362,11 +1383,19 @@ if ($get_extended_event) { $childrens_ids ))) ) { - $tabs .= "<li><a href='#extended_event_responses_page' id='link_responses'>".html_print_image('images/event_responses_col.png', true).'<span>'.__('Responses').'</span></a></li>'; + $tabs .= "<li><a href='#extended_event_responses_page' id='link_responses'>".html_print_image( + 'images/event_responses.png', + true, + ['class' => 'invert_filter'] + ).'<span>'.__('Responses').'</span></a></li>'; } if ($event['custom_data'] != '') { - $tabs .= "<li><a href='#extended_event_custom_data_page' id='link_custom_data'>".html_print_image('images/custom_field_col.png', true).'<span>'.__('Custom data').'</span></a></li>'; + $tabs .= "<li><a href='#extended_event_custom_data_page' id='link_custom_data'>".html_print_image( + 'images/custom_field_col.png', + true, + ['class' => 'invert_filter'] + ).'<span>'.__('Custom data').'</span></a></li>'; } $tabs .= '</ul>'; @@ -1452,14 +1481,14 @@ if ($get_extended_event) { $comments = '<div id="extended_event_comments_page" class="extended_event_pages"></div>'; - $notifications = '<div id="notification_comment_error" style="display:none">'.ui_print_error_message(__('Error adding comment'), '', true).'</div>'; - $notifications .= '<div id="notification_comment_success" style="display:none">'.ui_print_success_message(__('Comment added successfully'), '', true).'</div>'; - $notifications .= '<div id="notification_status_error" style="display:none">'.ui_print_error_message(__('Error changing event status'), '', true).'</div>'; - $notifications .= '<div id="notification_status_success" style="display:none">'.ui_print_success_message(__('Event status changed successfully'), '', true).'</div>'; - $notifications .= '<div id="notification_owner_error" style="display:none">'.ui_print_error_message(__('Error changing event owner'), '', true).'</div>'; - $notifications .= '<div id="notification_owner_success" style="display:none">'.ui_print_success_message(__('Event owner changed successfully'), '', true).'</div>'; + $notifications = '<div id="notification_comment_error" class="invisible">'.ui_print_error_message(__('Error adding comment'), '', true).'</div>'; + $notifications .= '<div id="notification_comment_success" class="invisible">'.ui_print_success_message(__('Comment added successfully'), '', true).'</div>'; + $notifications .= '<div id="notification_status_error" class="invisible">'.ui_print_error_message(__('Error changing event status'), '', true).'</div>'; + $notifications .= '<div id="notification_status_success" class="invisible">'.ui_print_success_message(__('Event status changed successfully'), '', true).'</div>'; + $notifications .= '<div id="notification_owner_error" class="invisible">'.ui_print_error_message(__('Error changing event owner'), '', true).'</div>'; + $notifications .= '<div id="notification_owner_success" class="invisible">'.ui_print_success_message(__('Event owner changed successfully'), '', true).'</div>'; - $loading = '<div id="response_loading" style="display:none">'.html_print_image('images/spinner.gif', true).'</div>'; + $loading = '<div id="response_loading" class="invisible">'.html_print_image('images/spinner.gif', true).'</div>'; $i = 0; $tab['general'] = $i++; @@ -1578,8 +1607,8 @@ if ($get_events_details) { true ); - $out = '<table class="eventtable" style="width:100%;height:100%;padding:0px 0px 0px 0px; border-spacing: 0px; margin: 0px 0px 0px 0px;">'; - $out .= '<tr style="font-size:0px; heigth: 0px; background: #ccc;"><td></td><td></td></tr>'; + $out = '<table class="eventtable eventtable_class"">'; + $out .= '<tr class="tr_eventtable"><td></td><td></td></tr>'; foreach ($events as $event) { switch ($event['estado']) { case 0: @@ -1602,25 +1631,25 @@ if ($get_events_details) { break; } - $out .= '<tr class="'.get_priority_class($event['criticity']).'" style="height: 25px;">'; - $out .= '<td class="'.get_priority_class($event['criticity']).'" style="font-size:7pt" colspan=2>'; + $out .= '<tr class="'.get_priority_class($event['criticity']).' height_25px">'; + $out .= '<td class="'.get_priority_class($event['criticity']).' font_7pt" colspan=2>'; $out .= io_safe_output($event['evento']); $out .= '</td></tr>'; - $out .= '<tr class="'.get_priority_class($event['criticity']).'" style="font-size:0px; height: 25px;">'; - $out .= '<td class="'.get_priority_class($event['criticity']).'" style="width: 18px; text-align:center;">'; - $out .= html_print_image(ui_get_full_url('images/clock.png', false, false, false), true, ['title' => __('Timestamp')], false, true); + $out .= '<tr class="'.get_priority_class($event['criticity']).' font_0px height_25px">'; + $out .= '<td class="'.get_priority_class($event['criticity']).' w18px center">'; + $out .= html_print_image(ui_get_full_url('images/clock.png', false, false, false), true, ['title' => __('Timestamp'), 'class' => 'invert_filter'], false, true); $out .= '</td>'; - $out .= '<td class="'.get_priority_class($event['criticity']).'" style="font-size:7pt">'; + $out .= '<td class="'.get_priority_class($event['criticity']).' font_17pt">'; $out .= date($config['date_format'], $event['utimestamp']); $out .= '</td></tr>'; - $out .= '<tr class="'.get_priority_class($event['criticity']).'" style="font-size:0px; height: 25px;">'; - $out .= '<td class="'.get_priority_class($event['criticity']).'" style="width: 18px; text-align:center;">'; + $out .= '<tr class="'.get_priority_class($event['criticity']).' font_0px height_25px">'; + $out .= '<td class="'.get_priority_class($event['criticity']).' w18px center">'; $out .= html_print_image($img, true, ['title' => $title], false, true); $out .= '</td>'; - $out .= '<td class="'.get_priority_class($event['criticity']).'" style="font-size:7pt">'; + $out .= '<td class="'.get_priority_class($event['criticity']).' font_17pt">'; $out .= $title; if ($event['estado'] == 1) { if (empty($event['id_usuario'])) { @@ -1634,8 +1663,8 @@ if ($get_events_details) { $out .= '</td></tr>'; - $out .= '<tr style="font-size:0px; heigth: 0px; background: #999;"><td></td><td>'; - $out .= '</td></tr><tr style="font-size:0px; heigth: 0px; background: #ccc;"><td></td><td>'; + $out .= '<tr class="tr_ackuser"><td></td><td>'; + $out .= '</td></tr><tr class="tr_eventtable"><td></td><td>'; $out .= '</td></tr>'; } @@ -1662,8 +1691,8 @@ if ($table_events) { 'event_condition', 'AND' ); - echo '<div style="display: flex;" id="div_all_events_24h">'; - echo '<label style="margin: 0 1em 0 2em;"><b>'.__('Show all Events 24h').'</b></label>'; + echo '<div class="flex" id="div_all_events_24h">'; + echo '<label class="mrgn_1_2em"><b>'.__('Show all Events 24h').'</b></label>'; echo html_print_switch( [ 'name' => 'all_events_24h', @@ -1828,7 +1857,7 @@ if ($get_table_response_command) { __('Execute'), 'enter_command', false, - 'class="sub next" style="float:right; margin-top:15px; margin-right:25px;"', + 'class="sub next float-right mrgn_top_15px mrgn_right_25px"', true ); diff --git a/pandora_console/include/ajax/graph.ajax.php b/pandora_console/include/ajax/graph.ajax.php index 92dd2f9e7c..3daacb97d2 100644 --- a/pandora_console/include/ajax/graph.ajax.php +++ b/pandora_console/include/ajax/graph.ajax.php @@ -156,8 +156,8 @@ if ($get_graphs) { $table = ''; $single_table = "<table width='100%' cellpadding=4 cellspacing=4>"; - $single_table .= "<tr id='row_time_lapse' style='' class='datos'>"; - $single_table .= "<td style='font-weight:bold;width: 12%;'>"; + $single_table .= "<tr id='row_time_lapse' class='datos'>"; + $single_table .= "<td class='bolder w12p'>"; $single_table .= __('Time container lapse'); // $single_table .= ui_print_help_tip(__('This is the range, or period of time over which the report renders the information for this report type. For example, a week means data from a week ago from now. '),true); $single_table .= '</td>'; @@ -203,7 +203,7 @@ if ($get_graphs) { 'SELECT alias from tagente WHERE id_agente = '.$sql_modulo[0]['id_agente'] ); - $table .= "<div style='width: 90%'><h4>AGENT ".$sql_alias[0]['alias'].' MODULE '.$sql_modulo[0]['nombre'].'</h4><hr></div>'; + $table .= "<div class='w90p'><h4>AGENT ".$sql_alias[0]['alias'].' MODULE '.$sql_modulo[0]['nombre'].'</h4><hr></div>'; $params = [ 'agent_module_id' => $value['id_agent_module'], @@ -232,7 +232,7 @@ if ($get_graphs) { $height = 300; } - $table .= "<div style='width: 90%'><h4>".$graph[0]['name'].'</h4><hr></div>'; + $table .= "<div class='w90p'><h4>".$graph[0]['name'].'</h4><hr></div>'; $params = [ 'period' => $value['time_lapse'], @@ -312,7 +312,7 @@ if ($get_graphs) { WHERE id_agente = '.$sql_modulo2[0]['id_agente'] ); - $table .= "<div style='width: 90%'><h4>AGENT ".$sql_alias2[0]['alias'].' MODULE '.$sql_modulo2[0]['nombre'].'</h4><hr></div>'; + $table .= "<div class='w90p'><h4>AGENT ".$sql_alias2[0]['alias'].' MODULE '.$sql_modulo2[0]['nombre'].'</h4><hr></div>'; $params = [ 'agent_module_id' => $value2['id_agente_modulo'], diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 8751e7e97f..1734c2094a 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -218,7 +218,7 @@ if (check_login()) { $selection_mode, false, '', - 'style="margin-right: 15px;"', + 'class="mrgn_right_15px"', true ).__('Choose a time from now'); $formtable->data[0][1] = html_print_select( @@ -244,7 +244,7 @@ if (check_login()) { $selection_mode, false, '', - 'style="margin-right: 15px;"', + 'class="mrgn_right_15px"', true ).__('Specify time range'); $formtable->data[1][1] = __('Timestamp from:'); @@ -446,10 +446,10 @@ if (check_login()) { $data[] = date('d F Y h:i:s A', $row['utimestamp']); } else if (is_snapshot_data($row[$attr[0]])) { if ($config['command_snapshot']) { - $imagetab = '<img style="width:100%" src="'; + $imagetab = '<img class="w100p" src="'; $imagetab .= io_safe_input($row[$attr[0]]); $imagetab .= '">'; - $image = '<img style="width:300px" src="'; + $image = '<img class="w300px" src="'; $image .= io_safe_input($row[$attr[0]]); $image .= '">'; $data[] = '<a style="cursor:pointer;" onclick="newTabjs(\''.base64_encode($imagetab).'\')">'.$image.'</a>'; @@ -1049,7 +1049,7 @@ if (check_login()) { if (($module['id_modulo'] != 1) && ($module['id_tipo_modulo'] != 100)) { if ($agent_w) { if ($module['flag'] == 0) { - $data[0] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&id_agente_modulo='.$module['id_agente_modulo'].'&flag=1&refr=60">'.html_print_image('images/target.png', true, ['border' => '0', 'title' => __('Force')]).'</a>'; + $data[0] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&id_agente_modulo='.$module['id_agente_modulo'].'&flag=1&refr=60">'.html_print_image('images/target.png', true, ['border' => '0', 'title' => __('Force'), 'class' => 'invert_filter' ]).'</a>'; } else { $data[0] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&id_agente_modulo='.$module['id_agente_modulo'].'&refr=60">'.html_print_image('images/refresh.png', true, ['border' => '0', 'title' => __('Refresh')]).'</a>'; } @@ -1083,7 +1083,7 @@ if (check_login()) { $img = 'images/policies_brick.png'; $title = '('.__('Adopted').') '.$name_policy; } else { - $img = 'images/policies.png'; + $img = 'images/policies_mc.png'; $title = $name_policy; } } else { @@ -1209,7 +1209,15 @@ if (check_login()) { $link = "winopeng_var('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&id='.$module['id_agente_modulo'].'&refresh='.SECONDS_10MINUTES.'&'."draw_events=$draw_events', 'day_".$win_handle."', 800, 480)"; if (!is_snapshot_data($module['datos'])) { - $data[8] .= '<a href="javascript:'.$link.'">'.html_print_image('images/chart_curve.png', true, ['border' => '0', 'alt' => '']).'</a>   '; + $data[8] .= '<a href="javascript:'.$link.'">'.html_print_image( + 'images/chart.png', + true, + [ + 'border' => '0', + 'alt' => '', + 'class' => 'invert_filter', + ] + ).'</a>   '; } $server_name = ''; @@ -1218,7 +1226,15 @@ if (check_login()) { // Escape the double quotes that may have the name of the module. $modules_get_agentmodule_name = str_replace('"', '\"', $modules_get_agentmodule_name); - $data[8] .= "<a href='javascript: ".'show_module_detail_dialog('.$module['id_agente_modulo'].', '.$id_agente.', "'.$server_name.'", '.(0).', '.SECONDS_1DAY.', " '.$modules_get_agentmodule_name."\")'>".html_print_image('images/binary.png', true, ['border' => '0', 'alt' => '']).'</a>'; + $data[8] .= "<a href='javascript: ".'show_module_detail_dialog('.$module['id_agente_modulo'].', '.$id_agente.', "'.$server_name.'", '.(0).', '.SECONDS_1DAY.', " '.$modules_get_agentmodule_name."\")'>".html_print_image( + 'images/binary.png', + true, + [ + 'border' => '0', + 'alt' => '', + 'class' => 'invert_filter', + ] + ).'</a>'; } if ($module['estado'] == 3) { diff --git a/pandora_console/include/ajax/rolling_release.ajax.php b/pandora_console/include/ajax/rolling_release.ajax.php index 43ceaa5f1d..1ce72167a0 100644 --- a/pandora_console/include/ajax/rolling_release.ajax.php +++ b/pandora_console/include/ajax/rolling_release.ajax.php @@ -50,9 +50,9 @@ if (is_ajax()) { $error_file = fopen($config['homedir'].'/extras/mr/error.txt', 'w'); $message = '<div>'; - $message .= "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>"; - $message .= "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>"; - $message .= "<p style='font-family:Verdana; font-size:12pt;'>".__('The sql file contains a dangerous query').'</p></div>'; + $message .= "<div class='w25p float-left'><img class='pdd_t_20px pdd_l_20px' src='images/icono_error_mr.png'></div>"; + $message .= "<div class='w75p float-left'><h3><strong class='font_13pt verdana'>ERROR</strong></h3>"; + $message .= "<p class='font_12pt verdana'>".__('The sql file contains a dangerous query').'</p></div>'; $message .= '</div>'; fwrite($error_file, $message); @@ -93,9 +93,9 @@ if (is_ajax()) { $error_file = fopen($config['homedir'].'/extras/mr/error.txt', 'w'); $message = '<div>'; - $message .= "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>"; - $message .= "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>"; - $message .= "<p style='font-family:Verdana; font-size:12pt;'>".__('An error occurred while updating the database schema to the minor release ').$number.'</p></div>'; + $message .= "<div class='w25p float-left'><img class='pdd_t_20px pdd_l_20px' src='images/icono_error_mr.png'></div>"; + $message .= "<div class='w75p float-left'><h3><strong class='font_13pt verdana'>ERROR</strong></h3>"; + $message .= "<p class='font_12pt verdana'>".__('An error occurred while updating the database schema to the minor release ').$number.'</p></div>'; $message .= '</div>'; fwrite($error_file, $message); @@ -106,9 +106,9 @@ if (is_ajax()) { $error_file = fopen($config['homedir'].'/extras/mr/error.txt', 'w'); $message = '<div>'; - $message .= "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>"; - $message .= "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>"; - $message .= "<p style='font-family:Verdana; font-size:12pt;'>".__('The directory ').$dir.__(' should have read permissions in order to update the database schema').'</p></div>'; + $message .= "<div class='w25p float-left'><img class='pdd_t_20px pdd_l_20px' src='images/icono_error_mr.png'></div>"; + $message .= "<div class='w75p float-left'><h3><strong class='font_13pt verdana'>ERROR</strong></h3>"; + $message .= "<p class='font_12pt verdana'>".__('The directory ').$dir.__(' should have read permissions in order to update the database schema').'</p></div>'; $message .= '</div>'; fwrite($error_file, $message); @@ -118,9 +118,9 @@ if (is_ajax()) { $error_file = fopen($config['homedir'].'/extras/mr/error.txt', 'w'); $message = '<div>'; - $message .= "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>"; - $message .= "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>"; - $message .= "<p style='font-family:Verdana; font-size:12pt;'>".__('The directory ').$dir.__(' does not exist').'</p></div>'; + $message .= "<div class='w25p float-left'><img class='pdd_t_20px pdd_l_20px' src='images/icono_error_mr.png'></div>"; + $message .= "<div class='w75p float-left'><h3><strong class='font_13pt verdana'>ERROR</strong></h3>"; + $message .= "<p class='font_12pt verdana'>".__('The directory ').$dir.__(' does not exist').'</p></div>'; $message .= '</div>'; fwrite($error_file, $message); diff --git a/pandora_console/include/ajax/snmp_browser.ajax.php b/pandora_console/include/ajax/snmp_browser.ajax.php index dc2bed5d6a..55dd7dd45a 100644 --- a/pandora_console/include/ajax/snmp_browser.ajax.php +++ b/pandora_console/include/ajax/snmp_browser.ajax.php @@ -107,36 +107,36 @@ try { ); // Div for error/succes dialog. - $output = '<div id="snmp_result_msg" style="display:none"></div>'; + $output = '<div id="snmp_result_msg" class="invisible"></div>'; // Dialog error. - $output .= '<div id="dialog_error" style="display:none" title="'.__('SNMP modules').'">'; + $output .= '<div id="dialog_error" class="invisible" title="'.__('SNMP modules').'">'; $output .= '<div>'; - $output .= "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>"; - $output .= "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>"; - $output .= "<p style='font-family:Verdana; font-size:12pt;margin-bottom: 0px'>".__('Error creating the following modules:').'</p>'; - $output .= "<p id='error_text' style='font-family:Verdana; font-size:12pt;'></p>"; + $output .= "<div class='w25p float-left'><img class='pdd_l_20px pdd_t_20px' src='images/icono_error_mr.png'></div>"; + $output .= "<div class='w75p float-left'><h3><strong class='verdana font_13pt'>ERROR</strong></h3>"; + $output .= "<p class='verdana font_12pt mrgn_btn_0px'>".__('Error creating the following modules:').'</p>'; + $output .= "<p id='error_text' class='verdana font_12pt;'></p>"; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; // Dialog success. - $output .= '<div id="dialog_success" style="display: none" title="'.__('SNMP modules').'">'; + $output .= '<div id="dialog_success" class="invisible" title="'.__('SNMP modules').'">'; $output .= '<div>'; - $output .= "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_exito_mr.png'></div>"; - $output .= "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>"; - $output .= "<p style='font-family:Verdana; font-size:12pt;'>".__('Modules successfully created').'</p>'; + $output .= "<div class='w25p float-left'><img class='pdd_l_20px pdd_t_20px' src='images/icono_exito_mr.png'></div>"; + $output .= "<div class='w75p float-left'><h3><strong class='verdana font_13pt'>SUCCESS</strong></h3>"; + $output .= "<p class='verdana font_12pt'>".__('Modules successfully created').'</p>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; // Dialog no agent selected. - $output .= '<div id="dialog_no_agents_selected" style="display:none" title="'.__('SNMP modules').'">'; + $output .= '<div id="dialog_no_agents_selected" class="invisible" title="'.__('SNMP modules').'">'; $output .= '<div>'; - $output .= "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>"; - $output .= "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>"; - $output .= "<p style='font-family:Verdana; font-size:12pt;margin-bottom: 0px'>".__('Module must be applied to an agent or a policy').'</p>'; - $output .= "<p id='error_text' style='font-family:Verdana; font-size:12pt;'></p>"; + $output .= "<div class='w25p float-left'><img class='pdd_l_20px pdd_t_20px' src='images/icono_error_mr.png'></div>"; + $output .= "<div class='w75p float-left'><h3><strong class='verdana font_13pt'>ERROR</strong></h3>"; + $output .= "<p class='verdana font_12pt mrgn_btn_0px'>".__('Module must be applied to an agent or a policy').'</p>'; + $output .= "<p id='error_text' class='verdana font_12pt'></p>"; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; diff --git a/pandora_console/include/ajax/tree.ajax.php b/pandora_console/include/ajax/tree.ajax.php index 9874f98e48..27ce2fc7d6 100644 --- a/pandora_console/include/ajax/tree.ajax.php +++ b/pandora_console/include/ajax/tree.ajax.php @@ -141,7 +141,7 @@ if (is_ajax()) { include_once __DIR__.'/../styles/progress.css'; echo '</style>'; - echo '<div class="left_align">'; + echo '<div class="left_align backgrund_primary_important">'; if (!empty($id) && !empty($type)) { switch ($type) { case 'agent': diff --git a/pandora_console/include/auth/ldap.php b/pandora_console/include/auth/ldap.php index a1ae786718..9e25b135b3 100644 --- a/pandora_console/include/auth/ldap.php +++ b/pandora_console/include/auth/ldap.php @@ -34,7 +34,7 @@ if (!isset($config)) { <link rel="stylesheet" href="../styles/pandora.css" type="text/css"> </head> <body> - <div id="main" style="float:left; margin-left: 100px"> + <div id="main" class="float-left mrgn_lft_100px"> <div align="center"> <div id="login_f"> <h1 id="log_f" class="error">You cannot access this file</h1> diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index d8223496b7..f73302de03 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -34,7 +34,7 @@ if (!isset($config)) { <link rel="stylesheet" href="../styles/pandora.css" type="text/css"> </head> <body> - <div id="main" style="float:left; margin-left: 100px"> + <div id="main" class="float-left mrgn_lft_100px"> <div align="center"> <div id="login_f"> <h1 id="log_f" class="error">You cannot access this file</h1> diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php index c702dd9065..e0a56ea369 100644 --- a/pandora_console/include/class/AgentWizard.class.php +++ b/pandora_console/include/class/AgentWizard.class.php @@ -461,11 +461,11 @@ class AgentWizard extends HTML } // Lodaing div. - echo '<div style="margin-top: 20px;" class="loading-wizard"></div>'; + echo '<div class="loading-wizard mrgn_top_20px"></div>'; // Modal Div. - echo '<div style="display:none;" id="modal_agent_wizard"></div>'; - echo '<div style="display:none;" id="msg"></div>'; + echo '<div class="invisible" id="modal_agent_wizard"></div>'; + echo '<div class="invisible" id="msg"></div>'; // Load integrated JS. $this->loadJS(); @@ -1277,27 +1277,39 @@ class AgentWizard extends HTML $img_server = html_print_image( 'images/satellite.png', true, - ['title' => __('Enterprise Satellite server')] + [ + 'title' => __('Enterprise Satellite server'), + 'class' => 'invert_filter', + ] ); } else { if ($module['execution_type'] == EXECUTION_TYPE_PLUGIN) { $img_server = html_print_image( 'images/plugin.png', true, - ['title' => __('Plugin server')] + [ + 'title' => __('Plugin server'), + 'class' => 'invert_filter', + ] ); } else { if ($this->protocol === 'wmi') { $img_server = html_print_image( 'images/wmi.png', true, - ['title' => __('WMI server')] + [ + 'title' => __('WMI server'), + 'class' => 'invert_filter', + ] ); } else { $img_server = html_print_image( - 'images/network.png', + 'images/op_network.png', true, - ['title' => __('Network server')] + [ + 'title' => __('Network server'), + 'class' => 'invert_filter', + ] ); } } @@ -3737,7 +3749,7 @@ class AgentWizard extends HTML } $table = new StdClass(); - $table->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;background: white;'; + $table->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;'; $table->rowid = []; $table->data = []; @@ -3746,9 +3758,9 @@ class AgentWizard extends HTML $table->width = '100%'; $table->class = 'info_table'; // Subheaders for Warning and Critical columns. - $subheaders = '<span style=\'font-weight:300; margin-left: 0.8em\'>Min.</span>'; - $subheaders .= '<span style=\'font-weight:300; margin-left: 1.6em\'>Max.</span>'; - $subheaders .= '<span style=\'font-weight:300; margin-left: 2em\'>Inv.</span>'; + $subheaders = '<span class=\'font_w300 mrgn_lft_0.8em\'>Min.</span>'; + $subheaders .= '<span class=\'font_w300 mrgn_lft_1.6em\'>Max.</span>'; + $subheaders .= '<span class=\'font_w300 mrgn_lft_2em\'>Inv.</span>'; // Warning header. $warning_header = html_print_div( [ @@ -3905,7 +3917,7 @@ class AgentWizard extends HTML 1, 20, $module['description'], - 'form=\'form-create-modules\' style=\'min-height: 50px;\'', + 'form=\'form-create-modules\' class=\'min-height-50px\'', true ); } @@ -5153,7 +5165,7 @@ class AgentWizard extends HTML $('#form-create-modules').remove(); $('.textodialogo').remove(); $('.loading-wizard') - .html('<center><span style="font-size:25px;">Loading...</span><img style="width:25px;heigth:25px;" src="' + hack_meta + 'images/spinner.gif"></center>'); + .html('<center><span class="font_25px">Loading...</span><img class="w25px height_25px" src="' + hack_meta + 'images/spinner.gif"></center>'); }); }); diff --git a/pandora_console/include/class/AgentsAlerts.class.php b/pandora_console/include/class/AgentsAlerts.class.php index f6d1000c9d..41a75ffa8a 100644 --- a/pandora_console/include/class/AgentsAlerts.class.php +++ b/pandora_console/include/class/AgentsAlerts.class.php @@ -321,8 +321,8 @@ class AgentsAlerts extends HTML $table2->data[0][1] .= html_print_anchor( [ 'href' => 'index.php?sec=galertas&sec2=godmode/alerts/configure_alert_action&pure='.$this->pure, - 'style' => 'margin-left:5px;', - 'content' => html_print_image('images/add.png', true).'<span style="margin-left:5px;vertical-align:middle;">'.__('Create Action').'</span>', + 'class' => 'mrgn_lft_5px', + 'content' => html_print_image('images/add.png', true).'<span class="mrgn_lft_5px vertical_middle">'.__('Create Action').'</span>', ], true ); @@ -369,7 +369,7 @@ class AgentsAlerts extends HTML [ 'href' => 'index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template&pure='.$this->pure, 'style' => 'margin-left:5px;', - 'content' => html_print_image('images/add.png', true).'<span style="margin-left:5px;vertical-align:middle;">'.__('Create Template').'</span>', + 'content' => html_print_image('images/add.png', true).'<span class="mrgn_lft_5px vertical_middle">'.__('Create Template').'</span>', ], true ); @@ -651,7 +651,7 @@ class AgentsAlerts extends HTML $alias = db_get_row('tagente', 'id_agente', $agent['id_agente']); echo '<tr>'; // Name of the agent. - echo '<td style="font-weight:bold;text-align: right;">'.$alias['alias'].'</td>'; + echo '<td class="bolder right">'.$alias['alias'].'</td>'; // Alerts of the agent. foreach ($templates as $tid => $tname) { $anyfired = 0; @@ -925,7 +925,7 @@ class AgentsAlerts extends HTML $actionText = ''; if (!empty($actions)) { - $actionText = '<div style="margin-left: 10px;"><ul class="action_list">'; + $actionText = '<div class="mrgn_lft_10px"><ul class="action_list">'; foreach ($actions as $action) { $actionText .= '<div><span class="action_name"><li>'.$action['name']; if ($action['fires_min'] != $action['fires_max']) { diff --git a/pandora_console/include/class/ConfigPEN.class.php b/pandora_console/include/class/ConfigPEN.class.php index 47a422f33b..5f5e692077 100644 --- a/pandora_console/include/class/ConfigPEN.class.php +++ b/pandora_console/include/class/ConfigPEN.class.php @@ -248,7 +248,10 @@ class ConfigPEN extends HTML $tmp->options .= html_print_image( 'images/eye.png', true, - ['title' => __('Show')] + [ + 'title' => __('Show'), + 'class' => 'invert_filter', + ] ); $tmp->options .= '</a>'; $tmp->options .= '<a href="javascript:" onclick="deletePEN(\''; @@ -257,7 +260,10 @@ class ConfigPEN extends HTML $tmp->options .= html_print_image( 'images/cross.png', true, - ['title' => __('Delete')] + [ + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] ); $tmp->options .= '</a>'; @@ -633,9 +639,9 @@ class ConfigPEN extends HTML } // Auxiliar div. - $output .= '<div id="modal" style="display: none"></div>'; - $output .= '<div id="msg" style="display: none"></div>'; - $output .= '<div id="aux" style="display: none"></div>'; + $output .= '<div id="modal" class="invisible"></div>'; + $output .= '<div id="msg" class="invisible"></div>'; + $output .= '<div id="aux" class="invisible"></div>'; // Create button. $output .= parent::printInput( diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 9bbfe600c7..7f5329d8e5 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -1566,7 +1566,7 @@ class ConsoleSupervisor [ 'type' => 'NOTIF.PHP.VERSION', 'title' => __('PHP UPDATE REQUIRED'), - 'message' => __('For a correct operation of PandoraFMS, PHP must be updated to version 7.0 or higher.').'<br>'.__('Otherwise, functionalities will be lost.').'<br>'."<ol><li style='color: #676767'>".__('Report download in PDF format').'</li>'."<li style='color: #676767'>".__('Emails Sending').'</li><li style="color: #676767">'.__('Metaconsole Collections').'</li><li style="color: #676767">...</li></ol>', + 'message' => __('For a correct operation of PandoraFMS, PHP must be updated to version 7.0 or higher.').'<br>'.__('Otherwise, functionalities will be lost.').'<br>'."<ol><li class='color_67'>".__('Report download in PDF format').'</li>'."<li class='color_67'>".__('Emails Sending').'</li><li class="color_67">'.__('Metaconsole Collections').'</li><li class="color_67">...</li></ol>', 'url' => $url, ] ); @@ -2109,7 +2109,7 @@ class ConsoleSupervisor [ 'type' => 'NOTIF.UPDATEMANAGER.REGISTRATION', 'title' => __('This instance is not registered in the Update manager section'), - 'message' => __('Click <a style="font-weight:bold; text-decoration:underline" href="javascript: force_run_register();"> here</a> to start the registration process'), + 'message' => __('Click <a class="bolder underline" href="javascript: force_run_register();"> here</a> to start the registration process'), 'url' => 'javascript: force_run_register();', ] ); @@ -2275,7 +2275,7 @@ class ConsoleSupervisor 'New %s Console update', get_product_name() ), - 'message' => __('There is a new update available. Please<a style="font-weight:bold;" href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online').'"> go to Administration:Setup:Update Manager</a> for more details.'), + 'message' => __('There is a new update available. Please<a class="bolder" href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online').'"> go to Administration:Setup:Update Manager</a> for more details.'), 'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online'), ] ); @@ -2311,7 +2311,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.UPDATEMANAGER.MINOR', 'title' => __('Minor release/s available'), 'message' => __( - 'There is one or more minor releases available. <a style="font-size:8pt;font-style:italic;" target="blank" href="%s">.About minor release update</a>.', + 'There is one or more minor releases available. <a id="aviable_updates" target="blank" href="%s">.About minor release update</a>.', $url ), 'url' => ui_get_full_url('index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=online'), @@ -2341,7 +2341,7 @@ class ConsoleSupervisor if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { $message_conf_cron .= __('Discovery relies on an appropriate cron setup.'); $message_conf_cron .= '. '.__('Please, add the following line to your crontab file:'); - $message_conf_cron .= '<pre>* * * * * <user> wget -q -O - --no-check-certificate '; + $message_conf_cron .= '<b><pre class=""ui-dialog>* * * * * <user> wget -q -O - --no-check-certificate '; $message_conf_cron .= str_replace( ENTERPRISE_DIR.'/meta/', '', diff --git a/pandora_console/include/class/CredentialStore.class.php b/pandora_console/include/class/CredentialStore.class.php index 196e039c50..375f9cb64c 100644 --- a/pandora_console/include/class/CredentialStore.class.php +++ b/pandora_console/include/class/CredentialStore.class.php @@ -837,9 +837,9 @@ class CredentialStore extends Wizard } // Auxiliar div. - $modal = '<div id="modal" style="display: none"></div>'; - $msg = '<div id="msg" style="display: none"></div>'; - $aux = '<div id="aux" style="display: none"></div>'; + $modal = '<div id="modal" class="invisible"></div>'; + $msg = '<div id="msg" class="invisible"></div>'; + $aux = '<div id="aux" class="invisible"></div>'; echo $modal.$msg.$aux; @@ -1079,7 +1079,7 @@ class CredentialStore extends Wizard item.options += '<a href="javascript:" onclick="delete_key(\''; item.options += id; - item.options += '\')" ><?php echo html_print_image('images/cross.png', true, ['title' => __('Delete')]); ?></a>'; + item.options += '\')" ><?php echo html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']); ?></a>'; } /** diff --git a/pandora_console/include/class/CustomNetScan.class.php b/pandora_console/include/class/CustomNetScan.class.php index e586034ac4..2d22d1b7fc 100644 --- a/pandora_console/include/class/CustomNetScan.class.php +++ b/pandora_console/include/class/CustomNetScan.class.php @@ -648,16 +648,15 @@ class CustomNetScan extends Wizard ); $form['inputs'][] = [ - 'label' => __('Explanation').'<span id="spinner_recon_script" style="display: none;">'.html_print_image('images/spinner.gif', true).'</span>', + 'label' => __('Explanation').'<span id="spinner_recon_script" class="invisible">'.html_print_image('images/spinner.gif', true).'</span>', 'arguments' => [ - 'type' => 'textarea', - 'rows' => 4, - 'columns' => 60, - 'name' => 'explanation', - 'value' => $explanation, - 'return' => true, - 'attributes' => 'style="width: 388px;"', - 'class' => 'discovery_textarea_input', + 'type' => 'textarea', + 'rows' => 4, + 'columns' => 60, + 'name' => 'explanation', + 'value' => $explanation, + 'return' => true, + 'class' => 'discovery_textarea_input w388px', ], ]; diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index 0460ffa344..d1bb2c3572 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -138,7 +138,10 @@ class Diagnostics extends Wizard $pdf_img = html_print_image( 'images/pdf.png', true, - ['title' => __('Export to PDF')] + [ + 'title' => __('Export to PDF'), + 'class' => 'invert_filter', + ] ); $header_buttons = [ 'csv' => [ @@ -278,7 +281,7 @@ class Diagnostics extends Wizard break; } - $return .= '<div style="margin-bottom: 30px;">'; + $return .= '<div class="mrgn_btn_30px">'; $return .= $this->printData($method, $title); $return .= '</div>'; } diff --git a/pandora_console/include/class/HTML.class.php b/pandora_console/include/class/HTML.class.php index 820062d7bc..1b5d1e0e2b 100644 --- a/pandora_console/include/class/HTML.class.php +++ b/pandora_console/include/class/HTML.class.php @@ -631,18 +631,18 @@ class HTML if ($input['arguments']['inline'] != 'true') { $output .= '<div class="edit_discovery_input">'; } else { - $output .= '<div style="display: flex; margin-bottom: 25px; flex-wrap: wrap;">'; + $output .= '<div class="flex mrgn_btn_25px wrap">'; if (!isset($input['extra'])) { - $output .= '<div style="width: 50%;">'; + $output .= '<div class="w50p">'; } if (isset($input['extra'])) { - $output .= '<div style="display: flex; margin-right:10px;">'; + $output .= '<div class="flex mrgn_right_10px">'; } } if ($input['arguments']['inline'] == 'true' && isset($input['extra'])) { - $output .= '<div style="margin-right:10px;">'; + $output .= '<div class="mrgn_right_10px">'; } $output .= '<div class="label_select">'; @@ -663,11 +663,11 @@ class HTML $output .= '</div>'; } else if ($input['arguments']['inline'] == 'true') { if (isset($input['extra'])) { - $output .= '<div style="">'; - $output .= '<div style="float: left;">'; + $output .= '<div >'; + $output .= '<div class="float-left">'; } else { - $output .= '<div style="width:50%;">'; - $output .= '<div style="float: right;">'; + $output .= '<div class="w50p">'; + $output .= '<div class="float-right">'; } $output .= self::printInput($input['arguments']); @@ -893,7 +893,7 @@ class HTML if ($first_block_printed === true) { // If first form block has been placed, then close it before starting a new one. $output .= '</div>'; - $output .= '<div class="white_box" style="margin-top: 30px;">'; + $output .= '<div class="white_box mrgn_top_30px">'; } else { $output .= '<div class="white_box">'; } diff --git a/pandora_console/include/class/HelpFeedBack.class.php b/pandora_console/include/class/HelpFeedBack.class.php index 77b54794ab..2c6cd0e677 100644 --- a/pandora_console/include/class/HelpFeedBack.class.php +++ b/pandora_console/include/class/HelpFeedBack.class.php @@ -114,7 +114,7 @@ class HelpFeedBack extends Wizard echo '<div class="help_feedback">'; // Load feedback form. echo $this->loadFeedbackForm(); - echo '</div><div id="back" style="display: none"></div>'; + echo '</div><div id="back" class="invisible"></div>'; } diff --git a/pandora_console/include/class/ManageNetScanScripts.class.php b/pandora_console/include/class/ManageNetScanScripts.class.php index 261467d983..a5d0ab355c 100644 --- a/pandora_console/include/class/ManageNetScanScripts.class.php +++ b/pandora_console/include/class/ManageNetScanScripts.class.php @@ -381,6 +381,8 @@ class ManageNetScanScripts extends Wizard */ private function printListNetScanScripts(array $msg) { + global $config; + if (count($msg) > 0) { if ($msg['error'] === 1) { ui_print_error_message($msg['msg']); @@ -413,7 +415,7 @@ class ManageNetScanScripts extends Wizard } echo '<tr>'; - echo "<td class='".$tdcolor."' style='min-width: 100px;'>"; + echo "<td class='".$tdcolor." mw100px''>"; echo '<b><a href="'.$url.'&page=1&id_script='.$row['id_recon_script'].'">'; echo $row['name']; echo '</a></b></td>'; @@ -435,7 +437,7 @@ class ManageNetScanScripts extends Wizard echo '<form method="post" onsubmit="if (! confirm (\''.__('Are you sure delete script?').'\')) return false" - style="display: inline;">'; + class="display_in">'; echo html_print_input_hidden('page', 0, true); echo html_print_input_hidden( 'operation_scp', @@ -455,6 +457,7 @@ class ManageNetScanScripts extends Wizard true, [ 'title' => __('Delete Script'), + 'class' => 'invert_filter', ] ); echo '</form>'; @@ -465,7 +468,7 @@ class ManageNetScanScripts extends Wizard echo "<form name=reconscript method='post' action='".$url."'>"; echo html_print_input_hidden('page', 1, true); - echo "<input name='crtbutton' style='float:right;' type='submit' class='sub next' value='".__('Add')."'>"; + echo "<input name='crtbutton' type='submit' class='sub next float-right' value='".__('Add')."'>"; echo '</form>'; } else { ui_print_info_message( @@ -602,7 +605,7 @@ class ManageNetScanScripts extends Wizard $datam = []; $datam[0] = __('Description'); - $datam[0] .= "<span style='font-weight: normal'> ( "; + $datam[0] .= "<span class='normal'> ( "; $datam[0] .= $macro_name; $datam[0] .= ' )</span>'; $datam[0] .= html_print_input_hidden( @@ -631,7 +634,7 @@ class ManageNetScanScripts extends Wizard } $datam[2] = __('Default value'); - $datam[2] .= "<span style='font-weight: normal'> ( "; + $datam[2] .= "<span class='normal'> ( "; $datam[2] .= $macro_name; $datam[2] .= ' ) </span>'; $datam[3] = html_print_input_text_extended( @@ -685,7 +688,7 @@ class ManageNetScanScripts extends Wizard $datam = []; $datam[0] = __('Help'); - $datam[0] .= "<span style='font-weight: normal'> ( "; + $datam[0] .= "<span class='normal'> ( "; $datam[0] .= $macro_name; $datam[0] .= ' )</span><br><br><br>'; @@ -696,7 +699,7 @@ class ManageNetScanScripts extends Wizard 6, 100, $macro_help_value, - 'class="command_advanced_conf" style="width: 97%;"'.$tadisabled, + 'class="command_advanced_conf w97p"'.$tadisabled, true ); @@ -717,7 +720,7 @@ class ManageNetScanScripts extends Wizard if (!$locked) { $datam = []; - $datam[0] = '<span style="font-weight: bold">'; + $datam[0] = '<span class="bolder">'; $datam[0] .= __('Add macro').'</span>'; $datam[0] .= '<a href="javascript:new_macro(\'table-form-recon_\');update_preview();">'; $datam[0] .= html_print_image( @@ -725,9 +728,9 @@ class ManageNetScanScripts extends Wizard true ); $datam[0] .= '</a>'; - $datam[0] .= '<div id="next_macro" style="display:none">'; + $datam[0] .= '<div id="next_macro" class="invisible">'; $datam[0] .= $i.'</div>'; - $datam[0] .= '<div id="next_row" style="display:none">'; + $datam[0] .= '<div id="next_row" class="invisible">'; $datam[0] .= $next_name_number.'</div>'; $delete_macro_style = ''; diff --git a/pandora_console/include/class/ModuleTemplates.class.php b/pandora_console/include/class/ModuleTemplates.class.php index 564ba14d5f..ebacac7196 100644 --- a/pandora_console/include/class/ModuleTemplates.class.php +++ b/pandora_console/include/class/ModuleTemplates.class.php @@ -874,7 +874,7 @@ class ModuleTemplates extends HTML $table = new StdClasS(); $table->class = 'databox data'; $table->width = '75%'; - $table->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;background: white;'; + $table->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;'; $table->rowid = []; $table->data = []; @@ -888,7 +888,7 @@ class ModuleTemplates extends HTML $table->head[1] = __('Name'); $table->head[2] = __('Description'); - $table->head[3] = '<span style="margin-right:7%;">'.__('Action').'</span>'; + $table->head[3] = '<span class="mrgn_right_7p">'.__('Action').'</span>'; $table->size = []; $table->size[0] = '20px'; $table->size[2] = '65%'; @@ -911,7 +911,10 @@ class ModuleTemplates extends HTML $row['id_np'], '', true, - ['onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;'] + [ + 'onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;', + 'class' => 'invert_filter', + ] ); $data[3] .= html_print_input_image( 'export_profile', @@ -919,17 +922,20 @@ class ModuleTemplates extends HTML $row['id_np'], '', true, - ['title' => 'Export tdaso CSV'] + [ + 'title' => 'Export tdaso CSV', + 'class' => 'invert_filter', + ] ); - $data[3] = '<a href="'.$this->baseUrl.'&action=delete&id_np='.$row['id_np'].'" onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'; - $data[3] .= '<a href="'.$this->baseUrl.'&action=export&id_np='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV')]).'</a>'; + $data[3] = '<a href="'.$this->baseUrl.'&action=delete&id_np='.$row['id_np'].'" onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'; + $data[3] .= '<a href="'.$this->baseUrl.'&action=export&id_np='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV'), 'class' => 'invert_filter']).'</a>'; array_push($table->data, $data); } html_print_table($table); - $output = '<div style="float:right;" class="">'; + $output = '<div class="float-right">'; $form = [ 'method' => 'POST', @@ -987,6 +993,8 @@ class ModuleTemplates extends HTML */ public function moduleTemplateForm() { + global $config; + $createNewTemplate = ($this->id_np == 0) ? true : false; if ($createNewTemplate) { @@ -1162,7 +1170,7 @@ class ModuleTemplates extends HTML $blockComponentList = chop($blockComponentList, ','); // Title of Block. - $blockTitle = '<div style="padding-top: 8px;">'; + $blockTitle = '<div class="pdd_t_8px">'; $blockTitle .= $blockTable['name']; $blockTitle .= '<div class="white_table_header_checkbox">'; $blockTitle .= html_print_input_image( @@ -1173,6 +1181,7 @@ class ModuleTemplates extends HTML true, [ 'title' => __('Delete this block'), + 'class' => 'invert_filter', 'onclick' => 'if(confirm(\''.__('Do you want delete this block?').'\')){deleteModuleTemplate(\'block\',\''.$blockComponentList.'\')};return false;', ] ); @@ -1182,7 +1191,7 @@ class ModuleTemplates extends HTML $table = new StdClasS(); $table->class = 'databox data'; $table->width = '75%'; - $table->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;background: white;'; + $table->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;'; $table->rowid = []; $table->data = []; @@ -1193,10 +1202,10 @@ class ModuleTemplates extends HTML $table->head = []; $table->head[0] = __('Module Name'); - $table->head[1] = '<span style="margin-left: 0">'.__('Format').'</span>'; - $table->head[2] = '<span style="text-align: center">'.__('Type').'</span>'; + $table->head[1] = '<span class="mrgn_lft_0px">'.__('Format').'</span>'; + $table->head[2] = '<span class="center">'.__('Type').'</span>'; $table->head[3] = __('Description'); - $table->head[4] = '<span style="float:right;margin-right:1.2em;">'.__('Delete').'</span>'; + $table->head[4] = '<span class="float-right mrgn_right_1.2em">'.__('Delete').'</span>'; $table->size = []; $table->size[0] = '15%'; @@ -1218,7 +1227,10 @@ class ModuleTemplates extends HTML $formatInfo = html_print_image( 'images/network.png', true, - ['title' => __('Network module')] + [ + 'title' => __('Network module'), + 'class' => 'invert_filter', + ] ); break; @@ -1226,7 +1238,10 @@ class ModuleTemplates extends HTML $formatInfo = html_print_image( 'images/wmi.png', true, - ['title' => __('WMI module')] + [ + 'title' => __('WMI module'), + 'class' => 'invert_filter', + ] ); break; @@ -1234,7 +1249,10 @@ class ModuleTemplates extends HTML $formatInfo = html_print_image( 'images/plugin.png', true, - ['title' => __('Plug-in module')] + [ + 'title' => __('Plug-in module'), + 'class' => 'invert_filter', + ] ); break; @@ -1260,6 +1278,7 @@ class ModuleTemplates extends HTML true, [ 'title' => __('Delete this module'), + 'class' => 'invert_filter', 'onclick' => 'if(confirm(\''.__('Do you want delete this module?').'\')){deleteModuleTemplate(\'module\','.$module['component_id'].')};return false;', ] ); @@ -1287,8 +1306,8 @@ class ModuleTemplates extends HTML ); if ($createNewTemplate === false) { - echo '<div style="display:none;" id="modal"></div>'; - echo '<div style="display:none;" id="msg"></div>'; + echo '<div class="invisible" id="modal"></div>'; + echo '<div class="invisible" id="msg"></div>'; } $this->printGoBackButton($this->baseUrl); diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index f76eb9c1bf..831c15d474 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -2837,16 +2837,16 @@ class NetworkMap */ public function loadSimpleInterface() { - $output = '<div id="open_version_dialog" style="display: none;">'; + $output = '<div id="open_version_dialog" class="invisible">'; $output .= __( 'In the Open version of %s can not be edited nodes or map', get_product_name() ); $output .= '</div>'; - $output .= '<div id="dialog_node_edit" style="display: none;" title="'; + $output .= '<div id="dialog_node_edit" class="invisible" title="'; $output .= __('Edit node').'">'; - $output .= '<div style="text-align: left; width: 100%;">'; + $output .= '<div class="left w100p">'; $table = new StdClass(); $table->id = 'node_details'; @@ -2895,9 +2895,9 @@ class NetworkMap $id = 'open_version_dialog'; } - $output .= '<div id="'.$id.'" style="display: none;" title="'; + $output .= '<div id="'.$id.'" class="invisible" title="'; $output .= __('Edit node').'">'; - $output .= '<div style="text-align: left; width: 100%;">'; + $output .= '<div class="left w100p">'; $table = new StdClass(); $table->id = 'node_details'; @@ -2966,7 +2966,7 @@ class NetworkMap '', 0, true - ).' <span id="shape_icon_in_progress" style="display: none;">'.html_print_image('images/spinner.gif', true).'</span><span id="shape_icon_correct" style="display: none;">'.html_print_image('images/success.png', true, ['width' => '18px']).'</span><span id="shape_icon_fail" style="display: none;">'.html_print_image('images/icono-bad.png', true, ['width' => '18px']).'</span>'; + ).' <span id="shape_icon_in_progress" class="invisible">'.html_print_image('images/spinner.gif', true).'</span><span id="shape_icon_correct" class="invisible">'.html_print_image('images/success.png', true, ['width' => '18px']).'</span><span id="shape_icon_fail" class="invisible">'.html_print_image('images/icono-bad.png', true, ['width' => '18px']).'</span>'; $table->data['node_name'][0] = __('Name'); $table->data['node_name'][1] = html_print_input_text( 'edit_name_node', @@ -3062,7 +3062,7 @@ class NetworkMap $table->data['template_row']['node_target'] = ''; $table->data['template_row']['edit'] = ''; - $table->data['template_row']['edit'] .= '<span class="edit_icon_correct" style="display: none;">'.html_print_image('images/dot_green.png', true).'</span><span class="edit_icon_fail" style="display: none;">'.html_print_image('images/dot_red.png', true).'</span><span class="edit_icon_progress" style="display: none;">'.html_print_image('images/spinner.gif', true).'</span><span class="edit_icon"><a class="edit_icon_link" title="'.__('Update').'" href="#">'.html_print_image('images/config.png', true).'</a></span>'; + $table->data['template_row']['edit'] .= '<span class="edit_icon_correct invisible">'.html_print_image('images/dot_green.png', true).'</span><span class="edit_icon_fail invisible" >'.html_print_image('images/dot_red.png', true).'</span><span class="edit_icon_progress invisible">'.html_print_image('images/spinner.gif', true).'</span><span class="edit_icon"><a class="edit_icon_link" title="'.__('Update').'" href="#">'.html_print_image('images/config.png', true).'</a></span>'; $table->data['template_row']['edit'] .= '<a class="delete_icon" href="#">'.html_print_image('images/delete.png', true).'</a>'; @@ -3090,8 +3090,8 @@ class NetworkMap $output .= '</div></div>'; - $output .= '<div id="dialog_interface_link" style="display: none;" title="Interface link">'; - $output .= '<div style="text-align: left; width: 100%;">'; + $output .= '<div id="dialog_interface_link" class="invisible" title="Interface link">'; + $output .= '<div class="left w100p">'; $table = new stdClass(); $table->id = 'interface_link_table'; @@ -3149,9 +3149,9 @@ class NetworkMap $output .= html_print_table($table, true); $output .= '</div></div>'; - $output .= '<div id="dialog_node_add" style="display: none;" title="'; + $output .= '<div id="dialog_node_add" class="invisible" title="'; $output .= __('Add node').'">'; - $output .= '<div style="text-align: left; width: 100%;">'; + $output .= '<div class="left w100p">'; $table = new StdClass(); $table->width = '100%'; @@ -3411,7 +3411,7 @@ class NetworkMap ).'" />'."\n"; $output .= '<div id="simple_map" data-id="'.$this->idMap.'" '; - $output .= 'style="border: 1px #ddd solid;'; + $output .= 'class="border_1px_dd'; if ($this->fullSize) { $output .= ' width:100%'; @@ -3455,9 +3455,9 @@ class NetworkMap $output .= '<div id="networkconsole_'.$networkmap['id'].'"'; if ($this->fullSize) { if ($this->widget) { - $output .= ' style="width: 100%; height: 100%;position: relative; overflow: hidden;">'; + $output .= ' class="networkconsole">'; } else { - $output .= ' style="width: 100%; height: 100%;position: relative; overflow: hidden; background: #FAFAFA">'; + $output .= ' class="networkconsole">'; } } else { $output .= ' style="width: '.$this->mapOptions['width'].'px; height: '.$this->mapOptions['height'].'px;position: relative; overflow: hidden; background: #FAFAFA">'; @@ -3465,22 +3465,22 @@ class NetworkMap $output .= '<div style="display: '.$minimap_display.';">'; $output .= '<canvas id="minimap_'.$networkmap['id'].'"'; - $output .= ' style="position: absolute; left: 0px; top: 0px; border: 1px solid #bbbbbb;">'; + $output .= ' class="minimap">'; $output .= '</canvas>'; $output .= '<div id="arrow_minimap_'.$networkmap['id'].'"'; - $output .= ' style="position: absolute; left: 0px; top: 0px;">'; + $output .= ' class="absolute left_0px top_0px">'; $output .= '<a title="'.__('Open Minimap').'" href="javascript: toggle_minimap();">'; $output .= html_print_image('/images/minimap_open_arrow.png', true, ['id' => 'arrow_minimap_'.$networkmap['id']]); $output .= '</a></div></div>'; $output .= '<div id="hide_labels_'.$networkmap['id'].'"'; - $output .= ' style="position: absolute; right: 10px; top: 10px;">'; + $output .= ' class="absolute right_10px top_10px">'; $output .= '<a title="'.__('Hide Labels').'" href="javascript: hide_labels();">'; $output .= html_print_image('/images/icono_borrar.png', true, ['id' => 'image_hide_show_labels']); $output .= '</a></div>'; $output .= '<div id="holding_spinner_'.$networkmap['id'].'" '; - $output .= ' style="display: none; position: absolute; right: 50px; top: 20px;">'; + $output .= ' class="holding_networkmap">'; $output .= html_print_image('/images/spinner.png', true, ['id' => 'image_hide_show_labels']); $output .= '</div>'; diff --git a/pandora_console/include/class/TreeService.class.php b/pandora_console/include/class/TreeService.class.php index 85a5c2b8a4..119610eb0d 100644 --- a/pandora_console/include/class/TreeService.class.php +++ b/pandora_console/include/class/TreeService.class.php @@ -221,20 +221,20 @@ class TreeService extends Tree switch ($status) { case SERVICE_STATUS_NORMAL: - $processed_items[$row['id']]['statusImageHTML'] = '<img src="images/status_sets/default/agent_ok_ball.png" data-title="NORMAL status." data-use_title_for_force_title="1" class="forced_title" alt="NORMAL status." />'; + $processed_items[$row['id']]['statusImageHTML'] = '<img src="'.'images/status_sets/default/agent_ok_ball.png'.'" data-title="NORMAL status." data-use_title_for_force_title="1" class="forced_title" alt="NORMAL status." />'; break; case SERVICE_STATUS_CRITICAL: - $processed_items[$row['id']]['statusImageHTML'] = '<img src="images/status_sets/default/agent_critical_ball.png" data-title="CRITICAL status." data-use_title_for_force_title="1" class="forced_title" alt="CRITICAL status." />'; + $processed_items[$row['id']]['statusImageHTML'] = '<img src="'.'images/status_sets/default/agent_critical_ball.png'.'" data-title="CRITICAL status." data-use_title_for_force_title="1" class="forced_title" alt="CRITICAL status." />'; break; case SERVICE_STATUS_WARNING: - $processed_items[$row['id']]['statusImageHTML'] = '<img src="images/status_sets/default/agent_warning_ball.png" data-title="WARNING status." data-use_title_for_force_title="1" class="forced_title" alt="WARNING status." />'; + $processed_items[$row['id']]['statusImageHTML'] = '<img src="'.'images/status_sets/default/agent_warning_ball.png'.'" data-title="WARNING status." data-use_title_for_force_title="1" class="forced_title" alt="WARNING status." />'; break; case SERVICE_STATUS_UNKNOWN: default: - $processed_items[$row['id']]['statusImageHTML'] = '<img src="images/status_sets/default/agent_no_data_ball.png" data-title="UNKNOWN status." data-use_title_for_force_title="1" class="forced_title" alt="UNKNOWN status." />'; + $processed_items[$row['id']]['statusImageHTML'] = '<img src="'.'images/status_sets/default/agent_no_data_ball.png'.'" data-title="UNKNOWN status." data-use_title_for_force_title="1" class="forced_title" alt="UNKNOWN status." />'; break; } } @@ -405,21 +405,21 @@ class TreeService extends Tree switch ($item->agent()->lastStatus()) { case AGENT_STATUS_NORMAL: - $tmp['statusImageHTML'] = '<img src="images/status_sets/default/agent_ok_ball.png" data-title="NORMAL status." data-use_title_for_force_title="1" class="forced_title" alt="NORMAL status." />'; + $tmp['statusImageHTML'] = '<img src="'.'images/status_sets/default/agent_ok_ball.png'.'" data-title="NORMAL status." data-use_title_for_force_title="1" class="forced_title" alt="NORMAL status." />'; break; case AGENT_STATUS_CRITICAL: case AGENT_STATUS_ALERT_FIRED: - $tmp['statusImageHTML'] = '<img src="images/status_sets/default/agent_critical_ball.png" data-title="CRITICAL status." data-use_title_for_force_title="1" class="forced_title" alt="CRITICAL status." />'; + $tmp['statusImageHTML'] = '<img src="'.'images/status_sets/default/agent_critical_ball.png'.'" data-title="CRITICAL status." data-use_title_for_force_title="1" class="forced_title" alt="CRITICAL status." />'; break; case AGENT_STATUS_WARNING: - $tmp['statusImageHTML'] = '<img src="images/status_sets/default/agent_warning_ball.png" data-title="WARNING status." data-use_title_for_force_title="1" class="forced_title" alt="WARNING status." />'; + $tmp['statusImageHTML'] = '<img src="'.'images/status_sets/default/agent_warning_ball.png'.'" data-title="WARNING status." data-use_title_for_force_title="1" class="forced_title" alt="WARNING status." />'; break; case AGENT_STATUS_UNKNOWN: default: - $tmp['statusImageHTML'] = '<img src="images/status_sets/default/agent_no_data_ball.png" data-title="UNKNOWN status." data-use_title_for_force_title="1" class="forced_title" alt="UNKNOWN status." />'; + $tmp['statusImageHTML'] = '<img src="'.'images/status_sets/default/agent_no_data_ball.png'.'" data-title="UNKNOWN status." data-use_title_for_force_title="1" class="forced_title" alt="UNKNOWN status." />'; break; } diff --git a/pandora_console/include/class/WelcomeWindow.class.php b/pandora_console/include/class/WelcomeWindow.class.php index 37e07aefdd..81d008c628 100644 --- a/pandora_console/include/class/WelcomeWindow.class.php +++ b/pandora_console/include/class/WelcomeWindow.class.php @@ -146,7 +146,7 @@ class WelcomeWindow extends Wizard public function run() { ui_require_css_file('new_installation_welcome_window'); - echo '<div id="welcome_modal_window" style="display: none"; >'; + echo '<div id="welcome_modal_window" class="invisible"; >'; ?> <script type="text/javascript"> @@ -336,6 +336,7 @@ class WelcomeWindow extends Wizard public function loadWelcomeWindow() { global $config; + $btn_configure_mail_class = 'pending'; $btn_create_agent_class = 'pending'; $btn_create_module_class = ''; @@ -435,7 +436,7 @@ class WelcomeWindow extends Wizard 'arguments' => [ 'label' => '', 'type' => 'button', - 'attributes' => 'class="go '.$btn_configure_mail_class.'"', + 'attributes' => 'class="go '.$btn_configure_mail_class.' second_background"', 'name' => 'btn_email_conf', 'id' => 'btn_email_conf', ], @@ -469,7 +470,7 @@ class WelcomeWindow extends Wizard 'arguments' => [ 'label' => '', 'type' => 'button', - 'attributes' => 'class="go '.$btn_create_agent_class.'"', + 'attributes' => 'class="go '.$btn_create_agent_class.' second_background"', 'name' => 'btn_create_agent', 'id' => 'btn_create_agent', ], @@ -494,7 +495,7 @@ class WelcomeWindow extends Wizard 'arguments' => [ 'label' => '', 'type' => 'button', - 'attributes' => 'class="go '.$btn_create_module_class.'"', + 'attributes' => 'class="go '.$btn_create_module_class.' second_background"', 'name' => 'btn_create_module', 'id' => 'btn_create_module', ], @@ -519,7 +520,7 @@ class WelcomeWindow extends Wizard 'arguments' => [ 'label' => '', 'type' => 'button', - 'attributes' => 'class="go '.$btn_create_alert_class.'"', + 'attributes' => 'class="go '.$btn_create_alert_class.' second_background"', 'name' => 'btn_create_alert', 'id' => 'btn_create_alert', ], @@ -544,7 +545,7 @@ class WelcomeWindow extends Wizard 'arguments' => [ 'label' => '', 'type' => 'button', - 'attributes' => 'class="go '.$btn_create_discovery_class.'"', + 'attributes' => 'class="go '.$btn_create_discovery_class.' second_background"', 'name' => 'btn_discover_devices', 'id' => 'btn_discover_devices', ], diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index a64842490d..ceef73049d 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -3675,20 +3675,20 @@ function agents_get_status_animation($up=true) { global $config; - // Gif with black background or white background + $red = 'images/heartbeat_green.gif'; + $green = 'images/heartbeat_green.gif'; + if ($config['style'] === 'pandora_black') { - $heartbeat_green = 'images/heartbeat_green_black.gif'; - $heartbeat_red = 'images/heartbeat_red_black.gif'; - } else { - $heartbeat_green = 'images/heartbeat_green.gif'; - $heartbeat_red = 'images/heartbeat_red.gif'; + $red = 'images/heartbeat_green_black.gif'; + $green = 'images/heartbeat_green_black.gif'; } + // Gif with black background or white background switch ($up) { case true: default: return html_print_image( - $heartbeat_green, + $green, true, [ 'width' => '170', @@ -3698,7 +3698,7 @@ function agents_get_status_animation($up=true) case false: return html_print_image( - $heartbeat_red, + $red, true, [ 'width' => '170', diff --git a/pandora_console/include/functions_clippy.php b/pandora_console/include/functions_clippy.php index 516e4c4fb1..94d3c2da85 100644 --- a/pandora_console/include/functions_clippy.php +++ b/pandora_console/include/functions_clippy.php @@ -296,7 +296,7 @@ function clippy_context_help($help=null) $code = str_replace('{clippy}', '#'.$id, $code); $code = str_replace('{clippy_obj}', 'intro_'.$id, $code); - $return = $code.'<div id="'.$id.'" style="display: inline-block;"><a onclick="show_'.$id.'();" href="javascript: void(0);" >'.html_print_image( + $return = $code.'<div id="'.$id.'" class="inline"><a onclick="show_'.$id.'();" href="javascript: void(0);" >'.html_print_image( 'images/clippy_icon.png', true ).'</a></div> diff --git a/pandora_console/include/functions_container.php b/pandora_console/include/functions_container.php index c20fa5d0d0..502db2b4ad 100644 --- a/pandora_console/include/functions_container.php +++ b/pandora_console/include/functions_container.php @@ -19,7 +19,7 @@ require_once 'include/functions_graph.php'; -function folder_get_folders() +global $config;function folder_get_folders() { $folders = io_safe_output( db_get_all_rows_filter( @@ -106,19 +106,18 @@ function folder_togge_tree_folders($tree) $folderName = ui_print_truncate_text($folder['name'], GENERIC_SIZE_TEXT, false, true, false); $table = ''; - // style='background: #f2f2f2;border: 1px solid #e2e2e2;margin-bottom: 4px' if (!empty($folder['branch'])) { $togge = $table.folder_togge_tree_folders($folder['branch']); if ($folder['parent'] === '0') { $return[$key] .= "<div id='$folderName'>".ui_toggle_container($togge, $folderName, '', true, true, $folder['id_group'], $folder['id_container'], $folder['parent']).'</div>'; } else { - $return[$key] .= "<div id='$folderName' style='margin-left:23px'>".ui_toggle_container($togge, $folderName, '', true, true, $folder['id_group'], $folder['id_container'], $folder['parent']).'</div>'; + $return[$key] .= "<div id='$folderName' class='mrgn_lft_23px'>".ui_toggle_container($togge, $folderName, '', true, true, $folder['id_group'], $folder['id_container'], $folder['parent']).'</div>'; } } else { if ($folder['parent'] === '0') { $return[$key] = "<div id='$folderName'>"; } else { - $return[$key] = "<div id='$folderName' style='margin-left:23px'>"; + $return[$key] = "<div id='$folderName' class='mrgn_lft_23px'>"; } $return[$key] .= ui_toggle_container($table, $folderName, '', true, true, $folder['id_group'], $folder['id_container'], $folder['parent']); @@ -180,12 +179,16 @@ function folder_table($graphs) $data[3] = ui_print_group_icon($graph['id_group'], true); if (($report_w || $report_m) && users_can_manage_group_all($access)) { - $data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.$graph['id_graph'].'">'.html_print_image('images/config.png', true).'</a>'; + $data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.$graph['id_graph'].'">'.html_print_image( + 'images/config.png', + true, + ['class' => 'invert_filter'] + ).'</a>'; $data[4] .= ' '; $data[4] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs&delete_graph=1&id='.$graph['id_graph'].'" onClick="if (!confirm(\''.__('Are you sure?').'\')) - return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete" style="margin-left:2px;"', true); + return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete'), 'class' => 'invert_filter']).'</a>'.html_print_checkbox_extended('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete mrgn_lft_2px"', true); } array_push($table->data, $data); @@ -253,13 +256,13 @@ function ui_toggle_container($code, $name, $title='', $hidden_default=true, $ret // Options if ($hidden_default) { $style = 'display:none'; - $image_a = html_print_image('images/down.png', true, false, true); - $image_b = html_print_image('images/go.png', true, false, true); + $image_a = html_print_image('images/down.png', true, ['class' => 'invert_filter'], true); + $image_b = html_print_image('images/go.png', true, ['class' => 'invert_filter'], true); $original = 'images/go.png'; } else { $style = ''; - $image_a = html_print_image('images/down.png', true, false, true); - $image_b = html_print_image('images/go.png', true, false, true); + $image_a = html_print_image('images/down.png', true, ['class' => 'invert_filter'], true); + $image_b = html_print_image('images/go.png', true, ['class' => 'invert_filter'], true); $original = 'images/down.png'; } @@ -272,9 +275,9 @@ function ui_toggle_container($code, $name, $title='', $hidden_default=true, $ret $table->class = 'dat'; if (!$parent) { - $table->styleTable = 'font-weight: bold;background: #f2f2f2;border: 1px solid #e2e2e2;margin-bottom: 4px'; + $table->class = 'default_container '; } else { - $table->styleTable = 'font-weight: bold;margin-bottom: 4px;border-bottom: 1px solid #dcdcdc;'; + $table->class = 'default_container_parent'; } $table->style[0] = 'width: 30%'; @@ -310,16 +313,16 @@ function ui_toggle_container($code, $name, $title='', $hidden_default=true, $ret $table->data = []; $data = []; - $data[0] = '<a href="javascript:" id="tgl_ctrl_'.$uniqid.'">'.html_print_image($original, true, ['title' => $title, 'id' => 'image_'.$uniqid]).'  <b>'.$name.'</b></a>'; + $data[0] = '<a href="javascript:" id="tgl_ctrl_'.$uniqid.'">'.html_print_image($original, true, ['title' => $title, 'id' => 'image_'.$uniqid, 'class' => 'invert_filter']).'  <b>'.$name.'</b></a>'; $data[1] = ui_print_group_icon($group, true); if ($report_r && $report_w) { - $data[2] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/create_container&edit_container=1&id='.$id_container.'">'.html_print_image('images/config.png', true).'</a>'; + $data[2] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/create_container&edit_container=1&id='.$id_container.'">'.html_print_image('images/config.png', true, ['class' => 'invert_filter']).'</a>'; } if ($report_r && $report_w && $report_m) { if ($id_container !== '1') { $data[2] .= '    '.'<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container&delete_container=1&id='.$id_container.'" onClick="if (!confirm(\''.__('Are you sure?').'\')) - return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>'; + return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete'), 'class' => 'invert_filter']).'</a>'; } } diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index dd51e10cb3..0853b6ea6e 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -478,7 +478,10 @@ function cron_list_table() $data[0] .= html_print_image( 'images/target.png', true, - ['title' => __('Force run')] + [ + 'title' => __('Force run'), + 'class' => 'invert_filter', + ] ); $data[0] .= '</a>'; } else { @@ -516,7 +519,10 @@ function cron_list_table() $data[0] .= html_print_image( 'images/target.png', true, - ['title' => __('Force run')] + [ + 'title' => __('Force run'), + 'class' => 'invert_filter', + ] ); $data[0] .= '</a>'; } else { @@ -567,7 +573,10 @@ function cron_list_table() $data[0] .= html_print_image( 'images/target.png', true, - ['title' => __('Force run')] + [ + 'title' => __('Force run'), + 'class' => 'invert_filter', + ] ); $data[0] .= '</a>'; } else { @@ -593,7 +602,49 @@ function cron_list_table() $data[0] .= html_print_image( 'images/target.png', true, - ['title' => __('Force run')] + [ + 'title' => __('Force run'), + 'class' => 'invert_filter', + ] + ); + $data[0] .= '</a>'; + } else { + $data[0] = ''; + } + + $data[1] = $task['id_usuario']; + $data[2] = db_get_value( + 'name', + 'tuser_task', + 'id', + $task['id_user_task'] + ); + + $args = unserialize($task['args']); + $report = reports_get_report($args[0]); + + // Check ACL in reports_get_report return false. + if ($report === false) { + continue; + } + + $path = $args[1]; + $data[2] .= '<br>- '.__('Report').": <a href='index.php?sec=reporting&sec2=operation/reporting/reporting_viewer"; + $data[2] .= '&id='.$args[0]."'>".$report['name'].'</a>'; + $data[2] .= '<br>- '.__('Path').': '.$path.'</a>'; + break; + + case 'cron_task_save_xml_report_to_disk': + if ($write_perms || $manage_pandora) { + $data[0] = '<a href="'.$url; + $data[0] .= 'force_run=1&id_user_task='.$task['id'].'">'; + $data[0] .= html_print_image( + 'images/target.png', + true, + [ + 'title' => __('Force run'), + 'class' => 'invert_filter', + ] ); $data[0] .= '</a>'; } else { @@ -626,7 +677,10 @@ function cron_list_table() $data[0] .= html_print_image( 'images/target.png', true, - ['title' => __('Force run')] + [ + 'title' => __('Force run'), + 'class' => 'invert_filter', + ] ); $data[0] .= '</a>'; } else { @@ -661,7 +715,10 @@ function cron_list_table() $data[7] .= html_print_image( 'images/config.png', true, - ['title' => __('Edit')] + [ + 'title' => __('Edit'), + 'class' => 'invert_filter', + ] ); $data[7] .= '</a>'; } @@ -672,7 +729,10 @@ function cron_list_table() $data[7] .= html_print_image( 'images/cross.png', true, - ['title' => __('Delete')] + [ + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] ); $data[7] .= '</a>'; } @@ -683,7 +743,10 @@ function cron_list_table() $data[7] .= html_print_image( 'images/config.png', true, - ['title' => __('Edit')] + [ + 'title' => __('Edit'), + 'class' => 'invert_filter', + ] ); $data[7] .= '</a>'; } @@ -694,7 +757,10 @@ function cron_list_table() $data[7] .= html_print_image( 'images/cross.png', true, - ['title' => __('Delete')] + [ + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] ); $data[7] .= '</a>'; } diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 158a3f726f..543fe06a13 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2194,7 +2194,7 @@ function events_comment( $comment = str_replace(["\r\n", "\r", "\n"], '<br>', $comment); if ($comment != '') { - $commentbox = '<div style="border:1px dotted #CCC; min-height: 10px;">'.io_safe_input($comment).'</div>'; + $commentbox = '<div class="comment_box">'.io_safe_input($comment).'</div>'; } else { $commentbox = ''; } @@ -2579,15 +2579,15 @@ function events_print_event_table( $out = $events_table; if (!$tactical_view) { - $out .= '<table width="100%"><tr><td style="width: 90%; vertical-align: top; padding-top: 0px;">'; + $out .= '<table width="100%"><tr><td class="w90p align-top pdd_t_0px">'; if ($agent_id != 0) { - $out .= '</td><td style="width: 200px; vertical-align: top;">'; + $out .= '</td><td class="w200px 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 .= '</td><td class="w200px 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>'; @@ -2630,69 +2630,82 @@ function events_print_type_img( $urlImage = ui_get_full_url(false); + $style = ''; + switch ($type) { case 'alert_recovered': - $icon = 'bell.png'; + $icon = 'images/bell.png'; + $style = 'invert_filter'; break; case 'alert_manual_validation': - $icon = 'ok.png'; + $icon = 'images/ok.png'; + $style = 'invert_filter'; break; case 'going_down_critical': case 'going_up_critical': // This is to be backwards compatible. - $icon = 'module_critical.png'; + $icon = 'images/module_critical.png'; break; case 'going_up_normal': case 'going_down_normal': // This is to be backwards compatible. - $icon = 'module_ok.png'; + $icon = 'images/module_ok.png'; break; case 'going_up_warning': case 'going_down_warning': - $icon = 'module_warning.png'; + $icon = 'images/module_warning.png'; break; case 'going_unknown': - $icon = 'module_unknown.png'; + $icon = 'images/module_unknown.png'; break; case 'alert_fired': - $icon = 'bell_error.png'; + $icon = 'images/bell_error.png'; + $style = 'invert_filter'; break; case 'system': - $icon = 'cog.png'; + $icon = 'images/cog.png'; + $style = 'invert_filter'; break; case 'recon_host_detected': - $icon = 'recon.png'; + $icon = 'images/recon.png'; + $style = 'invert_filter'; break; case 'new_agent': - $icon = 'agent.png'; + $icon = 'images/agent.png'; + $style = 'invert_filter'; break; case 'configuration_change': - $icon = 'config.png'; + $icon = 'images/config.png'; + $style = 'invert_filter'; break; case 'unknown': default: - $icon = 'lightning_go.png'; + $icon = 'images/lightning_go.png'; + $style = 'invert_filter'; break; } if ($only_url) { - $output = $urlImage.'/images/'.$icon; + $output = $urlImage.'/'.$icon; } else { $output .= html_print_image( - 'images/'.$icon, + $icon, true, - ['title' => events_print_type_description($type, true)] + [ + 'title' => events_print_type_description($type, true), + 'class' => $style, + ] ); } @@ -3683,14 +3696,14 @@ function events_page_responses($event, $childrens_ids=[]) $('.params_rows').remove(); $('#responses_table') - .append('<tr class=\"params_rows\"><td>".__('Description')."</td><td style=\"text-align:left; height:30px;\" colspan=\"2\">'+description+'</td></tr>'); + .append('<tr class=\"params_rows\"><td>".__('Description')."</td><td class=\"left height_30px\" colspan=\"2\">'+description+'</td></tr>'); if (params.length == 1 && params[0] == '') { return; } $('#responses_table') - .append('<tr class=\"params_rows\"><td style=\"text-align:left; padding-left:20px; height:30px;\" colspan=\"3\">".__('Parameters')."</td></tr>'); + .append('<tr class=\"params_rows\"><td class=\"left pdd_l_20px height_30px\" colspan=\"3\">".__('Parameters')."</td></tr>'); for (i = 0; i < params.length; i++) { add_row_param('responses_table',params[i]); @@ -4243,7 +4256,7 @@ function events_page_details($event, $server='') if (!empty($agent)) { $data = []; - $data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Name').'</div>'; + $data[0] = '<div class="normal-weight mrgn_lft_20px">'.__('Name').'</div>'; if (can_user_access_node() && is_metaconsole() && empty($event['server_id']) === true) { $data[1] = ui_print_truncate_text( $agent['alias'], @@ -4276,12 +4289,12 @@ function events_page_details($event, $server='') $table_details->data[] = $data; $data = []; - $data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('IP Address').'</div>'; + $data[0] = '<div class="normal-weight mrgn_lft_20px">'.__('IP Address').'</div>'; $data[1] = empty($agent['direccion']) ? '<i>'.__('N/A').'</i>' : $agent['direccion']; $table_details->data[] = $data; $data = []; - $data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('OS').'</div>'; + $data[0] = '<div class="normal-weight mrgn_lft_20px">'.__('OS').'</div>'; $data[1] = ui_print_os_icon($agent['id_os'], true, true); if (!empty($agent['os_version'])) { $data[1] .= ' ('.$agent['os_version'].')'; @@ -4290,17 +4303,17 @@ function events_page_details($event, $server='') $table_details->data[] = $data; $data = []; - $data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Last contact').'</div>'; + $data[0] = '<div class="normal-weight mrgn_lft_20px">'.__('Last contact').'</div>'; $data[1] = ($agent['ultimo_contacto'] == '1970-01-01 00:00:00') ? '<i>'.__('N/A').'</i>' : ui_print_timestamp($agent['ultimo_contacto'], true); $table_details->data[] = $data; $data = []; - $data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Last remote contact').'</div>'; + $data[0] = '<div class="normal-weight mrgn_lft_20px">'.__('Last remote contact').'</div>'; $data[1] = ($agent['ultimo_contacto_remoto'] == '1970-01-01 00:00:00') ? '<i>'.__('N/A').'</i>' : date_w_fixed_tz($agent['ultimo_contacto_remoto']); $table_details->data[] = $data; $data = []; - $data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Custom fields').'</div>'; + $data[0] = '<div class="normal-weight mrgn_lft_20px">'.__('Custom fields').'</div>'; $data[1] = html_print_button( __('View custom fields'), 'custom_button', @@ -4332,13 +4345,13 @@ function events_page_details($event, $server='') if (!empty($module)) { // Module name. $data = []; - $data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Name').'</div>'; + $data[0] = '<div class="normal-weight mrgn_lft_20px">'.__('Name').'</div>'; $data[1] = $module['nombre']; $table_details->data[] = $data; // Module group. $data = []; - $data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Module group').'</div>'; + $data[0] = '<div class="normal-weight mrgn_lft_20px">'.__('Module group').'</div>'; $id_module_group = $module['id_module_group']; if ($id_module_group == 0) { $data[1] = __('No assigned'); @@ -4375,7 +4388,7 @@ function events_page_details($event, $server='') if ($acl_graph) { $data = []; - $data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Graph').'</div>'; + $data[0] = '<div class="normal-weight mrgn_lft_20px">'.__('Graph').'</div>'; $module_type = -1; if (isset($module['module_type'])) { @@ -4424,7 +4437,7 @@ function events_page_details($event, $server='') if ($event['id_alert_am'] != 0) { $data = []; - $data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Source').'</div>'; + $data[0] = '<div class="normal-weight mrgn_lft_20px">'.__('Source').'</div>'; $data[1] = '<a href="'.$serverstring.'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$event['id_agente'].'&tab=alert'.$hashstring.'">'; $standby = db_get_value('standby', 'talert_template_modules', 'id', $event['id_alert_am']); if (!$standby) { @@ -4456,7 +4469,7 @@ function events_page_details($event, $server='') $table_details->data[] = $data; $data = []; - $data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Priority').'</div>'; + $data[0] = '<div class="normal-weight mrgn_lft_20px">'.__('Priority').'</div>'; $priority_code = db_get_value('priority', 'talert_template_modules', 'id', $event['id_alert_am']); $alert_priority = get_priority_name($priority_code); @@ -4751,7 +4764,7 @@ function events_page_general($event) $data = []; $data[0] = __('Event name'); - $data[1] = '<span style="word-break: break-word;">'.events_display_name($event['evento']).'</span>'; + $data[1] = '<span class="break_word">'.events_display_name($event['evento']).'</span>'; $table_general->data[] = $data; $data = []; @@ -5003,7 +5016,7 @@ function events_page_comments($event, $ajax=false) foreach ($comm as $c) { $data[0] = '<b>'.$c['action'].' by '.$c['id_user'].'</b>'; $data[0] .= '<br><br><i>'.date($config['date_format'], $c['utimestamp']).'</i>'; - $data[1] = '<p style="word-break: break-word;">'.stripslashes(str_replace(['\n', '\r'], '<br/>', $c['comment'])).'</p>'; + $data[1] = '<p class="break_word">'.stripslashes(str_replace(['\n', '\r'], '<br/>', $c['comment'])).'</p>'; $table_comments->data[] = $data; } break; @@ -5066,17 +5079,17 @@ function events_page_comments($event, $ajax=false) $childrens_ids ))) && $config['show_events_in_local'] == false || $config['event_replication'] == false ) { - $comments_form = '<br><div id="comments_form" style="width:98%;">'; + $comments_form = '<br><div id="comments_form" class="w98p">'; $comments_form .= html_print_textarea( 'comment', 3, 10, '', - 'style="min-height: 15px; padding:0; width: 100%; disabled"', + 'class="comments_form"', true ); - $comments_form .= '<br><div style="text-align:right; margin-top:10px;">'; + $comments_form .= '<br><div class="right mrgn_top_10px">'; $comments_form .= html_print_button( __('Add comment'), 'comment_button', @@ -6653,7 +6666,7 @@ function events_list_events_grouped_agents($sql) $data[$i] .= '<a href="javascript:" onclick="show_event_dialog('.$event['id_evento'].', '.$group_rep.');">'; } - $data[$i] .= '<span class="'.$myclass.'" style="font-size: 7.5pt;">'.ui_print_truncate_text(io_safe_output($event['evento']), 160).'</span>'; + $data[$i] .= '<span class="'.$myclass.'" >'.ui_print_truncate_text(io_safe_output($event['evento']), 160).'</span>'; if ($allow_action) { $data[$i] .= '</a>'; } @@ -7384,11 +7397,11 @@ function events_get_instructions($event) } $output = '<div id="hidden_event_instructions_'.$event['id_evento'].'"'; - $output .= ' style="display: none; width: 100%; height: 100%; overflow: auto; padding: 10px; font-size: 14px; line-height: 16px; font-family: mono,monospace; text-align: left">'; + $output .= ' class="event_instruction">'; $output .= $value; $output .= '</div>'; $output .= '<center>'; - $output .= '<span id="value_event_'.$event['id_evento'].'" style="white-space: nowrap;">'; + $output .= '<span id="value_event_'.$event['id_evento'].'" class="nowrap">'; $output .= '<span id="value_event_text_'.$event['id_evento'].'"></span>'; $output .= '<a href="javascript:show_instructions('.$event['id_evento'].')">'; $output .= html_print_image('images/default_list.png', true, ['title' => $over_text]).'</a></span>'; diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index 15a34aa4fc..1be3db5379 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -786,7 +786,10 @@ function filemanager_file_explorer( <a href="javascript: show_form_create_folder();">'.html_print_image( 'images/create_directory.png', true, - ['title' => __('Create directory')] + [ + 'title' => __('Create directory'), + 'class' => 'invert_filter', + ] ).'<span>'.__('Create a Directory').'</span> </a> </li> @@ -794,7 +797,10 @@ function filemanager_file_explorer( <a href="javascript: show_create_text_file();">'.html_print_image( 'images/create_file.png', true, - ['title' => __('Create a Text')] + [ + 'title' => __('Create a Text'), + 'class' => 'invert_filter', + ] ).'<span>'.__('Create a Text').'</span> </a> </li> @@ -802,18 +808,21 @@ function filemanager_file_explorer( <a href="javascript: show_upload_file();">'.html_print_image( 'images/upload_file.png', true, - ['title' => __('Upload Files')] + [ + 'title' => __('Upload Files'), + 'class' => 'invert_filter', + ] ).'<span>'.__('Upload Files').'</span> </a> </li></ul>'; - echo '<div id="create_folder" style="display: none;">'.$tabs_dialog.' + echo '<div id="create_folder" class="invisible">'.$tabs_dialog.' <form method="post" action="'.$url.'">'.html_print_input_text('dirname', '', '', 30, 255, true).html_print_submit_button(__('Create'), 'crt', false, 'class="sub next"', true).html_print_input_hidden('directory', $relative_directory, true).html_print_input_hidden('create_dir', 1, true).html_print_input_hidden('hash', md5($relative_directory.$config['dbpass']), true).html_print_input_hidden('hash2', md5($relative_directory.$config['dbpass']), true).'</form></div>'; - echo '<div id="upload_file" style="display: none;"> '.$tabs_dialog.' + echo '<div id="upload_file" class="invisible"> '.$tabs_dialog.' <form method="post" action="'.$url.'" enctype="multipart/form-data">'.ui_print_help_tip(__('The zip upload in this dir, easy to upload multiple files.'), true).html_print_input_file('file', true, false).html_print_input_hidden('umask', $umask, true).html_print_checkbox('decompress', 1, false, true).__('Decompress').html_print_submit_button(__('Go'), 'go', false, 'class="sub next"', true).html_print_input_hidden('real_directory', $real_directory, true).html_print_input_hidden('directory', $relative_directory, true).html_print_input_hidden('hash', md5($real_directory.$relative_directory.$config['dbpass']), true).html_print_input_hidden('hash2', md5($relative_directory.$config['dbpass']), true).html_print_input_hidden('upload_file_or_zip', 1, true).'</form></div>'; - echo ' <div id="create_text_file" style="display: none;">'.$tabs_dialog.' + echo ' <div id="create_text_file" class="invisible">'.$tabs_dialog.' <form method="post" action="'.$url.'">'.html_print_input_text('name_file', '', '', 30, 50, true).html_print_submit_button(__('Create'), 'create', false, 'class="sub next"', true).html_print_input_hidden('real_directory', $real_directory, true).html_print_input_hidden('directory', $relative_directory, true).html_print_input_hidden('hash', md5($real_directory.$relative_directory.$config['dbpass']), true).html_print_input_hidden('umask', $umask, true).html_print_input_hidden('create_text_file', 1, true).'</form></div>'; echo "<div style='width: ".$table->width.";' class='file_table_buttons'>"; @@ -822,7 +831,10 @@ function filemanager_file_explorer( echo html_print_image( 'images/create_directory.png', true, - ['title' => __('Create directory')] + [ + 'title' => __('Create directory'), + 'class' => 'invert_filter', + ] ); echo '</a>'; @@ -830,7 +842,10 @@ function filemanager_file_explorer( echo html_print_image( 'images/create_file.png', true, - ['title' => __('Create text')] + [ + 'title' => __('Create text'), + 'class' => 'invert_filter', + ] ); echo '</a>'; @@ -838,7 +853,10 @@ function filemanager_file_explorer( echo html_print_image( 'images/upload_file.png', true, - ['title' => __('Upload file/s')] + [ + 'title' => __('Upload file/s'), + 'class' => 'invert_filter', + ] ); echo '</a>'; diff --git a/pandora_console/include/functions_gis.php b/pandora_console/include/functions_gis.php index c2e8bf371c..870fa897b7 100644 --- a/pandora_console/include/functions_gis.php +++ b/pandora_console/include/functions_gis.php @@ -1584,7 +1584,7 @@ function gis_add_conection_maps_in_form($map_connection_list) <tr class="row_0"> <td>'.html_print_input_text('map_connection_name_'.$mapConnection['id_conection'], $mapConnectionRowDB['conection_name'], '', 20, 40, true, true).'</td> <td>'.$radioButton.'</td> - <td><a id="delete_row" href="javascript: deleteConnectionMap(\''.$mapConnection['id_conection'].'\')">'.html_print_image('images/cross.png', true, ['alt' => '']).'</a></td> + <td><a id="delete_row" href="javascript: deleteConnectionMap(\''.$mapConnection['id_conection'].'\')">'.html_print_image('images/cross.png', true, ['alt' => '', 'class' => 'invert_filter']).'</a></td> </tr> </tbody> <script type="text/javascript"> diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 370a145d0a..c40b9fc49c 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -5149,7 +5149,7 @@ function graph_nodata_image( } $style = $width.' height:'.$height.'px;'; - $style .= ' background-color: white; margin: 0 auto;'; + $style .= 'margin: 0 auto;'; $div = '<div style="'.$style.'">'.$image_div.'</div>'; } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 3769118f30..adb1fd9b9d 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -77,7 +77,7 @@ function html_debug_print($var, $file='', $oneline=false) fprintf($f, '%s', $output); fclose($f); } else { - echo '<pre style="z-index: 10000; background: #fff; padding: 1em;">'.date('Y/m/d H:i:s').' ('.gettype($var).') '.$more_info."\n"; + echo '<pre class="bg_white pdd_1em zindex10000">'.date('Y/m/d H:i:s').' ('.gettype($var).') '.$more_info."\n"; print_r($var); echo '</pre>'; } @@ -214,7 +214,7 @@ function html_print_side_layer($params) break; } - $out_html = '<div id="side_layer" class="menu_sidebar '.$round_class.'" style="display:none; z-index:1; overflow: hidden; height: '.$params['height'].'; width: '.$params['width'].';">'; + $out_html = '<div id="side_layer" class="menu_sidebar invisible overflow_hidden'.$round_class.'" style=" z-index:1; height: '.$params['height'].'; width: '.$params['width'].';">'; $table = new stdClass(); $table->id = 'side_layer_layout'; @@ -223,9 +223,9 @@ function html_print_side_layer($params) $table->cellpadding = 2; $table->class = 'none'; - $top = '<div id="side_top_text" style="width: 100%";">'.$params['top_text'].'</div>'; + $top = '<div id="side_top_text" class="w100p">'.$params['top_text'].'</div>'; - $button = '<div id="show_menu" style="vertical-align: middle; position: relative; width: '.$params['icon_width'].'px; padding-right: 17px; text-align: right; height: '.$params['icon_height'].'px;">'; + $button = '<div id="show_menu" class="vertical_middle relative right pdd_r_17px" style="width: '.$params['icon_width'].'px; height: '.$params['icon_height'].'px;">'; // Use the no_meta parameter because this image is only in the base console $button .= html_print_image( $params['position'] == 'left' ? $params['icon_open'] : $params['icon_closed'], @@ -237,7 +237,7 @@ function html_print_side_layer($params) ); $button .= '</div>'; - $body = '<div id="side_body_text" style="width: 100%;">'.$params['body_text'].'</div>'; + $body = '<div id="side_body_text" class="w100p">'.$params['body_text'].'</div>'; $bottom = '<div id="side_bottom_text" style="text-align: '.$params['position'].';">'.$params['bottom_text'].'</div>'; @@ -466,6 +466,14 @@ function html_print_select_groups( ) { $output = ''; + global $config; + + if ($config['style'] === 'pandora') { + $select2_css = 'select2.min'; + } else { + $select2_css = 'select2_dark.min'; + } + if (is_ajax()) { $output .= '<script src="'; $output .= ui_get_full_url( @@ -478,14 +486,14 @@ function html_print_select_groups( $output .= '<link rel="stylesheet" href="'; $output .= ui_get_full_url( - 'include/styles/select2.min.css', + 'include/styles/'.$select2_css.'.css', false, false, false ); $output .= '"/>'; } else { - ui_require_css_file('select2.min'); + ui_require_css_file($select2_css); ui_require_javascript_file('select2.min'); } @@ -732,7 +740,7 @@ function html_print_select( } if ($style === false) { - $styleText = 'style=""'; + $styleText = ' '; } else { $styleText = 'style="'.$style.'"'; } @@ -830,7 +838,7 @@ function html_print_select( $output .= '</select>'; if ($modal && !enterprise_installed()) { $output .= " - <div id='".$message."' class='publienterprise' title='Community version' style='display:inline;position:relative;top:10px;left:0px;margin-top: -2px !important; margin-left: 2px !important;'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div> + <div id='".$message."' class='publienterprise publicenterprise_div' title='Community version'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div> "; } @@ -1088,6 +1096,7 @@ function html_print_select_multiple_filtered( 'options' => [ 'title' => $texts['title-add'], 'onclick' => $add, + 'class' => 'invert_filter', ], ] ); @@ -1100,6 +1109,7 @@ function html_print_select_multiple_filtered( 'options' => [ 'title' => $texts['title-del'], 'onclick' => $del, + 'class' => 'invert_filter', ], ] ); @@ -1531,7 +1541,7 @@ function html_print_extended_select_for_unit( ob_start(); - echo '<div id="'.$uniq_name.'_default" style="width:100%;display:inline;">'; + echo '<div id="'.$uniq_name.'_default" class="w100p inline_line">'; html_print_select( $fields, $uniq_name.'_select', @@ -1558,7 +1568,7 @@ function html_print_extended_select_for_unit( ).'</a>'; echo '</div>'; - echo '<div id="'.$uniq_name.'_manual" style="width:100%;display:inline;">'; + echo '<div id="'.$uniq_name.'_manual" class="w100p inline_line">'; html_print_input_text($uniq_name.'_text', $selected, '', 20); html_print_input_hidden($name, $selected, false, $uniq_name); @@ -1636,7 +1646,7 @@ function html_print_extended_select_for_post_process( ob_start(); - echo '<div id="'.$uniq_name.'_default" style="width:100%;display:inline;">'; + echo '<div id="'.$uniq_name.'_default" style="w100p inline_line">'; html_print_select( $fields, $uniq_name.'_select', @@ -1663,7 +1673,7 @@ function html_print_extended_select_for_post_process( ).'</a>'; echo '</div>'; - echo '<div id="'.$uniq_name.'_manual" style="width:100%;display:inline;">'; + echo '<div id="'.$uniq_name.'_manual" style="w100p inline_line">'; html_print_input_text($uniq_name.'_text', $selected, '', 20); html_print_input_hidden($name, $selected, false, $uniq_name); @@ -1795,7 +1805,7 @@ function html_print_extended_select_for_time( ob_start(); // Use the no_meta parameter because this image is only in the base console. - echo '<div id="'.$uniq_name.'_default" style="width:auto;display:inline">'; + echo '<div id="'.$uniq_name.'_default" class="wauto inline_line">'; html_print_select( $fields, $uniq_name.'_select', @@ -1816,7 +1826,7 @@ function html_print_extended_select_for_time( 'images/pencil.png', true, [ - 'class' => $uniq_name.'_toggler '.$class, + 'class' => $uniq_name.'_toggler '.$class.' invert_filter', 'alt' => __('Custom'), 'title' => __('Custom'), 'style' => 'width: 18px; margin-bottom: -5px;'.$style_icon, @@ -1829,7 +1839,7 @@ function html_print_extended_select_for_time( echo '</div>'; - echo '<div id="'.$uniq_name.'_manual" style="width:100%;display:inline;">'; + echo '<div id="'.$uniq_name.'_manual" class="w100 inline_line">'; html_print_input_text($uniq_name.'_text', $selected, '', $size, 255, false, $readonly, false, '', $class); html_print_input_hidden($name, $selected, false, $uniq_name); @@ -1848,10 +1858,10 @@ function html_print_extended_select_for_time( 'font-size: xx-small;'.$select_style ); echo ' <a href="javascript:">'.html_print_image( - 'images/default_list.png', + 'images/list.png', true, [ - 'class' => $uniq_name.'_toggler', + 'class' => $uniq_name.'_toggler invert_filter', 'alt' => __('List'), 'title' => __('List'), 'style' => 'width: 18px;margin-bottom: -5px;'.$style_icon, @@ -2899,7 +2909,7 @@ function html_print_button($label='OK', $name='', $disabled=false, $script='', $ if ($modal && !enterprise_installed()) { $output .= " - <div id='".$message."' class='publienterprise' title='Community version' style='display:inline;position:relative;top:10px;left:0px;margin-top: -2px !important; margin-left: 2px !important;'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div> + <div id='".$message."' class='publienterprise publicenterprise_div' title='Community version' ><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div> "; } @@ -3181,7 +3191,7 @@ function html_print_table(&$table, $return=false) $countcols = 0; if (!empty($table->caption)) { - $output .= '<caption style="text-align: left"><h4>'.$table->caption.'</h4></caption>'; + $output .= '<caption class="left"><h4>'.$table->caption.'</h4></caption>'; } if (!empty($table->head)) { @@ -3391,7 +3401,7 @@ function html_print_radio_button_extended( if ($modal && !enterprise_installed()) { $output .= " - <div id='".$message."' class='publienterprise' title='Community version' style='display:inline;position:relative;top:10px;left:0px;margin-top: -2px !important; margin-left: 2px !important;'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div> + <div id='".$message."' class='publienterprise publicenterprise_div' title='Community version'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div> "; } @@ -4027,6 +4037,11 @@ function html_print_autocomplete_modules( ob_start(); + $module_icon = 'images/module.png'; + if ($config['style'] === 'pandora_black') { + $module_icon = 'images/brick.menu.png'; + } + html_print_input_text_extended( $name, $default, @@ -4036,7 +4051,7 @@ function html_print_autocomplete_modules( 100, false, '', - ['style' => 'background: url(images/search_module.png) no-repeat right;'] + ['style' => 'background: url('.$module_icon.') no-repeat right;'] ); html_print_input_hidden($name.'_hidden', $id_agent_module); @@ -4145,7 +4160,7 @@ function html_print_result_div($text) $text = preg_replace('/\n/i', '<br>', $text); $text = preg_replace('/\s/i', ' ', $text); - $enclose = "<div id='result_div' style='width: 100%; height: 100%; overflow: auto; padding: 10px; font-size: 14px; line-height: 16px; font-family: mono,monospace; text-align: left'>"; + $enclose = "<div id='result_div results_class'>"; $enclose .= $text; $enclose .= '</div>'; return $enclose; diff --git a/pandora_console/include/functions_integriaims.php b/pandora_console/include/functions_integriaims.php index 166abec5cd..3edbce37f2 100644 --- a/pandora_console/include/functions_integriaims.php +++ b/pandora_console/include/functions_integriaims.php @@ -38,9 +38,9 @@ function integriaims_tabs($active_tab, $view=false) $url_tabs = ui_get_full_url('index.php?sec=incident&sec2=operation/incidents/'); - $setup_tab['text'] = '<a href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=integria').'">'.html_print_image('images/setup.png', true, ['title' => __('Configure Integria IMS')]).'</a>'; - $list_tab['text'] = '<a href="'.$url_tabs.'list_integriaims_incidents">'.html_print_image('images/list.png', true, ['title' => __('Ticket list')]).'</a>'; - $create_tab['text'] = '<a href="'.$url_tabs.'configure_integriaims_incident">'.html_print_image('images/pencil.png', true, ['title' => __('New ticket')]).'</a>'; + $setup_tab['text'] = '<a href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=integria').'">'.html_print_image('images/setup.png', true, ['title' => __('Configure Integria IMS'), 'class' => 'invert_filter']).'</a>'; + $list_tab['text'] = '<a href="'.$url_tabs.'list_integriaims_incidents">'.html_print_image('images/list.png', true, ['title' => __('Ticket list'), 'class' => 'invert_filter']).'</a>'; + $create_tab['text'] = '<a href="'.$url_tabs.'configure_integriaims_incident">'.html_print_image('images/pencil.png', true, ['title' => __('New ticket'), 'class' => 'invert_filter']).'</a>'; switch ($active_tab) { case 'setup_tab': diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 9669d41060..3337cb80de 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -294,7 +294,6 @@ function menu_print_menu(&$menu) $secExtensionBool = false; if ($secExtensionBool) { - // $imageIconDefault = 'images/extensions.png'; if (strlen($sub['icon']) > 0) { $icon_enterprise = false; if (isset($sub['enterprise'])) { @@ -337,10 +336,6 @@ function menu_print_menu(&$menu) } $submenu_output .= '<a href="index.php?'.$extensionInMenu.'sec='.$secUrl.'&'.'sec2='.$subsec2.($sub['refr'] ? '&refr='.$sub['refr'] : '').$link_add.'"'.$title.'>'.'<div class="'.$sub_tree_class.'">'.$sub['text'].'</div>'.'</a>'; - - if (isset($sub['sub2'])) { - // $submenu_output .= html_print_image("include/styles/images/toggle.png", true, array("class" => "toggle", "alt" => "toogle")); - } } // Print second level submenu. @@ -382,7 +377,7 @@ function menu_print_menu(&$menu) $sub_title = ''; } - $submenu2_list .= '<li class="'.$class.'" style="">'; + $submenu2_list .= '<li class="'.$class.'" >'; $submenu2_list .= '<a href="'.$link.'"><div class="'.$sub_tree_class.'" title="'.$sub2['text'].'" >'.$sub2['text'].'</div></a></li>'; $sub_title = ''; } @@ -432,7 +427,6 @@ function menu_print_menu(&$menu) $padding_top = 0; $length = 0; - // $output .= html_print_image("include/styles/images/toggle.png", true, array("class" => "toggle", "alt" => "toogle")); if ($submenu_output != '') { // WARNING: IN ORDER TO MODIFY THE VISIBILITY OF MENU'S AND SUBMENU'S (eg. with cookies) YOU HAVE TO ADD TO THIS ELSEIF. DON'T MODIFY THE CSS. if ($visible || in_array('selected', $classes)) { diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 28b3e36a4c..9466b15aa1 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -808,7 +808,7 @@ function modules_format_verbatim($data) // We need to replace \n by <br> to create a "similar" output to // information recolected in logs. $data2 = preg_replace("/\\n/", '<br>', $data); - return "<span style='font-size:10px;'>".$data2.'</span>'; + return "<span class='font_10px'>".$data2.'</span>'; } @@ -844,7 +844,7 @@ function modules_format_delete($id) $txt = ''; if (check_acl($config['id_user'], $group, 'AW') == 1) { - $txt = '<a href="index.php?sec=estado&sec2=operation/agentes/datos_agente&period='.$period.'&id='.$module_id.'&delete='.$id.'">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a>'; + $txt = '<a href="index.php?sec=estado&sec2=operation/agentes/datos_agente&period='.$period.'&id='.$module_id.'&delete='.$id.'">'.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter']).'</a>'; } return $txt; @@ -865,7 +865,7 @@ function modules_format_delete_string($id) $txt = ''; if (check_acl($config['id_user'], $group, 'AW') == 1) { - $txt = '<a href="index.php?sec=estado&sec2=operation/agentes/datos_agente&period='.$period.'&id='.$module_id.'&delete_string='.$id.'">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a>'; + $txt = '<a href="index.php?sec=estado&sec2=operation/agentes/datos_agente&period='.$period.'&id='.$module_id.'&delete_string='.$id.'">'.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter']).'</a>'; } return $txt; @@ -886,7 +886,7 @@ function modules_format_delete_log4x($id) $txt = ''; if (check_acl($config['id_user'], $group, 'AW') == 1) { - $txt = '<a href="index.php?sec=estado&sec2=operation/agentes/datos_agente&period='.$period.'&id='.$module_id.'&delete_log4x='.$id.'">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a>'; + $txt = '<a href="index.php?sec=estado&sec2=operation/agentes/datos_agente&period='.$period.'&id='.$module_id.'&delete_log4x='.$id.'">'.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter']).'</a>'; } return $txt; @@ -3487,6 +3487,7 @@ function get_module_realtime_link_graph($module) 'border' => '0', 'alt' => '', 'title' => __('Realtime SNMP graph'), + 'class' => 'invert_filter', ] ); $link_button .= '</a>'; diff --git a/pandora_console/include/functions_netflow.php b/pandora_console/include/functions_netflow.php index 8f3a878142..69d9a85cd5 100644 --- a/pandora_console/include/functions_netflow.php +++ b/pandora_console/include/functions_netflow.php @@ -1124,7 +1124,7 @@ function netflow_draw_item( } if ($output == 'HTML' || $output == 'PDF') { - $html .= "<div style='width: 100%; overflow: auto;'>"; + $html .= "<div class='w100p overflow'>"; $html .= netflow_data_table($data, $start_date, $end_date, $aggregate); $html .= '</div>'; @@ -1164,12 +1164,12 @@ function netflow_draw_item( } if ($output === 'HTML' || $output === 'PDF') { - $html = '<table style="width: 100%">'; + $html = '<table class="w100p">'; $html .= '<tr>'; - $html .= '<td style="width: 50%">'; + $html .= '<td class="w50p">'; $html .= netflow_summary_table($data_summary); $html .= '</td>'; - $html .= '<td style="width: 50%">'; + $html .= '<td class="w50p">'; $html .= graph_netflow_aggregate_pie( $data_pie, netflow_format_aggregate($aggregate), @@ -1206,7 +1206,7 @@ function netflow_draw_item( netflow_aggregate_is_ip($aggregate) ); - $html = '<div style="text-align:center;">'; + $html = '<div class="center">'; $html .= graph_netflow_circular_mesh($data_circular); $html .= '</div>'; return $html; diff --git a/pandora_console/include/functions_network.php b/pandora_console/include/functions_network.php index 3fe2695ba4..9d81bf8bdc 100644 --- a/pandora_console/include/functions_network.php +++ b/pandora_console/include/functions_network.php @@ -129,7 +129,7 @@ function network_print_explorer_header( $selected, $hidden_data ) { - $cell = '<div style="display: flex; align-items: center;">'; + $cell = '<div class="flex_center">'; $cell .= $title; $cell .= html_print_link_with_params( 'images/arrow-down-white.png', diff --git a/pandora_console/include/functions_notifications.php b/pandora_console/include/functions_notifications.php index 05371f6b3c..d7b2f8236a 100644 --- a/pandora_console/include/functions_notifications.php +++ b/pandora_console/include/functions_notifications.php @@ -942,6 +942,7 @@ function notifications_print_two_ways_select($info_selec, $users, $source_id) $users, $source_id ), + 'class' => 'invert_filter', ] ), html_print_image( @@ -954,6 +955,7 @@ function notifications_print_two_ways_select($info_selec, $users, $source_id) $users, $source_id ), + 'class' => 'invert_filter', ] ), html_print_select( diff --git a/pandora_console/include/functions_profile.php b/pandora_console/include/functions_profile.php index 0c04dc0d26..a16772c49e 100644 --- a/pandora_console/include/functions_profile.php +++ b/pandora_console/include/functions_profile.php @@ -279,7 +279,7 @@ function profile_print_profile_table($id) $data['actions'] .= html_print_input_hidden('delete_profile', 1, true); $data['actions'] .= html_print_input_hidden('id_user_profile', $profile['id_up'], true); $data['actions'] .= html_print_input_hidden('id_user', $id, true); - $data['actions'] .= html_print_input_image('del', 'images/cross.png', 1, '', true); + $data['actions'] .= html_print_input_image('del', 'images/cross.png', 1, ['class' => 'invert_filter'], true); $data['actions'] .= '</form>'; array_push($table->data, $data); diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 80f0801493..4e64eaaf6f 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -9712,7 +9712,7 @@ function reporting_get_agents_detailed_event( $img_st, true, [ - 'class' => 'image_status', + 'class' => 'image_status invert filter', 'width' => 16, 'title' => $title_st, ] @@ -10333,7 +10333,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')], false, false, false, true); + $tdata[0] = html_print_image('images/bell.png', true, ['title' => __('Defined alerts'), 'class' => 'invert_filter'], false, false, false, true); $tdata[1] = $data['monitor_alerts'] <= 0 ? '-' : $data['monitor_alerts']; $tdata[1] = '<a class="big_data" href="'.$urls['monitor_alerts'].'">'.$tdata[1].'</a>'; @@ -10344,10 +10344,21 @@ function reporting_get_stats_alerts($data, $links=false) */ if ($data['monitor_alerts'] > $data['total_agents'] && !enterprise_installed()) { - $tdata[2] = "<div id='alertagentmodal' class='publienterprise' title='Community version' style=''><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>"; + $tdata[2] = "<div id='alertagentmodal' class='publienterprise' title='Community version' ><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>"; } - $tdata[3] = html_print_image('images/bell_error.png', true, ['title' => __('Fired alerts')], false, false, false, true); + $tdata[3] = html_print_image( + 'images/bell_error.png', + true, + [ + 'title' => __('Fired alerts'), + 'class' => 'invert_filter', + ], + false, + false, + false, + true + ); $tdata[4] = $data['monitor_alerts_fired'] <= 0 ? '-' : $data['monitor_alerts_fired']; $tdata[4] = '<a style="color: '.COL_ALERTFIRED.';" class="big_data" href="'.$urls['monitor_alerts_fired'].'">'.$tdata[4].'</a>'; $table_al->rowclass[] = ''; @@ -10479,7 +10490,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')], false, false, false, true); + $tdata[0] = html_print_image('images/agent.png', true, ['title' => __('Total agents'), 'class' => 'invert_filter'], false, false, false, true); $tdata[1] = $data['total_agents'] <= 0 ? '-' : $data['total_agents']; $tdata[1] = '<a class="big_data" href="'.$urls['total_agents'].'">'.$tdata[1].'</a>'; @@ -10490,10 +10501,10 @@ function reporting_get_stats_agents_monitors($data) */ if ($data['total_agents'] > 500 && !enterprise_installed()) { - $tdata[2] = "<div id='agentsmodal' class='publienterprise' title='Community version' style=''><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>"; + $tdata[2] = "<div id='agentsmodal' class='publienterprise' title='Community version' ><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>"; } - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Monitor checks')], false, false, false, true); + $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Monitor checks'), 'class' => 'invert_filter'], false, false, false, true); $tdata[4] = $data['monitor_checks'] <= 0 ? '-' : $data['monitor_checks']; $tdata[4] = '<a class="big_data" href="'.$urls['monitor_checks'].'">'.$tdata[4].'</a>'; @@ -10504,7 +10515,7 @@ function reporting_get_stats_agents_monitors($data) */ if ($data['total_agents']) { if (($data['monitor_checks'] / $data['total_agents'] > 100) && !enterprise_installed()) { - $tdata[5] = "<div id='monitorcheckmodal' class='publienterprise' title='Community version' style=''><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>"; + $tdata[5] = "<div id='monitorcheckmodal' class='publienterprise' title='Community version' ><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>"; } } @@ -10534,7 +10545,7 @@ function reporting_get_stats_users($data) $table_us = html_get_predefined_table(); $tdata = []; - $tdata[0] = html_print_image('images/user_green.png', true, ['title' => __('Defined users')]); + $tdata[0] = html_print_image('images/user.png', true, ['title' => __('Defined users'), 'class' => 'invert_filter']); $tdata[1] = count(get_users()); $tdata[1] = '<a class="big_data" href="'.$urls['defined_users'].'">'.$tdata[1].'</a>'; @@ -11450,63 +11461,62 @@ function reporting_tiny_stats( if ($modern === true) { $out .= '<div id="bullets_modules">'; - // $out .='<span id="total_count_'.$uniq_id.'" class="forced_title" style="font-size: 13pt">'.$total_count.$separator.'</span>'; if (isset($fired_count) && $fired_count > 0) { $out .= '<div><div id="fired_count_'.$uniq_id.'" class="forced_title bullet_modules orange_background"></div>'; - $out .= '<span style="font-size: 12pt">'.$fired_count.'</span></div>'; + $out .= '<span class="font_12pt">'.$fired_count.'</span></div>'; } if (isset($critical_count) && $critical_count > 0) { $out .= '<div><div id="critical_count_'.$uniq_id.'" class="forced_title bullet_modules red_background"></div>'; - $out .= '<span style="font-size: 12pt">'.$critical_count.'</span></div>'; + $out .= '<span class="font_12pt">'.$critical_count.'</span></div>'; } if (isset($warning_count) && $warning_count > 0) { $out .= '<div><div id="warning_count_'.$uniq_id.'" class="forced_title bullet_modules yellow_background"></div>'; - $out .= '<span style="font-size: 12pt">'.$warning_count.'</span></div>'; + $out .= '<span class="font_12pt">'.$warning_count.'</span></div>'; } if (isset($unknown_count) && $unknown_count > 0) { $out .= '<div><div id="unknown_count_'.$uniq_id.'" class="forced_title bullet_modules grey_background"></div>'; - $out .= '<span style="font-size: 12pt">'.$unknown_count.'</span></div>'; + $out .= '<span class="font_12pt">'.$unknown_count.'</span></div>'; } if (isset($not_init_count) && $not_init_count > 0) { $out .= '<div><div id="not_init_count_'.$uniq_id.'" class="forced_title bullet_modules blue_background"></div>'; - $out .= '<span style="font-size: 12pt">'.$not_init_count.'</span></div>'; + $out .= '<span class="font_12pt">'.$not_init_count.'</span></div>'; } if (isset($normal_count) && $normal_count > 0) { $out .= '<div><div id="normal_count_'.$uniq_id.'" class="forced_title bullet_modules green_background"></div>'; - $out .= '<span style="font-size: 12pt">'.$normal_count.'</span></div>'; + $out .= '<span class="font_12pt">'.$normal_count.'</span></div>'; } $out .= '</div>'; } else { // Classic ones. - $out .= '<b><span id="total_count_'.$uniq_id.'" class="forced_title" style="font-size: 7pt">'.$total_count.'</span>'; + $out .= '<b><span id="total_count_'.$uniq_id.'" class="forced_title" >'.$total_count.'</span>'; if (isset($fired_count) && $fired_count > 0) { - $out .= ' '.$separator.' <span class="orange forced_title" id="fired_count_'.$uniq_id.'" style="font-size: 7pt">'.$fired_count.'</span>'; + $out .= ' '.$separator.' <span class="orange forced_title" id="fired_count_'.$uniq_id.'" >'.$fired_count.'</span>'; } if (isset($critical_count) && $critical_count > 0) { - $out .= ' '.$separator.' <span class="red forced_title" id="critical_count_'.$uniq_id.'" style="font-size: 7pt">'.$critical_count.'</span>'; + $out .= ' '.$separator.' <span class="red forced_title" id="critical_count_'.$uniq_id.'" >'.$critical_count.'</span>'; } if (isset($warning_count) && $warning_count > 0) { - $out .= ' '.$separator.' <span class="yellow forced_title" id="warning_count_'.$uniq_id.'" style="font-size: 7pt">'.$warning_count.'</span>'; + $out .= ' '.$separator.' <span class="yellow forced_title" id="warning_count_'.$uniq_id.'" >'.$warning_count.'</span>'; } if (isset($unknown_count) && $unknown_count > 0) { - $out .= ' '.$separator.' <span class="grey forced_title" id="unknown_count_'.$uniq_id.'" style="font-size: 7pt">'.$unknown_count.'</span>'; + $out .= ' '.$separator.' <span class="grey forced_title" id="unknown_count_'.$uniq_id.'" >'.$unknown_count.'</span>'; } if (isset($not_init_count) && $not_init_count > 0) { - $out .= ' '.$separator.' <span class="blue forced_title" id="not_init_count_'.$uniq_id.'" style="font-size: 7pt">'.$not_init_count.'</span>'; + $out .= ' '.$separator.' <span class="blue forced_title" id="not_init_count_'.$uniq_id.'" >'.$not_init_count.'</span>'; } if (isset($normal_count) && $normal_count > 0) { - $out .= ' '.$separator.' <span class="green forced_title" id="normal_count_'.$uniq_id.'" style="font-size: 7pt">'.$normal_count.'</span>'; + $out .= ' '.$separator.' <span class="green forced_title" id="normal_count_'.$uniq_id.'" >'.$normal_count.'</span>'; } $out .= '</b>'; @@ -12786,40 +12796,40 @@ 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')]); + $tdata[0] = html_print_image('images/module.png', true, ['title' => __('Total running modules'), 'class' => 'invert_filter']); $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>'; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second')]).'/sec </span>'; + $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec </span>'; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; $tdata = []; - $tdata[0] = '<hr style="border: 0; height: 1px; background: #DDD">'; + $tdata[0] = '<hr class="border_0 height_1px bg_ddd">'; $table_srv->colspan[count($table_srv->data)][0] = 4; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; $tdata = []; - $tdata[0] = html_print_image('images/database.png', true, ['title' => __('Local modules')]); + $tdata[0] = html_print_image('images/database.png', true, ['title' => __('Local modules'), 'class' => 'invert_filter']); $tdata[1] = '<span class="big_data">'.format_numeric($server_performance['total_local_modules']).'</span>'; $tdata[2] = '<span class="med_data">'.format_numeric($server_performance['local_modules_rate'], 2).'</span>'; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second')]).'/sec </span>'; + $tdata[3] = html_print_image('images/database.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec </span>'; $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')]); + $tdata[0] = html_print_image('images/network.png', true, ['title' => __('Network modules'), 'class' => 'invert_filter']); $tdata[1] = '<span class="big_data">'.format_numeric($server_performance['total_network_modules']).'</span>'; $tdata[2] = '<span class="med_data">'.format_numeric($server_performance['network_modules_rate'], 2).'</span>'; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second')]).'/sec </span>'; + $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec </span>'; if ($server_performance['total_remote_modules'] > 10000 && !enterprise_installed()) { - $tdata[4] = "<div id='remotemodulesmodal' class='publienterprise' title='Community version' style='text-align:left;'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>"; + $tdata[4] = "<div id='remotemodulesmodal' class='publienterprise left' title='Community version'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>"; } else { $tdata[4] = ' '; } @@ -12830,11 +12840,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')]); + $tdata[0] = html_print_image('images/plugin.png', true, ['title' => __('Plugin modules'), 'class' => 'invert_filter']); $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>'; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second')]).'/sec </span>'; + $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec </span>'; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; @@ -12842,11 +12852,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')]); + $tdata[0] = html_print_image('images/chart_bar.png', true, ['title' => __('Prediction modules'), 'class' => 'invert_filter']); $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>'; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second')]).'/sec </span>'; + $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec </span>'; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; @@ -12854,11 +12864,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')]); + $tdata[0] = html_print_image('images/wmi.png', true, ['title' => __('WMI modules'), 'class' => 'invert_filter']); $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>'; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second')]).'/sec </span>'; + $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec </span>'; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; @@ -12870,14 +12880,14 @@ function reporting_get_stats_servers() $tdata[1] = '<span class="big_data">'.format_numeric($server_performance['total_web_modules']).'</span>'; $tdata[2] = '<span class="med_data">'.format_numeric($server_performance['web_modules_rate'], 2).'</span>'; - $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second')]).'/sec </span>'; + $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Ratio').': '.__('Modules by second'), 'class' => 'invert_filter']).'/sec </span>'; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; } $tdata = []; - $tdata[0] = '<hr style="border: 0; height: 1px; background: #DDD">'; + $tdata[0] = '<hr class="border_0 height_1px bg_ddd">'; $table_srv->colspan[count($table_srv->data)][0] = 4; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; @@ -12888,12 +12898,13 @@ function reporting_get_stats_servers() true, [ 'title' => __('Total events'), + 'class' => 'invert_filter', ] ); $tdata[1] = '<span class="big_data" id="total_events">'.html_print_image('images/spinner.gif', true).'</span>'; if (isset($system_events) && $system_events > 50000 && !enterprise_installed()) { - $tdata[2] = "<div id='monitoreventsmodal' class='publienterprise' title='Community version' style='text-align:left'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>"; + $tdata[2] = "<div id='monitoreventsmodal' class='publienterprise left' title='Community version'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>"; } else { $tdata[3] = ' '; } @@ -13559,7 +13570,7 @@ function reporting_header_table_for_pdf($title='', $description='') $result_pdf .= '<thead class="header_tr"><tr>'; $result_pdf .= '<th class="th_first" colspan="2">'; $result_pdf .= $title; - $result_pdf .= '</th><th style="font-size: 15px;" align="right">'; + $result_pdf .= '</th><th class="font_15px" align="right">'; $result_pdf .= '</th></tr><tr><th colspan="3" class="th_description">'; $result_pdf .= $description; $result_pdf .= '</th></tr></thead></table>'; diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 8f27e19933..117d32b9f4 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -82,7 +82,7 @@ function reporting_html_header( $table->colspan[0][0] = 3; } else if (empty($subtitle)) { $data[] = $sizh.$title.$sizhfin; - $data[] = "<div style='text-align: right;'>".$sizh.$date_text.$sizhfin.'</div>'; + $data[] = "<div class='right'>".$sizh.$date_text.$sizhfin.'</div>'; $table->colspan[0][1] = 2; } else if (empty($date_text)) { $data[] = $sizh.$title.$sizhfin; @@ -96,7 +96,7 @@ function reporting_html_header( $data[] = $title.$sizhfin; $data[] = $sizh.$subtitle.$sizhfin; - $data[] = "<div style='text-align: right;'>".$sizh.$date_text.$sizhfin.'</div>'; + $data[] = "<div class='right'>".$sizh.$date_text.$sizhfin.'</div>'; } array_push($table->data, $data); @@ -115,7 +115,7 @@ function html_do_report_info($report) $date_today = date($config['date_format']); - $html = '<div style="border: 1px dashed #999; padding: 10px 15px; background: '.$background_color.';margin-top:20px;margin-bottom:20px;"><table> + $html = '<div class="report_info" style="background: '.$background_color.'"><table> <tr> <td><b>'.__('Generated').': </b></td><td>'.$date_today.'</td> </tr> @@ -414,7 +414,7 @@ function reporting_html_print_report($report, $mini=false, $report_info=1) } if ($item['type'] == 'agent_module') { - echo '<div style="width: 100%; overflow: auto;">'; + echo '<div class="overflow w100p">'; } html_print_table($table); @@ -1050,7 +1050,7 @@ function reporting_html_event_report_group($table, $item, $pdf=0) $img_st, true, [ - 'class' => 'image_status', + 'class' => 'image_status invert_filter', 'width' => 16, 'title' => $title_st, 'id' => 'status_img_'.$event['id_evento'], @@ -1085,9 +1085,9 @@ function reporting_html_event_report_group($table, $item, $pdf=0) } if ($item['show_summary_group']) { - $data[] = '<font style="font-size: 6pt;">'.date($config['date_format'], $event['timestamp_rep']).'</font>'; + $data[] = '<font class="font_6pt">'.date($config['date_format'], $event['timestamp_rep']).'</font>'; } else { - $data[] = '<font style="font-size: 6pt;">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>'; + $data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>'; } array_push($table1->data, $data); @@ -1098,7 +1098,7 @@ function reporting_html_event_report_group($table, $item, $pdf=0) foreach ($extended_events as $extended_event) { $extended_data = []; - $extended_data[] = "<td colspan='5'><font style='font-style: italic;'>".io_safe_output($extended_event['description'])."</font></td><td><font style='font-size: 6pt; font-style: italic;'>".date($config['date_format'], $extended_event['utimestamp']).'</font></td>'; + $extended_data[] = "<td colspan='5'><font class='italic'>".io_safe_output($extended_event['description'])."</font></td><td><font class='font_6pt italic'>".date($config['date_format'], $extended_event['utimestamp']).'</font></td>'; array_push($table1->data, $extended_data); } } @@ -1273,7 +1273,7 @@ function reporting_html_event_report_module($table, $item, $pdf=0) $img_st, true, [ - 'class' => 'image_status', + 'class' => 'image_status invert_filter', 'width' => 16, 'title' => $title_st, 'id' => 'status_img_'.$event['id_evento'], @@ -1297,7 +1297,7 @@ function reporting_html_event_report_module($table, $item, $pdf=0) foreach ($extended_events as $extended_event) { $extended_data = []; - $extended_data[] = "<td colspan='3'><font style='font-style: italic;'>".io_safe_output($extended_event['description'])."</font></td><td><font style='font-style: italic;'>".date($config['date_format'], $extended_event['utimestamp']).'</font></td>'; + $extended_data[] = "<td colspan='3'><font class='italic'>".io_safe_output($extended_event['description'])."</font></td><td><font class='italic'>".date($config['date_format'], $extended_event['utimestamp']).'</font></td>'; array_push($table1->data, $extended_data); } } @@ -1602,7 +1602,7 @@ function reporting_html_agent_module($table, $item) if (!empty($item['failed'])) { $table->data['agent_module']['cell'] = $item['failed']; } else { - $table_data = '<table cellpadding="1" cellspacing="4" cellspacing="0" border="0" style="background-color: #EEE;">'; + $table_data = '<table cellpadding="1" cellspacing="4" cellspacing="0" border="0" class="bg_eee">'; $table_data .= '<th>'.__('Agents').' / '.__('Modules').'</th>'; @@ -1618,11 +1618,11 @@ function reporting_html_agent_module($table, $item) false, '...' ); - $table_data .= '<th style="padding: 10px;">'.$file_name.'</th>'; + $table_data .= '<th class="pdd_10px">'.$file_name.'</th>'; } foreach ($item['data'] as $row) { - $table_data .= "<tr style='height: 35px;'>"; + $table_data .= "<tr class='height_35px;'>"; switch ($row['agent_status']) { case AGENT_STATUS_ALERT_FIRED: $rowcolor = COL_ALERTFIRED; @@ -1664,9 +1664,9 @@ function reporting_html_agent_module($table, $item) foreach ($row['modules'] as $module_name => $module) { if ($module === null) { - $table_data .= "<td style='background-color: #DDD;'></td>"; + $table_data .= "<td class='bg_dd;'></td>"; } else { - $table_data .= "<td style='text-align: center; background-color: #DDD;'>"; + $table_data .= "<td class='center bg_ddd'>"; switch ($module) { default: case AGENT_STATUS_NORMAL: @@ -1781,10 +1781,10 @@ function reporting_html_agent_module($table, $item) $table_data .= '</table>'; - $table_data .= "<div class='legend_basic' style='width: 96%'>"; + $table_data .= "<div class='legend_basic w96p'>"; $table_data .= '<table>'; - $table_data .= "<tr><td colspan='2' style='padding-bottom: 10px;'><b>".__('Legend').'</b></td></tr>'; + $table_data .= "<tr><td colspan='2' class='pdd_b_10px'><b>".__('Legend').'</b></td></tr>'; $table_data .= "<tr><td class='legend_square_simple'><div style='background-color: ".COL_ALERTFIRED.";'></div></td><td>".__('Orange cell when the module has fired alerts').'</td></tr>'; $table_data .= "<tr><td class='legend_square_simple'><div style='background-color: ".COL_CRITICAL.";'></div></td><td>".__('Red cell when the module has a critical status').'</td></tr>'; $table_data .= "<tr><td class='legend_square_simple'><div style='background-color: ".COL_WARNING.";'></div></td><td>".__('Yellow cell when the module has a warning status').'</td></tr>'; @@ -2051,7 +2051,7 @@ function reporting_html_event_report_agent($table, $item, $pdf=0) $img_st, true, [ - 'class' => 'image_status', + 'class' => 'image_status invert_filter', 'width' => 16, 'title' => $title_st, ] @@ -2079,9 +2079,9 @@ function reporting_html_event_report_agent($table, $item, $pdf=0) } if ($item['show_summary_group']) { - $data[] = '<font style="font-size: 6pt;">'.date($config['date_format'], $event['timestamp']).'</font>'; + $data[] = '<font class="font_6pt">'.date($config['date_format'], $event['timestamp']).'</font>'; } else { - $data[] = '<font style="font-size: 6pt;">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>'; + $data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>'; } array_push($table1->data, $data); @@ -2092,7 +2092,7 @@ function reporting_html_event_report_agent($table, $item, $pdf=0) foreach ($extended_events as $extended_event) { $extended_data = []; - $extended_data[] = "<td colspan='4'><font style='font-style: italic;'>".io_safe_output($extended_event['description'])."</font></td><td><font style='font-size: 6pt; font-style: italic;'>".date($config['date_format'], $extended_event['utimestamp']).'</font></td>'; + $extended_data[] = "<td colspan='4'><font class='italic'>".io_safe_output($extended_event['description'])."</font></td><td><font class='font_6pt italic'>".date($config['date_format'], $extended_event['utimestamp']).'</font></td>'; array_push($table1->data, $extended_data); } } @@ -2205,7 +2205,7 @@ function reporting_html_historical_data($table, $item, $pdf=0) if ($config['command_snapshot']) { $row = [ $data[__('Date')], - '<img style="width:300px" src="'.io_safe_input($data[__('Data')]).'"></a>', + '<img class="w300px" src="'.io_safe_input($data[__('Data')]).'"></a>', ]; } else { $row = [ @@ -2295,7 +2295,7 @@ function reporting_html_database_serialized($table, $item, $pdf=0) foreach ($data_unserialized as $key => $data_value) { if (is_snapshot_data($data_unserialized[$key])) { if ($config['command_snapshot']) { - $data_unserialized[$key] = '<img style="width:300px" src="'.io_safe_input($data_value).'"></a>'; + $data_unserialized[$key] = '<img class="w300px" src="'.io_safe_input($data_value).'"></a>'; } else { $data_unserialized[$key] = wordwrap(io_safe_input($data_value), 60, "<br>\n", true); } @@ -2681,17 +2681,17 @@ function reporting_html_alert_report($table, $item, $pdf=0) continue; } - $row['actions'] .= '<div style="width: 100%;">'.$action['name'].'</div>'; + $row['actions'] .= '<div class="w100p">'.$action['name'].'</div>'; if (is_numeric($action['fired'])) { - $row['fired'] .= '<div style="width: 100%;">'.date('Y-m-d H:i:s', $action['fired']).'</div>'; + $row['fired'] .= '<div class="w100p">'.date('Y-m-d H:i:s', $action['fired']).'</div>'; } else { - $row['fired'] .= '<div style="width: 100%;">'.$action['fired'].'</div>'; + $row['fired'] .= '<div class="w100p">'.$action['fired'].'</div>'; } } $row['tfired'] = ''; foreach ($alert['template_fired'] as $fired) { - $row['tfired'] .= '<div style="width: 100%;">'.$fired.'</div>'."\n"; + $row['tfired'] .= '<div class="w100p">'.$fired.'</div>'."\n"; } // Skip first td's to avoid repeat the agent and module names. @@ -2763,10 +2763,10 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0) $table1->head = []; $table1->data = []; if ($item['data']['unknown'] == 1) { - $table1->data['data']['unknown'] = '<p style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_UNKNOWN.';">'; + $table1->data['data']['unknown'] = '<p class="bolder" style="font-size: '.$font_size.' !important; color: '.COL_UNKNOWN.';">'; $table1->data['data']['unknown'] .= __('Unknown').'</p>'; } else { - $table1->data['data']['ok'] = '<p style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_NORMAL.';">'; + $table1->data['data']['ok'] = '<p class="bolder" style="font-size: '.$font_size.' !important; color: '.COL_NORMAL.';">'; $table1->data['data']['ok'] .= html_print_image( 'images/module_ok.png', true @@ -2777,7 +2777,7 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0) ) ).' %</p>'; - $table1->data['data']['fail'] = '<p style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_CRITICAL.';">'; + $table1->data['data']['fail'] = '<p class="bolder" style="font-size: '.$font_size.' !important; color: '.COL_CRITICAL.';">'; $table1->data['data']['fail'] .= html_print_image( 'images/module_critical.png', true @@ -3169,7 +3169,7 @@ function reporting_html_value( $table->colspan['data']['cell'] = 3; $table->cellstyle['data']['cell'] = 'text-align: left;'; - $table->data['data']['cell'] = '<p style="font-weight: bold; font-size: '.$font_size.'; color: #000000;">'; + $table->data['data']['cell'] = '<p class="bolder" style="font-size: '.$font_size.'; color: #000000;">'; if ($check_empty && empty($item['data']['value'])) { $table->data['data']['cell'] .= __('Unknown'); @@ -3619,7 +3619,7 @@ function reporting_html_availability($table, $item, $pdf=0) $table_row[] = ''; }; - $table_row[] = '<span style="font-size: '.$font_size.'; font-weight:bold;">'.sla_truncate($row['SLA'], $config['graph_precision']).'%</span>'; + $table_row[] = '<span class="bolder" style="font-size: '.$font_size.';">'.sla_truncate($row['SLA'], $config['graph_precision']).'%</span>'; $table_row2 = []; if (isset($row['failover']) === true) { @@ -3760,7 +3760,7 @@ function reporting_html_availability($table, $item, $pdf=0) $item['resume']['min'], $config['graph_precision'] ).'%', - 'avg' => '<span style="font-size: '.$font_size.'; font-weight:bold;">'.sla_truncate($item['resume']['avg'], $config['graph_precision']).'%</span>', + 'avg' => '<span class="bolder" style="font-size: '.$font_size.';">'.sla_truncate($item['resume']['avg'], $config['graph_precision']).'%</span>', ]; if ($item['fields']['agent_max_value'] == false) { $table1->head['max_text'] = ''; @@ -4390,8 +4390,8 @@ function reporting_get_stats_summary($data, $graph_width, $graph_height) $table_sum->colspan[count($table_sum->data)][2] = 2; $table_sum->cellstyle[count($table_sum->data)][0] = 'text-align: center;'; $table_sum->cellstyle[count($table_sum->data)][2] = 'text-align: center;'; - $tdata[0] = '<span class="med_data" style="color: #666">'.__('Module status').'</span>'; - $tdata[2] = '<span class="med_data" style="color: #666">'.__('Alert level').'</span>'; + $tdata[0] = '<span class="med_data color_666">'.__('Module status').'</span>'; + $tdata[2] = '<span class="med_data color_666">'.__('Alert level').'</span>'; $table_sum->rowclass[] = ''; $table_sum->data[] = $tdata; @@ -4816,7 +4816,7 @@ function reporting_get_agent_detailed( // Show modules in agent. $output .= '<div class="agent_reporting">'; - $output .= '<h3 style="text-decoration: underline">'.__('Agent').' - '.agents_get_alias($id_agent).'</h3>'; + $output .= '<h3 class="underline">'.__('Agent').' - '.agents_get_alias($id_agent).'</h3>'; $output .= '<h4>'.__('Modules').'</h3>'; $table_modules = reporting_get_agent_modules_table($id_agent, $period, $date); $table_modules->width = '99%'; @@ -4999,25 +4999,25 @@ function reporting_get_agents_by_status($data, $graph_width=250, $graph_height=1 $agent_data = []; $agent_data[0] = html_print_image('images/agent_critical.png', true, ['title' => __('Agents critical')]); - $agent_data[1] = "<a style='color: ".COL_CRITICAL.";' href='".$links['agents_critical']."'><b><span style='font-size: 12pt; font-weight: bold; color: #e63c52;'>".format_numeric($data['agent_critical']).'</span></b></a>'; + $agent_data[1] = "<a style='color: ".COL_CRITICAL.";' href='".$links['agents_critical']."'><b><span class='red_color font_12pt bolder'>".format_numeric($data['agent_critical']).'</span></b></a>'; $agent_data[2] = html_print_image('images/agent_warning.png', true, ['title' => __('Agents warning')]); - $agent_data[3] = "<a style='color: ".COL_WARNING.";' href='".$links['agents_warning']."'><b><span style='font-size: 12pt; font-weight: bold; color: #f3b200;'>".format_numeric($data['agent_warning']).'</span></b></a>'; + $agent_data[3] = "<a style='color: ".COL_WARNING.";' href='".$links['agents_warning']."'><b><span class='yellow_color font_12pt bolder'>".format_numeric($data['agent_warning']).'</span></b></a>'; $table_agent->data[] = $agent_data; $agent_data = []; $agent_data[0] = html_print_image('images/agent_ok.png', true, ['title' => __('Agents ok')]); - $agent_data[1] = "<a style='color: ".COL_NORMAL.";' href='".$links['agents_ok']."'><b><span style='font-size: 12pt; font-weight: bold; color: #82b92e;'>".format_numeric($data['agent_ok']).'</span></b></a>'; + $agent_data[1] = "<a style='color: ".COL_NORMAL.";' href='".$links['agents_ok']."'><b><span class='green_color font_12pt bolder'>".format_numeric($data['agent_ok']).'</span></b></a>'; $agent_data[2] = html_print_image('images/agent_unknown.png', true, ['title' => __('Agents unknown')]); - $agent_data[3] = "<a style='color: ".COL_UNKNOWN.";' 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: ".COL_UNKNOWN.";' href='".$links['agents_unknown']."'><b><span class='grey_color font_12pt bolder'>".format_numeric($data['agent_unknown']).'</span></b></a>'; $table_agent->data[] = $agent_data; $agent_data = []; $agent_data[0] = html_print_image('images/agent_notinit.png', true, ['title' => __('Agents not init')]); - $agent_data[1] = "<a style='color: ".COL_NOTINIT.";' 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: ".COL_NOTINIT.";' href='".$links['agents_not_init']."'><b><span class='blue_color_ligther font_12pt bolder'>".format_numeric($data['agent_not_init']).'</span></b></a>'; $agent_data[2] = ''; $agent_data[3] = ''; @@ -5047,9 +5047,23 @@ function reporting_get_total_agents_and_monitors($data, $graph_width=250, $graph $table_total = html_get_predefined_table(); $total_data = []; - $total_data[0] = html_print_image('images/agent.png', true, ['title' => __('Total agents')]); + $total_data[0] = html_print_image( + 'images/agent.png', + true, + [ + 'title' => __('Total agents'), + 'class' => 'invert_filter', + ] + ); $total_data[1] = $total_agent <= 0 ? '-' : $total_agent; - $total_data[2] = html_print_image('images/module.png', true, ['title' => __('Monitor checks')]); + $total_data[2] = html_print_image( + 'images/module.png', + true, + [ + 'title' => __('Monitor checks'), + 'class' => 'invert_filter', + ] + ); $total_data[3] = $total_module <= 0 ? '-' : $total_module; $table_total->data[] = $total_data; $total_agent_module = '<fieldset class="databox tactical_set"> @@ -5066,7 +5080,7 @@ function reporting_get_total_servers($num_servers) $table_node = html_get_predefined_table(); $node_data = []; - $node_data[0] = html_print_image('images/server_export.png', true, ['title' => __('Nodes')]); + $node_data[0] = html_print_image('images/server_export.png', true, ['title' => __('Nodes'), 'class' => 'invert_filter']); $node_data[1] = "<b><span style='font-size: 12pt; font-weight: bold; color: black;'>".format_numeric($num_servers).'</span></b>'; $table_node->data[] = $node_data; @@ -5098,25 +5112,25 @@ function reporting_get_events($data, $links=false) if (defined('METACONSOLE')) { $table_events->style[0] = 'background-color:#e63c52'; $table_events->data[0][0] = html_print_image('images/module_event_critical.png', true, ['title' => __('Critical events')]); - $table_events->data[0][0] .= '   '."<a style='color:#FFF; font-size: 12pt; font-weight: bold;".$style."' href='".$links['critical']."'>".format_numeric($data['critical']).'</a>'; + $table_events->data[0][0] .= '   '."<a class='font_12pt bolder color_white' style='".$style."' href='".$links['critical']."'>".format_numeric($data['critical']).'</a>'; $table_events->style[1] = 'background-color:#f3b200'; $table_events->data[0][1] = html_print_image('images/module_event_warning.png', true, ['title' => __('Warning events')]); - $table_events->data[0][1] .= '   '."<a style='color:#FFF; font-size: 12pt; font-weight: bold;".$style."' href='".$links['warning']."'>".format_numeric($data['warning']).'</a>'; + $table_events->data[0][1] .= '   '."<a class='font_12pt bolder color_white' style='".$style."' href='".$links['warning']."'>".format_numeric($data['warning']).'</a>'; $table_events->style[2] = 'background-color:#82b92e'; $table_events->data[0][2] = html_print_image('images/module_event_ok.png', true, ['title' => __('OK events')]); - $table_events->data[0][2] .= '   '."<a style='color:#FFF; font-size: 12pt; font-weight: bold;".$style."' href='".$links['normal']."'>".format_numeric($data['normal']).'</a>'; + $table_events->data[0][2] .= '   '."<a class='font_12pt bolder color_white' style='".$style."' href='".$links['normal']."'>".format_numeric($data['normal']).'</a>'; $table_events->style[3] = 'background-color:#B2B2B2'; $table_events->data[0][3] = html_print_image('images/module_event_unknown.png', true, ['title' => __('Unknown events')]); - $table_events->data[0][3] .= '   '."<a style='color:#FFF; font-size: 12pt; font-weight: bold;".$style."' href='".$links['unknown']."'>".format_numeric($data['unknown']).'</a>'; + $table_events->data[0][3] .= '   '."<a class='font_12pt bolder color_white' style='".$style."' href='".$links['unknown']."'>".format_numeric($data['unknown']).'</a>'; } else { $table_events->data[0][0] = html_print_image('images/module_critical.png', true, ['title' => __('Critical events')]); - $table_events->data[0][0] .= '   '."<a style='color: #e63c52;".$style."' href='".$links['critical']."'><b><span style='font-size: 12pt; font-weight: bold; color: #e63c52;'>".format_numeric($data['critical']).'</span></b></a>'; + $table_events->data[0][0] .= '   '."<a class='font_12pt bolder red_color' style='".$style."' href='".$links['critical']."'><b><span class='font_12pt bolder red_color'>".format_numeric($data['critical']).'</span></b></a>'; $table_events->data[0][1] = html_print_image('images/module_warning.png', true, ['title' => __('Warning events')]); - $table_events->data[0][1] .= '   '."<a style='color: #f3b200;".$style."' href='".$links['warning']."'><b><span style='font-size: 12pt; font-weight: bold; color: #f3b200;'>".format_numeric($data['warning']).'</span></b></a>'; + $table_events->data[0][1] .= '   '."<a class='font_12pt bolder yellow_color' style='".$style."' href='".$links['warning']."'><b><span class='font_12pt bolder yellow_color;'>".format_numeric($data['warning']).'</span></b></a>'; $table_events->data[0][2] = html_print_image('images/module_ok.png', true, ['title' => __('OK events')]); - $table_events->data[0][2] .= '   '."<a style='color: #82b92e;".$style."' href='".$links['normal']."'><b style='font-size: 12pt; font-weight: bold; color: #82b92e;'>".format_numeric($data['normal']).'</b></a>'; + $table_events->data[0][2] .= '   '."<a class='font_12pt bolder green_color' style='".$style."' href='".$links['normal']."'><b class='font_12pt bolder green_color'>".format_numeric($data['normal']).'</b></a>'; $table_events->data[0][3] = html_print_image('images/module_unknown.png', true, ['title' => __('Unknown events')]); - $table_events->data[0][3] .= '   '."<a style='color: #B2B2B2;".$style."' href='".$links['unknown']."'><b><span style='font-size: 12pt; font-weight: bold; color: #B2B2B2;'>".format_numeric($data['unknown']).'</span></b></a>'; + $table_events->data[0][3] .= '   '."<a class='font_12pt bolder grey_color' style='".$style."' href='".$links['unknown']."'><b><span class='font_12pt bolder grey_color'>".format_numeric($data['unknown']).'</span></b></a>'; } if (!defined('METACONSOLE')) { diff --git a/pandora_console/include/functions_servers.php b/pandora_console/include/functions_servers.php index e1fe34b066..75cc19c0ee 100644 --- a/pandora_console/include/functions_servers.php +++ b/pandora_console/include/functions_servers.php @@ -555,9 +555,12 @@ function servers_get_info($id_server=-1) switch ($server['server_type']) { case SERVER_TYPE_DATA: $server['img'] = html_print_image( - 'images/data.png', + 'images/database.png', true, - ['title' => __('Data server')] + [ + 'title' => __('Data server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'data'; $id_modulo = 1; @@ -567,7 +570,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/network.png', true, - ['title' => __('Network server')] + [ + 'title' => __('Network server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'network'; $id_modulo = 2; @@ -577,7 +583,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/snmp.png', true, - ['title' => __('SNMP Trap server')] + [ + 'title' => __('SNMP Trap server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'snmp'; $id_modulo = 0; @@ -587,7 +596,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/recon.png', true, - ['title' => __('Discovery server')] + [ + 'title' => __('Discovery server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'recon'; $id_modulo = 0; @@ -597,7 +609,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/plugin.png', true, - ['title' => __('Plugin server')] + [ + 'title' => __('Plugin server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'plugin'; $id_modulo = 4; @@ -607,7 +622,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/chart_bar.png', true, - ['title' => __('Prediction server')] + [ + 'title' => __('Prediction server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'prediction'; $id_modulo = 5; @@ -617,7 +635,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/wmi.png', true, - ['title' => __('WMI server')] + [ + 'title' => __('WMI server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'wmi'; $id_modulo = 6; @@ -627,7 +648,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/server_export.png', true, - ['title' => __('Export server')] + [ + 'title' => __('Export server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'export'; $id_modulo = 0; @@ -637,7 +661,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/page_white_text.png', true, - ['title' => __('Inventory server')] + [ + 'title' => __('Inventory server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'inventory'; $id_modulo = 0; @@ -647,7 +674,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/world.png', true, - ['title' => __('Web server')] + [ + 'title' => __('Web server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'web'; $id_modulo = 0; @@ -657,7 +687,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/lightning_go.png', true, - ['title' => __('Event server')] + [ + 'title' => __('Event server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'event'; $id_modulo = 2; @@ -667,7 +700,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/network.png', true, - ['title' => __('Enterprise ICMP server')] + [ + 'title' => __('Enterprise ICMP server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'enterprise icmp'; $id_modulo = 2; @@ -677,7 +713,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/network.png', true, - ['title' => __('Enterprise SNMP server')] + [ + 'title' => __('Enterprise SNMP server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'enterprise snmp'; $id_modulo = 2; @@ -687,7 +726,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/satellite.png', true, - ['title' => __('Enterprise Satellite server')] + [ + 'title' => __('Enterprise Satellite server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'enterprise satellite'; $id_modulo = 0; @@ -697,7 +739,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/transactional_map.png', true, - ['title' => __('Enterprise Transactional server')] + [ + 'title' => __('Enterprise Transactional server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'enterprise transactional'; $id_modulo = 0; @@ -707,7 +752,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/mainframe.png', true, - ['title' => __('Mainframe server')] + [ + 'title' => __('Mainframe server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'mainframe'; $id_modulo = 0; @@ -717,7 +765,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/sync.png', true, - ['title' => __('Sync server')] + [ + 'title' => __('Sync server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'sync'; $id_modulo = 0; @@ -727,7 +778,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/icono-wux.png', true, - ['title' => __('Wux server')] + [ + 'title' => __('Wux server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'wux'; $id_modulo = 0; @@ -737,7 +791,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/syslog.png', true, - ['title' => __('Log server')] + [ + 'title' => __('Log server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'syslog'; $id_modulo = 0; @@ -747,7 +804,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/autoprovision.png', true, - ['title' => __('Autoprovision server')] + [ + 'title' => __('Autoprovision server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'autoprovision'; $id_modulo = 0; @@ -757,7 +817,10 @@ function servers_get_info($id_server=-1) $server['img'] = html_print_image( 'images/migration.png', true, - ['title' => __('Migration server')] + [ + 'title' => __('Migration server'), + 'class' => 'invert_filter', + ] ); $server['type'] = 'migration'; $id_modulo = 0; @@ -1075,7 +1138,10 @@ function servers_show_type($id) $return = html_print_image( 'images/database.png', true, - ['title' => get_product_name().' Data server'] + [ + 'title' => get_product_name().' Data server', + 'class' => 'invert_filter', + ] ); break; @@ -1083,7 +1149,10 @@ function servers_show_type($id) $return = html_print_image( 'images/network.png', true, - ['title' => get_product_name().' Network server'] + [ + 'title' => get_product_name().' Network server', + 'class' => 'invert_filter', + ] ); break; @@ -1091,7 +1160,10 @@ function servers_show_type($id) $return = html_print_image( 'images/plugin.png', true, - ['title' => get_product_name().' Plugin server'] + [ + 'title' => get_product_name().' Plugin server', + 'class' => 'invert_filter', + ] ); break; @@ -1099,7 +1171,10 @@ function servers_show_type($id) $return = html_print_image( 'images/chart_bar.png', true, - ['title' => get_product_name().' Prediction server'] + [ + 'title' => get_product_name().' Prediction server', + 'class' => 'invert_filter', + ] ); break; @@ -1107,7 +1182,10 @@ function servers_show_type($id) $return = html_print_image( 'images/wmi.png', true, - ['title' => get_product_name().' WMI server'] + [ + 'title' => get_product_name().' WMI server', + 'class' => 'invert_filter', + ] ); break; @@ -1115,15 +1193,21 @@ function servers_show_type($id) $return = html_print_image( 'images/server_web.png', true, - ['title' => get_product_name().' WEB server'] + [ + 'title' => get_product_name().' WEB server', + 'class' => 'invert_filter', + ] ); break; case 8: $return = html_print_image( - 'images/module-wux.png', + 'images/module_wux.png', true, - ['title' => get_product_name().' WUX server'] + [ + 'title' => get_product_name().' WUX server', + 'class' => 'invert_filter', + ] ); break; diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index a67131d8a7..ec31f20cc2 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -37,27 +37,26 @@ enterprise_include_once( // Date format for nfdump. global $nfdump_date_format; -$nfdump_date_format = 'Y/m/d.H:i:s'; +$nfdump_date_format = 'Y/m/d.H:i:s';/** + * Generates a Tree with given $tree information. + * + * Selects all netflow filters (array (id_name => id_name)) or filters filtered + * Used also in Cloud Wizard. + * + * @param string $tree SNMP tree returned by snmp_broser_get_tree. + * @param string $id Level ID. Do not set, used for recursion. + * @param string $depth Branch depth. Do not set, used for recursion. + * @param integer $last Last. + * @param array $last_array Last_array. + * @param string $sufix Sufix. + * @param array $checked Checked. + * @param boolean $descriptive_ids Descriptive_ids. + * @param string $previous_id Previous_id. + * + * @return string HTML code with complete tree. + */ -/** - * Generates a Tree with given $tree information. - * - * Selects all netflow filters (array (id_name => id_name)) or filters filtered - * Used also in Cloud Wizard. - * - * @param string $tree SNMP tree returned by snmp_broser_get_tree. - * @param string $id Level ID. Do not set, used for recursion. - * @param string $depth Branch depth. Do not set, used for recursion. - * @param integer $last Last. - * @param array $last_array Last_array. - * @param string $sufix Sufix. - * @param array $checked Checked. - * @param boolean $descriptive_ids Descriptive_ids. - * @param string $previous_id Previous_id. - * - * @return string HTML code with complete tree. - */ function snmp_browser_get_html_tree( $tree, $id=0, @@ -89,23 +88,23 @@ function snmp_browser_get_html_tree( $class = 'item_'.$depth; if ($depth > 0) { - $output .= '<ul id="ul_'.$id.'" style="margin: 0; padding: 0; display: none;">'; + $output .= '<ul id="ul_'.$id.'" class="mrgn_0px pdd_0px invisible">'; } else { - $output .= '<ul id="ul_'.$id.'" style="margin: 0; padding: 0;">'; + $output .= '<ul id="ul_'.$id.'" class="mrgn_0px pdd_0px">'; } foreach ($tree['__LEAVES__'] as $level => $sub_level) { // Id used to expand leafs. $sub_id = time().rand(0, getrandmax()); // Display the branch. - $output .= '<li id="li_'.$sub_id.'" class="'.$class.'" style="margin: 0; padding: 0;">'; + $output .= '<li id="li_'.$sub_id.'" class="'.$class.' mrgn_0px pdd_0px">'; // Indent sub branches. for ($i = 1; $i <= $depth; $i++) { if ($last_array[$i] == 1) { - $output .= '<img src="'.$url.'/no_branch.png" style="vertical-align: middle;">'; + $output .= '<img src="'.$url.'/no_branch.png" class="vertical_middle">'; } else { - $output .= '<img src="'.$url.'/branch.png" style="vertical-align: middle;">'; + $output .= '<img src="'.$url.'/branch.png" class="vertical_middle">'; } } @@ -114,14 +113,14 @@ function snmp_browser_get_html_tree( $output .= "<a id='anchor_$sub_id' onfocus='javascript: this.blur();' href='javascript: toggleTreeNode(\"$sub_id\", \"$id\");'>"; if ($depth == 0 && $count == 0) { if ($count == $total) { - $output .= '<img src="'.$url.'/one_closed.png" style="vertical-align: middle;">'; + $output .= '<img src="'.$url.'/one_closed.png" class="vertical_middle">'; } else { - $output .= '<img src="'.$url.'/first_closed.png" style="vertical-align: middle;">'; + $output .= '<img src="'.$url.'/first_closed.png" class="vertical_middle">'; } } else if ($count == $total) { - $output .= '<img src="'.$url.'/last_closed.png" style="vertical-align: middle;">'; + $output .= '<img src="'.$url.'/last_closed.png" class="vertical_middle">'; } else { - $output .= '<img src="'.$url.'/closed.png" style="vertical-align: middle;">'; + $output .= '<img src="'.$url.'/closed.png" class="vertical_middle">'; } $output .= '</a>'; @@ -131,21 +130,21 @@ function snmp_browser_get_html_tree( else { if ($depth == 0 && $count == 0) { if ($count == $total) { - $output .= '<img src="'.$url.'/no_branch.png" style="vertical-align: middle;">'; + $output .= '<img src="'.$url.'/no_branch.png" class="vertical_middle">'; } else { - $output .= '<img src="'.$url.'/first_leaf.png" style="vertical-align: middle;">'; + $output .= '<img src="'.$url.'/first_leaf.png" class="vertical_middle">'; } } else if ($count == $total) { - $output .= '<img src="'.$url.'/last_leaf.png" style="vertical-align: middle;">'; + $output .= '<img src="'.$url.'/last_leaf.png" class="vertical_middle">'; } else { - $output .= '<img src="'.$url.'/leaf.png" style="vertical-align: middle;">'; + $output .= '<img src="'.$url.'/leaf.png" class="vertical_middle">'; } } // Branch or leave with branches! if (isset($sub_level['__OID__'])) { $output .= "<a onfocus='javascript: this.blur();' href='javascript: snmpGet(\"".addslashes($sub_level['__OID__'])."\");'>"; - $output .= '<img src="'.$url.'/../../images/eye.png" style="vertical-align: middle;">'; + $output .= '<img src="'.$url.'/../../images/eye.png" class="vertical_middle">'; $output .= '</a>'; } @@ -160,7 +159,7 @@ function snmp_browser_get_html_tree( $status = (!empty($checked) && isset($checked[$level])); $output .= html_print_checkbox($checkbox_name, 0, $status, true, false, '').' <span>'.$level.'</span>'; if (isset($sub_level['__VALUE__'])) { - $output .= '<span class="value" style="display: none;"> = '.io_safe_input($sub_level['__VALUE__']).'</span>'; + $output .= '<span class="value invisible" class="invisible" > = '.io_safe_input($sub_level['__VALUE__']).'</span>'; } $output .= '</li>'; @@ -612,7 +611,7 @@ function snmp_browser_print_oid( $output .= html_print_table($table, true); $url = 'index.php?'.'sec=gmodules&'.'sec2=godmode/modules/manage_network_components'; - $output .= '<form id="snmp_create_module" style="text-align: center; margin: 10px" target="_blank" method="post" action="'.$url.'">'; + $output .= '<form id="snmp_create_module" class="center mrgn_10px" target="_blank" method="post" action="'.$url.'">'; $output .= html_print_input_hidden('create_network_from_snmp_browser', 1, true); $output .= html_print_input_hidden('id_component_type', 2, true); $output .= html_print_input_hidden('type', 17, true); @@ -647,7 +646,7 @@ function snmp_browser_print_oid( 'create_module_agent_single', false, 'show_add_module()', - 'class="sub add" style="display:none"', + 'class="sub add invisible"', true ); @@ -686,6 +685,8 @@ function snmp_browser_print_container( $display='', $show_massive_buttons=false ) { + global $config; + $snmp_version = get_parameter('snmp_browser_version', '2c'); // Target selection. $table = new stdClass(); @@ -799,7 +800,7 @@ function snmp_browser_print_container( 'name' => 'browse', 'disabled' => false, 'script' => 'snmpBrowse()', - 'attributes' => 'class="sub search" style="margin-top:0px;"', + 'attributes' => 'class="sub search mrgn_top_0px"', 'return' => true, ], 'div', @@ -922,6 +923,7 @@ function snmp_browser_print_container( 'title' => __('Search'), 'style' => 'vertical-align: middle;', 'onclick' => 'searchText();', + 'class' => 'invert_filter', ] ); $table2->data[0][0] .= '</a>'; @@ -935,6 +937,7 @@ function snmp_browser_print_container( 'title' => __('First match'), 'style' => 'vertical-align: middle;', 'onclick' => 'searchFirstMatch();', + 'class' => 'invert_filter', ] ); $table2->data[0][1] .= '</a>'; @@ -947,6 +950,7 @@ function snmp_browser_print_container( 'title' => __('Previous match'), 'style' => 'vertical-align: middle;', 'onclick' => 'searchPrevMatch();', + 'class' => 'invert_filter', ] ); $table2->data[0][1] .= '</a>'; @@ -959,6 +963,7 @@ function snmp_browser_print_container( 'title' => __('Next match'), 'style' => 'vertical-align: middle;', 'onclick' => 'searchNextMatch();', + 'class' => 'invert_filter', ] ); $table2->data[0][1] .= '</a>'; @@ -971,6 +976,7 @@ function snmp_browser_print_container( 'title' => __('Last match'), 'style' => 'vertical-align: middle;', 'onclick' => 'searchLastMatch();', + 'class' => 'invert_filter', ] ); $table2->data[0][1] .= '</a>'; @@ -984,6 +990,7 @@ function snmp_browser_print_container( 'title' => __('Expand the tree (can be slow)'), 'style' => 'vertical-align: middle;', 'onclick' => 'expandAll();', + 'class' => 'invert_filter', ] ); $table2->data[0][2] .= '</a>'; @@ -996,6 +1003,7 @@ function snmp_browser_print_container( 'title' => __('Collapse the tree'), 'style' => 'vertical-align: middle;', 'onclick' => 'collapseAll();', + 'class' => 'invert_filter', ] ); $table2->data[0][2] .= '</a>'; @@ -1004,7 +1012,7 @@ function snmp_browser_print_container( // This extra div that can be handled by jquery's dialog. $output = '<div id="snmp_browser_container" style="'.$display.'">'; $output .= '<div style="text-align: left; width: '.$width.'; height: '.$height.';">'; - $output .= '<div style="width: 100%">'; + $output .= '<div class="w100p">'; $output .= '<form onsubmit="snmpBrowse(); return false;">'; $output .= html_print_table($table, true); $output .= '</form></div>'; @@ -1016,7 +1024,7 @@ function snmp_browser_print_container( if ($snmp_version == 3) { $output .= '<div id="snmp3_browser_options">'; } else { - $output .= '<div id="snmp3_browser_options" style="display: none;">'; + $output .= '<div id="snmp3_browser_options" class="invisible">'; } $output .= ui_toggle( @@ -1028,7 +1036,7 @@ function snmp_browser_print_container( true ); $output .= '</div>'; - $output .= '<div style="width: 100%; padding-top: 10px;">'; + $output .= '<div class="search_options">'; $output .= ui_toggle( html_print_table($table2, true), __('Search options'), @@ -1040,7 +1048,7 @@ function snmp_browser_print_container( $output .= '</div>'; // SNMP tree container. - $output .= '<div style="width: 100%; height: 100%; margin-top: 5px; position: relative;">'; + $output .= '<div class="snmp_tree_container">'; $output .= html_print_input_hidden('search_count', 0, true); $output .= html_print_input_hidden('search_index', -1, true); @@ -1056,17 +1064,17 @@ function snmp_browser_print_container( true ); - $output .= '<div id="search_results" style="display: none; padding: 5px; background-color: #EAEAEA; border: 1px solid #E2E2E2; border-radius: 4px;"></div>'; - $output .= '<div id="spinner" style="position: absolute; top:0; left:0px; display:none; padding: 5px;">'.html_print_image('images/spinner.gif', true).'</div>'; + $output .= '<div id="search_results" class="search_results"></div>'; + $output .= '<div id="spinner" class="spinner_none_padding">'.html_print_image('images/spinner.gif', true).'</div>'; $output .= '<div id="snmp_browser">'; $output .= '</div>'; - $output .= '<div class="databox" id="snmp_data" style="margin: 5px; display: none"></div>'; + $output .= '<div class="databox invisible mrgn_5px" id="snmp_data"></div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; if ($show_massive_buttons) { - $output .= '<div id="snmp_create_buttons" style="display:none">'; + $output .= '<div id="snmp_create_buttons" class="invisible">'; $output .= html_print_submit_button( __('Create agent modules'), 'create_modules_agent', @@ -1459,7 +1467,7 @@ function snmp_browser_print_create_module_massive($target='agent', $snmp_conf, $ $table->width = '100%'; $table->data = []; - $table->data[0][0] = __('Filter group')."<div id='loading_group' class='loading_div' style='display:none; float:left;'><img src='images/spinner.gif'></div>"; + $table->data[0][0] = __('Filter group')."<div id='loading_group' class='loading_div invisible left'><img src='images/spinner.gif'></div>"; $table->data[0][1] = html_print_select_groups( false, @@ -1482,7 +1490,7 @@ function snmp_browser_print_create_module_massive($target='agent', $snmp_conf, $ $strict_user ); - $table->data[1][0] = __('Search')."<div id='loading_filter' class='loading_div' style='display:none; float:left;'><img src='images/spinner.gif'></div>"; + $table->data[1][0] = __('Search')."<div id='loading_filter' class='loading_div invisible left'><img src='images/spinner.gif'></div>"; $table->data[1][1] = html_print_input_text( 'filter', '', @@ -1519,7 +1527,7 @@ function snmp_browser_print_create_module_massive($target='agent', $snmp_conf, $ 'snmp_browser_create_policy', false, '', - 'class="sub add" style="margin-left:0px"', + 'class="sub add mrgn_lft_0"', true ); } @@ -1540,6 +1548,7 @@ function snmp_browser_print_create_module_massive($target='agent', $snmp_conf, $ [ 'id' => 'right', 'title' => __('Add'), + 'class' => 'invert_filter', ] ).'<br /><br /><br /><br />'.html_print_image( 'images/darrowleft.png', @@ -1547,6 +1556,7 @@ function snmp_browser_print_create_module_massive($target='agent', $snmp_conf, $ [ 'id' => 'left', 'title' => __('Undo'), + 'class' => 'invert_filter', ] ); $table->data[3][2] = html_print_select( @@ -1596,7 +1606,7 @@ function snmp_browser_print_create_module_massive($target='agent', $snmp_conf, $ */ function snmp_browser_print_create_modules($return=false) { - $output = "<div id='dialog_create_module' style='display: none;' title='Select agent'>"; + $output = "<div id='dialog_create_module' class='invisible' title='Select agent'>"; $table = new stdClass(); $table->width = '100%'; @@ -1638,11 +1648,9 @@ function snmp_browser_print_create_policy() $description = get_parameter('description'); $table->width = '100%'; - $table->class = 'databox filters'; + $table->class = 'databox filters bold_top'; $table->style = []; - $table->style[0] = 'font-weight: bold; vertical-align: top'; $table->data = []; - $table->data[0][0] = __('Name'); $table->data[0][1] = html_print_input_text('name', $name, '', '60%', 150, true); diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index 2fec7a5545..6fbb67deeb 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -180,24 +180,20 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals case 21: case 31: if (is_numeric($last_data['datos']) && $last_data['datos'] >= 1) { - $data = "<span style='height: 20px; display: inline-table; vertical-align: top;'>".$config['render_proc_ok'].'</span>'; + $data = "<span class='span_treeview'>".$config['render_proc_ok'].'</span>'; } else { - $data = "<span style='height: 20px; display: inline-table; vertical-align: top;'>".$config['render_proc_fail'].'</span>'; + $data = "<span class='span_treeview'>".$config['render_proc_fail'].'</span>'; } break; default: - // ~ if (is_numeric($last_data["datos"])) - // ~ $data = "<span style='height: 20px; display: inline-table; vertical-align: top;'>" . remove_right_zeros(number_format($last_data["datos"], $config['graph_precision'])) . "</span>"; - // ~ else - // ~ $data = "<span title='" . $last_data["datos"] . "' style='white-space: nowrap;'>" . substr(io_safe_output($last_data['datos']),0,12) . "</span>"; switch ($module['id_tipo_modulo']) { case 15: $value = db_get_value('snmp_oid', 'tagente_modulo', 'id_agente_modulo', $module['id_agente_modulo']); if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') { - $data = "<span title='".$last_data['datos']."' style='white-space: nowrap;'>".human_milliseconds_to_string($last_data['datos']).'</span>'; + $data = "<span title='".$last_data['datos']."' class='nowrap'>".human_milliseconds_to_string($last_data['datos']).'</span>'; } else if (is_numeric($last_data['datos'])) { - $data = "<span style='height: 20px; display: inline-table; vertical-align: top;'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).'</span>'; + $data = "<span class='span_treeview'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).'</span>'; } else { $data = ui_print_truncate_text( io_safe_output($last_data['datos']), @@ -213,7 +209,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals default: if (is_numeric($last_data['datos'])) { - $data = "<span style='height: 20px; display: inline-table; vertical-align: top;'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).'</span>'; + $data = "<span class='span_treeview'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).'</span>'; } else { $data = ui_print_truncate_text( io_safe_output($last_data['datos']), @@ -234,9 +230,9 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals case 15: $value = db_get_value('snmp_oid', 'tagente_modulo', 'id_agente_modulo', $module['id_agente_modulo']); if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') { - $data = "<span title='".human_milliseconds_to_string($last_data['datos'])."' style='white-space: nowrap;'>".human_milliseconds_to_string($last_data['datos']).'</span>'; + $data = "<span title='".human_milliseconds_to_string($last_data['datos'])."' class='nowrap'>".human_milliseconds_to_string($last_data['datos']).'</span>'; } else if (is_numeric($last_data['datos'])) { - $data = "<span style='height: 20px; display: inline-table; vertical-align: top;'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).'</span>'; + $data = "<span class='span_treeview'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).'</span>'; } else { $data = ui_print_truncate_text( io_safe_output($last_data['datos']), @@ -252,7 +248,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals default: if (is_numeric($last_data['datos'])) { - $data = "<span style='height: 20px; display: inline-table; vertical-align: top;'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).'</span>'; + $data = "<span class='span_treeview'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).'</span>'; } else { $data = ui_print_truncate_text( io_safe_output($last_data['datos']), @@ -275,7 +271,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals $data_macro = modules_get_unit_macro($last_data['datos'], $module['unit']); if ($data_macro) { if (is_numeric($data_macro)) { - $last_data_str = "<span style='height: 20px; display: inline-table; vertical-align: top;'>".remove_right_zeros(number_format($data_macro, $config['graph_precision'])).'</span>'; + $last_data_str = "<span class='span_treeview'>".remove_right_zeros(number_format($data_macro, $config['graph_precision'])).'</span>'; } else { $last_data_str = ui_print_truncate_text( io_safe_output($data_macro), @@ -341,7 +337,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals if ($user_access_node && check_acl($config['id_user'], $id_group, 'AW')) { // Actions table - echo '<div style="width:100%; text-align: right; min-width: 300px;padding-right: 1em;">'; + echo '<div class="actions_treeview">'; echo '<a target=_blank href="'.$console_url.'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$module['id_agente'].'&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].$url_hash.'">'; html_print_submit_button(__('Go to module edition'), 'upd_button', false, 'class="sub config"'); echo '</a>'; @@ -350,7 +346,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals } // id_module and id_agent hidden - echo '<div id="ids" style="display:none;">'; + echo '<div id="ids" class="invisible">'; html_print_input_text('id_module', $id_module); html_print_input_text('id_agent', $module['id_agente']); html_print_input_text('server_name', $server_name); @@ -477,7 +473,7 @@ function treeview_printAlertsTable($id_module, $server_data=[], $no_head=false) if ($user_access_node && check_acl($config['id_user'], $id_group, 'LW')) { // Actions table - echo '<div style="width:100%; text-align: right; min-width: 300px;">'; + echo '<div class="w100p right mw300px">'; echo '<a target=_blank href="'.$console_url.'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&search=1&module_name='.$module_name.'&id_agente='.$agent_id.$url_hash.'" target="_blank">'; html_print_submit_button(__('Go to alerts edition'), 'upd_button', false, 'class="sub search"'); echo '</a>'; @@ -608,16 +604,16 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) $url = $server_data['server_url'].'/index.php?'.'sec=estado&'.'sec2=operation/agentes/ver_agente&'.'id_agente='.$agent['id_agente'].'&'.'loginhash=auto&'."loginhash_data=$hashdata&".'loginhash_user='.str_rot13($user); if ($grants_on_node) { - $cellName .= '<a href="'.$url.'">'.'<b><span style="font-weight:bold;text-transform:uppercase;" title="'.$agent['nombre'].'">'.$agent['alias'].'</span></b></a>'; + $cellName .= '<a href="'.$url.'">'.'<b><span class="bolder pandora_upper" title="'.$agent['nombre'].'">'.$agent['alias'].'</span></b></a>'; } else { - $cellName .= '<b><span style="font-weight:bold;text-transform:uppercase;" title="'.$agent['nombre'].'">'.$agent['alias'].'</span></b>'; + $cellName .= '<b><span class="bolder pandora_upper" title="'.$agent['nombre'].'">'.$agent['alias'].'</span></b>'; } } else { $url = ui_get_full_url( 'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'] ); $cellName .= '<a href="'.$url.'">'; - $cellName .= '<b><span style="font-weight:bold;text-transform:uppercase;" title="'.$agent['nombre'].'">'.$agent['alias'].'</span></b></a>'; + $cellName .= '<b><span class="bolder pandora_upper" title="'.$agent['nombre'].'">'.$agent['alias'].'</span></b></a>'; } if ($agent['disabled']) { @@ -698,7 +694,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) $agent_table = html_print_table($table, true); if ($user_access_node && check_acl($config['id_user'], $agent['id_grupo'], 'AW')) { - $go_to_agent = '<div style="text-align: right;">'; + $go_to_agent = '<div class="right">'; if ($agent['id_os'] == CLUSTER_OS_ID) { if (enterprise_installed()) { @@ -810,7 +806,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) ui_toggle($table_advanced, __('Advanced information')); if ($config['agentaccess']) { - $access_graph = '<div style="width:100%; height:130px; text-align:center;">'; + $access_graph = '<div class="w100p height_130px center">'; $access_graph .= graphic_agentaccess( $id_agente, SECONDS_1DAY, @@ -824,7 +820,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) ); } - $events_graph = '<div style="width: 100%; height: 90px; display: flex; flex-direction: row; justify-content: center;">'; + $events_graph = '<div class="graphic_agents">'; $events_graph .= graph_graphic_agentevents( $id_agente, '340px;margin:0', diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 7e37604b22..8026bd12c2 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -321,19 +321,19 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t $output = '<table cellspacing="0" cellpadding="0" id="'.$id.'" '.$attributes.' class="info_box '.$id.' '.$class.' textodialogo" style="'.$force_style.'"> <tr> - <td class="icon" rowspan="2" style="padding-right: 10px; padding-top: 3px; vertical-align: top;">'.html_print_image($icon_image, true, false, false, false, false).'</td> - <td class="title" style="text-transform: uppercase; padding-top: 10px;"><b>'.$text_title.'</b></td> - <td class="icon" style="text-align: right; padding-right: 3px;">'; + <td class="icon icon_ui" rowspan="2" >'.html_print_image($icon_image, true, false, false, false, false).'</td> + <td class="title" class="pandora_upper pdd_t_10px"><b>'.$text_title.'</b></td> + <td class="icon" class="right pdd_r_3px">'; if (!$no_close_bool) { // Use the no_meta parameter because this image is only in // the base console. - $output .= '<a href="javascript: close_info_box(\''.$id.'\')">'.html_print_image('images/blade.png', true, false, false, false, true).'</a>'; + $output .= '<a href="javascript: close_info_box(\''.$id.'\')">'.html_print_image('images/blade.png', true, false, false, true).'</a>'; } $output .= '</td> </tr> <tr> - <td style="color:#333;padding-top:10px">'.$text_message.'</td> + <td class="black pdd_t_10px">'.$text_message.'</td> <td></td> </tr> </table>'; @@ -518,7 +518,7 @@ function ui_print_timestamp($unixtime, $return=false, $option=[]) } if (empty($option['style'])) { - $style = 'style="white-space:nowrap;"'; + $style = 'class="nowrap"'; } else { $style = 'style="'.$option['style'].'"'; } @@ -843,18 +843,20 @@ function ui_print_type_agent_icon( $remote=0, $version='' ) { + global $config; + if ($id_os == 19) { // Satellite. $options['title'] = __('Satellite'); - $output = html_print_image('images/op_satellite.png', true, $options, false, false, false, true); + $output = html_print_image('images/satellite.png', true, ['class' => 'invert_filter'], false, false, false, true); } else if ($remote_contact == $contact && $remote == 0 && $version == '') { // Network. $options['title'] = __('Network'); - $output = html_print_image('images/network.png', true, $options, false, false, false, true); + $output = html_print_image('images/network.png', true, ['class' => 'invert_filter'], false, false, false, true); } else { // Software. $options['title'] = __('Software'); - $output = html_print_image('images/data.png', true, $options, false, false, false, true); + $output = html_print_image('images/data.png', true, ['class' => 'invert_filter'], false, false, false, true); } return $output; @@ -1023,7 +1025,7 @@ function ui_format_alert_row( } if ($alert['disabled']) { - $disabledHtmlStart = '<span style="font-style: italic; color: #aaaaaa;">'; + $disabledHtmlStart = '<span class="italic_a">'; $disabledHtmlEnd = '</span>'; $styleDisabled = 'font-style: italic; color: #aaaaaa;'; } else { @@ -1111,7 +1113,7 @@ function ui_format_alert_row( if ($policyInfo === false) { $data[$index['policy']] = ''; } else { - $img = 'images/policies.png'; + $img = 'images/policies_mc.png'; if (!is_metaconsole()) { $data[$index['policy']] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id='.$policyInfo['id'].'">'.html_print_image($img, true, ['title' => $policyInfo['name']]).'</a>'; } else { @@ -1134,9 +1136,9 @@ function ui_format_alert_row( // Force alert execution. if (check_acl($config['id_user'], $id_group, 'AW') || check_acl($config['id_user'], $id_group, 'LM')) { if ($alert['force_execution'] == 0) { - $data[$index['force_execution']] = '<a href="'.$url.'&id_alert='.$alert['id'].'&force_execution=1&refr=60">'.html_print_image('images/target.png', true, ['border' => '0', 'title' => __('Force')]).'</a>'; + $data[$index['force_execution']] = '<a href="'.$url.'&id_alert='.$alert['id'].'&force_execution=1&refr=60">'.html_print_image('images/target.png', true, ['border' => '0', 'title' => __('Force'), 'class' => 'invert_filter']).'</a>'; } else { - $data[$index['force_execution']] = '<a href="'.$url.'&id_alert='.$alert['id'].'&refr=60">'.html_print_image('images/refresh.png', true).'</a>'; + $data[$index['force_execution']] = '<a href="'.$url.'&id_alert='.$alert['id'].'&refr=60">'.html_print_image('images/refresh.png', true, ['class' => 'invert_filter']).'</a>'; } } } @@ -1157,9 +1159,9 @@ function ui_format_alert_row( $data[$index['agent_name']] = ui_print_truncate_text($agent_name, 'agent_small', false, true, true, '[…]', ''); } else { if ($agent_style !== false) { - $data[$index['agent_name']] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'"> <span style="font-weight:bold" title ="'.$agente['nombre'].'">'.$agente['alias'].'</span></a>'; + $data[$index['agent_name']] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'"> <span class="bolder" title ="'.$agente['nombre'].'">'.$agente['alias'].'</span></a>'; } else { - $data[$index['agent_name']] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'"> <span style="font-weight:bold" title ="'.$agente['nombre'].'">'.$agente['alias'].'</span></a>'; + $data[$index['agent_name']] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'"> <span class="bolder" title ="'.$agente['nombre'].'">'.$agente['alias'].'</span></a>'; } } @@ -1176,7 +1178,7 @@ function ui_format_alert_row( $data[$index['template']] .= '<a class="template_details" href="ajax.php?page=godmode/alerts/alert_templates&get_template_tooltip=1&id_template='.$template['id'].'">'; } - $data[$index['template']] .= html_print_image('images/zoom.png', true); + $data[$index['template']] .= html_print_image('images/zoom.png', true, ['class' => 'invert_filter']); $data[$index['template']] .= '</a> '; $actionDefault = db_get_value_sql( 'SELECT id_alert_action @@ -1190,7 +1192,7 @@ function ui_format_alert_row( if (!empty($actions)) { $actionText = '<div><ul class="action_list">'; foreach ($actions as $action) { - $actionText .= '<div style="margin-bottom: 5px;" ><span class="action_name"><li>'.$action['name']; + $actionText .= '<div class="mrgn_btn_5px" ><span class="action_name"><li>'.$action['name']; if ($action['fires_min'] != $action['fires_max']) { $actionText .= ' ('.$action['fires_min'].' / '.$action['fires_max'].')'; } @@ -1288,7 +1290,7 @@ function ui_print_alert_template_example($id_alert_template, $return=false, $pri { $output = ''; - $output .= html_print_image('images/information.png', true); + $output .= html_print_image('images/information.png', true, ['class' => 'invert_filter']); $output .= '<span id="example">'; $template = alerts_get_alert_template($id_alert_template); @@ -2120,9 +2122,9 @@ function ui_pagination( ); $output .= "<a class='pagination-arrows ".$other_class." offset_0' - href='javascript: ".$script_modified.";'>".html_print_image('images/go_first_g.png', true, ['class' => 'bot']).'</a>'; + href='javascript: ".$script_modified.";'>".html_print_image('images/go_first_g.png', true, ['class' => 'bot invert_filter']).'</a>'; } else { - $output .= "<a class='pagination-arrows ".$other_class." offset_0' href='".io_safe_output($url).'&'.$offset_name."=0'>".html_print_image('images/go_first_g.png', true, ['class' => 'bot']).'</a>'; + $output .= "<a class='pagination-arrows ".$other_class." offset_0' href='".io_safe_output($url).'&'.$offset_name."=0'>".html_print_image('images/go_first_g.png', true, ['class' => 'bot invert_filter']).'</a>'; } } @@ -2152,9 +2154,9 @@ function ui_pagination( ); $output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_previous_page."' - href='javacript: ".$script_modified.";'>".html_print_image('images/go_previous_g.png', true, ['class' => 'bot']).'</a>'; + href='javacript: ".$script_modified.";'>".html_print_image('images/go_previous_g.png', true, ['class' => 'bot invert_filter']).'</a>'; } else { - $output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_previous_page."' href='".$url.'&'.$offset_name.'='.$offset_previous_page."'>".html_print_image('images/go_previous_g.png', true, ['class' => 'bot']).'</a>'; + $output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_previous_page."' href='".$url.'&'.$offset_name.'='.$offset_previous_page."'>".html_print_image('images/go_previous_g.png', true, ['class' => 'bot invert_filter']).'</a>'; } } @@ -2220,9 +2222,9 @@ function ui_pagination( ); $output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_next_page."' - href='javascript: ".$script_modified.";'>".html_print_image('images/go_next_g.png', true, ['class' => 'bot']).'</a>'; + href='javascript: ".$script_modified.";'>".html_print_image('images/go_next_g.png', true, ['class' => 'bot invert_filter']).'</a>'; } else { - $output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_next_page."' href='".$url.'&'.$offset_name.'='.$offset_next_page."'>".html_print_image('images/go_next_g.png', true, ['class' => 'bot']).'</a>'; + $output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_next_page."' href='".$url.'&'.$offset_name.'='.$offset_next_page."'>".html_print_image('images/go_next_g.png', true, ['class' => 'bot invert_filter']).'</a>'; } } @@ -2244,9 +2246,9 @@ function ui_pagination( ); $output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_lastpage."' - href='javascript: ".$script_modified.";'>".html_print_image('images/go_last_g.png', true, ['class' => 'bot']).'</a>'; + href='javascript: ".$script_modified.";'>".html_print_image('images/go_last_g.png', true, ['class' => 'bot invert_filter']).'</a>'; } else { - $output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_lastpage."' href='".$url.'&'.$offset_name.'='.$offset_lastpage."'>".html_print_image('images/go_last_g.png', true, ['class' => 'bot']).'</a>'; + $output .= "<a class='pagination-arrows ".$other_class.' offset_'.$offset_lastpage."' href='".$url.'&'.$offset_name.'='.$offset_lastpage."'>".html_print_image('images/go_last_g.png', true, ['class' => 'bot invert_filter']).'</a>'; } } @@ -2273,6 +2275,8 @@ function ui_pagination( */ function ui_print_session_action_icon($action, $return=false) { + global $config; + $key_icon = [ 'acl' => 'images/delete.png', 'agent' => 'images/agent.png', @@ -2284,7 +2288,7 @@ function ui_print_session_action_icon($action, $return=false) 'massive' => 'images/config.png', 'hack' => 'images/application_edit.png', 'event' => 'images/lightning_go.png', - 'policy' => 'images/policies.png', + 'policy' => 'images/policies_mc.png', 'report' => 'images/reporting.png', 'file collection' => 'images/collection_col.png', 'user' => 'images/user_green.png', @@ -2302,7 +2306,7 @@ function ui_print_session_action_icon($action, $return=false) $output = ''; foreach ($key_icon as $key => $icon) { if (stristr($action, $key) !== false) { - $output = html_print_image($icon, true, ['title' => $action], false, false, false, true).' '; + $output = html_print_image($icon, true, ['title' => $action, 'class' => 'invert_filter'], false, false, false, true).' '; break; } } @@ -2518,6 +2522,7 @@ function ui_print_moduletype_icon( [ 'border' => 0, 'title' => $type['descripcion'], + 'class' => 'invert_filter', ], false, $relative @@ -3342,7 +3347,7 @@ function ui_print_datatable(array $parameters) $filter .= '</li>'; - $filter .= '</ul><div style="clear:both"></div></form>'; + $filter .= '</ul><div id="both"></div></form>'; $filter = ui_toggle( $filter, __('Filter'), @@ -4328,7 +4333,7 @@ function ui_print_page_header( $separator_class = 'separator_view'; } - $buffer = '<div id="'.$type2.'" style="">'; + $buffer = '<div id="'.$type2.'" >'; if (!empty($breadcrumbs)) { $buffer .= '<div class="menu_tab_left_bc">'; @@ -4352,7 +4357,7 @@ function ui_print_page_header( if ($modal && !enterprise_installed()) { $buffer .= " - <div id='".$message."' class='publienterprise' title='Community version' style='float: right;margin-top: -2px !important;'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div> + <div id='".$message."' class='publienterprise right mrgn_top-2px' title='Community version'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div> "; } @@ -4403,7 +4408,7 @@ function ui_print_page_header( $class .= ($godmode) ? ' tab_godmode' : ' tab_operation'; } - $buffer .= '<li class="'.$class.'">'; + $buffer .= '<li class="'.$class.' ">'; $buffer .= $option['text']; if (isset($option['sub_menu'])) { $buffer .= $option['sub_menu']; @@ -4684,7 +4689,13 @@ function ui_print_agent_autocomplete_input($parameters) } // Default value. - $icon_image = html_print_image('images/search_agent.png', true, false, true); + $icon_agent = 'images/agent.png'; + + if ($config['style'] === 'pandora_black') { + $icon_agent = 'images/agent_mc.menu.png'; + } + + $icon_image = html_print_image($icon_agent, true, false, true); if (isset($parameters['icon_image'])) { $icon_image = $parameters['icon_image']; } @@ -5740,8 +5751,8 @@ function ui_print_module_string_value( $title_dialog = modules_get_agentmodule_agent_alias($id_agente_module).' / '.$module_name; $salida = '<div '."id='hidden_value_module_".$id_agente_module."' - style='display: none; width: 100%; height: 100%; overflow: auto; padding: 10px; font-size: 14px; line-height: 16px; font-family: mono,monospace; text-align: left' title='".$title_dialog."'>".$value.'</div><span '."id='value_module_".$id_agente_module."' - style='white-space: nowrap;'>".'<span id="value_module_text_'.$id_agente_module.'">'.$sub_string.'</span> '."<a href='javascript: toggle_full_value(".$id_agente_module.")'>".html_print_image('images/zoom.png', true, ['style' => 'max-height: 20px; vertical-align: middle;']).'</a></span>'; + class='title_dialog' title='".$title_dialog."'>".$value.'</div><span '."id='value_module_".$id_agente_module."' + class='nowrap'>".'<span id="value_module_text_'.$id_agente_module.'">'.$sub_string.'</span> '."<a href='javascript: toggle_full_value(".$id_agente_module.")'>".html_print_image('images/zoom.png', true, ['style' => 'max-height: 20px; vertical-align: middle;', 'class' => 'invert_filter']).'</a></span>'; } } } @@ -5765,7 +5776,7 @@ function ui_print_tags_view($title='', $tags=[]) $tv .= '<div class="tag-wrapper">'; $tv .= '<h3>'.$title.'</h3>'; } else { - $tv .= '<div class="tag-wrapper" style="padding-top: 10px">'; + $tv .= '<div class="tag-wrapper pdd_t_10px">'; } foreach ($tags as $tag) { @@ -5864,6 +5875,7 @@ function ui_get_snapshot_image($link, $is_image) 'alt' => '', 'title' => __('Snapshot view'), 'style' => 'max-height: 20px; vertical-align: middle;', + 'class' => 'invert_filter', ] ).'</a>'; @@ -6294,7 +6306,7 @@ function ui_print_reveal_password(string $name, bool $return=false) $imagePath = 'images/'; } - $output = ' <img class="clickable forced_title" id="reveal_password_'.$name.'" src="'.$imagePath.'eye_show.png" onclick="reveal_password(\''.$name.'\')" data-use_title_for_force_title="1" data-title="'.__('Show password').'">'; + $output = ' <img class="clickable forced_title invert_filter" id="reveal_password_'.$name.'" src="'.$imagePath.'eye_show.png" onclick="reveal_password(\''.$name.'\')" data-use_title_for_force_title="1" data-title="'.__('Show password').'">'; if ($return === true) { return $output; diff --git a/pandora_console/include/functions_update_manager.php b/pandora_console/include/functions_update_manager.php index 1b379bceb2..b641448af5 100755 --- a/pandora_console/include/functions_update_manager.php +++ b/pandora_console/include/functions_update_manager.php @@ -164,13 +164,13 @@ function config_wiz_modal( $output = ''; // Prints first step pandora registration. - $output .= '<div id="configuration_wizard" title="'.__('%s configuration wizard', get_product_name()).'" style="display: none;">'; + $output .= '<div id="configuration_wizard" title="'.__('%s configuration wizard', get_product_name()).'" class="invisible">'; - $output .= '<div style="font-size: 10pt; margin: 20px;">'; + $output .= '<div id="help_dialog">'; $output .= __('Please fill the following information in order to configure your %s instance successfully', get_product_name()).'.'; $output .= '</div>'; - $output .= '<div style="">'; + $output .= '<div >'; $table = new StdClass(); $table->class = 'databox filters'; $table->width = '100%'; @@ -236,25 +236,25 @@ function config_wiz_modal( $output .= html_print_table($table, true); $output .= '</div>'; - $output .= '<div style="float: left">'; + $output .= '<div class="left">'; $output .= html_print_submit_button( __('Cancel'), 'cancel', false, - 'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub cancel submit-cancel" style="width:100px;"', + 'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub cancel submit-cancel w100px"', true ); $output .= '</div>'; - $output .= '<div style="float: right">'; + $output .= '<div class="right">'; $output .= html_print_submit_button( __('Continue'), 'register-next', false, - 'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next" style="width:100px;"', + 'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next w100px"', true ); $output .= '</div>'; - $output .= '<div id="all-required" style="clear:both; float: right; margin-right: 30px; display: none; color: red;">'; + $output .= '<div id="all-required" class="all_required">'; $output .= __('All fields required'); $output .= '</div>'; $output .= '</div>'; @@ -262,8 +262,8 @@ function config_wiz_modal( $output .= '</div>'; // Verification modal. - $output .= '<div id="wiz_ensure_cancel" title="Confirmation Required" style="display: none;">'; - $output .= '<div style="font-size: 12pt; margin: 20px;">'; + $output .= '<div id="wiz_ensure_cancel" title="Confirmation Required" class="invisible">'; + $output .= '<div class="font_12_20">'; $output .= __('Are you sure you don\'t want to configure a base email?'); $output .= '<p>'; $output .= __('You could change this options later in "alert actions" and setting your account.'); @@ -493,26 +493,26 @@ function registration_wiz_modal( $output .= '<div id="registration_wizard" title="'; $output .= __('Register to Update Manager'); - $output .= '" style="display: none;">'; - $output .= '<div style="margin: 5px 0 10px; float: left; padding-left: 15px;">'; + $output .= '" class="invisible">'; + $output .= '<div class="register_update_manager">'; $output .= html_print_image('images/pandora_circle_big.png', true); $output .= '</div>'; - $output .= '<div style="font-size: 12pt; margin: 5px 20px; float: left; padding-top: 23px;">'; + $output .= '<div class="newsletter_div">'; $output .= __( 'Keep this %s console up to date with latest updates.', $product_name ); $output .= '</div>'; - $output .= '<div class="license_text" style="clear:both;">'; + $output .= '<div class="license_text both">'; $output .= '<p>'; $output .= __('When you subscribe to the %s Update Manager service, you accept that we register your %s instance as an identifier on a database owned by %s. This data will solely be used to provide you with information about %s and will not be conceded to third parties. You can unregister from said database at any time from the Update Manager options.', $product_name, $product_name, $product_name, $product_name); $output .= '</p>'; $output .= '</div>'; $output .= '<div class="submit_buttons_container">'; - $output .= '<div style="float: left;">'; + $output .= '<div class="left">'; $output .= html_print_submit_button( __('Cancel'), 'cancel_registration', @@ -521,24 +521,24 @@ function registration_wiz_modal( true ); $output .= '</div>'; - $output .= '<div style="float: right;">'; + $output .= '<div class="right">'; $output .= html_print_submit_button( __('OK!'), 'register', false, - 'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next" style="width:100px;"', + 'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next w100px"', true ); $output .= '</div>'; $output .= '</div>'; - $output .= '<div style="clear:both"></div>'; + $output .= '<div id="both"></div>'; $output .= '<br/>'; $output .= '</div>'; // Verification modal. - $output .= '<div id="reg_ensure_cancel" title="Confirmation Required" style="display: none;">'; - $output .= '<div style="font-size: 12pt; margin: 20px;">'; + $output .= '<div id="reg_ensure_cancel" title="Confirmation Required" class="invisible">'; + $output .= '<div class="font_12_20">'; $output .= __('Are you sure you don\'t want to use update manager?'); $output .= '<p>'; $output .= __('You will need to update your system manually, through source code or RPM packages to be up to date with latest updates.'); @@ -547,8 +547,8 @@ function registration_wiz_modal( $output .= '</div>'; // Results modal. - $output .= '<div id="reg_result" title="Registration process result" style="display: none;">'; - $output .= '<div id="reg_result_content" style="font-size: 12pt; margin: 20px;">'; + $output .= '<div id="reg_result" title="Registration process result" class="invisible">'; + $output .= '<div id="reg_result_content" class="font_12_20">'; $output .= '</div>'; $output .= '</div>'; @@ -761,19 +761,19 @@ function newsletter_wiz_modal( $output .= '<div id="newsletter_wizard" title="'; $output .= __('Do you want to be up to date?'); - $output .= '" style="display: none;">'; - $output .= '<div style="margin: 5px 0 10px; float: left; padding-left: 15px;">'; - $output .= html_print_image('images/pandora_circle_big.png', true); + $output .= '" class="invisible">'; + $output .= '<div class="register_update_manager">'; + $output .= html_print_image('image/pandora_big_circle.png', true); $output .= '</div>'; - $output .= '<div style="font-size: 12pt; margin: 5px 20px; float: left; padding-top: 23px;">'; + $output .= '<div class="newsletter_div">'; $output .= __( 'Subscribe to our newsletter', $product_name ); $output .= '</div>'; - $output .= '<div class="license_text" style="clear:both;">'; + $output .= '<div class="license_text both">'; $output .= '<p>Stay up to date with updates, upgrades and promotions by subscribing to our newsletter.</p>'; $output .= '<p>'; $output .= __( @@ -788,7 +788,7 @@ function newsletter_wiz_modal( // Show regiter to newsletter state. $show_newsletter = ($display_newsletter !== true) ? 'inline-block' : 'none'; - $output .= '<div style="margin-left: 4em;">'; + $output .= '<div class="mrgn_lft_4em">'; $output .= '<div id="box_newsletter">'; $output .= '<span id="label-email-newsletter">'.__('Email').' </span>'; $output .= html_print_input_text_extended( @@ -806,34 +806,34 @@ function newsletter_wiz_modal( $output .= '</div><br /><br />'; $output .= '<div class="submit_buttons_container">'; - $output .= '<div style="float: left;">'; + $output .= '<div class="left">'; $output .= html_print_submit_button( __('Cancel'), 'cancel_newsletter', false, - 'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel" style="width:100px;"', + 'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel w100px"', true ); $output .= '</div>'; - $output .= '<div style="float: right;">'; + $output .= '<div class="right">'; $output .= html_print_submit_button( __('OK!'), 'newsletter', false, - 'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next" style="width:100px;"', + 'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next w100px"', true ); $output .= '</div>'; $output .= '</div>'; - $output .= '<div style="clear:both"></div>'; + $output .= '<div id="both"></div>'; $output .= '<br/>'; $output .= '</div>'; $output .= '</div>'; // Verification modal. - $output .= '<div id="news_ensure_cancel" title="Confirmation Required" style="display: none;">'; - $output .= '<div style="font-size: 12pt; margin: 20px;">'; + $output .= '<div id="news_ensure_cancel" title="Confirmation Required" class="invisible">'; + $output .= '<div class="font_12_20">'; $output .= __('Are you sure you don\'t want to subscribe?'); $output .= '<p>'; $output .= __('You will miss all news about amazing features and fixes!'); @@ -842,8 +842,8 @@ function newsletter_wiz_modal( $output .= '</div>'; // Results modal. - $output .= '<div id="news_result" title="Subscription process result" style="display: none;">'; - $output .= '<div id="news_result_content" style="font-size: 12pt; margin: 20px;">'; + $output .= '<div id="news_result" title="Subscription process result" class="invisible">'; + $output .= '<div id="news_result_content" class="font_12_20">'; $output .= '</div>'; $output .= '</div>'; @@ -1437,7 +1437,7 @@ function update_manager_check_online_free_packages($is_ajax=true) var text4_mr_file = "<?php echo __(' to this process'); ?>"; text4_mr_file += "<br><br>"; - text4_mr_file += "<a style=\"font-size:10pt;font-style:italic;\" target=\"blank\" href=\"" + docsUrl + "\">"; + text4_mr_file += "<a class=\"font_10pt italic\" target=\"blank\" href=\"" + docsUrl + "\">"; text4_mr_file += "<?php echo __('About minor release update'); ?>"; text4_mr_file += "</a>"; diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 17053f2122..25631f2b4d 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -42,8 +42,8 @@ function visual_map_print_item_toolbox($idDiv, $text, $float) $margin = 'margin-left'; } - echo '<div class="button_toolbox" id="'.$idDiv.'" - style="font-weight: bolder; text-align:; float: '.$float.';'.$margin.': 5px;">'; + echo '<div class="button_toolbox bolder" id="'.$idDiv.'" + style="float: '.$float.';'.$margin.': 5px;">'; echo $text; echo '</span>'; echo '</div>'; @@ -238,9 +238,9 @@ function visual_map_print_item( if ($label_position == 'left') { $text = '<table style="float:left;height:'.$himg.'px;"><tr><td></td></tr><tr><td><span id="text_'.$id.'" class="text">'.$label.'</span></td></tr><tr><td></td></tr></table>'; } else if ($label_position == 'right') { - $text = '<table style="float:right;height:'.$himg.'px;"><tr><td></td></tr><tr><td><span style="" id="text_'.$id.'" class="text">'.$label.'</span></td></tr><tr><td></td></tr></table>'; + $text = '<table style="float:right;height:'.$himg.'px;"><tr><td></td></tr><tr><td><span id="text_'.$id.'" class="text">'.$label.'</span></td></tr><tr><td></td></tr></table>'; } else { - $text = '<table style="text-align:center ;width:'.$wimg.'px;"><tr><td></td></tr><tr><td><span style="" id="text_'.$id.'" class="text">'.$label.'</span></td></tr><tr><td></td></tr></table>'; + $text = '<table style="text-align:center ;width:'.$wimg.'px;"><tr><td></td></tr><tr><td><span id="text_'.$id.'" class="text">'.$label.'</span></td></tr><tr><td></td></tr></table>'; } if (!isset($layoutData['status_calculated'])) { @@ -1135,15 +1135,15 @@ function visual_map_print_item( if ((get_parameter('action') == 'edit') || (get_parameter('operation') == 'edit_visualmap')) { if ($width == 0) { if ($layoutData['id_metaconsole'] != 0) { - $img = '<img src="../../images/console/signes/barras.png" style="width:400px;height:400px;'.$imgpos.'">'; + $img = '<img src="../../'.'images/console/signes/barras.png'.'" style="width:400px;height:400px;'.$imgpos.'">'; } else { - $img = '<img src="images/console/signes/barras.png" style="width:400px;height:400px;'.$imgpos.'">'; + $img = '<img src="'.'images/console/signes/barras.png'.'" style="width:400px;height:400px;'.$imgpos.'">'; } } else { if ($layoutData['id_metaconsole'] != 0) { - $img = '<img src="../../images/console/signes/barras.png" style="width:'.$width.'px;height:'.$height.'px;'.$imgpos.'">'; + $img = '<img src="../../'.'images/console/signes/barras.png'.'" style="width:'.$width.'px;height:'.$height.'px;'.$imgpos.'">'; } else { - $img = '<img src="images/console/signes/barras.png" style="width:'.$width.'px;height:'.$height.'px;'.$imgpos.'">'; + $img = '<img src="'.'images/console/signes/barras.png'.'" style="width:'.$width.'px;height:'.$height.'px;'.$imgpos.'">'; } } } else { @@ -1498,22 +1498,22 @@ function visual_map_print_item( if ($width == 0) { if ($layoutData['id_metaconsole'] != 0) { if ($layoutData['clock_animation'] == 'analogic_1') { - $img = '<img src="../../images/console/signes/clock.png" style="width:200px;height:240px;">'; + $img = '<img src="../../images/console/signes/clock.png" class="w200px height_240px">'; } else { if ($layoutData['time_format'] = 'time') { - $img = '<img src="../../images/console/signes/digital-clock.png" style="width:200px;height:71px;">'; + $img = '<img src="../../images/console/signes/digital-clock.png" class="w200px height_71px">'; } else { - $img = '<img src="../../images/console/signes/digital-clock.png" style="width:200px;height:91px;">'; + $img = '<img src="../../images/console/signes/digital-clock.png" class="w200px height_91px">'; } } } else { if ($layoutData['clock_animation'] == 'analogic_1') { - $img = '<img src="'.$image_prefix.'images/console/signes/clock.png" style="width:200px;height:240px;">'; + $img = '<img src="'.$image_prefix.'images/console/signes/clock.png" class="w200px height_240px">'; } else { if ($layoutData['time_format'] == 'time') { - $img = '<img src="'.$image_prefix.'images/console/signes/digital-clock.png" style="width:200px;height:71px">'; + $img = '<img src="'.$image_prefix.'images/console/signes/digital-clock.png" class="w200px height_71px">'; } else { - $img = '<img src="'.$image_prefix.'images/console/signes/digital-clock.png" style="width:200px;height:91px">'; + $img = '<img src="'.$image_prefix.'images/console/signes/digital-clock.png" class="w200px height_91px">'; } } } @@ -1550,15 +1550,15 @@ function visual_map_print_item( if ((get_parameter('action') == 'edit') || (get_parameter('operation') == 'edit_visualmap')) { if ($width == 0 || $height == 0) { if ($layoutData['id_metaconsole'] != 0) { - $img = '<img src="../../images/console/signes/module-events.png">'; + $img = '<img src="../../'.'images/console/signes/module-events.png'.'">'; } else { - $img = '<img src="images/console/signes/module-events.png">'; + $img = '<img src="'.'images/console/signes/module-events.png'.'">'; } } else { if ($layoutData['id_metaconsole'] != 0) { - $img = '<img src="../../images/console/signes/module-events.png" style="width:'.$width.'px;height:'.$height.'px;">'; + $img = '<img src="../../'.'images/console/signes/module-events.png'.'" style="width:'.$width.'px;height:'.$height.'px;">'; } else { - $img = '<img src="images/console/signes/module-events.png" style="width:'.$width.'px;height:'.$height.'px;">'; + $img = '<img src="'.'images/console/signes/module-events.png'.'" style="width:'.$width.'px;height:'.$height.'px;">'; } } } else { @@ -1568,7 +1568,7 @@ function visual_map_print_item( } else if ($layoutData['label_position'] == 'right') { $img = '<div style="z-index:'.$show_on_top_index.';float:right;height:'.$himg.'px;width:500px;">'.graph_graphic_moduleevents($layoutData['id_agent'], $layoutData['id_agente_modulo'], 500, 50, $layoutData['period'], '', true).'</div>'; } else { - $img = '<div style="width:500px;">'.graph_graphic_moduleevents($layoutData['id_agent'], $layoutData['id_agente_modulo'], 500, 50, $layoutData['period'], '', true).'</div>'; + $img = '<div class="w500px">'.graph_graphic_moduleevents($layoutData['id_agent'], $layoutData['id_agente_modulo'], 500, 50, $layoutData['period'], '', true).'</div>'; } } else { if ($layoutData['label_position'] == 'left') { @@ -1576,7 +1576,7 @@ function visual_map_print_item( } else if ($layoutData['label_position'] == 'right') { $img = '<div style="z-index:'.$show_on_top_index.';float:right;height:'.$himg.'px;width:500px;">'.graph_graphic_moduleevents($layoutData['id_agent'], $layoutData['id_agente_modulo'], $width, $height, $layoutData['period'], '', true).'</div>'; } else { - $img = '<div style="width:500px;">'.graph_graphic_moduleevents($layoutData['id_agent'], $layoutData['id_agente_modulo'], $width, $height, $layoutData['period'], '', true).'</div>'; + $img = '<div class="w500px">'.graph_graphic_moduleevents($layoutData['id_agent'], $layoutData['id_agente_modulo'], $width, $height, $layoutData['period'], '', true).'</div>'; } } } @@ -1796,9 +1796,9 @@ function visual_map_print_item( if ($layoutData['show_statistics'] == 1) { if (get_parameter('action') == 'edit') { if ($width == 0 || $height == 0) { - echo '<img id="image_'.$id.'" src="images/console/signes/group_status.png" style="width:520px;height:80px;'.$imgpos.'">'; + echo '<img id="image_'.$id.'" src="'.'images/console/signes/group_status.png'.'" style="width:520px;height:80px;'.$imgpos.'">'; } else { - echo '<img id="image_'.$id.'" src="images/console/signes/group_status.png" style="width:'.$width.'px;height:'.$height.'px;'.$imgpos.'">'; + echo '<img id="image_'.$id.'" src="'.'images/console/signes/group_status.png'.'" style="width:'.$width.'px;height:'.$height.'px;'.$imgpos.'">'; } } else { $is_meta = is_metaconsole(); @@ -1876,19 +1876,19 @@ function visual_map_print_item( } echo '">'; - echo "<tr style='height:10%;'>"; - echo "<th style='text-align:center;background-color:#9d9ea0;color:black;font-weight:bold;'>".groups_get_name($layoutData['id_group'], true).'</th>'; + echo "<tr class='height_10p'>"; + echo "<th class='tr_vm_colors'>".groups_get_name($layoutData['id_group'], true).'</th>'; echo '</tr>'; - echo "<tr style='background-color:whitesmoke;height:90%;'>"; + echo "<tr class='bg_whitesmoke height_90p'>"; echo '<td>'; - echo "<div style='margin-left:2%;color: #FFF;font-size: 12px;display:inline;background-color:#e63c52;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>".remove_right_zeros(number_format($stat_agent_cr, 2)).'%</div>'; - echo "<div style='background-color:white;color: black ;font-size: 12px;display:inline;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>Critical</div>"; - echo "<div style='margin-left:2%;color: #FFF;font-size: 12px;display:inline;background-color:#f8db3f;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>".remove_right_zeros(number_format($stat_agent_wa, 2)).'%</div>'; - echo "<div style='background-color:white;color: black ;font-size: 12px;display:inline;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>Warning</div>"; - echo "<div style='margin-left:2%;color: #FFF;font-size: 12px;display:inline;background-color:#84b83c;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>".remove_right_zeros(number_format($stat_agent_ok, 2)).'%</div>'; - echo "<div style='background-color:white;color: black ;font-size: 12px;display:inline;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>Normal</div>"; - echo "<div style='margin-left:2%;color: #FFF;font-size: 12px;display:inline;background-color:#9d9ea0;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>".remove_right_zeros(number_format($stat_agent_un, 2)).'%</div>'; - echo "<div style='background-color:white;color: black ;font-size: 12px;display:inline;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>Unknown</div>"; + echo "<div class='critical_zeros'>".remove_right_zeros(number_format($stat_agent_cr, 2)).'%</div>'; + echo "<div class='critical_vm'>Critical</div>"; + echo "<div class='warning_zeros'>".remove_right_zeros(number_format($stat_agent_wa, 2)).'%</div>'; + echo "<div class='warning_vm'>Warning</div>"; + echo "<div class='normal_zeros'>".remove_right_zeros(number_format($stat_agent_ok, 2)).'%</div>'; + echo "<div class='normal_vm'>Normal</div>"; + echo "<div class='unknown_zeros'>".remove_right_zeros(number_format($stat_agent_un, 2)).'%</div>'; + echo "<div class='unknown_vm'>Unknown</div>"; echo '</td>'; echo '</tr>'; echo '</table>'; @@ -1948,15 +1948,15 @@ function visual_map_print_item( if (get_parameter('action') == 'edit' || (get_parameter('operation') == 'edit_visualmap')) { if ($width == 0) { if ($layoutData['id_metaconsole'] != 0) { - $img = '<img src="'.'../../'.'images/console/signes/percentil.png" style="width:130px;height:30px;'.$imgpos.'">'; + $img = '<img src="../../'.'images/console/signes/percentil.png'.'" style="width:130px;height:30px;'.$imgpos.'">'; } else { - $img = '<img src="images/console/signes/percentil.png" style="width:130px;height:30px;'.$imgpos.'">'; + $img = '<img src="'.'images/console/signes/percentil.png'.'" style="width:130px;height:30px;'.$imgpos.'">'; } } else { if ($layoutData['id_metaconsole'] != 0) { - $img = '<img src="'.'../../'.'/images/console/signes/percentil.png" style="width:'.$width.'px;height:30px;'.$imgpos.'">'; + $img = '<img "../../'.'images/console/signes/percentil.png'.'" style="width:'.$width.'px;height:30px;'.$imgpos.'">'; } else { - $img = '<img src="images/console/signes/percentil.png" style="width:'.$width.'px;height:30px;'.$imgpos.'">'; + $img = '<img src="'.'images/console/signes/percentil.png'.'" style="width:'.$width.'px;height:30px;'.$imgpos.'">'; } } } else { @@ -1987,15 +1987,15 @@ function visual_map_print_item( if (get_parameter('action') == 'edit' || (get_parameter('operation') == 'edit_visualmap')) { if ($width == 0) { if ($layoutData['id_metaconsole'] != 0) { - $img = '<img src="'.'../../'.'images/console/signes/percentil_bubble.png">'; + $img = '<img src="../../'.'images/console/signes/percentil_bubble.png'.'">'; } else { - $img = '<img src="images/console/signes/percentil_bubble.png">'; + $img = '<img src="'.'images/console/signes/percentil_bubble.png'.'">'; } } else { if ($layoutData['id_metaconsole'] != 0) { - $img = '<img src="'.'../../'.'/images/console/signes/percentil_bubble.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">'; + $img = '<img src="../../'.'images/console/signes/percentil_bubble.png'.'" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">'; } else { - $img = '<img src="images/console/signes/percentil_bubble.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">'; + $img = '<img src="'.'images/console/signes/percentil_bubble.png'.'" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">'; } } } else { @@ -2017,15 +2017,15 @@ function visual_map_print_item( if (get_parameter('action') == 'edit' || (get_parameter('operation') == 'edit_visualmap')) { if ($width == 0) { if ($layoutData['id_metaconsole'] != 0) { - $img = '<img src="'.'../../'.'images/console/signes/circular-progress-bar.png">'; + $img = '<img src="../../'.'images/console/signes/circular-progress-bar.png'.'">'; } else { - $img = '<img src="images/console/signes/circular-progress-bar.png">'; + $img = '<img src="'.'images/console/signes/circular-progress-bar.png'.'">'; } } else { if ($layoutData['id_metaconsole'] != 0) { - $img = '<img src="'.'../../'.'/images/console/signes/circular-progress-bar.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">'; + $img = '<img src="../../'.'images/console/signes/circular-progress-bar.png'.'" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">'; } else { - $img = '<img src="images/console/signes/circular-progress-bar.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">'; + $img = '<img src="'.'images/console/signes/circular-progress-bar.png'.'" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">'; } } } else { @@ -2060,15 +2060,15 @@ function visual_map_print_item( if (get_parameter('action') == 'edit' || (get_parameter('operation') == 'edit_visualmap')) { if ($width == 0) { if ($layoutData['id_metaconsole'] != 0) { - $img = '<img src="'.'../../'.'images/console/signes/circular-progress-bar-interior.png">'; + $img = '<img src="../../'.'images/console/signes/circular-progress-bar-interior.png'.'">'; } else { - $img = '<img src="images/console/signes/circular-progress-bar-interior.png">'; + $img = '<img src="'.'images/console/signes/circular-progress-bar-interior.png'.'">'; } } else { if ($layoutData['id_metaconsole'] != 0) { - $img = '<img src="'.'../../'.'/images/console/signes/circular-progress-bar-interior.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">'; + $img = '<img src="../../'.'images/console/signes/circular-progress-bar-interior.png'.'" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">'; } else { - $img = '<img src="images/console/signes/circular-progress-bar-interior.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">'; + $img = '<img src="'.'images/console/signes/circular-progress-bar-interior.png'.'" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">'; } } } else { @@ -3600,7 +3600,7 @@ function visual_map_print_visual_map( } if (is_metaconsole()) { - echo "<div style='width: 100%; overflow:auto; margin: 0 auto; padding:5px;'>"; + echo "<div class='vm_meta'>"; } echo '<div id="background_'.$id_layout.'" diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index e6f2d91224..1cd69f59b9 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -45,7 +45,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) $backgrounds_list = list_files($config['homedir'].'/images/console/background/', 'jpg', 1, 0); $backgrounds_list = array_merge($backgrounds_list, list_files($config['homedir'].'/images/console/background/', 'png', 1, 0)); - echo '<div id="properties_panel" style="display: none; position: absolute; border: 1px solid lightgray; padding: 5px; background: white; z-index: 90;">'; + echo '<div id="properties_panel" class="propierties_panel_class">'; // ----------------------------Hiden Form---------------------------- ?> <table class="databox filters" border="0" cellpadding="4" cellspacing="4" width="350"> @@ -79,8 +79,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) foreach ($titles as $item => $title) { echo '<span id="title_panel_span_'.$item.'" - class="title_panel_span" - style="display: none; font-weight: bolder;">'.$title.'</span>'; + class="title_panel_span bolder invisible">'.$title.'</span>'; } ?> </caption> @@ -105,7 +104,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) 'handler_start', 'handler_end', ]; - $form_items['line_color_row']['html'] = '<td align="left" valign="top" style="">'.__('Border color').'</td>'.'<td align="left" style="">'.html_print_input_text_extended( + $form_items['line_color_row']['html'] = '<td align="left" valign="top" >'.__('Border color').'</td>'.'<td align="left" >'.html_print_input_text_extended( 'line_color', '#000000', 'text-line_color', @@ -131,7 +130,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) 'datos', 'box_item', ]; - $form_items['border_color_row']['html'] = '<td align="left" valign="top" style="">'.__('Border color').'</td>'.'<td align="left" style="">'.html_print_input_text_extended( + $form_items['border_color_row']['html'] = '<td align="left" valign="top" >'.__('Border color').'</td>'.'<td align="left" >'.html_print_input_text_extended( 'border_color', '#000000', 'text-border_color', @@ -158,7 +157,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) 'box_item', 'clock', ]; - $form_items['fill_color_row']['html'] = '<td align="left" valign="top" style="">'.__('Fill color').'</td>'.'<td align="left" style="">'.html_print_input_text_extended( + $form_items['fill_color_row']['html'] = '<td align="left" valign="top" >'.__('Fill color').'</td>'.'<td align="left" >'.html_print_input_text_extended( 'fill_color', '#000000', 'text-fill_color', @@ -191,29 +190,52 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) 'bars_graph', 'clock', ]; - $form_items['label_row']['html'] = '<td align="left" valign="top" style="">'.__('Label').ui_print_help_icon('macros_visual_maps', true).' + $form_items['label_row']['html'] = '<td align="left" valign="top" >'.__('Label').ui_print_help_icon('macros_visual_maps', true).' - <div id="label_box_arrow" style="text-align:center;width:120px;height:110px;margin-top:50px;"> + <div id="label_box_arrow"> <span>Label position</span> - <div class="labelpos" id="labelposup" position="up" style="width:20px;height:20px;margin-top:10px;margin-left:45px;cursor: pointer;"> - '.html_print_image('images/label_up.png', true, ['style' => 'height:100%;width:100%;']).' + <div class="labelpos" id="labelposup" position="up"> + '.html_print_image( + 'images/label_up.png', + true, + ['class' => 'height_100p w100p'] + ).' </div> - <div class="labelpos" id="labelposleft" position="left" style="position:relative;top:-5px;width:20px;height:20px;margin-top:15px;cursor: pointer;"> - '.html_print_image('images/label_left.png', true, ['style' => 'height:100%;width:100%;']).' + <div class="labelpos" id="labelposleft" position="left"> + '.html_print_image( + 'images/label_left.png', + true, + ['class' => 'height_100p w100p'] + ).' </div> - <div style="font-weight:bold;width:40px;height:20px;position:relative;margin-left:35px;margin-top:-24px;cursor: default;"> - <span style="float:left;margin-top:3px;margin-left:5px;">Object</span> + <div class="vsmap_div_label"> + <span id="obj_label">Object</span> </div> - <div class="labelpos" id="labelposright" position="right" style="top:2px;width:20px;height:20px;position:relative;margin-left:90px;margin-top:-24px;cursor: pointer;"> - '.html_print_image('images/label_right.png', true, ['style' => 'height:100%;width:100%;']).' + <div class="labelpos" id="labelposright" position="right"> + '.html_print_image( + 'images/label_right.png', + true, + ['class' => 'height_100p w100p'] + ).' </div> - <div class="labelpos" sel="yes" id="labelposdown" position="down" style="width:20px;height:20px;position:relative;margin-left:45px;margin-top:10px;cursor: pointer;"> - '.html_print_image('images/label_down_2.png', true, ['style' => 'height:100%;width:100%;']).' + <div class="labelpos" sel="yes" id="labelposdown" position="down"> + '.html_print_image( + 'images/label_down_2.png', + true, + ['class' => 'height_100p w100p'] + ).' </div> </div> </td> - <td align="left" style="">'.html_print_input_text('label', '', '', 20, 200, true).' - <span id="advice_label" style="font-style:italic;z-index:3;display:inline;margin-top:0px;float:right;margin-right:100px;"> + <td align="left" >'.html_print_input_text( + 'label', + '', + '', + 20, + 200, + true + ).' + <span id="advice_label"> '.__('Scroll the mouse wheel over the label editor to change the background color').' </span> </td>'; @@ -304,8 +326,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) 'group_item', ]; - $form_items['enable_link_row']['html'] = '<td align="left" style="">'.__('Enable link').'</td> - <td align="left" style="">'.html_print_checkbox('enable_link', '', !is_metaconsole(), true).'</td>'; + $form_items['enable_link_row']['html'] = '<td align="left" >'.__('Enable link').'</td> + <td align="left" >'.html_print_checkbox('enable_link', '', !is_metaconsole(), true).'</td>'; $form_items['preview_row'] = []; $form_items['preview_row']['items'] = [ @@ -314,7 +336,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) 'icon', 'group_item', ]; - $form_items['preview_row']['html'] = '<td align="left" colspan="2" style="text-align: right;">'.'<div id="preview" style="text-align: right;"></div></td>'; + $form_items['preview_row']['html'] = '<td align="left" colspan="2" class="right">'.'<div id="preview" class="right"></div></td>'; $form_items['background_color'] = []; $form_items['background_color']['items'] = [ @@ -341,7 +363,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) $form_items['grid_color_row'] = []; $form_items['grid_color_row']['items'] = ['bars_graph']; - $form_items['grid_color_row']['html'] = '<td align="left" valign="top" style="">'.__('Grid color').'</td>'.'<td align="left" style="">'.html_print_input_text_extended( + $form_items['grid_color_row']['html'] = '<td align="left" valign="top" >'.__('Grid color').'</td>'.'<td align="left" >'.html_print_input_text_extended( 'grid_color', '#000000', 'text-grid_color', @@ -359,11 +381,11 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) 'module_graph', 'datos', ]; - $form_items['radio_choice_graph']['html'] = '<td align="left" style=""></td> - <td align="left" style="">'.__('Module graph').'  '.html_print_radio_button('radio_choice', 'module_graph', '', 'module_graph', true).'    '.__('Custom graph').'  '.html_print_radio_button('radio_choice', 'custom_graph', '', 'module_graph', true).'</td>'; + $form_items['radio_choice_graph']['html'] = '<td align="left" ></td> + <td align="left" >'.__('Module graph').'  '.html_print_radio_button('radio_choice', 'module_graph', '', 'module_graph', true).'    '.__('Custom graph').'  '.html_print_radio_button('radio_choice', 'custom_graph', '', 'module_graph', true).'</td>'; $form_items['custom_graph_row'] = []; - $form_items['custom_graph_row']['html'] = '<td align="left" style="">'.__('Custom graph').'</td><td align="left" style="">'; + $form_items['custom_graph_row']['html'] = '<td align="left" >'.__('Custom graph').'</td><td align="left" >'; if (is_metaconsole()) { $graphs = []; $graphs = metaconsole_get_custom_graphs(true); @@ -461,12 +483,12 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) 'color_cloud', ]; $form_items['module_row']['html'] = '<td align="left">'.__('Module').'</td> - <td align="left">'.html_print_select([], 'module', '', '', __('Any'), 0, true).'<div id="data_image_container" style="display:none;"><span id="data_image_check_label" style="margin-left:20px;">'.__('Data image').': </span><span id="data_image_check">Off</span><span id="data_image_width_label"> - Width: </span><input style="margin-left:5px;width:40px;" type="number" min="0" id="data_image_width" value="100"></input></div> + <td align="left">'.html_print_select([], 'module', '', '', __('Any'), 0, true).'<div id="data_image_container" class="invisible"><span id="data_image_check_label" class="mrgn_lft_20px">'.__('Data image').': </span><span id="data_image_check">Off</span><span id="data_image_width_label"> - Width: </span><input class="mrgn_lft_5px w40px" type="number" min="0" id="data_image_width" value="100"></input></div> </td>'; $form_items['resume_color_row'] = []; $form_items['resume_color_row']['items'] = ['donut_graph']; - $form_items['resume_color_row']['html'] = '<td align="left" valign="top" style="">'.__('Resume data color').'</td>'.'<td align="left" style="">'.html_print_input_text_extended( + $form_items['resume_color_row']['html'] = '<td align="left" valign="top" >'.__('Resume data color').'</td>'.'<td align="left" >'.html_print_input_text_extended( 'resume_color', '#000000', 'text-resume_color', @@ -632,7 +654,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) 'datos', ]; $form_items['percentile_item_row_3']['html'] = '<td align="left">'.__('Type').'</td> - <td align="left">'.html_print_select($percentile_type, 'type_percentile', 'percentile', '', '', '', true, false, false, '', false, 'style="float: left;"').'</td>'; + <td align="left">'.html_print_select($percentile_type, 'type_percentile', 'percentile', '', '', '', true, false, false, '', false, 'class="float-left"').'</td>'; $form_items['percentile_item_row_4'] = []; $form_items['percentile_item_row_4']['items'] = [ @@ -641,7 +663,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) 'datos', ]; $form_items['percentile_item_row_4']['html'] = '<td align="left">'.__('Value to show').'</td> - <td align="left">'.html_print_select($percentile_value, 'value_show', 'percent', '', '', '', true, false, false, '', false, 'style="float: left;"').'</td>'; + <td align="left">'.html_print_select($percentile_value, 'value_show', 'percent', '', '', '', true, false, false, '', false, 'class="float-left"').'</td>'; } else { $form_items['percentile_item_row_3'] = []; $form_items['percentile_item_row_3']['items'] = [ @@ -722,8 +744,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) $form_items['show_statistics_row'] = []; $form_items['show_statistics_row']['items'] = ['group_item']; - $form_items['show_statistics_row']['html'] = '<td align="left" style="">'.__('Show statistics').'</td> - <td align="left" style="">'.html_print_checkbox('show_statistics', 1, '', true).'</td>'; + $form_items['show_statistics_row']['html'] = '<td align="left" >'.__('Show statistics').'</td> + <td align="left" >'.html_print_checkbox('show_statistics', 1, '', true).'</td>'; // Start of Color Cloud rows // Diameter @@ -749,8 +771,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) // End of Color Cloud rows $form_items['show_on_top_row'] = []; $form_items['show_on_top_row']['items'] = ['group_item']; - $form_items['show_on_top_row']['html'] = '<td align="left" style="">'.__('Always show on top').'</td> - <td align="left" style="">'.html_print_checkbox('show_on_top', 1, '', true).ui_print_help_tip(__('It allows the element to be superimposed to the rest of items of the visual console'), true).'</td>'; + $form_items['show_on_top_row']['html'] = '<td align="left" >'.__('Always show on top').'</td> + <td align="left" >'.html_print_checkbox('show_on_top', 1, '', true).ui_print_help_tip(__('It allows the element to be superimposed to the rest of items of the visual console'), true).'</td>'; $show_last_value = [ '0' => __('Hide last value on boolean modules'), @@ -759,7 +781,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) ]; $form_items['show_last_value_row'] = []; $form_items['show_last_value_row']['items'] = ['static_graph']; - $form_items['show_last_value_row']['html'] = '<td align="left" style="">'.__('Show last value').'</td> + $form_items['show_last_value_row']['html'] = '<td align="left" >'.__('Show last value').'</td> <td align="left">'.html_print_select($show_last_value, 'last_value', 0, '', '', '', true).'</td>'; $form_items['module_graph_size_row'] = []; @@ -787,27 +809,27 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) $form_items['button_update_row'] = []; $form_items['button_update_row']['items'] = ['datos']; - $form_items['button_update_row']['html'] = '<td align="left" colspan="2" style="text-align: right;">'.html_print_button(__('Cancel'), 'cancel_button', false, 'cancel_button_palette_callback();', 'class="sub cancel"', true).'<span ="margin-right:10px;"> </span>'.html_print_button(__('Update'), 'update_button', false, 'update_button_palette_callback();', 'class="sub upd"', true).'</td>'; + $form_items['button_update_row']['html'] = '<td align="left" colspan="2" class="right">'.html_print_button(__('Cancel'), 'cancel_button', false, 'cancel_button_palette_callback();', 'class="sub cancel"', true).'<span ="margin-right:10px;"> </span>'.html_print_button(__('Update'), 'update_button', false, 'update_button_palette_callback();', 'class="sub upd"', true).'</td>'; $form_items['button_create_row'] = []; $form_items['button_create_row']['items'] = ['datos']; - $form_items['button_create_row']['html'] = '<td align="left" colspan="2" style="text-align: right;">'.html_print_button(__('Cancel'), 'cancel_button', false, 'cancel_button_palette_callback();', 'class="sub cancel"', true).'<span ="margin-right:10px;"> </span>'.html_print_button(__('Create'), 'create_button', false, 'create_button_palette_callback();', 'class="sub wand"', true).'</td>'; + $form_items['button_create_row']['html'] = '<td align="left" colspan="2" class="right">'.html_print_button(__('Cancel'), 'cancel_button', false, 'cancel_button_palette_callback();', 'class="sub cancel"', true).'<span ="margin-right:10px;"> </span>'.html_print_button(__('Create'), 'create_button', false, 'create_button_palette_callback();', 'class="sub wand"', true).'</td>'; foreach ($form_items as $item => $item_options) { - echo '<tr id="'.$item.'" style="" class="'.implode(' ', (array) $item_options['items']).'">'; + echo '<tr id="'.$item.'" class="'.implode(' ', (array) $item_options['items']).'">'; echo $item_options['html']; echo '</tr>'; } ?> <tr id="advance_options_link" class="datos"> - <td colspan="2" style="text-align: center;"> + <td colspan="2" class="center"> <a href="javascript: toggle_advance_options_palette()"> <?php echo __('Advanced options'); ?> </a> </td> </tr> </tbody> - <tbody id="advance_options" style="display: none;"> + <tbody id="advance_options" class="invisible"> <?php $form_items_advance = []; @@ -1183,7 +1205,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) } foreach ($form_items_advance as $item => $item_options) { - echo '<tr id="'.$item.'" style="" class="'.implode(' ', $item_options['items']).'">'; + echo '<tr id="'.$item.'" class="'.implode(' ', $item_options['items']).'">'; echo $item_options['html']; echo '</tr>'; } @@ -1193,11 +1215,11 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) <?php echo '</div>'; - echo '<div id="div_step_1" class="forced_title_layer" - style="display: none; position: absolute; z-index: 99;">'.__('Click start point<br />of the line').'</div>'; + echo '<div id="div_step_1" class="forced_title_layer steps_vsmap" + >'.__('Click start point<br />of the line').'</div>'; - echo '<div id="div_step_2" class="forced_title_layer" - style="display: none; position: absolute; z-index: 99;">'.__('Click end point<br />of the line').'</div>'; + echo '<div id="div_step_2" class="forced_title_layer steps_vsmap" + >'.__('Click end point<br />of the line').'</div>'; ui_require_css_file('color-picker', 'include/styles/js/'); @@ -1288,9 +1310,9 @@ function visual_map_editor_print_toolbox() global $config; if (defined('METACONSOLE')) { - echo '<div id="editor" style="">'; + echo '<div id="editor" >'; } else { - echo '<div id="editor" style="margin-top: -10px;">'; + echo '<div id="editor" class="mrgn_top-10px">'; } echo '<div id="toolbox">'; @@ -1333,7 +1355,7 @@ function visual_map_editor_print_toolbox() visual_map_print_button_editor('copy_item', __('Copy item'), 'right', true, 'copy_item', true); echo '</div>'; echo '</div>'; - echo '<div style="clear: right; margin-bottom: 10px;"></div>'; + echo '<div class="clear_right mrgn_btn_10px"></div>'; } @@ -1366,84 +1388,84 @@ function visual_map_print_button_editor( function visual_map_editor_print_hack_translate_strings() { // Trick for it have a traduct text for javascript. - echo '<span id="any_text" style="display: none;">'.__('Any').'</span>'; - echo '<span id="ip_text" style="display: none;">'.__('IP').'</span>'; + echo '<span id="any_text" class="invisible">'.__('Any').'</span>'; + echo '<span id="ip_text" class="invisible">'.__('IP').'</span>'; // Hack to translate messages in javascript. - echo "<div id='message_min_allowed_size' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('Min allowed size is 1024x768.').'</p>'; + echo "<div id='message_min_allowed_size' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('Min allowed size is 1024x768.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_custom_graph' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No custom graph defined.').'</p>'; + echo "<div id='message_alert_no_custom_graph' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No custom graph defined.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_label_no_image' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No image or name defined.').'</p>'; + echo "<div id='message_alert_no_label_no_image' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No image or name defined.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_label' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No label defined.').'</p>'; + echo "<div id='message_alert_no_label' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No label defined.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_service' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No service defined.').'</p>'; + echo "<div id='message_alert_no_service' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No service defined.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_image' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No image defined.').'</p>'; + echo "<div id='message_alert_no_image' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No image defined.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_process' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No process defined.').'</p>'; + echo "<div id='message_alert_no_process' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No process defined.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_max_percentile' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No Max value defined.').'</p>'; + echo "<div id='message_alert_no_max_percentile' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No Max value defined.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_width' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No width defined.').'</p>'; + echo "<div id='message_alert_no_width' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No width defined.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_height' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No height defined.').'</p>'; + echo "<div id='message_alert_no_height' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No height defined.').'</p>'; echo '</div>'; - echo "<div id='message_alert_max_width' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('The width must not exceed the size of the visual console container.').'</p>'; + echo "<div id='message_alert_max_width' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('The width must not exceed the size of the visual console container.').'</p>'; echo '</div>'; - echo "<div id='message_alert_max_height' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('The height must not exceed the size of the visual console container.').'</p>'; + echo "<div id='message_alert_max_height' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('The height must not exceed the size of the visual console container.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_period' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No period defined.').'</p>'; + echo "<div id='message_alert_no_period' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No period defined.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_agent' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No agent defined.').'</p>'; + echo "<div id='message_alert_no_agent' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No agent defined.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_module' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No module defined.').'</p>'; + echo "<div id='message_alert_no_module' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No module defined.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_module_string_type' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No module defined. This module must be string type.').'</p>'; + echo "<div id='message_alert_no_module_string_type' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No module defined. This module must be string type.').'</p>'; echo '</div>'; - echo "<div id='hack_translation_correct_save' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('Successfully save the changes.').'</p>'; + echo "<div id='hack_translation_correct_save' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('Successfully save the changes.').'</p>'; echo '</div>'; - echo "<div id='hack_translation_incorrect_save' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('Could not be save.').'</p>'; + echo "<div id='hack_translation_incorrect_save' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('Could not be save.').'</p>'; echo '</div>'; - echo "<div id='message_alert_no_custom_graph' title='".__('Visual Console Builder Information')."' style='display:none;'>"; - echo "<p style='text-align: center;font-weight: bold;'>".__('No custom graph defined.').'</p>'; + echo "<div id='message_alert_no_custom_graph' title='".__('Visual Console Builder Information')."' class='invisible'>"; + echo "<p class='center bolder'>".__('No custom graph defined.').'</p>'; echo '</div>'; } diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 308ec1ddfa..259e9638cc 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -2773,6 +2773,7 @@ function pandoraFlotArea( "src", homeurl + "images/zoom_cross.disabled.png" ); + $("#menu_cancelzoom_" + graph_id).attr("class", "invert_filter"); overview.clearSelection(); thresholded = false; max_draw = []; diff --git a/pandora_console/include/graphs/functions_d3.php b/pandora_console/include/graphs/functions_d3.php index 7bc835a456..e195d3b1d4 100644 --- a/pandora_console/include/graphs/functions_d3.php +++ b/pandora_console/include/graphs/functions_d3.php @@ -306,7 +306,7 @@ function d3_gauges( $output = include_javascript_d3(true); foreach ($chart_data as $module) { - $output .= "<div class='gauge_d3_class' id='".$module['gauge']."' style='float:left; overflow: hidden; margin-left: 10px;'></div>"; + $output .= "<div class='gauge_d3_class gauge_class' id='".$module['gauge']."'></div>"; } $output .= "<script language=\"javascript\" type=\"text/javascript\"> diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 188752da7c..370ae6c6d2 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -155,7 +155,7 @@ function flot_area_graph( $return = "<div class='parent_graph' style='".$width.$background_style."'>"; if ($params['title'] === true && empty($params['title']) === false) { - $return .= '<p style="text-align:center;">'.$params['title'].'</p>'; + $return .= '<p class="center">'.$params['title'].'</p>'; } // Set some containers to legend, graph, timestamp tooltip, etc. @@ -341,6 +341,8 @@ function menu_graph( $graph_id, $params ) { + global $config; + $return = ''; $threshold = false; if ($yellow_threshold != $yellow_up || $red_threshold != $red_up) { @@ -349,19 +351,19 @@ function menu_graph( $return .= "<div id='general_menu_$graph_id' class='menu_graph'>"; $return .= "<div id='menu_$graph_id' "."style='display: none; ".'text-align: center;'.'position: relative;'."border-bottom: 0px;'> - <a href='javascript:'><img id='menu_cancelzoom_$graph_id' src='".$params['homeurl']."images/zoom_cross_grey.disabled.png' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>"; + <a href='javascript:'><img id='menu_cancelzoom_$graph_id' class='invert_filter' src='".$params['homeurl'].'images/operation.png'."' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>"; if ($threshold) { - $return .= " <a href='javascript:'><img id='menu_threshold_$graph_id' src='".$params['homeurl']."images/chart_curve_threshold.png' alt='".__('Warning and Critical thresholds')."' title='".__('Warning and Critical thresholds')."'></a>"; + $return .= " <a href='javascript:'><img id='menu_threshold_$graph_id' src='".$params['homeurl'].'images/chart_curve_threshold.png'."' alt='".__('Warning and Critical thresholds')."' title='".__('Warning and Critical thresholds')."'></a>"; } if ($params['show_overview']) { $return .= " <a href='javascript:'> - <img id='menu_overview_$graph_id' class='menu_overview' src='".$params['homeurl']."images/chart_curve_overview.png' alt='".__('Overview graph')."' title='".__('Overview graph')."'></a>"; + <img id='menu_overview_$graph_id' class='menu_overview' src='".$params['homeurl'].'images/chart_curve_overview.png'."' alt='".__('Overview graph')."' title='".__('Overview graph')."'></a>"; } // Export buttons. if ($params['show_export_csv']) { - $return .= " <a href='javascript:'><img id='menu_export_csv_$graph_id' src='".$params['homeurl']."images/csv_grey.png' alt='".__('Export to CSV')."' title='".__('Export to CSV')."'></a>"; + $return .= "<a href='javascript:'><img id='menu_export_csv_$graph_id' src='".$params['homeurl'].'images/csv_grey.png'."' alt='".__('Export to CSV')."' title='".__('Export to CSV')."'></a>"; } $return .= '</div>'; @@ -421,7 +423,7 @@ function flot_pie_chart( $return = "<div id='".$graph_id."' class='graph' style='width: ".$width.'px; height: '.$height."px;'></div>"; if ($water_mark != '') { - $return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='$water_mark'></div>"; + $return .= "<div id='watermark_$graph_id' class='invisible absolute'><img id='watermark_image_$graph_id' src='$water_mark'></div>"; $water_mark = 'true'; } else { $water_mark = 'false'; @@ -504,7 +506,7 @@ function flot_custom_pie_chart( $return = "<div id='$graph_id' class='graph noresizevc' style='width: ".$width.'px; height: '.$height."px;'></div>"; if ($water_mark != '') { - $return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='".$water_mark['url']."'></div>"; + $return .= "<div id='watermark_$graph_id' class='invisible absolute'><img id='watermark_image_$graph_id' src='".$water_mark['url']."'></div>"; $water_mark = 'true'; } else { $water_mark = 'false'; @@ -550,10 +552,10 @@ function flot_hcolumn_chart($graph_data, $width, $height, $water_mark, $font='', // Set some containers to legend, graph, timestamp tooltip, etc. $return .= "<div id='$graph_id' class='graph' style='width: ".$width.'px; height: '.$height."px; padding-left: 20px;'></div>"; - $return .= "<div id='value_$graph_id' style='display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px'></div>"; + $return .= "<div id='value_$graph_id' class='flot_container'></div>"; if ($water_mark != '') { - $return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='$water_mark'></div>"; + $return .= "<div id='watermark_$graph_id' class='invisible absolute'><img id='watermark_image_$graph_id' src='$water_mark'></div>"; $watermark = 'true'; } else { $watermark = 'false'; @@ -664,7 +666,7 @@ function flot_vcolumn_chart(array $options) $return .= '</div>'; // Set some containers to legend, graph, timestamp tooltip, etc. - $return .= '<div id="value_'.$graphId.'" style="display:none;"></div>'; + $return .= '<div id="value_'.$graphId.'" class="invisible"></div>'; // Add id to options. $options['graphId'] = $graphId; @@ -745,7 +747,7 @@ function flot_slicesbar_graph( $style .= 'height:'.$height.'px;'; $return = "<div id='".$graph_id."' class='noresizevc graph ".$adapt_key."' style='".$style."'></div>"; - $return .= "<div id='value_".$graph_id."' style='display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px'></div>"; + $return .= "<div id='value_".$graph_id."' class='flot_container'></div>"; // Set a weird separator to serialize and unserialize // passing data from php to javascript. @@ -760,7 +762,7 @@ function flot_slicesbar_graph( $fontsize = $config['font_size']; $fontpath = $config['fontpath']; - $return .= '<div id="extra_'.$graph_id.'" class="slicebar-box-hover-styles" style="display:none; font-size:'.$fontsize.'"></div>'; + $return .= '<div id="extra_'.$graph_id.'" class="slicebar-box-hover-styles invisible" style="font-size:'.$fontsize.'"></div>'; $maxticks = (int) 20; if ($sizeForTicks === false) { diff --git a/pandora_console/include/help/clippy/homepage.php b/pandora_console/include/help/clippy/homepage.php index 845e94ea49..b7487a1636 100644 --- a/pandora_console/include/help/clippy/homepage.php +++ b/pandora_console/include/help/clippy/homepage.php @@ -72,11 +72,11 @@ function clippy_start_page_homepage() $return_tours['tours']['homepage']['steps'] = []; $return_tours['tours']['homepage']['steps'][] = [ 'element' => '#clippy', - 'intro' => '<div class="clippy_body" style="text-align: left; padding-left: 20px; padding-right: 20px;">'.__('Hi, can I help you?').'<br/><br/>'.__('Let me introduce my self: I am Pandorin, the annoying assistant of %s. You can follow my steps to do basic tasks in %s or you can close me and never see me again.', get_product_name(), get_product_name()).'<br /> <br /> <div class="clippy_body" style="font-size: 7pt;">'.$pandorin_chkb.__('Close this wizard and don\'t open it again.').'</div></div><div style="position:relative;"><div id="pandorin" style="'.$style.'">'.$pandorin_img.'</div></div>', + 'intro' => '<div class="clippy_body left pdd_l_20px pdd_r_20px">'.__('Hi, can I help you?').'<br/><br/>'.__('Let me introduce my self: I am Pandorin, the annoying assistant of %s. You can follow my steps to do basic tasks in %s or you can close me and never see me again.', get_product_name(), get_product_name()).'<br /> <br /> <div class="clippy_body font_7pt">'.$pandorin_chkb.__('Close this wizard and don\'t open it again.').'</div></div><div class="relative"><div id="pandorin" style="'.$style.'">'.$pandorin_img.'</div></div>', ]; $return_tours['tours']['homepage']['steps'][] = [ 'element' => '#clippy', - 'intro' => __('Which task would you like to do first?').'<br/><br/><ul style="text-align: left; margin-left: 10px; list-style-type: disc;"><li>'."<a href='javascript: clippy_go_link_show_help(\"index.php?sec=gagente&sec2=godmode/agentes/modificar_agente\", \"monitoring_server_step_1\");'>".__('Ping a Linux or Windows server using a %s agent.', get_product_name()).'</a></li><li>'."<a href='javascript: clippy_go_link_show_help(\"index.php\", \"email_alert_module_step_1\");'>".__('Create a alert by email in a critical module.').'</a></li></ul>', + 'intro' => __('Which task would you like to do first?').'<br/><br/><ul class="left mrgn_lft_10px list-type-disc"><li>'."<a href='javascript: clippy_go_link_show_help(\"index.php?sec=gagente&sec2=godmode/agentes/modificar_agente\", \"monitoring_server_step_1\");'>".__('Ping a Linux or Windows server using a %s agent.', get_product_name()).'</a></li><li>'."<a href='javascript: clippy_go_link_show_help(\"index.php\", \"email_alert_module_step_1\");'>".__('Create a alert by email in a critical module.').'</a></li></ul>', ]; $return_tours['tours']['homepage']['conf'] = []; $return_tours['tours']['homepage']['conf']['show_bullets'] = 0; diff --git a/pandora_console/include/help/en/help_ad_advanced_permision.php b/pandora_console/include/help/en/help_ad_advanced_permision.php index 4db329f2aa..73eb7b4cd6 100644 --- a/pandora_console/include/help/en/help_ad_advanced_permision.php +++ b/pandora_console/include/help/en/help_ad_advanced_permision.php @@ -7,17 +7,17 @@ <br><br> -<table width="750px" style="display:inline"> +<table width="750px" class="inline_line"> <tr> - <td class=""> If you add a new permission, you must add the corresponding text as follows: - <nav> - </nav> - “Profile name, Group name, [Group Name AD n1|Group Name AD n2| - <nav> - </nav> - Name of Group AD n3|...],[Nametag1|NameTag2|NameTagN|...]" - <nav> - </nav> - To separate groups and tags you must use "|" as shown in the top example above - </td> + <td class=""> If you add a new permission, you must add the corresponding text as follows: + <nav> + </nav> + “Profile name, Group name, [Group Name AD n1|Group Name AD n2| + <nav> + </nav> + Name of Group AD n3|...],[Nametag1|NameTag2|NameTagN|...]" + <nav> + </nav> + To separate groups and tags you must use "|" as shown in the top example above + </td> </table> diff --git a/pandora_console/include/help/en/help_agent_status.php b/pandora_console/include/help/en/help_agent_status.php index 8819545abc..b7b8dcb44d 100644 --- a/pandora_console/include/help/en/help_agent_status.php +++ b/pandora_console/include/help/en/help_agent_status.php @@ -19,7 +19,7 @@ Possible values for an <b>agent’s status</b> are: <br><br> -<table width="750px" style="display:inline"> +<table width="750px" class="inline_line"> <tr> <td class="f9i"><?php html_print_image('images/status_sets/default/module_critical.png', false, ['title' => 'At least one monitor fails', 'alt' => 'At least one monitor fails']); ?><?php html_print_image('images/status_sets/faces/module_critical.png', false, ['title' => 'At least one monitor fails', 'alt' => 'At least one monitor fails']); ?></td><td>At least one monitor fails</td> <td class="f9i"><?php html_print_image('images/status_sets/default/module_warning.png', false, ['title' => 'Change between Green/Red state', 'alt' => 'Change between Green/Red state']); ?><?php html_print_image('images/status_sets/faces/module_warning.png', false, ['title' => 'Change between Green/Red state', 'alt' => 'Change between Green/Red state']); ?></td><td>Change between Green/Red state</td> diff --git a/pandora_console/include/help/en/help_cascade_protection.php b/pandora_console/include/help/en/help_cascade_protection.php index a1f776e3ae..d31d1f5554 100644 --- a/pandora_console/include/help/en/help_cascade_protection.php +++ b/pandora_console/include/help/en/help_cascade_protection.php @@ -1,9 +1,9 @@ -<h1 style='text-align:center;'>Cascade protection</h1> +<h1 class='center'>Cascade protection</h1> <br> <h2>Agent cascade protection</h2> <hr> -<div style='text-align:center;'> +<div class='center'> <?php html_print_image('images/help/cascade_protection_agent.png', false); ?> </div> <br> @@ -18,7 +18,7 @@ If you want to use an advanced cascade protection system, just use correlation a <h2>Module cascade protection</h2> <hr> -<div style='text-align:center;'> +<div class='center'> <?php html_print_image('images/help/cascade_protection_module.png', false); ?> <br> </div> diff --git a/pandora_console/include/help/en/help_configure_gis_map.php b/pandora_console/include/help/en/help_configure_gis_map.php index 1ae6ed62c4..fe86626457 100644 --- a/pandora_console/include/help/en/help_configure_gis_map.php +++ b/pandora_console/include/help/en/help_configure_gis_map.php @@ -46,11 +46,11 @@ Once the selection of the connection (or connections) is done, there is a posibi </div> <h2>Layer setup</h2> <p> -Each map has one or more layers<sup><span style="font-size:75%">1</span></sup> to show the agents. Each layer can have show the agents of a <strong>group</strong> and/or a <strong>list of agents</strong>. This way it's easy to set up the agents that will be shown on each Layer. +Each map has one or more layers<sup><span class="font_75p">1</span></sup> to show the agents. Each layer can have show the agents of a <strong>group</strong> and/or a <strong>list of agents</strong>. This way it's easy to set up the agents that will be shown on each Layer. </p> <p> The layers can be set as <strong>visible</strong> or <strong>hidden</strong>, and select the <strong>group</strong> with the selector or add <strong>agents</strong> with the box. Once the layer is defined (it will not be completely saved until the whole map is saved) it will be moved to the left column of defined layers, where it is possible to <strong>order</strong> (<?php html_print_image('images/up.png', false, ['alt' => 'move up icon']); ?> and <?php html_print_image('images/down.png', false, ['alt' => 'move down icon']); ?>) them, <strong>delete</strong> (<?php html_print_image('images/cross.png', false, ['alt' => 'delete icon']); ?>), or <strong>edited</strong> (<?php html_print_image('images/config.png', false, ['alt' => 'edit icon']); ?>) again. </p> <hr/> -<sup><span style="font-size:75%;">1</span></sup> <span style="font-size:85%;">The default map can have 0 layers as is the one used in the agent GIS view and only uses one layer with the agent name.</span> +<sup><span class="font_75p">1</span></sup> <span class="font_85p">The default map can have 0 layers as is the one used in the agent GIS view and only uses one layer with the agent name.</span> diff --git a/pandora_console/include/help/en/help_context_module_unknow.php b/pandora_console/include/help/en/help_context_module_unknow.php index 1d3fc8b021..d5eb819124 100644 --- a/pandora_console/include/help/en/help_context_module_unknow.php +++ b/pandora_console/include/help/en/help_context_module_unknow.php @@ -10,7 +10,7 @@ You may have unknown modules for many reasons. Unknown module is a special statu <p> These are a few cases where you can get unknown modules: </p> -<ul style="list-style-type: disc; margin-left: 30px;"> +<ul class="list-type-disc mrgn_lft_30px"> <li>Your <?php echo get_product_name(); ?> server is down. Restart it, dont forget to check /var/log/pandora/pandora_server.log to see why was down.</li> <li>Your tentacle server is down, and cannot get data from your <?php echo get_product_name(); ?> agents installed in your remote servers.</li> <li>You have a network problem between your agents and your server.</li> diff --git a/pandora_console/include/help/en/help_cron.php b/pandora_console/include/help/en/help_cron.php index 35f89887ba..065344b0e6 100644 --- a/pandora_console/include/help/en/help_cron.php +++ b/pandora_console/include/help/en/help_cron.php @@ -8,7 +8,7 @@ Using the configuration parameter sets <b>Cron from</b> and <b>Cron to</b> makes it possible for a module to run only for certain periods of time. The way in which it is configured is similar to the syntax of -<a style="font-size:14px;" href="https://en.wikipedia.org/wiki/Cron">cron</a>. +<a class="font_14px" href="https://en.wikipedia.org/wiki/Cron">cron</a>. Just as they appear in the <?php echo get_product_name(); ?> console, each one of the parameters has three options. diff --git a/pandora_console/include/help/en/help_eventview.php b/pandora_console/include/help/en/help_eventview.php index 6261e209ea..a867d4fb87 100644 --- a/pandora_console/include/help/en/help_eventview.php +++ b/pandora_console/include/help/en/help_eventview.php @@ -8,16 +8,13 @@ <br> <br> -<div style="padding-left: 30px; width: 150px; float: left; line-height: 17px;"> +<div class="pdd_l_30px w150px float-left line_17px"> <h3>Validate</h3> <?php html_print_image('images/tick.png', false, ['title' => 'Validated event', 'alt' => 'Validated event', 'width' => '10', 'height' => '10']); ?> - Validated event<br> - <?php - // html_print_image("images/cross.png", false, array("title" => "Event not validated", "alt" => "Event not validated", "width" => '10', "height" => '10')); - ?> - <div style="width: 10px;height: 10px; display: inline-block;"></div> - Event not validated + <div class="w10px height_10px inline"></div> - Event not validated </div> -<div style="padding-left: 30px; width: 150px; float: left; line-height: 17px;"> +<div class="pdd_l_30px w150px float-left line_17px"> <h3>Severity</h3> <?php html_print_image('images/status_sets/default/severity_maintenance.png', false, ['title' => 'Maintenance event', 'alt' => 'Maintenance event']); ?> - Maintenance event<br> <?php html_print_image('images/status_sets/default/severity_informational.png', false, ['title' => 'Informational event', 'alt' => 'Informational event']); ?> - Informational event<br> @@ -26,7 +23,7 @@ <?php html_print_image('images/status_sets/default/severity_critical.png', false, ['title' => 'Critical event', 'alt' => 'Critical event']); ?> - Critical event<br> </div> -<div style="padding-left: 30px; width: 150px; float: left; line-height: 17px;"> +<div class="pdd_l_30px w150px float-left line_17px"> <h3>Actions</h3> <?php html_print_image('images/ok.png', false, ['title' => 'Validate event', 'alt' => 'Validate event']); ?> - Validate event<br> <?php html_print_image('images/cross.png', false, ['title' => 'Delete event', 'alt' => 'Delete event']); ?> - Delete event<br> @@ -34,5 +31,5 @@ <?php html_print_image('images/hourglass.png', false, ['title' => 'In progress', 'alt' => 'In progress']); ?> - In progress </div> -<div style="clear: both;"> </div> +<div class="both"> </div> diff --git a/pandora_console/include/help/en/help_ipam.php b/pandora_console/include/help/en/help_ipam.php index 30d2469493..35c8eb74d2 100755 --- a/pandora_console/include/help/en/help_ipam.php +++ b/pandora_console/include/help/en/help_ipam.php @@ -30,23 +30,23 @@ Addresses will be shown as icons, large or small. This icons will render the fol </tr> <tr> <td>No assigned agent<br><br>Disabled events</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/red_host.png"></td> +<td class="center"><img src="../enterprise/images/ipam/green_host.png"></td> +<td class="center"><img src="../enterprise/images/ipam/red_host.png"></td> </tr> <tr> <td>With assigned agent<br><br>Disabled events</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_agent.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_agent.png"></td> +<td class="center"><img src="../enterprise/images/ipam/green_host_agent.png"></td> +<td class="center"><img src="../enterprise/images/ipam/red_host_agent.png"></td> </tr> <tr> <td>No assigned agent<br><br>Activated events</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_alert.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_alert.png"></td> +<td class="center"><img src="../enterprise/images/ipam/green_host_alert.png"></td> +<td class="center"><img src="../enterprise/images/ipam/red_host_alert.png"></td> </tr> <tr> <td>With assigned agent<br><br>Activated events</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_agent_alert.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_agent_alert.png"></td> +<td class="center"><img src="../enterprise/images/ipam/green_host_agent_alert.png"></td> +<td class="center"><img src="../enterprise/images/ipam/red_host_agent_alert.png"></td> </tr> <tr> <th colspan=3>Not managed</th> @@ -57,9 +57,9 @@ Addresses will be shown as icons, large or small. This icons will render the fol <th>Unresponsive host</th> </tr> <tr> -<td style="width: 100px;">If an IP address is not managed, you can only view if is responding or not.</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_dotted.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/not_host.png"></td> +<td class="w100px">If an IP address is not managed, you can only view if is responding or not.</td> +<td class="center"><img src="../enterprise/images/ipam/green_host_dotted.png"></td> +<td class="center"><img src="../enterprise/images/ipam/not_host.png"></td> </tr> <tr> <th colspan=3>Not assigned</th> @@ -69,7 +69,7 @@ Addresses will be shown as icons, large or small. This icons will render the fol </tr> </table> <br><br> -Each IP address have in the bottom right position a link to edit it (with adminitration rights). In the bottom left position, there is a small icon showing the OS detected. On disabled addresses, instead the OS icon, you will see this icon:<br><br><img src="../images/delete.png" style="width:18px;"><br><br> +Each IP address have in the bottom right position a link to edit it (with adminitration rights). In the bottom left position, there is a small icon showing the OS detected. On disabled addresses, instead the OS icon, you will see this icon:<br><br><img src="../images/delete.png" class="w18px"><br><br> When you click on the main icon, a modal window will be opened showing all the IP information, including associated agent and OS, setup for that IP and other information, like creation date, last user edition or last time it was checked by server. In this view you can also do a manual, realtime check to see if that IP respond to ping. Note that this ping is done by the console, instead the regular check, done by the recon server. @@ -83,12 +83,12 @@ Some fields, are automatically filled by the recon script, like hostname, if it <th colspan=2>Changing between manual and automated</th> </tr> <tr> -<td style="text-align:center; width: 25px;"><img src="../images/manual.png"></td> +<td class="center w25px"><img src="../images/manual.png"></td> <td><b>Manual mode</b>: With this symbol, the field will not be updated by the recon system and you can edit manually. By clicking on it, you will switch to automated mode. </td> </tr> <tr> -<td style="text-align:center; width: 25px;"><img src="../images/automatic.png"></td> +<td class="center w25px"><img src="../images/automatic.png"></td> <td><b>Automated mode</b>:With this icon, the field will be updated automatically from the recon script. By clicking on it, it will switch to manual mode..</td> </tr> </table> diff --git a/pandora_console/include/help/en/help_module_macros.php b/pandora_console/include/help/en/help_module_macros.php index 3b61365492..0f0cc20e93 100644 --- a/pandora_console/include/help/en/help_module_macros.php +++ b/pandora_console/include/help/en/help_module_macros.php @@ -15,13 +15,13 @@ For example: </p> <ol> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder lato_bolderfont_12pt"> _technology_ </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder lato_bolderfont_12pt"> _modulepriority_ </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder lato_bolderfont_12pt"> _contactperson_ </li> </ol> @@ -36,25 +36,25 @@ Dynamic macros will have a special format starting with @ and will have these possible substitutions: </p> <ol> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder lato_bolderfont_12pt"> @DATE_FORMAT (current date/time with user-defined format) </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder lato_bolderfont_12pt"> @DATE_FORMAT_nh (hours) </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder lato_bolderfont_12pt"> @DATE_FORMAT_nm (minutes) </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder lato_bolderfont_12pt"> @DATE_FORMAT_nd (days) </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder lato_bolderfont_12pt"> @DATE_FORMAT_ns (seconds) </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder lato_bolderfont_12pt"> @DATE_FORMAT_nM (month) </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder lato_bolderfont_12pt"> @DATE_FORMAT_nY (years) </li> </ol> diff --git a/pandora_console/include/help/en/help_profile.php b/pandora_console/include/help/en/help_profile.php index 75a779cb2e..99b29bd6f0 100644 --- a/pandora_console/include/help/en/help_profile.php +++ b/pandora_console/include/help/en/help_profile.php @@ -10,8 +10,8 @@ <p>The following list defines what ACL control allows in each feature at the console:</p> -<table cellpadding=4 cellspacing=0 style='background-color: #f0f0f0;'> -<tr><th style='background-color: #cacaca'>Feature<th style='background-color: #cacaca'>ACL Control +<table cellpadding=4 cellspacing=0 class='gb_f0'> +<tr><th class='bg_caca'>Feature<th class='bg_caca'>ACL Control <tr><td>View the agent's data (all tabs)<td>AR <tr><td>Tactical View<td>AR diff --git a/pandora_console/include/help/en/help_visual_console_editor_editor_tab.php b/pandora_console/include/help/en/help_visual_console_editor_editor_tab.php index 73a691102b..d0fa1013da 100644 --- a/pandora_console/include/help/en/help_visual_console_editor_editor_tab.php +++ b/pandora_console/include/help/en/help_visual_console_editor_editor_tab.php @@ -12,7 +12,7 @@ edit and place them. It is a dynamic page, so it will be necessary that your browser support correctly the javascript languaje. As you can see in the screen shot, the screen is divided in two areas that are well defined: -<ul style="list-style-type: disc; margin-left: 20px;"> +<ul class="list-type-disc mrgn_lft_20px"> <li>the button box</li> <li>the work area (where you will "draw" the visual console)</li> <li>the option palette ( that is not visible in this screen shot)</li> diff --git a/pandora_console/include/help/en/help_wux_console.php b/pandora_console/include/help/en/help_wux_console.php index 8404a1a3c1..5b3cc70fdf 100644 --- a/pandora_console/include/help/en/help_wux_console.php +++ b/pandora_console/include/help/en/help_wux_console.php @@ -17,17 +17,17 @@ </p> <p> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <b class="lato_bolder font_12pt"> Para realizar la grabación de una navegación con PWR necesitaremos: </b> </p> <ol> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> Navegador web Firefox versión 47.0.1 (descargable en: <a rel="nofollow" class="external free" href="https://ftp.mozilla.org/pub/firefox/releases/47.0.1/">https://ftp.mozilla.org/pub/firefox/releases/47.0.1/</a>). .</li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> Extensión Selenium IDE (descargable en: <a rel="nofollow" class="external free" href="https://addons.mozilla.org/es/firefox/addon/selenium-ide/">https://addons.mozilla.org/es/firefox/addon/selenium-ide/</a>). </li> @@ -37,7 +37,7 @@ Para instalar correctamente la versión 47.0.1 de Firefox hay que descargarla desde la URL proporcionada anteriormente. En sistemas Windows habrá que añadir el ejecutable al PATH del sistema. </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux6.JPG', false, ['style' => 'width: 90%;']); ?> @@ -47,13 +47,13 @@ Una vez descargado mostraremos el icono del entorno de grabación mediante las opciones de personalización de Firefox: </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux7.JPG', false, ['style' => 'width:295px;']); ?> </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux9.JPG', false, ['style' => 'width: 90%;']); ?> @@ -63,7 +63,7 @@ Una vez colocado el acceso iniciamos el grabador: </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux10.JPG', false, ['style' => 'width: 90%;']); ?> @@ -77,7 +77,7 @@ Para detener la grabación utilizaremos el siguiente botón, situado en la parte superior derecha del grabador: </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux11.JPG', false, ['style' => 'width:33px;']); ?> @@ -87,7 +87,7 @@ Una vez completadas las acciones, podemos realizar comprobaciones sobre la página, por ejemplo verificar la existencia de un texto determinado para asegurarnos de que la página cargada es la correcta. Para ello haremos click derecho sobre una sección de texto en la ventana del navegador mientras continuamos grabando, y seleccionamos la opción <i>verifyText</i>: </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux13.JPG', false, ['style' => 'width:90%;']); ?> @@ -97,7 +97,7 @@ Aparecerá un nuevo paso en el grabador indicando la acción de comprobación de texto indicada: </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux14.JPG', false, ['style' => 'width:90%;']); ?> @@ -107,7 +107,7 @@ Podemos reproducir la secuencia completa mediante el botón <i>Play entire test suite</i> y comprobar que finaliza correctamente: </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux15.JPG', false, ['style' => 'width:90%;']); ?> @@ -127,7 +127,7 @@ Para insertar un nuevo punto de control y generar los módulos de fase (hasta ese punto) haga clic derecho en el punto donde desea identificar el comienzo de fase. </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux16.JPG', false, ['style' => 'width:436;']); ?> @@ -165,7 +165,7 @@ Cada módulo de tipo análisis web, generará una serie de sub-módulos, estos pueden visualizarse de manera más clara pulsando "mostar en modo jeráquico". </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/WUX_v1.png', false, ['style' => 'width:90%;']); ?> @@ -175,7 +175,7 @@ En la vista de árbol los elementos apararecen directamente jerarquizados, simplificando la vista. </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/WUX_v2.png', false, ['style' => 'width:90%;']); ?> @@ -189,7 +189,7 @@ <b><u>Nota</u>:</b> Si hemos definido fases en nuestra sesión de navegación, se mostrarán en esta vista de una forma sencilla y clara (ver apartado de grabación <i>sesión transaccional con <?php echo get_product_name(); ?> WUX PWR)</i>. </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/WUX_v3.png', false, ['style' => 'width:90%;']); ?> @@ -199,40 +199,40 @@ <p> Muestra el estado general de nuestra transacción: </p> -<ol style="font-family: 'lato-bolder'; font-size: 12pt;"> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> +<ol class="lato_bolder font_12pt"> + <li class="lato_bolder font_12pt"> Esta puede tener tres estados: - <ol style="font-family: 'lato-bolder'; font-size: 12pt;"> + <ol class="lato_bolder font_12pt"> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <i style="font-family: 'lato-bolder'; font-size: 12pt;">Correcto:</i> Cuando todas las fases de la transacción sean correctas. + <li class="lato_bolder font_12pt"> + <i class="lato_bolder font_12pt">Correcto:</i> Cuando todas las fases de la transacción sean correctas. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <i style="font-family: 'lato-bolder'; font-size: 12pt;">Incorrecto:</i> Si alguna de las fases de la transacción ha fallado. En ese caso, se mostrara una icono de una lupa que enlaza a la captura de pantalla del punto de la sesión de navegación en que se ha producido el fallo. + <li class="lato_bolder font_12pt"> + <i class="lato_bolder font_12pt">Incorrecto:</i> Si alguna de las fases de la transacción ha fallado. En ese caso, se mostrara una icono de una lupa que enlaza a la captura de pantalla del punto de la sesión de navegación en que se ha producido el fallo. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <i style="font-family: 'lato-bolder'; font-size: 12pt;">Desconocido:</i> Si el servidor encuentra problemas para procesar la sesión o hay fallos de configuración. + <li class="lato_bolder font_12pt"> + <i class="lato_bolder font_12pt">Desconocido:</i> Si el servidor encuentra problemas para procesar la sesión o hay fallos de configuración. </li> </ol> </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> Muestra el tiempo transcurrido desde la última ejecución de la sesión de navegación. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> Muestra el tiempo total que ha tardado en realizarse dicha sesión de navegación, independientemente de su estado. </li> </ol> <h4>Sección Resultados de la ejecución de la transacción:</h4> -<ol style="font-family: 'lato-bolder'; font-size: 12pt;"> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> +<ol class="lato_bolder font_12pt"> + <li class="lato_bolder font_12pt"> Muestra el estado y el tiempo empleado en ejecutar la sesión de navegación. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> En caso de fallo, se mostrará el icono que enlaza con la captura del momento del error. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> Si hemos definido fases en nuestra sesión, entonces se mostrará el estado de cada una de las fases, asi como el tiempo que tarda en realizarse cada una de ellas y su contribución al tiempo global. </li> </ol> @@ -242,50 +242,50 @@ </p> <p> - Gráfica de estadisticas aparecera siempre y cuando hayamos especificado en la creación del módulo, la opción <i style="font-family: 'lato-bolder'; font-size: 12pt;">ejecutar pruebas de rendimiento</i> <b style="font-family: 'lato-bolder'; font-size: 12pt;">y se ha definido un objetivo para las mismas</b> (campo <i style="font-family: 'lato-bolder'; font-size: 12pt;">sitio web objetivo</i>). + Gráfica de estadisticas aparecera siempre y cuando hayamos especificado en la creación del módulo, la opción <i class="lato_bolder font_12pt">ejecutar pruebas de rendimiento</i> <b class="lato_bolder font_12pt">y se ha definido un objetivo para las mismas</b> (campo <i class="lato_bolder font_12pt">sitio web objetivo</i>). </p> <p> Las estadísticas a mostrar son: </p> <ol> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TT: </b> Tiempo total en obtener el sitio web. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TDNS: </b> Tiempo total en resolver la dirección IP del objetivo. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TTCP: </b> Tiempo empleado en conectar vía TCP. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TSSL: </b> Tiempo empleado en establecer comunicación SSL. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TST : </b> Tiempo hasta que inició la transferencia de datos. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TTC : </b> Tiempo transfiriendo datos, agrupará todos los tiempos de transferencia de recursos. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TTR : </b> Tiempo empleado en transferir el recurso X, agrupando todas las imágenes en “image”. @@ -295,10 +295,10 @@ <h4>Historial de trasacción:</h4> <ol> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> Muestra el histórico de las ejecuciones de la sesión de navegación web. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> En el caso de haber ejecuciones fallidas, se mostrará un enlace donde consultar la imagen del error. </li> </ol> \ No newline at end of file diff --git a/pandora_console/include/help/es/help_agent_status.php b/pandora_console/include/help/es/help_agent_status.php index d999cad8ff..b2da00136d 100644 --- a/pandora_console/include/help/es/help_agent_status.php +++ b/pandora_console/include/help/es/help_agent_status.php @@ -21,7 +21,7 @@ Los valores posibles del <b>estado de un agente </b> son: <br><br> -<table width="750px" style="display:inline"> +<table width="750px" class="inline_line"> <tr> <td class="f9i"><?php html_print_image('images/status_sets/default/module_critical.png', false, ['title' => 'At least one monitor fails', 'alt' => 'At least one monitor fails']); ?><?php html_print_image('images/status_sets/faces/module_critical.png', false, ['title' => 'At least one monitor fails', 'alt' => 'At least one monitor fails']); ?></td><td>Al menos un monitor falla</td> <td class="f9i"><?php html_print_image('images/status_sets/default/module_warning.png', false, ['title' => 'Change between Green/Red state', 'alt' => 'Change between Green/Red state']); ?><?php html_print_image('images/status_sets/faces/module_warning.png', false, ['title' => 'Change between Green/Red state', 'alt' => 'Change between Green/Red state']); ?></td><td>Cambia entre el estado Verde/Rojo</td> diff --git a/pandora_console/include/help/es/help_cascade_protection.php b/pandora_console/include/help/es/help_cascade_protection.php index 60e1da2d1b..19a3d74735 100644 --- a/pandora_console/include/help/es/help_cascade_protection.php +++ b/pandora_console/include/help/es/help_cascade_protection.php @@ -1,9 +1,9 @@ -<h1 style='text-align:center;'>Protección en Cascada</h1> +<h1 class='center'>Protección en Cascada</h1> <br> <h2>Protección en cascada por agente</h2> <hr> -<div style='text-align:center;'> +<div class='center'> <?php html_print_image('images/help/cascade_protection_agent.png', false); ?> </div> <br> @@ -18,7 +18,7 @@ Si quiere usar un sistema avanzado de protección en cascada, sólo tiene que us <h2>Protección en cascada por módulo</h2> <hr> -<div style='text-align:center;'> +<div class='center'> <?php html_print_image('images/help/cascade_protection_module.png', false); ?> </div> <br> diff --git a/pandora_console/include/help/es/help_configure_gis_map.php b/pandora_console/include/help/es/help_configure_gis_map.php index 5e024f9285..780dc6d87c 100644 --- a/pandora_console/include/help/es/help_configure_gis_map.php +++ b/pandora_console/include/help/es/help_configure_gis_map.php @@ -51,12 +51,12 @@ Una vez hecha la selección de la conexión (o conexiones), existe la posibilida <h2>Configuración de capas</h2> <p> -Cada mapa tiene una o más capas <sup><span style="font-size:75%">1</span></sup> para mostrar los agentes. Cada capa puede mostrar los agentes de un +Cada mapa tiene una o más capas <sup><span class="font_75p">1</span></sup> para mostrar los agentes. Cada capa puede mostrar los agentes de un <strong>grupo</strong> y/o una <strong>lista de agentes</strong>. De este modo resulta sencillo fijar los agentes que se mostrarán en cada nivel. </p> <hr/> -<sup><span style="font-size:75%;">1</span></sup> <span style="font-size:85%;">El mapa por defecto puede tener 0 capas y será el utilizado en la vista GIS del agente y sólo usa una capa con el nombre del agente.</span> +<sup><span class="font_75p">1</span></sup> <span class="font_85p">El mapa por defecto puede tener 0 capas y será el utilizado en la vista GIS del agente y sólo usa una capa con el nombre del agente.</span> diff --git a/pandora_console/include/help/es/help_cron.php b/pandora_console/include/help/es/help_cron.php index 33e9c84cff..67351559a2 100644 --- a/pandora_console/include/help/es/help_cron.php +++ b/pandora_console/include/help/es/help_cron.php @@ -8,7 +8,7 @@ Mediante los grupos de parámetros de configuración <b>Cron desde</b> y <b>Cron hasta</b> se puede hacer que un módulo solo se ejecute durante ciertos periodos de tiempo. El modo en el que se configura es parecido a la sintaxis de -<a style="font-size:14px;" href="https://es.wikipedia.org/wiki/Cron_(Unix)">cron</a>. +<a class="font_14px" href="https://es.wikipedia.org/wiki/Cron_(Unix)">cron</a>. Tal y como aparecen en la consola de <?php echo get_product_name(); ?>, cada uno de los parámetros tiene tres opciones. diff --git a/pandora_console/include/help/es/help_eventview.php b/pandora_console/include/help/es/help_eventview.php index b6cd9d0173..3f422aa1e0 100644 --- a/pandora_console/include/help/es/help_eventview.php +++ b/pandora_console/include/help/es/help_eventview.php @@ -8,16 +8,13 @@ <br> <br> -<div style="padding-left: 30px; width: 150px; float: left; line-height: 17px;"> +<div class="pdd_l_30px w150px float-left line_17px"> <h3>Validar</h3> <?php html_print_image('images/tick.png', false, ['title' => 'Validated event', 'alt' => 'Validated event', 'width' => '10', 'height' => '10']); ?> - Validar evento<br> - <?php - // html_print_image("images/cross.png", false, array("title" => "Event not validated", "alt" => "Event not validated", "width" => '10', "height" => '10')); - ?> - <div style="width: 10px;height: 10px; display: inline-block;"></div> - Evento no validado + <div class="w10px height_10px inline"></div> - Evento no validado </div> -<div style="padding-left: 30px; width: 150px; float: left; line-height: 17px;"> +<div class="pdd_l_30px w150px float-left line_17px"> <h3>Severidad</h3> <?php html_print_image('images/status_sets/default/severity_maintenance.png', false, ['title' => 'Maintenance event', 'alt' => 'Maintenance event']); ?> - Evento de mantenimiento<br> <?php html_print_image('images/status_sets/default/severity_informational.png', false, ['title' => 'Informational event', 'alt' => 'Informational event']); ?> - Evento informativo<br> @@ -26,7 +23,7 @@ <?php html_print_image('images/status_sets/default/severity_critical.png', false, ['title' => 'Critical event', 'alt' => 'Critical event']); ?> - Evento crítico<br> </div> -<div style="padding-left: 30px; width: 150px; float: left; line-height: 17px;"> +<div class="pdd_l_30px w150px float-left line_17px"> <h3>Acciones</h3> <?php html_print_image('images/ok.png', false, ['title' => 'Validate event', 'alt' => 'Validate event']); ?> - Validar evento<br> <?php html_print_image('images/cross.png', false, ['title' => 'Delete event', 'alt' => 'Delete event']); ?> - Borrar evento<br> @@ -34,4 +31,4 @@ <?php html_print_image('images/hourglass.png', false, ['title' => 'En progreso', 'alt' => 'En progreso']); ?> - En progreso </div> -<div style="clear: both;"> </div> +<div class="both"> </div> diff --git a/pandora_console/include/help/es/help_ipam.php b/pandora_console/include/help/es/help_ipam.php index f312b6ec25..c5d2a4d248 100755 --- a/pandora_console/include/help/es/help_ipam.php +++ b/pandora_console/include/help/es/help_ipam.php @@ -31,23 +31,23 @@ Cada dirección tendrá un icono grande que nos aportará información:<br><br> </tr> <tr> <td>Sin agente asignado<br><br>Eventos desactivados</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/red_host.png"></td> +<td class="center"><img src="../enterprise/images/ipam/green_host.png"></td> +<td class="center"><img src="../enterprise/images/ipam/red_host.png"></td> </tr> <tr> <td>Con agente asignado<br><br>Eventos desactivados</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_agent.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_agent.png"></td> +<td class="center"><img src="../enterprise/images/ipam/green_host_agent.png"></td> +<td class="center"><img src="../enterprise/images/ipam/red_host_agent.png"></td> </tr> <tr> <td>Sin agente asignado<br><br>Eventos activados</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_alert.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_alert.png"></td> +<td class="center"><img src="../enterprise/images/ipam/green_host_alert.png"></td> +<td class="center"><img src="../enterprise/images/ipam/red_host_alert.png"></td> </tr> <tr> <td>Con agente asignado<br><br>Eventos activados</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_agent_alert.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_agent_alert.png"></td> +<td class="center"><img src="../enterprise/images/ipam/green_host_agent_alert.png"></td> +<td class="center"><img src="../enterprise/images/ipam/red_host_agent_alert.png"></td> </tr> <tr> <th colspan=3>Sin administrar</th> @@ -58,9 +58,9 @@ Cada dirección tendrá un icono grande que nos aportará información:<br><br> <th>Host no responde</th> </tr> <tr> -<td style="width: 100px;">Independientemente de la configuración, si el host no está administrado solo se diferenciará entre si está vivo y no responde</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_dotted.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/not_host.png"></td> +<td class="w100px">Independientemente de la configuración, si el host no está administrado solo se diferenciará entre si está vivo y no responde</td> +<td class="center"><img src="../enterprise/images/ipam/green_host_dotted.png"></td> +<td class="center"><img src="../enterprise/images/ipam/not_host.png"></td> </tr> <tr> <th colspan=3>No asignado</th> @@ -71,7 +71,7 @@ Cada dirección tendrá un icono grande que nos aportará información:<br><br> </table> <br><br> Cada dirección tendrá en la parte inferior derecha un enlace para editarla, si disponemos de privilegios suficientes. Así mismo, en la parte inferior izquierda, tendrá un pequeño icono indicando el sistema operativo asociado. -En el caso de las direcciones desactivadas, el icono del sistema operativo se verá sustituido por el siguiente icono:<br><br><img src="../images/delete.png" style="width:18px;"><br><br> +En el caso de las direcciones desactivadas, el icono del sistema operativo se verá sustituido por el siguiente icono:<br><br><img src="../images/delete.png" class="w18px"><br><br> Si hacemos click en el icono principal, se abrirá una ventana modal con toda la información de la IP, incluyendo agente y sistema operativo asociados, configuración y el seguimiento de cuando se creó, editó por el usuario o fue chequeado por el servidor por última vez. En esta vista también se podrá hacer un ping a dicha dirección*.<br><br> <b>* El ping se realiza desde la máquina donde esté instalada la consola de <?php echo get_product_name(); ?>.</b> @@ -86,11 +86,11 @@ Algunos campos, se rellenan automáticamente por el script de reconocimiento, co <th colspan=2>Cambio entre manual y automático</th> </tr> <tr> -<td style="text-align:center; width: 25px;"><img src="../images/manual.png"></td> +<td class="tcenter w25px"><img src="../images/manual.png"></td> <td><b>Modo manual</b>: Con este símbolo el campo no se actualizará desde el script de reconocimiento y podremos editarlo a mano. Al hacer click cambiaremos a modo automático.</td> </tr> <tr> -<td style="text-align:center; width: 25px;"><img src="../images/automatic.png"></td> +<td class="center w25px"><img src="../images/automatic.png"></td> <td><b>Modo automático</b>:Con este símbolo el campo se actualizará desde el script de reconocimiento. Al hacer click cambiaremos a modo manual.</td> </tr> </table> diff --git a/pandora_console/include/help/es/help_module_macros.php b/pandora_console/include/help/es/help_module_macros.php index d546fc09c4..36d899c5ff 100644 --- a/pandora_console/include/help/es/help_module_macros.php +++ b/pandora_console/include/help/es/help_module_macros.php @@ -16,13 +16,13 @@ </p> <ol> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> _technology_ </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> _modulepriority_ </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> _contactperson_ </li> </ol> @@ -37,25 +37,25 @@ Las macros dinámicas tendrán un formato especial que empieza por @ y tendrán estas posibles sustituciones: </p> <ol> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> @DATE_FORMAT (fecha/hora actual con formato definido por el usuario) </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> @DATE_FORMAT_nh (horas) </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> @DATE_FORMAT_nm (minutos) </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> @DATE_FORMAT_nd (días) </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> @DATE_FORMAT_ns (segundos) </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> @DATE_FORMAT_nM (mes) </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> @DATE_FORMAT_nY (años) </li> </ol> diff --git a/pandora_console/include/help/es/help_profile.php b/pandora_console/include/help/es/help_profile.php index 1cdea0d09a..a654cf813f 100644 --- a/pandora_console/include/help/es/help_profile.php +++ b/pandora_console/include/help/es/help_profile.php @@ -13,8 +13,8 @@ <br> -<table cellpadding=4 cellspacing=0 style='background-color: #f0f0f0;'> -<tr><th style='background-color: #cacaca'>Operación<th style='background-color: #cacaca'>Bit de acceso +<table cellpadding=4 cellspacing=0 class='bg_f0'> +<tr><th class='bg_caca'>Operación<th class='bg_caca'>Bit de acceso <tr><td>Ver datos agente (todas las vistas) <td>AR <tr><td>Vista táctica <td>AR diff --git a/pandora_console/include/help/es/help_wux_console.php b/pandora_console/include/help/es/help_wux_console.php index 8404a1a3c1..5b3cc70fdf 100644 --- a/pandora_console/include/help/es/help_wux_console.php +++ b/pandora_console/include/help/es/help_wux_console.php @@ -17,17 +17,17 @@ </p> <p> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <b class="lato_bolder font_12pt"> Para realizar la grabación de una navegación con PWR necesitaremos: </b> </p> <ol> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> Navegador web Firefox versión 47.0.1 (descargable en: <a rel="nofollow" class="external free" href="https://ftp.mozilla.org/pub/firefox/releases/47.0.1/">https://ftp.mozilla.org/pub/firefox/releases/47.0.1/</a>). .</li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> Extensión Selenium IDE (descargable en: <a rel="nofollow" class="external free" href="https://addons.mozilla.org/es/firefox/addon/selenium-ide/">https://addons.mozilla.org/es/firefox/addon/selenium-ide/</a>). </li> @@ -37,7 +37,7 @@ Para instalar correctamente la versión 47.0.1 de Firefox hay que descargarla desde la URL proporcionada anteriormente. En sistemas Windows habrá que añadir el ejecutable al PATH del sistema. </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux6.JPG', false, ['style' => 'width: 90%;']); ?> @@ -47,13 +47,13 @@ Una vez descargado mostraremos el icono del entorno de grabación mediante las opciones de personalización de Firefox: </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux7.JPG', false, ['style' => 'width:295px;']); ?> </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux9.JPG', false, ['style' => 'width: 90%;']); ?> @@ -63,7 +63,7 @@ Una vez colocado el acceso iniciamos el grabador: </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux10.JPG', false, ['style' => 'width: 90%;']); ?> @@ -77,7 +77,7 @@ Para detener la grabación utilizaremos el siguiente botón, situado en la parte superior derecha del grabador: </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux11.JPG', false, ['style' => 'width:33px;']); ?> @@ -87,7 +87,7 @@ Una vez completadas las acciones, podemos realizar comprobaciones sobre la página, por ejemplo verificar la existencia de un texto determinado para asegurarnos de que la página cargada es la correcta. Para ello haremos click derecho sobre una sección de texto en la ventana del navegador mientras continuamos grabando, y seleccionamos la opción <i>verifyText</i>: </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux13.JPG', false, ['style' => 'width:90%;']); ?> @@ -97,7 +97,7 @@ Aparecerá un nuevo paso en el grabador indicando la acción de comprobación de texto indicada: </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux14.JPG', false, ['style' => 'width:90%;']); ?> @@ -107,7 +107,7 @@ Podemos reproducir la secuencia completa mediante el botón <i>Play entire test suite</i> y comprobar que finaliza correctamente: </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux15.JPG', false, ['style' => 'width:90%;']); ?> @@ -127,7 +127,7 @@ Para insertar un nuevo punto de control y generar los módulos de fase (hasta ese punto) haga clic derecho en el punto donde desea identificar el comienzo de fase. </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/Ux16.JPG', false, ['style' => 'width:436;']); ?> @@ -165,7 +165,7 @@ Cada módulo de tipo análisis web, generará una serie de sub-módulos, estos pueden visualizarse de manera más clara pulsando "mostar en modo jeráquico". </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/WUX_v1.png', false, ['style' => 'width:90%;']); ?> @@ -175,7 +175,7 @@ En la vista de árbol los elementos apararecen directamente jerarquizados, simplificando la vista. </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/WUX_v2.png', false, ['style' => 'width:90%;']); ?> @@ -189,7 +189,7 @@ <b><u>Nota</u>:</b> Si hemos definido fases en nuestra sesión de navegación, se mostrarán en esta vista de una forma sencilla y clara (ver apartado de grabación <i>sesión transaccional con <?php echo get_product_name(); ?> WUX PWR)</i>. </p> -<p style="text-align: center"> +<p class="center"> <?php html_print_image('images/help/WUX_v3.png', false, ['style' => 'width:90%;']); ?> @@ -199,40 +199,40 @@ <p> Muestra el estado general de nuestra transacción: </p> -<ol style="font-family: 'lato-bolder'; font-size: 12pt;"> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> +<ol class="lato_bolder font_12pt"> + <li class="lato_bolder font_12pt"> Esta puede tener tres estados: - <ol style="font-family: 'lato-bolder'; font-size: 12pt;"> + <ol class="lato_bolder font_12pt"> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <i style="font-family: 'lato-bolder'; font-size: 12pt;">Correcto:</i> Cuando todas las fases de la transacción sean correctas. + <li class="lato_bolder font_12pt"> + <i class="lato_bolder font_12pt">Correcto:</i> Cuando todas las fases de la transacción sean correctas. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <i style="font-family: 'lato-bolder'; font-size: 12pt;">Incorrecto:</i> Si alguna de las fases de la transacción ha fallado. En ese caso, se mostrara una icono de una lupa que enlaza a la captura de pantalla del punto de la sesión de navegación en que se ha producido el fallo. + <li class="lato_bolder font_12pt"> + <i class="lato_bolder font_12pt">Incorrecto:</i> Si alguna de las fases de la transacción ha fallado. En ese caso, se mostrara una icono de una lupa que enlaza a la captura de pantalla del punto de la sesión de navegación en que se ha producido el fallo. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <i style="font-family: 'lato-bolder'; font-size: 12pt;">Desconocido:</i> Si el servidor encuentra problemas para procesar la sesión o hay fallos de configuración. + <li class="lato_bolder font_12pt"> + <i class="lato_bolder font_12pt">Desconocido:</i> Si el servidor encuentra problemas para procesar la sesión o hay fallos de configuración. </li> </ol> </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> Muestra el tiempo transcurrido desde la última ejecución de la sesión de navegación. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> Muestra el tiempo total que ha tardado en realizarse dicha sesión de navegación, independientemente de su estado. </li> </ol> <h4>Sección Resultados de la ejecución de la transacción:</h4> -<ol style="font-family: 'lato-bolder'; font-size: 12pt;"> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> +<ol class="lato_bolder font_12pt"> + <li class="lato_bolder font_12pt"> Muestra el estado y el tiempo empleado en ejecutar la sesión de navegación. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> En caso de fallo, se mostrará el icono que enlaza con la captura del momento del error. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> Si hemos definido fases en nuestra sesión, entonces se mostrará el estado de cada una de las fases, asi como el tiempo que tarda en realizarse cada una de ellas y su contribución al tiempo global. </li> </ol> @@ -242,50 +242,50 @@ </p> <p> - Gráfica de estadisticas aparecera siempre y cuando hayamos especificado en la creación del módulo, la opción <i style="font-family: 'lato-bolder'; font-size: 12pt;">ejecutar pruebas de rendimiento</i> <b style="font-family: 'lato-bolder'; font-size: 12pt;">y se ha definido un objetivo para las mismas</b> (campo <i style="font-family: 'lato-bolder'; font-size: 12pt;">sitio web objetivo</i>). + Gráfica de estadisticas aparecera siempre y cuando hayamos especificado en la creación del módulo, la opción <i class="lato_bolder font_12pt">ejecutar pruebas de rendimiento</i> <b class="lato_bolder font_12pt">y se ha definido un objetivo para las mismas</b> (campo <i class="lato_bolder font_12pt">sitio web objetivo</i>). </p> <p> Las estadísticas a mostrar son: </p> <ol> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TT: </b> Tiempo total en obtener el sitio web. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TDNS: </b> Tiempo total en resolver la dirección IP del objetivo. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TTCP: </b> Tiempo empleado en conectar vía TCP. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TSSL: </b> Tiempo empleado en establecer comunicación SSL. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TST : </b> Tiempo hasta que inició la transferencia de datos. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TTC : </b> Tiempo transfiriendo datos, agrupará todos los tiempos de transferencia de recursos. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> - <b style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> + <b class="lato_bolder font_12pt"> Stats_TTR : </b> Tiempo empleado en transferir el recurso X, agrupando todas las imágenes en “image”. @@ -295,10 +295,10 @@ <h4>Historial de trasacción:</h4> <ol> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> Muestra el histórico de las ejecuciones de la sesión de navegación web. </li> - <li style="font-family: 'lato-bolder'; font-size: 12pt;"> + <li class="lato_bolder font_12pt"> En el caso de haber ejecuciones fallidas, se mostrará un enlace donde consultar la imagen del error. </li> </ol> \ No newline at end of file diff --git a/pandora_console/include/help/ja/help_ad_advanced_permision.php b/pandora_console/include/help/ja/help_ad_advanced_permision.php index 3aaa141099..d6ebc381ab 100644 --- a/pandora_console/include/help/ja/help_ad_advanced_permision.php +++ b/pandora_console/include/help/ja/help_ad_advanced_permision.php @@ -7,7 +7,7 @@ <br><br> -<table width="750px" style="display:inline"> +<table width="750px" class="inline_line"> <tr> <td class=""> 新たなパーミッションを追加する場合、次のようにテキストを追加する必要があります。 <nav> diff --git a/pandora_console/include/help/ja/help_agent_status.php b/pandora_console/include/help/ja/help_agent_status.php index 37e99ce4aa..495ff5c24a 100644 --- a/pandora_console/include/help/ja/help_agent_status.php +++ b/pandora_console/include/help/ja/help_agent_status.php @@ -9,7 +9,7 @@ <br><br> -<table width="750px" style="display:inline"><tr> +<table width="750px" class="inline_line"><tr> <td class="f9i"><?php html_print_image('images/status_sets/default/agent_ok.png', false, ['title' => 'すべての監視項目が正常', 'alt' => 'すべての監視項目が正常']); ?></td><td>すべての監視項目が正常</td> <td class="f9i"><?php html_print_image('images/status_sets/default/module_critical.png', false, ['title' => '1つ以上の監視項目で障害', 'alt' => '1つ以上の監視項目で障害']); ?></td><td>1つ以上の監視項目で障害</td> <td class="f9i"><?php html_print_image('images/status_sets/default/module_warning.png', false, ['title' => '緑/赤 の状態変化発生', 'alt' => '緑/赤 の状態変化発生']); ?></td><td>緑/赤 の状態変化発生</td> diff --git a/pandora_console/include/help/ja/help_cascade_protection.php b/pandora_console/include/help/ja/help_cascade_protection.php index 70ab52576d..d83289afb4 100644 --- a/pandora_console/include/help/ja/help_cascade_protection.php +++ b/pandora_console/include/help/ja/help_cascade_protection.php @@ -1,9 +1,9 @@ -<h1 style='text-align:center;'>関連障害検知抑制</h1> +<h1 class='center'>関連障害検知抑制</h1> <br> <h2>エージェント関連障害検知抑制</h2> <hr> -<div style='text-align:center;'> +<div class='center'> <?php html_print_image('images/help/cascade_protection_agent.png', false); ?> </div> <br> @@ -22,7 +22,7 @@ <h2>モジュール関連障害検知抑制</h2> <hr> -<div style='text-align:center;'> +<div class='center'> <?php html_print_image('images/help/cascade_protection_module.png', false); ?> <br> </div> diff --git a/pandora_console/include/help/ja/help_configure_gis_map.php b/pandora_console/include/help/ja/help_configure_gis_map.php index 431390e448..b995e2e79f 100644 --- a/pandora_console/include/help/ja/help_configure_gis_map.php +++ b/pandora_console/include/help/ja/help_configure_gis_map.php @@ -50,7 +50,7 @@ GIS マップを設定するためには、少なくとも一つ選択されて </div> <h2>レイヤ設定</h2> <p> -それぞれのマップはエージェントを表示するための一つ以上のレイヤ<sup><span style="font-size:75%">1</span></sup>を持っています。 +それぞれのマップはエージェントを表示するための一つ以上のレイヤ<sup><span class="font_75p">1</span></sup>を持っています。 それぞれのレイヤは、エージェントの<strong>グループ</strong>や<strong>エージェント一覧</strong>を表示することができます。 これは、それぞれのレイヤに表示するエージェントを設定するのに便利です。 </p> @@ -60,4 +60,4 @@ GIS マップを設定するためには、少なくとも一つ選択されて ここでは、再度、<strong>順番の変更</strong> (<?php html_print_image('images/up.png', false, ['alt' => 'move up icon']); ?>、<?php html_print_image('images/down.png', false, ['alt' => 'move down icon']); ?>)、<strong>削除</strong> (<?php html_print_image('images/cross.png', false, ['alt' => 'delete icon']); ?>)、<strong>編集</strong> (<?php html_print_image('images/config.png', false, ['alt' => 'edit icon']); ?>) ができます。 </p> <hr/> -<sup><span style="font-size:75%;">1</span></sup> <span style="font-size:85%;">デフォルトマップでは、エージェント名で一つのレイヤしか表示しない場合は、レイヤを持たない設定も可能です。</span> +<sup><span class="font_75p">1</span></sup> <span class="font_85p">デフォルトマップでは、エージェント名で一つのレイヤしか表示しない場合は、レイヤを持たない設定も可能です。</span> diff --git a/pandora_console/include/help/ja/help_context_module_unknow.php b/pandora_console/include/help/ja/help_context_module_unknow.php index addaa36919..3869b9f54b 100644 --- a/pandora_console/include/help/ja/help_context_module_unknow.php +++ b/pandora_console/include/help/ja/help_context_module_unknow.php @@ -10,7 +10,7 @@ <p> 不明モジュールの発生にはいくつかのケースがあります。 </p> -<ul style="list-style-type: disc; margin-left: 30px;"> +<ul class="list-type-disc mrgn_lft_30px"> <li><?php echo get_product_name(); ?> サーバがダウンしている場合。それを再起動してくください。なぜダウンしたかを確認するために /var/log/pandora/pandora_server.log をチェックするのを忘れないようにしてください。</li> <li>tentacle サーバがダウンしている場合で、リモートサーバにインストールしている <?php echo get_product_name(); ?> からデータを取得できない場合。</li> <li>エージェントとサーバの間でネットワークの問題が発生している場合。</li> diff --git a/pandora_console/include/help/ja/help_cron.php b/pandora_console/include/help/ja/help_cron.php index af825b9383..f57141ada2 100644 --- a/pandora_console/include/help/ja/help_cron.php +++ b/pandora_console/include/help/ja/help_cron.php @@ -6,7 +6,7 @@ <h1>サーバモジュールの cron</h1> 設定パラメータ <b>Cron from</b> および <b>Cron to</b> を用いることにより、特定の時間にのみモジュールを実行するようにできます。 -設定のための書式は、<a style="font-size:14px;" href="https://en.wikipedia.org/wiki/Cron">cron</a> に似ています。 +設定のための書式は、<a class="font_14px" href="https://en.wikipedia.org/wiki/Cron">cron</a> に似ています。 <?php echo get_product_name(); ?> コンソールに表示され、それぞれのパラメータには 3つのオプションがあります。 <h4>Cron from: any</h4> diff --git a/pandora_console/include/help/ja/help_eventview.php b/pandora_console/include/help/ja/help_eventview.php index 248c6a1849..6246b12f79 100644 --- a/pandora_console/include/help/ja/help_eventview.php +++ b/pandora_console/include/help/ja/help_eventview.php @@ -8,13 +8,13 @@ <br> <br> -<div style="padding-left: 30px; width: 150px; float: left; line-height: 17px;"> +<div class="pdd_l_30px w150px float-left line_17px"> <h3>承諾</h3> <?php html_print_image('images/tick.png', false, ['title' => '承諾済', 'alt' => '承諾済', 'width' => '10', 'height' => '10']); ?> - 承諾済<br> <?php html_print_image('images/tick_off.png', false, ['title' => '未承諾', 'alt' => '未承諾', 'width' => '10', 'height' => '10']); ?> - 未承諾 </div> -<div style="padding-left: 30px; width: 150px; float: left; line-height: 17px;"> +<div class="pdd_l_30px w150px float-left line_17px"> <h3>重要度</h3> <?php html_print_image('images/status_sets/default/severity_maintenance.png', false, ['title' => 'メンテナンス', 'alt' => 'メンテナンス']); ?> - メンテナンス<br> <?php html_print_image('images/status_sets/default/severity_informational.png', false, ['title' => '情報', 'alt' => '情報']); ?> - 情報<br> @@ -23,11 +23,11 @@ <?php html_print_image('images/status_sets/default/severity_critical.png', false, ['title' => '障害', 'alt' => '障害']); ?> - 障害<br> </div> -<div style="padding-left: 30px; width: 150px; float: left; line-height: 17px;"> +<div class="pdd_l_30px w150px float-left line_17px"> <h3>アクション</h3> <?php html_print_image('images/ok.png', false, ['title' => '承諾する', 'alt' => '承諾する']); ?> - 承諾する<br> <?php html_print_image('images/cross.png', false, ['title' => '削除する', 'alt' => '削除する']); ?> - 削除する<br> <?php html_print_image('images/page_lightning.png', false, ['title' => 'インシデントを作成する', 'alt' => 'インシデントを作成する']); ?> - インシデントを作成する </div> -<div style="clear: both;"> </div> +<div class="both"> </div> diff --git a/pandora_console/include/help/ja/help_ipam.php b/pandora_console/include/help/ja/help_ipam.php index 87ffbe9c47..0224b7a49f 100644 --- a/pandora_console/include/help/ja/help_ipam.php +++ b/pandora_console/include/help/ja/help_ipam.php @@ -31,23 +31,23 @@ IP 管理は、<?php echo get_product_name(); ?> エージェントで設定し </tr> <tr> <td>エージェント未割当<br><br>イベント無効</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/red_host.png"></td> +<td class="center"><img src="../enterprise/images/ipam/green_host.png"></td> +<td class="center"><img src="../enterprise/images/ipam/red_host.png"></td> </tr> <tr> <td>エージェント割当済<br><br>イベント無効</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_agent.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_agent.png"></td> +<td class="center"><img src="../enterprise/images/ipam/green_host_agent.png"></td> +<td class="center"><img src="../enterprise/images/ipam/red_host_agent.png"></td> </tr> <tr> <td>エージェント未割当<br><br>イベント有効</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_alert.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_alert.png"></td> +<td class="center"><img src="../enterprise/images/ipam/green_host_alert.png"></td> +<td class="center"><img src="../enterprise/images/ipam/red_host_alert.png"></td> </tr> <tr> <td>エージェント割当済<br><br>イベント有効</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_agent_alert.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_agent_alert.png"></td> +<td class="center"><img src="../enterprise/images/ipam/green_host_agent_alert.png"></td> +<td class="center"><img src="../enterprise/images/ipam/red_host_agent_alert.png"></td> </tr> <tr> <th colspan=3>未管理</th> @@ -58,9 +58,9 @@ IP 管理は、<?php echo get_product_name(); ?> エージェントで設定し <th>非応答ホスト<</th> </tr> <tr> -<td style="width: 100px;">IP アドレスが管理されていない場合、応答があるかどうかだけを見ることができます。</td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_dotted.png"></td> -<td style="text-align:center;"><img src="../enterprise/images/ipam/not_host.png"></td> +<td class="w100px">IP アドレスが管理されていない場合、応答があるかどうかだけを見ることができます。</td> +<td class="center"><img src="../enterprise/images/ipam/green_host_dotted.png"></td> +<td class="center"><img src="../enterprise/images/ipam/not_host.png"></td> </tr> <tr> <th colspan=3>未割当</th> @@ -70,7 +70,7 @@ IP 管理は、<?php echo get_product_name(); ?> エージェントで設定し </tr> </table> <br><br> -それぞれの IP アドレスは、右下にそれを編集する(管理者権限)リンクがあります。左下には、検出した OS を表示する小さいアイコンがあります。無効化アドレスでは OS の代わりに、次のようなアイコンが表示されます。<br><br><img src="../images/delete.png" style="width:18px;"><br><br> +それぞれの IP アドレスは、右下にそれを編集する(管理者権限)リンクがあります。左下には、検出した OS を表示する小さいアイコンがあります。無効化アドレスでは OS の代わりに、次のようなアイコンが表示されます。<br><br><img src="../images/delete.png" class="w18px"><br><br> メインのアイコンをクリックすると、関連づけられたエージェントおよび OS、IP および他の情報の設定、作成日時、最終編集日時、サーバで最後にチェックされ時間を含む、全ての IP 情報を表示するウインドウが開きます。この画面では、手動で IP アドレスが ping に応答するかどうか、リアルタイムのチェックをすることができます。この ping は、自動検出サーバで実行される通常の処理とは違い、コンソールで実行されることに注意してください。 @@ -84,12 +84,12 @@ IP 管理は、<?php echo get_product_name(); ?> エージェントで設定し <th colspan=2>手動と自動の切り替え</th> </tr> <tr> -<td style="text-align:center; width: 25px;"><img src="../images/manual.png"></td> +<td class="center w25px"><img src="../images/manual.png"></td> <td><b>手動モード</b>: この表示の場合、フィールドは自動検出システムで更新されません。手動で編集することができます。クリックすることにより、自動モードに切り替えることができます。 </td> </tr> <tr> -<td style="text-align:center; width: 25px;"><img src="../images/automatic.png"></td> +<td class="center w25px"><img src="../images/automatic.png"></td> <td><b>自動モード</b>:このアイコンの場合、フィールドは自動検出スクリプトで更新されます。クリックすることにより、手動モードに切り替えることができます。</td> </tr> </table diff --git a/pandora_console/include/help/ja/help_profile.php b/pandora_console/include/help/ja/help_profile.php index 0915b51aba..0fe08db691 100644 --- a/pandora_console/include/help/ja/help_profile.php +++ b/pandora_console/include/help/ja/help_profile.php @@ -10,8 +10,8 @@ <p>以下にコンソールでそれぞれの ACL でどのような権限があるかの一覧を示します。</p> -<table cellpadding=4 cellspacing=0 style='background-color: #f0f0f0;'> -<tr><th style='background-color: #cacaca'>機能<th style='background-color: #cacaca'>ACL +<table cellpadding=4 cellspacing=0 class='bg_f0'> +<tr><th class='bg_caca'>機能<th class='bg_caca'>ACL <tr><td>エージェントデータ参照 (全てのタブ)<td>AR <tr><td>概要表示<td>AR diff --git a/pandora_console/include/help/ja/help_visual_console_editor_editor_tab.php b/pandora_console/include/help/ja/help_visual_console_editor_editor_tab.php index 626268c876..fecdde0cb5 100644 --- a/pandora_console/include/help/ja/help_visual_console_editor_editor_tab.php +++ b/pandora_console/include/help/ja/help_visual_console_editor_editor_tab.php @@ -7,7 +7,7 @@ <h1>エディタ</h1> <p>このタブは、ビジュアルコンソールエディタの多くの機能を持っています。ここで、要素を作成、編集、配置できます。これは動的なページで、ブラウザが javascript をサポートしている必要があります。画面ショットで見られるように、画面はボタンのあるボックスと作業領域(ビジュアルコンソールを描画する場所)の 2つに分割されています。 -<ul style="list-style-type: disc; margin-left: 20px;"> +<ul class="list-type-disc mrgn_lft_20px"> <li>ボタンボックス</li> <li>ワークエリア (ここで、ビジュアルコンソールを作成します)</li> <li>オプションパレット (画面ショットでは表示されていません)</li> diff --git a/pandora_console/include/javascript/module_library.js b/pandora_console/include/javascript/module_library.js index 4d5be47f8c..4afbc516b9 100644 --- a/pandora_console/include/javascript/module_library.js +++ b/pandora_console/include/javascript/module_library.js @@ -55,7 +55,7 @@ $(document).ready(function() { // First level list - parents. if (value.parent == 0 && value.count != 0) { first_level += - '<li><a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view&tab=categories&id_cat=' + + '<li><a class="category_link" href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view&tab=categories&id_cat=' + value.id + '">' + value.name + @@ -78,7 +78,7 @@ $(document).ready(function() { if (id_parent == v.parent && v.count != 0) { second_level += "<li>"; //'<li id="child-' + v.id + '" class="parent-' + v.parent + '">'; second_level += - '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view&tab=categories&id_cat=' + + '<a class="category_link" href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view&tab=categories&id_cat=' + v.id + '">'; second_level += v.name + " (" + v.count + ")"; diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index c1b604b4e2..5b935456d6 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -808,8 +808,7 @@ function delete_event(table, id_evento, event_rep, row) { processed += 1; return; } - var message = - "<h4 style = 'text-align: center; color: black;' > Are you sure?</h4> "; + var message = "<h4 style = 'text-align: center;' > Are you sure?</h4> "; confirmDialog({ title: "ATTENTION", message: message, @@ -848,8 +847,7 @@ function execute_delete_event_reponse(table, id_evento, event_rep, row) { // Imported from old files. function execute_event_response(event_list_btn) { - var message = - "<h4 style = 'text-align: center; color: black;' > Are you sure?</h4> "; + var message = "<h4 style = 'text-align: center;' > Are you sure?</h4> "; confirmDialog({ title: "ATTENTION", message: message, diff --git a/pandora_console/include/javascript/pandora_modules.js b/pandora_console/include/javascript/pandora_modules.js index d709a3d959..1a0f2c00a8 100644 --- a/pandora_console/include/javascript/pandora_modules.js +++ b/pandora_console/include/javascript/pandora_modules.js @@ -1173,9 +1173,9 @@ function add_macro() { $("#module_macros").append( '<tr id="module_macros-' + macro_count + - '" class="datos2"><td style=" font-weight: bold; vertical-align: top;" class="datos2">Name</td> \ + '" class="datos2"><td class="datos2 bold_top">Name</td> \ <td style="" class="datos2"><input type="text" name="module_macro_names[]" value="" id="text-module_macro_names[]" size="50" maxlength="60"></td> \ - <td style="font-weight: bold; vertical-align: top;" class="datos2">Value</td> \ + <td class="datos2 bold_top">Value</td> \ <td style="" class="datos2"><input type="text" name="module_macro_values[]" value="" id="text-module_macro_values[]" size="50" maxlength="60"></td> \ <td style="" class="datos2"><a href="javascript: delete_macro(' + macro_count + diff --git a/pandora_console/include/javascript/pandora_ui.js b/pandora_console/include/javascript/pandora_ui.js index 880fd77b99..bdcdcc98d8 100644 --- a/pandora_console/include/javascript/pandora_ui.js +++ b/pandora_console/include/javascript/pandora_ui.js @@ -440,6 +440,7 @@ function confirmDialog(settings) { modal: true, buttons: [ { + id: "cancel_btn_dialog", text: "Cancel", class: "ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel", diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js index ee8de7a5d9..f8e54dd136 100644 --- a/pandora_console/include/javascript/tree/TreeController.js +++ b/pandora_console/include/javascript/tree/TreeController.js @@ -502,7 +502,7 @@ var TreeController = { var $content = $("<div></div>"); // Leaf icon - $leafIcon.addClass("leaf-icon"); + $leafIcon.addClass("leaf-icon invert_filter"); // Content $content.addClass("node-content"); @@ -535,7 +535,7 @@ var TreeController = { var $updateicon = $( '<img src="' + (controller.baseURL.length > 0 ? controller.baseURL : "") + - 'images/config.png" style="width:18px; vertical-align: middle;"/>' + 'images/config.png" class="invert_filter" style="width:18px; vertical-align: middle;"/>' ); var $updatebtn = $('<a href = "' + url_edit + '"></a>').append( $updateicon @@ -551,7 +551,7 @@ var TreeController = { var $deleteBtn = $( '<a><img src="' + (controller.baseURL.length > 0 ? controller.baseURL : "") + - 'images/cross.png" style="width:18px; vertical-align: middle; cursor: pointer;"/></a>' + 'images/cross.png" class="invert_filter" style="width:18px; vertical-align: middle; cursor: pointer;"/></a>' ); $deleteBtn.click(function(event) { var ok_function = function() { diff --git a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php index 7920be767f..b736c0e409 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php +++ b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php @@ -387,7 +387,7 @@ class AgentModuleWidget extends Widget ):string { $style = 'display:flex; width:100%; height:100%; margin: 10px;'; $table_data = '<div style="'.$style.'">'; - $table_data .= '<table class="widget_agent_module" cellpadding="1" cellspacing="0" border="0" style="background-color: transparent; margin: 0 auto;">'; + $table_data .= '<table class="widget_agent_module transparent mrgn_0px" cellpadding="1" cellspacing="0" border="0">'; if (empty($visualData) === false) { $table_data .= '<th>'.__('Agents').' / '.__('Modules').'</th>'; @@ -403,11 +403,11 @@ class AgentModuleWidget extends Widget false, '...' ); - $table_data .= '<th style="padding: 10px;">'.$file_name.'</th>'; + $table_data .= '<th class="pdd_10px">'.$file_name.'</th>'; } foreach ($visualData as $row) { - $table_data .= "<tr style='height: 35px;'>"; + $table_data .= "<tr class='height_35px'>"; switch ($row['agent_status']) { case AGENT_STATUS_ALERT_FIRED: $rowcolor = COL_ALERTFIRED; diff --git a/pandora_console/include/lib/Dashboard/Widgets/example.php b/pandora_console/include/lib/Dashboard/Widgets/example.php index 2c163214d8..3a4ec40fb6 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/example.php +++ b/pandora_console/include/lib/Dashboard/Widgets/example.php @@ -244,8 +244,8 @@ class WelcomeWidget extends Widget $output .= '<h2>'; $output .= __('Welcome to %s', \get_product_name()); $output .= '</h2>'; - $output .= '<div style="display:flex; flex-direction:row; align-items:center">'; - $output .= '<div style="width:75%;">'; + $output .= '<div id="welcome_example">'; + $output .= '<div class="w75p">'; $output .= __('This is an example of a dashboard widget. A widget may contain elements'); $output .= __('To add more elements, click on "<em>Add widgets</em>" on the top of this page.'); $output .= __('To delete this message, click on the delete button on top right corner of this element.'); @@ -253,7 +253,7 @@ class WelcomeWidget extends Widget $output .= __('To delete this message, click on the delete button on top right corner of this element.'); $output .= __('Thanks for using %s.', \get_product_name()); $output .= '</div>'; - $output .= "<div style='width:25%;'>"; + $output .= "<div class='w25p'>"; $output .= \html_print_image( \ui_get_logo_to_center_networkmap(), true, diff --git a/pandora_console/include/lib/Dashboard/Widgets/groups_status.php b/pandora_console/include/lib/Dashboard/Widgets/groups_status.php index 181a283d79..d4c0e39b6a 100755 --- a/pandora_console/include/lib/Dashboard/Widgets/groups_status.php +++ b/pandora_console/include/lib/Dashboard/Widgets/groups_status.php @@ -282,7 +282,7 @@ class GroupsStatusWidget extends Widget $data .= '</a>'; $data .= '</h1></div>'; - $data .= '<div class="div_groups_status" style="clear: both;">'; + $data .= '<div class="div_groups_status both">'; $table = new \stdClass(); $table->class = 'widget_groups_status'; @@ -307,7 +307,10 @@ class GroupsStatusWidget extends Widget $table->data[0][0] .= html_print_image( 'images/agent.png', true, - ['alt' => __('Agents')] + [ + 'alt' => __('Agents'), + 'class' => 'invert_filter', + ] ); $table->data[0][0] .= ' <b>'; $table->data[0][0] .= __('Agents'); @@ -378,7 +381,10 @@ class GroupsStatusWidget extends Widget $table->data[0][0] .= html_print_image( 'images/module.png', true, - ['alt' => __('Modules')] + [ + 'alt' => __('Modules'), + 'class' => 'invert_filter', + ] ); $table->data[0][0] .= '<b>'; diff --git a/pandora_console/include/lib/Dashboard/Widgets/monitor_health.php b/pandora_console/include/lib/Dashboard/Widgets/monitor_health.php index 8524791955..c8a62feafa 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/monitor_health.php +++ b/pandora_console/include/lib/Dashboard/Widgets/monitor_health.php @@ -319,7 +319,7 @@ class MonitorHealthWidget extends Widget 20 ); - $output = '<div class="container-center" style="min-width:200px; min-height:320px;">'; + $output = '<div class="container-center mw200px min-height-320px">'; $output .= \html_print_table($table, true); $output .= '</div>'; diff --git a/pandora_console/include/lib/Dashboard/Widgets/reports.php b/pandora_console/include/lib/Dashboard/Widgets/reports.php index 3da692bcb5..5c5312a7a6 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/reports.php +++ b/pandora_console/include/lib/Dashboard/Widgets/reports.php @@ -289,7 +289,7 @@ class ReportsWidget extends Widget $output = ''; ob_start(); if ($this->values['reportId'] !== 0) { - $output .= '<div style="width:90%; height:100%; display:flex; flex-direction:column;">'; + $output .= '<div class="w90p height_100p flex flex_column">'; $this->printReport(); $output .= ob_get_clean(); diff --git a/pandora_console/include/lib/Dashboard/Widgets/system_group_status.php b/pandora_console/include/lib/Dashboard/Widgets/system_group_status.php index 2671b46ded..3aed859b19 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/system_group_status.php +++ b/pandora_console/include/lib/Dashboard/Widgets/system_group_status.php @@ -507,7 +507,7 @@ class SystemGroupStatusWidget extends Widget $url .= '&ag_group='.$group['g']; if ($show_normal === true) { - $outputLine = '<div style="background-color:#82b92e">'; + $outputLine = '<div class="bg_82B92E">'; $outputLine .= '<span>'; $outputLine .= '<a title="'.__('Modules in normal status'); $outputLine .= '" class="group_view_data"'; @@ -523,7 +523,7 @@ class SystemGroupStatusWidget extends Widget } if ($show_warning === true) { - $outputLine = '<div style="background-color:#ffd036">'; + $outputLine = '<div class="bg_ffd">'; $outputLine .= '<span>'; $outputLine .= '<a title="'.__('Modules in warning status'); $outputLine .= '" class="group_view_data"'; @@ -539,7 +539,7 @@ class SystemGroupStatusWidget extends Widget } if ($show_critical === true) { - $outputLine = '<div style="background-color:#ff5653">'; + $outputLine = '<div class="bg_ff5">'; $outputLine .= '<span>'; $outputLine .= '<a title="'; $outputLine .= __('Modules in critical status'); @@ -556,7 +556,7 @@ class SystemGroupStatusWidget extends Widget } if ($show_alert_fired === true) { - $outputLine = '<div style="background-color:#ff9e39">'; + $outputLine = '<div class="bg_ff9">'; $outputLine .= '<span>'; $outputLine .= '<a title="'.__('Alerts fired'); $outputLine .= '" class="group_view_data"'; diff --git a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php index aa4e5f90fd..5da0cdb718 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php +++ b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php @@ -656,7 +656,7 @@ class TreeViewWidget extends Widget ]; // Show the modal window of an module. - $output .= '<div id="module_details_window" style="display:none;">'; + $output .= '<div id="module_details_window" class="invisible">'; $output .= '</div>'; // Script. diff --git a/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php b/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php index b494d59f59..bf9deb3bcd 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php +++ b/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php @@ -365,15 +365,15 @@ class WuxWidget extends Widget $output .= '<div>'; $output .= '<div>'; - $output .= "<p style='font-size:20px;'>"; + $output .= "<p class='font_20px'>"; if ($have_errors === true) { $output .= __('Global status').': '; - $output .= "<span style='color: #e63c52; font-size:20px;'>"; + $output .= "<span class='color: #e63c52; font_20px'>"; $output .= __('Failed'); $output .= '</span>'; } else { $output .= __('Global status').': '; - $output .= "<span style='color: #82b92e; font-size:20px;'>"; + $output .= "<span class='color_82b92e font_20px'>"; $output .= __('Ok'); $output .= '</span>'; } diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php b/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php index 2db12e4ae2..f49e55a21e 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php @@ -410,28 +410,28 @@ final class Group extends Item $html .= '<div class="group-item-info">'; // Critical. $html .= '<div class="group-item-info-container">'; - $html .= '<div class="value-style" style="background-color: #e63c52;">'; + $html .= '<div class="value-style red_background">'; $html .= $critical; $html .= '</div>'; $html .= '<div class="name-style">'.__('Critical').'</div>'; $html .= '</div>'; // Warning. $html .= '<div class="group-item-info-container">'; - $html .= '<div class="value-style" style="background-color: #f8db3f;">'; + $html .= '<div class="value-style yellow_background">'; $html .= $warning; $html .= '</div>'; $html .= '<div class="name-style">'.__('Warning').'</div>'; $html .= '</div>'; // Normal. $html .= '<div class="group-item-info-container">'; - $html .= '<div class="value-style" style="background-color: #84b83c;">'; + $html .= '<div class="value-style green_background">'; $html .= $normal; $html .= '</div>'; $html .= '<div class="name-style">'.__('Normal').'</div>'; $html .= '</div>'; // Unknown. $html .= '<div class="group-item-info-container">'; - $html .= '<div class="value-style" style="background-color: #9d9ea0;">'; + $html .= '<div class="value-style grey_background">'; $html .= $unknown; $html .= '</div>'; $html .= '<div class="name-style">'.__('Unknown').'</div>'; diff --git a/pandora_console/include/rest-api/models/VisualConsole/View.php b/pandora_console/include/rest-api/models/VisualConsole/View.php index 9b28a85a7a..3080d5e7a2 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/View.php +++ b/pandora_console/include/rest-api/models/VisualConsole/View.php @@ -690,7 +690,7 @@ class View extends \HTML echo '<h3 class="center">'.__('NetworkLink from').'</h3>'; echo '<div class="margin-top-10 interface-status from w90p centered flex-row-vcenter">'; ui_print_module_status($data['status']->lastStatus()); - echo '<span style="margin-left: 1em;">'; + echo '<span class="margin-left-1">'; echo __('Interface %s status', $interface_name); echo '</span>'; echo '</div>'; @@ -769,7 +769,7 @@ class View extends \HTML echo '<h3 class="center">'.__('NetworkLink to').'</h3>'; echo '<div class="interface-status from w90p centered flex-row-vcenter">'; ui_print_module_status($data['status']->lastStatus()); - echo '<span style="margin-left: 1em;">'; + echo '<span class="margin-left-1">'; echo __('Interface %s status', $interface_name); echo '</span>'; echo '</div>'; diff --git a/pandora_console/include/styles/first_task.css b/pandora_console/include/styles/first_task.css index 06aa36af82..f22439f2c5 100755 --- a/pandora_console/include/styles/first_task.css +++ b/pandora_console/include/styles/first_task.css @@ -7,7 +7,6 @@ margin-top: 30px; min-width: 600px; left: 20px; - width: 60%; height: 300px; background-color: #ececec; border-radius: 3px 3px 3px 3px; diff --git a/pandora_console/include/styles/js/jquery.contextMenu.css b/pandora_console/include/styles/js/jquery.contextMenu.css index 7343aa5de1..e09edcf28f 100644 --- a/pandora_console/include/styles/js/jquery.contextMenu.css +++ b/pandora_console/include/styles/js/jquery.contextMenu.css @@ -47,6 +47,7 @@ user-select: none; padding-top: 8px; padding-bottom: 8px; + color: #111; } .context-menu-item span { diff --git a/pandora_console/include/styles/menu.css b/pandora_console/include/styles/menu.css index c3a813c755..15a634edb1 100644 --- a/pandora_console/include/styles/menu.css +++ b/pandora_console/include/styles/menu.css @@ -142,76 +142,76 @@ li.sub_subMenu.selected { /* Icons specified here */ #icon_oper-networkconsole { - background-image: url(../../images/op_network.menu_gray.png); + background-image: url(../../images/menu/op_network.menu_gray.png); } #icon_oper-agents { - background-image: url(../../images/op_monitoring.menu_gray.png); + background-image: url(../../images/menu/op_monitoring.menu_gray.png); } #icon_oper-events { - background-image: url(../../images/op_events.menu_gray.png); + background-image: url(../../images/menu/op_events.menu_gray.png); } /* users */ #icon_oper-users { - background-image: url(../../images/op_workspace.menu_gray.png); + background-image: url(../../images/menu/op_workspace.menu_gray.png); } /* trap console */ #icon_oper-snmpc, #icon_god-snmpc { - background-image: url(../../images/op_snmp.menu.png); + background-image: url(../../images/menu/op_snmp.menu.png); } #icon_oper-reporting { - background-image: url(../../images/op_reporting.menu_gray.png); + background-image: url(../../images/menu/op_reporting.menu_gray.png); } #icon_oper-gismaps { - background-image: url(../../images/op_gis.menu.png); + background-image: url(../../images/menu/op_gis.menu.png); } #icon_oper-netflow { - background-image: url(../../images/op_netflow.menu.png); + background-image: url(../../images/menu/op_netflow.menu.png); } #icon_oper-extensions { - background-image: url(../../images/extensions.menu_gray.png); + background-image: url(../../images/menu/extensions.menu_gray.png); } /* Godmode images */ #icon_god-discovery { - background-image: url(../../images/gm_discovery.menu.png); + background-image: url(../../images/menu/gm_discovery.menu.png); } #icon_god-resources { - background-image: url(../../images/gm_resources.menu_gray.png); + background-image: url(../../images/menu/gm_resources.menu_gray.png); } #icon_god-configuration { - background-image: url(../../images/gm_configuration.menu_gray.png); + background-image: url(../../images/menu/gm_configuration.menu_gray.png); } #icon_god-alerts { - background-image: url(../../images/gm_alerts.menu_gray.png); + background-image: url(../../images/menu/gm_alerts.menu_gray.png); } #icon_god-users { - background-image: url(../../images/gm_users.menu_gray.png); + background-image: url(../../images/menu/gm_users.menu_gray.png); } #icon_god-reporting { - background-image: url(../../images/reporting_edit.menu.png); + background-image: url(../../images/menu/reporting_edit.menu.png); } #icon_god-servers { - background-image: url(../../images/gm_servers.menu_gray.png); + background-image: url(../../images/menu/gm_servers.menu_gray.png); } #icon_god-setup { - background-image: url(../../images/gm_setup.menu_gray.png); + background-image: url(../../images/menu/gm_setup.menu_gray.png); } #icon_god-events { - background-image: url(../../images/gm_events.menu_gray.png); + background-image: url(../../images/menu/gm_events.menu_gray.png); } #icon_god-extensions { - background-image: url(../../images/builder.menu_gray.png); + background-image: url(../../images/menu/builder.menu_gray.png); } #icon_god-links { - background-image: url(../../images/links.menu_gray.png); + background-image: url(../../images/menu/links.menu_gray.png); } #icon_god-um_messages { - background-image: url(../../images/um_messages.menu_gray.png); + background-image: url(../../images/menu/um_messages.menu_gray.png); } #icon_god-module_library { - background-image: url(../../images/gm_library.menu_gray.png); + background-image: url(../../images/menu/gm_library.menu_gray.png); } #menu_container { @@ -324,58 +324,58 @@ ul li { /* Menu icons active */ .selected#icon_oper-networkconsole { - background-image: url(../../images/op_network.menu_white.png); + background-image: url(../../images/menu/op_network.menu_white.png); } .selected#icon_oper-agents { - background-image: url(../../images/op_monitoring.menu_white.png); + background-image: url(../../images/menu/op_monitoring.menu_white.png); } .selected#icon_oper-events { - background-image: url(../../images/op_events.menu_white.png); + background-image: url(../../images/menu/op_events.menu_white.png); } .selected#icon_oper-users { - background-image: url(../../images/op_workspace.menu_white.png); + background-image: url(../../images/menu/op_workspace.menu_white.png); } .selected#icon_oper-reporting { - background-image: url(../../images/op_reporting.menu_white.png); + background-image: url(../../images/menu/op_reporting.menu_white.png); } .selected#icon_oper-extensions { - background-image: url(../../images/extensions.menu_white.png); + background-image: url(../../images/menu/extensions.menu_white.png); } .selected#icon_god-discovery { - background-image: url(../../images/gm_discovery.menu_white.png); + background-image: url(../../images/menu/gm_discovery.menu_white.png); } .selected#icon_god-resources { - background-image: url(../../images/gm_resources.menu_white.png); + background-image: url(../../images/menu/gm_resources.menu_white.png); } .selected#icon_god-configuration { - background-image: url(../../images/gm_configuration.menu_white.png); + background-image: url(../../images/menu/gm_configuration.menu_white.png); } .selected#icon_god-alerts { - background-image: url(../../images/gm_alerts.menu_white.png); + background-image: url(../../images/menu/gm_alerts.menu_white.png); } .selected#icon_god-users { - background-image: url(../../images/gm_users.menu_white.png); + background-image: url(../../images/menu/gm_users.menu_white.png); } .selected#icon_god-servers { - background-image: url(../../images/gm_servers.menu_white.png); + background-image: url(../../images/menu/gm_servers.menu_white.png); } .selected#icon_god-setup { - background-image: url(../../images/gm_setup.menu_white.png); + background-image: url(../../images/menu/gm_setup.menu_white.png); } .selected#icon_god-events { - background-image: url(../../images/gm_events.menu_white.png); + background-image: url(../../images/menu/gm_events.menu_white.png); } .selected#icon_god-extensions { - background-image: url(../../images/builder.menu_white.png); + background-image: url(../../images/menu/builder.menu_white.png); } .selected#icon_god-links { - background-image: url(../../images/links.menu_white.png); + background-image: url(../../images/menu/links.menu_white.png); } .selected#icon_god-um_messages { - background-image: url(../../images/um_messages.menu_white.png); + background-image: url(../../images/menu/um_messages.menu_white.png); } .selected#icon_god-module_library { - background-image: url(../../images/gm_library.menu_white.png); + background-image: url(../../images/menu/gm_library.menu_white.png); } #menu_full { diff --git a/pandora_console/include/styles/module_library.css b/pandora_console/include/styles/module_library.css index 9081464a67..3998a830ed 100644 --- a/pandora_console/include/styles/module_library.css +++ b/pandora_console/include/styles/module_library.css @@ -67,6 +67,7 @@ /* --- Main page --- */ #library_main { text-align: center; + position: unset; } #library_main h2 { @@ -75,7 +76,7 @@ #library_main_content { display: grid; - grid-template-columns: repeat(3, minmax(300px, 1fr)); + grid-template-columns: repeat(3, minmax(150px, 1fr)); grid-gap: 20px; gap: 20px; text-align: center; @@ -122,7 +123,8 @@ } .sidebar_library h3:first-child { - margin-top: 0; + margin-top: 10px; + text-align: center; } .categories_sidebar_children { diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index a40ed17ade..935520bc78 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -197,6 +197,14 @@ h4 { text-transform: none; } +.transform_none { + text-transform: none; +} + +.mh_initial { + min-height: initial; +} + table tbody tr td h4 { color: #ffffff; } @@ -278,6 +286,9 @@ th { letter-spacing: 0.3pt; } +pre .color_333 { + color: #333; +} /* Remove background when autocomplete */ input:-webkit-autofill, input:-webkit-autofill:hover, @@ -458,6 +469,59 @@ select:-internal-list-box { .truncate:hover { white-space: pre-wrap; } + +.wauto { + width: auto; +} +.w5px { + width: 5px; +} +.w10px { + width: 10px; +} +.w16px { + width: 16px; +} +.w18px { + width: 18px; +} +.w20px { + width: 20px; +} +.w25px { + width: 25px; +} +.w30px { + width: 30px; +} +.w40px { + width: 40px; +} +.w50px { + width: 50px; +} +.w60px { + width: 60px; +} +.w70px { + width: 70px; +} +.w80px { + width: 80px; +} +.w90px { + width: 90px; +} +.w100px { + width: 100px; +} +.w150px { + width: 150px; +} +.w220px { + width: 220px; +} + .w120px { width: 120px; max-width: 120px; @@ -474,23 +538,91 @@ select:-internal-list-box { width: 250px; max-width: 250px; } +.w280px { + width: 280px; + max-width: 280px; +} .w290px { width: 290px; max-width: 290px; } +.w300px { + width: 300px; +} +.w310px { + width: 310px; +} +.w350px { + width: 350px; +} +.w388px { + width: 388px; +} +.w400px { + width: 400px; +} +.w450px { + width: 450px; +} .w500px { width: 500px; max-width: 500px; } +.w510px { + width: 510px; +} +.w540px { + width: 540px; +} +.w600px { + width: 600px; +} +.w700px { + width: 700px; +} +.w1100px { + width: 1100px; +} + +/* +* WIDTH EM +*/ +.w55em { + width: 55em; +} +.w90em { + width: 90em; +} +/* +* MIN WIDTH +*/ +.mw60px { + min-width: 60px; +} +.mx180px { + max-width: 180px; +} +.mw100px { + min-width: 100px; +} .mw120px { min-width: 120px; } .mw180px { min-width: 180px; } +.mw200px { + min-width: 200px; +} +.mw230px { + min-width: 230px; +} .mw250px { min-width: 250px; } +.mw300px { + min-width: 300px; +} .mw500px { min-width: 500px; } @@ -500,46 +632,109 @@ select:-internal-list-box { .mw800px { min-width: 800px; } -.w20px { - width: 20px; -} + .nowrap { white-space: nowrap; } +.wrap { + flex-wrap: wrap; +} .inline { display: inline-block; } +.inline_line { + display: inline; +} + +.inline_flex { + display: inline-flex; +} + +.relative { + position: relative; +} + +/* +* WIDTH PERCENTILE +*/ +.w5p { + width: 5%; +} .w10p { width: 10%; } +.w12p { + width: 12%; +} + +.w15p { + width: 15%; +} + .w20p { width: 20%; } +.w22p { + width: 22%; +} +.w25p { + width: 25%; +} .w30p { width: 30%; } +.w33p { + width: 33%; +} .w40p { width: 40%; } +.w47p { + width: 47%; +} .w50p { width: 50%; } +.w54p { + width: 54%; +} .w60p { width: 60%; } .w70p { width: 70%; } +.w75p { + width: 75%; +} .w80p { width: 80%; } .w90p { width: 90%; } +.w93p { + width: 93%; +} +.w96p { + width: 96%; +} +.w97p { + width: 97%; +} +.w98p { + width: 98%; +} +.w99p { + width: 99%; +} .w100p { width: 100%; } +/* +* HEIGTH PERCENTILE +*/ .h10p { height: 10%; } @@ -567,6 +762,13 @@ select:-internal-list-box { .h100p { height: 100%; } + +/* +* MAX HEIGHT +*/ +.mx_height400 { + max-height: 400px; +} .no-text-imp { font-size: 0 !important; } @@ -648,6 +850,10 @@ select:-internal-list-box { .flex-start { justify-content: flex-start; } + +.flex { + display: flex; +} .padding-2 { padding: 2em; } @@ -706,15 +912,21 @@ select:-internal-list-box { .no-td-padding td { padding: 0; } -.td-bg-white td { +.td-bg-white td .bg_white { background: #fff; } .float-left { float: left; } + .float-right { float: right; } + +.float-none { + float: none; +} + .invisible { display: none; } @@ -726,6 +938,11 @@ select:-internal-list-box { display: block; } +.file_repo_description { + min-height: 40px; + max-height: 40px; + width: 98%; +} div#page { background: #fbfbfb; background-image: none; @@ -745,7 +962,6 @@ div#container { margin: 0 auto; min-width: 960px; text-align: left; - height: 100%; background: #fff; width: 100%; } @@ -776,7 +992,8 @@ a.white_bold { font-weight: bold; } -a.white { +a.white, +.white { color: #eee; text-decoration: none; } @@ -800,6 +1017,10 @@ p.center { margin-bottom: 10px; } +.margin-bottom-20 { + margin-bottom: 20px; +} + .margin-tb-10 { margin-top: 10px; margin-bottom: 10px; @@ -902,6 +1123,8 @@ input.sub[disabled] { border-top-right-radius: 2px; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; + width: 500px; + height: 180px; } #noaccess-title { @@ -915,6 +1138,8 @@ input.sub[disabled] { border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; text-align: center; + height: 20px; + width: 98%; } #noaccess-text { @@ -923,6 +1148,7 @@ input.sub[disabled] { padding-top: 25px; padding-right: 50px; float: right; + width: 70%; } #noaccess-image { @@ -930,39 +1156,27 @@ input.sub[disabled] { left: 10px; top: 10px; float: left; + width: 15%; } -/*div#activity{ - padding-top: 0px; - padding-bottom: 18px; -} -div#activity table td > img { - vertical-align: middle; -} -div#noa { - float: right; - padding-right: 50px; - margin-top: 25px; -} -div#db_f { - text-align: justify; - margin: auto; - padding: 0.5em; - width: 55em; - margin-top: 3em; -} -div#db_ftxt { - float: right; - padding-top: 10px; -}*/ - /* * --------------------------------------------------------------------- * - HELP DIALOG - login_help_dialog.php and pandora_help.php - * --------------------------------------------------------------------- */ + div#main_help { width: 100%; + background-color: #fff; + text-align: center; + padding-top: 15px; + padding-bottom: 15px; +} +div#parent_div { + font-family: verdana, arial; + font-size: 11px; + text-align: left; + background-color: #fff; } div#main_help div.databox, .license_databox { @@ -1059,26 +1273,9 @@ div#head { #ver { margin-bottom: 25px; } - -/*.databox_error { - width: 657px; - height: 400px; - border: none; - background-color: #fafafa; - background: url(../../images/splash_error.png) no-repeat; -} - -input.chk { - margin-right: 0px; - border: 0px none; - height: 14px; -}*/ input.datos { background-color: #f5f5f5; } -/*input.datos_readonly { - background-color: #050505; -}*/ /* * --------------------------------------------------------------------- @@ -1114,6 +1311,30 @@ input.datos { /* links */ background-color: #989898; } +.bg_000 { + background-color: #000; +} +.bg_ccc { + background-color: #cccccc; +} +.bg-white { + background-color: #fff; +} +.gb_f0 { + background-color: #f0f0f0; +} +.bg_caca { + background-color: #cacaca; +} +/* margins */ +.mgn-lf-50 { + margin-left: 50px; +} + +.mgn_tp_0 { + margin-top: 0px; +} + .bg, .bg2, .bg3, @@ -1211,6 +1432,24 @@ td.datos2f9 { color: #5ab7e5; font-weight: bold; } +.black { + color: black; +} +.color_888 { + color: #888; +} +.color_ff0 { + color: #ff0000; +} +.color_34 { + color: #343434; +} +.color_006 { + color: #000066; +} +.color_inherit { + color: inherit; +} .redb, .greenb, td.datos_id, @@ -1600,7 +1839,8 @@ table.rounded_cells td { border-radius: 6px; } -.action-buttons { +.action-buttons, +.right { text-align: right; } @@ -1788,9 +2028,7 @@ div#main_pure { width: 98%; position: static; } -/*#table-agent-configuration radio { - margin-right: 40px; -}*/ + .ui-draggable { cursor: move; } @@ -1987,9 +2225,13 @@ fieldset legend span, span#latest_value { font-style: italic; } -span#latest_value span#value { +span#latest_value span#value, +.normal { font-style: normal; } +.normal_weight { + font-weight: normal; +} form#filter_form { margin-bottom: 15px; } @@ -2219,26 +2461,7 @@ div#events_list { float: left; width: 100%; } -/*span#logo_text1 { - font: bolder 3em Arial, Sans-serif; - letter-spacing: -2px; - color: #eee; -} -span#logo_text2 { - font: 3em Arial, Sans-serif; - letter-spacing: -2px; - color: #aaa; -} -div#logo_text3 { - text-align: right; - font: 2em Arial, Sans-serif; - letter-spacing: 6px; - color: #aaa; - font-weight: bold; - margin-top: 0px; - margin-left: 4px; - padding-top: 0px; -}*/ + .pagination * { margin-left: 0px; margin-right: 0px; @@ -2862,43 +3085,6 @@ span#plugin_description { padding: 8px; } -/*Groupsview*/ -/* -.groupsview { - border-spacing: 0px 4px; -} - -.groupsview tr { - background-color: #666; -} - -.groupsview th { - font-size: 12px; - padding: 5px; -} - -.groupsview td.first, -.groupsview th.first { - -moz-border-top-left-radius: 10px; - -webkit-border-top-left-radius: 10px; - border-top-left-radius: 10px; - - -moz-border-bottom-left-radius: 10px; - -webkit-border-bottom-left-radius: 10px; - border-bottom-left-radius: 10px; -} - -.groupsview td.last, -.groupsview th.last { - -moz-border-top-right-radius: 10px; - -webkit-border-top-right-radius: 10px; - border-top-right-radius: 10px; - -moz-border-bottom-right-radius: 10px; - -webkit-border-bottom-right-radius: 10px; - border-bottom-right-radius: 10px; -} -*/ - /* * --------------------------------------------------------------------- * - TIP (to show help) - @@ -2948,10 +3134,6 @@ input.search_input { border-color: transparent; } -/*.vertical_fields td input, .vertical_fields td select { - margin-top: 8px; -}*/ - a[id^="tgl_ctrl_"] > img, a[id^="tgl_ctrl_"] > b > img { vertical-align: middle; @@ -3226,7 +3408,8 @@ table#policy_modules td * { font-weight: bolder; text-align: left; } -.context_help_body { +.context_help_body, +.left { text-align: left; } @@ -3265,12 +3448,6 @@ table#policy_modules td * { vertical-align: middle; } -/*.saml_button { - float: left; - position: fixed; - vertical-align: middle; -}*/ - /* * --------------------------------------------------------------------- * - TACTICAL VIEW y TABLAS - @@ -3530,98 +3707,6 @@ div.div_groups_status { } } -/*.home_zoom { - top: 310px; - left: 10px; - - display: table-cell; - position: absolute; - font-weight: bolder; - font-size: 20px; - background: blue; - color: white; - border-radius: 15px; - width: 30px; - height: 30px; - cursor:pointer; - text-align: center; - vertical-align: middle; -} - -.zoom_in { - top: 10px; - left: 10px; - - display: table-cell; - position: absolute; - font-weight: bolder; - font-size: 20px; - background: blue; - color: white; - border-radius: 15px; - width: 30px; - height: 30px; - cursor: pointer; - text-align: center; - vertical-align: middle; -} - -.zoom_out { - top: 270px; - left: 10px; - - display: table-cell; - position: absolute; - font-weight: bolder; - font-size: 20px; - background: blue; - color: white; - border-radius: 15px; - width: 30px; - height: 30px; - cursor: pointer; - text-align: center; - vertical-align: middle; -} - -.title_bar { - border-bottom: 1px solid black; -} -.title_bar .title { - font-weight: bolder; -} - -.title_bar .open_click { - float: right; - display: table-cell; - font-weight: bolder; - font-size: 20px; - background: blue none repeat scroll 0% 0%; - color: white; - width: 17px; - height: 17px; - cursor: pointer; - text-align: center; - vertical-align: middle; - margin: 1px; -} - -.title_bar .close_click { - float: right; - display: table-cell; - font-weight: bolder; - font-size: 20px; - background: blue none repeat scroll 0% 0%; - color: white; - width: 17px; - height: 17px; - cursor: pointer; - text-align: center; - vertical-align: middle; - margin: 1px; -} -*/ - div.simple_value > span.text > p, div.simple_value > span.text > p > span > strong, div.simple_value > span.text > p > strong, @@ -4017,6 +4102,7 @@ div#main_help_new { text-align: center; padding: 20px; border-bottom: 1px solid #c2c2c2; + background-color: #fff; } div#main_help_new_content { @@ -4471,8 +4557,8 @@ div#dialog_messages table th:last-child { .notification-title { margin: 0; } -.notification-subtitle { - margin: 0; +.notification-subtitle, +.color-black-grey { color: #373737; } @@ -4931,7 +5017,7 @@ input:checked + .p-slider:before { text-align: center; } -.autorefresh_select_arrows a { +.autorefresh_select_arrows a .block { display: block; } @@ -5305,6 +5391,7 @@ table.info_table.policy_sub_table { flex-wrap: wrap; } +.mrg_r_5px, .label_simple_items > * { margin-right: 5px; } @@ -5526,6 +5613,27 @@ div#bullets_modules div { background: #82b92e; } +.orange_color { + background: #ffa631; +} +.red_color { + color: #e63c52; +} +.yellow_color { + color: #f3b200; +} +.grey_color { + color: #b2b2b2; +} +.blue_color { + color: #4a83f3; +} +.blue_color_ligther { + color: #5bb6e5; +} +.green_color { + color: #82b92e; +} /* First row in agent view */ #agent_details_first_row { display: flex; @@ -5665,7 +5773,8 @@ div#status_pie { } /* White tables to show graphs */ -.white_table_graph { +.white_table_graph, +.mgn_btt_20px { margin-bottom: 20px; } @@ -5708,6 +5817,11 @@ div#status_pie { padding-bottom: 2em; } +.white_table_ag_mdl { + width: 100%; + border: none; +} + .white-box-content { width: 100%; height: 100%; @@ -5956,7 +6070,7 @@ table.table_modal_alternate tr td:first-child { border: 1px solid black; } -.bars-graph-rotate .flot-text .flot-x-axis div { +.bars-graph-rotate .flot-text .flot-x-axis div .break_word { word-break: break-word; } @@ -6026,6 +6140,19 @@ form#modal_form_feedback ul.wizard li > textarea { background-color: #82b92e; } +.default_container { + font-weight: bold; + background: #f2f2f2; + border: 1px solid #e2e2e2; + margin-bottom: 4px; +} + +.default_container_parent { + font-weight: bold; + margin-bottom: 4px; + border-bottom: 1px solid #dcdcdc; +} + /* * --------------------------------------------------------------------- * - REPORTING VIEWER @@ -6134,6 +6261,2143 @@ div.graph div.legend table { white-space: nowrap; } +.sound_events { + background-color: #494949; + max-width: 550px; + max-height: 400px; + margin-top: 40px; +} + +.w16px { + padding-left: 16px; + padding-right: 16px; + padding-top: 16px; +} + +.sound_div_background { + background-color: #fff !important; +} + +.bold_top { + font-weight: bold; + vertical-align: top; +} + +.search_options { + width: 100%; + padding-top: 10px; +} + +.search_results { + display: none; + padding: 5px; + background-color: #eaeaea; + border: 1px solid #e2e2e2; + border-radius: 4px; +} + +.snmp_tree_container { + width: 100%; + height: 100%; + margin-top: 5px; + position: relative; +} + +.spinner_none_padding { + position: absolute; + top: 0; + left: 0px; + display: none; + padding: 5px; +} +/* +* MAX WIDTH +*/ +.maxw180px { + max-width: 180px; +} +/* +* MARGIN +*/ +.margn { + margin: auto; +} +.mrgn_0px { + margin: 0px; +} +.mrgn_5px_a0 { + margin: 5px auto 0; +} +.mrgn_10px { + margin: 10px; +} +.mrgn_5px { + margin: 5px; +} +.mrgn_30px { + margin: 30px; +} +.mrgn_3em0 { + margin: 3em 0em; +} +.mrgn_1_2em { + margin: 0 1em 0 2em; +} + +/* +* MARGIN LEFT +*/ +.mrgn_lft_05em { + margin-left: 0.5em; +} + +.mrgn_lft_0px { + margin-left: 0px; +} +.mrgn_lft_2px { + margin-left: 2px; +} +.mrgn_lft_5px { + margin-left: 5px; +} +.mrgn_lft_10px { + margin-left: 10px; +} +.mrgn_lft_15px { + margin-left: 15px; +} +.mrgn_lft_20px { + margin-left: 20px; +} +.mrgn_lft_23px { + margin-left: 23px; +} +.mrgn_lft_25px { + margin-left: 25px; +} +.mrgn_lft_30px { + margin-left: 30px; +} +.mrgn_lft_50px { + margin-left: 50px; +} +.mrgn_lft_100px { + margin-left: 100px; +} + +.mrgn_lft_0.8em { + margin-left: 0.8em; +} +.mrgn_lft_1.6em { + margin-left: 1.6em; +} +.mrgn_lft_2em { + margin-left: 2em; +} +.mrgn_lft_4em { + margin-left: 4em; +} + +/* +* MARGIN RIGHT +*/ +.mrgn_right_1.2em { + margin-right: 1.2em; +} +.mrgn_right_0px { + margin-right: 0px; +} +.mrgn_right_5px { + margin-right: 5px; +} +.mrgn_right_6px { + margin-right: 6px; +} +.mrgn_right_7px { + margin-right: 7px; +} +.mrgn_right_7p { + margin-right: 7%; +} +.mrgn_right_10px { + margin-right: 10px; +} +.mrgn_right_15px { + margin-right: 15px; +} +.mrgn_right_20px { + margin-right: 20px; +} +.mrgn_right_25px { + margin-right: 25px; +} +.mrgn_right_30px { + margin-right: 30px; +} +.mrgn_right_40px { + margin-right: 40px; +} +.mrgn_right_50px { + margin-right: 50px; +} +.mrgn_right_60px { + margin-right: 60px; +} +.mrgn_right_150px { + margin-right: 50px; +} + +/* +* MARGIN TOP +*/ +.mrgn_top-2px { + margin-top: -2px !important; +} +.mrgn_top-10px { + margin-top: -10px; +} +.mrgn_top_0px { + margin-top: 0px; +} +.mrgn_top_5px { + margin-top: 5px; +} +.mrgn_top_6px { + margin-top: 6px; +} +.mrgn_top_10px { + margin-top: 10px; +} +.mrgn_top_13px { + margin-top: 13px; +} +.mrgn_top_15px { + margin-top: 15px; +} + +.mrgn_top_20px { + margin-top: 20px; +} +.mrgn_top_25px { + margin-top: 25px; +} +.mrgn_top_30px { + margin-top: 30px; +} +.mrgn_top_40px { + margin-top: 40px; +} +.mrgn_top_50px { + margin-top: 50px; +} +.mrgn_top_0 { + margin-top: 0px !important; +} +.mrgn_top_5 { + margin-top: 5px; +} +.mrg_top_80 { + margin-top: 80px; +} +.mrgn_top_3p { + margin-top: 30%; +} + +/* +* MARGIN BOTTON +*/ +.mrgn_btn_0px { + margin-bottom: 0px; +} +.mrgn_btn_0 { + margin-bottom: 0px !important; +} +.mrgn_btn_5px { + margin-bottom: 5px; +} +.mrgn_btn_10px { + margin-bottom: 10px; +} + +.mrgn_btn_15px { + margin-bottom: 15px; +} +.mrgn_btn_20px { + margin-bottom: 20px; +} +.mrgn_btn_25px { + margin-bottom: 25px; +} +.mrgn_btn_30px { + margin-bottom: 30px; +} +.mrgn_btn_35px { + margin-bottom: 35px; +} + +.mrgn_btn_40px { + margin-bottom: 40px; +} + +.mrg_top_80px { + margin-bottom: 80px; +} +.snmp_view_div { + float: left; + padding-left: 30px; + line-height: 17px; + vertical-align: top; + width: 120px; +} + +.display_in { + display: inline; +} + +#aviable_updates { + font-size: 8pt; + font-style: italic; +} + +#tab_godmode, +.text_center { + text-align: center; +} +.text_end { + text-align: end; +} +.incident_table { + position: absolute; + top: 5px; + right: 5px; + font-size: smaller; + color: #545454; +} + +.hidden_block { + visibility: hidden; + display: block; +} + +.hidden { +} + +#both, +.both { + clear: both; +} + +.clear_left { + clear: left; +} +.clear_right { + clear: right; +} + +#br_mb_40 { + margin-bottom: 40px; +} + +#agent_search { + width: 100%; +} + +#group_selection { + width: 100%; +} + +#agent_selection { + width: 100%; +} + +#module_selection { + width: 100%; +} + +#imagen2 { + width: 230px; +} + +#help_dialog { + font-size: 10pt; + margin: 20px; +} + +.zindex999 { + z-index: 999; +} + +.vertical_middle { + vertical-align: middle; +} +.mrg_btt_7 { + margin-bottom: 7px; +} + +.mrg_btt_15 { + margin-bottom: 15px; +} + +.mrg_btt_60 { + margin-bottom: 60px; +} +.padding-lft-10 { + padding-left: 10px; +} + +.padding-2-10 { + padding: 2px 10px; +} + +.no_decoration { + text-decoration: none; +} +.border_solid_white { + border: 1px solid #fff; +} +.border_0 { + border: 0; +} +.border_1px_dd { + border: 1px #dddddd solid; +} +.border_1px_d3 { + border: 1px #d3d3d3 solid; +} +.zindex10000 { + z-index: 10000; +} +/* +* PADDING +*/ +.pdd_1em { + padding: 1em; +} +.pdd_2em { + padding: 2em; +} + +/* +* PADDING +*/ + +.pdd_0px { + padding: 0px; +} +.pdd_4px { + padding: 4px; +} +.pdd_5px { + padding: 5px; +} +.pdd_6px { + padding: 6px; +} +.pdd_10px { + padding: 10px; +} +.pdd_15px { + padding: 15px; +} +.pdd_20px { + padding: 20px; +} +.pdd_25px { + padding: 25px; +} +.pdd_30px { + padding: 30px; +} +.pdd_35px { + padding: 35px; +} +.pdd_40px { + padding: 40px; +} +.pdd_45px { + padding: 45px; +} +.pdd_50px { + padding: 50px; +} +.pdd_55px { + padding: 55px; +} +.pdd_60px { + padding: 60px; +} +.pdd_65px { + padding: 65px; +} +.pdd_70px { + padding: 70px; +} +.pdd_75px { + padding: 75px; +} +.pdd_80px { + padding: 80px; +} +.pdd_85px { + padding: 85px; +} +.pdd_90px { + padding: 90px; +} +.pdd_95px { + padding: 95px; +} +.pdd_100px { + padding: 100px; +} +.pdd_10_0_10 { + padding: 10px 20px 10px 10px; +} +.pdd_20_40x { + padding: 20px 40px; +} + +/* +* PADDING RIGHT +*/ +.pdd_r_2px { + padding-right: 2px; +} +.pdd_r_3px { + padding-right: 2px; +} +.pdd_r_5px { + padding-right: 5px; +} +.pdd_r_10px { + padding-right: 10px; +} +.pdd_r_15px { + padding-right: 15px; +} +.pdd_r_17px { + padding-right: 17px; +} +.pdd_r_20px { + padding-right: 20px; +} +.pdd_r_27px { + padding-right: 27px; +} +.pdd_r_30px { + padding-right: 30px; +} +.pdd_r_40px { + padding-right: 40px; +} +.pdd_r_50px { + padding-right: 50px; +} +.pdd_r_60px { + padding-right: 60px; +} +.pdd_r_70px { + padding-right: 70px; +} +.pdd_r_80px { + padding-right: 80px; +} +.pdd_r_90px { + padding-right: 90px; +} +.pdd_r_100px { + padding-right: 100px; +} + +/* +* PADDING LEFT +*/ +.pdd_l_4px { + padding-left: 4px; +} +.pdd_l_5px { + padding-left: 5px; +} +.pdd_l_10px { + padding-left: 10px; +} +.pdd_l_15px { + padding-left: 15px; +} +.pdd_l_20px { + padding-left: 20px; +} +.pdd_l_30px { + padding-left: 30px; +} +.pdd_l_40px { + padding-left: 40px; +} +.pdd_l_50px { + padding-left: 50px; +} +.pdd_l_60px { + padding-left: 60px; +} +.ppd_l_63px { + padding-left: 63px; +} +.pdd_l_70px { + padding-left: 70px; +} +.pdd_l_75px { + padding-left: 75px; +} +.pdd_l_80px { + padding-left: 80px; +} +.pdd_l_90px { + padding-left: 90px; +} +.pdd_l_100px { + padding-left: 100px; +} + +/* +* PADDING BOTTOM. +*/ +.pdd_b_0px { + padding-bottom: 0px; +} +.pdd_b_10px { + padding-bottom: 10px; +} +.pdd_b_20px { + padding-bottom: 20px; +} +.pdd_b_30px { + padding-bottom: 30px; +} +.pdd_b_40px { + padding-bottom: 40px; +} +.pdd_b_50px { + padding-bottom: 50px; +} +.pdd_b_60px { + padding-bottom: 60px; +} +.pdd_b_70px { + padding-bottom: 70px; +} +.pdd_b_80px { + padding-bottom: 80px; +} +.pdd_b_90px { + padding-bottom: 90px; +} +.pdd_b_100px { + padding-bottom: 100px; +} + +/* +* PADDING TOP. +*/ +.pdd_t_0px { + padding-top: 0px; +} +.pdd_t_3px { + padding-top: 3px; +} +.pdd_t_4px { + padding-top: 4px; +} +.pdd_t_5px { + padding-top: 5px; +} +.pdd_t_7px { + padding-top: 7px; +} +.pdd_t_8px { + padding-top: 8px; +} +.pdd_t_10px { + padding-top: 10px; +} +.pdd_t_20px { + padding-top: 20px; +} +.pdd_t_30px { + padding-top: 30px; +} +.pdd_t_40px { + padding-top: 40px; +} +.pdd_t_50px { + padding-top: 50px; +} +.pdd_t_60px { + padding-top: 60px; +} +.pdd_t_70px { + padding-top: 70px; +} +.pdd_t_80px { + padding-top: 80px; +} +.pdd_t_90px { + padding-top: 90px; +} +.pdd_t_100px { + padding-top: 100px; +} +.medium { + font-size: medium; +} +.font_0pt { + font-size: 0pt; +} +.font_0px { + font-size: 0px; +} +.font_7px { + font-size: 7px; +} +.font_8pt { + font-size: 8pt; +} +.font_9pt { + font-size: 9pt; +} +.font_9px { + font-size: 9px; +} +.font_10pt { + font-size: 10pt; +} +.font_10px { + font-size: 10px; +} +.font_10 { + font-size: 10pt; +} +.font_11 { + font-size: 11pt; +} +.font_11px { + font-size: 11px; +} +.font_12pt { + font-size: 12pt; +} +.font_13pt { + font-size: 13pt; +} +.font_13px { + font-size: 13px; +} +.font_14pt { + font-size: 14pt; +} +.font_14px { + font-size: 14px; +} +.font_15pt { + font-size: 15pt; +} +.font_15px { + font-size: 15px; +} +.font_16pt { + font-size: 16pt; +} +.font_16px { + font-size: 16px; +} +.font_12px { + font-size: 12px; +} + +.font_14px { + font-size: 14px; +} +.font_20px { + font-size: 20px; +} +.font_25px { + font-size: 25px; +} +.font_40px { + font-size: 40px; +} +.font_75p { + font-size: 75%; +} +.font_85p { + font-size: 85%; +} +.absolute { + position: absolute; +} + +.help_dialog_login { + margin: 0 auto; + top: 240px; + right: 10px; + border: 1px solid #fff; + width: 570px; +} + +.skip_help_login { + float: left; + margin-top: 3px; + margin-left: 0px; + width: 80%; + text-align: left; +} + +.parent_new_dialog_tmplt { + position: absolute; + top: 30px; + left: 10px; + text-align: left; + right: 0%; + height: 70px; + min-width: 560px; + width: 95%; + margin: 0 auto; + line-height: 19px; +} + +.font_8px { + font-size: 8px; +} +#new_text { + display: block; + height: 260px; + overflow: auto; + text-align: justify; + padding: 5px 15px 4px 10px; + background: #ececec; + border-radius: 4px; +} + +#new_author { + font-size: 12px; + display: block; + margin-top: 20px; +} + +#new_timestamp { + font-size: 12px; + display: block; + font-style: italic; +} + +#div_btn_new_dialog { + position: absolute; + margin: 0 auto; + top: 340px; + right: 10px; + width: 570px; +} + +#btn_delete_5 { + float: right; + margin-left: 5px; +} + +.no_border { + border: 0px; +} + +.msg_pandora_help { + padding-left: 30px; + padding-right: 30px; + padding-bottom: 15px; +} + +#footer_help { + text-align: center; + padding: 5px; + font-family: verdana, arial; + font-size: 11px; +} + +.agent_map { + border: 1px solid black; + width: 100%; + height: 30em; +} + +.agent_manager { + display: flex; + justify-content: flex-end; + align-items: center; +} + +#p_configurar_agente { + float: right; + font-style: nunito; + font-size: 11pt; + margin-right: 50px; + margin-left: 40px; +} + +.font_bold { + font-weight: bold; +} +.font_w300 { + font-weight: 300; +} +.font_w600 { + font-weight: 600; +} + +.font_18px { + font-size: 18px; +} +.font_18pt { + font-size: 18pt; +} +.font_40pt { + font-size: 40pt; +} +.align_center { + align: center; +} +.aligni_center { + align-items: center; +} +.warning_triangulo { + float: left; + margin-left: 25px; + margin-top: 30px; +} + +.pddng_50px { + padding: 50px; +} +.group_header { + width: 6px; + height: 14px; + padding: 0; +} + +.width_6p { + width: 6%; +} + +.width_7p { + width: 7%; +} + +.width_24p { + width: 24%; +} + +.border_lft_1px { + border-left: 1px solid; +} + +.height_auto { + height: auto; +} +.mx_height50px { + max-height: 50px; +} + +/* +* HEIGHT PX +*/ +.height_1px { + height: 1px; +} +.height_10px { + height: 10px; +} +.height_20px { + height: 20px; +} +.height_25px { + height: 25px; +} +.height_30px { + height: 30px; +} +.height_35px { + height: 35px; +} +.height_40px { + height: 40px; +} +.height_45px { + height: 45px; +} +.height_50px { + height: 50px; +} +.height_60px { + height: 60px; +} +.height_70px { + height: 70px; +} +.height_71px { + height: 71px; +} + +.height_80px { + height: 80px; +} +.height_90px { + height: 90px; +} +.height_91px { + height: 91px; +} +.height_100px { + height: 100px; +} +.height_130px { + height: 130px; +} +.height_200px { + height: 200px; +} +.height_240px { + height: 240px; +} +.height_300px { + height: 300px; +} +.height_340px { + height: 340px; +} +.height_400px { + height: 400px; +} +.height_420px { + height: 420px; +} +.height_450px { + height: 450px; +} +.height_600px { + height: 600px; +} +/* +* HEIGHT EM +*/ +.height_20em { + height: 20em; +} +.height_30em { + height: 30em; +} +/* +* HEIGHT % +*/ +.height_10p { + height: 10%; +} +.height_20p { + height: 20%; +} +.height_30p { + height: 30%; +} +.height_40p { + height: 40%; +} +.height_50p { + height: 50%; +} +.height_60p { + height: 60%; +} +.height_70p { + height: 70%; +} +.height_80p { + height: 80%; +} +.height_90p { + height: 90%; +} +.height_95p { + height: 95%; +} +.height_100p { + height: 100%; +} + +.bg_333 { + background-color: #333; +} +.bg_ec { + background-color: #ececec; +} +.bg_343434 { + background-color: #343434; +} +.bg_e63c52 { + background-color: #e63c52; +} + +.bg_f3b200 { + background-color: #f3b200; +} + +.bg_82B92E { + background-color: #82b92e; +} + +.bg_B2B2B2 { + background-color: #b2b2b2; +} + +.bg_5bb6e5 { + background-color: #5bb6e5; +} + +.bg_aaaaaa { + background-color: #aaaaaa; +} + +.bg_ddd { + background-color: #ddd; +} +.bg_whitesmoke { + background-color: whitesmoke; +} +.bg_eee { + background-color: #eee; +} +.bg_ffd { + background-color: #ffd036; +} +.bg_ff5 { + background-color: #ff5653; +} +.bg_ff9 { + background-color: #ff9e39; +} +.bg_lightgray { + background-color: lightgray; +} + +.bg_e6 { + background: #e6e6e6; +} +.color_666 { + color: #666; +} +.color_67 { + color: #676767; +} +.color_82b92e { + color: #82b92e; +} +.networkconsole { + width: 100%; + height: 100%; + position: relative; + overflow: hidden; + background-color: #fafafa; +} + +/* +* MIN HEIGHT +*/ + +.min-height-0px { + min-height: 0px; +} +.min-height-10px { + min-height: 10px; +} +.min-height-20px { + min-height: 20px; +} +.min-height-30px { + min-height: 30px; +} +.min-height-40px { + min-height: 40px; +} +.min-height-50px { + min-height: 50px; +} +.min-height-60px { + min-height: 60px; +} +.min-height-70px { + min-height: 70px; +} +.min-height-80px { + min-height: 80px; +} +.min-height-90px { + min-height: 90px; +} +.min-height-100px { + min-height: 100px; +} +.min-height-320px { + min-height: 320px; +} + +/* +* MIN WIDTH +*/ + +.min-width-177px { + min-height: 177px; +} + +.disable_help { + text-align: right; + width: 100%; + padding-top: 10px; + padding-bottom: 10px; +} +.top-1em { + top: 1em; +} + +.xx-small { + font-size: xx-small; +} + +#command_div { + padding: 4px 0px; +} + +span, +.size_7pt { + font-size: 7.5pt; +} + +.italic_a { + font-style: italic; + color: #aaaaaa; +} + +.italic { + font-style: italic; +} + +.nunito { + font-family: nunito; +} +.verdana { + font-family: Verdana, Geneva, Tahoma, sans-serif; +} +.lato_bolder { + font-family: "lato-bolder"; +} +.mono { + font-family: mono, monospace; +} +.alert_action_list { + display: grid; + grid-template-columns: 1fr 1fr; + align-items: center; +} + +.flex_center { + display: flex; + align-items: center; +} + +.span_priority { + width: 20px; + height: 10px; + margin-right: 5px; + display: inline-block; +} + +.massive_span { + width: 110px; + display: inline-block; +} + +.align-none-0p { + vertical-align: 0%; + display: none; + font-weight: bolder; +} + +.align-none-10p { + vertical-align: 10%; + display: none; + font-weight: bolder; +} + +#old_span { + display: block; + font-family: verdana, arial; + font-size: 8.5pt; + margin-top: 2px; + font-weight: bolder; +} + +.spinner_rmf { + position: absolute; + top: 0px; + left: 0px; + display: none; + padding: 5px; +} + +.spinner_right { + position: absolute; + top: 0px; + right: 0px; + display: none; + padding: 5px; +} + +.rmf_browser { + height: 100%; + overflow: auto; + background-color: #f4f5f4; + border: 1px solid #e2e2e2; + border-radius: 4px; + padding: 5px; +} + +.rmf_data { + margin: 5px; + width: 40%; + height: 80%; + position: absolute; + top: 0; + right: 20px; + overflow: auto; +} + +.color_white { + color: #fff; +} + +.service_status { + width: 18px; + height: 18px; + margin-bottom: 10px; +} + +.select_module_graph { + width: 3em; + vertical-align: center; + text-align: center; +} + +.list_block_float { + display: block; + float: left; + width: 16px; +} + +.report_info { + border: 1px dashed #999; + padding: 10px 15px; + margin-top: 20px; + margin-bottom: 20px; +} + +.overflow { + overflow: auto; +} + +.overflow-y { + overflow-y: scroll; +} +.overflow_hidden { + overflow: hidden; +} + +.frame_view_meta { + width: 100%; + height: 500px; + overflow: scroll; + margin: 0 auto; +} + +.frame_view_node { + overflow: auto; + margin: 0px auto; + padding: 5px; +} + +.integria_title .ehorus_title { + font-family: lato, "Helvetica Neue", Helvetica, Arial, sans-serif; + color: #515151; +} + +.bolder_6px { + font-weight: bold; + padding: 6px; +} + +.load_enterprise_div { + display: flex; + align-items: center; + padding-top: 20px; + padding-left: 50px; + padding-right: 50px; +} + +.update_manager { + position: relative; + top: 20px; + left: 0px; +} + +.error_warning_licence { + display: flex; + align-items: center; + padding-left: 50px; + padding-right: 50px; + padding-top: 30px; +} + +.error_icon_licence { + float: left; + margin-left: 20px; + margin-top: 20px; + margin-right: 10px; +} + +.newsletter_div { + font-size: 12pt; + margin: 5px 20px; + float: left; + padding-top: 23px; +} + +.max_custom_events { + display: none; + color: #e63c52; + line-height: 200%; +} + +.all_required { + clear: both; + float: right; + margin-right: 30px; + display: none; + color: red; +} + +.font_12_20 { + font-size: 12pt; + margin: 20px; +} + +.font_10 { + font-size: 10pt; +} +.font_11 { + font-size: 11pt; +} + +.font_11px { + font-size: 11px; +} +.font_6pt { + font-size: 6pt; +} + +.register_update_manager { + margin: 5px 0 10px; + float: left; + padding-left: 15px; +} + +.module_gm_groups { + min-width: 60px; + max-width: 5%; + overflow: hidden; + margin-left: auto; + margin-right: auto; + text-align: center; + padding: 5px; + padding-bottom: 10px; + font-size: 18px; + line-height: 25px; +} + +.pandora_logs { + width: 98%; + float: right; + height: 200px; + margin-bottom: 20px; +} + +.underline { + text-decoration: underline; +} + +.w105px { + width: 105px; +} + +.w350px { + width: 350px; +} + +.login_help_dialog { + width: 70%; + font-size: 10pt; + margin: 20px; + float: left; +} + +.ux_console_module { + float: left; + width: 98%; + max-height: 300px; + overflow-y: scroll; +} + +.ux_div_parent { + width: 99%; + height: 75px; + border: 1px solid #e2e2e2; + background-color: #f9faf9; +} + +.ux_module_ok { + width: 10%; + height: 50px; + float: left; + padding-top: 20px; + padding-left: 40px; +} + +.ux_module_failed { + width: 10%; + height: 50px; + float: left; + padding-top: 20px; + padding-left: 40px; +} + +.vc_bg_image { + position: absolute; + top: 0px; + left: 0px; +} + +.map_gis_step2 { + width: 300px; + height: 300px; + border: 1px solid black; + float: left; +} + +#opacidad { + position: fixed; + background: black; + opacity: 0.6; + z-index: 1; +} + +.user_list_ul { + margin-top: 0 !important; + margin-left: auto !important; + padding-left: 10px !important; + list-style-type: none !important; +} + +.snmp_legend { + margin-left: 30px; + line-height: 17px; + vertical-align: top; + width: 120px; +} + +.vertical_25p { + vertical-align: 25%; +} + +.publicenterprise_div { + display: inline; + position: relative; + top: 10px; + left: 0px; + margin-top: -2px !important; + margin-left: 2px !important; +} + +.results_class { + width: 100%; + height: 100%; + overflow: auto; + padding: 10px; + font-size: 14px; + line-height: 16px; + font-family: mono, monospace; + text-align: left; +} + +.span_treeview { + height: 20px; + display: inline-table; + vertical-align: top; +} +.eventtable_class { + width: 100%; + height: 100%; + padding: 0px 0px 0px 0px; + border-spacing: 0px; + margin: 0px 0px 0px 0px; +} + +.tr_eventtable { + font-size: 0px; + height: 0px; + background: #ccc; +} + +.tr_ackuser { + font-size: 0px; + height: 0px; + background: #999; +} + +.critical_zeros { + margin-left: 2%; + color: #fff; + font-size: 12px; + display: inline; + background-color: #e63c52; + position: relative; + height: 80%; + width: 9.4%; + border-radius: 2px; + text-align: center; + padding: 5px; +} + +.critical_vm { + background-color: white; + color: black; + font-size: 12px; + display: inline; + position: relative; + height: 80%; + width: 9.4%; + border-radius: 2px; + text-align: center; + padding: 5px; +} + +.warning_zeros { + margin-left: 2%; + color: #fff; + font-size: 12px; + display: inline; + background-color: #f8db3f; + position: relative; + height: 80%; + width: 9.4%; + border-radius: 2px; + text-align: center; + padding: 5px; +} + +.warning_vm { + background-color: white; + color: black; + font-size: 12px; + display: inline; + position: relative; + height: 80%; + width: 9.4%; + border-radius: 2px; + text-align: center; + padding: 5px; +} + +.normal_zeros { + margin-left: 2%; + color: #fff; + font-size: 12px; + display: inline; + background-color: #84b83c; + position: relative; + height: 80%; + width: 9.4%; + border-radius: 2px; + text-align: center; + padding: 5px; +} +.normal_vm { + background-color: white; + color: black; + font-size: 12px; + display: inline; + position: relative; + height: 80%; + width: 9.4%; + border-radius: 2px; + text-align: center; + padding: 5px; +} + +.unknown_zeros { + margin-left: 2%; + color: #fff; + font-size: 12px; + display: inline; + background-color: #9d9ea0; + position: relative; + height: 80%; + width: 9.4%; + border-radius: 2px; + text-align: center; + padding: 5px; +} + +.unknown_vm { + background-color: white; + color: black; + font-size: 12px; + display: inline; + position: relative; + height: 80%; + width: 9.4%; + border-radius: 2px; + text-align: center; + padding: 5px; +} + +.tr_vm_colors { + text-align: center; + background-color: #9d9ea0; + color: black; + font-weight: bold; +} + +.vm_meta { + width: 100%; + overflow: auto; + margin: 0 auto; + padding: 5px; +} + +.mallowed_create { + display: flex; + flex-direction: row; + justify-content: flex-end; +} + +.wizard_fieldset { + width: 90%; + margin: 5px auto 0; +} + +.component_info { + text-align: left; + margin: 5px auto 0; + width: 400px; + display: none; +} + +.tranaction_ux { + float: left; + width: 38%; + max-height: 630px; + overflow-y: scroll; +} + +.history_data_div { + width: 99%; + height: 108px; + border: 1px solid #e2e2e2; + background-color: #f9faf9; +} + +.history_data_sub_div { + width: 10%; + height: 100px; + float: left; + padding-top: 10px; + padding-left: 20px; +} + +.model_log_viewer { + position: absolute; + bottom: 5px; + right: 0; +} + +.container_left_class { + background-color: #f9faf9; + border: 1px solid #e2e2e2; + border-radius: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + text-align: center; + margin: 0; +} +.title_dialog { + display: none; + width: 100%; + height: 100%; + overflow: auto; + padding: 10px; + font-size: 14px; + line-height: 16px; + font-family: mono, monospace; + text-align: left; +} + +.gauge_class { + float: left; + overflow: hidden; + margin-left: 10px; +} +.flot_container { + display: none; + position: absolute; + background: #fff; + border: solid 1px #aaa; + padding: 2px; +} + +.transparent { + background-color: transparent; +} +#welcome_example { + display: flex; + flex-direction: row; + align-items: center; +} +.modal_sys_alert { + overflow-y: auto; + height: 400px; + min-height: 400px; + max-height: 400px; + padding: 20px; +} +.help_pname { + height: 100%; + margin-top: 25px; + margin-left: 15px; + margin-right: 15px; + background-color: #333; +} +.mrgn_bb_1px { + border-bottom: 1px solid black; +} + +.spinner_rmf { + position: absolute; + top: 0px; + left: 0px; + display: none; + padding: 5px; +} +.spinner_right { +} +.span_licence_key { + vertical-align: middle; + font-weight: bold; + padding-right: 10px; +} + +.div_lk_principal { + display: flex; + justify-content: center; + align-items: center; + margin: 20px 0; +} + +.licence_r_dialog { + display: flex; + align-items: center; + padding-top: 10px; + padding-left: 50px; + padding-right: 50px; +} + +.list_style_square { + list-style-type: square; +} + +.wmware_div { + margin: 0 auto; + width: 500px; + opacity: 0.1; + clear: both; +} + +.th_access_log { + padding: 3px 5px 3px 5px; +} + +.border_solid_black { + border: 0px #000 solid; +} +.border_1px_black { + border: 1px #000 solid; +} +.vertical-50p { + vertical-align: -50%; +} + +.list-type-disc { + list-style-type: disc; +} +.vertical-center { + vertical-align: center; +} +.line-through { + text-decoration: line-through; +} +.left_0p { + left: 0%; +} +.app_mssg { + position: absolute; + bottom: 1em; + clear: both; + color: #888; +} +.pre-wrap { + white-space: pre-wrap; +} +.reporting_ulr_img { + width: 100%; + border-bottom: 1px solid #c2c2c2; + margin: 0px; +} +.serviceap_show_bg { + overflow: hidden; + border: 1px solid #e2e2e2; + background: #f4f4f4; +} +.indent-2em { + text-indent: 2em; +} +.reset_link { + width: 70%; + height: 40px; + margin-right: auto; + margin-left: auto; + margin-top: 20px; + text-align: center; +} +.db_engine { + display: block; + font-family: verdana, arial, sans; + font-size: 8.5pt; + margin-top: 2px; + font-weight: bolder; +} +.comment_box { + border: 1px dotted #ccc; + min-height: 10px; +} +.event_instruction { + display: none; + width: 100%; + height: 100%; + overflow: auto; + padding: 10px; + font-size: 14px; + line-height: 16px; + font-family: mono, monospace; + text-align: left; +} +.comments_form { + min-height: 15px; + padding: 0; + width: 100%; +} + +.actions_treeview { + width: 100%; + text-align: right; + min-width: 300px; + padding-right: 1em; +} +.graphic_agents { + width: 100%; + height: 90px; + display: flex; + flex-direction: row; + justify-content: center; +} + +.icon_ui { + padding-right: 10px; + padding-top: 3px; + vertical-align: top; +} + +.propierties_panel_class { + display: none; + position: absolute; + border: 1px solid lightgray; + padding: 5px; + background: white; + z-index: 90; +} +#label_box_arrow { + text-align: center; + width: 120px; + height: 110px; + margin-top: 50px; +} +#labelposup { + width: 20px; + height: 20px; + margin-top: 10px; + margin-left: 45px; + cursor: pointer; +} +#labelposleft { + position: relative; + top: -5px; + width: 20px; + height: 20px; + margin-top: 15px; + cursor: pointer; +} +.vsmap_div_label { + font-weight: bold; + width: 40px; + height: 20px; + position: relative; + margin-left: 35px; + margin-top: -24px; + cursor: default; +} +#obj_label { + float: left; + margin-top: 3px; + margin-left: 5px; +} +#labelposright { + top: 2px; + width: 20px; + height: 20px; + position: relative; + margin-left: 90px; + margin-top: -24px; + cursor: pointer; +} +#labelposdown { + width: 20px; + height: 20px; + position: relative; + margin-left: 45px; + margin-top: 10px; + cursor: pointer; +} + +#advice_label { + font-style: italic; + z-index: 3; + display: inline; + margin-top: 0px; + float: right; + margin-right: 100px; +} +.steps_vsmap { + display: none; + position: absolute; + z-index: 99; +} +.minimap { + position: absolute; + left: 0px; + top: 0px; + border: 1px solid #bbbbbb; +} +.left_0px { + left: 0px; +} +.top_0px { + top: 0px; +} +.top_10px { + top: 10px; +} +.right_10px { + right: 10px; +} +.holding_networkmap { + display: none; + position: absolute; + right: 50px; + top: 20px; +} +.line_17px { + line-height: 17px; +} +.flex_column { + flex-direction: column; +} +.agent_map_position { + border: 1px solid black; + width: 100%; + height: 30em; +} +.flex_2 { + flex: 2; +} +.result_div { + width: 100%; + height: 100%; + padding: 10px; + font-size: 14px; + line-height: 16px; + font-family: mono, monospace; + text-align: left; +} +.tactical_left_column { + vertical-align: top; + min-width: 30em; + width: 25%; + padding-right: 20px; + vertical-align: top; + padding-top: 0px; +} +.gis_layers { + width: 95%; + background: white; + margin: 20px auto 20px auto; + box-shadow: 10px 10px 5px #000; +} +.map_gis { + z-index: 100; + width: 99%; + height: 500px; + min-height: 500px; + border: 1px solid black; +} +.zindex300 { + z-index: 300; +} +.mpdf_footer { + border-collapse: collapse; + margin: 0; + vertical-align: bottom; + color: #000000; +} +.pass_reporter { + color: #fff; + background: #006600; + padding: 2px; + margin: 2px; +} +.fail_reporter { + color: #fff; + background: #880000; + padding: 2px; + margin: 2px; +} div.stat-win-spinner { width: 100%; height: 300px; diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index 278b61a463..80422b5be5 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -35,7 +35,8 @@ input, textarea, select, .edit_user_comments #textarea_comments, -.discovery_textarea_input { +.discovery_textarea_input, +.selection { background-color: #111; color: #fff; } @@ -43,7 +44,6 @@ select, div#head, #menu_tab li.nomn_high, #menu_tab li.nomn_high span, -.info_box, .white_table_graph_header, .white-box-content, fieldset, @@ -51,7 +51,10 @@ fieldset, table.databox, .legend_basic, .databox_color, -.white_box { +.white_box, +input.sub, +.introjs-tooltip, +button.sub { background-color: #222 !important; color: #fff; } @@ -61,6 +64,18 @@ input[readonly] { color: #a2a2a2 !important; } +.switch_radio_button label { + background-color: #111; + color: white; + line-height: 1; + text-align: center; + padding: 7px 14px; + margin-right: -1px; + border: 1px solid #cbcbcb; + border-radius: 4px; + transition: all 0.1s ease-in-out; +} + .box-shadow { box-shadow: none; } @@ -91,7 +106,14 @@ textarea:disabled { } .sort_arrow img { - filter: brightness(2.5) contrast(3.5); + filter: brightness(4.5) contrast(3.5); +} + +.default_container { + font-weight: bold; + background-color: #222; + border: 1px solid #e2e2e2; + margin-bottom: 4px; } table.widget_list tr.datos, @@ -114,7 +136,8 @@ input:-webkit-autofill { } /* messages */ -.container { +.container, +input.pure_full { background-color: #222; } @@ -122,7 +145,8 @@ input:-webkit-autofill { background-color: #888; } -.fileupload_form { +.fileupload_form, +#button-pure { background-color: #222 !important; } @@ -148,6 +172,7 @@ ol.steps li.visited a { /* White text */ a, +label, #menu_tab_left li a, #menu_tab_left li span, fieldset legend, @@ -158,6 +183,7 @@ h1, h2, h3, h4, +.info_table, .info_table > tbody > tr > th, .info_table > thead > tr > th, .info_table > thead > tr > th a, @@ -174,10 +200,6 @@ ol.steps li a { } /* Tabs icons change color */ -#menu_tab li.nomn img, -#menu_tab li img { - filter: invert(100%); -} /* menu.css */ .operation { @@ -261,7 +283,7 @@ table.table_modal_alternate tr:nth-child(even) td { .action_buttons a[href] img, .action_buttons input[type="image"], .action_button_img { - filter: brightness(2.5) contrast(50%); + filter: brightness(4.5) contrast(50%); } a.pandora_pagination { @@ -299,7 +321,7 @@ ul.tree-group li.tree-node div.node-content img:not(.module-status):not(.agent-status):not(.agent-alerts-fired) { - filter: brightness(2); + filter: invert(100%); } /* login.css */ @@ -347,7 +369,8 @@ table#diagnostic_info tbody td div { /* jquery custom */ .ui-dialog, .ui-widget-content { - background-color: #111; + background-color: #222 !important; + color: #fff; } .ui-widget-content, .ui-widget-content a { @@ -366,6 +389,9 @@ table#diagnostic_info tbody td div { color: #fff !important; } +#cancel_btn_dialog { + background-color: red; +} .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { @@ -395,7 +421,8 @@ ul.ui-tabs-nav.ui-corner-all.ui-helper-reset.ui-helper-clearfix.ui-widget-header /* notifications */ #notification-wrapper::before { - border-bottom-color: #111; + border-bottom-color: #222 !important; + color: #fff; } #notification-wrapper { @@ -406,6 +433,7 @@ ul.ui-tabs-nav.ui-corner-all.ui-helper-reset.ui-helper-clearfix.ui-widget-header background: #222; } +pre, .notification-subtitle { color: #fff; } @@ -417,7 +445,7 @@ div#box_online * { /* discovery.css */ #text_wizard { - color: #555; + color: white; } /* news dialog */ @@ -438,3 +466,393 @@ div#form_activate_licence #code { border: 0px; background-color: #222; } + +.backgrund_primary_important { + background-color: #111 !important; +} + +.w16px { + padding-left: 16px; + padding-right: 16px; + padding-top: 16px; +} + +.sound_div_background { + background-color: #222 !important; +} + +/* + * --------------------------------------------------------------------- + * - RIGHT MENU SECTION - + * --------------------------------------------------------------------- + */ +#menu_tab_frame, +#menu_tab_frame_view, +#menu_tab_frame_view_bc { + display: flex; + align-items: flex-end; + justify-content: space-between; + border-bottom: 2px solid #82b92e; + min-height: 50px; + width: calc(100% + 3em); + padding-right: 0px; + margin-bottom: 20px; + height: 50px; + box-sizing: border-box; + background-color: #111 !important; + border-top-right-radius: 7px; + border-top-left-radius: 7px; + box-shadow: 1px 1px 4px rgba(160, 160, 160, 0.514); + margin-left: -3em; +} + +.info_box { + background: #222 !important; + box-shadow: 0px 0px 15px -10px #888; + margin-top: 10px; + margin-bottom: 10px; + padding: 0px 5px 5px 10px; + border-color: #e2e2e2; + border-style: solid; + border-width: 1px; + width: 100%; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} + +div.data_container:not(:hover) { + box-shadow: 2px 2px 10px #80ba27; +} + +input[type="submit"].submit-next:hover, +button.submit-next.ui-button.ui-corner-all.ui-widget:hover, +input[type="button"].submit-next:hover { + background: #82b92e; +} + +div.nf { + background: url(../../images/information_alerts.png) no-repeat scroll 0 50% + transparent; + margin-left: 7px; + padding: 8px 1px 6px 25px; +} +/*Font header feedback*/ +form#modal_form_feedback { + padding: 10px; +} + +form#modal_form_feedback label { + margin-bottom: 10px; + color: white; + font-weight: bold; + font-size: 10pt; +} + +form#modal_form_feedback input[type="email"] { + background-color: transparent; + border: none; + border-radius: 0; + border-bottom: 1px solid #ccc; + font-family: "lato-bolder", "Open Sans", sans-serif; + font-weight: lighter; + padding: 0px 0px 2px 0px; + box-sizing: border-box; + margin-bottom: 4px; +} + +form#modal_form_feedback ul.wizard li { + padding-bottom: 10px; + padding-top: 10px; +} + +form#modal_form_feedback ul.wizard li > label:not(.p-switch) { + width: 250px; + vertical-align: top; + display: inline-block; +} + +form#modal_form_feedback ul.wizard li > textarea { + width: 600px; + height: 15em; + display: inline-block; + font-family: monospace; +} + +#categories_library .card_category a:hover { + color: #82b92e; + text-decoration: none; +} + +#library_main_content div.library_main_category:hover { + border: 1px solid #e2e2e2; + background-color: #222; + border-radius: 4px; + padding: 19px; + cursor: pointer; +} + +#library_main_content div.library_main_category a:hover { + color: white; +} + +.textodialogo { + margin-left: 0px; + color: #333; + padding: 20px; + font-size: 9pt; +} + +/* end of classes for event priorities */ +div#main_pure { + background-color: #111; + text-align: left; + margin-bottom: 25px; + margin-top: 30px; + margin-left: 10px; + margin-right: 10px; + height: 1000px; + width: 98%; + position: static; +} + +body.pure { + background-color: #111; +} + +form ul.form_flex { + display: flex; + flex-flow: row wrap; + flex-direction: row; + align-content: center; + justify-content: space-around; + border: 1px solid #e2e2e2; + border-radius: 5px; + padding: 20px; + background: #222 !important; +} + +.invert_filter { + filter: invert(100%); +} + +.graph_conteiner_inside, +.container_table, +.second_background { + background-color: #222; +} + +.content-widget .container-center { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100%; + width: 100%; + background-color: #222; +} + +.container-layout { + border-radius: 5px; + border: 3px dashed #fff; + background: #222; + padding: 10px 0px 10px 0px; +} + +.bullet { + background-color: #ddd; + border-radius: 4px; +} + +.legendLabel { + color: black; +} + +.incident_table { + position: absolute; + top: 5px; + right: 5px; + font-size: smaller; + color: white; +} + +.cluetip-default { + background-color: #111 !important; + text-align: left; +} + +.cluetip-default #cluetip-outer { + position: relative; + margin: 0; + background-color: #222; +} + +.cluetip-default h3 { + margin: 0 0 5px; + padding: 8px 10px 4px; + font-size: 1.1em; + font-weight: bold; + background-color: #111 !important; + color: #fff; +} + +.cluetip-default h3#cluetip-title { + display: none; + height: 0px; + margin: 0; + padding: 0; + color: #fff; +} + +.cluetip-default #cluetip-title a { + color: #fff; + font-size: 0.95em; +} + +.cluetip-default #cluetip-inner { + padding: 10px; +} + +.cluetip-default div#cluetip-close { + text-align: right; + margin: 0 5px 5px; + color: #900; +} + +.cluetip-default ul { + text-align: left; +} +.card { + border: 1px solid #e2e2e2; + background-color: #222; + display: flex; + flex-direction: column; + padding: 0; + border-radius: 4px; + text-align: center; + font-size: 16px; + justify-content: center; +} + +.card_link_button:hover { + cursor: pointer; + padding: 10px 20px; + background-color: #eaeaea; + color: #111; +} + +.sidebar_library { + min-width: 360px; + margin-left: 50px; + padding: 0px 0px 0px 30px; + background-color: #222; + border: 1px solid #e2e2e2; + border-radius: 4px; +} +.category_link:hover { + color: #82b92e; +} + +#container_servicemap_legend { + position: absolute; + background: #fff; + margin-top: 10px; + right: 2px; + border: 1px solid #e2e2e2; + border-radius: 5px; + padding: 10px; + opacity: 0.9; + color: #111; +} + +.notification-subtitle_black { + color: #000; +} + +.no_invert_filter { + filter: none; +} + +input:disabled { + background-color: #666; +} +#file_table_modal .create_folder, +#file_table_modal .create_text_file, +#file_table_modal .upload_file { + width: 33%; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + margin-right: 2px; + background-color: #222 !important; +} +div.criticity { + width: 150px; + height: 2em; + color: black; + text-align: center; + border-radius: 5px; + font-size: 0.8em; + padding: 5px; + margin: 0; + display: table-cell; + vertical-align: middle; +} + +input[type="submit"].submit-next, +button.submit-next.ui-button.ui-corner-all.ui-widget, +input[type="button"].submit-next { + color: #82b92e; + border: 1px solid #82b92e; + background-color: #222 !important; + + padding: 5px; + font-size: 1.3em; + margin: 0.5em 1em 0.5em 0; + cursor: pointer; + text-align: center; + height: 30px; + width: auto; + min-width: 90px; +} + +input[type="submit"].submit-cancel, +button.submit-cancel.ui-button.ui-corner-all.ui-widget, +button.submit-cancel { + color: #fb4444; + border: 1px solid #fb4444; + background-color: #222 !important; + padding: 5px; + font-size: 1.3em; + margin: 0.5em 1em 0.5em 0; + cursor: pointer; + text-align: center; + height: 30px; + width: auto; + min-width: 90px; +} + +input[type="submit"].submit-cancel:hover, +button.submit-cancel.ui-button.ui-corner-all.ui-widget:hover, +button.submit-cancel:hover { + background: #fb4444; +} +.submit-next:hover { + background: #82b92e; +} + +div#dashboard-controls { + position: fixed; + z-index: 1; + top: 10px; + right: 10px; + width: 600px; + height: 70px; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + align-items: center; + background-color: #222; + border-radius: 15px; + padding: 10px; +} diff --git a/pandora_console/include/styles/pandora_green_old.css b/pandora_console/include/styles/pandora_green_old.css deleted file mode 100644 index f052bfb04d..0000000000 --- a/pandora_console/include/styles/pandora_green_old.css +++ /dev/null @@ -1,185 +0,0 @@ -/* - -Author: The Pandora FMS team -Name: Green old theme -Description: The default Pandora FMS theme layout - -// Pandora FMS - http://pandorafms.com -// ========================================================== -// Copyright (c) 2004-2021 Artica Soluciones Tecnológicas S.L - -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; version 2 - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -/* menu.css */ -.operation, -#menu_full, -.godmode, -.operation .menu_icon ul.submenu > li, -.godmode .menu_icon ul.submenu > li, -.sub_subMenu { - background-color: #fff; -} - -.operation .selected, -.operation .menu_icon:hover, -.godmode .selected, -.godmode .menu_icon:hover, -.godmode .submenu_not_selected:hover, -.godmode .submenu_selected:hover, -.operation .sub_subMenu:hover, -.operation .menu_icon ul.submenu > li:hover, -.godmode .menu_icon ul.submenu > li:hover { - background-color: #343434 !important; - color: #fff; -} - -ul.subsubmenu li { - background-color: #82b92e; -} - -.godmode { - border-top: 1px solid #ddd; -} - -.menu li ul { - border: 1px solid #eee; -} - -#title_menu, -.submenu_text { - color: #666; -} -#title_menu:hover, -.submenu_text:hover { - color: #b9b9b9; -} - -.button_collapse, -div#foot { - background-color: #82b92e; -} - -/* footer */ -div#foot a, -div#foot span { - color: #fff; -} - -/* Tabs */ -#menu_tab_frame, -#menu_tab_frame_view, -#menu_tab_frame_view_bc { - background-color: #82b92e; -} - -#menu_tab li.nomn_high, -#menu_tab li.nomn_high span { - box-shadow: inset 0px 4px #fff; - background-color: transparent; -} -#menu_tab li:hover { - box-shadow: inset 0px 4px #fff; - background-color: #ffffff38; -} - -#menu_tab_left li a, -#menu_tab_left li span { - color: #fff; -} - -#menu_tab li.nomn img, -#menu_tab li img { - filter: brightness(4.5); -} - -/* General styles */ -body, -div#page { - background: #ecfad6; -} - -#top_btn { - background-color: #343434; -} - -#top_btn:hover { - background-color: transparent; -} - -.breadcrumb_link.selected, -.breadcrumb_active { - color: #ecfad6; -} - -.sort_arrow img { - filter: brightness(2.5) contrast(3.5); -} - -table.widget_list tr.datos, -table.widget_list tr.datos2, -table.widget_list td.datos, -table.widget_list td.datos2 { - background-color: #ecfad6; -} - -/* tables.css */ -.info_table tr:first-child > th { - background-color: #343434; - color: #fff; -} - -.info_table > tbody > tr > th, -.info_table > thead > tr > th, -.info_table > thead > tr > th a, -.info_table > thead > tr > th > span { - color: #fff; -} - -/* agent view*/ -.agent_details_header, -.white_table tr:first-child > th, -.white_table_graph_header { - background-color: #343434; - color: #fff; - border-top-left-radius: 5px; - border-top-right-radius: 5px; -} - -.white_table thead tr:first-child > th { - border-radius: 0; -} - -.white_table thead tr:first-child > th:first-child { - border-top-left-radius: 4px; -} - -.white_table thead tr:first-child > th:last-child { - border-top-right-radius: 4px; -} - -.buttons_agent_view a img { - background-color: #fff; -} - -.breadcrumbs_container, -.breadcrumb_link, -div.agent_details_agent_alias * { - color: #fff; -} - -/* jquery custom */ -.ui-dialog, -.ui-widget-content { - background-color: #ecfad6; -} diff --git a/pandora_console/include/styles/select2_dark.min.css b/pandora_console/include/styles/select2_dark.min.css new file mode 100644 index 0000000000..91278f09b3 --- /dev/null +++ b/pandora_console/include/styles/select2_dark.min.css @@ -0,0 +1,652 @@ +.select2-container { + box-sizing: border-box; + display: inline-block; + margin: 0; + position: relative; + vertical-align: middle; +} +.select2-container .select2-selection--single { + box-sizing: border-box; + cursor: pointer; + display: block; + height: 28px; + user-select: none; + -webkit-user-select: none; +} +.select2-container .select2-selection--single .select2-selection__rendered { + display: block; + padding-left: 8px; + padding-right: 20px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.select2-container .select2-selection--single .select2-selection__clear { + position: relative; +} +.select2-container[dir="rtl"] + .select2-selection--single + .select2-selection__rendered { + padding-right: 8px; + padding-left: 20px; +} +.select2-container .select2-selection--multiple { + box-sizing: border-box; + cursor: pointer; + display: block; + min-height: 32px; + user-select: none; + -webkit-user-select: none; +} +.select2-container .select2-selection--multiple .select2-selection__rendered { + display: inline-block; + overflow: hidden; + padding-left: 8px; + text-overflow: ellipsis; + white-space: nowrap; +} +.select2-container .select2-search--inline { + float: left; +} +.select2-container .select2-search--inline .select2-search__field { + box-sizing: border-box; + border: none; + font-size: 100%; + margin-top: 5px; + padding: 0; +} +.select2-container + .select2-search--inline + .select2-search__field::-webkit-search-cancel-button { + -webkit-appearance: none; +} +.select2-dropdown { + background-color: #111 !important; + border: 1px solid #aaa; + border-radius: 4px; + box-sizing: border-box; + display: block; + position: absolute; + left: -100000px; + width: 100%; + z-index: 1051; +} +.select2-results { + display: block; +} +.select2-results__options { + list-style: none; + margin: 0; + padding: 0; +} +.select2-results__option { + padding: 6px; + user-select: none; + -webkit-user-select: none; +} +.select2-results__option[aria-selected] { + cursor: pointer; +} +.select2-container--open .select2-dropdown { + left: 0; +} +.select2-container--open .select2-dropdown--above { + border-bottom: none; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} +.select2-container--open .select2-dropdown--below { + border-top: none; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.select2-search--dropdown { + display: block; + padding: 4px; +} +.select2-search--dropdown .select2-search__field { + padding: 4px; + width: 100%; + box-sizing: border-box; +} +.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button { + -webkit-appearance: none; +} +.select2-search--dropdown.select2-search--hide { + display: none; +} +.select2-close-mask { + border: 0; + margin: 0; + padding: 0; + display: block; + position: fixed; + left: 0; + top: 0; + min-height: 100%; + min-width: 100%; + height: auto; + width: auto; + opacity: 0; + z-index: 99; + background-color: #fff; + filter: alpha(opacity=0); +} +.select2-hidden-accessible { + border: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(50%) !important; + clip-path: inset(50%) !important; + height: 1px !important; + overflow: hidden !important; + padding: 0 !important; + position: absolute !important; + width: 1px !important; + white-space: nowrap !important; +} +.select2-container--default .select2-selection--single { + background-color: #111; + border: 1px solid #aaa; + border-radius: 4px; +} +.select2-container--default + .select2-selection--single + .select2-selection__rendered { + line-height: 28px; +} +.select2-container--default + .select2-selection--single + .select2-selection__clear { + cursor: pointer; + float: right; + font-weight: bold; +} +.select2-container--default + .select2-selection--single + .select2-selection__placeholder { + color: #111 !important; +} +.select2-container--default + .select2-selection--single + .select2-selection__arrow { + height: 26px; + position: absolute; + top: 1px; + right: 1px; + width: 20px; +} +.select2-container--default + .select2-selection--single + .select2-selection__arrow + b { + border-color: #888 transparent transparent transparent; + border-style: solid; + border-width: 5px 4px 0 4px; + height: 0; + left: 50%; + margin-left: -4px; + margin-top: -2px; + position: absolute; + top: 50%; + width: 0; +} +.select2-container--default[dir="rtl"] + .select2-selection--single + .select2-selection__clear { + float: left; +} +.select2-container--default[dir="rtl"] + .select2-selection--single + .select2-selection__arrow { + left: 1px; + right: auto; +} +.select2-container--default.select2-container--disabled + .select2-selection--single { + background-color: #666; + cursor: default; +} +.select2-container--default.select2-container--disabled + .select2-selection--single + .select2-selection__clear { + display: none; +} +.select2-container--default.select2-container--open + .select2-selection--single + .select2-selection__arrow + b { + border-color: transparent transparent #888 transparent; + border-width: 0 4px 5px 4px; +} +.select2-container--default .select2-selection--multiple { + background-color: #111 !important; + border: 1px solid #aaa; + border-radius: 4px; + cursor: text; +} +.select2-container--default + .select2-selection--multiple + .select2-selection__rendered { + box-sizing: border-box; + list-style: none; + margin: 0; + padding: 0 5px; + width: 100%; +} +.select2-container--default + .select2-selection--multiple + .select2-selection__rendered + li { + list-style: none; +} +.select2-container--default + .select2-selection--multiple + .select2-selection__clear { + cursor: pointer; + float: right; + font-weight: bold; + margin-top: 5px; + margin-right: 10px; + padding: 1px; +} +.select2-container--default + .select2-selection--multiple + .select2-selection__choice { + background-color: #e4e4e4; + border: 1px solid #aaa; + border-radius: 4px; + cursor: default; + float: left; + margin-right: 5px; + margin-top: 5px; + padding: 0 5px; + color: #111; +} +.select2-container--default + .select2-selection--multiple + .select2-selection__choice__remove { + color: #999; + cursor: pointer; + display: inline-block; + font-weight: bold; + margin-right: 2px; +} +.select2-container--default + .select2-selection--multiple + .select2-selection__choice__remove:hover { + color: #333; +} +.select2-container--default[dir="rtl"] + .select2-selection--multiple + .select2-selection__choice, +.select2-container--default[dir="rtl"] + .select2-selection--multiple + .select2-search--inline { + float: right; +} +.select2-container--default[dir="rtl"] + .select2-selection--multiple + .select2-selection__choice { + margin-left: 5px; + margin-right: auto; +} +.select2-container--default[dir="rtl"] + .select2-selection--multiple + .select2-selection__choice__remove { + margin-left: 2px; + margin-right: auto; +} +.select2-container--default.select2-container--focus + .select2-selection--multiple { + border: solid black 1px; + outline: 0; +} +.select2-container--default.select2-container--disabled + .select2-selection--multiple { + background-color: #eee; + cursor: default; +} +.select2-container--default.select2-container--disabled + .select2-selection__choice__remove { + display: none; +} +.select2-container--default.select2-container--open.select2-container--above + .select2-selection--single, +.select2-container--default.select2-container--open.select2-container--above + .select2-selection--multiple { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.select2-container--default.select2-container--open.select2-container--below + .select2-selection--single, +.select2-container--default.select2-container--open.select2-container--below + .select2-selection--multiple { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} +.select2-container--default .select2-search--dropdown .select2-search__field { + border: 1px solid #aaa; +} +.select2-container--default .select2-search--inline .select2-search__field { + background: transparent; + border: none; + outline: 0; + box-shadow: none; + -webkit-appearance: textfield; +} +.select2-container--default .select2-results > .select2-results__options { + max-height: 200px; + overflow-y: auto; +} +.select2-container--default .select2-results__option[role="group"] { + padding: 0; +} +.select2-container--default .select2-results__option[aria-disabled="true"] { + color: #999; +} +.select2-container--default .select2-results__option[aria-selected="true"] { + background-color: #111; +} +.select2-container--default .select2-results__option .select2-results__option { + padding-left: 1em; +} +.select2-container--default + .select2-results__option + .select2-results__option + .select2-results__group { + padding-left: 0; +} +.select2-container--default + .select2-results__option + .select2-results__option + .select2-results__option { + margin-left: -1em; + padding-left: 2em; +} +.select2-container--default + .select2-results__option + .select2-results__option + .select2-results__option + .select2-results__option { + margin-left: -2em; + padding-left: 3em; +} +.select2-container--default + .select2-results__option + .select2-results__option + .select2-results__option + .select2-results__option + .select2-results__option { + margin-left: -3em; + padding-left: 4em; +} +.select2-container--default + .select2-results__option + .select2-results__option + .select2-results__option + .select2-results__option + .select2-results__option + .select2-results__option { + margin-left: -4em; + padding-left: 5em; +} +.select2-container--default + .select2-results__option + .select2-results__option + .select2-results__option + .select2-results__option + .select2-results__option + .select2-results__option + .select2-results__option { + margin-left: -5em; + padding-left: 6em; +} +.select2-container--default + .select2-results__option--highlighted[aria-selected] { + background-color: #5897fb; + color: white; +} +.select2-container--default .select2-results__group { + cursor: default; + display: block; + padding: 6px; +} +.select2-container--classic .select2-selection--single { + background-color: #f7f7f7; + border: 1px solid #aaa; + border-radius: 4px; + outline: 0; + background-image: -webkit-linear-gradient(top, #fff 50%, #eee 100%); + background-image: -o-linear-gradient(top, #fff 50%, #eee 100%); + background-image: linear-gradient(to bottom, #fff 50%, #eee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); +} +.select2-container--classic .select2-selection--single:focus { + border: 1px solid #5897fb; +} +.select2-container--classic + .select2-selection--single + .select2-selection__rendered { + color: #444; + line-height: 28px; +} +.select2-container--classic + .select2-selection--single + .select2-selection__clear { + cursor: pointer; + float: right; + font-weight: bold; + margin-right: 10px; +} +.select2-container--classic + .select2-selection--single + .select2-selection__placeholder { + color: #999; +} +.select2-container--classic + .select2-selection--single + .select2-selection__arrow { + background-color: #ddd; + border: none; + border-left: 1px solid #aaa; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + height: 26px; + position: absolute; + top: 1px; + right: 1px; + width: 20px; + background-image: -webkit-linear-gradient(top, #eee 50%, #ccc 100%); + background-image: -o-linear-gradient(top, #eee 50%, #ccc 100%); + background-image: linear-gradient(to bottom, #eee 50%, #ccc 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); +} +.select2-container--classic + .select2-selection--single + .select2-selection__arrow + b { + border-color: #888 transparent transparent transparent; + border-style: solid; + border-width: 5px 4px 0 4px; + height: 0; + left: 50%; + margin-left: -4px; + margin-top: -2px; + position: absolute; + top: 50%; + width: 0; +} +.select2-container--classic[dir="rtl"] + .select2-selection--single + .select2-selection__clear { + float: left; +} +.select2-container--classic[dir="rtl"] + .select2-selection--single + .select2-selection__arrow { + border: none; + border-right: 1px solid #aaa; + border-radius: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + left: 1px; + right: auto; +} +.select2-container--classic.select2-container--open .select2-selection--single { + border: 1px solid #5897fb; +} +.select2-container--classic.select2-container--open + .select2-selection--single + .select2-selection__arrow { + background: transparent; + border: none; +} +.select2-container--classic.select2-container--open + .select2-selection--single + .select2-selection__arrow + b { + border-color: transparent transparent #888 transparent; + border-width: 0 4px 5px 4px; +} +.select2-container--classic.select2-container--open.select2-container--above + .select2-selection--single { + border-top: none; + border-top-left-radius: 0; + border-top-right-radius: 0; + background-image: -webkit-linear-gradient(top, #fff 0%, #eee 50%); + background-image: -o-linear-gradient(top, #fff 0%, #eee 50%); + background-image: linear-gradient(to bottom, #fff 0%, #eee 50%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); +} +.select2-container--classic.select2-container--open.select2-container--below + .select2-selection--single { + border-bottom: none; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + background-image: -webkit-linear-gradient(top, #eee 50%, #fff 100%); + background-image: -o-linear-gradient(top, #eee 50%, #fff 100%); + background-image: linear-gradient(to bottom, #eee 50%, #fff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); +} +.select2-container--classic .select2-selection--multiple { + background-color: #111 !important; + border: 1px solid #aaa; + border-radius: 4px; + cursor: text; + outline: 0; +} +.select2-container--classic .select2-selection--multiple:focus { + border: 1px solid #5897fb; +} +.select2-container--classic + .select2-selection--multiple + .select2-selection__rendered { + list-style: none; + margin: 0; + padding: 0 5px; +} +.select2-container--classic + .select2-selection--multiple + .select2-selection__clear { + display: none; +} +.select2-container--classic + .select2-selection--multiple + .select2-selection__choice { + background-color: #e4e4e4; + border: 1px solid #aaa; + border-radius: 4px; + cursor: default; + float: left; + margin-right: 5px; + margin-top: 5px; + padding: 0 5px; +} +.select2-container--classic + .select2-selection--multiple + .select2-selection__choice__remove { + color: #888; + cursor: pointer; + display: inline-block; + font-weight: bold; + margin-right: 2px; +} +.select2-container--classic + .select2-selection--multiple + .select2-selection__choice__remove:hover { + color: #555; +} +.select2-container--classic[dir="rtl"] + .select2-selection--multiple + .select2-selection__choice { + float: right; + margin-left: 5px; + margin-right: auto; +} +.select2-container--classic[dir="rtl"] + .select2-selection--multiple + .select2-selection__choice__remove { + margin-left: 2px; + margin-right: auto; +} +.select2-container--classic.select2-container--open + .select2-selection--multiple { + border: 1px solid #5897fb; +} +.select2-container--classic.select2-container--open.select2-container--above + .select2-selection--multiple { + border-top: none; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.select2-container--classic.select2-container--open.select2-container--below + .select2-selection--multiple { + border-bottom: none; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} +.select2-container--classic .select2-search--dropdown .select2-search__field { + border: 1px solid #aaa; + outline: 0; +} +.select2-container--classic .select2-search--inline .select2-search__field { + outline: 0; + box-shadow: none; +} +.select2-container--classic .select2-dropdown { + background-color: #fff; + border: 1px solid transparent; +} +.select2-container--classic .select2-dropdown--above { + border-bottom: none; +} +.select2-container--classic .select2-dropdown--below { + border-top: none; +} +.select2-container--classic .select2-results > .select2-results__options { + max-height: 200px; + overflow-y: auto; +} +.select2-container--classic .select2-results__option[role="group"] { + padding: 0; +} +.select2-container--classic .select2-results__option[aria-disabled="true"] { + color: grey; +} +.select2-container--classic + .select2-results__option--highlighted[aria-selected] { + background-color: #3875d7; + color: #fff; +} +.select2-container--classic .select2-results__group { + cursor: default; + display: block; + padding: 6px; +} +.select2-container--classic.select2-container--open .select2-dropdown { + border-color: #5897fb; +} diff --git a/pandora_console/index.php b/pandora_console/index.php index 39fed07752..09cbdb7962 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1247,10 +1247,10 @@ if ($searchPage) { } if ($config['pure'] == 0) { - echo '<div style="clear:both"></div>'; + echo '<div id="both"></div>'; echo '</div>'; // Main. - echo '<div style="clear:both"> </div>'; + echo '<div id="both"> </div>'; echo '</div>'; // Page (id = page). } else { @@ -1275,7 +1275,7 @@ if ($config['pure'] == 0) { echo '</div>'; // Container div. echo '</div>'; - echo '<div style="clear:both"></div>'; + echo '<div id="both"></div>'; echo '<div id="foot">'; include 'general/footer.php'; diff --git a/pandora_console/log/.console.log.swp b/pandora_console/log/.console.log.swp new file mode 100644 index 0000000000000000000000000000000000000000..58aaa50c9a1026a769778754f6e5832817edd783 GIT binary patch literal 28672 zcmeI*3wRXO6~OUDe4$bmRNgWmRs{3d%_by^+6F303kX7hO6@w?og}N9oz3iQ0IgDs zFBA%5AGTU+tyIux)z)fTtF?katJY#$AGHb<L|ak7w}9#0?74>hha?-zXR)1p-!*|> z&Yd}D?%thY_KwxX)5lLVMimBq>gx!f@4+hy&z;$8xG#CU&*#{-oB8X`zUnR4EJ&J( zsO^|F^{IA$y{OT2ie}HAT~z1R$BQH&9I+EAJ8l)l?b;&wxlsMwZZ95q74Rz1<qD+T znu7A4RV4v`aVGY-p+k(`y{fw0jThimz^i~)0j~mH1-uG)74RzHRluvjr?&!bvb%4d z+Wqd5!nDt1f9NKE*5CJ+KVNis_J?8c1LV(-?U(&w9DG-E_G_s8eI0x!{3`ekcoX~s z_!IE=;alPF!Fx&KI{$a!LHIl3hV(lf{<io)@kaPt@TKrK#rsM8o$&4AeZ*J8w}}rD ze*wM~+us3y1Mz+2ILoj3UPpWoz6CxR{u=s^!~cc&1@M2um%(2ZKUVU882$?4UxaTK z*Y(>0e;M(8<prhdvk4xAZ$$r-;V&V+9{vyb0{8}To&PfUdc;2he^FfL|04Va#P5Xv z9o|<a6kVU^(SH#BH^fhYKL@XeKP#^DUjTmw@wdXC7T5Vd0{<)G*Teq;-wFRS`tK_f zs;<vdh%be&gHM6~NnGb&4}TKzSHu4(uJgYY{siJz!XJmPhd+k?cf$XG_<jdwU&y*X zzlWE?*NW@>r@+@B-iEIh*ZE%!e-!b{;j7>);VaSqdiW!V-v$32yx&2&^?6ua=U)o{ zE#jxb9}?I3+wcbwzYzW#_;UCI=zk^r*NEQ${}p@}{FmZ7|9%JO*5`i2kAmMPuJfM? z{{`Zc@O$A4;Xg<J%i%vm{3`f8@D1?0#dZF>;CCT@K#$z|{8U`$KMH;);-|syfG6Qi z=zk&ncEqoM-v(a=Um>pZ-vD2Z_-6R6;yV8Uhve4hCx|bHFN05m--7;=@E;?75&UNO z3iyx2b^fd1HzEEd_z%T({>|_k5kK(I-1__gUJkzj{ZE5mkN5`o_u-4+-xJsQuYg~N z_|@?5itGGef`13`zQc0!|2BLe{9EY19DXh0tKduF4e)Ekb^eRsOAvoMe6hIBe>MD@ zh~Efb1o!pKt<OUAKM;O3;w#`+!K>g4#C84+@GB9&7=DGg&i{7!<%nMczYM++ekuC* z;W~Ui;s?RMAugxgz6yA@+HL=9Mt#1K>aU;5kh=eWocziJb)A2VYWJ#sCabnV?XRm^ zvpTNlsCI&CkE+*zsoHim7hI;=GiuJfS+z>lo>uQKlT^D+y$`#p^;T_#I%hdnwFY%= zH(Isl)H!fcwasd$$Ewy-wI+34HAc1j)QMdW)iV3lvTw3qd3>AYA5~D9t}O@@2Z{}U zNvNbWR8nD_mUir<RW!zO;<3az#^f_58&h2~a=zg@X2c5l@{XEeI*C}KHe?uM9m{mp zk4Dt0G1GC^u&d9rBCb*6*!6~0pLFLMjb=P;8L@=X@n;`u?P$FnwTjHR<+!Qrw{Sd` zato`|v3S&S3X^q7!%i4#-z}r0WKVnR59}#N!zd{<GM~2yC!JWr4ZCJ_+!}sjC;MY1 zT+2}bDXT~o%~4s}iIxv&s1Ig@8)Me&>>h>6io3KcfkIV^NIV_2!geCk`EJA#QEN^n z^^o81FYijy{zBuzdNY=|sMAziw^5w`209x#dp;JeBWHX<4UAaSFrC_Ty(+emN+*-? zm=!f@Y$ww!Gg7B^z0-js<t(a6CnA}HlnQ5#b<SuBln1+Xkkoj|9OYWe4X5n1lgDAo zceDg6x^xV^(IWHAUK=gD9jLYgM;-K>aT5&q@q!41N&+E&>Ao<{bhs;fb>MWkrM)rD zbg+RArkM_+_L*s>gMDmyTl&PNnGScv8!h|XG~;i7nhB~?h}8H*<=6?GzO%QUxv00; zbjxW(u(<7<*1^WqTcKk$q+?F!rz*8pLY*hYi!vu2;g7ag&UapwSo^uPj>JxLYdvf6 z7ncUw%+nogWbaH_?QWpMDXZP6Ph`q6ld+sPxWK5=t`x2`bMhKC9mkxT$Kh!?%iZm? zOg0`0jN)l#heN^}?k%4U|DPT1yNxJoPEuVwri`TNnCcVtmSY4A*EXsxb(NsT+(|~t zRabDeMs2LoN_?CvgSO+pIOcPc^IGoz%k9jMuK)FY75!cQd7*izT!0Ug@7h0<U(h}d z?%n^-7RbB*pB)(9{r_wo^y|mF|DSz*=zm}J?*HeG5AXhe?)>T9|IZyC-u?gF@!{S7 z&mAA${r~Lv(D(nm`~SJ)!@K{VJAZih|8vKOcmF>-KJ@wNzIy*(Uti{X|6gDKUy@C) zS<jDE`24`v#dZHF_&jl4pT+Qt5#I#A2)+jXHT1s`ej(z!$vOpneRTnR5PYt<&c6aa z2k|rDv&D7(DR?8|m%!8TCb*0K*T7SV-voEy-PC72GGDqr4dOcgLGUEvN5gG#o&OAY z0`V@q9=-$~NB>Rm^AW!meja=iJSML5?{;Kved-WD7+x!`^B)bbLHta(1$W_5^uGii zLHr%?YWP~XDX#P11V0z?-FxNMCoHb>9}NF0;!lR31D^^13i@~9vk-p`{A~Cg@Gpz& z{MW)~B7QS`hPckZd+*%(Oh>!{uM!`e4fCB0pC+z9pEV0URb2o3>&5W1#E+N$Z-P%j z{3`fl_-6Q-@E%9y=06EO5<U?=5k5g&=WoNmByLE4OW|LH-vb{HUk5(}+usg9U3`da z|LCK0^B;%)%iyQMr^CM>u8(gcd@SOxgO7pV53htj1OGg>{~r8vi0^+)ZvLmjL-14J zXTwhx*ZE%nAC34M;34<}@CtD~zMhAd!<*rw(Em_bh^OCQ%iv?+rQ&-0RKtVt`S23- ze+xVSUkUf4|BdisaXmjB&^Pz^7K!WmZy3A~+pmNdi0k8P!cW5X=fg*0`!~Z!i0k@3 z1V0hJ9zI;$$foV<CJQn3@jU@P1pZlZonIyVcx*oc9|pe^ejK*H3_cX`tKdTr|1#V_ z{DJ**kN;rAp8!7=@u$NFA-)bi5b;;S2Oxe0ygz&`ydV0172X$q$bj7Z`@l!SkHPjQ zz>kK<;YYz2!h2);P4Hfbe;j@!d<*;t^xso11oiko9Px$l&%h_ad!qjY{4n@p_@U_k zF8CqvC*eKN|5o_H@FQiS)A=8S{sZs>;b*}QfIIO0;Y;D&;rGC0+G_L7P4>y&|Ce|@ zKdwW3H}wA|+z0P1C(^n;%^zleLC=3B@DIiH`)?I|m$)Gr%z^KOUkBeIuJgMe{sH2j zg}*PZ-~Zl+zb7tb@%5Eo)cL=Q{!8KSp#LiP+i(~DmbmPe?^^hq;yVAk;oH&wI`}qm zd0F_j!MBR*<I_`q(D}asFMz*}?N5Yn5!dyN!(S7Z(^B68xX=6YD&SSXtAJMluL52L zyb5>~@G9U{z^lOjc?B}-|1VK%@wcg#S^uxEpRQN;k4LC>qq@(&Q?2{&ui8Ad=6}3u zuc$Tu^HuAm+U089|3<ame?Qe4)O!EXsy(OH`lnUfqSpG~r`mMYGW~DOY{UEVD&SSX ztAJO5|4s#F`O6E&S=E`RqxcPfStw8uDsJb=As=@=YG#dX-W&P2>rwOE0M?`C88yjv zW9p$WhEb)SKvJWgxe`?i?$onLLPkw>S+MiPcX~B&on`XjEfv9FSIXlZgWZmS`u_*T zGS9CG8BsgzST&B7s{4-)MtON=HEy1R!Z6ATjj`GPThY|CdMr+3EM+?drzX^3shK-` zSk!b);}l~=TCJy#xiR&CmkX@uh?9(A*~h4a)$?BVr1j>Uuvu%hway;WqaWcBiJPfZ zQJWoWS@0exD=F(rhH8;>n~n-jjnr9@^DEQQm^;C)Ju@DiU`JXW36%Fb=ni)=*roYG zt%%;k9y;m77&8@%<h@6&56p?!iJDl;qfbI5{_@OP`n<=3dOkolI^0sBPB-3mS_lQa w*&wfXqxNUyTE|W&Q=Lx(dAwXcdcsy&NtX_bH!pbeLhEDYTApq5X_*)P4HCg{rvLx| literal 0 HcmV?d00001 diff --git a/pandora_console/mobile/include/functions_web.php b/pandora_console/mobile/include/functions_web.php index a694e3fa17..d0e8f970c4 100644 --- a/pandora_console/mobile/include/functions_web.php +++ b/pandora_console/mobile/include/functions_web.php @@ -12,6 +12,8 @@ // GNU General Public License for more details. function menu() { + global $config; + $enterpriseHook = enterprise_include('mobile/include/functions_web.php'); ?> @@ -29,10 +31,10 @@ function menu() menuEnterprise(); } ?> - <a href="index.php?action=logout"><img class="icon_menu" alt="<?php echo __('Logout'); ?>" title="<?php echo __('Logout'); ?>" src="../images/log-out.png" /></a> + <a href="index.php?action=logout"><img class="icon_menu" alt="<?php echo __('Logout'); ?>" title="<?php echo __('Logout'); ?>" src="<?php echo 'images/header_logout.png'; ?>" /></a> </div> <div id="down_button"> - <a class="button_menu" id="button_menu_down" href="javascript: toggleMenu();"><img id="img_boton_menu" width="20" height="20" src="images/down.png" /></a> + <a class="button_menu" id="button_menu_down" href="javascript: toggleMenu();"><img id="img_boton_menu" width="20" height="20" src="<?php echo 'images/down.png'; ?>" /></a> </div> </div> <script type="text/javascript"> diff --git a/pandora_console/mobile/include/ui.class.php b/pandora_console/mobile/include/ui.class.php index f1655aba31..101354cf28 100755 --- a/pandora_console/mobile/include/ui.class.php +++ b/pandora_console/mobile/include/ui.class.php @@ -303,7 +303,7 @@ class Ui $time = get_system_time(); } - return "<div id='footer' style='text-align: center;'>\n".sprintf(__('%s %s - Build %s', get_product_name(), $pandora_version, $build_version))."<br />\n".__('Generated at').' '.ui_print_timestamp($time, true, ['prominent' => 'timestamp'])."\n".'</div>'; + return "<div id='footer' class=' center'>\n".sprintf(__('%s %s - Build %s', get_product_name(), $pandora_version, $build_version))."<br />\n".__('Generated at').' '.ui_print_timestamp($time, true, ['prominent' => 'timestamp'])."\n".'</div>'; } diff --git a/pandora_console/mobile/include/user.class.php b/pandora_console/mobile/include/user.class.php index cfefb28b38..357eca9470 100644 --- a/pandora_console/mobile/include/user.class.php +++ b/pandora_console/mobile/include/user.class.php @@ -260,7 +260,7 @@ class User ); $ui->contentAddHtml( - '<div style="text-align: center;" class="login_logo">'.$logo_image.'</div>' + '<div class="login_logo center">'.$logo_image.'</div>' ); $ui->contentAddHtml('<div id="login_container">'); $ui->beginForm(''); @@ -322,7 +322,7 @@ class User $ui->showFooter(false); $ui->beginContent(); $ui->contentAddHtml( - '<div style="text-align: center;" class="login_logo">'.html_print_image( + '<div class="login_logo center">'.html_print_image( ui_get_mobile_login_icon(), true, [ diff --git a/pandora_console/mobile/operation/agent.php b/pandora_console/mobile/operation/agent.php index 62be0df9dc..e26d22ee15 100644 --- a/pandora_console/mobile/operation/agent.php +++ b/pandora_console/mobile/operation/agent.php @@ -140,7 +140,7 @@ class Agent $ui->beginContent(); if (empty($this->agent)) { $ui->contentAddHtml( - '<span style="color: red;">'.__('No agent found').'</span>' + '<span class="red">'.__('No agent found').'</span>' ); } else { $ui->contentBeginGrid(); @@ -332,8 +332,8 @@ class Agent $options = $events->get_event_dialog_error_options($options); $ui->addDialog($options); - $ui->contentAddHtml("<a id='detail_event_dialog_hook' href='#detail_event_dialog' style='display:none;'>detail_event_hook</a>"); - $ui->contentAddHtml("<a id='detail_event_dialog_error_hook' href='#detail_event_dialog_error' style='display:none;'>detail_event_dialog_error_hook</a>"); + $ui->contentAddHtml("<a id='detail_event_dialog_hook' href='#detail_event_dialog' class='invisible'>detail_event_hook</a>"); + $ui->contentAddHtml("<a id='detail_event_dialog_error_hook' href='#detail_event_dialog_error' class='invisible'>detail_event_dialog_error_hook</a>"); $ui->contentBeginCollapsible(sprintf(__('Last %s Events'), $system->getPageSize())); $tabledata = $events->listEventsHtml(0, true, 'last_agent_events'); diff --git a/pandora_console/mobile/operation/agents.php b/pandora_console/mobile/operation/agents.php index 412c132699..da07d31edf 100644 --- a/pandora_console/mobile/operation/agents.php +++ b/pandora_console/mobile/operation/agents.php @@ -73,12 +73,8 @@ class Agents $agents = []; foreach ($listAgents['agents'] as $key => $agent) { $agent[0] = '<b class="ui-table-cell-label">'.__('Agent').'</b>'.$agent[0]; - // ~ $agent[1] = '<b class="ui-table-cell-label">' . - // ~ __('Description') . '</b>' . $agent[1]; $agent[2] = '<b class="ui-table-cell-label">'.__('OS').'</b>'.$agent[2]; $agent[3] = '<b class="ui-table-cell-label">'.__('Group').'</b>'.$agent[3]; - // ~ $agent[4] = '<b class="ui-table-cell-label">' . - // ~ __('Interval') . '</b>' . $agent[4]; $agent[5] = '<b class="ui-table-cell-label">'.__('Modules').'</b>'.$agent[5]; $agent[6] = '<b class="ui-table-cell-label">'.__('Status').'</b>'.$agent[6]; $agent[7] = '<b class="ui-table-cell-label">'.__('Alerts').'</b>'.$agent[7]; @@ -385,18 +381,13 @@ class Agents $serialized_filters_q_param = empty($this->serializedFilters) ? '' : '&agents_filter='.$this->serializedFilters; - $row[0] = $row[__('Agent')] = '<span class="tiny" style="margin-right: 5px;">'.$img_status.'</span>'.'<a class="ui-link" data-ajax="false" href="index.php?page=agent&id='.$agent['id_agente'].$serialized_filters_q_param.'">'.ui_print_truncate_text($agent['alias'], 30, false).'</a>'; - // ~ $row[1] = $row[__('Description')] = '<span class="small">' . - // ~ ui_print_truncate_text($agent["description"], 'description', false, true) . - // ~ '</span>'; + $row[0] = $row[__('Agent')] = '<span class="tiny mrgn_right_5px">'.$img_status.'</span>'.'<a class="ui-link" data-ajax="false" href="index.php?page=agent&id='.$agent['id_agente'].$serialized_filters_q_param.'">'.ui_print_truncate_text($agent['alias'], 30, false).'</a>'; $row[2] = $row[__('OS')] = ui_print_os_icon($agent['id_os'], false, true); $row[3] = $row[__('Group')] = ui_print_group_icon($agent['id_grupo'], true, 'groups_small', '', false); - // ~ $row[4] = $row[__('Interval')] = '<span class="show_collapside" style="vertical-align: 0%; display: none; font-weight: bolder;">  ' . __('I.') . ' </span>' . - // ~ '<span style="vertical-align: 0%;">' . human_time_description_raw($agent["intervalo"]) . '</span>'; - $row[5] = $row[__('Status')] = '<span class="show_collapside" style="vertical-align: 10%; display: none; font-weight: bolder;">'.__('S.').' </span>'.$img_status; - $row[6] = $row[__('Alerts')] = '<span class="show_collapside" style="vertical-align: 10%; display: none; font-weight: bolder;">  '.__('A.').' </span>'.$img_alert; + $row[5] = $row[__('Status')] = '<span class="show_collapside align-none-10p">'.__('S.').' </span>'.$img_status; + $row[6] = $row[__('Alerts')] = '<span class="show_collapside align-none-10p">  '.__('A.').' </span>'.$img_alert; - $row[7] = $row[__('Modules')] = '<span class="show_collapside" style="vertical-align: 0%; display: none; font-weight: bolder;">'.__('Modules').' </span>'.'<span class="agents_tiny_stats">'.reporting_tiny_stats($agent, true, 'agent', ' ').' </span>'; + $row[7] = $row[__('Modules')] = '<span class="show_collapside align-none-0p">'.__('Modules').' </span>'.'<span class="agents_tiny_stats">'.reporting_tiny_stats($agent, true, 'agent', ' ').' </span>'; $last_time = time_w_fixed_tz($agent['ultimo_contacto']); $now = get_system_time(); @@ -404,12 +395,12 @@ class Agents $time = ui_print_timestamp($last_time, true, ['style' => 'font-size: 12px; margin-left: 20px;', 'units' => 'tiny']); $style = ''; if ($diferencia > ($agent['intervalo'] * 2)) { - $row[8] = $row[__('Last contact')] = '<b><span style="color: #ff0000;">'.$time.'</span></b>'; + $row[8] = $row[__('Last contact')] = '<b><span class="color_ff0">'.$time.'</span></b>'; } else { $row[8] = $row[__('Last contact')] = $time; } - $row[8] = $row[__('Last contact')] = '<span class="show_collapside" style="vertical-align: 0%; display: none; font-weight: bolder;">'.__('Last contact').' </span>'.'<span class="agents_last_contact">'.$row[__('Last contact')].'</span>'; + $row[8] = $row[__('Last contact')] = '<span class="show_collapside align-none-0p">'.__('Last contact').' </span>'.'<span class="agents_last_contact">'.$row[__('Last contact')].'</span>'; if (!$ajax) { unset($row[0]); @@ -441,7 +432,7 @@ class Agents $listAgents = $this->getListAgents($page); if ($listAgents['total'] == 0) { - $ui->contentAddHtml('<p style="color: #ff0000;">'.__('No agents').'</p>'); + $ui->contentAddHtml('<p class="color_ff0">'.__('No agents').'</p>'); } else { $table = new Table(); $table->id = 'list_agents'; @@ -563,13 +554,6 @@ class Agents $string = '('.implode(' - ', $filters_to_serialize).')'; - // ~ $status = $this->list_status[$this->status]; - // ~ $group = groups_get_name($this->group, true); - // ~ - // ~ - // ~ $string = sprintf( - // ~ __("(Status: %s - Group: %s - Free Search: %s)"), - // ~ $status, $group, $this->free_search); return $string; } } diff --git a/pandora_console/mobile/operation/alerts.php b/pandora_console/mobile/operation/alerts.php index ba73ce4542..b04943fbe3 100644 --- a/pandora_console/mobile/operation/alerts.php +++ b/pandora_console/mobile/operation/alerts.php @@ -295,7 +295,7 @@ class Alerts $table = []; foreach ($alerts as $alert) { if ($alert['alert_disabled']) { - $disabled_style = "<i style='color: grey;'>%s</i>"; + $disabled_style = "<i class='grey'>%s</i>"; } else { $disabled_style = '%s'; } diff --git a/pandora_console/mobile/operation/events.php b/pandora_console/mobile/operation/events.php index 615133b8b7..1246bf3297 100644 --- a/pandora_console/mobile/operation/events.php +++ b/pandora_console/mobile/operation/events.php @@ -162,7 +162,7 @@ class Events } if ($event['id_agente'] > 0) { - $event['agent'] = "<a style='color: black;'"."href='index.php?page=agent&id=".$event['id_agente']."'>".agents_get_alias($event['id_agente']).'</a>'; + $event['agent'] = "<a class='black'"."href='index.php?page=agent&id=".$event['id_agente']."'>".agents_get_alias($event['id_agente']).'</a>'; } else { $event['agent'] = '<i>'.__('N/A').'</i>'; } @@ -483,7 +483,7 @@ class Events $options['dialog_id'] = 'detail_event_dialog_error'; $options['title_text'] = __('ERROR: Event detail'); - $options['content_text'] = '<span style="color: #ff0000;">'.__('Error connecting to DB.').'</span>'; + $options['content_text'] = '<span class="color_ff0">'.__('Error connecting to DB.').'</span>'; return $options; } @@ -578,12 +578,12 @@ class Events 'type' => 'hidden', ]; $options['content_text'] .= $ui->getInput($options_hidden); - $options['content_text'] .= '<div id="validate_button_loading" style="display: none; text-align: center;"> + $options['content_text'] .= '<div id="validate_button_loading" class="invisible center"> <img src="images/ajax-loader.gif" /></div>'; - $options['content_text'] .= '<div id="validate_button_correct" style="display: none; text-align: center;"> + $options['content_text'] .= '<div id="validate_button_correct" class="invisible center"> <h3>'.__('Sucessful validate').'</h3></div>'; - $options['content_text'] .= '<div id="validate_button_fail" style="display: none; text-align: center;"> - <h3 style="color: #ff0000;">'.__('Fail validate').'</h3></div>'; + $options['content_text'] .= '<div id="validate_button_fail" class="invisible center"> + <h3 class="color_ff0">'.__('Fail validate').'</h3></div>'; $options['button_close'] = false; @@ -618,8 +618,8 @@ class Events ); $ui->showFooter(false); $ui->beginContent(); - $ui->contentAddHtml("<a id='detail_event_dialog_hook' href='#detail_event_dialog' style='display:none;'>detail_event_hook</a>"); - $ui->contentAddHtml("<a id='detail_event_dialog_error_hook' href='#detail_event_dialog_error' style='display:none;'>detail_event_dialog_error_hook</a>"); + $ui->contentAddHtml("<a id='detail_event_dialog_hook' href='#detail_event_dialog' class='invisible'>detail_event_hook</a>"); + $ui->contentAddHtml("<a id='detail_event_dialog_error_hook' href='#detail_event_dialog_error' class='invisible'>detail_event_dialog_error_hook</a>"); $filter_title = sprintf(__('Filter Events by %s'), $this->filterEventsGetString()); $ui->contentBeginCollapsible($filter_title); @@ -855,7 +855,7 @@ class Events $table = new Table(); $table->id = $id_table; - $no_events = '<p id="empty_advice_events" class="empty_advice" style="display: none;">'.__('No events').'</p>'; + $no_events = '<p id="empty_advice_events" class="empty_advice invisible" class="invisible">'.__('No events').'</p>'; if (!$return) { $ui->contentAddHtml($table->getHTML()); @@ -1041,10 +1041,10 @@ class Events var new_rows = \"\"; $.each(data.events, function(key, event) { new_rows = \"<tr class='events \" + event[2] + \"'>\" + - \"<td class='cell_0' style='vertical-align:middle;'>\" + + \"<td class='cell_0' class='vertical_middle'>\" + event[0] + \"</td>\" + - \"<td style='vertical-align:middle;'>\" + event[1] + \"</td>\" + + \"<td class='vertical_middle'>\" + event[1] + \"</td>\" + \"</tr>\" + new_rows; }); diff --git a/pandora_console/mobile/operation/groups.php b/pandora_console/mobile/operation/groups.php index fc1266ec00..6b85db037c 100644 --- a/pandora_console/mobile/operation/groups.php +++ b/pandora_console/mobile/operation/groups.php @@ -134,7 +134,7 @@ class Groups $ui->contentAddHtml('<ul data-role="listview" class="groups_sublist">'); $ui->contentAddHtml( - '<li data-icon="false"><a href="'.sprintf($url_agent, $group['_id_'], AGENT_STATUS_ALL).'">'.'<span class="name_count">'.html_print_image('images/agent.png', true, false, false, false, false, true).__('Total agents').'</span>'.'<span class="number_count">'.$group['_total_agents_'].'</span>'.'</a></li>' + '<li data-icon="false"><a href="'.sprintf($url_agent, $group['_id_'], AGENT_STATUS_ALL).'">'.'<span class="name_count">'.html_print_image('images/agent.png', true, ['class' => 'invert_filter'], false, false, false, true).__('Total agents').'</span>'.'<span class="number_count">'.$group['_total_agents_'].'</span>'.'</a></li>' ); $ui->contentAddHtml( '<li data-icon="false"><a href="'.sprintf($url_agent, $group['_id_'], AGENT_STATUS_NOT_INIT).'">'.'<span class="name_count">'.html_print_image('images/agent_notinit.png', true, false, false, false, false, true).__('Agents not init').'</span>'.'<span class="number_count">'.$group['_agents_not_init_'].'</span>'.'</a></li>' diff --git a/pandora_console/mobile/operation/module_graph.php b/pandora_console/mobile/operation/module_graph.php index be02fc3b22..8310a93a03 100644 --- a/pandora_console/mobile/operation/module_graph.php +++ b/pandora_console/mobile/operation/module_graph.php @@ -471,9 +471,9 @@ class ModuleGraph $ui->contentCollapsibleAddItem($html); $ui->contentEndCollapsible(); $ui->contentAddHtml( - '<div id="graph_content" style="display: none; width: 100%; height: 100%; text-align: center;"></div> - <div id="loading_graph" style="width: 100%; text-align: center;">'.__('Loading...').'<br /><img src="images/ajax-loader.gif" /></div> - <div id="error_graph" style="display: none; color: red; width: 100%; text-align: center;">'.__('Error get the graph').'</div>' + '<div id="graph_content" class="invisible w100p height_100p center"></div> + <div id="loading_graph" class="w100p center">'.__('Loading...').'<br /><img src="images/ajax-loader.gif" /></div> + <div id="error_graph" class="invisible red w100p center">'.__('Error get the graph').'</div>' ); $ui->contentAddHtml($this->javascript_code()); $ui->endContent(); diff --git a/pandora_console/mobile/operation/modules.php b/pandora_console/mobile/operation/modules.php index 0f01e74f28..ddac149c74 100644 --- a/pandora_console/mobile/operation/modules.php +++ b/pandora_console/mobile/operation/modules.php @@ -564,10 +564,10 @@ class Modules } } - $row[0] = $row[__('Module name')] = '<span class="tiny" style="margin-right: 5px;">'.$image_status.'</span>'.'<span class="data module_name">'.ui_print_truncate_text($module['module_name'], 30, false).'</span>'; + $row[0] = $row[__('Module name')] = '<span class="tiny mrgn_right_5px">'.$image_status.'</span>'.'<span class="data module_name">'.ui_print_truncate_text($module['module_name'], 30, false).'</span>'; if ($this->columns['agent']) { - $row[1] = $row[__('Agent name')] = '<span class="data"><span class="show_collapside" style="display: none; font-weight: bolder;">'.__('Agent').' </span>'.ui_print_truncate_text($module['agent_alias'], 50, false).'</span>'; + $row[1] = $row[__('Agent name')] = '<span class="data"><span class="show_collapside bolder invisible">'.__('Agent').' </span>'.ui_print_truncate_text($module['agent_alias'], 50, false).'</span>'; } if ($module['utimestamp'] == 0 && (($module['module_type'] < 21 @@ -629,9 +629,9 @@ class Modules $row[__('Interval')] = ($module['module_interval'] == 0) ? human_time_description_raw($module['agent_interval'], false, 'tiny') : human_time_description_raw($module['module_interval'], false, 'tiny'); - $row[4] = $row[__('Interval')] = '<span class="data"><span class="show_collapside" style="display: none; font-weight: bolder;">'.__('Interval.').' </span>'.$row[__('Interval')].'</span>'; + $row[4] = $row[__('Interval')] = '<span class="data"><span class="show_collapside bolder invisible">'.__('Interval.').' </span>'.$row[__('Interval')].'</span>'; - $row[6] = $row[__('Timestamp')] = '<span class="data"><span class="show_collapside" style="display: none; font-weight: bolder;">'.__('Last update.').' </span>'.ui_print_timestamp($module['utimestamp'], true, ['units' => 'tiny']).'</span>'; + $row[6] = $row[__('Timestamp')] = '<span class="data"><span class="show_collapside bolder invisible">'.__('Last update.').' </span>'.ui_print_timestamp($module['utimestamp'], true, ['units' => 'tiny']).'</span>'; if (is_numeric($module['datos'])) { $output = format_numeric($module['datos']); @@ -688,8 +688,8 @@ class Modules $row[__('Data')] = ui_get_snapshot_image($link, $is_snapshot).'  '; } else { if ($system->getConfig('metaconsole')) { - $row[__('Data')] = '<span style="white-space: nowrap;">'; - $row[__('Data')] .= '<span style="display: none;" class="show_collapside">'; + $row[__('Data')] = '<span class="nowrap">'; + $row[__('Data')] .= '<span class="show_collapside invisible">'; $row[__('Data')] .= $row[__('Status')].'  </span>'; $row[__('Data')] .= '<a data-ajax="false" class="ui-link" '; $row[__('Data')] .= 'href="index.php?page=module_graph&id='.$module['id_agente_modulo']; @@ -700,8 +700,8 @@ class Modules $row[__('Data')]; } else { // Row 7. - $row[__('Data')] = '<span style="white-space: nowrap;">'; - $row[__('Data')] .= '<span style="display: none;" class="show_collapside">'; + $row[__('Data')] = '<span class="nowrap">'; + $row[__('Data')] .= '<span class="show_collapside invisible">'; $row[__('Data')] .= $row[__('Status')].'  </span>'; $row[__('Data')] .= '<a data-ajax="false" class="ui-link" '; $row[__('Data')] .= 'href="index.php?page=module_graph&id='; @@ -741,7 +741,6 @@ class Modules $ui = Ui::getInstance(); $listModules = $this->getListModules($page); - // $ui->debug($listModules, true); if ($listModules['total'] == 0) { $html = '<p class="empty_advice">'.__('No modules').'</p>'; if (!$return) { @@ -757,12 +756,6 @@ class Modules $ui->contentAddHtml($table->getHTML()); } else { - // ~ foreach ($listModules['modules'] as $key => $module) { - // ~ $listModules['modules'][$key][__('Status')] .= - // ~ '<span style="display: none;" class="show_collapside">' . - // ~ $listModules['modules'][$key][__('Data')] . - // ~ '</span>'; - // ~ } $table = new Table(); $table->id = 'list_agent_Modules'; diff --git a/pandora_console/mobile/operation/tactical.php b/pandora_console/mobile/operation/tactical.php index d3ea9112f6..eed45507ed 100755 --- a/pandora_console/mobile/operation/tactical.php +++ b/pandora_console/mobile/operation/tactical.php @@ -234,7 +234,7 @@ class Tactical } function ajax_load_status_pie() { - $('#status_pie').html('<div style=\"text-align: center\"> ".__('Loading...')."<br /><img src=\"images/ajax-loader.gif\" /></div>'); + $('#status_pie').html('<div class=\"center\"> ".__('Loading...')."<br /><img src=\"images/ajax-loader.gif\" /></div>'); var pie_width = $('#tactical2').width() * 0.9; diff --git a/pandora_console/mobile/operation/visualmap.php b/pandora_console/mobile/operation/visualmap.php index 7c3e652c3d..675f0f1f34 100644 --- a/pandora_console/mobile/operation/visualmap.php +++ b/pandora_console/mobile/operation/visualmap.php @@ -140,7 +140,7 @@ class Visualmap $ui->contentAddHtml( "<script type=\"text/javascript\"> function ajax_load_map() { - $('#rendered_visual_map').html('<div style=\"text-align: center\"> ".__('Loading...')."<br /><img src=\"images/ajax-loader.gif\" /></div>'); + $('#rendered_visual_map').html('<div class=\"center\"> ".__('Loading...')."<br /><img src=\"images/ajax-loader.gif\" /></div>'); var map_max_width = window.innerWidth * 0.90; var map_max_height = (window.innerHeight - 47) * 0.90; diff --git a/pandora_console/mobile/operation/visualmaps.php b/pandora_console/mobile/operation/visualmaps.php index 1bb252c175..372ade6500 100644 --- a/pandora_console/mobile/operation/visualmaps.php +++ b/pandora_console/mobile/operation/visualmaps.php @@ -166,7 +166,7 @@ class Visualmaps } if (count($maps) == 0) { - $ui->contentAddHtml('<p style="color: #ff0000;">'.__('No maps defined').'</p>'); + $ui->contentAddHtml('<p class="color_ff0">'.__('No maps defined').'</p>'); } else { $table = new Table(); $table->id = 'list_visualmaps'; diff --git a/pandora_console/operation/agentes/agent_fields.php b/pandora_console/operation/agentes/agent_fields.php index 4867c990fb..bb27bd3f43 100755 --- a/pandora_console/operation/agentes/agent_fields.php +++ b/pandora_console/operation/agentes/agent_fields.php @@ -36,7 +36,7 @@ if (! check_acl($config['id_user'], $agent['id_grupo'], 'AR')) { ui_print_page_header(__('Agent custom fields'), 'images/custom_field.png', false, '', false); -echo '<table cellspacing="4" cellpadding="4" border="0" class="databox" style="width: 450px">'; +echo '<table cellspacing="4" cellpadding="4" border="0" class="databox w450px">'; // Custom fields $fields = db_get_all_rows_filter('tagent_custom_fields', ['display_on_front' => 1]); diff --git a/pandora_console/operation/agentes/alerts_status.functions.php b/pandora_console/operation/agentes/alerts_status.functions.php index a7bc0954b1..b7e2fe3b1c 100755 --- a/pandora_console/operation/agentes/alerts_status.functions.php +++ b/pandora_console/operation/agentes/alerts_status.functions.php @@ -136,14 +136,14 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st if (defined('METACONSOLE')) { $table->data[0][7] = html_print_submit_button(__('Filter'), 'filter_button', false, 'class="sub filter"', true); $table->rowspan[0][7] = 2; - $data = '<form style="background-color: #ECECEC;" method="post" action="'.$url.'">'; + $data = '<form class="bg_ec" method="post" action="'.$url.'">'; } else { $data = '<form method="post" action="'.$url.'">'; } $data .= html_print_table($table, true); if (!defined('METACONSOLE')) { - $data .= "<div style='height:100%; text-align:right;'>".html_print_submit_button(__('Filter'), 'filter_button', false, 'class="sub filter"', true).'</div>'; + $data .= "<div class='height_100p right'>".html_print_submit_button(__('Filter'), 'filter_button', false, 'class="sub filter"', true).'</div>'; } $data .= '</form>'; @@ -179,7 +179,7 @@ function printFormFilterAlertAgent($agent_view_page, $free_search, $id_agent) true ); - $table_filter->data[0][0] .= '<span style="margin-left:10px;">'.html_print_input_text( + $table_filter->data[0][0] .= '<span class="mrgn_lft_10px">'.html_print_input_text( $free_search_name, $free_search, '', diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index 67c734138d..34688e5b10 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -688,7 +688,7 @@ if (!empty($table->data)) { ); } - echo '<div id="alerts_list" style="width:100%;">'; + echo '<div id="alerts_list w100p">'; html_print_table($table); echo '</div>'; @@ -746,7 +746,7 @@ if ($agent_view_page === true) { // strict user hidden -echo '<div id="strict_hidden" style="display:none;">'; +echo '<div id="strict_hidden" class="invisible">'; html_print_input_text('strict_user_hidden', $strict_user); html_print_input_text('is_meta_hidden', (int) is_metaconsole()); diff --git a/pandora_console/operation/agentes/custom_fields.php b/pandora_console/operation/agentes/custom_fields.php index d413e2b60f..ac7501312d 100644 --- a/pandora_console/operation/agentes/custom_fields.php +++ b/pandora_console/operation/agentes/custom_fields.php @@ -76,9 +76,9 @@ if ($fields === false) { $data[0] = '<b>'.$field['name'].'</b>'; if ($field['display_on_front']) { - $data[1] = html_print_image('images/tick.png', true); + $data[1] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']); } else { - $data[1] = html_print_image('images/delete.png', true); + $data[1] = html_print_image('images/delete.png', true, ['class' => 'invert_filter']); } $custom_value = db_get_all_rows_sql( diff --git a/pandora_console/operation/agentes/datos_agente.php b/pandora_console/operation/agentes/datos_agente.php index d58651deff..fc042a56e8 100755 --- a/pandora_console/operation/agentes/datos_agente.php +++ b/pandora_console/operation/agentes/datos_agente.php @@ -191,10 +191,10 @@ $formtable->size[0] = '40%'; $formtable->size[1] = '20%'; $formtable->size[2] = '30%'; -$formtable->data[0][0] = html_print_radio_button_extended('selection_mode', 'fromnow', '', $selection_mode, false, '', 'style="margin-right: 15px;"', true).__('Choose a time from now'); +$formtable->data[0][0] = html_print_radio_button_extended('selection_mode', 'fromnow', '', $selection_mode, false, '', 'class="mrgn_right_15px"', true).__('Choose a time from now'); $formtable->data[0][1] = html_print_extended_select_for_time('period', $period, '', '', '0', 10, true); -$formtable->data[1][0] = html_print_radio_button_extended('selection_mode', 'range', '', $selection_mode, false, '', 'style="margin-right: 15px;"', true).__('Specify time range'); +$formtable->data[1][0] = html_print_radio_button_extended('selection_mode', 'range', '', $selection_mode, false, '', 'class="mrgn_right_15px"', true).__('Specify time range'); $formtable->data[1][1] = __('Timestamp from:'); $formtable->data[1][2] = html_print_input_text('date_from', $date_from, '', 10, 10, true); @@ -214,7 +214,7 @@ if (preg_match('/string/', $moduletype_name) || $moduletype_name == 'log4x') { html_print_table($formtable); -echo '<div class="action-buttons" style="width:98%">'; +echo '<div class="action-buttons w98p">'; html_print_submit_button(__('Update'), 'updbutton', false, 'class="sub upd"'); echo '</div>'; @@ -267,7 +267,7 @@ foreach ($result as $row) { // Because this *SHIT* of print_table monster, I cannot format properly this cells // so, eat this, motherfucker :)) - $datos = "<span style='font-family: mono,monospace;'>".$datos.'</span>'; + $datos = "<span class='mono'>".$datos.'</span>'; // I dont why, but using index (value) method, data is automatically converted to html entities ¿? $data[$attr[1]] = $datos; diff --git a/pandora_console/operation/agentes/ehorus.php b/pandora_console/operation/agentes/ehorus.php index 4cc8958df3..2529031e2a 100644 --- a/pandora_console/operation/agentes/ehorus.php +++ b/pandora_console/operation/agentes/ehorus.php @@ -182,7 +182,7 @@ try { ui_print_error_message(__('There was an error processing the response')); } -echo '<table id="ehorus-client-run-info" class="databox" style="width: 100%;"><tr>'; +echo '<table id="ehorus-client-run-info" class="databox w100p"><tr>'; echo '<td>'; echo __('Remote management of this agent with eHorus'); echo '</td><td>'; @@ -190,7 +190,7 @@ echo '<input type="button" id="run-ehorus-client" class="sub next" value="'.__(' echo '</td>'; echo '</tr></table>'; -echo '<div id="expired_message" style="display: none;">'; +echo '<div id="expired_message" class="invisible">'; ui_print_error_message( __('The connection was lost and the authorization token was expired').'. '.__('Reload the page to request a new authorization token').'. ' ); diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index f3eb5efeac..846f23d5d6 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -176,7 +176,14 @@ if (check_acl($config['id_user'], 0, 'AW')) { $tab = 'setup'; // Setup tab. - $setuptab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente">'.html_print_image('images/setup.png', true, ['title' => __('Setup')]).'</a>'; + $setuptab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente">'.html_print_image( + 'images/setup.png', + true, + [ + 'title' => __('Setup'), + 'class' => 'invert_filter', + ] + ).'</a>'; $setuptab['godmode'] = true; @@ -187,7 +194,7 @@ if (check_acl($config['id_user'], 0, 'AW')) { ui_print_page_header( __('Agent detail'), - 'images/agent_mc.png', + 'images/agent.png', false, '', false, @@ -211,9 +218,9 @@ if (isset($result_delete)) { echo '<form method="post" action="?sec=view&sec2=operation/agentes/estado_agente&group_id='.$group_id.'">'; -echo '<table cellpadding="4" cellspacing="4" class="databox filters" width="100%" style="font-weight: bold; margin-bottom: 10px;">'; +echo '<table cellpadding="4" cellspacing="4" class="databox filters bolder mrgn_btn_10px" width="100%">'; -echo '<tr><td class="nowrap mw250px padding-right-2-imp">'; +echo '<tr><td class="nowrap mw180px padding-right-2-imp">'; echo __('Group').' '; @@ -258,7 +265,7 @@ html_print_submit_button( ['class' => 'sub search'] ); -echo '</td><td style="width:5%;"> </td>'; +echo '</td>'; echo '</tr></table></form>'; @@ -788,11 +795,23 @@ foreach ($agents as $agent) { if ($agent['quiet']) { $data[0] .= ' '; - $data[0] .= html_print_image('images/dot_blue.png', true, ['border' => '0', 'title' => __('Quiet'), 'alt' => '']); + $data[0] .= html_print_image( + 'images/dot_blue.png', + true, + [ + 'border' => '0', + 'title' => __('Quiet'), + 'alt' => '', + ] + ); } if ($in_planned_downtime) { - $data[0] .= ui_print_help_tip(__('Agent in planned downtime'), true, 'images/minireloj-16.png'); + $data[0] .= ui_print_help_tip( + __('Agent in planned downtime'), + true, + $config['image']['minireloj_16'] + ); $data[0] .= '</em>'; } @@ -843,15 +862,31 @@ foreach ($agents as $agent) { if (enterprise_installed()) { enterprise_include_once('include/functions_config_agents.php'); if (enterprise_hook('config_agents_has_remote_configuration', [$agent['id_agente']])) { - $data[10] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=remote_configuration&id_agente='.$agent['id_agente'].'&disk_conf=1">'.html_print_image('images/application_edit.png', true, ['align' => 'middle', 'title' => __('Remote config')]).'</a>'; + $data[10] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=remote_configuration&id_agente='.$agent['id_agente'].'&disk_conf=1">'.html_print_image( + 'images/application_edit.png', + true, + [ + 'align' => 'middle', + 'title' => __('Remote config'), + 'class' => 'invert_filter', + ] + ).'</a>'; } } $data[2] = ui_print_os_icon($agent['id_os'], false, true); - $data[3] = '<span style="font-size:6.5pt;">'.human_time_description_raw($agent['intervalo']).'</span>'; + $data[3] = '<span>'.human_time_description_raw( + $agent['intervalo'] + ).'</span>'; $data[4] = '<a href="'.$config['homeurl'].'index.php?sec=view&sec2=operation/agentes/estado_agente&refr=60&group_id='.$agent['id_grupo'].'">'; - $data[4] .= ui_print_group_icon($agent['id_grupo'], true, 'groups_small', '', false); + $data[4] .= ui_print_group_icon( + $agent['id_grupo'], + true, + 'groups_small', + '', + false + ); $data[4] .= '</a>'; $agent['not_init_count'] = $agent['notinit_count']; @@ -900,7 +935,7 @@ if (!empty($table->data)) { ); if (check_acl($config['id_user'], 0, 'AW') || check_acl($config['id_user'], 0, 'AM')) { - echo '<div style="text-align: right; float: right;">'; + echo '<div class="right float-right">'; echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">'; html_print_submit_button(__('Create agent'), 'crt', false, 'class="sub next"'); echo '</form>'; @@ -910,7 +945,7 @@ if (!empty($table->data)) { unset($table); } else { ui_print_info_message([ 'no_close' => true, 'message' => __('There are no defined agents') ]); - echo '<div style="text-align: right; float: right;">'; + echo '<div class="right float-right">'; echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">'; html_print_submit_button(__('Create agent'), 'crt', false, 'class="sub next"'); echo '</form>'; diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index fe970a1c0c..6a326cf91c 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -111,9 +111,25 @@ if ($agent['disabled']) { } } else if ($agent['quiet']) { if ($in_planned_downtime) { - $agent_name = "<em'>".$agent_name.' '.html_print_image('images/dot_blue.png', true, ['border' => '0', 'title' => __('Quiet'), 'alt' => '']); + $agent_name = "<em'>".$agent_name.' '.html_print_image( + 'images/dot_blue.png', + true, + [ + 'border' => '0', + 'title' => __('Quiet'), + 'alt' => '', + ] + ); } else { - $agent_name = "<em'>".$agent_name.' '.html_print_image('images/dot_blue.png', true, ['border' => '0', 'title' => __('Quiet'), 'alt' => '']).'</em>'; + $agent_name = "<em'>".$agent_name.' '.html_print_image( + 'images/dot_blue.png', + true, + [ + 'border' => '0', + 'title' => __('Quiet'), + 'alt' => '', + ] + ).'</em>'; } } else { $agent_name = $agent_name; @@ -198,23 +214,40 @@ foreach ($addresses as $k => $add) { } if (!empty($address)) { - $table_agent_ip = '<p>'.html_print_image('images/world.png', true, ['title' => __('IP address')]); - $table_agent_ip .= '<span style="vertical-align:top; display: inline-block;">'; + $table_agent_ip = '<p>'.html_print_image( + 'images/world.png', + true, + [ + 'title' => __('IP address'), + 'class' => 'invert_filter', + ] + ); + $table_agent_ip .= '<span class="align-top inline">'; $table_agent_ip .= empty($address) ? '<em>'.__('N/A').'</em>' : $address; $table_agent_ip .= '</span></p>'; } -$table_agent_version = '<p>'.html_print_image('images/version.png', true, ['title' => __('Agent Version')]); -$table_agent_version .= '<span style="vertical-align:top; display: inline-block;">'; +$table_agent_version = '<p>'.html_print_image( + 'images/version.png', + true, + [ + 'title' => __('Agent Version'), + 'class' => 'invert_filter', + ] +); +$table_agent_version .= '<span class="align-top inline">'; $table_agent_version .= empty($agent['agent_version']) ? '<i>'.__('N/A').'</i>' : $agent['agent_version']; $table_agent_version .= '</span></p>'; $table_agent_description = '<p>'.html_print_image( - 'images/default_list.png', + 'images/list.png', true, - ['title' => __('Description')] + [ + 'title' => __('Description'), + 'class' => 'invert_filter', + ] ); -$table_agent_description .= '<span style="vertical-align:top; display: inline-block;">'; +$table_agent_description .= '<span class="align-top inline">'; $table_agent_description .= empty($agent['comentarios']) ? '<em>'.__('N/A').'</em>' : $agent['comentarios']; $table_agent_description .= '</span></p>'; @@ -233,7 +266,11 @@ $has_remote_conf = enterprise_hook( ); if ($has_remote_conf) { - $remote_cfg = '<p>'.html_print_image('images/remote_configuration.png', true); + $remote_cfg = '<p>'.html_print_image( + 'images/remote_configuration.png', + true, + ['class' => 'invert_filter'] + ); $remote_cfg .= __('Remote configuration enabled').'</p>'; } else { $remote_cfg = ''; @@ -279,9 +316,25 @@ $table_contact->headstyle[1] = 'padding-top:6px; padding-bottom:6px;padding-righ $table_contact->head[0] = ' <span>'.__('Agent contact').'</span>'; $buttons_refresh_agent_view = '<div class="buttons_agent_view">'; -$buttons_refresh_agent_view .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&refr=60">'.html_print_image('images/refresh.png', true, ['title' => __('Refresh data'), 'alt' => '']).'</a><br>'; +$buttons_refresh_agent_view .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&refr=60">'.html_print_image( + 'images/refresh.png', + true, + [ + 'title' => __('Refresh data'), + 'class' => 'invert_filter', + 'alt' => '', + ] +).'</a><br>'; if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) { - $buttons_refresh_agent_view .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&flag_agent=1&id_agente='.$id_agente.'">'.html_print_image('images/target.png', true, ['title' => __('Force remote checks'), 'alt' => '']).'</a>'; + $buttons_refresh_agent_view .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&flag_agent=1&id_agente='.$id_agente.'">'.html_print_image( + 'images/target.png', + true, + [ + 'title' => __('Force remote checks'), + 'alt' => '', + 'class' => 'invert_filter', + ] + ).'</a>'; } $buttons_refresh_agent_view .= '</div>'; @@ -396,7 +449,7 @@ $table_data->head[0] = html_print_image( true, $options ); -$table_data->head[0] .= ' <span style="vertical-align: middle; font-weight:bold; padding-left:20px">'.__('Agent info').'</span>'; +$table_data->head[0] .= ' <span class="vertical_middle bolder pdd_l_20px">'.__('Agent info').'</span>'; $table_data->head_colspan[0] = 4; // Gis and url address. @@ -439,7 +492,7 @@ if (!empty($addresses)) { // $data_opcional = []; $data_opcional[] = '<b>'.__('Other IP addresses').'</b>'; if (!empty($addresses)) { - $data_opcional[] = '<div style="overflow-y: scroll; max-height:50px;">'.implode('<br>', $addresses).'</div>'; + $data_opcional[] = '<div class="overflow-y mx_height50px">'.implode('<br>', $addresses).'</div>'; } } @@ -648,9 +701,12 @@ if (!empty($network_interfaces)) { $graph_link .= $params_encoded."','"; $graph_link .= $win_handle."', 800, 480)\">"; $graph_link .= html_print_image( - 'images/chart_curve.png', + 'images/chart.png', true, - ['title' => __('Interface traffic')] + [ + 'title' => __('Interface traffic'), + 'class' => 'invert_filter', + ] ).'</a>'; } else { $graph_link = ''; @@ -862,7 +918,7 @@ echo '<div id="agent_details_first_row"> if ($table_access_rate) { echo '<div class="agent_access_rate_events">'.$table_access_rate.$table_events.'</div>'; } else { - echo '<div style="width: 100%">'.$table_events.'</div>'; + echo '<div class="w100p">'.$table_events.'</div>'; } echo $agent_incidents; diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index e1ca271633..f4d00901d7 100755 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -55,7 +55,14 @@ if (is_ajax()) { echo '<td>'; if (tags_get_module_policy_tags($tag, $id_agente_modulo)) { - html_print_image('images/policies.png', false, ['style' => 'vertical-align: middle;']); + html_print_image( + 'images/policies_mc.png', + false, + [ + 'style' => 'vertical-align: middle;', + 'class' => 'invert_filter', + ] + ); } echo '</td>'; @@ -357,7 +364,7 @@ ui_toggle( ui_require_css_file('cluetip', 'include/styles/js/'); ui_require_jquery_file('cluetip'); -echo "<div id='module_details_dialog' style='display: none;'></div>"; +echo "<div id='module_details_dialog' class='invisible'></div>"; ui_include_time_picker(); ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/'); @@ -379,7 +386,15 @@ ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript cluetipClass: 'default', sticky: true, mouseOutClose: 'both', - closeText: '<?php html_print_image('images/cancel.png'); ?>' + closeText: ' + <?php + html_print_image( + 'images/cancel.png', + false, + ['class' => 'invert_filter'] + ); + ?> + ' }); // Show the modal window of an module @@ -571,7 +586,7 @@ function print_form_filter_monitors( 0, true ); - $table->data[0][6] = '<div style="display: flex;align-content: center;">'; + $table->data[0][6] = '<div class="flex_center">'; $table->data[0][6] .= __('Show in hierachy mode'); $table->data[0][6] .= html_print_switch( [ @@ -596,7 +611,7 @@ function print_form_filter_monitors( 'filter', false, 'reset_filter_modules();', - 'class="sub upd" style="margin-top:0px;"', + 'class="sub upd mgn_tp_0"', true ); $form_text .= html_print_table($table, true); diff --git a/pandora_console/operation/agentes/exportdata.php b/pandora_console/operation/agentes/exportdata.php index f25cc05b66..848c459dbb 100644 --- a/pandora_console/operation/agentes/exportdata.php +++ b/pandora_console/operation/agentes/exportdata.php @@ -80,7 +80,7 @@ if (!empty($export_btn) && !empty($module)) { case 'avg': default: // HTML output - don't style or use XHTML just in case somebody needs to copy/paste it. (Office doesn't handle <thead> and <tbody>) - $datastart = '<table style="width:100%;" class="databox data">'.'<tr>'.'<th>'.__('Agent').'</th>'.'<th>'.__('Module').'</th>'.'<th>'.__('Data').'</th>'.'<th>'.__('Timestamp').'</th>'.'</tr>'; + $datastart = '<table class="databox data w100p">'.'<tr>'.'<th>'.__('Agent').'</th>'.'<th>'.__('Module').'</th>'.'<th>'.__('Data').'</th>'.'<th>'.__('Timestamp').'</th>'.'</tr>'; $rowstart = '<tr><td>'; $divider = '</td><td>'; $rowend = '</td></tr>'; @@ -264,7 +264,7 @@ if (empty($export_btn) || $show_form) { } // Src code of lightning image with skins - $src_code = html_print_image('images/lightning.png', true, false, true); + $src_code = html_print_image('images/lightning_go.png', true, false, true); $params = []; $params['return'] = true; @@ -324,7 +324,15 @@ if (empty($export_btn) || $show_form) { 10, true ); - $table->data[3][1] .= html_print_image('images/calendar_view_day.png', true, ['alt' => 'calendar', 'onclick' => "scwShow(scwID('text-start_date'),this);"]); + $table->data[3][1] .= html_print_image( + 'images/calendar_view_day.png', + true, + [ + 'alt' => 'calendar', + 'onclick' => "scwShow(scwID('text-start_date'),this);", + 'class' => 'invert_filter', + ] + ); $table->data[3][1] .= html_print_input_text( 'start_time', date('H:i:s', (get_system_time() - SECONDS_1DAY)), @@ -344,7 +352,15 @@ if (empty($export_btn) || $show_form) { 10, true ); - $table->data[4][1] .= html_print_image('images/calendar_view_day.png', true, ['alt' => 'calendar', 'onclick' => "scwShow(scwID('text-end_date'),this);"]); + $table->data[4][1] .= html_print_image( + 'images/calendar_view_day.png', + true, + [ + 'alt' => 'calendar', + 'onclick' => "scwShow(scwID('text-end_date'),this);", + 'class' => 'invert_filter', + ] + ); $table->data[4][1] .= html_print_input_text( 'end_time', date('H:i:s', get_system_time()), @@ -368,7 +384,7 @@ if (empty($export_btn) || $show_form) { html_print_table($table); // Submit button - echo '<div class="action-buttons" style="width:100%;">'; + echo '<div class="action-buttons w100p">'; html_print_button(__('Export'), 'export_btn', false, 'change_action()', 'class="sub wand"'); echo '</div></form>'; } diff --git a/pandora_console/operation/agentes/gis_view.php b/pandora_console/operation/agentes/gis_view.php index 064c2d1652..a0be08eccd 100644 --- a/pandora_console/operation/agentes/gis_view.php +++ b/pandora_console/operation/agentes/gis_view.php @@ -47,10 +47,10 @@ foreach ($_GET as $key => $value) { $url .= '&'.safe_url_extraclean($key).'='.safe_url_extraclean($value); } -echo "<div style='margin-bottom: 30px;'></div>"; +echo "<div class='mrgn_btn_30px'></div>"; // Map with the current position -echo '<div id="'.$agent_name.'_agent_map" style="border:1px solid black; width:100%; height: 30em;"></div>'; +echo '<div id="'.$agent_name.'_agent_map" class="agent_map_position"></div>'; 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.')); @@ -94,7 +94,7 @@ echo '<tr><td>'.__('Period to show data as path'); echo '<td>'; html_print_extended_select_for_time('period', $period, '', '', '0', 10); echo '<td>'; -html_print_submit_button(__('Refresh path'), 'refresh', false, 'class = "sub upd" style="margin-top:0px"'); +html_print_submit_button(__('Refresh path'), 'refresh', false, 'class="sub upd mrgn_top_0px"'); echo '</table></form>'; // Get the elements to present in this page diff --git a/pandora_console/operation/agentes/graphs.php b/pandora_console/operation/agentes/graphs.php index d33298b014..288c6ab5c7 100644 --- a/pandora_console/operation/agentes/graphs.php +++ b/pandora_console/operation/agentes/graphs.php @@ -206,7 +206,14 @@ $table->data[2][0] = ''; $table->data[2][1] = __('Begin date'); $table->data[2][2] = html_print_input_text('start_date', substr($start_date, 0, 10), '', 10, 40, true); -$table->data[2][2] .= html_print_image('images/calendar_view_day.png', true, ['onclick' => "scwShow(scwID('text-start_date'),this);"]); +$table->data[2][2] .= html_print_image( + 'images/calendar_view_day.png', + true, + [ + 'class' => 'invert_filter', + 'onclick' => "scwShow(scwID('text-start_date'),this);", + ] +); $table->data[3][1] = __('Time range'); @@ -250,12 +257,12 @@ if (check_acl($config['id_user'], 0, 'RW') || check_acl($config['id_user'], 0, ' 'save_custom_graph', false, '', - 'class="sub add" style=""', + 'class="sub add" ', true ); } -$htmlForm .= '  '.html_print_submit_button(__('Filter'), 'filter_button', false, 'class="sub upd" style=""', true); +$htmlForm .= '  '.html_print_submit_button(__('Filter'), 'filter_button', false, 'class="sub upd" ', true); $htmlForm .= '</div>'; $htmlForm .= '</form>'; @@ -272,25 +279,25 @@ if ($start_date != $current) { if ($combined) { // Pass the $modules before the ajax call - echo '<div class="combined-graph-container" style="width: 100%; text-align: center;"'.'data-period="'.$period.'"'.'data-stacked="'.CUSTOM_GRAPH_LINE.'"'.'data-date="'.$date.'"'.'data-height="'.$height.'"'.'>'.html_print_image('images/spinner.gif', true).'</div>'; + echo '<div class="combined-graph-container center w100p"'.'data-period="'.$period.'"'.'data-stacked="'.CUSTOM_GRAPH_LINE.'"'.'data-date="'.$date.'"'.'data-height="'.$height.'"'.'>'.html_print_image('images/spinner.gif', true).'</div>'; } else { foreach ($modules as $id_module) { $title = modules_get_agentmodule_name($id_module); $unit = modules_get_unit($id_module); echo '<h4>'.$title.'</h4>'; - echo '<div class="sparse-graph-container" style="width: 100%; text-align: center;"'.'data-id_module="'.$id_module.'"'.'data-period="'.$period.'"'.'data-draw_events="'.(int) $draw_events.'"'.'data-title="'.$title.'"'.'data-draw_alerts="'.(int) $draw_alerts.'"'.'data-date="'.$date.'"'.'data-unit="'.$unit.'"'.'data-date="'.$date.'"'.'data-height="'.$height.'"'.'>'.html_print_image('images/spinner.gif', true).'</div>'; + echo '<div class="sparse-graph-container center w100p"'.'data-id_module="'.$id_module.'"'.'data-period="'.$period.'"'.'data-draw_events="'.(int) $draw_events.'"'.'data-title="'.$title.'"'.'data-draw_alerts="'.(int) $draw_alerts.'"'.'data-date="'.$date.'"'.'data-unit="'.$unit.'"'.'data-date="'.$date.'"'.'data-height="'.$height.'"'.'>'.html_print_image('images/spinner.gif', true).'</div>'; } } -echo "<div style='clear: both;'></div>"; +echo "<div class='both'></div>"; -echo '<div id="graph-error-message" style="display: none;">'; +echo '<div id="graph-error-message" class="invisible">'; ui_print_error_message(__('There was an error loading the graph')); echo '</div>'; // Dialog to save the custom graph -echo "<div id='dialog_save_custom_graph' style='display: none;'>"; +echo "<div id='dialog_save_custom_graph' class='invisible'>"; $table = new stdClass(); $table->width = '100%'; $table->style[0] = 'font-weight: bolder; text-align: right;'; diff --git a/pandora_console/operation/agentes/group_view.php b/pandora_console/operation/agentes/group_view.php index 0f528cc6fb..befd7439fb 100644 --- a/pandora_console/operation/agentes/group_view.php +++ b/pandora_console/operation/agentes/group_view.php @@ -148,26 +148,26 @@ if ($total_agentes > 0) { echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="databox">'; echo '<tr>'; - echo "<th colspan=2 style='text-align: center;'>".__('Summary of the status groups').'</th>'; + echo "<th colspan=2 class='center'>".__('Summary of the status groups').'</th>'; echo '</tr>'; echo '<tr>'; - echo "<th width=50% style='text-align:center'>".__('Agents').'</th>'; - echo "<th width=50% style='text-align:center'>".__('Modules').'</th>'; + echo "<th width=50% class='center'>".__('Agents').'</th>'; + echo "<th width=50% class='center'>".__('Modules').'</th>'; echo '</tr>'; echo "<tr height=70px'>"; echo "<td align='center'>"; - echo "<span id='sumary' style='background-color:#e63c52;'>".$total_agent_critical.'%</span>'; - echo "<span id='sumary' style='background-color:#f3b200;'>".$total_agent_warning.'%</span>'; - echo "<span id='sumary' style='background-color:#82b92e;'>".$total_agent_ok.'%</span>'; - echo "<span id='sumary' style='background-color:#B2B2B2;'>".$total_agent_unknown.'%</span>'; - echo "<span id='sumary' style='background-color:#5bb6e5;'>".$total_not_init.'%</span>'; + echo "<span id='sumary' class='red_background'>".$total_agent_critical.'%</span>'; + echo "<span id='sumary' class='yellow_background'>".$total_agent_warning.'%</span>'; + echo "<span id='sumary' class='green_background'>".$total_agent_ok.'%</span>'; + echo "<span id='sumary' class='bg_B2B2B2'>".$total_agent_unknown.'%</span>'; + echo "<span id='sumary' class='bg_5bb6e5'>".$total_not_init.'%</span>'; echo '</td>'; echo "<td align='center'>"; - echo "<span id='sumary' style='background-color:#e63c52;'>".$total_critical.'%</span>'; - echo "<span id='sumary' style='background-color:#f3b200;'>".$total_warning.'%</span>'; - echo "<span id='sumary' style='background-color:#82b92e;'>".$total_ok.'%</span>'; - echo "<span id='sumary' style='background-color:#B2B2B2;'>".$total_unknown.'%</span>'; - echo "<span id='sumary' style='background-color:#5bb6e5;'>".$total_monitor_not_init.'%</span>'; + echo "<span id='sumary' class='red_background'>".$total_critical.'%</span>'; + echo "<span id='sumary' class='yellow_background'>".$total_warning.'%</span>'; + echo "<span id='sumary' class='green_background'>".$total_ok.'%</span>'; + echo "<span id='sumary' class='bg_B2B2B2'>".$total_unknown.'%</span>'; + echo "<span id='sumary' class='bg_5bb6e5'>".$total_monitor_not_init.'%</span>'; echo '</td>'; echo '</tr>'; echo '</table>'; @@ -181,28 +181,28 @@ if ($count == 1) { ui_pagination($count); if (!empty($result_groups)) { - echo '<table cellpadding="0" cellspacing="0" style="margin-top:10px;" class="databox data" border="0" width="100%">'; + echo '<table cellpadding="0" cellspacing="0" class="databox data mrgn_top_10px" border="0" width="100%">'; echo '<tr>'; echo '<th colspan=2 ></th>'; - echo "<th colspan=6 class='difference' style='text-align:center'>".__('Agents').'</th>'; - echo "<th colspan=6 style='text-align:center'>".__('Modules').'</th>'; + echo "<th colspan=6 class='difference center'>".__('Agents').'</th>'; + echo "<th colspan=6 class='center'>".__('Modules').'</th>'; echo '</tr>'; echo '<tr>'; - echo "<th style='width: 26px;'>".__('Force').'</th>'; - echo "<th width='30%' style='min-width: 60px;'>".__('Group').'/'.__('Tags').'</th>'; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>".__('Total').'</th>'; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>".__('Unknown').'</th>'; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>".__('Not init').'</th>'; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>".__('Normal').'</th>'; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>".__('Warning').'</th>'; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>".__('Critical').'</th>'; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>".__('Unknown').'</th>'; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>".__('Not init').'</th>'; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>".__('Normal').'</th>'; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>".__('Warning').'</th>'; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>".__('Critical').'</th>'; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>".__('Alert fired').'</th>'; + echo "<th class='w26px'>".__('Force').'</th>'; + echo "<th width='30%' class='mw60px'>".__('Group').'/'.__('Tags').'</th>'; + echo "<th width='10%' class='mw60px center'>".__('Total').'</th>'; + echo "<th width='10%' class='mw60px center'>".__('Unknown').'</th>'; + echo "<th width='10%' class='mw60px center'>".__('Not init').'</th>'; + echo "<th width='10%' class='mw60px center'>".__('Normal').'</th>'; + echo "<th width='10%' class='mw60px center'>".__('Warning').'</th>'; + echo "<th width='10%' class='mw60px center'>".__('Critical').'</th>'; + echo "<th width='10%' class='mw60px center'>".__('Unknown').'</th>'; + echo "<th width='10%' class='mw60px center'>".__('Not init').'</th>'; + echo "<th width='10%' class='mw60px center'>".__('Normal').'</th>'; + echo "<th width='10%' class='mw60px center'>".__('Warning').'</th>'; + echo "<th width='10%' class='mw60px center'>".__('Critical').'</th>'; + echo "<th width='10%' class='mw60px center'>".__('Alert fired').'</th>'; echo '</tr>'; foreach ($result_groups as $data) { @@ -234,12 +234,20 @@ if (!empty($result_groups)) { $status_image = ui_print_status_image('agent_no_data_ball.png', '', true); } - echo "<tr style='height: 35px;'>"; + echo "<tr class='height_35px'>"; // Force - echo "<td class='group_view_data' style='text-align: center; vertica-align: middle;'>"; + echo "<td class='group_view_data center vertical_middle'>"; if (!isset($data['_is_tag_']) && check_acl($config['id_user'], $data['_id_'], 'AW')) { - echo '<a href="index.php?sec=estado&sec2=operation/agentes/group_view&update_netgroup='.$data['_id_'].'">'.html_print_image('images/target.png', true, ['border' => '0', 'title' => __('Force')]).'</a>'; + echo '<a href="index.php?sec=estado&sec2=operation/agentes/group_view&update_netgroup='.$data['_id_'].'">'.html_print_image( + 'images/target.png', + true, + [ + 'border' => '0', + 'title' => __('Force'), + 'class' => 'invert_filter', + ] + ).'</a>'; } echo '</td>'; @@ -261,7 +269,7 @@ if (!empty($result_groups)) { $link = "<a href='index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data['_id_']."'>"; } - $group_name = "<b><span style='font-size: 7.5pt'>".ui_print_truncate_text($data['_name_'], 50).'</span></b>'; + $group_name = '<b><span>'.ui_print_truncate_text($data['_name_'], 50).'</span></b>'; $item_icon = ''; if (isset($data['_iconImg_']) && !empty($data['_iconImg_'])) { @@ -286,12 +294,12 @@ if (!empty($result_groups)) { echo '</td>'; // Total agents - echo "<td style='font-weight: bold; font-size: 18px;' align='center' class='$color_class'>"; + echo "<td align='center' class='$color_class bolder font_18pt'>"; if (isset($data['_is_tag_'])) { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px' href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_']."'>"; } else { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder font_18px center' href='index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data['_id_']."'>"; } @@ -306,12 +314,12 @@ if (!empty($result_groups)) { echo '</td>'; // Agents unknown - echo "<td class='group_view_data group_view_data_unk $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + echo "<td class='group_view_data group_view_data_unk $color_class bolder font_18px center'>"; if (isset($data['_is_tag_'])) { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder font_18px center' href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_'].'&status='.AGENT_STATUS_UNKNOWN."'>"; } else { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder font_18x center' href='index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data['_id_'].'&status='.AGENT_STATUS_UNKNOWN."'>"; } @@ -326,12 +334,12 @@ if (!empty($result_groups)) { echo '</td>'; // Agents not init - echo "<td class='group_view_data group_view_data_unk $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + echo "<td class='group_view_data group_view_data_unk $color_class bolder font_18px center'>"; if (isset($data['_is_tag_'])) { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder ont_18px center' href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_'].'&status='.AGENT_STATUS_NOT_INIT."'>"; } else { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder font_18px center' href='index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data['_id_'].'&status='.AGENT_STATUS_NOT_INIT."'>"; } @@ -346,12 +354,12 @@ if (!empty($result_groups)) { echo '</td>'; // Agents Normal - echo "<td class='group_view_data group_view_data_unk $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + echo "<td class='group_view_data group_view_data_unk $color_class bolder font_18px center'>"; if (isset($data['_is_tag_'])) { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder font_18px center' href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_'].'&status='.AGENT_STATUS_NORMAL."'>"; } else { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder ont_18px center' href='index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data['_id_'].'&status='.AGENT_STATUS_NORMAL."'>"; } @@ -366,12 +374,12 @@ if (!empty($result_groups)) { echo '</td>'; // Agents warning - echo "<td class='group_view_data group_view_data_unk $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + echo "<td class='group_view_data group_view_data_unk $color_class bolder font_18px center'>"; if (isset($data['_is_tag_'])) { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px' href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_'].'&status='.AGENT_STATUS_WARNING."'>"; } else { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px' href='index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data['_id_'].'&status='.AGENT_STATUS_WARNING."'>"; } @@ -386,12 +394,12 @@ if (!empty($result_groups)) { echo '</td>'; // Agents critical - echo "<td class='group_view_data group_view_data_unk $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + echo "<td class='group_view_data group_view_data_unk $color_class bolder center font_18px'>"; if (isset($data['_is_tag_'])) { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px' href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_'].'&status='.AGENT_STATUS_CRITICAL."'>"; } else { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px' href='index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data['_id_'].'&status='.AGENT_STATUS_CRITICAL."'>"; } @@ -406,12 +414,12 @@ if (!empty($result_groups)) { echo '</td>'; // Monitors unknown - echo "<td class='group_view_data group_view_data_unk $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + echo "<td class='group_view_data group_view_data_unk $color_class bolder font_18px center'>"; if (!isset($data['_is_tag_'])) { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px' href='index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_'].'&status='.AGENT_MODULE_STATUS_UNKNOWN."'>"; } else { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px' href='index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_'].'&status='.AGENT_MODULE_STATUS_UNKNOWN."'>"; } @@ -426,12 +434,12 @@ if (!empty($result_groups)) { echo '</td>'; // Monitors not init - echo "<td class='group_view_data group_view_data_unk $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + echo "<td class='group_view_data group_view_data_unk $color_class bolder font_18px center'>"; if (!isset($data['_is_tag_'])) { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px' href='index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_'].'&status='.AGENT_MODULE_STATUS_NOT_INIT."'>"; } else { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px' href='index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_'].'&status='.AGENT_MODULE_STATUS_NOT_INIT."'>"; } @@ -446,12 +454,12 @@ if (!empty($result_groups)) { echo '</td>'; // Monitors OK - echo "<td class='group_view_data group_view_data_ok $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + echo "<td class='group_view_data group_view_data_ok $color_class bolder center font_18px'>"; if (!isset($data['_is_tag_'])) { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px' href='index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_'].'&status='.AGENT_MODULE_STATUS_NORMAL."'>"; } else { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px' href='index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_'].'&status='.AGENT_MODULE_STATUS_NORMAL."'>"; } @@ -466,12 +474,12 @@ if (!empty($result_groups)) { echo '</td>'; // Monitors Warning - echo "<td class='group_view_data group_view_data_warn $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + echo "<td class='group_view_data group_view_data_warn $color_class bolder center font_18px'>"; if (!isset($data['_is_tag_'])) { - $link = "<a class='group_view_data group_view_data_warn $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data group_view_data_warn $color_class bolder center font_18px' href='index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_'].'&status='.AGENT_MODULE_STATUS_WARNING."'>"; } else { - $link = "<a class='group_view_data group_view_data_warn $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data group_view_data_warn $color_class bolder center font_18px' href='index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_'].'&status='.AGENT_MODULE_STATUS_WARNING."'>"; } @@ -486,12 +494,12 @@ if (!empty($result_groups)) { echo '</td>'; // Monitors Critical - echo "<td class='group_view_data group_view_data_crit $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + echo "<td class='group_view_data group_view_data_crit $color_class bolder center font_18px'>"; if (!isset($data['_is_tag_'])) { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class font_18px bolder center' href='index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_'].'&status='.AGENT_MODULE_STATUS_CRITICAL_BAD."'>"; } else { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class font_18px bolder center' href='index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_'].'&status='.AGENT_MODULE_STATUS_CRITICAL_BAD."'>"; } @@ -506,12 +514,12 @@ if (!empty($result_groups)) { echo '</td>'; // Alerts fired - echo "<td class='group_view_data group_view_data_alrm $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + echo "<td class='group_view_data group_view_data_alrm $color_class bolder center font_18px's>"; if (!isset($data['_is_tag_'])) { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px's href='index.php?sec=estado&sec2=operation/agentes/alerts_status&ag_group=".$data['_id_']."&filter=fired'>"; } else { - $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + $link = "<a class='group_view_data $color_class bolder center font_18px' href='index.php?sec=estado&sec2=operation/agentes/alerts_status&tag_filter=".$data['_id_']."&filter=fired'>"; } diff --git a/pandora_console/operation/agentes/interface_traffic_graph_win.php b/pandora_console/operation/agentes/interface_traffic_graph_win.php index 3f759999ec..d463d75e95 100644 --- a/pandora_console/operation/agentes/interface_traffic_graph_win.php +++ b/pandora_console/operation/agentes/interface_traffic_graph_win.php @@ -111,7 +111,7 @@ require_once $config['homedir'].'/include/graphs/functions_flot.php'; --> </script> </head> -<body style='background:#ffffff;'> +<body class='bg_white'> <?php // ACL. $all_groups = agents_get_all_groups_agent($agent_id); @@ -266,7 +266,7 @@ $table->data[] = $data; $table->rowclass[] = ''; $form_table = html_print_table($table, true); -$form_table .= '<div style="width:100%; text-align:right;">'; +$form_table .= '<div class="w100p right">'; $form_table .= html_print_submit_button( __('Reload'), 'submit', @@ -278,7 +278,7 @@ $form_table .= '</div>'; // Menu. -$menu_form = "<form method='get' action='interface_traffic_graph_win.php' style='margin-top: 10px;'>".html_print_input_hidden('params', base64_encode($params_json), true); +$menu_form = "<form method='get' action='interface_traffic_graph_win.php' class='mrgn_top-10px'>".html_print_input_hidden('params', base64_encode($params_json), true); if (empty($server_id) === false) { $menu_form .= html_print_input_hidden('server', $server_id, true); @@ -312,6 +312,13 @@ $menu_form .= '</div>'; $menu_form .= '</form>'; echo $menu_form; +echo '<div class="module_graph_menu_dropdown"> + <div id="module_graph_menu_header" class="module_graph_menu_header"> + '.html_print_image('images/arrow_down_green.png', true, ['class' => 'module_graph_menu_arrow', 'float' => 'left'], false, false, true).' + <span class="flex_2">'.__('Graph configuration menu').'</span></div> + <div class="module_graph_menu_content module_graph_menu_content_closed invisible" >'.$form_table.'</div> + </div>'; +echo '</form>'; // Hidden div to forced title. html_print_div( diff --git a/pandora_console/operation/agentes/log_sources_status.php b/pandora_console/operation/agentes/log_sources_status.php index 61d785ce0f..ee1bd3ee35 100644 --- a/pandora_console/operation/agentes/log_sources_status.php +++ b/pandora_console/operation/agentes/log_sources_status.php @@ -54,7 +54,7 @@ foreach ($logs as $log) { ob_start(); if (!empty($table->data)) { - echo '<div id="log_sources_status" style="width:100%;">'; + echo '<div id="log_sources_status w100p">'; html_print_table($table); echo '</div>'; } else { @@ -63,7 +63,7 @@ if (!empty($table->data)) { } // Hidden form to perform post request to Log Viewer page when clicking on the Review field icon. -echo '<form method="POST" action="index.php?sec=estado&sec2=enterprise/operation/log/log_viewer" name="review_log_form" id="review_log_form" style="display: none;">'; +echo '<form method="POST" action="index.php?sec=estado&sec2=enterprise/operation/log/log_viewer" name="review_log_form" id="review_log_form" class="invisible">'; html_print_input_hidden('agent_id', $agent_id, false); html_print_input_hidden('source', null, false); diff --git a/pandora_console/operation/agentes/networkmap.dinamic.php b/pandora_console/operation/agentes/networkmap.dinamic.php index 1a7296c0f5..29651ca1ad 100644 --- a/pandora_console/operation/agentes/networkmap.dinamic.php +++ b/pandora_console/operation/agentes/networkmap.dinamic.php @@ -98,7 +98,10 @@ if ($pure == 1) { 'text' => '<a href="index.php?sec=network&'.'sec2=operation/agentes/networkmap.dinamic&'.'activeTab=radial_dynamic&id_networkmap='.$id.'">'.html_print_image( 'images/normal_screen.png', true, - ['title' => __('Normal screen')] + [ + 'title' => __('Normal screen'), + 'class' => 'invert_filter', + ] ).'</a>', ]; } else { @@ -108,7 +111,10 @@ if ($pure == 1) { 'text' => '<a href="index.php?sec=network&'.'sec2=operation/agentes/networkmap.dinamic&'.'pure=1&activeTab=radial_dynamic&id_networkmap='.$id.'">'.html_print_image( 'images/full_screen.png', true, - ['title' => __('Full screen')] + [ + 'title' => __('Full screen'), + 'class' => 'invert_filter', + ] ).'</a>', ]; $buttons['list'] = [ @@ -116,7 +122,10 @@ if ($pure == 1) { 'text' => '<a href="index.php?sec=networkmapconsole&'.'sec2=operation/agentes/pandora_networkmap">'.html_print_image( 'images/list.png', true, - ['title' => __('List of networkmap')] + [ + 'title' => __('List of networkmap'), + 'class' => 'invert_filter', + ] ).'</a>', ]; } @@ -153,7 +162,7 @@ if (empty($height)) { if ($activeTab == 'radial_dynamic') { include_once 'include/functions_graph.php'; - echo "<div style='width: auto; text-align: center;'>"; + echo "<div class='wauto center'>"; $filter = []; if ($networkmap['source'] == 0) { @@ -237,7 +246,7 @@ networkmap_print_jsdata($graph); $zoom_default = file($config['homedir'].'/images/zoom_default.svg'); ?> -<div style="display: none"> +<div class="invisible"> <?php echo implode("\n", $zoom_default); ?> diff --git a/pandora_console/operation/agentes/pandora_networkmap.php b/pandora_console/operation/agentes/pandora_networkmap.php index 49538eb24f..8c8c5ec087 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.php +++ b/pandora_console/operation/agentes/pandora_networkmap.php @@ -590,10 +590,10 @@ switch ($tab) { if (!empty($ent_maps_to_migrate) || !empty($open_maps_to_migrate)) { ?> - <div id="migration_dialog" style="text-align: center;"> - <p style="text-align: center;"><strong>Networkmaps are not migrated, wait while migration is processed...</strong></p> + <div id="migration_dialog" class="center"> + <p class="center"><strong>Networkmaps are not migrated, wait while migration is processed...</strong></p> <br> - <img style="vertical-align: middle;" src="images/spinner.gif"> + <img class="vertical_middle" src="<?php echo 'images/spinner.gif'; ?>"> </div> <script> $("#migration_dialog").dialog({ @@ -795,9 +795,9 @@ switch ($tab) { 'edit' => 'action_buttons', 'delete' => 'action_buttons', ]; - $data['copy'] = '<a href="index.php?'.'sec=network&'.'sec2=operation/agentes/pandora_networkmap&'.'copy_networkmap=1&'.'id_networkmap='.$network_map['id'].'" alt="'.__('Copy').'">'.html_print_image('images/copy.png', true).'</a>'; - $data['edit'] = '<a href="index.php?'.'sec=network&'.'sec2=operation/agentes/pandora_networkmap&'.'tab=edit&'.'edit_networkmap=1&'.'id_networkmap='.$network_map['id'].'" alt="'.__('Config').'">'.html_print_image('images/config.png', true).'</a>'; - $data['delete'] = '<a href="index.php?'.'sec=network&'.'sec2=operation/agentes/pandora_networkmap&'.'delete=1&'.'id_networkmap='.$network_map['id'].'" alt="'.__('Delete').'" onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a>'; + $data['copy'] = '<a href="index.php?'.'sec=network&'.'sec2=operation/agentes/pandora_networkmap&'.'copy_networkmap=1&'.'id_networkmap='.$network_map['id'].'" alt="'.__('Copy').'">'.html_print_image('images/copy.png', true, ['class' => 'invert_filter']).'</a>'; + $data['edit'] = '<a href="index.php?'.'sec=network&'.'sec2=operation/agentes/pandora_networkmap&'.'tab=edit&'.'edit_networkmap=1&'.'id_networkmap='.$network_map['id'].'" alt="'.__('Config').'">'.html_print_image('images/config.png', true, ['class' => 'invert_filter']).'</a>'; + $data['delete'] = '<a href="index.php?'.'sec=network&'.'sec2=operation/agentes/pandora_networkmap&'.'delete=1&'.'id_networkmap='.$network_map['id'].'" alt="'.__('Delete').'" onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>'; } $table->data[] = $data; @@ -814,7 +814,7 @@ switch ($tab) { echo "<div style='width: ".$table->width."; margin-top: 5px;'>"; echo '<form method="post" action="index.php?sec=network&sec2=operation/agentes/pandora_networkmap">'; html_print_input_hidden('new_networkmap', 1); - html_print_submit_button(__('Create network map'), 'crt', false, 'class="sub next" style="float: right;"'); + html_print_submit_button(__('Create network map'), 'crt', false, 'class="sub next float-right"'); echo '</form>'; echo '</div>'; @@ -822,7 +822,7 @@ switch ($tab) { echo "<div style='width: ".$table->width."; margin-top: 5px;'>"; echo '<form method="post" action="index.php?sec=network&sec2=operation/agentes/pandora_networkmap">'; html_print_input_hidden('new_empty_networkmap', 1); - html_print_submit_button(__('Create empty network map'), 'crt', false, 'class="sub next" style="float: right; margin-right:20px;"'); + html_print_submit_button(__('Create empty network map'), 'crt', false, 'class="sub next float-right mrgn_right_20px"'); echo '</form>'; echo '</div>'; } diff --git a/pandora_console/operation/agentes/pandora_networkmap.view.php b/pandora_console/operation/agentes/pandora_networkmap.view.php index 81a2146f57..c4958378c1 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.view.php +++ b/pandora_console/operation/agentes/pandora_networkmap.view.php @@ -264,9 +264,9 @@ if (is_ajax()) { $return = []; $return['correct'] = true; - $return['content'] = '<div style="border: 1px solid black;"> - <div style="width: 100%; text-align: right;"><a style="text-decoration: none; color: black;" href="javascript: hide_tooltip();">X</a></div> - <div style="margin: 5px;"> + $return['content'] = '<div class="border_1px_black"> + <div class="w100p right"><a class="no_decoration black" href="javascript: hide_tooltip();">X</a></div> + <div class="mrgn_5px"> '; $return['content'] .= '<b>'.__('Name: ').'</b>'.ui_print_string_substr($module['nombre'], 30, true).'<br />'; @@ -306,7 +306,7 @@ if (is_ajax()) { $img = 'images/policies_brick.png'; $title = __('(Adopt) ').$name_policy; } else { - $img = 'images/policies.png'; + $img = 'images/policies_mc.png'; $title = $name_policy; } } else { @@ -826,7 +826,10 @@ if ($networkmap === false) { 'text' => '<a href="index.php?sec=networkmapconsole&sec2=operation/agentes/pandora_networkmap&tab=view&id_networkmap='.$id.'">'.html_print_image( 'images/normal_screen.png', true, - ['title' => __('Normal screen')] + [ + 'title' => __('Normal screen'), + 'class' => 'invert_filter', + ] ).'</a>', ]; } else { @@ -836,7 +839,10 @@ if ($networkmap === false) { 'text' => '<a href="index.php?sec=networkmapconsole&sec2=operation/agentes/pandora_networkmap&pure=1&tab=view&id_networkmap='.$id.'">'.html_print_image( 'images/full_screen.png', true, - ['title' => __('Full screen')] + [ + 'title' => __('Full screen'), + 'class' => 'invert_filter', + ] ).'</a>', ]; $buttons['list'] = [ @@ -844,7 +850,10 @@ if ($networkmap === false) { 'text' => '<a href="index.php?sec=networkmapconsole&sec2=operation/agentes/pandora_networkmap">'.html_print_image( 'images/list.png', true, - ['title' => __('List of networkmap')] + [ + 'title' => __('List of networkmap'), + 'class' => 'invert_filter', + ] ).'</a>', ]; } diff --git a/pandora_console/operation/agentes/realtime_win.php b/pandora_console/operation/agentes/realtime_win.php index 5b2f357334..53837e7c5b 100644 --- a/pandora_console/operation/agentes/realtime_win.php +++ b/pandora_console/operation/agentes/realtime_win.php @@ -92,7 +92,7 @@ echo '<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/ include_javascript_dependencies_flot_graph(); ?> </head> - <body bgcolor="#ffffff" style='background:#ffffff;'> + <body bgcolor="#ffffff" class='bg_white'> <?php if (!check_acl($config['id_user'], 0, 'AR')) { include $config['homedir'].'/general/noaccess.php'; diff --git a/pandora_console/operation/agentes/snapshot_view.php b/pandora_console/operation/agentes/snapshot_view.php index 3298db7146..11bb4fcdd2 100644 --- a/pandora_console/operation/agentes/snapshot_view.php +++ b/pandora_console/operation/agentes/snapshot_view.php @@ -85,25 +85,25 @@ if (!check_acl_one_of_groups($config['id_user'], $all_groups, 'AR')) { <title><?php echo __('%s Snapshot data view for module (%s)', get_product_name(), $label); ?> - + "; + echo "

"; echo __('Current data at %s', $last_timestamp); echo '

'; if (is_image_data($last_data)) { - echo '
image
'; + echo '
image
'; } else { $last_data = preg_replace('//', '>', $last_data); $last_data = preg_replace('/\n/i', '
', $last_data); $last_data = preg_replace('/\s/i', ' ', $last_data); - echo "
"; + echo "
"; echo $last_data; echo '
'; ?> - + '; + $form_table .= '
'; $form_table .= html_print_submit_button( __('Reload'), 'submit', @@ -397,7 +397,7 @@ ui_print_message_dialog( $form_table .= '
'; // Menu. - $menu_form = "
"; + $menu_form = ""; $menu_form .= html_print_input_hidden('id', $id, true); $menu_form .= html_print_input_hidden('label', $label, true); @@ -431,7 +431,7 @@ ui_print_message_dialog( ); $menu_form .= ''; $menu_form .= '
'; - $menu_form .= ''; diff --git a/pandora_console/operation/agentes/status_events.php b/pandora_console/operation/agentes/status_events.php index 87950e210b..8049d52b04 100755 --- a/pandora_console/operation/agentes/status_events.php +++ b/pandora_console/operation/agentes/status_events.php @@ -22,7 +22,7 @@ if (!isset($id_agente)) { require_once 'include/functions_events.php'; ui_require_css_file('events'); ui_toggle( - "
".html_print_image('images/spinner.gif', true).'
', + "
".html_print_image('images/spinner.gif', true).'
', __('Latest events for this agent'), __('Latest events for this agent'), '', diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index fe969ddd16..9424792eba 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -40,13 +40,27 @@ if (! defined('METACONSOLE')) { $buttons['fields'] = [ 'active' => false, - 'text' => ''.html_print_image('images/custom_columns.png', true, ['title' => __('Custom fields')]).'', + 'text' => ''.html_print_image( + 'images/custom_columns.png', + true, + [ + 'title' => __('Custom fields'), + 'class' => 'invert_filter', + ] + ).'', 'operation' => true, ]; $buttons['view'] = [ 'active' => false, - 'text' => ''.html_print_image('images/list.png', true, ['title' => __('View')]).'', + 'text' => ''.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('View'), + 'class' => 'invert_filter', + ] + ).'', 'operation' => true, ]; @@ -466,7 +480,7 @@ $table->data[0][6] = html_print_submit_button( __('Show'), 'uptbutton', false, - 'class="sub search" style="margin-top:0px;"', + 'class="sub search mgn_tp_0"', true ); @@ -1328,7 +1342,7 @@ if (!empty($result)) { $img = 'images/policies_brick.png'; $title = __('(Adopt) ').$policyInfo['name_policy']; } else { - $img = 'images/policies.png'; + $img = 'images/policies_mc.png'; $title = $policyInfo['name_policy']; } } else { @@ -1423,7 +1437,7 @@ if (!empty($result)) { true, [ 'title' => $row['tags'], - 'style' => 'width: 20px; margin-left: 3px;', + 'class' => 'tag_row', ] ); } @@ -1616,10 +1630,10 @@ if (!empty($result)) { $data[8] = get_module_realtime_link_graph($row); if (!is_snapshot_data($row['datos'])) { - $data[8] .= ''.html_print_image('images/chart_curve.png', true, ['border' => '0', 'alt' => '']).''; + $data[8] .= ''.html_print_image('images/chart.png', true, ['border' => '0', 'alt' => '']).''; } - $data[8] .= ''.html_print_image( + $data[8] .= ''.html_print_image( 'images/binary.png', true, [ @@ -1629,7 +1643,7 @@ if (!empty($result)) { ).''; $data[8] .= ''.$row['module_name'].''; + class=\'invisible\'>'.$row['module_name'].''; } } @@ -1767,8 +1781,8 @@ if (!empty($result)) { $salida = $module_value; } else { $salida = '".$module_value.''.'".''.$sub_string.' '."".html_print_image('images/rosette.png', true).''; + class='invisible'>".$module_value.''.'".''.$sub_string.' '."".html_print_image('images/rosette.png', true).''; } } } diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index 18ecbe4828..edfbe50bb9 100755 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -115,8 +115,8 @@ if (!empty($all_data)) { $data['server_sanity'] = format_numeric((100 - $data['module_sanity']), 1); } -echo ''; -echo '
'; +echo ''; +echo ''; // Left column -echo '"; + echo ""; echo "'; echo ''; - echo ""; + echo ""; echo ''; echo "'; echo ''; - $advanced_toggle = '
'; // --------------------------------------------------------------------- // The status horizontal bars (Global health, Monitor sanity... // --------------------------------------------------------------------- @@ -175,7 +175,7 @@ ui_toggle( echo ''; +echo ''; // --------------------------------------------------------------------- // Last events information @@ -209,7 +209,7 @@ if ($is_admin) { include $config['homedir'].'/godmode/servers/servers.build_table.php'; } -$out = '
'; +$out = ''; echo '
'; $out .= '
'.__('Event graph').''.html_print_image('images/spinner.gif', true, ['id' => 'spinner_total_event_graph']).'
'; $out .= '
'; diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 82b7d146c3..3de7ae4608 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -984,14 +984,22 @@ if (is_ajax()) { $module = db_get_row('tagente_modulo', 'id_agente_modulo', $id_module); echo '

'; - echo html_print_image('images/brick.png', true).' '; + echo html_print_image( + 'images/agent.png', + true, + ['class' => 'invert_filter'] + ).' '; echo ui_print_truncate_text($module['nombre'], 'module_small', false, true, false).'

'; echo ''.__('Type').': '; $agentmoduletype = modules_get_agentmodule_type($module['id_agente_modulo']); echo modules_get_moduletype_name($agentmoduletype).' '; echo html_print_image('images/'.modules_get_type_icon($agentmoduletype), true).'
'; echo ''.__('Module group').': '; - $modulegroup = modules_get_modulegroup_name(modules_get_agentmodule_modulegroup($module['id_agente_modulo'])); + $modulegroup = modules_get_modulegroup_name( + modules_get_agentmodule_modulegroup( + $module['id_agente_modulo'] + ) + ); if ($modulegroup === false) { echo __('None').'
'; } else { @@ -999,7 +1007,15 @@ if (is_ajax()) { } echo ''.__('Agent').': '; - echo ui_print_truncate_text(modules_get_agentmodule_agent_alias($module['id_agente_modulo']), 'agent_small', false, true, false).'
'; + echo ui_print_truncate_text( + modules_get_agentmodule_agent_alias( + $module['id_agente_modulo'] + ), + 'agent_small', + false, + true, + false + ).'
'; if ($module['id_tipo_modulo'] == 18) { echo ''.__('Address').': '; @@ -1013,7 +1029,7 @@ if (is_ajax()) { if (count($ips) == 1) { echo $ips[0]; } else { - echo '

'.__('Status').'

'; + echo '

'.__('Status').'

'; foreach (incidents_get_status() as $id => $str) { incidents_print_status_img($id); echo ' - '.$str.'
'; } - echo '

'.__('Priority').'

'; + echo '

'.__('Priority').'

'; foreach (incidents_get_priorities() as $id => $str) { incidents_print_priority_img($id); echo ' - '.$str.'
'; @@ -476,11 +476,11 @@ if ($count_total < 1) { array_push($table->data, $data); } - echo '
'; + echo ''; html_print_table($table); - echo '
'; + echo '
'; if (check_acl($config['id_user'], 0, 'IW')) { - html_print_submit_button(__('Delete incidents'), 'delete_btn', false, 'class="sub delete" style="margin-right: 5px;"'); + html_print_submit_button(__('Delete incidents'), 'delete_btn', false, 'class="sub delete" class="mrgn_right_5px"'); } if (check_acl($config['id_user'], 0, 'IM')) { @@ -491,7 +491,7 @@ if ($count_total < 1) { echo ''; unset($table); if (check_acl($config['id_user'], 0, 'IW')) { - echo '
'; + echo '
'; echo '
'; html_print_submit_button(__('Create incident'), 'crt', false, 'class="sub next"'); echo '
'; @@ -500,4 +500,4 @@ if ($count_total < 1) { } -echo '
 
'; +echo '
 
'; diff --git a/pandora_console/operation/incidents/incident_detail.php b/pandora_console/operation/incidents/incident_detail.php index 70288d29bf..b432a7d34a 100755 --- a/pandora_console/operation/incidents/incident_detail.php +++ b/pandora_console/operation/incidents/incident_detail.php @@ -390,12 +390,12 @@ echo '
'; if ((check_acl($config['id_user'], $id_grupo, 'IM') == 1) or ($usuario == $config['id_user'])) { - html_print_textarea('descripcion', 15, 80, $texto, 'style="height:200px;"'); + html_print_textarea('descripcion', 15, 80, $texto, 'class="height_200px"'); } else { - html_print_textarea('descripcion', 15, 80, $texto, 'style="height:200px;" disabled'); + html_print_textarea('descripcion', 15, 80, $texto, 'class="height:200px" disabled'); } -echo '
'; +echo '
'; // Only if user is the used who opened incident or (s)he is admin if (isset($id_inc) and ((check_acl($config['id_user'], $id_grupo, 'IM') == 1) or ($usuario == $config['id_user']))) { @@ -423,7 +423,7 @@ if (isset($id_inc)) { echo '

'.__('Add note').'

'; echo ' - +
'; @@ -438,7 +438,7 @@ if (isset($id_inc)) { foreach ($result as $row) { $data = []; - $data[0] = html_print_image('images/page_white_text.png', true, ['border' => '0']); + $data[0] = html_print_image('images/page_white_text.png', true, ['class' => 'invert_filter', 'border' => '0']); $data[1] = __('Author').': '.ui_print_username($row['id_usuario'], true).' ('.ui_print_timestamp($row['timestamp'], true).')'; array_push($table->data, $data); @@ -526,7 +526,7 @@ if (isset($id_inc)) { echo ' - +
'.__('Filename').'
'.__('Description').'
'; } } diff --git a/pandora_console/operation/incidents/list_integriaims_incidents.php b/pandora_console/operation/incidents/list_integriaims_incidents.php index f18fb31566..9da970d00d 100644 --- a/pandora_console/operation/incidents/list_integriaims_incidents.php +++ b/pandora_console/operation/incidents/list_integriaims_incidents.php @@ -186,7 +186,7 @@ $table->data[2][3] .= html_print_input_text_extended( 50, false, '', - 'style="margin-left:5px;" placeholder="'.__('Created to').'"', + 'class="mrgn_lft_5px" placeholder="'.__('Created to').'"', true ); @@ -213,10 +213,10 @@ $decode_csv = base64_encode(json_encode($tickets_filters)); // ---- PRINT TABLE FILTERS ---- -$integria_incidents_form = '
'; +$integria_incidents_form = ''; $integria_incidents_form .= html_print_table($table, true); -$integria_incidents_form .= '
'; -$integria_incidents_form .= '
'.html_print_button( +$integria_incidents_form .= '
'; +$integria_incidents_form .= '
'.html_print_button( __('Export to CSV'), 'csv_export', false, @@ -303,7 +303,7 @@ foreach ($incidents_paginated as $key => $value) { if (check_acl($config['id_user'], 0, 'IM')) { $table->data[$i][8] .= ''; - $table->data[$i][8] .= html_print_image('images/cross.png', true, ['title' => __('Delete')]); + $table->data[$i][8] .= html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']); $table->data[$i][8] .= ''; } @@ -322,7 +322,7 @@ if (empty($table->data) === true) { // Show button to create incident. if (check_acl($config['id_user'], 0, 'IR')) { echo ''; - echo '
'; + echo '
'; html_print_submit_button(__('Create'), 'create_new_incident', false, 'class="sub next"'); echo '
'; echo ''; diff --git a/pandora_console/operation/messages/message_edit.php b/pandora_console/operation/messages/message_edit.php index 9d72c262cb..2378372a2a 100644 --- a/pandora_console/operation/messages/message_edit.php +++ b/pandora_console/operation/messages/message_edit.php @@ -48,7 +48,10 @@ $buttons['message_list'] = [ 'text' => ''.html_print_image( 'images/email_inbox.png', true, - ['title' => __('Received messages')] + [ + 'title' => __('Received messages'), + 'class' => 'invert_filter', + ] ).'', ]; @@ -57,7 +60,10 @@ $buttons['sent_messages'] = [ 'text' => ''.html_print_image( 'images/email_outbox.png', true, - ['title' => __('Sent messages')] + [ + 'title' => __('Sent messages'), + 'class' => 'invert_filter', + ] ).'', ]; @@ -66,7 +72,10 @@ $buttons['create_message'] = [ 'text' => ''.html_print_image( 'images/new_message.png', true, - ['title' => __('Create message')] + [ + 'title' => __('Create message'), + 'class' => 'invert_filter', + ] ).'', ]; diff --git a/pandora_console/operation/messages/message_list.php b/pandora_console/operation/messages/message_list.php index ca040ed4b4..9b25b9da9c 100644 --- a/pandora_console/operation/messages/message_list.php +++ b/pandora_console/operation/messages/message_list.php @@ -29,6 +29,8 @@ require_once 'include/functions_messages.php'; +global $config; + $delete_msg = get_parameter('delete_message', 0); $multiple_delete = get_parameter('multiple_delete', 0); $show_sent = get_parameter('show_sent', 0); @@ -41,14 +43,16 @@ if ($show_sent !== 0) { $active_sent = true; } + + $buttons['message_list'] = [ 'active' => $active_list, - 'text' => ''.html_print_image('images/email_inbox.png', true, ['title' => __('Received messages')]).'', + 'text' => ''.html_print_image('images/email_inbox.png', true, ['title' => __('Received messages'), 'class' => 'invert_filter']).'', ]; $buttons['sent_messages'] = [ 'active' => $active_sent, - 'text' => ''.html_print_image('images/email_outbox.png', true, ['title' => __('Sent messages')]).'', + 'text' => ''.html_print_image('images/email_outbox.png', true, ['title' => __('Sent messages'), 'class' => 'invert_filter']).'', ]; $buttons['create_message'] = [ @@ -56,7 +60,10 @@ $buttons['create_message'] = [ 'text' => ''.html_print_image( 'images/new_message.png', true, - ['title' => __('Create message')] + [ + 'title' => __('Create message'), + 'class' => 'invert_filter', + ] ).'', ]; @@ -189,21 +196,21 @@ if (empty($messages)) { if ($message['read'] == 1) { if ($show_sent) { $data[0] .= ''; - $data[0] .= html_print_image('images/email_open.png', true, ['border' => 0, 'title' => __('Click to read')]); + $data[0] .= html_print_image('images/email_inbox.png', true, ['border' => 0, 'title' => __('Click to read'), 'class' => 'invert_filter']); $data[0] .= ''; } else { $data[0] .= ''; - $data[0] .= html_print_image('images/email_open.png', true, ['border' => 0, 'title' => __('Mark as unread')]); + $data[0] .= html_print_image('images/email_inbox.png', true, ['border' => 0, 'title' => __('Mark as unread'), 'class' => 'invert_filter']); $data[0] .= ''; } } else { if ($show_sent) { $data[0] .= ''; - $data[0] .= html_print_image('images/email.png', true, ['border' => 0, 'title' => __('Message unread - click to read')]); + $data[0] .= html_print_image('images/email_inbox.png', true, ['border' => 0, 'title' => __('Message unread - click to read'), 'class' => 'invert_filter']); $data[0] .= ''; } else { $data[0] .= ''; - $data[0] .= html_print_image('images/email.png', true, ['border' => 0, 'title' => __('Message unread - click to read')]); + $data[0] .= html_print_image('images/email_inbox.png', true, ['border' => 0, 'title' => __('Message unread - click to read'), 'class' => 'invert_filter']); $data[0] .= ''; } } @@ -247,10 +254,10 @@ if (empty($messages)) { $table->cellclass[][4] = 'action_buttons'; if ($show_sent) { $data[4] = ''.html_print_image('images/cross.png', true, ['title' => __('Delete')]).''; + onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).''; } else { $data[4] = ''.html_print_image('images/cross.png', true, ['title' => __('Delete')]).''; + onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).''; } array_push($table->data, $data); @@ -266,7 +273,7 @@ if (!empty($messages)) { html_print_input_hidden('multiple_delete', 1); html_print_table($table); - echo "
"; + echo "
"; html_print_submit_button( __('Delete'), 'delete_btn', @@ -277,9 +284,9 @@ if (!empty($messages)) { echo ''; } -echo "
"; - echo '
'; - html_print_submit_button(__('Create message'), 'create', false, 'class="sub next" style="margin-right:5px;"'); +echo "
"; + echo ''; + html_print_submit_button(__('Create message'), 'create', false, 'class="sub next mrgn_right_5px"'); echo ''; echo '
'; ?> diff --git a/pandora_console/operation/netflow/nf_live_view.php b/pandora_console/operation/netflow/nf_live_view.php index 6cbc1ea16d..dae0c9457a 100644 --- a/pandora_console/operation/netflow/nf_live_view.php +++ b/pandora_console/operation/netflow/nf_live_view.php @@ -352,12 +352,12 @@ if (is_metaconsole()) { $filter_type = 0; } - echo "
'; + $advanced_toggle = '
'; $advanced_toggle .= ''; if ($netflow_disable_custom_lvfilters) { @@ -381,7 +381,7 @@ if (is_metaconsole()) { $advanced_toggle .= ''; } else { $advanced_toggle .= ''; - $advanced_toggle .= ''; + $advanced_toggle .= ''; } @@ -403,7 +403,7 @@ if (is_metaconsole()) { $advanced_toggle .= ''; $advanced_toggle .= ''; } else { - $advanced_toggle .= "'; + $advanced_toggle .= "'; $advanced_toggle .= ''; } @@ -411,7 +411,7 @@ if (is_metaconsole()) { $advanced_toggle .= ''; $advanced_toggle .= ''; } else { - $advanced_toggle .= "'; + $advanced_toggle .= "'; $advanced_toggle .= ''; } @@ -422,7 +422,7 @@ if (is_metaconsole()) { $advanced_toggle .= ''; $advanced_toggle .= ''; } else { - $advanced_toggle .= "'; + $advanced_toggle .= "'; $advanced_toggle .= ''; } @@ -430,19 +430,19 @@ if (is_metaconsole()) { $advanced_toggle .= ''; $advanced_toggle .= ''; } else { - $advanced_toggle .= "'; + $advanced_toggle .= "'; $advanced_toggle .= ''; } $advanced_toggle .= ''; - $advanced_toggle .= ""; + $advanced_toggle .= ""; if ($netflow_disable_custom_lvfilters) { $advanced_toggle .= ''; $advanced_toggle .= ''; } else { $advanced_toggle .= ''; - $advanced_toggle .= "'; + $advanced_toggle .= "'; } $advanced_toggle .= ''; @@ -490,14 +490,14 @@ if (is_metaconsole()) { echo ''; echo '
'.__('Filter').''.__('Normal').' '.html_print_radio_button_extended('filter_type', 0, '', $filter_type, false, 'displayNormalFilter();', 'style="margin-right: 40px;"', true).__('Custom').' '.html_print_radio_button_extended('filter_type', 1, '', $filter_type, false, 'displayAdvancedFilter();', 'style="margin-right: 40px;"', true).''.__('Normal').' '.html_print_radio_button_extended('filter_type', 0, '', $filter_type, false, 'displayNormalFilter();', 'class="mrgn_right_40px"', true).__('Custom').' '.html_print_radio_button_extended('filter_type', 1, '', $filter_type, false, 'displayAdvancedFilter();', 'class="mrgn_right_40px"', true).'".__('Dst Ip').ui_print_help_tip(__('Destination IP. A comma separated list of destination ip. If we leave the field blank, will show all ip. Example filter by ip:
25.46.157.214,160.253.135.249'), true).'
".__('Dst Ip').ui_print_help_tip(__('Destination IP. A comma separated list of destination ip. If we leave the field blank, will show all ip. Example filter by ip:
25.46.157.214,160.253.135.249'), true).'
'.html_print_input_text('ip_dst', $filter['ip_dst'], false, 40, 80, true).'".__('Src Ip').ui_print_help_tip(__('Source IP. A comma separated list of source ip. If we leave the field blank, will show all ip. Example filter by ip:
25.46.157.214,160.253.135.249'), true).'
".__('Src Ip').ui_print_help_tip(__('Source IP. A comma separated list of source ip. If we leave the field blank, will show all ip. Example filter by ip:
25.46.157.214,160.253.135.249'), true).'
'.html_print_input_text('ip_src', $filter['ip_src'], false, 40, 80, true).'".__('Dst Port').ui_print_help_tip(__('Destination port. A comma separated list of destination ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:
80,22'), true).'
".__('Dst Port').ui_print_help_tip(__('Destination port. A comma separated list of destination ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:
80,22'), true).'
'.html_print_input_text('dst_port', $filter['dst_port'], false, 40, 80, true).'".__('Src Port').ui_print_help_tip(__('Source port. A comma separated list of source ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:
80,22'), true).'
".__('Src Port').ui_print_help_tip(__('Source port. A comma separated list of source ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:
80,22'), true).'
'.html_print_input_text('src_port', $filter['src_port'], false, 40, 80, true).'
'; - echo "
"; + echo "
"; echo html_print_submit_button(__('Draw'), 'draw_button', false, 'class="sub upd"', true); if (!$netflow_disable_custom_lvfilters) { if (check_acl($config['id_user'], 0, 'AW')) { - html_print_submit_button(__('Save as new filter'), 'save_button', false, 'style="margin-left: 5px;" class="sub upd" onClick="return defineFilterName();"'); - html_print_submit_button(__('Update current filter'), 'update_button', false, 'style="margin-left: 5px;" class="sub upd"'); + html_print_submit_button(__('Save as new filter'), 'save_button', false, ' class="sub upd mrgn_lft_5px" onClick="return defineFilterName();"'); + html_print_submit_button(__('Update current filter'), 'update_button', false, 'class="sub upd mrgn_lft_5px"'); } } diff --git a/pandora_console/operation/network/network_report.php b/pandora_console/operation/network/network_report.php index 64a984422e..9d9fca02f7 100644 --- a/pandora_console/operation/network/network_report.php +++ b/pandora_console/operation/network/network_report.php @@ -97,7 +97,7 @@ $table->data['0']['1'] .= html_print_select( $table->data['0']['2'] = ''; -$table->data['1']['0'] = '
'; +$table->data['1']['0'] = '
'; $table->data['1']['0'] .= '
'; $table->data['1']['0'] .= __('Start date').'  '; $table->data['1']['0'] .= html_print_input_text('date_lower', $date_lower, '', 10, 7, true); @@ -332,11 +332,11 @@ foreach ($data as $item) { if (empty($data)) { ui_print_info_message(__('No data found')); } else { - echo '
'; + echo '
'; html_print_table($table); // Print the graph. - echo '
'; + echo '
'; echo pie_graph( $chart_data, 320, diff --git a/pandora_console/operation/network/network_usage_map.php b/pandora_console/operation/network/network_usage_map.php index 0a63ecee27..391905197d 100644 --- a/pandora_console/operation/network/network_usage_map.php +++ b/pandora_console/operation/network/network_usage_map.php @@ -70,7 +70,7 @@ $table = new stdClass(); $table->class = 'databox filters'; $table->styleTable = 'width: 100%'; -$table->data['0']['0'] = '
'; +$table->data['0']['0'] = '
'; $table->data['0']['0'] .= '
'; $table->data['0']['0'] .= __('Start date').'  '; $table->data['0']['0'] .= html_print_input_text('date_lower', $date_lower, '', 10, 7, true); diff --git a/pandora_console/operation/reporting/graph_viewer.php b/pandora_console/operation/reporting/graph_viewer.php index e85b263c0c..000179fe4e 100644 --- a/pandora_console/operation/reporting/graph_viewer.php +++ b/pandora_console/operation/reporting/graph_viewer.php @@ -12,8 +12,11 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Login check +global $config; + check_login(); + require_once 'include/functions_custom_graphs.php'; $delete_graph = (bool) get_parameter('delete_graph'); @@ -151,15 +154,36 @@ if ($view_graph) { $options = [ 'graph_list' => [ 'active' => false, - 'text' => ''.html_print_image('images/list.png', true, ['title' => __('Graph list')]).'', + 'text' => ''.html_print_image( + 'images/list.png', + true, + [ + 'title' => __('Graph list'), + 'class' => 'invert_filter', + ] + ).'', ], 'main' => [ 'active' => false, - 'text' => ''.html_print_image('images/chart.png', true, ['title' => __('Main data')]).'', + 'text' => ''.html_print_image( + 'images/chart.png', + true, + [ + 'title' => __('Main data'), + 'class' => 'invert_filter', + ] + ).'', ], 'graph_editor' => [ 'active' => false, - 'text' => ''.html_print_image('images/builder.png', true, ['title' => __('Graph editor')]).'', + 'text' => ''.html_print_image( + 'images/builder.png', + true, + [ + 'title' => __('Graph editor'), + 'class' => 'invert_filter', + ] + ).'', ], ]; } else { @@ -174,14 +198,31 @@ if ($view_graph) { $options['view']['text'] = ''.html_print_image( 'images/operation.png', true, - ['title' => __('View graph')] + [ + 'title' => __('View graph'), + 'class' => 'invert_filter', + ] ).''; $options['view']['active'] = true; if ($config['pure'] == 0) { - $options['screen']['text'] = "".html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode')]).''; + $options['screen']['text'] = "".html_print_image( + 'images/full_screen.png', + true, + [ + 'title' => __('Full screen mode'), + 'class' => 'invert_filter', + ] + ).''; } else { - $options['screen']['text'] = "".html_print_image('images/normal_screen.png', true, ['title' => __('Back to normal mode')]).''; + $options['screen']['text'] = "".html_print_image( + 'images/normal_screen.png', + true, + [ + 'title' => __('Back to normal mode'), + 'class' => 'invert_filter', + ] + ).''; // In full screen, the manage options are not available $options = [ @@ -226,7 +267,7 @@ if ($view_graph) { echo ""; echo '
'; if ($stacked == CUSTOM_GRAPH_VBARS) { - echo '
'; + echo '
'; } echo $graph_return; @@ -245,7 +286,7 @@ if ($view_graph) { $period_label = human_time_description_raw($period); echo "
"; - echo ""; + echo "
"; echo ''; echo ''; echo "'; // Name of the agent. - echo ''; + echo ''; // Alerts of the agent. foreach ($templates as $tid => $tname) { $anyfired = 0; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index adb1fd9b9d..cde4a9e867 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -467,10 +467,9 @@ function html_print_select_groups( $output = ''; global $config; + $select2_css = 'select2.min'; - if ($config['style'] === 'pandora') { - $select2_css = 'select2.min'; - } else { + if ($config['style'] === 'pandora_black') { $select2_css = 'select2_dark.min'; } From df269f52c1a4ca2042ffbb819914f92731f9a51c Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 16 Mar 2021 01:00:18 +0100 Subject: [PATCH 077/113] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 05cd328a94..a69d63c09b 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.752-210315 +Version: 7.0NG.752-210316 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index b8a06b11ee..4f36a43027 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.752-210315" +pandora_version="7.0NG.752-210316" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 83596329cb..8ea0c103c9 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1016,7 +1016,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.752'; -use constant AGENT_BUILD => '210315'; +use constant AGENT_BUILD => '210316'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index e40e91a984..8226c25798 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.752 -%define release 210315 +%define release 210316 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 95bb0dca93..e3a383cc50 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.752 -%define release 210315 +%define release 210316 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 12a3f35c7a..be6b8c86c9 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.752" -PI_BUILD="210315" +PI_BUILD="210316" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f9d6248fba..1a55def851 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210315} +{210316} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 9d83302b9b..7d8a95f0aa 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.752(Build 210315)") +#define PANDORA_VERSION ("7.0NG.752(Build 210316)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 7db5378152..83686db20b 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.752(Build 210315))" + VALUE "ProductVersion", "(7.0NG.752(Build 210316))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a4c4347d37..b3db5244f1 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.752-210315 +Version: 7.0NG.752-210316 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index bedf3f522b..aaad4e0f21 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.752-210315" +pandora_version="7.0NG.752-210316" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 1f0f644a72..fb03a543b4 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC210315'; +$build_version = 'PC210316'; $pandora_version = 'v7.0NG.752'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 24a84748b9..42173b9866 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 20914dff60..f466bebc14 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.752 -%define release 210315 +%define release 210316 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 861eaf696a..039e622089 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.752 -%define release 210315 +%define release 210316 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 658c4ece30..f5c1e47240 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.752" -PI_BUILD="210315" +PI_BUILD="210316" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 63c5e347bf..4d7d7fe718 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.752 PS210315"; +my $version = "7.0NG.752 PS210316"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index a0d7bbef23..5ac914a1f4 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.752 PS210315"; +my $version = "7.0NG.752 PS210316"; # save program name for logging my $progname = basename($0); From 8dc6ec4e076aa3348f01898d4c255d8807ecf699 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Tue, 16 Mar 2021 09:21:16 +0100 Subject: [PATCH 078/113] added setup token --- pandora_console/include/functions_config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 3edda7e357..98fa4d22e1 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1888,6 +1888,10 @@ function config_process_config() config_update_value('collection_max_size', 1000000); } + if (!isset($config['policy_add_max_agents'])) { + config_update_value('policy_add_max_agents', 200); + } + if (!isset($config['event_replication'])) { config_update_value('event_replication', 0); } From 75d57c41ac4321ff01d684d7f20d8eb2ae1155c5 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Tue, 16 Mar 2021 09:22:43 +0100 Subject: [PATCH 079/113] remove constant --- pandora_console/include/constants.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index a186e656cf..66b784d712 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -476,8 +476,6 @@ define('MODULE_LINKED', 1); define('MODULE_PENDING_UNLINK', 10); define('MODULE_PENDING_LINK', 11); -define('POLICY_ADD_MAX_AGENTS', 200); - // EVENTS. define('EVENTS_GOING_UNKNOWN', 'going_unknown'); define('EVENTS_UNKNOWN', 'unknown'); From f765493ce723180244d7dd00f58140c6d35d575f Mon Sep 17 00:00:00 2001 From: marcos Date: Tue, 16 Mar 2021 11:24:05 +0100 Subject: [PATCH 080/113] revert selector theme --- pandora_console/godmode/setup/setup.php | 2 +- pandora_console/godmode/setup/setup_visuals.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 573fdaa333..3f1867591e 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -218,7 +218,7 @@ $buttons['websocket_engine'] = [ $buttons['external_tools'] = [ 'active' => false, - 'text' => ''.html_print_image('images/nettool.png', true, ['title' => __('External Tools')]).'', + 'text' => ''.html_print_image('images/nettool.png', true, ['title' => __('External Tools'), 'class' => 'invert_filter']).'', ]; if ($config['activate_gis']) { diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index dc5e04d018..70a46eea2e 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -131,6 +131,20 @@ $table_styles->style[0] = 'font-weight: bold;'; $table_styles->size[0] = '50%'; $table_styles->data = []; + +$table_styles->data[$row][0] = __('Style template'); +$table_styles->data[$row][1] = html_print_select( + themes_get_css(), + 'style', + $config['style'].'.css', + '', + '', + '', + true +); +$row++; + + $table_styles->data[$row][0] = __('Status icon set'); $iconsets['default'] = __('Colors'); $iconsets['faces'] = __('Faces'); From e4a6c8c876ecf44b9ef498a0ba57d6f54611d522 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 16 Mar 2021 11:44:44 +0100 Subject: [PATCH 081/113] fixed errors visual snmp browser --- pandora_console/include/functions_snmp_browser.php | 2 +- pandora_console/operation/snmpconsole/snmp_browser.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index 04f3823304..5c55dd4e69 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -1024,7 +1024,7 @@ function snmp_browser_print_container( if ($snmp_version == 3) { $output .= '
'; } else { - $output .= '
'; @@ -284,7 +325,7 @@ if ($view_graph) { echo '"; - echo "
  ".__('Equalize maxiddmum thresholds').''.ui_print_help_tip(__('If an option is selected, all graphs will have the highest value from all modules included in the graph as a maximum threshold'), true); + echo "
  ".__('Equalize maxiddmum thresholds').''.ui_print_help_tip(__('If an option is selected, all graphs will have the highest value from all modules included in the graph as a maximum threshold'), true); html_print_checkbox('threshold', CUSTOM_GRAPH_BULLET_CHART_THRESHOLD, $check, false, false, '', false); echo '
'; @@ -371,7 +412,7 @@ if ($view_graph) { } // Header -ui_print_page_header(__('Reporting').' » '.__('Custom graph viewer'), 'images/reporting.png', false, '', false, ''); +ui_print_page_header(__('Reporting').' » '.__('Custom graph viewer'), 'images/op_reporting.png', false, '', false, ''); $graphs = custom_graphs_get_user(); diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index 5120d6ea75..e49c2ae41d 100755 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -76,7 +76,10 @@ $options['list_reports'] = [ 'text' => ''.html_print_image( 'images/report_list.png', true, - ['title' => __('Report list')] + [ + 'title' => __('Report list'), + 'class' => 'invert_filter', + ] ).'', ]; @@ -99,13 +102,19 @@ if (check_acl_restricted_all($config['id_user'], $report_group, 'RW')) { $options['list_items']['text'] = ''.html_print_image( 'images/list.png', true, - ['title' => __('List items')] + [ + 'title' => __('List items'), + 'class' => 'invert_filter', + ] ).''; $options['item_editor']['text'] = ''.html_print_image( - 'images/pen.png', + 'images/pencil.png', true, - ['title' => __('Item editor')] + [ + 'title' => __('Item editor'), + 'class' => 'invert_filter', + ] ).''; if (enterprise_installed()) { @@ -115,14 +124,36 @@ if (check_acl_restricted_all($config['id_user'], $report_group, 'RW')) { $options['view'] = [ 'active' => true, - 'text' => ''.html_print_image('images/operation.png', true, ['title' => __('View report')]).'', + 'text' => ''.html_print_image( + 'images/operation.png', + true, + [ + 'title' => __('View report'), + 'class' => 'invert_filter', + + ] + ).'', ]; if (!defined('METACONSOLE')) { if ($config['pure'] == 0) { - $options['screen']['text'] = "".html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode')]).''; + $options['screen']['text'] = "".html_print_image( + 'images/full_screen.png', + true, + [ + 'title' => __('Full screen mode'), + 'class' => 'invert_filter', + ] + ).''; } else { - $options['screen']['text'] = "".html_print_image('images/normal_screen.png', true, ['title' => __('Back to normal mode')]).''; + $options['screen']['text'] = "".html_print_image( + 'images/normal_screen.png', + true, + [ + 'title' => __('Back to normal mode'), + 'class' => 'invert_filter', + ] + ).''; // In full screen, the manage options are not available $options = [ @@ -202,12 +233,12 @@ $table->data[0][0] = html_print_image( ); if (reporting_get_description($id_report)) { - $table->data[0][1] = '
'.reporting_get_description($id_report).'
'; + $table->data[0][1] = '
'.reporting_get_description($id_report).'
'; } else { - $table->data[0][1] = '
'.reporting_get_name($id_report).'
'; + $table->data[0][1] = '
'.reporting_get_name($id_report).'
'; } -$table->data[0][1] .= '
'.__('Set initial date').html_print_checkbox('enable_init_date', 1, $enable_init_date, true); +$table->data[0][1] .= '
'.__('Set initial date').html_print_checkbox('enable_init_date', 1, $enable_init_date, true); $html_enterprise = enterprise_hook( 'reporting_print_button_PDF', [$id_report] @@ -227,7 +258,7 @@ $table->data[1][2] .= html_print_input_text('date', $date, '', 12, 10, true).' ' $table->data[1][2] .= html_print_input_text('time', $time, '', 10, 7, true).' '; $table->data[1][2] .= html_print_submit_button(__('Update'), 'date_submit', false, 'class="sub next"', true); -echo ''; +echo ''; html_print_table($table); html_print_input_hidden('id_report', $id_report); echo ''; @@ -259,7 +290,7 @@ reporting_html_print_report($report, false, $config['custom_report_info']); // The rowspan of the first row is only 2 in controls table. Why is used the same code here and in the items?? $table->rowspan[0][0] = 1; -echo '
'; +echo '
'; echo html_print_image('images/wait.gif', true, ['border' => '0']); echo ''.__('Loading').'...'; echo '
'; diff --git a/pandora_console/operation/search_agents.php b/pandora_console/operation/search_agents.php index e0b97dd6e1..e46a3887f4 100755 --- a/pandora_console/operation/search_agents.php +++ b/pandora_console/operation/search_agents.php @@ -105,14 +105,22 @@ if (!$agents || !$searchAgents) { $time = ui_print_timestamp($last_time, true); $time_style = $time; if ($diferencia > ($agent['intervalo'] * 2)) { - $time_style = ''.$time.''; + $time_style = ''.$time.''; } $manage_agent = ''; if (check_acl($config['id_user'], $agent['id_grupo'], 'AW')) { $url_manage = 'index.php?sec=estado&sec2=godmode/agentes/configurar_agente&id_agente='.$agent['id_agente']; - $manage_agent = ''.html_print_image('images/cog.png', true, ['title' => __('Manage'), 'alt' => __('Manage')]).''; + $manage_agent = ''.html_print_image( + 'images/cog.png', + true, + [ + 'title' => __('Manage'), + 'alt' => __('Manage'), + 'class' => 'invert_filter', + ] + ).''; } array_push( diff --git a/pandora_console/operation/search_helps.php b/pandora_console/operation/search_helps.php index 259e38f84a..2433355571 100644 --- a/pandora_console/operation/search_helps.php +++ b/pandora_console/operation/search_helps.php @@ -17,7 +17,7 @@ $totalHelps = check_acl($config['id_user'], 0, 'IR'); if ($helps === false || !$searchHelps) { echo "
".__('Zero results found.').sprintf( - __('You can find more help in the wiki'), + __('You can find more help in the wiki'), 'http://wiki.pandorafms.com/index.php?search='.$config['search_keywords'] )."
\n"; } else { diff --git a/pandora_console/operation/search_main.php b/pandora_console/operation/search_main.php index 99c0846419..813ef1b004 100644 --- a/pandora_console/operation/search_main.php +++ b/pandora_console/operation/search_main.php @@ -23,7 +23,7 @@ $searchUsers = check_acl($config['id_user'], 0, 'UM'); $searchPolicies = check_acl($config['id_user'], 0, 'AW'); $searchHelps = true; -echo '
'; +echo '
'; $anyfound = false; @@ -51,9 +51,9 @@ $table->style[15] = 'font-weight: bold; text-align: center;'; -$table->data[0][0] = html_print_image('images/agent.png', true, ['title' => __('Agents found')]); +$table->data[0][0] = html_print_image('images/agent.png', true, ['title' => __('Agents found'), 'class' => 'invert_filter']); $table->data[0][1] = "".sprintf(__('%s Found'), $totalAgents).''; -$table->data[0][2] = html_print_image('images/module.png', true, ['title' => __('Modules found')]); +$table->data[0][2] = html_print_image('images/module.png', true, ['title' => __('Modules found'), 'class' => 'invert_filter']); $table->data[0][3] = "".sprintf(__('%s Found'), $totalModules).''; // ------------------- DISABLED FOR SOME INSTALLATIONS------------------ @@ -61,16 +61,16 @@ $table->data[0][3] = "" . // ~ sprintf(__("%s Found"), $totalAlerts) . ""; // --------------------------------------------------------------------- -$table->data[0][6] = html_print_image('images/input_user.png', true, ['title' => __('Users found')]); +$table->data[0][6] = html_print_image('images/input_user.png', true, ['title' => __('Users found'), 'class' => 'invert_filter']); $table->data[0][7] = "".sprintf(__('%s Found'), $totalUsers).''; -$table->data[0][8] = html_print_image('images/chart_curve.png', true, ['title' => __('Graphs found')]); +$table->data[0][8] = html_print_image('images/chart_curve.png', true, ['title' => __('Graphs found'), 'class' => 'invert_filter']); $table->data[0][9] = "".sprintf(__('%s Found'), $totalGraphs).''; -$table->data[0][10] = html_print_image('images/reporting.png', true, ['title' => __('Reports found')]); +$table->data[0][10] = html_print_image('images/reporting.png', true, ['title' => __('Reports found'), 'class' => 'invert_filter']); $table->data[0][11] = "".sprintf(__('%s Found'), $totalReports).''; $table->data[0][12] = html_print_image('images/visual_console_green.png', true, ['title' => __('Visual consoles')]); $table->data[0][13] = "".sprintf(__('%s Found'), $totalMaps).''; if (enterprise_installed()) { - $table->data[0][14] = html_print_image('images/policies.png', true, ['title' => __('Policies')]); + $table->data[0][14] = html_print_image('images/policies_mc.png', true, ['title' => __('Policies')]); $table->data[0][15] = "".sprintf(__('%s Found'), $totalPolicies).''; } diff --git a/pandora_console/operation/search_results.php b/pandora_console/operation/search_results.php index 353ae60276..e1a9d078e3 100644 --- a/pandora_console/operation/search_results.php +++ b/pandora_console/operation/search_results.php @@ -165,7 +165,7 @@ if ($searchModules) { if ($searchPolicies) { $policies_tab = [ 'text' => "".html_print_image( - 'images/policies.png', + 'images/policies_mc.png', true, ['title' => __('Policies')] ).'', diff --git a/pandora_console/operation/servers/recon_view.php b/pandora_console/operation/servers/recon_view.php index 3d12a24df4..2cb71042c9 100644 --- a/pandora_console/operation/servers/recon_view.php +++ b/pandora_console/operation/servers/recon_view.php @@ -44,10 +44,10 @@ if ($servers === false) { include_once $config['homedir'].'/include/functions_network_profiles.php'; if (check_acl($config['id_user'], 0, 'AW')) { - $options['manage']['text'] = "".html_print_image('images/setup.png', true, ['title' => __('Manage')]).''; + $options['manage']['text'] = "".html_print_image('images/setup.png', true, ['title' => __('Manage'), 'class' => 'invert_filter']).''; } - $options[]['text'] = "".html_print_image('images/refresh_mc.png', true, ['title' => __('Refresh')]).''; + $options[]['text'] = "".html_print_image('images/refresh_mc.png', true, ['title' => __('Refresh'), 'class' => 'invert_filter']).''; ui_print_page_header(__('Recon View'), 'images/op_recon.png', false, '', false, $options); @@ -120,7 +120,7 @@ if ($servers === false) { if ($task['disabled'] == 0) { $data[0] = ''; - $data[0] .= html_print_image('images/target.png', true, ['title' => __('Force')]); + $data[0] .= html_print_image('images/target.png', true, ['title' => __('Force'), 'class' => 'invert_filter']); $data[0] .= ''; } else { $data[0] = ''; @@ -144,11 +144,11 @@ if ($servers === false) { if ($task['id_recon_script'] == 0) { // Network recon task - $data[5] = html_print_image('images/network.png', true, ['title' => __('Network recon task')]).'  '; + $data[5] = html_print_image('images/op_network.png', true, ['title' => __('Network recon task'), 'class' => 'invert_filter']).'  '; $data[5] .= network_profiles_get_name($task['id_network_profile']); } else { // APP recon task - $data[5] = html_print_image('images/plugin.png', true).'  '; + $data[5] = html_print_image('images/plugin.png', true, ['class' => 'invert_filter']).'  '; $data[5] .= db_get_sql(sprintf('SELECT name FROM trecon_script WHERE id_recon_script = %d', $task['id_recon_script'])); } diff --git a/pandora_console/operation/snmpconsole/snmp_browser.php b/pandora_console/operation/snmpconsole/snmp_browser.php index e43257827e..a4839cce25 100644 --- a/pandora_console/operation/snmpconsole/snmp_browser.php +++ b/pandora_console/operation/snmpconsole/snmp_browser.php @@ -40,6 +40,8 @@ if (!check_acl($config['id_user'], 0, 'AR')) { exit(); } + + // Header. $url = 'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_browser&pure='.$config['pure']; if ($config['pure']) { @@ -50,6 +52,7 @@ if ($config['pure']) { true, [ 'title' => __('Normal screen'), + 'class' => 'invert_filter', ] ); $link['text'] .= ''; @@ -61,6 +64,7 @@ if ($config['pure']) { true, [ 'title' => __('Full screen'), + 'class' => 'invert_filter', ] ); $link['text'] .= ''; @@ -79,9 +83,9 @@ ui_print_page_header( snmp_browser_print_container(false, '100%', '60%', '', true); // Div for modal -echo ''; +echo ''; // Div for loading modal. -echo ''; +echo ''; ?> @@ -196,7 +200,7 @@ function waiting_modal(stop = false) { var waiting_modal = - '
' + + '
' + '

' + '
'; diff --git a/pandora_console/operation/snmpconsole/snmp_statistics.php b/pandora_console/operation/snmpconsole/snmp_statistics.php index 4f9c42cb1e..a240c7d6a6 100755 --- a/pandora_console/operation/snmpconsole/snmp_statistics.php +++ b/pandora_console/operation/snmpconsole/snmp_statistics.php @@ -38,19 +38,47 @@ $refr = (int) get_parameter('refr', 0); // Fullscreen $fullscreen = []; if ($config['pure']) { - $fullscreen['text'] = ''.html_print_image('images/normal_screen.png', true, ['title' => __('Normal screen')]).''; + $fullscreen['text'] = ''.html_print_image( + 'images/normal_screen.png', + true, + [ + 'title' => __('Normal screen'), + 'class' => 'invert_filter', + ] + ).''; } else { - $fullscreen['text'] = ''.html_print_image('images/full_screen.png', true, ['title' => __('Full screen')]).''; + $fullscreen['text'] = ''.html_print_image( + 'images/full_screen.png', + true, + [ + 'title' => __('Full screen'), + 'class' => 'invert_filter', + ] + ).''; } // List $list = []; -$list['text'] = ''.html_print_image('images/op_snmp.png', true, ['title' => __('List')]).''; +$list['text'] = ''.html_print_image( + 'images/op_snmp.png', + true, + [ + 'title' => __('List'), + 'class' => 'invert_filter', + ] +).''; // Statistics (This file) $statistics = []; $statistics['active'] = true; -$statistics['text'] = ''.html_print_image('images/op_reporting.png', true, ['title' => __('Statistics')]).''; +$statistics['text'] = ''.html_print_image( + 'images/op_reporting.png', + true, + [ + 'title' => __('Statistics'), + 'class' => 'invert_filter', + ] +).''; // Header ui_print_page_header( diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index efa7985a37..5442f75823 100755 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -92,15 +92,43 @@ $url .= '&free_search_string='.$free_search_string.'&pagination='.$pagination; $url .= '&offset='.$offset.'&trap_type='.$trap_type.'&group_by='.$group_by; $url .= '&hours_ago='.$hours_ago.'&pure='.$pure; -$statistics['text'] = ''.html_print_image('images/op_reporting.png', true, ['title' => __('Statistics')]).''; -$list['text'] = ''.html_print_image('images/op_snmp.png', true, ['title' => __('List')]).''; +$statistics['text'] = ''.html_print_image( + 'images/op_reporting.png', + true, + [ + 'title' => __('Statistics'), + 'class' => 'invert_filter', + ] +).''; +$list['text'] = ''.html_print_image( + 'images/op_snmp.png', + true, + [ + 'title' => __('List'), + 'class' => 'invert_filter', + ] +).''; $list['active'] = true; if ($config['pure']) { - $fullscreen['text'] = ''.html_print_image('images/normal_screen.png', true, ['title' => __('Normal screen')]).''; + $fullscreen['text'] = ''.html_print_image( + 'images/normal_screen.png', + true, + [ + 'title' => __('Normal screen'), + 'class' => 'invert_filter', + ] + ).''; } else { // Fullscreen. - $fullscreen['text'] = ''.html_print_image('images/full_screen.png', true, ['title' => __('Full screen')]).''; + $fullscreen['text'] = ''.html_print_image( + 'images/full_screen.png', + true, + [ + 'title' => __('Full screen'), + 'class' => 'invert_filter', + ] + ).''; } @@ -718,20 +746,27 @@ if (empty($traps)) { $urlPagination = $normal_url.'&pagination='.$pagination.'&offset='.$offset; echo ''; - echo html_print_image('images/normal_screen.png', true, ['title' => __('Exit fullscreen')]); + echo html_print_image( + 'images/normal_screen.png', + true, + [ + 'title' => __('Exit fullscreen'), + 'class' => 'invert_filter', + ] + ); echo ''; echo ''; // Auto refresh control. echo '
  • '; - echo '
    '; - echo '
    '; + echo '
    '; + echo '
    '; $normal_url = 'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view&filter_severity='.$filter_severity.'&filter_fired='.$filter_fired.'&filter_status='.$filter_status.'&refresh='.((int) get_parameter('refresh', 0)).'&pure=1&trap_type='.$trap_type.'&group_by='.$group_by.'&free_search_string='.$free_search_string.'&date_from_trap='.$date_from_trap.'&date_to_trap='.$date_to_trap.'&time_from_trap='.$time_from_trap.'&time_to_trap='.$time_to_trap; $urlPagination = $normal_url.'&pagination='.$pagination.'&offset='.$offset; - echo '
    '; + echo ''; echo __('Refresh every').':'; echo html_print_select(get_refresh_time_array(), 'refresh', $refr, '', '', 0, true, false, false); echo '
    '; @@ -997,17 +1032,41 @@ if ($traps !== false) { if ($trap['source'] == '') { $is_admin = db_get_value('is_admin', 'tusuario', 'id_user', $config['id_user']); if ($is_admin) { - $data[8] .= ''.html_print_image('images/cross.png', true, ['border' => '0', 'title' => __('Delete')]).' '; + $data[8] .= ''.html_print_image( + 'images/cross.png', + true, + [ + 'border' => '0', + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] + ).' '; } } else { $agent_trap_group = db_get_value('id_grupo', 'tagente', 'nombre', $trap['source']); if ((check_acl($config['id_user'], $agent_trap_group, 'IM'))) { - $data[8] .= ''.html_print_image('images/cross.png', true, ['border' => '0', 'title' => __('Delete')]).' '; + $data[8] .= ''.html_print_image( + 'images/cross.png', + true, + [ + 'border' => '0', + 'title' => __('Delete'), + 'class' => 'invert_filter', + ] + ).' '; } } - $data[8] .= ''.html_print_image('images/eye.png', true, ['alt' => __('Show more'), 'title' => __('Show more')]).''; + $data[8] .= ''.html_print_image( + 'images/eye.png', + true, + [ + 'alt' => __('Show more'), + 'title' => __('Show more'), + 'class' => 'invert_filter', + ] + ).''; $data[8] .= enterprise_hook('editor_link', [$trap]); @@ -1016,7 +1075,7 @@ if ($traps !== false) { array_push($table->data, $data); // Hiden file for description. - $string = ' + $string = '
    '; echo "'; - echo "'; + echo "'; echo "'; echo "'; echo "'; From b4927d60719d04c2f9d1ca64268c3194824b0816 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Fri, 12 Mar 2021 12:46:27 +0100 Subject: [PATCH 063/113] minor fix --- pandora_console/godmode/setup/setup_integria.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pandora_console/godmode/setup/setup_integria.php b/pandora_console/godmode/setup/setup_integria.php index ebb31f20e0..7cec5eccd1 100644 --- a/pandora_console/godmode/setup/setup_integria.php +++ b/pandora_console/godmode/setup/setup_integria.php @@ -299,12 +299,6 @@ $row['name'] = __('Request timeout'); $row['control'] = html_print_input_text('integria_req_timeout', $config['integria_req_timeout'], '', 3, 10, true); $table_remote->data['integria_req_timeout'] = $row; -$row = []; -$row['name'] = __('Inventory'); -$row['control'] = html_print_input_text('integria_req_timeout', $config['integria_req_timeout'], '', 3, 10, true); -$table_remote->data['integria_req_timeout'] = $row; - - $row = []; $row['name'] = __('Inventory'); $row['control'] = html_print_button(__('Sync inventory'), 'sync-inventory', false, '', 'class="sub next"', true); From 5fca622b3b3787c76086749cd7794bc1e8f3bd62 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 13 Mar 2021 01:00:19 +0100 Subject: [PATCH 064/113] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 67f0acfd4a..558e04deb8 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.752-210312 +Version: 7.0NG.752-210313 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 191f74f161..aa2a4af7ff 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.752-210312" +pandora_version="7.0NG.752-210313" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index d6f7b72549..cce853ddc3 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1016,7 +1016,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.752'; -use constant AGENT_BUILD => '210312'; +use constant AGENT_BUILD => '210313'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 464e16bf1f..2fd5671bfb 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.752 -%define release 210312 +%define release 210313 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 00f1bd8423..ea57a15090 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.752 -%define release 210312 +%define release 210313 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 2cb0dac8cf..5b111e706f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.752" -PI_BUILD="210312" +PI_BUILD="210313" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 41de0bc08d..ea5c18cb66 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210312} +{210313} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index ff430dd2ba..10174cdfe5 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.752(Build 210312)") +#define PANDORA_VERSION ("7.0NG.752(Build 210313)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 36fb1d4cb0..6ff2407ff5 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.752(Build 210312))" + VALUE "ProductVersion", "(7.0NG.752(Build 210313))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 687f4fcd3c..90c806c5ab 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.752-210312 +Version: 7.0NG.752-210313 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 07cad24e71..e5f2ad9afe 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.752-210312" +pandora_version="7.0NG.752-210313" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 12bcfda85d..65397df121 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC210312'; +$build_version = 'PC210313'; $pandora_version = 'v7.0NG.752'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e8c2355c74..7854ac475a 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 7b26b1aad9..456b14551a 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.752 -%define release 210312 +%define release 210313 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 809fc04b2f..120d07431b 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.752 -%define release 210312 +%define release 210313 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index dc7f6f0dd6..86f44536d7 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.752" -PI_BUILD="210312" +PI_BUILD="210313" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 3373880bab..2ac8b4c65a 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.752 PS210312"; +my $version = "7.0NG.752 PS210313"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index d7ec708427..059d4ecbce 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.752 PS210312"; +my $version = "7.0NG.752 PS210313"; # save program name for logging my $progname = basename($0); From 0f848d48e8ad86dfa71f7528e9ba2bb34a50d46e Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 14 Mar 2021 01:00:14 +0100 Subject: [PATCH 065/113] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 558e04deb8..629cc66a92 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.752-210313 +Version: 7.0NG.752-210314 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index aa2a4af7ff..be44691491 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.752-210313" +pandora_version="7.0NG.752-210314" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index cce853ddc3..096ddfdbe6 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1016,7 +1016,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.752'; -use constant AGENT_BUILD => '210313'; +use constant AGENT_BUILD => '210314'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 2fd5671bfb..f3a68e2333 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.752 -%define release 210313 +%define release 210314 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index ea57a15090..33d80a43af 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.752 -%define release 210313 +%define release 210314 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 5b111e706f..abe2ea0fb2 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.752" -PI_BUILD="210313" +PI_BUILD="210314" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ea5c18cb66..381c757447 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210313} +{210314} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 10174cdfe5..72986ac24f 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.752(Build 210313)") +#define PANDORA_VERSION ("7.0NG.752(Build 210314)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 6ff2407ff5..7a59169eb6 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.752(Build 210313))" + VALUE "ProductVersion", "(7.0NG.752(Build 210314))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 90c806c5ab..b0c6d81c3a 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.752-210313 +Version: 7.0NG.752-210314 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index e5f2ad9afe..feee9fedb7 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.752-210313" +pandora_version="7.0NG.752-210314" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 65397df121..03c0f7fb4c 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC210313'; +$build_version = 'PC210314'; $pandora_version = 'v7.0NG.752'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 7854ac475a..ea4d78fd2a 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 456b14551a..045ca872a7 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.752 -%define release 210313 +%define release 210314 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 120d07431b..915aa94393 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.752 -%define release 210313 +%define release 210314 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 86f44536d7..867e43cdab 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.752" -PI_BUILD="210313" +PI_BUILD="210314" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 2ac8b4c65a..ff49ae919f 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.752 PS210313"; +my $version = "7.0NG.752 PS210314"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 059d4ecbce..068aa83e0d 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.752 PS210313"; +my $version = "7.0NG.752 PS210314"; # save program name for logging my $progname = basename($0); From fc29160c91a95febad8aac81a38236375225b4d8 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 15 Mar 2021 01:00:15 +0100 Subject: [PATCH 066/113] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 629cc66a92..05cd328a94 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.752-210314 +Version: 7.0NG.752-210315 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index be44691491..b8a06b11ee 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.752-210314" +pandora_version="7.0NG.752-210315" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 096ddfdbe6..83596329cb 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1016,7 +1016,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.752'; -use constant AGENT_BUILD => '210314'; +use constant AGENT_BUILD => '210315'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index f3a68e2333..e40e91a984 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.752 -%define release 210314 +%define release 210315 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 33d80a43af..95bb0dca93 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.752 -%define release 210314 +%define release 210315 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index abe2ea0fb2..12a3f35c7a 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.752" -PI_BUILD="210314" +PI_BUILD="210315" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 381c757447..f9d6248fba 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210314} +{210315} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 72986ac24f..9d83302b9b 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.752(Build 210314)") +#define PANDORA_VERSION ("7.0NG.752(Build 210315)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 7a59169eb6..7db5378152 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.752(Build 210314))" + VALUE "ProductVersion", "(7.0NG.752(Build 210315))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b0c6d81c3a..a4c4347d37 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.752-210314 +Version: 7.0NG.752-210315 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index feee9fedb7..bedf3f522b 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.752-210314" +pandora_version="7.0NG.752-210315" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 03c0f7fb4c..1f0f644a72 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC210314'; +$build_version = 'PC210315'; $pandora_version = 'v7.0NG.752'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ea4d78fd2a..24a84748b9 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 045ca872a7..20914dff60 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.752 -%define release 210314 +%define release 210315 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 915aa94393..861eaf696a 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.752 -%define release 210314 +%define release 210315 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 867e43cdab..658c4ece30 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.752" -PI_BUILD="210314" +PI_BUILD="210315" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index ff49ae919f..63c5e347bf 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.752 PS210314"; +my $version = "7.0NG.752 PS210315"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 068aa83e0d..a0d7bbef23 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.752 PS210314"; +my $version = "7.0NG.752 PS210315"; # save program name for logging my $progname = basename($0); From b63f1ad681b587e51d39ab0b707279714419541e Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 15 Mar 2021 10:07:36 +0100 Subject: [PATCH 067/113] Removed extra verbosity --- pandora_console/operation/events/events_rss.php | 2 +- pandora_console/ws.php | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pandora_console/operation/events/events_rss.php b/pandora_console/operation/events/events_rss.php index f6a155e676..613b88b423 100644 --- a/pandora_console/operation/events/events_rss.php +++ b/pandora_console/operation/events/events_rss.php @@ -30,7 +30,7 @@ global $config; // Don't display other errors, messes up XML. -ini_set('display_errors', E_ALL); +ini_set('display_errors', 0); require_once '../../include/config.php'; require_once '../../include/functions.php'; diff --git a/pandora_console/ws.php b/pandora_console/ws.php index 0c9509720c..e873cdf7f2 100644 --- a/pandora_console/ws.php +++ b/pandora_console/ws.php @@ -91,10 +91,6 @@ if (isset($config['gotty']) === false) { config_update_value('gotty', '/usr/bin/gotty'); } - -ini_set('display_errors', 1); -error_reporting(E_ALL); - $os = strtolower(PHP_OS); if (substr($os, 0, 3) !== 'win') { if (empty($config['gotty']) === false) { From 1762e758fa6ee8eebcd8c2f5dd65b3d659da482f Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 15 Mar 2021 10:09:02 +0100 Subject: [PATCH 068/113] forced no display_errors --- pandora_console/include/config_process.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 1f0f644a72..83ddd741aa 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -52,6 +52,10 @@ if ((int) $develop_bypass === 1) { } ini_set('display_errors', 1); +} else { + // Leave user decide error_level, but limit errors to be displayed only in + // logs. + ini_set('display_errors', 0); } // Check if mysqli is available From 09e94bd0e9acf7cbad8cfd548089a60a50907d4f Mon Sep 17 00:00:00 2001 From: marcos Date: Mon, 15 Mar 2021 11:43:36 +0100 Subject: [PATCH 069/113] resolved merge conflict --- .../reporting/reporting_builder.item_editor.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 298e36aa25..0a6c53d766 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -2763,17 +2763,13 @@ $class = 'databox filters';
    -<<<<<<< HEAD - - -======= - - + - - - ->>>>>>> origin/develop + +
    '.''.__('Variable bindings:').' '; @@ -1157,7 +1216,7 @@ if ($idx == 0) { unset($table); -echo '
    '; +echo '
    '; if (check_acl($config['id_user'], 0, 'IW')) { html_print_submit_button(__('Validate'), 'updatebt', false, 'class="sub ok"'); } @@ -1170,7 +1229,7 @@ if (check_acl($config['id_user'], 0, 'IM')) { echo '
    '; -echo '
    '; +echo '
    '; echo '

    '.__('Status').'

    '; echo html_print_image( 'images/pixel_green.png', @@ -1190,7 +1249,7 @@ echo html_print_image( ] ).' - '.__('Not validated'); echo '
    '; -echo '
    '; +echo '
    '; echo '

    '.__('Alert').'

    '; echo html_print_image( 'images/pixel_yellow.png', @@ -1210,13 +1269,13 @@ echo html_print_image( ] ).' - '.__('Not fired'); echo '
    '; -echo '
    '; +echo '
    '; echo '

    '.__('Action').'

    '; echo html_print_image('images/ok.png', true).' - '.__('Validate'); echo '
    '; -echo html_print_image('images/cross.png', true).' - '.__('Delete'); +echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']).' - '.__('Delete'); echo '
    '; -echo '
    '; +echo '
    '; echo '

    '.__('Legend').'

    '; foreach (get_priorities() as $num => $name) { echo ''.$name.''; @@ -1224,7 +1283,7 @@ foreach (get_priorities() as $num => $name) { } echo '
    '; -echo '
     
    '; +echo '
     
    '; ui_include_time_picker(); ?> diff --git a/pandora_console/operation/system_alert.php b/pandora_console/operation/system_alert.php index e624e47c59..8e303ab053 100644 --- a/pandora_console/operation/system_alert.php +++ b/pandora_console/operation/system_alert.php @@ -16,11 +16,11 @@ if (check_login()) {
    "; - echo "
    "; + echo "'; - echo "
    + echo "
    OK
    "; } diff --git a/pandora_console/operation/tree.php b/pandora_console/operation/tree.php index 771e717fd5..4597a25beb 100755 --- a/pandora_console/operation/tree.php +++ b/pandora_console/operation/tree.php @@ -44,7 +44,10 @@ if (!$strict_acl) { 'text' => "".html_print_image( 'images/tag.png', true, - ['title' => __('Tags')] + [ + 'title' => __('Tags'), + 'class' => 'invert_filter', + ] ).'', 'active' => ($tab == 'tag'), ]; @@ -53,7 +56,10 @@ if (!$strict_acl) { 'text' => "".html_print_image( 'images/operating_system.png', true, - ['title' => __('OS')] + [ + 'title' => __('OS'), + 'class' => 'invert_filter', + ] ).'', 'active' => ($tab == 'os'), ]; @@ -62,7 +68,10 @@ if (!$strict_acl) { 'text' => "".html_print_image( 'images/group.png', true, - ['title' => __('Groups')] + [ + 'title' => __('Groups'), + 'class' => 'invert_filter', + ] ).'', 'active' => ($tab == 'group'), ]; @@ -71,7 +80,10 @@ if (!$strict_acl) { 'text' => "".html_print_image( 'images/module_group.png', true, - ['title' => __('Module groups')] + [ + 'title' => __('Module groups'), + 'class' => 'invert_filter', + ] ).'', 'active' => ($tab == 'module_group'), ]; @@ -80,7 +92,10 @@ if (!$strict_acl) { 'text' => "".html_print_image( 'images/brick.png', true, - ['title' => __('Modules')] + [ + 'title' => __('Modules'), + 'class' => 'invert_filter', + ] ).'', 'active' => ($tab == 'module'), ]; @@ -90,7 +105,10 @@ if (!$strict_acl) { 'text' => "".html_print_image( 'images/policies_mc.png', true, - ['title' => __('Policies')] + [ + 'title' => __('Policies'), + 'class' => 'invert_filter', + ] ).'', 'active' => ($tab == 'policies'), ]; @@ -164,7 +182,7 @@ $agent_status_arr[AGENT_STATUS_NOT_INIT] = __('Not init'); $row = []; $row[] = __('Search group'); -$row[] = html_print_input_text('search_group', $search_group, '', is_metaconsole() ? 50 : 40, 30, true); +$row[] = html_print_input_text('search_group', $search_group, '', is_metaconsole() ? 50 : 25, 30, true); if (is_metaconsole()) { $row[] = __('Show not init modules'); @@ -177,7 +195,7 @@ $table->data[] = $row; $row = []; $row[] = __('Search agent'); -$row[] = html_print_input_text('search_agent', $search_agent, '', is_metaconsole() ? 50 : 40, 30, true); +$row[] = html_print_input_text('search_agent', $search_agent, '', is_metaconsole() ? 50 : 25, 30, true); $row[] = __('Show not init agents'); $row[] = html_print_checkbox('show_not_init_agents', $show_not_init_agents, true, true); @@ -208,7 +226,7 @@ if (!is_metaconsole()) { $row = []; $row[] = __('Search module'); - $row[] = html_print_input_text('search_module', $search_module, '', 40, 30, true); + $row[] = html_print_input_text('search_module', $search_module, '', 25, 30, true); $row[] = __('Show not init modules'); $row[] = html_print_checkbox('show_not_init_modules', $show_not_init_modules, true, true); diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index bf563d7d47..269ef69203 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -423,7 +423,7 @@ if ($config['double_auth_enabled'] || ($config['double_auth_enabled'] == '' && $ } // Dialog. - $double_authentication .= ''; + $double_authentication .= ''; } if ($double_auth_enabled && $config['double_auth_enabled']) { @@ -666,7 +666,7 @@ if (is_metaconsole()) { if (!is_metaconsole()) { echo '
    - + '.$area_data_timezone_polys.$area_data_timezone_rects.'
    '; } @@ -719,10 +719,10 @@ if ($config['ehorus_enabled'] && $config['ehorus_user_level_conf']) { $row = []; $row['name'] = __('Test'); $row['control'] = html_print_button(__('Start'), 'test-ehorus', false, 'ehorus_connection_test("'.$ehorus_host.'",'.$ehorus_port.')', 'class="sub next"', true); - $row['control'] .= ' '; - $row['control'] .= ' '; - $row['control'] .= ' '; - $row['control'] .= ''; + $row['control'] .= ' '; + $row['control'] .= ' '; + $row['control'] .= ' '; + $row['control'] .= ''; $table_remote->data['ehorus_test'] = $row; echo '
    '; diff --git a/pandora_console/operation/users/user_edit_header.php b/pandora_console/operation/users/user_edit_header.php index 3e18315842..8f1d3e9a02 100644 --- a/pandora_console/operation/users/user_edit_header.php +++ b/pandora_console/operation/users/user_edit_header.php @@ -85,9 +85,12 @@ if (is_metaconsole()) { 'main' => [ 'active' => $_GET['sec2'] === 'operation/users/user_edit', 'text' => "".html_print_image( - 'images/user_green.png', + 'images/user.png', true, - ['title' => __('User management')] + [ + 'title' => __('User management'), + 'class' => 'invert_filter', + ] ).'', ], 'notifications' => [ @@ -95,7 +98,10 @@ if (is_metaconsole()) { 'text' => "".html_print_image( 'images/alerts_template.png', true, - ['title' => __('User notifications')] + [ + 'title' => __('User notifications'), + 'class' => 'invert_filter', + ] ).'', ], ]; @@ -109,7 +115,7 @@ if (is_metaconsole()) { ui_print_page_header( __('User detail editor'), - 'images/op_workspace.png', + 'images/user.png', false, $helpers, false, diff --git a/pandora_console/operation/users/user_edit_notifications.php b/pandora_console/operation/users/user_edit_notifications.php index 6e227024fa..c7cd4bb1b5 100644 --- a/pandora_console/operation/users/user_edit_notifications.php +++ b/pandora_console/operation/users/user_edit_notifications.php @@ -91,7 +91,7 @@ foreach ($sources as $source) { if ((bool) $disabled_flag === true) { $s = __('Controls have been disabled by the system administrator'); - echo ''.$s.''; + echo ''.$s.''; } echo '
    '; diff --git a/pandora_console/operation/visual_console/legacy_public_view.php b/pandora_console/operation/visual_console/legacy_public_view.php index 0a3aa56328..eae9f1767f 100644 --- a/pandora_console/operation/visual_console/legacy_public_view.php +++ b/pandora_console/operation/visual_console/legacy_public_view.php @@ -111,7 +111,7 @@ if ($layout) { } // Floating menu - Start. -echo '
    '; +echo '
    '; echo '
    "; if (isset($data['_is_tag_'])) { - $link = ""; } else { $link = ""; } else { - $link = ""; } From ac3587208b116e8af97df9406f4e65a973c1420d Mon Sep 17 00:00:00 2001 From: marcos Date: Fri, 12 Mar 2021 12:10:56 +0100 Subject: [PATCH 062/113] fixed visual error --- pandora_console/operation/agentes/group_view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/group_view.php b/pandora_console/operation/agentes/group_view.php index 54ba514851..61dfda1a22 100644 --- a/pandora_console/operation/agentes/group_view.php +++ b/pandora_console/operation/agentes/group_view.php @@ -190,7 +190,7 @@ if (!empty($result_groups)) { echo '
    ".__('Force').'".__('Group').'/'.__('Tags').'".__('Group').'/'.__('Tags').'".__('Total').'".__('Unknown').'".__('Not init').'
    +
    +
    '; if ($edit_graph) { $output .= "
    "; - $output .= ""; + $output .= ""; $output .= '
    '; } else { $output .= "
    "; - $output .= ""; + $output .= ""; $output .= '
    '; } diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php index 856f251947..3fdf7b3969 100644 --- a/pandora_console/godmode/reporting/graphs.php +++ b/pandora_console/godmode/reporting/graphs.php @@ -349,7 +349,6 @@ $table_aux = new stdClass(); ui_pagination(count($graphs), false, 0, 0, false, 'offset', true, 'pagination-bottom'); echo "
    "; html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"'); - echo '
    '; echo ''; } @@ -361,6 +360,8 @@ $table_aux = new stdClass(); echo ''; } + echo '
    '; + echo '
    '; } else { include_once $config['homedir'].'/general/first_task/custom_graphs.php'; From 137a2c31ad7ee69ba716f36c6d88a689afb8aec1 Mon Sep 17 00:00:00 2001 From: marcos Date: Mon, 15 Mar 2021 15:30:56 +0100 Subject: [PATCH 072/113] fixed visual fails --- pandora_console/godmode/agentes/modificar_agente.php | 2 +- pandora_console/operation/agentes/estado_agente.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 909930a4e0..0ce255f403 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -754,7 +754,7 @@ if ($agents !== false) { echo ''; } - echo '
    '; + echo '
  • '.$alias['alias'].''.$alias['alias'].'
    '; true ); $table->data['edit36'][2] = __('Auth password').ui_print_help_tip(__('The pass length must be eight character minimum.'), true); - $table->data['edit36'][3] = html_print_input_text('plugin_pass_snmp', '', '', 15, 60, true); + $table->data['edit36'][3] = html_print_input_password('plugin_pass_snmp', '', '', 15, 60, true); $table->data['edit37'][0] = __('Privacy method'); - $table->data['edit37'][1] = html_print_select(['DES' => __('DES'), 'AES' => __('AES')], 'custom_string_1', '', '', __('No change'), '', true); + $table->data['edit37'][1] = html_print_select(['DES' => __('DES'), 'AES' => __('AES')], 'snmp3_privacy_method', '', '', __('No change'), '', true); $table->data['edit37'][2] = __('Privacy pass').ui_print_help_tip(__('The pass length must be eight character minimum.'), true); - $table->data['edit37'][3] = html_print_input_text('custom_string_2', '', '', 15, 60, true); + $table->data['edit37'][3] = html_print_input_password('snmp3_privacy_pass', '', '', 15, 60, true); $table->data['edit38'][0] = __('Auth method'); $table->data['edit38'][1] = html_print_select(['MD5' => __('MD5'), 'SHA' => __('SHA')], 'plugin_parameter', '', '', __('No change'), '', true); $table->data['edit38'][2] = __('Security level'); @@ -1670,7 +1670,7 @@ $(document).ready (function () { } }); - $('#tcp_send').change(function() { + $('#snmp_version').change(function() { if($(this).val() == 3) { $("tr#delete_table-edit36, tr#delete_table-edit37, tr#delete_table-edit38").show(); } @@ -2096,7 +2096,7 @@ function process_manage_edit($module_name, $agents_select=null, $module_status=' } // Specific snmp reused fields - if (get_parameter('tcp_send', '') == 3) { + if (get_parameter('snmp_version', '') == 3) { $plugin_user_snmp = get_parameter('plugin_user_snmp', ''); if ($plugin_user_snmp != '') { $values['plugin_user'] = $plugin_user_snmp; @@ -2107,7 +2107,12 @@ function process_manage_edit($module_name, $agents_select=null, $module_status=' $values['plugin_pass'] = io_input_password($plugin_pass_snmp); } - $snmp3_privacy_pass = get_parameter('custom_string_2', ''); + $snmp3_privacy_method = get_parameter('snmp3_privacy_method', ''); + if ($snmp3_privacy_method != '') { + $values['custom_string_1'] = io_input_password($snmp3_privacy_method); + } + + $snmp3_privacy_pass = get_parameter('snmp3_privacy_pass', ''); if ($snmp3_privacy_pass != '') { $values['custom_string_2'] = io_input_password($snmp3_privacy_pass); } @@ -2209,7 +2214,11 @@ function process_manage_edit($module_name, $agents_select=null, $module_status=' } // Set tcp_send value according to module type since the purpose of this field in database varies in case of SNMP modules. - if ($module['id_tipo_modulo'] >= 15 && $module['id_tipo_modulo'] <= 18) { + if ($module['id_tipo_modulo'] == MODULE_TYPE_REMOTE_SNMP + || $module['id_tipo_modulo'] == MODULE_TYPE_REMOTE_SNMP_INC + || $module['id_tipo_modulo'] == MODULE_TYPE_REMOTE_SNMP_STRING + || $module['id_tipo_modulo'] <= MODULE_TYPE_REMOTE_SNMP_PROC + ) { if ($snmp_version != '') { $values['tcp_send'] = $snmp_version; } else { From 610d41290e934f4a461f4da7d647e199d9b6721e Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 17 Mar 2021 01:00:20 +0100 Subject: [PATCH 087/113] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index a69d63c09b..1d4c3f9906 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.752-210316 +Version: 7.0NG.752-210317 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 4f36a43027..278da9f8af 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.752-210316" +pandora_version="7.0NG.752-210317" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 4ff8dd9383..562510270b 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1016,7 +1016,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.752'; -use constant AGENT_BUILD => '210316'; +use constant AGENT_BUILD => '210317'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 8226c25798..91b3b575e3 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.752 -%define release 210316 +%define release 210317 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index e3a383cc50..19a1cb4704 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.752 -%define release 210316 +%define release 210317 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index be6b8c86c9..e3f281818e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.752" -PI_BUILD="210316" +PI_BUILD="210317" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 1a55def851..a585cac4ed 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210316} +{210317} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7d8a95f0aa..6022283d75 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.752(Build 210316)") +#define PANDORA_VERSION ("7.0NG.752(Build 210317)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 83686db20b..dba97bc8de 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.752(Build 210316))" + VALUE "ProductVersion", "(7.0NG.752(Build 210317))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b3db5244f1..614105ac53 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.752-210316 +Version: 7.0NG.752-210317 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index aaad4e0f21..976e3ce1e9 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.752-210316" +pandora_version="7.0NG.752-210317" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index fb03a543b4..45ddf03a33 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC210316'; +$build_version = 'PC210317'; $pandora_version = 'v7.0NG.752'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 42173b9866..e585920a52 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index f466bebc14..a465738ec4 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.752 -%define release 210316 +%define release 210317 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 039e622089..da0c5f069d 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.752 -%define release 210316 +%define release 210317 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 9a66c854c6..8fba37181c 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.752" -PI_BUILD="210316" +PI_BUILD="210317" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index cea64716be..f66fc3f5db 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.752 PS210316"; +my $version = "7.0NG.752 PS210317"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 5ac914a1f4..45881d1b20 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.752 PS210316"; +my $version = "7.0NG.752 PS210317"; # save program name for logging my $progname = basename($0); From 1ea562fe17922ee56d5a812cc93f1fda55c5efa5 Mon Sep 17 00:00:00 2001 From: marcos Date: Wed, 17 Mar 2021 13:22:11 +0100 Subject: [PATCH 088/113] fixed visual error --- pandora_console/include/class/Tree.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 9ef583d574..70fb1d4e60 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -704,9 +704,9 @@ class Tree if ((bool) $module['alerts']) { // Module has alerts triggered. if ($module_alert_triggered === true) { - $module['alertsImageHTML'] = html_print_image('images/bell_orange.png', true, ['title' => __('Module alerts')]); + $module['alertsImageHTML'] = html_print_image('images/bell_orange.png', true, ['title' => __('Module alerts'), 'style' => 'filter: initial']); } else { - $module['alertsImageHTML'] = html_print_image('images/bell_green.png', true, ['title' => __('Module alerts')]); + $module['alertsImageHTML'] = html_print_image('images/bell_green.png', true, ['title' => __('Module alerts'), 'style' => 'filter: initial']); } } } From e8e9b61d32f05ff409f37d09716a98172a9eb148 Mon Sep 17 00:00:00 2001 From: marcos Date: Wed, 17 Mar 2021 16:44:57 +0100 Subject: [PATCH 089/113] fixed visual error --- pandora_console/operation/users/user_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index 269ef69203..7f17cedb19 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -565,7 +565,7 @@ $table_ichanges = '

    '.__('Full list of pages').':

    '.$select_out.'
    -
    +
    '.html_print_image( 'images/darrowright_green.png', true, From e667bdd2e8d236e725c3d710c33126444abba8e7 Mon Sep 17 00:00:00 2001 From: Luis Date: Wed, 17 Mar 2021 16:29:07 +0000 Subject: [PATCH 090/113] Fixed interfaces wizard modules genartion wit hypen --- pandora_console/include/class/AgentWizard.class.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php index 6094582691..24dfdf4738 100644 --- a/pandora_console/include/class/AgentWizard.class.php +++ b/pandora_console/include/class/AgentWizard.class.php @@ -1344,12 +1344,10 @@ class AgentWizard extends HTML $generalInterface = false; // Lets catch all values. foreach ($data as $key => $value) { - if (empty(preg_match('/module-active/', $key)) === false + if (empty(preg_match('/module-active-(.*)/m', $key, $tmpModules)) === false && (int) $value === 1 ) { - $tmpModules = explode('-', $key); - - $keyData = $tmpModules[2].'-'.$tmpModules[3]; + $keyData = $tmpModules[1]; $modulesActivated[] = $keyData; } else if (empty(preg_match('/interfaz_select_/', $key)) === false) { @@ -1423,8 +1421,8 @@ class AgentWizard extends HTML $result[$value]['value'] = $data['module-value-'.$key]; } - preg_match('/^(.*)-.*?_(\d+-\d+)$/', $k, $matches); - $k = $matches[1].'-0_'.$matches[2]; + preg_match('/^(.*).*?_(\d+)-+(\d+)$/', $k, $matches); + $k = $matches[1].'_'.$matches[2].'-'.$matches[3]; } else { if (empty(preg_match('/module-value/', $k)) === false) { $result[$value]['value'] = $data[$k]; From 572f8c9908a1041c4c194a3a92823cb1f1e952ac Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 18 Mar 2021 01:00:22 +0100 Subject: [PATCH 091/113] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 1d4c3f9906..284f2d7c7a 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.752-210317 +Version: 7.0NG.752-210318 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 278da9f8af..ef723e092b 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.752-210317" +pandora_version="7.0NG.752-210318" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 562510270b..15d09b10a8 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1016,7 +1016,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.752'; -use constant AGENT_BUILD => '210317'; +use constant AGENT_BUILD => '210318'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 91b3b575e3..d809aed77d 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.752 -%define release 210317 +%define release 210318 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 19a1cb4704..c535b0b973 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.752 -%define release 210317 +%define release 210318 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index e3f281818e..fe011c76e6 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.752" -PI_BUILD="210317" +PI_BUILD="210318" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index a585cac4ed..0f62b05a6d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210317} +{210318} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 6022283d75..de6d4ba9ed 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.752(Build 210317)") +#define PANDORA_VERSION ("7.0NG.752(Build 210318)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index dba97bc8de..01e30be83e 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.752(Build 210317))" + VALUE "ProductVersion", "(7.0NG.752(Build 210318))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 614105ac53..cfa7abf43a 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.752-210317 +Version: 7.0NG.752-210318 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 976e3ce1e9..3fb7248a48 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.752-210317" +pandora_version="7.0NG.752-210318" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 45ddf03a33..d53ce18b66 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC210317'; +$build_version = 'PC210318'; $pandora_version = 'v7.0NG.752'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e585920a52..8211415152 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index a465738ec4..52d328d661 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.752 -%define release 210317 +%define release 210318 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index da0c5f069d..030930ed18 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.752 -%define release 210317 +%define release 210318 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 8fba37181c..211bc4c441 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.752" -PI_BUILD="210317" +PI_BUILD="210318" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f66fc3f5db..476e56d29f 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.752 PS210317"; +my $version = "7.0NG.752 PS210318"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 45881d1b20..991fe7f244 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.752 PS210317"; +my $version = "7.0NG.752 PS210318"; # save program name for logging my $progname = basename($0); From 38695482c067dd8851c9db5b6374107d1c8a0d10 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 18 Mar 2021 10:35:41 +0100 Subject: [PATCH 092/113] Validate custom text --- pandora_console/include/functions_html.php | 28 +++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index c2ec13be47..ae83820bd6 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -577,7 +577,7 @@ function html_print_select_groups( ); if ($required !== false) { - $require_message = __('Please select an item from this list.'); + $require_message = __('Please select an item from this list. Madafaka'); } if (empty($size) === true) { @@ -599,13 +599,6 @@ function html_print_select_groups( $(document).ready(function() { $('select[name=""]').each( function() { - - this.setCustomValidity(''); - $(this).select2({ multiple: , placeholder: "", @@ -640,6 +633,25 @@ function html_print_select_groups( } } }); + + + $(this).on('change', function(e) { + e.currentTarget.setCustomValidity(''); + }) + + $(this).on('invalid', function(e) { + if ($(e.currentTarget).val() == null) { + e.currentTarget.setCustomValidity( + '' + ); + } + }) + + } ); From 9040e832b847d3773bb7be7d75c49dc177c9df68 Mon Sep 17 00:00:00 2001 From: Marcos Alconada Date: Thu, 18 Mar 2021 10:00:34 +0000 Subject: [PATCH 093/113] fixed xss vulnerability --- .../include/functions_notifications.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pandora_console/include/functions_notifications.php b/pandora_console/include/functions_notifications.php index d7b2f8236a..ef30d852f0 100644 --- a/pandora_console/include/functions_notifications.php +++ b/pandora_console/include/functions_notifications.php @@ -1080,6 +1080,27 @@ function notifications_print_dropdown_element($message_info) break; } + $split_subject = explode(' ', io_safe_output($message_info['subject'])); + $is_image = false; + $img = ''; + foreach ($split_subject as $item) { + if ($is_image) { + if (preg_match('/src/', $item)) { + $img .= $item.' >'; + $is_image = false; + } + } + + if (preg_match('/img/', $item)) { + $img = ' Date: Thu, 18 Mar 2021 10:01:21 +0000 Subject: [PATCH 094/113] Fixed api agent delete and show correct message when called by meta wizard --- pandora_console/include/functions_api.php | 26 +++++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index cfccd66a9c..aebef6c06b 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -1864,10 +1864,14 @@ function api_get_custom_field_id($t1, $t2, $other, $returnType) * @param $thrast2 Don't use. * @param $thrash3 Don't use. */ -function api_set_delete_agent($id, $thrash1, $other, $thrash3) +function api_set_delete_agent($id, $thrash1, $other, $returnType) { global $config; + if (empty($returnType)) { + $returnType = 'string'; + } + $agent_by_alias = false; if ($other['data'][0] === '1') { @@ -1910,7 +1914,7 @@ function api_set_delete_agent($id, $thrash1, $other, $thrash3) } else { // Delete only if the centralised mode is disabled. $headers = getallheaders(); - if (isset($headers['idk']) === false || is_management_allowed($headers['idk']) === false) { + if (isset($headers['idk']) === false && is_management_allowed($headers['idk']) === false) { returnError('centralized'); exit; } @@ -1934,19 +1938,27 @@ function api_set_delete_agent($id, $thrash1, $other, $thrash3) } } } else { - $idAgent = agents_get_agent_id($id, true); + $idAgent = agents_get_agent_id($id, false); if (!util_api_check_agent_and_print_error($idAgent, 'string', 'AD')) { return; } - $result = agents_delete_agent($idAgent, true); + $result = agents_delete_agent($idAgent, false); } } - if (!$result) { - returnError('The agent could not be deleted'); + if ($result === false) { + if ($returnType !== 'string') { + return false; + } + + returnError('The agent could not be deleted', $returnType); } else { - returnData('string', ['type' => 'string', 'data' => __('The agent was successfully deleted')]); + if ($returnType !== 'string') { + return true; + } + + returnData($returnType, ['type' => 'string', 'data' => __('The agent was successfully deleted')]); } } From ddb58f56e97b6beb75221577d8aba2982f41be2c Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 18 Mar 2021 11:48:52 +0100 Subject: [PATCH 095/113] errata fix --- pandora_console/include/functions_html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index ae83820bd6..e7b8e246c4 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -577,7 +577,7 @@ function html_print_select_groups( ); if ($required !== false) { - $require_message = __('Please select an item from this list. Madafaka'); + $require_message = __('Please select an item from this list.'); } if (empty($size) === true) { From bfaaba9dbd1ea17683a39d8212c5632d5e298eb6 Mon Sep 17 00:00:00 2001 From: marcos Date: Thu, 18 Mar 2021 12:08:02 +0100 Subject: [PATCH 096/113] fixed spinner bug --- pandora_console/include/functions_snmp_browser.php | 6 +++--- pandora_console/include/styles/pandora.css | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index 5c55dd4e69..54bc1a5ce6 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -1065,16 +1065,16 @@ function snmp_browser_print_container( ); $output .= '
    '; - $output .= '
    '.html_print_image('images/spinner.gif', true).'
    '; + $output .= ''; $output .= '
    '; $output .= '
    '; - $output .= '
    '; + $output .= '
    '; $output .= '
    '; $output .= '
    '; $output .= '
    '; if ($show_massive_buttons) { - $output .= '