Merge branch 'develop' of github.com:pandorafms/pandorafms into develop
This commit is contained in:
commit
0423aa39da
|
@ -756,7 +756,7 @@ function tags_get_acl_tags($id_user, $id_group, $access = 'AR', $return_mode = '
|
|||
break;
|
||||
case 'event_condition':
|
||||
// Return the condition of the tags for tevento table
|
||||
$condition = tags_get_acl_tags_event_condition($acltags);
|
||||
$condition = "(".tags_get_acl_tags_event_condition($acltags).")";
|
||||
|
||||
if(!empty($condition)) {
|
||||
return " $query_prefix ".$condition;
|
||||
|
|
|
@ -200,8 +200,6 @@ $group_rep = (int) get_parameter ("group_rep", 1);
|
|||
$delete = (bool) get_parameter ("delete");
|
||||
$validate = (bool) get_parameter ("validate", 0);
|
||||
$section = (string) get_parameter ("section", "list");
|
||||
$text_agent = (string) get_parameter('text_agent', __("All"));
|
||||
$text_module = (string) get_parameter('module_search', '');
|
||||
$filter_only_alert = (int) get_parameter('filter_only_alert', -1);
|
||||
$filter_id = (int) get_parameter('filter_id', 0);
|
||||
$id_name = (string) get_parameter('id_name', '');
|
||||
|
@ -210,6 +208,24 @@ $date_from = (string)get_parameter('date_from', '');
|
|||
$date_to = (string)get_parameter('date_to', '');
|
||||
|
||||
$text_agent = (string) get_parameter("text_agent", __("All"));
|
||||
$id_agent = get_parameter('id_agent', 0);
|
||||
if ($id_agent != 0) {
|
||||
$text_agent = db_get_value('nombre', 'tagente', 'id_agente', $id_agent);
|
||||
if ($text_agent == false) {
|
||||
$text_agent = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$text_module = (string) get_parameter('module_search', '');
|
||||
$id_agent_module = get_parameter('id_agent_module', 0);
|
||||
if ($id_agent_module != 0) {
|
||||
$text_module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $id_agent_module);
|
||||
if ($text_module == false) {
|
||||
$text_module = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$tag_with_json = base64_decode(get_parameter("tag_with", '')) ;
|
||||
$tag_with_json_clean = io_safe_output($tag_with_json);
|
||||
|
|
|
@ -386,7 +386,7 @@ $data[0] .= html_print_select($user_users, "id_user_ack", $id_user_ack, '',
|
|||
if (!$meta) {
|
||||
$data[1] = __('Module search') . '<br>';
|
||||
$data[1] .= html_print_autocomplete_modules('module_search',
|
||||
'', false, true, '', array(), true);
|
||||
$text_module, false, true, '', array(), true);
|
||||
}
|
||||
else {
|
||||
$data[1] .= '';
|
||||
|
|
|
@ -156,7 +156,7 @@ then
|
|||
cat /dev/null > $OUTPUT
|
||||
echo "#Pandora FMS Integrity Check generated at $HUMANDATE at `hostname` by $USER" >> $OUTPUT
|
||||
echo "Creating integrity check of Pandora FMS Console files"
|
||||
for ax in `find /var/www/pandora_console/ -name "*.php" -o -name "*.js" -o -name "*.css" -o -name "*.sql"`
|
||||
for ax in `find $CONSOLE_PATH -name "*.php" -o -name "*.js" -o -name "*.css" -o -name "*.sql"`
|
||||
do
|
||||
bx=`md5sum $ax`
|
||||
echo $bx >>$OUTPUT
|
||||
|
|
|
@ -82,6 +82,9 @@ sub pandora_purgedb ($$) {
|
|||
|
||||
# Delete old numeric data
|
||||
pandora_delete_old_module_data ($dbh, 'tagente_datos', $ulimit_access_timestamp, $ulimit_timestamp);
|
||||
|
||||
# Delete old export data
|
||||
pandora_delete_old_export_data ($dbh, $ulimit_timestamp);
|
||||
|
||||
# Delete extended session data
|
||||
if (enterprise_load (\%conf) != 0) {
|
||||
|
@ -845,6 +848,18 @@ sub pandora_delete_old_module_data {
|
|||
}
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Delete old export data.
|
||||
##############################################################################
|
||||
sub pandora_delete_old_export_data {
|
||||
my ($dbh, $ulimit_timestamp) = @_;
|
||||
|
||||
log_message ('PURGE', "Deleting old export data from tserver_export_data\n");
|
||||
while(db_do ($dbh, "DELETE FROM tserver_export_data WHERE UNIX_TIMESTAMP(timestamp) < ? LIMIT $SMALL_OPERATION_STEP", $ulimit_timestamp) ne '0E0') {
|
||||
usleep (10000);
|
||||
};
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Main
|
||||
###############################################################################
|
||||
|
|
Loading…
Reference in New Issue