mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 10:46:16 +01:00
add CONTAINER_DETAILS env var (#1305)
This commit is contained in:
@@ -234,7 +234,7 @@ async function getLogsHtml(container: ContainerRecord): Promise<string> {
|
||||
system: container.system,
|
||||
container: container.id,
|
||||
})])
|
||||
return highlighter.codeToHtml(logsHtml.logs, { lang: "log", theme: syntaxTheme })
|
||||
return logsHtml.logs ? highlighter.codeToHtml(logsHtml.logs, { lang: "log", theme: syntaxTheme }) : t`No results.`
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
return ""
|
||||
@@ -250,7 +250,7 @@ async function getInfoHtml(container: ContainerRecord): Promise<string> {
|
||||
try {
|
||||
info = JSON.stringify(JSON.parse(info), null, 2)
|
||||
} catch (_) { }
|
||||
return highlighter.codeToHtml(info, { lang: "json", theme: syntaxTheme })
|
||||
return info ? highlighter.codeToHtml(info, { lang: "json", theme: syntaxTheme }) : t`No results.`
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user