Sha256: 226503e5bd3bc78d5bb0870e095ab3cd32d8c66afe8d87f9824343c142a5c789
Contents?: true
Size: 929 Bytes
Versions: 22
Compression:
Stored size: 929 Bytes
Contents
module Katello module SubscriptionsHelper def subscriptions_product_helper(product_id) cp_product = Resources::Candlepin::Product.get(product_id).first product = OpenStruct.new cp_product product.cp_id = cp_product['id'] product end def subscriptions_manifest_link_helper(status, label = nil) if status['webAppPrefix'] if !status['webAppPrefix'].start_with? 'http' url = "http://#{status['webAppPrefix']}" else url = status['webAppPrefix'] end url += '/' unless url.end_with? '/' url += status['upstreamId'] link_to((label.nil? ? url : label), url, :target => '_blank') else label.nil? ? status['upstreamId'] : label end end def subscriptions_candlepin_status Resources::Candlepin::CandlepinPing.ping rescue {'rulesVersion' => '', 'rulesSource' => ''} end end end
Version data entries
22 entries across 22 versions & 1 rubygems