Skip to content

Commit

Permalink
fix: admin/logs: download of "console" not working #568
Browse files Browse the repository at this point in the history
  • Loading branch information
rejetto committed Apr 23, 2024
1 parent 43abe82 commit 0f133e8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion admin/src/LogsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default function LogsPage() {
const files = typedKeys(logLabels)
const shorterLabels = !useBreakpoint('sm') && { error_log: "Errors" }
const file = files[tab]
const fileAvailable = file !== 'console'
return h(Fragment, {},
h(Flex, { gap: 0 },
h(Tabs, { value: tab, onChange(ev,i){ setTab(i) } },
Expand All @@ -32,7 +33,12 @@ export default function LogsPage() {
sx: { minWidth: 0, px: { xs: 1.5, sm: 2 } } // save space
}))),
h(Box, { flex: 1 }),
h(IconBtn, { icon: Download, title: "Download as file", link: API_URL + `get_log_file?file=${file}` }),
h(IconBtn, {
icon: Download,
title: fileAvailable ? "Download as file" : "Not available",
link: API_URL + `get_log_file?file=${file}`,
disabled: !fileAvailable
}),
h(IconBtn, { icon: Settings, title: "Options", onClick: showLogOptions })
),
files.map(f =>
Expand Down

0 comments on commit 0f133e8

Please sign in to comment.