Page MenuHomeGRNET

show.html.erb
No OneTemporary

File Metadata

Created
Wed, Nov 19, 12:18 PM

show.html.erb

<%= 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>
<div class="row">
<div class="col-xs-4">
<h3>Client Details</h3>
</div>
<div class="col-xs-6">
<h3>Bacula Jobs</h3>
</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>
</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