mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
Firewall, live log. Don't cleanup visible records when limit isn't reached. Without this fix it's difficult to keep track on logs which change often.
This commit is contained in:
parent
e539530014
commit
3a5874309e
@ -96,10 +96,27 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
$("#grid-log > tbody > tr:first").before(log_tr);
|
||||
}
|
||||
}
|
||||
// limit output
|
||||
$("#grid-log > tbody > tr:gt("+(parseInt($("#limit").val())-1)+")").remove();
|
||||
// apply filter after load
|
||||
$("#filter").keyup();
|
||||
|
||||
// limit output, try to keep max X records on screen.
|
||||
var tr_count = 0;
|
||||
var visible_count = 0;
|
||||
var max_rows = parseInt($("#limit").val());
|
||||
$("#grid-log > tbody > tr").each(function(){
|
||||
if ($(this).is(':visible')) {
|
||||
++visible_count;
|
||||
if (visible_count > max_rows) {
|
||||
// more then [max_rows] visible, safe to remove the rest
|
||||
$(this).remove();
|
||||
}
|
||||
} else if (tr_count > max_rows) {
|
||||
// invisible rows starting at [max_rows] rownumber
|
||||
$(this).remove();
|
||||
}
|
||||
++tr_count;
|
||||
});
|
||||
|
||||
// bind info buttons
|
||||
$(".act_info").unbind('click').click(function(){
|
||||
var sender_tr = $(this).parent().parent();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user