feat: return logs in csv format
This commit is contained in:
parent
542ba9f1b7
commit
a108df0c4c
7 changed files with 65 additions and 13 deletions
|
|
@ -59,6 +59,12 @@ const formatDate = date => {
|
|||
|
||||
const NUM_LOG_RESULTS = 500
|
||||
|
||||
const GET_CSV = gql`
|
||||
query ServerData($limit: Int, $from: Date, $until: Date) {
|
||||
serverLogsCsv(limit: $limit, from: $from, until: $until)
|
||||
}
|
||||
`
|
||||
|
||||
const GET_DATA = gql`
|
||||
query ServerData($limit: Int, $from: Date, $until: Date) {
|
||||
serverVersion
|
||||
|
|
@ -118,9 +124,9 @@ const Logs = () => {
|
|||
<LogsDowloaderPopover
|
||||
title="Download logs"
|
||||
name="server-logs"
|
||||
query={GET_DATA}
|
||||
query={GET_CSV}
|
||||
logs={data.serverLogs}
|
||||
getLogs={logs => R.path(['serverLogs'])(logs)}
|
||||
getLogs={logs => R.path(['serverLogsCsv'])(logs)}
|
||||
/>
|
||||
<Info3>{saveMessage}</Info3>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue