Sha256: 3c04791613cd287094229c4e42dde467aae4f420d381d1bec682c7fed7bd500a
Contents?: true
Size: 576 Bytes
Versions: 2
Compression:
Stored size: 576 Bytes
Contents
colors = Aeternitas::WebUi::ColorGenerator.new(@pollable_classes.count) range = TabsTabs::Helpers.timestamp_range(@from..@to, @resolution) json.labels(range.map { |date| date.strftime('%B %d') }) json.datasets do json.array! @pollable_classes do |pollable_class| data = Aeternitas::Metrics.pollables_created( pollable_class, from: @from, to: @to, resolution: @resolution ).map { |v| v[:count] } json.label pollable_class.name json.data data json.borderColor colors.next.hex json.backgroundColor colors.current.hex end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aeternitas_web_ui-0.2.1 | app/views/aeternitas/web_ui/dashboard/pollable_growth.json.jbuilder |
aeternitas_web_ui-0.2.0 | app/views/aeternitas/web_ui/dashboard/pollable_growth.json.jbuilder |