diff --git a/app/views/admin/clients/_client_details.html.erb b/app/views/admin/clients/_client_details.html.erb index e077892..c6e9828 100644 --- a/app/views/admin/clients/_client_details.html.erb +++ b/app/views/admin/clients/_client_details.html.erb @@ -1,56 +1,60 @@ -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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.host.try(:institutional?) %> + + + + + <% end %> +
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 %>
Approved by<%= @client.host.try(:verifier).try(:username) || 'None' %>
diff --git a/app/views/admin/clients/_header.html.erb b/app/views/admin/clients/_header.html.erb index 7a004dd..2fe85e4 100644 --- a/app/views/admin/clients/_header.html.erb +++ b/app/views/admin/clients/_header.html.erb @@ -1,12 +1,40 @@

<%= notice %>

+

+ <%= @client.name %> + <%= host_status_label(@client.host) %> +

+ +<% if local_assigns[:actions].presence == true %> +
+ <%= link_to '#', data: { toggle: 'modal', target: ".js-quota:first"}, + class: "btn btn-default", role: "button" do %> + + Set Quota + <% end %> + + <% if @client.host.can_block? %> + <%= link_to 'Lock client', block_admin_client_path(@client), method: :post, + data: { confirm: 'This will disable and lock the client. Are you sure?' }, + class: "btn btn-warning", role: "button" %> + <% end %> + + <% if @client.host.blocked? %> + <%= link_to 'Unlock client', unblock_admin_client_path(@client), method: :post, + data: { confirm: 'This will unlock the client. Are you sure?' }, + class: "btn btn-warning", role: "button" %> + <% end %> + + <%= link_to 'Remove client', revoke_admin_client_path(@client), method: :delete, + data: { confirm: 'This will REMOVE the client from Bacula. Are you sure?' }, + class: "btn btn-danger", role: "button" %> +
+<% end %> + <%= tabs_with Client: admin_client_path(@client), 'Recent Jobs' => jobs_admin_client_path(@client), Stats: stats_admin_client_path(@client), Logs: logs_admin_client_path(@client), Config: configuration_admin_client_path(@client) %> -

- <%= @client.name %> - <%= host_status_label(@client.host) %> -

+
diff --git a/app/views/admin/clients/_jobs.html.erb b/app/views/admin/clients/_jobs.html.erb index d7a4d0f..efd0e44 100644 --- a/app/views/admin/clients/_jobs.html.erb +++ b/app/views/admin/clients/_jobs.html.erb @@ -1,18 +1,16 @@ -
-
- - - - - - - - - - - - <%= render partial: 'job', collection: @client.persisted_jobs, object: :job %> - -
NameTypeFilesetScheduleCreated
-
+
+ + + + + + + + + + + + <%= render partial: 'job', collection: @client.persisted_jobs, object: :job %> + +
NameTypeFilesetScheduleCreated
diff --git a/app/views/admin/clients/show.html.erb b/app/views/admin/clients/show.html.erb index b53d0a0..4d33586 100644 --- a/app/views/admin/clients/show.html.erb +++ b/app/views/admin/clients/show.html.erb @@ -1,65 +1,45 @@ -<%= render partial: 'header' %> - -
- <%= link_to '#', data: { toggle: 'modal', target: ".js-quota:first"}, - class: "btn btn-default", role: "button" do %> - - Set Quota - <% end %> - - <% if @client.host.can_block? %> - <%= link_to 'Lock client', block_admin_client_path(@client), method: :post, - data: { confirm: 'This will disable and lock the client. Are you sure?' }, - class: "btn btn-warning", role: "button" %> - <% end %> - - <% if @client.host.blocked? %> - <%= link_to 'Unlock client', unblock_admin_client_path(@client), method: :post, - data: { confirm: 'This will unlock the client. Are you sure?' }, - class: "btn btn-warning", role: "button" %> - <% end %> - - <%= link_to 'Remove client', revoke_admin_client_path(@client), method: :delete, - data: { confirm: 'This will REMOVE the client from Bacula. Are you sure?' }, - class: "btn btn-danger", role: "button" %> -
- +<%= render partial: 'header', locals: { actions: true } %>
-
-

Client Details

-
-
-

Bacula Jobs

+
+
+
+

Client Details

+
+
+ <%= render partial: 'client_details' %> +
+
-
- -
- <%= render partial: 'client_details' %> -
-
- <% if @client.host %> - <%= render partial: 'jobs' %> - <% end %> +
+
+
+

Bacula Jobs

+
+
+ <% if @client.host %> + <%= render partial: 'jobs' %> + <% end %> +