Merge branch 'develop' into ent-12435-metaconsola-external-links-recorta-enlaces-muy-largos

This commit is contained in:
Jonathan 2024-01-18 13:50:27 +01:00
commit 3d1492b6a3
70 changed files with 1015 additions and 394 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.775-240108 Version: 7.0NG.775-240118
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.775-240108" pandora_version="7.0NG.775-240118"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1039,7 +1039,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.775'; use constant AGENT_VERSION => '7.0NG.775';
use constant AGENT_BUILD => '240108'; use constant AGENT_BUILD => '240118';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.775 %define version 7.0NG.775
%define release 240108 %define release 240118
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin %define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux %define source_name pandorafms_agent_linux
%define version 7.0NG.775 %define version 7.0NG.775
%define release 240108 %define release 240118
%define debug_package %{nil} %define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version Summary: Pandora FMS Linux agent, binary version

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin %define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux %define source_name pandorafms_agent_linux
%define version 7.0NG.775 %define version 7.0NG.775
%define release 240108 %define release 240118
%define debug_package %{nil} %define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version Summary: Pandora FMS Linux agent, binary version

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin %define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux %define source_name pandorafms_agent_linux
%define version 7.0NG.775 %define version 7.0NG.775
%define release 240108 %define release 240118
Summary: Pandora FMS Linux agent, binary version Summary: Pandora FMS Linux agent, binary version
Name: %{name} Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.775 %define version 7.0NG.775
%define release 240108 %define release 240118
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.775" PI_VERSION="7.0NG.775"
PI_BUILD="240108" PI_BUILD="240118"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{240108} {240118}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.775 Build 240108") #define PANDORA_VERSION ("7.0NG.775 Build 240118")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Pandora FMS" VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.775(Build 240108))" VALUE "ProductVersion", "(7.0NG.775(Build 240118))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.775-240108 Version: 7.0NG.775-240118
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.775-240108" pandora_version="7.0NG.775-240118"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -397,21 +397,23 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
$modal_box .= '<a href="https://discord.com/invite/xVt2ruSxmr" target="_blank">'.__('Join discord community').'</a>'; $modal_box .= '<a href="https://discord.com/invite/xVt2ruSxmr" target="_blank">'.__('Join discord community').'</a>';
$modal_box .= '</div>'; $modal_box .= '</div>';
$modal_help = html_print_div( if ($config['activate_feedback'] === '1') {
[ $modal_help = html_print_div(
'id' => 'modal-help-content', [
'content' => html_print_image( 'id' => 'modal-help-content',
'images/help@header.svg', 'content' => html_print_image(
true, 'images/help@header.svg',
[ true,
'title' => __('Help'), [
'class' => 'main_menu_icon bot invert_filter', 'title' => __('Help'),
'alt' => 'user', 'class' => 'main_menu_icon bot invert_filter',
] 'alt' => 'user',
).$modal_box, ]
], ).$modal_box,
true, ],
); true,
);
}
// User. // User.

View File

@ -770,11 +770,14 @@ $("#conf_wizard").click(function() {
modal: { modal: {
title: "<?php echo __('Welcome to').' '.io_safe_output(get_product_name()); ?>", title: "<?php echo __('Welcome to').' '.io_safe_output(get_product_name()); ?>",
cancel: '<?php echo __('Do not show anymore'); ?>', cancel: '<?php echo __('Do not show anymore'); ?>',
ok: '<?php echo __('Close'); ?>' ok: '<?php echo __('Close wizard'); ?>',
overlay: true,
overlayExtraClass: 'welcome-overlay',
}, },
onshow: { onshow: {
page: 'include/ajax/welcome_window', page: 'include/ajax/welcome_window',
method: 'loadWelcomeWindow', method: 'loadWelcomeWindow',
width: 1000,
}, },
oncancel: { oncancel: {
page: 'include/ajax/welcome_window', page: 'include/ajax/welcome_window',
@ -792,6 +795,34 @@ $("#conf_wizard").click(function() {
} }
}) })
} }
},
onload: () => {
$(document).ready(function () {
var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix");
$(buttonpane).append(`
<div class="welcome-wizard-buttons">
<label>
<input type="checkbox" class="welcome-wizard-do-not-show" value="1" />
<?php echo __('Do not show anymore'); ?>
</label>
<button class="close-wizard-button"><?php echo __('Close wizard'); ?></button>
</div>
`);
var closeWizard = $("button.close-wizard-button");
$(closeWizard).click(function (e) {
var close = $("div[aria-describedby='welcome_modal_window'] button.sub.ok.submit-next.ui-button");
var cancel = $("div[aria-describedby='welcome_modal_window'] button.sub.upd.submit-cancel.ui-button");
var checkbox = $("div[aria-describedby='welcome_modal_window'] .welcome-wizard-do-not-show:checked").length;
if (checkbox === 1) {
$(cancel).click();
} else {
$(close).click()
}
});
});
} }
}); });
}); });

View File

@ -394,11 +394,11 @@ html_print_action_buttons(
$('[id^=checkbox-all_delete]').change(function(){ $('[id^=checkbox-all_delete]').change(function(){
if ($("#checkbox-all_delete").prop("checked")) { if ($("#checkbox-all_delete").prop("checked")) {
$('[id^=checkbox-delete_multiple]').parent().parent().addClass('checkselected'); $('[id^=checkbox-delete_multiple]').parent().parent().addClass('checkselected');
$(".check_delete").prop("checked", true); $(".custom_checkbox_input").prop("checked", true);
} }
else{ else{
$('[id^=checkbox-delete_multiple]').parent().parent().removeClass('checkselected'); $('[id^=checkbox-delete_multiple]').parent().parent().removeClass('checkselected');
$(".check_delete").prop("checked", false); $(".custom_checkbox_input").prop("checked", false);
} }
}); });
}); });

View File

@ -30,7 +30,7 @@ if (!$report_w && !$report_m) {
require_once $config['homedir'].'/include/functions_agents.php'; require_once $config['homedir'].'/include/functions_agents.php';
require_once $config['homedir'].'/include/functions_modules.php'; require_once $config['homedir'].'/include/functions_modules.php';
require_once $config['homedir'].'/include/functions_groups.php'; require_once $config['homedir'].'/include/functions_groups.php';
ui_require_css_file('custom_graph');
$editGraph = (bool) get_parameter('edit_graph', 0); $editGraph = (bool) get_parameter('edit_graph', 0);
$action = get_parameter('action', ''); $action = get_parameter('action', '');
@ -41,113 +41,6 @@ if (isset($_GET['get_agent'])) {
} }
} }
switch ($action) {
case 'sort_items':
$resultOperationDB = null;
$position_to_sort = (int) get_parameter('position_to_sort', 1);
$ids_serialize = (string) get_parameter('ids_items_to_sort', '');
$move_to = (string) get_parameter('move_to', 'after');
$countItems = db_get_sql(
'
SELECT COUNT(id_gs)
FROM tgraph_source
WHERE id_graph = '.$id_graph
);
if (($countItems < $position_to_sort) || ($position_to_sort < 1)) {
$resultOperationDB = false;
} else if (!empty($ids_serialize)) {
$ids = explode('|', $ids_serialize);
$items = db_get_all_rows_sql(
'SELECT id_gs, `field_order`
FROM tgraph_source
WHERE id_graph = '.$id_graph.'
ORDER BY `field_order`'
);
if ($items === false) {
$items = [];
}
// Clean the repeated order values.
$order_temp = 1;
foreach ($items as $item) {
db_process_sql_update(
'tgraph_source',
['`field_order`' => $order_temp],
['id_gs' => $item['id_rc']]
);
$order_temp++;
}
$items = db_get_all_rows_sql(
'SELECT id_gs, `field_order`
FROM tgraph_source
WHERE id_graph = '.$id_graph.'
ORDER BY `field_order`'
);
if ($items === false) {
$items = [];
}
$temp = [];
$temp = [];
foreach ($items as $item) {
// Remove the contents from the block to sort.
if (array_search($item['id_gs'], $ids) === false) {
$temp[$item['field_order']] = $item['id_gs'];
}
}
$items = $temp;
$sorted_items = [];
foreach ($items as $pos => $id_unsort) {
if ($pos == $position_to_sort) {
if ($move_to == 'after') {
$sorted_items[] = $id_unsort;
}
foreach ($ids as $id) {
$sorted_items[] = $id;
}
if ($move_to != 'after') {
$sorted_items[] = $id_unsort;
}
} else {
$sorted_items[] = $id_unsort;
}
}
$items = $sorted_items;
foreach ($items as $order => $id) {
db_process_sql_update(
'tgraph_source',
['`field_order`' => ($order + 1)],
['id_gs' => $id]
);
}
$resultOperationDB = true;
} else {
$resultOperationDB = false;
}
break;
}
if ($editGraph) { if ($editGraph) {
$graphRows = db_get_all_rows_sql( $graphRows = db_get_all_rows_sql(
'SELECT t1.*, 'SELECT t1.*,
@ -257,41 +150,6 @@ $table->data[0][1] = html_print_label_input_block(
); );
$SortItems = "<form action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id=".$id_graph."' method='post' onsubmit='return added_ids_sorted_items_to_hidden_input();'>";
$SortItems .= html_print_table($table, true);
$SortItems .= html_print_input_hidden('action', 'sort_items', true);
$SortItems .= html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Sort'),
'srcbutton',
false,
[
'class' => 'mini',
'icon' => 'search',
'mode' => 'secondary',
],
true
),
],
true
);
$SortItems .= '</form>';
ui_toggle(
$SortItems,
'<span class="subsection_header_title">'.__('Sort items').'</span>',
'',
'',
false,
false,
'',
'white-box-content no_border',
'filter-datatable-main box-flat white_table_graph max_floating_element_size'
);
// Configuration form. // Configuration form.
echo '<span id ="none_text" class="invisible">'.__('None').'</span>'; echo '<span id ="none_text" class="invisible">'.__('None').'</span>';
echo "<form id='agentmodules' method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&add_module=1&edit_graph=1&id=".$id_graph."'>"; echo "<form id='agentmodules' method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&add_module=1&edit_graph=1&id=".$id_graph."'>";
@ -300,10 +158,11 @@ echo "<table width='100%' cellpadding='4' cellpadding='4' class='databox filters
echo '<tr>'; echo '<tr>';
echo '<td class="w50p pdd_50px" id="select_multiple_modules_filtered">'.html_print_input( echo '<td class="w50p pdd_50px" id="select_multiple_modules_filtered">'.html_print_input(
[ [
'type' => 'select_multiple_modules_filtered', 'type' => 'select_multiple_modules_filtered',
'uniqId' => 'modules', 'uniqId' => 'modules',
'class' => 'flex flex-row', 'class' => 'flex flex-row',
'searchBar' => true, 'searchBar' => false,
'placeholderAgents' => __('Search agent name'),
] ]
).'</td>'; ).'</td>';
echo '</tr><tr>'; echo '</tr><tr>';
@ -340,6 +199,7 @@ echo '</form>';
// Modules table. // Modules table.
if ($count_module_array > 0) { if ($count_module_array > 0) {
echo "<table width='100%' cellpadding=4 cellpadding=4 class='databox filters info_table'>"; echo "<table width='100%' cellpadding=4 cellpadding=4 class='databox filters info_table'>";
echo '<thead>';
echo '<tr> echo '<tr>
<th>'.__('P.').'</th> <th>'.__('P.').'</th>
<th>'.__('Agent').'</th> <th>'.__('Agent').'</th>
@ -348,6 +208,8 @@ if ($count_module_array > 0) {
<th>'.__('Weight').'</th> <th>'.__('Weight').'</th>
<th>'.__('Delete').'</th> <th>'.__('Delete').'</th>
<th>'.__('Sort').'</th>'; <th>'.__('Sort').'</th>';
echo '</thead>';
echo '<tbody>';
$color = 0; $color = 0;
for ($a = 0; $a < $count_module_array; $a++) { for ($a = 0; $a < $count_module_array; $a++) {
// Calculate table line color. // Calculate table line color.
@ -359,7 +221,7 @@ if ($count_module_array > 0) {
$color = 1; $color = 1;
} }
echo "<tr><td class='$tdcolor'>$position_array[$a]</td>"; echo "<tr><td class='position $tdcolor'>$position_array[$a]</td>";
echo "<td class='$tdcolor'>".$agent_array[$a].'</td>'; echo "<td class='$tdcolor'>".$agent_array[$a].'</td>';
echo "<td class='$tdcolor'>"; echo "<td class='$tdcolor'>";
echo modules_get_agentmodule_name($module_array[$a]).'</td>'; echo modules_get_agentmodule_name($module_array[$a]).'</td>';
@ -410,9 +272,30 @@ if ($count_module_array > 0) {
echo '</td>'; echo '</td>';
echo '<td>'; echo '<td style="display: grid;">';
echo html_print_checkbox_extended('sorted_items[]', $idgs_array[$a], false, false, '', 'class="selected_check"', true); echo html_print_input_image(
'up',
'images/arrow-up-white.png',
'up',
($config['style'] !== 'pandora_black') ? 'filter: invert(100%)' : '',
true,
[
'class' => 'invert_filter main_menu_icon',
'onclick' => 'reorder(\'up\', \''.$idgs_array[$a].'\', this)',
],
);
echo html_print_input_image(
'down',
'images/arrow-down-white.png',
'down',
($config['style'] !== 'pandora_black') ? 'filter: invert(100%)' : '',
true,
[
'class' => 'invert_filter main_menu_icon',
'onclick' => 'reorder(\'down\', \''.$idgs_array[$a].'\', this)',
]
);
echo '</td>'; echo '</td>';
@ -420,6 +303,8 @@ if ($count_module_array > 0) {
echo '</tr>'; echo '</tr>';
} }
echo '</tbody>';
echo '</table>'; echo '</table>';
} }
@ -482,4 +367,65 @@ function added_ids_sorted_items_to_hidden_input() {
return true; return true;
} }
} }
function reorder(action, idElement, element) {
var tr = $(element).parent().parent();
switch (action) {
case "up":
changePosition(action, idElement)
.then((data) => {
if(data.success) {
$(tr).find('.position').html(parseInt($(tr).find('.position').html()) - 1);
$($(tr).prev()).find('.position').html(parseInt($($(tr).prev()).find('.position').html()) + 1);
$(tr).prev().insertAfter(tr);
}
})
.catch((err) => {
console.log(err);
})
break;
case "down":
changePosition(action, idElement)
.then((data) => {
if(data.success) {
$(tr).find('.position').html(parseInt($(tr).find('.position').html()) + 1);
$($(tr).next()).find('.position').html(parseInt(($(tr).next()).find('.position').html()) - 1);
$(tr).next().insertBefore(tr);
}
})
.catch((err) => {
console.log(err);
})
break;
default:
break;
}
}
function changePosition(order, idElement) {
return new Promise(function(resolve, reject) {
$.ajax({
method: "POST",
url: "<?php echo ui_get_full_url('ajax.php'); ?>",
dataType: "json",
data: {
page: "include/ajax/graph.ajax",
sort_items: 1,
order,
id_graph: <?php echo $id_graph; ?>,
id: idElement
},
success: function(data) {
resolve(data);
},
error: function(error) {
reject(error);
}
});
});
}
</script> </script>

View File

@ -247,7 +247,7 @@ if ($add_module === true) {
$id_agent_modules = db_get_all_rows_sql($sql); $id_agent_modules = db_get_all_rows_sql($sql);
if (count($id_agent_modules) > 0 && $id_agent_modules != '') { if (is_array($id_agent_modules) === true && count($id_agent_modules) > 0 && $id_agent_modules != '') {
$sql_order = sprintf( $sql_order = sprintf(
'SELECT `field_order` 'SELECT `field_order`
FROM tgraph_source FROM tgraph_source

View File

@ -521,7 +521,7 @@ $(document).ready (function () {
function (data) { function (data) {
$(".white-box-content").html(data); $(".white-box-content").html(data);
$("#submit-add").click(function (e) { $("#button-add").click(function (e) {
add_credential_boxes(); add_credential_boxes();
}); });
@ -550,7 +550,7 @@ $(document).ready (function () {
$(".white-box-content").html(data2); $(".white-box-content").html(data2);
// Insert credential // Insert credential
$("#submit-add").click(function (e) { $("#button-add").click(function (e) {
save_credential_boxes(); save_credential_boxes();
}) })
}, },
@ -609,7 +609,7 @@ $(document).ready (function () {
function (data) { function (data) {
$(".white-box-content").html(data); $(".white-box-content").html(data);
$("#submit-update").click(function (e) { $("#button-update").click(function (e) {
update_credential_boxes(datas); update_credential_boxes(datas);
}); });
}, },

View File

@ -559,7 +559,7 @@ $table_cr_settings->data[4][0] = html_print_label_input_block(
// Print. // Print.
echo '<div class="center pdd_b_10px mrgn_btn_20px white_box max_floating_element_size">'; echo '<div class="center pdd_b_10px mrgn_btn_20px white_box max_floating_element_size">';
echo '<a target="_blank" rel="noopener noreferrer" href="https://pandorafms.com/es/itsm/">'; echo '<a target="_blank" rel="noopener noreferrer" href="https://pandorafms.com/itsm/">';
html_print_image( html_print_image(
'images/pandoraITSM_logo.png', 'images/pandoraITSM_logo.png',
false, false,
@ -570,8 +570,8 @@ echo '<br />';
echo '<div class="ITSM_title">'; echo '<div class="ITSM_title">';
echo __('Pandora ITSM'); echo __('Pandora ITSM');
echo '</div>'; echo '</div>';
echo '<a target="_blank" rel="noopener noreferrer" href="https://pandorafms.com/es/itsm/">'; echo '<a target="_blank" rel="noopener noreferrer" href="https://pandorafms.com/itsm/">';
echo 'https://pandorafms.com/es/itsm/'; echo 'https://pandorafms.com/itsm/';
echo '</a>'; echo '</a>';
echo '</div>'; echo '</div>';

View File

@ -424,12 +424,15 @@ if ($create_user === true) {
$values['data_section'] = $dashboard; $values['data_section'] = $dashboard;
} else if (io_safe_output($values['section']) === HOME_SCREEN_VISUAL_CONSOLE) { } else if (io_safe_output($values['section']) === HOME_SCREEN_VISUAL_CONSOLE) {
$values['data_section'] = $visual_console; $values['data_section'] = $visual_console;
} else if ($values['section'] === HOME_SCREEN_OTHER) { } else if ($values['section'] === HOME_SCREEN_OTHER || io_safe_output($values['section']) === HOME_SCREEN_EXTERNAL_LINK) {
$values['data_section'] = get_parameter('data_section_other');
} else if (io_safe_output($values['section']) === HOME_SCREEN_EXTERNAL_LINK) {
$values['data_section'] = get_parameter('data_section'); $values['data_section'] = get_parameter('data_section');
} }
if (is_metaconsole() === true) {
$values['metaconsole_section'] = $values['section'];
$values['metaconsole_data_section'] = $values['data_section'];
}
// $values['section'] = $homeScreenValues[$values['section']]; // $values['section'] = $homeScreenValues[$values['section']];
if (enterprise_installed() === true) { if (enterprise_installed() === true) {
$values['force_change_pass'] = 1; $values['force_change_pass'] = 1;
@ -724,9 +727,7 @@ if ($update_user) {
$values['data_section'] = $dashboard; $values['data_section'] = $dashboard;
} else if (io_safe_output($values['section']) === HOME_SCREEN_VISUAL_CONSOLE) { } else if (io_safe_output($values['section']) === HOME_SCREEN_VISUAL_CONSOLE) {
$values['data_section'] = $visual_console; $values['data_section'] = $visual_console;
} else if ($values['section'] === HOME_SCREEN_OTHER) { } else if ($values['section'] === HOME_SCREEN_OTHER || io_safe_output($values['section']) === HOME_SCREEN_EXTERNAL_LINK) {
$values['data_section'] = get_parameter('data_section_other');
} else if (io_safe_output($values['section']) === HOME_SCREEN_EXTERNAL_LINK) {
$values['data_section'] = get_parameter('data_section'); $values['data_section'] = get_parameter('data_section');
} }

View File

@ -84,8 +84,7 @@ $customHomeScreenAddition[HOME_SCREEN_DASHBOARD] = html_print_select(
// Home screen. Visual consoles. // Home screen. Visual consoles.
$customHomeScreenAddition[HOME_SCREEN_VISUAL_CONSOLE] = html_print_select($layouts_aux, 'visual_console', $user_info['data_section'], '', '', '', true, false, true, 'w100p', false, 'width: 100%'); $customHomeScreenAddition[HOME_SCREEN_VISUAL_CONSOLE] = html_print_select($layouts_aux, 'visual_console', $user_info['data_section'], '', '', '', true, false, true, 'w100p', false, 'width: 100%');
// Home screen. External link and Other. // Home screen. External link and Other.
$customHomeScreenAddition[HOME_SCREEN_EXTERNAL_LINK] = html_print_input_text('data_section_external', $user_info['data_section'], '', 60, 255, true); $customHomeScreenAddition[HOME_SCREEN_EXTERNAL_LINK] = html_print_input_text('data_section', $user_info['data_section'], '', 60, 400, true);
$customHomeScreenAddition[HOME_SCREEN_OTHER] = html_print_input_text('data_section_other', $user_info['data_section'], '', 60, 255, true);
$layouts = visual_map_get_user_layouts($config['id_user'], true); $layouts = visual_map_get_user_layouts($config['id_user'], true);
$layouts_aux = []; $layouts_aux = [];

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="12px" viewBox="0 0 16 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>F1630B1D-C694-489C-8C8F-E98AF57D4F04</title>
<g id="Welcome-wizard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Pandora-FMS---Welcome-Wizard-2023---1a-Welcome-wizard" transform="translate(-905, -629)" fill="#FFFFFF">
<g id="Popup" transform="translate(460, 200)">
<g id="Content" transform="translate(20, 96)">
<g id="Form" transform="translate(0, 292)">
<g id="Principal-por-defecto" transform="translate(305, 26)">
<g id="Group-2" transform="translate(38, 11)">
<g id="check" transform="translate(82, 4)">
<path d="M6,12 C5.5,12 5,11.8 4.6,11.4 L0.6,7.4 C-0.2,6.6 -0.2,5.4 0.6,4.6 C1.4,3.8 2.7,3.8 3.4,4.6 L6,7.2 L12.6,0.6 C13.4,-0.2 14.6,-0.2 15.4,0.6 C16.2,1.4 16.2,2.6 15.4,3.4 L7.4,11.4 C7,11.8 6.5,12 6,12 Z"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

View File

@ -17,6 +17,8 @@ $save_custom_graph = (bool) get_parameter('save_custom_graph');
$print_custom_graph = (bool) get_parameter('print_custom_graph', false); $print_custom_graph = (bool) get_parameter('print_custom_graph', false);
$print_sparse_graph = (bool) get_parameter('print_sparse_graph'); $print_sparse_graph = (bool) get_parameter('print_sparse_graph');
$get_graphs = (bool) get_parameter('get_graphs_container'); $get_graphs = (bool) get_parameter('get_graphs_container');
$sort_items = (bool) get_parameter('sort_items');
$width = get_parameter('width', 0); $width = get_parameter('width', 0);
$height = get_parameter('height', 0); $height = get_parameter('height', 0);
@ -337,3 +339,104 @@ if ($get_graphs) {
return; return;
} }
} }
if ($sort_items === true) {
$order = (string) get_parameter('order');
$id = (string) get_parameter('id', '');
$idGraph = (string) get_parameter('id_graph', '');
$total = db_get_num_rows('SELECT * FROM tgraph_source WHERE id_graph = '.$idGraph.'');
$item = db_get_row_sql(
'SELECT id_gs, field_order
FROM tgraph_source
WHERE id_gs = '.$id.'
ORDER BY field_order'
);
switch ($order) {
case 'up':
if (($item['field_order'] - 1) < 1) {
echo json_encode(['success' => false]);
return;
}
$prevItem = db_get_row_sql(
'SELECT id_gs, field_order
FROM tgraph_source
WHERE id_graph = '.$idGraph.'
AND field_order = '.($item['field_order'] - 1).'
ORDER BY field_order'
);
db_process_sql_begin();
$resultItem = db_process_sql_update(
'tgraph_source',
['field_order' => ($item['field_order'] - 1)],
['id_gs' => $item['id_gs']],
false
);
$resultPrevItem = db_process_sql_update(
'tgraph_source',
['field_order' => ($prevItem['field_order'] + 1)],
['id_gs' => $prevItem['id_gs']],
false
);
if ($resultItem !== false && $resultPrevItem !== false) {
db_process_sql_commit();
echo json_encode(['success' => true]);
return;
} else {
db_process_sql_rollback();
echo json_encode(['success' => false]);
return;
}
break;
case 'down':
if (($item['field_order'] + 1) > $total) {
echo json_encode(['success' => false]);
return;
}
$nextItem = db_get_row_sql(
'SELECT id_gs, field_order
FROM tgraph_source
WHERE id_graph = '.$idGraph.'
AND field_order = '.($item['field_order'] + 1).'
ORDER BY field_order'
);
db_process_sql_begin();
$resultItem = db_process_sql_update(
'tgraph_source',
['field_order' => ($item['field_order'] + 1)],
['id_gs' => $item['id_gs']],
false
);
$resultNextItem = db_process_sql_update(
'tgraph_source',
['field_order' => ($nextItem['field_order'] - 1)],
['id_gs' => $nextItem['id_gs']],
false
);
if ($resultItem !== false && $resultNextItem !== false) {
db_process_sql_commit();
echo json_encode(['success' => true]);
return;
} else {
db_process_sql_rollback();
echo json_encode(['success' => false]);
return;
}
break;
default:
echo json_encode(['success' => false]);
break;
}
}

View File

@ -816,8 +816,6 @@ function update_user(string $id_user, array $values)
$values['metaconsole_data_section'] = $values['data_section']; $values['metaconsole_data_section'] = $values['data_section'];
$values['metaconsole_default_event_filter'] = $values['default_event_filter']; $values['metaconsole_default_event_filter'] = $values['default_event_filter'];
unset($values['id_skin']); unset($values['id_skin']);
unset($values['section']);
unset($values['data_section']);
unset($values['default_event_filter']); unset($values['default_event_filter']);
} }
} }

View File

@ -928,7 +928,9 @@ class ConsoleSupervisor
false false
); );
if ($prev !== false if ($data['type'] === 'NOTIF.LOG.ALERT' && $prev !== false) {
return;
} else if ($prev !== false
&& (time() - $prev['timestamp']) > $max_age && (time() - $prev['timestamp']) > $max_age
) { ) {
// Clean previous notification. // Clean previous notification.

View File

@ -156,11 +156,14 @@ class WelcomeWindow extends Wizard
modal: { modal: {
title: "<?php echo __('Welcome to').' '.io_safe_output(get_product_name()); ?>", title: "<?php echo __('Welcome to').' '.io_safe_output(get_product_name()); ?>",
cancel: '<?php echo __('Do not show anymore'); ?>', cancel: '<?php echo __('Do not show anymore'); ?>',
ok: '<?php echo __('Close'); ?>' ok: '<?php echo __('Close wizard'); ?>',
overlay: true,
overlayExtraClass: 'welcome-overlay',
}, },
onshow: { onshow: {
page: '<?php echo $this->ajaxController; ?>', page: '<?php echo $this->ajaxController; ?>',
method: 'loadWelcomeWindow', method: 'loadWelcomeWindow',
width: 1000,
}, },
oncancel: { oncancel: {
page: '<?php echo $this->ajaxController; ?>', page: '<?php echo $this->ajaxController; ?>',
@ -178,6 +181,34 @@ class WelcomeWindow extends Wizard
} }
}) })
} }
},
onload: () => {
$(document).ready(function () {
var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix");
$(buttonpane).append(`
<div class="welcome-wizard-buttons">
<label>
<input type="checkbox" class="welcome-wizard-do-not-show" value="1" />
<?php echo __('Do not show anymore'); ?>
</label>
<button class="close-wizard-button"><?php echo __('Close wizard'); ?></button>
</div>
`);
var closeWizard = $("button.close-wizard-button");
$(closeWizard).click(function (e) {
var close = $("div[aria-describedby='welcome_modal_window'] button.sub.ok.submit-next.ui-button");
var cancel = $("div[aria-describedby='welcome_modal_window'] button.sub.upd.submit-cancel.ui-button");
var checkbox = $("div[aria-describedby='welcome_modal_window'] .welcome-wizard-do-not-show:checked").length;
if (checkbox === 1) {
$(cancel).click();
} else {
$(close).click()
}
});
});
} }
}); });
@ -412,11 +443,11 @@ class WelcomeWindow extends Wizard
$inputs[] = [ $inputs[] = [
'wrapper' => 'div', 'wrapper' => 'div',
'block_id' => 'div_diagnosis', 'block_id' => 'div_diagnosis',
'class' => 'flex-row flex-items-center w98p ', 'class' => 'flex-row flex-items-center ',
'direct' => 1, 'direct' => 1,
'block_content' => [ 'block_content' => [
[ [
'label' => __('Post-installation status diagnostic'), 'label' => __('This is your post-installation status diagnostic:'),
'arguments' => [ 'arguments' => [
'class' => 'first_lbl', 'class' => 'first_lbl',
'name' => 'lbl_diagnosis', 'name' => 'lbl_diagnosis',
@ -434,7 +465,7 @@ class WelcomeWindow extends Wizard
'direct' => 1, 'direct' => 1,
'block_content' => [ 'block_content' => [
[ [
'label' => __('Warp Update registration'), 'label' => '<span class="status"></span>'.__('Warp Update registration'),
'arguments' => [ 'arguments' => [
'class' => 'first_lbl', 'class' => 'first_lbl',
'name' => 'lbl_update_manager', 'name' => 'lbl_update_manager',
@ -443,7 +474,7 @@ class WelcomeWindow extends Wizard
], ],
[ [
'arguments' => [ 'arguments' => [
'label' => '', 'label' => __('Cancel'),
'type' => 'button', 'type' => 'button',
'attributes' => [ 'attributes' => [
'class' => (empty($btn_update_manager_class) === false) ? $btn_update_manager_class : 'invisible_important', 'class' => (empty($btn_update_manager_class) === false) ? $btn_update_manager_class : 'invisible_important',
@ -462,7 +493,7 @@ class WelcomeWindow extends Wizard
'direct' => 1, 'direct' => 1,
'block_content' => [ 'block_content' => [
[ [
'label' => __('Default mail to send alerts'), 'label' => '<span class="status"></span>'.__('Default mail to send alerts'),
'arguments' => [ 'arguments' => [
'class' => 'first_lbl', 'class' => 'first_lbl',
'name' => 'lbl_create_agent', 'name' => 'lbl_create_agent',
@ -471,7 +502,7 @@ class WelcomeWindow extends Wizard
], ],
[ [
'arguments' => [ 'arguments' => [
'label' => '', 'label' => __('Cancel'),
'type' => 'button', 'type' => 'button',
'attributes' => [ 'attributes' => [
'class' => (empty($btn_configure_mail_class) === false) ? $btn_configure_mail_class : 'invisible_important', 'class' => (empty($btn_configure_mail_class) === false) ? $btn_configure_mail_class : 'invisible_important',
@ -490,7 +521,7 @@ class WelcomeWindow extends Wizard
'direct' => 1, 'direct' => 1,
'block_content' => [ 'block_content' => [
[ [
'label' => __('All servers running'), 'label' => '<span class="status"></span>'.__('All servers running'),
'arguments' => [ 'arguments' => [
'class' => 'first_lbl', 'class' => 'first_lbl',
'name' => 'lbl_servers_up', 'name' => 'lbl_servers_up',
@ -499,7 +530,7 @@ class WelcomeWindow extends Wizard
], ],
[ [
'arguments' => [ 'arguments' => [
'label' => '', 'label' => __('Cancel'),
'type' => 'button', 'type' => 'button',
'attributes' => [ 'attributes' => [
'class' => (empty($btn_servers_up_class) === false) ? $btn_servers_up_class : 'invisible_important', 'class' => (empty($btn_servers_up_class) === false) ? $btn_servers_up_class : 'invisible_important',
@ -518,7 +549,7 @@ class WelcomeWindow extends Wizard
'direct' => 1, 'direct' => 1,
'block_content' => [ 'block_content' => [
[ [
'label' => __('Enterprise licence valid'), 'label' => '<span class="status"></span>'.__('Enterprise licence valid'),
'arguments' => [ 'arguments' => [
'class' => 'first_lbl', 'class' => 'first_lbl',
'name' => 'lbl_license_valid', 'name' => 'lbl_license_valid',
@ -527,7 +558,7 @@ class WelcomeWindow extends Wizard
], ],
[ [
'arguments' => [ 'arguments' => [
'label' => '', 'label' => __('Cancel'),
'type' => 'button', 'type' => 'button',
'attributes' => [ 'attributes' => [
'class' => (empty($btn_license_valid_class) === false) ? $btn_license_valid_class : 'invisible_important', 'class' => (empty($btn_license_valid_class) === false) ? $btn_license_valid_class : 'invisible_important',
@ -567,7 +598,7 @@ class WelcomeWindow extends Wizard
$inputs[] = [ $inputs[] = [
'wrapper' => 'div', 'wrapper' => 'div',
'block_id' => 'div_task_todo', 'block_id' => 'div_task_todo',
'class' => 'flex-row flex-items-center w98p', 'class' => 'flex-row flex-items-center',
'direct' => 1, 'direct' => 1,
'block_content' => [ 'block_content' => [
[ [
@ -591,7 +622,7 @@ class WelcomeWindow extends Wizard
$inputs[] = [ $inputs[] = [
'wrapper' => 'div', 'wrapper' => 'div',
'block_id' => 'div_wizard_agent', 'block_id' => 'div_wizard_agent',
'class' => 'flex space-between w98p', 'class' => 'flex space-between',
'direct' => 1, 'direct' => 1,
'block_content' => [ 'block_content' => [
[ [
@ -599,7 +630,7 @@ class WelcomeWindow extends Wizard
'type' => 'select', 'type' => 'select',
'fields' => $fields, 'fields' => $fields,
'name' => 'task_to_perform', 'name' => 'task_to_perform',
'selected' => '', 'selected' => 'check_net',
'return' => true, 'return' => true,
'nothing' => \__('Please select one'), 'nothing' => \__('Please select one'),
'nothing_value' => '', 'nothing_value' => '',
@ -630,6 +661,24 @@ class WelcomeWindow extends Wizard
$output .= $this->loadJS($flag_task); $output .= $this->loadJS($flag_task);
echo $output; echo $output;
echo '
<div class="welcome-wizard-right-content">
<ul class="welcome-circles">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<img src="images/welcome-wizard-image.png" />
</div>
';
?> ?>
<div id="dialog_goliat" class="invisible"> <div id="dialog_goliat" class="invisible">
<?php <?php

View File

@ -20,7 +20,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC240108'; $build_version = 'PC240118';
$pandora_version = 'v7.0NG.775'; $pandora_version = 'v7.0NG.775';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.

View File

@ -1318,7 +1318,7 @@ function events_get_all(
if ($tags[0] === $id_tag) { if ($tags[0] === $id_tag) {
$_tmp .= ' AND (( '; $_tmp .= ' AND (( ';
} else { } else {
$_tmp .= ' OR ( '; $_tmp .= ' AND ( ';
} }
$_tmp .= sprintf( $_tmp .= sprintf(
@ -1969,7 +1969,7 @@ function events_get_all(
// -1 For pagination 'All'. // -1 For pagination 'All'.
((int) $limit === -1) ((int) $limit === -1)
? $end = count($data) ? $end = count($data)
: $end = ((int) $offset !== 0) ? ($offset + $limit) : $limit; : $end = $limit;
$finally = array_slice($data, $offset, $end, true); $finally = array_slice($data, $offset, $end, true);
$return = [ $return = [
'buffers' => $buffers, 'buffers' => $buffers,

View File

@ -774,7 +774,8 @@ function html_print_select(
$select2_multiple_enable_all=false, $select2_multiple_enable_all=false,
$form='', $form='',
$order=false, $order=false,
$custom_id=null $custom_id=null,
$placeholder='',
) { ) {
$output = "\n"; $output = "\n";
@ -1013,7 +1014,8 @@ function html_print_select(
$output .= '<script type="text/javascript">'; $output .= '<script type="text/javascript">';
$output .= '$("#'.$id.'").select2({ $output .= '$("#'.$id.'").select2({
closeOnSelect: '.(($select2_multiple_enable === true) ? 'false' : 'true').' closeOnSelect: '.(($select2_multiple_enable === true) ? 'false' : 'true').',
placeholder: "'.$placeholder.'",
});'; });';
if ($required !== false) { if ($required !== false) {
@ -1758,6 +1760,7 @@ function html_print_select_multiple_modules_filtered(array $data):string
'multiple' => true, 'multiple' => true,
'style' => 'min-width: 200px;max-width:200px;', 'style' => 'min-width: 200px;max-width:200px;',
'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '',
] ]
); );
} else { } else {
@ -1773,6 +1776,7 @@ function html_print_select_multiple_modules_filtered(array $data):string
'multiple' => true, 'multiple' => true,
'style' => 'min-width: 200px;max-width:200px;', 'style' => 'min-width: 200px;max-width:200px;',
'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '',
] ]
); );
} }
@ -1888,7 +1892,8 @@ function html_print_select_from_sql(
$size=false, $size=false,
$truncate_size=GENERIC_SIZE_TEXT, $truncate_size=GENERIC_SIZE_TEXT,
$class='', $class='',
$required=false $required=false,
$placeholder='',
) { ) {
global $config; global $config;
@ -1931,7 +1936,12 @@ function html_print_select_from_sql(
$required, $required,
$truncate_size, $truncate_size,
true, true,
true true,
false,
'',
false,
null,
$placeholder
); );
} }
@ -5680,7 +5690,9 @@ function html_print_input($data, $wrapper='div', $input_only=false)
((isset($data['select2_multiple_enable']) === true) ? $data['select2_multiple_enable'] : false), ((isset($data['select2_multiple_enable']) === true) ? $data['select2_multiple_enable'] : false),
((isset($data['select2_multiple_enable_all']) === true) ? $data['select2_multiple_enable_all'] : false), ((isset($data['select2_multiple_enable_all']) === true) ? $data['select2_multiple_enable_all'] : false),
((isset($data['form']) === true) ? $data['form'] : ''), ((isset($data['form']) === true) ? $data['form'] : ''),
((isset($data['order']) === true) ? $data['order'] : false) ((isset($data['order']) === true) ? $data['order'] : false),
((isset($data['custom_id']) === true) ? $data['custom_id'] : null),
((isset($data['placeholder']) === true) ? $data['placeholder'] : null),
); );
break; break;
@ -5700,7 +5712,8 @@ function html_print_input($data, $wrapper='div', $input_only=false)
((isset($data['size']) === true) ? $data['size'] : false), ((isset($data['size']) === true) ? $data['size'] : false),
((isset($data['trucate_size']) === true) ? $data['trucate_size'] : GENERIC_SIZE_TEXT), ((isset($data['trucate_size']) === true) ? $data['trucate_size'] : GENERIC_SIZE_TEXT),
((isset($data['class']) === true) ? $data['class'] : ''), ((isset($data['class']) === true) ? $data['class'] : ''),
((isset($data['required']) === true) ? $data['required'] : false) ((isset($data['required']) === true) ? $data['required'] : false),
((isset($data['placeholder']) === true) ? $data['placeholder'] : null),
); );
break; break;

View File

@ -923,40 +923,7 @@ if (is_ajax()) {
); );
} }
$image_about = ui_get_full_url('/images/custom_logo/logo-default-pandorafms.png', false, false, false); $image_about = ui_get_full_url('/images/custom_logo/logo-default-pandorafms-collapsed.svg', false, false, false);
if (enterprise_installed() === false) {
if ($config['style'] === 'pandora_black') {
$image_about = 'images/custom_logo/'.HEADER_LOGO_BLACK_CLASSIC;
} else if ($config['style'] === 'pandora') {
$image_about = 'images/custom_logo/'.HEADER_LOGO_DEFAULT_CLASSIC;
}
} else {
if ($config['style'] === 'pandora_black' && $config['custom_logo'] === HEADER_LOGO_DEFAULT_CLASSIC) {
$config['custom_logo'] = HEADER_LOGO_BLACK_CLASSIC;
} else if ($config['style'] === 'pandora' && $config['custom_logo'] === HEADER_LOGO_BLACK_CLASSIC) {
$config['custom_logo'] = HEADER_LOGO_DEFAULT_CLASSIC;
}
$image_about = 'images/custom_logo/'.$config['custom_logo'];
if (file_exists(ENTERPRISE_DIR.'/'.$image_about) === true) {
$image_about = ENTERPRISE_DIR.'/'.$image_about;
}
}
if (is_metaconsole() === true) {
$image_about = ui_get_full_url('/enterprise/images/custom_logo/pandoraFMS_metaconsole_full.svg', false, false, false);
if ($config['meta_custom_logo'] === 'pandoraFMS_metaconsole_full.svg') {
$image_about = 'images/custom_logo/'.$config['meta_custom_logo'];
} else {
$image_about = '../images/custom_logo/'.$config['meta_custom_logo'];
}
if (file_exists(ENTERPRISE_DIR.'/'.$image_about) === true) {
$image_about = $image_about;
}
}
$dialog = ' $dialog = '
<div id="about-tabs" class="invisible overflow-hidden"> <div id="about-tabs" class="invisible overflow-hidden">
@ -977,8 +944,8 @@ if (is_ajax()) {
<tbody> <tbody>
<tr> <tr>
<th style="width: 40%; border: 0px;"> <th style="width: 40%; border: 0px;">
<a href="https://pandorafms.com/" target="_blank"> <a href="https://pandorafms.com/" target="_blank" class="header_center">
<img src="'.$image_about.'" alt="logo" width="70%"> <img src="'.$image_about.'" alt="logo" width="50%">
</a> </a>
</th> </th>
<th style="width: 60%; text-align: left; border: 0px;"> <th style="width: 60%; text-align: left; border: 0px;">
@ -1290,42 +1257,7 @@ if (is_ajax()) {
$lts_name = ' <i>'.$config['lts_name'].'</i>'; $lts_name = ' <i>'.$config['lts_name'].'</i>';
} }
$image_about = ui_get_full_url('/images/custom_logo/logo-default-pandorafms.png', false, false, false); $image_about = ui_get_full_url('/images/custom_logo/logo-default-pandorafms-collapsed.svg', false, false, false);
if (enterprise_installed() === false) {
if ($config['style'] === 'pandora_black') {
$image_about = 'images/custom_logo/'.HEADER_LOGO_BLACK_CLASSIC;
} else if ($config['style'] === 'pandora') {
$image_about = 'images/custom_logo/'.HEADER_LOGO_DEFAULT_CLASSIC;
}
} else {
if ($config['style'] === 'pandora_black' && $config['custom_logo'] === HEADER_LOGO_DEFAULT_CLASSIC) {
$config['custom_logo'] = HEADER_LOGO_BLACK_CLASSIC;
} else if ($config['style'] === 'pandora' && $config['custom_logo'] === HEADER_LOGO_BLACK_CLASSIC) {
$config['custom_logo'] = HEADER_LOGO_DEFAULT_CLASSIC;
}
$image_about = 'images/custom_logo/'.$config['custom_logo'];
if (file_exists(ENTERPRISE_DIR.'/'.$image_about) === true) {
$image_about = ENTERPRISE_DIR.'/'.$image_about;
}
}
if (is_metaconsole() === true) {
$image_about = ui_get_full_url('/enterprise/images/custom_logo/pandoraFMS_metaconsole_full.svg', false, false, false);
if ($config['meta_custom_logo'] === 'pandoraFMS_metaconsole_full.svg') {
$image_about = 'images/custom_logo/'.$config['meta_custom_logo'];
} else {
$image_about = '../images/custom_logo/'.$config['meta_custom_logo'];
}
if (file_exists(ENTERPRISE_DIR.'/'.$image_about) === true) {
$image_about = $image_about;
}
}
$dialog = ' $dialog = '
<div id="about-tabs" class="invisible overflow-hidden"> <div id="about-tabs" class="invisible overflow-hidden">
<ul> <ul>
@ -1339,7 +1271,7 @@ if (is_ajax()) {
<tr> <tr>
<th style="width: 40%; border: 0px;"> <th style="width: 40%; border: 0px;">
<a href="javascript:christmas_click('.$config['eastern_eggs_disabled'].')"> <a href="javascript:christmas_click('.$config['eastern_eggs_disabled'].')">
<img src="'.$image_about.'" alt="logo" width="70%"> <img src="'.$image_about.'" alt="logo" width="50%">
<input id="count_click" type="hidden" value="0" /> <input id="count_click" type="hidden" value="0" />
</a> </a>
</th> </th>

View File

@ -636,13 +636,15 @@ function notifications_get_user_label_status($source, $user, $label)
); );
// Clean default common groups error for mesagges. // Clean default common groups error for mesagges.
$group_enable = true;
if ($common_groups[0] === 0) { if ($common_groups[0] === 0) {
unset($common_groups[0]); unset($common_groups[0]);
$group_enable = false;
} }
// No group found, return no permissions. // No group found, return no permissions.
$value = empty($common_groups) ? false : $source[$label]; $value = empty($common_groups) ? false : $source[$label];
return notifications_build_user_enable_return($value, false); return notifications_build_user_enable_return($value, $group_enable);
} }
@ -674,14 +676,34 @@ function notifications_set_user_label_status($source, $user, $label, $value)
return false; return false;
} }
return (bool) db_process_sql_update( $exists = db_process_sql(sprintf('SELECT * FROM tnotification_source_user WHERE id_user = "%s" AND id_source = "%s"', $user, $source));
'tnotification_source_user', if (empty($exists['enabled']) && empty($exists['also_mail'])) {
[$label => $value], $sql = sprintf('DELETE FROM tnotification_source_user WHERE id_user = "%s" AND id_source = "%s"', $user, $source);
[ db_process_sql($sql);
'id_user' => $user, $exists = false;
'id_source' => $source, }
]
); if ($exists === false) {
db_process_sql_insert(
'tnotification_source_user',
[
'id_user' => $user,
'id_source' => $source,
'enabled' => '1',
'also_mail' => '1',
]
);
return true;
} else {
return (bool) db_process_sql_update(
'tnotification_source_user',
[$label => $value],
[
'id_user' => $user,
'id_source' => $source,
]
);
}
} }
@ -1137,6 +1159,15 @@ function notifications_print_dropdown()
$mess = []; $mess = [];
} }
$redirection_notifications = html_print_menu_button(
[
'href' => 'javascript:',
'class' => 'notification_menu_actions',
'text' => __('View all messages'),
'onClick' => "window.location='".ui_get_full_url('index.php?sec=message_list&sec2=operation/messages/message_list')."'",
],
true
);
$notification_menu = html_print_menu_button( $notification_menu = html_print_menu_button(
[ [
'href' => 'javascript:', 'href' => 'javascript:',
@ -1154,6 +1185,7 @@ function notifications_print_dropdown()
<div class='notificaion_menu_container'> <div class='notificaion_menu_container'>
<div class='menu_tab filter_notification'>%s</div> <div class='menu_tab filter_notification'>%s</div>
<div class='menu_tab notification_menu'>%s</div> <div class='menu_tab notification_menu'>%s</div>
<div class='menu_tab notification_menu'>%s</div>
</div> </div>
%s %s
</div> </div>
@ -1166,6 +1198,7 @@ function notifications_print_dropdown()
", ",
$notification_filter, $notification_filter,
$notification_menu, $notification_menu,
$redirection_notifications,
array_reduce( array_reduce(
$mess, $mess,
function ($carry, $message) { function ($carry, $message) {

View File

@ -806,6 +806,10 @@ function edit_node(data_node, dblClick) {
var flag_edit_node = true; var flag_edit_node = true;
var edit_node = null; var edit_node = null;
if (networkmap_write === 0) {
return false;
}
//Only select one node //Only select one node
var selection = d3_nm.selectAll(".node_selected"); var selection = d3_nm.selectAll(".node_selected");
var id; var id;
@ -1950,6 +1954,10 @@ function init_minimap() {
// Context menu // Context menu
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
function show_menu(item, data) { function show_menu(item, data) {
if (networkmap_write === 0) {
return false;
}
mouse = []; mouse = [];
mouse[0] = d3_nm.event.pageX; mouse[0] = d3_nm.event.pageX;
mouse[1] = d3_nm.event.pageY; mouse[1] = d3_nm.event.pageY;
@ -2819,6 +2827,10 @@ function cancel_set_parent() {
// OWN CODE FOR TO DRAG // OWN CODE FOR TO DRAG
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
function init_drag_and_drop() { function init_drag_and_drop() {
if (networkmap_write === 0) {
return false;
}
window.dragables = svg.selectAll(".dragable_node"); window.dragables = svg.selectAll(".dragable_node");
window.drag_start = [0, 0]; window.drag_start = [0, 0];

View File

@ -2366,7 +2366,7 @@ $(document).ready(function() {
// Hidden tips modal. // Hidden tips modal.
$(".window").css("display", "none"); $(".window").css("display", "none");
var type_about = "about_operation"; var type_about = "about";
if ($(this).attr("id") === "icon_about") { if ($(this).attr("id") === "icon_about") {
type_about = "about"; type_about = "about";
} }

View File

@ -8,7 +8,8 @@ function show_option_dialog(settings) {
modal: { modal: {
title: settings.title, title: settings.title,
cancel: settings.btn_cancel, cancel: settings.btn_cancel,
ok: settings.btn_text ok: settings.btn_text,
overlay: true
}, },
onshow: { onshow: {
page: settings.url, page: settings.url,
@ -22,6 +23,12 @@ function show_option_dialog(settings) {
method: "updateDashboard", method: "updateDashboard",
dataType: "json" dataType: "json"
}, },
oncancel: {
reload: true
},
onclose: {
reload: true
},
ajax_callback: update_dashboard ajax_callback: update_dashboard
}); });
} }
@ -458,6 +465,12 @@ function initialiceLayout(data) {
}*/ }*/
function configurationWidget(cellId, widgetId, size) { function configurationWidget(cellId, widgetId, size) {
var reload = 0;
var overlay = false;
if (widgetId == 46) {
reload = 1;
overlay = true;
}
title = $("#hidden-widget_name_" + cellId).val(); title = $("#hidden-widget_name_" + cellId).val();
load_modal({ load_modal({
target: $("#modal-config-widget"), target: $("#modal-config-widget"),
@ -466,7 +479,8 @@ function initialiceLayout(data) {
modal: { modal: {
title: "Configure widget " + title, title: "Configure widget " + title,
cancel: "Cancel", cancel: "Cancel",
ok: "Ok" ok: "Ok",
overlay: overlay
}, },
onshow: { onshow: {
page: data.page, page: data.page,
@ -484,8 +498,12 @@ function initialiceLayout(data) {
method: "saveWidgetIntoCell", method: "saveWidgetIntoCell",
dataType: "json" dataType: "json"
}, },
oncancel: {
reload: reload
},
ajax_callback: update_widget_to_cell, ajax_callback: update_widget_to_cell,
onsubmitClose: 1 onsubmitClose: 1,
onsubmitReload: reload
}); });
} }
@ -528,7 +546,7 @@ function initialiceLayout(data) {
$(".add-widget").show(); $(".add-widget").show();
$(".new-widget-message").hide(); $(".new-widget-message").hide();
$("#container-layout").addClass("container-layout"); $("#container-layout").addClass("container-layout");
$("#add-widget").removeClass("invisible"); $("#add-widget").removeClass("invisible_important");
} else { } else {
grid.movable(".grid-stack-item", false); grid.movable(".grid-stack-item", false);
grid.resizable(".grid-stack-item", false); grid.resizable(".grid-stack-item", false);
@ -537,7 +555,7 @@ function initialiceLayout(data) {
$(".add-widget").hide(); $(".add-widget").hide();
$(".new-widget-message").show(); $(".new-widget-message").show();
$("#container-layout").removeClass("container-layout"); $("#container-layout").removeClass("container-layout");
$("#add-widget").addClass("invisible"); $("#add-widget").addClass("invisible_important");
} }
}); });

View File

@ -105,7 +105,16 @@ function load_modal(settings) {
} }
if (settings.modal.overlay === true) { if (settings.modal.overlay === true) {
$("body").append("<div id='modal_overlay'class='ui-widget-overlay'></div>"); var extraClass = "";
if (typeof settings.modal.overlayExtraClass !== "undefined") {
extraClass = " " + settings.modal.overlayExtraClass;
}
$("body").append(
"<div id='modal_overlay'class='ui-widget-overlay" +
extraClass +
"'></div>"
);
} }
if (settings.beforeClose == undefined) { if (settings.beforeClose == undefined) {
@ -165,6 +174,8 @@ function load_modal(settings) {
if (typeof settings.oncancel.confirm == "function") { if (typeof settings.oncancel.confirm == "function") {
//receive function //receive function
settings.oncancel.confirm(cancelModal); settings.oncancel.confirm(cancelModal);
} else if (settings.oncancel.reload == true) {
location.reload();
} else if (settings.oncancel != undefined) { } else if (settings.oncancel != undefined) {
cancelModal(); cancelModal();
} }
@ -344,6 +355,13 @@ function load_modal(settings) {
AJAX_RUNNING = 0; AJAX_RUNNING = 0;
} }
}); });
if (
settings.onsubmitReload != undefined &&
settings.onsubmitReload == true
) {
location.reload();
}
} else { } else {
AJAX_RUNNING = 0; AJAX_RUNNING = 0;
} }

View File

@ -1056,6 +1056,7 @@ class Manager implements PublicLogin
'name' => $name, 'name' => $name,
'id_user' => $id_user, 'id_user' => $id_user,
'id_group' => $id_group, 'id_group' => $id_group,
'cells' => 1,
'cells_slideshow' => $slideshow, 'cells_slideshow' => $slideshow,
'active' => $favourite, 'active' => $favourite,
'date_range' => $dateRange, 'date_range' => $dateRange,
@ -1367,6 +1368,7 @@ class Manager implements PublicLogin
global $config; global $config;
$items = \get_parameter('items', []); $items = \get_parameter('items', []);
$totalCells = 0;
// Class Dashboard. // Class Dashboard.
if (empty($items) === false) { if (empty($items) === false) {
@ -1398,8 +1400,15 @@ class Manager implements PublicLogin
return false; return false;
} }
} }
if (is_array($items) === true) {
$totalCells = count($items);
}
} }
$values = ['cells' => $totalCells];
$this->put($values);
echo json_encode($result); echo json_encode($result);
} }

View File

@ -246,6 +246,10 @@ class EventsListWidget extends Widget
$values['groupRecursion'] = $decoder['groupRecursion']; $values['groupRecursion'] = $decoder['groupRecursion'];
} }
if (isset($decoder['secondaryGroup']) === true) {
$values['secondaryGroup'] = $decoder['secondaryGroup'];
}
if (isset($decoder['customFilter']) === true) { if (isset($decoder['customFilter']) === true) {
$values['customFilter'] = $decoder['customFilter']; $values['customFilter'] = $decoder['customFilter'];
} }
@ -456,6 +460,18 @@ class EventsListWidget extends Widget
], ],
]; ];
// Secondary group.
$inputs['inputs']['row2'][] = [
'label' => \__('Secondary group'),
'arguments' => [
'type' => 'switch',
'name' => 'secondaryGroup',
'class' => 'event-widget-input',
'value' => $values['secondaryGroup'],
'return' => true,
],
];
// Group recursion. // Group recursion.
$inputs['inputs']['row2'][] = [ $inputs['inputs']['row2'][] = [
'label' => \__('Group recursion'), 'label' => \__('Group recursion'),
@ -537,6 +553,7 @@ class EventsListWidget extends Widget
$values['groupId'] = \get_parameter_switch('groupId', []); $values['groupId'] = \get_parameter_switch('groupId', []);
$values['tagsId'] = \get_parameter_switch('tagsId', []); $values['tagsId'] = \get_parameter_switch('tagsId', []);
$values['groupRecursion'] = \get_parameter_switch('groupRecursion', 0); $values['groupRecursion'] = \get_parameter_switch('groupRecursion', 0);
$values['secondaryGroup'] = \get_parameter('secondaryGroup', 0);
$values['customFilter'] = \get_parameter('customFilter', -1); $values['customFilter'] = \get_parameter('customFilter', -1);
$values['columns_events_widget'] = \get_parameter('columns_events_widget', []); $values['columns_events_widget'] = \get_parameter('columns_events_widget', []);
@ -721,6 +738,7 @@ class EventsListWidget extends Widget
$this->values['limit'] = $config['block_size']; $this->values['limit'] = $config['block_size'];
} }
$filter['search_secondary_groups'] = $this->values['secondaryGroup'];
// Print datatable. // Print datatable.
$output .= ui_print_datatable( $output .= ui_print_datatable(
[ [

View File

@ -293,6 +293,8 @@ class GroupsStatusWidget extends Widget
(bool) $this->values['groupRecursion'] (bool) $this->values['groupRecursion']
); );
$style = 'min-width:200px; min-height:460px;';
$data = '<div class="widget-groups-status"><span>'; $data = '<div class="widget-groups-status"><span>';
$data .= ui_print_group_icon( $data .= ui_print_group_icon(
$this->values['groupId'], $this->values['groupId'],
@ -541,9 +543,9 @@ class GroupsStatusWidget extends Widget
$table->data[1][0] = __('Not agents in this group'); $table->data[1][0] = __('Not agents in this group');
$data .= html_print_table($table, true); $data .= html_print_table($table, true);
$data .= '</div>'; $data .= '</div>';
$style .= 'justify-content: start; margin-top: 20px';
} }
$style = 'min-width:200px; min-height:460px;';
$output = '<div class="container-center" style="'.$style.'">'; $output = '<div class="container-center" style="'.$style.'">';
$output .= $data; $output .= $data;
$output .= '</div>'; $output .= '</div>';

View File

@ -177,6 +177,9 @@ class InventoryWidget extends Widget
// Must be configured before using. // Must be configured before using.
$this->configurationRequired = false; $this->configurationRequired = false;
if (isset($this->values['idGroup']) === false) {
$this->configurationRequired = true;
}
} }
@ -296,9 +299,12 @@ class InventoryWidget extends Widget
]; ];
$fields = []; $fields = [];
array_unshift($fields, __('All')); array_unshift($fields, __('All'));
if (isset($values['inventoryModuleId']) === false) {
$values['inventoryModuleId'] = 0;
}
$inputs[] = [ $inputs[] = [
'label' => __('Module'), 'label' => __('Module'),
'arguments' => [ 'arguments' => [
@ -316,31 +322,6 @@ class InventoryWidget extends Widget
], ],
]; ];
// Agent select.
if ($is_metaconsole === false) {
$agents = [];
$sql = 'SELECT id_agente, nombre FROM tagente';
if ($inventory_id_group > 0) {
$sql .= ' WHERE id_grupo = '.$inventory_id_group;
} else {
$user_groups = implode(',', array_keys(users_get_groups($config['id_user'])));
// Avoid errors if there are no groups.
if (empty($user_groups) === true) {
$user_groups = '"0"';
}
$sql .= ' WHERE id_grupo IN ('.$user_groups.')';
}
$result = db_get_all_rows_sql($sql);
if ($result) {
foreach ($result as $row) {
$agents[$row['id_agente']] = $row['nombre'];
}
}
}
// Date filter. // Date filter.
if (is_metaconsole() === false) { if (is_metaconsole() === false) {
$inputs[] = [ $inputs[] = [

View File

@ -274,9 +274,9 @@ class SecurityHardening extends Widget
'name' => 'range', 'name' => 'range',
'type' => 'date_range', 'type' => 'date_range',
'selected' => 'chose_range', 'selected' => 'chose_range',
'date_init' => date('Y-m-d', $values['date_init']), 'date_init' => date('Y/m/d', $values['date_init']),
'time_init' => date('H:i:s', $values['date_init']), 'time_init' => date('H:i:s', $values['date_init']),
'date_end' => date('Y-m-d', $values['date_end']), 'date_end' => date('Y/m/d', $values['date_end']),
'time_end' => date('H:i:s', $values['date_end']), 'time_end' => date('H:i:s', $values['date_end']),
'return' => true, 'return' => true,
], ],

View File

@ -0,0 +1,16 @@
#div-filtered-module-group-modules,
#div-filtered-module-module-group-modules,
#div-filtered-module-agents-modules,
#div-filtered-module-modules-modules {
width: 37% !important;
}
#div-filtered-module-modules-modules select {
width: 100% !important;
max-width: 100% !important;
}
#select_multiple_modules_filtered > div > div > .select2 {
width: 100% !important;
}
#select_multiple_modules_filtered > div {
flex-wrap: nowrap !important;
}

View File

@ -544,7 +544,7 @@ div#main_pure:has(.events-pure) {
margin-bottom: 50px !important; margin-bottom: 50px !important;
} }
div#sunburst > svg { #main > #container_servicemap > div#sunburst > svg {
width: 750px; width: 750px;
height: 750px; height: 750px;
} }

View File

@ -80,7 +80,7 @@
} }
#welcome_form li.hole { #welcome_form li.hole {
margin-bottom: 0.8em; margin-bottom: 10px;
} }
#welcome_form li.extra { #welcome_form li.extra {
@ -98,17 +98,424 @@
font-weight: bold; font-weight: bold;
} }
button.buttonButton.onlyIcon.fail,
button.submitButton.onlyIcon.fail {
mask: url(../../images/fail@svg.svg) no-repeat center / contain;
-webkit-mask: url(../../images/fail@svg.svg) no-repeat center / contain;
}
.select2-container .select2-container--default .select2-container--open { .select2-container .select2-container--default .select2-container--open {
z-index: 2000; z-index: 2000;
} }
#div_wizard_agent > .select2 { .ui-widget-overlay.welcome-overlay {
width: 75% !important; background-color: rgba(19, 23, 39, 0.8) !important;
max-width: 75% !important; opacity: 1 !important;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"] {
background-color: #131727;
border-radius: 8px !important;
border: 0;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"] * {
color: #fff;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"]
.ui-dialog-titlebar {
margin: 0;
padding-top: 25px;
padding-bottom: 0px;
padding-left: 20px;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"]
.ui-dialog-title {
font-size: 40px;
line-height: 48px;
margin: 0;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"]
.ui-dialog-titlebar-close {
background-color: #95a3bf !important;
right: 20px !important;
}
div#welcome_modal_window {
padding: 0px 0px 0px 20px;
display: flex !important;
flex-direction: row;
flex-wrap: nowrap;
align-items: flex-end;
justify-content: space-between;
}
div#welcome_modal_window[style=""] {
display: none !important;
}
div#welcome_modal_window .wizard * {
font-weight: bold;
}
div#welcome_modal_window .wizard li#li-div_diagnosis,
div#welcome_modal_window .wizard li#li-div_task_todo,
div#welcome_modal_window .wizard li#li-div_wizard_agent {
padding-left: 0;
}
/* div#welcome_modal_window .wizard li#li-div_diagnosis {
top: 0;
position: absolute;
} */
div#welcome_modal_window .wizard li#li-div_diagnosis label {
font-size: 17px;
line-height: 20px;
color: #c1ccdc;
padding: 20px 0px;
font-weight: normal;
}
div#welcome_modal_window
.wizard
li:not(:nth-child(1)):not(:nth-last-child(1)):not(:nth-last-child(2)) {
padding: 14px 15px;
box-sizing: border-box;
background-color: rgba(0, 0, 0, 0.2);
border: 1px solid #c1ccdc;
border-radius: 6px;
width: 480px;
height: 50px;
}
div#welcome_modal_window
.wizard
li:not(:nth-child(1)):not(:nth-last-child(1)):not(:nth-last-child(2))
label {
font-size: 17px;
line-height: 20px;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
}
div#welcome_modal_window
.wizard
li:not(:nth-child(1)):not(:nth-last-child(1)):not(:nth-last-child(2))
label {
font-size: 17px;
line-height: 20px;
font-weight: normal;
}
div#welcome_modal_window .wizard .status {
background-color: #c1ccdc;
opacity: 0.2;
display: block;
width: 20px;
height: 20px;
margin-right: 15px;
border-radius: 14px / 7px;
}
div#welcome_modal_window .wizard li.row_green .status {
background-color: #82b92e;
opacity: 1;
}
div#welcome_modal_window .wizard .fail.onlyIcon.buttonButton {
background-color: unset;
width: unset !important;
}
div#welcome_modal_window .wizard .fail.onlyIcon.buttonButton span {
color: #26b1b5;
font-size: 15px;
line-height: 20px;
}
div#welcome_modal_window .wizard .fail.onlyIcon.buttonButton:hover span {
color: #3bdce1;
}
div#welcome_modal_window .wizard #li-div_all_correct {
height: 100%;
margin-bottom: 145px;
}
div#welcome_modal_window .wizard #li-div_all_correct * {
font-size: 10pt;
}
div#welcome_modal_window .wizard #li-div_task_todo {
padding-bottom: 2px;
}
div#welcome_modal_window .wizard #li-div_task_todo label {
font-size: 13px;
line-height: 16px;
color: #c1ccdc;
}
div#welcome_modal_window .wizard #li-div_wizard_agent {
width: 480px;
}
div#welcome_modal_window .wizard #li-div_wizard_agent > div {
width: 100%;
}
div#welcome_modal_window .wizard #li-div_wizard_agent .select2-selection {
background-color: #f6f7fb !important;
border: 1px solid #c0ccdc !important;
border-radius: 6px !important;
width: 290px;
height: 42px !important;
font-weight: normal !important;
}
div#welcome_modal_window .wizard #li-div_wizard_agent .select2 {
width: 290px !important;
}
div#welcome_modal_window
.wizard
#li-div_wizard_agent
.select2-selection
.select2-selection__rendered {
font-weight: normal !important;
line-height: 38px !important;
}
div#welcome_modal_window .wizard #button-go_wizard {
background-color: #82b92e;
border: 0;
border-radius: 8px;
padding-top: 11px;
padding-bottom: 11px;
padding-left: 38px;
height: 42px;
width: 175px;
}
div#welcome_modal_window .wizard #button-go_wizard:hover {
background-color: #8ac531;
}
div#welcome_modal_window .wizard #button-go_wizard span {
font-size: 15px;
line-height: 20px;
text-wrap: nowrap;
}
div#welcome_modal_window .wizard #button-go_wizard div.next {
mask: url(../../images/check-white.svg) no-repeat center / contain;
-webkit-mask: url(../../images/check-white.svg) no-repeat center / contain;
background-color: #fff !important;
height: 12px;
margin-left: 12px;
margin-right: 20px;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"]
.ui-dialog-buttonpane.ui-widget-content {
background-color: #131727;
padding: 10px 10px 10px 20px !important;
margin: 0;
border-top: 1px solid #8190ad;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"]
.ui-dialog-buttonpane.ui-widget-content
.ui-dialog-buttonset {
justify-content: space-between;
display: none;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"]
.welcome-wizard-buttons,
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"]
.welcome-wizard-buttons
label {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
flex-wrap: nowrap;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"]
.welcome-wizard-buttons
label {
font-size: 15px;
line-height: 18px;
cursor: pointer;
font-weight: normal;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"]
.welcome-wizard-buttons
label
input[type="checkbox"] {
margin-right: 10px;
width: 20px;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"]
.ui-dialog-buttonpane.ui-widget-content
.ui-dialog-buttonset {
justify-content: space-between;
display: none;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"]
.ui-dialog-buttonpane.ui-widget-content
button {
background-color: #313b62;
box-shadow: none;
border: 0;
border-radius: 8px;
height: 42px;
width: unset;
padding: 10px 20px;
font-size: 15px;
line-height: 20px;
font-weight: bold;
margin: 0;
}
div.ui-widget.ui-widget-content[aria-describedby="welcome_modal_window"]
.ui-dialog-buttonpane.ui-widget-content
button:hover {
background-color: #384372;
}
.welcome-wizard-right-content {
background-image: linear-gradient(225deg, #731dd8 0%, #2eb9b8 100%);
border-radius: 100px 0 0;
width: 432px;
height: 375px;
margin-bottom: 8px;
}
.welcome-wizard-right-content img {
width: 348px;
height: 260px;
position: absolute;
right: 43px;
bottom: 65px;
filter: drop-shadow(0 0 10px #0000005b);
}
/* Background bubbles */
.welcome-circles {
overflow: hidden;
position: absolute;
right: 0;
position: absolute;
bottom: 8px;
width: 430px;
height: 373px;
overflow: hidden;
border-top-left-radius: 100px;
}
.welcome-circles li {
position: absolute;
display: block;
list-style: none;
width: 20px;
height: 20px;
background: rgba(255, 255, 255, 0.2);
animation: animate 10s linear infinite;
bottom: -150px;
}
.welcome-circles li:nth-child(1) {
left: 25%;
width: 10px;
height: 10px;
animation-delay: 0s;
}
.welcome-circles li:nth-child(2) {
left: 10%;
width: 20px;
height: 20px;
animation-delay: 2s;
animation-duration: 12s;
}
.welcome-circles li:nth-child(3) {
left: 70%;
width: 15px;
height: 15px;
animation-delay: 4s;
}
.welcome-circles li:nth-child(4) {
left: 40%;
width: 60px;
height: 60px;
animation-delay: 3s;
animation-duration: 6s;
}
.welcome-circles li:nth-child(5) {
left: 65%;
width: 15px;
height: 15px;
animation-delay: 0s;
}
.welcome-circles li:nth-child(6) {
left: 75%;
width: 30px;
height: 30px;
animation-delay: 3s;
}
.welcome-circles li:nth-child(7) {
left: 35%;
width: 50px;
height: 50px;
animation-delay: 7s;
}
.welcome-circles li:nth-child(8) {
left: 50%;
width: 25px;
height: 25px;
animation-delay: 15s;
animation-duration: 45s;
}
.welcome-circles li:nth-child(9) {
left: 20%;
width: 15px;
height: 15px;
animation-delay: 2s;
animation-duration: 35s;
}
.welcome-circles li:nth-child(10) {
left: 85%;
width: 50px;
height: 50px;
animation-delay: 0s;
animation-duration: 11s;
}
@keyframes animate {
0% {
transform: translateY(0) rotate(0deg);
opacity: 1;
border-radius: 0;
}
100% {
transform: translateY(-1000px) rotate(720deg);
opacity: 0;
border-radius: 50%;
}
} }

View File

@ -12062,6 +12062,10 @@ div.relative > div > div#ui-datepicker-div {
left: 5px !important; left: 5px !important;
} }
#ui-datepicker-div .ui-datepicker-header {
background-color: white;
}
.ui-widget-overlay { .ui-widget-overlay {
background: #aaa; background: #aaa;
opacity: 0.3 !important; opacity: 0.3 !important;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -130,8 +130,8 @@
</div> </div>
<div style='padding-bottom: 50px'> <div style='padding-bottom: 50px'>
<?php <?php
$version = '7.0NG.775'; $version = '7.0NG.774';
$build = '240108'; $build = '231213';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -1061,19 +1061,20 @@ $buttons .= html_print_button(
], ],
true true
); );
if (check_acl($config['id_user'], 0, 'AW')) {
$buttons .= html_print_button( $buttons .= html_print_button(
__('Manage filter'), __('Manage filter'),
'save-filter', 'save-filter',
false, false,
'', '',
[ [
'icon' => 'wand', 'icon' => 'wand',
'mode' => 'mini secondary', 'mode' => 'mini secondary',
'class' => 'float-left margin-right-2 sub wand', 'class' => 'float-left margin-right-2 sub wand',
], ],
true true
); );
}
$filters .= html_print_div( $filters .= html_print_div(
[ [

View File

@ -33,7 +33,7 @@ foreach ($arrayKeywords as $keyword) {
array_push($temp, '%'.$keyword.'%'); array_push($temp, '%'.$keyword.'%');
} }
$stringSearchSQL = implode('&#x20;', $temp); $stringSearchSQL = implode('', $temp);
$stringSearchSQL = str_replace('_', '\_', $stringSearchSQL); $stringSearchSQL = str_replace('_', '\_', $stringSearchSQL);
$_SESSION['stringSearchSQL'] = $stringSearchSQL; $_SESSION['stringSearchSQL'] = $stringSearchSQL;
@ -206,7 +206,7 @@ ui_print_standard_header(
); );
$only_count = false; $only_count = false;
hd(io_safe_input($_SESSION['stringSearchSQL']), true);
switch ($searchTab) { switch ($searchTab) {
case 'main': case 'main':
$only_count = true; $only_count = true;

View File

@ -6,7 +6,7 @@
%define debug_package %{nil} %define debug_package %{nil}
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.775 %define version 7.0NG.775
%define release 240108 %define release 240118
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -6,7 +6,7 @@
%define debug_package %{nil} %define debug_package %{nil}
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.775 %define version 7.0NG.775
%define release 240108 %define release 240118
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.775 %define version 7.0NG.775
%define release 240108 %define release 240118
%define httpd_name httpd %define httpd_name httpd
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name apache2 %define httpd_name apache2

View File

@ -2841,8 +2841,8 @@ INSERT INTO `treport_content` (`id_rc`,`id_report`,`id_gs`,`id_agent_module`,`ty
(2,1,0,0,'top_n',28800,0,2,'Top&#x20;CPU&#x20;per&#x20;agent','',0,'&lt;p&gt;This&#x20;type&#x20;of&#x20;report&#x20;implies&#x20;loading&#x20;a&#x20;lot&#x20;of&#x20;data.&#x20;Therefore&#x20;it&#x20;is&#x20;recommended&#x20;for&#x20;scheduled&#x20;reports,&#x20;not&#x20;real-time&#x20;view.&lt;/p&gt;',NULL,0,'','','','00:00:00','00:00:00',1,1,1,1,1,1,1,0,3,10,0,10,0,1,1,0,'{&quot;show_in_same_row&quot;:0,&quot;hide_notinit_agents&quot;:0,&quot;priority_mode&quot;:&quot;1&quot;,&quot;dyn_height&quot;:&quot;250&quot;,&quot;text_agent&quot;:&quot;Lio=&quot;,&quot;text_agent_module&quot;:&quot;Y3B1Lio=&quot;}',0,0,'',0,0,300,0,0,NULL,NULL,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,NULL,NULL,1,0,0,NULL), (2,1,0,0,'top_n',28800,0,2,'Top&#x20;CPU&#x20;per&#x20;agent','',0,'&lt;p&gt;This&#x20;type&#x20;of&#x20;report&#x20;implies&#x20;loading&#x20;a&#x20;lot&#x20;of&#x20;data.&#x20;Therefore&#x20;it&#x20;is&#x20;recommended&#x20;for&#x20;scheduled&#x20;reports,&#x20;not&#x20;real-time&#x20;view.&lt;/p&gt;',NULL,0,'','','','00:00:00','00:00:00',1,1,1,1,1,1,1,0,3,10,0,10,0,1,1,0,'{&quot;show_in_same_row&quot;:0,&quot;hide_notinit_agents&quot;:0,&quot;priority_mode&quot;:&quot;1&quot;,&quot;dyn_height&quot;:&quot;250&quot;,&quot;text_agent&quot;:&quot;Lio=&quot;,&quot;text_agent_module&quot;:&quot;Y3B1Lio=&quot;}',0,0,'',0,0,300,0,0,NULL,NULL,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,NULL,NULL,1,0,0,NULL),
(3,1,0,0,'event_report_group',21600,0,3,'General&#x20;event&#x20;report','This&#x20;is&#x20;a&#x20;sample&#x20;of&#x20;not&#x20;normal&#x20;events&#x20;for&#x20;any&#x20;agent&#x20;available&#x20;in&#x20;the&#x20;last&#x20;6&#x20;hours',0,'&lt;p&gt;This&#x20;type&#x20;of&#x20;report&#x20;implies&#x20;loading&#x20;a&#x20;lot&#x20;of&#x20;data.&#x20;Therefore&#x20;it&#x20;is&#x20;recommended&#x20;for&#x20;scheduled&#x20;reports,&#x20;not&#x20;real-time&#x20;view.&lt;/p&gt;',NULL,0,'','','','00:00:00','00:00:00',1,1,1,1,1,1,1,0,0,10,0,10,0,0,0,0,'{&quot;show_in_same_row&quot;:0,&quot;hide_notinit_agents&quot;:0,&quot;priority_mode&quot;:&quot;1&quot;,&quot;dyn_height&quot;:&quot;250&quot;,&quot;server_multiple&quot;:&quot;&#92;&quot;&#92;&quot;&quot;,&quot;show_summary_group&quot;:0,&quot;filter_event_severity&quot;:&quot;[&#92;&quot;20&#92;&quot;]&quot;,&quot;filter_event_type&quot;:&quot;[&#92;&quot;all&#92;&quot;]&quot;,&quot;filter_event_status&quot;:&quot;[&#92;&quot;-1&#92;&quot;]&quot;,&quot;event_graph_by_agent&quot;:&quot;1&quot;,&quot;event_graph_by_user_validator&quot;:&quot;1&quot;,&quot;event_graph_by_criticity&quot;:&quot;1&quot;,&quot;event_graph_validated_vs_unvalidated&quot;:0,&quot;event_filter_search&quot;:&quot;&quot;,&quot;event_filter_exclude&quot;:&quot;&quot;,&quot;custom_data_events&quot;:&quot;1&quot;,&quot;label&quot;:&quot;&quot;}',0,0,'',0,0,300,0,0,NULL,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,NULL,NULL,1,0,0,NULL); (3,1,0,0,'event_report_group',21600,0,3,'General&#x20;event&#x20;report','This&#x20;is&#x20;a&#x20;sample&#x20;of&#x20;not&#x20;normal&#x20;events&#x20;for&#x20;any&#x20;agent&#x20;available&#x20;in&#x20;the&#x20;last&#x20;6&#x20;hours',0,'&lt;p&gt;This&#x20;type&#x20;of&#x20;report&#x20;implies&#x20;loading&#x20;a&#x20;lot&#x20;of&#x20;data.&#x20;Therefore&#x20;it&#x20;is&#x20;recommended&#x20;for&#x20;scheduled&#x20;reports,&#x20;not&#x20;real-time&#x20;view.&lt;/p&gt;',NULL,0,'','','','00:00:00','00:00:00',1,1,1,1,1,1,1,0,0,10,0,10,0,0,0,0,'{&quot;show_in_same_row&quot;:0,&quot;hide_notinit_agents&quot;:0,&quot;priority_mode&quot;:&quot;1&quot;,&quot;dyn_height&quot;:&quot;250&quot;,&quot;server_multiple&quot;:&quot;&#92;&quot;&#92;&quot;&quot;,&quot;show_summary_group&quot;:0,&quot;filter_event_severity&quot;:&quot;[&#92;&quot;20&#92;&quot;]&quot;,&quot;filter_event_type&quot;:&quot;[&#92;&quot;all&#92;&quot;]&quot;,&quot;filter_event_status&quot;:&quot;[&#92;&quot;-1&#92;&quot;]&quot;,&quot;event_graph_by_agent&quot;:&quot;1&quot;,&quot;event_graph_by_user_validator&quot;:&quot;1&quot;,&quot;event_graph_by_criticity&quot;:&quot;1&quot;,&quot;event_graph_validated_vs_unvalidated&quot;:0,&quot;event_filter_search&quot;:&quot;&quot;,&quot;event_filter_exclude&quot;:&quot;&quot;,&quot;custom_data_events&quot;:&quot;1&quot;,&quot;label&quot;:&quot;&quot;}',0,0,'',0,0,300,0,0,NULL,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,NULL,NULL,1,0,0,NULL);
INSERT INTO `tdashboard` (`id`,`name`,`id_user`,`id_group`,`active`,`cells`,`cells_slideshow`) VALUES INSERT INTO `tdashboard` (`id`,`name`,`id_user`,`id_group`,`active`,`cells`,`cells_slideshow`) VALUES
(1,'Sample&#x20;Dashboard&#x20;#1','',0,0,0,0), (1,'Sample&#x20;Dashboard&#x20;#1','',0,0,7,0),
(2,'Sample&#x20;Dashboard&#x20;#2','',0,0,0,0); (2,'Sample&#x20;Dashboard&#x20;#2','',0,0,10,0);
INSERT INTO `twidget_dashboard` (`id`,`position`,`options`,`order`,`id_dashboard`,`id_widget`,`prop_width`,`prop_height`) VALUES INSERT INTO `twidget_dashboard` (`id`,`position`,`options`,`order`,`id_dashboard`,`id_widget`,`prop_width`,`prop_height`) VALUES
(1,'{\"x\":\"0\",\"y\":\"0\",\"width\":\"4\",\"height\":\"4\"}','{\"title\":\"Agents&#x20;hive\",\"background\":\"#ffffff\",\"groups\":[\"12,8,4,9,2,10,13,11\"]}',0,1,1,0.32,0.32), (1,'{\"x\":\"0\",\"y\":\"0\",\"width\":\"4\",\"height\":\"4\"}','{\"title\":\"Agents&#x20;hive\",\"background\":\"#ffffff\",\"groups\":[\"12,8,4,9,2,10,13,11\"]}',0,1,1,0.32,0.32),
(2,'{\"x\":\"4\",\"y\":\"0\",\"width\":\"3\",\"height\":\"4\"}','{\"title\":\"Clock\",\"background\":\"#ffffff\",\"clockType\":\"analogic\"}',1,1,12,0.32,0.32), (2,'{\"x\":\"4\",\"y\":\"0\",\"width\":\"3\",\"height\":\"4\"}','{\"title\":\"Clock\",\"background\":\"#ffffff\",\"clockType\":\"analogic\"}',1,1,12,0.32,0.32),

View File

@ -214,7 +214,7 @@ $enable_disable['text'] = html_print_div(
); );
// New Widget. // New Widget.
$newWidget['text'] = '<a href="#" id="add-widget" class="invisible">'; $newWidget['text'] = '<a href="#" id="add-widget" class="invisible_important">';
$newWidget['text'] .= html_print_image( $newWidget['text'] .= html_print_image(
'images/plus@svg.svg', 'images/plus@svg.svg',
true, true,

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.775-240108 Version: 7.0NG.775-240118
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.775-240108" pandora_version="7.0NG.775-240118"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.775"; my $pandora_version = "7.0NG.775";
my $pandora_build = "240108"; my $pandora_build = "240118";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -1662,9 +1662,6 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) {
$os_id = $self->guess_os($data->{'agent'}{'direccion'}); $os_id = $self->guess_os($data->{'agent'}{'direccion'});
} }
if (is_empty($data->{'agent'}{'os_version'})) {
$data->{'agent'}{'os_version'} = $self->guess_os($data->{'agent'}{'direccion'}, undef, 1);
}
$self->call('message', "Agent accepted: ".$data->{'agent'}{'nombre'}, 5); $self->call('message', "Agent accepted: ".$data->{'agent'}{'nombre'}, 5);
@ -2022,8 +2019,14 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) {
# Retrieve target agent OS. # Retrieve target agent OS.
$self->{'agents_found'}->{$addr}{'agent'}{'id_os'} = $self->guess_os($addr); $self->{'agents_found'}->{$addr}{'agent'}{'id_os'} = $self->guess_os($addr);
my $os_version = $self->get_os_version($addr);
if (is_empty($os_version)) {
$os_version = $self->guess_os($addr, undef, 1);
}
# Retrieve target agent OS version. # Retrieve target agent OS version.
$self->{'agents_found'}->{$addr}{'agent'}{'os_version'} = $self->get_os_version($addr); $self->{'agents_found'}->{$addr}{'agent'}{'os_version'} = $os_version;
$self->call('update_progress', $progress); $self->call('update_progress', $progress);
$progress += $step; $progress += $step;

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.775"; my $pandora_version = "7.0NG.775";
my $pandora_build = "240108"; my $pandora_build = "240118";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -7,7 +7,7 @@
%define debug_package %{nil} %define debug_package %{nil}
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.775 %define version 7.0NG.775
%define release 240108 %define release 240118
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.775 %define version 7.0NG.775
%define release 240108 %define release 240118
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.775" PI_VERSION="7.0NG.775"
PI_BUILD="240108" PI_BUILD="240118"
MODE=$1 MODE=$1
if [ $# -gt 1 ]; then if [ $# -gt 1 ]; then

View File

@ -38,7 +38,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.775 Build 240108"; my $version = "7.0NG.775 Build 240118";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv; Encode::Locale::decode_argv;
# version: define current version # version: define current version
my $version = "7.0NG.775 Build 240108"; my $version = "7.0NG.775 Build 240118";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);

View File

@ -851,12 +851,14 @@ abstract class VisualConsoleItem<Props extends ItemProps> {
const newLabelHtml = this.createLabelDomElement().innerHTML; const newLabelHtml = this.createLabelDomElement().innerHTML;
if (oldLabelHtml !== newLabelHtml) { if (oldLabelHtml !== newLabelHtml) {
this.labelElementRef.innerHTML = newLabelHtml; this.labelElementRef.innerHTML = newLabelHtml;
this.changeLabelPosition(this.itemProps.labelPosition);
} else {
// Change label position.
if (!prevProps || prevProps.labelPosition !== this.props.labelPosition) {
this.changeLabelPosition(this.props.labelPosition);
}
} }
// Change label position.
if (!prevProps || prevProps.labelPosition !== this.props.labelPosition) {
this.changeLabelPosition(this.props.labelPosition);
}
//Change z-index class is-on-top //Change z-index class is-on-top
if (!prevProps || prevProps.isOnTop !== this.props.isOnTop) { if (!prevProps || prevProps.isOnTop !== this.props.isOnTop) {
if (this.props.isOnTop) { if (this.props.isOnTop) {