feat: 补齐 ppt_history 的 DB-backed 檔案回填並保留開啟/下載
All checks were successful
CD Pipeline / deploy (push) Successful in 59s
All checks were successful
CD Pipeline / deploy (push) Successful in 59s
This commit is contained in:
@@ -274,7 +274,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm mb-0">
|
||||
<table class="table table-sm mb-0">
|
||||
<thead class="table-light">
|
||||
<tr><th>檔名</th><th class="text-end">KB</th><th>修改時間</th><th>狀態</th><th>操作</th></tr>
|
||||
</thead>
|
||||
@@ -282,17 +282,29 @@
|
||||
{% for f in files %}
|
||||
<tr>
|
||||
<td><code>{{ f.name }}</code></td>
|
||||
<td class="text-end">{{ f.size_kb }}</td>
|
||||
<td class="text-end">{{ f.size_kb if f.size_kb is not none else '—' }}</td>
|
||||
<td><small>{{ f.mtime }}</small></td>
|
||||
<td><small class="text-muted">22:00 排程掃描</small></td>
|
||||
<td>
|
||||
{% if f.source == 'database' %}
|
||||
<span class="text-muted">{% if f.file_exists %}資料庫快取 + 檔案可存取{% else %}資料庫快取(檔案未落盤){% endif %}</span>
|
||||
{% elif f.source == 'both' %}
|
||||
<span class="text-success">檔案 + 資料庫</span>
|
||||
{% else %}
|
||||
<span class="text-muted">22:00 掃描落盤</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<div class="ppt-file-actions">
|
||||
{% if f.file_exists %}
|
||||
<a class="btn btn-outline-primary btn-sm" href="{{ url_for('admin_observability.ppt_audit_file', filename=f.name) }}" target="_blank" rel="noopener">
|
||||
<i class="fas fa-file-powerpoint me-1"></i>開啟
|
||||
</a>
|
||||
<a class="btn btn-outline-secondary btn-sm" href="{{ url_for('admin_observability.ppt_audit_file', filename=f.name, action='download') }}">
|
||||
<i class="fas fa-download me-1"></i>下載
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="small text-muted">本機暫無檔案,請先至來源回補</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user