From 1cda4e8d9b231be05a0fa6d56c4c351b521d741c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 16 Sep 2015 18:43:24 -0400 Subject: [PATCH] scrollbar and scroll to bottom on logs page --- public/less/admin/admin.less | 1 + public/less/admin/advanced/logs.less | 8 ++++++++ public/src/admin/advanced/logs.js | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 public/less/admin/advanced/logs.less diff --git a/public/less/admin/admin.less b/public/less/admin/admin.less index 9c9bb584e4..a98b7022d0 100644 --- a/public/less/admin/admin.less +++ b/public/less/admin/admin.less @@ -18,6 +18,7 @@ @import "./extend/plugins"; @import "./extend/rewards"; @import "./advanced/database"; +@import "./advanced/logs"; @import "./settings"; @import "./modules/alerts"; diff --git a/public/less/admin/advanced/logs.less b/public/less/admin/advanced/logs.less new file mode 100644 index 0000000000..3a1023130b --- /dev/null +++ b/public/less/admin/advanced/logs.less @@ -0,0 +1,8 @@ + +.logs { + .panel-body { + pre { + height: 600px; + } + } +} \ No newline at end of file diff --git a/public/src/admin/advanced/logs.js b/public/src/admin/advanced/logs.js index 78581d9cea..ea0503d8a6 100644 --- a/public/src/admin/advanced/logs.js +++ b/public/src/admin/advanced/logs.js @@ -6,7 +6,7 @@ define('admin/advanced/logs', function() { Logs.init = function() { var logsEl = $('.logs pre'); - + logsEl.scrollTop(logsEl.prop('scrollHeight')); // Affix menu $('.affix').affix(); @@ -19,6 +19,7 @@ define('admin/advanced/logs', function() { socket.emit('admin.logs.get', function(err, logs) { if (!err) { logsEl.text(logs); + logsEl.scrollTop(logsEl.prop('scrollHeight')); } else { app.alertError(err.message); }