diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 557b855e09..26bae75929 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -600,43 +600,176 @@ html_print_div( 'content' => html_print_table($tableAgent, true).$CodeQRTable, ] ); -/* - TODO REVIEW - $table_satellite = ''; - if ($remote_agent === true) { - // Satellite server selector. - $satellite_servers = db_get_all_rows_filter( - 'tserver', - ['server_type' => SERVER_TYPE_ENTERPRISE_SATELLITE], - [ - 'id_server', - 'name', - ] - ); - $satellite_names = []; - if (empty($satellite_servers) === false) { - foreach ($satellite_servers as $s_server) { - $satellite_names[$s_server['id_server']] = $s_server['name']; +// Basic Options. +$tableBasicAgent = new stdClass(); +$tableBasicAgent->class = 'filter-table-adv'; +$tableBasicAgent->data = []; +$disabledBasic = false; +$tableClassDisabled = ''; +if ($new_agent === true || $remote_agent === false || $has_remote_conf === false) { + $disabledBasic = true; + $tableClassDisabled = ' basic-options-disabled'; +} + +if (enterprise_installed()) { + // Get all plugins (BASIC OPTIONS). + $agent_plugin = new PandoraFMS\Agent($id_agente); + $plugins = $agent_plugin->getPlugins(); + // Check if some plugin was enabled/disabled in conf. + foreach ($plugins as $key => $row) { + if (preg_match('/pandora_hardening/', $row['raw']) === 1) { + if ($row['disabled'] === 1) { + $security_hardening = 0; + } else { + $security_hardening = 1; + } } - $table_satellite = '
'.__('Satellite').'
'; - $table_satellite .= '