Change look of status page

This commit is contained in:
Peter Stockings
2025-12-23 22:36:44 +11:00
parent c792b0107b
commit a597930fde
2 changed files with 533 additions and 319 deletions

View File

@@ -1,257 +1,315 @@
{% macro donut(label, pct, subtitle, value_text=None) %}
{% macro gauge(label, pct, subtitle, value_text=None) %}
{% set p = pct if pct is not none else 0 %}
{% if p < 0 %}{% set p=0 %}{% endif %} {% if p> 100 %}{% set p = 100 %}{% endif %}
{% if p < 60 %} {% set col="#16a34a" %} {% elif p < 85 %} {% set col="#f59e0b" %} {% else %} {% set col="#ef4444" %}
{% endif %} {% set r=24 %} {% set stroke=10 %} {% set c=2 * 3.1415926 * r %} {% set dash=(p / 100.0) * c %} {%
set txt=value_text if value_text else (p|round(0) ~ "%" ) %} <div style="
border:1px solid rgba(0,0,0,.08);
border-radius: 16px;
padding: 14px;
background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.80));
box-shadow: 0 8px 24px rgba(0,0,0,.06);
display:flex;
align-items:center;
gap: 14px;
min-height: 92px;
{% if p < 60 %} {% set col="#00ff88" %} {% set status="OK" %} {% elif p < 85 %} {% set col="#ffb86c" %} {% set
status="WARN" %} {% else %} {% set col="#ff5555" %} {% set status="CRIT" %} {% endif %} {% set txt=value_text if
value_text else (p|round(0)|int ~ "%" ) %} <div style="
border: 2px solid {{ col }};
background: rgba({{ '0, 255, 136' if p < 60 else ('255, 184, 108' if p < 85 else '255, 85, 85') }}, 0.05);
padding: 16px;
position: relative;
transition: all 0.3s ease;
">
<!-- Status indicator -->
<div style="
position: absolute;
top: 8px;
right: 8px;
font-size: 9px;
font-weight: 700;
letter-spacing: 1px;
color: {{ col }};
padding: 2px 6px;
border: 1px solid {{ col }};
background: rgba({{ '0, 255, 136' if p < 60 else ('255, 184, 108' if p < 85 else '255, 85, 85') }}, 0.1);
">
<svg width="72" height="72" viewBox="0 0 72 72" style="flex: 0 0 auto;">
<defs>
<filter id="softShadow" x="-50%" y="-50%" width="200%" height="200%">
<feDropShadow dx="0" dy="2" stdDeviation="2" flood-opacity="0.18" />
</filter>
</defs>
[{{ status }}]
</div>
<!-- track -->
<circle cx="36" cy="36" r="{{ r }}" fill="none" stroke="rgba(0,0,0,.08)" stroke-width="{{ stroke }}"
stroke-linecap="round" />
<!-- Label -->
<div style="
font-size: 11px;
font-weight: 700;
letter-spacing: 2px;
color: #8b949e;
text-transform: uppercase;
margin-bottom: 8px;
">
> {{ label }}
</div>
<!-- progress -->
<circle cx="36" cy="36" r="{{ r }}" fill="none" stroke="{{ col }}" stroke-width="{{ stroke }}"
stroke-linecap="round" stroke-dasharray="{{ dash }} {{ c - dash }}" transform="rotate(-90 36 36)"
filter="url(#softShadow)" />
<!-- Value -->
<div style="
font-size: 28px;
font-weight: 700;
color: {{ col }};
margin-bottom: 8px;
text-shadow: 0 0 10px rgba({{ '0, 255, 136' if p < 60 else ('255, 184, 108' if p < 85 else '255, 85, 85') }}, 0.5);
">
{{ txt }}
</div>
<!-- center -->
<text x="36" y="40" text-anchor="middle" font-size="14" font-weight="800"
font-family="system-ui, -apple-system, Segoe UI, Roboto" fill="rgba(0,0,0,.82)">{{ txt }}</text>
</svg>
<!-- Subtitle -->
<div style="
font-size: 11px;
color: #8b949e;
margin-bottom: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
">
{{ subtitle }}
</div>
<div style="min-width: 0; width: 100%;">
<div style="display:flex; align-items:center; justify-content:space-between; gap: 10px;">
<div style="font-weight:800; letter-spacing:-0.2px;">{{ label }}</div>
<div style="
font-size:12px;
padding: 2px 8px;
border-radius: 999px;
background: rgba(0,0,0,.04);
color: rgba(0,0,0,.65);
flex: 0 0 auto;">
live
</div>
</div>
<!-- Progress bar -->
<div style="
height: 6px;
background: #30363d;
position: relative;
overflow: hidden;
">
<div style="
height: 100%;
width: {{ p }}%;
background: {{ col }};
box-shadow: 0 0 10px {{ col }};
transition: width 0.5s ease;
"></div>
</div>
<div
style="margin-top:4px; font-size:12.5px; color: rgba(0,0,0,.62); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;">
{{ subtitle }}
</div>
<div
style="margin-top:10px; height:8px; border-radius:999px; background: rgba(0,0,0,.07); overflow:hidden;">
<div style="height:100%; width: {{ p }}%; background: {{ col }}; border-radius:999px;"></div>
</div>
<!-- ASCII bar representation -->
<div style="
font-size: 10px;
color: {{ col }};
margin-top: 8px;
font-family: 'JetBrains Mono', monospace;
letter-spacing: 0;
">
{% set blocks = (p / 5)|round(0)|int %}
{% set empty = 20 - blocks %}
[{% for i in range(blocks) %}█{% endfor %}{% for i in range(empty) %}░{% endfor %}]
</div>
</div>
{% endmacro %}
<h2
style="margin-top: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.3px; color: #1e293b; margin-bottom: 16px;">
📊 Live Usage</h2>
<h2>[ LIVE METRICS ]</h2>
<div
style="display:grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 0 0 32px 0;">
{{ donut("CPU", data.gauges.cpu_total_pct, "Sum of container CPU% (clamped)") }}
{{ donut("RAM", data.gauges.ram_pct, "All containers vs host RAM", (data.gauges.ram_used_h ~ " / " ~
style="display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 0 0 32px 0;">
{{ gauge("CPU", data.gauges.cpu_total_pct, "Sum of container CPU% (clamped)") }}
{{ gauge("RAM", data.gauges.ram_pct, "All containers vs host RAM", (data.gauges.ram_used_h ~ " / " ~
data.gauges.ram_total_h)) }}
{{ donut("Docker disk", data.gauges.docker_images_pct, "Images used vs total store") }}
{{ gauge("DOCKER_DISK", data.gauges.docker_images_pct, "Images used vs total store") }}
</div>
<h2 style="font-size: 22px; font-weight: 800; letter-spacing: -0.3px; color: #1e293b; margin-bottom: 16px;">💻
System</h2>
<h2>[ SYSTEM INFO ]</h2>
<div
style="display:grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 0 0 32px 0;">
style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 0 0 32px 0;">
<div style="
border: 1px solid rgba(102, 126, 234, 0.15);
border-radius: 16px;
padding: 20px;
background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
transition: all 0.3s ease;
" onmouseover="this.style.transform='translateY(-2px)'; this.style.boxShadow='0 8px 20px rgba(0,0,0,0.08)';"
onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='0 4px 12px rgba(0,0,0,0.04)';">
<div
style="color: #64748b; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;">
🖥️ Host</div>
<div style="font-size: 18px; font-weight: 800; color: #1e293b; margin-bottom: 6px;">{{ data.system.name
or "—" }}</div>
<div style="color: #64748b; font-size: 13px; line-height: 1.5;">{{ data.system.operating_system }} · {{
data.system.kernel_version }}</div>
border: 2px solid #30363d;
background: rgba(0, 217, 255, 0.02);
padding: 20px;
transition: all 0.3s ease;
" onmouseover="this.style.borderColor='#00d9ff'; this.style.boxShadow='0 0 20px rgba(0, 217, 255, 0.3)';"
onmouseout="this.style.borderColor='#30363d'; this.style.boxShadow='none';">
<div style="
color: #00d9ff;
font-size: 10px;
font-weight: 700;
letter-spacing: 2px;
text-transform: uppercase;
margin-bottom: 12px;
">
[HOST]
</div>
<div style="font-size: 18px; font-weight: 700; color: #c9d1d9; margin-bottom: 8px;">
{{ data.system.name or "—" }}
</div>
<div style="color: #8b949e; font-size: 12px; line-height: 1.6;">
{{ data.system.operating_system }}<br>
Kernel: {{ data.system.kernel_version }}
</div>
</div>
<div style="
border: 1px solid rgba(102, 126, 234, 0.15);
border-radius: 16px;
padding: 20px;
background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
transition: all 0.3s ease;
" onmouseover="this.style.transform='translateY(-2px)'; this.style.boxShadow='0 8px 20px rgba(0,0,0,0.08)';"
onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='0 4px 12px rgba(0,0,0,0.04)';">
<div
style="color: #64748b; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;">
⚡ Compute</div>
<div style="font-size: 15px; font-weight: 600; color: #334155; margin-bottom: 4px;"><strong
style="color: #667eea; font-size: 18px;">{{ data.system.cpus or "—" }}</strong> CPUs</div>
<div style="font-size: 15px; font-weight: 600; color: #334155;"><strong
style="color: #667eea; font-size: 18px;">{{ data.system.mem_total_h or "—" }}</strong> RAM</div>
border: 2px solid #30363d;
background: rgba(0, 255, 136, 0.02);
padding: 20px;
transition: all 0.3s ease;
" onmouseover="this.style.borderColor='#00ff88'; this.style.boxShadow='0 0 20px rgba(0, 255, 136, 0.3)';"
onmouseout="this.style.borderColor='#30363d'; this.style.boxShadow='none';">
<div style="
color: #00ff88;
font-size: 10px;
font-weight: 700;
letter-spacing: 2px;
text-transform: uppercase;
margin-bottom: 12px;
">
[COMPUTE]
</div>
<div style="font-size: 14px; font-weight: 600; color: #c9d1d9; margin-bottom: 6px;">
<span style="color: #00ff88; font-size: 20px; font-weight: 700;">{{ data.system.cpus or "—"
}}</span> CPUs
</div>
<div style="font-size: 14px; font-weight: 600; color: #c9d1d9;">
<span style="color: #00ff88; font-size: 20px; font-weight: 700;">{{ data.system.mem_total_h or "—"
}}</span> RAM
</div>
</div>
<div style="
border: 1px solid rgba(102, 126, 234, 0.15);
border-radius: 16px;
padding: 20px;
background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
transition: all 0.3s ease;
" onmouseover="this.style.transform='translateY(-2px)'; this.style.boxShadow='0 8px 20px rgba(0,0,0,0.08)';"
onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='0 4px 12px rgba(0,0,0,0.04)';">
<div
style="color: #64748b; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;">
🐳 Docker</div>
<div style="font-size: 13px; color: #334155; margin-bottom: 4px; line-height: 1.6;">Engine: <strong
style="color: #667eea;">{{ data.system.server_version or "—" }}</strong></div>
<div style="font-size: 13px; color: #334155; margin-bottom: 4px; line-height: 1.6;">Images: <strong
style="color: #667eea;">{{ data.system.images or "—" }}</strong></div>
<div style="font-size: 13px; color: #334155; line-height: 1.6;">Containers: <strong
style="color: #16a34a;">{{ data.system.containers_running or "—" }}</strong> running / <strong
style="color: #64748b;">{{ data.system.containers_stopped or "—" }}</strong> stopped</div>
border: 2px solid #30363d;
background: rgba(255, 184, 108, 0.02);
padding: 20px;
transition: all 0.3s ease;
" onmouseover="this.style.borderColor='#ffb86c'; this.style.boxShadow='0 0 20px rgba(255, 184, 108, 0.3)';"
onmouseout="this.style.borderColor='#30363d'; this.style.boxShadow='none';">
<div style="
color: #ffb86c;
font-size: 10px;
font-weight: 700;
letter-spacing: 2px;
text-transform: uppercase;
margin-bottom: 12px;
">
[DOCKER]
</div>
<div style="font-size: 12px; color: #c9d1d9; margin-bottom: 6px; line-height: 1.7;">
Engine: <span style="color: #ffb86c; font-weight: 700;">{{ data.system.server_version or "—"
}}</span>
</div>
<div style="font-size: 12px; color: #c9d1d9; margin-bottom: 6px; line-height: 1.7;">
Images: <span style="color: #ffb86c; font-weight: 700;">{{ data.system.images or "—" }}</span>
</div>
<div style="font-size: 12px; color: #c9d1d9; line-height: 1.7;">
Containers: <span style="color: #00ff88; font-weight: 700;">{{ data.system.containers_running or "—"
}}</span> up / <span style="color: #8b949e; font-weight: 700;">{{ data.system.containers_stopped
or "—" }}</span> down
</div>
</div>
</div>
<h3 style="font-size: 18px; font-weight: 700; letter-spacing: -0.2px; color: #334155; margin: 32px 0 16px 0;">💾
Docker Disk Usage</h3>
<div style="overflow-x: auto; border-radius: 12px; border: 1px solid rgba(0,0,0,0.06);">
<table style="margin: 0;">
<h3>DOCKER DISK USAGE</h3>
<div style="overflow-x: auto; margin-bottom: 24px;">
<table>
<thead>
<tr>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
Type</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
Total</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
Active</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
Size</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
Reclaimable</th>
<th>TYPE</th>
<th>TOTAL</th>
<th>ACTIVE</th>
<th>SIZE</th>
<th>RECLAIMABLE</th>
</tr>
</thead>
<tbody>
{% for typ, r in data.system.system_df.items() %}
<tr style="transition: background-color 0.2s ease;"
onmouseover="this.style.backgroundColor='rgba(102, 126, 234, 0.04)';"
onmouseout="this.style.backgroundColor='transparent';">
<td><strong style="color: #667eea;">{{ typ }}</strong></td>
<td style="color: #334155;">{{ r.total }}</td>
<td style="color: #334155;">{{ r.active }}</td>
<td style="color: #334155;">{{ r.size }}</td>
<td style="color: #334155;">{{ r.reclaimable }}</td>
<tr>
<td><span style="color: #00d9ff; font-weight: 700;">[{{ typ }}]</span></td>
<td>{{ r.total }}</td>
<td>{{ r.active }}</td>
<td>{{ r.size }}</td>
<td>{{ r.reclaimable }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div style="margin-top: 16px; color: #64748b; font-size: 13px; font-weight: 500;">⏱️ Generated at: {{
data.generated_at }}</div>
<div style="
font-size: 11px;
color: #8b949e;
margin-bottom: 32px;
font-weight: 500;
">
<span style="color: #00d9ff;">[TIMESTAMP]</span> {{ data.generated_at }}
</div>
{% if data.warnings %}
<div style="
margin: 20px 0;
padding: 16px 20px;
border: 1px solid #fbbf24;
background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
border-radius: 12px;
box-shadow: 0 4px 12px rgba(251, 191, 36, 0.15);
">
<strong
style="color: #92400e; font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px;">⚠️
Warnings</strong>
<ul style="margin: 0; padding-left: 20px; color: #78350f;">
margin: 24px 0;
padding: 16px 20px;
border: 2px solid #ffb86c;
background: rgba(255, 184, 108, 0.05);
position: relative;
">
<div style="
position: absolute;
top: -12px;
left: 16px;
background: #161b22;
padding: 0 8px;
color: #ffb86c;
font-size: 11px;
font-weight: 700;
letter-spacing: 2px;
">
[!! WARNINGS !!]
</div>
<ul style="margin: 8px 0 0 0; padding-left: 24px; color: #ffb86c;">
{% for w in data.warnings %}
<li style="margin: 6px 0;">{{ w }}</li>
<li style="margin: 6px 0; font-size: 13px;">{{ w }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
<h2 style="font-size: 22px; font-weight: 800; letter-spacing: -0.3px; color: #1e293b; margin: 40px 0 16px 0;">🚀
Apps</h2>
<div style="overflow-x: auto; border-radius: 12px; border: 1px solid rgba(0,0,0,0.06);">
<table style="margin: 0;">
<h2>[ APPLICATIONS ]</h2>
<div style="overflow-x: auto; margin-bottom: 32px;">
<table>
<thead>
<tr>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
App</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
URL</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
Status</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
CPU</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
RAM</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
Restarts</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
Image</th>
<th>APP</th>
<th>URL</th>
<th>STATUS</th>
<th>CPU</th>
<th>RAM</th>
<th>RESTARTS</th>
<th>IMAGE</th>
</tr>
</thead>
<tbody>
{% for r in data.apps %}
<tr style="transition: background-color 0.2s ease;"
onmouseover="this.style.backgroundColor='rgba(102, 126, 234, 0.04)';"
onmouseout="this.style.backgroundColor='transparent';">
<td><strong style="color: #667eea;">{{ r.app }}</strong></td>
<td><a href="{{ r.url }}"
style="color: #667eea; text-decoration: none; transition: all 0.2s ease;"
onmouseover="this.style.textDecoration='underline'; this.style.color='#764ba2';"
onmouseout="this.style.textDecoration='none'; this.style.color='#667eea';">{{ r.url
}}</a></td>
<td><span
style="padding: 4px 10px; background: rgba(102, 126, 234, 0.1); color: #667eea; border-radius: 6px; font-size: 12px; font-weight: 600;">{{
r.status }}</span></td>
<td style="color: #334155; font-weight: 600;">{{ r.cpu or "—" }}</td>
<td style="color: #334155; font-size: 13px;">
<tr>
<td><span style="color: #00d9ff; font-weight: 700;">{{ r.app }}</span></td>
<td>
<a href="{{ r.url }}" style="
color: #00ff88;
text-decoration: none;
transition: all 0.2s ease;
" onmouseover="this.style.color='#00d9ff'; this.style.textShadow='0 0 10px rgba(0, 217, 255, 0.5)';"
onmouseout="this.style.color='#00ff88'; this.style.textShadow='none';">
{{ r.url }}
</a>
</td>
<td>
<span style="
padding: 3px 8px;
background: rgba(0, 255, 136, 0.1);
color: #00ff88;
border: 1px solid #00ff88;
font-size: 10px;
font-weight: 700;
letter-spacing: 1px;
">
{{ r.status }}
</span>
</td>
<td style="color: #00ff88; font-weight: 600;">{{ r.cpu or "—" }}</td>
<td style="font-size: 12px;">
{% if r.mem_used %}
{{ r.mem_used }} / {{ r.mem_limit }} <span style="color: #667eea; font-weight: 600;">({{
r.mem_pct }})</span>
{{ r.mem_used }} / {{ r.mem_limit }}
<span style="color: #00d9ff; font-weight: 700;">({{ r.mem_pct }})</span>
{% else %} — {% endif %}
</td>
<td style="color: #334155; font-weight: 600;">{{ r.restarts }}</td>
<td style="color: #64748b; font-size: 12px;">{{ r.image }}</td>
<td style="
color: {% if r.restarts >= 3 %}#ff5555{% else %}#8b949e{% endif %};
font-weight: 700;
">
{{ r.restarts }}
</td>
<td style="color: #8b949e; font-size: 11px;">{{ r.image }}</td>
</tr>
{% endfor %}
</tbody>
@@ -259,50 +317,50 @@
</div>
{% if data.infra %}
<h2 style="font-size: 22px; font-weight: 800; letter-spacing: -0.3px; color: #1e293b; margin: 40px 0 16px 0;">
🏗️ Infra</h2>
<div style="overflow-x: auto; border-radius: 12px; border: 1px solid rgba(0,0,0,0.06);">
<table style="margin: 0;">
<h2>[ INFRASTRUCTURE ]</h2>
<div style="overflow-x: auto;">
<table>
<thead>
<tr>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
Container</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
Status</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
CPU</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
RAM</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
Restarts</th>
<th
style="background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);">
Image</th>
<th>CONTAINER</th>
<th>STATUS</th>
<th>CPU</th>
<th>RAM</th>
<th>RESTARTS</th>
<th>IMAGE</th>
</tr>
</thead>
<tbody>
{% for r in data.infra %}
<tr style="transition: background-color 0.2s ease;"
onmouseover="this.style.backgroundColor='rgba(102, 126, 234, 0.04)';"
onmouseout="this.style.backgroundColor='transparent';">
<td><strong style="color: #667eea;">{{ r.container }}</strong></td>
<td><span
style="padding: 4px 10px; background: rgba(102, 126, 234, 0.1); color: #667eea; border-radius: 6px; font-size: 12px; font-weight: 600;">{{
r.status }}</span></td>
<td style="color: #334155; font-weight: 600;">{{ r.cpu or "—" }}</td>
<td style="color: #334155; font-size: 13px;">
<tr>
<td><span style="color: #ffb86c; font-weight: 700;">{{ r.container }}</span></td>
<td>
<span style="
padding: 3px 8px;
background: rgba(0, 255, 136, 0.1);
color: #00ff88;
border: 1px solid #00ff88;
font-size: 10px;
font-weight: 700;
letter-spacing: 1px;
">
{{ r.status }}
</span>
</td>
<td style="color: #00ff88; font-weight: 600;">{{ r.cpu or "—" }}</td>
<td style="font-size: 12px;">
{% if r.mem_used %}
{{ r.mem_used }} / {{ r.mem_limit }} <span style="color: #667eea; font-weight: 600;">({{
r.mem_pct }})</span>
{{ r.mem_used }} / {{ r.mem_limit }}
<span style="color: #00d9ff; font-weight: 700;">({{ r.mem_pct }})</span>
{% else %} — {% endif %}
</td>
<td style="color: #334155; font-weight: 600;">{{ r.restarts }}</td>
<td style="color: #64748b; font-size: 12px;">{{ r.image }}</td>
<td style="
color: {% if r.restarts >= 3 %}#ff5555{% else %}#8b949e{% endif %};
font-weight: 700;
">
{{ r.restarts }}
</td>
<td style="color: #8b949e; font-size: 11px;">{{ r.image }}</td>
</tr>
{% endfor %}
</tbody>