Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use record instead of ems instance var in textual authentication status #2823

Merged
merged 1 commit into from
Dec 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def map_authentications(authentications)
end

def textual_authentications_status
authentications = @ems.authentications.order(:authtype).collect
return [{ :label => _("%{label} Authentication") % { :label => @ems.default_authentication_type.to_s.titleize },
authentications = @record.authentications.order(:authtype).collect
return [{ :label => _("%{label} Authentication") % { :label => @record.default_authentication_type.to_s.titleize },
:title => t = _("None"),
:value => t }] if authentications.blank?

Expand Down
8 changes: 4 additions & 4 deletions app/helpers/textual_mixins/textual_metrics_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ def textual_metrics_status
:label => _("Last Metrics Collection"),
:title => _("None"),
:value => _("None")
} unless @ems.last_metrics_update_date
} unless @record.last_metrics_update_date

status = (@ems.last_metrics_error || :valid).to_s.titleize
updated_on = @ems.last_metrics_update_date
last_valid_on = @ems.last_metrics_success_date
status = (@record.last_metrics_error || :valid).to_s.titleize
updated_on = @record.last_metrics_update_date
last_valid_on = @record.last_metrics_success_date

{
:label => _("Last Metrics Collection"),
Expand Down