Add simulated data fallback for historical analysis when Prometheus is not accessible
This commit is contained in:
@@ -1556,8 +1556,13 @@
|
||||
const clusterTotalDiv = document.getElementById('clusterTotal');
|
||||
const workloadDataDiv = document.getElementById('workloadData');
|
||||
|
||||
// Add data source indicator
|
||||
const dataSourceIndicator = data.data_source === 'simulated' ?
|
||||
'<div style="background: #fff3cd; border: 1px solid #ffeaa7; border-radius: 4px; padding: 10px; margin-bottom: 15px; color: #856404;"><strong>📊 Demo Mode:</strong> Showing simulated data for demonstration. Prometheus integration requires proper RBAC configuration.</div>' :
|
||||
'<div style="background: #d4edda; border: 1px solid #c3e6cb; border-radius: 4px; padding: 10px; margin-bottom: 15px; color: #155724;"><strong>✅ Live Data:</strong> Real metrics from Prometheus</div>';
|
||||
|
||||
// Render cluster total resources
|
||||
clusterTotalDiv.innerHTML = `
|
||||
clusterTotalDiv.innerHTML = dataSourceIndicator + `
|
||||
<div class="cluster-stats">
|
||||
<div class="stat-card">
|
||||
<h4>CPU Total</h4>
|
||||
|
||||
Reference in New Issue
Block a user