-
Notifications
You must be signed in to change notification settings - Fork 2
Code Notes
Dashboards are used to store the state of the application. There are three types of dashboards, state, county and audit board. The dashboards are stored in the database.
Abstract State Machines(ASM) are used during the dashboards' transitions through the application workflow. There is one ASM for the State, and two for each county; "County" and "AuditBoard". They are retrieved from the db upon each request.
Events are emitted on some endpoints. Events are used to transition (update) the ASMs. This happens in a "after hook" (see: afterAfter) on each request.
Render CastVoteRecords to json (AUDITOR_ENTERED and PHANTOM_BALLOT) (all and per county)
Save CastVoteRecord to database (AUDITOR_ENTERED) county,cvr-number,scanner-id,batch-id,record-id,imprinted-id,ballot-type,contest-info
render the state for Audit Board (per county) as json
add audit board members to the CountyDashboard
add report to the CountyDashboard name, report(string,data?), time
render all BallotManifests to json (all and per county)
save csv file to db (rows as BallotManifestInfo) county,scanner-id,batche-number,num-ballots,batch-location (delete matching uploads for county????)
submit CastVoteRecord as PHANTOM_BALLOT maybe emit ROUND_COMPLETE_EVENT
render UPLOADED CastVoteRecords as json (and by county) (and by id)
one-at-a-time (per county) import of CVRs start CVRImporter from UploadedFile in a thread request body is json, file is an attribute as a blob
download a csv with a random list of CVRs to fetch from storage(by person) (also as json)
render contests to json (and by county) (and by id)
render the current CountyDashboardASM as json
render the full CountyDashboard as json
render pdf or csv of a county report
render the the current dos state as json
render the full dos dashboard as json
unsure how file is found - download a file from file_info query param
creates a temp file "upload.csv" and archives it to /opt/corla/file_archive/ (see: unix_upload_file_location)
add ContestToAudit to hand_count_counties on State Dashboard
submit intermediate report and sign out audit board
not yet implemented
not yet implemented
delete everything ("delete from ...") and save new dashboards and reset county ASMs
update AuditInfo(risk_limit, etc.) on State Dashboard
nothing
add contest to State Dashboard's list of contests to audit
set seed on State Dashboard
- emit events
- RISK_LIMIT_ACHIEVED_EVENT
- BALLOTS_EXHAUSTED_EVENT
- ROUND_SIGN_OFF_EVENT
update County and Audit Board Dashboards and ASM
render pdf or csv of State Report
remove 'admin' from session hash
update State Dashboard emit audit info event