console: also use dimensions to tell if we need to use main table

This commit is contained in:
Vincent Bernat
2022-08-08 11:35:18 +02:00
parent b745cfd356
commit b5e48e8cfd
4 changed files with 69 additions and 23 deletions

View File

@@ -150,7 +150,7 @@ func (c *Component) graphHandlerFunc(gc *gin.Context) {
if resolution < time.Second {
resolution = time.Second
}
sqlQuery = c.queryFlowsTable(sqlQuery, input.Filter.MainTableRequired,
sqlQuery = c.queryFlowsTable(sqlQuery, requireMainTable(input.Dimensions, input.Filter),
input.Start, input.End, resolution)
gc.Header("X-SQL-Query", strings.ReplaceAll(sqlQuery, "\n", " "))