From 1dcd83abea38f7721d0415e656c3f5bd35acd8b8 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Tue, 10 Feb 2026 16:20:26 +0100 Subject: [PATCH] Add sortable dashboard; extend telemetry data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dashboard: add sortable table UI and client-side sorting support — CSS for sortable headers, data-sort attributes, default sort on Created (desc), timestamp formatting, header click handling, and inclusion of sort param in paginated fetches. Records now show a formatted Created column with full timestamp in the title. Initialize sortable headers on load. Telemetry/client: switch to sending a full JSON payload (allows create if initial PATCH failed) and include extra fields (ct_type, disk_size, core_count, ram_size, os_type, os_version, pve_version, method). pve_version is detected when available. Server: extend FetchRecordsPaginated to accept a sort field, validate allowed sort fields to prevent injection, use the sort when building the PB API request (default -created), and propagate the sort query param from the HTTP handler to the fetch call. Overall this enables server-side sorted pagination from the dashboard and richer telemetry records. --- misc/api.func | 18 ++++++++- misc/data/dashboard.go | 90 ++++++++++++++++++++++++++++++++++++++---- misc/data/service.go | 27 +++++++++++-- 3 files changed, 121 insertions(+), 14 deletions(-) diff --git a/misc/api.func b/misc/api.func index f4104f833..12b63c5ad 100644 --- a/misc/api.func +++ b/misc/api.func @@ -421,8 +421,14 @@ post_update_to_api() { duration=$(($(date +%s) - INSTALL_START_TIME)) fi - # Update payload: only fields that change (status, error, exit_code, duration, gpu) - # The Go service will find the record by random_id and PATCH only these fields + # Get PVE version + local pve_version="" + if command -v pveversion &>/dev/null; then + pve_version=$(pveversion 2>/dev/null | awk -F'[/ ]' '{print $2}') || true + fi + + # Full payload including all fields - allows record creation if initial call failed + # The Go service will find the record by random_id and PATCH, or create if not found local JSON_PAYLOAD JSON_PAYLOAD=$( cat <All OS - +
- - - - - + + + + + - + + - +
AppStatusOSTypeMethodAppStatusOSTypeMethod ResourcesExit CodeExit Code ErrorCreated ▼
Loading...
Loading...