You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The default background color for ANSI logs is black, regardless of whether a user is in light or dark mode. This means that if a user uses ANSI code 49 (to indicate a default background color), they'll get black. This isn't great for light mode.
To Reproduce
Run a docker container that logs the string \x1b[49mHello World. View this log in Dozzle, in light mode. This line will show up with a black background.
Expected behavior
ANSI color code 49 should be some sort of default background.
Screenshots
Desktop (please complete the following information):
OS: Mac OS
Docker version: 26.0.0
Browser & version: Chrome
Version: 6.4.2
Proposed fix
This is an issue that Dozzle inherits from ansi-to-html, which has a default background color of black. Changing the initialization of AnsiConvertor in assets/components/LogViewer/SimpleLogItem.vue to something like new AnsiConvertor({ escapeXML: false, fg: "var(--base-content-color)", bg: "initial" }); seems to address the problem.
Here both bg: "initial" and bg: "transparent" work for my purposes. It's possible that setting fg: "initial" would also simplify matters, but fg colors currently seem fine to me.
The text was updated successfully, but these errors were encountered:
Describe the bug
The default background color for ANSI logs is black, regardless of whether a user is in light or dark mode. This means that if a user uses ANSI code 49 (to indicate a default background color), they'll get black. This isn't great for light mode.
To Reproduce
Run a docker container that logs the string
\x1b[49mHello World
. View this log in Dozzle, in light mode. This line will show up with a black background.Expected behavior
ANSI color code 49 should be some sort of default background.
Screenshots
Desktop (please complete the following information):
Proposed fix
This is an issue that Dozzle inherits from ansi-to-html, which has a default background color of black. Changing the initialization of
AnsiConvertor
inassets/components/LogViewer/SimpleLogItem.vue
to something likenew AnsiConvertor({ escapeXML: false, fg: "var(--base-content-color)", bg: "initial" });
seems to address the problem.Here both
bg: "initial"
andbg: "transparent"
work for my purposes. It's possible that settingfg: "initial"
would also simplify matters, but fg colors currently seem fine to me.The text was updated successfully, but these errors were encountered: