feat(logs): accept all for log lines and keep -1

API log endpoints and the GetLogs UI now treat `all` as unbounded
output, with `-1` remaining as a compatibility alias. MCP still
falls back to a positive default. Traefik version checks run from
CheckForUpdatesJob instead of a weekly schedule.
This commit is contained in:
Andras Bacsai
2026-09-13 15:25:20 +02:00
parent 6f58ad4b97
commit 7d11bc92f7
15 changed files with 186 additions and 39 deletions
@@ -74,6 +74,29 @@ describe('GetLogs locked properties', function () {
});
describe('GetLogs Livewire action validation', function () {
test('getLogs requests all logs when the line count is minus one', function () {
$this->server->settings->fill([
'is_reachable' => true,
'is_usable' => true,
'force_disabled' => false,
])->save();
$server = Server::with('settings')->findOrFail($this->server->id);
Process::fake(['*' => Process::result(output: 'all logs')]);
Livewire::test(GetLogs::class, [
'server' => $server,
'resource' => $this->application,
'container' => 'test-container',
])
->assertSee('All')
->assertSeeHtml('title="Show all logs"')
->call('showAllLogs')
->assertSet('numberOfLines', -1);
Process::assertRan(fn ($process) => str_contains($process->command, 'docker logs -n all'));
});
test('getLogs marks ANSI-colored output truncated based on raw bytes', function () {
$this->server->settings->fill([
'is_reachable' => true,