Agregar rollups
This commit is contained in:
parent
752569c8a7
commit
094a8092de
3 changed files with 25 additions and 1 deletions
1
Gemfile
1
Gemfile
|
@ -58,6 +58,7 @@ gem 'rails-i18n'
|
||||||
gem 'rails_warden'
|
gem 'rails_warden'
|
||||||
gem 'redis', require: %w[redis redis/connection/hiredis]
|
gem 'redis', require: %w[redis redis/connection/hiredis]
|
||||||
gem 'redis-rails'
|
gem 'redis-rails'
|
||||||
|
gem 'rollups'
|
||||||
gem 'rubyzip'
|
gem 'rubyzip'
|
||||||
gem 'rugged'
|
gem 'rugged'
|
||||||
gem 'concurrent-ruby-ext'
|
gem 'concurrent-ruby-ext'
|
||||||
|
|
10
Gemfile.lock
10
Gemfile.lock
|
@ -205,6 +205,8 @@ GEM
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
globalid (0.4.2)
|
globalid (0.4.2)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
|
groupdate (5.2.2)
|
||||||
|
activesupport (>= 5)
|
||||||
hairtrigger (0.2.24)
|
hairtrigger (0.2.24)
|
||||||
activerecord (>= 5.0, < 7)
|
activerecord (>= 5.0, < 7)
|
||||||
ruby2ruby (~> 2.4)
|
ruby2ruby (~> 2.4)
|
||||||
|
@ -345,6 +347,7 @@ GEM
|
||||||
mini_histogram (0.3.1)
|
mini_histogram (0.3.1)
|
||||||
mini_magick (4.11.0)
|
mini_magick (4.11.0)
|
||||||
mini_mime (1.1.0)
|
mini_mime (1.1.0)
|
||||||
|
mini_portile2 (2.5.3)
|
||||||
minima (2.5.1)
|
minima (2.5.1)
|
||||||
jekyll (>= 3.5, < 5.0)
|
jekyll (>= 3.5, < 5.0)
|
||||||
jekyll-feed (~> 0.9)
|
jekyll-feed (~> 0.9)
|
||||||
|
@ -357,7 +360,8 @@ GEM
|
||||||
net-ssh (6.1.0)
|
net-ssh (6.1.0)
|
||||||
netaddr (2.0.4)
|
netaddr (2.0.4)
|
||||||
nio4r (2.5.7-x86_64-linux-musl)
|
nio4r (2.5.7-x86_64-linux-musl)
|
||||||
nokogiri (1.11.7-x86_64-linux)
|
nokogiri (1.11.7-x86_64-linux-musl)
|
||||||
|
mini_portile2 (~> 2.5.0)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
parallel (1.20.1)
|
parallel (1.20.1)
|
||||||
|
@ -479,6 +483,9 @@ GEM
|
||||||
actionpack (>= 5.0)
|
actionpack (>= 5.0)
|
||||||
railties (>= 5.0)
|
railties (>= 5.0)
|
||||||
rexml (3.2.5)
|
rexml (3.2.5)
|
||||||
|
rollups (0.1.2)
|
||||||
|
activesupport (>= 5.1)
|
||||||
|
groupdate (>= 5.2)
|
||||||
rouge (3.26.0)
|
rouge (3.26.0)
|
||||||
rubocop (1.18.3)
|
rubocop (1.18.3)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
|
@ -692,6 +699,7 @@ DEPENDENCIES
|
||||||
recursero-jekyll-theme
|
recursero-jekyll-theme
|
||||||
redis
|
redis
|
||||||
redis-rails
|
redis-rails
|
||||||
|
rollups
|
||||||
rubocop-rails
|
rubocop-rails
|
||||||
rubyzip
|
rubyzip
|
||||||
rugged
|
rugged
|
||||||
|
|
15
db/migrate/20210807003928_create_rollups.rb
Normal file
15
db/migrate/20210807003928_create_rollups.rb
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Crear la tabla de Rollups
|
||||||
|
class CreateRollups < ActiveRecord::Migration[6.1]
|
||||||
|
def change
|
||||||
|
create_table :rollups do |t|
|
||||||
|
t.string :name, null: false
|
||||||
|
t.string :interval, null: false
|
||||||
|
t.datetime :time, null: false
|
||||||
|
t.jsonb :dimensions, null: false, default: {}
|
||||||
|
t.float :value
|
||||||
|
end
|
||||||
|
add_index :rollups, %i[name interval time dimensions], unique: true
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue