Skip to content

Commit

Permalink
Merge pull request #1587 from OpenC3/history
Browse files Browse the repository at this point in the history
Fix LogMessages history
  • Loading branch information
ryanmelt authored Sep 30, 2024
2 parents 16f20c2 + a08d00b commit be0e85c
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export default {
messages.map((message) => {
message.timestamp = this.formatTimestamp(
message['@timestamp'],
this.timeZone,
this.timeZone
)
if (
message.message.raw &&
Expand Down Expand Up @@ -280,8 +280,9 @@ export default {
},
},
{
historyCount: this.historyCount,
},
// Channel parameter is history_count with underscore
history_count: this.historyCount,
}
)
.then((subscription) => {
this.subscription = subscription
Expand All @@ -298,7 +299,7 @@ export default {
.map(
(entry) =>
// Other fields are available like container_name, msg_id ... probably not useful
`${entry.timestamp} | ${entry.level} | ${entry.microservice_name} | ${entry.message}`,
`${entry.timestamp} | ${entry.level} | ${entry.microservice_name} | ${entry.message}`
)
.join('\n')
const blob = new Blob([output], {
Expand All @@ -309,7 +310,7 @@ export default {
link.href = URL.createObjectURL(blob)
link.setAttribute(
'download',
format(Date.now(), 'yyyy_MM_dd_HH_mm_ss') + '_message_log.txt',
format(Date.now(), 'yyyy_MM_dd_HH_mm_ss') + '_message_log.txt'
)
link.click()
},
Expand Down

0 comments on commit be0e85c

Please sign in to comment.