Module: AzureComputeResourceHelper
- Defined in:
- app/helpers/azure_compute_resource_helper.rb
Instance Method Summary collapse
Instance Method Details
#azure_doc_version ⇒ Object
13 14 15 |
# File 'app/helpers/azure_compute_resource_helper.rb', line 13 def azure_doc_version doc_version = Foreman::Plugin.find(:foreman_azure_rm).version.scan(/\d+\.\d+/).first + '.x' end |
#regions_list(azurerm_cr, f) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'app/helpers/azure_compute_resource_helper.rb', line 2 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 => (f, regions.present?, _("Load Regions")) }) end |