fix: add missing getSeverityColor function for Historical Analysis

- Add getSeverityColor function to handle recommendation severity colors
- Fix ReferenceError when loading workload details in Historical Analysis
- Ensure proper color coding for recommendation severity levels
This commit is contained in:
2025-10-02 15:48:55 -03:00
parent c6f69f85c9
commit fad4d422b7

View File

@@ -1305,6 +1305,15 @@
return max.toFixed(3);
}
function getSeverityColor(severity) {
switch(severity) {
case 'error': return 'var(--pf-global--danger-color--100)';
case 'warning': return 'var(--pf-global--warning-color--100)';
case 'info': return 'var(--pf-global--info-color--100)';
default: return 'var(--pf-global--Color--300)';
}
}
function createCPUChart(canvasId, cpuData) {
const ctx = document.getElementById(canvasId);
if (!ctx) return;