Sha256: 6a69aff3bf2bfa06cec1d29701e25e7a0a988fe0b27f8b47aa3808238583973f

Contents?: true

Size: 524 Bytes

Versions: 20

Compression:

Stored size: 524 Bytes

Contents

class FnordMetric::BarsWidget  < FnordMetric::Widget

  def data
    super.merge(
      :gauges => gauges.map(&:name),
      :gauge_titles => gauge_titles,
      :autoupdate => (@opts[:autoupdate] || 60),
      :order_by => (@opts[:order_by] || 'value'),
      :plot_style => (@opts[:plot_style] || 'vertical'),
      :tick => tick
    )
  end

  def gauge_titles
    {}.tap do |_hash|
      gauges.each do |gauge|
        _hash.merge!(gauge.name => gauge.title)
      end
    end
  end

  def has_tick?
    false
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
fnordmetric-0.7.5 lib/fnordmetric/bars_widget.rb
fnordmetric-0.7.4 lib/fnordmetric/bars_widget.rb
fnordmetric-0.7.3 lib/fnordmetric/bars_widget.rb
fnordmetric-0.7.1 lib/fnordmetric/bars_widget.rb
fnordmetric-0.7.0 lib/fnordmetric/bars_widget.rb
fnordmetric-0.6.6 lib/fnordmetric/bars_widget.rb
fnordmetric-0.6.5 lib/fnordmetric/bars_widget.rb
fnordmetric-0.6.4 lib/fnordmetric/bars_widget.rb
fnordmetric-0.6.3 lib/fnordmetric/bars_widget.rb
fnordmetric-0.6.2 lib/fnordmetric/bars_widget.rb
fnordmetric-0.6.1 lib/fnordmetric/bars_widget.rb
fnordmetric-0.6.0 lib/fnordmetric/bars_widget.rb
fnordmetric-0.5.9 lib/fnordmetric/bars_widget.rb
fnordmetric-0.5.8 lib/fnordmetric/bars_widget.rb
fnordmetric-0.5.7 lib/fnordmetric/bars_widget.rb
fnordmetric-0.5.6 lib/fnordmetric/bars_widget.rb
fnordmetric-0.5.5 lib/fnordmetric/bars_widget.rb
fnordmetric-0.5.4 lib/fnordmetric/bars_widget.rb
fnordmetric-0.5.3 lib/fnordmetric/bars_widget.rb
fnordmetric-0.5.2 lib/fnordmetric/bars_widget.rb