gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit9b3828ae9b3828aemission 046a: report, LOGmre9b3828ae/components/franchises.hl

1.9 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 franchiseIndex.
  4. parent './main.hl'
  5. import { appTitle } from '../project.hl'
  6. import { franchiseIndex, isEditorSession } from '../lib/franchises.hl'
  7. // static: an mpackdb-backed helper must be `static` (hybriel#115/#116), and LOCAL (mission 047)
  8. static indexOf = () => { return franchiseIndex() }
  9. static editorOf = (&session) => { return isEditorSession(session) }
  10. session = null
  11. canEdit = editorOf(session)
  12. listing = indexOf()
  13. franchiseRows = listing.franchises
  14. timelineRows = listing.timelines
  15. hasFranchises = franchiseRows.length > 0
  16. noFranchises = franchiseRows.length == 0
  17. hasTimelines = timelineRows.length > 0
  18. timelineCountText = timelineRows.length == 1 ? '1 timeline without a franchise' : timelineRows.length + ' timelines without a franchise'
  19. __title = 'Franchises — ' + appTitle
  20. View {
  21. franchisesPage {
  22. franchisesHead {
  23. h1 { class = "typed" typeWord { class = "type-word type-franchise" "Franchises" } }
  24. if (canEdit) { a { id = "franchises-edit" class = "button" href = "/franchises/edit" "Edit" } }
  25. }
  26. if (noFranchises) { p { class = "muted" "No franchises yet." } }
  27. if (hasFranchises) {
  28. franchiseList { id = "franchise-list"
  29. for (f of franchiseRows) {
  30. a { class = "franchise-row" href = f.href
  31. franchiseName { f.name }
  32. franchiseCount { f.countText }
  33. }
  34. }
  35. }
  36. }
  37. if (hasTimelines) {
  38. h2 { class = "film-heading" "Timelines" }
  39. p { class = "muted list-count" timelineCountText }
  40. timelineList { id = "timeline-list"
  41. for (t of timelineRows) {
  42. a { class = "timeline-link" href = t.href
  43. timelineLinkName { t.name }
  44. timelineLinkCount { t.countText }
  45. }
  46. }
  47. }
  48. }
  49. }
  50. }

Branches

Latest commits

  • 9b3828aemission 046a: report, LOGmre
  • 4b37356emission 046: franchise seed supersedeCollections reads the curated timelines once (10 s one-tick block at the end of boot)mre
  • ac6268e3mission 046a: re-vendor Hybriel 528bc89f (integration 6): plugins mpackdb/time/web (bin/ git-ignored)mre
  • 322b3293mission 046: photoQueue guard for non-row fetch results (damaged persons index)mre
  • e5b99aecmission 046: photoQueue in slices (people.hl photoQueueStart/Step, jobs.hl photoTick), tests/photoqueue.hlmre
  • 31dcf2admission 045: report, LOGmre
  • 9c3971d0tests/persons-skip-count.hlmre
  • 4d72e365mission 045mre
  • b9cae4c9slices: skip and count non-row values from range(); merge persons pass falls back to iterate; guard testmre
  • 3db7dc31merge w44-jobs-slices into w43-trkmemmre
  • 593dab6fmission 043: report, LOGmre
  • 1a5a4818boot scans back to iterate (slices measured slower: titles 114 s, episodes 141 s, persons failed); lambda per rowmre
  • 03d29893boot scans read primary-key slices (lib/slices.hl from mission 044): iterate is eager too; people view log line back; allShows/allEpisodes stay for toolsmre
  • 23375c58mission 044: report, LOG, STATUSmre
  • c6fd928emission 044: 4096 slices for tables over 200 K rows, 15 ms budget, TRACKER_SLICE_DEPTH for testsmre
  • fb057680mission 044: jobs.hl imports mergeLeft (gate found it), mission file, slices benchmre
  • 0d6293ebmission 043: mission filemre
  • d25bd14amission 044: sliced merge prepare + sliced collections prepare; jobs-dump old/new check + bulk fixturemre
  • 633ee210mission 044: sliced table scans (slices.hl, pk-range slices) for the adult/kind/status/art/credits/details-repair queuesmre
  • 55bbd619boot: one streamed pass per table (lib/bootscan.hl) instead of find(null,null) per module; follows/watches/franchises scans streammre