Fix logs not loading for single container services (#7509)
This commit is contained in:
commit
f0fbaf3652
2 changed files with 6 additions and 3 deletions
|
|
@ -122,7 +122,7 @@ public function getLogs($refresh = false)
|
|||
if (! $this->server->isFunctional()) {
|
||||
return;
|
||||
}
|
||||
if (! $refresh && ($this->resource?->getMorphClass() === \App\Models\Service::class || str($this->container)->contains('-pr-'))) {
|
||||
if (! $refresh && ! $this->expandByDefault && ($this->resource?->getMorphClass() === \App\Models\Service::class || str($this->container)->contains('-pr-'))) {
|
||||
return;
|
||||
}
|
||||
if ($this->numberOfLines <= 0 || is_null($this->numberOfLines)) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div id="screen" x-data="{
|
||||
collapsible: {{ $collapsible ? 'true' : 'false' }},
|
||||
expanded: {{ ($expandByDefault || !$collapsible) ? 'true' : 'false' }},
|
||||
logsLoaded: {{ ($expandByDefault || !$collapsible) ? 'true' : 'false' }},
|
||||
logsLoaded: false,
|
||||
fullscreen: false,
|
||||
alwaysScroll: false,
|
||||
intervalId: null,
|
||||
|
|
@ -156,7 +156,10 @@
|
|||
URL.revokeObjectURL(url);
|
||||
},
|
||||
init() {
|
||||
if (this.expanded) { this.$wire.getLogs(); }
|
||||
if (this.expanded) {
|
||||
this.$wire.getLogs();
|
||||
this.logsLoaded = true;
|
||||
}
|
||||
// Re-render logs after Livewire updates
|
||||
Livewire.hook('commit', ({ succeed }) => {
|
||||
succeed(() => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue