ManageIQ/manageiq-ui-classic

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

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class ApplicationHelper::Button::MiqAlertDelete < ApplicationHelper::Button::Basic
  needs :@record

  def disabled?
    @error_message = _("Alerts referenced by Actions can not be deleted") unless @record.owning_miq_actions.empty?
    @error_message = _("Alerts that belong to Alert Profiles can not be deleted") unless @record.memberof.empty?
    @error_message.present?
  end
end