Sha256: 8c6b9a02382ec73f95bcf48b41c3ec79cb67146342d22a1e8667c3ec2032a47e

Contents?: true

Size: 848 Bytes

Versions: 19

Compression:

Stored size: 848 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/deploys/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

19 entries across 19 versions & 1 rubygems

Version Path
shipit-engine-0.11.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.10.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.9.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.8.9 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.8.8 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.8.7 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.8.6 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.8.5 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.8.4 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.8.3 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.8.2 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.8.1 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.8.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.7.0 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.6.4 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.6.3 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.6.2 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.6.1 app/helpers/shipit/deploys_helper.rb
shipit-engine-0.6.0 app/helpers/shipit/deploys_helper.rb