Sha256: a31d1c6f64fa6fef7cfd66ae75bbf7ee56aaa4070ccb65dc590146a0e5160022

Contents?: true

Size: 854 Bytes

Versions: 12

Compression:

Stored size: 854 Bytes

Contents

module Shipit
  module DeploysHelper
    def render_checklist(checklist)
      return if checklist.blank?
      render 'shipit/deploys/checklist', checklist: checklist
    end

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

    def render_checks(commit)
      return unless commit.stack.checks?
      render 'shipit/commit_checks/checks', commit: commit
    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
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
shipit-engine-0.20.1 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.20.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.19.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.18.1 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.18.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.17.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.16.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.15.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.14.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.13.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.12.1 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.12.0 app/helpers/shipit/deploys_helper.rb