gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit6ea2c6d66ea2c6d6log: morning re-measure 11-04mre6ea2c6d6/components/franchises.hl

2.6 KB

  1. // components/franchises.hl — `/franchises` (tracker.worldapi.org#19, mission 066): every franchise (→ its index), then the
  2. // timelines that belong to none (most of them TMDB's movie collections, collections.hl seed), each with its number of titles.
  3. // The creator sees an "Edit" link to the editor (/franchises/edit). Data: franchises.hl franchiseIndexPage (the franchises on page 1, the loose timelines 40 per page: /franchises/page/N).
  4. parent './main.hl'
  5. import { navigate } from 'hl:web'
  6. import { appTitle } from '../project.hl'
  7. import { franchiseIndexPage, isEditorSession } from '../lib/franchises.hl'
  8. import Pagination from './pagination.hl'
  9. // static: an mpackdb-backed helper must be `static` (hybriel#115/#116), and LOCAL (mission 047)
  10. static indexOf = (&raw) => { return franchiseIndexPage(&raw) }
  11. static editorOf = (&session) => { return isEditorSession(&session) }
  12. session = null
  13. page = null
  14. canEdit = editorOf(&session)
  15. listing = indexOf(&page)
  16. franchiseRows = listing.franchises
  17. timelineRows = listing.timelines
  18. pageNo = listing.page
  19. hasFranchises = franchiseRows.length > 0
  20. noFranchises = franchiseRows.length == 0 && pageNo == 1
  21. hasTimelines = listing.total > 0
  22. pageCount = listing.pages
  23. hasPages = pageCount > 1
  24. // mobile audit MK: the timelines without a franchise are 40 per page (1,546 of them were one 54,000 px page that took 20 s)
  25. timelineCountText = (listing.total == 1 ? '1 timeline without a franchise' : listing.total + ' timelines without a franchise') + (hasPages ? ' · page ' + pageNo + ' of ' + pageCount : '')
  26. goPage = (to) => { navigate(to == 1 ? '/franchises' : '/franchises/page/' + to) }
  27. __title = pageNo > 1 ? 'Franchises, page ' + pageNo + ' — ' + appTitle : 'Franchises — ' + appTitle
  28. View {
  29. franchisesPage {
  30. franchisesHead {
  31. h1 { class = "typed" typeWord { class = "type-word type-franchise" "Franchises" } }
  32. if (canEdit) { a { id = "franchises-edit" class = "button" href = "/franchises/edit" "Edit" } }
  33. }
  34. if (noFranchises) { p { class = "muted" "No franchises yet." } }
  35. if (hasFranchises) {
  36. franchiseList { id = "franchise-list"
  37. for (f of franchiseRows) {
  38. a { class = "franchise-row" href = f.href
  39. franchiseName { f.name }
  40. franchiseCount { f.countText }
  41. }
  42. }
  43. }
  44. }
  45. if (hasTimelines) {
  46. h2 { class = "film-heading" "Timelines" }
  47. p { class = "muted list-count" timelineCountText }
  48. timelineList { id = "timeline-list"
  49. for (t of timelineRows) {
  50. a { class = "timeline-link" href = t.href
  51. timelineLinkName { t.name }
  52. timelineLinkCount { t.countText }
  53. }
  54. }
  55. }
  56. if (hasPages) {
  57. pagerBox { Pagination { pages = pageCount page = pageNo onPage = goPage } }
  58. }
  59. }
  60. }
  61. }

Branches

Latest commits

  • 6ea2c6d6log: morning re-measure 11-04mre
  • 446290f0log: GC1 livemre
  • 8e6aa91dlog: GC1 deploy retrymre
  • 87ad2dc1log: GC1 deployingmre
  • 53f10fb8Merge branch 'gc1-deploy'mre
  • 7fcbf1d2log: GC1 deploy GOmre
  • 1fb6664bcompose: TRACKER_QSTATS=1 (GC1 measurement)mre
  • 6576c1cdgc1: release the people-view scan lists once the view is builtmre
  • 94f8a373gc1: back out the kept episode-id set (no measurable gain on /my/unwatched: 4.69 -> 4.61 GB per 150 loads)mre
  • a1a88bd4gc1: search skips the stale-key string while no entry is stale; /my/unwatched asks a kept id set instead of building a key string per episode rowmre
  • cd830744gc1: dbSearch: no split / map / list copy per candidate (scores from the stored text, top list touched only when the hit can enter)mre
  • 451db7cdgc1: show page and check clicks read the kept watched set instead of building one from a by-value copy of every watchmre
  • ddb4127egc1: TRACKER_QSTATS=1 logs queue and cache sizes every 10 s (measurement only)mre
  • da60547fstatus: GC1 done, backup bugmre
  • e4171021log: GC1 result, backup hard-link bugmre
  • f1597214deploy.sh backup: tar --hard-dereference (hot tar stored mpackdb sidecars as hard links to .sessions files)mre
  • 6b58571elog: GC windowmre
  • 5c8baa1fdeploy lock: hold only around deploy.shmre
  • b8dac822log: hybriel#309mre
  • bf676d9elog: GC1 startedmre