Authored by 姜枫

api cache clean scroller

... ... @@ -71,7 +71,7 @@ class ApiCache {
if (len === 0) {
this.memcached.end();
let end = new Date();
this._log(`clean success in ${end.getTime() - begin.getTime()} , all keys: ${count}`)
this._log(`>>>>>> clean success in ${end.getTime() - begin.getTime()} , all keys: ${count}`)
}
})
})
... ...
... ... @@ -112,13 +112,14 @@
layoutResize();
var $logWrap = $('.yoho-log-dark');
var ws = io();
ws.on('connect', function() {
ws.on('/api_cache/log', function(data) {
console.log(data);
$('#api-cache-log').append('<p><span class="host">'+data.host+'</span><span class="message">'+data.msg+'</span></p>');
$('#api-cache-log').append('<p><span class="host">'+data.host+'</span><span class="message">'+data.msg+'</span></p>')
$logWrap.scrollTop($logWrap[0].scrollHeight);
});
});
ws.on('error', function() {
... ...
... ... @@ -273,9 +273,9 @@
label.text(msg);
if (data.total != data.status.online) {
label.addClass('label-danger');
label.removeClass('label-success').addClass('label-danger');
} else {
label.addClass('label-success');
label..removeClass('label-danger').addClass('label-success');
}
}
});
... ...