ManageIQ/manageiq-ui-classic

View on GitHub
app/helpers/application_helper/button/iso_datastore_new.rb

Summary

Maintainability
A
0 mins
Test Coverage
class ApplicationHelper::Button::IsoDatastoreNew < ApplicationHelper::Button::ButtonNewDiscover
  def disabled?
    if no_ems_without_iso_datastores?
      @error_message = _('No Providers are available to create an ISO Datastore on')
    end
    @error_message.present?
  end

  private

  def no_ems_without_iso_datastores?
    ExtManagementSystem.supporting(:create_iso_datastore).none?
  end
end