{% extends "console/layout.html" %}
{% block content %}
<section class="vyuh-console-screen">
<header class="vyuh-console-topbar">
<div>
<h1>System Info</h1>
<p>Snapshot of the running system</p>
</div>
<div class="vyuh-console-actions">
<a class="vyuh-console-icon-button" href="{{ base_path }}/runtime" aria-label="Refresh"><svg><use href="#vyuh-icon-refresh"></use></svg></a>
<label class="vyuh-console-select"><span>Auto refresh</span><select><option>Off</option><option>30s</option></select></label>
</div>
</header>
<p class="vyuh-console-captured">Captured from the cached status collector <a href="{{ base_path }}/runtime"><svg><use href="#vyuh-icon-refresh"></use></svg>Refresh now</a></p>
<div class="vyuh-console-stat-grid is-five">
<article class="vyuh-console-stat"><span class="vyuh-console-icon is-ember"><svg><use href="#vyuh-icon-clock"></use></svg></span><div><h3>Uptime</h3><strong>{{ status.site.uptime_seconds }}s</strong><p>Site lifetime</p></div></article>
<article class="vyuh-console-stat"><span class="vyuh-console-icon is-green"><svg><use href="#vyuh-icon-clipboard"></use></svg></span><div><h3>CPU Usage</h3><strong>{{ cpu.global }}</strong><p>{{ status.system.cpu_count }} cores</p></div></article>
<article class="vyuh-console-stat"><span class="vyuh-console-icon is-violet"><svg><use href="#vyuh-icon-cpu"></use></svg></span><div><h3>Memory Usage</h3><strong>{{ memory.used }}</strong><p>{{ memory.available }} available</p></div></article>
<article class="vyuh-console-stat"><span class="vyuh-console-icon is-yellow"><svg><use href="#vyuh-icon-database"></use></svg></span><div><h3>Process Memory</h3><strong>{{ memory.process }}</strong><p>Resident set</p></div></article>
<article class="vyuh-console-stat"><span class="vyuh-console-icon is-blue"><svg><use href="#vyuh-icon-pulse"></use></svg></span><div><h3>Load Average</h3><strong>{{ load }}</strong><p>1m / 5m / 15m</p></div></article>
</div>
<div class="vyuh-console-info-grid">
<article class="vyuh-console-card">
<header><h2>System Environment</h2></header>
<dl class="vyuh-console-kv">
<div><dt>Host</dt><dd>{% if status.system.hostname %}{{ status.system.hostname }}{% else %}not available{% endif %}</dd></div>
<div><dt>OS</dt><dd>{% if status.system.os_name %}{{ status.system.os_name }}{% else %}unknown{% endif %}{% if status.system.os_version %} {{ status.system.os_version }}{% endif %}</dd></div>
<div><dt>Kernel</dt><dd>{% if status.system.kernel_version %}{{ status.system.kernel_version }}{% else %}unknown{% endif %}</dd></div>
<div><dt>Architecture</dt><dd>{{ status.system.architecture }}</dd></div>
<div><dt>CPU Brand</dt><dd>{% if status.system.cpu_brand %}{{ status.system.cpu_brand }}{% else %}unknown{% endif %}</dd></div>
<div><dt>Time Zone</dt><dd>{{ status.site.timezone }}</dd></div>
</dl>
</article>
<article class="vyuh-console-card">
<header><h2>Resource Usage</h2></header>
<ul class="vyuh-console-resource-list">
<li><span class="vyuh-console-icon-mini is-green"><svg><use href="#vyuh-icon-cpu"></use></svg></span><strong>CPU Usage</strong><span class="vyuh-console-progress"><i></i></span><em>{{ cpu.global }}</em></li>
<li><span class="vyuh-console-icon-mini is-violet"><svg><use href="#vyuh-icon-cpu"></use></svg></span><strong>Memory Usage</strong><span class="vyuh-console-progress is-violet"><i></i></span><em>{{ memory.used }} / {{ memory.total }}</em></li>
<li><span class="vyuh-console-icon-mini is-yellow"><svg><use href="#vyuh-icon-database"></use></svg></span><strong>Swap Usage</strong><span class="vyuh-console-progress is-yellow"><i></i></span><em>{{ memory.swap_used }} / {{ memory.swap_total }}</em></li>
<li><span class="vyuh-console-icon-mini is-blue"><svg><use href="#vyuh-icon-pulse"></use></svg></span><strong>Process CPU</strong><em>{{ cpu.process }}</em></li>
<li><span class="vyuh-console-icon-mini is-blue"><svg><use href="#vyuh-icon-docs"></use></svg></span><strong>Open Files</strong><em>{% if status.process.open_file_count %}{{ status.process.open_file_count }}{% else %}not available{% endif %}</em></li>
</ul>
</article>
<article class="vyuh-console-card">
<header><h2>Build Information</h2></header>
<dl class="vyuh-console-kv">
<div><dt>Package</dt><dd>{{ status.site.package_name }}</dd></div>
<div><dt>Version</dt><dd>{{ status.site.vyuh_version }}</dd></div>
<div><dt>Address</dt><dd>{{ status.site.host }}:{{ status.site.port }}</dd></div>
<div><dt>Database</dt><dd>{{ status.site.database_backend }}</dd></div>
<div><dt>Features</dt><dd>{% if status.site.features %}{{ status.site.features | join(", ") }}{% else %}none{% endif %}</dd></div>
<div><dt>Project Dir</dt><dd>{{ status.site.project_dir }}</dd></div>
</dl>
</article>
</div>
</section>
{% endblock %}