diff --git a/app/helpers/hosts_helper.rb b/app/helpers/hosts_helper.rb index 965bcd2..28d0a9d 100644 --- a/app/helpers/hosts_helper.rb +++ b/app/helpers/hosts_helper.rb @@ -1,29 +1,40 @@ module HostsHelper # Returns an html span with the host's status def host_status_label(host) return unless host case when host.pending? klass = "default" + msg = 'Client is not configured yet. No backups available' when host.configured? klass = "warning" + msg = 'Client is configured. Configuration not yet sent to the backup server. No backups available' when host.dispatched? klass = "info" + msg = 'Client is configured. Configuration not yet sent to the backup server. No backups available' when host.deployed? klass = "success" + msg = 'Client is OK' when host.updated? klass = "info" + msg = 'Client has new configuration, not yet transmitted to the server. Backups are available for the previous config' when host.redispatched? klass = "primary" + msg = 'Client has new configuration, not yet transmitted to the server. Backups are available for the previous config' when host.for_removal? klass = "danger" + msg = 'Client will be removed' when host.inactive? klass = "warning" + msg = 'Client is not yet verified' when host.blocked? klass = "warning" + msg = 'Client is blocked by an administrator. No backups available' end - content_tag(:span, class: "label label-#{klass}") { host.human_status_name.upcase } + content_tag(:small, 'data-toggle' => 'tooltip', title: msg) do + content_tag(:span, class: "label label-#{klass}") { host.human_status_name.upcase } + end end end diff --git a/app/views/admin/clients/_header.html.erb b/app/views/admin/clients/_header.html.erb index 0ffe29f..f147719 100644 --- a/app/views/admin/clients/_header.html.erb +++ b/app/views/admin/clients/_header.html.erb @@ -1,12 +1,12 @@
<%= notice %>
<%= breadcrumb_with Client: admin_client_path(@client), Jobs: jobs_admin_client_path(@client), Stats: stats_admin_client_path(@client), Logs: logs_admin_client_path(@client), Config: configuration_admin_client_path(@client) %><%= notice %>
<%= breadcrumb_with Client: client_path(@client), Jobs: jobs_client_path(@client), Stats: stats_client_path(@client), Logs: logs_client_path(@client), Users: users_client_path(@client) %>