';
+ $output .= '
';
- $output .= '
';
- $output .= html_print_input(
- [
- 'type' => 'text',
- 'name' => 'agent-searchBar-'.$uniqId,
- 'onKeyUp' => 'searchAgent(\''.$uniqId.'\')',
- 'placeholder' => __('Type to search agents'),
- 'return' => true,
- ]
- );
+ if (isset($data['searchBarAgents']) === false) {
+ $data['searchBarAgents'] = true;
+ }
- $output .= '
';
+ if (isset($data['searchBarModules']) === false) {
+ $data['searchBarModules'] = true;
+ }
- $output .= '
';
- $output .= html_print_input(
- [
- 'type' => 'text',
- 'name' => 'module-searchBar-'.$uniqId,
- 'onKeyUp' => 'searchModule(\''.$uniqId.'\')',
- 'return' => true,
- 'placeholder' => __('Type to search modules'),
- ]
- );
+ if ($data['searchBarAgents'] === true) {
+ $output .= '
';
+ $output .= html_print_input(
+ [
+ 'type' => 'text',
+ 'label_class' => 'font-title-font',
+ 'label' => __('Filter agent'),
+ 'name' => 'agent-searchBar-'.$uniqId,
+ 'onKeyUp' => 'searchAgent(\''.$uniqId.'\')',
+ 'placeholder' => __('Type to search agents'),
+ 'return' => true,
+ ]
+ );
- $output .= '
';
+ $output .= '
';
+ } else {
+ $agent_class = 'custom-graph-editor-agents-module-filter';
+ $output .= '
';
+ }
+
+ if ($data['searchBarModules'] === true) {
+ $output .= '
';
+ $output .= html_print_input(
+ [
+ 'type' => 'text',
+ 'label_class' => 'font-title-font',
+ 'label' => __('Filter module'),
+ 'name' => 'module-searchBar-'.$uniqId,
+ 'onKeyUp' => 'searchModule(\''.$uniqId.'\')',
+ 'return' => true,
+ 'placeholder' => __('Type to search modules'),
+ ]
+ );
+
+ $output .= '
';
+ } else {
+ $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;
+}