- 2.x - sites (wip)

- improved ssh error handling
- database soft deletes
This commit is contained in:
Saeed Vaziry
2024-10-04 21:34:07 +02:00
parent ecdba02bc9
commit d1f2add699
64 changed files with 1340 additions and 421 deletions

View File

@ -97,13 +97,17 @@ public function write($buf): void
}
}
public function getContent(): ?string
public function getContent($lines = null): ?string
{
if ($this->is_remote) {
return $this->server->os()->tail($this->name, 150);
return $this->server->os()->tail($this->name, $lines ?? 150);
}
if (Storage::disk($this->disk)->exists($this->name)) {
if ($lines) {
return tail(Storage::disk($this->disk)->path($this->name), $lines);
}
return Storage::disk($this->disk)->get($this->name);
}