archivebox.core.admin

Module Contents

Classes

ArchiveBoxAdmin

CustomUserAdmin

CustomTaskModelAdmin

AccelleratedPaginator

Accellerated Pagniator ignores DISTINCT when counting total number of rows. Speeds up SELECT Count(*) on Admin views by >20x. https://hakibenita.com/optimizing-the-django-admin-paginator

ArchiveResultInline

TagInline

SnapshotActionForm

SnapshotAdmin

TagAdmin

ArchiveResultAdmin

APITokenAdmin

CustomWebhookAdmin

MachineAdmin

NetworkInterfaceAdmin

InstalledBinaryAdmin

Functions

result_url

Data

__package__

CONFIG

GLOBAL_CONTEXT

archivebox_admin

API

archivebox.core.admin.__package__

‘archivebox.core’

archivebox.core.admin.CONFIG

None

archivebox.core.admin.GLOBAL_CONTEXT

None

class archivebox.core.admin.ArchiveBoxAdmin

Bases: django.contrib.admin.AdminSite

site_header

‘ArchiveBox’

index_title

‘Links’

site_title

‘Index’

namespace

‘admin’

class archivebox.core.admin.CustomUserAdmin

Bases: django.contrib.auth.admin.UserAdmin

sort_fields

[‘id’, ‘email’, ‘username’, ‘is_superuser’, ‘last_login’, ‘date_joined’]

list_display

[‘username’, ‘id’, ‘email’, ‘is_superuser’, ‘last_login’, ‘date_joined’]

readonly_fields

(‘snapshot_set’, ‘archiveresult_set’, ‘tag_set’, ‘apitoken_set’, ‘outboundwebhook_set’)

fieldsets

None

snapshot_set(obj)
archiveresult_set(obj)
tag_set(obj)
apitoken_set(obj)
outboundwebhook_set(obj)
archivebox.core.admin.archivebox_admin

‘ArchiveBoxAdmin(…)’

class archivebox.core.admin.CustomTaskModelAdmin

Bases: huey_monitor.admin.TaskModelAdmin

actions

[‘delete_selected’]

has_delete_permission(request, obj=None)
archivebox.core.admin.result_url(result: huey_monitor.admin.TaskModel) str
class archivebox.core.admin.AccelleratedPaginator

Bases: django.core.paginator.Paginator

Accellerated Pagniator ignores DISTINCT when counting total number of rows. Speeds up SELECT Count(*) on Admin views by >20x. https://hakibenita.com/optimizing-the-django-admin-paginator

count()
class archivebox.core.admin.ArchiveResultInline

Bases: django.contrib.admin.TabularInline

name

‘Archive Results Log’

model

None

parent_model

None

extra

0

sort_fields

(‘end_ts’, ‘extractor’, ‘output’, ‘status’, ‘cmd_version’)

readonly_fields

(‘id’, ‘result_id’, ‘completed’, ‘command’, ‘version’)

fields

(‘start_ts’, ‘end_ts’)

ordering

(‘end_ts’,)

True

get_parent_object_from_request(request)
completed(obj)
result_id(obj)
command(obj)
version(obj)
get_formset(request, obj=None, **kwargs)
get_readonly_fields(request, obj=None)
class archivebox.core.admin.TagInline

Bases: django.contrib.admin.TabularInline

model

None

fields

(‘id’, ‘tag’)

extra

1

max_num

1000

autocomplete_fields

(‘tag’,)

class archivebox.core.admin.SnapshotActionForm

Bases: django.contrib.admin.helpers.ActionForm

tags

‘ModelMultipleChoiceField(…)’

class archivebox.core.admin.SnapshotAdmin

Bases: core.mixins.SearchResultsAdminMixin, abid_utils.admin.ABIDModelAdmin

list_display

(‘created_at’, ‘title_str’, ‘files’, ‘size’, ‘url_str’)

sort_fields

(‘title_str’, ‘url_str’, ‘created_at’)

readonly_fields

(‘admin_actions’, ‘status_info’, ‘tags_str’, ‘imported_timestamp’, ‘created_at’, ‘modified_at’, ‘dow…

search_fields

(‘id’, ‘url’, ‘abid’, ‘timestamp’, ‘title’, ‘tags__name’)

list_filter

(‘created_at’, ‘downloaded_at’, ‘archiveresult__status’, ‘created_by’, ‘tags__name’)

fields

(‘url’, ‘title’, ‘created_by’, ‘bookmarked_at’)

ordering

[‘-created_at’]

actions

[‘add_tags’, ‘remove_tags’, ‘update_titles’, ‘update_snapshots’, ‘resnapshot_snapshot’, ‘overwrite_s…

inlines

None

list_per_page

‘min(…)’

action_form

None

paginator

None

save_on_top

True

show_full_result_count

False

changelist_view(request, extra_context=None)
get_urls()
imported_timestamp(obj)
admin_actions(obj)
status_info(obj)
title_str(obj)
files(obj)
size(obj)
url_str(obj)
grid_view(request, extra_context=None)
update_titles(request, queryset)
update_snapshots(request, queryset)
resnapshot_snapshot(request, queryset)
overwrite_snapshots(request, queryset)
delete_snapshots(request, queryset)
add_tags(request, queryset)
remove_tags(request, queryset)
class archivebox.core.admin.TagAdmin

Bases: abid_utils.admin.ABIDModelAdmin

list_display

(‘created_at’, ‘created_by’, ‘abid’, ‘name’, ‘num_snapshots’, ‘snapshots’)

list_filter

(‘created_at’, ‘created_by’)

sort_fields

(‘name’, ‘slug’, ‘abid’, ‘created_by’, ‘created_at’)

readonly_fields

(‘slug’, ‘abid’, ‘created_at’, ‘modified_at’, ‘abid_info’, ‘snapshots’)

search_fields

(‘abid’, ‘name’, ‘slug’)

fields

(‘name’, ‘created_by’)

actions

[‘delete_selected’]

ordering

[‘-created_at’]

paginator

None

num_snapshots(tag)
snapshots(tag)
class archivebox.core.admin.ArchiveResultAdmin

Bases: abid_utils.admin.ABIDModelAdmin

list_display

(‘start_ts’, ‘snapshot_info’, ‘tags_str’, ‘extractor’, ‘cmd_str’, ‘status’, ‘output_str’)

sort_fields

(‘start_ts’, ‘extractor’, ‘status’)

readonly_fields

(‘cmd_str’, ‘snapshot_info’, ‘tags_str’, ‘created_at’, ‘modified_at’, ‘abid_info’, ‘output_summary’)

search_fields

(‘id’, ‘abid’, ‘snapshot__url’, ‘extractor’, ‘output’, ‘cmd_version’, ‘cmd’, ‘snapshot__timestamp’)

fields

(‘snapshot’, ‘extractor’, ‘status’, ‘output’, ‘pwd’, ‘start_ts’, ‘end_ts’, ‘created_by’, ‘cmd_versio…

autocomplete_fields

[‘snapshot’]

list_filter

(‘status’, ‘extractor’, ‘start_ts’, ‘cmd_version’)

ordering

[‘-start_ts’]

list_per_page

None

paginator

None

save_on_top

True

actions

[‘delete_selected’]

class Meta
verbose_name

‘Archive Result’

verbose_name_plural

‘Archive Results’

change_view(request, object_id, form_url='', extra_context=None)
snapshot_info(result)
tags_str(result)
cmd_str(result)
output_str(result)
output_summary(result)
class archivebox.core.admin.APITokenAdmin

Bases: abid_utils.admin.ABIDModelAdmin

list_display

(‘created_at’, ‘abid’, ‘created_by’, ‘token_redacted’, ‘expires’)

sort_fields

(‘abid’, ‘created_at’, ‘created_by’, ‘expires’)

readonly_fields

(‘created_at’, ‘modified_at’, ‘abid_info’)

search_fields

(‘id’, ‘abid’, ‘created_by__username’, ‘token’)

fields

(‘created_by’, ‘token’, ‘expires’)

list_filter

(‘created_by’,)

ordering

[‘-created_at’]

list_per_page

100

class archivebox.core.admin.CustomWebhookAdmin

Bases: signal_webhooks.admin.WebhookAdmin, abid_utils.admin.ABIDModelAdmin

list_display

(‘created_at’, ‘created_by’, ‘abid’)

sort_fields

(‘created_at’, ‘created_by’, ‘abid’, ‘referenced_model’, ‘endpoint’, ‘last_success’, ‘last_error’)

readonly_fields

(‘created_at’, ‘modified_at’, ‘abid_info’)

class archivebox.core.admin.MachineAdmin

Bases: abid_utils.admin.ABIDModelAdmin

list_display

(‘abid’, ‘created_at’, ‘hostname’, ‘ips’, ‘os_platform’, ‘hw_in_docker’, ‘hw_in_vm’, ‘hw_manufacture…

sort_fields

(‘abid’, ‘created_at’, ‘hostname’, ‘ips’, ‘os_platform’, ‘hw_in_docker’, ‘hw_in_vm’, ‘hw_manufacture…

readonly_fields

(‘guid’, ‘created_at’, ‘modified_at’, ‘abid_info’, ‘ips’)

fields

()

list_filter

(‘hw_in_docker’, ‘hw_in_vm’, ‘os_arch’, ‘os_family’, ‘os_platform’)

ordering

[‘-created_at’]

list_per_page

100

actions

[‘delete_selected’]

ips(machine)
class archivebox.core.admin.NetworkInterfaceAdmin

Bases: abid_utils.admin.ABIDModelAdmin

list_display

(‘abid’, ‘created_at’, ‘machine_info’, ‘ip_public’, ‘dns_server’, ‘isp’, ‘country’, ‘region’, ‘city’…

sort_fields

(‘abid’, ‘created_at’, ‘machine_info’, ‘ip_public’, ‘dns_server’, ‘isp’, ‘country’, ‘region’, ‘city’…

search_fields

(‘abid’, ‘machine__abid’, ‘iface’, ‘ip_public’, ‘ip_local’, ‘mac_address’, ‘dns_server’, ‘hostname’,…

readonly_fields

(‘machine’, ‘created_at’, ‘modified_at’, ‘abid_info’, ‘mac_address’, ‘ip_public’, ‘ip_local’, ‘dns_s…

fields

()

list_filter

(‘isp’, ‘country’, ‘region’)

ordering

[‘-created_at’]

list_per_page

100

actions

[‘delete_selected’]

machine_info(iface)
class archivebox.core.admin.InstalledBinaryAdmin

Bases: abid_utils.admin.ABIDModelAdmin

list_display

(‘abid’, ‘created_at’, ‘machine_info’, ‘name’, ‘binprovider’, ‘version’, ‘abspath’, ‘sha256’, ‘healt…

sort_fields

(‘abid’, ‘created_at’, ‘machine_info’, ‘name’, ‘binprovider’, ‘version’, ‘abspath’, ‘sha256’)

search_fields

(‘abid’, ‘machine__abid’, ‘name’, ‘binprovider’, ‘version’, ‘abspath’, ‘sha256’)

readonly_fields

(‘created_at’, ‘modified_at’, ‘abid_info’)

fields

(‘machine’, ‘name’, ‘binprovider’, ‘abspath’, ‘version’, ‘sha256’)

list_filter

(‘name’, ‘binprovider’, ‘machine_id’)

ordering

[‘-created_at’]

list_per_page

100

actions

[‘delete_selected’]

machine_info(installed_binary)