From 4824ad1e1aefc88859e88f5d113994c8f58e4392 Mon Sep 17 00:00:00 2001
From: Carlos Tadeu Panato Junior <ctadeu@gmail.com>
Date: Mon, 14 Nov 2016 13:38:54 +0100
Subject: implement fix for ticket PLT-2060 (#4527)

* implement fix for ticket PLT-2060
---
 webapp/components/admin_console/logs.jsx | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'webapp/components/admin_console/logs.jsx')

diff --git a/webapp/components/admin_console/logs.jsx b/webapp/components/admin_console/logs.jsx
index ad0277b7f..8dc0c1e2e 100644
--- a/webapp/components/admin_console/logs.jsx
+++ b/webapp/components/admin_console/logs.jsx
@@ -26,6 +26,12 @@ export default class Logs extends React.Component {
         AsyncClient.getLogs();
     }
 
+    componentDidUpdate() {
+        // Scroll Down to get the latest logs
+        var node = this.refs.logPanel;
+        node.scrollTop = node.scrollHeight;
+    }
+
     componentWillUnmount() {
         AdminStore.removeLogChangeListener(this.onLogListenerChange);
     }
@@ -93,7 +99,10 @@ export default class Logs extends React.Component {
                         defaultMessage='Reload'
                     />
                 </button>
-                <div className='log__panel'>
+                <div
+                    ref='logPanel'
+                    className='log__panel'
+                >
                     {content}
                 </div>
             </div>
-- 
cgit v1.2.3-1-g7c22

