warpgate/templates/web/status_partial.html
grabbit 466ea5cfa8 Add pre-mount remote path probe and per-share health status
Before mounting, probe each share's remote path with `rclone lsf`
(10s timeout, parallel execution). Failed shares are skipped — they
never get mounted or exposed to SMB/NFS/WebDAV — preventing the
silent hang that occurred when rclone mounted a nonexistent directory.

- ShareHealth enum: Pending → Probing → Healthy / Failed(reason)
- Supervisor: probe phase between preflight and mount, protocol
  configs generated after probe with only healthy shares
- Web UI: health-aware badges (OK/FAILED/PROBING/PENDING) with
  error messages on dashboard, status partial, and share detail
- JSON API: health + health_message fields on /api/status
- CLI: `warpgate status` queries daemon API first for tri-state
  display (OK/FAILED/DOWN), falls back to direct mount checks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 15:28:56 +08:00

37 lines
1.7 KiB
HTML

{% for share in shares %}
<div class="card">
<div class="card-header">
<h2><a href="/shares/{{ share.name }}">{{ share.name }}</a></h2>
<div>
{% if share.health == "OK" %}
<span class="badge badge-ok">OK</span>
{% elif share.health == "FAILED" %}
<span class="badge badge-error" title="{{ share.health_message }}">FAILED</span>
{% elif share.health == "PROBING" %}
<span class="badge badge-warn">PROBING</span>
{% else %}
<span class="badge badge-warn">PENDING</span>
{% endif %}
{% if share.read_only %}
<span class="badge badge-ro">RO</span>
{% endif %}
</div>
</div>
<div class="stats">
<span><span class="label">Mount:</span> <span class="value">{{ share.mount_point }}</span></span>
<span><span class="label">Cache:</span> <span class="value">{{ share.cache_display }}</span></span>
<span><span class="label">Dirty:</span> <span class="value">{{ share.dirty_count }}</span></span>
<span><span class="label">Speed:</span> <span class="value">{{ share.speed_display }}</span></span>
</div>
{% if share.health == "FAILED" %}
<div class="error-msg">{{ share.health_message }}</div>
{% endif %}
</div>
{% endfor %}
<div class="protocols">
<span class="proto-badge {% if smbd_running %}proto-on{% else %}proto-off{% endif %}">SMB: {% if smbd_running %}ON{% else %}OFF{% endif %}</span>
<span class="proto-badge {% if nfs_exported %}proto-on{% else %}proto-off{% endif %}">NFS: {% if nfs_exported %}ON{% else %}OFF{% endif %}</span>
<span class="proto-badge {% if webdav_running %}proto-on{% else %}proto-off{% endif %}">WebDAV: {% if webdav_running %}ON{% else %}OFF{% endif %}</span>
</div>