mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
bold snapshots over 50MB
This commit is contained in:
parent
b8bbb75f9c
commit
651d6c4447
1 changed files with 8 additions and 1 deletions
|
@ -131,10 +131,17 @@ class SnapshotAdmin(admin.ModelAdmin):
|
||||||
return get_icons(obj)
|
return get_icons(obj)
|
||||||
|
|
||||||
def size(self, obj):
|
def size(self, obj):
|
||||||
|
archive_size = obj.archive_size
|
||||||
|
if archive_size:
|
||||||
|
size_txt = printable_filesize(archive_size)
|
||||||
|
if archive_size > 52428800:
|
||||||
|
size_txt = mark_safe(f'<b>{size_txt}</b>')
|
||||||
|
else:
|
||||||
|
size_txt = 'pending'
|
||||||
return format_html(
|
return format_html(
|
||||||
'<a href="/{}" title="View all files">{}</a>',
|
'<a href="/{}" title="View all files">{}</a>',
|
||||||
obj.archive_path,
|
obj.archive_path,
|
||||||
printable_filesize(obj.archive_size) if obj.archive_size else 'pending',
|
size_txt,
|
||||||
)
|
)
|
||||||
|
|
||||||
def url_str(self, obj):
|
def url_str(self, obj):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue