diff --git a/pandora_console/include/ajax/audit_log.php b/pandora_console/include/ajax/audit_log.php
index c979568b21..026d8ca881 100644
--- a/pandora_console/include/ajax/audit_log.php
+++ b/pandora_console/include/ajax/audit_log.php
@@ -84,7 +84,7 @@ if ($save_log_filter) {
if ($recover_aduit_log_select) {
- echo json_encode(audit_get_audit_filter_select());
+ echo json_encode(audit_get_audit_filter_select_fix_order());
}
if ($update_log_filter) {
@@ -190,7 +190,7 @@ function show_filter() {
draggable: true,
modal: false,
closeOnEscape: true,
- width: 380
+ width: "auto"
});
}
@@ -207,12 +207,13 @@ function load_filter_values() {
},
success: function(data) {
var options = "";
+ console.log(data);
$.each(data,function(i,value){
if (i == 'text'){
$("#text-filter_text").val(value);
}
if (i == 'period'){
- $("#text-filter_period").val(value);
+ $("#filter_period").val(value).change();
}
if (i == 'ip'){
$("#text-filter_ip").val(value);
@@ -395,7 +396,7 @@ function save_new_filter() {
"save_log_filter" : 1,
"id_name" : $("#text-id_name").val(),
"text" : $("#text-filter_text").val(),
- "period" : $("#text-filter_period").val(),
+ "period" : $("#filter_period :selected").val(),
"ip" : $('#text-filter_ip').val(),
"type" : $('#filter_type :selected').val(),
"user" : $('#filter_user :selected').val(),
@@ -431,7 +432,7 @@ function save_update_filter() {
"update_log_filter" : 1,
"id" : $("#overwrite_filter :selected").val(),
"text" : $("#text-filter_text").val(),
- "period" : $("#text-filter_period").val(),
+ "period" : $("#filter_period :selected").val(),
"ip" : $('#text-filter_ip').val(),
"type" : $('#filter_type :selected').val(),
"user" : $('#filter_user :selected').val(),
diff --git a/pandora_console/include/class/AuditLog.class.php b/pandora_console/include/class/AuditLog.class.php
index 98bca38e43..48ed1012d7 100644
--- a/pandora_console/include/class/AuditLog.class.php
+++ b/pandora_console/include/class/AuditLog.class.php
@@ -469,7 +469,7 @@ class AuditLog extends HTML
success: function(data) {
var options = "";
$.each(data,function(key,value){
- options += "";
+ options += "";
});
$('#overwrite_filter').html(options);
$('#overwrite_filter').select2();
@@ -509,8 +509,12 @@ class AuditLog extends HTML
/* Filter management */
$('#button-load-filter').click(function (){
if($('#load-filter-select').length) {
- $('#load-filter-select').dialog({width: "20%",
- maxWidth: "25%",
+ $('#load-filter-select').dialog({
+ resizable: true,
+ draggable: true,
+ modal: false,
+ closeOnEscape: true,
+ width: "auto",
title: ""
});
$.ajax({
@@ -523,8 +527,9 @@ class AuditLog extends HTML
},
success: function(data) {
var options = "";
+ console.log(data)
$.each(data,function(key,value){
- options += "";
+ options += "";
});
$('#filter_id').html(options);
$('#filter_id').select2();