mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 17:21:04 +00:00
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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user