ManageIQ/manageiq-ui-classic

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

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class ApplicationHelper::Button::HostToggleMaintenance < ApplicationHelper::Button::Basic
  def disabled?
    unless @record.supports?(:set_node_maintenance) && @record.supports?(:unset_node_maintenance)
      @error_message = _('Maintenance mode is not supported for this host')
    end
    @error_message.present?
  end
end