ArchiveBox/archivebox/templates/admin/index.html
Nick Sweeting 2c2215f84d
Some checks failed
Build Debian package / build (amd64) (push) Waiting to run
Build Debian package / build (arm64) (push) Waiting to run
Build Debian package / test (amd64, ubuntu-24.04) (push) Blocked by required conditions
Build Debian package / test (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
Build Debian package / release (push) Blocked by required conditions
Build Docker image / build ${{ matrix.platform }} (digest-linux-amd64, docker-amd64, linux/amd64, ubuntu-24.04) (push) Waiting to run
Build Docker image / build ${{ matrix.platform }} (digest-linux-arm64, docker-arm64, linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Build Docker image / publish multiarch tags (push) Blocked by required conditions
Run linters / lint (push) Waiting to run
Build Pip package / build (push) Waiting to run
Release State / release-state (push) Waiting to run
Parallel Tests / Discover test files (push) Waiting to run
Parallel Tests / ${{ matrix.test.name }} (push) Blocked by required conditions
Parallel Tests / ${{ matrix.plugin.name }} (push) Blocked by required conditions
Run tests / python_tests (ubuntu-22.04, 3.13) (push) Waiting to run
Run tests / docker_tests (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
release: archivebox 0.9.33rc43
2026-05-29 04:43:44 -07:00

671 lines
24 KiB
HTML

{% extends "admin/base_site.html" %}
{% load i18n static log %}
{% block extrastyle %}
{{ block.super }}
<link rel="stylesheet" href="{% static "admin/css/dashboard.css" %}">
<style>
body.dashboard.abx-admin-dashboard-page #content {
width: auto !important;
max-width: none !important;
margin: 0 !important;
padding: 14px 22px 22px !important;
}
body.dashboard.abx-admin-dashboard-page #content-main {
float: none;
width: auto !important;
max-width: none !important;
margin: 0 !important;
}
.abx-admin-dashboard {
--abx-paper: #fbf9f4;
--abx-vellum: #fdfcf8;
--abx-paper-2: #f3f0e8;
--abx-paper-3: #e4dfd3;
--abx-rule-strong: #d4cdbd;
--abx-ink: #1c1814;
--abx-ink-2: #3a332a;
--abx-ink-3: #6b6253;
--abx-ink-4: #9a907c;
--abx-oxblood: #8b2a2a;
--abx-oxblood-wash: #f0dfdf;
--abx-moss: #5a6b3c;
--abx-slate: #3e4a55;
--abx-ochre: #b5832a;
--abx-font-serif: "Source Serif 4", "Source Serif Pro", "Iowan Old Style", "Charter", Georgia, serif;
--abx-font-sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
--abx-font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
max-width: 1240px;
margin: 0 auto;
color: var(--abx-ink);
font-family: var(--abx-font-sans);
}
.abx-admin-hero {
display: none;
}
.abx-admin-kicker {
margin: 0;
color: var(--abx-ink-3);
font-family: var(--abx-font-mono);
font-size: 11px;
font-weight: 650;
letter-spacing: .08em;
text-transform: uppercase;
}
.abx-admin-hero h1,
.abx-admin-section h2 {
margin: 0;
color: var(--abx-ink);
font-family: var(--abx-font-sans);
font-weight: 600;
letter-spacing: 0;
}
.abx-admin-hero h1 {
font-size: 24px;
line-height: 1.2;
}
.abx-admin-section__intro {
display: none;
margin: 0;
max-width: 68ch;
color: var(--abx-ink-3);
font-size: 14px;
line-height: 1.55;
}
.abx-admin-layout {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
gap: 20px;
align-items: start;
}
.abx-admin-sections {
display: grid;
gap: 24px;
}
.abx-admin-section {
padding: 0;
}
.abx-admin-section__head {
display: flex;
justify-content: space-between;
gap: 18px;
align-items: end;
margin-bottom: 8px;
}
.abx-admin-section h2 {
color: var(--abx-ink-2);
font-family: var(--abx-font-mono);
font-size: 12px;
font-weight: 700;
letter-spacing: .08em;
line-height: 1.2;
text-transform: uppercase;
}
.abx-admin-flow {
display: grid;
gap: 8px;
margin-bottom: 8px;
}
.abx-admin-flow__row,
.abx-admin-card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 8px;
}
.abx-admin-flow__row--child {
padding-left: 14px;
border-left: 2px solid var(--abx-paper-3);
}
.abx-admin-flow__row--grandchild {
padding-left: 28px;
border-left: 2px solid var(--abx-paper-3);
}
.abx-admin-card {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 10px;
align-items: center;
min-height: 66px;
padding: 10px 12px;
background: var(--abx-vellum);
border: 1px solid var(--abx-paper-3);
border-radius: 6px;
box-shadow: 0 1px 0 rgba(28, 24, 20, .04), 0 1px 2px rgba(28, 24, 20, .06);
}
.abx-admin-card--has-action {
grid-template-columns: minmax(0, 1fr) auto;
}
.abx-admin-card:hover {
border-color: var(--abx-rule-strong);
box-shadow: 0 2px 4px rgba(28, 24, 20, .06), 0 8px 18px rgba(28, 24, 20, .07);
}
.abx-admin-card--crawl,
.abx-admin-card--crawlschedule {
background: #fff8f8;
border-color: #d8b7b7;
box-shadow: inset 3px 0 0 var(--abx-oxblood), 0 1px 0 rgba(28, 24, 20, .04), 0 1px 2px rgba(28, 24, 20, .06);
}
.abx-admin-card--crawl:hover,
.abx-admin-card--crawlschedule:hover {
border-color: #c99696;
box-shadow: inset 3px 0 0 var(--abx-oxblood), 0 2px 4px rgba(28, 24, 20, .06), 0 8px 18px rgba(28, 24, 20, .07);
}
.abx-admin-card--snapshot {
background: #f4f8fb;
border-color: #b9cad6;
box-shadow: inset 3px 0 0 var(--abx-slate), 0 1px 0 rgba(28, 24, 20, .04), 0 1px 2px rgba(28, 24, 20, .06);
}
.abx-admin-card--snapshot:hover {
border-color: #9db4c2;
box-shadow: inset 3px 0 0 var(--abx-slate), 0 2px 4px rgba(28, 24, 20, .06), 0 8px 18px rgba(28, 24, 20, .07);
}
.abx-admin-card--archiveresult {
background: #f8faf9;
border-color: #c8d3d7;
box-shadow: inset 3px 0 0 #7b8b92, 0 1px 0 rgba(28, 24, 20, .04), 0 1px 2px rgba(28, 24, 20, .06);
}
.abx-admin-card__main {
display: flex;
gap: 10px;
align-items: flex-start;
min-width: 0;
}
#content .abx-admin-card__main--link,
#content .abx-admin-card__main--link:link,
#content .abx-admin-card__main--link:visited {
color: inherit !important;
text-decoration: none !important;
}
#content .abx-admin-card__main--link:hover .abx-admin-card__title {
color: var(--abx-oxblood) !important;
text-decoration: underline !important;
text-underline-offset: 3px;
}
.abx-admin-card__icon {
display: inline-flex;
width: 30px;
height: 30px;
flex: 0 0 30px;
align-items: center;
justify-content: center;
color: var(--abx-oxblood);
background: var(--abx-oxblood-wash);
border: 1px solid rgba(139, 42, 42, .12);
border-radius: 6px;
}
.abx-admin-card--machine .abx-admin-card__icon,
.abx-admin-card--networkinterface .abx-admin-card__icon,
.abx-admin-card--binary .abx-admin-card__icon,
.abx-admin-card--process .abx-admin-card__icon {
color: var(--abx-slate);
background: #e5eaed;
border-color: rgba(62, 74, 85, .14);
}
.abx-admin-card--configuration .abx-admin-card__icon,
.abx-admin-card--dependencies .abx-admin-card__icon,
.abx-admin-card--plugins .abx-admin-card__icon,
.abx-admin-card--workers .abx-admin-card__icon,
.abx-admin-card--logs .abx-admin-card__icon {
color: var(--abx-moss);
background: #e7ebdf;
border-color: rgba(90, 107, 60, .16);
}
.abx-admin-card--crawl .abx-admin-card__icon,
.abx-admin-card--crawlschedule .abx-admin-card__icon {
color: #7f1d1d;
background: #f2d7d7;
border-color: #d9a6a6;
}
.abx-admin-card--snapshot .abx-admin-card__icon,
.abx-admin-card--archiveresult .abx-admin-card__icon {
color: var(--abx-slate);
background: #dfe8ee;
border-color: #b9cad6;
}
.abx-admin-card svg {
width: 17px;
height: 17px;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
.abx-admin-card__copy {
display: grid;
gap: 3px;
min-width: 0;
}
.abx-admin-card__title-row {
display: flex;
gap: 7px;
align-items: baseline;
min-width: 0;
}
#content .abx-admin-card__title {
color: var(--abx-ink) !important;
font-size: 15px;
font-weight: 700;
line-height: 1.25;
text-decoration: none !important;
}
.abx-admin-card__count {
display: inline-flex;
flex: 0 0 auto;
align-items: center;
min-height: 16px;
padding: 0 5px;
color: var(--abx-ink-4);
background: rgba(28, 24, 20, .035);
border: 1px solid rgba(28, 24, 20, .08);
border-radius: 999px;
font-family: var(--abx-font-mono);
font-size: 10px;
font-weight: 650;
line-height: 1;
}
.abx-admin-card__text {
color: var(--abx-ink-3);
font-size: 12px;
line-height: 1.4;
}
.abx-admin-card__actions {
display: inline-flex;
gap: 6px;
flex-wrap: wrap;
justify-content: flex-end;
}
#content .abx-admin-action,
#content .abx-admin-action:link,
#content .abx-admin-action:visited {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 26px;
padding: 0 9px;
color: var(--abx-ink-2) !important;
background: var(--abx-paper) !important;
border: 1px solid var(--abx-paper-3) !important;
border-radius: 4px;
font-size: 12px;
font-weight: 650;
line-height: 1;
text-decoration: none !important;
white-space: nowrap;
}
#content .abx-admin-action:hover {
color: var(--abx-ink) !important;
background: var(--abx-paper-2) !important;
border-color: var(--abx-rule-strong) !important;
}
#content .abx-admin-action--add,
#content .abx-admin-action--add:link,
#content .abx-admin-action--add:visited {
color: #fff !important;
background: var(--abx-oxblood) !important;
border-color: var(--abx-oxblood) !important;
}
#content .abx-admin-action--add:hover {
color: #fff !important;
background: #6e1f1f !important;
border-color: #6e1f1f !important;
}
.abx-admin-aside {
display: grid;
gap: 10px;
position: sticky;
top: 12px;
}
.abx-admin-panel {
background: var(--abx-vellum);
border: 1px solid var(--abx-paper-3);
border-radius: 6px;
padding: 12px;
box-shadow: 0 1px 0 rgba(28, 24, 20, .04), 0 1px 2px rgba(28, 24, 20, .06);
}
.abx-admin-panel h2 {
margin: 0 0 8px;
color: var(--abx-ink);
font-size: 14px;
font-weight: 700;
}
.abx-admin-recent {
display: grid;
gap: 9px;
margin: 0;
padding: 0;
list-style: none;
}
.abx-admin-recent li {
display: grid;
gap: 3px;
padding-bottom: 9px;
border-bottom: 1px dashed var(--abx-paper-3);
color: var(--abx-ink-3);
font-size: 12px;
line-height: 1.35;
}
.abx-admin-recent li:last-child {
padding-bottom: 0;
border-bottom: 0;
}
#content .abx-admin-recent a,
#content .abx-admin-recent a:link,
#content .abx-admin-recent a:visited {
color: var(--abx-ink) !important;
font-weight: 650;
text-decoration: none !important;
}
#content .abx-admin-recent a:hover {
color: var(--abx-oxblood) !important;
text-decoration: underline !important;
text-underline-offset: 3px;
}
.abx-admin-recent__meta,
.abx-admin-empty {
color: var(--abx-ink-4);
font-family: var(--abx-font-mono);
font-size: 11px;
}
.abx-admin-all-models summary {
cursor: pointer;
color: var(--abx-ink-2);
font-weight: 700;
}
.abx-admin-all-models .app-list {
margin-top: 12px;
}
.abx-admin-app-index {
max-width: 980px;
}
@media (max-width: 980px) {
.abx-admin-hero,
.abx-admin-layout {
grid-template-columns: 1fr;
}
.abx-admin-aside {
position: static;
}
}
@media (max-width: 680px) {
.abx-admin-card {
grid-template-columns: 1fr;
}
.abx-admin-card__actions {
justify-content: flex-start;
}
.abx-admin-flow__row--child,
.abx-admin-flow__row--grandchild {
padding-left: 12px;
}
}
</style>
{% endblock %}
{% block coltype %}colMS{% endblock %}
{% block bodyclass %}{{ block.super }} dashboard abx-admin-dashboard-page{% endblock %}
{% block nav-breadcrumbs %}{% endblock %}
{% block nav-sidebar %}{% endblock %}
{% block content %}
{% if app_label %}
<div id="content-main" class="app-list abx-admin-app-index">
{% include "admin/app_list.html" with app_list=app_list show_changelinks=True %}
</div>
{% else %}
<div class="abx-admin-dashboard">
<header class="abx-admin-hero">
<h1>{{ title|default:_("Admin Views") }}</h1>
</header>
{% if app_list %}
<div class="abx-admin-layout">
<main class="abx-admin-sections" id="content-main">
<section class="abx-admin-section" aria-labelledby="abx-admin-main-title">
<div class="abx-admin-section__head">
<h2 id="abx-admin-main-title">{% translate "Main" %}</h2>
</div>
<div class="abx-admin-flow">
<div class="abx-admin-flow__row">
{% for app in app_list %}
{% for model in app.models %}
{% if model.object_name == "Crawl" or model.object_name == "CrawlSchedule" %}
{% include "admin/index_model_card.html" with model=model tone="main" %}
{% endif %}
{% endfor %}
{% endfor %}
</div>
<div class="abx-admin-flow__row abx-admin-flow__row--child">
{% for app in app_list %}
{% for model in app.models %}
{% if model.object_name == "Snapshot" %}
{% include "admin/index_model_card.html" with model=model tone="main" %}
{% endif %}
{% endfor %}
{% endfor %}
</div>
<div class="abx-admin-flow__row abx-admin-flow__row--grandchild">
{% for app in app_list %}
{% for model in app.models %}
{% if model.object_name == "ArchiveResult" %}
{% include "admin/index_model_card.html" with model=model tone="main" %}
{% endif %}
{% endfor %}
{% endfor %}
</div>
</div>
<div class="abx-admin-card-grid">
{% for app in app_list %}
{% for model in app.models %}
{% if model.object_name == "Tag" %}
{% include "admin/index_model_card.html" with model=model tone="main" %}
{% endif %}
{% endfor %}
{% endfor %}
{% for app in app_list %}
{% for model in app.models %}
{% if model.object_name == "Persona" %}
{% include "admin/index_model_card.html" with model=model tone="main" %}
{% endif %}
{% endfor %}
{% endfor %}
{% for app in app_list %}
{% for model in app.models %}
{% if model.object_name == "User" %}
{% include "admin/index_model_card.html" with model=model tone="main" %}
{% endif %}
{% endfor %}
{% endfor %}
</div>
</section>
<section class="abx-admin-section" aria-labelledby="abx-admin-environment-title">
<div class="abx-admin-section__head">
<h2 id="abx-admin-environment-title">{% translate "Environment" %}</h2>
</div>
<div class="abx-admin-card-grid">
{% for app in app_list %}
{% if app.name == "Environment" %}
{% for model in app.models %}
{% if model.name == "Configuration" %}
{% include "admin/index_model_card.html" with model=model tone="environment" %}
{% endif %}
{% endfor %}
{% for model in app.models %}
{% if model.name == "Dependencies" %}
{% include "admin/index_model_card.html" with model=model tone="environment" %}
{% endif %}
{% endfor %}
{% for model in app.models %}
{% if model.name == "Plugins" %}
{% include "admin/index_model_card.html" with model=model tone="environment" %}
{% endif %}
{% endfor %}
{% for model in app.models %}
{% if model.name == "Workers" %}
{% include "admin/index_model_card.html" with model=model tone="environment" %}
{% endif %}
{% endfor %}
{% for model in app.models %}
{% if model.name == "Logs" %}
{% include "admin/index_model_card.html" with model=model tone="environment" %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</div>
</section>
<section class="abx-admin-section" aria-labelledby="abx-admin-machine-title">
<div class="abx-admin-section__head">
<h2 id="abx-admin-machine-title">{% translate "Machine" %}</h2>
</div>
<div class="abx-admin-card-grid">
{% for app in app_list %}
{% for model in app.models %}
{% if model.object_name == "Machine" %}
{% include "admin/index_model_card.html" with model=model tone="machine" %}
{% endif %}
{% endfor %}
{% endfor %}
{% for app in app_list %}
{% for model in app.models %}
{% if model.object_name == "NetworkInterface" %}
{% include "admin/index_model_card.html" with model=model tone="machine" %}
{% endif %}
{% endfor %}
{% endfor %}
{% for app in app_list %}
{% for model in app.models %}
{% if model.object_name == "Binary" %}
{% include "admin/index_model_card.html" with model=model tone="machine" %}
{% endif %}
{% endfor %}
{% endfor %}
{% for app in app_list %}
{% for model in app.models %}
{% if model.object_name == "Process" %}
{% include "admin/index_model_card.html" with model=model tone="machine" %}
{% endif %}
{% endfor %}
{% endfor %}
</div>
</section>
<section class="abx-admin-section" aria-labelledby="abx-admin-advanced-title">
<div class="abx-admin-section__head">
<h2 id="abx-admin-advanced-title">{% translate "REST API" %}</h2>
</div>
<div class="abx-admin-card-grid">
{% for app in app_list %}
{% for model in app.models %}
{% if model.object_name == "APIToken" or model.object_name == "OutboundWebhook" or model.object_name == "Webhook" %}
{% include "admin/index_model_card.html" with model=model tone="advanced" %}
{% endif %}
{% endfor %}
{% endfor %}
</div>
</section>
</main>
<aside class="abx-admin-aside">
<section class="abx-admin-panel" aria-labelledby="abx-admin-recent-title">
<h2 id="abx-admin-recent-title">{% translate "Recent Actions" %}</h2>
{% get_admin_log 8 as admin_log for_user user %}
{% if not admin_log %}
<p class="abx-admin-empty">{% translate "No recent actions." %}</p>
{% else %}
<ol class="abx-admin-recent">
{% for entry in admin_log %}
<li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %} changelink{% endif %}{% if entry.is_deletion %} deletelink{% endif %}">
{% if entry.is_deletion or not entry.get_admin_url %}
<span>{{ entry.object_repr }}</span>
{% else %}
<a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
{% endif %}
<span class="abx-admin-recent__meta">{{ entry.content_type.name|capfirst }} · {{ entry.action_time|timesince }} {% translate "ago" %}</span>
</li>
{% endfor %}
</ol>
{% endif %}
</section>
<details class="abx-admin-panel abx-admin-all-models">
<summary>{% translate "All Admin Models" %}</summary>
<div class="app-list">
{% include "admin/app_list.html" with app_list=app_list show_changelinks=True %}
</div>
</details>
</aside>
</div>
{% else %}
<p class="abx-admin-empty">{% translate "You do not have permission to view or edit anything." %}</p>
{% endif %}
</div>
{% endif %}
{% endblock %}
{% block sidebar %}{% endblock %}