Add Json log parser for Dovecot and Postfix containers

This commit is contained in:
andryyy
2017-05-06 23:52:40 +02:00
parent d614aaf617
commit 8c8bfc0108
4 changed files with 109 additions and 49 deletions

View File

@@ -39,4 +39,37 @@ $(document).ready(function() {
});
}
});
$.ajax({
dataType: 'json',
url: '/api/v1/get/logs/dovecot/all',
jsonp: false,
error: function () {
alert('Cannot draw dovecot log table');
},
success: function (data) {
$('#dovecot_log').footable({
"columns": [
{"name":"time","title":"time"},
{"name":"program","title":"program"},
{"name":"priority","title":"priority"},
{"name":"message","title":"message"},
],
"rows": data,
"empty": lang.empty,
"paging": {
"enabled": true,
"limit": 5,
"size": pagination_size
},
"filtering": {
"enabled": true,
"position": "left",
"placeholder": lang.filter_table
},
"sorting": {
"enabled": true
}
});
}
});
});