5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-30 00:36:21 +00:00

Merge branch 'blazer' into panel.sutty.nl

This commit is contained in:
f 2022-05-02 13:43:07 -03:00
commit 3dc4718b89

View file

@ -56,14 +56,12 @@ class StatsController < ApplicationController
rollup_scope.where(interval: interval, name: "host|#{column}")
.where_dimensions(host: hostnames)
.group("dimensions->>'#{column}'")
.order('sum(value) desc')
.sum(:value)
.transform_values(&:to_i)
.transform_values do |v|
v * nodes
end
.sort_by do |_, v|
v
end.reverse.to_h
end
end
end