Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F1615338
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Mar 21, 11:56 PM
Size
4 KB
Mime Type
text/x-diff
Expires
Mon, Mar 23, 11:56 PM (16 h, 34 m)
Engine
blob
Format
Raw Data
Handle
354365
Attached To
rARCHIVING archiving
View Options
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 @@
<p id="notice"><%= notice %></p>
<%= 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) %>
<h2>
<%= @client.name %>
- <small><%= host_status_label(@client.host) %></small>
+ <%= host_status_label(@client.host) %>
</h2>
diff --git a/app/views/clients/_header.html.erb b/app/views/clients/_header.html.erb
index d603eea..33ff692 100644
--- a/app/views/clients/_header.html.erb
+++ b/app/views/clients/_header.html.erb
@@ -1,10 +1,10 @@
<p id="notice"><%= notice %></p>
<%= 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) %>
<h2>
<%= @client.name %>
- <small><%= host_status_label(@client.host) %></small>
+ <%= host_status_label(@client.host) %>
</h2>
diff --git a/app/views/hosts/_header.html.erb b/app/views/hosts/_header.html.erb
index bb6532e..505c035 100644
--- a/app/views/hosts/_header.html.erb
+++ b/app/views/hosts/_header.html.erb
@@ -1,31 +1,31 @@
<div class="row right">
<% if @host.can_be_disabled? %>
<%= link_to 'Disable client', disable_host_path(@host), method: :post,
data: { confirm: 'This will disable the client. Are you sure?' },
class: "btn btn-warning", role: "button" %>
<% end %>
<%= link_to 'Remove client', host_path(@host), method: :delete,
data: { confirm: 'This will remove your client from the Backup service. Are you sure?' },
class: "btn btn-danger", role: "button" %>
</div>
<h2>Configuration for <%= @host.name %>
- <small><%= host_status_label(@host) %></small>
+ <%= host_status_label(@host) %>
</h2>
<br/>
<ul class="nav nav-tabs" role='tablist'>
<li role="presentation" class="active">
<a aria-controls='details' role='tab' data-toggle='tab' href="#details">Client Details</a>
</li>
<li role="presentation">
<a aria-controls='jobs' role='tab' data-toggle='tab' href="#jobs">Jobs</a>
</li>
<li role="presentation">
<a aria-controls='fd-config'role='tab' data-toggle='tab' href="#fd-config">FD Config</a>
</li>
</ul>
<br/>
Event Timeline
Log In to Comment