diff --git a/app/helpers/hosts_helper.rb b/app/helpers/hosts_helper.rb index aca90343e632..5a264bd07435 100644 --- a/app/helpers/hosts_helper.rb +++ b/app/helpers/hosts_helper.rb @@ -303,8 +303,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 diff --git a/app/models/host_status/build_status.rb b/app/models/host_status/build_status.rb index d4cb2fa3dc3d..e2ea0ca72685 100644 --- a/app/models/host_status/build_status.rb +++ b/app/models/host_status/build_status.rb @@ -64,6 +64,21 @@ def token_expired? def build_errors? host && host.build_errors.present? end + + def remediation_help_text + case to_status + when PENDING + N_("Installation haven't started yet or it is 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") + when BUILD_FAILED + N_("OS installer post script reported failure, check logs") + else + N_("The host was not scheduled for build yet") + end + end end end diff --git a/app/models/host_status/status.rb b/app/models/host_status/status.rb index 704a5aea9b7e..a71458bd5790 100644 --- a/app/models/host_status/status.rb +++ b/app/models/host_status/status.rb @@ -72,6 +72,10 @@ def update_timestamp def update_status self.status = to_status end + + def remediation_help_text + nil + end end end