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

Fixes #23699 - Remediation Support for Host Status #6135

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/helpers/hosts_helper.rb
Expand Up @@ -302,8 +302,10 @@ def host_detailed_status_list(host)
next unless status.relevant? && !status.substatus?
[
_(status.name),
content_tag(:span, ' '.html_safe, :class => host_global_status_icon_class(status.to_global)) +
content_tag(:span, (
content_tag(:span, ' '.html_safe, :class => host_global_status_icon_class(status.to_global)) +
content_tag(:span, _(status.to_label), :class => host_global_status_class(status.to_global))
), { :'data-original-title' => _(status.remediation_help_text), :rel => 'twipsy' })
]
end.compact
end
Expand Down
15 changes: 15 additions & 0 deletions app/models/host_status/build_status.rb
Expand Up @@ -64,6 +64,21 @@ def token_expired?
def build_errors?
host && host.build_errors.present?
end

def remediation_help_text
case host.build_status
when PENDING
N_("Installation haven't started yet or in progress")
when TOKEN_EXPIRED
N_("Build token is no longer valid, cancel build mode and enter it again to generate new token")
when BUILT
N_("OS installer reported end of installation and rebooted the system")
akshay-mendhe marked this conversation as resolved.
Show resolved Hide resolved
when BUILD_FAILED
N_("OS installer post script reported failure, check logs")
else

This comment was marked as resolved.

N_("The host was not scheduled for build yet")
end
end
lzap marked this conversation as resolved.
Show resolved Hide resolved
end
end

Expand Down