mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
removed clear log, doesnt work with logrotate-stream
This commit is contained in:
@@ -241,11 +241,6 @@ function getHourlyStatsForSet(set, hours, callback) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
SocketAdmin.clearLog = function(socket, data, callback) {
|
|
||||||
var logPath = path.join('logs', path.sep, 'output.log');
|
|
||||||
fs.truncate(logPath, callback);
|
|
||||||
};
|
|
||||||
|
|
||||||
SocketAdmin.getMoreEvents = function(socket, next, callback) {
|
SocketAdmin.getMoreEvents = function(socket, next, callback) {
|
||||||
if (parseInt(next, 10) < 0) {
|
if (parseInt(next, 10) < 0) {
|
||||||
return callback(null, {data: [], next: next});
|
return callback(null, {data: [], next: next});
|
||||||
|
|||||||
@@ -8,23 +8,3 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-3">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-body">
|
|
||||||
<button class="btn btn-primary btn-md" id="clearLog">Clear Log</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$('#clearLog').on('click', function() {
|
|
||||||
socket.emit('admin.clearLog', {}, function(err) {
|
|
||||||
if (err) {
|
|
||||||
return app.alertError(err.message);
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.logs .panel-body pre').text('');
|
|
||||||
});
|
|
||||||
})
|
|
||||||
</script
|
|
||||||
|
|||||||
Reference in New Issue
Block a user