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| %>
-
+

Client


<%= 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 %>
-
+

Job


<%= 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 %>
-
+

Pool


<%= 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 %>
- <%= link_to 'Cancel', admin_settings_path %> + <%= link_to 'Cancel', admin_settings_path, role: :button, class: 'btn btn-danger' %>
<%= f.submit class: 'btn btn-success' %>

<% 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 @@

Settings

<% if !@settings.persisted? %> <% end %>
-
+

Client Settings

-
-
-

Job Settings

-
-
-

Pool Settings

-
-
- -
-
<%= table_for(ConfigurationSetting.current_client_settings_human) %>
-
+
+

Job Settings

<%= table_for(ConfigurationSetting.current_job_settings) %>
-
+
+

Pool Settings

<%= table_for(ConfigurationSetting.current_pool_settings) %>
-
+
<%= link_to 'Change Config', @settings.persisted? ? edit_admin_setting_path(@settings) : new_admin_setting_path, - class: 'btn btn-primary', role: 'button' - %> -
- <% if @settings.persisted? %> -
+ 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' %> -
- <% end %> + <% end %> +
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 @@ -
+

Files

LOADING

-
+
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 @@
-
+
<% if @client.is_backed_up? %>

Restore files for "<%= @client.name %>"

<%= 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' %>
<%= help_block( 'Restore and backup clients must 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')) %>
-
+
<%= f.submit 'Select Specific Files', id: 'select-files', class: 'btn btn-primary' %> -
-
<%= f.submit 'Restore All Files', class: 'btn btn-warning text-right', data: { confirm: "This will restore all your files" } %>
<% end %>
<% else %>

Can not issue a restore for this client. It does not have any successful backups

<% end %> <%= link_to client_path(@client), class: 'btn btn-default' do %> Back to client <% end %>
<%= render partial: 'file_selector' %>
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 @@ -
+

Client FileDaemon Config

 <%= @host.bacula_fd_filedaemon_config %>
   
-
+

Client Director Config

 <%= @host.bacula_fd_director_config %>
   
-
+

Client Messages Config

 <%= @host.bacula_fd_messages_config %>
   
<%= link_to fd_config_host_path(@host, token: current_user.token), class: "btn btn-default", role: "button", download: 'bacula-fd.conf' do %> Download Config <% end %> <%= link_to '#', data: { toggle: 'modal', target: "#js-fd-config"} do %> <% end %>
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 @@ -
+
Name <%= @host.name %>
FQDN <%= @host.fqdn %>
FDPort <%= @host.port %>
Token ********
File Retention <%= @host.file_retention %> days
Job Retention <%= @host.job_retention %> days
Verified <% if @host.verified? %> yes <% else %> no <% end %>
Created <%= I18n.l(@host.created_at, format: :long) %>
+
-
-
- <%= link_to edit_host_path(@host), class: "btn btn-default", role: "button" do %> - - Edit - <% end %> -
+
+ <%= link_to edit_host_path(@host), class: "btn btn-default", role: "button" do %> + + Edit + <% end %> - <% 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 %> - - Disable - <% end %> -
+ <% 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 %> + + Disable <% end %> + <% end %> -
- <%= 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 %> - - Remove - <% end %> -
+ <%= 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 %> + + Remove + <% end %> - <% if @host.needs_simple_config? %> -
- <%= link_to new_host_simple_config_path(@host), role: 'button', class: 'btn btn-default' do %> - - Configure - <% end %> -
+ <% if @host.needs_simple_config? %> + <%= link_to new_host_simple_config_path(@host), role: 'button', class: 'btn btn-default' do %> + + Configure <% end %> + <% end %> - <% if @host.needs_dispatch? %> -
- <%= link_to submit_config_host_path(@host), method: :post, - class: 'btn btn-success', role: 'button' do %> - - Deploy Changes - <% end %> -
- <% end %> - <% if @host.needs_revoke? %> -
- <%= link_to 'Remove From Backup service', revoke_host_path(@host), method: :delete, - class: 'btn btn-danger', role: 'button' %> -
+ <% if @host.needs_dispatch? %> + <%= link_to submit_config_host_path(@host), method: :post, + class: 'btn btn-success', role: 'button' do %> + + Deploy Changes <% end %> -
+ <% end %> + <% if @host.needs_revoke? %> + <%= link_to 'Remove From Backup service', revoke_host_path(@host), method: :delete, + class: 'btn btn-danger', role: 'button' %> + <% end %>
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 @@ -
+
<%= render partial: 'jobs/job_template_details', collection: @host.job_templates, as: :job %>
Name Type FileSet Schedule Client Before Run Job Client After Run Job Enabled Actions
<%= 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') %>