Skip to content

Commit

Permalink
Fixes #23699 - Remediation Support for Host Status
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay-mendhe committed Oct 12, 2018
1 parent 336a5be commit 322d862
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
15 changes: 15 additions & 0 deletions app/helpers/hosts_helper.rb
Expand Up @@ -517,4 +517,19 @@ def power_status_visible?
def host_breadcrumb
breadcrumbs(resource_url: "/api/v2/hosts?thin=true'")
end

def host_build_status_help_text(value)
if value.include? "Pending installation"
N_("Wait for sometime and if build fails, rebuild again")
elsif value.include? "Token expired"
N_("Cancel your build and regenerate token by initiating build again")
elsif value.include? "Installed"
N_("Done")
elsif value.include? "Installation error"
N_("Check audit log")
else
N_("Unknown status")
end
end

end
6 changes: 5 additions & 1 deletion app/views/hosts/_overview.html.erb
Expand Up @@ -8,7 +8,11 @@
<% overview_fields(host).each do |name, value| %>
<tr>
<td><%= name %></td>
<td><%= value %></td>
<% if name == "Build" %>
<td><%= content_tag(:span, value, { :'data-original-title' => host_build_status_help_text(value), :rel => 'twipsy' }).html_safe %></td>
<% else %>
<td><%= value %></td>
<% end %>
</tr>
<% end %>
</tbody>
Expand Down

0 comments on commit 322d862

Please sign in to comment.