+
+ Download logs
+
+
+
+
+
+
+ {
+ if (radioButtons === 0) {
+ const text = logsResponse.data.logs.map(it => JSON.stringify(it)).join('\n')
+ const blob = new window.Blob([text], {
+ type: 'text/plain;charset=utf-8'
+ })
+ FileSaver.saveAs(blob, `${formatDateFile(new Date())}_server`)
+ } else if (radioButtons === 1 && range.from && range.to) {
+ const text = logsResponse.data.logs.filter((log) => moment(log.timestamp).isBetween(range.from, range.to, 'day', '[]')).map(it => JSON.stringify(it)).join('\n')
+ const blob = new window.Blob([text], {
+ type: 'text/plain;charset=utf-8'
+ })
+ FileSaver.saveAs(blob, `${formatDateFile(range.from)}_${formatDateFile(range.to)}_server`)
+ }
+ }}
+ >
+ Download
+
+
+
+