{% extends "base.html" %}
{% block title %}대시보드 - NAS UI{% endblock %}
{% block content %}
<div class="container">
    <div class="panel" style="width:100%;">
        <h2>스토리지/디스크 상태</h2>
        <table>
            <tr>
                <th>장치</th>
                <th>마운트</th>
                <th>FS</th>
                <th>라벨</th>
                <th>전체용량</th>
                <th>남은용량</th>
                <th>사용량(%)</th>
            </tr>
            {% for d in disks %}
            <tr style="font-weight:bold;background:#f2f4fa;">
                <td>{{ d.name }}</td>
                <td>{{ d.mountpoint }}</td>
                <td>{{ d.fstype }}</td>
                <td>{{ d.label }}</td>
                <td>{{ d.size or '-' }}</td>
                <td>{{ d.avail or '-' }}</td>
                <td>{{ d.percent or '-' }}</td>
            </tr>
                {% for p in d.parts %}
                <tr>
                    <td style="padding-left:24px;">└─ {{ p.name }}</td>
                    <td>{{ p.mountpoint }}</td>
                    <td>{{ p.fstype }}</td>
                    <td>{{ p.label }}</td>
                    <td>{{ p.size or '-' }}</td>
                    <td>{{ p.avail or '-' }}</td>
                    <td>{{ p.percent or '-' }}</td>
                </tr>
                {% endfor %}
            {% endfor %}
        </table>
    </div>
</div>
{% endblock %}
