Add service information feature with version checks
All checks were successful
PostgreSQL Compatibility Matrix / PG14 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG15 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG16 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG17 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG18 smoke (push) Successful in 8s
All checks were successful
PostgreSQL Compatibility Matrix / PG14 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG15 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG16 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG17 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG18 smoke (push) Successful in 8s
This commit introduces a new "Service Information" section displaying runtime details, installed version, and update status for the NexaPG application. It includes backend API endpoints, database schema changes, and a corresponding frontend page that allows users to check for updates against the official repository. The `.env` example now includes an `APP_VERSION` variable, and related documentation has been updated.
This commit is contained in:
29
backend/app/schemas/service_info.py
Normal file
29
backend/app/schemas/service_info.py
Normal file
@@ -0,0 +1,29 @@
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class ServiceInfoOut(BaseModel):
|
||||
app_name: str
|
||||
environment: str
|
||||
api_prefix: str
|
||||
app_version: str
|
||||
hostname: str
|
||||
python_version: str
|
||||
platform: str
|
||||
service_started_at: datetime
|
||||
uptime_seconds: int
|
||||
update_source: str
|
||||
latest_version: str | None
|
||||
latest_ref: str | None
|
||||
update_available: bool
|
||||
last_checked_at: datetime | None
|
||||
last_check_error: str | None
|
||||
|
||||
|
||||
class ServiceInfoCheckResult(BaseModel):
|
||||
latest_version: str | None
|
||||
latest_ref: str | None
|
||||
update_available: bool
|
||||
last_checked_at: datetime
|
||||
last_check_error: str | None
|
||||
Reference in New Issue
Block a user