-
-
-
+
+
{% if has_issues %}
{% else %}
@@ -244,22 +244,24 @@
System Health
- {% if has_issues %}
-
- {% if cpu_percent > 80 %}- CPU usage is high ({{ cpu_percent }}%)
{% endif %}
- {% if memory.percent > 85 %}- Memory usage is high ({{ memory.percent }}%)
{% endif %}
- {% if disk.percent > 90 %}- Disk space is critically low ({{ disk.percent }}% used)
{% endif %}
-
- {% else %}
-
All resources are within normal operating parameters.
- {% endif %}
+
+ {% if has_issues %}
+
+ {% if cpu_percent > 80 %}- CPU usage is high ({{ cpu_percent }}%)
{% endif %}
+ {% if memory.percent > 85 %}- Memory usage is high ({{ memory.percent }}%)
{% endif %}
+ {% if disk.percent > 90 %}- Disk space is critically low ({{ disk.percent }}% used)
{% endif %}
+
+ {% else %}
+
All resources are within normal operating parameters.
+ {% endif %}
+
-
{{ app.uptime_days }}d
+
{{ app.uptime_days }}d
Uptime
-
{{ app.buckets }}
+
{{ app.buckets }}
Active Buckets
@@ -480,6 +482,55 @@
el = document.querySelector('[data-metric="objects_count"]');
if (el) el.textContent = data.app.objects;
+ var cpuHigh = data.cpu_percent > 80;
+ var memHigh = data.memory.percent > 85;
+ var diskHigh = data.disk.percent > 90;
+ var hasIssues = cpuHigh || memHigh || diskHigh;
+
+ var healthCard = document.getElementById('systemHealthCard');
+ if (healthCard) {
+ healthCard.style.background = hasIssues
+ ? 'linear-gradient(135deg, #ef4444 0%, #f97316 100%)'
+ : 'linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%)';
+ }
+
+ var healthIcon = document.getElementById('healthIcon');
+ if (healthIcon) {
+ healthIcon.innerHTML = hasIssues
+ ? '
'
+ : '
';
+ }
+
+ var healthBadge = document.getElementById('healthBadge');
+ if (healthBadge) {
+ healthBadge.className = 'badge bg-white fw-semibold px-3 py-2 ' + (hasIssues ? 'text-danger' : 'text-primary');
+ }
+
+ var healthBadgeIcon = document.getElementById('healthBadgeIcon');
+ if (healthBadgeIcon) {
+ healthBadgeIcon.innerHTML = hasIssues
+ ? '
'
+ : '
';
+ }
+
+ var healthContent = document.getElementById('healthContent');
+ if (healthContent) {
+ if (hasIssues) {
+ var issues = [];
+ if (cpuHigh) issues.push('
CPU usage is high (' + data.cpu_percent.toFixed(1) + '%)');
+ if (memHigh) issues.push('
Memory usage is high (' + data.memory.percent.toFixed(1) + '%)');
+ if (diskHigh) issues.push('
Disk space is critically low (' + data.disk.percent.toFixed(1) + '% used)');
+ healthContent.innerHTML = '
';
+ } else {
+ healthContent.innerHTML = '
All resources are within normal operating parameters.
';
+ }
+ }
+
+ el = document.querySelector('[data-metric="health_uptime"]');
+ if (el) el.textContent = data.app.uptime_days + 'd';
+ el = document.querySelector('[data-metric="health_buckets"]');
+ if (el) el.textContent = data.app.buckets;
+
countdown = 5;
})
.catch(function(err) {