diff --git a/app/views/clients/_client.html.erb b/app/views/clients/_client.html.erb index 0e68e35..18a6926 100644 --- a/app/views/clients/_client.html.erb +++ b/app/views/clients/_client.html.erb @@ -1,17 +1,16 @@ <%= link_to client.name, client %> <%= client.uname %> <%= @stats.active_jobs[client.id] || 0 %> <%= @stats.last_jobs[client.id] %> <%= client.file_retention_days %> <%= client.job_retention_days %> <%= number_to_human_size(@stats.jobs_sizes[client.id]) %> <%= number_to_human_size(client.quota) %> <% if client.quota.to_f > 0 %> <%= pretty_percentage(@stats.jobs_sizes[client.id].to_f / client.quota, client.quota) %> <% end %> <%= number_by_magnitude(@stats.jobs_files[client.id]) %> - <%= client.auto_prune_human %> diff --git a/app/views/clients/_client_details.html.erb b/app/views/clients/_client_details.html.erb index c5304a9..46217d7 100644 --- a/app/views/clients/_client_details.html.erb +++ b/app/views/clients/_client_details.html.erb @@ -1,62 +1,58 @@
- - - -
Name <%= @client.name %>
Uname <%= @client.uname %>
Active Jobs <%= @client.running_jobs %>
Last Backup <%= @client.last_job_date_formatted %>
File Retention <%= @client.file_retention_days %> days
Job Retention <%= @client.job_retention_days %> days
Total Space Used <%= number_to_human_size @client.backup_jobs_size %>
Client Quota <%= number_to_human_size @client.quota %>
Space Used % <% if @client.quota.to_f > 0 %> <%= pretty_percentage(@client.backup_jobs_size.to_f / @client.quota, @client.quota) %> <% end %>
Files count <%= number_by_magnitude(@client.files_count) %>
Auto Prune<%= @client.auto_prune_human %>
<% if @client.is_backed_up? %> <%= link_to 'Restore Files', restore_client_path(@client), class: "btn btn-warning", role: "button" %> <% end %>
diff --git a/app/views/clients/index.html.erb b/app/views/clients/index.html.erb index 325bfac..66315a0 100644 --- a/app/views/clients/index.html.erb +++ b/app/views/clients/index.html.erb @@ -1,56 +1,54 @@
<%= link_to 'New Client', new_host_path, class: 'btn btn-primary', role: 'button' %>

My Bacula Clients

- <%= render partial: 'client', collection: @clients %>
Name Uname Active Jobs Last Backup File Ret. (days) Job Ret. (days) Space Used Quota Space Used % FilesAutoPrune
<% if @hosts.any? %>

My Pending Hosts

- <%= render partial: 'hosts/host', collection: @hosts %>
Name FQDN Port Password FileRetention (days) JobRetention (days)AutoPrune Verified Created At
<% end %> <%= render partial: 'client_graphs', locals: { path: clients_path } %> diff --git a/app/views/hosts/_host.html.erb b/app/views/hosts/_host.html.erb index 3049628..fde918c 100644 --- a/app/views/hosts/_host.html.erb +++ b/app/views/hosts/_host.html.erb @@ -1,17 +1,16 @@ <%= link_to host.name, host_path(host) %> <%= host.fqdn %> <%= host.port %> ********** <%= host.file_retention %> <%= host.job_retention %> - <%= host.auto_prune_human %> <% if host.verified? %> yes <% else %> no <% end %> <%= I18n.l(host.created_at, format: :long) %> diff --git a/app/views/hosts/_host_details.html.erb b/app/views/hosts/_host_details.html.erb index 5a3d21c..55b9b89 100644 --- a/app/views/hosts/_host_details.html.erb +++ b/app/views/hosts/_host_details.html.erb @@ -1,77 +1,73 @@
- - - -
Name <%= @host.name %>
FQDN <%= @host.fqdn %>
FDPort <%= @host.port %>
Password ********
File Retention <%= @host.file_retention %> days
Job Retention <%= @host.job_retention %> days
Auto Prune<%= @host.auto_prune_human %>
Verified <% if @host.verified? %> yes <% else %> no <% end %>
Created <%= I18n.l(@host.created_at, format: :long) %>
<%= link_to 'Edit', edit_host_path(@host), class: "btn btn-primary", role: "button" %>
<% if @host.needs_dispatch? %>
<%= link_to 'Deploy Changes', submit_config_host_path(@host), method: :post, class: 'btn btn-success', role: 'button' %>
<% end %> <% if @host.needs_revoke? %>
<%= link_to 'Remove From Bacula', revoke_host_path(@host), method: :delete, class: 'btn btn-danger', role: 'button' %>
<% end %>

<% if @host.client %>
<%= link_to "Back to #{@host.name} client".html_safe, client_path(@host.client) %>
<% end %>