Skip to content

[Feat] Service Logs Viewer#1108

Open
RichardAnderson wants to merge 7 commits into
vitodeploy:4.xfrom
RichardAnderson:feat/service-log-view
Open

[Feat] Service Logs Viewer#1108
RichardAnderson wants to merge 7 commits into
vitodeploy:4.xfrom
RichardAnderson:feat/service-log-view

Conversation

@RichardAnderson
Copy link
Copy Markdown
Member

Service logs for vito servers.

image
  • Introduces a new section in the server level logs menu called "Service Logs".
  • Allows download of a full log file, change number of lines returned, clear a log.
  • Services updated to include "HasLogs", logs() returns an array of logs to expose in Service Logs, so installed services get exposed automatically.
  • Renamed "Remote Logs" to "Custom Logs"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “Service logs” viewer under server logs, exposing log sources directly from installed services (via a HasLogs contract) and enabling read/search, download, and (file-only) clear actions.

Changes:

  • Introduces service log catalogue generation (GetServiceLogs) and new service log DTO/contract (ServiceLog, HasLogs) implemented across multiple services.
  • Adds new server log endpoints and Inertia page for viewing/searching/downloading/clearing service logs.
  • Adds SSH Blade helpers for journal/file searching and creates a feature test suite for the new service logs routes.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/Feature/ServiceLogsTest.php Adds feature coverage for catalogue/rendering/auth, read validation, clear behavior, and download route.
resources/views/ssh/os/journal-read.blade.php Adds journalctl-based log reading with optional grep filtering.
resources/views/ssh/os/journal-dump.blade.php Adds journal dump-to-file script for downloads.
resources/views/ssh/os/grep.blade.php Adds sudo grep helper used for file log searching.
resources/js/pages/server-logs/services.tsx New Inertia page implementing the service log viewer UI (select/search/refresh/download/clear).
resources/js/layouts/server/layout.tsx Adds “Service logs” nav item and renames “Remote logs” to “Custom logs”.
resources/js/components/ui/combobox.tsx Adds placeholder support and muted placeholder styling.
app/Services/Webserver/Nginx.php Implements HasLogs and exposes nginx error/access logs.
app/Services/Webserver/Caddy.php Implements HasLogs and exposes caddy error log.
app/Services/Valkey/Valkey.php Implements HasLogs and exposes Valkey systemd journal.
app/Services/Redis/Redis.php Implements HasLogs and exposes Redis systemd journal.
app/Services/ProcessManager/Supervisor.php Implements HasLogs and exposes supervisord log.
app/Services/PHP/PHP.php Implements HasLogs and exposes PHP-FPM journal + per-site-user error logs.
app/Services/Firewall/Ufw.php Implements HasLogs and exposes UFW log file.
app/Services/Database/Postgresql.php Implements HasLogs and exposes PostgreSQL systemd journal.
app/Services/Database/Mysql.php Implements HasLogs and exposes MySQL systemd journal.
app/Services/Database/Mariadb.php Implements HasLogs and exposes MariaDB systemd journal.
app/Services/ServiceLog.php Adds DTO representing a single exposed service log and its display formatting.
app/Services/HasLogs.php Adds contract for services that expose logs to the viewer.
app/Providers/AppServiceProvider.php Registers GetServiceLogs as a scoped service (request-level cache).
app/Policies/ServerLogPolicy.php Adds viewServiceLogs and manageServiceLogs abilities.
app/Http/Controllers/ServerLogController.php Adds service logs routes (catalogue/read/download/clear) and updates remote logs title.
app/Actions/Server/ReadServiceLog.php Adds validated service log reading (tail/grep/journalctl) via SSH templates.
app/Actions/Server/GetServiceLogs.php Builds the service log catalogue from READY services + a system sshd journal entry.
app/Actions/Server/DownloadServiceLog.php Adds service log download flow (file or journal dump + SFTP download + delayed cleanup).
app/Actions/Server/ClearServiceLog.php Adds validation + file-only clear behavior.

Comment thread app/Actions/Server/DownloadServiceLog.php Outdated
Comment thread resources/views/ssh/os/journal-read.blade.php Outdated
Comment thread resources/views/ssh/os/grep.blade.php Outdated
Comment thread tests/Feature/ServiceLogsTest.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants