mirror of
https://github.com/community-unscripted/telemetry-service.git
synced 2026-06-30 20:57:55 -04:00
Add preflight category styling and mappings
Introduce a new 'preflight' category and wire it through the UI and service logic. Updates: - public/static/css/error-analysis.css: add .category-badge styles (preflight, proxmox, service, database, shell, build) to provide consistent color badges. - public/static/js/error-analysis.js: add 'preflight' color to catColors so the UI can render the new category. - service.go: register 'preflight' as a known category and reclassify exit codes 103–108 from various categories to 'preflight' (these are validation/initial checks). This groups validation-related errors under a single category for clearer display and handling in the frontend.
This commit is contained in:
@@ -475,6 +475,36 @@ tr:hover td {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.category-badge.preflight {
|
||||
background: rgba(20, 184, 166, 0.15);
|
||||
color: #14b8a6;
|
||||
}
|
||||
|
||||
.category-badge.proxmox {
|
||||
background: rgba(245, 158, 11, 0.15);
|
||||
color: #f59e0b;
|
||||
}
|
||||
|
||||
.category-badge.service {
|
||||
background: rgba(6, 182, 212, 0.15);
|
||||
color: #06b6d4;
|
||||
}
|
||||
|
||||
.category-badge.database {
|
||||
background: rgba(139, 92, 246, 0.15);
|
||||
color: #8b5cf6;
|
||||
}
|
||||
|
||||
.category-badge.shell {
|
||||
background: rgba(251, 146, 60, 0.15);
|
||||
color: #fb923c;
|
||||
}
|
||||
|
||||
.category-badge.build {
|
||||
background: rgba(217, 70, 239, 0.15);
|
||||
color: #d946ef;
|
||||
}
|
||||
|
||||
.charts-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
|
||||
@@ -9,7 +9,8 @@ const catColors = {
|
||||
'storage': '#ec4899', 'resource': '#f97316', 'dependency': '#22d3ee',
|
||||
'signal': '#eab308', 'config': '#84cc16', 'unknown': '#64748b',
|
||||
'uncategorized': '#94a3b8', 'service': '#06b6d4', 'database': '#8b5cf6',
|
||||
'proxmox': '#f59e0b', 'shell': '#fb923c', 'build': '#d946ef'
|
||||
'proxmox': '#f59e0b', 'shell': '#fb923c', 'build': '#d946ef',
|
||||
'preflight': '#14b8a6'
|
||||
};
|
||||
|
||||
function escapeHtml(str) {
|
||||
|
||||
+7
-7
@@ -1009,7 +1009,7 @@ var (
|
||||
"timeout": true, "config": true, "resource": true, "unknown": true, "": true,
|
||||
"user_aborted": true, "apt": true, "command_not_found": true,
|
||||
"service": true, "database": true, "signal": true, "proxmox": true,
|
||||
"shell": true, "build": true,
|
||||
"shell": true, "build": true, "preflight": true,
|
||||
}
|
||||
|
||||
// exitCodeInfo consolidates description and category for all known exit codes.
|
||||
@@ -1081,12 +1081,12 @@ var (
|
||||
102: {"APT: Lock held by another process", "apt"},
|
||||
|
||||
// --- Script Validation & Setup (103-123) ---
|
||||
103: {"Validation: Shell is not Bash", "config"},
|
||||
104: {"Validation: Not running as root", "permission"},
|
||||
105: {"Validation: PVE version not supported", "config"},
|
||||
106: {"Validation: Architecture not supported (ARM/PiMox)", "config"},
|
||||
107: {"Validation: Kernel key parameters unreadable", "config"},
|
||||
108: {"Validation: Kernel key limits exceeded", "config"},
|
||||
103: {"Validation: Shell is not Bash", "preflight"},
|
||||
104: {"Validation: Not running as root", "preflight"},
|
||||
105: {"Validation: PVE version not supported", "preflight"},
|
||||
106: {"Validation: Architecture not supported (ARM/PiMox)", "preflight"},
|
||||
107: {"Validation: Kernel key parameters unreadable", "preflight"},
|
||||
108: {"Validation: Kernel key limits exceeded", "preflight"},
|
||||
109: {"Proxmox: No available container ID", "proxmox"},
|
||||
110: {"Proxmox: Failed to apply default.vars", "proxmox"},
|
||||
111: {"Proxmox: App defaults file not available", "proxmox"},
|
||||
|
||||
Reference in New Issue
Block a user