Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion dashboard/src/components/shared/ConsoleDisplayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export default {
},

appendLogContent(element, log) {
const levelMatch = log.match(/\[(DEBG|INFO|WARN|ERRO|CRIT|DEBUG|WARNING|ERROR|CRITICAL)\]/);
const levelMatch = log.match(/\[(DBUG|INFO|WARN|ERRO|CRIT|DEBUG|WARNING|ERROR|CRITICAL)\]/);
if (!levelMatch) {
element.innerText = `${log}`;
return;
Expand Down Expand Up @@ -361,6 +361,7 @@ export default {
background-color: #1e1e1e;
border-radius: 8px;
height: 100%;
overflow-x: auto;
overflow-y: auto;
padding: 16px;
}
Expand Down Expand Up @@ -400,6 +401,22 @@ export default {
overflow-wrap: anywhere;
}

@media (max-width: 768px) {
.console-term {
padding: 12px;
}

:deep(.console-log-line--structured) {
min-width: max-content;
}
Comment on lines +409 to +411
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The mobile fix for "near-vertical" log wrapping (reported in #7987) currently only applies to structured logs. Non-structured logs (those that do not match the level regex) will still use white-space: pre-wrap from the .console-log-line class (defined at line 378), causing them to wrap aggressively on narrow screens.

To ensure all logs behave consistently on mobile, you should apply min-width: max-content and white-space: pre to the base .console-log-line class as well. For structured logs, we should maintain white-space: normal on the grid container to preserve the layout while allowing the message child to handle its own wrapping/scrolling.

  :deep(.console-log-line),
  :deep(.console-log-line--structured) {
    min-width: max-content;
  }

  :deep(.console-log-line) {
    white-space: pre;
  }

  :deep(.console-log-line--structured) {
    white-space: normal;
  }

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I’ll test the non-structured log case on mobile first and update the PR if needed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I checked the current reproduction scope, and all observed platform logs are still going through the structured path. Since this PR is focused on the confirmed DBUG mismatch and the mobile layout issue reported in #7987, I’d prefer not to expand it into a broader fallback-layout change unless we can reproduce a real non-structured case in this log view.


:deep(.console-log-message) {
overflow-wrap: normal;
word-break: normal;
white-space: pre;
}
}

:deep(.fade-in) {
animation: fadeIn 0.3s;
}
Expand Down