Authored by 姜枫

api cache clean scroller

... ... @@ -113,13 +113,19 @@
layoutResize();
var $logWrap = $('.yoho-log-dark');
var timer = 0;
var ws = io();
ws.on('connect', function() {
ws.on('/api_cache/log', function(data) {
$('#api-cache-log').append('<p><span class="host">'+data.host+'</span><span class="message">'+data.msg+'</span></p>');
$logWrap.scrollTop($logWrap[0].scrollHeight);
if (timer == 0) {
timer = setTimeout(function(){
$logWrap.scrollTop($logWrap[0].scrollHeight);
timer = 0;
}, 1000);
}
});
});
ws.on('error', function() {
... ...