# Scroll to bottom a text in the Dashboard

**URL:** <https://discourse.nodered.org/t/scroll-to-bottom-a-text-in-the-dashboard/84975>\
**Category:** Dashboard\
**Created:** [27 January 2024 18:20 UTC](https://discourse.nodered.org/t/scroll-to-bottom-a-text-in-the-dashboard/84975 "2024-01-27T18:20:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheSaltydog](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@TheSaltydog](https://discourse.nodered.org/u/TheSaltydog)\
**Post date:** [27 January 2024 18:20 UTC](https://discourse.nodered.org/t/scroll-to-bottom-a-text-in-the-dashboard/84975/1 "2024-01-27T18:20:09Z")

</div>

Hi,

I am trying to display a custom log file in the Dashboard with the following flow:

```auto
[{"id":"2f49c88580f49880","type":"ui_template","z":"fd95058a.48e3e8","group":"c8d32031ab47f343","name":"Events Log","order":1,"width":"10","height":"7","format":"<div ng-style=\"{'margin-left':'10px'}\" id=\"events\">\n <pre>{{msg.payload}}</pre>\n</div>\n","storeOutMessages":false,"fwdInMessages":false,"resendOnRefresh":false,"templateScope":"local","className":"","x":570,"y":1840,"wires":[[]]},{"id":"a0a16e56e3df5218","type":"inject","z":"fd95058a.48e3e8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":1840,"wires":[["a2fbd25ac7c1a0c1"]]},{"id":"a2fbd25ac7c1a0c1","type":"file in","z":"fd95058a.48e3e8","name":"LogFile","filename":"/home/boss/SaltyREST/logs/SaltyREST.log","filenameType":"str","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":380,"y":1840,"wires":[["2f49c88580f49880"]]},{"id":"c8d32031ab47f343","type":"ui_group","name":"Events Log","tab":"2e10f8bfea96ca87","order":1,"disp":true,"width":"10","collapse":false,"className":""},{"id":"2e10f8bfea96ca87","type":"ui_tab","name":"Log","icon":"dashboard","disabled":false,"hidden":false}]

```

I need to scroll to the bottom of the file, upon loading, so that to reach the latest log line, but I am not so familiar with templates...  
Any suggestion?  
Thanks

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 January 2024 01:55 UTC](https://discourse.nodered.org/t/scroll-to-bottom-a-text-in-the-dashboard/84975/2 "2024-01-28T01:55:09Z")

</div>

If you are wanting to see _the last part_ of the given log file, and when you _display_ it, that is ..... at the bottom......

Why not reverse the log file's viewing order?

Sorry, I'm not going to import the flow just now.

But I'm guessing you are doing something like:

`cat logfile_name.txt` (or what ever) and sending that to a `text` node.  
Or similar.

So rather than `cat`, use `tac`.

Then the last part will be at the top.

Just a thought.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [28 January 2024 03:34 UTC](https://discourse.nodered.org/t/scroll-to-bottom-a-text-in-the-dashboard/84975/3 "2024-01-28T03:34:39Z")

</div>

Gosh I've been using Linux shells for decades and never come across `tac`. Thanks!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 January 2024 08:46 UTC](https://discourse.nodered.org/t/scroll-to-bottom-a-text-in-the-dashboard/84975/5 "2024-01-28T08:46:56Z")

</div>

Here is a demo I did some time ago: [Where can I find (or enable) an "interactive" console in node-red? - #15 by Steve-Mcl](https://discourse.nodered.org/t/where-can-i-find-or-enable-an-interactive-console-in-node-red/45905/15)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 February 2024 08:47 UTC](https://discourse.nodered.org/t/scroll-to-bottom-a-text-in-the-dashboard/84975/6 "2024-02-11T08:47:01Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
