Page MenuHomeGRNET

No OneTemporary

File Metadata

Created
Fri, Aug 8, 8:44 PM
diff --git a/app/views/admin/settings/_form.html.erb b/app/views/admin/settings/_form.html.erb
index 11bb6c3..4b443b1 100644
--- a/app/views/admin/settings/_form.html.erb
+++ b/app/views/admin/settings/_form.html.erb
@@ -1,82 +1,82 @@
<%= bootstrap_form_for(@setting, url: path, layout: :horizontal,
label_col: 'col-xs-5', control_col: 'col-xs-5') do |f| %>
<div class="row">
- <div class="col-xs-4">
+ <div class="col-md-4 col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">
<h4>Client</h4>
</div>
<br />
<%= f.fields_for :client do |c| %>
<%= c.text_field :catalog, :value => @setting.current_client_settings[:catalog] %>
<%= c.number_field :file_retention,
:value => @setting.current_client_settings[:file_retention] %>
<%= c.select :file_retention_period_type,
options_for_select(ConfigurationSetting::RETENTION_PERIODS,
@setting.current_client_settings[:file_retention_period_type]) %>
<%= c.number_field :job_retention,
:value => @setting.current_client_settings[:job_retention] %>
<%= c.select :job_retention_period_type,
options_for_select(ConfigurationSetting::RETENTION_PERIODS,
@setting.current_client_settings[:job_retention_period_type]) %>
<%= c.select :autoprune, ConfigurationSetting::AUTOPRUNE_OPTIONS,
:value => @setting.current_client_settings[:autoprune] %>
<%= c.number_field :quota,
value: @setting.current_client_settings[:quota].to_i / ConfigurationSetting::MEGA_BYTES %>
<%= c.select(:quota_unit, ['MB', 'GB', 'TB'], value: 'MB') %>
<% end %>
</div>
</div>
- <div class="col-xs-4">
+ <div class="col-md-4 col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">
<h4>Job</h4>
</div>
<br />
<%= f.fields_for :job do |jb| %>
<%= jb.select :storage,
options_for_select(Storage.available_options, @setting.current_job_settings[:storage]) %>
<%= jb.select :pool,
options_for_select(Pool.available_options, @setting.current_job_settings[:pool]) %>
<%= jb.text_field :messages, :value => @setting.current_job_settings[:messages] %>
<%= jb.text_field :'Write Bootstrap',
:value => @setting.current_job_settings[:'Write Bootstrap'] %>
<%= jb.number_field :priority, :value => @setting.current_job_settings[:priority] %>
<% end %>
</div>
</div>
- <div class="col-xs-4">
+ <div class="col-md-4 col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">
<h4>Pool</h4>
</div>
<br />
<%= f.fields_for :pool do |p| %>
<%= p.select :full,
options_for_select(Pool.available_options, @setting.current_pool_settings[:full]) %>
<%= p.select :differential,
options_for_select(Pool.available_options,
@setting.current_pool_settings[:differential]) %>
<%= p.select :incremental,
options_for_select(Pool.available_options,
@setting.current_pool_settings[:incremental]) %>
<% end %>
</div>
</div>
</div>
<div class="form-group">
<div class="col-xs-1">
- <%= link_to 'Cancel', admin_settings_path %>
+ <%= link_to 'Cancel', admin_settings_path, role: :button, class: 'btn btn-danger' %>
</div>
<div class="col-xs-2 col-xs-offset-1 text-right">
<%= f.submit class: 'btn btn-success' %>
</div>
</div>
</br>
<% end %>
diff --git a/app/views/admin/settings/index.html.erb b/app/views/admin/settings/index.html.erb
index f7956a5..f24cf46 100644
--- a/app/views/admin/settings/index.html.erb
+++ b/app/views/admin/settings/index.html.erb
@@ -1,48 +1,36 @@
<h1>Settings</h1>
<% if !@settings.persisted? %>
<div class="alert alert-warning" role="alert">
The following configuration is the default configuration.
</div>
<% end %>
<div class="row">
- <div class="col-xs-4">
+ <div class="col-xs-10 col-md-4">
<h3>Client Settings</h3>
- </div>
- <div class="col-xs-4">
- <h3>Job Settings</h3>
- </div>
- <div class="col-xs-4">
- <h3>Pool Settings</h3>
- </div>
-</div>
-
-<div class="row">
- <div class="col-xs-4">
<%= table_for(ConfigurationSetting.current_client_settings_human) %>
</div>
- <div class="col-xs-4">
+ <div class="col-xs-10 col-md-4">
+ <h3>Job Settings</h3>
<%= table_for(ConfigurationSetting.current_job_settings) %>
</div>
- <div class="col-xs-4">
+ <div class="col-xs-10 col-md-4">
+ <h3>Pool Settings</h3>
<%= table_for(ConfigurationSetting.current_pool_settings) %>
</div>
</div>
<div class="row">
- <div class="col-xs-2">
+ <div class="col-xs-12">
<%= link_to 'Change Config',
@settings.persisted? ? edit_admin_setting_path(@settings) : new_admin_setting_path,
- class: 'btn btn-primary', role: 'button'
- %>
- </div>
- <% if @settings.persisted? %>
- <div class="col-xs-2">
+ class: 'btn btn-primary', role: 'button' %>
+ <% if @settings.persisted? %>
<%= link_to 'Restore to defaults', reset_admin_setting_path(@settings), method: :delete,
data: { confirm: 'This will reset the configuration to the defaults' },
class: 'btn btn-danger', role: 'button'
%>
- </div>
- <% end %>
+ <% end %>
+ </div>
</div>
diff --git a/app/views/clients/_file_selector.html.erb b/app/views/clients/_file_selector.html.erb
index aef99b9..dcde5ba 100644
--- a/app/views/clients/_file_selector.html.erb
+++ b/app/views/clients/_file_selector.html.erb
@@ -1,57 +1,57 @@
-<div id='file-selector' class="col-xs-4">
+<div id='file-selector' class="col-md-4 col-xs-6">
<div class='panel panel-default'>
<div class='panel-heading'>
<h3> Files </h3>
</div>
<div class="loader">
<h3>LOADING</h3>
</div>
<div id="file-tree"></div>
</div>
</div>
-<div class="col-xs-4">
+<div class="col-md-4 col-xs-6">
<div class="panel panel-default" id="restore-details" style="display:none">
<div class="panel-heading">
<h3>Restore details</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-4" id="reset-button">
<%= link_to restore_client_path(@client), class: 'btn btn-default' do %>
<span class="glyphicon glyphicon-menu-left text-primary"></span>
Cancel
<% end %>
</div>
<div class="col-xs-4 text-right">
<%= form_tag(restore_selected_client_path, { id: 'file-submitter' }) do %>
<%= submit_tag 'Restore Selected Files', class: 'btn btn-default', disabled: true %>
<% end %>
</div>
</div>
<hr />
<br />
<div class="row">
<table class="table table-bordered table-condensed">
<tr>
<td>DateTime</td>
<td id="restore_data_point"></td>
</tr>
<tr>
<td>Restore Location</td>
<td id="restore_data_location"></td>
</tr>
<tr>
<td>Restore Client</td>
<td id="restore_data_client"></td>
</tr>
<tr>
<td>Files</td>
<td><ul id="restore_data_files"></ul></td>
</tr>
</table>
</div>
</div>
</div>
</div>
diff --git a/app/views/clients/restore.html.erb b/app/views/clients/restore.html.erb
index 7399d41..8a85c8b 100644
--- a/app/views/clients/restore.html.erb
+++ b/app/views/clients/restore.html.erb
@@ -1,74 +1,72 @@
<div class="row">
- <div class="col-xs-4">
+ <div class="col-md-4 col-xs-6">
<% if @client.is_backed_up? %>
<div class="panel panel-default">
<div class="panel-heading">
<h3>Restore files for "<%= @client.name %>"</h3>
</div>
<div class="panel-body">
<%= bootstrap_form_tag(url: run_restore_client_path(@client), remote: true,
layout: :horizontal, label_col: 'col-xs-4', control_col: 'col-xs-7',
html: { id: 'basic-form' } ) do |f| %>
<%= help_block('Restore to most recent backup by leaving date and time blank',
'col-xs-4', 'col-xs-7') %>
<%= f.text_field :restore_date %>
<%= f.time_select :restore_time, ignore_date: true, minute_step: 30, prompt: true %>
<%= f.select(:fileset,
options_from_collection_for_select(@client.file_sets, :id, :file_set)) %>
<%= f.text_field :restore_location, placeholder: '/tmp/default_restore' %>
<hr />
<%= help_block(
'Restore and backup clients <strong>must</strong> have the same encryption key'.html_safe,
'col-xs-4', 'col-xs-7') %>
<%= f.select(
:restore_client,
options_from_collection_for_select(@restore_clients,
:id, :name, @client.id),
label: tooltip_label('Restore Client',
'Client where the backup will be restored to')) %>
<hr />
<div class="row">
- <div class="col-xs-4 col-xs-offset-4">
+ <div class="col-xs-12 text-right">
<%= f.submit 'Select Specific Files', id: 'select-files', class: 'btn btn-primary' %>
- </div>
- <div class="col-xs-4">
<%= f.submit 'Restore All Files', class: 'btn btn-warning text-right',
data: { confirm: "This will restore all your files" }
%>
</div>
</div>
<% end %>
</div>
</div>
<% else %>
<div class="alert alert-warning">
<p>Can not issue a restore for this client. It does not have any successful backups</p>
</div>
<% end %>
<%= link_to client_path(@client), class: 'btn btn-default' do %>
<span class="glyphicon glyphicon-menu-left text-primary"></span>
Back to client
<% end %>
</div>
<%= render partial: 'file_selector' %>
</div>
<script type="text/javascript">
<% min_date, max_date = @client.backup_enabled_datetime_range %>
var minDate = '<%= min_date %>';
var maxDate = '<%= max_date %>';
$('#restore_date').datepicker({
dateFormat: 'yy-mm-dd',
minDate: minDate,
maxDate: maxDate
});
</script>
diff --git a/app/views/hosts/_fd_config.html.erb b/app/views/hosts/_fd_config.html.erb
index c84d696..a079d38 100644
--- a/app/views/hosts/_fd_config.html.erb
+++ b/app/views/hosts/_fd_config.html.erb
@@ -1,47 +1,47 @@
-<div class="col-xs-4">
+<div class="col-lg-4 col-md-6">
<h3>Client FileDaemon Config</h3>
<pre class="pre">
<%= @host.bacula_fd_filedaemon_config %>
</pre>
</div>
-<div class="col-xs-4">
+<div class="col-lg-4 col-md-6">
<h3>Client Director Config</h3>
<pre class="pre">
<%= @host.bacula_fd_director_config %>
</pre>
</div>
-<div class="col-xs-4">
+<div class="col-lg-4 col-md-6">
<h3>Client Messages Config</h3>
<pre class="pre">
<%= @host.bacula_fd_messages_config %>
</pre>
</div>
<div class='col-xs-10'>
<%= link_to fd_config_host_path(@host, token: current_user.token),
class: "btn btn-default", role: "button", download: 'bacula-fd.conf' do %>
<label class="glyphicon glyphicon-download-alt text-primary"></label>
Download Config
<% end %>
<%= link_to '#', data: { toggle: 'modal', target: "#js-fd-config"} do %>
<label class='glyphicon glyphicon-info-sign'></label>
<% end %>
</div>
<div id="js-fd-config" class="modal" tabindex="-1" role="dialog" aria-labelledby="ConfigModal">
- <div class="modal-dialog modal-lg">
- <div class="modal-content container">
- <br />
- <div class="panel panel-default">
- <div class="panel-heading">Config Download</div>
- <div class="panel-body">
- You can also download the config like this:
- <pre>
+ <div class="modal-dialog modal-lg">
+ <div class="modal-content container">
+ <br />
+ <div class="panel panel-default">
+ <div class="panel-heading">Config Download</div>
+ <div class="panel-body">
+ You can also download the config like this:
+ <pre>
<%= "$ wget -O bacula-fd.conf #{fd_config_host_url(@host, token: current_user.token,
protocol: 'https://')}" %>
- </pre>
- </div>
+ </pre>
</div>
</div>
</div>
</div>
+</div>
diff --git a/app/views/hosts/_host_details.html.erb b/app/views/hosts/_host_details.html.erb
index b11c548..dbf2eb7 100644
--- a/app/views/hosts/_host_details.html.erb
+++ b/app/views/hosts/_host_details.html.erb
@@ -1,104 +1,92 @@
-<div class="col-xs-4">
+<div class="col-xs-6 col-md-4">
<div class="table-responsive">
<table class="table table-striped table-bordered table-condensed">
<tr>
<td><b>Name</b></td>
<td><%= @host.name %></td>
</tr>
<tr>
<td><b>FQDN</b></td>
<td><%= @host.fqdn %></td>
</tr>
<tr>
<td><b>FDPort</b></td>
<td><%= @host.port %></td>
</tr>
<tr>
<td><b>Token</b></td>
<td>********</td>
</tr>
<tr>
<td data-toggle="tooltip" title="Defines the length of time that the File records will be available">
<b>File Retention</b> <label class="glyphicon glyphicon-question-sign"></label>
</td>
<td><%= @host.file_retention %> days</td>
</tr>
<tr>
<td data-toggle="tooltip" title="Defines the length of time that the Job records will be available">
<b>Job Retention</b> <label class="glyphicon glyphicon-question-sign"></label>
</td>
<td><%= @host.job_retention %> days</td>
</tr>
<tr>
<td data-toggle="tooltip" title="Determines if a client is backups approved">
<b>Verified</b> <label class="glyphicon glyphicon-question-sign"></label>
</td>
<td>
<% if @host.verified? %>
<span class="label label-success">yes</span>
<% else %>
<span class="label label-danger">no</span>
<% end %>
</td>
</tr>
<tr>
<td><b>Created</b></td>
<td><%= I18n.l(@host.created_at, format: :long) %></td>
</tr>
</table>
</div>
+</div>
- <div class='row'>
- <div class='col-xs-2'>
- <%= link_to edit_host_path(@host), class: "btn btn-default", role: "button" do %>
- <label class="glyphicon glyphicon-edit text-primary"></label>
- Edit
- <% end %>
- </div>
+<div class='col-xs-12'>
+ <%= link_to edit_host_path(@host), class: "btn btn-default", role: "button" do %>
+ <label class="glyphicon glyphicon-edit text-primary"></label>
+ Edit
+ <% end %>
- <% if @host.can_be_disabled? %>
- <div class='col-xs-2'>
- <%= link_to disable_host_path(@host), method: :post,
- data: { confirm: 'This will disable the client. Are you sure?' },
- class: "btn btn-default", role: "button" do %>
- <label class="glyphicon glyphicon-ban-circle text-warning"></label>
- Disable
- <% end %>
- </div>
+ <% if @host.can_be_disabled? %>
+ <%= link_to disable_host_path(@host), method: :post,
+ data: { confirm: 'This will disable the client. Are you sure?' },
+ class: "btn btn-default", role: "button" do %>
+ <label class="glyphicon glyphicon-ban-circle text-warning"></label>
+ Disable
<% end %>
+ <% end %>
- <div class='col-xs-2'>
- <%= link_to host_path(@host), method: :delete,
- data: { confirm: 'This will remove your client from the Backup service. Are you sure?' },
- class: "btn btn-default", role: "button" do %>
- <label class="glyphicon glyphicon-trash text-danger"></label>
- Remove
- <% end %>
- </div>
+ <%= link_to host_path(@host), method: :delete,
+ data: { confirm: 'This will remove your client from the Backup service. Are you sure?' },
+ class: "btn btn-default", role: "button" do %>
+ <label class="glyphicon glyphicon-trash text-danger"></label>
+ Remove
+ <% end %>
- <% if @host.needs_simple_config? %>
- <div class='col-xs-2'>
- <%= link_to new_host_simple_config_path(@host), role: 'button', class: 'btn btn-default' do %>
- <label class="glyphicon glyphicon-cog text-primary"></label>
- Configure
- <% end %>
- </div>
+ <% if @host.needs_simple_config? %>
+ <%= link_to new_host_simple_config_path(@host), role: 'button', class: 'btn btn-default' do %>
+ <label class="glyphicon glyphicon-cog text-primary"></label>
+ Configure
<% end %>
+ <% end %>
- <% if @host.needs_dispatch? %>
- <div class='col-xs-4 pull-right text-right'>
- <%= link_to submit_config_host_path(@host), method: :post,
- class: 'btn btn-success', role: 'button' do %>
- <label class="glyphicon glyphicon-cloud-upload"></label>
- Deploy Changes
- <% end %>
- </div>
- <% end %>
- <% if @host.needs_revoke? %>
- <div class='col-xs-4 pull-right text-right'>
- <%= link_to 'Remove From Backup service', revoke_host_path(@host), method: :delete,
- class: 'btn btn-danger', role: 'button' %>
- </div>
+ <% if @host.needs_dispatch? %>
+ <%= link_to submit_config_host_path(@host), method: :post,
+ class: 'btn btn-success', role: 'button' do %>
+ <label class="glyphicon glyphicon-cloud-upload"></label>
+ Deploy Changes
<% end %>
- </div>
+ <% end %>
+ <% if @host.needs_revoke? %>
+ <%= link_to 'Remove From Backup service', revoke_host_path(@host), method: :delete,
+ class: 'btn btn-danger', role: 'button' %>
+ <% end %>
</div>
diff --git a/app/views/jobs/_job_templates.html.erb b/app/views/jobs/_job_templates.html.erb
index 0abe959..17d22ef 100644
--- a/app/views/jobs/_job_templates.html.erb
+++ b/app/views/jobs/_job_templates.html.erb
@@ -1,27 +1,27 @@
-<div class="col-xs-8">
+<div class="col-lg-9 col-md-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>Client Before Run Job</th>
<th>Client After Run Job</th>
<th>Enabled</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<%= render partial: 'jobs/job_template_details',
collection: @host.job_templates, as: :job %>
</tbody>
</table>
</div>
<%= button_or_disabled_with_label(
@host.blocked?, 'Add Job', new_host_job_path(host_id: @host.id),
class: "btn btn-default", role: "button",
icon_class: 'glyphicon glyphicon-plus', text_class: 'text-success') %>
</div>

Event Timeline