mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-20 09:55:10 -04:00
show archive dir size in link details page
This commit is contained in:
parent
273588c75a
commit
430d51756b
2 changed files with 6 additions and 0 deletions
|
@ -8,6 +8,7 @@ from typing import List, Optional, Iterator, Mapping
|
||||||
|
|
||||||
from .schema import Link
|
from .schema import Link
|
||||||
from ..system import atomic_write, copy_and_overwrite
|
from ..system import atomic_write, copy_and_overwrite
|
||||||
|
from ..logging_util import printable_filesize
|
||||||
from ..util import (
|
from ..util import (
|
||||||
enforce_types,
|
enforce_types,
|
||||||
ts_to_date,
|
ts_to_date,
|
||||||
|
@ -140,6 +141,7 @@ def link_details_template(link: Link) -> str:
|
||||||
) or 'about:blank',
|
) or 'about:blank',
|
||||||
'extension': link.extension or 'html',
|
'extension': link.extension or 'html',
|
||||||
'tags': link.tags or 'untagged',
|
'tags': link.tags or 'untagged',
|
||||||
|
'size': printable_filesize(link.archive_size) if link.archive_size else 'pending',
|
||||||
'status': 'archived' if link.is_archived else 'not yet archived',
|
'status': 'archived' if link.is_archived else 'not yet archived',
|
||||||
'status_color': 'success' if link.is_archived else 'danger',
|
'status_color': 'success' if link.is_archived else 'danger',
|
||||||
'oldest_archive_date': ts_to_date(link.oldest_archive_date),
|
'oldest_archive_date': ts_to_date(link.oldest_archive_date),
|
||||||
|
|
|
@ -298,6 +298,10 @@
|
||||||
<h5>Errors</h5>
|
<h5>Errors</h5>
|
||||||
❌ $num_failures
|
❌ $num_failures
|
||||||
</div>
|
</div>
|
||||||
|
<div class="info-chunk">
|
||||||
|
<h5>Size</h5>
|
||||||
|
$size
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<div class="info-chunk">
|
<div class="info-chunk">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue