diff --git a/archivebox/templates/admin/progress_monitor.html b/archivebox/templates/admin/progress_monitor.html index e95084bd..9665fc98 100644 --- a/archivebox/templates/admin/progress_monitor.html +++ b/archivebox/templates/admin/progress_monitor.html @@ -182,7 +182,7 @@ display: flex; align-items: center; gap: 10px; - padding: 7px 12px; + padding: 8px 12px; background: rgba(0,0,0,0.2); } #progress-monitor .crawl-header:hover { @@ -207,19 +207,72 @@ } #progress-monitor .crawl-label { font-weight: 600; - color: #58a6ff; + color: #f0f6fc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } - #progress-monitor .crawl-meta { + #progress-monitor .crawl-source { + color: #58a6ff; + font-weight: 500; + margin-left: 5px; + } + #progress-monitor .crawl-badges { + display: flex; + flex-wrap: wrap; + gap: 4px; + margin-top: 5px; + } + #progress-monitor .crawl-badge { + display: inline-flex; + align-items: center; + gap: 4px; + max-width: 240px; + padding: 2px 7px; + border-radius: 999px; font-size: 11px; + line-height: 1.35; + color: #c9d1d9; + background: rgba(110, 118, 129, 0.16); + border: 1px solid rgba(110, 118, 129, 0.22); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + #progress-monitor .crawl-badge strong { color: #8b949e; - margin-top: 2px; + font-weight: 600; + } + #progress-monitor .crawl-badge.persona { + color: #d2a8ff; + background: rgba(163, 113, 247, 0.16); + border-color: rgba(163, 113, 247, 0.28); + } + #progress-monitor .crawl-badge.limit { + color: #79c0ff; + background: rgba(88, 166, 255, 0.13); + border-color: rgba(88, 166, 255, 0.24); + } + #progress-monitor .crawl-badge.size { + color: #ffa657; + background: rgba(240, 136, 62, 0.13); + border-color: rgba(240, 136, 62, 0.24); + } + #progress-monitor .crawl-badge.count { + color: #7ee787; + background: rgba(63, 185, 80, 0.13); + border-color: rgba(63, 185, 80, 0.24); + } + #progress-monitor .crawl-badge.tag { + color: #a5d6ff; + background: rgba(31, 111, 235, 0.16); + border-color: rgba(31, 111, 235, 0.28); } #progress-monitor .crawl-stats { display: flex; - gap: 12px; + gap: 6px; + flex-wrap: wrap; + justify-content: flex-end; font-size: 11px; } @@ -861,6 +914,11 @@ function renderCrawl(crawl) { const adminUrl = `/admin/crawls/crawl/${crawl.id || 'unknown'}/change/`; + const crawlId = (crawl.id || 'unknown').toString(); + const crawlShortId = crawlId === 'unknown' ? 'unknown' : crawlId.slice(-8); + const startedDate = crawl.started ? crawl.started.slice(0, 10) : 'unknown date'; + const sourceText = crawl.urls_preview || crawl.label || ''; + const sourceShort = sourceText.length > 70 ? `${sourceText.slice(0, 67)}...` : sourceText; const canCancel = crawl.status === 'queued' || crawl.status === 'started'; const cancelBtn = canCancel ? `` @@ -941,31 +999,35 @@ const maxUrlsText = (crawl.max_urls || 0) > 0 ? `${crawl.max_urls} max URLs` : 'all URLs'; const crawlSizeText = crawl.max_crawl_size_display || 'unlimited'; const snapshotSizeText = crawl.max_snapshot_size_display || 'unlimited'; - let metaText = `by ${escapeHtml(crawl.created_by || 'unknown')} | persona: ${escapeHtml(crawl.persona || 'Default')} | depth: ${crawl.max_depth || 0} | ${maxUrlsText} | crawl: ${escapeHtml(crawlSizeText)} | snapshot: ${escapeHtml(snapshotSizeText)}`; - if ((crawl.total_snapshots || 0) > 0) { - metaText += ` | ${crawl.total_snapshots} snapshots`; - } else if ((crawl.urls_count || 0) > 0) { - metaText += ` | ${crawl.urls_count} URLs`; - } else if (crawl.urls_preview) { - metaText += ` | ${escapeHtml(crawl.urls_preview.substring(0, 40))}${crawl.urls_preview.length > 40 ? '...' : ''}`; - } - if ((crawl.tags || []).length) { - metaText += ` | tags: ${escapeHtml(crawl.tags.join(', '))}`; - } + const itemCountText = (crawl.total_snapshots || 0) > 0 + ? `${crawl.total_snapshots} snapshot${(crawl.total_snapshots || 0) === 1 ? '' : 's'}` + : ((crawl.urls_count || 0) > 0 ? `${crawl.urls_count} URL${(crawl.urls_count || 0) === 1 ? '' : 's'}` : 'no URLs'); + const crawlBadges = [ + `persona${escapeHtml(crawl.persona || 'Default')}`, + `depth${crawl.max_depth || 0}`, + `urls${escapeHtml(maxUrlsText)}`, + `crawl${escapeHtml(crawlSizeText)}`, + `snapshot${escapeHtml(snapshotSizeText)}`, + `items${escapeHtml(itemCountText)}`, + ...(crawl.tags || []).map(tag => `#${escapeHtml(tag)}`), + ].join(''); + const statsHtml = [ + `done${crawl.completed_snapshots || 0}`, + `active${crawl.started_snapshots || 0}`, + `pending${crawl.pending_snapshots || 0}`, + (crawl.cancelled_snapshots || 0) > 0 ? `cancelled${crawl.cancelled_snapshots}` : '', + ].join(''); return `
-
Crawl: ${escapeHtml(crawl.label || '(no label)')}
-
${metaText}
+
Crawl #${escapeHtml(crawlShortId)} ${escapeHtml(startedDate)} started by ${escapeHtml(crawl.created_by || 'unknown')}${sourceShort ? `${escapeHtml(sourceShort)}` : ''}
+
${crawlBadges}
- ${crawl.completed_snapshots || 0} done - ${crawl.started_snapshots || 0} active - ${crawl.pending_snapshots || 0} pending - ${(crawl.cancelled_snapshots || 0) > 0 ? `${crawl.cancelled_snapshots} cancelled` : ''} + ${statsHtml}
${crawlPidHtml} ${crawl.status || 'unknown'} diff --git a/etc/package.json b/etc/package.json index 5a4f56ef..937a486d 100644 --- a/etc/package.json +++ b/etc/package.json @@ -1,6 +1,6 @@ { "name": "archivebox", - "version": "0.9.32rc11", + "version": "0.9.32rc12", "repository": "github:ArchiveBox/ArchiveBox", "license": "MIT", "dependencies": { diff --git a/pyproject.toml b/pyproject.toml index 4d7f2b42..d327202e 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "archivebox" -version = "0.9.32rc11" +version = "0.9.32rc12" requires-python = ">=3.13" description = "Self-hosted internet archiving solution." authors = [{name = "Nick Sweeting", email = "pyproject.toml@archivebox.io"}] @@ -80,8 +80,8 @@ dependencies = [ ### Binary/Package Management "abxbus==2.5.7", # EventBus API "abxpkg>=1.11.8", # for: detecting, versioning, and installing binaries via apt/brew/pip/npm - "abx-plugins>=1.11.10", # shared ArchiveBox plugin package with Chrome/Puppeteer dependency wiring - "abx-dl>=1.11.10", # shared ArchiveBox downloader package with blocking install preflight + "abx-plugins>=1.11.11", # shared ArchiveBox plugin package with Chrome/Puppeteer dependency wiring + "abx-dl>=1.11.11", # shared ArchiveBox downloader package with blocking install preflight ### UUID7 backport for Python <3.14 "uuid7>=0.1.0; python_version < '3.14'", # provides the uuid_extensions module on Python 3.13 ]