mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-17 17:01:37 +00:00
- refactoring architecture - fix incomplete ssh logs - code editor for scripts in the app - remove Jobs and SSHCommands
30 lines
635 B
PHP
30 lines
635 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Server;
|
|
use App\Models\ServerLog;
|
|
use Illuminate\Contracts\View\View;
|
|
use Illuminate\Http\RedirectResponse;
|
|
|
|
class ServerLogController extends Controller
|
|
{
|
|
public function index(Server $server): View
|
|
{
|
|
return view('server-logs.index', [
|
|
'server' => $server,
|
|
]);
|
|
}
|
|
|
|
public function show(Server $server, ServerLog $serverLog): RedirectResponse
|
|
{
|
|
if ($server->id != $serverLog->server_id) {
|
|
abort(404);
|
|
}
|
|
|
|
return back()->with([
|
|
'content' => $serverLog->getContent(),
|
|
]);
|
|
}
|
|
}
|