browsertrix/frontend
Tessa Walsh 6797b41de0
Add pageCount to crawls and uploads and use in frontend for page counts (#2315)
Fixes #2257 

This is a follow-up to the public collections work, which adds pages to
the database for uploads. All crawls and uploads now have a `pageCount`
field which is populated when the item is successfully added. A new
migration is also added to populate the field for existing archived
items that don't have it set yet.

OrgMetrics have also been modified to include `crawlPageCount` and
`uploadPageCount`, and to include the total of both in `pageCount`, and
all three included in the frontend org dashboard.

The frontend has been updated to use `pageCount` rather than
`stats.done` wherever appropriate, meaning that in archived item lists
and details we now have a consistent page count for both crawls and
uploads.

### New functionality

- Deploy this branch
- Create new crawls and uploads and verify that page count appears
correctly throughout the frontend for all new crawls and uploads

### Migration

- Deploy from latest main
- Create some crawls and uploads
- Change to this branch and re-deploy
- Verify migration ran without errors in backend logs
- Verify that page count has been populated successfully by checking
archived items lists, crawl and upload detail pages, and dashboard to
ensure there are no longer any missing page counts.

---------

Co-authored-by: emma <hi@emma.cafe>
2025-01-16 14:41:14 -08:00
..
.husky chore: Auto-commit extracted localization strings (#2089) 2024-09-30 10:48:13 -07:00
config Remove ANALYTICS_NAMESPACE, as it's only usable at build time (#2293) 2025-01-13 20:13:30 -08:00
docs feat: Add slug to collections and use it in public collection URLs (#2301) 2025-01-15 22:44:32 -08:00
lib Localize durations on frontend (#2196) 2024-12-03 16:46:57 -05:00
patches
scripts deps: Improve Webpack build performance (#2288) 2025-01-14 12:55:12 -08:00
src Add pageCount to crawls and uploads and use in frontend for page counts (#2315) 2025-01-16 14:41:14 -08:00
tests test: Update Playwright E2E test settings (#2247) 2024-12-16 17:36:21 -08:00
xliff Add pageCount to crawls and uploads and use in frontend for page counts (#2315) 2025-01-16 14:41:14 -08:00
.dockerignore Optimizing Frontend Dockerfile (#60) 2021-12-05 18:39:45 -08:00
.editorconfig chore: add editorconfig in frontend 2023-02-24 13:04:11 -08:00
.eslintrc.js Frontend hosted-docs (#2107) 2024-10-08 14:56:34 -07:00
.gitignore
.prettierignore Frontend hosted-docs (#2107) 2024-10-08 14:56:34 -07:00
.vscode
.yarnrc deps: Upgrade to Node 22 (#2274) 2025-01-07 11:58:23 -08:00
00-browsertrix-nginx-init.sh feat: Track collection events (#2256) 2025-01-13 15:15:49 -08:00
Dockerfile deps: Upgrade to Node 22 (#2274) 2025-01-07 11:58:23 -08:00
frontend.conf.template Frontend hosted-docs (#2107) 2024-10-08 14:56:34 -07:00
index.d.ts feat: Collection thumbnails, start page, and public view updates (#2209) 2025-01-13 15:15:48 -08:00
lit-localize.json Add new locales (#2240) 2024-12-13 19:59:09 -08:00
minio.conf Local Deployment Work: Support running locally + test cluster on CI (#396) 2022-12-02 19:58:34 -08:00
package.json deps: Improve Webpack build performance (#2288) 2025-01-14 12:55:12 -08:00
playwright.config.ts test: Update Playwright E2E test settings (#2247) 2024-12-16 17:36:21 -08:00
postcss.config.js Add detailed permissions & permission summaries to user invite popup (#2003) 2024-08-20 20:34:29 -04:00
prettier.config.js Changes to support weblate workflow (#2210) 2024-12-09 15:16:47 -08:00
README.md
sample.env.local Remove ANALYTICS_NAMESPACE, as it's only usable at build time (#2293) 2025-01-13 20:13:30 -08:00
tailwind.config.js deps: Upgrade to Node 22 (#2274) 2025-01-07 11:58:23 -08:00
tsconfig.eslint.json
tsconfig.json Use types from ReplayWebPage (#2265) 2024-12-23 16:38:37 -05:00
vendor.webpack.config.js deps: Improve Webpack build performance (#2288) 2025-01-14 12:55:12 -08:00
web-test-runner.config.mjs feat: Track collection events (#2256) 2025-01-13 15:15:49 -08:00
webpack.config.js Add pageCount to crawls and uploads and use in frontend for page counts (#2315) 2025-01-16 14:41:14 -08:00
webpack.dev.js deps: Improve Webpack build performance (#2288) 2025-01-14 12:55:12 -08:00
webpack.prod.js Emit eslint errors during webpack builds & during dev (#1667) 2024-04-09 17:42:31 -04:00
yarn.lock deps: Improve Webpack build performance (#2288) 2025-01-14 12:55:12 -08:00