diff --git a/app/views/clients/show.html.erb b/app/views/clients/show.html.erb index 2a34358..ece9b7c 100644 --- a/app/views/clients/show.html.erb +++ b/app/views/clients/show.html.erb @@ -1,53 +1,57 @@ <p id="notice"><%= notice %></p> +<% if @client.host %> + <div class="row right"> + <%= link_to 'Manage Client', host_path(@client.host), class: "btn btn-primary", role: "button" %> + </div> +<% end %> +<h2><%= @client.name %></h2> <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 %></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>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> - <%= link_to 'New Job', '#', class: "btn btn-primary", role: "button" %> - <%= link_to 'Restore Files', '#', class: "btn btn-success", role: "button" %> + <%= link_to 'Restore Files', '#', class: "btn btn-warning", role: "button" %> <%= link_to 'Take Backup', '#', class: "btn btn-success", role: "button" %> - <%= link_to 'Remove client', '#', class: "btn btn-danger", role: "button" %> </div> <br/> <%= link_to 'Back to clients', clients_path %>