Page MenuHomeGRNET

No OneTemporary

File Metadata

Created
Fri, Aug 29, 7:38 PM
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 @@
-<div class="col-xs-4">
- <div class="table-responsive">
- <table class="table table-striped table-bordered table-condensed ">
- <tr>
- <td>Name</td>
- <td><%= @client.name %></td>
- </tr>
- <tr>
- <td>Uname</td>
- <td><%= @client.uname %></td>
- </tr>
- <tr>
- <td>Active Jobs</td>
- <td><%= @client.running_jobs %></td>
- </tr>
- <tr>
- <td>Last Backup</td>
- <td>
- <%= @client.last_job_date_formatted %>
- </td>
- </tr>
- <tr>
- <td>File Retention</td>
- <td><%= @client.file_retention_days %> days</td>
- </tr>
- <tr>
- <td>Job Retention</td>
- <td><%= @client.job_retention_days %> days</td>
- </tr>
- <tr>
- <td>Total Space Used</td>
- <td><%= number_to_human_size @client.backup_jobs_size %></td>
- </tr>
- <tr>
- <td>Client Quota</td>
- <td><%= number_to_human_size @client.quota %></td>
- </tr>
- <tr>
- <td>Space Used %</td>
- <td>
- <% if @client.quota.to_f > 0 %>
- <%= pretty_percentage(@client.backup_jobs_size.to_f / @client.quota, @client.quota) %>
- <% end %>
- </td>
- </tr>
- <tr>
- <td>Files count</td>
- <td><%= number_by_magnitude(@client.files_count) %></td>
- </tr>
- <tr>
- <td>Auto Prune</td>
- <td><%= @client.auto_prune_human %></td>
- </tr>
- </table>
- </div>
+<div class="table-responsive">
+ <table class="table table-striped table-bordered table-condensed ">
+ <tr>
+ <td>Name</td>
+ <td><%= @client.name %></td>
+ </tr>
+ <tr>
+ <td>Uname</td>
+ <td><%= @client.uname %></td>
+ </tr>
+ <tr>
+ <td>Active Jobs</td>
+ <td><%= @client.running_jobs %></td>
+ </tr>
+ <tr>
+ <td>Last Backup</td>
+ <td>
+ <%= @client.last_job_date_formatted %>
+ </td>
+ </tr>
+ <tr>
+ <td>File Retention</td>
+ <td><%= @client.file_retention_days %> days</td>
+ </tr>
+ <tr>
+ <td>Job Retention</td>
+ <td><%= @client.job_retention_days %> days</td>
+ </tr>
+ <tr>
+ <td>Total Space Used</td>
+ <td><%= number_to_human_size @client.backup_jobs_size %></td>
+ </tr>
+ <tr>
+ <td>Client Quota</td>
+ <td><%= number_to_human_size @client.quota %></td>
+ </tr>
+ <tr>
+ <td>Space Used %</td>
+ <td>
+ <% if @client.quota.to_f > 0 %>
+ <%= pretty_percentage(@client.backup_jobs_size.to_f / @client.quota, @client.quota) %>
+ <% end %>
+ </td>
+ </tr>
+ <tr>
+ <td>Files count</td>
+ <td><%= number_by_magnitude(@client.files_count) %></td>
+ </tr>
+ <tr>
+ <td>Auto Prune</td>
+ <td><%= @client.auto_prune_human %></td>
+ </tr>
+ <% if @client.host.try(:institutional?) %>
+ <tr>
+ <td>Approved by</td>
+ <td><%= @client.host.try(:verifier).try(:username) || 'None' %></td>
+ </tr>
+ <% end %>
+ </table>
</div>
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 @@
<p id="notice"><%= notice %></p>
+<h2>
+ <%= @client.name %>
+ <%= host_status_label(@client.host) %>
+</h2>
+
+<% if local_assigns[:actions].presence == true %>
+ <div class="row right">
+ <%= link_to '#', data: { toggle: 'modal', target: ".js-quota:first"},
+ class: "btn btn-default", role: "button" do %>
+ <label class="glyphicon glyphicon-edit text-primary"></label>
+ 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" %>
+ </div>
+<% 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) %>
-<h2>
- <%= @client.name %>
- <%= host_status_label(@client.host) %>
-</h2>
+<br />
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 @@
-<div class="col-xs-12">
- <div class="table-responsive">
- <table class="table table-striped table-bordered table-condensed">
- <thead>
- <tr>
- <th>Name</th>
- <th>Type</th>
- <th>Fileset</th>
- <th>Schedule</th>
- <th>Created</th>
- </tr>
- </thead>
- <tbody>
- <%= render partial: 'job', collection: @client.persisted_jobs, object: :job %>
- </tbody>
- </table>
- </div>
+<div class="table-responsive">
+ <table class="table table-striped table-bordered table-condensed">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Fileset</th>
+ <th>Schedule</th>
+ <th>Created</th>
+ </tr>
+ </thead>
+ <tbody>
+ <%= render partial: 'job', collection: @client.persisted_jobs, object: :job %>
+ </tbody>
+ </table>
</div>
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' %>
-
-<div class="row right">
- <%= link_to '#', data: { toggle: 'modal', target: ".js-quota:first"},
- class: "btn btn-default", role: "button" do %>
- <label class="glyphicon glyphicon-edit text-primary"></label>
- 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" %>
-</div>
-
+<%= render partial: 'header', locals: { actions: true } %>
<div class="row">
- <div class="col-xs-4">
- <h3>Client Details</h3>
- </div>
- <div class="col-xs-6">
- <h3>Bacula Jobs</h3>
+ <div class="col-xs-12 col-sm-10 col-md-6 col-lg-4">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h3>Client Details</h3>
+ </div>
+ <div class="panel-body">
+ <%= render partial: 'client_details' %>
+ </div>
+ </div>
</div>
-</div>
-
-<div class="row">
- <%= render partial: 'client_details' %>
- <div class="col-xs-8">
- <div class="row">
- <% if @client.host %>
- <%= render partial: 'jobs' %>
- <% end %>
+ <div class="col-xs-12 col-sm-10 col-md-6">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h3>Bacula Jobs</h3>
+ </div>
+ <div class="panel-body">
+ <% if @client.host %>
+ <%= render partial: 'jobs' %>
+ <% end %>
+ </div>
</div>
</div>
</div>
<div class="modal fade js-quota" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
<div class="modal-dialog">
<div class="modal-content">
<div class="panel panel-default">
<div class="panel-heading">Set Quota for "<%= @client.name %>"</div>
<div class="panel-body">
<%= bootstrap_form_tag(url: set_quota_admin_host_path(@client.host),
method: :put, layout: :inline) do |f| %>
<%= f.number_field :quota, value: @client.host.quota / ConfigurationSetting::MEGA_BYTES %>
<%= f.select(:unit, ['MB', 'GB', 'TB']) %>
<%= f.submit 'Update Quota', class: "btn btn-success" %>
<% end %>
</div>
</div>
</div>
</div>
</div>

Event Timeline