Sha256: e2a4e72ad4a223f70fac8977f89f84e3a44fe58d3d2bbf986e973360267cc502

Contents?: true

Size: 420 Bytes

Versions: 36

Compression:

Stored size: 420 Bytes

Contents

module Ddr
  class Alert < AuxiliaryResource

    ADMIN_SITE = 'admin'
    PUBLIC_SITE = 'public'

    # @param [String] the application ('admin' or 'public') for which to return active alerts
    # @return [Array] the active alerts for the requested application site
    def self.call(site)
      get(:active, site: site).map { |resp| new(resp) }
    rescue ActiveResource::ServerError => e
      []
    end

  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
ddr-core-1.13.2 app/models/ddr/alert.rb
ddr-core-1.13.1 app/models/ddr/alert.rb
ddr-core-1.13.0 app/models/ddr/alert.rb
ddr-core-1.12.2 app/models/ddr/alert.rb
ddr-core-1.12.1 app/models/ddr/alert.rb
ddr-core-1.12.0 app/models/ddr/alert.rb
ddr-core-1.11.0 app/models/ddr/alert.rb
ddr-core-1.10.0 app/models/ddr/alert.rb
ddr-core-1.9.0 app/models/ddr/alert.rb
ddr-core-1.8.0 app/models/ddr/alert.rb
ddr-core-1.7.0 app/models/ddr/alert.rb
ddr-core-1.6.6 app/models/ddr/alert.rb
ddr-core-1.6.5 app/models/ddr/alert.rb
ddr-core-1.6.4 app/models/ddr/alert.rb
ddr-core-1.6.3 app/models/ddr/alert.rb
ddr-core-1.6.2 app/models/ddr/alert.rb
ddr-core-1.6.1 app/models/ddr/alert.rb
ddr-core-1.6.0 app/models/ddr/alert.rb
ddr-core-1.5.5 app/models/ddr/alert.rb
ddr-core-1.5.4 app/models/ddr/alert.rb