5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 23:26:22 +00:00

las tablas también están filtradas

This commit is contained in:
f 2022-04-30 20:41:38 -03:00
parent 158c224449
commit 3f29d87acd

View file

@ -46,7 +46,7 @@ class StatsController < ApplicationController
Stat::COLUMNS.each do |column| Stat::COLUMNS.each do |column|
@columns[column] = @columns[column] =
Rails.cache.fetch("stats/#{column}/#{site.id}", expires_in: expires_in) do Rails.cache.fetch("stats/#{column}/#{site.id}", expires_in: expires_in) do
Rollup.where(interval: interval, name: "host|#{column}") rollup_scope.where(interval: interval, name: "host|#{column}")
.where_dimensions(host: hostnames) .where_dimensions(host: hostnames)
.group("dimensions->>'#{column}'") .group("dimensions->>'#{column}'")
.sum(:value) .sum(:value)