Sha256: 42bd6bd50c05363413f6c78b2e4028b3088321250a8f7679b86bcce291132007

Contents?: true

Size: 698 Bytes

Versions: 2

Compression:

Stored size: 698 Bytes

Contents

module AzureComputeResourceHelper
  def regions_list(azurerm_cr, f)
    begin
      regions = azurerm_cr.regions || []
    rescue StandardError
      #do nothing
      regions = []
    rescue Exception => ex
      return information_box("Regions could not be loaded due to exception: #{ex}")
    end
    selectable_f(f, :url, regions, {}, {:label => _('Azure Region'), :disabled => regions.empty?, :required => true, :help_inline_permanent => load_button_f(f, regions.present?, _("Load Regions")) })
  end
  def azure_doc_url
    doc_version = Foreman::Plugin.find(:foreman_azure_rm).version.scan(/\d+\.\d+/).first + '.x'
    "https://theforeman.org/plugins/foreman_azure/#{doc_version}"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foreman_azure_rm-2.1.3 app/helpers/azure_compute_resource_helper.rb
foreman_azure_rm-2.2.0 app/helpers/azure_compute_resource_helper.rb