From a063c7a0ace8da23f025cd9c80bd2a38091567ff Mon Sep 17 00:00:00 2001 From: Jonathan Date: Wed, 22 Mar 2023 14:21:56 +0100 Subject: [PATCH 01/10] Fix header and menu --- .../godmode/alerts/alert_list.builder.php | 22 ++++- pandora_console/godmode/alerts/alert_list.php | 76 ++++++++--------- .../godmode/gis_maps/configure_gis_map.php | 56 ++++++++----- .../godmode/massive/massive_operations.php | 82 ++++++++++++------- pandora_console/godmode/setup/news.php | 21 ++++- pandora_console/include/functions_menu.php | 6 ++ .../operation/gis_maps/gis_map.php | 19 ++++- .../operation/gis_maps/render_view.php | 24 ++++-- pandora_console/views/cluster/edit.php | 4 +- pandora_console/views/cluster/list.php | 17 +++- 10 files changed, 223 insertions(+), 104 deletions(-) diff --git a/pandora_console/godmode/alerts/alert_list.builder.php b/pandora_console/godmode/alerts/alert_list.builder.php index 4844e5c443..af380c396c 100644 --- a/pandora_console/godmode/alerts/alert_list.builder.php +++ b/pandora_console/godmode/alerts/alert_list.builder.php @@ -187,7 +187,7 @@ $table->data[2][0] = html_print_label_input_block( ); if (isset($step) === false) { - echo '
'; + echo ''; html_print_table($table); } @@ -216,6 +216,26 @@ if (isset($step) === false) { true ); + if ($_GET['sec2'] === 'operation/cluster/cluster') { + html_print_div( + [ + 'content' => html_print_submit_button( + __('Add alert'), + 'add', + false, + [ + 'icon' => 'wand', + 'form' => 'form_alerts', + 'mode' => 'secondary', + ], + true + ), + 'style' => 'display:none', + 'id' => 'add_alert_div', + ] + ); + } + html_print_action_buttons($actionButtons, ['right_content' => $pagination]); html_print_input_hidden('create_alert', 1); diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index 23371066c4..ce42dd1675 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -497,45 +497,47 @@ if (is_metaconsole() === false) { $buttons = ''; } - if ($tab !== 'alert') { - if ($tab === 'list') { - ui_print_standard_header( - __('Alerts'), - 'images/gm_alerts.png', - false, - '', - true, - $buttons, - [ + if ($_GET['sec2'] !== 'operation/cluster/cluster') { + if ($tab !== 'alert') { + if ($tab === 'list') { + ui_print_standard_header( + __('Alerts'), + 'images/gm_alerts.png', + false, + '', + true, + $buttons, [ - 'link' => '', - 'label' => __('Manage alerts'), - ], + [ + 'link' => '', + 'label' => __('Manage alerts'), + ], + [ + 'link' => '', + 'label' => __('List'), + ], + ] + ); + } else { + ui_print_standard_header( + __('Alerts'), + 'images/gm_alerts.png', + false, + '', + true, + $buttons, [ - 'link' => '', - 'label' => __('List'), - ], - ] - ); - } else { - ui_print_standard_header( - __('Alerts'), - 'images/gm_alerts.png', - false, - '', - true, - $buttons, - [ - [ - 'link' => '', - 'label' => __('Manage alerts'), - ], - [ - 'link' => '', - 'label' => __('Create'), - ], - ] - ); + [ + 'link' => '', + 'label' => __('Manage alerts'), + ], + [ + 'link' => '', + 'label' => __('Create'), + ], + ] + ); + } } } } else { diff --git a/pandora_console/godmode/gis_maps/configure_gis_map.php b/pandora_console/godmode/gis_maps/configure_gis_map.php index 92e9e043b3..38b67a7c4e 100644 --- a/pandora_console/godmode/gis_maps/configure_gis_map.php +++ b/pandora_console/godmode/gis_maps/configure_gis_map.php @@ -84,7 +84,7 @@ $buttons['gis_maps_list'] = [ true, [ 'title' => __('GIS Maps list'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', ] ).'', ]; @@ -96,19 +96,30 @@ if ($idMap) { true, [ 'title' => __('View GIS'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', ] ).'', ]; } -ui_print_page_header( +// Header. +ui_print_standard_header( __('GIS Maps builder'), 'images/gm_gis.png', false, 'configure_gis_map_edit', - true, - $buttons + false, + $buttons, + [ + [ + 'link' => '', + 'label' => __('Topology maps'), + ], + [ + 'link' => '', + 'label' => __('GIS Maps'), + ], + ] ); switch ($action) { @@ -480,7 +491,7 @@ $table->data[1][1] = "".html_print_image( 'images/add.png', true, - ['class' => 'invert_filter'] + ['class' => 'invert_filter main_menu_icon'] )." @@ -583,7 +594,7 @@ $table->data[1][1] = ' @@ -660,21 +671,19 @@ $table->data[1][1] .= ' html_print_table($table); - -echo '
'; switch ($action) { case 'save_new': case 'edit_map': case 'update_saved': if (empty($invalidFields) === true) { - html_print_submit_button(_('Save map'), 'save_button', false, 'class="sub wand"'); + $action_button = html_print_submit_button(_('Save map'), 'save_button', false, ['mode' => 'primary', 'icon' => 'next'], true); } else { - html_print_submit_button(_('Update map'), 'update_button', false, 'class="sub upd"'); + $action_button = html_print_submit_button(_('Update map'), 'update_button', false, ['mode' => 'primary', 'icon' => 'next'], true); } break; case 'new_map': - html_print_submit_button(_('Save map'), 'save_button', false, 'class="sub wand"'); + $action_button = html_print_submit_button(_('Save map'), 'save_button', false, ['mode' => 'primary', 'icon' => 'next'], true); break; default: @@ -682,7 +691,10 @@ switch ($action) { break; } -echo '
'; +html_print_action_buttons( + $action_button, + ['type' => 'form_action'] +); echo ''; @@ -702,7 +714,7 @@ echo ''; false, [ 'alt' => '', - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', ] ); ?> @@ -899,7 +911,7 @@ function setLayerEditorData (data) { var $layerFormVisibleCheckbox = $("input#checkbox-layer_visible_form"); var $layerFormAgentsFromGroupSelect = $("#layer_group_form"); var $layerFormAgentInput = $("input#text-agent_alias"); - var $layerFormAgentButton = $("input#button-add_agent"); + var $layerFormAgentButton = $("button#button-add_agent"); var $layerFormAgentsListItems = $("tr.agents_list_item"); var $layerFormGroupsListItems = $("tr.groups_list_item"); @@ -1005,7 +1017,7 @@ function getAgentRow (layerId, agentId, agentAlias) { var $deleteCol = $("

"); var $agentAlias = $("" + agentAlias + ""); - var $removeBtn = $(' 'invert_filter']); ?> '); + var $removeBtn = $(' 'invert_filter main_menu_icon']); ?> '); $removeBtn.click(function (event) { var $layerRow = $("tr#layer_row_" + layerId); @@ -1061,7 +1073,7 @@ function getGroupRow (layerId, groupId, groupName, agentId, agentAlias) { + "" + agentAlias + "" + ")" + ""); - var $removeBtn = $(' 'invert_filter']); ?>'); + var $removeBtn = $(' 'invert_filter main_menu_icon']); ?>'); $removeBtn.click(function (event) { var $layerRow = $("tr#layer_row_" + layerId); @@ -1139,8 +1151,8 @@ function getLayerRow (layerId, layerData) { var $layerName = $("" + layerData.name + ""); var $sortUpBtn = $(""); var $sortDownBtn = $(""); - var $editBtn = $(' 'invert_filter']); ?>'); - var $removeBtn = $(' 'invert_filter']); ?>'); + var $editBtn = $(' 'invert_filter main_menu_icon']); ?>'); + var $removeBtn = $(' 'invert_filter main_menu_icon']); ?>'); $sortUpBtn.click(moveLayerRowUpOnClick); $sortDownBtn.click(moveLayerRowDownOnClick); @@ -1231,9 +1243,9 @@ function onLayerGroupIdChange (event) { // Bind events $("form#form_setup").submit(onFormSubmit); -$("input#button-add_agent").click(addAgentClick); +$("button#button-add_agent").click(addAgentClick); $("select#layer_group_id").change(onLayerGroupIdChange); -$("input#button-add_group").click(addGroupClick); +$("button#button-add_group").click(addGroupClick); // Populate layer list var layers = ; diff --git a/pandora_console/godmode/massive/massive_operations.php b/pandora_console/godmode/massive/massive_operations.php index 04a2a20a2f..864382bd78 100755 --- a/pandora_console/godmode/massive/massive_operations.php +++ b/pandora_console/godmode/massive/massive_operations.php @@ -220,7 +220,7 @@ $alertstab = [ true, [ 'title' => __('Alerts operations'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', ] ).'', 'active' => $tab == 'massive_alerts', @@ -232,7 +232,7 @@ $userstab = [ true, [ 'title' => __('Users operations'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', ] ).'', 'active' => $tab == 'massive_users', @@ -244,7 +244,7 @@ $agentstab = [ true, [ 'title' => __('Agents operations'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', ] ).'', 'active' => $tab == 'massive_agents', @@ -256,7 +256,7 @@ $modulestab = [ true, [ 'title' => __('Modules operations'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', ] ).'', 'active' => $tab == 'massive_modules', @@ -268,7 +268,7 @@ $pluginstab = [ true, [ 'title' => __('Plugins operations'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', ] ).'', 'active' => $tab == 'massive_plugins', @@ -308,34 +308,58 @@ $onheader['services'] = $servicestab; // Header. -ui_print_standard_header( - __('Bulk operations').' - '.$options[$option], - 'images/gm_massive_operations.png', - false, - $help_header, - false, - [ - $agentstab, - $modulestab, - $pluginstab, - $userstab, - $alertstab, - $policiestab, - $snmptab, - $satellitetab, - $servicestab, - ], - [ +if (is_metaconsole() === false) { + ui_print_standard_header( + __('Bulk operations').' - '.$options[$option], + 'images/gm_massive_operations.png', + false, + $help_header, + false, [ - 'link' => '', - 'label' => __('Configuration'), + $agentstab, + $modulestab, + $pluginstab, + $userstab, + $alertstab, + $policiestab, + $snmptab, + $satellitetab, + $servicestab, ], [ - 'link' => '', - 'label' => __('Bulk operations'), + [ + 'link' => '', + 'label' => __('Configuration'), + ], + [ + 'link' => '', + 'label' => __('Bulk operations'), + ], + ] + ); +} else { + ui_print_standard_header( + __('Bulk operations').' - '.$options[$option], + 'images/gm_massive_operations.png', + false, + $help_header, + false, + [ + $userstab, + $agentstab, ], - ] -); + [ + [ + 'link' => '', + 'label' => __('Configuration'), + ], + [ + 'link' => '', + 'label' => __('Bulk operations'), + ], + ] + ); +} // Checks if the PHP configuration is correctly. diff --git a/pandora_console/godmode/setup/news.php b/pandora_console/godmode/setup/news.php index ee4b47d930..e388d8034c 100644 --- a/pandora_console/godmode/setup/news.php +++ b/pandora_console/godmode/setup/news.php @@ -25,8 +25,25 @@ if (! check_acl($config['id_user'], 0, 'PM')) { exit; } -// Header -ui_print_page_header(__('Site news management'), '', false, '', true); +// Header. +ui_print_standard_header( + __('Site news management'), + 'images/custom_field.png', + false, + '', + true, + [], + [ + [ + 'link' => '', + 'label' => __('Admin tools'), + ], + [ + 'link' => '', + 'label' => __('Site news'), + ], + ] +); diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 14c43a5c14..5a5e7c74ce 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -68,6 +68,12 @@ function menu_print_menu(&$menu) $sec2 = 'godmode/alerts/alert_commands'; } else if ($sec2 === 'enterprise/godmode/setup/edit_skin') { $sec2 = 'enterprise/godmode/setup/setup_skins'; + } else if ($sec2 === 'godmode/gis_maps/configure_gis_map') { + $map_id = (string) get_parameter('map_id'); + $sec2 = 'operation/gis_maps/render_view&map_id='.$map_id; + } else if ($sec2 === 'operation/gis_maps/render_view') { + $map_id = (string) get_parameter('map_id'); + $sec2 = 'operation/gis_maps/render_view&map_id='.$map_id; } else if ($sec2 === 'godmode/servers/discovery') { $wiz = (string) get_parameter('wiz'); $sec2 = 'godmode/servers/discovery&wiz='.$wiz; diff --git a/pandora_console/operation/gis_maps/gis_map.php b/pandora_console/operation/gis_maps/gis_map.php index 4a9f56dd7a..34bcc597ab 100644 --- a/pandora_console/operation/gis_maps/gis_map.php +++ b/pandora_console/operation/gis_maps/gis_map.php @@ -31,13 +31,24 @@ $buttons['gis_maps_list'] = [ ).'', ]; -ui_print_page_header( - __('GIS Maps'), +// Header. +ui_print_standard_header( + __('List of GIS maps'), 'images/op_gis.png', false, '', false, - $buttons + $buttons, + [ + [ + 'link' => '', + 'label' => __('Topology maps'), + ], + [ + 'link' => '', + 'label' => __('GIS Maps'), + ], + ] ); $own_info = get_user_info($config['id_user']); @@ -187,7 +198,7 @@ if ($maps !== false) { } $table->cellclass[]['op'] = 'table_action_buttons'; - $data['op'] = ''.html_print_image('images/edit.svg', true, ['title' => __('Edit')]).''.''.html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter']).''; + $data['op'] = ''.html_print_image('images/edit.svg', true, ['title' => __('Edit')]).''.''.html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter main_menu_icon']).''; } array_push($table->data, $data); diff --git a/pandora_console/operation/gis_maps/render_view.php b/pandora_console/operation/gis_maps/render_view.php index 6ecb1ed6a4..6394beb614 100644 --- a/pandora_console/operation/gis_maps/render_view.php +++ b/pandora_console/operation/gis_maps/render_view.php @@ -174,13 +174,24 @@ if ($has_management_acl) { $buttons['setup']['godmode'] = 1; } -ui_print_page_header( - __('Map').' » '.__('Map').' '.$map['map_name'], - 'images/op_gis.png', +// Header. +ui_print_standard_header( + __('Map').': '.$map['map_name'], + 'images/op_snmp.png', false, - 'render_view_tab', + 'snmp_console', false, - $buttons + $buttons, + [ + [ + 'link' => '', + 'label' => __('Topology maps'), + ], + [ + 'link' => '', + 'label' => __('GIS Maps'), + ], + ] ); $map_inline_style = 'width: 100%; min-height:500px; height: calc(100vh - 80px);'; @@ -320,5 +331,8 @@ if ($layers != false) { $(document).ready(function() { var $map = $("#map"); $map.css("height", "calc(100vh - " + $map.offset().top + "px - 20px)"); + + $('#select2-show_status-container').parent().parent().parent().removeClass('select2'); + $('#select2-refresh_time-container').parent().parent().parent().removeClass('select2'); }); diff --git a/pandora_console/views/cluster/edit.php b/pandora_console/views/cluster/edit.php index eb144c5e72..b3c062977e 100644 --- a/pandora_console/views/cluster/edit.php +++ b/pandora_console/views/cluster/edit.php @@ -143,7 +143,9 @@ html_print_action_buttons( var buttonback = $('#button-submit').parent().html(); $('#button-submit').hide(); var buttonback = buttonback.replace('button-submit','button-submit_copy'); - $('.action_buttons_right_content').parent().html(buttonnext+buttonback); + var buttonalert = $('#button-add').parent().html(); + var buttonalert = buttonalert.replace('button-add','button-add_copy'); + $('.action_buttons_right_content').parent().html(buttonnext+buttonback+buttonalert); var style = $('#principal_action_buttons').attr('style'); $('#principal_action_buttons').attr('style',style+' justify-content: unset;'); diff --git a/pandora_console/views/cluster/list.php b/pandora_console/views/cluster/list.php index 44af135532..bcfc0743b6 100644 --- a/pandora_console/views/cluster/list.php +++ b/pandora_console/views/cluster/list.php @@ -27,12 +27,23 @@ */ // Header. -\ui_print_page_header( - __('Monitoring').' » '.__('Clusters'), +ui_print_standard_header( + __('Cluster view'), 'images/chart.png', false, '', - false + true, + [], + [ + [ + 'link' => '', + 'label' => __('Monitoring'), + ], + [ + 'link' => '', + 'label' => __('Clusters'), + ], + ] ); if (empty($message) === false) { From 0ae76307145f7dcbc3581241d93d0f341570af97 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 27 Mar 2023 08:44:45 +0200 Subject: [PATCH 02/10] Gis map fix view --- pandora_console/include/functions_menu.php | 6 +++++- pandora_console/operation/gis_maps/gis_map.php | 14 +++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 8e101a5d99..e425f2363a 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -70,7 +70,11 @@ function menu_print_menu(&$menu) $sec2 = 'enterprise/godmode/setup/setup_skins'; } else if ($sec2 === 'godmode/gis_maps/configure_gis_map') { $map_id = (string) get_parameter('map_id'); - $sec2 = 'operation/gis_maps/render_view&map_id='.$map_id; + if (empty($map_id) === false) { + $sec2 = 'operation/gis_maps/render_view&map_id='.$map_id; + } else { + $sec2 = 'operation/gis_maps/gis_map'; + } } else if ($sec2 === 'operation/gis_maps/render_view') { $map_id = (int) get_parameter('map_id'); if (empty($map_id) === false) { diff --git a/pandora_console/operation/gis_maps/gis_map.php b/pandora_console/operation/gis_maps/gis_map.php index 58250df773..028678e395 100644 --- a/pandora_console/operation/gis_maps/gis_map.php +++ b/pandora_console/operation/gis_maps/gis_map.php @@ -214,12 +214,20 @@ if (!empty($table->data)) { } if ($edit_gis_maps) { - echo '
'; echo '
'; html_print_input_hidden('action', 'new_map'); - html_print_submit_button(__('Create'), '', false, 'class="sub next"'); + $ActionButton = html_print_submit_button( + __('Create'), + 'create', + false, + [ + 'class' => 'sub ok submitButton', + 'icon' => 'next', + ], + true + ); + echo '
'.html_print_action_buttons($ActionButton, ['type' => 'form_action'], true).'
'; echo '
'; - echo '
'; } unset($table); From 665976e011fdbbbfb90d6b34949f49abae73f183 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 27 Mar 2023 11:10:51 +0200 Subject: [PATCH 03/10] Bulks masive visual action buttons --- .../massive/massive_add_action_alerts.php | 2 +- .../godmode/massive/massive_add_alerts.php | 2 +- .../godmode/massive/massive_add_profiles.php | 2 +- .../godmode/massive/massive_copy_modules.php | 2 +- .../massive/massive_delete_action_alerts.php | 2 +- .../godmode/massive/massive_delete_agents.php | 2 +- .../godmode/massive/massive_delete_alerts.php | 2 +- .../massive/massive_delete_modules.php | 2 +- .../massive/massive_delete_profiles.php | 2 +- .../godmode/massive/massive_edit_agents.php | 2 +- .../godmode/massive/massive_edit_modules.php | 2 +- .../godmode/massive/massive_edit_plugins.php | 2 +- .../godmode/massive/massive_edit_users.php | 2 +- .../godmode/massive/massive_operations.php | 25 ++++++++--------- pandora_console/godmode/setup/gis_step_2.php | 28 ++++++++++++++++--- .../include/functions_massive_operations.php | 5 ++-- pandora_console/include/functions_menu.php | 4 +++ 17 files changed, 55 insertions(+), 33 deletions(-) diff --git a/pandora_console/godmode/massive/massive_add_action_alerts.php b/pandora_console/godmode/massive/massive_add_action_alerts.php index fcc9957bdb..4b6c333468 100755 --- a/pandora_console/godmode/massive/massive_add_action_alerts.php +++ b/pandora_console/godmode/massive/massive_add_action_alerts.php @@ -270,7 +270,7 @@ $agents_with_templates_json = json_encode($agents_with_templates_json); echo ""; -attachActionButton('add', 'create', $table->width); +attachActionButton('add', 'create', $table->width, false, $SelectAction); echo ''; diff --git a/pandora_console/godmode/massive/massive_add_alerts.php b/pandora_console/godmode/massive/massive_add_alerts.php index 92027c3529..8fbb307e97 100755 --- a/pandora_console/godmode/massive/massive_add_alerts.php +++ b/pandora_console/godmode/massive/massive_add_alerts.php @@ -293,7 +293,7 @@ $table->data[2][3] = ''; echo '
'; html_print_table($table); -attachActionButton('add', 'add', $table->width); +attachActionButton('add', 'add', $table->width, false, $SelectAction); echo '
'; diff --git a/pandora_console/godmode/massive/massive_add_profiles.php b/pandora_console/godmode/massive/massive_add_profiles.php index 9e84c44b71..38657bdf1c 100644 --- a/pandora_console/godmode/massive/massive_add_profiles.php +++ b/pandora_console/godmode/massive/massive_add_profiles.php @@ -295,7 +295,7 @@ array_push($table->data, $data); html_print_table($table); -attachActionButton('create_profiles', 'update', $table->width); +attachActionButton('create_profiles', 'update', $table->width, false, $SelectAction); echo ''; diff --git a/pandora_console/godmode/massive/massive_copy_modules.php b/pandora_console/godmode/massive/massive_copy_modules.php index 4bccfa6007..c3a65ad624 100755 --- a/pandora_console/godmode/massive/massive_copy_modules.php +++ b/pandora_console/godmode/massive/massive_copy_modules.php @@ -310,7 +310,7 @@ echo ''.__('To agent(s)').''; html_print_table($table); echo ''; -attachActionButton('do_operation', 'copy', $table->width); +attachActionButton('do_operation', 'copy', $table->width, false, $SelectAction); echo ''; diff --git a/pandora_console/godmode/massive/massive_delete_action_alerts.php b/pandora_console/godmode/massive/massive_delete_action_alerts.php index c19823fc57..1df2809c75 100644 --- a/pandora_console/godmode/massive/massive_delete_action_alerts.php +++ b/pandora_console/godmode/massive/massive_delete_action_alerts.php @@ -298,7 +298,7 @@ $agents_with_templates_json = json_encode($agents_with_templates_json); echo ""; -attachActionButton('delete', 'delete', $table->width); +attachActionButton('delete', 'delete', $table->width, false, $SelectAction); echo ''; diff --git a/pandora_console/godmode/massive/massive_delete_agents.php b/pandora_console/godmode/massive/massive_delete_agents.php index bb0dd1799d..f5b194f3cc 100755 --- a/pandora_console/godmode/massive/massive_delete_agents.php +++ b/pandora_console/godmode/massive/massive_delete_agents.php @@ -188,7 +188,7 @@ $params = [ echo get_table_inputs_masive_agents($params); if (is_metaconsole() === true || is_management_allowed() === true) { - attachActionButton('delete', 'delete', '100%'); + attachActionButton('delete', 'delete', '100%', false, $SelectAction); } echo ''; diff --git a/pandora_console/godmode/massive/massive_delete_alerts.php b/pandora_console/godmode/massive/massive_delete_alerts.php index 7e899e7f9f..1c4117828e 100755 --- a/pandora_console/godmode/massive/massive_delete_alerts.php +++ b/pandora_console/godmode/massive/massive_delete_alerts.php @@ -358,7 +358,7 @@ $table->data[2][3] = html_print_select([], 'module[]', '', false, '', '', true, echo '
'; html_print_table($table); -attachActionButton('delete', 'delete', $table->width); +attachActionButton('delete', 'delete', $table->width, false, $SelectAction); echo '
'; diff --git a/pandora_console/godmode/massive/massive_delete_modules.php b/pandora_console/godmode/massive/massive_delete_modules.php index f54a127b19..cb885e7ec2 100755 --- a/pandora_console/godmode/massive/massive_delete_modules.php +++ b/pandora_console/godmode/massive/massive_delete_modules.php @@ -583,7 +583,7 @@ $table->data['form_agents_3'][3] = html_print_select( echo '
'; html_print_table($table); -attachActionButton('delete', 'delete', $table->width); +attachActionButton('delete', 'delete', $table->width, false, $SelectAction); echo '
'; diff --git a/pandora_console/godmode/massive/massive_delete_profiles.php b/pandora_console/godmode/massive/massive_delete_profiles.php index 7c45b2a285..46824e90ba 100644 --- a/pandora_console/godmode/massive/massive_delete_profiles.php +++ b/pandora_console/godmode/massive/massive_delete_profiles.php @@ -246,7 +246,7 @@ array_push($table->data, $data); html_print_table($table); -attachActionButton('delete_profiles', 'delete', $table->width); +attachActionButton('delete_profiles', 'delete', $table->width, false, $SelectAction); echo ''; diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index b5da8ca9ae..a6bb7a9322 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -1257,7 +1257,7 @@ echo ''; html_print_input_hidden('id_agente', $id_agente); -attachActionButton('update_agents', 'update', $table->width); +attachActionButton('update_agents', 'update', $table->width, false, $SelectAction); // Shown and hide div. echo ''; diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index a03e278957..2aa4fe00e0 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -1265,7 +1265,7 @@ $table->data['edit1'][1] = ''; echo ''; html_print_table($table); - attachActionButton('update', 'update', $table->width); + attachActionButton('update', 'update', $table->width, false, $SelectAction); echo ''; diff --git a/pandora_console/godmode/massive/massive_edit_plugins.php b/pandora_console/godmode/massive/massive_edit_plugins.php index 2e91eafaf8..192c893f00 100644 --- a/pandora_console/godmode/massive/massive_edit_plugins.php +++ b/pandora_console/godmode/massive/massive_edit_plugins.php @@ -391,7 +391,7 @@ echo 'width); +attachActionButton('update', 'update', $table->width, false, $SelectAction); echo ''; diff --git a/pandora_console/godmode/massive/massive_edit_users.php b/pandora_console/godmode/massive/massive_edit_users.php index ddbd45c440..928b761694 100644 --- a/pandora_console/godmode/massive/massive_edit_users.php +++ b/pandora_console/godmode/massive/massive_edit_users.php @@ -556,7 +556,7 @@ echo sprintf( ); echo ''; -attachActionButton('edit_users', 'update', '100%'); +attachActionButton('edit_users', 'update', '100%', false, $SelectAction); echo ''; diff --git a/pandora_console/godmode/massive/massive_operations.php b/pandora_console/godmode/massive/massive_operations.php index 864382bd78..fb2331a5dd 100755 --- a/pandora_console/godmode/massive/massive_operations.php +++ b/pandora_console/godmode/massive/massive_operations.php @@ -443,29 +443,26 @@ if (is_management_allowed() === false) { ); } -echo '
'; -echo ''; -echo '
'; -echo __('Action'); -echo ''; -html_print_select( +$tip = ''; +if ($option === 'edit_agents' || $option === 'edit_modules') { + $tip = ui_print_help_tip(__('The blank fields will not be updated'), true); +} + +$SelectAction = ''; +$SelectAction .= ''._('Action').''; +$SelectAction .= html_print_select( $options, 'option', $option, 'this.form.submit()', '', 0, - false, + true, false, false -); -if ($option === 'edit_agents' || $option === 'edit_modules') { - ui_print_help_tip(__('The blank fields will not be updated')); -} +).$tip; -echo '
'; -echo ''; -echo '
'; +$SelectAction .= ''; switch ($option) { case 'delete_alerts': diff --git a/pandora_console/godmode/setup/gis_step_2.php b/pandora_console/godmode/setup/gis_step_2.php index 486ec90265..26d5c16f68 100644 --- a/pandora_console/godmode/setup/gis_step_2.php +++ b/pandora_console/godmode/setup/gis_step_2.php @@ -50,13 +50,23 @@ echo '
'; + $data[7] = ''; $data[7] .= html_print_image( 'images/edit.svg', true, @@ -926,8 +923,7 @@ function cron_list_table() } if ($manage_pandora) { - $data[7] .= ''; + $data[7] .= ''; $data[7] .= html_print_image( 'images/delete.svg', true, @@ -940,8 +936,7 @@ function cron_list_table() } } else { if ($write_perms || $manage_pandora) { - $data[7] = ''; + $data[7] = ''; $data[7] .= html_print_image( 'images/edit.svg', true, @@ -994,5 +989,7 @@ function cron_list_table() } html_print_table($table); + } else { + ui_print_info_message(['no_close' => true, 'message' => __('There are no jobs') ]); } } From 3beec9bfab13c246fb09f840c2d575f3cd12f169 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 27 Mar 2023 11:47:08 +0200 Subject: [PATCH 05/10] fixed styles --- pandora_console/godmode/groups/configure_group.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/groups/configure_group.php b/pandora_console/godmode/groups/configure_group.php index 0f3f61d5a6..8d81d44540 100644 --- a/pandora_console/godmode/groups/configure_group.php +++ b/pandora_console/godmode/groups/configure_group.php @@ -118,7 +118,7 @@ if (is_metaconsole() === true) { // Data before table. -$files = list_files('images/', '@groups.svg', 1, 0); +$files = list_files(((is_metaconsole() === true) ? '../../' : '').'images/', '@groups.svg', 1, 0); $table = new stdClass(); $table->width = '100%'; From ea6aa8629b2e8688948480e8ae07271ede6127b1 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 27 Mar 2023 14:07:36 +0200 Subject: [PATCH 06/10] Module check force --- pandora_console/include/ajax/module.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index e079369b3a..296971bfc5 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1279,16 +1279,18 @@ if (check_login()) { if ((int) $module['flag'] === 0) { $additionalLinkAction = '&flag=1'; $linkCaption = __('Force checks'); + $imgaction = 'images/target.png'; } else { $additionalLinkAction = ''; $linkCaption = __('Refresh'); + $imgaction = 'images/go-back@svg.svg'; } $moduleActionButtons[] = html_print_anchor( [ - 'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&id_agente_modulo='.$module['id_agente_modulo'].'&refr=60'.$addedLinkParams.'"', + 'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&id_agente_modulo='.$module['id_agente_modulo'].'&refr=60'.$additionalLinkAction.'"', 'content' => html_print_image( - 'images/go-back@svg.svg', + $imgaction, true, [ 'class' => 'main_menu_icon' ] ), From 48a254c4b2b1351f513f4a67db5cb3dc168923cf Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 27 Mar 2023 14:34:05 +0200 Subject: [PATCH 07/10] fixed styles --- .../godmode/agentes/agent_manager.php | 14 ++++++------- .../godmode/agentes/configure_field.php | 16 ++++++++------- .../VisualConsole/Items/ModuleGraph.php | 2 +- pandora_console/include/styles/pandora.css | 11 +++++----- .../include/styles/visual_maps.css | 2 +- .../include/visual-console-client/vc.main.css | 4 ++-- .../visual-console-client/vc.main.css.map | 2 +- .../agentes/estado_generalagente.php | 20 +++++-------------- .../operation/visual_console/view.php | 2 +- visual_console_client/src/main.css | 4 ++-- 10 files changed, 35 insertions(+), 42 deletions(-) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 06ec4a5308..d84800e984 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -966,9 +966,9 @@ foreach ($fields as $field) { $link_url = ''; } - $data_field[1] = ''.__('Link text:').''; - $data_field[1] .= '
'; - $data_field[1] .= html_print_textarea( + $customContent = ''.__('Link text:').''; + $customContent .= '
'; + $customContent .= html_print_textarea( 'customvalue_'.$field['id_field'].'[]', 2, 1000, @@ -976,10 +976,10 @@ foreach ($fields as $field) { 'class="min-height-30px w100p"', true ); - $data_field[1] .= '
'; - $data_field[1] .= ''.__('Link URL:').''; - $data_field[1] .= '
'; - $data_field[1] .= html_print_textarea( + $customContent .= '
'; + $customContent .= ''.__('Link URL:').''; + $customContent .= '
'; + $customContent .= html_print_textarea( 'customvalue_'.$field['id_field'].'[]', 2, 1000, diff --git a/pandora_console/godmode/agentes/configure_field.php b/pandora_console/godmode/agentes/configure_field.php index 33aac95ccf..8a3a6b2f45 100755 --- a/pandora_console/godmode/agentes/configure_field.php +++ b/pandora_console/godmode/agentes/configure_field.php @@ -229,7 +229,6 @@ echo ''; diff --git a/pandora_console/godmode/agentes/module_manager_editor_wmi.php b/pandora_console/godmode/agentes/module_manager_editor_wmi.php index a334a770e4..3b3f539f08 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_wmi.php +++ b/pandora_console/godmode/agentes/module_manager_editor_wmi.php @@ -42,8 +42,6 @@ if (empty($edit_module)) { } $data = []; -$data[0] = __('Target IP').' '.ui_print_help_icon('wmi_module_tab', true); - if ($page == 'enterprise/godmode/policies/policy_modules') { if ($ip_target != 'auto' && $ip_target != '') { $custom_ip_target = $ip_target; @@ -60,7 +58,7 @@ if ($page == 'enterprise/godmode/policies/policy_modules') { $target_ip_values['force_pri'] = __('Force primary key'); $target_ip_values['custom'] = __('Custom'); - $data[1] = html_print_select( + $inputs = html_print_select( $target_ip_values, 'ip_target', $ip_target, @@ -72,109 +70,171 @@ if ($page == 'enterprise/godmode/policies/policy_modules') { false, '', false, - 'width:200px;' + 'width: 100%; margin-top: 10px;' ); - $data[1] .= html_print_input_text('custom_ip_target', $custom_ip_target, '', 15, 60, true); + $inputs .= html_print_input_text('custom_ip_target', $custom_ip_target, '', 15, 60, true); } else { if ($ip_target == 'auto') { $ip_target = agents_get_address($id_agente); } - $data[1] = html_print_input_text('ip_target', $ip_target, '', 15, 60, true); + $inputs = html_print_input_text( + 'ip_target', + $ip_target, + '', + 15, + 60, + true, + false, + false, + '', + 'mrgn_top_10px w100p' + ); } -$data[2] = __('Namespace').ui_print_help_tip(__('Optional. WMI namespace. If unsure leave blank.'), true); -$data[3] = html_print_input_text( - 'tcp_send', - $tcp_send, - '', - 5, - 20, - true, - $disabledBecauseInPolicy, - false, - '', - $classdisabledBecauseInPolicy +$data[0] = html_print_label_input_block( + __('Target IP').' '.ui_print_help_icon('wmi_module_tab', true), + $inputs, + [ + 'label_class' => 'font-title-font', + 'div_class' => 'w100p mrgn_right_20px', + ] +); + +$data[2] = html_print_label_input_block( + __('Namespace').ui_print_help_tip(__('Optional. WMI namespace. If unsure leave blank.'), true), + html_print_input_text( + 'tcp_send', + $tcp_send, + '', + 5, + 20, + true, + $disabledBecauseInPolicy, + false, + '', + $classdisabledBecauseInPolicy.' mrgn_top_10px w100p' + ), + [ + 'label_class' => 'font-title-font', + 'div_class' => 'w100p mrgn_right_20px', + ] ); push_table_simple($data, 'target_ip'); $data = []; -$data[0] = __('Username'); -$data[1] = html_print_input_text( - 'plugin_user', - $plugin_user, - '', - 15, - 60, - true, - $disabledBecauseInPolicy, - false, - '', - $classdisabledBecauseInPolicy +$data[0] = html_print_label_input_block( + __('Username'), + html_print_input_text( + 'plugin_user', + $plugin_user, + '', + 15, + 60, + true, + $disabledBecauseInPolicy, + false, + '', + $classdisabledBecauseInPolicy.' w100p' + ), + [ + 'label_class' => 'font-title-font', + 'div_class' => 'w100p display-grid mrgn_right_20px', + ] ); -$data[2] = __('Password'); -$data[3] = html_print_input_password( - 'plugin_pass', - '', - '', - 15, - 60, - true, - $disabledBecauseInPolicy, - false, - $classdisabledBecauseInPolicy, - 'new-password' + +$data[2] = html_print_label_input_block( + __('Password'), + html_print_input_password( + 'plugin_pass', + '', + '', + 15, + 60, + true, + $disabledBecauseInPolicy, + false, + $classdisabledBecauseInPolicy.' w100p', + 'new-password', + true + ), + [ + 'label_class' => 'font-title-font', + 'div_class' => 'w100p display-grid mrgn_right_20px', + ] ); +$table_simple->rowclass['user_pass'] = 'w100p mrgn_top_10px'; push_table_simple($data, 'user_pass'); $data = []; -$data[0] = __('WMI query'); -$data[1] = html_print_input_text( - 'snmp_oid', - $snmp_oid, - '', - 35, - 255, - true, - $disabledBecauseInPolicy, - false, - '', - $classdisabledBecauseInPolicy +$data[0] = html_print_label_input_block( + __('WMI query'), + html_print_input_text( + 'snmp_oid', + $snmp_oid, + '', + 35, + 255, + true, + $disabledBecauseInPolicy, + false, + '', + $classdisabledBecauseInPolicy + ), + [ + 'label_class' => 'font-title-font', + 'div_class' => 'w100p display-grid mrgn_right_20px', + ] ); -$table_simple->colspan['wmi_query'][1] = 3; + +$data[2] = html_print_label_input_block( + __('Key string').ui_print_help_tip(__('Optional. Substring to look for in the WQL query result. The module returns 1 if found, 0 if not.'), true), + html_print_input_text( + 'snmp_community', + $snmp_community, + '', + 20, + 60, + true, + $disabledBecauseInPolicy, + false, + '', + $classdisabledBecauseInPolicy + ), + [ + 'label_class' => 'font-title-font', + 'div_class' => 'w100p display-grid mrgn_right_20px', + ] +); +$table_simple->rowclass['wmi_query'] = 'w100p mrgn_top_10px'; push_table_simple($data, 'wmi_query'); $data = []; -$data[0] = __('Key string').ui_print_help_tip(__('Optional. Substring to look for in the WQL query result. The module returns 1 if found, 0 if not.'), true); -$data[1] = html_print_input_text( - 'snmp_community', - $snmp_community, - '', - 20, - 60, - true, - $disabledBecauseInPolicy, - false, - '', - $classdisabledBecauseInPolicy -); -$data[2] = __('Field number').ui_print_help_tip(__('Column number to retrieve from the WQL query result (starting from zero).'), true); -$data[3] = html_print_input_text( - 'tcp_port', - $tcp_port, - '', - 5, - 15, - true, - $disabledBecauseInPolicy, - false, - '', - $classdisabledBecauseInPolicy +$data[0] = html_print_label_input_block( + __('Field number').ui_print_help_tip(__('Column number to retrieve from the WQL query result (starting from zero).'), true), + html_print_input_text( + 'tcp_port', + $tcp_port, + '', + 5, + 15, + true, + $disabledBecauseInPolicy, + false, + '', + $classdisabledBecauseInPolicy.' mrgn_right_20px' + ), + [ + 'label_class' => 'font-title-font', + 'div_class' => 'w50p display-grid', + ] ); +$table_simple->rowclass['key_field'] = 'w100p mrgn_top_10px'; + push_table_simple($data, 'key_field'); ?> diff --git a/pandora_console/godmode/servers/modificar_server.php b/pandora_console/godmode/servers/modificar_server.php index c504ede68a..844b0a618f 100644 --- a/pandora_console/godmode/servers/modificar_server.php +++ b/pandora_console/godmode/servers/modificar_server.php @@ -228,11 +228,24 @@ if (isset($_GET['server']) === true) { $advanced_editor = false; if ($server_type === 13) { - echo " + echo "
"; echo ''; echo '
'; - echo __('Dynamic search').'  '; - html_print_input_text('search_config_token', $search, '', 12); + echo html_print_label_input_block( + __('Dynamic search'), + html_print_input_text( + 'search_config_token', + $search, + '', + 12, + 255, + true, + false, + false, + '', + 'w400px' + ) + ); echo '
'; } diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index 40ddec3069..a010e5d26a 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -254,7 +254,7 @@ foreach ($servers as $server) { $data[8] .= '
'; $data[8] .= html_print_image( - 'images/remote_configuration@svg.svg', + 'images/remote-configuration@svg.svg', true, [ 'title' => __('Remote configuration'), diff --git a/pandora_console/include/class/SatelliteAgent.class.php b/pandora_console/include/class/SatelliteAgent.class.php index 07acb23c6c..e313a774cd 100644 --- a/pandora_console/include/class/SatelliteAgent.class.php +++ b/pandora_console/include/class/SatelliteAgent.class.php @@ -162,7 +162,7 @@ class SatelliteAgent extends HTML [ 'id' => $this->tableId, 'class' => 'info_table', - 'style' => 'width: 100%', + 'style' => 'width: 99%', 'columns' => $columns, 'column_names' => $column_names, 'ajax_url' => $this->ajaxController, @@ -200,6 +200,7 @@ class SatelliteAgent extends HTML ], ], ], + 'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar', ] ); } catch (Exception $e) { @@ -213,10 +214,7 @@ class SatelliteAgent extends HTML echo $modal.$msg.$aux; - echo '
'; - - echo '
'; - html_print_select( + $select = html_print_select( [ '0' => 'Disable / Enable selected agents', '1' => 'Delete / Create selected agents', @@ -226,30 +224,32 @@ class SatelliteAgent extends HTML '', '', 0, - false, + true, false, false ); - html_print_submit_button( + $execute = html_print_submit_button( __('Execute action'), 'submit_satellite_action', false, - 'class="sub next"' + [ + 'icon' => 'cog', + 'class' => 'secondary', + ], + true ); - echo '
'; // Create button add host. - echo '
'; - html_print_submit_button( + $add = html_print_submit_button( __('Add host'), 'create', false, - 'class="sub next"' + ['icon' => 'next'], + true ); - echo '
'; - echo '
'; + html_print_action_buttons($add.$execute.$select); // Load own javascript file. echo $this->loadJS(); @@ -503,6 +503,7 @@ class SatelliteAgent extends HTML 'arguments' => [ 'name' => 'address', 'type' => 'text', + 'class' => 'w100p', 'value' => $values['address'], 'return' => true, ], @@ -514,6 +515,7 @@ class SatelliteAgent extends HTML 'arguments' => [ 'name' => 'name', 'type' => 'text', + 'class' => 'w100p', 'value' => $values['name'], 'return' => true, ], @@ -1244,7 +1246,7 @@ class SatelliteAgent extends HTML $('input[name*=check_]').prop('checked', check); }); - $('#submit-submit_satellite_action').click(function() { + $('#button-submit_satellite_action').click(function() { const checks = $('input[name*=check_]:checked'); const action = $('#satellite_action').val(); let agent_delete_error = []; diff --git a/pandora_console/include/class/SatelliteCollection.class.php b/pandora_console/include/class/SatelliteCollection.class.php index a8af32d3b6..ac4d275aa2 100644 --- a/pandora_console/include/class/SatelliteCollection.class.php +++ b/pandora_console/include/class/SatelliteCollection.class.php @@ -142,7 +142,7 @@ class SatelliteCollection extends HTML [ 'id' => $this->tableId, 'class' => 'info_table', - 'style' => 'width: 100%', + 'style' => 'width: 99%', 'columns' => $columns, 'column_names' => $column_names, 'ajax_url' => $this->ajaxController, @@ -164,10 +164,12 @@ class SatelliteCollection extends HTML 'label' => __('Search'), 'type' => 'text', 'name' => 'filter_search', + 'class' => 'w400px', 'size' => 12, ], ], ], + 'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar', ] ); } catch (Exception $e) { @@ -176,6 +178,7 @@ class SatelliteCollection extends HTML echo ''; echo ''; + html_print_action_buttons(''); // Load own javascript file. echo $this->loadJS(); diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index c830e01adf..7f4e1da557 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -11462,31 +11462,6 @@ p.trademark-copyright { height: 24px; } -form#satellite_conf_edit { - display: flex; - flex-direction: row; - justify-items: baseline; - justify-content: space-between; - flex-wrap: wrap; -} - -form#satellite_conf_edit > fieldset { - background-color: #fff; - // border: 1px solid #e2e2e2; - padding: 0.5em; - margin: 0px 1em; - margin-bottom: 20px; - position: relative; - border-radius: 5px; - flex: 1 1 700px; -} - -form#satellite_conf_edit > fieldset.full-column { - width: 100%; - flex: none; - margin: 0 0 20px; -} - .input_sub_placeholder { font-size: 8pt; color: #8a96a6; @@ -11766,3 +11741,7 @@ div.relative > div > div#ui-datepicker-div { .container-div-input-password:has(.w400px-important) { width: 400px; } + +span.help_icon_15px > img { + height: 15px !important; +} diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index 2ea3df83f6..5a95a6e174 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -741,6 +741,10 @@ tr.datos2 > td.datos2 > div > div > label { line-height: 16px; } +td[id^="basic_thresholds-"] .switch_radio_button > label[id^="label-radius"] { + line-height: 26px; +} + .mgn_tp_0_imp { margin-top: 0px !important; } @@ -823,3 +827,13 @@ div[id^="auto-os-"] > img { .w22px { width: 22px; } + +table#simple.floating_form tr[id^="simple-plugin_"], +table#simple.floating_form tr[id^="simple-macro_field"] { + display: grid; + margin-bottom: 10px; +} + +table#simple.floating_form tr[id^="simple-macro_field"] > td > input { + width: 50%; +} From 04618814206d28d0bbad659230f6e8f1b4bc71da Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 27 Mar 2023 17:13:23 +0200 Subject: [PATCH 10/10] fixed styles --- pandora_console/godmode/users/configure_user.php | 5 ++--- pandora_console/godmode/users/user_management.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 751bca96a9..e1114005b3 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -640,7 +640,6 @@ if ($update_user) { } $values = []; - $values['id_user'] = (string) get_parameter('id_user'); $values['fullname'] = (string) get_parameter('fullname'); $values['firstname'] = (string) get_parameter('firstname'); $values['lastname'] = (string) get_parameter('lastname'); @@ -658,7 +657,7 @@ if ($update_user) { $values['time_autorefresh'] = (int) get_parameter('time_autorefresh'); // API Token information. $apiTokenRenewed = (bool) get_parameter('renewAPIToken'); - $values['api_token'] = ($apiTokenRenewed === true) ? api_token_generate() : users_get_API_token($values['id_user']); + $values['api_token'] = ($apiTokenRenewed === true) ? api_token_generate() : users_get_API_token($id); if (users_is_admin() === false && (bool) $values['is_admin'] !== false) { db_pandora_audit( @@ -806,7 +805,7 @@ if ($update_user) { $has_skin = false; $has_wizard = false; - $info = '{"id_user":"'.$values['id_user'].'", + $info = '{"id_user":"'.$id.'", "FullName":"'.$values['fullname'].'", "Firstname":"'.$values['firstname'].'", "Lastname":"'.$values['lastname'].'", diff --git a/pandora_console/godmode/users/user_management.php b/pandora_console/godmode/users/user_management.php index 2a78ea0302..1f73c4417f 100644 --- a/pandora_console/godmode/users/user_management.php +++ b/pandora_console/godmode/users/user_management.php @@ -157,7 +157,7 @@ if ($new_user === true) { true ); } else { - // TODO. Show the user id with a label. + $userManagementTable->data['fields_iduser'][0] = html_print_input_hidden('id', $id, false, false, false, 'id'); } // User Full name.