Commit Graph

13 Commits

Author SHA1 Message Date
Vincent Bernat
e2f1df9add tests: replace godebug by go-cmp for structure diffs
go-cmp is stricter and allow to catch more problems. Moreover, the
output is a bit nicer.
2025-08-23 16:03:09 +02:00
Vincent Bernat
5e826d48b1 console: fix intermittent failure when requesting previous period
Notably when the main table is required, but also on rare conditions
when another table would be selected because of the interval selection.

This is not perfect as sometimes, we won't have the data.
2025-07-16 20:46:35 +02:00
Fabian Bees
9f64ffc1bb also update tests accordingly 2025-02-04 20:34:15 +01:00
Vincent Bernat
2df8b5785b console: use avg/max for LimitType (instead of Avg/Max) 2024-11-23 23:48:02 +01:00
dimbdr
6c0e8e1791 feat: configure limit type (#1482)
* Add limit type field selection

* Take into account LimitType to generate SQL request for Line graph

Also, add LimitType in default configuration for console

* Take into account LimitType to generate SQL request for Sankey graph

* Refactor on SQL query used by line and sankey

* Add limitType description in doc

* Order by max in graphLine when limitType max is used

* Fix query when using top max

Revert some modifications, as they were no longer relevant with the query fixed.

* Rework way to sort by max in line graph type

* Add configuration validation on LimitType

---------

Co-authored-by: Dimitri Baudrier <github.52grm@simplelogin.com>
2024-11-23 18:39:28 +01:00
Vincent Bernat
41510619ff console: fix top row selection when multiple sampling rates 2024-10-31 07:52:46 +01:00
Vincent Bernat
de65ee6072 tests: introduce helpers.Pos/helpers.Mark
This helps locating the position of a test.
2024-07-01 07:42:36 +02:00
Vincent Bernat
4eaaf977b7 console: API validation for /graph/table-interval
Also add simple HTTP tests.
2024-03-25 14:49:48 +01:00
Vincent Bernat
0792290316 build: switch mockgen to Uber fork 2024-01-14 10:41:50 +01:00
Vincent Bernat
88b27a83e6 console: fix use of aliased columns in dimensions
By default, `SELECT *` does not select ALIAS columns. Add the
appropriate settings to modify this.

Fix #541
2023-03-03 08:27:39 +01:00
Vincent Bernat
63267f0f5b console: enable SrcAddr/DstAddr truncation to a fixed length 2023-02-22 20:55:21 +01:00
Vincent Bernat
609fa24a27 console: factor graphXXXHandlerInput
This is similar to what is done in TypeScript.
2023-02-22 20:54:58 +01:00
Vincent Bernat
e4c3a6b723 console: move /sankey and /graph to /graph/sankey and /graph/line
Also rename stuff to GraphSankey and GraphLine for consistency.
2023-02-22 20:54:58 +01:00