From 0280547465c0ca264dbc6cf47721ae2e274fd618 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 27 May 2019 15:41:23 +0200 Subject: [PATCH] some changes --- .../godmode/agentes/agent_manager.php | 53 ++++++++++++++----- pandora_console/include/styles/pandora.css | 12 ++++- 2 files changed, 50 insertions(+), 15 deletions(-) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 8b88d0737a..213a07bf2d 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -167,13 +167,41 @@ if ($disk_conf_delete) { echo '
'; +// Custom ID. +$custom_id_div = '
'; +$custom_id_div .= '

'.__('Custom ID').':

'; +$custom_id_div .= html_print_input_text( + 'custom_id', + $custom_id, + '', + 16, + 255, + true, + false, + false, + '', + 'agent_custom_id' +).'
'; + if (!$new_agent && $alias != '') { $table_agent_name = '

'.__('Agent name').': '.ui_print_help_tip(__("The agent's name must be the same as the one defined at the console"), true).'

'; $table_agent_name .= '
'; $table_agent_name .= '
'.html_print_input_text('agente', $nombre_agente, '', 50, 100, true).'
'; $table_agent_name .= '
'; - $table_qr_code = '

'.__('QR Code Agent view').':

'; + // QR code div. + $table_qr_code = '
'; + $table_qr_code .= '

'.__('QR Code Agent view').':

'; + $table_qr_code .= '
'; + if ($id_agente) { + $table_qr_code .= ""; + } + + // Add Custom id div. + $table_qr_code .= '
'; + $table_qr_code .= $custom_id_div; + $table_qr_code .= '
'; + if ($id_agente) { $table_agent_name .= ''.__('ID').' '.$id_agente.''; @@ -257,14 +285,6 @@ if ($id_agente) { } "; - } - - $table_qr_code .= '
'; -} - $groups = users_get_groups($config['id_user'], 'AR', false); $modules = db_get_all_rows_sql( @@ -354,7 +374,7 @@ $table_description .= html_print_input_text( true ).'
'; - +// QR code. echo '
'.$table_agent_name.$table_alias.$table_ip.$table_primary_group.'
@@ -533,9 +553,6 @@ if (enterprise_installed()) { $table_adv_cascade .= $cps_html; } -// Custom ID -$table_adv_custom_id = '

'.__('Custom ID').':

'; -$table_adv_custom_id .= html_print_input_text('custom_id', $custom_id, '', 16, 255, true).'
'; $table_adv_parent = '

'.__('Parent').':

'; $params = []; @@ -692,6 +709,7 @@ if ($config['activate_gis']) { +// General display distribution. $table_adv_options = $table_adv_secondary_groups.'
'.$table_adv_secondary_groups_left.' @@ -704,7 +722,14 @@ $table_adv_options = $table_adv_secondary_groups.'
-
'.$table_adv_parent.$table_adv_custom_id.$table_adv_module_mode.$table_adv_cascade.$table_adv_gis.'
+
'.$table_adv_parent.$table_adv_module_mode.$table_adv_cascade; + +if ($new_agent) { + // If agent is new, show custom id as old style format. + $table_adv_options .= $custom_id_div; +} + +$table_adv_options .= $table_adv_gis.'
'.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.'
'; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index e5114cadda..3a0f47c4be 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -5588,7 +5588,7 @@ table.info_table.policy_sub_table { background-color: transparent !important; border: none; border-radius: 0 !important; - border-bottom: 1px solid #888; + border-bottom: 1px solid #ccc; font-family: "lato-bolder", "Open Sans", sans-serif !important; font-size: 10pt; padding: 2px 5px; @@ -5746,6 +5746,15 @@ a#qr_code_agent_view { margin-right: 5px; } +#text-comentarios, +.agent_custom_id { + padding-bottom: 2em; + background: #ececec !important; + display: inline-block; + border-radius: 5px !important; + border: 1px solid #ccc; +} + /* * --------------------------------------------------------------------- * - CLASSES FOR THE NEW TOGGLES - @@ -5760,6 +5769,7 @@ a#qr_code_agent_view { border: 1px solid #f3f3f3; border-top-left-radius: 4px; border-top-right-radius: 4px; + margin-bottom: -1px; padding: 5px; display: block; }