From 5f864d53a8a694f6eb22e92f106e88926e3d054e Mon Sep 17 00:00:00 2001
From: miguel angel rasteu
Date: Mon, 3 Jul 2023 09:18:30 +0200
Subject: [PATCH 01/48] #11051 Add action to mark all notification as read
---
pandora_console/general/header.php | 27 +++++++++++++++++++
.../godmode/setup/setup_notifications.php | 21 +++++++++++++++
.../include/class/ConsoleSupervisor.php | 7 +++--
pandora_console/include/functions_html.php | 3 +++
.../include/functions_notifications.php | 15 ++++++++++-
pandora_console/include/styles/pandora.css | 5 ++++
6 files changed, 75 insertions(+), 3 deletions(-)
diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index 6129fcebb4..ba6922e03c 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -539,6 +539,33 @@ echo sprintf('
",
+ $notification_menu,
array_reduce(
$mess,
function ($carry, $message) {
@@ -1114,7 +1127,7 @@ function notifications_print_dropdown_element($message_info)
",
- $action.';click_on_notification_toast(event)',
+ $action.'; click_on_notification_toast(event)',
$message_info['id_mensaje'],
messages_get_url($message_info['id_mensaje']),
$target,
diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index 06a3640c7c..11580027bf 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -12289,3 +12289,8 @@ tr[id^="network_component-plugin-wmi-fields-dynamicMacroRow-"] input,
tr[id^="network_component-plugin-snmp-fields-dynamicMacroRow-"] input {
width: 100% !important;
}
+
+.notification_menu {
+ padding-top: 10px;
+ padding-left: 15px;
+}
From 0bd6125841171f25cafd2673a6a1cd020469ed92 Mon Sep 17 00:00:00 2001
From: miguel angel rasteu
Date: Tue, 4 Jul 2023 13:33:29 +0200
Subject: [PATCH 02/48] #11051 Add notifications filter
---
pandora_console/general/header.php | 21 ++++
.../include/functions_notifications.php | 105 +++++++++++++++++-
pandora_console/include/styles/pandora.css | 50 ++++++++-
3 files changed, 174 insertions(+), 2 deletions(-)
diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index ba6922e03c..778f394446 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -566,6 +566,27 @@ echo sprintf('
",
+ $notification_filter,
$notification_menu,
array_reduce(
$mess,
@@ -1109,11 +1209,13 @@ function notifications_print_dropdown_element($message_info)
$message_info['subject'] = io_safe_input($img);
}
+ $type = explode('.', $message_info['subtype'])[1];
return sprintf(
"
@@ -1129,6 +1231,7 @@ function notifications_print_dropdown_element($message_info)
",
$action.'; click_on_notification_toast(event)',
$message_info['id_mensaje'],
+ $type,
messages_get_url($message_info['id_mensaje']),
$target,
html_print_image('images/info.svg', true, ['style' => 'height: 40px;margin-left: -20px;margin-top: -40px;']),
diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index 11580027bf..c5ca2d0b19 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -12290,7 +12290,55 @@ tr[id^="network_component-plugin-snmp-fields-dynamicMacroRow-"] input {
width: 100% !important;
}
-.notification_menu {
+.notificaion_menu_container {
+ display: flex;
padding-top: 10px;
padding-left: 15px;
}
+.notification_menu {
+ width: 100px;
+}
+
+.filter_notification {
+ width: auto;
+ min-width: 50px;
+}
+
+#menu-filter_notification * {
+ list-style: none;
+}
+#menu-filter_notification li {
+ line-height: 180%;
+}
+#menu-filter_notification input[name="filter_menu"] {
+ position: absolute;
+ left: -1000em;
+}
+#menu-filter_notification label[id="filter_menu_label"]:before {
+ content: "\025b8";
+ margin-right: 4px;
+}
+#menu-filter_notification
+ input[name="filter_menu"]:checked
+ ~ label[id="filter_menu_label"]:before {
+ content: "\025be";
+}
+#menu-filter_notification .sublevel-filter_notification {
+ display: none;
+}
+#menu-filter_notification input[name="filter_menu"]:checked ~ ul {
+ display: block;
+}
+
+.item-filter > label {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle;
+}
+
+.item-filter > input[type="checkbox"] {
+ display: inline-block;
+ width: 40px;
+ height: 100%;
+ vertical-align: middle;
+}
From 3c345ed1f901ad0ec10b7c70545638b6e8762f76 Mon Sep 17 00:00:00 2001
From: miguel angel rasteu
Date: Thu, 13 Jul 2023 13:12:43 +0200
Subject: [PATCH 03/48] #8285 Add CSV export on agents modules view
---
pandora_console/extensions/agents_modules.php | 26 +++-
.../extensions/agents_modules_csv.php | 117 ++++++++++++++++++
pandora_console/include/functions_modules.php | 72 +++++++++++
3 files changed, 214 insertions(+), 1 deletion(-)
create mode 100644 pandora_console/extensions/agents_modules_csv.php
diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php
index 215e478319..d33341f25f 100644
--- a/pandora_console/extensions/agents_modules.php
+++ b/pandora_console/extensions/agents_modules.php
@@ -267,6 +267,23 @@ function agents_modules_load_js()
// }
// });
}
+ /* e.value).get();
+ let module_id = $('#module option:selected').map((_, e) => e.value).get();
+
+ let filters_array = {group_id: group_id, module_group_id:module_group_id, agent_id:agent_id, module_id:module_id}
+ let jsonFilters = JSON.stringify(filters_array)
+ let filters = window.btoa(jsonFilters)
+ var f = document.forms.filter_form;
+
+ blockResubmit($(this));
+ f.action = "extensions/agents_modules_csv.php?get_agents_module_csv=1&filters="+filters;
+ $("#filter_form").submit();
+ }
+ /* ]]> */
';
+ $show_filters = '