Add journalctl export button (#693)

* Add journalctl export button

* Run spotless

* Split into 2 tabs
This commit is contained in:
Matt
2023-01-03 19:42:19 -08:00
committed by GitHub
parent 0b5256df12
commit af6f5eb0c4
6 changed files with 349 additions and 81 deletions

View File

@@ -12,12 +12,21 @@
color="secondary"
style="margin-left: auto;"
depressed
@click="download('photonlog.log', rawLogs.map(it => it.message).join('\n'))"
@click="$refs.exportLogFile.click()"
>
<v-icon left>
mdi-download
</v-icon>
Download Log
<!-- Special hidden link that gets 'clicked' when the user exports journalctl logs -->
<a
ref="exportLogFile"
style="color: black; text-decoration: none; display: none"
:href="'http://' + this.$address + '/api/settings/photonvision-journalctl.txt'"
download="photonvision-journalctl.txt"
/>
</v-btn>
</v-card-title>
<div class="pr-6 pl-6">