aboutsummaryrefslogtreecommitdiff
path: root/lib/Persist.hs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Persist: add cascade rules to foreign keysstuebinm2024-05-161-9/+7
| | | | | | | | | | It turns out persist does support these, they're just not mentioned in the yesod book. (for future reference, the syntax is defined in Database.Persist.Quasi, which does include some documentation [1]) [1] https://hackage.haskell.org/package/persistent-2.14.6.1/docs/Database-Persist-Quasi.html
* new feature: Server.Frontend.Tickerstuebinm2024-05-161-0/+7
| | | | | | | | A simple way to have "announcements" available via API, and otherwise distinct from the service announcements which show up in Gtfs Realtime. These are meant to go e.g. be embedded on the operator's website, or in other places where it's not as easy to display per-trip specific messages.
* Server.Ingest: new handling of unassigned trackersstuebinm2024-05-151-1/+5
| | | | | | | | now takes all potential stops along each trip into account when guessing tickets; also checks if a ticket is still likely in case the tracker switched its direction. This should solve many cases where a tracker is accidentally turned off or falls asleep halfway before the last station of one trip, then wakes up in the middle of the next.
* restructure: get the tracker to work againstuebinm2024-05-021-8/+30
| | | | | | | | | | | | | | | This should hopefully be the final (major) part of the restructuring: a tracker no longer has to know which trip it is on (and indeed it has no idea for now), instead the server keeps state about which trips are currently running and will insert incoming pings in a hopefully reasonable manner, based on their geoposition & time. There's lots of associated TODO items here (especially there should be manual overrides for all this logic in the web ui), but that's work for a future me. (incidentally, this also adds support for sending all log messages out via ntfy-sh)
* restructure: save a ticket's stop in the databasestuebinm2024-04-241-12/+54
| | | | now mostly independent of the gtfs, but still no live-reloading of it.
* restructure: have "tickets" independent of gtfsstuebinm2024-04-201-25/+30
| | | | | | this is mostly meant to guard against the gtfs changing under tracktrain, and not yet complete (e.g. a ticket does not yet save its expected stops, which it probably should).
* general housekeepingstuebinm2024-04-171-15/+7
| | | | | jumps to GHC2021 as default language, adds in some fields, moves the old org mode glossary to markdown, etc.
* on-board-unit: display estimated delay etc.stuebinm2022-09-111-2/+6
|
* correct the generated openapi descriptionstuebinm2022-09-111-1/+3
|
* reasonable delay forecastsstuebinm2022-09-021-2/+3
|
* guess at future delays (horrible, incorrect, and unfinished)stuebinm2022-08-311-6/+9
|
* this does way too much tbh (also functioning delays)stuebinm2022-08-281-8/+2
| | | | most of it deals with timezones, and all the weird implications that has
* controlroom: lots of pretty little knobsstuebinm2022-08-271-18/+30
| | | | (also some database schema changes, for good measure)
* control room: translations & form inputstuebinm2022-08-141-1/+1
| | | | still basic, but works pretty well overall
* controlroom: replace servant/lucid with yesodstuebinm2022-08-141-2/+1
| | | | aka use something meant for webapps to write the webapp
* a little more control room workstuebinm2022-07-201-2/+8
|
* some work on the control roomstuebinm2022-07-171-1/+1
| | | | (it can do useful stuff! but it also still breaks on some things!)
* somewhat functioning control roomstuebinm2022-07-111-1/+1
| | | | | | tbh i've kinda lost track at what has all been changed in this, but the control room form handling now works, and i can write announcements into the database. Now on to making it do useful things!
* rudimentary admin api implementationstuebinm2022-07-021-5/+4
|
* gtfs realtime: add vehicle positionsstuebinm2022-07-021-0/+1
| | | | | | (or at least something that looks like it might be correct — though it carries very little information, and lacks things like what the next stop along the route is)
* more or less functional servicealerts for gtfs rtstuebinm2022-07-021-2/+7
| | | | (kinda barebones, but the important things should be there)
* handle GTFS shapes (& send them out along trips)stuebinm2022-06-191-4/+4
| | | | | unfortunately, this makes some responses pretty large. Let's see if it works this way or if i have to find some way to break them up instead.
* a couple more database schemasstuebinm2022-06-161-5/+28
| | | | | might eventually be needed; until then they're just scaffolding so I don't loose sight of things
* foreign keys are a thingstuebinm2022-06-161-10/+10
| | | | | | (and they can be useful, too!) Also, documentation & deleting imports / extensions that aren't used.
* actually use the databasestuebinm2022-06-161-0/+85
(at least for a few simple things) Also, more modules!