diff --git a/pandora_console/godmode/reporting/graph_builder.graph_editor.php b/pandora_console/godmode/reporting/graph_builder.graph_editor.php index 705e7a8fe4..1938c25465 100644 --- a/pandora_console/godmode/reporting/graph_builder.graph_editor.php +++ b/pandora_console/godmode/reporting/graph_builder.graph_editor.php @@ -154,14 +154,16 @@ $table->data[0][1] = html_print_label_input_block( echo ''; echo "
"; -echo ""; +echo "
"; echo ''; echo ''; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index f9f21aaec5..33ac036908 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1686,34 +1686,56 @@ function html_print_select_multiple_modules_filtered(array $data):string ); $output .= ''; + $agent_class = ''; if (empty($data['searchBar']) === false && $data['searchBar'] === true) { - $output .= '
'; + $output .= ''; } @@ -1770,6 +1792,7 @@ function html_print_select_multiple_modules_filtered(array $data):string 'style' => 'min-width: 200px;max-width:200px;', 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', 'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '', + 'input_class' => $agent_class, ] ); } else { @@ -1786,6 +1809,7 @@ function html_print_select_multiple_modules_filtered(array $data):string 'style' => 'min-width: 200px;max-width:200px;', 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', 'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '', + 'input_class' => $agent_class, ] ); } @@ -1929,7 +1953,7 @@ function html_print_select_multiple_modules_filtered_formated(array $data):strin 'return' => true, 'nothing' => __('All'), 'nothing_value' => 0, - 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().', true)', ] ); $output .= '
'; @@ -1965,7 +1989,7 @@ function html_print_select_multiple_modules_filtered_formated(array $data):strin 'name' => 'filtered-module-show-common-modules-'.$uniqId, 'id' => 'filtered-module-show-common-modules-'.$uniqId, 'return' => true, - 'onchange' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + 'onchange' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().', true)', ] ); @@ -2053,7 +2077,7 @@ function html_print_select_multiple_modules_filtered_formated(array $data):strin 'return' => true, 'multiple' => true, 'style' => 'min-width: 200px;max-width:200px;', - 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().', true)', 'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '', 'truncate_size' => 300, ] @@ -2070,7 +2094,7 @@ function html_print_select_multiple_modules_filtered_formated(array $data):strin 'return' => true, 'multiple' => true, 'style' => 'min-width: 200px;max-width:200px;', - 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().', true)', 'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '', 'truncate_size' => 300, ] diff --git a/pandora_console/include/javascript/multiselect_filtered.js b/pandora_console/include/javascript/multiselect_filtered.js index 08fabc4c88..6467ef3b47 100644 --- a/pandora_console/include/javascript/multiselect_filtered.js +++ b/pandora_console/include/javascript/multiselect_filtered.js @@ -211,7 +211,7 @@ function fmAgentChange(uniqId) { } // eslint-disable-next-line no-unused-vars -function fmModuleChange(uniqId, isMeta) { +function fmModuleChange(uniqId, isMeta, valueID = false) { var idModuleGroup = $("#filtered-module-module-group-" + uniqId).val(); var idAgents = $("#filtered-module-agents-" + uniqId).val(); var commonSelectorType = $( @@ -253,7 +253,7 @@ function fmModuleChange(uniqId, isMeta) { .html(value["nombre"]); } else { option - .attr("value", id) + .attr("value", valueID === false ? value : id) .attr("title", value) .html(value); } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 98021c7afa..04bf0a97c2 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -14222,14 +14222,6 @@ button.ui-button-text-only.ui-widget.sub:hover, box-shadow: none; } -.black-and-white { - filter: saturate(0); -} - -.invert_filter.black-and-white { - filter: invert(1) saturate(0) !important; -} - div.tox .tox-editor-header { z-index: 1; } @@ -14277,3 +14269,41 @@ div.fixed-bottom-box.tree-view-bottom-modal { z-index: 1; border: 1px solid var(--border-color); } + +.custom-graph-editor + #select_multiple_modules_filtered + > div.agents-modules-multiple-search-bar + > div { + width: 37%; +} + +.custom-graph-editor + #select_multiple_modules_filtered + > div.agents-modules-multiple-search-bar + > div + > div + > input { + width: 100%; + max-width: 100%; +} + +.custom-graph-editor + #select_multiple_modules_filtered + > div.agents-modules-multiple-search-bar + > div + > div { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + flex-wrap: wrap; + width: 100%; +} + +.custom-graph-editor-agents-module-filter { + margin-top: -69px; +} + +.custom-graph-editor-agents-module-filter > span.select2.select2-container { + height: 189px; +} diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index d525ee8659..8c5a32f329 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -2114,3 +2114,11 @@ select option:checked { .color_666 { color: var(--text-color); } + +.black-and-white { + filter: saturate(0); +} + +.invert_filter.black-and-white { + filter: invert(1) saturate(0) !important; +}
'.html_print_input( [ 'type' => 'select_multiple_modules_filtered', 'uniqId' => 'modules', 'class' => 'flex flex-row', - 'searchBar' => false, + 'searchBar' => true, + 'searchBarAgents' => false, + 'searchBarModules' => true, 'placeholderAgents' => __('Search agent name'), ] ).'