Sha256: 6c1d3c1812294cdbed8eb97b97605a7c5ed87b3ebcca3121135791870a54627e

Contents?: true

Size: 639 Bytes

Versions: 1

Compression:

Stored size: 639 Bytes

Contents

module DeploysHelper
  def render_checklist(stack)
    return '' unless stack.checklist?
    render 'deploys/checklist', stack: stack
  end

  def render_monitoring(stack)
    return '' unless stack.monitoring?
    render 'deploys/monitoring', stack: stack
  end

  def render_monitoring_panel(panel_spec)
    if url = panel_spec['image']
      image_tag(url, panel_spec.slice('height', 'width', 'alt'))
    elsif url = panel_spec['iframe']
      content_tag(:iframe, panel_spec.slice('height', 'width').merge('src' => url))
    else
      content_tag(:span, "#{panel_spec.inspect} is not a valid monitoring panel spec")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shipit-engine-0.0.1.pre app/helpers/deploys_helper.rb