Skip to content
Snippets Groups Projects
Commit 59607d66 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

View Logs: Parse logs to keep date and time less visible

parent 792e1bb6
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,9 @@ Template.viewLogs.helpers
return stdout.find({}, {sort: {ts: 1}})
ansispan: (string) ->
return ansispan(string.replace(/\s/g, '&nbsp;').replace(/(\\n|\n)/g, '<br>'))
string = ansispan(string.replace(/\s/g, '&nbsp;').replace(/(\\n|\n)/g, '<br>'))
string = string.replace(/(.\d{8}-\d\d:\d\d:\d\d\.\d\d\d\(?.{0,2}\)?)/, '<span class="time">$1</span>')
return string
formatTS: (date) ->
return moment(date).format('YMMDD-HH:mm:ss.SSS(ZZ)')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment