]> rtime.felk.cvut.cz Git - coffee/main.git/log
coffee/main.git
2 years agoREADME: Document how to use nix-shell for development master
Michal Sojka [Wed, 1 Sep 2021 14:20:17 +0000 (16:20 +0200)]
README: Document how to use nix-shell for development

2 years agonix: Add pkg-config to dependency
Michal Sojka [Wed, 1 Sep 2021 14:14:21 +0000 (16:14 +0200)]
nix: Add pkg-config to dependency

Needed for building the mtaio program in nix-shell.

2 years agonix: Update dependencies to match versions on updated rtime
Michal Sojka [Wed, 1 Sep 2021 13:21:08 +0000 (15:21 +0200)]
nix: Update dependencies to match versions on updated rtime

2 years agonix: Update niv by running `niv init`
Michal Sojka [Wed, 1 Sep 2021 10:43:43 +0000 (12:43 +0200)]
nix: Update niv by running `niv init`

3 years agoDocument the size of the terminal window
Michal Sojka [Tue, 25 Aug 2020 09:58:18 +0000 (11:58 +0200)]
Document the size of the terminal window

3 years agoEnable ntpd
Michal Sojka [Thu, 20 Aug 2020 11:21:09 +0000 (13:21 +0200)]
Enable ntpd

We need the time on the terminal to be synchronized with the server so
that events are not reported in the future. Currently, we had terminal
time running 10 minutes ahead, which caused problems with the new
"event logging" commits.

3 years agoTry to fix a link to other repo
Michal Sojka [Thu, 20 Aug 2020 09:53:21 +0000 (11:53 +0200)]
Try to fix a link to other repo

3 years agoExtend README
Michal Sojka [Wed, 19 Aug 2020 17:30:24 +0000 (19:30 +0200)]
Extend README

3 years agonix: Add flake8
Michal Sojka [Wed, 19 Aug 2020 13:15:51 +0000 (15:15 +0200)]
nix: Add flake8

Without it, my editor no longer reports about Python formatting
convention violations.

3 years agonix: Use the same Jinja2 version as on rtime
Michal Sojka [Tue, 18 Aug 2020 16:14:28 +0000 (18:14 +0200)]
nix: Use the same Jinja2 version as on rtime

3 years agoUse Niv to get perfectly reproducible Nix development environment
Michal Sojka [Tue, 18 Aug 2020 06:49:48 +0000 (08:49 +0200)]
Use Niv to get perfectly reproducible Nix development environment

(see https://github.com/nmattia/niv)

3 years agoUpdate submodules
Michal Sojka [Sun, 2 Aug 2020 22:25:50 +0000 (00:25 +0200)]
Update submodules

* coffee-flask e21678b...9a9446d (28):
  > Add comments
  > Workaround the incompatibility created by Matplotlib 3.3.0
  > Suppress Matplotlib's deprecation warning
  > Add TODO
  > Add doc string
  > Add `type` for flavors and build current consumption dynamically
  > Add new beverage `tea` and make buttons larger
  > Add missing quotes in JS handler for disabling identifier
  > Include constant SQL values directly in queries
  > Update debug message
  > Rename DB field identifiers.status to identifiers.active
  > Add support for multiple identifiers per user
  > Wrap long line and unify upper-casing of SQL keywords
  > Separate counting of coffees and club-mate
  > Remove last coffe pack opened button
  > Add support for another beverages (namely club mate)
  > Change the name of the configuration file
  > Fix column name in UNIQUE index
  > Fix duplicate recording of coffees
  > English fixes
  > Make config-related error message more informative
  > Add last coffee pack button
  > Fix data acquisition for flavor graph.
  > Add TODO
  > Add graphs with total coffee consumption on login screen
  > Fix tag in 'user' template
  > Remove unused function
  > Fix incorrect counting of coffees made during time close to midnight

* terminal/src/buildroot 82779ca806...f98ee51dee (2):
  > overlay: Enable useful munin plugins
  > munin-c: Add iostat plugin and fix memory plugin

* terminal/src/mt-apps 8a4c5fe...b50bf70 (2):
  > mt_server: Use "%s" format string in syslog()
  > Uses letters in test identifiers, not only numbers

3 years agoAdd Nix expression for rtime-like environment
Michal Sojka [Sun, 2 Aug 2020 22:23:06 +0000 (00:23 +0200)]
Add Nix expression for rtime-like environment

The environment can be entered either by nix-shell or with the help of
Lorri and direnv, whose .envrc is also included.

5 years agocoffee-flask: Fix coffee graph for start of the month
Michal Sojka [Mon, 3 Sep 2018 16:20:15 +0000 (18:20 +0200)]
coffee-flask: Fix coffee graph for start of the month

An error was found during the start of new month. To fix this I have
changed the SQL query to use '%s' (unix time) instead of '%d' (day
number).

How does this work?
The SQL query is using relation between two tables based on the date.
This relation is created using these parts of query:
 > "select num,date('now',-num || ' days')" as d from days
 > d = date(c.time)

First line creates timestampes of last 7 days -- time is set to
UTC midnight.
Second line converts data in 'c.time' to date struct - BUT! Even
here the time is set to midnight. This behaviour makes the relation
possible.

How does it behave in app.py?
Result of the query contains data that are ordered by time.
Unfortunately this order is lost during recasting the data to
list/dict (which are unordered). To solve this sorting is used.
Sorting data with unix time is safe, because it is always increasing.

To highlight this change, 'days' variable is refactored to 'unix_days'.

5 years agoREADME: Document where and how to send patches
Michal Sojka [Sun, 2 Sep 2018 20:49:36 +0000 (22:49 +0200)]
README: Document where and how to send patches

5 years agoREADME: Fix typos
Michal Sojka [Sun, 2 Sep 2018 20:23:55 +0000 (22:23 +0200)]
README: Fix typos

5 years agoFix offline mode and make it a bit more user friendly
Michal Sojka [Thu, 16 Aug 2018 22:16:41 +0000 (00:16 +0200)]
Fix offline mode and make it a bit more user friendly

Hopefully, there are not many new bugs :)
The notable changes in submodules are:

Submodule coffee-flask 9b74ccb..d99857c:
  > Center all content
  > Show current content of the offline queue when going offline
  > Do not allow multiple reconnect timers running simultaneously
  > When replaying offline queue, use the original event time rather than now()
  > Remove unused variable
  > Replace "fuck" with "ajax_failure"
  > Logout automatically even without selecting any beverage
  > Implement clean switching between online and offline mode
  > Catch all exceptions in JS function updateUI
  > Use new data structure for offline-collected data
  > Remove commented out code

Submodule terminal/src/mt-apps 89b7898..8a4c5fe:
  > Make it easier to call showOfflineQueue() from remote scripts
  > Replace tabs with spaces
  > Do not generate "empty" messages
  > Rework offline mode
  > Store offline data in an array rather than in a hash
  > Use more distinguishable user ids for simulated users
  > Replace tabs with spaces

5 years agoUpdate coffee-flash submodule
Michal Sojka [Thu, 16 Aug 2018 14:53:38 +0000 (16:53 +0200)]
Update coffee-flash submodule

5 years agoAdd FLASK_DEBUG to readme
Michal Sojka [Wed, 15 Aug 2018 07:43:42 +0000 (09:43 +0200)]
Add FLASK_DEBUG to readme

It causes automatic reload of flask app when the file is changed.

5 years agoUpdate flask
Michal Sojka [Fri, 10 Aug 2018 11:57:20 +0000 (13:57 +0200)]
Update flask

5 years agocoffee-flask: Show only integer numbers on the Y-axis
Michal Sojka [Fri, 10 Aug 2018 10:50:12 +0000 (12:50 +0200)]
coffee-flask: Show only integer numbers on the Y-axis

5 years agoflask: Updates from Jirka and Tomáš
Michal Sojka [Fri, 10 Aug 2018 09:21:35 +0000 (11:21 +0200)]
flask: Updates from Jirka and Tomáš

5 years agoflask: Apply Jirka's patches
Michal Sojka [Thu, 9 Aug 2018 16:24:46 +0000 (18:24 +0200)]
flask: Apply Jirka's patches

5 years agoFix README
Michal Sojka [Thu, 9 Aug 2018 07:48:04 +0000 (09:48 +0200)]
Fix README

Thanks to Tomáš P. for reporting.

5 years agoterminal/src/mt-apps: Make Makefile cleaner
Michal Sojka [Wed, 8 Aug 2018 15:35:32 +0000 (17:35 +0200)]
terminal/src/mt-apps: Make Makefile cleaner

5 years agoterminal/src/mt-apps: Fix compilation errors
Michal Sojka [Wed, 8 Aug 2018 15:18:45 +0000 (17:18 +0200)]
terminal/src/mt-apps: Fix compilation errors

5 years agoMake it easier to hack on the code and document it
Michal Sojka [Wed, 8 Aug 2018 14:06:13 +0000 (16:06 +0200)]
Make it easier to hack on the code and document it

5 years agoMake it easier to compile simulator
Michal Sojka [Wed, 8 Aug 2018 13:44:21 +0000 (15:44 +0200)]
Make it easier to compile simulator

5 years agoREADME: Mention how to access collected data
Michal Sojka [Wed, 8 Aug 2018 12:01:15 +0000 (14:01 +0200)]
README: Mention how to access collected data

5 years agoUpdate submodules
Michal Sojka [Wed, 8 Aug 2018 11:57:25 +0000 (13:57 +0200)]
Update submodules

5 years agocoffee-flask: Show public address of git repository
Michal Sojka [Wed, 8 Aug 2018 07:47:46 +0000 (09:47 +0200)]
coffee-flask: Show public address of git repository

5 years agoUpdate README
Michal Sojka [Wed, 8 Aug 2018 07:43:22 +0000 (09:43 +0200)]
Update README

This is to test gitweb's README feature.

5 years agoAllow monitoring the terminal with Munin
Michal Sojka [Wed, 8 Aug 2018 07:14:17 +0000 (09:14 +0200)]
Allow monitoring the terminal with Munin

5 years agoterminal/src/buildroot: qtwebbrowser: Fix branch name
Michal Sojka [Wed, 8 Aug 2018 07:09:26 +0000 (09:09 +0200)]
terminal/src/buildroot: qtwebbrowser: Fix branch name

5 years agoAdd README
Michal Sojka [Tue, 7 Aug 2018 13:34:45 +0000 (15:34 +0200)]
Add README

5 years agoUpdate submodules
Michal Sojka [Tue, 7 Aug 2018 13:34:38 +0000 (15:34 +0200)]
Update submodules

5 years agoUpdate mt-apps
Michal Sojka [Tue, 7 Aug 2018 09:23:53 +0000 (11:23 +0200)]
Update mt-apps

5 years agoUpdate buildroot
Michal Sojka [Tue, 7 Aug 2018 09:07:02 +0000 (11:07 +0200)]
Update buildroot

5 years agoAdd .gitignore
Michal Sojka [Mon, 6 Aug 2018 10:56:59 +0000 (12:56 +0200)]
Add .gitignore

5 years agoterminal/src/buildroot: Use specific version of ufr-lib
Michal Sojka [Mon, 6 Aug 2018 10:46:28 +0000 (12:46 +0200)]
terminal/src/buildroot: Use specific version of ufr-lib

Using just master can mean that we will not be able to build our
software later, when ufr-lib changes its interface. Use current
version, where build works.

5 years agoUpdate submodule branches and update buildroot
Michal Sojka [Mon, 6 Aug 2018 08:54:03 +0000 (10:54 +0200)]
Update submodule branches and update buildroot

5 years agoInitial commit
Michal Sojka [Mon, 6 Aug 2018 08:21:38 +0000 (10:21 +0200)]
Initial commit

Just take repositories from Mr. Matěják a add them as submodules. Also
create the build directory with Matěják's configuration.