fix(logs): Remove hardcoded 2000 line display limit

The log viewer was artificially limiting display to 2000 lines
regardless of user's requested amount. Users could request 10k, 40k,
or 50k lines but only 2000 were ever shown.

Changes:
- Remove the hardcoded $maxDisplayLines = 2000 limit in the view
- Add MAX_LOG_LINES constant (50,000) in GetLogs component
- Enforce maximum limit in backend to prevent extremely large requests
- Update input field with max attribute and tooltip

Fixes #7803
This commit is contained in:
Claude committed 2025-12-29 17:52:35 +00:00
1 parent b7e0f5577d
commit b484c0cc25
2 files changed
+8 -13

No files matched your search

+5
View File
@@ -21,6 +21,8 @@ use Livewire\Component;
class GetLogs extends Component
{
public const MAX_LOG_LINES = 50000;
public string $outputs = '';
public string $errors = '';
@@ -123,6 +125,9 @@ class GetLogs extends Component
if ($this->numberOfLines <= 0 || is_null($this->numberOfLines)) {
$this->numberOfLines = 1000;
}
if ($this->numberOfLines > self::MAX_LOG_LINES) {
$this->numberOfLines = self::MAX_LOG_LINES;
}
if ($this->container) {
if ($this->showTimeStamps) {
if ($this->server->isSwarm()) {