Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DR: Offline sign-in sheet #17

Open
dehnert opened this issue Sep 21, 2022 · 1 comment
Open

DR: Offline sign-in sheet #17

dehnert opened this issue Sep 21, 2022 · 1 comment

Comments

@dehnert
Copy link

dehnert commented Sep 21, 2022

For disaster resilience, it would be nice to have a plan if SquaresDB is down for some reason. I think a pretty good approach would be:

  1. Have a simple (authenticated) HTML view that the DB can generate with a list of our members, along with student and subscription status.
  2. (Optional) Also generate a PDF of that HTML automatically (this helps guarantee that we're not depending on browsers to support the expected printer-friendly view, and we can instead just make sure the PDFs generated look reasonable and trust that anyone will be able to print it)
  3. Have a script that automatically (say, weekly) saves that HTML view (and PDF) to a git repo and pushes to GitHub/GitLab
  4. Grant access to various people on GitHub/GitLab
  5. (Optional) Serve that HTML from web.mit.edu, protected by certs
  6. (Optional) Automatically fetch the repo and make sure it's never more than a couple weeks old.
  7. If things go bad, somebody can download the file from GitHub/GitLab or web.mit.edu, print it, and do basic paper gate until SquaresDB is fixed.

We could either have the SquaresDB server save the view itself and push it, or use cron_scripts on Athena. Either would be fine; the latter probably makes the "serve from web.mit.edu" step easier, but the former might make fetching the view easier, and also has a more obvious place to version control the cronjob.

@dehnert
Copy link
Author

dehnert commented Jan 18, 2023

The voting member view is a good start to the mentioned HTML view.

Tweaks:

  • Include future dances, not just past ones. (Depending on space, we probably want the last like five dances, plus either the next like ten, or all remaining ones in the DB.)
  • Make sure it prints well (consider generating a PDF?)
  • Sort by (quantized) frequency categories, then name, rather than by number of dances attended

Probably we'll want a helper function and maybe a reusable template snippet, plus a couple view functions (for voting members and printed gate) that use them.

dehnert added a commit that referenced this issue Mar 18, 2023
This is basically just a variant of the voting member view. It has all
our members who attend, with their current subscription status and
attendance for the last few dances and next several, sorted by
attendance frequency and name.

Improvements to make:
- Show table borders when printed
- Make rows shorter so we can fit more people per page
- Actually stash this somewhere useful automatically
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant