|
@@ -26,8 +26,10 @@
|
|
|
|
|
|
var on_connect = function(x) {
|
|
|
id = client.subscribe("/queue/kea", function(m) {
|
|
|
- if ($('#tbody tr').length >= max_packets) {
|
|
|
+ if (typeof $filter != 'undefined' && $filter != '' && $('#tbody tr').length >= max_packets) {
|
|
|
$('#tbody td:not(:contains("' + $filter + '"))').last().parent('tr').remove();
|
|
|
+ } else if ( $('#tbody tr').length >= max_packets) {
|
|
|
+ $('#tbody tr:last').remove();
|
|
|
}
|
|
|
|
|
|
$('#tbody').prepend($("<tr>").append($('<td class="sonata-ba-list-field sonata-ba-list-field-text td-bordered">').text(m.body)));
|
|
@@ -49,11 +51,13 @@
|
|
|
|
|
|
{# FILTRO #}
|
|
|
|
|
|
+ var $filter = '';
|
|
|
+
|
|
|
function filter()
|
|
|
{
|
|
|
- var $filter = $('#filter').val();
|
|
|
+ $filter = $('#filter').val();
|
|
|
|
|
|
- if ($filter.length >= 3) {
|
|
|
+ if (typeof $filter != 'undefined' && $filter.length >= 3) {
|
|
|
$('#tbody td:not(:contains("' + $filter + '"))').hide();
|
|
|
} else {
|
|
|
$('#tbody td').show();
|