1. 13 Dec, 2019 1 commit
  2. 12 Dec, 2019 5 commits
  3. 11 Dec, 2019 1 commit
  4. 06 Dec, 2019 2 commits
  5. 22 Nov, 2019 1 commit
  6. 21 Nov, 2019 4 commits
  7. 19 Nov, 2019 1 commit
  8. 13 Nov, 2019 2 commits
  9. 08 Nov, 2019 13 commits
  10. 07 Nov, 2019 2 commits
  11. 05 Nov, 2019 2 commits
  12. 04 Nov, 2019 4 commits
    • Lucas Seguinot's avatar
      refactor(alarm): truncate dates to the second · f31a1a7e
      Lucas Seguinot authored
      When the alarms are written to the database, the dates are converted to
      timestamps, in seconds.
      The dates used internally should be the same as the ones stored in the
      database, so that the engines do not work on different versions of the
      same alarm.
    • Lucas Seguinot's avatar
      fix(alarm): stop initializing slices and maps in NewAlarm · 0ed255a5
      Lucas Seguinot authored
      nil is a valid slice/map, and is the value that is used for empty slices
      and maps when unmarshaling a JSON or BSON object.
      Since NewAlarm is often used in tests, its behavior should be as close
      as possible from the unmarshaling.
    • Lucas Seguinot's avatar
      refactor(alarm): stop using pointers for StateChanges fields · 320ad2f6
      Lucas Seguinot authored
      The TotalStateChanges and StateChangesSinceStatusUpdate used to have
      type *types.CpsNumber.
      This meant that the value nil had to be handled, and interpreted has 0,
      which made the code and the tests more complicated.
    • Lucas Seguinot's avatar
      refactor(alarm): remove isDirty field · 751bc446
      Lucas Seguinot authored
      This field was never written to the cache or database. This implied that
      given an alarm with isDirty = true, writing this alarm to the cache and
      reading it would return a slightly different alarm (with isDirty =
      This field was never used, so it can be safely removed. Removing it will
      make it easier to write tests for the alarm's cache.
  13. 31 Oct, 2019 1 commit
  14. 30 Oct, 2019 1 commit
    • Lucas Seguinot's avatar
      fix(stat): stop storing ok and ko fields with value 0 · 25e75174
      Lucas Seguinot authored
      The stat engine used to add a new point with fields ok and ko for each
      event, with value 0 or 1.
      This commits modifies it to only add fields with the value 1.
      This allows to get the last ok or ko event with `last(ok)` or
      `last(ko)`, which is a lot faster than using a query `where ko = 1`.